:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0f172a;
    --gold: #f5b800;
    --blue: #2563eb;
    --green: #16a34a;
    --red: #dc2626;
    --r: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Noto Sans Ethiopic", "Nyala", "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   1. Featherweight Clean Top Header
   ========================================== */
.navbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 200;
}
.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
    min-width: 0;
}
.nav-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--brand);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    flex-shrink: 0;
}
.nav-title { font-size: 15px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.nav-sub { display: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links a.nav-item {
    color: var(--muted);
    text-decoration: none;
    font-size: 12.5px;
    padding: 5px 9px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
}
.nav-links a.nav-item:hover, .nav-links a.nav-item.active {
    color: var(--ink);
    background: #f1f5f9;
}
.nav-user {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 700;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lang-switch {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}
.lang-switch a {
    padding: 3px 8px !important;
    font-size: 11px !important;
    border-radius: 999px !important;
    color: var(--muted) !important;
    text-decoration: none;
    font-weight: 800;
}
.lang-switch a.lang-active {
    background: var(--brand) !important;
    color: #fff !important;
}

/* ==========================================
   2. Ultra-Slim Single-Line Ad Ticker
   ========================================== */
.ad-ticker {
    background: #fefce8;
    color: #854d0e;
    border-bottom: 1px solid #fef08a;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ad-ticker a {
    color: #713f12;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82vw;
}

/* ==========================================
   3. Clean Layout & Minimalist Cards
   ========================================== */
.container {
    max-width: 1120px;
    margin: 12px auto;
    padding: 0 12px 32px;
}

/* Slim Single-Row Action Strip (Replaces bulky Hero box!) */
.slim-welcome {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.slim-welcome h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
    color: var(--ink);
}
.slim-welcome p {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 14px;
}
.card h2, .card h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 900;
    color: var(--ink);
}

/* Clean Flat KPI Cards */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 12px 14px;
}
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 20px; font-weight: 900; margin-top: 2px; color: var(--ink); }

