@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/BLNB4FAQFNK56DWWNF7PMGTCOTZHOEII/ST3WKSSDMBK2MIQQO3MAVYWLF4FTOLFV/6IN5WOLRCYP4G4MOCOHOMXNON6Q7MDAR.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/OYB4CXKJQXKTNSLJMTDQOIVUL2V5EL7S/WYO2P7DQVV5RNXGMCUO2HL4RJP4VFUAS/6XPIMU23OJVRY676OG5YVJMWEHWICATX.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: 'Switzer';
    src: url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.woff2') format('woff2'),
         url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.woff') format('woff'),
         url('https://cdn.fontshare.com/wf/5SZVFDB7V52TI6ULVC6J3WQZQCIZVDV5/ODYPSTCUDMKSTYIPTV4CLQ7URIK7XYBJ/YS3VPNVO4B3TOJMEXDGFZQ4TLZGGSRZC.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --ink: #0E1B33; --ink-soft: #5C6B8A; --ink-faint: #93A2C2;
            --primary: #2451C4; --primary-dark: #15306B; --primary-soft: #EAF0FC;
            --surface: #F3F6FC; --card: #FFFFFF; --border: #DCE6F5;
            --success: #15A567; --success-soft: #E5F7EE;
            --danger: #E0483B; --danger-soft: #FCEAE8; --accent: #F5A623;
            --radius-sm: 8px; --radius-md: 14px; --radius-lg: 20px;
            --shadow-md: 0 10px 28px rgba(20, 40, 90, 0.12);
            --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            
 /* Liquid Glass Variables */
            --glass-bg: rgba(255, 255, 255, 0.75);
            --glass-blur: blur(24px) saturate(180%);
            --glass-border: 1px solid rgba(255, 255, 255, 0.6);

            --drawer-bg: rgba(255, 255, 255, 0.98);
            --bottom-nav-bg: rgba(255, 255, 255, 0.45);
            --bottom-nav-border: 1px solid rgba(255, 255, 255, 0.55);
            --icon-btn-bg: rgba(255, 255, 255, 0.5);
            --drawer-item-border: 1px solid rgba(14, 27, 51, 0.05);
        }

        html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; background: var(--surface); }
        body { font-family: var(--font-body); color: var(--ink); display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; }
        button { font-family: inherit; }
        svg { display: block; }

 /* ===================== HEADER ===================== */
        .dash-header {
            background: #FFFFFF !important;
            padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border) !important;
            box-shadow: var(--shadow-sm); z-index: 1200; flex-shrink: 0; height: 60px; position: relative;
        }
        .brand { display: flex; align-items: center; gap: 10px; }
        
        .brand-mark {
            display: flex; align-items: center; justify-content: center;
            border-radius: 10px; box-shadow: 0 4px 10px rgba(36, 81, 196, 0.35);
        }
        
        .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
        .brand-text .title { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
        .brand-text .live-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important; display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--status-success-text); }
        .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); position: relative; }
        .live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--success); opacity: 0.6; animation: liveDotPulse 1.8s ease-out infinite; }
        @keyframes liveDotPulse { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(2.2); opacity: 0; } }
        
        .header-actions { display: flex; align-items: center; gap: 12px; }
        
 /* Updated Desktop Nav CSS */
        .desktop-nav { display: flex; gap: 6px; }
        .desktop-nav .nav-btn { 
            text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-soft); 
            padding: 10px 16px; border-radius: 10px; transition: 0.2s; cursor: pointer; 
            display: flex; align-items: center; gap: 6px; white-space: nowrap; 
        }
        .desktop-nav .nav-btn:hover { background: var(--primary-soft); color: var(--theme-accent-text); }
        .desktop-nav .nav-btn.active { background: #FFFFFF; color: var(--theme-accent-text); box-shadow: 0 4px 12px rgba(36,81,196,0.08); border: 1px solid rgba(36, 81, 196, 0.1); }
        .desktop-nav svg { width: 18px; height: 18px; }
        
        .icon-btn { background: rgba(255,255,255,0.5); color: var(--ink); width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid var(--border); transition: all 0.2s ease; position: relative; }
        .icon-btn:hover { background: var(--border); }
        .icon-btn.logout-btn { background: var(--danger-soft); color: var(--status-danger-text); border-color: #F4C6C2; }
        .icon-btn.logout-btn:hover { background: #FCD9D6; transform: scale(1.05); }
        
 /* ===================== WORKSPACE & MAP ===================== */
        .dash-content { flex: 1; display: flex; position: relative; overflow: hidden; }
        
 /* FLOATING TOP BAR (Fleet Counters) */
        .top-floating-bar { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1001; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
        @media (min-width: 769px) { .top-floating-bar { width: 320px; left: 16px; top: 16px; } }
        
        .fleet-summary { 
            display: flex;
            gap: 6px;
            pointer-events: auto;
            position: relative;
            overflow: hidden;
            border-radius: 14px !important;
            padding: 5px !important;
            width: 100%;
        }
        
        .fleet-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0;
            padding: 5px 4px;
            border-radius: 10px;
            background: var(--card);
            border: 1px solid var(--border);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
            position: relative;
            z-index: 2;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .fleet-chip:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
        }
        .fleet-chip .num {
            font-family: var(--font-display, inherit);
            font-weight: 800;
            font-size: 15px;
            line-height: 1.1;
            color: var(--ink);
        }
        .fleet-chip .lbl {
            font-size: 8.5px;
            font-weight: 800;
            color: var(--ink-soft);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 1px;
        }
        .fleet-chip.moving .num,
        .fleet-chip.moving .lbl {
            color: var(--status-success-text);
        }
        .fleet-chip.stopped .num,
        .fleet-chip.stopped .lbl {
            color: var(--status-danger-text);
        }

 /* Floating Top Search Bar (Mobile: Below Fleet Summary; Desktop: Horizontally Centered in Middle of Map) */
        .top-search-wrap {
            position: absolute;
            top: 66px;
            left: 10px;
            right: 10px;
            z-index: 1002;
            overflow: visible;
            max-height: 0;
            opacity: 0;
            pointer-events: none;
            transition: max-height 0.25s ease, opacity 0.25s ease;
        }
        .top-search-wrap.active {
            max-height: 52px;
            opacity: 1;
            pointer-events: auto;
        }

        @media (min-width: 769px) {
            .top-search-wrap {
                top: 16px;
                left: 50%;
                right: auto;
                transform: translateX(-50%) translateY(-8px);
                width: 380px;
                max-width: calc(100vw - 420px);
                z-index: 1005;
                max-height: 0;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            }
            .top-search-wrap.active {
                max-height: 60px;
                opacity: 1;
                pointer-events: auto;
                transform: translateX(-50%) translateY(0);
            }
        }
        .search-box {
            width: 100%;
            padding: 10px 38px 10px 14px;
            border: 1px solid rgba(255,255,255,0.6);
            border-radius: 12px;
            font-size: 12.5px;
            font-weight: 500;
            font-family: inherit;
            outline: none;
            background: rgba(255,255,255,0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: var(--ink);
            box-shadow: 0 4px 16px rgba(20,40,90,0.08);
            position: relative;
            z-index: 1;
            transition: all 0.2s ease;
        }
        .search-box:focus {
            border-color: var(--primary);
            background: #ffffff;
            box-shadow: 0 0 0 3px var(--primary-soft), 0 6px 20px rgba(36, 81, 196, 0.12);
        }
        :root.dark-theme .search-box {
            background: rgba(18, 18, 22, 0.92);
            border-color: rgba(255, 255, 255, 0.15);
            color: var(--ink);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
        }
        :root.dark-theme .search-box:focus {
            background: #18181E;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35), 0 6px 20px rgba(0, 0, 0, 0.7);
        }
        .search-clear-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 24px;
            border: 1px solid var(--border);
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            background: var(--surface);
            color: var(--ink-soft);
            cursor: pointer;
            z-index: 2;
            padding: 0;
            line-height: 1;
            transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .search-clear-btn:hover {
            background: var(--danger-soft);
            color: var(--status-danger-text);
            border-color: rgba(224, 72, 59, 0.3);
            transform: translateY(-50%) scale(1.08);
        }
        .search-clear-btn:active {
            transform: translateY(-50%) scale(0.92);
        }
        :root.dark-theme .search-clear-btn {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.1);
            color: var(--ink-soft);
        }
        :root.dark-theme .search-clear-btn:hover {
            background: rgba(239, 68, 68, 0.22);
            color: #f87171;
            border-color: rgba(239, 68, 68, 0.4);
        }

        .map-container-wrapper { flex: 1; height: 100%; position: relative; z-index: 1; }
        #map { width: 100%; height: 100%; z-index: 1; background: transparent; filter: none !important; -webkit-filter: none !important; }
        #map .leaflet-tile, #map .leaflet-tile-pane, #map .leaflet-layer, #map .leaflet-container {
            filter: none !important;
            -webkit-filter: none !important;
        }
 /* Night Mode Banner */
        .night-mode-banner {
            position: absolute; bottom: 85px; left: 50%; transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            color: #fff; padding: 12px 24px; border-radius: 30px; font-size: 13px; font-weight: 700;
            z-index: 950; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.16);
            box-shadow: 0 8px 24px rgba(0,0,0,0.55); white-space: nowrap; pointer-events: none;
        }
 /* MAP CONTROLS */
        .leaflet-top.leaflet-right {
            top: 68px;
            right: 12px;
            transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 1000;
        }
        
        .route-line-primary { stroke-linecap: round; stroke-linejoin: round; }
        .route-line-alt { stroke-linecap: round; stroke-linejoin: round; opacity: 0.4; }

 /* PREMIUM POPUP STYLES & CLEAN BUTTONS (Clean White + Blue UI v2) */
        .leaflet-popup-content-wrapper {
            background: #FFFFFF !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            border: 1px solid #E2E8F0 !important;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
            border-radius: 16px !important;
            padding: 0 !important;
            font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
            color: #0F172A !important;
        }
        :root.dark-theme .leaflet-popup-content-wrapper,
        html.dark-theme .leaflet-popup-content-wrapper,
        .dark-theme .leaflet-popup-content-wrapper {
            background: #101624 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
            color: #F8FAFC !important;
        }
        .leaflet-popup-content { margin: 12px !important; min-width: 210px !important; max-width: 230px !important; line-height: 1.4 !important; }
        .leaflet-popup-tip-container { display: none !important; }
        .leaflet-popup { margin-bottom: 10px !important; }

        .popup-action-btn {
            flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
            padding: 9px 4px; border-radius: 10px; font-family: 'Switzer', var(--font-body), sans-serif; font-size: 11px;
            font-weight: 700; border: none; cursor: pointer; transition: all 0.15s ease;
            white-space: nowrap; overflow: hidden;
        }
        .popup-btn-primary { background: #0066FF; color: #fff; box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25); }
        .popup-btn-primary:hover { background: #0052CC; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 102, 255, 0.35); }
        .popup-btn-success { background: #10B981; color: #fff; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25); }
        .popup-btn-success:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); }

 /* Keep both route actions balanced inside the narrow map popup. */
        .leaflet-popup .sheet-action-row {
            display: grid !important;
            grid-template-columns: 1fr 1fr;
            gap: 7px !important;
        }
        .leaflet-popup .sheet-action-row .popup-action-btn {
            width: 100%;
            min-width: 0;
            height: 38px;
            padding: 0 6px !important;
            gap: 4px;
            border-radius: 8px;
            font-size: 10.5px !important;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .leaflet-popup .sheet-action-row .popup-action-btn svg {
            display: inline-block;
            width: 12px;
            height: 12px;
            flex: 0 0 12px;
            vertical-align: middle;
        }

 /* Direction Info Box */
        .route-info-box {
            position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
            background: var(--card); backdrop-filter: blur(10px);
            padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border);
            box-shadow: 0 4px 16px rgba(20,40,90,0.15); z-index: 2000;
            display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 220px;
        }

 /* ===================== SIDEBAR (Desktop) ===================== */
        .bus-sidebar { width: 360px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border-left: var(--glass-border); display: flex; flex-direction: column; z-index: 999; flex-shrink: 0; box-shadow: var(--shadow-md); position: absolute; right: 0; top: 0; bottom: 0; }
        
        .sidebar-header { padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; }
        .sidebar-title { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 1px; margin: 0; }

        .filter-tabs { display: flex; gap: 6px; background: var(--surface); padding: 4px; border-radius: 10px; border: 1px solid var(--border); margin: 0 16px 8px; }
        .filter-btn { flex: 1; padding: 6px; font-size: 11px; font-weight: 600; border: none; background: transparent; border-radius: 6px; cursor: pointer; text-align: center; color: var(--ink-soft); transition: all 0.15s; }
        .filter-btn.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(36,81,196,0.25); }

        .bus-list-container { flex: 1; overflow-y: auto; padding: 0 16px 16px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
        .bus-list-container::-webkit-scrollbar { display: none; }
        .empty-state { text-align: center; padding: 40px 20px; color: var(--ink-faint); font-size: 13px; font-weight: 500; }

        .sidebar-bus-card { 
            padding: 10px; border-radius: 12px; border: 1px solid var(--border); 
            background: var(--card); margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; 
            box-shadow: 0 1px 4px rgba(14,27,51,0.02); display: flex; gap: 10px; align-items: center;
        }
        .sidebar-bus-card:hover { border-color: var(--primary-soft); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20, 40, 90, 0.08); }
        
        .bus-photo-wrap { width: 50px; height: 50px; border-radius: 8px; flex-shrink: 0; overflow: hidden; position: relative; border: 1px solid var(--border); background: #f0f0f0; }
        .bus-photo-wrap.moving { border-color: var(--primary-soft); }
        .bus-photo-wrap.idle { border-color: var(--accent); }
        .bus-photo-wrap.stopped { border-color: var(--border); }
        .bus-photo-wrap .bus-photo { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 2; }
        .bus-photo-wrap .bus-photo-fallback-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #E2E8F0 0%, #94A3B8 100%); color: #fff; z-index: 1; }
        .bus-photo-wrap.moving .bus-photo-fallback-icon { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
        
        .card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
        .card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
        .bus-name { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .plate-text { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
        
        .card-sub-row { font-size: 11px; color: var(--ink-soft); font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.2; margin-bottom: 2px; }
        .status-dot {
    white-space: nowrap !important; width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
        .status-dot.moving { background: var(--success); box-shadow: 0 0 0 2px var(--success-soft); }
        .status-dot.idle { background: var(--accent); box-shadow: 0 0 0 2px #FEF3C7; }
        .status-dot.stopped { background: #94A3B8; box-shadow: 0 0 0 2px #F1F5F9; }
        .status-dot.inactive { background: #CBD5E1; box-shadow: 0 0 0 2px #F1F5F9; }
        .dot-separator { color: var(--border); font-size: 14px; }
        
        .card-time-row { font-size: 10px; color: var(--ink-faint); font-weight: 500; }

 /* MARKERS */
        .leaflet-premium-direction-node {
            pointer-events: none !important;
        }
        .leaflet-premium-direction-node .bus-node-tag,
        .leaflet-premium-direction-node .bus-node-ring {
            pointer-events: auto !important;
        }
        .university-marker-wrapper {
            pointer-events: none !important;
        }
        .university-marker-wrapper .university-marker-node,
        .university-marker-wrapper .bus-node-tag {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
            pointer-events: auto !important;
        }
        .premium-bus-marker-node { display: flex; flex-direction: column; align-items: center; position: relative; pointer-events: none; transition: opacity 0.3s ease; }
        .bus-node-tag {
    flex-shrink: 0 !important; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; pointer-events: auto; backdrop-filter: blur(8px); text-align: center; border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s ease; color: #fff; }
        
        .premium-bus-marker-node.moving .bus-node-tag {
    flex-shrink: 0 !important;
    white-space: nowrap !important; background: rgba(36, 81, 196, 0.9); box-shadow: 0 2px 8px rgba(36, 81, 196, 0.4); }
        .premium-bus-marker-node.idle .bus-node-tag {
    flex-shrink: 0 !important;
    white-space: nowrap !important; background: rgba(245, 166, 35, 0.95); box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
        .premium-bus-marker-node.inactive .bus-node-tag {
    flex-shrink: 0 !important;
    white-space: nowrap !important; background: rgba(148, 163, 184, 0.9); box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3); }

 /* Live Header Search Results Dropdown */
        .search-dropdown-results {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: var(--card);
            border: 1.5px solid var(--border);
            border-radius: 14px;
            box-shadow: 0 12px 32px rgba(14, 27, 51, 0.15);
            max-height: 280px;
            overflow-y: auto;
            z-index: 9999;
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            backdrop-filter: blur(12px);
        }

        .search-dropdown-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
            background: var(--surface);
            border: 1px solid transparent;
        }

        .search-dropdown-item:hover {
            background: var(--primary-soft);
            border-color: rgba(36, 81, 196, 0.2);
            transform: translateX(2px);
        }

        .search-dropdown-item .bus-title {
            font-size: 13px;
            font-weight: 750;
            color: var(--ink);
        }

        .search-dropdown-item .bus-sub {
            font-size: 11px;
            color: var(--ink-soft);
            font-weight: 500;
        }

        :root.dark-theme .search-dropdown-results {
            background: #101014;
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
        }

        :root.dark-theme .search-dropdown-item {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.08);
        }

        :root.dark-theme .search-dropdown-item:hover {
            background: rgba(59, 130, 246, 0.2);
            border-color: rgba(59, 130, 246, 0.45);
        }

        .zoomed-out .bus-node-tag {
    flex-shrink: 0 !important;
    white-space: nowrap !important; opacity: 0 !important; transform: scale(0.5) translateY(10px) !important; pointer-events: none !important; }
        .zoomed-out .university-marker-wrapper { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.3s ease; }
        .premium-bus-marker-node.moving { opacity: 1; z-index: 1000 !important; }
        .premium-bus-marker-node.idle { opacity: 0.95; z-index: 500 !important; }
        .premium-bus-marker-node.inactive { opacity: 0.8; z-index: 100 !important; }
        .bus-node-ring { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; pointer-events: auto; }
        .pulse-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(0.5); transition: all 0.3s ease; }
        .moving .pulse-ring { border: 1px solid rgba(59, 130, 246, 0.6); box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); animation: busLivePulse 2s cubic-bezier(0.25, 0, 0, 1) infinite; }
        .idle .pulse-ring, .inactive .pulse-ring { display: none; }
        .pulse-ring.delay { animation-delay: 1s; }
        @keyframes busLivePulse { 0% { transform: scale(0.4); opacity: 0.9; } 50% { opacity: 0.4; } 100% { transform: scale(1.6); opacity: 0; } }
        .bus-node-rotor { position: absolute; z-index: 2; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

 /* University Marker Premium CSS */
        .university-marker-wrapper { background: transparent; border: none; }
        .university-marker-node { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 46px; height: 58px; pointer-events: auto; transition: transform 0.2s ease; }
        .university-marker-node:hover { transform: translateY(-3px) scale(1.05); }
        .university-marker-pulse { position: absolute; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: rgba(21, 48, 107, 0.25); animation: uniPulse 2.2s ease-out infinite; z-index: -1; }
        @keyframes uniPulse { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }

        .mobile-only { display: none; }

 /* ===================== MOBILE RESPONSIVE ===================== */
        @media (max-width: 768px) {
            .mobile-only { display: flex; }
            .desktop-nav { display: none; }
            .dash-content { position: absolute; top: 60px; bottom: 0; left: 0; right: 0; display: block; }
            
            .bottom-nav {
                position: fixed; bottom: env(safe-area-inset-bottom, 12px); left: 12px; right: 12px;
                height: 60px; min-height: 60px; border-radius: 20px;
                background: var(--bottom-nav-bg); 
                backdrop-filter: blur(28px) saturate(190%); -webkit-backdrop-filter: blur(28px) saturate(190%);
                border: var(--bottom-nav-border);
                box-shadow: inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -1px 2px rgba(0,0,0,0.05), 0 12px 36px rgba(20,40,90,0.20);
                margin: 0; z-index: 1200; overflow: hidden; display: flex;
            }
            .bottom-nav::before { content: ''; position: absolute; inset: 0; background: linear-gradient(165deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 45%); pointer-events: none; z-index: 0; }
            .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 10.5px; font-weight: 600; cursor: pointer; gap: 4px; position: relative; z-index: 1;}
            .nav-item.active { color: var(--theme-accent-text); font-weight: 700; }
            .nav-item.active::before { content: ''; position: absolute; inset: 4px 16px; border-radius: 14px; background: rgba(36,81,196,0.12); z-index: -1; }

            .leaflet-top.leaflet-right { top: 118px !important; right: 12px !important; }
            .leaflet-top.leaflet-right.search-active { top: 172px !important; }
            .leaflet-bottom { bottom: calc(75px + env(safe-area-inset-bottom, 12px)) !important; }

            .bus-sidebar { 
                position: fixed; top: auto !important; 
                bottom: calc(60px + env(safe-area-inset-bottom, 12px) + 6px);
                left: 10px; right: 10px; width: auto; height: auto; border-left: none; border-radius: 20px; 
                background: var(--glass-bg); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
                border: var(--bottom-nav-border);
                box-shadow: inset 0 1px 1px rgba(255,255,255,0.75), inset 0 -1px 2px rgba(0,0,0,0.04), 0 -10px 30px rgba(20,40,90,0.15); 
                z-index: 1100; overflow: hidden; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; flex-direction: column;
            }
            .bus-sidebar::before { content: ''; position: absolute; inset: 0; background: linear-gradient(170deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%); pointer-events: none; z-index: 0; }
            .bus-sidebar.expanded { box-shadow: 0 10px 40px rgba(0,0,0,0.20); }

            .drag-handle-wrap { display: flex; justify-content: center; align-items: center; padding: 8px 0 4px; cursor: pointer; position: relative; z-index: 2; }
            .drag-handle { width: 40px; height: 4px; background: var(--border); border-radius: 10px; }
            
            .sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 8px; position: relative; z-index: 2; }
            .sidebar-title { font-size: 11.5px; }

            .pull-indicator { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--theme-accent-text); background: var(--primary-soft); padding: 4px 12px; border-radius: 100px; animation: gentleBounce 2s infinite; }
            @keyframes gentleBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
            .bus-sidebar.expanded .pull-indicator { animation: none; }
            .bus-sidebar.expanded .pull-indicator svg { transform: rotate(180deg); }
            
            .bus-list-wrapper { max-height: 0px; overflow: hidden; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); position: relative; z-index: 2; display: flex; flex-direction: column; }
            .bus-sidebar.expanded .bus-list-wrapper { max-height: 55vh; padding: 0 12px 16px; }
            .bus-list-container { padding: 0; }
            .filter-tabs { margin: 0 0 8px; position: relative; z-index: 2;}
            
            .route-info-box { top: 140px; width: auto; max-width: 280px; left: 50%; transform: translateX(-50%); }
        }
        
 /* Desktop specific adjustments */
        @media (min-width: 769px) { 
            .bottom-nav { display: none !important; } 
            .bus-list-wrapper { display: contents; } 
            
 /* Move Map controls to the left */
            .leaflet-top.leaflet-right {
                right: auto !important;
                left: 16px !important;
                top: 80px !important;
            }
            .leaflet-control-zoom { margin-left: 0 !important; margin-right: 0 !important; }
            .map-toolbar { margin-left: 0 !important; margin-right: 0 !important; }
            .night-mode-banner {
                top: auto !important;
                bottom: calc(60px + env(safe-area-inset-bottom, 12px) + 68px) !important;
                left: 12px !important;
                right: 12px !important;
                transform: none !important;
                width: auto !important;
                white-space: normal !important;
                text-align: center;
                justify-content: center;
                font-size: 11px !important;
                padding: 10px 16px !important;
                border-radius: 20px !important;
            }
        }
    
        .menu-btn-top { display: none !important; }
        .drawer-backdrop {
            position: fixed; inset: 0; background: rgba(14, 27, 51, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 9998;
        }
        .drawer-backdrop.active { opacity: 1; pointer-events: auto; }
        .floating-header-menu {
            position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
            background: var(--drawer-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-left: 1px solid var(--border); box-shadow: -4px 0 24px rgba(0,0,0,0.15); 
            padding: 24px 16px 80px; z-index: 9999; display: flex; flex-direction: column; gap: 4px;
            transition: right 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overflow-y: auto;
            -ms-overflow-style: none; scrollbar-width: none;
        }
        .floating-header-menu::-webkit-scrollbar { display: none; }
        .floating-header-menu.active { right: 0 !important; }
        .floating-header-menu .menu-item {
            display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px;
            cursor: pointer; transition: all 0.2s; text-decoration: none;
            border-bottom: var(--drawer-item-border);
            margin-bottom: 4px;
        }
        .floating-header-menu .menu-item:hover {
            background: var(--surface);
        }
        .floating-header-menu .menu-icon {
            width: 36px; height: 36px; background: var(--surface); border-radius: 10px;
            display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
            transition: 0.2s; flex-shrink: 0;
        }
        .floating-header-menu .menu-item svg {
            transition: color 0.2s;
        }
        .floating-header-menu .menu-item:hover .menu-icon {
            background: var(--primary-soft); color: var(--theme-accent-text);
        }
        .floating-header-menu .menu-text {
            flex: 1; font-size: 14px; font-weight: 600; color: var(--ink);
        }
        .floating-header-menu .menu-item.active {
            background: var(--primary-soft);
            border-bottom-color: transparent;
        }
        .floating-header-menu .menu-item.active .menu-icon {
            background: var(--primary); color: white;
        }
        .floating-header-menu .menu-item.active .menu-text {
            color: var(--theme-accent-text); font-weight: 700;
        }
        
        .floating-header-menu .sub-item {
            padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
            background: transparent; border-radius: 8px;
        }
        .floating-header-menu .sub-item:hover {
            background: rgba(14, 27, 51, 0.04); color: var(--ink);
        }
        .floating-header-menu .sub-item.danger-item {
            color: var(--status-danger-text);
        }
        .floating-header-menu .sub-item.danger-item:hover {
            background: var(--danger-soft);
        }

        @media (min-width: 769px) { .bottom-nav { display: none !important; } .menu-btn-top { display: none !important; } .floating-header-menu { display: none !important; } }
        @media (max-width: 768px) { .desktop-nav { display: none !important; } .menu-btn-top { display: flex !important; } }


 /* Leaflet zoom controls styled in Apple liquid glass section below */
        .leaflet-control-attribution { display: none !important; }
        .dark-theme .map-tool-btn { border-bottom-color: var(--drawer-item-border) !important; }
        .dark-theme .map-tool-btn:hover { background: var(--primary-soft) !important; }
        .dark-theme .route-info-box { background: var(--card) !important; border-color: var(--border) !important; }
        .dark-theme .drag-handle { background: var(--border) !important; }
        .dark-theme .empty-state { color: var(--ink-faint) !important; }
        
 /* Premium Dark mode bottom nav overrides */
        .dark-theme .bottom-nav .nav-item {
            color: rgba(255, 255, 255, 0.45) !important;
        }
        .dark-theme .bottom-nav .nav-item.active {
            color: #FFFFFF !important;
        }
        .dark-theme .bottom-nav .nav-item.active::before {
            background: rgba(255, 255, 255, 0.14) !important;
        }

 /* Mobile Floating Bottom Sheet (Clean White + Blue UI v2) */
        .bus-bottom-sheet {
            position: fixed;
            bottom: calc(60px + env(safe-area-inset-bottom, 12px) + 8px);
            left: 12px;
            right: 12px;
            width: calc(100% - 24px);
            background: #FFFFFF;
            border-radius: 20px;
            box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
            z-index: 2200;
            transform: translateY(calc(100% + 100px));
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 16px;
            box-sizing: border-box;
            border: 1px solid #E2E8F0;
            font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: #0F172A;
        }
        :root.dark-theme .bus-bottom-sheet,
        html.dark-theme .bus-bottom-sheet,
        .dark-theme .bus-bottom-sheet {
            background: #101624 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
            color: #F8FAFC !important;
        }
        .bus-bottom-sheet.open {
            transform: translateY(0);
        }
        .bus-bottom-sheet .sheet-content {
            max-height: 75vh;
            overflow-y: auto;
            padding-top: 4px;
            padding-right: 4px;
        }
        .bus-bottom-sheet .sheet-header-row {
            gap: 8px;
            align-items: flex-start !important;
        }
        .bus-bottom-sheet .sheet-title-block {
            min-width: 0;
        }
        .bus-bottom-sheet .sheet-status-pill {
            flex-shrink: 0;
            margin-top: 1px;
            max-width: 94px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .bus-bottom-sheet .popup-action-btn {
            border: none;
            border-radius: 10px;
            font-family: 'Switzer', sans-serif;
            cursor: pointer;
            transition: transform 0.15s, opacity 0.15s;
        }
        .bus-bottom-sheet .popup-action-btn:active {
            transform: scale(0.97);
        }

 /* Dark mode — Board & Leave button visibility fix in bottom sheet */
        .dark-theme .bus-bottom-sheet [onclick*="togglePassengerCheckin"][onclick*="true"] {
            background: rgba(59, 130, 246, 0.25) !important;
            color: #93C5FD !important;
            border-color: rgba(59, 130, 246, 0.5) !important;
        }
        .dark-theme .bus-bottom-sheet [onclick*="togglePassengerCheckin"][onclick*="false"] {
            background: rgba(248, 113, 113, 0.2) !important;
            color: #FCA5A5 !important;
            border-color: rgba(248, 113, 113, 0.45) !important;
        }

    
        :root.dark-theme {
            --ink: #FFFFFF; --ink-soft: #A1A1AA; --ink-faint: #71717A;
            --surface: #000000; --card: #0D0D11; --border: rgba(255, 255, 255, 0.12);
            --primary: #3B82F6;
            --primary-soft: rgba(59, 130, 246, 0.18);
            --danger-soft: rgba(239, 68, 68, 0.18);
            --success-soft: rgba(16, 185, 129, 0.18);
            --accent-soft: rgba(245, 158, 11, 0.18);
            --glass-bg: rgba(0, 0, 0, 0.85); --glass-border: 1px solid rgba(255, 255, 255, 0.12);
            --drawer-bg: rgba(6, 6, 8, 0.96);
            --bottom-nav-bg: rgba(0, 0, 0, 0.65);
            --bottom-nav-border: 1px solid rgba(255, 255, 255, 0.15);
            --icon-btn-bg: rgba(255, 255, 255, 0.08);
            --drawer-item-border: 1px solid rgba(255, 255, 255, 0.08);
        }

    
        @media (max-width: 768px) {
 /* desktop-theme-btn removed */
        }

    
 /* Premium active/hover navigation button overrides for dark theme */
        .dark-theme .desktop-nav .nav-btn:hover {
            background: var(--primary-soft) !important;
            color: var(--theme-accent-text) !important;
        }
        .dark-theme .desktop-nav .nav-btn.active {
            background: var(--primary) !important;
            color: #FFFFFF !important;
            box-shadow: 0 4px 14px rgba(36, 81, 196, 0.4) !important;
            border: none !important;
        }

    


    
 /* Dark theme header glassmorphism override */
        .dark-theme .dash-header {
            background: var(--glass-bg) !important;
            border-bottom: var(--glass-border) !important;
            backdrop-filter: var(--glass-blur) !important;
            -webkit-backdrop-filter: var(--glass-blur) !important;
        }
        
    
 /* Hide bus directory drawer from homepage */
        .bus-sidebar { display: none !important; }
    
    
 /* Prevent transitions on page load */
        .preload * {
            -webkit-transition: none !important;
            -moz-transition: none !important;
            -ms-transition: none !important;
            -o-transition: none !important;
            transition: none !important;
        }

 /* Custom Premium Slider Styles for Geofence Popup */
        .premium-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--border);
            outline: none;
            cursor: pointer;
            transition: background 0.3s;
            margin: 8px 0;
        }
        
        .premium-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border: 2px solid #FFFFFF;
            box-shadow: 0 3px 8px rgba(36, 81, 196, 0.3);
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.1s ease;
        }
        .premium-slider::-webkit-slider-thumb:hover {
            transform: scale(1.15);
            box-shadow: 0 4px 12px rgba(36, 81, 196, 0.45);
        }
        .premium-slider::-webkit-slider-thumb:active {
            transform: scale(1.05);
        }
        
        .premium-slider::-moz-range-thumb {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border: 2px solid #FFFFFF;
            box-shadow: 0 3px 8px rgba(36, 81, 196, 0.3);
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.1s ease;
        }
        .premium-slider::-moz-range-thumb:hover {
            transform: scale(1.15);
            box-shadow: 0 4px 12px rgba(36, 81, 196, 0.45);
        }
        
 /* Dark theme thumb override */
        .dark-theme .premium-slider::-webkit-slider-thumb {
            border-color: var(--card);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
        }
        .dark-theme .premium-slider::-moz-range-thumb {
            border-color: var(--card);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
        }

.toast-alert {
    position: fixed !important;
    top: auto !important;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(20px) !important;
    background: #1D4ED8;
    color: #FFFFFF;
    padding: 9px 18px !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: min(88vw, 360px) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.toast-alert #toastIcon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-alert #toastIcon svg {
    width: 16px;
    height: 16px;
}

.toast-alert #toastMessage {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.35;
    font-size: inherit;
    font-weight: inherit;
}

.toast-alert.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) !important;
}

