/* ==========================================================================
   GL BAJAJ TRANSIT - LIVE BUS TRACKING SYSTEM
   ULTRA 3D GLASSMORPHISM DARK UI — ALL PORTALS
   ========================================================================== */

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #06b6d4;
    --accent: #a855f7;

    --bg-dark: #080c14;
    --surface-dark: #0e1424;
    --surface-card: rgba(14, 20, 36, 0.82);
    --surface-hover: rgba(22, 32, 56, 0.9);
    --border-dark: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.25);

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* 3D Depth System */
    --shadow-depth-1: 0 2px 6px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-depth-2: 0 4px 14px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
    --shadow-depth-3: 0 12px 40px rgba(0,0,0,0.5), 0 4px 14px rgba(0,0,0,0.3);
    --shadow-depth-4: 0 24px 60px rgba(0,0,0,0.55), 0 8px 20px rgba(0,0,0,0.35);
    --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.35), 0 0 80px rgba(59, 130, 246, 0.12);
    --shadow-glow-purple: 0 0 30px rgba(168, 85, 247, 0.3), 0 0 80px rgba(168, 85, 247, 0.1);
    --shadow-inset-dark: inset 0 2px 4px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,255,255,0.04);
    --shadow-inner-glow: inset 0 1px 0 rgba(255,255,255,0.06);

    /* 3D Perspective */
    --perspective: 1200px;

    /* Mobile & Safe Area Inset Support for iOS & Android */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --mobile-nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

button, a, select, input, textarea, .mobile-nav-item, .role-btn, .layer-pill-btn, .map-ctrl-btn {
    touch-action: manipulation;
}

body, html {
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    color: var(--text-main);
    overflow: hidden;
    overscroll-behavior-y: contain;
    -webkit-text-size-adjust: 100%;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== APP LAYOUT ==================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    perspective: var(--perspective);
}

/* ==================== 3D SIDEBAR ==================== */
.sidebar {
    width: 390px;
    min-width: 380px;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 17, 32, 0.98) 0%, rgba(6, 10, 18, 0.99) 100%);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    backdrop-filter: blur(24px) saturate(1.2);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow:
        8px 0 30px rgba(0,0,0,0.5),
        1px 0 0 rgba(255,255,255,0.03);
    position: relative;
}

/* Sidebar subtle top light edge */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.2), transparent);
    z-index: 1;
}

/* ==================== BRAND HEADER ==================== */
.brand {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-dark);
    background: rgba(15, 23, 42, 0.4);
    position: relative;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow:
        var(--shadow-depth-2),
        0 0 16px rgba(59, 130, 246, 0.3);
    transform: translateZ(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover {
    transform: scale(1.06);
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
}

.live-badge {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.25);
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.15),
        var(--shadow-inner-glow);
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0.3; }
}

/* ==================== 3D ROLE SWITCHER TABS ==================== */
.role-switcher {
    display: flex;
    padding: 8px 12px;
    background: rgba(6, 10, 18, 0.6);
    border-bottom: 1px solid var(--border-dark);
    gap: 6px;
    position: relative;
}

.role-switcher::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
}

.role-btn {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(14, 20, 36, 0.6);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-depth-1);
    position: relative;
    overflow: hidden;
}

/* 3D light reflection on top */
.role-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}

.role-btn:hover {
    color: var(--text-main);
    background: rgba(30, 41, 60, 0.8);
    transform: translateY(-2px);
    box-shadow: var(--shadow-depth-2);
    border-color: rgba(255,255,255,0.1);
}

.role-btn.active {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow:
        var(--shadow-depth-3),
        0 0 24px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

/* ==================== VIEW PANEL ==================== */
.view-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.role-view {
    display: none;
}

.role-view.active {
    display: block;
    animation: fadeSlideIn 0.35s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 3D SEARCH BOX ==================== */
.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    z-index: 1;
    font-size: 0.85rem;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(11, 17, 32, 0.8);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.84rem;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-depth-1);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
    background: rgba(14, 20, 36, 0.95);
}

/* ==================== SECTION HEADERS ==================== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.count-badge {
    background: rgba(59, 130, 246, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    color: #60a5fa;
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ==================== 3D ROUTE CARDS ==================== */
.route-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-card {
    background: rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}

/* Side glow accent */
.route-card::after {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.route-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(22, 32, 56, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.route-card:hover::after {
    opacity: 1;
}

.route-card.selected {
    border-color: rgba(59, 130, 246, 0.45);
    background: linear-gradient(145deg, rgba(30, 50, 85, 0.85), rgba(15, 25, 48, 0.9));
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.25);
}

.route-card.selected::after {
    opacity: 1;
}

.route-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bus-number-badge {
    padding: 3px 9px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.74rem;
    color: #fff;
    background: #2563eb;
    letter-spacing: 0.2px;
}

.route-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.route-meta {
    display: flex;
    gap: 12px;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==================== STATUS PILLS ==================== */
.status-pill {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-low {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-moderate {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-high {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==================== 3D SELECTED BUS DETAIL CARD ==================== */
.selected-bus-details {
    margin-top: 20px;
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.9), rgba(8, 14, 28, 0.92));
    -webkit-backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-inner-glow);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Top reflection band */
.selected-bus-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), rgba(168, 85, 247, 0.3), transparent);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 14px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-depth-1);
}

