:root {
  --green: #0b3d2e; --green-2: #12573f; --gold: #f2b705; --ink: #111; --muted: #5d6b66; --bg: #f4f6f5;
  --card: #fff; --line: #dfe5e2; --red: #c62828; --ok: #1b7f4c; --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.hidden { display: none !important; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--green); color: #fff; position: sticky; top: 0; z-index: 1000; }
.brand { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.brand small { font-weight: 500; color: var(--gold); font-size: 13px; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--gold); color: var(--green); font-weight: 900; }
.who { font-size: 13px; display: flex; gap: 10px; align-items: center; }
.who button { background: transparent; color: #fff; border: 1px solid #ffffff66; border-radius: 8px; padding: 6px 10px; min-height: 36px; }
.banner { background: #fff4cc; color: #5a4500; font-size: 13px; padding: 8px 16px; border-bottom: 1px solid #f0dc8a; }
main { max-width: 760px; margin: 0 auto; padding: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
h2 { margin: 4px 0 10px; font-size: 20px; }
h3 { margin: 4px 0 8px; font-size: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 44px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 11px 14px; min-height: 44px; }
.btn, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; border-radius: 10px; padding: 11px 14px; min-height: 44px; cursor: pointer; font: inherit; background: var(--green); color: #fff; font-weight: 700; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--green); }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.red { background: var(--red); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > .btn[style*="flex:0"], .row > button[style*="flex:0"], .row > .chip[style*="flex:0"] { width: auto; flex: 0 0 auto; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #eef3f1; color: var(--green); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 600; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.muted { color: var(--muted); font-size: 13px; }
.big { font-size: 28px; font-weight: 800; }
.pin { font-size: 40px; letter-spacing: 10px; font-weight: 900; color: var(--green); text-align: center; }
.fare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.fare-grid div { background: #f2f6f4; border-radius: 10px; padding: 8px; }
.fare-grid b { display: block; font-size: 18px; }
#map { height: 42vh; min-height: 260px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 12px; z-index: 1; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; position: relative; overflow: hidden; }
.offer .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold); transition: width 1s linear; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #eef3f1; color: var(--green); margin-left: 4px; }
.badge.red { background: #fde7e7; color: var(--red); }
.badge.gold { background: #fff4cc; color: #6b5200; }
.status { font-weight: 800; color: var(--green-2); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.tabs button { background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.tabs button.on { background: var(--green); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 2000; max-width: 92vw; }
.toast.err { background: var(--red); }
.sos { position: fixed; right: 16px; bottom: 16px; z-index: 1500; background: var(--red); color: #fff; font-weight: 900; border-radius: 999px; width: 64px; height: 64px; box-shadow: 0 4px 14px #0004; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.switch input { width: 22px; height: 22px; min-height: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stats div { background: #f2f6f4; border-radius: 10px; padding: 10px; }
.stats b { display: block; font-size: 22px; }
.pick-mode { outline: 3px solid var(--gold); }
.getapp { color: var(--gold); font-weight: 700; font-size: 14px; text-decoration: none; margin-left: auto; margin-right: 12px; white-space: nowrap; }
/* v0.2: request steps, account, photos, dialogs */
textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 80px; resize: vertical; }
.steps { display: flex; gap: 4px; margin-bottom: 10px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--gold); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 8px 0; }
.kv span:nth-child(odd) { color: var(--muted); }
.face { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eef3f1; flex: 0 0 64px; }
.stop { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.stop select { flex: 0 0 120px; }
.dialog { position: fixed; inset: 0; background: #0008; display: grid; place-items: center; z-index: 3000; padding: 16px; }
.dialog .card { max-width: 420px; width: 100%; }
.warn { background: #fff4cc; border: 1px solid #f0dc8a; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.footer { text-align: center; font-size: 13px; padding: 16px; }
.footer a { color: var(--muted); margin: 0 8px; }

.logo-img { width: 32px; height: 32px; border-radius: 8px; display: inline-block; vertical-align: middle; object-fit: cover; }

/* v0.4 Waze & Google Maps HUD, Search Autocomplete, WhatsApp Card */
.map-wrap { position: relative; margin-bottom: 12px; }
.map-wrap #map { margin-bottom: 0; }
.map-hud-top { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 6px; flex-wrap: wrap; }
.map-hud-bot { position: absolute; bottom: 12px; right: 10px; z-index: 500; display: flex; gap: 6px; align-items: center; }
.map-pill { background: rgba(255,255,255,.95); color: var(--green); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700; min-height: 34px; box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.map-pill.on { background: var(--green); color: #fff; border-color: var(--green); }
.map-pill.warn { background: #f2b705; color: #0b3d2e; border-color: #d6a200; }
.speed-pill { background: #0b3d2e; color: #f2b705; border-radius: 12px; padding: 5px 10px; font-weight: 900; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.nav-banner { background: linear-gradient(135deg, #0b3d2e, #12573f); color: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.nav-banner .nav-step { font-size: 17px; font-weight: 800; color: #fff; }
.nav-banner .nav-meta { font-size: 12px; color: #d6ebe2; margin-top: 3px; }
.hazard-strip { background: #fff4cc; border: 1px solid #f0c94a; color: #5a4300; border-radius: 10px; padding: 9px 12px; margin: 8px 0; font-size: 13px; font-weight: 600; }
.place-results { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 4px; max-height: 210px; overflow-y: auto; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.place-item { padding: 9px 12px; border-bottom: 1px solid #eef2f0; cursor: pointer; font-size: 14px; }
.place-item:last-child { border-bottom: 0; }
.place-item:hover { background: #f2f7f5; }
.place-item small { display: block; color: var(--muted); font-size: 12px; }
.wa-card { background: linear-gradient(135deg, #075e54, #128c7e); color: #fff; border: 0; }
.wa-card h3, .wa-card p, .wa-card label { color: #fff; }
.wa-card .muted { color: #d9f7ef; }
.badge.green { background: #e4f6ec; color: #0e6939; }

/* v0.5 Voice Assistant Bar & Analytics Visuals */
.voice-card { background: linear-gradient(135deg, #0b3d2e 0%, #155c44 100%); color: #fff; border: 0; }
.voice-card h3, .voice-card p { color: #fff; }
.voice-card .muted { color: #d5ece3; }
.mic-btn { background: #f2b705; color: #0b3d2e; font-weight: 800; border-radius: 999px; padding: 10px 16px; display: inline-flex; align-items: center; gap: 8px; }
.mic-btn.listening { background: #ff5252; color: #fff; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi-box { background: #f4f8f6; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi-box small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.kpi-box b { display: block; font-size: 20px; color: var(--green); margin-top: 2px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 13px; }
.bar-track { flex: 1; background: #e8efec; height: 12px; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #0b3d2e, #1b7f4c); border-radius: 999px; }
.insight-card { border-left: 4px solid var(--green); background: #f8fbf9; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.insight-card.HIGH { border-left-color: #c62828; background: #fff7f7; }
.insight-card.MED { border-left-color: #f2b705; background: #fffdf2; }

/* v0.7.0 Live Tracking, WhatsApp Safety Share, Rider Pickup Beacon & Turn-by-Turn Nav */
.hidden { display: none !important; }
.track-body { background: #f3f7f5; }
.track-main { max-width: 720px; margin: 0 auto; padding: 10px 12px 28px; }
.track-map-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(11, 61, 46, .12); }
.track-map { height: 48vh; min-height: 300px; max-height: 460px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; }
.live-pill.live { background: #16a34a; color: #fff; }
.live-pill.done { background: #0e7c47; color: #fff; }
.live-pill.sos { background: #dc2626; color: #fff; animation: pulse 1s infinite; }
.live-pill.ended { background: #64748b; color: #fff; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; animation: pulse 1.3s infinite; }
.eta-banner { background: linear-gradient(135deg, #0b3d2e, #155c44); color: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(11, 61, 46, .18); }
.eta-banner .eta-main { font-size: 16px; font-weight: 800; color: #fff; }
.eta-banner .eta-sub { font-size: 12px; color: #cbe6da; margin-top: 3px; }
.sos-alert-banner { background: linear-gradient(135deg, #b71c1c, #dc2626); color: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(183, 28, 28, .3); }
.route-summary { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.route-row { display: flex; gap: 10px; align-items: flex-start; }
.route-row .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: 0 0 12px; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.12); }
.route-row .dot.green { background: #0b3d2e; }
.route-row .dot.gold { background: #f2b705; }
.route-row .dot.purple { background: #7b1fa2; }
.route-row small { display: block; font-size: 10px; letter-spacing: .04em; font-weight: 700; }
.journey-stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e7efeb; text-align: center; }
.js-step { position: relative; font-size: 11px; color: var(--muted); }
.js-dot { width: 12px; height: 12px; border-radius: 50%; background: #d5e0db; margin: 0 auto 5px; border: 2px solid #fff; box-shadow: 0 0 0 2px #d5e0db; }
.js-step.done .js-dot { background: #16a34a; box-shadow: 0 0 0 2px #16a34a; }
.js-step.active .js-dot { background: #f2b705; box-shadow: 0 0 0 3px rgba(242,183,5,.38); animation: pulse 1.2s infinite; }
.js-step.active .js-lbl { color: var(--green); font-weight: 800; }
.js-time { font-size: 10px; color: var(--muted); margin-top: 2px; }
.plate-pill { background: #f4f8f6; border: 2px solid var(--green); color: var(--green); font-weight: 900; font-size: 18px; letter-spacing: .06em; padding: 6px 12px; border-radius: 10px; display: inline-block; }
.wa-btn { background: #25d366 !important; color: #053219 !important; font-weight: 800 !important; border: 0 !important; }
.wa-btn:hover { background: #1fb858 !important; }
.safety-share-card { background: linear-gradient(135deg, #075e54, #0f766e); color: #fff; border: 0; }
.safety-share-card h3, .safety-share-card p, .safety-share-card b { color: #fff; }
.safety-share-card .muted { color: #d1fae5; }
.live-rider-banner { background: #e0f7fa; border: 1px solid #4dd0e1; color: #004d5a; border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.nav-phase-pill { display: inline-block; background: #f2b705; color: #0b3d2e; font-size: 11px; font-weight: 900; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; margin-bottom: 5px; }
.nav-arrow { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 22px; flex: 0 0 42px; }
.rt-pin-wrap, .rt-car-wrap { background: transparent; border: 0; }
.rt-pin { width: 32px; height: 32px; border-radius: 50%; background: var(--pin-c, #0b3d2e); color: #fff; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.28); display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.rt-pin-pulse { animation: rtRipple 1.6s infinite; }
.rt-car-dot { position: absolute; inset: 4px; border-radius: 50%; background: #1565c0; color: #fff; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(21,101,192,.45); display: grid; place-items: center; font-size: 17px; }
.rt-car-halo { position: absolute; inset: -4px; border-radius: 50%; background: rgba(21,101,192,.28); animation: rtRipple 1.8s infinite; }
.rt-car-arrow { position: absolute; inset: -5px; text-align: center; font-size: 11px; color: #f2b705; text-shadow: 0 1px 3px #000; pointer-events: none; z-index: 3; }
.night-tiles { filter: invert(92%) hue-rotate(180deg) brightness(95%) contrast(90%); }
@keyframes rtRipple { 0% { box-shadow: 0 0 0 0 rgba(0, 151, 167, .55); } 70% { box-shadow: 0 0 0 14px rgba(0, 151, 167, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 151, 167, 0); } }