/* Clean Inputs & Flat Tactile Buttons */
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 4px; color: var(--ink); }
.form-control {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--blue); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .12s, transform .06s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-gold { background: var(--gold); color: #000; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-outline { background: #fff; border: 1px solid #cbd5e1; color: var(--ink); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 7px; }
.btn-block { width: 100%; }

/* Soft Minimalist Badges & Alerts */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gold { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-dark { background: #f1f5f9; color: #334155; }

.alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; font-size: 12.5px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.info-box { background: #f8fafc; border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 12.5px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f8fafc; color: var(--muted); font-weight: 800; font-size: 11.5px; white-space: nowrap; }

/* ==========================================
   4. Ultra-Clean 4-Sector Icon Pills (Taxi, Bajaj, Ambulance, Private)
   ========================================== */
.rail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}
.rail-header h2, .rail-header h3 { margin: 0; font-size: 14.5px; font-weight: 900; color: var(--ink); }

.sector-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.sector-card {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 13px;
    padding: 9px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}
.sector-card.active.taxi { border-color: var(--blue); background: #eff6ff; }
.sector-card.active.bajaj { border-color: #eab308; background: #fefce8; }
.sector-card.active.ambulance { border-color: var(--red); background: #fef2f2; }
.sector-card.active.private_taxi { border-color: var(--green); background: #f0fdf4; }

.sector-svg-wrap { height: 34px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.sector-svg-wrap svg { width: 54px; height: 32px; }
.sector-title { font-size: 12.5px; font-weight: 900; color: var(--ink); line-height: 1.2; }
.sector-sub { display: none; }
.sector-pill-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
}

/* ==========================================
   5. Clean Horizontal Swipe Rails (Vehicles, Stations, History)
   ========================================== */
.h-rail {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 1px 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.h-rail::-webkit-scrollbar { height: 4px; }
.h-rail::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.veh-hcard {
    flex: 0 0 205px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 7px;
}
.seat-bar { height: 4px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-top: 3px; }
.seat-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

.station-hcard {
    flex: 0 0 188px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 7px;
}
.station-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 5px;
    text-align: center;
}
.station-metrics div span { display: block; font-size: 9px; color: var(--muted); font-weight: 700; }
.station-metrics div strong { font-size: 13px; color: var(--ink); font-weight: 900; }

.mini-hcard {
    flex: 0 0 210px;
    scroll-snap-align: start;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px;
}

/* Featherweight Ad Chips (Zero clutter) */
.ad-rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.ad-banner-card {
    flex: 0 0 250px;
    border-radius: 10px;
    padding: 8px 11px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.ad-pill { position: absolute; top: 5px; right: 7px; font-size: 8.5px; font-weight: 800; color: #fde047; opacity: 0.9; }
.ad-banner-title { font-size: 11.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-banner-meta { font-size: 9.5px; color: #e2e8f0; }

/* ==========================================
   6. Side-by-Side Clean ATM Wallet Card
   ========================================== */
.atm-duo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}
.atm-card {
    scroll-snap-align: start;
    position: relative;
    border-radius: 15px;
    padding: 16px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1.5px solid rgba(245, 184, 0, 0.7);
    aspect-ratio: 1.586 / 1;
    min-height: 182px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.atm-card.frozen { filter: grayscale(0.5); border-color: var(--red); }
.atm-top { display: flex; justify-content: space-between; align-items: flex-start; }
.atm-brand { font-size: 14px; font-weight: 900; color: var(--gold); letter-spacing: 0.6px; }
.atm-sub { font-size: 9.5px; color: #94a3b8; }
.atm-chip-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; }
.emv-chip { width: 34px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, #fde047, #ca8a04); }
.atm-number {
    font-family: "Courier New", monospace;
    font-size: clamp(13px, 3.5vw, 16.5px);
    font-weight: 900;
    letter-spacing: 1.4px;
    white-space: nowrap;
    color: #fff;
}
.atm-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.atm-meta-label { font-size: 8.5px; text-transform: uppercase; color: #94a3b8; }
.atm-meta-val { font-size: 12px; font-weight: 800; color: #fff; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.atm-back { padding: 0 0 10px 0; }
.atm-magstripe { height: 28px; background: #020617; margin: 12px 0 9px; width: 100%; }
.atm-back-body { padding: 0 14px; display: flex; align-items: center; gap: 11px; }
.qr-box { background: #fff; padding: 5px; border-radius: 7px; display: inline-flex; flex-shrink: 0; }
.cvv-strip { background: #fff; color: #0f172a; padding: 2px 7px; border-radius: 4px; font-family: monospace; font-weight: 900; font-size: 11.5px; }

/* PIN Modal & Keypad */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.72); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 9998; }
.modal-backdrop.open { display: flex; }
.pin-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 330px; padding: 18px; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 10px 0 14px; }
.pin-dot { width: 40px; height: 44px; border: 1.5px solid #cbd5e1; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; }
.pin-dot.filled { border-color: var(--blue); background: #eff6ff; }
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.key-btn { padding: 11px 0; font-size: 18px; font-weight: 800; border-radius: 10px; border: 1px solid #cbd5e1; background: #f8fafc; cursor: pointer; }

/* Multi-Pax Pills & Live Indicator */
.pax-selector { display: flex; gap: 5px; flex-wrap: wrap; }
.pax-btn { flex: 1; min-width: 42px; padding: 7px 5px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit; }
.pax-btn.active { background: var(--brand); color: var(--gold); border-color: var(--brand); }
.live-pill { display: inline-flex; align-items: center; gap: 4px; background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.lite-btn { background: #f1f5f9; color: var(--ink); border: none; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; cursor: pointer; }
.lite-btn.on { background: #dcfce7; color: #166534; }

/* Clean Segmented Tabs */
.tabs { display: flex; gap: 5px; overflow-x: auto; background: #f1f5f9; padding: 4px; border-radius: 11px; margin-bottom: 12px; }
.tab-btn { flex: 1; padding: 7px 10px; border-radius: 8px; border: none; background: transparent; font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--muted); white-space: nowrap; }
.tab-btn.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15,23,42,0.08); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Guest Card */
.qr-id-card { background: #0f172a; color: #fff; border: 2px solid var(--gold); border-radius: 14px; padding: 16px; max-width: 380px; margin: 0 auto; }
.qr-id-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 8px; margin-bottom: 10px; }

/* Auth Pages */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: #f1f5f9; }
.auth-card { background: #fff; width: 100%; max-width: 420px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); }
.brand-badge { display: inline-block; background: #f1f5f9; color: var(--ink); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 12px; }

/* Clean Mobile Bottom Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    z-index: 300;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
}
.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 9px;
}
.mobile-bottom-nav a svg { width: 19px; height: 19px; }
.mobile-bottom-nav a.active { color: var(--blue); background: #eff6ff; }

/* Toast */
#toast-container { position: fixed; bottom: 68px; right: 14px; left: 14px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 700; max-width: 340px; }
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }

.footer { text-align: center; padding: 14px; color: var(--muted); font-size: 11.5px; margin-top: 16px; }

@media (max-width: 768px) {
    body { padding-bottom: 62px; }
    .nav-links .nav-item, .nav-links .nav-user { display: none; }
    .mobile-bottom-nav { display: flex; }
    .container { padding: 0 10px 20px; margin-top: 10px; }
    .sector-strip { display: flex; overflow-x: auto; gap: 7px; padding-bottom: 4px; }
    .sector-card { flex: 0 0 106px; padding: 8px 5px; }
    .atm-duo-grid { display: flex; overflow-x: auto; gap: 10px; }
    .atm-duo-grid .atm-card { flex: 0 0 86%; min-width: 270px; }
}

@media print {
    body * { visibility: hidden !important; }
    #atmPrintZone, #atmPrintZone * { visibility: visible !important; }
    #atmPrintZone { position: fixed !important; left: 0; top: 10mm; width: 100%; display: grid !important; grid-template-columns: 85.6mm 85.6mm !important; justify-content: center !important; gap: 8mm !important; }
    #atmPrintZone .atm-card { width: 85.6mm !important; height: 54mm !important; min-height: 54mm !important; flex: none !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}


/* ==========================================
   v9: Dynamic Dark/Light Theme & Live Map GPS Tracking
   ========================================== */
:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0f172a;
    --gold: #f5b800;
    --blue: #2563eb;
    --green: #16a34a;
    --red: #dc2626;
    --r: 14px;
}

[data-theme="dark"] {
    --bg: #090d16;
    --surface: #111827;
    --ink: #f8fafc;
    --muted: #94a3b8;
    --line: #1f2937;
    --brand: #1e293b;
    --gold: #f5b800;
    --blue: #3b82f6;
    --green: #22c55e;
    --red: #ef4444;
}

body {
    background: var(--bg) !important;
    color: var(--ink) !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.card, .stat-card, .slim-welcome, .navbar, .mobile-bottom-nav, .pin-modal, .auth-card {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
}

.form-control {
    background: var(--surface) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}

.station-metrics, .info-box {
    background: var(--line) !important;
    color: var(--ink) !important;
}

/* Real-Time Live Map Styles */
#tsedeyLiveMap {
    width: 100%;
    height: 380px;
    border-radius: var(--r);
    border: 1.5px solid var(--line);
    z-index: 10;
    margin-bottom: 14px;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--surface) !important;
    color: var(--ink) !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-weight: 700 !important;
}
.leaflet-container {
    font-family: inherit !important;
}


/* ==========================================
   v11: 4 Instant Themes (Light, Dark, Royal Navy, Ocean)
   ========================================== */
[data-theme="dark"] {
    --bg: #090d16;
    --surface: #111827;
    --ink: #f8fafc;
    --muted: #94a3b8;
    --line: #1f2937;
    --brand: #1e293b;
}
[data-theme="royal"] {
    --bg: #0b132b;
    --surface: #16213e;
    --ink: #f8fafc;
    --muted: #cbd5e1;
    --line: #2a3a5e;
    --brand: #0f172a;
}
[data-theme="ocean"] {
    --bg: #eff6ff;
    --surface: #ffffff;
    --ink: #0c4a6e;
    --muted: #0369a1;
    --line: #bae6fd;
    --brand: #0369a1;
}

[data-theme="dark"] body,
[data-theme="royal"] body,
[data-theme="ocean"] body {
    background: var(--bg) !important;
    color: var(--ink) !important;
}

[data-theme="dark"] .navbar,
[data-theme="royal"] .navbar,
[data-theme="ocean"] .navbar,
[data-theme="dark"] .mobile-bottom-nav,
[data-theme="royal"] .mobile-bottom-nav,
[data-theme="ocean"] .mobile-bottom-nav {
    background: var(--surface) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .slim-welcome,
[data-theme="dark"] .veh-hcard,
[data-theme="dark"] .station-hcard,
[data-theme="dark"] .sector-card,
[data-theme="dark"] .mini-hcard,
[data-theme="dark"] .pin-modal,
[data-theme="dark"] .auth-card,
[data-theme="royal"] .card,
[data-theme="royal"] .stat-card,
[data-theme="royal"] .slim-welcome,
[data-theme="royal"] .veh-hcard,
[data-theme="royal"] .station-hcard,
[data-theme="royal"] .sector-card,
[data-theme="royal"] .mini-hcard,
[data-theme="royal"] .pin-modal,
[data-theme="royal"] .auth-card,
[data-theme="ocean"] .card,
[data-theme="ocean"] .stat-card,
[data-theme="ocean"] .slim-welcome,
[data-theme="ocean"] .veh-hcard,
[data-theme="ocean"] .station-hcard,
[data-theme="ocean"] .sector-card,
[data-theme="ocean"] .mini-hcard {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
}

[data-theme="dark"] .nav-title,
[data-theme="dark"] .card h2,
[data-theme="dark"] .card h3,
[data-theme="dark"] .rail-header h2,
[data-theme="dark"] .sector-title,
[data-theme="dark"] .slim-welcome h1,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .station-metrics div strong,
[data-theme="dark"] th, [data-theme="dark"] td,
[data-theme="royal"] .nav-title,
[data-theme="royal"] .card h2,
[data-theme="royal"] .card h3,
[data-theme="royal"] .rail-header h2,
[data-theme="royal"] .sector-title,
[data-theme="royal"] .slim-welcome h1,
[data-theme="royal"] .stat-value,
[data-theme="royal"] .station-metrics div strong,
[data-theme="royal"] th, [data-theme="royal"] td {
    color: #f8fafc !important;
}

[data-theme="dark"] .tabs,
[data-theme="royal"] .tabs,
[data-theme="dark"] .station-metrics,
[data-theme="royal"] .station-metrics,
[data-theme="dark"] .info-box,
[data-theme="royal"] .info-box,
[data-theme="dark"] th,
[data-theme="royal"] th {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .tab-btn.active,
[data-theme="royal"] .tab-btn.active {
    background: var(--gold) !important;
    color: #000 !important;
}

[data-theme="dark"] .form-control,
[data-theme="royal"] .form-control {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: var(--line) !important;
}

[data-theme="royal"] .sector-card.active {
    border-color: var(--gold) !important;
    background: rgba(245, 184, 0, 0.14) !important;
}

.theme-select {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}
[data-theme="dark"] .theme-select,
[data-theme="royal"] .theme-select {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}
