/* --- CSS VARIABLES FOR OPUS POPUP --- */
        :root {
            --glass-bg:        rgba(12, 18, 38, 0.72);
            --glass-border:    rgba(100, 160, 255, 0.18);
            --glass-shadow:    0 32px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(100,160,255,0.08);
            --accent:          #4f9eff;
            --accent-glow:     rgba(79, 158, 255, 0.35);
            --accent-dim:      rgba(79, 158, 255, 0.15);
            --text-primary:    rgba(230, 240, 255, 0.95);
            --text-secondary:  rgba(160, 185, 220, 0.75);
            --pulse-ring:      rgba(79, 158, 255, 0.22);
            --radar-track:     rgba(79, 158, 255, 0.12);
            --dismiss-bg:      rgba(79, 158, 255, 0.12);
            --dismiss-hover:   rgba(79, 158, 255, 0.22);
            --dismiss-border:  rgba(79, 158, 255, 0.35);
        }

        * { box-sizing: border-box; }
        body { margin: 0; padding: 0; font-family: 'Outfit', sans-serif; background: #f0f2f5; overflow: hidden; transition: background 0.3s; }
        
        #map { position: absolute; top: 0; left: 0; height: 100vh; width: 100%; z-index: 1; }

        .dashboard {
            position: absolute; top: 15px; right: 15px;
            background: #ffffff; padding: 12px 18px;
            border-radius: 20px; box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            z-index: 1000; display: flex; flex-direction: column; align-items: center;
            transition: background 0.3s, color 0.3s;
        }
        .header-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
        .live-badge { width: 10px; height: 10px; background: #ef4444; border-radius: 50%; animation: pulse-red 2s infinite; }
        @keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
        h2 { margin: 0; color: #0f172a; font-size: 16px; font-weight: 800; transition: color 0.3s; }
        
        #status-text { font-size: 12px; font-weight: 700; background: #f1f5f9; padding: 5px 12px; border-radius: 12px; transition: background 0.3s, color 0.3s; white-space: nowrap; text-align: center; }
        
        .loc-btn { margin-top: 8px; width: 100%; padding: 8px; background: #2563eb; color: white; border: none; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.3s; }

        .menu-btn { position: absolute; top: 15px; left: 15px; background: white; border: none; padding: 12px 15px; border-radius: 15px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); font-size: 20px; cursor: pointer; z-index: 1001; transition: background 0.3s, color 0.3s; }
        .tools-btn { position: absolute; top: 75px; left: 15px; background: linear-gradient(135deg, #ffffff, #f3e8ff); border: 1px solid #e9d5ff; padding: 10px; border-radius: 15px; box-shadow: 0 8px 25px rgba(168,85,247,0.25); font-size: 22px; cursor: pointer; z-index: 1001; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; }
        .tools-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 30px rgba(168,85,247,0.4); }
        .tools-btn:active { transform: translateY(0) scale(0.95); }
        .new-badge { position: absolute; top: -5px; right: -8px; background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 12px; border: 2px solid #ffffff; animation: tool-bounce 2s infinite; letter-spacing: 0.5px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
        @keyframes tool-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
        
        /* SIDEBAR */
        .sidebar { position: fixed; top: 0; left: -340px; width: 320px; height: 100%; background: white; z-index: 9999; transition: left 0.3s ease, background 0.3s; box-shadow: 5px 0 25px rgba(0,0,0,0.1); padding: 20px; overflow-y: auto; }
        .sidebar.open { left: 0; }
        .sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; transition: border-color 0.3s; }
        .sidebar-header h2 { transition: color 0.3s; margin: 0; font-size: 20px; }
        .header-actions { display: flex; gap: 8px; align-items: center; }
        
        /* THEME SLIDER TOGGLES */
        .switches-container { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
        .switch-row { display: flex; align-items: center; gap: 6px; }
        .switch-label { font-size: 10px; font-weight: 900; letter-spacing: 0.5px; }
        .theme-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
        .theme-switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; font-size: 11px; }
        .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
        
        #dark-mode-toggle:checked + .slider { background-color: #3b82f6; }
        #dark-mode-toggle:checked + .slider:before { transform: translateX(22px); }
        
        .icon-sun, .icon-moon { z-index: 1; display: flex; align-items: center; justify-content: center; width: 12px; }

        .close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #64748b; padding: 0; transition: color 0.3s; line-height: 1; margin-left: 8px; }
        
        #search-box { width: 100%; padding: 10px 15px; border-radius: 10px; border: 1px solid #cbd5e1; background: #f8fafc; font-family: 'Outfit'; font-weight: 600; margin-bottom: 15px; outline: none; transition: border-color 0.2s; }
        #search-box:focus { border-color: #3b82f6; }

        .bus-list-item { padding: 12px; margin-bottom: 8px; background: #f8fafc; border-radius: 10px; cursor: pointer; transition: background 0.2s, color 0.3s; display: flex; align-items: center; justify-content: space-between; }
        .bus-list-item:hover { background: #e2e8f0; }
        .bus-name { font-weight: 600; color: #334155; font-size: 14px; transition: color 0.3s; }
        .right-group { display: flex; align-items: center; gap: 8px; }
        .status-dot { width: 8px; height: 8px; background: #ccc; border-radius: 50%; transition: 0.3s; }
        .status-dot.active { box-shadow: 0 0 5px #22c55e; }
        
        #night-notice-sidebar { display: none; background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 600; margin-bottom: 15px; text-align: center; }
        .floating-notice { display: none; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(254, 226, 226, 0.95); border: 2px solid #ef4444; color: #991b1b; padding: 12px 20px; border-radius: 50px; font-weight: 700; font-size: 13px; box-shadow: 0 5px 15px rgba(0,0,0,0.15); z-index: 2000; text-align: center; white-space: nowrap; animation: pop-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes pop-up { from { transform: translateX(-50%) scale(0.8); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

        /* --- NEW MAINTENANCE BANNER --- */
        #maintenance-notice {
            display: none;
            position: absolute;
            top: 135px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 251, 235, 0.95);
            border: 2px solid #f59e0b;
            color: #92400e;
            padding: 12px 18px;
            border-radius: 16px;
            width: 90%;
            max-width: 360px;
            box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25);
            z-index: 1000;
            text-align: center;
            font-family: 'Outfit', sans-serif;
            animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        #maintenance-notice .icon { font-size: 24px; margin-bottom: 4px; }
        #maintenance-notice .title { font-weight: 800; font-size: 15px; margin-bottom: 4px; color: #b45309; }
        #maintenance-notice .text { font-size: 12px; font-weight: 600; line-height: 1.4; }
        
        @keyframes slideDown { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

        /* POPUPS */
        .leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: background 0.3s; }
        .leaflet-popup-content { margin: 0; width: 270px !important; }
        .popup-header { color: white; padding: 12px 35px 12px 15px; font-weight: 800; font-size: 15px; line-height: 1.4; word-wrap: break-word; }
        .popup-body { padding: 15px; background: white; font-family: 'Outfit', sans-serif; transition: background 0.3s; }
        .info-row { display: flex; align-items: center; margin-bottom: 8px; font-size: 13px; color: #334155; transition: color 0.3s; }
        .info-icon { width: 22px; text-align: center; margin-right: 8px; font-size: 14px; }
        .status-badge { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
        .track-link { display: block; margin-top: 12px; text-align: center; background: #e2e8f0; color: #0f172a; padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 12px; transition: background 0.2s, color 0.3s; }
        
        .report-actions { display: flex; gap: 8px; margin-top: 10px; }
        .report-btn { flex: 1; background: #ef4444; color: white; border: none; padding: 10px 5px; border-radius: 10px; font-weight: 800; font-size: 12px; font-family: 'Outfit'; cursor: pointer; box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2); transition: 0.2s; white-space: nowrap; }
        .report-btn:active { transform: scale(0.96); }
        .unreport-btn { background: #64748b; box-shadow: 0 4px 6px rgba(100, 116, 139, 0.2); }
        
        .leaflet-container a.leaflet-popup-close-button { color: #ffffff !important; background: rgba(0, 0, 0, 0.4) !important; border-radius: 50%; width: 26px !important; height: 26px !important; line-height: 26px !important; text-align: center; top: 10px !important; right: 10px !important; padding: 0 !important; font-size: 16px !important; font-weight: bold; text-decoration: none; transition: background 0.2s; }
        .leaflet-container a.leaflet-popup-close-button:hover { background: rgba(0, 0, 0, 0.7) !important; color: white !important; }
        
        /* PERFECT CENTERED FLEXBOX ALIGNMENT FOR MAP ICON */
        .bus-icon-wrapper { position: relative; width: 40px; height: 60px; } 
        .bus-rotate-wrapper { position: absolute; top: 0; left: 0; width: 40px; height: 60px; display: flex; align-items: center; justify-content: center; transition: transform 0.5s linear; will-change: transform; transform: translateZ(0); }
        .bus-img-top { width: 34px; height: 60px; } /* Removed drop-shadow for performance */
        
        .map-bus-label { 
            position: absolute; top: 0; left: 0; width: 40px; height: 60px; display: flex; align-items: center; justify-content: center; 
            color: #ffffff; font-size: 12px; font-family: 'Outfit', sans-serif; font-weight: 900; z-index: 10; white-space: nowrap; 
            padding-right: 2px; padding-bottom: 2px; 
            text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 2px 4px rgba(0,0,0,0.8);
            pointer-events: none; 
        }
        
        .capacity-map-badge { position: absolute; top: -10px; right: -14px; background: #ef4444; color: white; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 900; box-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 12; border: 2px solid white; animation: pop 0.3s ease; white-space: nowrap; will-change: transform; transform: translateZ(0); }
        .capacity-map-badge.maybe { background: #f97316; }

        /* ABOUT SECTION */
        .about-toggle-btn { margin-top: 15px; background: #f8fafc; color: #334155; font-weight: 600; font-size: 14px; border: 1px solid #e2e8f0; }
        .about-content { display: none; margin-top: 10px; padding: 15px; background: #f1f5f9; border-radius: 8px; font-size: 13px; color: #475569; line-height: 1.6; transition: background 0.3s; }
        .about-title { font-weight: 700; color: #0f172a; margin-bottom: 8px; font-size: 15px; transition: color 0.3s; }
        .about-limit { margin-top: 12px; font-weight: 800; color: #0f172a; font-size: 14px; transition: color 0.3s; }
        .about-credits { margin-top: 15px; font-size: 12px; color: #64748b; font-weight: 500; border-top: 1px solid #cbd5e1; padding-top: 10px; }
        .new-feature-list { list-style: none; padding: 0; margin: 5px 0; }
        .new-feature-list li { padding-left: 20px; position: relative; margin-bottom: 6px; font-size: 12px; line-height: 1.4; transition: color 0.3s; }
        .new-feature-list li:before { content: '✨'; position: absolute; left: 0; top: 0; }

        .whats-new-toggle { margin-top: 15px; background: #e0e7ff; color: #3730a3; padding: 10px 12px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
        .whats-new-toggle:hover { background: #c7d2fe; }
        #whats-new-content { display: none; padding: 10px 5px 0 5px; }

        /* LIVE USER BLUE DOT CSS */
        .user-loc-dot { width: 16px; height: 16px; background-color: #3b82f6; border: 3px solid white; border-radius: 50%; box-shadow: 0 0 10px rgba(59, 130, 246, 0.8); position: relative; z-index: 2; }
        .user-loc-dot::after { content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; background: rgba(59, 130, 246, 0.4); border-radius: 50%; animation: pulse-blue 2s infinite; }
        @keyframes pulse-blue { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2.5); opacity: 0; } }

        /* ─── OPUS SERVER WAKEUP OVERLAY CSS ─────────────────────────────────────────── */
        #server-wakeup-overlay {
            position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px;
            background: rgba(4, 8, 20, 0.65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: overlayFadeIn 0.6s ease forwards;
        }
        #server-wakeup-overlay.hidden { animation: overlayFadeOut 0.5s ease forwards; pointer-events: none; }
        @keyframes overlayFadeIn  { from { opacity: 0; } to { opacity: 1; } }
        @keyframes overlayFadeOut { from { opacity: 1; } to { opacity: 0; } }

        .wakeup-card {
            position: relative; width: 100%; max-width: 400px; background: var(--glass-bg); border: 1px solid var(--glass-border);
            border-radius: 28px; box-shadow: var(--glass-shadow); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
            padding: 36px 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 0; overflow: hidden;
            animation: cardSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        @keyframes cardSlideUp {
            from { opacity: 0; transform: translateY(28px) scale(0.96); }
            to   { opacity: 1; transform: translateY(0)    scale(1);    }
        }
        .wakeup-card::before {
            content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(100,175,255,0.55), transparent); border-radius: 50%;
        }

        .radar-wrap { position: relative; width: 120px; height: 120px; margin-bottom: 28px; flex-shrink: 0; }
        .radar-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--pulse-ring); animation: radarExpand 2.6s ease-out infinite; transform-origin: center; }
        .radar-ring:nth-child(1) { animation-delay: 0s; } .radar-ring:nth-child(2) { animation-delay: 0.7s; } .radar-ring:nth-child(3) { animation-delay: 1.4s; }
        @keyframes radarExpand { 0%   { transform: scale(0.5); opacity: 0.7; } 70%  { opacity: 0.15; } 100% { transform: scale(2.2); opacity: 0; } }
        .radar-track { position: absolute; inset: 8px; border-radius: 50%; border: 1.5px solid var(--radar-track); }
        .radar-spinner { position: absolute; inset: 8px; border-radius: 50%; border: 2.5px solid transparent; border-top-color: var(--accent); border-right-color: rgba(79,158,255,0.4); animation: spin 1.4s cubic-bezier(0.55, 0, 0.45, 1) infinite; filter: drop-shadow(0 0 6px var(--accent-glow)); }
        @keyframes spin { to { transform: rotate(360deg); } }
        .radar-orb { position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle at 38% 38%, rgba(100, 180, 255, 0.3) 0%, rgba(40, 100, 220, 0.2) 45%, rgba(10, 30, 80, 0.15) 100%); border: 1px solid rgba(100,180,255,0.2); display: flex; align-items: center; justify-content: center; animation: orbBreath 3s ease-in-out infinite; }
        @keyframes orbBreath { 0%, 100% { transform: scale(1); box-shadow: 0 0 16px var(--accent-glow); } 50% { transform: scale(1.08); box-shadow: 0 0 28px var(--accent-glow); } }
        
        .countdown-number { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 600; color: var(--accent); line-height: 1; letter-spacing: -0.5px; text-shadow: 0 0 12px var(--accent-glow); transition: opacity 0.2s ease; }
        .wakeup-title { font-family: 'Tiro Bangla', serif; font-size: 18px; font-weight: 400; color: var(--text-primary); text-align: center; line-height: 1.55; margin-bottom: 14px; }
        .wakeup-body { font-family: 'Tiro Bangla', serif; font-size: 13.5px; font-weight: 400; color: var(--text-secondary); text-align: center; line-height: 1.75; margin-bottom: 26px; padding: 0 4px; }
        .progress-track { width: 100%; height: 3px; background: var(--radar-track); border-radius: 99px; margin-bottom: 22px; overflow: hidden; }
        .progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(79,158,255,0.5), var(--accent)); box-shadow: 0 0 8px var(--accent-glow); width: 100%; transition: width 1s linear; transform-origin: left; }
        .status-line { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 22px; display: flex; align-items: center; gap: 7px; opacity: 0.7; }
        .status-dot-pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: dotBlink 1.8s ease-in-out infinite; }
        @keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
        .dismiss-btn { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; color: rgba(130, 185, 255, 0.85); background: var(--dismiss-bg); border: 1px solid var(--dismiss-border); border-radius: 12px; padding: 10px 28px; cursor: pointer; transition: background 0.22s ease, color 0.22s ease, transform 0.15s ease, box-shadow 0.22s ease; outline: none; }
        .dismiss-btn:hover { background: var(--dismiss-hover); color: rgba(190, 220, 255, 0.95); box-shadow: 0 0 18px var(--accent-dim); transform: translateY(-1px); }
        .dismiss-btn:active { transform: translateY(0) scale(0.97); }

        /* --- STYLISH MAP CONTROLS & ROUTING --- */
        .map-controls-right {
            position: absolute;
            bottom: 30px; /* Moved to bottom as requested */
            right: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 1000;
        }

        .map-action-btn {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            will-change: transform, opacity;
            transform: translateZ(0);
            border: 1px solid rgba(0, 0, 0, 0.15);
            border-radius: 12px;
            width: 44px; /* Reduced size */
            height: 44px; /* Reduced size */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0,0,0,0.18);
            cursor: pointer;
            color: #334155;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            transition: all 0.2s ease;
        }
        .map-action-btn:hover { transform: scale(1.05); }
        .map-action-btn:active { transform: scale(0.95); }

        .map-action-btn.traffic-active { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; box-shadow: 0 4px 15px rgba(22, 101, 52, 0.15); }
        .map-action-btn.satellite-active { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; box-shadow: 0 4px 15px rgba(55, 48, 163, 0.15); }
        
        .custom-zoom-control {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            will-change: transform, opacity;
            transform: translateZ(0);
            border: 1px solid rgba(0, 0, 0, 0.15);
            border-radius: 12px; /* Smoother curve */
            width: 44px; /* Matches buttons */
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 15px rgba(0,0,0,0.18);
            overflow: hidden;
        }
        .custom-zoom-control button {
            background: transparent;
            border: none;
            width: 44px;
            height: 40px;
            font-size: 20px;
            font-weight: 400;
            color: #334155;
            cursor: pointer;
            transition: 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .custom-zoom-control button:active { background: #f1f5f9; }
        .zoom-divider { height: 1px; background: #e2e8f0; width: 30px; margin: 0 auto; }

        .route-info-box {
            position: absolute; 
            top: 85px; /* Pushed down to prevent overlapping dashboard/menu */
            left: 50%; transform: translateX(-50%);
            background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
            padding: 8px 12px; border-radius: 12px; border: 1px solid #cbd5e1;
            box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 2000;
            display: flex; align-items: center; gap: 12px; min-width: 220px;
            font-family: 'Outfit', sans-serif;
        }
        .route-line { stroke-linecap: round; stroke-linejoin: round; }

        /* --- DARK MODE CSS OVERRIDES --- */
        body.dark-mode { background: #0f172a; }
        body.dark-mode .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%); }
        body.dark-mode .dashboard, body.dark-mode .sidebar, body.dark-mode .menu-btn { background: #1e293b; color: #f8fafc; }
        body.dark-mode .tools-btn { background: linear-gradient(135deg, #1e293b, #3b2856); border-color: #581c87; box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
        body.dark-mode .new-badge { border-color: #1e293b; }
        body.dark-mode .dashboard h2, body.dark-mode .sidebar-header h2, body.dark-mode .bus-name { color: #f8fafc; }
        body.dark-mode #status-text { background: #334155; color: #cbd5e1 !important; }
        body.dark-mode .bus-list-item { background: #334155; color: #cbd5e1; }
        body.dark-mode .bus-list-item:hover { background: #475569; }
        body.dark-mode .sidebar-header { border-color: #334155; }
        body.dark-mode .close-btn { color: #f8fafc; }
        body.dark-mode .slider { background-color: #0f172a; border: 1px solid #334155; }
        body.dark-mode #search-box { background: #0f172a; border-color: #334155; color: white; }
        body.dark-mode .about-toggle-btn { background: #1e293b; color: #f8fafc; border-color: #334155; }
        body.dark-mode .about-content { background: #1e293b; color: #cbd5e1; }
        body.dark-mode .about-title { color: #f8fafc; }
        body.dark-mode .about-limit { color: #f8fafc; } 
        body.dark-mode .new-feature-list li { color: #cbd5e1; }
        body.dark-mode .leaflet-popup-content-wrapper { background: #1e293b; }
        body.dark-mode .popup-body { background: #1e293b; color: #cbd5e1; }
        body.dark-mode .info-row { color: #cbd5e1; }
        body.dark-mode .track-link { background: #334155; color: #f8fafc; }
        body.dark-mode .whats-new-toggle { background: #1e3a8a; color: #bfdbfe; }
        body.dark-mode .whats-new-toggle:hover { background: #233876; }
        body.dark-mode #maintenance-notice { background: rgba(69, 26, 3, 0.95); border-color: #b45309; color: #fde68a; }
        body.dark-mode #maintenance-notice .title { color: #fcd34d; }
        body.dark-mode #maintenance-notice a { color: #fcd34d !important; }
        body.dark-mode .map-action-btn, 
        body.dark-mode .custom-zoom-control { background: #1e293b; color: #f8fafc; border: 1px solid #334155; }
        body.dark-mode .custom-zoom-control button { color: #f8fafc; }
        body.dark-mode .zoom-divider { background: #334155; }
        body.dark-mode .route-info-box { background: #1e293b; border-color: #334155; color: #f8fafc; }
        
        /* Premium Compact Popup overrides */
        .leaflet-popup-content-wrapper { padding: 0 !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; }
        .leaflet-popup-content { margin: 0 !important; width: 240px !important; }
        body.dark-mode .leaflet-popup-content-wrapper { background: #1e293b !important; }
        body.dark-mode .custom-popup .info-grid { background: #334155 !important; border-color: #475569 !important; }
        body.dark-mode .custom-popup .info-grid b { color: #f8fafc !important; }
        body.dark-mode .custom-popup .address-text { color: #cbd5e1 !important; }

        /* --- GOOGLE MAPS EMBED MODAL --- */
        #embed-modal-overlay { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn 0.3s ease forwards; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        .embed-modal { width: 90%; max-width: 500px; height: 75vh; max-height: 600px; background: #ffffff; border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; transform: translateY(20px); animation: slideUpModal 0.3s ease forwards; }
        @keyframes slideUpModal { to { transform: translateY(0); } }
        .embed-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
        .embed-modal-title { font-size: 16px; font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 8px; }
        .embed-close-btn { background: #fee2e2; border: none; color: #ef4444; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
        .embed-close-btn:hover { background: #fecaca; transform: scale(1.1); }
        .embed-iframe-container { flex: 1; width: 100%; height: 100%; background: #e2e8f0; position: relative; }
        .embed-iframe-container iframe { width: 100%; height: 100%; border: none; position: relative; z-index: 1; }
        .embed-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #64748b; z-index: 0; }
        
        body.dark-mode .embed-modal { background: #1e293b; }
        body.dark-mode .embed-modal-header { background: #0f172a; border-color: #334155; }
        body.dark-mode .embed-modal-title { color: #f8fafc; }
        body.dark-mode .embed-iframe-container { background: #334155; }