/* Navbar */
.navbar {
    background: rgba(0, 26, 61, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.navbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.navbar-menu {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.navbar-link {
    padding: 0.5rem 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.navbar-link:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.navbar-link.active {
    color: var(--color-primary);
    background: rgba(132, 189, 0, 0.1);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.lang-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-user-name {
    font-size: 0.875rem;
    color: var(--color-text);
}

.navbar-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.navbar-badge.premium {
    background: rgba(132, 189, 0, 0.2);
    color: var(--color-primary);
}

.navbar-usage {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}

.btn-signout {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-signout:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar-toggle span {
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

@media (max-width: 900px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 26, 61, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-user-name {
        display: none;
    }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 400px;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-success {
    background: var(--color-primary);
}

.toast-error {
    background: var(--color-danger);
}

.toast-warning {
    background: #e67e22;
}

.toast-info {
    background: var(--color-secondary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.modal-visible {
    opacity: 1;
}

.modal {
    background: #1a1a2e;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-visible .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.3rem;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-body {
    margin-bottom: 1.5rem;
    color: var(--color-text);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Map Widget */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.map-container-full {
    height: calc(100vh - 120px);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-draft { background: rgba(136, 136, 136, 0.2); color: #888; }
.status-assigned { background: rgba(102, 126, 234, 0.2); color: #667eea; }
.status-in_progress { background: rgba(255, 165, 0, 0.2); color: #ffa500; }
.status-completed { background: rgba(132, 189, 0, 0.2); color: var(--color-primary); }
.status-cancelled { background: rgba(255, 59, 48, 0.2); color: var(--color-danger); }
.status-pending { background: rgba(136, 136, 136, 0.2); color: #888; }
.status-arrived { background: rgba(78, 205, 196, 0.2); color: #4ECDC4; }
.status-failed { background: rgba(255, 59, 48, 0.2); color: var(--color-danger); }
.status-skipped { background: rgba(255, 230, 109, 0.2); color: #ccc040; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Card List */
.card-list {
    display: grid;
    gap: 1rem;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.empty-state h3 {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* Route Items */
.route-item {
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.route-item:hover {
    background: var(--color-surface-hover);
    transform: translateX(5px);
}

.route-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    color: white;
}

.route-address {
    flex: 1;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.btn-export {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.btn-export:hover {
    background: var(--color-surface-hover);
    box-shadow: 0 5px 20px rgba(132, 189, 0, 0.2);
}

@media (max-width: 768px) {
    .export-buttons {
        flex-direction: column;
    }
}