.toast-alert.success {
    background: #10B981 !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35) !important;
}

.toast-alert.error {
    background: #E11D48 !important;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35) !important;
}

.toast-alert.warning {
    background: #D97706 !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35) !important;
}

.toast-alert.info {
    background: #2563EB !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35) !important;
}




        .geofence-cursor-tooltip {
            background: rgba(14,27,51,0.9) !important;
            border: 1px solid rgba(255,255,255,0.15) !important;
            color: #fff !important;
            font-family: 'Inter', sans-serif !important;
            font-weight: 700 !important;
            font-size: 11px !important;
            border-radius: 20px !important;
            padding: 4px 10px !important;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
        }
        @media (max-width: 768px) {
            .geofence-cursor-tooltip {
                display: none !important;
            }
        }
        .geofence-label-tooltip {
            background: rgba(36, 81, 196, 0.82) !important;
            color: #fff !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 8px !important;
            font-weight: 700 !important;
            font-size: 11px !important;
            padding: 4px 8px !important;
            box-shadow: 0 4px 12px rgba(20,40,90,0.15) !important;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        .geofence-label-tooltip::before {
            border-top-color: rgba(36, 81, 196, 0.82) !important;
        }
        .zoomed-out .geofence-label-tooltip {
            display: none !important;
        }

        .geofence-radius-select {
            background: var(--surface); border: 1px solid var(--border); color: var(--ink);
            font-size: 11px; font-weight: 650; padding: 4px 8px; border-radius: 6px; outline: none; cursor: pointer;
        }

        .custom-modal-overlay {
            position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(8px);
            z-index: 99999; display: flex; align-items: center; justify-content: center;
            opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
        }
        .custom-modal-overlay.active { opacity: 1; pointer-events: auto; }
        .custom-modal-box {
            background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 20px;
            width: 90%; max-width: 350px; padding: 20px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
            transform: scale(0.95); transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: #0F172A;
        }
        :root.dark-theme .custom-modal-box,
        html.dark-theme .custom-modal-box,
        .dark-theme .custom-modal-box {
            background: #101624 !important;
            border-color: rgba(255, 255, 255, 0.12) !important;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
            color: #F8FAFC !important;
        }
        .custom-modal-overlay.active .custom-modal-box { transform: scale(1); }
        #crowdModalOverlay .custom-modal-box {
            max-width: 330px !important;
            padding: 16px !important;
            border-radius: 18px !important;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16) !important;
        }
        #crowdModalTitle {
            font-size: 15px !important;
            line-height: 1.25 !important;
        }
        #crowdModalOverlay p {
            margin-bottom: 12px !important;
            font-size: 12px !important;
            line-height: 1.35 !important;
        }
        #crowdModalOverlay .custom-modal-box > div:first-child {
            margin-bottom: 10px !important;
        }
        #crowdModalOverlay .custom-modal-box > div:last-child {
            display: grid !important;
            grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
            gap: 7px !important;
        }
        #crowdModalOverlay button[id^="opt"] {
            min-height: 38px !important;
            padding: 8px 6px !important;
            gap: 5px !important;
            border-radius: 10px !important;
            font-size: 11px !important;
            line-height: 1 !important;
            white-space: nowrap !important;
            justify-content: center !important;
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42) !important;
        }
        button[title="Report passenger load"] svg {
            width: 12px;
            height: 12px;
        }
        #crowdModalOverlay button[id^="opt"]:active {
            transform: scale(0.985);
        }


        .bulletin-badge {
            flex-shrink: 0 !important;
            white-space: nowrap !important;
            position: absolute !important;
            top: 2px !important;
            right: 2px !important;
            background: #EF4444 !important;
            color: #FFFFFF !important;
            font-size: 8px !important;
            font-weight: 800 !important;
            min-width: 14px !important;
            height: 14px !important;
            padding: 0 3px !important;
            border-radius: 10px !important;
            border: 1.5px solid #FFFFFF !important;
            box-shadow: 0 2px 5px rgba(239, 68, 68, 0.45) !important;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .bulletin-panel {
            position: absolute; top: 80px; left: 70px; z-index: 1002;
            width: 320px; max-height: 460px; border-radius: 16px;
            background: rgba(255,255,255,0.88); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
            border: 1px solid rgba(255,255,255,0.3);
            box-shadow: 0 12px 36px rgba(20,40,90,0.2);
            display: flex; flex-direction: column; overflow: hidden;
            opacity: 0; transform: translateX(-30px); pointer-events: none; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .dark-theme .bulletin-panel {
            background: rgba(16, 18, 24, 0.94); border-color: rgba(255, 255, 255, 0.14);
        }
        .bulletin-panel.active {
            opacity: 1; transform: translateX(0); pointer-events: auto;
        }
        @media (max-width: 768px) {
            .bulletin-panel {
                position: absolute; top: 120px; left: 50%; right: auto;
                width: min(330px, calc(100vw - 28px)) !important; max-height: min(65vh, 460px) !important;
                opacity: 0;
                transform: translate(-150%, 0);
                transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.3s;
                pointer-events: none;
            }
            .bulletin-panel.active {
                opacity: 1;
                transform: translate(-50%, 0);
                pointer-events: auto;
            }
        }
        .bulletin-header {
            padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
            border-bottom: 1px solid rgba(0,0,0,0.06);
        }
        .dark-theme .bulletin-header { border-bottom-color: rgba(255,255,255,0.05); }
        .bulletin-close-btn {
            background: none; border: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; padding: 0; line-height: 1;
            display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px;
            transition: background 0.15s, color 0.15s;
        }
        .bulletin-close-btn:hover { background: rgba(0,0,0,0.06); color: var(--ink); }
        .dark-theme .bulletin-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
        .bulletin-body {
            flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
        }
        .bulletin-body::-webkit-scrollbar { width: 4px; }
        .bulletin-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
        .dark-theme .bulletin-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

 /* Swipe to Delete System */
        .bulletin-item-wrapper {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            margin-bottom: 2px;
            transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                        margin 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.25s ease;
            user-select: none;
            -webkit-user-select: none;
        }
        .bulletin-item-wrapper.dismissing {
            max-height: 0 !important;
            margin-bottom: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        .swipe-delete-background {
            position: absolute;
            inset: 0;
            background: #EF4444;
            color: #FFFFFF;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding: 0 14px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 750;
            gap: 6px;
            z-index: 1;
            pointer-events: none;
        }
        .swipe-delete-background.swipe-left { justify-content: flex-end; }
        .swipe-delete-background.swipe-right { justify-content: flex-start; }

        .bulletin-item {
            padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.06);
            background: rgba(255,255,255,0.92); display: flex; flex-direction: column; gap: 4px;
        }
        .dark-theme .bulletin-item {
            background: rgba(24, 27, 34, 0.95); border-color: rgba(255,255,255,0.06);
        }
        .bulletin-item.swipeable-card {
            position: relative;
            z-index: 2;
            margin-bottom: 0;
            transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.2s, opacity 0.2s;
            will-change: transform;
            touch-action: pan-y;
            cursor: grab;
        }
        .bulletin-item.swipeable-card:active { cursor: grabbing; }
        .bulletin-item.swipeable-card.swiping { transition: none !important; }

        .bulletin-item-header {
            display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
        }
        .bulletin-item-title {
            font-size: 12px; font-weight: 800; color: var(--ink); line-height: 1.35; flex: 1;
        }
        .notification-header-actions {
            display: flex; align-items: center; gap: 5px; flex-shrink: 0;
        }
        .notification-dismiss-btn {
            background: none; border: none; padding: 2px; color: var(--ink-faint);
            display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
            border-radius: 4px; line-height: 1; transition: color 0.15s, background 0.15s;
        }
        .notification-dismiss-btn:hover {
            color: var(--status-danger-text); background: rgba(239, 68, 68, 0.12);
        }
        .bulletin-item-type {
            font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 12px; text-transform: uppercase;
        }
        .bulletin-item-type.lost { background: #FEE2E2; color: var(--status-danger-text); }
        .dark-theme .bulletin-item-type.lost { background: rgba(239,68,68,0.15); }
        .bulletin-item-type.found { background: #D1FAE5; color: var(--status-success-text); }
        .dark-theme .bulletin-item-type.found { background: rgba(16,185,129,0.15); }
        .bulletin-item-type.critical { background: #FEE2E2; color: var(--status-danger-text); }
        .bulletin-item-type.warning { background: #FEF3C7; color: var(--status-warning-text); }
        .bulletin-item-type.weather { background: #E0F2FE; color: #0284C7; }
        .bulletin-item-type.road { background: #FEF3C7; color: #B45309; }
        .bulletin-item-type.info { background: #DBEAFE; color: var(--theme-accent-text); }
        .dark-theme .bulletin-item-type.critical { background: rgba(239,68,68,0.15); }
        .dark-theme .bulletin-item-type.warning { background: rgba(217,119,6,0.16); }
        .dark-theme .bulletin-item-type.weather { background: rgba(14,165,233,0.16); }
        .dark-theme .bulletin-item-type.road { background: rgba(245,158,11,0.16); }
        .dark-theme .bulletin-item-type.info { background: rgba(36,81,196,0.18); }
        
        .bulletin-item-desc {
            font-size: 11.5px; color: var(--ink-soft); font-weight: 500;
            white-space: normal; word-break: break-word; line-height: 1.45;
            margin: 4px 0 6px 0;
        }
        .bulletin-item-meta {
            font-size: 9.5px; color: var(--ink-faint); font-weight: 600;
            display: flex; align-items: center; justify-content: space-between;
        }
        .swipe-hint {
            font-size: 9px; color: var(--ink-faint); opacity: 0.7; font-weight: 500;
        }
        .bulletin-footer {
            padding: 10px 16px; border-top: 1px solid rgba(0,0,0,0.06); text-align: center;
        }
        .dark-theme .bulletin-footer { border-top-color: rgba(255,255,255,0.05); }
        .bulletin-view-all {
            width: 100%; padding: 8px; border-radius: 8px; border: none;
            background: #2451C4; color: #FFF; font-size: 11.5px; font-weight: 750;
            cursor: pointer; transition: background 0.2s;
        }
        .bulletin-view-all:hover { background: #1a41a4; }

 /* ==========================================================================
           True Apple Liquid Glassmorphism Vertical Report Channels Popout
           Seamlessly matches .map-toolbar with crystal refraction & liquid glass
           ========================================================================== */
        .report-channels-popout {
            position: absolute !important;
            z-index: 2005 !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            width: 42px !important;
            border-radius: 21px !important;
            padding: 0 !important;
            margin: 0 !important;
            overflow: visible !important;
            background: rgba(255, 255, 255, 0.08) !important;
            backdrop-filter: url("#container-glass") blur(6px) saturate(190%) !important;
            -webkit-backdrop-filter: url("#container-glass") blur(6px) saturate(190%) !important;
            border: 1px solid rgba(255, 255, 255, 0.38) !important;
            box-shadow:
                inset 0 1px 1.5px rgba(255, 255, 255, 0.65),
                inset 0 -1px 2px rgba(0, 0, 0, 0.05),
                0 10px 28px -8px rgba(16, 32, 68, 0.22) !important;
            isolation: isolate !important;
            pointer-events: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
            transform: translateX(10px) scale(0.94) !important;
            transform-origin: right center !important;
            transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
        }

        @supports not (backdrop-filter: url("#container-glass")) {
            .report-channels-popout {
                backdrop-filter: blur(24px) saturate(190%) !important;
                -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
            }
        }

        .dark-theme .report-channels-popout,
        body.satellite-map-active .report-channels-popout {
            background: rgba(8, 12, 20, 0.48) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            box-shadow:
                inset 0 1px 1px rgba(255, 255, 255, 0.22),
                0 12px 34px rgba(0, 0, 0, 0.65) !important;
        }

        .report-channels-popout.active,
        .report-channels-popout.open {
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            transform: translateX(0) scale(1) !important;
        }

 /* Top Specular Edge Highlight Overlay */
        .report-channels-popout::before {
            content: '' !important;
            position: absolute !important;
            inset: 0 !important;
            z-index: 1 !important;
            border-radius: inherit !important;
            padding: 1.2px !important;
            background: linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.55) 0%,
                rgba(255, 255, 255, 0.18) 20%,
                rgba(255, 255, 255, 0) 45%,
                rgba(255, 255, 255, 0.12) 80%,
                rgba(255, 255, 255, 0.45) 100%
            ) !important;
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
            -webkit-mask-composite: xor !important;
            mask-composite: exclude !important;
            pointer-events: none !important;
        }

 /* Tool Buttons inside Vertical Report Channels Popout */
        .report-channel-round-btn {
            position: relative !important;
            z-index: 2 !important;
            width: 42px !important;
            height: 38px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            cursor: pointer !important;
            background: transparent !important;
            text-decoration: none !important;
            border: none !important;
            border-radius: 0 !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
            box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) !important;
            transition: background-color 160ms ease, transform 120ms ease !important;
            flex-shrink: 0 !important;
        }

        .dark-theme .report-channel-round-btn,
        body.satellite-map-active .report-channel-round-btn {
            border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
            box-shadow: none !important;
        }

        .report-channel-round-btn:first-child {
            border-top-left-radius: 20px !important;
            border-top-right-radius: 20px !important;
        }

        .report-channel-round-btn:last-child {
            border-bottom-left-radius: 20px !important;
            border-bottom-right-radius: 20px !important;
            border-bottom: none !important;
            box-shadow: none !important;
        }

        .report-channel-round-btn svg {
            width: 18px !important;
            height: 18px !important;
            transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1) !important;
            filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.4));
        }

        .dark-theme .report-channel-round-btn svg {
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
        }

        .report-channel-round-btn:hover {
            background: rgba(255, 255, 255, 0.24) !important;
        }

        .dark-theme .report-channel-round-btn:hover {
            background: rgba(255, 255, 255, 0.12) !important;
        }

        .dark-theme .report-channel-round-btn:hover {
            background: rgba(255, 255, 255, 0.14) !important;
        }

        .report-channel-round-btn:hover svg {
            transform: scale(1.15) !important;
        }

        .report-channel-round-btn:active {
            transform: scale(0.93) !important;
            background: rgba(255, 255, 255, 0.3) !important;
        }

 /* Brand Colors for Icons */
        .report-channel-round-btn.fb-group {
            color: #1877F2 !important;
        }

        .report-channel-round-btn.whatsapp-group {
            color: #25D366 !important;
        }

        .report-channel-round-btn.fb-page {
            color: var(--theme-accent-text) !important;
        }

 /* Tooltip labels to the left of the button */
        .report-channel-round-btn .channel-tooltip {
            position: absolute !important;
            right: calc(100% + 8px) !important;
            left: auto !important;
            top: 50% !important;
            bottom: auto !important;
            transform: translateY(-50%) translateX(4px) !important;
            background: rgba(15, 23, 42, 0.92) !important;
            color: #ffffff !important;
            font-size: 10px !important;
            font-weight: 700 !important;
            padding: 3px 8px !important;
            border-radius: 6px !important;
            white-space: nowrap !important;
            opacity: 0 !important;
            pointer-events: none !important;
            transition: opacity 0.15s ease, transform 0.15s ease !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
            z-index: 10 !important;
        }

        .report-channel-round-btn .channel-tooltip::after {
            content: '' !important;
            position: absolute !important;
            top: 50% !important;
            left: 100% !important;
            transform: translateY(-50%) !important;
            border-width: 4px 0 4px 4px !important;
            border-style: solid !important;
            border-color: transparent transparent transparent rgba(15, 23, 42, 0.92) !important;
        }

        .report-channel-round-btn:hover .channel-tooltip {
            opacity: 1 !important;
            transform: translateY(-50%) translateX(0) !important;
        }

 /* Right-Side Popout & Tooltips (When toolbar is on the left e.g. Desktop) */
        .report-channels-popout.popout-right-side {
            transform: translateX(-10px) scale(0.94) !important;
            transform-origin: left center !important;
        }

        .report-channels-popout.popout-right-side.active,
        .report-channels-popout.popout-right-side.open {
            transform: translateX(0) scale(1) !important;
        }

        .report-channels-popout.popout-right-side .report-channel-round-btn .channel-tooltip {
            left: calc(100% + 8px) !important;
            right: auto !important;
            transform: translateY(-50%) translateX(-4px) !important;
        }

        .report-channels-popout.popout-right-side .report-channel-round-btn .channel-tooltip::after {
            right: 100% !important;
            left: auto !important;
            border-width: 4px 4px 4px 0 !important;
            border-color: transparent rgba(15, 23, 42, 0.92) transparent transparent !important;
        }

        .report-channels-popout.popout-right-side .report-channel-round-btn:hover .channel-tooltip {
            transform: translateY(-50%) translateX(0) !important;
        }

 /* Responsive sizing on mobile */
        @media (max-width: 768px) {
            .report-channels-popout {
                width: 42px !important;
                border-radius: 21px !important;
            }
            .report-channel-round-btn {
                width: 42px !important;
                height: 38px !important;
            }
            .report-channel-round-btn svg {
                width: 17px !important;
                height: 17px !important;
            }
        }

        @media (max-width: 360px) {
            .report-channels-popout {
                width: 38px !important;
                border-radius: 19px !important;
            }
            .report-channel-round-btn {
                width: 38px !important;
                height: 35px !important;
            }
            .report-channel-round-btn:first-child {
                border-top-left-radius: 18px !important;
                border-top-right-radius: 18px !important;
            }
            .report-channel-round-btn:last-child {
                border-bottom-left-radius: 18px !important;
                border-bottom-right-radius: 18px !important;
            }
            .report-channel-round-btn svg {
                width: 16px !important;
                height: 16px !important;
            }
        }

 /* Floating Targeted Urgent Alert Card */
        .targeted-urgent-alert {
            position: absolute;
            top: 145px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2000;
            background: rgba(239, 68, 68, 0.96);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1.5px solid rgba(248, 113, 113, 0.45);
            color: white;
            padding: 14px 16px;
            border-radius: 18px;
            box-shadow: 0 10px 25px rgba(239, 68, 68, 0.35);
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 10px;
            font-size: 11px;
            font-weight: 600;
            max-width: 250px;
            width: calc(100% - 32px);
            animation: bounceInAlert 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        @keyframes bounceInAlert {
            0% { transform: translate(-50%, -40px) scale(0.9); opacity: 0; }
            100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
        }
        .targeted-urgent-alert b {
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .targeted-alert-icon-wrapper {
            background: rgba(255, 255, 255, 0.2);
            width: 38px;
            height: 38px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 2px;
            animation: pulseWarningRing 1.5s infinite;
            flex-shrink: 0;
        }
        @keyframes pulseWarningRing {
            0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
            70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
            100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
        }
        .targeted-alert-close-btn {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.25);
            color: white;
            padding: 5px 16px;
            border-radius: 30px;
            font-size: 9.5px;
            font-weight: 750;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            cursor: pointer;
            margin-top: 4px;
            transition: all 0.15s;
            outline: none;
        }
        .targeted-alert-close-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: scale(1.05);
        }

 /* Riders List Modal Layout overrides if any */
        .rider-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 12px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 12.5px;
            font-weight: 600;
        }
        .rider-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .rider-name {
            color: var(--ink);
            font-weight: 700;
        }
        .rider-dept {
            font-size: 10.5px;
            color: var(--ink-soft);
        }
        .rider-contact-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            transition: transform 0.15s;
        }
        .rider-contact-btn.whatsapp {
            background: #25D366;
            color: white;
        }
        .rider-contact-btn.copy {
}
        .rider-contact-btn:hover {
            transform: scale(1.1);
        }

        @media (max-width: 480px) {
            .dash-header { padding: 10px 12px; }
            .brand { min-width: 0; gap: 8px; }
            .brand-text { min-width: 0; }
            .brand-text .title { max-width: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .brand-text .live-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important; font-size: 10px; }
            .header-actions { gap: 8px; }
            .top-floating-bar { left: 8px; right: 8px; top: 8px; }
            .fleet-summary { gap: 5px !important; padding: 4px 5px !important; border-radius: 14px !important; }
            .fleet-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important; min-width: 0; padding: 5px 2px !important; border-radius: 9px !important; }
            .fleet-chip .num { font-size: 14px; }
            .fleet-chip .lbl { font-size: 8px; letter-spacing: 0.2px; }
            .route-info-box { top: 140px !important; width: auto; max-width: 286px; min-width: 0; gap: 8px; padding: 7px 10px !important; }
            .route-info-box > div:first-child { min-width: 0; gap: 8px !important; }
            .route-info-box > div:first-child > div:last-child { min-width: 0; }
            .route-info-box button { width: 24px !important; height: 24px !important; flex-shrink: 0; }
            .night-mode-banner { bottom: 86px; width: calc(100% - 24px); justify-content: center; padding: 10px 12px; white-space: normal; text-align: center; }
            .leaflet-top.leaflet-right { top: 114px !important; right: 10px !important; transition: top 0.3s ease; }
            .leaflet-top.leaflet-right.search-active { top: 168px !important; }
            .map-toolbar, .leaflet-control-zoom { width: 42px !important; }
            .map-tool-btn { width: 42px !important; height: 38px !important; }
            .leaflet-control-zoom a { width: 42px !important; height: 36px !important; line-height: 36px !important; }
            .bus-bottom-sheet { left: 10px; right: 10px; width: auto; bottom: calc(78px + env(safe-area-inset-bottom, 12px)); padding: 12px; border-radius: 18px; }
            .bus-bottom-sheet .sheet-content { max-height: min(62vh, 420px); padding-right: 0; }
            .bus-bottom-sheet .sheet-action-row { display: grid !important; grid-template-columns: 1fr 1fr 0.78fr; gap: 6px !important; }
            .bulletin-panel { top: 112px !important; width: min(325px, calc(100vw - 28px)) !important; max-height: min(65vh, 460px) !important; }
            .targeted-urgent-alert { top: 132px; width: calc(100% - 24px); max-width: 300px; padding: 12px; }
            .custom-modal-overlay { align-items: flex-end; padding: 12px; }
            .custom-modal-box { width: 100%; max-width: none; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 18px; padding: 18px; }
            #crowdModalOverlay.custom-modal-overlay { align-items: center !important; padding: 16px !important; }
            .toast-alert {
                font-size: 11.5px !important;
                padding: 7px 14px !important;
                border-radius: 20px !important;
                max-width: min(90vw, 310px) !important;
                bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
                line-height: 1.3 !important;
            }
            .toast-alert #toastIcon svg {
                width: 14px !important;
                height: 14px !important;
            }
            .bottom-nav { left: 10px !important; right: 10px !important; height: 62px !important; border-radius: 20px !important; }
            .nav-item { font-size: 10px !important; gap: 3px !important; }
            .nav-item.active::before { inset: 6px 8px !important; }
            .bus-bottom-sheet .popup-action-btn { width: 100% !important; min-width: 0 !important; font-size: 9.5px !important; padding: 8.5px 2px !important; white-space: nowrap !important; line-height: 1 !important; }
        }

        @media (max-width: 360px) {
            .toast-alert {
                font-size: 10.5px !important;
                padding: 6px 12px !important;
                border-radius: 18px !important;
                max-width: calc(100vw - 28px) !important;
                bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
                line-height: 1.25 !important;
            }
            .toast-alert #toastIcon svg {
                width: 13px !important;
                height: 13px !important;
            }
            .fleet-chip .num { font-size: 13px !important; }
            .fleet-chip .lbl { font-size: 7.5px !important; }
            .map-toolbar, .leaflet-control-zoom { width: 38px !important; }
            .map-tool-btn { width: 38px !important; height: 35px !important; }
            .leaflet-control-zoom a { width: 38px !important; height: 33px !important; line-height: 33px !important; }
        }

        @media (max-height: 640px) and (max-width: 768px) {
            .bus-sidebar.expanded .bus-list-wrapper,
            .bus-bottom-sheet .sheet-content {
                max-height: 48vh !important;
            }

            .bulletin-panel {
                max-height: 44vh !important;
            }
        }

 /* ==========================================================================
           True Apple Liquid Glassmorphism for Live Map Controls (.map-toolbar & .leaflet-control-zoom)
           Translucent crystal refraction, specular reflection & responsive floating cylinder
           ========================================================================== */
        .leaflet-right .leaflet-control {
            margin-right: 0 !important;
            float: none !important;
        }

        .map-toolbar,
        .leaflet-control-zoom,
        .fleet-summary {
            position: relative !important;
            overflow: hidden !important;
            background: rgba(255, 255, 255, 0.08) !important;
            backdrop-filter: url("#container-glass") blur(6px) saturate(190%) !important;
            -webkit-backdrop-filter: url("#container-glass") blur(6px) saturate(190%) !important;
            border: 1px solid rgba(255, 255, 255, 0.38) !important;
            box-shadow:
                inset 0 1px 1.5px rgba(255, 255, 255, 0.65),
                inset 0 -1px 2px rgba(0, 0, 0, 0.05),
                0 10px 28px -8px rgba(16, 32, 68, 0.22) !important;
            isolation: isolate;
        }

        .map-toolbar,
        .leaflet-control-zoom {
            width: 42px !important;
            border-radius: 21px !important;
            margin: 0 !important;
        }

        @supports not (backdrop-filter: url("#container-glass")) {
            .map-toolbar,
            .leaflet-control-zoom,
            .fleet-summary {
                backdrop-filter: blur(24px) saturate(190%) !important;
                -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
            }
        }

        .map-toolbar {
            margin-bottom: 9px !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: visible !important;
        }

 /* Top Specular Edge Highlight Overlay */
        .map-toolbar::before,
        .leaflet-control-zoom::before,
        .fleet-summary::before {
            content: '' !important;
            position: absolute !important;
            inset: 0 !important;
            z-index: 1 !important;
            border-radius: inherit !important;
            padding: 1.2px !important;
            background: linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.55) 0%,
                rgba(255, 255, 255, 0.18) 20%,
                rgba(255, 255, 255, 0) 45%,
                rgba(255, 255, 255, 0.12) 80%,
                rgba(255, 255, 255, 0.45) 100%
            ) !important;
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
            -webkit-mask-composite: xor !important;
            mask-composite: exclude !important;
            pointer-events: none !important;
        }

        .map-toolbar::after,
        .leaflet-control-zoom::after {
            content: none !important;
        }

 /* Tool Buttons inside Map Toolbar */
        .map-tool-btn {
            position: relative !important;
            z-index: 2 !important;
            width: 42px !important;
            height: 38px !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 1.5px !important;
            cursor: pointer !important;
            background: transparent !important;
            color: #1E293B !important;
            border: none !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
            transition: color 160ms ease, background-color 160ms ease, transform 120ms ease !important;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
        }

        .map-tool-btn svg {
            width: 17px !important;
            height: 17px !important;
            transition: transform 160ms ease !important;
        }

        .map-tool-btn .label {
            font-size: 7.2px !important;
            font-weight: 700 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.35px !important;
            line-height: 1 !important;
        }

        .map-tool-btn:first-child {
            border-top-left-radius: 21px !important;
            border-top-right-radius: 21px !important;
        }

        .map-tool-btn:last-child {
            border-bottom: none !important;
            border-bottom-left-radius: 21px !important;
            border-bottom-right-radius: 21px !important;
        }

        .map-tool-btn:hover {
            background: rgba(255, 255, 255, 0.24) !important;
            color: var(--theme-accent-text) !important;
        }

        .map-tool-btn.locate-btn {
            color: var(--ink-soft) !important;
        }

        .map-tool-btn.locate-btn.active-mode {
            color: #FFFFFF !important;
        }

        .map-tool-btn.report-btn {
            color: var(--status-danger-text) !important;
        }

        .map-tool-btn.active-mode {
            color: #FFFFFF !important;
            background: linear-gradient(180deg, #2563EB, #1D4ED8) !important;
            box-shadow:
                inset 0 1px 1.5px rgba(255, 255, 255, 0.45),
                0 4px 12px rgba(37, 99, 235, 0.35) !important;
            text-shadow: 0 1px 2px rgba(10, 30, 80, 0.4) !important;
        }

        .map-tool-btn:first-child.active-mode {
            border-top-left-radius: 21px !important;
            border-top-right-radius: 21px !important;
        }

        .map-tool-btn:last-child.active-mode {
            border-bottom-left-radius: 21px !important;
            border-bottom-right-radius: 21px !important;
        }

        .map-tool-btn.active-mode svg {
            color: #FFFFFF !important;
            stroke: #FFFFFF !important;
        }

        .map-tool-btn.active-mode .label {
            color: #FFFFFF !important;
            font-weight: 800 !important;
        }

        .notification-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
            position: absolute !important;
            top: 2px !important;
            right: 2px !important;
            background: #EF4444 !important;
            color: #FFFFFF !important;
            font-size: 8px !important;
            font-weight: 800 !important;
            min-width: 14px !important;
            height: 14px !important;
            padding: 0 3px !important;
            border-radius: 10px !important;
            border: 1.5px solid #FFFFFF !important;
            box-shadow: 0 2px 5px rgba(239, 68, 68, 0.45) !important;
            display: flex;
            align-items: center !important;
            justify-content: center !important;
            z-index: 10 !important;
            pointer-events: none !important;
        }

        .dark-theme .notification-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
            border-color: #0F172A !important;
        }

 /* Leaflet Control Zoom */
        .leaflet-control-zoom {
            border: 1px solid rgba(255, 255, 255, 0.38) !important;
        }

        .leaflet-control-zoom a {
            position: relative !important;
            z-index: 2 !important;
            width: 42px !important;
            box-sizing: border-box !important;
            height: 36px !important;
            line-height: 36px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            background: transparent !important;
            color: var(--theme-accent-text) !important;
            font-size: 17px !important;
            font-weight: 800 !important;
            border: none !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
            transition: color 160ms ease, background-color 160ms ease, transform 120ms ease !important;
            text-decoration: none !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        .leaflet-control-zoom a:first-child {
            border-top-left-radius: 21px !important;
            border-top-right-radius: 21px !important;
        }

        .leaflet-control-zoom a:last-child {
            border-bottom: none !important;
            border-bottom-left-radius: 21px !important;
            border-bottom-right-radius: 21px !important;
        }

        .leaflet-control-zoom a:hover {
            background: rgba(255, 255, 255, 0.24) !important;
            color: #1D4ED8 !important;
        }

        .leaflet-control-zoom a:active {
            transform: scale(0.93) !important;
            background: rgba(255, 255, 255, 0.3) !important;
        }

 /* Super AMOLED & Pitch Dark Mode */
        .dark-theme .map-toolbar,
        .dark-theme .leaflet-control-zoom,
        .dark-theme .fleet-summary,
        body.satellite-map-active .map-toolbar,
        body.satellite-map-active .leaflet-control-zoom,
        body.satellite-map-active .fleet-summary {
            background: rgba(8, 12, 20, 0.48) !important;
            border: 1px solid rgba(255, 255, 255, 0.18) !important;
            box-shadow:
                inset 0 1px 1px rgba(255, 255, 255, 0.22),
                0 12px 34px rgba(0, 0, 0, 0.65) !important;
        }

        .dark-theme .map-tool-btn,
        .dark-theme .leaflet-control-zoom a {
            color: #F8FAFC !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
        }

        .dark-theme .map-tool-btn.locate-btn {
            color: var(--ink-soft) !important;
        }

        .dark-theme .map-tool-btn.locate-btn.active-mode {
            color: #FFFFFF !important;
        }

        .dark-theme .leaflet-control-zoom a {
            color: #60A5FA !important;
        }

        .dark-theme .map-tool-btn:hover,
        .dark-theme .leaflet-control-zoom a:hover {
            background: rgba(255, 255, 255, 0.14) !important;
            color: #93C5FD !important;
        }

        .dark-theme .map-tool-btn.active-mode {
            color: #FFFFFF !important;
            background: linear-gradient(145deg, #3B82F6, #1D4ED8) !important;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.45),
                0 4px 14px rgba(59, 130, 246, 0.45) !important;
        }

        body.satellite-map-active .map-tool-btn,
        body.satellite-map-active .leaflet-control-zoom a {
            color: #FFFFFF !important;
            border-bottom-color: rgba(255, 255, 255, 0.18) !important;
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
        }

        body.satellite-map-active .map-tool-btn:hover,
        body.satellite-map-active .leaflet-control-zoom a:hover {
            background: rgba(255, 255, 255, 0.18) !important;
        }

        body.satellite-map-active .map-tool-btn.active-mode,
        body.satellite-map-active .map-tool-btn.active-mode:hover,
        body.satellite-map-active .map-tool-btn.active-mode:focus-visible {
            color: #FFFFFF !important;
            background: linear-gradient(145deg, #2563EB, #1D4ED8) !important;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.45),
                0 6px 16px rgba(37, 99, 235, 0.5) !important;
        }

        @media (max-width: 768px) {
            .bottom-nav {
                position: fixed;
                overflow: hidden;
                isolation: isolate;
                background: var(--bottom-nav-bg) !important;
                background-blend-mode: normal;
                border: var(--bottom-nav-border) !important;
                backdrop-filter: blur(28px) saturate(190%) !important;
                -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
                box-shadow:
                    inset 0 1px 1px rgba(255, 255, 255, 0.8),
                    inset 0 -1px 2px rgba(0, 0, 0, 0.05),
                    0 12px 36px rgba(20, 40, 90, 0.2) !important;
            }

            .bottom-nav::before {
                content: '';
                position: absolute;
                inset: 0;
                z-index: 0;
                border-radius: inherit;
                padding: 0;
                background: linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 45%);
                -webkit-mask: none;
                mask: none;
                pointer-events: none;
            }

            .bottom-nav .nav-item {
                color: rgba(18, 39, 70, 0.82) !important;
                text-shadow: 0 1px 3px rgba(255, 255, 255, 0.72);
            }

            .bottom-nav .nav-item.active {
                color: var(--theme-accent-text) !important;
                text-shadow: none;
            }

            .bottom-nav .nav-item.active::before {
                background: rgba(36, 81, 196, 0.14) !important;
                box-shadow: none;
            }

            .dark-theme .bottom-nav .nav-item,
            .dark-theme .bottom-nav .nav-item.active {
                color: #ffffff !important;
                text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
            }

            .dark-theme .bottom-nav .nav-item svg {
                filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.74));
            }

            .dark-theme .bottom-nav .nav-item.active::before {
                background: rgba(255, 255, 255, 0.14) !important;
            }

            body.satellite-map-active .bottom-nav {
                background: var(--bottom-nav-bg) !important;
            }

            body.satellite-map-active .bottom-nav .nav-item {
                color: #ffffff !important;
                text-shadow: 0 1px 4px rgba(0, 0, 0, 0.78);
            }

            body.satellite-map-active .bottom-nav .nav-item.active {
                color: var(--theme-accent-text) !important;
                text-shadow: none;
            }

            body.satellite-map-active .bottom-nav .nav-item svg {
                filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.72));
            }

            body.satellite-map-active .bottom-nav .nav-item.active::before {
                background: rgba(36, 81, 196, 0.14) !important;
                box-shadow: none;
            }

            body.dark-theme.satellite-map-active .bottom-nav .nav-item.active {
                color: #ffffff !important;
            }

            body.dark-theme.satellite-map-active .bottom-nav .nav-item.active::before {
                background: rgba(255, 255, 255, 0.14) !important;
            }
        }

        @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
            .map-toolbar,
            .leaflet-control-zoom {
                background: rgba(245, 248, 253, 0.94) !important;
            }

            .dark-theme .map-toolbar,
            .dark-theme .leaflet-control-zoom {
                background: #0D0D11 !important;
            }
        }

        @media (prefers-reduced-transparency: reduce) {
            .map-toolbar,
            .leaflet-control-zoom {
                background: rgba(245, 248, 253, 0.94) !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }

            .dark-theme .map-toolbar,
            .dark-theme .leaflet-control-zoom {
                background: #0D0D11 !important;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .map-tool-btn,
            .leaflet-control-zoom a {
                transition: none !important;
            }
        }

 /* ==========================================================================
           LITE MODE (High Performance / Battery Saver for Budget Devices & Slow PCs)
           ========================================================================== */
        html.lite-mode *,
        html.lite-mode *::before,
        html.lite-mode *::after {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }

        html.lite-mode .pulse-ring,
        html.lite-mode .university-marker-pulse,
        html.lite-mode .liveDotPulse {
            display: none !important;
            animation: none !important;
        }

        html.lite-mode .premium-bus-marker-node,
        html.lite-mode .university-marker-node svg {
            filter: none !important;
        }

        html.lite-mode .top-floating-bar,
        html.lite-mode.dark-theme .top-floating-bar {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }

        html.lite-mode .fleet-summary,
        html.lite-mode .top-search-wrap .search-box,
        html.lite-mode .drawer-menu,
        html.lite-mode .bus-sidebar,
        html.lite-mode .leaflet-popup-content-wrapper,
        html.lite-mode .bus-bottom-sheet,
        html.lite-mode .bulletin-panel,
        html.lite-mode .notification-panel,
        html.lite-mode .bottom-nav {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
            background: #ffffff !important;
        }

        html.lite-mode.dark-theme .fleet-summary,
        html.lite-mode.dark-theme .top-search-wrap .search-box,
        html.lite-mode.dark-theme .drawer-menu,
        html.lite-mode.dark-theme .bus-sidebar,
        html.lite-mode.dark-theme .leaflet-popup-content-wrapper,
        html.lite-mode.dark-theme .bus-bottom-sheet,
        html.lite-mode.dark-theme .bulletin-panel,
        html.lite-mode.dark-theme .notification-panel,
        html.lite-mode.dark-theme .bottom-nav {
            background: #111827 !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
        }

 /* Ensure active buttons have high-contrast solid backgrounds in Lite Mode ONLY */
        html.lite-mode .map-toolbar .map-tool-btn.active-mode {
            background: #2451C4 !important;
            color: #ffffff !important;
            box-shadow: 0 2px 8px rgba(36, 81, 196, 0.4) !important;
        }

        html.lite-mode .map-toolbar .map-tool-btn.active-mode svg {
            color: #ffffff !important;
            stroke: #ffffff !important;
        }

        html.lite-mode .map-toolbar .map-tool-btn.active-mode .label {
            color: #ffffff !important;
        }

        html.lite-mode.dark-theme .map-toolbar .map-tool-btn.active-mode {
            background: #3B82F6 !important;
            color: #ffffff !important;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4) !important;
        }

        html.lite-mode .sidebar-bus-card {
            box-shadow: none !important;
            border: 1px solid var(--border) !important;
            transition: none !important;
        }

 /* Show All Buses floating reset button */
        .show-all-buses-btn {
            display: none;
            position: absolute;
            top: 80px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1005 !important;
            background: var(--primary);
            color: #ffffff;
            padding: 9px 18px;
            border-radius: 30px;
            font-weight: 700;
            box-shadow: 0 4px 16px rgba(36, 81, 196, 0.4);
            font-size: 12.5px;
            align-items: center;
            gap: 7px;
            cursor: pointer;
            border: 1.5px solid rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
            white-space: nowrap !important;
            pointer-events: auto !important;
        }

        .show-all-buses-btn:active {
            transform: translateX(-50%) scale(0.96);
        }

        @media (max-width: 480px) {
            .show-all-buses-btn {
                font-size: 12px;
                padding: 8px 15px;
                top: 135px; /* Clear counters + install banner */
            }
        }

        @media (max-width: 360px) {
            .show-all-buses-btn {
                font-size: 11.5px;
                padding: 7px 13px;
                top: 130px;
            }
        }




/* Search stays dismissible even with an empty query. */
.search-btn-top .top-search-close-icon { display: none; }
.search-btn-top[aria-expanded="true"] .top-search-open-icon { display: none; }
.search-btn-top[aria-expanded="true"] .top-search-close-icon { display: block; }
#topSearchWrap .search-box { padding-right: 46px; }
#topSearchClearBtn { display: inline-flex; width: 32px; height: 32px; }

/* ==========================================================================
   Favourite Buses Quick Access Bar & Sidebar Integration
   ========================================================================== */
.filter-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-tabs::-webkit-scrollbar {
    display: none;
}
.filter-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.quick-fav-buses-bar {
    position: absolute;
    top: 72px;
    left: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 28px);
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    pointer-events: auto;
}
.quick-fav-buses-bar::-webkit-scrollbar {
    display: none;
}

