/* RESET & CORE */
:root {
    /* DEFAULT DARK THEME */
    --bg-deep: #0f172a;
    /* Slate 900 */
    --glass-bg: rgba(15, 23, 42, 0.85);
    /* Sidebar Glass */
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-cyan: #06b6d4; /* Synchronized with landing page */
    --neon-green: #00FF94;
    --neon-red: #FF4545;
    --neon-amber: #FF9800;
    /* TIR accent - matches TIR mode orange */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;

    font-family: 'Inter', sans-serif;
}

/* ═══════════════════════════════════════════════════
   TIR WEIGHT CLASS PANEL
   ═══════════════════════════════════════════════════ */

/* Hidden by default, shown only in TIR mode */
.tir-config-panel {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 152, 0, 0.04);
    border: 1px solid rgba(255, 152, 0, 0.18);
    border-radius: 10px;
    padding: 12px 12px 10px;
    margin-bottom: 4px;
    animation: tirPanelIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tirPanelIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

body.tir-mode .tir-config-panel {
    display: flex;
}

.tir-config-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-amber);
    margin-bottom: 2px;
}

.tir-config-header i {
    font-size: 12px;
}

.tir-weight-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}

.tir-weight-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}

.tir-weight-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 152, 0, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.18s;
}

.tir-weight-btn:hover::before,
.tir-weight-btn.active::before {
    opacity: 1;
}

.tir-weight-btn:hover {
    border-color: rgba(255, 152, 0, 0.4);
    background: rgba(255, 152, 0, 0.08);
    transform: translateY(-1px);
}

.tir-weight-btn.active {
    border-color: var(--neon-amber);
    background: rgba(255, 152, 0, 0.14);
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.2), inset 0 0 8px rgba(255, 152, 0, 0.06);
}

.tir-btn-icon {
    font-size: 14px;
    color: rgba(255, 152, 0, 0.5);
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.tir-weight-btn.active .tir-btn-icon {
    color: var(--neon-amber);
}

.tir-btn-weight {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.tir-weight-btn.active .tir-btn-weight {
    color: var(--neon-amber);
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

.tir-btn-axle {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.tir-weight-btn.active .tir-btn-axle {
    color: rgba(255, 152, 0, 0.7);
}

/* Selected badge */
.tir-selected-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--neon-amber);
    background: rgba(255, 152, 0, 0.07);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 6px;
    padding: 5px 9px;
    margin-top: 2px;
}

.tir-selected-badge i {
    font-size: 11px;
}

.tir-selected-badge span {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════ */

body.tir-mode {
    --neon-cyan: #FF9800;
    /* Amber Alert */
}

/* TIR MODE MODALS & DEEP OVERRIDES */
body.tir-mode .settings-tab-btn.active,
body.tir-mode .curr-opt.active,
body.tir-mode .style-opt.active,
body.tir-mode .lang-opt.active {
    background: rgba(255, 152, 0, 0.1) !important;
    border-color: rgba(255, 152, 0, 0.3) !important;
    color: #FF9800 !important;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.1) !important;
}

body.tir-mode .location-row:hover {
    border-color: rgba(255, 152, 0, 0.2) !important;
    background: rgba(255, 152, 0, 0.03) !important;
}

body.tir-mode .location-row.dragging,
body.tir-mode .waypoint-row.dragging {
    border-color: #FF9800 !important;
    background: rgba(255, 152, 0, 0.05) !important;
}

body.tir-mode .input-group-main .date-input,
body.tir-mode .input-group-main .waypoint-date,
body.tir-mode .drag-handle:hover {
    color: #FF9800 !important;
}

body.tir-mode .op-select {
    background: rgba(255, 152, 0, 0.1) !important;
    border-color: #FF9800 !important;
    color: #FF9800 !important;
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.15) !important;
}

body.tir-mode .op-select:hover {
    background: rgba(255, 152, 0, 0.2) !important;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.2) !important;
}

body.tir-mode .header-logo {
    height: 199px !important;
    /* Set to 199px as requested */
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.25)) !important;
    /* Orange glow instead of cyan */
}

body.tir-mode .header-logo:hover {
    filter: drop-shadow(0 0 12px rgba(255, 152, 0, 0.35)) !important;
}

body.tir-mode .nav-logo {
    height: 199px !important;
    /* Set to 199px as requested */
    filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.25)) !important;
}

body.tir-mode .tool-tile {
    border-color: rgba(255, 152, 0, 0.15) !important;
}

body.tir-mode .tool-tile:hover {
    background: rgba(255, 152, 0, 0.1) !important;
    border-color: #FF9800 !important;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.15) !important;
}

body.tir-mode .tile-icon {
    color: #FF9800 !important;
    filter: drop-shadow(0 0 5px rgba(255, 152, 0, 0.2)) !important;
}

body.tir-mode .fx-btn {
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.15) !important;
}

body.tir-mode .fx-btn:hover {
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25) !important;
}

body.tir-mode select:hover,
body.tir-mode input:hover {
    border-color: #FF9800 !important;
}

/* TIR MODE GLOW OVERRIDES */
body.tir-mode input.glass-input:focus,
body.tir-mode textarea.glass-input:focus,
body.tir-mode select.glass-input:focus {
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.15);
}

body.tir-mode .btn-primary {
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.15);
}

body.tir-mode .switch-btn.active {
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.2);
}

body.tir-mode .route-card.primary.selected {
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.1);
}

body.tir-mode .toll-breakdown-btn:hover {
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.15);
}

body.tir-mode .login-ghost-btn {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), transparent);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

body.tir-mode .login-ghost-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.25);
}

/* --- PREMIUM DRIVE MODE TOGGLE (BUS / TIR) --- */
.premium-mode-toggle {
    position: relative;
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 4px;
    /* Slightly increased padding */
    cursor: pointer;
    margin-bottom: 24px;
    margin-top: 8px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.premium-mode-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
    transition: all 0.5s ease;
}

body.tir-mode .premium-mode-toggle::after {
    background: linear-gradient(90deg, transparent, #FF9800, transparent);
}

.premium-mode-toggle .toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 8px);
    height: calc(100% - 8px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.tir-mode .premium-mode-toggle .toggle-slider {
    left: 50%;
    background: rgba(255, 152, 0, 0.08);
    border-color: rgba(255, 152, 0, 0.3);
}

.premium-mode-toggle .toggle-option {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    /* Increased from 10px to 14px for more presence */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    z-index: 2;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    /* Slightly wider gap */
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.premium-mode-toggle .toggle-option.active {
    color: #fff;
    font-weight: 800;
}

body:not(.tir-mode) .premium-mode-toggle .toggle-option.active {
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
}

body.tir-mode .premium-mode-toggle .toggle-option.active {
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

/* --- TIR MODE NEW CORE OVERRIDES --- */
body.tir-mode .ai-trigger-floating {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.25) 0%, rgba(255, 152, 0, 0.05) 100%) !important;
    border-color: rgba(255, 152, 0, 0.4) !important;
    color: #FF9800 !important;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.2), inset 0 0 10px rgba(255, 152, 0, 0.1) !important;
}

body.tir-mode .ai-trigger-floating:hover {
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.4), inset 0 0 15px rgba(255, 152, 0, 0.2) !important;
    border-color: rgba(255, 152, 0, 0.8) !important;
    text-shadow: 0 0 10px #FF9800 !important;
}

body.tir-mode #btn-hud-share {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.08)) !important;
    border-color: rgba(255, 152, 0, 0.55) !important;
    color: #FF9800 !important;
}

body.tir-mode .share-modal-card, 
body.tir-mode .ai-modal-glass {
    border-top-color: #FF9800 !important;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 50px rgba(255, 152, 0, 0.15) !important;
}

body.tir-mode .share-modal-title,
body.tir-mode .ai-title-main {
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.4) !important;
}

body.tir-mode .ai-title-main {
    background: linear-gradient(90deg, #fff 0%, #FF9800 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

body.tir-mode .ai-close-glass {
    border-color: rgba(255, 152, 0, 0.4) !important;
    color: #FF9800 !important;
}

body.tir-mode .ai-close-glass:hover {
    background: #FF9800 !important;
    box-shadow: 0 0 30px #FF9800 !important;
}

body.tir-mode .ai-scan-laser {
    background: linear-gradient(to bottom, rgba(255, 152, 0, 0) 0%, rgba(255, 152, 0, 0.15) 80%, rgba(255, 152, 0, 0.8) 100%) !important;
    border-bottom-color: #FF9800 !important;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3) !important;
}

body.tir-mode .ai-scan-status {
    color: #FF9800 !important;
    text-shadow: 0 0 15px #FF9800 !important;
    border-color: rgba(255, 152, 0, 0.3) !important;
}

body.tir-mode .ai-glass-btn-scan,
body.tir-mode .share-btn.open-btn {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.18) 0%, rgba(255, 152, 0, 0.05) 100%) !important;
    border-color: rgba(255, 152, 0, 0.6) !important;
    color: #FF9800 !important;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.12) !important;
}

body.tir-mode .ai-glass-btn-scan:hover,
body.tir-mode .share-btn.open-btn:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.28) 0%, rgba(255, 152, 0, 0.1) 100%) !important;
    box-shadow: 0 0 35px rgba(255, 152, 0, 0.28) !important;
}

body.tir-mode .auth-card-face .fx-btn.primary-btn {
    border-color: rgba(255, 152, 0, 0.5) !important;
    color: #FF9800 !important;
}

body.tir-mode .auth-card-face .fx-btn.primary-btn:hover {
    background: #FF9800 !important;
    color: #000 !important;
}

body.tir-mode .auth-input:focus {
    background: rgba(255, 152, 0, 0.03) !important;
    border-color: rgba(255, 152, 0, 0.4) !important;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.1) !important;
}

body.tir-mode .header-logo {
    filter: drop-shadow(0 0 15px rgba(255, 152, 0, 0.4)) !important;
}

body.tir-mode .header-logo:hover {
    filter: drop-shadow(0 0 20px rgba(255, 152, 0, 0.6)) !important;
}

body.tir-mode .glass-modal,
body.tir-mode .glass-panel {
    border-color: rgba(255, 152, 0, 0.15) !important;
    box-shadow: 0 0 40px rgba(255, 152, 0, 0.05), 0 20px 50px rgba(0,0,0,0.5) !important;
}

.premium-mode-toggle .toggle-option i {
    font-size: 16px;
    /* Increased from 14px */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.4;
}

.premium-mode-toggle .toggle-option.active i {
    opacity: 1;
    transform: scale(1.15);
}

/* === HEADER LOGO STYLING === */
.header-logo {
    height: 200px;
    /* Further reduced to 200px */
    /* Final massive size */
    width: 100%;
    max-width: 320px;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.4));
}

.header-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.6));
}

.brand {
    display: flex !important;
    flex-direction: column !important;
    /* Stack logo and icon if needed, or keep row and center? */
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    /* Total removal of padding */
    border-bottom: none !important;
    /* Removed divider as requested */
    position: relative;
    margin-bottom: 0 !important;
    /* Zero margin as requested */
    min-height: auto !important;
}

.brand .tutorial-trigger-mini {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.brand .tutorial-trigger-mini:hover {
    color: var(--neon-cyan);
    transform: rotate(15deg);
}

/* --- đźš€ SECURE GATE & LANDING PAGE OVERHAUL --- */
body.system-locked .sidebar,
body.system-locked .header-controls,
body.system-locked #tools-trapezoid-toggle,
body.system-locked #mission-bar {
    display: none !important;
}

.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.1);
}

