@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #27A170;
    --primary-dark: #1e7d58;
    --secondary: #AEEBBF;
    --dark: #0B2538;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-400: #94A3B8;
    --gray-600: #475569;
    --text-main: #1E293B;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
}

/* Base Viewport (Full Screen for Mobile) */
#app-viewport {
    width: 100%;
    height: 100vh;
    background: var(--white);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Desktop Web Layout */
@media (min-width: 900px) {
    body {
        background-color: var(--light-bg);
    }
    #app-viewport {
        width: 100vw;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: var(--light-bg);
    }
    .screen {
        overflow-y: auto;
        padding-bottom: 30px;
    }
    /* Move Bottom Nav to Top Nav */
    /* Desktop-Specific Layout Fixes (v10 Refinement) */
    /* Desktop-Specific Layout Fixes (v11 Refinement) */
    .bottom-nav {
        /* Remove top-sticky override for v11 */
        position: fixed !important;
        bottom: 0;
        top: auto !important;
        width: 100%;
        height: 60px !important;
        background: var(--dark) !important;
        padding: 0 50px;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
        display: flex !important;
        justify-content: center !important;
        gap: 30px;
    }

    .bottom-nav .nav-btn {
        flex-direction: row !important;
        gap: 12px;
        opacity: 0.7;
        padding: 8px 20px;
        border-radius: 12px;
        transition: var(--transition);
        background: rgba(255,255,255,0.05);
    }

    .bottom-nav .nav-btn:hover, .bottom-nav .nav-btn.active {
        opacity: 1;
        background: rgba(255,255,255,0.12);
    }

    .bottom-nav .nav-btn i { font-size: 18px !important; }
    .bottom-nav .nav-btn span {
        margin-top: 0 !important;
        font-size: 14px !important;
        font-weight: 700 !important;
    }
    
    /* Gentle Scaling for Desktop (Preserving Original Structure & Theme) */
    .services-grid {
        display: flex;
        justify-content: space-evenly;
        max-width: 800px;
        margin: 20px auto;
    }
    
    .popular-list, #user-history-list, #search-results-list, #bus-results-tbody {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
        padding: 20px;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .worker-card {
        margin-bottom: 0;
    }

    #map-container {
        height: 400px; /* Give more map height on desktop */
    }
}


#app-viewport::-webkit-scrollbar { display: none; }

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Force fill */
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
    background: var(--light-bg);
    overflow-y: auto;
    padding-bottom: 80px; /* Leave space for bottom nav on mobile */
}

.screen.active { display: flex; }

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