.close-btn:hover {
    color: var(--text-main);
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
    box-shadow: var(--shadow-depth-2);
}

/* ==================== 3D TELEMETRY GRID ==================== */
.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
    perspective: 600px;
}

.metric {
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.85), rgba(6, 10, 22, 0.9));
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow:
        var(--shadow-depth-2),
        var(--shadow-inner-glow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

/* Glass reflection */
.metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}

.metric:hover {
    transform: translateY(-3px) translateZ(6px);
    box-shadow:
        var(--shadow-depth-3),
        0 0 16px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.15);
}

.metric-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-value.highlight {
    color: #60a5fa;
    font-family: var(--font-mono);
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

/* ==================== 3D SPEEDOMETER ==================== */
.speedometer-metric-box {
    grid-column: span 2;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(10, 16, 30, 0.9), rgba(14, 22, 40, 0.7)) !important;
    border-color: rgba(59, 130, 246, 0.12) !important;
}

.speedometer-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 160px;
}

.speedo-dial {
    width: 150px;
    height: 80px;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
}

.speedo-digital {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    color: #60a5fa;
    margin-top: -10px;
    text-shadow: 0 0 16px rgba(96, 165, 250, 0.5);
}

/* ==================== PROGRESS TIMELINE ==================== */
.progress-section {
    margin: 18px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.progress-bar-bg {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    padding: 2px;
    box-shadow: var(--shadow-inset-dark);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transition: width 0.5s ease;
    box-shadow:
        0 0 12px rgba(59, 130, 246, 0.5),
        0 0 4px rgba(168, 85, 247, 0.3);
}

/* ==================== STOPS TIMELINE ==================== */
.stops-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    padding-left: 24px;
    border-left: 2px dashed rgba(255, 255, 255, 0.08);
    margin-top: 16px;
}

.timeline-stop {
    position: relative;
    font-size: 0.84rem;
}

.timeline-stop::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface-dark);
    border: 2px solid var(--text-subtle);
    box-shadow: var(--shadow-depth-1);
    transition: all 0.3s ease;
}

.timeline-stop.passed::before {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 10px var(--success), var(--shadow-depth-1);
}

.timeline-stop.current::before {
    background: var(--primary);
    border-color: #60a5fa;
    box-shadow: 0 0 14px var(--primary), var(--shadow-depth-1);
}

.timeline-stop-name { font-weight: 600; }
.timeline-stop-eta { font-size: 0.76rem; color: var(--text-muted); }

/* ==================== 3D DRIVER COCKPIT CARD ==================== */
.driver-card {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.92), rgba(8, 14, 28, 0.95));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-inner-glow);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.driver-card-header {
    margin-bottom: 14px;
}

.gps-toggle-title {
    display: block;
    font-size: 0.88rem;
}

.gps-status-text {
    color: #94a3b8;
    font-size: 0.75rem;
}

.alert-action-btn {
    flex: 1;
}

.route-form-grid {
    display: flex;
    gap: 12px;
}

.route-form-half {
    flex: 1;
}

.route-form-color {
    height: 42px;
    padding: 2px;
}

.admin-stat-icon {
    font-size: 1.2rem;
}

.admin-stat-bus { color: #2563eb; }
.admin-stat-success { color: #10b981; }
.admin-stat-route { color: #8b5cf6; }

.admin-actions-bar {
    margin-bottom: 14px;
}

.admin-add-route-btn {
    width: 100%;
}

.admin-log-title {
    margin-top: 16px;
}

.auth-modal-card {
    max-width: 400px;
    text-align: center;
}

.auth-modal-header {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.admin-auth-lock-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    margin: 0 auto;
}

.auth-modal-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
}

.admin-auth-form {
    margin-top: 14px;
}

.admin-passcode-input {
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.auth-modal-footer {
    margin-top: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.driver-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), transparent);
}

/* ==================== 3D FORM CONTROLS ==================== */
.control-group {
    margin-bottom: 18px;
}

.control-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.custom-select, .form-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(6, 10, 18, 0.85);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow:
        var(--shadow-inset-dark),
        var(--shadow-depth-1);
}

.custom-select:focus, .form-input:focus {
    border-color: var(--primary);
    box-shadow:
        var(--shadow-inset-dark),
        0 0 18px var(--primary-glow),
        var(--shadow-depth-2);
}