.landing-content {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(6, 182, 212, 0.1);
    padding: 60px;
    border-radius: 32px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.05);
    text-align: center;
    max-width: 550px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.landing-logo {
    font-family: 'Inter', sans-serif;
    font-size: 80px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -3px;
    background: linear-gradient(to bottom, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.landing-subtitle {
    letter-spacing: 4px;
    font-size: 11px;
    margin-bottom: 60px;
    opacity: 0.8;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.landing-btn {
    width: 280px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    border: none;
}

.landing-btn.primary {
    background: #fff;
    color: #020617;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.landing-btn.primary:hover {
    background: var(--neon-cyan);
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(6, 182, 212, 0.2);
}

.landing-btn.outline {
    width: 280px;
    /* Same as login button */
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 2px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.landing-btn.outline:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--neon-cyan);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.15);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* Subtle gloss for premium feel - No "paski" (bars) */
.landing-btn.outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    transition: none;
    /* Removed animation loop */
}

.landing-btn.outline:hover::before {
    transition: 0.6s;
    left: 100%;
}

.landing-footer {
    margin-top: 40px;
    font-size: 10px;
    letter-spacing: 2px;
    opacity: 0.3;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

/* LIGHT THEME OVERRIDES */
body.light-theme {
    --bg-deep: #f1f5f9;
    /* Slate 100 */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --neon-cyan: #0284c7;
    /* Sky 600 - darker for contrast */
    --neon-green: #16a34a;
    /* Green 600 */
    --neon-red: #dc2626;
    /* Red 600 */
    --text-main: #0f172a;
    --text-muted: #475569;
}

/* Specific Light Theme for Tools Panel */
body.light-theme .tools-panel-container {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-left: 3px solid var(--neon-cyan);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05), inset 1px 1px 0 rgba(255, 255, 255, 1);
}

body.light-theme #tools-trapezoid-toggle {
    background: #f1f5f9;
    border-color: var(--neon-cyan);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .tool-tile {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(2, 132, 199, 0.1);
}

body.light-theme .tool-tile:hover {
    background: rgba(2, 132, 199, 0.05);
    border-color: var(--neon-cyan);
}

body.light-theme .tool-tile span {
    color: var(--text-main);
}

body.light-theme .fx-group input,
body.light-theme .c-group input,
body.light-theme .c-group select,
body.light-theme #fx-tool-content .fx-row select,
body.light-theme #customs-tool-content select {
    background-color: #fff !important;
    background-image: none;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

body.light-theme #fx-tool-content .fx-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230284c7' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 12px) center !important;
}

body.light-theme #fx-tool-content .fx-group input {
    background-color: rgba(2, 132, 199, 0.05) !important;
    border-color: rgba(2, 132, 199, 0.2) !important;
}

body.light-theme .op-select {
    background: rgba(2, 132, 199, 0.05);
    border-color: rgba(2, 132, 199, 0.3);
    color: var(--neon-cyan);
}

body.light-theme .op-select option {
    background: #fff;
    color: var(--text-main);
}

body.light-theme #result {
    background-color: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.1);
    color: var(--neon-green);
}

body.light-theme .preview-box {
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

body.light-theme .tool-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme #vload-wrapper input,
body.light-theme #vl-stage {
    background-color: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme #vload-wrapper input {
    color: var(--text-main) !important;
}

body.light-theme #vl-stage {
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* --- LIGHT THEME: COMPREHENSIVE OVERRIDES --- */

/* 1. Header & Navigation */
body.light-theme .nav-btn,
body.light-theme .theme-switch-container,
body.light-theme .nav-circle {
    background: #fff !important;
    color: var(--text-main) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .nav-btn:hover,
body.light-theme .theme-switch-container:hover,
body.light-theme .nav-circle:hover {
    background: #f8fafc !important;
    border-color: var(--neon-cyan) !important;
}

body.light-theme .login-ghost-btn {
    background: #fff !important;
    color: var(--neon-cyan) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1) !important;
}

body.light-theme .login-ghost-btn:hover {
    background: rgba(2, 132, 199, 0.05) !important;
}

/* 2. Modals & Popups */
body.light-theme .modal-content {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 0, 0, 0.05) !important;
    color: var(--text-main) !important;
}

body.light-theme .modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .modal-header h3 {
    color: var(--text-main) !important;
    text-shadow: none !important;
}

/* 3. Cards & Lists */
body.light-theme .history-card-horizontal,
body.light-theme .team-member-card,
body.light-theme .route-card,
body.light-theme .stop-input-group {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .history-card-horizontal:hover,
body.light-theme .team-member-card:hover,
body.light-theme .route-card:hover {
    background: #f8fafc !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .h-card-title .main-name,
body.light-theme .member-email,
body.light-theme .rc-title,
body.light-theme .rc-cost,
body.light-theme #profile-email,
body.light-theme .company-title-display {
    color: var(--text-main) !important;
}

/* 4. Forms & Input Elements */
body.light-theme .glass-input,
body.light-theme .stop-precise-addr {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-main) !important;
}

body.light-theme .glass-input:focus,
body.light-theme .stop-precise-addr:focus {
    background: #fff !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1) !important;
}

body.light-theme .currency-group,
body.light-theme .filter-pills,
body.light-theme .pdf-tab-nav {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .curr-opt:hover,
body.light-theme .filter-pill:hover,
body.light-theme .pdf-tab-btn:hover {
    background: rgba(0, 0, 0, 0.03) !important;
    color: var(--text-main) !important;
}

body.light-theme .curr-opt.active,
body.light-theme .filter-pill.active,
body.light-theme .pdf-tab-btn.active {
    background: var(--neon-cyan) !important;
    color: #fff !important;
}

/* 5. Misc UI Elements */
body.light-theme .firebase-status-pill {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .status-text {
    color: var(--text-muted) !important;
}

body.light-theme .label-title,
body.light-theme .section-subtitle,
body.light-theme .stop-label {
    color: var(--text-muted) !important;
    opacity: 0.9;
}

/* --- TUTORIAL THEME (LIGHT) --- */
.emarox-theme .driver-popover-content {
    background: #ffffff !important;
    color: #0f172a !important;
    /* Slate 900 */
}

.emarox-theme .driver-popover-title {
    color: #0284c7 !important;
    /* Sky 600 */
    font-weight: 800 !important;
}

.emarox-theme .driver-popover-description {
    color: #475569 !important;
    /* Slate 600 */
}

.emarox-theme .driver-popover-arrow {
    border-color: #ffffff !important;
}

.emarox-theme .driver-popover-footer button {
    background: #0284c7 !important;
    color: #ffffff !important;
    text-shadow: none !important;
    border: none !important;
}

.emarox-theme .driver-popover-footer button:hover {
    background: #0369a1 !important;
}

.driver-popover-arrow {
    width: 24px !important;
    height: 24px !important;
    overflow: visible !important;
}

.driver-popover-arrow svg {
    width: 24px !important;
    height: 24px !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-main);
    display: flex;
    transition: background 0.3s ease, color 0.3s ease;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background: var(--bg-deep);
}

/* --- SIDEBAR (GLASS) --- */
.sidebar {
    width: 20%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1000;
    background: #141e2b; /* Deep background for planning section */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 0 20px 40px 30px;
    /* Removed 30px top padding */
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: visible;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Date Inputs Positioning - SIDE BY SIDE */
.location-with-date {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    margin-bottom: 12px;
}

.location-with-date .input-wrapper {
    flex: 1;
}

.op-select {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 2px;
    border-radius: 6px;
    font-size: 9px;
    /* Shrunk slightly */
    font-weight: 800;
    cursor: pointer;
    width: 65px;
    /* Shrunk from 80 */
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.op-select:hover {
    background: rgba(6, 182, 212, 0.2);
}

.op-select option {
    background: var(--bg-deep);
    color: var(--text-main);
}

.date-input,
.waypoint-date {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--neon-cyan);
    padding: 8px 4px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    outline: none;
    transition: all 0.2s;
    width: 140px;
    /* Reduced from 150 to save space */
}

.date-input:focus,
.waypoint-date:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Waypoint Row Update */
.waypoint-row {
    display: flex;
    gap: 6px;
    /* Reduced from 10 */
    align-items: center;
    margin-bottom: 12px;
}

.waypoint-input-group {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

/* Old brand definition removed to allow for new header logo styling */


/* --- SIDEBAR TABS --- */
.sidebar-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}


/* --- TRUST HUB UI --- */
.intel-header {
    margin-bottom: 15px;
    border-left: 2px solid var(--neon-cyan);
    padding-left: 12px;
}

.intel-header h4 {
    font-size: 12px;
    color: var(--text-main);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.intel-header p {
    font-size: 9px;
    color: var(--text-muted);
}

.intel-search-box {
    position: relative;
    margin-bottom: 15px;
}

.intel-search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 40px 10px 12px;
    color: #fff;
    font-size: 11px;
    outline: none;
    transition: 0.3s;
}

.intel-search-box input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.intel-search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

/* FORM BOX OVERLAY */
.intel-form-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    position: relative;
}

.intel-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.intel-form-header span {
    font-size: 9px;
    font-weight: 900;
    color: var(--neon-cyan);
    letter-spacing: 1.5px;
}

.intel-form-header i {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
}

.intel-form-header i:hover {
    color: var(--neon-red);
}

/* RESULTS AREA */
.intel-results-area {
    margin-top: 20px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    padding-right: 5px;
}

/* TRUST CARDS */
.trust-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: 0.2s;
    cursor: default;
    position: relative;
}

.trust-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.trust-card .status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: 0.3s opacity;
}

.trust-card:hover .status-indicator {
    opacity: 0;
}

.trust-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

.trust-card:hover .trust-actions {
    opacity: 1;
    pointer-events: auto;
}

.trust-actions i {
    cursor: pointer;
    font-size: 15px;
    color: var(--neon-cyan);
    opacity: 0.7;
    transition: 0.2s;
}