.quick-fav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.quick-fav-pill:active {
    transform: scale(0.96);
}

.quick-fav-pill:hover {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.quick-fav-pill .star-icon {
    flex-shrink: 0;
}

.quick-fav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94A3B8;
    flex-shrink: 0;
}

.quick-fav-dot.moving {
    background: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.quick-fav-dot.stopped {
    background: #F59E0B;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.quick-fav-dot.offline {
    background: #64748B;
}

.quick-fav-status {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-soft, #64748b);
}

/* Sidebar bus card favorite toggle button */
.sidebar-bus-card .btn-favorite-bus {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ink-faint, #94a3b8);
    transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.sidebar-bus-card .btn-favorite-bus:hover {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.08);
}

.sidebar-bus-card .btn-favorite-bus:active {
    transform: scale(0.92);
}

.sidebar-bus-card .btn-favorite-bus.is-favorite {
    color: #F59E0B;
}

.sidebar-bus-card.is-favorite {
    border-left: 3px solid #F59E0B;
}

/* Dark theme overrides */
.dark-theme .quick-fav-pill {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: #F8FAFC;
}

.dark-theme .quick-fav-pill:hover {
    background: rgba(30, 41, 59, 0.95);
}

.dark-theme .quick-fav-status {
    color: #94A3B8;
}

.dark-theme .sidebar-bus-card .btn-favorite-bus {
    color: rgba(255, 255, 255, 0.45);
}

.dark-theme .sidebar-bus-card .btn-favorite-bus:hover,
.dark-theme .sidebar-bus-card .btn-favorite-bus.is-favorite {
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.15);
}