/* ==================== 3D TOGGLE SWITCH ==================== */
.toggle-switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.8), rgba(6, 10, 22, 0.85));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    box-shadow:
        var(--shadow-depth-2),
        var(--shadow-inner-glow);
}

.highlight-toggle {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(145deg, rgba(20, 35, 65, 0.7), rgba(14, 25, 50, 0.75));
    box-shadow:
        var(--shadow-depth-2),
        0 0 16px rgba(59, 130, 246, 0.08);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.12);
    transition: .3s;
    box-shadow: var(--shadow-inset-dark);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    box-shadow: var(--shadow-depth-1);
}

input:checked + .slider {
    background-color: var(--primary);
    box-shadow:
        var(--shadow-inset-dark),
        0 0 12px rgba(59, 130, 246, 0.3);
}
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 28px; }
.slider.round:before { border-radius: 50%; }

.range-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

.slider-val {
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    margin-top: 6px;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

/* ==================== 3D OCCUPANCY SELECTOR ==================== */
.occupancy-selector {
    display: flex;
    gap: 10px;
}

.occ-btn {
    flex: 1;
    padding: 11px;
    background: linear-gradient(145deg, rgba(14, 20, 36, 0.8), rgba(8, 12, 24, 0.85));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        var(--shadow-depth-1),
        var(--shadow-inner-glow);
}

.occ-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-depth-2);
    border-color: rgba(255,255,255,0.1);
}

.occ-btn.active {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow:
        var(--shadow-depth-2),
        0 0 16px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.alert-action-btns {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

/* ==================== 3D ADMIN PORTAL ==================== */
.admin-lock-card {
    background: linear-gradient(145deg, rgba(14, 20, 36, 0.9), rgba(8, 12, 24, 0.92));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-inner-glow);
    position: relative;
    overflow: hidden;
}

.admin-lock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
}

.lock-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow:
        var(--shadow-depth-2),
        0 0 24px rgba(239, 68, 68, 0.2);
    transition: transform 0.3s ease;
}

.lock-icon:hover {
    transform: scale(1.08);
}

.admin-session-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow:
        var(--shadow-depth-2),
        0 0 14px rgba(16, 185, 129, 0.08);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-depth-1);
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        var(--shadow-depth-2),
        0 0 16px rgba(239, 68, 68, 0.3);
}

/* ==================== 3D ADMIN STAT CARDS ==================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
    perspective: 600px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.85), rgba(8, 14, 28, 0.9));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        var(--shadow-depth-2),
        var(--shadow-inner-glow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px) translateZ(6px) rotateX(2deg);
    box-shadow:
        var(--shadow-depth-3),
        0 0 16px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.15);
}

.stat-val {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}

.stat-lbl { font-size: 0.72rem; color: var(--text-muted); }

/* ==================== 3D ADMIN ROUTE ITEMS ==================== */
.admin-route-item {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.8), rgba(8, 14, 28, 0.85));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow:
        var(--shadow-depth-1),
        var(--shadow-inner-glow);
    transition: all 0.25s ease;
}

.admin-route-item:hover {
    transform: translateX(4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: var(--shadow-depth-2);
}

.admin-route-btns {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: linear-gradient(145deg, rgba(18, 26, 45, 0.8), rgba(10, 16, 30, 0.85));
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-depth-1);
}

.icon-btn:hover {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    border-color: rgba(96, 165, 250, 0.35);
    transform: translateY(-3px) scale(1.08);
    box-shadow:
        var(--shadow-depth-2),
        0 0 14px rgba(59, 130, 246, 0.3);
}

/* ==================== ACTIVITY LOG ==================== */
.activity-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-item {
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.8), rgba(6, 10, 22, 0.85));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-depth-1);
    transition: all 0.2s ease;
}

.log-item:hover {
    transform: translateX(3px);
    border-color: rgba(59, 130, 246, 0.1);
}

.log-time { font-family: var(--font-mono); color: var(--primary); font-weight: 700; }
.log-msg { color: var(--text-muted); }

/* ==================== MAIN MAP AREA ==================== */
.map-wrapper {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: var(--bg-dark);
    z-index: 1;
}

/* ==================== 3D MAP HEADER CONTROLS ==================== */
.map-header-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    gap: 12px;
    perspective: 800px;
}

.map-ctrl-btn {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.92), rgba(8, 14, 28, 0.95));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-inner-glow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.map-ctrl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
    pointer-events: none;
}

.map-ctrl-btn:hover {
    transform: translateY(-3px) translateZ(6px);
    box-shadow:
        var(--shadow-depth-4),
        0 0 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

.map-ctrl-btn.highlight-btn {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-glow-blue);
}

/* ==================== 3D RE-CENTER PILL ==================== */
.recenter-pill-btn {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #ffffff, #e2e8f0);
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 13px 26px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        var(--shadow-depth-3),
        0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.recenter-pill-btn:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.03);
    box-shadow:
        var(--shadow-depth-4),
        0 8px 30px rgba(0,0,0,0.4);
}