.trust-actions i:hover {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.trust-actions i.delete {
    color: #ff6b6b;
}

.trust-actions i.delete:hover {
    color: var(--neon-red);
    text-shadow: 0 0 8px var(--neon-red);
}

.status-trusted {
    background: rgba(0, 255, 148, 0.15);
    color: #00FF94;
    border: 1px solid rgba(0, 255, 148, 0.3);
}

.status-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-warning {
    background: rgba(255, 184, 0, 0.15);
    color: #FFB800;
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.status-blocked {
    background: rgba(255, 69, 69, 0.15);
    color: #FF4545;
    border: 1px solid rgba(255, 69, 69, 0.3);
}

/* Status-specific card accents */
.trust-card.status-group-trusted {
    border-left: 3px solid #00FF94;
}

.trust-card.status-group-warning {
    border-left: 3px solid #FFB800;
}

.trust-card.status-group-blocked {
    border-left: 3px solid #FF4545;
}

.trust-card.status-group-neutral {
    border-left: 3px solid #94a3b8;
}

.trust-card.status-group-trusted .verify-info {
    color: #00FF94;
}

.trust-card.status-group-warning .verify-info {
    color: #FFB800;
}

.trust-card.status-group-blocked .verify-info {
    color: #FF4545;
}

.trust-card.status-group-neutral .verify-info {
    color: var(--text-muted);
}

.trust-card .comp-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
    width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trust-card .comp-nip {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 8px;
}

.trust-card .comp-reason {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    line-height: 1.4;
}

.trust-card .verify-info {
    margin-top: 12px;
    font-size: 10px;
    color: var(--neon-cyan);
    opacity: 0.8;
}

.tutorial-trigger-mini {
    margin-left: 5px;
    cursor: pointer;
    color: var(--neon-cyan);
    font-size: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.tutorial-trigger-mini:hover {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.brand-icon {
    font-size: 24px;
    color: var(--neon-cyan);
    margin-right: 10px;
}

.history-toggle {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.history-toggle:hover {
    color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}


/* --- HEADER CONTROLS (v7 Luminous Glass) --- */
.header-controls {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    background: #141e2b; /* Deep background for HUD */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.4s ease;
}

/* Fix: Hide Leaflet residue containers (white square glitch) */
.leaflet-control-container,
.leaflet-routing-container,
.leaflet-control-attribution {
    display: none !important;
}

.header-controls:hover {
    background: #141e2b;
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.nav-circle {
    width: 38px;
    height: 38px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-circle:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.nav-circle i {
    font-size: 16px;
}

.nav-btn {
    position: relative;
}

.login-ghost-btn {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), transparent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #fff;
    padding: 10px 24px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    clip-path: polygon(12% 0, 100% 0, 100% 75%, 88% 100%, 0 100%, 0% 25%);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-ghost-btn::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.6s ease;
}

.login-ghost-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.login-ghost-btn:hover::before {
    top: 100%;
}

.login-ghost-btn i {
    font-size: 13px;
    color: var(--neon-cyan);
    transition: 0.4s;
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.login-ghost-btn:hover i {
    color: #fff;
    filter: drop-shadow(0 0 15px #fff);
    transform: rotate(15deg);
}


.group-tab-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.login-ghost-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.login-ghost-btn i {
    font-size: 14px;
}

/* Theme Switcher (Top Right) */
.theme-switch-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-switch-container:hover {
    transform: translateY(-2px);
}

.theme-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
}

/* Control Groups */
.control-group {
    margin-bottom: 24px;
}

.label-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Inputs */
input.glass-input,
textarea.glass-input,
select.glass-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    /* Darker glass tint */
    border: 1px solid var(--glass-border);
    padding: 12px;
    color: var(--text-main);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
}

select.glass-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--neon-cyan) 50%), linear-gradient(135deg, var(--neon-cyan) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 5px), calc(100% - 15px) calc(1em + 5px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
    cursor: pointer;
}

select.glass-input option {
    background: #0f172a;
    color: #fff;
    padding: 10px;
}

input.glass-input:focus,
textarea.glass-input:focus,
select.glass-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--neon-cyan);
    color: var(--bg-deep);
    /* Contrast Text */
    border: none;
    padding: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-demo {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--text-muted);
    color: var(--text-muted);
    padding: 10px;
    margin-top: 15px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
}

.btn-demo:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Vehicle Switch */
.switch-row {
    display: flex;
    gap: 4px;
}

.switch-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.switch-btn.active {
    background: var(--neon-cyan);
    color: #fff;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* --- WAYPOINT MANAGEMENT --- */
.waypoint-row {
    position: relative;
    margin-bottom: 8px;
}

.waypoint-input {
    padding-right: 12px;
    /* Reset padding */
}

.remove-waypoint-btn {
    background: var(--neon-red);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    /* Ensure it doesn't shrink */
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
    z-index: 10;
}

.remove-waypoint-btn:hover {
    background: #ff6b6b;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 69, 69, 0.5);
}


/* --- ROUTE CARDS (UI Refresh) --- */
.route-cards-container {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    padding: 0 5px;
}

.route-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.route-card:hover {
    background: rgba(30, 41, 59, 0.6);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.route-card.selected {
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.route-card.primary.selected {
    border-color: var(--neon-cyan);
    border-left-width: 5px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.route-card.economy.selected {
    border-color: var(--neon-green);
    border-left-width: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 148, 0.15);
}

.route-card.primary {
    border-left-color: var(--neon-cyan);
}

.route-card.economy {
    border-left-color: var(--neon-green);
}

.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rc-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-transform: uppercase;
    opacity: 0.9;
}

.rc-tag {
    font-size: 9px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.rc-top-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.rc-cost {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.rc-delta {
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.rc-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    margin-top: 5px;
}

.rc-metric {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rc-metric i {
    color: var(--text-muted);
    opacity: 0.6;
}

.toll-breakdown-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
}

.toll-breakdown-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.rc-loading {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px dashed var(--glass-border);
}

/* --- MISSION BAR (HUD) --- */
.mission-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-200%);
    /* Hidden initially */
    background: rgba(15, 23, 42, 0.85);
    /* Changed to exactly match the dropdown */
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 12px 30px 12px 15px;
    /* Less left padding for the toggle */
    border-radius: 50px;
    display: flex;
    gap: 30px;
    z-index: 999;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-radius 0.3s ease;
    align-items: center;
}

.mission-bar.visible {
    transform: translateX(-50%) translateY(0);
}

/* Compare Toggle Button */
.compare-toggle-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: var(--neon-cyan);
    margin-right: -10px;
    /* Pull it slightly closer to the distance metric */
}

.compare-toggle-container i {
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.compare-toggle-container:hover {
    background: rgba(6, 182, 212, 0.1);
}

/* Panel State Classes */
.mission-bar.panel-open {
    border-radius: 20px 20px 0 0;
    /* Flattens the bottom when panel is open */
    border-bottom: 1px solid transparent;
    /* Remove border division */
    transition: border-radius 0s, all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mission-bar.panel-open .compare-toggle-container {
    background: rgba(6, 182, 212, 0.1);
}

.mission-bar.panel-open .compare-toggle-container i {
    transform: rotate(180deg);
}

/* Comparison Dropdown Panel */
.route-compare-panel {
    position: absolute;
    top: 100%;
    /* Drop exactly from the bottom pixel of the HUD */
    /* Start from center of mission bar to slide out naturally */
    left: -1px;
    /* Account for the 1px border of parent */
    width: calc(100% + 2px);
    /* Match exact outer width including borders */
    /* Exact same width as the mission bar */
    background: rgba(15, 23, 42, 0.85);
    /* Matched exact mission-bar background */
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-top: none;
    /* Hide top border to merge seamlessly */
    border-radius: 0 0 20px 20px;
    /* Match the 20px rounding from parent */
    padding: 20px 25px 20px 25px;
    /* Removed massive top padding */
    /* Top padding pushes content below the main bar */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    clip-path: inset(0px -30px -40px -30px);
    /* Changed to 0px top inset so it meshes cleanly */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
    /* Slide from behind the main 50px pill */
}

.mission-bar.panel-open .route-compare-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Drops down to reveal content */
}

.rc-header {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 12px;
    text-align: left;
}

.rc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.rc-row+.rc-row:not([style*="display: none"]) {
    margin-top: 8px;
}

.rc-row:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 255, 157, 0.3);
    /* Default green for Cheapest */
    transform: translateX(4px);
    box-shadow: inset 0 0 15px rgba(0, 255, 157, 0.1);
}

.short-row:hover {
    border-color: rgba(255, 215, 0, 0.4);
    /* Gold for Shortest */
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.rc-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rc-name {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.rc-name i {
    font-size: 18px;
    color: #00FF9D;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

.rc-col.diff {
    align-items: center;
    text-align: center;
}

.rc-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.rc-val {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.rc-val.good {
    color: #00FF9D;
}

.rc-val.bad {
    color: var(--neon-red);
}

/* --- HUD METRICS CONTINUED --- */
.hud-metric {
    text-align: center;
}

.hud-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.hud-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
}

.hud-value.highlight {
    color: var(--neon-cyan);
    font-size: 18px;
}

.hud-value.profit {
    color: var(--neon-green);
    font-size: 18px;
}

.hud-value.loss {
    color: var(--neon-red);
    font-size: 18px;
}

/* MAP & Utilities */
#map {
    height: 100vh;
    width: 100%;
    background: #000;
}

.status-log {
    margin-top: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.8;
}

/* AUTOCOMPLETE */
/* .input-wrapper handled at end of file */

/* MISSION PANEL REFACTOR */
.location-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px 8px 2px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-row:hover {
    border-color: rgba(6, 182, 212, 0.2);
    background: rgba(6, 182, 212, 0.03);
}

.location-row.dragging {
    opacity: 0.2;
    transform: scale(0.96);
    border: 1px dashed var(--neon-cyan);
    filter: blur(1px);
}

.input-group-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 8px 0;
}

.input-group-main .input-wrapper {
    width: 100%;
}

.input-group-main .glass-input {
    width: 100%;
}

.input-group-main .date-input,
.input-group-main .waypoint-date {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--neon-cyan);
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* SUGGESTIONS DYNAMIC WIDTH */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    max-width: 500px;
    white-space: normal;
    overflow-x: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
    /* Hidden by default */
}

.suggestions-dropdown.active {
    display: block;
}

/* WAYPOINT DRAG AND DROP */
.drag-handle {
    cursor: grab;
    display: flex;
    gap: 2px;
    padding: 0 8px;
    color: var(--text-muted);
    transition: color 0.2s;
    height: 100%;
    align-items: center;
}

.drag-handle:hover {
    color: var(--neon-cyan);
}

.drag-handle:active {
    cursor: grabbing;
}

.waypoint-row.dragging {
    opacity: 0.4;
    transform: scale(0.98);
    border: 1px dashed var(--neon-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.waypoint-row {
    transition: transform 0.2s, opacity 0.2s;
    user-select: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion-item:hover {
    background: rgba(6, 182, 212, 0.12);
    color: #fff;
    padding-left: 22px;
}

.sugg-flag-wrap {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sugg-flag-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.sugg-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sugg-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--neon-cyan);
    min-width: 105px;
    letter-spacing: 0.5px;
}

.sugg-city {
    font-weight: 500;
    color: var(--text-main);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* PRIMARY & SECONDARY BTNS */
.btn-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* MODAL SYSTEM */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    /* JS toggles this */
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #0a101e;
    /* Deep Slate/Blue */
    border: 1px solid var(--neon-cyan);
    width: 450px;
    max-height: 90vh;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 20px rgba(6, 182, 212, 0.1);
    color: var(--text-main);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    flex-shrink: 0;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 10px;
}

/* Modal Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 10px;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-cyan);
    margin: 0;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.close-btn:hover {
    color: var(--neon-red);
}

/* AUTH MODAL SPECIFIC */
.auth-card {
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.auth-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    transition: 0.3s;
    letter-spacing: 1px;
}

.auth-tab-btn.active {
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: slideUp 0.3s ease;
}

.auth-actions {
    margin-top: 30px;
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--neon-cyan), #00A3FF);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.toll-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.toll-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

.toll-table td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#fx-result {
    margin-top: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
    animation: fadeIn 0.3s ease;
}

.cost-cell {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.total-row td {
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
    margin-top: 15px;
    font-style: italic;
    line-height: 1.4;
}

.modal-note {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.5;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.3;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

/* HISTORY SPECIFIC */
.history-container {
    max-height: 450px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 5px;
}

.history-container::-webkit-scrollbar {
    width: 4px;
}

.history-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.history-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    border-left: 3px solid var(--neon-cyan);
}

.history-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--neon-cyan);
    transform: translateX(3px);
}

.history-card .date {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
}

.history-card .route-text {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    display: block;
    margin-bottom: 8px;
}

.history-card .details-row {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.history-card .val {
    color: var(--neon-cyan);
    font-weight: 700;
}

.history-card .delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.5;
}

.history-card .delete-btn:hover {
    color: var(--neon-red);
    opacity: 1;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-style: italic;
    font-size: 13px;
}

/* --- SETTINGS MODAL REDESIGN --- */
.settings-layout {
    display: flex;
    min-height: 500px;
}

.settings-sidebar {
    width: 220px;
    border-right: 1px solid var(--glass-border);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-main {
    flex: 1;
    padding: 25px 35px;
    max-height: 800px;
    overflow-y: auto;
}

.settings-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.settings-tab-btn i {
    width: 16px;
    text-align: center;
}

.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.settings-tab-btn.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.settings-content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-content-section.active {
    display: block;
}

.settings-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.settings-info-box {
    background: rgba(6, 182, 212, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.settings-info-box h5 {
    color: var(--neon-cyan);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.modal-content.wide {
    width: 950px !important;
}

/* License Panel Styles */
.status-pill-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-pill-large.active {
    background: rgba(0, 255, 148, 0.1);
    color: var(--neon-green);
    border-color: rgba(0, 255, 148, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 148, 0.1);
}

.seats-progress-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--glass-border);
}

.seats-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
    transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.seats-info-text {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.license-details-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 12px;
    margin-top: 15px;
}

.settings-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 35px;
    border-top: 1px solid var(--glass-border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SETTINGS LANGUAGE GRID --- */
.settings-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 25px 0;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.lang-btn-opt {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.lang-btn-opt:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-btn-opt.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--neon-cyan);
    color: #fff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.flag-img {
    width: 22px;
    height: auto;
    border-radius: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.lang-btn-opt:hover .flag-img {
    transform: scale(1.1);
}

.lang-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}



@keyframes fadeOut {
    0% {
        opacity: 1;
        bottom: 30px;
    }

    100% {
        opacity: 0;
        bottom: 30px;
    }
}

/* Search Icon inside input */
/* Search Icon inside input */
.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    /* Ensure padding doesn't break width */
}

/* Ensure global input styles don't break our wrapper context */
.input-wrapper input.glass-input {
    width: 100%;
    margin-bottom: 0;
    padding-right: 40px;
    /* Space for icon */
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    right: 15px;
    /* Fixed distance from right edge */
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: 0.2s;
    z-index: 10;
    pointer-events: auto;
    display: block;
}

.search-icon:hover {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--neon-cyan));
    transform: translateY(-50%) scale(1.1);
}

/* Main Panel Container */
/* ═══════════════════════════════════════════════════
   MODERN TOOLS MENU (COMPACT REWRITE)
   ═══════════════════════════════════════════════════ */

.tools-panel-container {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(0);
    width: 320px;
    height: auto;
    min-height: 400px;
    background: #141e2b;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    z-index: 9000;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 30px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.tools-panel-container.closed {
    transform: translateY(-50%) translateX(100%);
}

.tools-panel-container.wide-panel {
    width: 380px;
}

#tools-trapezoid-toggle {
    position: absolute;
    top: 50%;
    left: -44px;
    transform: translateY(-50%);
    width: 44px;
    height: 60px;
    background: #141e2b;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-right: none;
    border-radius: 12px 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

#toggle-arrow {
    color: var(--neon-cyan);
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tools-panel-container.closed #toggle-arrow {
    transform: rotate(0deg);
}