/* Splash Screen */
#splash-screen {
    background-color: var(--dark);
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    z-index: 100;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}
.splash-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.splash-logo { width: 140px; margin-bottom: 15px; }
.splash-title { font-size: 38px; font-weight: 800; color: var(--white); }
.splash-tagline {
    border: 2px solid var(--primary);
    background: transparent;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Splash Screen V9 (Image 2 Match) --- */
.logo-stack-v9 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.splash-icon-v9 {
    font-size: 80px;
    color: var(--primary); /* Green phone icon */
    transform: rotate(-15deg);
    margin-bottom: 10px;
}

.splash-title-v9 {
    font-size: 60px;
    font-weight: 900;
    color: white;
    letter-spacing: -2px;
    margin: 0;
}

.splash-pill-v9 {
    background: var(--primary); /* Deep Green */
    color: white;
    font-weight: 700;
    font-size: 20px;
    padding: 15px 40px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(39, 161, 112, 0.4);
}

/* --- Final Login Screen V8 (Grey Swoosh Match) --- */
.login-header-v8 {
    position: relative;
    height: 380px; 
    background: #F0F4F7; /* Light grey/blue background */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 80px;
}

.logo-stack-v8 {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    animation: logoFlowIn 0.8s ease-out forwards;
}

.logo-icon-v8 {
    font-size: 55px;
    color: var(--primary); /* Green phone icon */
    transform: rotate(-15deg); /* Slight tilt like the image */
    margin-bottom: 5px;
}

.logo-text-v8 {
    font-size: 42px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -1.5px;
    margin: 0;
}

.branding-swoosh-v8 {
    position: absolute;
    bottom: -5px; /* Ensures it connects cleanly with the white card */
    left: 0;
    width: 100%;
    line-height: 0; /* Removing descender space */
}

.branding-swoosh-v8 svg {
    display: block;
    width: 110%; /* Extra width for animation clearance */
    height: 120px;
    margin-left: -5%; /* Center the over-sized SVG */
}

/* Background Wave Animation - "Live Wave" Version */
.wave-v1 { animation: liveWaveHorizontal 5s ease-in-out infinite alternate, liveWaveVertical 3s ease-in-out infinite alternate; opacity: 0.8; }
.wave-v2 { animation: liveWaveHorizontal 8s ease-in-out infinite alternate-reverse, liveWaveVertical 4s ease-in-out infinite alternate; opacity: 0.6; }
.wave-v3 { animation: liveWaveHorizontal 11s ease-in-out infinite alternate, liveWaveVertical 5s ease-in-out infinite alternate-reverse; opacity: 0.4; }
.wave-v4 { animation: liveWaveHorizontal 15s ease-in-out infinite alternate-reverse, liveWaveVertical 6s ease-in-out infinite alternate; opacity: 0.9; }

@keyframes logoFlowIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes liveWaveHorizontal {
    from { transform: translateX(-40px); }
    to { transform: translateX(40px); }
}

@keyframes liveWaveVertical {
    from { transform: translateY(-5px) scaleY(1); }
    to { transform: translateY(5px) scaleY(1.02); }
}

.login-main-card-v8 {
    margin-top: -15px; /* Pull it up to overlap the green sweep */
    background: white;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 30px;
    text-align: center;
    position: relative;
    z-index: 20;
    flex: 1;
}

.login-footer-v8 {
    margin-top: 40px;
    font-size: 13px;
    color: #94A3B8;
    text-align: center;
    opacity: 0.8;
    font-weight: 500;
}

.login-title-v5 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 30px;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropdown Menu Refinement */
.user-menu-container { 
    position: relative; 
    margin-left: auto; /* Push to the right */
    z-index: 400;
}

.user-dropdown-v9 {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: 12px;
    width: 200px; /* Slightly wider */
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    border: 1px solid #E2E8F0;
    overflow: hidden;
    z-index: 500; /* Ensure on top */
    animation: fadeIn 0.2s ease-out;
}

.dropdown-header {
    background: #F8FAFC;
    padding: 15px;
    font-size: 14px;
    font-weight: 800;
    color: var(--dark);
    border-bottom: 1px solid #E2E8F0;
}

.dropdown-item {
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.dropdown-item:hover { background: #F1F5F9; }
.dropdown-item.logout { color: #DC2626; }
.dropdown-item.logout:hover { background: #FEF2F2; }

.green-loc-bar-v5 {
    background: var(--primary); /* Matching image green */
    border-radius: 15px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.green-loc-bar-v5 i {
    font-size: 16px;
}

.green-loc-bar-v5 span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.edit-icon-v5 {
    font-size: 14px;
    opacity: 0.8;
}

.dashboard-search-v5 {
    margin-top: -20px;
    padding: 0 20px;
}

.search-pill-v5 {
    background: white;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.search-pill-v5 i {
    color: var(--gray-400);
    font-size: 14px;
}

.search-pill-v5 input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.login-wave-header {
    height: 350px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-section {
    position: relative;
    z-index: 5;
    text-align: center;
    margin-top: -80px;
}

.login-title {
    color: var(--white);
    font-size: 32px;
    font-weight: 800;
    margin-top: 10px;
}

.login-logo-section .logo-small {
    width: 90px;
    background: white;
    padding: 15px;
    border-radius: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
}

.login-main-card {
    background: var(--white);
    margin-top: -60px;
    border-radius: 35px 35px 0 0;
    padding: 40px 30px 30px;
    position: relative;
    z-index: 10;
    flex-grow: 1;
    box-shadow: 0 -15px 30px rgba(0,0,0,0.05);
}
.login-tabs { display: flex; background: var(--gray-100); padding: 5px; border-radius: 12px; margin-bottom: 25px; }

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    color: var(--gray-600);
}

.login-tab.active { background: var(--white); color: var(--primary); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group-row { display: flex; gap: 10px; margin-bottom: 5px; }
.form-group label { display: block; font-size: 12px; color: var(--gray-600); margin-bottom: 5px; font-weight: 600; }

.input-container {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: 12px;
    padding: 0 15px;
    border: 2px solid transparent;
}

.input-container:focus-within { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 4px rgba(39, 161, 112, 0.1); }

.input-container i:first-child { color: var(--gray-400); width: 20px; text-align: center; }
.input-container.focus .input-container i:first-child { color: var(--primary); }

input { width: 100%; border: none; background: transparent; padding: 12px 10px; font-size: 14px; outline: none; color: var(--text-main); font-weight: 500; }

.simple-input {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 12px 15px;
    width: 100%;
    font-size: 14px;
    border: 1px solid var(--gray-200);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 161, 112, 0.3);
}

/* Dashboard New Header */
.dashboard-header-new {
    background: var(--dark);
    padding: 30px 20px 40px;
    color: white;
    border-radius: 0 0 35px 35px;
}

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

.logo-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-xs { width: 32px; filter: brightness(0) invert(1); }

/* --- Partner Portal Styling [NEW] --- */
.partner-type-btn {
    background: transparent;
    color: var(--gray-400);
    transition: 0.3s;
}

.partner-type-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.route-stop-item {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    animation: slideInLeft 0.3s ease-out;
}

.route-stop-item input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.route-stop-item .stop-time { width: 90px; }
.remove-stop-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 38px;
    border-radius: 8px;
    cursor: pointer;
}

/* --- Emerald Green Dashboard V9 (Definitive Overlap Fix) --- */
.dashboard-header-v9 {
    background: #043933; /* Darker Emerald Forest Green */
    padding: 10px 15px 25px;
    color: white;
}

.top-nav-v9 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    z-index: 2000; /* Ensure header nav is above the tools container */
}

.logo-stack-v9-centered {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-stack-v9-centered i { color: #2ecc71; font-size: 14px; }
.logo-stack-v9-centered h1 { font-size: 16px; font-weight: 800; color: white; margin: 0; }

.user-profile-v9 {
    position: relative;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-v9:hover { opacity: 0.8; }

.user-dropdown-v9 {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 170px;
    background: #0b2538; /* Deep Dark Navy-Green */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    display: none; /* Controlled via JS */
    flex-direction: column;
    overflow: hidden;
    z-index: 3000;
    animation: slideDownFade 0.3s ease-out;
}

.user-dropdown-v9.active { display: flex; }

.dropdown-header {
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    color: #2ecc71; /* Vibrant Green Logo Match */
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dropdown-item {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    transition: 0.3s;
}

.dropdown-item:hover { background: rgba(255,255,255,0.05); color: #2ecc71; }

.dropdown-item.logout { color: #ff6b6b; border-top: 1px solid rgba(255,255,255,0.08); }
.dropdown-item.logout:hover { background: rgba(255, 107, 107, 0.1); color: #ff5252; }

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#dashboard-tools-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important; /* Proper space requested */
    padding-top: 5px;
}

#dashboard-tools-container > * {
    margin: 0 !important; /* Absolute suppression of rogue margins */
    position: relative !important;
    top: 0 !important;
}

.header-content-v9 h2 {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.green-loc-bar-v5 {
    background: var(--primary); /* #27A170 */
    border-radius: 8px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    cursor: pointer;
}

.search-pill-v5 {
    background: white;
    border-radius: 8px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-pill-v5 i { color: var(--gray-400); font-size: 11px; }
.chevron-icon { font-size: 10px !important; }

.search-pill-v5 input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    color: var(--dark);
    padding: 2px 0;
}

/* Dashboard Header V3 (Legacy/Fallback) */
.dashboard-header-v3 {
    background: var(--dark);
    padding: 20px 20px 30px;
    color: white;
}


.services-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 10px 20px;
}

.service-card {
    background: var(--white);
    border-radius: 25px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }

.service-img {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.service-img img { width: 35px; height: 35px; }
.service-card span { font-weight: 700; color: var(--text-main); font-size: 14px; }

.section-title { padding: 10px 20px 0; display: flex; justify-content: space-between; }
.section-title h3 { font-size: 16px; font-weight: 700; color: var(--dark); }

.popular-list { padding: 10px 20px; }
.worker-card {
    background: var(--white);
    border-radius: 18px;
    padding: 15px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    position: relative;
    border: 1px solid var(--gray-200);
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 14px;
}

.worker-avatar { width: 50px; height: 50px; border-radius: 14px; margin-right: 15px; display: flex; justify-content: center; align-items: center; }
.worker-details { flex: 1; }
.worker-details h4 { font-size: 15px; font-weight: 700; }
.worker-details p { font-size: 11px; color: var(--gray-400); }
.worker-details .capacity { display: inline-block; padding: 2px 8px; background: var(--gray-100); border-radius: 4px; font-weight: 700; margin-top: 4px; }

.real-time-clock {
    font-weight: 800;
    color: var(--primary);
    background: var(--gray-100);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Booking Screen V2 */
.booking-header-v2 {
    background: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
}

.booking-header-v2 h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    flex: 1;
    text-align: center;
}

.booking-header-v2 .nav-back {
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    width: 40px;
}

.real-time-clock-v2 {
    font-weight: 700;
    color: var(--primary);
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    min-width: 85px;
    text-align: center;
}

.booking-filters-card, .bus-search-card {
    background: var(--white);
    margin: 20px;
    padding: 20px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-100);
}

.filter-group { margin-bottom: 15px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select, .filter-group input {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
}

.btn-search-v2 {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(39, 161, 112, 0.2);
}

/* Worker Card Refinement */
.worker-card {
    background: var(--white);
    border-radius: 25px;
    padding: 20px;
    margin: 0 20px 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02);
    border: 1px solid var(--gray-100);
    display: block;
}

.worker-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.worker-avatar {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(--gray-100);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--primary);
}

.worker-info { flex: 1; }
.worker-info h3 { font-size: 16px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.worker-info p { font-size: 12px; color: var(--gray-400); font-weight: 600; }

.worker-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px dashed var(--gray-200);
}

.meta-item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text-main); }
.meta-item i { color: var(--primary); width: 16px; }

.worker-actions-v2 {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.btn-action-v2 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    color: white;
}

.btn-call-v2 { background: var(--primary); box-shadow: 0 4px 10px rgba(39,161,112,0.2); }
.btn-whatsapp-v2 { background: #25D366; box-shadow: 0 4px 10px rgba(37,211,102,0.2); }

.upcoming-alert-container-v2 {
    padding: 0 20px;
    margin-top: 10px;
}
.upcoming-alert-container {
    position: sticky;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 900;
    padding: 0 20px;
    pointer-events: none;
}

.upcoming-alert {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 10px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border-left: 5px solid #22c55e;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Map */
#map-container { background: #eee; border-bottom: 2px solid var(--gray-200); }

/* Bottom Nav (Mobile Default, overridden by Desktop Top Nav) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--dark);
    display: flex;
    justify-content: space-around;
    align-items: center;
    color: white;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
}

.nav-btn { display: flex; flex-direction: column; align-items: center; opacity: 0.5; cursor: pointer; transition: 0.3s; }
.nav-btn.active { opacity: 1; }
.nav-btn i { font-size: 20px; }
.nav-btn span { font-size: 10px; margin-top: 4px; font-weight: 600; }

/* Toast */
.toast-container { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; z-index: 2000; pointer-events: none; transition: var(--transition); }
.toast { background: rgba(11, 37, 56, 0.95); backdrop-filter: blur(8px); color: white; padding: 12px 20px; border-radius: 12px; text-align: left; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); animation: slideUp 0.4s ease-out, fadeOut 0.4s ease-in 2.5s forwards; display: flex; align-items: center; justify-content: flex-start; gap: 12px; border-left: 4px solid var(--primary); font-weight: 500; }

/* --- Bus Timetable UI --- */
.bus-search-bar {
    background: white; border-radius: 12px; padding: 15px; display: flex; gap: 15px; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.bus-input-group { flex: 1; }
.bus-input-group label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; font-weight: 700; margin-bottom: 5px; display: block; }
.bus-input-group input { width: calc(100% - 20px); padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 14px; }
.btn-bus-search {
    background: #5b4cf5; color: white; border: none; border-radius: 8px; padding: 10px 20px; font-weight: 600; cursor: pointer; height: 42px; display: flex; align-items: center; gap: 8px; margin-top: 15px;
}
.btn-bus-search:hover { background: #4a3cda; }

/* --- Bus Card Improvements --- */
.bus-card { align-items: flex-start; padding-top: 20px; }
.bus-route-btn {
    background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px 15px; font-size: 13px; cursor: pointer; font-weight: 600; width: auto; transition: 0.3s; margin-top: 5px;
}
.bus-route-btn:hover { background: var(--gray-200); color: var(--dark); }

.bus-subroutes {
    display: none; width: 100%; animation: slideDown 0.3s ease-out; overflow: hidden; background: #fff;
}
.bus-subroutes.expanded { display: block; margin-bottom: 5px; }

.bus-stop-row {
    display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px dashed var(--gray-100); font-size: 13px; align-items: center; font-weight: 500;
}
.bus-stop-row:last-child { border-bottom: none; }
.bus-stop-row span.time { background: #e0e7ff; color: #5b4cf5; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }

@keyframes slideDown { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@media (max-width: 700px) {
    .bus-search-bar { flex-direction: column; align-items: stretch; }
    .btn-bus-search { margin-top: 0; justify-content: center; }
    .bus-list-header { display: none; }
    .bus-main-info { display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 15px; }
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px) translateX(-50%); } }