/* ==================== MAP FOOTER ==================== */
.map-footer-banner {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.92), rgba(8, 14, 28, 0.95));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 11px 22px;
    border-radius: 25px;
    font-size: 0.82rem;
    color: var(--text-muted);
    box-shadow:
        var(--shadow-depth-2),
        var(--shadow-inner-glow);
}

/* ==================== 3D MODALS ==================== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 6, 12, 0.8);
    backdrop-filter: blur(12px) saturate(0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: var(--perspective);
}

.modal-card {
    background: linear-gradient(145deg, rgba(18, 26, 45, 0.96), rgba(10, 16, 32, 0.98));
    -webkit-backdrop-filter: blur(12px) saturate(0.8);
    backdrop-filter: blur(12px) saturate(0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow:
        var(--shadow-depth-4),
        var(--shadow-glow-blue),
        var(--shadow-inner-glow);
    transform-style: preserve-3d;
    animation: modalEntry 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), rgba(168, 85, 247, 0.3), transparent);
}

@keyframes modalEntry {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95) rotateX(4deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ==================== 3D BUTTONS ==================== */
.btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-depth-2);
}

/* Glass reflection on buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    box-shadow:
        var(--shadow-depth-2),
        0 0 18px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        var(--shadow-depth-3),
        0 0 24px rgba(59, 130, 246, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #000;
    font-weight: 700;
    box-shadow:
        var(--shadow-depth-2),
        0 0 14px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow:
        var(--shadow-depth-3),
        0 0 20px rgba(245, 158, 11, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    box-shadow:
        var(--shadow-depth-2),
        0 0 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow:
        var(--shadow-depth-3),
        0 0 20px rgba(239, 68, 68, 0.35);
}

.btn-outline {
    background: linear-gradient(145deg, rgba(18, 26, 45, 0.7), rgba(10, 16, 30, 0.8));
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
    box-shadow: var(--shadow-depth-1);
}

.btn-outline:hover {
    background: rgba(30, 41, 60, 0.8);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-depth-2);
}

.hidden { display: none !important; }

/* ==================== 3D MAP MARKERS ==================== */
.bus-marker-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bus-marker-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease;
}

.bus-marker-pulse {
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    animation: markerPulse 1.8s infinite ease-out;
}

@keyframes markerPulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.stop-marker-icon {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 4px solid var(--primary);
    border-radius: 50%;
    box-shadow:
        0 3px 10px rgba(0,0,0,0.5),
        0 0 8px rgba(59, 130, 246, 0.2);
}

.campus-marker-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.campus-marker-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 28px rgba(59, 130, 246, 0.5),
        0 0 20px rgba(168, 85, 247, 0.3);
}

.campus-marker-pulse {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.3);
    animation: markerPulse 2s infinite ease-out;
}

.user-marker-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.user-marker-icon {
    width: 20px;
    height: 20px;
    background: #2563eb;
    border: 3.5px solid #ffffff;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(37, 99, 235, 0.4),
        0 0 20px rgba(37, 99, 235, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-marker-pulse {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(37, 99, 235, 0.15) 60%, rgba(37, 99, 235, 0) 100%);
    animation: userGpsPulse 2.0s infinite cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
    pointer-events: none;
}

.user-marker-heading {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 22px solid rgba(59, 130, 246, 0.55);
    top: -22px;
    transform-origin: bottom center;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8));
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
}

@keyframes userGpsPulse {
    0% {
        transform: scale(0.4);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.map-ctrl-btn.gps-tracking-active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.6) !important;
    animation: gpsActiveGlow 2s infinite ease-in-out;
}

@keyframes gpsActiveGlow {
    0%, 100% { box-shadow: 0 0 14px rgba(37, 99, 235, 0.6); }
    50% { box-shadow: 0 0 24px rgba(96, 165, 250, 0.9); }
}

/* ==================== 3D TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    perspective: 800px;
}

.toast {
    background: linear-gradient(145deg, rgba(18, 26, 45, 0.96), rgba(10, 16, 32, 0.98));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-main);
    padding: 14px 22px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        var(--shadow-depth-3),
        var(--shadow-inner-glow);
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.toast-info {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-depth-3), 0 0 14px rgba(59, 130, 246, 0.12);
}
.toast-success {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: var(--shadow-depth-3), 0 0 14px rgba(16, 185, 129, 0.12);
}
.toast-warning {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: var(--shadow-depth-3), 0 0 14px rgba(245, 158, 11, 0.12);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(40px) translateZ(-20px) rotateY(-5deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateZ(0) rotateY(0);
        opacity: 1;
    }
}

/* ==================== MISSED BUS CARD ==================== */
.missed-bus-card {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.88), rgba(8, 14, 28, 0.92)) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: var(--radius-md) !important;
    box-shadow:
        var(--shadow-depth-2),
        var(--shadow-inner-glow) !important;
    padding: 14px;
    margin-bottom: 14px;
}