.tools-panel-container:not(.closed) #toggle-arrow {
    transform: rotate(180deg);
}

/* View Switching Logic */
.panel-view {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.active-view {
    display: block !important;
    opacity: 1;
}

.hidden-view {
    display: none !important;
}

.panel-header {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 32px;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tool-tile {
    position: relative;
    background: rgba(255, 255, 255, 0.03); /* Dark glass variant */
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    
    /* ENTRANCE ANIMATION */
    opacity: 0;
    transform: translateY(10px);
}

.tools-panel-container:not(.closed) .tool-tile {
    animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(var(--order) * 70ms);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-tile:hover {
    transform: translateY(-2px);
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.25);
}

.tool-tile:active {
    transform: translateY(0) scale(0.96);
    transition: transform 0.15s ease;
}

/* CARDS HOVER EFFECTS (LINE & GLOW) */
.card-shimmer-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.tool-tile:hover .card-shimmer-line {
    transform: scaleX(1);
}

.card-inner-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.tool-tile:hover .card-inner-glow {
    opacity: 1;
}

/* ICON RING & PULSE */
.tile-icon-ring {
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tile-icon-ring i {
    font-size: 32px;
    color: var(--neon-cyan); /* Neonowy niebieski dla ikon */
    transition: all 0.3s ease;
}

.tool-tile:hover .tile-icon-ring {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.tool-tile:hover .tile-icon-ring i {
    animation: iconPulse 0.5s ease-in-out;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.tool-tile span {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85); /* Jaśniejsze napisy pod ikonami */
    transition: color 0.25s ease;
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
}

.tool-tile:hover span {
    color: #ffffff;
}

/* Tool View Header & Close Button */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.tool-header span {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.close-tool-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-tool-btn:hover {
    color: #ff4444;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    transform: scale(1.1);
}

/* FX Module Specific Styling */
.fx-group {
    margin-bottom: 25px;
    /* Increased to prevent overlap */
}

.fx-group label {
    display: block;
    color: var(--neon-cyan);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    font-weight: 700;
    opacity: 0.8;
}

#fx-tool-content .fx-group input {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 12px 15px;
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.1);
    width: 100%;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

#fx-tool-content .fx-group input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

/* Hide spin buttons for cleaner look */
#fx-tool-content .fx-group input::-webkit-outer-spin-button,
#fx-tool-content .fx-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.fx-swap-trigger {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--neon-cyan);
    transition: all 0.2s ease;
    filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.2));
}

.fx-swap-trigger:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--neon-cyan);
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.fx-swap-trigger:active {
    transform: scale(0.9) rotate(180deg);
}

#fx-tool-content .fx-row select {
    flex: 1;
    background: #0a101e;
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300f7ff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#fx-tool-content .fx-row select:hover {
    border-color: var(--neon-cyan);
    background-color: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
}

#fx-tool-content .fx-row select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* Force dark theme for the selection list where supported */
#fx-tool-content .fx-row select option {
    background-color: #0f172a;
    color: white;
    padding: 10px;
    font-size: 14px;
}

.fx-btn {
    width: 100%;
    padding: 12px 10px;
    background: var(--neon-cyan);
    color: #000;
    font-weight: 900;
    border: none;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
}

.fx-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
}

.fx-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0;
    box-shadow: none;
}

.fx-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

#result {
    margin-top: 15px;
    padding: 15px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 900;
    color: var(--neon-green);
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(0, 255, 148, 0.3);
    background: rgba(0, 255, 148, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 148, 0.1);
}

.fx-footer {
    font-size: 0.7rem;
    color: #888;
    margin-top: 15px;
    text-align: center;
    opacity: 0.7;
}

/* CUSTOMS TOOL STYLING */
.customs-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.c-group {
    display: flex;
    flex-direction: column;
}

.c-group label {
    font-size: 10px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-weight: 700;
    opacity: 0.8;
}

.c-group input,
.c-group select {
    background: #0a101e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.c-group input:focus,
.c-group select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.4);
}

.c-row {
    display: flex;
    gap: 10px;
}

.c-group.half {
    width: 50%;
}

.preview-box {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    font-size: 11px;
    padding: 12px;
    box-sizing: border-box;
    resize: none;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
}

/* GEO SEARCH STYLING (Premium Overhaul) */
.geo-dual-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 15px;
}

.geo-field label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    font-weight: 700;
    opacity: 0.8;
}

.vl-3d-hint {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
    pointer-events: none;
    text-transform: uppercase;
    opacity: 0.6;
}

.geo-field input {
    width: 100%;
    padding: 14px;
    background: rgba(10, 16, 30, 0.6);
    border: 1px solid rgba(0, 247, 255, 0.15);
    color: white;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.geo-field input:focus {
    border-color: var(--neon-cyan);
    background: rgba(10, 16, 30, 0.8);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.geo-field input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.geo-btn-wide {
    width: 100%;
    background: linear-gradient(90deg, #00f7ff, #00d2ff);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 247, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.geo-btn-wide:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 25px rgba(0, 247, 255, 0.5);
    transform: translateY(-2px) scale(1.01);
}

.geo-btn-wide:active {
    transform: translateY(0) scale(0.98);
}

.geo-result-container {
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.08), rgba(0, 247, 255, 0.03));
    border: 1px solid rgba(0, 247, 255, 0.25);
    border-radius: 16px;
    padding: 25px;
    margin-top: 60px;
    text-align: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.geo-result-container.hidden {
    display: none;
}

.iso-big {
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    display: block;
    line-height: 1;
    text-shadow: 0 0 30px rgba(0, 247, 255, 0.5);
    letter-spacing: -2px;
}

.country-name {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--neon-cyan);
    letter-spacing: 4px;
    font-weight: 800;
    margin-top: 8px;
    display: block;
    opacity: 0.9;
}

.result-details {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.res-label {
    color: #94a3b8;
    font-weight: 500;
}

.res-value {
    color: #fff;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* QUICK ACCESS - GLOWING CIRCLES */
.geo-quick-tags {
    margin-top: 10px;
}

.quick-access-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    font-weight: 700;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quick-access-label::before,
.quick-access-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.quick-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 5px;
}

.quick-tag-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 247, 255, 0.25);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    position: relative;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.quick-tag-btn span {
    display: block;
    line-height: 1;
}

.quick-tag-btn img {
    width: 24px;
    height: auto;
    border-radius: 2px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.quick-tag-btn:hover img {
    filter: drop-shadow(0 0 8px rgba(0, 247, 255, 0.5));
    transform: scale(1.1);
}

.geo-result-flag {
    width: 80px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.2);
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.5s ease-out;
}

.quick-tag-btn:active {
    transform: scale(0.95);
}

/* ROUTE CARDS (Restored) */
.route-cards-container {
    display: none;
    /* JS toggles Flex */
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.route-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.route-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.route-card.selected {
    background: rgba(0, 255, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.route-card.primary .rc-tag {
    background: var(--neon-cyan);
    color: #000;
}

.route-card.alternative .rc-tag {
    background: var(--neon-green);
    color: #000;
}

.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rc-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

.rc-cost {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.route-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* DARK MODE INPUTS */
.geo-input-group {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    position: relative;
}

.geo-input-group input {
    background: #020617 !important;
    border: 1px solid #334155;
    color: white !important;
    padding: 12px;
    border-radius: 4px;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.geo-input-group input:focus {
    border-color: #00f7ff;
    box-shadow: 0 0 8px rgba(0, 247, 255, 0.2);
}

.geo-btn {
    background: #00f7ff;
    border: none;
    border-radius: 4px;
    width: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
}


/* STOP & GO (DETENTION CALCULATOR) */
.sg-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sg-row {
    display: flex;
    gap: 10px;
}

.sg-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sg-group label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
}

.sg-group input {
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.sg-group input:focus {
    border-color: #00f7ff;
}

.sg-result {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-top: 5px;
}

.sg-summary {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
}

.neon-text {
    color: #4ade80;
    text-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
}

.hidden {
    display: none;
}

.icon-green {
    color: #22c55e !important;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.pallet-item {
    position: absolute;
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.6), rgba(0, 247, 255, 0.3));
    border: 1px solid var(--neon-cyan);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
    z-index: 10;
    border-radius: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transform-style: preserve-3d;
}

/* 3D Thickness */
.pallet-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(6, 182, 212, 0.4);
    transform: rotateX(-90deg);
    transform-origin: bottom;
    border: 1px solid var(--neon-cyan);
}

.pallet-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 100%;
    background: rgba(0, 180, 210, 0.4);
    transform: rotateY(90deg);
    transform-origin: left;
    border: 1px solid var(--neon-cyan);
}

.pallet-item:active {
    cursor: grabbing;
    z-index: 1000 !important;
    transform: translateZ(20px) scale(1.05);
    background: rgba(0, 247, 255, 0.8);
}

.pallet-item.collision {
    background: rgba(239, 68, 68, 0.5);
    border-color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
}

.pallet-item.collision::after,
.pallet-item.collision::before {
    background: rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
}

.pallet-item.stacked {
    border-style: dashed;
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.4);
}

/* SETTINGS MODAL STYLING */
.section-subtitle {
    font-size: 10px;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 800;
}

.fx-btn.danger-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

.fx-btn.danger-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.fx-btn.save-btn {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 148, 0.3);
}

.fx-btn.save-btn:hover {
    box-shadow: 0 0 30px rgba(0, 255, 148, 0.6);
}

/* CURRENCY SELECTOR */
.currency-group {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--glass-border);
}

