:root {
  /* Bhaiya Cab brand palette */
  --brand: #FFC21A;      /* Bhaiya Yellow */
  --brand-ink: #1B1F2A;  /* Road Ink */
  --saffron: #FF7A1A;    /* Saffron accent */
  --cream: #FFF6E0;      /* Chai Cream */
  --gamcha: #E03E3E;     /* Gamcha Red */
  --ink: #1B1F2A;
  --ink-2: #4b5160;
  --ink-3: #8a90a0;
  --line: #e6e8ee;
  --bg: #FBF8F1;
  --card: #ffffff;
  --ok: #12a150;
  --ok-bg: #e7f7ee;
  --warn: #c77700;
  --warn-bg: #fff4e0;
  --bad: #d93636;
  --bad-bg: #fdecec;
  --info: #2463eb;
  --info-bg: #e9f0ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --display: "Poppins", "Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-family: "Mukta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); min-height: 100%; }
body { font-size: 15px; line-height: 1.45; }
a { color: var(--info); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-family: var(--display); font-weight: 700; letter-spacing: -.3px; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
.muted { color: var(--ink-3); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- top bar & layout ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--brand); color: var(--ink); padding: 8px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 3px solid var(--ink); }
.topbar .sp { flex: 1; }
.topbar button { background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 5px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.topbar a:not(.btn) { color: var(--ink) !important; font-weight: 600; }
/* logo lockup: cab mark + wordmark */
.brandmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brandmark img { width: 40px; height: 40px; display: block; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.2px; line-height: 1; white-space: nowrap; }
.wordmark b { background: var(--ink); color: var(--brand); border-radius: 7px; padding: 1px 7px 0; margin-left: 4px; font-weight: 800; }
.wordmark small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .3px; opacity: .75; margin-top: 3px; }
.wordmark.light { color: #fff; } .wordmark.light b { background: var(--brand); color: var(--ink); }
.page { max-width: 560px; margin: 0 auto; padding: 14px 14px 90px; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav .inner { display: flex; max-width: 560px; width: 100%; }
.bottomnav button { flex: 1; background: none; border: 0; padding: 9px 4px 10px; font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.bottomnav button .ic { font-size: 20px; line-height: 1; }
.bottomnav button.on { color: var(--ink); font-weight: 600; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card h2, .card h3 { margin-top: 0; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- forms ---------- */
label.f { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { appearance: none; border: 0; border-radius: 12px; padding: 13px 16px; font: inherit; font-family: var(--display); font-size: 16px; font-weight: 700; cursor: pointer; background: var(--brand-ink); color: #fff; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .05s, opacity .15s; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.brand { background: var(--brand); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; width: auto; }
.btn.inline { width: auto; }
.linkbtn { background: none; border: 0; color: var(--info); font: inherit; cursor: pointer; padding: 0; }
.seg { display: flex; background: #eceef2; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; white-space: nowrap; border: 0; background: transparent; padding: 9px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; padding: 0; border: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cfd3dc; border-radius: 30px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span:before { transform: translateX(22px); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eceef2; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.dark { background: var(--ink); color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ink-3); }
.dot.ok { background: var(--ok); } .dot.warn { background: #f59e0b; } .dot.bad { background: var(--bad); }

/* ---------- route block ---------- */
.route { position: relative; padding-left: 22px; }
.route .pt { position: relative; padding: 2px 0 8px; }
.route .pt:before { content: ""; position: absolute; left: -18px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.route .pt.drop:before { background: var(--bad); border-radius: 2px; }
.route:before { content: ""; position: absolute; left: 8px; top: 14px; bottom: 18px; border-left: 2px dotted #c4c8d2; }
.route .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); font-weight: 700; }

/* ---------- vehicle chooser ---------- */
.vehicles { display: grid; gap: 8px; }
.veh { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.veh.on { border-color: var(--ink); background: #fffbea; }
.veh .em { font-size: 26px; width: 40px; text-align: center; }
.veh .price { font-weight: 800; font-size: 16px; }

/* ---------- map ---------- */
.map { height: 300px; border-radius: var(--radius); overflow: hidden; background: #e9edf3 repeating-linear-gradient(45deg, #e4e8ef 0 10px, #edf0f5 10px 20px); position: relative; z-index: 1; }
.map.tall { height: 420px; }
.map .nomap { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; text-align: center; padding: 20px; }
.pin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.pin.car { background: #fff; border-color: var(--brand); padding: 3px; }
.pin.car img { width: 100%; height: 100%; display: block; }
.pin.car.ride { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,122,26,.35), 0 2px 8px rgba(0,0,0,.3); }
.pin.car.off { background: #9ca3af; filter: grayscale(1); }
.pin.pick { background: var(--ok); color: #fff; width: 22px; height: 22px; font-size: 11px; }
.pin.drop { background: var(--bad); color: #fff; width: 22px; height: 22px; font-size: 11px; border-radius: 5px; }
.map-hint { position: absolute; z-index: 500; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 12px; white-space: nowrap; pointer-events: none; }

/* ---------- search suggestions ---------- */
.addr { position: relative; }
.suggest { position: absolute; z-index: 600; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; margin-top: 4px; }
.suggest div { padding: 10px 12px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f1f2f5; }
.suggest div:hover { background: #f7f8fa; }
.addr .gps { position: absolute; right: 6px; top: 6px; border: 0; background: #f1f2f5; border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 14px; }

/* ---------- ride status ---------- */
.otp { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: 8px; background: var(--ink); color: var(--brand); padding: 6px 18px 2px; border-radius: 12px; display: inline-block; }
.timeline { display: flex; gap: 4px; margin: 10px 0 4px; }
.timeline i { flex: 1; height: 5px; border-radius: 3px; background: #e3e6ec; }
.timeline i.on { background: var(--ok); }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: #e9ecf1 center/cover no-repeat; display: grid; place-items: center; font-size: 22px; flex: none; }
.plate { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 800; background: #fff8d6; border: 2px solid #222; border-radius: 6px; padding: 2px 8px; font-size: 14px; letter-spacing: 1px; }
.pulse { width: 64px; height: 64px; margin: 8px auto; border-radius: 50%; background: var(--brand); position: relative; display: grid; place-items: center; font-size: 28px; }
.pulse:after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand); animation: pulse 1.6s infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.price-big { font-size: 34px; font-weight: 800; font-family: var(--display); }
.mascot-state { width: 120px; height: 120px; margin: 4px auto 6px; position: relative; display: grid; place-items: center; }
.mascot-state img { height: 118px; width: auto; max-width: none; position: relative; z-index: 1; }
.mascot-state { height: 130px; width: 130px; }
.mascot-state.ring:before, .mascot-state.ring:after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--brand); opacity: .35; animation: pulse 1.8s infinite; }
.mascot-state.ring:after { animation-delay: .9s; }
.mascot-big { width: 160px; display: block; margin: 0 auto; }
.hinglish { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0; }

/* ---------- stars ---------- */
.stars { display: inline-flex; gap: 6px; }
.stars button { background: none; border: 0; font-size: 34px; color: #d6d9e0; cursor: pointer; padding: 0; line-height: 1; }
.stars button.on { color: #f5b301; }
.star-sm { color: #f5b301; }

/* ---------- lists ---------- */
.list > .item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.stat.hl { background: var(--brand); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- toast & modal ---------- */
#toasts { position: fixed; z-index: 9999; top: 12px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 14px; animation: drop .2s ease-out; pointer-events: auto; }
.toast b { display: block; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; z-index: 9000; background: rgba(10,12,16,.5); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; animation: up .2s ease-out; }
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 18px; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }

/* ---------- auth ---------- */
.auth-hero { background: var(--brand); color: var(--ink); padding: 26px 20px 64px; text-align: center; border-bottom: 3px solid var(--ink); }
.auth-hero .mascot { width: 120px; height: 120px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); margin: 0 auto 10px; display: grid; place-items: center; overflow: hidden; }
.auth-hero .mascot img { width: 76%; margin-top: 10px; }
.auth-hero p { color: #4a3a00; margin: 4px 0 0; font-weight: 600; }
.auth-card { max-width: 440px; margin: -36px auto 30px; }
.upload { border: 1.5px dashed #c6cad4; border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; background: #fafbfc; }
.upload img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.upload .ph { width: 48px; height: 48px; border-radius: 8px; background: #eceef2; display: grid; place-items: center; font-size: 22px; flex: none; }
.upload input { display: none; }
.upload.done { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }

/* ---------- admin layout ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 52px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 12px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow: auto; }
.side button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; gap: 10px; }
.side button.on { background: var(--brand); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.side button .n { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.main { padding: 20px; min-width: 0; }
.main > h1 { margin-bottom: 14px; }
table.t { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); background: #fafbfc; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: #fafbfc; }
.tablewrap { overflow-x: auto; border-radius: 12px; }
.livegrid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
.livegrid .map { height: calc(100vh - 240px); min-height: 420px; }
.drvlist { max-height: calc(100vh - 240px); min-height: 420px; overflow: auto; }
.drv { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.drv:hover { background: #f5f6f8; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { width: auto; padding: 8px 10px; }
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.docs a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-align: center; font-size: 12px; color: var(--ink-2); }
.docs img { width: 100%; height: 110px; object-fit: cover; display: block; background: #f1f2f5; }
.pending-card { border-left: 4px solid var(--brand); }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; overflow-x: auto; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side button { width: auto; white-space: nowrap; }
  .side .sep { display: none; }
  .livegrid { grid-template-columns: 1fr; }
  .livegrid .map { height: 360px; min-height: 0; }
  .drvlist { max-height: none; min-height: 0; }
  .main { padding: 14px; }
}

/* ---------- landing ---------- */
.hero { background: radial-gradient(1200px 400px at 70% -10%, #3a3200 0, transparent 60%), var(--brand-ink); color: #fff; padding: 56px 20px 70px; }
.hero .in { max-width: 980px; margin: 0 auto; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); max-width: 640px; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { color: #c9ccd4; max-width: 560px; font-size: 17px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.cta .btn { width: auto; padding: 14px 22px; }
.features { max-width: 980px; margin: -36px auto 40px; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.features .card .em { font-size: 28px; }
.stat.hl .l, .stat.hl .tiny { color: #3d3200; }

.area-banner { background: #fff8d6; border: 1px solid #f2dd8a; color: #5b4700; border-radius: 12px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; text-align: center; }
.leaflet-tooltip { font-weight: 700; }

.veh.on { border-color: var(--ink); background: var(--cream); }
.seg button.on { box-shadow: inset 0 0 0 2px var(--ink); }
.area-banner { background: var(--cream); border-color: #f2d27a; }
.card.row > img[alt=Bhaiya] { width: 64px; flex: none; }
.avatar img { width: 82%; height: 82%; object-fit: contain; margin-top: 6px; }
.avatar { overflow: hidden; background-color: var(--brand); }

/* OTP login sheet */
.otp-mascot { width: 84px; margin-bottom: 4px; }
.phone-in { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.phone-in span { padding: 0 12px; font-weight: 700; font-size: 18px; border-right: 2px solid var(--line); }
.phone-in input { border: 0; font-size: 20px; letter-spacing: 1px; padding: 13px 12px; }
.otp-in { font-family: var(--display); font-size: 30px; text-align: center; letter-spacing: 16px; border: 2px solid var(--ink) !important; }
.demo-otp { background: var(--cream); border: 1.5px dashed #e0a800; border-radius: 10px; padding: 8px 12px; font-size: 14px; text-align: center; margin-bottom: 10px; }
@media (max-width: 420px) { .hide-sm { display: none; } }
@media (max-width: 600px) { #map.map { height: 210px; } }

.play-banner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ink); color: #fff; }
.play-banner img { width: 36px; height: 36px; border-radius: 9px; }
.play-banner button { background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; }

.suggest div { display: flex; gap: 10px; align-items: flex-start; }
.suggest div .ic { flex: none; width: 20px; text-align: center; }
.suggest div small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.3; margin-top: 1px; }
.suggest div.none { color: var(--ink-3); cursor: default; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