.missed-bus-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.missed-bus-heading {
    font-size: 0.95rem;
    margin-top: 4px;
}

.missed-bus-trigger-btn {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

.calculate-intercept-btn {
    width: 100%;
    margin-top: 10px;
}

.intercept-result {
    margin-top: 10px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #60a5fa;
}

.pulse-icon {
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.intercept-box {
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.8), rgba(6, 10, 22, 0.85));
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: var(--shadow-depth-1);
}

/* Google Maps Nav Button */
.gmaps-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    margin-top: 12px;
}

.alert-btn {
    width: 100%;
}

/* ==================== UNIFIED MAP TOP BAR & CONTROLS ==================== */
.map-top-bar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.map-top-bar > * {
    pointer-events: auto;
}

/* 1. FLOATING LIVE ETA HUD */
.live-eta-hud {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(11, 17, 32, 0.88);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.hud-bus-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.hud-bus-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.hud-stat-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hud-label {
    font-size: 0.64rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hud-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
}

.hud-val.highlight-eta {
    color: #60a5fa;
    font-family: var(--font-mono);
}

.hud-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.hud-gmaps-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.hud-gmaps-btn:hover {
    background: #10b981;
    color: #ffffff;
    transform: translateY(-1px);
}

/* 2. GOOGLE MAPS LAYER SWITCHER BAR */
.map-layer-bar {
    position: static;
    display: flex;
    align-items: center;
    background: rgba(11, 17, 32, 0.88);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 6px;
    border-radius: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    gap: 3px;
}

.layer-pill-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.layer-pill-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.layer-pill-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* 3. MAP ACTION CONTROLS */
.map-header-controls {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-ctrl-btn {
    background: rgba(11, 17, 32, 0.88);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.map-ctrl-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.map-ctrl-btn.admin-link-pill {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(124, 58, 237, 0.3));
    border-color: rgba(96, 165, 250, 0.4);
    color: #93c5fd;
}

/* ==================== GOOGLE MAPS POPUP STYLING ==================== */
.leaflet-popup-content-wrapper {
    background: linear-gradient(145deg, rgba(14, 22, 40, 0.96), rgba(8, 14, 28, 0.98)) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-depth-4), var(--shadow-glow-blue) !important;
    color: var(--text-main) !important;
    padding: 6px !important;
}

.leaflet-popup-tip {
    background: rgba(14, 22, 40, 0.96) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

.gmaps-popup-card {
    padding: 6px;
    min-width: 220px;
}

.gmaps-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.gmaps-popup-busno {
    font-size: 0.9rem;
    font-weight: 800;
    color: #60a5fa;
}

.gmaps-popup-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.gmaps-popup-row {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.gmaps-popup-row b {
    color: var(--text-main);
}

.gmaps-popup-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 7px 12px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.gmaps-popup-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

/* ==================== GMAPS CONFIG MODAL ==================== */
.gmaps-features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gmaps-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-main);
}

.footer-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: markerPulse 1.8s infinite;
}

/* ==================== LIVE DRIVER BEACON & ACCURACY ==================== */
.driver-live-marker {
    position: relative;
}

.driver-live-marker::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.25);
    border: 2px solid #10b981;
    animation: driverRadarPing 2s infinite ease-out;
    pointer-events: none;
    z-index: -1;
}

@keyframes driverRadarPing {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.status-driver-live {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.8); }
}

/* ==================== NEXT STOP LIVE ETA & DISTANCE RADAR SECTION ==================== */
.next-stop-radar-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(8, 14, 26, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.next-stop-radar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #3b82f6);
    background-size: 200% 100%;
    animation: gradientMove 4s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.radar-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.radar-bus-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 4px 8px;
    border-radius: 6px;
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.82rem;
}

.radar-bus-select {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
}

.radar-bus-select option {
    background: #0f172a;
    color: #f8fafc;
}

.radar-live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.radar-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: blinkDot 1.4s infinite ease-in-out;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.radar-next-stop-box {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    position: relative;
}

.radar-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
    color: #38bdf8;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.radar-stop-name {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.radar-sched-time {
    font-size: 0.76rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
}

/* Dual Big Metrics Grid */
.radar-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.radar-metric-cell {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.radar-metric-cell.eta-cell {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.8));
}

.radar-metric-cell.dist-cell {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.8));
}

.metric-mini-label {
    font-size: 0.64rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.metric-big-val {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-mono);
    line-height: 1.1;
    margin-bottom: 1px;
}

.eta-cell .metric-big-val { color: #60a5fa; }
.dist-cell .metric-big-val { color: #34d399; }

.metric-sub-val {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Secondary Telemetry Row */
.radar-telemetry-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 10px;
}

.telemetry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.telemetry-lbl {
    font-size: 0.64rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

.telemetry-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
    font-family: var(--font-mono);
}

.telemetry-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.08);
}