.curr-opt {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 0;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.curr-opt:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.curr-opt.active {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* --- PDF TABS SYSTEM --- */
.pdf-tab-nav {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

.pdf-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 0;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.pdf-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.pdf-tab-btn.active {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.pdf-tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.pdf-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-modal-scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.pdf-modal-scrollable::-webkit-scrollbar {
    width: 4px;
}

.pdf-modal-scrollable::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.pdf-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- PDF STOPS DYNAMIC LIST --- */
.pdf-stops-list {
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stop-input-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 8px;
    transition: 0.3s;
}

.stop-input-group:hover {
    border-color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.stop-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.stop-precise-addr {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    min-height: 45px;
    resize: none;
    transition: 0.2s;
}

.stop-precise-addr:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.3);
}

body.light-theme .stop-input-group {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .stop-precise-addr {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
}


.input-wrapper {
    position: relative;
}

.eye-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    transition: 0.2s;
    z-index: 5;
}

.card-front .eye-toggle {
    color: rgba(6, 182, 212, 0.6);
}

.card-front .eye-toggle:hover {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.card-back .eye-toggle {
    color: rgba(173, 255, 47, 0.6);
}

.card-back .eye-toggle:hover {
    color: #adff2f;
    filter: drop-shadow(0 0 5px #adff2f);
}

/* --- COMPANY DASHBOARD MODAL (CENTRAL) --- */
.dashboard-modal-wide {
    width: 85vw;
    max-width: 1400px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

.dashboard-modal-wide .modal-header {
    padding: 25px 35px 15px;
    margin-bottom: 0;
}

.dashboard-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dashboard-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.dashboard-scroll-area::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* DASHBOARD REVERTED */







/* HORIZONTAL HISTORY CARD */
.history-card-horizontal {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.history-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--neon-cyan);
    opacity: 0;
    transition: 0.3s;
}

.history-card-horizontal:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateX(5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.history-card-horizontal:hover::before {
    opacity: 1;
}

.h-card-title {
    display: flex;
    flex-direction: column;
    min-width: 220px;
}

.main-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.h-card-title .main-name {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.route-id-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.h-card-title .creator {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.date-stamp {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.6;
}

.h-card-route {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.route-point {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #fff;
    font-weight: 600;
}

.route-point i {
    font-size: 12px;
}

.route-point i.origin {
    color: var(--neon-green);
}

.route-point i.destination {
    color: var(--neon-cyan);
}

.route-divider {
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 10px;
}

.h-card-metric-group {
    display: flex;
    gap: 25px;
    min-width: 180px;
}

.h-card-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.h-card-metric .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.h-card-metric .val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
}

.h-card-metric .val.dist {
    color: var(--neon-cyan);
}

.h-card-metric .val.price {
    color: var(--neon-green);
}

.card-delete {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255, 69, 69, 0.4);
    transition: all 0.2s;
}

.card-delete:hover {
    background: rgba(255, 69, 69, 0.1);
    color: var(--neon-red);
    transform: scale(1.1);
}

/* TEAM LIST & FILTERS */
.filter-pills {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 3px;
    border-radius: 20px;
    gap: 2px;
}

.filter-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    padding: 6px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    white-space: nowrap;
}

.filter-pill:hover {
    color: var(--text-main);
}

.filter-pill.active {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* PREMIUM TEAM UI */
.team-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 5px;
}

.team-member-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.team-member-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
    box-shadow: -5px 0 15px rgba(6, 182, 212, 0.1);
}

.member-avatar {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--neon-cyan), #0072ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.member-main-info {
    flex-grow: 1;
}

.member-email {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.member-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.role-badge.admin {
    background: rgba(255, 0, 60, 0.1);
    color: var(--neon-red);
    border: 1px solid rgba(255, 0, 60, 0.2);
}

.role-badge.member {
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-green);
    opacity: 0.8;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.team-member-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-info i {
    font-size: 20px;
    color: var(--neon-cyan);
}

.member-email {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.member-badge {
    font-size: 9px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-cyan);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    position: relative;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 20px;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: all 0.4s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--neon-cyan);
    border-radius: 4px;
    opacity: 0;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.nav-btn:hover::after {
    width: 24px;
    opacity: 1;
}

.nav-btn i {
    font-size: 13px;
    color: var(--neon-cyan);
    transition: all 0.4s;
    opacity: 0.8;
}

.nav-btn:hover i {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}


.forgot-link {
    font-size: 11px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.3s ease;
    margin-bottom: 2px;
}

.forgot-link:hover {
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 15px var(--neon-cyan);
}

.forgot-link-container {
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

/* DRIVER.JS CUSTOM THEME */
.driver-popover.frostline-theme {
    background-color: rgba(10, 16, 30, 0.98);
    color: #f8fafc;
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.25);
    font-family: 'Inter', sans-serif;
}

.driver-popover.frostline-theme .driver-popover-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--neon-cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.driver-popover.frostline-theme .driver-popover-description {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.driver-popover.frostline-theme button {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px;
    text-shadow: none !important;
    font-size: 11px;
    padding: 6px 12px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
}

.driver-popover.frostline-theme button:hover {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.driver-popover.frostline-theme .driver-popover-next-btn {
    background: #0084ff !important;
    border: none !important;
    color: #ffffff !important;
}

.driver-popover.frostline-theme .driver-popover-prev-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #94a3b8 !important;
}

.driver-popover.frostline-theme .driver-popover-close-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    top: 5px !important;
    right: 12px !important;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.driver-popover.frostline-theme .driver-popover-close-btn:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--neon-cyan) !important;
    opacity: 1;
}

/* Ensure highlight is sharp and interactive */
.driver-stage {
    background: transparent !important;
    border: 3px solid var(--neon-cyan) !important;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.7) !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
}

.driver-overlay {
    opacity: 0.85 !important;
}

.driver-active-element {
    z-index: 10001 !important;
    pointer-events: auto !important;
}

/* Popover Content Alignment */
.driver-popover.frostline-theme .driver-popover-title {
    padding-right: 25px;
}

/* --- LANDING PAGE STYLES --- */
.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0f172a 0%, #000000 100%);
    z-index: 9000;
    /* Lower than modal-overlay (9999) */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.landing-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Grid Background Effect — flat straight grid covering full screen */
.landing-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

.landing-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px;
    margin-bottom: 0;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    position: relative;
}

.landing-subtitle {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    letter-spacing: 5px;
    margin-bottom: 40px;
    text-transform: uppercase;
    opacity: 0.8;
}

.landing-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.landing-btn {
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
}

.landing-btn.primary {
    background: var(--neon-cyan);
    color: #000;
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.landing-btn.primary:hover {
    background: #fff;
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
    transform: scale(1.05);
}

.landing-btn.outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.landing-btn.outline:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.landing-footer {
    margin-top: 60px;
    font-size: 10px;
    color: #444;
    letter-spacing: 1px;
}

/* === 3D AUTH CARD STYLES === */
.auth-card-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 420px !important;
    height: 490px !important; /* Default Login height */
    padding: 0 !important;
    max-width: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.auth-card-container.mode-register {
    height: 680px !important; /* Expanded Registration height */
}

.auth-3d-container {
    perspective: 2000px;
    width: 420px;
    height: 490px;
    margin: 0 auto;
    position: relative;
    transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-3d-container.mode-register {
    height: 680px;
}

.auth-card-wrapper {
    width: 420px;
    height: 100%; /* Follow container height */
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-card-wrapper.flipped {
    transform: rotateY(180deg);
}

.auth-card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: rgba(8, 12, 22, 0.95);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 12, 0.98));
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(6, 182, 212, 0.3);
    border-radius: 24px;
    padding: 35px 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 
                inset 0 0 40px rgba(6, 182, 212, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0; /* Removing fixed gap to use margins for precision */
    text-align: center;
}

.card-back {
    transform: rotateY(180deg);
}

.card-back .eye-toggle {
    color: var(--neon-cyan) !important; /* Unified Cyan eye icon */
}

/* Visual Enhancements */
.auth-header-visual {
    text-align: center;
    color: #fff;
    margin-bottom: 25px;
    position: relative;
}

.auth-header-visual i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.4));
    background: rgba(6, 182, 212, 0.05);
    padding: 15px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.1);
}

.auth-header-visual h3 {
    font-family: 'Inter', sans-serif;
    letter-spacing: 4px;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
}

/* Premium Inputs */
.auth-card-face .control-group {
    margin-bottom: 15px;
}

.auth-card-face .label-title {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
    display: block;
}

/* Refined minimalist input */
.auth-input {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    font-weight: 500 !important;
    width: 100%;
}

input.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 400;
}

.auth-input:focus {
    background: rgba(6, 182, 212, 0.03) !important;
    border-color: rgba(6, 182, 212, 0.4) !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1) !important;
    transform: translateY(-1px);
}

.auth-input:focus + .label-title,
.control-group:focus-within .label-title {
    color: var(--neon-cyan) !important;
    opacity: 1 !important;
}

/* Authentication Button Sleek Override */
.auth-card-face .fx-btn.primary-btn {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%) !important;
    border: 1px solid rgba(6, 182, 212, 0.5) !important;
    color: var(--neon-cyan) !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(6, 182, 212, 0.05) !important;
    border-radius: 12px !important;
    margin-top: 25px !important; /* Increased space between password box and login button */
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    width: 100%;
    padding: 16px !important;
}

.auth-card-face .fx-btn.primary-btn:hover {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    box-shadow: 0 15px 30px rgba(6, 182, 212, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
}

.auth-card-face .fx-btn.primary-btn i {
    transition: transform 0.4s;
    margin-left: 6px;
}

.auth-card-face .fx-btn.primary-btn:hover i {
    transform: translateX(4px);
}

/* Switcher Link at bottom */
.auth-switch-trigger {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 15px !important; /* Reduced space after button */
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.auth-switch-trigger span {
    color: var(--neon-cyan);
    font-weight: 600;
    margin-left: 5px;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.auth-switch-trigger:hover {
    color: rgba(255, 255, 255, 0.8);
}

.auth-switch-trigger:hover span {
    text-shadow: 0 0 15px var(--neon-cyan);
    border-bottom: 1px solid rgba(6, 182, 212, 0.5);
}

/* --- ANALYTICS DASHBOARD --- */
.chart-card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.chart-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.chart-card:hover {
    border-color: rgba(6, 182, 212, 0.2);
    transform: translateY(-3px);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 10px;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.chart-header i {
    font-size: 14px;
    filter: drop-shadow(0 0 8px currentColor);
}

.chart-canvas-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Toggle Active State */
#btn-toggle-analytics {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(0, 255, 148, 0.3) !important;
    color: var(--neon-green) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

#btn-toggle-analytics:hover {
    background: rgba(0, 255, 148, 0.05) !important;
    box-shadow: 0 0 15px rgba(0, 255, 148, 0.15);
    border-color: rgba(0, 255, 148, 0.6) !important;
}

#btn-toggle-analytics.dashboard-active {
    background: rgba(0, 255, 148, 0.1) !important;
    border-color: var(--neon-green) !important;
    box-shadow: 0 0 25px rgba(0, 255, 148, 0.2), inset 0 0 10px rgba(0, 255, 148, 0.05);
    font-weight: 800;
    letter-spacing: 1px;
}

/* --- CYBER MODAL (Custom Dialogs) --- */
.cyber-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cyber-modal-box {
    background: linear-gradient(145deg, #0f172a, #020617);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 4px solid var(--neon-cyan);
    border-radius: 16px;
    width: 440px;
    max-width: 90%;
    max-height: 90vh;
    /* Prevent screen overflow */
    padding: 35px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.1);
    transform: scale(0.9) translateY(25px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    /* Flex for internal scroll */
    flex-direction: column;
}

.cyber-modal-box.critical {
    border-top-color: var(--neon-red);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 62, 90, 0.15);
}

.cyber-modal-box.critical .cyber-modal-header h3 {
    color: var(--neon-red);
    text-shadow: 0 0 10px rgba(255, 62, 90, 0.4);
}

.cyber-modal-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.03), transparent 70%);
    pointer-events: none;
}

.cyber-modal-overlay.active .cyber-modal-box {
    transform: scale(1) translateY(0);
}

.cyber-modal-header {
    margin-bottom: 20px;
}

.cyber-modal-header h3 {
    color: var(--neon-cyan);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.cyber-modal-body {
    margin-bottom: 30px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    overflow-y: auto;
    /* Enable scroll if content is long */
    flex: 1;
    /* Take available space */
    padding-right: 5px;
    /* Spacing for scrollbar */
}

/* Custom scrollbar for modal body */
.cyber-modal-body::-webkit-scrollbar {
    width: 4px;
}

.cyber-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.cyber-modal-body::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.2);
    border-radius: 10px;
}

.cyber-modal-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    margin-top: 15px;
    transition: border-color 0.3s;
}

.cyber-modal-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.cyber-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.cyber-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-btn-primary {
    background: var(--neon-cyan);
    color: #000;
    border: none;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.cyber-btn-primary:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
}

.cyber-btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.cyber-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* --- TOLL MARKER STYLES --- */
.toll-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000;
    font-weight: 900;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    font-size: 14px;
    width: 24px;
    height: 24px;
    z-index: 1000 !important;
}

/* Highway = Yellow */
.toll-type-highway {
    background: #FACC15;
}

/* Special (Water Crossing) = Red */
.toll-type-special {
    background: #FF3333;
}

/* --- ROUTE MARKER STYLES --- */
.marker-route-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.marker-route-dot {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    /* Slightly rounded squares/squircle for a more industrial look */
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    background: #000;
}

/* Green Start */
.marker-route-start .marker-route-dot {
    background: #10B981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5), 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Red End */
.marker-route-end .marker-route-dot {
    background: #EF4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5), 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Yellow Waypoint */
.marker-route-waypoint .marker-route-dot {
    background: #F59E0B;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5), 0 4px 8px rgba(0, 0, 0, 0.4);
}

.marker-route-container.dragging .marker-route-dot {
    transform: scale(1.2) rotate(5deg);
    opacity: 0.8;
}

.marker-route-container:hover .marker-route-dot {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 51, 51, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0);
    }
}

/* --- PERFECT ROUND MONOLITH --- */


.tag-internal {
    background: rgba(6, 182, 212, 0.2);
    color: var(--neon-cyan);
}

.tag-live {
    background: rgba(250, 204, 21, 0.2);
    color: #FACC15;
}

