﻿/* =============================================================
   MZANSIGO - Design System
   Rider:  white + light grey + green (95% transparent)
   Driver: white + light grey + blue accent
   Admin:  white + light grey + purple accent
   ============================================================= */

:root {
    /* Brand */
    --primary:       #f97316;
    --primary-dark:  #ea580c;
    --primary-light: #fff7ed;

    /* Role accents */
    --rider-accent:        #16a34a;
    --rider-accent-light:  rgba(22, 163, 74, 0.08);
    --rider-accent-mid:    rgba(22, 163, 74, 0.15);
    --driver-accent:       #2563eb;
    --driver-accent-light: rgba(37, 99, 235, 0.08);
    --admin-accent:        #7c3aed;
    --admin-accent-light:  rgba(124, 58, 237, 0.08);

    /* Neutral */
    --bg:            #f8f9fa;
    --surface:       #ffffff;
    --surface-2:     #f1f3f5;
    --border:        #e9ecef;
    --border-2:      #d4d4d4;
    --text:          #1a1a2e;
    --text-2:        #6c757d;
    --text-3:        #adb5bd;
    --success:       #22c55e;
    --danger:        #ef4444;
    --warning:       #f59e0b;
    --info:          #3b82f6;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
    --shadow:        0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
    --radius-sm:     10px;
    --radius:        16px;
    --radius-lg:     24px;
    --nav-height:    60px;
    --bottom-nav:    64px;
    --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

/* ---- Page transition ---- */
.page-enter { animation: pageIn var(--transition) both; }
@keyframes pageIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* ---- Top Nav ---- */
.top-nav {
    position: fixed; top:0; left:0; right:0;
    height: var(--nav-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-logo { display:flex; align-items:center; gap:8px; text-decoration:none; color:var(--text); }
.nav-logo-icon { width:32px; height:32px; background:var(--primary); border-radius:9px; display:flex; align-items:center; justify-content:center; }
.nav-logo-text { font-weight:800; font-size:17px; letter-spacing:-0.3px; }
.nav-right { display:flex; align-items:center; gap:8px; }
.role-badge { font-size:10px; font-weight:700; padding:3px 9px; border-radius:20px; text-transform:uppercase; letter-spacing:0.4px; }
.role-badge.rider  { background:var(--rider-accent-light);  color:var(--rider-accent); }
.role-badge.driver { background:var(--driver-accent-light); color:var(--driver-accent); }
.role-badge.admin  { background:var(--admin-accent-light);  color:var(--admin-accent); }
.avatar-btn {
    width:34px; height:34px; border-radius:50%;
    background:var(--surface-2); border:1.5px solid var(--border);
    overflow:hidden; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:13px; color:var(--text);
    transition: border-color var(--transition);
}
.avatar-btn img { width:100%; height:100%; object-fit:cover; }
.avatar-btn:hover { border-color: var(--primary); }

/* ---- Dropdown ---- */
.dropdown {
    position:absolute; top:calc(100% + 6px); right:0;
    width:200px; background:var(--surface);
    border:1px solid var(--border); border-radius:var(--radius);
    box-shadow:var(--shadow-lg); overflow:hidden; z-index:200;
}
.dropdown-header { padding:11px 14px; border-bottom:1px solid var(--border); }
.dropdown-header p { font-size:13px; font-weight:600; }
.dropdown-header span { font-size:11px; color:var(--text-2); }
.dropdown a, .dropdown button {
    display:block; width:100%; padding:10px 14px;
    font-size:13px; color:var(--text); text-decoration:none;
    background:none; border:none; text-align:left; cursor:pointer;
    transition:background var(--transition);
}
.dropdown a:hover, .dropdown button:hover { background:var(--surface-2); }
.dropdown .danger { color:var(--danger); }

/* ---- Bottom Nav ---- */
.bottom-nav {
    position:fixed; bottom:0; left:0; right:0;
    height:var(--bottom-nav);
    background:var(--surface);
    border-top:1px solid var(--border);
    display:flex; z-index:100;
    padding-bottom:env(safe-area-inset-bottom,0px);
    box-shadow:0 -1px 8px rgba(0,0,0,0.05);
}
.bottom-nav a {
    flex:1; display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:3px; text-decoration:none;
    color:var(--text-3); font-size:10px; font-weight:500;
    transition:color var(--transition); padding:6px 0;
}
.bottom-nav a.active, .bottom-nav a:hover { color:var(--primary); }
.bottom-nav a svg { width:20px; height:20px; }

/* ---- Main content ---- */
.main-content { padding-top:var(--nav-height); padding-bottom:calc(var(--bottom-nav) + 12px); min-height:100vh; }
.page { padding:16px 14px; max-width:480px; margin:0 auto; }

/* ---- Cards ---- */
.card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); box-shadow:var(--shadow-sm); overflow:hidden; }
.card-body { padding:14px; }
.card-header { padding:12px 14px; border-bottom:1px solid var(--border); font-weight:600; font-size:13px; }

/* ---- Buttons ---- */
.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:7px;
    padding:11px 18px; border-radius:var(--radius); font-size:13px; font-weight:600;
    cursor:pointer; border:none; text-decoration:none; white-space:nowrap;
    -webkit-tap-highlight-color:transparent; transition:all var(--transition);
}
.btn:active { transform:scale(0.97); }
.btn-primary  { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-dark); }
.btn-secondary { background:var(--surface-2); color:var(--text); border:1px solid var(--border); }
.btn-secondary:hover { background:var(--border); }
.btn-success { background:var(--success); color:#fff; }
.btn-danger  { background:var(--danger);  color:#fff; }
.btn-outline { background:transparent; color:var(--primary); border:1.5px solid var(--primary); }
.btn-outline:hover { background:var(--primary-light); }
.btn-full    { width:100%; }
.btn-lg      { padding:14px 22px; font-size:15px; border-radius:var(--radius-lg); }
.btn-sm      { padding:7px 12px; font-size:12px; border-radius:var(--radius-sm); }
.btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }

/* ---- Forms ---- */
.form-group { margin-bottom:14px; }
.form-label { display:block; font-size:12px; font-weight:600; color:var(--text-2); margin-bottom:5px; text-transform:uppercase; letter-spacing:0.3px; }
.form-control {
    width:100%; padding:11px 13px;
    border:1.5px solid var(--border); border-radius:var(--radius);
    font-size:14px; color:var(--text); background:var(--surface);
    transition:border-color var(--transition), box-shadow var(--transition);
    outline:none; -webkit-appearance:none;
}
.form-control:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(22,163,74,0.10); }
.form-control::placeholder { color:var(--text-3); }
.form-control:disabled { background:var(--surface-2); color:var(--text-3); cursor:not-allowed; }
.input-icon { position:relative; }
.input-icon .form-control { padding-left:40px; }
.input-icon .icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-3); pointer-events:none; }
.input-icon .icon-right { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--text-3); cursor:pointer; }