/* Progress Wrap */
.radar-progress-wrap {
    margin-bottom: 10px;
}

.radar-progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-pct-badge {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.68rem;
}

.radar-progress-track {
    height: 6px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.radar-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Actions Row */
.radar-actions-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.radar-gmaps-btn {
    flex: 1.3;
    font-size: 0.78rem;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

.radar-alert-btn {
    flex: 1;
    font-size: 0.76rem;
    padding: 7px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Upcoming Stoppages Card */
.radar-upcoming-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 10px;
}

.upcoming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.upcoming-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.66rem;
    color: #94a3b8;
}

.upcoming-stops-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
}

.upcoming-stop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.upcoming-stop-row:hover {
    background: rgba(30, 41, 59, 0.8);
}

.upcoming-stop-row.next-immediate {
    border-left: 3px solid #3b82f6;
    background: rgba(37, 99, 235, 0.12);
}

.stop-row-name {
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stop-row-telemetry {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stop-row-dist {
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stop-row-eta {
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* ==================== MOBILE NAVIGATION DOCK & RESPONSIVE DESIGN SYSTEM ==================== */

/* Safe area padding variables */
:root {
    --mobile-nav-height: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Mobile Navigation Bottom Dock (Hidden on Desktop) */
.mobile-nav-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 12, 22, 0.99));
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.6);
    z-index: 2500;
    align-items: center;
    justify-content: space-around;
    padding-left: 6px;
    padding-right: 6px;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 8px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 48px;
}

.mobile-nav-item i {
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: #f8fafc;
}

.mobile-nav-item.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
}