.tag-wiki {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* --- GROUP MODAL REDESIGN --- */
.modal-content.group-wide {
    width: 1100px !important;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.group-layout {
    display: flex;
    flex: 1;
    min-height: 600px;
    overflow: hidden;
}

.group-sidebar {
    width: 200px;
    border-right: 1px solid var(--glass-border);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.group-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.group-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.group-tab-btn i {
    width: 16px;
    text-align: center;
}

.group-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.group-tab-btn.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.group-content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.group-content-section.active {
    display: block;
}

/* --- GROUP NOTES STYLING --- */
.notes-header-actions {
    margin-bottom: 20px;
    padding: 0 10px;
}

.notes-search-wrapper {
    position: relative;
    width: 100%;
}

.notes-search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    opacity: 0.5;
}

.notes-search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 15px 12px 45px;
    color: #fff;
    font-size: 13px;
    transition: 0.3s;
}

.notes-search-wrapper input:focus {
    border-color: var(--neon-cyan);
    outline: none;
    background: rgba(0, 0, 0, 0.4);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    padding: 15px 10px;
}

.note-card {
    position: relative;
    aspect-ratio: 1/1;
    /* Square notes feel bigger */
    padding: 30px 25px 25px;
    border-radius: 4px;
    color: #334155;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-12px) rotate(2deg) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 100;
    /* Ensure it floats above others */
}

/* Tape Decoration */
.note-card::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 10;
}

/* Color Variants */
.note-card:nth-child(4n+1) {
    background: #fef9c3;
}

.note-card:nth-child(4n+2) {
    background: #e0f2fe;
}

.note-card:nth-child(4n+3) {
    background: #f0fdf4;
}

.note-card:nth-child(4n+4) {
    background: #fef2f2;
}

.note-card.create-trigger {
    background: transparent;
    border: 2px dashed var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    justify-content: center;
    align-items: center;
    box-shadow: none;
    aspect-ratio: inherit;
    /* Use parent 1/1 */
}

.note-card.create-trigger::before {
    display: none;
}

.create-inner {
    text-align: center;
    transition: 0.3s;
}

.create-trigger:hover .create-inner {
    color: var(--neon-cyan);
    transform: scale(1.05);
}

.create-inner i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.create-inner span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Note Content */
.note-title {
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    padding-right: 40px;
    word-break: break-word;
}

.note-body {
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    white-space: pre-wrap;
    font-weight: 500;
}

.note-footer {
    font-size: 11px;
    opacity: 0.8;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.note-author {
    font-weight: 800;
}

/* Edit/Delete Icons */
.note-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 4px;
    z-index: 20;
}

.note-action-btn {
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: 0.2s;
    font-size: 13px;
}

.note-action-btn:hover {
    color: #000;
    transform: scale(1.1);
}

.note-action-btn.delete:hover {
    color: #ef4444;
}

.group-notes-area {
    min-height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
}

/* --- SHIFT HANDOVER STYLES --- */
.shift-management-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.shift-status-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.shift-status-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

.shift-status-card.off-duty {
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.status-top {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    opacity: 0.8;
}

.status-main h3 {
    font-size: 24px;
    margin: 0;
    font-weight: 800;
}

.status-main p {
    margin: 5px 0 0;
    font-size: 14px;
    opacity: 0.6;
}

.shift-action-btn {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    background: var(--neon-cyan);
    color: #000;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.shift-status-card.off-duty .shift-action-btn {
    background: var(--neon-red);
}

.shift-action-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.shift-info-box {
    background: rgba(6, 182, 212, 0.05);
    border: 1px dashed rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.shift-info-box h4 {
    margin: 0 0 10px;
    color: var(--neon-cyan);
    font-size: 14px;
}

.shift-info-box p {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.7;
    margin: 0;
}

.handover-selection-area h4 {
    margin: 0 0 15px;
    font-size: 14px;
    letter-spacing: 1px;
}

.handover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.handover-recipient-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.handover-recipient-card:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--neon-cyan);
}

.handover-recipient-card .avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--neon-cyan), #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.active-handover-alert {
    background: rgba(0, 255, 157, 0.05);
    border: 1px solid var(--neon-green);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.active-handover-alert .resume-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.active-handover-alert .resume-btn:hover {
    background: var(--neon-green);
    color: #000;
}

/* --- GHOST ROUTE VISUALS --- */
.ghost-route-polyline {
    filter: blur(2px);
    stroke-dasharray: 10, 10;
    opacity: 0.5;
}

/* --- NOTIFICATION BADGE --- */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-red);
    animation: blink-red 2s infinite;
    z-index: 10;
}

.nav-btn .notification-badge {
    top: -2px;
    right: -2px;
}

.group-tab-btn .notification-badge {
    top: 8px;
    right: 8px;
}

@keyframes blink-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.shift-action-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-top: 10px;
}

.shift-action-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- ACTIVE HANDOVER PREVIEW --- */
.active-routes-status-box {
    background: rgba(var(--neon-cyan-rgb), 0.05);
    border: 1px solid rgba(var(--neon-cyan-rgb), 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.mini-title {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--neon-cyan);
    margin-bottom: 12px;
    font-weight: bold;
}

.mini-route-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mini-route-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    font-size: 11px;
}

.mini-route-card .route-name {
    color: #fff;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-route-card .route-info {
    opacity: 0.6;
    font-size: 9px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mini-route-card .route-info i {
    color: var(--neon-cyan);
}


.btn-sub-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* MAP TRASH ZONE */
#map-trash-zone {
    position: fixed;
    bottom: 35px;
    left: 30%;
    /* Positioned between sidebar and AI icon */
    width: 80px;
    height: 80px;
    background: #803040;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 100000;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.6);
}

#map-trash-zone.visible {
    opacity: 1;
    transform: scale(1);
    animation: trashPulse 1.5s infinite ease-in-out;
}

#map-trash-zone i {
    font-size: 30px;
}

.trash-label {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-top: -2px;
}

#map-trash-zone.drag-over {
    background: #ff003c;
    scale: 1.2;
    box-shadow: 0 0 40px rgba(255, 0, 60, 0.6);
}

@keyframes trashPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* AI MARKDOWN STYLES */
.ai-response-body ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: none;
}

.ai-response-body li {
    position: relative;
    margin-bottom: 5px;
}

.ai-response-body li::before {
    content: "?";
    color: var(--neon-cyan);
    position: absolute;
    left: -15px;
    font-size: 8px;
    top: 2px;
}

.ai-table-wrapper {
    width: 100%;
    margin: 15px 0;
    overflow-x: auto;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.ai-table-wrapper th {
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-cyan);
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.3);
    text-transform: uppercase;
}

.ai-table-wrapper td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-response-body strong {
    color: var(--neon-cyan);
    font-weight: 700;
}

/* Legacy Language Selector removed */

/* --- RESPONSIVENESS & ADAPTIVE LAYOUT --- */

/* Laptops & Smaller Desktops */
@media (max-width: 1440px) {
    .sidebar {
        width: 25%;
        padding: 20px;
    }

    .brand {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .mission-bar {
        padding: 10px 20px;
        gap: 20px;
    }

    .hud-value {
        font-size: 14px;
    }

    .hud-value.highlight,
    .hud-value.profit,
    .hud-value.loss {
        font-size: 16px;
    }
}

/* Tablets (Landscape) & Specific Small Screens */
@media (max-width: 1200px) {
    .sidebar {
        width: 320px;
        /* Fixed width for better control on small-ish screens */
    }

    .mission-bar {
        left: calc(320px + 20px) !important;
        /* Shift HUD to the right of the sidebar */
        transform: translateY(-200%) !important;
        margin-left: 0 !important;
        width: auto !important;
        max-width: calc(100% - 360px) !important;
        justify-content: space-around;
        padding: 10px 15px;
        gap: 15px;
        border-radius: 12px;
        /* Less rounded for space */
    }

    .mission-bar.visible {
        transform: translateY(0) !important;
    }

    .hud-metric {
        padding: 0 10px;
    }
}

/* Tablets (Portrait) & Small Laptops */
@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
        padding: 15px;
    }

    .hud-metric {
        flex: 1;
        padding: 0 5px;
        border-left: 1px solid var(--glass-border);
    }

    .hud-metric:first-child {
        border-left: none;
    }

    .hud-label {
        font-size: 8px;
    }

    .hud-value {
        font-size: 13px;
    }

    .hud-value.highlight,
    .hud-value.profit,
    .hud-value.loss {
        font-size: 14px;
    }

    .header-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .nav-btn span,
    .login-ghost-btn span {
        display: none;
        /* Hide text, keep icons on smaller screens */
    }
}

/* Mobile & Very Small Screens */
@media (max-width: 768px) {

    /* For now, let's keep sidebar visible but slightly narrower on mobile */
    .sidebar {
        width: 280px;
        padding: 15px;
        z-index: 1002;
    }

    .mission-bar {
        position: fixed;
        bottom: 10px !important;
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        transform: translateY(200%) !important;
        width: auto !important;
        max-width: none !important;
        border-radius: 10px;
        padding: 8px;
        gap: 8px;
        flex-wrap: wrap;
        /* Allow wrapping of metrics */
        justify-content: center;
    }

    .mission-bar.visible {
        transform: translateY(0) !important;
    }

    .hud-metric {
        border: none !important;
        min-width: 70px;
        padding: 2px 5px;
    }

    .hud-label {
        font-size: 7px;
    }

    .hud-value {
        font-size: 12px;
    }

    /* --- đź”‘ LICENSE ACTIVATION --- */
    .license-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        z-index: 99999;
        display: none;
        /* Controlled by JS */
        align-items: center;
        justify-content: center;
        color: #fff;
        font-family: 'Inter', sans-serif;
    }

    .license-overlay.active {
        display: flex;
    }

    .license-content {
        background: rgba(10, 15, 20, 0.95);
        border: 1px solid var(--accent-blue);
        padding: 40px;
        border-radius: 12px;
        width: 100%;
        max-width: 450px;
        text-align: center;
        box-shadow: 0 0 50px rgba(6, 182, 212, 0.2);
    }

    .license-title {
        font-family: 'JetBrains Mono', monospace;
        font-size: 24px;
        color: var(--neon-cyan);
        margin-bottom: 10px;
        letter-spacing: 2px;
    }

    .license-subtitle {
        font-size: 14px;
        opacity: 0.8;
        margin-bottom: 30px;
    }

    .license-input-group {
        margin-bottom: 25px;
    }

    .license-input {
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px;
        border-radius: 8px;
        color: #fff;
        font-size: 18px;
        text-align: center;
        font-family: 'JetBrains Mono', monospace;
        transition: all 0.3s;
    }

    .license-input:focus {
        border-color: var(--neon-cyan);
        background: rgba(6, 182, 212, 0.05);
        outline: none;
        box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    }

    .license-btn {
        width: 100%;
        background: var(--accent-blue);
        color: #000;
        border: none;
        padding: 15px;
        border-radius: 8px;
        font-weight: 800;
        cursor: pointer;
        font-size: 16px;
        transition: all 0.3s;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .license-btn:hover {
        background: var(--neon-cyan);
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(6, 182, 212, 0.4);
    }

    .license-error {
        color: #ff4d4d;
        font-size: 12px;
        margin-top: 10px;
        min-height: 18px;
    }

    .license-help {
        margin-top: 20px;
        font-size: 12px;
        opacity: 0.5;
    }
}

/* --- LDT FULLSCREEN MODAL --- */
#ldt-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.95);
    z-index: 5000;
    align-items: center;
    justify-content: center;
}

.ldt-fs-container {
    width: 95vw;
    height: 92vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 247, 255, 0.2);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(0, 247, 255, 0.05);
}

/* 🛡️ TOS COMPLIANCE CHECKBOXES INTERNAL */
.tos-compliance {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.tos-compliance:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.05);
}

.tos-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    user-select: none;
}

.tos-checkbox-label:hover {
    color: var(--text-main);
}

.tos-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.tos-checkbox-label input[type="checkbox"]:checked {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.tos-checkbox-label input[type="checkbox"]:checked::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: 800;
}

.tos-btn-accept:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
    filter: grayscale(1);
}

/* 🛡️ ORDER FORM COMPLIANCE */
.order-compliance-wrapper {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.order-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    user-select: none;
}

.order-checkbox-label:hover {
    color: var(--text-main);
}

.order-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 3px;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s ease;
}

