@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: #F8FAFC; --card: #FFFFFF; --border: #E2E8F0;
            --success: #10B981; --success-soft: #D1FAE5;
            --danger: #EF4444; --danger-soft: #FEE2E2; --accent: #F59E0B; --accent-soft: #FEF3C7;
            --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px;
            --shadow-sm: 0 4px 12px rgba(14, 27, 51, 0.04); 
            --shadow-md: 0 12px 32px rgba(14, 27, 51, 0.08);
            --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 (For Backgrounds Only) */
            --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);
        }

        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

        html { height: 100%; height: 100dvh; overflow: hidden; }
        body { 
            font-family: var(--font-body); color: var(--ink); background: var(--surface); 
            height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; 
            -webkit-tap-highlight-color: transparent;
        }

 /* ===================== 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: 12px; }
        .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.2; }
        .brand-text .title { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }
        .brand-text .live-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important; display: flex; align-items: center; gap: 6px; font-size: 11px; 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: 16px; }
        .desktop-nav { display: flex; gap: 6px; }
        .desktop-nav .nav-btn {
            text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft);
            padding: 10px 16px; border-radius: 10px; transition: 0.2s; cursor: pointer; display: flex; align-items: center; gap: 8px;
        }
        .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: var(--icon-btn-bg); 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); }

 /* ===================== WORKSPACE ===================== */
        .dash-content { flex: 1; display: flex; position: relative; overflow: hidden; }

        .sched-control-sidebar {
            width: 340px; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border-right: var(--glass-border);
            padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; z-index: 10; flex-shrink: 0; overflow-y: auto;
        }
        
        .sidebar-section-title { 
            display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; 
            color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: -8px; 
        }
        .sidebar-section-title svg { color: var(--theme-accent-text); }

        .day-accordion-wrap { position: relative; width: 100%; z-index: 40; }
        .day-accordion-wrap.open { z-index: 50; }
        
        .day-accordion-trigger {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #FFF; padding: 14px 18px; border-radius: var(--radius-md); font-size: 14px; font-weight: 700;
            display: flex; justify-content: space-between; align-items: center; box-shadow: 0 6px 16px rgba(36, 81, 196, 0.25); cursor: pointer; transition: transform 0.2s;
        }
        .day-accordion-trigger:active { transform: scale(0.98); }
        .day-accordion-trigger::after { content: '▾'; font-size: 18px; transition: transform 0.2s ease; }
        .day-accordion-wrap.open .day-accordion-trigger::after { transform: rotate(180deg); }

        .day-accordion-list {
            display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
            background: var(--card) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(14,27,51,0.25);
            overflow: hidden; z-index: 50;
        }
        .day-accordion-wrap.open .day-accordion-list { display: block; }
        
        .day-option { padding: 14px 18px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s; }
        .day-option:last-child { border-bottom: none; }
        .day-option:hover { background: var(--surface); color: var(--theme-accent-text); }
        .day-option.active { background: var(--primary-soft); color: var(--theme-accent-text); font-weight: 700; }
        .direction-toggle { display: flex; background: var(--surface); padding: 5px; border-radius: 100px; width: 100%; border: 1px solid var(--border); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
        .dir-btn {
            flex: 1; border: none; background: transparent; padding: 12px 10px; font-family: inherit; font-size: 13px; font-weight: 600;
            color: var(--ink-soft); border-radius: 100px; text-align: center; cursor: pointer; transition: all 0.25s ease;
        }
        .dir-btn:hover:not(.active) { color: var(--theme-accent-text); }
        .dir-btn.active { 
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; 
            color: #FFFFFF !important; 
            box-shadow: 0 6px 18px rgba(36, 81, 196, 0.35) !important; 
            font-weight: 700 !important; 
        }

        .route-select-input {
            width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius-md);
            font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); outline: none; cursor: pointer; transition: 0.2s; box-shadow: var(--shadow-sm);
        }
        .route-select-input:hover, .route-select-input:focus { box-shadow: 0 0 0 4px var(--primary-soft); }

        .sched-data-feed { flex: 1; padding: 20px 24px; overflow-y: auto; background: transparent; scroll-behavior: smooth; }
        
        /* Interactive Toolbar (View Tabs & Search) - Sticky Header */
        .sched-toolbar {
            display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
            gap: 14px; max-width: 1400px; margin: 0 auto 16px auto;
            position: sticky; top: 0; z-index: 25;
            background: rgba(248, 250, 252, 0.92);
            backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
            padding: 10px 4px 12px 4px; border-bottom: 1px solid rgba(226, 232, 240, 0.7);
        }

        .sched-view-tabs {
            display: inline-flex; align-items: center; background: var(--surface); padding: 4px;
            border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); gap: 4px;
        }

        .sched-view-tab {
            display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: none;
            background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 13px;
            font-weight: 600; border-radius: 9px; cursor: pointer; transition: all 0.2s ease;
            white-space: nowrap !important; flex-shrink: 0 !important;
        }
        .sched-view-tab:hover:not(.active) { color: var(--theme-accent-text); background: rgba(36, 81, 196, 0.05); }
        .sched-view-tab.active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
            color: #FFFFFF !important;
            box-shadow: 0 4px 14px rgba(36, 81, 196, 0.3) !important;
            font-weight: 700;
        }
        .sched-view-tab.active svg {
            color: #FFFFFF !important;
            stroke: #FFFFFF !important;
        }

        .sched-tab-badge {
            display: inline-flex; align-items: center; justify-content: center; min-width: 18px;
            height: 18px; padding: 0 5px; font-size: 10.5px; font-weight: 700; border-radius: 100px;
            background: var(--primary-soft); color: var(--theme-accent-text);
            white-space: nowrap !important; flex-shrink: 0 !important;
        }
        .sched-view-tab.active .sched-tab-badge {
            background: rgba(255, 255, 255, 0.24) !important;
            color: #FFFFFF !important;
        }

        .sched-search-box {
            display: flex; align-items: center; position: relative; flex: 1; min-width: 260px; max-width: 440px;
        }
        .sched-search-icon {
            position: absolute; left: 14px; color: var(--ink-faint); display: flex; align-items: center; pointer-events: none;
        }
        .sched-search-input {
            width: 100%; padding: 10px 36px 10px 38px; border-radius: 12px; border: 1px solid var(--border);
            background: var(--card); color: var(--ink); font-family: inherit; font-size: 13.5px; font-weight: 500;
            outline: none; transition: all 0.2s ease; box-shadow: var(--shadow-sm);
        }
        .sched-search-input:focus {
            border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
        }
        .sched-search-clear {
            position: absolute; right: 10px; background: none; border: none; color: var(--ink-soft);
            width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: background 0.2s ease;
        }
        .sched-search-clear:hover { background: var(--surface); color: var(--ink); }

        #scheduleListContainer { 
            column-width: 360px; column-gap: 16px; width: 100%; max-width: 1400px; margin: 0 auto;
        }
        
        .route-group-card {
            background: var(--card); border-radius: var(--radius-md); padding: 14px 16px; border: 1px solid var(--border);
            box-shadow: var(--shadow-sm); border-left: 3.5px solid var(--primary); 
            display: flex; flex-direction: column; justify-content: space-between;
            break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px;
            transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
        }
        .route-group-card.is-bookmarked {
            border-left-color: var(--accent);
            background: linear-gradient(to right, rgba(245, 158, 11, 0.03), var(--card) 40%);
        }
        .route-group-card:hover {
            transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-soft);
        }
        
        .route-card-header {
            display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 0; padding-bottom: 0; border-bottom: none;
            cursor: pointer; user-select: none; transition: color 0.15s ease;
        }
        .route-header-main {
            display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
        }
        .route-header-actions {
            display: flex; align-items: center; gap: 8px; flex-shrink: 0;
        }
        .route-card-header:hover .route-name-text { color: var(--theme-accent-text); }
        .route-card-header:hover .accordion-arrow { color: var(--theme-accent-text); }
        .route-group-card.expanded .route-card-header {
            margin-bottom: 0; padding-bottom: 10px; border-bottom: 1px dashed var(--border);
        }

        .route-icon {
            color: var(--theme-accent-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .route-group-card.is-bookmarked .route-icon {
            color: var(--accent);
        }
        .route-name-text {
            font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--ink);
            line-height: 1.35; letter-spacing: -0.2px; transition: color 0.15s ease;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        
        .route-count-badge {
            font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
            padding: 3px 8px; border-radius: 100px; border: 1px solid var(--border);
            white-space: nowrap !important; flex-shrink: 0 !important;
        }

        .sched-bookmark-btn {
            background: transparent; border: none; color: var(--ink-faint); width: 28px; height: 28px;
            border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
            cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
        }
        .sched-bookmark-btn:hover { background: rgba(245, 158, 11, 0.12); color: var(--accent); transform: scale(1.1); }
        .sched-bookmark-btn.active { color: var(--accent); }

        .accordion-arrow {
            display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease; flex-shrink: 0;
        }
        .route-group-card.expanded .accordion-arrow { transform: rotate(180deg); color: var(--theme-accent-text); }

        /* Universal Accordion CSS Grid Animation for all devices */
        .time-tags-wrap {
            display: grid; grid-template-rows: 0fr;
            transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.3s ease;
        }
        .time-tags-wrap-inner { overflow: hidden; }
        .route-group-card.expanded .time-tags-wrap {
            grid-template-rows: 1fr;
            margin-top: 10px;
        }

        /* Compact Departure List */
        .sched-dep-list {
            display: flex; flex-direction: column; gap: 6px; width: 100%; padding-top: 2px;
        }

        .sched-dep-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface);
            border: 1px solid var(--border); transition: all 0.2s ease;
        }
        .sched-dep-row:hover {
            background: rgba(36, 81, 196, 0.04); border-color: var(--primary-soft);
        }
        .sched-dep-row.is-next-dep {
            background: #FFFBEB; border-color: #FDE68A; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
        }

        .sched-dep-time-col {
            display: flex; align-items: center; gap: 8px;
        }
        .sched-dep-time {
            font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px;
            white-space: nowrap !important; flex-shrink: 0 !important;
        }
        .sched-next-indicator {
            display: inline-flex; align-items: center; gap: 3.5px; background: var(--accent);
            color: #FFFFFF; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 100px;
            letter-spacing: 0.3px; text-transform: uppercase;
            white-space: nowrap !important; flex-shrink: 0 !important;
        }

        .sched-dep-bus-col {
            display: flex; align-items: center;
        }
        .sched-bus-pill {
            display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
            color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 100px;
            white-space: nowrap !important; flex-shrink: 0 !important;
        }
        .sched-dep-row.is-next-dep .sched-bus-pill {
            background: #FEF3C7; color: #92400E;
        }

        /* Empty State */
        .sched-empty-state {
            grid-column: 1/-1; text-align: center; padding: 36px 20px; background: var(--card);
            border-radius: var(--radius-md); border: 1px dashed var(--border); box-shadow: var(--shadow-sm);
            break-inside: avoid; display: flex; flex-direction: column; align-items: center; gap: 8px;
        }
        .sched-empty-state svg { color: var(--ink-faint); margin-bottom: 4px; }
        .sched-empty-state h3 { font-size: 14.5px; color: var(--ink); font-weight: 700; margin: 0; }
        .sched-empty-state p { font-size: 12px; color: var(--ink-soft); max-width: 380px; margin: 0; line-height: 1.5; }
        .sched-empty-cta-btn {
            display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 16px;
            background: var(--primary); color: #FFFFFF; border: none; border-radius: 10px; font-family: inherit;
            font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
        }
        .sched-empty-cta-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

        .bottom-nav { display: none; }
        @media (max-width: 768px) {
            .desktop-nav { display: none !important; }
            html, body { 
                height: 100% !important; 
                height: 100dvh !important; 
                max-height: 100dvh !important; 
                overflow: hidden !important; 
                position: fixed !important; 
                width: 100% !important; 
                margin: 0 !important; 
                padding: 0 !important; 
            }
            .dash-header { 
                flex-shrink: 0 !important; 
                position: relative !important; 
                z-index: 50 !important; 
            }
            .dash-content { 
                flex: 1 1 0% !important; 
                display: flex !important; 
                flex-direction: column !important; 
                height: auto !important; 
                overflow: hidden !important; 
                min-height: 0 !important; 
                position: relative !important; 
                padding-bottom: 0 !important; 
            }
            
            /* Liquid Glass Top Sidebar - Fixed Controls on Mobile */
            .sched-control-sidebar { 
                width: 100% !important; 
                height: auto !important; 
                position: relative !important; 
                padding: 10px 14px 8px !important; 
                border-right: none !important; 
                gap: 7px !important; 
                z-index: 40 !important; 
                flex-shrink: 0 !important; 
                overflow: visible !important;
                background: var(--card) !important; 
                backdrop-filter: blur(28px) saturate(190%) !important; 
                -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
                border-bottom: 1px solid var(--border) !important; 
                box-shadow: 0 4px 16px rgba(20,40,90,0.06) !important;
            }
            .day-accordion-trigger { padding: 9px 14px !important; font-size: 13px !important; border-radius: 12px !important; }
            .direction-toggle { padding: 3px !important; }
            .dir-btn { padding: 7px 6px !important; font-size: 12px !important; }
            .route-select-input { padding: 9px 14px !important; font-size: 13px !important; border-radius: 12px !important; }

            .sidebar-section-title { display: none !important; }
            #scheduleListContainer { column-count: 1; display: flex; flex-direction: column; gap: 10px; }
            
            .sched-data-feed { 
                flex: 1 1 0% !important; 
                min-height: 0 !important; 
                padding: 0 12px calc(80px + env(safe-area-inset-bottom, 12px)) 12px !important; 
                background: transparent !important; 
                overflow-y: scroll !important; 
                -webkit-overflow-scrolling: touch !important; 
                overscroll-behavior-y: contain !important; 
                position: relative !important; 
                z-index: 10 !important;
            }

            /* Sticky Toolbar directly inside scrollable data feed on mobile */
            .sched-toolbar {
                position: sticky !important; 
                top: 0 !important; 
                z-index: 30 !important;
                background: var(--surface) !important;
                backdrop-filter: blur(20px) !important; 
                -webkit-backdrop-filter: blur(20px) !important;
                padding: 8px 0 8px 0 !important; 
                margin: 0 0 10px 0 !important;
                border-bottom: 1px solid var(--border) !important;
                box-shadow: 0 4px 12px rgba(14, 27, 51, 0.04) !important;
            }

            /* Mobile Specific Route Card Spacing */
            .route-group-card { margin-bottom: 0; }

 /* Liquid Bottom Nav */
            .bottom-nav {
                display: flex;
                position: fixed;
                bottom: env(safe-area-inset-bottom, 12px);
                left: 12px; right: 12px;
                height: 64px; min-height: 64px;
                border-radius: 24px;
                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; padding-bottom: 0;
                z-index: 1200; overflow: hidden;
            }
            .bottom-nav::before {
                content: '';
                position: absolute; inset: 0;
                background: linear-gradient(165deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 45%);
                pointer-events: none;
            }
            .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 11px; font-weight: 600; cursor: pointer; gap: 4px; transition: color 0.15s; position: relative; z-index: 1;}
            .nav-item.active { color: var(--theme-accent-text); font-weight: 700; }
            .nav-item.active::before {
                content: '';
                position: absolute; inset: 6px 16px;
                border-radius: 16px;
                background: rgba(36,81,196,0.14);
                z-index: -1;
            }
        }
    
        :root.dark-theme {
            --ink: #FFFFFF; --ink-soft: #A1A1AA; --ink-faint: #71717A;
            --surface: #000000; --card: #0D0D11; --border: rgba(255, 255, 255, 0.12);
            --primary-soft: rgba(36, 81, 196, 0.2);
            --danger-soft: rgba(224, 72, 59, 0.15);
            --success-soft: rgba(21, 165, 103, 0.15);
            --accent-soft: rgba(245, 166, 35, 0.15);
            --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(243, 246, 252, 0.05);
        }
    
        .menu-btn-top { display: none !important; }
        .drawer-backdrop {
            position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); 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; } body { padding-bottom: 20px; } .floating-header-menu { display: none !important; } }
        @media (max-width: 768px) { .desktop-nav { display: none !important; } .menu-btn-top { display: flex !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;
        }

    
        @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;
        }

    
 /* Premium dark mode overrides for schedule page elements */
        .dark-theme .direction-toggle {
            background: #121216 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
        .dark-theme .route-select-input {
            background: var(--card) !important;
            border-color: var(--border) !important;
            color: var(--ink) !important;
        }
        .dark-theme .day-option.active {
            background: var(--primary) !important;
            color: #FFFFFF !important;
        }
        .dark-theme .time-tag:hover {
            background: rgba(245, 158, 11, 0.15) !important;
            border-color: var(--accent) !important;
        }
        .dark-theme .day-option {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        }

    


 /* Liquid Bottom Nav */
            .bottom-nav {
                display: flex;
                position: fixed;
                bottom: env(safe-area-inset-bottom, 12px);
                left: 12px; right: 12px;
                height: 64px; min-height: 64px;
                border-radius: 24px;
                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; padding-bottom: 0;
                z-index: 1200; overflow: hidden;
            }
            .bottom-nav::before {
                content: '';
                position: absolute; inset: 0;
                background: linear-gradient(165deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 45%);
                pointer-events: none;
            }
            .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 11px; font-weight: 600; cursor: pointer; gap: 4px; transition: color 0.15s; position: relative; z-index: 1;}
            .nav-item.active { color: var(--theme-accent-text); font-weight: 700; }
            .nav-item.active::before {
                content: '';
                position: absolute; inset: 6px 16px;
                border-radius: 16px;
                background: rgba(36,81,196,0.14);
                z-index: -1;
            }
        
    
        :root.dark-theme {
            --ink: #FFFFFF; --ink-soft: #A1A1AA; --ink-faint: #71717A;
            --surface: #000000; --card: #0D0D11; --border: rgba(255, 255, 255, 0.12);
            --primary-soft: rgba(36, 81, 196, 0.2);
            --danger-soft: rgba(224, 72, 59, 0.15);
            --success-soft: rgba(21, 165, 103, 0.15);
            --accent-soft: rgba(245, 166, 35, 0.15);
            --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(243, 246, 252, 0.05);
        }
    
        .menu-btn-top { display: none !important; }
        .drawer-backdrop {
            position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); 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; } body { padding-bottom: 20px; } .floating-header-menu { display: none !important; } }
        @media (max-width: 768px) { .desktop-nav { display: none !important; } .menu-btn-top { display: flex !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;
        }

    
        @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;
        }

    
 /* Premium dark mode overrides for schedule page elements */
        .dark-theme .direction-toggle {
            background: #121216 !important;
            border-color: rgba(255, 255, 255, 0.14) !important;
        }
        .dark-theme .route-select-input {
            background: var(--card) !important;
            border-color: var(--border) !important;
            color: var(--ink) !important;
        }
        .dark-theme .day-option.active {
            background: var(--primary) !important;
            color: #FFFFFF !important;
        }
        .dark-theme .day-option {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        }
        .dark-theme .sched-toolbar {
            background: rgba(14, 21, 37, 0.92) !important;
            border-bottom-color: rgba(255, 255, 255, 0.08) !important;
        }
        .dark-theme .sched-view-tabs {
            background: #131722 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
        .dark-theme .sched-view-tab.active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
            color: #FFFFFF !important;
            box-shadow: 0 4px 14px rgba(36, 81, 196, 0.35) !important;
        }
        .dark-theme .sched-view-tab.active svg {
            color: #FFFFFF !important;
            stroke: #FFFFFF !important;
        }
        .dark-theme .sched-view-tab.active .sched-tab-badge {
            background: rgba(255, 255, 255, 0.24) !important;
            color: #FFFFFF !important;
        }
        .dark-theme .sched-search-input {
            background: #131722 !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #F1F5F9 !important;
        }
        .dark-theme .sched-dep-row {
            background: rgba(255, 255, 255, 0.03) !important;
            border-color: rgba(255, 255, 255, 0.08) !important;
        }
        .dark-theme .sched-dep-row:hover {
            background: rgba(96, 165, 250, 0.08) !important;
            border-color: rgba(96, 165, 250, 0.25) !important;
        }
        .dark-theme .sched-dep-row.is-next-dep {
            background: rgba(245, 158, 11, 0.12) !important;
            border-color: rgba(245, 158, 11, 0.35) !important;
        }
        .dark-theme .route-group-card.is-bookmarked {
            background: linear-gradient(to right, rgba(245, 158, 11, 0.08), var(--card) 40%) !important;
        }
        .dark-theme .route-count-badge {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            color: #94A3B8 !important;
        }
        .dark-theme .sched-bus-pill {
            background: rgba(36, 81, 196, 0.25) !important;
            color: #93C5FD !important;
        }
        .dark-theme .sched-dep-row.is-next-dep .sched-bus-pill {
            background: rgba(245, 158, 11, 0.25) !important;
            color: #FCD34D !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;
        }

        /* Unified Mobile Responsiveness Hierarchy */
        @media (max-width: 480px) {
            .brand-text .title { max-width: 176px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
            .sched-header { padding: 12px 14px; }
            .sched-title { font-size: 15px; }
            .sched-toolbar { 
                flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 10px;
                top: 0; padding: 6px 2px 8px 2px;
            }
            .sched-view-tabs { width: 100%; display: flex; }
            .sched-view-tab { flex: 1; justify-content: center; padding: 7px 10px; font-size: 12px; }
            .sched-search-box { width: 100%; max-width: 100%; min-width: 0; }
            .sched-search-input { padding: 8px 32px 8px 34px; font-size: 12.5px; }
            .route-group-card { padding: 12px 14px !important; border-radius: 14px; }
            .route-name-text { font-size: 13.5px; overflow-wrap: anywhere; }
            .route-count-badge { font-size: 10px; padding: 2px 6px; }
            .sched-bookmark-btn { width: 26px; height: 26px; }
            .sched-dep-row { padding: 7px 9px; }
            .sched-dep-time { font-size: 12.5px; }
            .sched-bus-pill { font-size: 11px; padding: 3px 8px; }
            .sched-next-indicator { font-size: 9px; padding: 1.5px 5px; }
            .day-accordion-trigger { font-size: 12.5px; padding: 10px 14px; }
            .route-select-input { font-size: 12.5px; padding: 10px 12px; }
            .direction-toggle-btn { font-size: 11px; padding: 6px 10px; }
            .day-accordion-list { max-height: min(48vh, 280px); overflow-y: auto; }
            .bottom-nav { left: 10px; right: 10px; height: 62px; border-radius: 20px; }
            .nav-item { font-size: 10px; gap: 3px; }
            .nav-item.active::before { inset: 6px 8px; }
        }

        @media (max-width: 360px) {
            .route-group-card { padding: 10px 12px !important; }
            .route-name-text { font-size: 12.5px !important; }
            .day-accordion-trigger { font-size: 11.5px !important; }
            .route-select-input { font-size: 11.5px !important; }
            .sched-view-tab { font-size: 11px !important; padding: 6px 8px !important; }
            .sched-dep-time { font-size: 11.5px !important; }
            .sched-bus-pill { font-size: 10px !important; padding: 2px 6px !important; }
            .sched-tab-badge { font-size: 9.5px !important; padding: 0 4px !important; }
            .direction-toggle-btn { font-size: 10px !important; }
        }

        @media (max-height: 640px) and (max-width: 768px) {
            .sched-control-sidebar { padding-top: 10px; padding-bottom: 10px; }
            .day-accordion-trigger, .route-select-input { padding-top: 10px; padding-bottom: 10px; }
        }

#scheduleRetry { min-height: 44px; margin: 0 0 12px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--ink); cursor: pointer; }


        #scheduleFreshness {
            font-size: 12px;
            font-weight: 600;
            color: var(--ink-soft);
            margin: 0 0 12px;
        }
        #scheduleFreshness[hidden],
        #scheduleFreshness:empty {
            display: none !important;
        }
