:root {
    /* Default Light Mode palette */
    --color-bg: #F7F9FA;
    --color-surface: rgba(255, 255, 255, 0.8);
    --color-surface-border: rgba(0, 0, 0, 0.05);
    --color-text-main: #0B0D10;
    --color-text-muted: #64748B;
    --color-accent: #00AEEF;
    /* compatibility alias for earlier rules */
    --color-highlight: var(--color-accent);
    --color-slate-gray: #94A3B8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

/* 12-column CSS Grid layout for app-container */
#app-container {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    padding: 24px;
    box-sizing: border-box;
}

/* Bento Dashboard Layout */
.bento-dashboard {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    width: 100%;
}

.bento-dashboard .hero-section {
    grid-column: span 8;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bento-dashboard .sub-section {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Responsive Grid for Tablets/Phones */
@media (max-width: 1024px) {
    .bento-dashboard .hero-section {
        grid-column: span 12;
    }
    .bento-dashboard .sub-section {
        grid-column: span 12;
    }
}

/* Glassmorphic Bento Cards */
.bento-card {
    /* Flush instrument-cluster glass: faint blur, razor-thin border */
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px; /* increased internal padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    color: var(--color-text-main);
}

/* Modal & Overlay — use same visual language as bento cards */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.modal-hidden { display: none !important; }

.modal-card {
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px;
    width: 380px;
    max-width: 94%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(6px);
    opacity: 0;
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    color: var(--color-text-main);
}

/* Dark theme overrides: apply to body.dark-theme */
body.dark-theme {
    --color-bg: #0B0D10;
    --color-surface: rgba(255, 255, 255, 0.02);
    --color-surface-border: rgba(255, 255, 255, 0.04);
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    --color-accent: #00AEEF;
    --color-highlight: var(--color-accent);
}

.modal-card.show {
    transform: translateY(0);
    opacity: 1;
}

/* Utility buttons */
.btn {
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--color-surface-border);
    color: var(--color-text-main);
    cursor: pointer;
    min-height: 40px;
}
.btn-primary {
    /* Sharp, high-contrast control */
    background: var(--color-highlight);
    color: var(--color-bg);
    border-color: rgba(226,232,240,0.06);
    box-shadow: none;
}
.btn-ghost {
    background: transparent;
    border-color: var(--color-surface-border);
}

/* Navbar layout extracted to CSS so templates are clean */
.meenda-navbar {
    --gap:12px;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    padding:12px 18px;
    position:fixed;
    top:0; left:0; right:0;
    z-index:100000;
    background: var(--color-surface);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--color-text-main);
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.meenda-navbar .nav-left { display:flex; gap:12px; align-items:center; }
.meenda-navbar .nav-center { justify-self:center; font-weight:800; font-size:1.1rem; }
.meenda-navbar .nav-right { display:flex; justify-content:flex-end; }
.btn-pill { padding:8px 10px; border-radius:8px; background: var(--color-surface); border:1px solid var(--color-surface-border); color:var(--color-text-main); transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }

/* navbar links */
.meenda-navbar a { color: var(--color-text-main); text-decoration: none; font-weight:600; }
.meenda-navbar a:hover { opacity: 0.9; }

/* Coach search small helpers */
.coach-search-card { align-items: flex-start; gap: 16px; width: 100%; }
.coach-popular-route { display:flex; justify-content:space-between; width:100%; padding:8px 0; border-bottom: 1px dashed rgba(255,255,255,0.02); }
.coach-popular-route:last-child { border-bottom: none; }
.coach-search-btn, .coach-book-btn { margin-top:12px; width:100%; padding:10px 12px; border-radius:12px; border:1px solid rgba(255,255,255,0.06); background: rgba(0,174,239,0.06); color:var(--color-text-main); cursor:pointer; }
.coach-book-btn { background: linear-gradient(90deg, rgba(0,174,239,0.12), rgba(0,174,239,0.08)); }
.coach-input { width:100%; padding:8px 10px; border-radius:10px; background: transparent; border: 1px solid var(--color-surface-border); color: var(--color-text-main); }
.coach-input-wrapper { width:100%; }
.coach-input-divider { padding: 0 12px; display:flex; align-items:center; color:var(--color-text-muted); }
.coach-search-header { display:flex; gap:12px; align-items:center; }
.coach-search-title { font-size:1.1rem; margin:0; }
.coach-search-icon { font-size:1.6rem; }
.coach-error { margin-top:8px; color:#F56565; }
.map-pulse-inner { font-size: 0.8rem; }

/* Premium Glassmorphic Inputs */
.console-input {
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0 20px;
    font-size: 17px;
    font-weight: 500;
    color: #ffffff;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

.console-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.console-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Primary Action Button */
.hig-primary-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 24px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.hig-primary-btn:active {
    transform: scale(0.96);
    opacity: 0.8;
}

/* Address suggestions dropdown — high z-index, glassmorphic overlay */
#address-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(28, 30, 35, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    padding: 8px 0;
    box-sizing: border-box;
}

/* Custom Scrollbar for the drop-down */
#address-suggestions::-webkit-scrollbar {
    width: 6px;
}
#address-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.suggestion-item {
    padding: 12px 20px;
    min-height: 48px;
    display: flex;
    align-items: center;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, 
.suggestion-item:active {
    background: rgba(255, 255, 255, 0.12);
}

/* Subtext for the region/city */
.suggestion-secondary-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 8px;
    font-weight: 400;
}

/* Nerve bars: match card visuals so they sit on top visually */
.nerve-bar {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-surface-border);
    border-radius: 24px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Map / Dashboard helpers */
.map-grid-visual { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; }
.coach-container { color: var(--color-slate-gray); text-align: center; }
.quick-link { padding: 12px; width: 100%; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-surface-border); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.toggle-btn { flex: 1; padding: 12px; background: transparent; border: 1px solid var(--color-surface-border); color: var(--color-text-main); border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.12s ease; }
.toggle-btn.active { background: var(--color-highlight); border-color: rgba(226,232,240,0.04); color: var(--color-bg); }
.muted { color: var(--color-text-muted); }
/* Stat utilities */
.stat-accent { color: var(--color-highlight); font-weight: 700; }
.stat-success { color: #48BB78; font-weight: 700; }
.stat-warning { color: #ECC94B; font-weight: 700; }

/* Radar pulse delay helpers */
.radar-delay-08 { animation-delay: 0.8s; }

/* Map desaturation helper used by MapService */
.meenda-map-desaturate {
    filter: grayscale(0.62) contrast(0.96) brightness(0.99) !important;
}

/* 2.5D Perspective tilt for passenger map's leaflet pane */
#passenger-map .leaflet-map-pane {
    transform: perspective(800px) rotateX(35deg);
    transform-origin: 50% 80%;
    transition: transform 0.5s ease;
}

/* Admin area helpers */
.admin-dashboard { display:flex; gap:16px; }
.admin-sidebar { width:220px; }
.admin-content { flex:1; min-height:400px; }
.admin-nav-btn { display:block; width:100%; margin-bottom:8px; padding:10px 12px; border-radius:10px; background: transparent; border: 1px solid rgba(255,255,255,0.04); color:var(--color-text-main); cursor:pointer; }
.admin-nav-btn.active { background: var(--color-accent-blue); color: #fff; }
.admin-table { width:100%; border-collapse: collapse; }
.admin-row { border-top: 1px solid rgba(255,255,255,0.04); }
.admin-error { color: crimson; }
.fleet-list-item { padding:8px; border-bottom:1px solid rgba(255,255,255,0.04); display:flex; justify-content:space-between; }
.flagged-messages { max-height:520px; overflow:auto; border:1px solid rgba(255,255,255,0.04); padding:8px; background: rgba(255,255,255,0.02); }
.flag-message { padding:8px; border-bottom:1px solid rgba(255,255,255,0.02); }
.small-input { width:80px; }
.admin-controls { display:flex; gap:12px; align-items:center; margin-bottom:8px; }
.admin-controls .spacer { margin-left:auto; }

/* Seat availability */
.seat-low { color: #F56565; font-weight: 700; }
.seat-ok { color: #48BB78; font-weight: 700; }

.small-text { font-size: 0.85rem; }
.main-map-card { flex: 1; min-height: 400px; position: relative; width: 100%; }

/* Map visuals for Leaflet markers and route traces */
.meenda-marker svg { display: block; }
.meenda-marker svg circle { filter: none; }
.meenda-route-glow {
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: none;
}

@media (max-width: 768px) {
    .meenda-navbar .nav-left { display: none; }
    .meenda-navbar { grid-template-columns: auto 1fr auto; }
}

.bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.45);
    border-color: rgba(255,255,255,0.06);
}

/* Typography Helpers */
.h1, .h2, .h3 {}
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.03em; /* tight engineering-focused tracking */
}
.accent {
    color: var(--color-accent-blue);
}
.slate {
    color: var(--color-slate-gray);
}

/* Driver HUD Ledger Specifics */
.live-ledger {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent-blue);
}

/* Premium Animations & Visuals */
.pulse-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove glowing/pulsing animations: replace with solid, sharp controls */
.map-pulse, .map-pulse-inner { display: none; }

@keyframes pulse-ring {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.radar-ping { display: none; }

@keyframes radar-sweep {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-highlight);
    display: inline-block;
}

@keyframes dot-glow {
    0% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ============================================================
   DRIVER HUD — Landscape Phone-Mount Optimized Layout
   ============================================================ */

.driver-hud {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: calc(100vh - 48px);
}

/* Heavier, authoritative card variant for driver mode */
.hud-card {
    border: 1.5px solid rgba(0, 174, 239, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hud-card:hover {
    border-color: rgba(0, 174, 239, 0.55);
    box-shadow: 0 8px 32px rgba(0, 174, 239, 0.2);
}

/* Top Row: Ledger + Stats side-by-side */
.hud-top-row {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

/* Ledger Card */
.hud-ledger-card {
    flex: 2;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 32px;
    gap: 6px;
}

.hud-ledger-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Sidebar menu styles */
.meenda-sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; transform: translateX(100%); transition: transform 280ms ease; z-index: 200000; }
.meenda-sidebar .sidebar-card { background: var(--color-surface); height: 100%; box-shadow: -24px 0 80px rgba(0,0,0,0.35); padding: 16px; display:flex; flex-direction:column; }
.meenda-sidebar .sidebar-header { display:flex; justify-content:space-between; align-items:center; }
.meenda-sidebar .sidebar-body { flex:1; overflow:auto; padding-top:12px; }
.meenda-sidebar.hidden { transform: translateX(100%); }
.meenda-sidebar:not(.hidden) { transform: translateX(0); }
.account-badge { display:inline-block; padding:8px 12px; border-radius:12px; background:rgba(0,0,0,0.03); font-weight:700; }
.switch-row { display:flex; align-items:center; gap:12px; }

/* Premium profile card styles */
.premium-profile-card {
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    color: var(--color-text-main);
}
.profile-header-block { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-placeholder { width: 56px; height: 56px; border-radius: 50%; background: #0b0d10; color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.account-role-tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; letter-spacing: 0.5px; display: inline-block; margin-top: 4px; }
.role-driver { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.role-passenger { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.profile-details-grid { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.detail-row { display: flex; justify-content: space-between; font-size: 14px; }
.detail-row.highlight-row { padding: 10px; background: rgba(0, 0, 0, 0.02); border-radius: 8px; font-weight: 600; }
.btn-primary-action { width: 100%; height: 48px; background: #00a3ff; color: white; border: none; border-radius: 12px; font-weight: 600; cursor: pointer; }
.btn-secondary-action { width: 100%; height: 44px; background: transparent; color: var(--color-text-muted); border: 1px solid var(--color-surface-border); border-radius: 12px; margin-top: 8px; cursor: pointer; }

.hud-ledger-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-accent-blue);
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(0, 174, 239, 0.3);
}

.hud-ledger-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Stats Card */
.hud-stats-card {
    flex: 1;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    gap: 10px;
}

.hud-stats-title {
    font-size: 1rem;
    color: var(--color-text-main);
    margin-bottom: 4px;
}

.hud-stat-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.hud-stat-value {
    font-weight: 700;
}

/* Central Map Card */
.hud-map-card {
    flex: 1;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    padding: 24px;
    gap: 16px;
    overflow: hidden;
}

.hud-map-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.hud-map-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.hud-map-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.hud-rider-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    white-space: nowrap;
}

.hud-map-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-radar-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-radar-icon {
    font-size: 2.5rem;
    z-index: 2;
}

/* Bottom CTA Card */
.hud-cta-card {
    flex-shrink: 0;
    padding: 20px 24px;
    background: rgba(0, 174, 239, 0.08);
    border-color: var(--color-accent-blue);
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hud-cta-card:hover {
    background: rgba(0, 174, 239, 0.14);
}

.hud-cta-track {
    width: 100%;
    max-width: 400px;
    height: 48px;
    background: rgba(0, 174, 239, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 4px;
    position: relative;
    overflow: hidden;
}

.hud-cta-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 174, 239, 0.15), transparent);
    animation: cta-shimmer 2.5s ease-in-out infinite;
}

@keyframes cta-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hud-cta-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 16px rgba(0, 174, 239, 0.5);
    z-index: 1;
    flex-shrink: 0;
}

.hud-cta-label {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 0.5px;
    z-index: 1;
}

.hud-cta-status {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Landscape phone-mount: stack top-row horizontally, maximize map */
@media (max-height: 500px) and (orientation: landscape) {
    .driver-hud {
        gap: 10px;
        height: calc(100vh - 20px);
    }

    .hud-top-row {
        gap: 10px;
    }

    .hud-ledger-card {
        padding: 14px 20px;
    }

    .hud-ledger-amount {
        font-size: 2rem;
    }

    .hud-stats-card {
        padding: 14px 20px;
        gap: 6px;
    }

    .hud-map-card {
        padding: 14px;
    }

    .hud-cta-card {
        padding: 10px 16px;
    }

    .hud-cta-track {
        height: 38px;
    }

    .hud-cta-thumb {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Narrow portrait: stack ledger and stats vertically */
@media (max-width: 600px) {
    .hud-top-row {
        flex-direction: column;
    }

    .hud-ledger-amount {
        font-size: 2.2rem;
    }
}

/* Address suggestions dropdown */
.suggestions-dropdown {
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    z-index: 9999;
    margin-top: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --color-text-main: #FFFFFF;
    --color-text-muted: #94A3B8;
    color: var(--color-text-main);
}
.dark-theme .suggestions-dropdown {
    background: rgba(18, 20, 28, 0.92);
    border-color: rgba(255, 255, 255, 0.06);
}
.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-main);
    transition: background 0.2s ease;
}
.suggestion-item:hover {
    background: rgba(0, 0, 0, 0.03);
}
.dark-theme .suggestion-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Coach Booking - Responsive Layout & Accessibility */
.coach-booking-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.coach-booking-card { width: 100%; }
.coach-title { margin: 0 0 12px 0; }
.coach-passenger-list { display: flex; flex-direction: column; gap: 12px; }
.coach-passenger-row { padding: 12px; box-sizing: border-box; }
.passenger-fields .field-label { display:block; font-size:13px; color:var(--color-text-muted); margin-bottom:6px; }

.route-manifest-card {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    padding: 16px;
    border-radius: 12px;
    box-sizing: border-box;
}
.manifest-list dt { font-weight:700; margin-top:8px; }
.manifest-list dd { margin:6px 0 12px 0; font-size:14px; color:var(--color-text-main); line-height:1.5; word-wrap:break-word; }

/* Form controls - touch target and font scaling */
input[type="text"], .coach-input {
    min-height: 48px;
    height: 48px;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-surface-border);
    background: transparent;
    box-sizing: border-box;
    width: 100%;
    color: var(--color-text-main);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
input[type="text"]:focus, .coach-input:focus {
    outline: none;
    border-color: #00a3ff;
    box-shadow: 0 0 12px rgba(0, 163, 255, 0.2);
}

.bwp-price, .bwp-output {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.coach-manifest-and-total { display:flex; gap:16px; flex-direction:column; margin-top:12px; }
.coach-total-section { display:flex; flex-direction:column; gap:12px; align-items:stretch; }
.coach-subtotal-label { margin-bottom:4px; color:var(--color-text-muted); }
.coach-cta-row { display:flex; gap:8px; }
.full-width { width:100%; }

/* Larger screens: allow manifest and total to sit side-by-side */
@media (min-width: 768px) {
    .coach-manifest-and-total { flex-direction:row; align-items:flex-start; }
    .route-manifest-card { flex:1; }
    .coach-total-section { width:260px; flex:0 0 260px; align-items:flex-end; }
    .coach-cta-row { justify-content:flex-end; }
}

/* Accessibility helpers */
.visually-hidden { position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px, 1px, 1px, 1px); white-space:nowrap; }

/* Pricing simulation matrix styles (appended) */
.simulation-matrix {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.simulation-card {
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-surface-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;

/* PassengerDashboard tweaks */
.coach-input::placeholder { color: rgba(255,255,255,0.5); }
.location-shortcut { font-size: 1.1rem; line-height: 1; }
.suggestions-dropdown { box-sizing: border-box; }
.suggestion-item { word-break: break-word; }

/* Confirmation Sheet (ride-dispatch) visual protection */
#ride-dispatch-sheet, .spatial-panel.bottom-slide-sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: calc(100% - 40px);
    max-width: 560px;
    background: rgba(18, 20, 28, 0.98) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px;
    color: #ffffff;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    z-index: 200000;
}
.spatial-panel.bottom-slide-sheet .sheet-header h4 { color: #ffffff; }

/* When embedded inside the map card, switch to absolute overlay mode */
.spatial-panel.bottom-slide-sheet.in-map-sheet {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 24px !important;
    width: calc(100% - 48px) !important;
    max-width: 440px !important;
    z-index: 10050 !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6) !important;
}

/* Unified console/input styling used across platform */
.console-input {
    width: 100%;
    min-height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.console-input:focus {
    outline: none;
    border-color: #00a3ff;
    background: rgba(0, 163, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 163, 255, 0.1);
}
.console-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Strengthen coach input styling to match platform */
.coach-input { background: var(--color-surface); color: var(--color-text-main); border: 1px solid var(--color-surface-border); }
.coach-input::placeholder { color: var(--color-text-muted); opacity: 0.9; }


    align-items: center;
}
.market-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-optimal { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-warning { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

/* Spatial Bottom Sheet UI Elements */
.bottom-slide-sheet {
    position: fixed;
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.bottom-slide-sheet.active {
    bottom: 24px;
}

/* Driver trip overlay (premium glassmorphic) */
#driver-trip-overlay { }

/* Passenger tracking card styling */
#passenger-tracking-card {
    border-radius: 14px;
}
.sheet-metrics-row {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: 8px;
}
.metric-block { display: flex; flex-direction: column; font-size: 12px; }
.metric-block .value { font-weight: 700; font-size: 16px; margin-top: 4px; color: var(--color-text-main); }
.highlight-bwp .value { color: #00a3ff; }
.pulse-loader-container { text-align: center; padding: 20px 0; }
.btn-premium-action {
    background: #00a3ff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-premium-action:hover {
    background: #008be5;
}