.order-checkbox-label input[type="checkbox"]:checked {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.order-checkbox-label input[type="checkbox"]:checked::after {
    content: "✔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 10px;
    font-weight: 800;
}

.ldt-fs-header {
    padding: 24px 40px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldt-fs-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 3px;
}

.ldt-fs-title-group i {
    color: var(--neon-cyan);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.badge-pro {
    background: linear-gradient(90deg, #00f7ff, #00d2ff);
    color: #000;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 15px;
    font-weight: 900;
    letter-spacing: 1px;
}

.ldt-fs-close {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldt-fs-close:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.3);
}

.ldt-fs-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.ldt-fs-sidebar {
    width: 420px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
}

.ldt-fs-main {
    flex: 1;
    background: radial-gradient(circle at center, #020617, #000);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ldt-fs-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    transition: 0.3s;
}

.ldt-fs-section:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 247, 255, 0.1);
}

.ldt-fs-section h4 {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin: 0 0 18px 0;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.ldt-fs-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.ldt-fs-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ldt-fs-input-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ldt-fs-input-box label {
    font-size: 0.6rem;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.ldt-fs-input-box input {
    background: #020617;
    border: 1px solid #1e293b;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
}

.ldt-fs-input-box input:focus {
    border-color: var(--neon-cyan);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.15);
    background: #000;
}

.ldt-fs-flex-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.ldt-fs-toggle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 15px 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ldt-fs-toggle-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.ldt-fs-toggle-card input {
    display: none;
}

.ldt-fs-toggle-card .toggle-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    filter: grayscale(1) opacity(0.3);
    transition: 0.4s;
}

.ldt-fs-toggle-card .toggle-label {
    font-size: 0.55rem;
    font-weight: 900;
    color: #475569;
    letter-spacing: 1px;
}

/* Fix for long German labels in LDT Configuration */
html[lang="de"] .ldt-fs-toggle-card {
    padding: 15px 10px;
}

html[lang="de"] .ldt-fs-toggle-card .toggle-label {
    font-size: 0.48rem;
    letter-spacing: 0.5px;
}

.ldt-fs-toggle-card:has(input:checked) {
    background: rgba(0, 247, 255, 0.08);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.1);
}

.ldt-fs-toggle-card:has(input:checked) .toggle-icon {
    filter: none;
    transform: scale(1.1);
}

.ldt-fs-toggle-card:has(input:checked) .toggle-label {
    color: var(--neon-cyan);
}

.ldt-fs-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ldt-fs-btn {
    padding: 14px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 1px;
}

.ldt-fs-btn.primary {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.3);
}

.ldt-fs-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ldt-fs-btn.danger {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ldt-fs-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}

.ldt-fs-stats {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.ldt-fs-stats span {
    color: var(--neon-green);
    font-size: 1.2rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 5px;
}

.ldt-fs-hint {
    margin-top: auto;
    background: rgba(0, 247, 255, 0.03);
    border: 1px dashed rgba(0, 247, 255, 0.3);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.65rem;
    color: var(--neon-cyan);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0.8;
}

.ldt-fs-3d-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#vl-fs-3d-canvas-container {
    width: 100% !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vl-fs-3d-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
}

.ldt-fs-overlay-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 30px;
    border-radius: 50px;
    color: #94a3b8;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    font-weight: 700;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* LDT MINI INPUTS (Small view) */
.ldt-mini-input {
    width: 100%;
    background: #020617;
    border: 1px solid #334155;
    color: #fff !important;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
}

.ldt-mini-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

select.ldt-mini-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--neon-cyan) 50%), linear-gradient(135deg, var(--neon-cyan) 50%, transparent 50%);
    background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    padding-right: 25px;
    cursor: pointer;
}

select.ldt-mini-input option {
    background: #0f172a;
    color: #fff;
}

/* LDT FULLSCREEN SELECT */
.ldt-fs-input-box select {
    background: #020617;
    border: 1px solid #1e293b;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--neon-cyan) 50%), linear-gradient(135deg, var(--neon-cyan) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.ldt-fs-input-box select:focus {
    border-color: var(--neon-cyan);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.15);
    background: #000;
}

.ldt-fs-input-box select option {
    background: #0f172a;
    color: #fff;
}

/* --- LANGUAGE PICKER (v8) --- */
.lang-chip-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.lang-chip {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    letter-spacing: 1px;
    user-select: none;
}

.lang-chip:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(6, 182, 212, 0.3);
    color: #fff;
    transform: translateY(-1px) scale(1.05);
}

.lang-chip.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3), inset 0 0 5px rgba(6, 182, 212, 0.2);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.lang-chip.active:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* --- STOP SELECTOR PILLS (LDT PRO) --- */
.stop-pill-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 10px;
    width: 100%;
}

.stop-pill {
    min-width: 0;
    /* Allow shrinking to fit grid */
    padding: 14px 6px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.stop-pill i {
    font-size: 14px;
    transition: transform 0.3s;
}

.stop-pill:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.stop-pill:hover i {
    transform: scale(1.2);
}

/* Active states with specialized colors */
.stop-pill.active[data-stop="1"] {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.stop-pill.active[data-stop="2"] {
    border-color: #00FF94;
    color: #00FF94;
    background: rgba(0, 255, 148, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 148, 0.2);
}

.stop-pill.active[data-stop="3"] {
    border-color: #FFDB00;
    color: #FFDB00;
    background: rgba(255, 219, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 219, 0, 0.2);
}

.stop-pill.active[data-stop="4"] {
    border-color: #FF00E5;
    color: #FF00E5;
    background: rgba(255, 0, 229, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 229, 0.2);
}

.stop-pill.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

/* --- TRANSLATOR TOOL STYLES --- */
.translator-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.translator-box {
    background: rgba(10, 16, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.source-box {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.05);
}

.target-box {
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.05);
}

.translator-box:focus-within,
.translator-box:has(.custom-dropdown.active) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    z-index: 20;
    /* Elevate above swap button */
}

.translator-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* --- CUSTOM DROPDOWN --- */
.custom-dropdown {
    position: relative;
    width: 220px;
    user-select: none;
}

.dropdown-trigger {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--neon-cyan);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
}

.dropdown-trigger i {
    font-size: 11px;
    transition: 0.3s;
}

.custom-dropdown.active .dropdown-trigger i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 280px;
    background: rgba(10, 16, 25, 0.98);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
    scrollbar-width: thin;
    scrollbar-color: var(--neon-cyan) transparent;
}

.dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

.custom-dropdown.active .dropdown-menu {
    display: block;
    animation: dropIn 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-option {
    padding: 10px 14px;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-option:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #fff;
}

.dropdown-option.selected {
    color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.05);
    font-weight: bold;
}

.translator-box textarea {
    width: 100%;
    min-height: 140px;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    outline: none;
    padding: 0;
}



.translator-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 10px;
}

.trans-swap-btn {
    background: rgba(2, 6, 23, 0.9);
    color: var(--neon-cyan);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.trans-swap-btn:hover {
    transform: rotate(180deg) scale(1.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    color: #fff;
}

.trans-thinking-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    opacity: 0;
    pointer-events: none;
}

.trans-thinking-pulse.active {
    opacity: 1;
    animation: transPulse 1.5s infinite;
}

@keyframes transPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.trans-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.trans-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.trans-icon-btn.active {
    color: var(--neon-green);
    border-color: var(--neon-green);
}

.translator-footer {
    text-align: center;
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- GLASS CONTEXT MENU --- */
.glass-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 180px;
    background: rgba(10, 16, 30, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.1);
    padding: 8px;
    animation: contextFadeUp 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes contextFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-cyan);
}

.menu-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}


/* --- LDT CARGO PRESETS --- */
.ldt-fs-presets {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.preset-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.preset-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.preset-item:hover {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

.preset-item:active {
    transform: translateY(0);
}

.preset-icon {
    font-size: 14px;
}

/* --- REFINED CALCULATOR --- */
.calculator-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: 20px;
}

.calc-display {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: right;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.calc-top-actions {
    position: absolute;
    top: 10px;
    left: 15px;
    z-index: 5;
}

.calc-copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    padding: 6px 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}

.calc-copy-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.calc-expression {
    font-size: 13px;
    color: var(--neon-blue);
    opacity: 0.6;
    min-height: 20px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.calc-result {
    font-size: 38px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-top: 5px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.calc-btn.span-2 {
    aspect-ratio: auto;
    grid-column: span 2;
}

.calc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.2);
}

.calc-btn:active {
    transform: translateY(-1px);
    background: rgba(6, 182, 212, 0.1);
}

.calc-btn.op {
    color: var(--neon-blue);
    background: rgba(6, 182, 212, 0.05);
}

.calc-btn.equal {
    background: var(--neon-blue);
    color: #fff;
    font-size: 24px;
    border: none;
    font-weight: 900;
}

.calc-btn.equal:hover {
    background: #00f2ff;
    transform: translateY(-3px) scale(1.05);
}

.calc-btn-adv {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calc-btn-adv:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.calc-history-container {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.calc-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calc-history-header span {
    font-size: 11px;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.calc-clear-hist {
    background: transparent;
    border: none;
    color: var(--neon-red);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.calc-clear-hist:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.calc-history-list {
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.calc-history-list::-webkit-scrollbar {
    width: 4px;
}

.calc-history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: 0.3s;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.hist-expr {
    font-size: 12px;
    color: var(--text-muted);
    grid-column: 1 / 3;
    font-family: 'JetBrains Mono', monospace;
}

.hist-res {
    font-size: 16px;
    font-weight: 800;
    color: var(--neon-blue);
}

.hist-time {
    font-size: 10px;
    opacity: 0.3;
    text-align: right;
}

/* --- FEEDBACK WIDGET (RIGHT BOTTOM) --- */
.feedback-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

.feedback-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--neon-cyan);
    border: none;
    color: #020617;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.6);
}

.feedback-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpFade 0.4s ease-out;
}

.feedback-panel.active {
    display: flex;
}

.feedback-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-header span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--neon-cyan);
}

.feedback-header .close-btn {
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.feedback-header .close-btn:hover {
    opacity: 1;
    color: var(--neon-red);
}

.feedback-body {
    padding: 20px;
}

.feedback-body p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.glass-textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: 0.3s;
    margin-bottom: 15px;
}

.glass-textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: var(--neon-cyan);
    color: #020617;
    border: none;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- ADMIN FEEDBACK LIST --- */
.feedback-admin-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px;
    transition: 0.2s;
}

.feedback-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neon-cyan);
}

.fb-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.fb-email {
    color: var(--neon-cyan);
}

.fb-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    word-break: break-word;
}

/* LIGHT THEME FOR FEEDBACK */
body.light-theme .feedback-panel {
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body.light-theme .feedback-header {
    background: #f8fafc;
}

body.light-theme .glass-textarea {
    background: #f1f5f9;
    color: var(--text-main);
}

body.light-theme .feedback-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .fb-content {
    color: var(--text-main);
}

/* --- SIDEBAR FOOTER --- */
.sidebar-footer {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-footer a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.footer-divider {
    margin: 0 6px;
    opacity: 0.3;
}

.footer-copyright {
    margin-top: 10px;
    opacity: 0.4;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 20px 30px;
    z-index: 10000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    visibility: hidden;
    opacity: 0;
}

.cookie-banner.active {
    bottom: 30px;
    visibility: visible;
    opacity: 1;
}

.cookie-banner.hidden {
    bottom: -150px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cookie-icon {
    font-size: 32px;
    color: var(--neon-cyan);
    animation: cookiePulse 2s infinite alternate;
}

@keyframes cookiePulse {
    from {
        filter: drop-shadow(0 0 2px var(--neon-cyan));
    }

    to {
        filter: drop-shadow(0 0 10px var(--neon-cyan));
    }
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    text-transform: uppercase;
}

.cookie-btn.primary {
    background: var(--neon-cyan);
    color: #000;
}

.cookie-btn.primary:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.cookie-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Light Theme Adjustments */
body.light-theme .cookie-banner {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

body.light-theme .cookie-text p {
    color: var(--text-main);
}

body.light-theme .cookie-btn.secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #cbd5e1;
}

/* === DRIVER.JS TUTORIAL CUSTOM STYLING === */
.driver-popover {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--neon-cyan) !important;
    color: #fff !important;
    border-radius: 12px !important;
}

.driver-popover-title {
    color: var(--neon-cyan) !important;
}

.driver-popover-description {
    color: #cbd5e1 !important;
}

/* Aggressive targeting for buttons to give them the neon blue color */
.driver-popover .driver-popover-btn-next,
.driver-popover .driver-popover-btn-prev,
.driver-popover .driver-popover-btn-close,
.driver-popover button {
    background-color: var(--neon-cyan) !important;
    background: var(--neon-cyan) !important;
    color: #0f172a !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-radius: 6px !important;
    font-weight: bold;
    /* Keep it bold for readability but no special font family */
}

.driver-popover .driver-popover-btn-next:hover,
.driver-popover .driver-popover-btn-prev:hover,
.driver-popover button:hover {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5) !important;
}

/* --- 🛡️ TOS GATEKEEPER MODAL STYLES --- */
.tos-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: none;
    /* Default hidden */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

html.tos-required .tos-overlay {
    display: flex;
}

.tos-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tos-modal {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--neon-cyan);
    border-radius: 24px;
    padding: 40px;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.2), inset 0 0 20px rgba(6, 182, 212, 0.05);
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: tos-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tos-appear {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.tos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    padding-bottom: 15px;
}