/* Mobile responsive breakpoints: Rule 1.1 / 1.2 */
@media (max-width: 480px) {
    .quick-fav-buses-bar {
        top: 66px;
        left: 8px;
        max-width: calc(100% - 16px);
        gap: 6px;
    }
    .quick-fav-pill {
        padding: 5px 10px;
        font-size: 11px;
    }
    .quick-fav-status {
        font-size: 9.5px;
    }
    .filter-btn#tabFavorites {
        font-size: 10.5px;
        padding: 6px 4px;
    }
}

@media (max-width: 360px) {
    .quick-fav-buses-bar {
        top: 62px;
        left: 6px;
        max-width: calc(100% - 12px);
        gap: 5px;
    }
    .quick-fav-pill {
        padding: 4.5px 8.5px;
        font-size: 10.5px;
    }
    .quick-fav-status {
        display: none; /* Keep pill compact on ultra-compact screens */
    }
}

/* ==========================================================================
   UI V2 THEME UNIFICATION — BATCH 3: LIVE MAP DASHBOARD
   Scoped strictly under body.ui-v2 to preserve existing behavior & other pages
   ========================================================================== */

body.ui-v2 {
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--ui-bg, #F4F7FB);
    color: var(--ui-ink, #111827);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header & Brand Identity */
body.ui-v2 .dash-header {
    background: var(--ui-surface, #FFFFFF) !important;
    border-bottom: 1px solid var(--ui-border, #E5E7EB) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.ui-v2 .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

body.ui-v2 .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #20469c;
    box-shadow: 0 2px 8px rgba(32, 70, 156, 0.25);
    flex-shrink: 0;
}

body.ui-v2 .brand-mark svg {
    display: block;
    width: 32px !important;
    height: 32px !important;
}

body.ui-v2 .brand-text .title {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
    letter-spacing: -0.3px;
}

body.ui-v2 .live-badge {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    font-family: 'Switzer', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.ui-v2 .live-badge .live-dot {
    background: #10B981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

body.ui-v2 .desktop-nav .nav-btn {
    font-family: 'Switzer', sans-serif;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--ui-ink-muted, #6B7280);
    border-radius: 100px;
    padding: 7px 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

body.ui-v2 .desktop-nav .nav-btn:hover {
    color: var(--ui-primary, #0066FF);
    background: rgba(0, 102, 255, 0.06);
}

body.ui-v2 .desktop-nav .nav-btn.active {
    background: #EEF4FF !important;
    color: var(--ui-primary, #0066FF) !important;
    font-weight: 600;
}

/* Floating Top Fleet Summary (3 Cards: Total, Moving, Stopped) */
body.ui-v2 .top-floating-bar {
    z-index: 990;
}

body.ui-v2 .top-floating-bar .fleet-summary {
    display: flex;
    gap: 8px;
}

body.ui-v2 .top-floating-bar .fleet-chip {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    padding: 6px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .top-floating-bar .fleet-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

body.ui-v2 .top-floating-bar .fleet-chip .num {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
    line-height: 1.2;
}

body.ui-v2 .top-floating-bar .fleet-chip .lbl {
    font-family: 'Switzer', sans-serif;
    font-size: 9px;
    font-weight: 700;
    color: var(--ui-ink-muted, #6B7280);
    letter-spacing: 0.5px;
}

body.ui-v2 .top-floating-bar .fleet-chip.moving,
body.ui-v2 .top-floating-bar .fleet-chip.stopped {
    background: var(--ui-surface, #FFFFFF);
    border-color: var(--ui-border, #E5E7EB);
}
body.ui-v2 .top-floating-bar .fleet-chip.moving .num,
body.ui-v2 .top-floating-bar .fleet-chip.moving .lbl {
    color: #047857;
}

body.ui-v2 .top-floating-bar .fleet-chip.stopped .num,
body.ui-v2 .top-floating-bar .fleet-chip.stopped .lbl {
    color: #B91C1C;
}

/* Floating Search Bar */
body.ui-v2 .top-search-wrap {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .top-search-wrap:focus-within {
    border-color: var(--ui-primary, #0066FF);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.14), 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .top-search-wrap .search-box {
    font-family: 'Switzer', sans-serif;
    font-size: 13.5px;
    color: var(--ui-ink, #111827);
}

body.ui-v2 .top-search-wrap .search-box::placeholder {
    color: #9CA3AF;
}

body.ui-v2 .search-dropdown-results {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.ui-v2 .search-result-item {
    font-family: 'Switzer', sans-serif;
    transition: background 0.12s ease;
}

body.ui-v2 .search-result-item:hover {
    background: #EEF4FF;
}

/* Quick Favourite Buses Bar */
body.ui-v2 .quick-fav-buses-bar {
    z-index: 980;
}

body.ui-v2 .quick-fav-pill {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-family: 'Switzer', sans-serif;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .quick-fav-pill:hover {
    transform: translateY(-1px);
    border-color: #F59E0B;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}

/* Map Action Buttons & Controls */
body.ui-v2 .show-all-buses-btn {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    font-family: 'Switzer', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ui-primary, #0066FF);
    transition: all 0.15s ease;
}

body.ui-v2 .show-all-buses-btn:hover {
    background: #EEF4FF;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.18);
}

body.ui-v2 .bulletin-panel {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

body.ui-v2 .bulletin-header {
    border-bottom: 1px solid var(--ui-border, #E5E7EB);
}

body.ui-v2 .bulletin-header h4 {
    font-family: 'Switzer', sans-serif;
}

body.ui-v2 .bulletin-view-all {
    background: var(--ui-primary, #0066FF);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-family: 'Switzer', sans-serif;
    font-weight: 600;
    transition: background 0.15s ease;
}
body.ui-v2 .bulletin-view-all:hover {
    background: #0052CC;
}

/* Bus Sidebar & Directory Cards */
body.ui-v2 .bus-sidebar {
    background: var(--ui-surface, #FFFFFF);
    border-left: 1px solid var(--ui-border, #E5E7EB);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.03);
}

body.ui-v2 .sidebar-header {
    border-bottom: 1px solid var(--ui-border, #E5E7EB);
}

body.ui-v2 .sidebar-title {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
    letter-spacing: -0.3px;
}

body.ui-v2 .filter-tabs {
    background: var(--ui-bg, #F4F7FB);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    padding: 3px;
}

body.ui-v2 .filter-btn {
    font-family: 'Switzer', sans-serif;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9px;
    color: var(--ui-ink-muted, #6B7280);
    transition: all 0.15s ease;
}

body.ui-v2 .filter-btn:hover {
    color: var(--ui-ink, #111827);
}

body.ui-v2 .filter-btn.active {
    background: var(--ui-primary, #0066FF) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(0, 102, 255, 0.22);
}

body.ui-v2 .sidebar-bus-card {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .sidebar-bus-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 102, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.08);
}

body.ui-v2 .sidebar-bus-card .bus-name {
    font-family: 'Switzer', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
    letter-spacing: -0.3px;
}

body.ui-v2 .sidebar-bus-card .status-badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Floating Bottom Dock Navigation */
body.ui-v2 .dock-island-main {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .dock-tab {
    color: #6B7280;
    transition: color 0.15s ease, background 0.15s ease;
}

body.ui-v2 .dock-tab:hover {
    color: var(--primary, #2451C4);
}

body.ui-v2 .dock-tab.active {
    background: var(--primary, #2451C4) !important;
    color: #FFFFFF !important;
    border-radius: 100px;
    box-shadow: 0 4px 14px rgba(36, 81, 196, 0.35) !important;
}

body.ui-v2 .dock-tab.active svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

body.ui-v2 .dock-island-action {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .dock-action-btn {
    color: #374151;
}

/* Dark Theme Overrides for UI v2 */
:root.dark-theme body.ui-v2,
html.dark-theme body.ui-v2,
body.ui-v2.dark-theme {
    background-color: var(--ui-bg, #0B0F19);
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .dash-header,
html.dark-theme body.ui-v2 .dash-header,
body.ui-v2.dark-theme .dash-header {
    background: var(--ui-surface, #111827) !important;
    border-bottom: 1px solid var(--ui-border, #1F2937) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

:root.dark-theme body.ui-v2 .brand-text .title,
html.dark-theme body.ui-v2 .brand-text .title,
body.ui-v2.dark-theme .brand-text .title {
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .desktop-nav .nav-btn,
html.dark-theme body.ui-v2 .desktop-nav .nav-btn,
body.ui-v2.dark-theme .desktop-nav .nav-btn {
    color: var(--ui-ink-muted, #9CA3AF);
}

:root.dark-theme body.ui-v2 .desktop-nav .nav-btn.active,
html.dark-theme body.ui-v2 .desktop-nav .nav-btn.active,
body.ui-v2.dark-theme .desktop-nav .nav-btn.active {
    background: rgba(0, 102, 255, 0.2) !important;
    color: #60A5FA !important;
}

:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip {
    background: rgba(17, 24, 39, 0.95);
    border-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip .num,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip .num,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip .num {
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.moving,
:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.stopped {
    background: rgba(17, 24, 39, 0.95);
    border-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving .num,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving .num,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.moving .num,
:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving .lbl,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.moving .lbl,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.moving .lbl {
    color: #10B981 !important;
}

:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped .num,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped .num,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.stopped .num,
:root.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped .lbl,
html.dark-theme body.ui-v2 .top-floating-bar .fleet-chip.stopped .lbl,
body.ui-v2.dark-theme .top-floating-bar .fleet-chip.stopped .lbl {
    color: #EF4444 !important;
}

:root.dark-theme body.ui-v2 .top-search-wrap,
html.dark-theme body.ui-v2 .top-search-wrap,
body.ui-v2.dark-theme .top-search-wrap {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .top-search-wrap .search-box,
html.dark-theme body.ui-v2 .top-search-wrap .search-box,
body.ui-v2.dark-theme .top-search-wrap .search-box {
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .search-dropdown-results,
html.dark-theme body.ui-v2 .search-dropdown-results,
body.ui-v2.dark-theme .search-dropdown-results {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .search-result-item:hover,
html.dark-theme body.ui-v2 .search-result-item:hover,
body.ui-v2.dark-theme .search-result-item:hover {
    background: rgba(0, 102, 255, 0.15);
}

:root.dark-theme body.ui-v2 .quick-fav-pill,
html.dark-theme body.ui-v2 .quick-fav-pill,
body.ui-v2.dark-theme .quick-fav-pill {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .show-all-buses-btn,
html.dark-theme body.ui-v2 .show-all-buses-btn,
body.ui-v2.dark-theme .show-all-buses-btn {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
    color: #60A5FA;
}

:root.dark-theme body.ui-v2 .bus-sidebar,
html.dark-theme body.ui-v2 .bus-sidebar,
body.ui-v2.dark-theme .bus-sidebar {
    background: var(--ui-surface, #111827);
    border-left-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .sidebar-header,
html.dark-theme body.ui-v2 .sidebar-header,
body.ui-v2.dark-theme .sidebar-header {
    border-bottom-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .sidebar-title,
html.dark-theme body.ui-v2 .sidebar-title,
body.ui-v2.dark-theme .sidebar-title {
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .filter-tabs,
html.dark-theme body.ui-v2 .filter-tabs,
body.ui-v2.dark-theme .filter-tabs {
    background: #1F2937;
    border-color: #374151;
}

:root.dark-theme body.ui-v2 .sidebar-bus-card,
html.dark-theme body.ui-v2 .sidebar-bus-card,
body.ui-v2.dark-theme .sidebar-bus-card {
    background: #111827;
    border-color: #1F2937;
}

:root.dark-theme body.ui-v2 .sidebar-bus-card .bus-name,
html.dark-theme body.ui-v2 .sidebar-bus-card .bus-name,
body.ui-v2.dark-theme .sidebar-bus-card .bus-name {
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .bulletin-panel,
html.dark-theme body.ui-v2 .bulletin-panel,
body.ui-v2.dark-theme .bulletin-panel {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .bulletin-header,
html.dark-theme body.ui-v2 .bulletin-header,
body.ui-v2.dark-theme .bulletin-header {
    border-bottom-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .dock-island-main,
:root.dark-theme body.ui-v2 .dock-island-action,
html.dark-theme body.ui-v2 .dock-island-main,
html.dark-theme body.ui-v2 .dock-island-action,
body.ui-v2.dark-theme .dock-island-main,
body.ui-v2.dark-theme .dock-island-action {
    background: rgba(17, 24, 39, 0.94);
    border-color: rgba(31, 41, 55, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

:root.dark-theme body.ui-v2 .dock-tab,
html.dark-theme body.ui-v2 .dock-tab,
body.ui-v2.dark-theme .dock-tab {
    color: #9CA3AF;
}

:root.dark-theme body.ui-v2 .dock-tab.active,
html.dark-theme body.ui-v2 .dock-tab.active,
body.ui-v2.dark-theme .dock-tab.active {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45) !important;
}

:root.dark-theme body.ui-v2 .dock-tab.active svg,
html.dark-theme body.ui-v2 .dock-tab.active svg,
body.ui-v2.dark-theme .dock-tab.active svg {
    stroke: #FFFFFF !important;
    color: #FFFFFF !important;
}

:root.dark-theme body.ui-v2 .dock-action-btn,
html.dark-theme body.ui-v2 .dock-action-btn,
body.ui-v2.dark-theme .dock-action-btn {
    color: #D1D5DB;
}

/* Mobile responsive breakpoints: Rule 1.1 / 1.2 */
@media (max-width: 480px) {
    body.ui-v2 .dash-header {
        padding: 8px 12px;
    }
    body.ui-v2 .sidebar-bus-card {
        padding: 12px 14px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 360px) {
    body.ui-v2 .sidebar-bus-card {
        padding: 10px 12px !important;
    }
    body.ui-v2 .sidebar-bus-card .bus-name {
        font-size: 13.5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ui-v2 .sidebar-bus-card,
    body.ui-v2 .top-floating-bar .fleet-chip,
    body.ui-v2 .show-all-buses-btn,
    body.ui-v2 .filter-btn {
        transition: none !important;
    }
}


/* Alert placement controls and the fleet counter glass surface. */
.geofence-setup-hint {
    align-self: center;
    margin: 4px 0 0;
    padding: 7px 16px;
    border-radius: 100px;
    background: #0E1B33 !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    box-shadow: 0 4px 16px rgba(14, 27, 51, .35);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    pointer-events: auto;
}
.geofence-setup-hint svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    stroke: #F59E0B;
}
.geofence-setup-editor {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1002;
    width: min(360px, calc(100% - 28px));
    padding: 14px 16px;
    border: 1px solid var(--border, #dce6f5);
    border-radius: 18px;
    background: var(--card, #fff);
    color: var(--ink, #0e1b33);
    box-shadow: 0 8px 24px rgba(14, 27, 51, .18);
}
:root.dark-theme .geofence-setup-editor,
html.dark-theme .geofence-setup-editor,
body.dark-theme .geofence-setup-editor {
    background: #1F2937 !important;
    color: #FFFFFF !important;
    border-color: #374151 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}
:root.dark-theme .geofence-setup-actions button:not(#geofenceSetupDone),
html.dark-theme .geofence-setup-actions button:not(#geofenceSetupDone),
body.dark-theme .geofence-setup-actions button:not(#geofenceSetupDone) {
    background: #374151 !important;
    color: #F3F4F6 !important;
    border-color: #4B5563 !important;
}
.geofence-setup-hint[hidden], .geofence-setup-editor[hidden] { display: none; }
.geofence-setup-radius { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; }
.geofence-setup-radius output { white-space: nowrap !important; flex-shrink: 0 !important; font-variant-numeric: tabular-nums; }
.geofence-setup-editor input[type="range"] { width: 100%; margin: 9px 0; }
.geofence-setup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.geofence-setup-actions button {
    min-height: 44px;
    border: 1px solid var(--border, #dce6f5);
    border-radius: 10px;
    background: var(--surface, #f3f6fc);
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
#geofenceSetupDone { background: #2451c4; border-color: #2451c4; color: #fff; }
.geofence-map-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(14, 27, 51, .45)); }
.geofence-map-pin.leaflet-marker-draggable { touch-action: none; cursor: grab; }
@media (max-width: 768px) {
    .geofence-setup-editor { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
    body:has(.geofence-setup-editor:not([hidden])) .ai-chat-launcher { visibility: hidden; }
}
@media (max-width: 480px) {
    .geofence-setup-hint { padding: 6px 12px; font-size: 11.5px; }
}
@media (max-width: 360px) {
    .geofence-setup-editor { padding: 10px 12px; }
}

html:not(.lite-mode) body.ui-v2 .top-floating-bar .fleet-summary {
    background: linear-gradient(155deg, rgba(255,255,255,.70), rgba(255,255,255,.22)) !important;
    backdrop-filter: blur(5px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(5px) saturate(155%) !important;
}
@supports (backdrop-filter: url("#container-glass")) {
    html:not(.lite-mode) body.ui-v2 .top-floating-bar .fleet-summary {
        backdrop-filter: url("#container-glass") blur(4px) saturate(155%) !important;
        -webkit-backdrop-filter: url("#container-glass") blur(4px) saturate(155%) !important;
    }
}
body.ui-v2 .top-floating-bar :is(.fleet-chip, .fleet-chip.moving, .fleet-chip.stopped) {
    background: linear-gradient(160deg, rgba(255,255,255,.94), rgba(255,255,255,.64));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 2px 6px rgba(14,27,51,.08);
}
html.dark-theme:not(.lite-mode) body.ui-v2 .top-floating-bar .fleet-summary,
html:not(.lite-mode) body.ui-v2.satellite-map-active .top-floating-bar .fleet-summary {
    background: linear-gradient(155deg, rgba(34,45,65,.78), rgba(8,12,20,.46)) !important;
}
html.dark-theme body.ui-v2 .top-floating-bar :is(.fleet-chip, .fleet-chip.moving, .fleet-chip.stopped) {
    background: linear-gradient(160deg, rgba(31,41,55,.96), rgba(16,24,40,.76));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 6px rgba(0,0,0,.18);
}