/* ---- Stats ---- */
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:16px; }
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px 8px; text-align:center; }
.stat-value { font-size:20px; font-weight:800; color:var(--primary); }
.stat-label { font-size:10px; font-weight:500; color:var(--text-2); margin-top:2px; text-transform:uppercase; letter-spacing:0.3px; }

/* ---- Badges ---- */
.badge { display:inline-flex; align-items:center; font-size:10px; font-weight:700; padding:2px 8px; border-radius:20px; text-transform:uppercase; letter-spacing:0.3px; }
.badge-pending     { background:rgba(217,119,6,0.10);  color:var(--warning); }
.badge-accepted    { background:rgba(37,99,235,0.10);  color:var(--info); }
.badge-arrived     { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-in_progress { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-completed   { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-cancelled   { background:rgba(220,38,38,0.10);  color:var(--danger); }
.badge-approved    { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-suspended   { background:rgba(220,38,38,0.10);  color:var(--danger); }
.badge-active      { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-online      { background:rgba(22,163,74,0.10);  color:var(--success); }
.badge-inactive    { background:rgba(153,153,153,0.12); color:var(--text-3); }

/* ---- Toggle ---- */
.toggle-wrap { display:flex; align-items:center; justify-content:space-between; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; margin-bottom:14px; box-shadow:var(--shadow-sm); }
.toggle { position:relative; width:48px; height:26px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--border-2); border-radius:26px; cursor:pointer; transition:background var(--transition); }
.toggle-slider::before { content:''; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:transform var(--transition); box-shadow:0 1px 4px rgba(0,0,0,0.18); }
.toggle input:checked + .toggle-slider { background:var(--success); }
.toggle input:checked + .toggle-slider::before { transform:translateX(22px); }
.toggle input:disabled + .toggle-slider { opacity:0.45; cursor:not-allowed; }

/* ---- List items ---- */
.list-item { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--border); }
.list-item:last-child { border-bottom:none; }
.list-icon { width:36px; height:36px; border-radius:var(--radius-sm); background:var(--surface-2); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--text-2); }
.list-icon.primary { background:var(--rider-accent-light); color:var(--rider-accent); }
.list-icon.success { background:rgba(22,163,74,0.08); color:var(--success); }
.list-icon.danger  { background:rgba(220,38,38,0.08); color:var(--danger); }

/* ---- Driver avatar ---- */
.driver-avatar {
    width:44px; height:44px; border-radius:50%;
    background:var(--surface-2); display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:15px; flex-shrink:0; overflow:hidden;
    border:1.5px solid var(--border);
}
.driver-avatar img { width:100%; height:100%; object-fit:cover; }

/* ---- Section title ---- */
.section-title { font-size:15px; font-weight:700; color:var(--text); margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }
.section-title a { font-size:12px; font-weight:500; color:var(--primary); text-decoration:none; }

/* ---- Earnings banner ---- */
.earnings-banner { background:linear-gradient(135deg,var(--primary) 0%,var(--primary-dark) 100%); border-radius:var(--radius-lg); padding:22px 18px; color:#fff; text-align:center; margin-bottom:18px; box-shadow:0 4px 18px rgba(22,163,74,0.25); }
.earnings-amount { font-size:38px; font-weight:800; letter-spacing:-1px; }
.earnings-label  { font-size:12px; opacity:0.85; margin-top:3px; }

/* ---- Fare box ---- */
.fare-box { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; }
.fare-amount { font-size:30px; font-weight:800; color:var(--primary); }
.fare-meta { font-size:11px; color:var(--text-2); text-align:right; line-height:1.6; }

/* ---- Bottom sheet ---- */
.bottom-sheet {
    position:fixed; bottom:0; left:0; right:0;
    background:var(--surface);
    border-radius:var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow:0 -4px 28px rgba(0,0,0,0.10);
    z-index:50;
    padding:16px 14px calc(var(--bottom-nav) + 12px);
    max-height:62vh;
    overflow-y:auto;
}
.sheet-handle { width:34px; height:3px; background:var(--border-2); border-radius:2px; margin:0 auto 14px; }

/* ---- Radio cards ---- */
.radio-cards { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.radio-card { border:1.5px solid var(--border); border-radius:var(--radius); padding:11px 12px; cursor:pointer; transition:border-color var(--transition),background var(--transition); display:flex; align-items:center; gap:8px; }
.radio-card.selected { border-color:var(--primary); background:var(--rider-accent-light); }
.radio-card input { accent-color:var(--primary); }
.radio-card-label { font-size:13px; font-weight:500; }

/* ---- SOS button ---- */
.sos-btn { width:100%; padding:12px; background:rgba(220,38,38,0.06); border:1.5px solid rgba(220,38,38,0.2); border-radius:var(--radius); color:var(--danger); font-weight:600; font-size:13px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:background var(--transition); }
.sos-btn:hover { background:rgba(220,38,38,0.10); }

/* ---- Toast ---- */
.toast { position:fixed; top:66px; left:50%; transform:translateX(-50%); z-index:999; background:var(--text); color:#fff; padding:9px 18px; border-radius:22px; font-size:13px; font-weight:500; white-space:nowrap; box-shadow:var(--shadow-lg); animation:toastIn 0.18s ease both; }
.toast.success { background:var(--success); }
.toast.error   { background:var(--danger);  }
.toast.warning { background:var(--warning); }
.toast.info    { background:var(--info);    }
@keyframes toastIn { from { opacity:0; top:58px; } to { opacity:1; top:66px; } }

/* ---- Empty state ---- */
.empty-state { text-align:center; padding:44px 20px; color:var(--text-2); }
.empty-state svg { width:52px; height:52px; opacity:0.25; margin-bottom:12px; }
.empty-state h3  { font-size:15px; font-weight:700; color:var(--text); margin-bottom:5px; }
.empty-state p   { font-size:13px; }

/* ---- Divider ---- */
.divider { height:1px; background:var(--border); margin:14px 0; }

/* ---- Map layout (no overlap) ---- */
.map-page { display:flex; flex-direction:column; height:calc(100vh - var(--nav-height)); }
.map-shrink { flex:1; min-height:0; }
.map-fill   { width:100%; height:100%; }

/* ---- Offline banner ---- */
.offline-banner { position:fixed; top:var(--nav-height); left:0; right:0; background:var(--warning); color:#fff; text-align:center; padding:7px; font-size:12px; font-weight:500; z-index:99; display:none; }

/* ---- Skeleton ---- */
.skeleton { background:linear-gradient(90deg,var(--surface-2) 25%,var(--border) 50%,var(--surface-2) 75%); background-size:200% 100%; animation:shimmer 1.4s infinite; border-radius:6px; }
@keyframes shimmer { to { background-position:-200% 0; } }

/* ---- ANIMATIONS ---- */
@keyframes spin    { to { transform:rotate(360deg); } }
@keyframes pulse   { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes slideUp { from { transform:translateY(20px); opacity:0; } to { transform:translateY(0); opacity:1; } }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width:3px; height:3px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border-2); border-radius:2px; }

/* ---- Autofill ---- */
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-text-fill-color:var(--text); -webkit-box-shadow:0 0 0 1000px var(--surface) inset; }

/* ---- Leaflet overrides ---- */
.leaflet-container { background:#eef0e8 !important; font-family:inherit; }
.leaflet-control-attribution { font-size:8px !important; opacity:0.4; }
.leaflet-control-zoom a { background:var(--surface) !important; color:var(--text) !important; border:1px solid var(--border) !important; border-radius:6px !important; }

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

/* ---- NATIVE APP TRANSITIONS ---- */
.page-enter {
    animation: pageIn var(--transition) forwards;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- TOP NAV ---- */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.nav-logo-icon {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.nav-logo-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
    color: var(--text);
}

.nav-right {
    display: flex; align-items: center; gap: 10px;
}

.role-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-badge.rider  { background: var(--primary-light); color: var(--primary); }
.role-badge.driver { background: #eff6ff; color: #3b82f6; }
.role-badge.admin  { background: #faf5ff; color: #8b5cf6; }

.avatar-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    color: var(--text);
    transition: var(--transition);
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn:hover { border-color: var(--primary); }

/* ---- DROPDOWN MENU ---- */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
}
.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.dropdown-header p { font-size: 13px; font-weight: 600; }
.dropdown-header span { font-size: 11px; color: var(--text-2); }
.dropdown a, .dropdown button {
    display: block; width: 100%;
    padding: 11px 16px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.dropdown .danger { color: var(--danger); }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 500;
    transition: color var(--transition);
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bottom-nav a svg { width: 22px; height: 22px; }

/* ---- MAIN CONTENT ---- */
.main-content {
    padding-top: var(--nav-height);
    padding-bottom: calc(var(--bottom-nav) + 16px);
    min-height: 100vh;
}
.page { padding: 20px 16px; max-width: 480px; margin: 0 auto; }

/* ---- CARDS ---- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-body { padding: 16px; }
.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-ghost    { background: transparent; color: var(--primary); }
.btn-outline  { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-full     { width: 100%; }
.btn-lg       { padding: 15px 24px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm       { padding: 8px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.form-control::placeholder { color: var(--text-3); }
.input-icon {
    position: relative;
}
.input-icon .form-control { padding-left: 42px; }
.input-icon .icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}
.input-icon .icon-right {
    position: absolute;
    right: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    cursor: pointer;
}

/* ---- STATS ROW ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 11px; color: var(--text-2); margin-top: 3px; }

/* ---- RIDE CARD ---- */
.ride-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.ride-card:active { box-shadow: var(--shadow); }

.route-line {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.route-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.route-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 2px;
}
.route-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.route-dot.pickup  { background: var(--success); }
.route-dot.dropoff { background: var(--primary); }
.route-connector {
    width: 2px; height: 22px;
    background: var(--border);
    margin: 3px 0;
}
.route-text { font-size: 13px; color: var(--text); line-height: 1.3; padding-bottom: 4px; }
.route-text.muted { color: var(--text-2); }

/* ---- STATUS BADGES ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: capitalize;
}
.badge-pending    { background: #fff8e1; color: #f59e0b; }
.badge-accepted   { background: #eff6ff; color: #3b82f6; }
.badge-arrived    { background: #f0fdf4; color: #22c55e; }
.badge-in_progress{ background: #fff7ed; color: var(--primary); }
.badge-completed  { background: #f0fdf4; color: #22c55e; }
.badge-cancelled  { background: #fef2f2; color: var(--danger); }
.badge-approved   { background: #f0fdf4; color: #22c55e; }
.badge-suspended  { background: #fef2f2; color: var(--danger); }
.badge-active     { background: #f0fdf4; color: #22c55e; }
.badge-online     { background: #f0fdf4; color: #22c55e; }

/* ---- ONLINE TOGGLE ---- */
.toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.toggle {
    position: relative;
    width: 52px; height: 28px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 28px;
    cursor: pointer;
    transition: background var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(24px); }
.toggle input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* ---- MAP ---- */
.map-container {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.leaflet-container { background: #f1f3f5 !important; font-family: inherit; }
.leaflet-control-attribution { font-size: 9px !important; opacity: 0.5; }
.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

/* ---- BOTTOM SHEET ---- */
.bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
    z-index: 90;
    padding: 20px 16px calc(var(--bottom-nav) + 16px);
    max-height: 70vh;
    overflow-y: auto;
}
.sheet-handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}

/* ---- SECTION TITLE ---- */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title a { font-size: 13px; font-weight: 500; color: var(--primary); text-decoration: none; }

/* ---- DRIVER CARD ---- */
.driver-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}
.driver-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border);
}
.driver-avatar img { width: 100%; height: 100%; object-fit: cover; }
.driver-info { flex: 1; min-width: 0; }
.driver-name { font-weight: 600; font-size: 14px; }
.driver-detail { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.driver-rating {
    display: flex; align-items: center; gap: 3px;
    font-size: 12px; font-weight: 600; color: var(--warning);
}

/* ---- FARE DISPLAY ---- */
.fare-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fare-amount { font-size: 32px; font-weight: 800; color: var(--primary); }
.fare-meta { font-size: 12px; color: var(--text-2); text-align: right; line-height: 1.6; }

/* ---- EARNINGS CARD ---- */
.earnings-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}
.earnings-amount { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.earnings-label  { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* ---- LIST ITEMS ---- */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--text-2);
}
.list-icon.primary { background: var(--primary-light); color: var(--primary); }
.list-icon.success { background: #f0fdf4; color: var(--success); }
.list-icon.danger  { background: #fef2f2; color: var(--danger); }

/* ---- FLASH TOAST ---- */
.toast {
    position: fixed;
    top: 72px; left: 50%; transform: translateX(-50%);
    z-index: 999;
    background: var(--text);
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.2s ease forwards;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info    { background: var(--info); }
@keyframes toastIn {
    from { opacity: 0; top: 60px; }
    to   { opacity: 1; top: 72px; }
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-2);
}
.empty-state svg { width: 56px; height: 56px; opacity: 0.3; margin-bottom: 12px; }
.empty-state h3  { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p   { font-size: 13px; }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-text {
    text-align: center; position: relative;
    color: var(--text-3); font-size: 12px;
}
.divider-text::before, .divider-text::after {
    content: ''; position: absolute;
    top: 50%; width: calc(50% - 24px);
    height: 1px; background: var(--border);
}
.divider-text::before { left: 0; }
.divider-text::after  { right: 0; }

/* ---- RADIO CARDS ---- */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    display: flex; align-items: center; gap: 10px;
}
.radio-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}
.radio-card input { accent-color: var(--primary); }
.radio-card-label { font-size: 13px; font-weight: 500; }

/* ---- SOS BUTTON ---- */
.sos-btn {
    width: 100%;
    padding: 13px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: var(--radius);
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background var(--transition);
}
.sos-btn:hover { background: #fee2e2; }

/* ---- CALL MODAL ---- */
.call-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 500;
}
.call-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    width: 260px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.call-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700;
    margin: 0 auto 12px;
    border: 3px solid var(--border);
}
.call-end-btn {
    width: 56px; height: 56px;
    background: var(--danger);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 20px auto 0;
    cursor: pointer;
    transition: background var(--transition);
}
.call-end-btn:hover { background: #dc2626; }

/* ---- OFFLINE BANNER ---- */
.offline-banner {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--warning);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    z-index: 99;
    display: none;
}

/* ---- LOADING SKELETON ---- */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ---- INPUT AUTOFILL ---- */
input:-webkit-autofill,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
}

/* ---- MAP FULL PAGES ---- */
.map-page { height: calc(100vh - var(--nav-height)); position: relative; }
.map-fill  { width: 100%; height: 100%; }

/* ---- QUICK REPLY BUTTONS ---- */
.qr-btn:active { transform: scale(0.95); background: var(--primary-light) !important; border-color: var(--primary) !important; }

/* ---- CONNECTION BANNER ---- */
#connectionBanner { pointer-events: none; }