.mobile-nav-item.active i {
    color: #38bdf8;
    transform: scale(1.15);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Mobile Floating Action Toggle Button */
.mobile-map-toggle-btn {
    display: none;
    position: absolute;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 80px);
    right: 14px;
    z-index: 1100;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-map-toggle-btn:active {
    transform: scale(0.95);
}

/* ==================== DESKTOP & WIDE SCREEN OPTIMIZATIONS (>= 1440px) ==================== */
@media (min-width: 1440px) {
    .sidebar {
        width: 440px;
        min-width: 440px;
    }
    .radar-stop-name {
        font-size: 1.25rem;
    }
    .metric-big-val {
        font-size: 1.75rem;
    }
}

/* ==================== TABLET LANDSCAPE & LAPTOP (901px - 1200px) ==================== */
@media (max-width: 1200px) and (min-width: 901px) {
    .sidebar {
        width: 360px;
        min-width: 360px;
    }
    .live-eta-hud {
        gap: 12px;
        padding: 8px 14px;
    }
    .hud-stat-item {
        font-size: 0.78rem;
    }
    .hud-val {
        font-size: 0.82rem;
    }
}

/* ==================== TABLETS & MOBILE PHONES (<= 900px) ==================== */
@media (max-width: 900px) {
    body {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    .app-container {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: relative;
        perspective: none;
    }

    /* Mobile Bottom Navigation Bar is visible */
    .mobile-nav-dock {
        display: flex;
    }

    .mobile-map-toggle-btn {
        display: flex;
    }

    /* Interactive Map Area (Full Screen Mobile Map) */
    .map-wrapper {
        flex: 1;
        width: 100%;
        height: calc(100vh - var(--mobile-nav-height) - var(--safe-bottom));
        height: calc(100dvh - var(--mobile-nav-height) - var(--safe-bottom));
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
        z-index: 1;
    }

    #map {
        width: 100%;
        height: 100%;
    }

    /* Sidebar as Mobile Drawer / Full View */
    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
        width: 100%;
        min-width: 100%;
        height: calc(100vh - var(--mobile-nav-height) - var(--safe-bottom));
        height: calc(100dvh - var(--mobile-nav-height) - var(--safe-bottom));
        z-index: 1200;
        background: linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(6, 10, 20, 0.99));
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
        display: flex;
        flex-direction: column;
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
        transform: translateY(0);
        opacity: 1;
        padding: 14px 14px 20px;
    }

    /* When mobile user is in MAP view, slide the sidebar out */
    .sidebar.mobile-hidden {
        transform: translateY(105%);
        opacity: 0;
        pointer-events: none;
    }

    .brand {
        margin-bottom: 12px;
    }

    .role-switcher {
        margin-bottom: 12px;
    }

    /* Unified Map Top Bar on Mobile */
    .map-top-bar {
        top: calc(var(--safe-top) + 8px);
        left: 8px;
        right: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    /* Floating Live ETA HUD on Mobile */
    .live-eta-hud {
        padding: 6px 10px;
        gap: 6px;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .live-eta-hud::-webkit-scrollbar {
        display: none;
    }

    .hud-bus-pill {
        padding: 3px 7px;
        font-size: 0.72rem;
    }

    .hud-stat-item {
        font-size: 0.7rem;
        min-width: fit-content;
    }

    .hud-val {
        font-size: 0.75rem;
    }

    .hud-gmaps-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .hud-divider {
        height: 14px;
    }

    .hud-campus-stat, .hud-speed-stat {
        display: none !important;
    }

    /* Floating Layer Switcher Bar on Mobile */
    .map-layer-bar {
        padding: 3px 6px;
        gap: 3px;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .map-layer-bar::-webkit-scrollbar {
        display: none;
    }

    .layer-pill-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Map Header Control Buttons on Mobile */
    .map-header-controls {
        gap: 4px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .map-ctrl-btn {
        padding: 5px 8px;
        font-size: 0.72rem;
    }
}

/* ==================== MOBILE SMARTPHONES (<= 600px) ==================== */
@media (max-width: 600px) {
    /* Inputs & Buttons Touch Sizing */
    input, select, textarea, button {
        font-size: 16px !important; /* Prevents auto-zoom on iOS */
    }

    .custom-select, .form-input {
        padding: 10px 12px;
    }

    /* Next Stop Radar Card on Phone */
    .next-stop-radar-card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .radar-metrics-grid {
        gap: 6px;
    }

    .radar-metric-cell {
        padding: 8px 6px;
    }

    .metric-big-val {
        font-size: 1.25rem;
    }

    .metric-sub-val {
        font-size: 0.68rem;
    }

    .radar-actions-row {
        flex-direction: column;
        gap: 5px;
    }

    .radar-gmaps-btn, .radar-alert-btn {
        width: 100%;
        padding: 10px;
    }

    /* Modals on Mobile */
    .modal-content {
        width: 95vw;
        max-width: 95vw;
        max-height: 90vh;
        max-height: 90dvh;
        padding: 16px;
        border-radius: 16px;
    }

    .modal-title {
        font-size: 1rem;
    }

    .modal-tab-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    /* Admin Dedicated Portal Mobile Tweaks */
    .admin-nav {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .admin-main-container {
        padding: 12px 10px 40px;
    }

    .admin-gate-card {
        width: 95%;
        padding: 24px 16px;
        margin: 20px auto;
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .admin-kpi-card {
        padding: 12px;
    }

    .admin-kpi-info h4 {
        font-size: 1.15rem;
    }

    .admin-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    #admin-live-map {
        height: 280px !important;
    }

    .admin-master-table {
        font-size: 0.78rem;
    }

    .admin-master-table th, .admin-master-table td {
        padding: 8px 6px;
    }
}

/* ==================== ULTRA-COMPACT MOBILE (<= 380px) ==================== */
@media (max-width: 380px) {
    .radar-metrics-grid {
        grid-template-columns: 1fr;
    }

    .admin-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
    }

    .live-eta-hud {
        gap: 4px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   ENHANCED TRANSPORT ADMIN COMMAND CENTER STYLES
   ========================================================================== */

/* Admin Navigation Tabs */
.admin-tabs-wrapper {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(10, 16, 30, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.admin-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.admin-tab-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-sans);
}

.admin-tab-nav-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.admin-tab-nav-btn:hover {
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.admin-tab-nav-btn.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(124, 58, 237, 0.25));
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-tab-nav-btn.active i {
    color: #38bdf8;
    transform: scale(1.1);
}

.admin-tab-nav-btn .tab-badge {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    color: #38bdf8;
}

.admin-tab-nav-btn.active .tab-badge {
    background: rgba(37, 99, 235, 0.5);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* SOS Urgent Incident Banner */
.admin-sos-bar {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.25), rgba(185, 28, 28, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

.admin-sos-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fecaca;
    font-size: 0.88rem;
}

.admin-sos-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f87171;
    font-size: 1.1rem;
    animation: pulse 1.5s infinite;
}

/* 2x2 Interactive Coach Visualizer */
.coach-visualizer-container {
    background: linear-gradient(180deg, #090d16, #0c1220);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
    margin-bottom: 20px;
}

.coach-chassis {
    max-width: 580px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 2px solid #334155;
    border-radius: 40px 40px 24px 24px;
    padding: 24px 20px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.coach-front-windshield {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.25), rgba(30, 58, 138, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 28px 28px 8px 8px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
}

.coach-windshield-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coach-driver-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 14px;
    border-bottom: 1px dashed #334155;
    margin-bottom: 16px;
}

.coach-driver-seat {
    background: linear-gradient(135deg, #334155, #1e293b);
    border: 1px solid #64748b;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #e2e8f0;
    font-weight: 700;
}

.coach-door-indicator {
    font-size: 0.72rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.coach-seating-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coach-seat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.coach-seat-pair {
    display: flex;
    gap: 8px;
    flex: 1;
}

.coach-aisle-divider {
    width: 28px;
    text-align: center;
    font-size: 0.65rem;
    color: #475569;
    font-family: var(--font-mono);
    user-select: none;
}

.coach-seat-btn {
    flex: 1;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e293b;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.18s ease;
}

.coach-seat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.coach-seat-btn .seat-no {
    font-size: 0.76rem;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
}

.coach-seat-btn .seat-sub {
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    margin-top: 2px;
    opacity: 0.85;
}

.coach-seat-btn.seat-student {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.coach-seat-btn.seat-employee {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
}

.coach-seat-btn.seat-vacant {
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #64748b;
}

.coach-seat-btn.seat-selected {
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.6) !important;
    transform: scale(1.05);
}

/* Legend for Seating */
.coach-legend-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

.legend-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Driver Roster Cards */
.driver-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.driver-profile-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.driver-profile-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.driver-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.driver-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.driver-info h4 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #f8fafc;
}

.driver-info p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.driver-meta-row {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 10px 0;
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    color: #cbd5e1;
}

/* Official Transit ID Pass (Printable Modal) */
.transit-pass-container {
    max-width: 440px;
    margin: 0 auto;
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.transit-pass-header {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #ffffff;
    padding: 16px;
    text-align: center;
    position: relative;
}

.transit-pass-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 2px;
    letter-spacing: -0.2px;
}

.transit-pass-header p {
    font-size: 0.72rem;
    opacity: 0.9;
    margin: 0;
}

.transit-pass-body {
    padding: 20px;
}

.transit-pass-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.transit-pass-field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.transit-pass-field span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

/* Modals */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.admin-modal-box {
    background: linear-gradient(145deg, #0f172a, #0b1120);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
}

.admin-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.admin-close-btn:hover {
    color: #f8fafc;
}

/* Analytics Cards & Progress Bars */
.analytics-metric-bar {
    margin-bottom: 14px;
}

.analytics-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 6px;
    color: #cbd5e1;
}

.analytics-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.analytics-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ==================== BULK CSV DROP ZONE ==================== */
.csv-drop-zone {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.csv-drop-zone:hover {
    border-color: #3b82f6;
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* ==================== STOPPAGE BUILDER ROW ==================== */
.stop-builder-row {
    transition: all 0.2s ease;
}

.stop-builder-row:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    background: rgba(30, 41, 59, 0.6) !important;
}

/* ==================== KIOSK & WALLBOARD MODE ==================== */
body.kiosk-wallboard-mode .admin-navbar {
    padding: 10px 24px;
}

body.kiosk-wallboard-mode .admin-kpi-grid {
    grid-template-columns: repeat(5, 1fr);
}

body.kiosk-wallboard-mode #admin-live-map {
    height: 640px !important;
}

/* ==================== PRINT MEDIA STYLES ==================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .admin-navbar, .admin-tabs-wrapper, .admin-kpi-grid, .admin-sos-bar, .admin-panel-header, button {
        display: none !important;
    }
}

/* ==================== PWA INSTALL PROMPT BANNER (ANDROID & IOS) ==================== */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 12px);
    left: 14px;
    right: 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.25);
    z-index: 9999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: pwaBannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaBannerSlideUp {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 0.88rem;
    color: #f8fafc;
    font-weight: 700;
}

.pwa-banner-text span {
    font-size: 0.74rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-dismiss-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pwa-dismiss-btn:hover {
    color: #f8fafc;
}

/* iOS Safari Install Hint */
.ios-install-hint {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 12px);
    left: 14px;
    right: 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 16, 30, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: opacity 0.4s ease;
    animation: pwaBannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Standalone PWA Mode (When Launched from Home Screen on Android or iOS) */
@media all and (display-mode: standalone) {
    body {
        user-select: none;
        -webkit-user-select: none;
    }
    
    .map-top-bar {
        top: calc(var(--safe-top) + 4px);
    }
    
    .mobile-nav-dock {
        padding-bottom: calc(6px + var(--safe-bottom));
        height: calc(var(--mobile-nav-height) + var(--safe-bottom));
    }
}


/* ==================== EMERGENCY BROADCAST BANNER STYLES ==================== */
.emergency-broadcast-banner {
    background: linear-gradient(90deg, #991b1b, #dc2626, #b91c1c);
    color: #ffffff;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f87171;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    z-index: 500;
    position: relative;
    animation: bannerSlideDown 0.3s ease-out;
}

.emergency-broadcast-banner.level-warning {
    background: linear-gradient(90deg, #92400e, #d97706, #b45309);
    border-bottom-color: #fbbf24;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.4);
}

@keyframes bannerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.emergency-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.emergency-icon-pulse {
    font-size: 1.2rem;
    animation: emergencyPulse 1.2s infinite alternate;
}

@keyframes emergencyPulse {
    from { transform: scale(1); filter: drop-shadow(0 0 2px #fff); }
    to { transform: scale(1.2); filter: drop-shadow(0 0 8px #fff); }
}

.emergency-text-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.emergency-dismiss-btn {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emergency-dismiss-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}