.tos-header-title {
    font-family: 'Outfit', sans-serif;
    color: var(--neon-cyan);
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 14px;
}

.tos-lang-switcher {
    display: flex;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.tos-lang-link {
    cursor: pointer;
    transition: 0.3s;
}

.tos-lang-link:hover,
.tos-lang-link.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.tos-content-wrapper {
    max-height: 70vh;
    /* Allow it to take up more space to avoid harsh scrolling */
    overflow-y: auto;
    padding-right: 15px;
}

.tos-content-box p {
    margin-bottom: 15px;
    color: var(--text-main);
}

.tos-content-box ul {
    list-style: none;
    padding-left: 0;
}

.tos-content-box li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.tos-content-box li::before {
    content: '//';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

.tos-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.tos-links a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.tos-links a:hover {
    border-bottom-color: var(--neon-cyan);
}

.tos-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.tos-btn-accept {
    background: var(--neon-cyan);
    color: #020617;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.tos-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.4);
    filter: brightness(1.1);
}

.tos-btn-decline {
    background: transparent;
    color: var(--neon-red);
    border: 1px solid rgba(255, 69, 69, 0.3);
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.tos-btn-decline:hover {
    background: rgba(255, 69, 69, 0.05);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 69, 69, 0.2);
}

/* Scrollbar for Content */
.tos-content-wrapper::-webkit-scrollbar {
    width: 4px;
}

.tos-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.tos-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.2);
    border-radius: 10px;
}

.tos-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* ==========================================================================
   📱 MOBILE RESPONSIVENESS OVERHAUL (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {

    /* --- 1. CORE LAYOUT --- */
    body {
        overflow-x: hidden;
    }

    /* --- 2. SIDEBAR (DRAWER MODE) --- */
    .sidebar {
        width: 85% !important;
        left: -100%;
        /* Hidden by default */
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-active {
        left: 0 !important;
    }

    /* Padding adjustment for mobile */
    .sidebar {
        padding: 0 15px 40px 15px !important;
    }

    /* --- 3. MOBILE TOGGLE BUTTON --- */
    .mobile-toggle-btn {
        display: flex !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 2000;
        width: 45px;
        height: 45px;
        background: var(--glass-bg);
        border: 1px solid var(--neon-cyan);
        border-radius: 12px;
        color: var(--neon-cyan);
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
        transition: all 0.3s ease;
    }

    .mobile-toggle-btn:active {
        transform: scale(0.9);
    }

    /* --- 4. HEADER CONTROLS --- */
    .header-controls {
        top: 15px !important;
        right: 15px !important;
        gap: 8px !important;
    }

    .header-controls .nav-btn span {
        display: none;
        /* Hide labels on mobile */
    }

    .header-controls .nav-btn {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px !important;
    }

    .header-controls .nav-btn i {
        font-size: 16px;
        margin-right: 0 !important;
    }

    /* --- 5. MISSION BAR (HUD) --- */
    .mission-bar {
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        padding: 10px 15px !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        height: auto !important;
        border-top: 1px solid var(--neon-cyan) !important;
    }

    .hud-metric {
        padding: 0 !important;
        border-left: none !important;
        text-align: center !important;
    }

    .hud-label {
        font-size: 8px !important;
        margin-bottom: 2px !important;
    }

    .hud-value {
        font-size: 11px !important;
    }

    /* Special treatment for Net Profit on mobile */
    .hud-metric:last-child {
        grid-column: span 3;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 8px !important;
        margin-top: 5px;
    }

    /* --- 6. MODALS --- */
    .modal-content,
    .tos-modal,
    .pricing-modal-content {
        width: 95% !important;
        padding: 20px !important;
    }

    .tos-header-title {
        font-size: 14px !important;
    }

    /* --- 7. INPUTS & BUTTONS --- */
    .glass-input {
        font-size: 14px !important;
        /* Prevent iOS zoom */
        padding: 12px 10px !important;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px !important;
        font-size: 12px !important;
    }

    /* --- 8. MAP CONTROLS REPOSITIONING --- */
    /* Leaflet zoom controls often clash with our UI on mobile */
    .leaflet-top.leaflet-left {
        top: 75px !important;
    }
}

/* Ensure the button is hidden on desktop */
.mobile-toggle-btn {
    display: none;
}

/* ═══════════════════════════════════════════════════
   📍 SHARE ROUTE DIALOG MODAL
   ═══════════════════════════════════════════════════ */
#share-route-modal {
    display: none;
    z-index: 9999;
}

#share-route-modal.visible {
    display: flex;
}

.share-modal-card {
    position: relative;
    background: rgba(10, 18, 38, 0.96);
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: min(440px, 92vw);
    box-shadow:
        0 0 60px rgba(6, 182, 212, 0.1),
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    animation: shareCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    text-align: center;
}

@keyframes shareCardIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Glowing top accent bar */
.share-modal-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(6, 182, 212, 0.8) 40%,
        rgba(0, 255, 148, 0.6) 70%,
        transparent 100%);
    border-radius: 20px 20px 0 0;
}

/* Google Maps icon badge */
.share-modal-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 50px;
    padding: 7px 16px 7px 12px;
    margin-bottom: 18px;
}

.share-modal-icon-maps {
    font-size: 13px;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.share-modal-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 10px;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.share-modal-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.48);
    letter-spacing: 0.3px;
    line-height: 1.6;
    margin: 0 0 22px;
    font-family: 'Inter', sans-serif;
}

/* Route summary pill */
.share-route-preview {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 26px;
    letter-spacing: 0.3px;
    font-family: 'JetBrains Mono', monospace;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action button row */
.share-modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    border: 1.5px solid transparent;
}

/* Copy button — secondary/ghost */
.share-btn.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.share-btn.copy-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.45);
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
    transform: translateY(-1px);
}

/* Open in Maps button — primary/glowing */
.share-btn.open-btn {
    background: linear-gradient(135deg,
        rgba(6, 182, 212, 0.18) 0%,
        rgba(0, 255, 148, 0.12) 100%);
    border-color: rgba(6, 182, 212, 0.6);
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}

.share-btn.open-btn:hover {
    background: linear-gradient(135deg,
        rgba(6, 182, 212, 0.28) 0%,
        rgba(0, 255, 148, 0.18) 100%);
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.28);
    transform: translateY(-2px);
}

/* Copy success state */
.share-btn.copy-btn.copied {
    border-color: rgba(0, 255, 148, 0.6);
    color: var(--neon-green);
    background: rgba(0, 255, 148, 0.08);
}

/* Cancel dismiss */
.share-modal-close-text {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px 10px;
    transition: color 0.2s;
    font-family: 'Inter', sans-serif;
}

.share-modal-close-text:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Light theme overrides */
body.light-theme .share-modal-card {
    background: rgba(248, 250, 252, 0.97) !important;
    border-color: rgba(2, 132, 199, 0.2) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 0 30px rgba(2,132,199,0.06) !important;
}

body.light-theme .share-modal-title {
    color: var(--text-main) !important;
    text-shadow: none !important;
}

body.light-theme .share-modal-desc {
    color: var(--text-muted) !important;
}

body.light-theme .share-route-preview {
    background: rgba(0,0,0,0.03) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: var(--text-main) !important;
}

body.light-theme .share-btn.copy-btn {
    background: rgba(0,0,0,0.03) !important;
    border-color: rgba(0,0,0,0.12) !important;
    color: var(--text-main) !important;
}

body.light-theme .share-modal-close-text {
    color: rgba(0,0,0,0.35) !important;
}

/* Mobile */
@media (max-width: 480px) {
    .share-modal-actions {
        flex-direction: column;
    }
    .share-modal-card {
        padding: 28px 20px 22px;
    }
}

/* =========================================
   ✨ AI FLYING BUTTON & GLASSMORPHISM MODAL
========================================= */

/* Floating Map AI Button */
.ai-trigger-floating {
    position: absolute;
    top: 55px; /* Right beneath the tutorial (?) button */
    right: 0;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2), inset 0 0 10px rgba(6, 182, 212, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.ai-trigger-floating:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4), inset 0 0 15px rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.8);
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Glass Overlay */
.ai-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(4, 9, 20, 0.5); /* Very dark transluscent */
    backdrop-filter: blur(25px); /* extreme blur */
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.ai-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Glass Modal Card */
.ai-modal-glass {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(8, 12, 22, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 50px rgba(6, 182, 212, 0.08);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible !important; /* Allow Close button to hang off edge if needed */
}

.ai-overlay.visible .ai-modal-glass {
    transform: translateY(0) scale(1);
}

/* Header Elements */
.ai-glass-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.ai-scanner-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    align-items: center;
    width: 100%;
}

.ai-title-main {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.3));
}

.ai-title-icon {
    color: var(--neon-cyan);
    font-size: 18px;
    animation: ai-pulse 2s infinite ease-in-out;
}

@keyframes ai-pulse {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 5px var(--neon-cyan)); }
    50% { transform: scale(1.1); opacity: 0.8; filter: drop-shadow(0 0 15px var(--neon-cyan)); }
}

.ai-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    margin: 0 auto;
    max-width: 420px;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.ai-disclaimer {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    margin: 12px 0 0;
    letter-spacing: 0.3px;
    font-style: italic;
    line-height: 1.4;
    width: 100%;
}

.ai-close-glass {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.95);
    border: 1.5px solid rgba(6, 182, 212, 0.4);
    border-radius: 12px; /* Square with rounded corners for more tech feel */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(6, 182, 212, 0.15);
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.ai-close-glass:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--neon-cyan);
    border-color: #fff;
    color: #020617;
    box-shadow: 0 0 30px var(--neon-cyan);
}

.ai-close-glass i {
    transition: transform 0.3s ease;
}

/* Input/Scanner Area */
.ai-input-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 5px 20px rgba(0,0,0,0.5);
}

.ai-textarea-glass {
    width: 100%;
    height: 220px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 16px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    outline: none;
}
.ai-textarea-glass::placeholder { color: rgba(255,255,255,0.2); }

/* Scan Animation overriding */
.ai-scan-laser {
    position: absolute;
    left: 0;
    top: -100px;
    width: 100%;
    height: 100px; /* Radar gradient size */
    background: linear-gradient(to bottom, rgba(0,219,255,0) 0%, rgba(0,219,255,0.15) 80%, rgba(0,219,255,0.8) 100%);
    border-bottom: 2px solid var(--neon-cyan);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

@keyframes scan-radar-anim {
    0% { top: -100px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.ai-scan-active .ai-scan-laser {
    animation: scan-radar-anim 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ai-scan-active .ai-textarea-glass {
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.ai-scan-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--neon-cyan);
    font-weight: 800;
    text-shadow: 0 0 15px var(--neon-cyan);
    background: rgba(10, 18, 38, 0.85);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    letter-spacing: 3px;
    font-size: 11px;
    backdrop-filter: blur(5px);
    z-index: 20;
}

/* Glass Buttons */
.ai-actions-glass {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.ai-glass-btn-cancel, .ai-glass-btn-scan {
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.ai-glass-btn-cancel {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}
.ai-glass-btn-cancel:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.ai-glass-btn-scan {
    flex: 2;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(0, 150, 255, 0.1) 100%);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #fff;
    text-shadow: 0 0 5px rgba(0,219,255,0.5);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.15);
}

.ai-glass-btn-scan:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(0, 150, 255, 0.2) 100%);
    border-color: rgba(6, 182, 212, 0.8);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

.ai-btn-glow {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    animation: btn-glow-sweep 3s infinite;
}

@keyframes btn-glow-sweep {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}
/* ?? SEARCH ENGINE ENHANCEMENTS */
.suggestion-loading {
    padding: 15px;
    text-align: center;
    color: var(--neon-cyan);
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.8;
}

.suggestion-empty {
    padding: 20px 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: default;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
}

.suggestion-empty strong {
    color: var(--text-main);
}



/* Ensure suggestions dropdown has space for animations */
.suggestions-dropdown {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}