.sched-pending-notice { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.schedule-times-pending .sched-dep-list { min-height: 32px; }

.sched-pending-message { flex: 1; min-width: 0; text-align: center; color: var(--ink-soft); font-size: 11px; font-weight: 500; line-height: 1.4; }

/* ==========================================================================
   UI V2 THEME UNIFICATION — BATCH 2: SCHEDULE PAGE
   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;
}

/* Sidebar Controls */
body.ui-v2 .sched-control-sidebar {
    background: var(--ui-surface, #FFFFFF);
    border-right: 1px solid var(--ui-border, #E5E7EB);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.ui-v2 .sidebar-section-title {
    font-family: 'Switzer', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ui-ink-muted, #6B7280);
}

body.ui-v2 .day-accordion-trigger {
    background: var(--ui-bg, #F4F7FB);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    font-family: 'Switzer', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ui-ink, #111827);
    transition: all 0.15s ease;
}

body.ui-v2 .day-accordion-trigger:hover {
    border-color: rgba(0, 102, 255, 0.4);
    background: #FFFFFF;
}

body.ui-v2 .day-accordion-list {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.ui-v2 .day-option {
    font-family: 'Switzer', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-ink, #111827);
    transition: background 0.12s ease;
}

body.ui-v2 .day-option:hover {
    background: #EEF4FF;
    color: var(--ui-primary, #0066FF);
}

body.ui-v2 .day-option.active {
    background: #EEF4FF;
    color: var(--ui-primary, #0066FF);
    font-weight: 700;
}

/* Direction Toggle Buttons */
body.ui-v2 .direction-toggle {
    background: var(--ui-bg, #F4F7FB);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    padding: 3px;
}

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

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

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

/* Route Filter Select */
body.ui-v2 .route-select-input {
    background: var(--ui-bg, #F4F7FB);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    font-family: 'Switzer', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-ink, #111827);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .route-select-input:focus {
    border-color: var(--ui-primary, #0066FF);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

/* Schedule Data Feed & Toolbar */
body.ui-v2 .sched-data-feed {
    background: var(--ui-bg, #F4F7FB);
}

body.ui-v2 .sched-toolbar {
    background: rgba(244, 247, 251, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.ui-v2 .sched-view-tabs {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    padding: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

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

body.ui-v2 .sched-view-tab:hover {
    color: var(--ui-ink, #111827);
}

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

body.ui-v2 .sched-tab-badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 10px;
    font-weight: 700;
    border-radius: 100px;
    padding: 1px 6px;
    background: rgba(0, 0, 0, 0.08);
}

body.ui-v2 .sched-view-tab.active .sched-tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* Search Box */
body.ui-v2 .sched-search-box {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ui-v2 .sched-search-box:focus-within {
    border-color: var(--ui-primary, #0066FF);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

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

body.ui-v2 .sched-search-input::placeholder {
    color: #9CA3AF;
}

/* Route Cards & Departures */
body.ui-v2 .route-group-card {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-left: 3.5px solid var(--ui-primary, #0066FF) !important;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

body.ui-v2 .route-group-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.08);
    border-color: rgba(0, 102, 255, 0.3);
}

body.ui-v2 .route-group-card.is-bookmarked {
    border-left-color: #F59E0B !important;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.03), var(--ui-surface, #FFFFFF) 40%);
}

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

body.ui-v2 .route-count-badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    background: #F3F4F6;
    color: #4B5563;
    border: 1px solid #E5E7EB;
    border-radius: 100px;
    padding: 2px 7px;
}

body.ui-v2 .sched-bookmark-btn {
    border-radius: 8px;
    transition: all 0.15s ease;
}
body.ui-v2 .sched-bookmark-btn:hover {
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
}
body.ui-v2 .sched-bookmark-btn.active {
    color: #F59E0B;
}

/* Departures list & rows */
body.ui-v2 .sched-dep-row {
    background: #F8FAFC;
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 10px;
    transition: all 0.15s ease;
}

body.ui-v2 .sched-dep-row:hover {
    background: #EEF4FF;
    border-color: rgba(0, 102, 255, 0.25);
}

body.ui-v2 .sched-dep-row.is-next-dep {
    background: #FFFBEB !important;
    border-color: #FDE68A !important;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.12);
}

body.ui-v2 .sched-dep-time {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
    letter-spacing: -0.2px;
}

body.ui-v2 .sched-next-indicator {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    background: #F59E0B;
    color: #FFFFFF;
    font-family: 'Switzer', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    border-radius: 100px;
    padding: 1.5px 6px;
    letter-spacing: 0.3px;
}

body.ui-v2 .sched-bus-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-family: 'Switzer', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ui-primary, #0066FF);
    background: #EEF4FF;
    padding: 3px 8px;
    border-radius: 100px;
}

body.ui-v2 .sched-dep-row.is-next-dep .sched-bus-pill {
    background: #FEF3C7;
    color: #92400E;
}

/* Empty States, Error Cards & Retry */
body.ui-v2 .sched-empty-state {
    background: var(--ui-surface, #FFFFFF);
    border: 1px dashed var(--ui-border, #E5E7EB);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.ui-v2 .sched-empty-state h3 {
    font-family: 'Switzer', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ui-ink, #111827);
}

body.ui-v2 .sched-empty-state p {
    font-family: 'Switzer', sans-serif;
    font-size: 13px;
    color: var(--ui-ink-muted, #6B7280);
}

body.ui-v2 .sched-empty-cta-btn {
    background: var(--ui-primary, #0066FF);
    color: #FFFFFF;
    font-family: 'Switzer', sans-serif;
    font-weight: 600;
    font-size: 13px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 102, 255, 0.22);
    transition: background 0.15s ease, transform 0.15s ease;
}

body.ui-v2 .sched-empty-cta-btn:hover {
    background: #0052CC;
    transform: translateY(-1px);
}

body.ui-v2 #scheduleRetry {
    background: var(--ui-surface, #FFFFFF);
    border: 1px solid var(--ui-border, #E5E7EB);
    border-radius: 10px;
    font-family: 'Switzer', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-primary, #0066FF);
    transition: background 0.15s ease;
}
body.ui-v2 #scheduleRetry:hover {
    background: #EEF4FF;
}

/* 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 .sched-control-sidebar,
html.dark-theme body.ui-v2 .sched-control-sidebar,
body.ui-v2.dark-theme .sched-control-sidebar {
    background: var(--ui-surface, #111827);
    border-right-color: var(--ui-border, #1F2937);
}

:root.dark-theme body.ui-v2 .day-accordion-trigger,
html.dark-theme body.ui-v2 .day-accordion-trigger,
body.ui-v2.dark-theme .day-accordion-trigger {
    background: #1F2937;
    border-color: #374151;
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .day-accordion-list,
html.dark-theme body.ui-v2 .day-accordion-list,
body.ui-v2.dark-theme .day-accordion-list {
    background: #111827;
    border-color: #1F2937;
}

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

:root.dark-theme body.ui-v2 .day-option:hover,
html.dark-theme body.ui-v2 .day-option:hover,
body.ui-v2.dark-theme .day-option:hover {
    background: rgba(0, 102, 255, 0.15);
    color: #60A5FA;
}

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

:root.dark-theme body.ui-v2 .route-select-input,
html.dark-theme body.ui-v2 .route-select-input,
body.ui-v2.dark-theme .route-select-input {
    background: #1F2937;
    border-color: #374151;
    color: var(--ui-ink, #F9FAFB);
}

:root.dark-theme body.ui-v2 .sched-data-feed,
html.dark-theme body.ui-v2 .sched-data-feed,
body.ui-v2.dark-theme .sched-data-feed {
    background: var(--ui-bg, #0B0F19);
}

:root.dark-theme body.ui-v2 .sched-toolbar,
html.dark-theme body.ui-v2 .sched-toolbar,
body.ui-v2.dark-theme .sched-toolbar {
    background: rgba(11, 15, 25, 0.94);
}

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

:root.dark-theme body.ui-v2 .sched-search-box,
html.dark-theme body.ui-v2 .sched-search-box,
body.ui-v2.dark-theme .sched-search-box {
    background: #111827;
    border-color: #1F2937;
}

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

:root.dark-theme body.ui-v2 .route-group-card,
html.dark-theme body.ui-v2 .route-group-card,
body.ui-v2.dark-theme .route-group-card {
    background: var(--ui-surface, #111827);
    border-color: var(--ui-border, #1F2937);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

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

:root.dark-theme body.ui-v2 .route-count-badge,
html.dark-theme body.ui-v2 .route-count-badge,
body.ui-v2.dark-theme .route-count-badge {
    background: #1F2937;
    border-color: #374151;
    color: #9CA3AF;
}

:root.dark-theme body.ui-v2 .sched-dep-row,
html.dark-theme body.ui-v2 .sched-dep-row,
body.ui-v2.dark-theme .sched-dep-row {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

:root.dark-theme body.ui-v2 .sched-dep-row:hover,
html.dark-theme body.ui-v2 .sched-dep-row:hover,
body.ui-v2.dark-theme .sched-dep-row:hover {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.25);
}

:root.dark-theme body.ui-v2 .sched-dep-row.is-next-dep,
html.dark-theme body.ui-v2 .sched-dep-row.is-next-dep,
body.ui-v2.dark-theme .sched-dep-row.is-next-dep {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}

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

:root.dark-theme body.ui-v2 .sched-bus-pill,
html.dark-theme body.ui-v2 .sched-bus-pill,
body.ui-v2.dark-theme .sched-bus-pill {
    background: rgba(36, 81, 196, 0.25);
    color: #93C5FD;
}

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

:root.dark-theme body.ui-v2 .sched-empty-state h3,
html.dark-theme body.ui-v2 .sched-empty-state h3,
body.ui-v2.dark-theme .sched-empty-state h3 {
    color: var(--ui-ink, #F9FAFB);
}

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

: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 .route-group-card {
        padding: 12px 14px !important;
        border-radius: 14px !important;
    }
    body.ui-v2 .sched-dep-row {
        padding: 7px 9px;
    }
}

@media (max-width: 360px) {
    body.ui-v2 .route-group-card {
        padding: 10px 12px !important;
    }
    body.ui-v2 .route-name-text {
        font-size: 12.5px !important;
    }
    body.ui-v2 .sched-dep-time {
        font-size: 11.5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ui-v2 .route-group-card,
    body.ui-v2 .sched-dep-row,
    body.ui-v2 .dir-btn,
    body.ui-v2 .sched-view-tab {
        transition: none !important;
    }
}
