/* Ride mini app — light by default (follows Telegram's theme), clear street map. */
:root {
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #f1f4f8; --line: rgba(15, 23, 42, .09);
  --text: #0f172a; --muted: #64748b; --accent: #ffbf00; --accent-ink: #1a1400; --accent-soft: rgba(255, 191, 0, .16);
  --green: #16a34a; --red: #dc2626; --blue: #2563eb; --amber: #f59e0b;
  --shadow: 0 10px 30px rgba(15, 23, 42, .12); --radius: 22px; --safe-b: env(safe-area-inset-bottom, 0px);
}
body.dark {
  --bg: #0b0f17; --panel: #121826; --panel-2: #182032; --line: rgba(255, 255, 255, .08);
  --text: #f4f6fa; --muted: #98a2b8; --accent-soft: rgba(255, 196, 0, .14); --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Vazirmatn, system-ui, sans-serif; overflow: hidden; }
button, input, select, textarea { font-family: inherit; color: inherit; font-size: 15px; }
button { cursor: pointer; }
.hidden { display: none !important; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1;
  display: inline-block; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; vertical-align: middle; }

/* ------------------------------------------------------------------ map */
#map { position: fixed; inset: 0; z-index: 0; background: #e8eef3; }
body.dark #map { background: #1b1f27; }
.maplibregl-ctrl-attrib { font-size: 9px; }
.maplibregl-ctrl-bottom-right { bottom: auto; top: 64px; }
.mk-me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, .22), 0 2px 6px rgba(0, 0, 0, .3); }
.mk-tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--panel); color: var(--text); padding: 3px 8px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); }
.tip-on .mk-tip { display: block; }
.fab { position: fixed; left: 14px; top: 68px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--panel); color: var(--blue); box-shadow: var(--shadow); display: grid; place-items: center; }
.top-actions { display: flex; gap: 6px; }
.pill-btn.icon-only { padding: 0 10px; }
.mk { display: grid; place-items: center; }
.mk-origin { width: 22px; height: 22px; border-radius: 50%; background: #0f172a; box-shadow: 0 0 0 5px rgba(15, 23, 42, .18); }
.mk-origin::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.mk-dest .ms, .mk-stop .ms { font-size: 44px; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .35)); }
.mk-dest .ms { color: var(--red); }
.mk-stop .ms { color: var(--amber); font-size: 36px; }
.mk-car { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 7px rgba(255, 191, 0, .25), 0 6px 14px rgba(0, 0, 0, .3); }
.mk-car .ms { font-size: 24px; }
.mk-car.stale { opacity: .45; filter: grayscale(.6); }
#center-pin { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -100%); z-index: 5; pointer-events: none; }
#center-pin .ms { font-size: 54px; color: var(--red); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }

/* ------------------------------------------------------------------ top bar & bottom nav */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; pointer-events: none; }
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; background: var(--panel); padding: 6px 12px 6px 8px; border-radius: 16px; box-shadow: var(--shadow); }
.brand b { font-weight: 900; letter-spacing: .5px; }
.logo { width: 30px; height: 30px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo .ms { font-size: 20px; }
.pill-btn { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 14px; border: 0;
  background: var(--panel); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; }
#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; background: var(--panel); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-b)); }
#nav button { flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted); padding: 4px 0; }
#nav button .ms { font-size: 24px; }
#nav button.on { color: var(--text); font-weight: 700; }
#nav button.on .ms { color: var(--accent-ink); background: var(--accent); border-radius: 12px; padding: 2px 14px; }
body.has-nav .sheet { bottom: calc(60px + var(--safe-b)); }
body.has-nav .page { bottom: calc(60px + var(--safe-b)); }

/* ------------------------------------------------------------------ sheet & pages */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-height: 62vh; overflow-y: auto; background: var(--panel);
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -10px 30px rgba(15, 23, 42, .12); padding: 8px 16px 18px; }
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.page { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; }
.page header { display: flex; align-items: center; gap: 10px; padding: 64px 16px 10px; background: var(--bg); }
.page header b { font-size: 20px; flex: 1; font-weight: 800; }
.page .body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
h2 { margin: 2px 0 10px; font-size: 19px; font-weight: 800; }
h3 { margin: 16px 0 8px; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-top: 10px; }
.sheet .card { background: var(--panel-2); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* route box */
.route-box { background: var(--panel-2); border-radius: 18px; padding: 2px 12px; }
.route-row { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.route-row:last-child { border-bottom: 0; }
.route-row .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.o { background: #0f172a; box-shadow: 0 0 0 4px rgba(15, 23, 42, .12); }
body.dark .dot.o { background: #fff; }
.dot.s { background: var(--amber); }
.dot.d { background: var(--red); }
.route-row .label { flex: 1; min-width: 0; }
.route-row .label small { display: block; color: var(--muted); font-size: 11.5px; }
.route-row .label span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-row .label span.ph { color: var(--muted); }
.route-row.active { background: var(--accent-soft); margin: 0 -12px; padding: 0 12px; }
.route-row .x { color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px;
  display: flex; align-items: center; gap: 5px; }
.sheet .chip { background: var(--panel-2); border-color: transparent; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.chip .ms { font-size: 18px; }
.vehicles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.veh { border: 2px solid transparent; background: var(--panel-2); border-radius: 12px; padding: 6px 10px; text-align: right; display: flex; align-items: center; gap: 8px; }
.veh.on { border-color: var(--accent); background: var(--accent-soft); }
.veh .ms { font-size: 22px; }
.veh b { font-size: 14px; }
.veh small { display: none; }
.field { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; min-height: 48px; margin-top: 8px; }
.page .field { background: var(--panel); }
.field input, .field select, .field textarea { flex: 1; background: transparent; border: 0; outline: 0; min-width: 0; height: 46px; }
.field textarea { height: 90px; padding: 10px 0; resize: vertical; }
.field label { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.results .result { display: flex; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.result .ms { color: var(--muted); }
.result b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote { display: flex; align-items: center; justify-content: space-between; background: var(--panel-2); border-radius: 18px; padding: 12px 14px; }
.quote .price { font-size: 25px; font-weight: 900; }
.quote .meta { color: var(--muted); font-size: 12.5px; }
.stepper { display: flex; gap: 8px; }
.stepper button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 20px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.sheet-footer { position: sticky; bottom: -18px; margin: 10px -16px -18px; padding: 8px 16px 18px; background: var(--panel); border-top: 1px solid var(--line); }

.btn { width: 100%; height: 52px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.btn:disabled { opacity: .45; }
.btn.ghost { background: var(--panel-2); color: var(--text); font-weight: 700; }
.page .btn.ghost { background: var(--panel); border: 1px solid var(--line); }
.btn.danger { background: rgba(220, 38, 38, .1); color: var(--red); }
.btn.green { background: var(--green); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.sm { height: 42px; font-size: 14px; margin-top: 8px; border-radius: 13px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 700; padding: 4px; }

.status { display: flex; align-items: center; gap: 12px; }
.status .badge { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: #b58300; flex: none; }
.status .badge.g { background: rgba(22, 163, 74, .12); color: var(--green); }
.status .badge.r { background: rgba(220, 38, 38, .12); color: var(--red); }
.status .badge.b { background: rgba(37, 99, 235, .12); color: var(--blue); }
.status b { font-size: 18px; display: block; }
.steps { display: flex; gap: 6px; margin: 12px 0 2px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--accent); }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.driver-card { display: flex; gap: 12px; align-items: center; background: var(--panel-2); border-radius: 18px; padding: 10px; margin-top: 12px; }
.driver-card img { width: 86px; height: 70px; border-radius: 13px; object-fit: cover; background: var(--line); flex: none; }
.plate { display: inline-block; direction: ltr; background: #fff; color: #111; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 8px;
  font-weight: 800; font-size: 13px; letter-spacing: 1px; margin-top: 4px; border-right: 6px solid #1e40af; }
.rating { color: #b58300; font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 14px; margin-top: 10px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.stars { display: flex; gap: 6px; justify-content: center; margin: 10px 0; direction: ltr; }
.stars button { background: none; border: 0; padding: 0; }
.stars .ms { font-size: 44px; color: var(--line); }
.stars .ms.on { color: var(--accent); }
.switch { position: relative; width: 60px; height: 34px; border-radius: 17px; background: #cbd5e1; border: 0; flex: none; transition: .2s; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--green); }
.switch.on::after { left: 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.sheet .stat { background: var(--panel-2); border: 0; }
.stat b { display: block; font-size: 19px; font-weight: 900; }
.stat small { color: var(--muted); font-size: 11.5px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; direction: ltr; }
.bar .track { flex: 1; background: var(--line); border-radius: 4px; height: 8px; overflow: hidden; }
.bar i { display: block; height: 8px; background: var(--accent); }
.progress { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 8px 0; direction: ltr; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9f00); }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.check .ms { font-size: 20px; color: var(--line); }
.check.done .ms { color: var(--green); }
.list-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; }
.list-item .ic { width: 40px; height: 40px; border-radius: 13px; background: var(--panel-2); display: grid; place-items: center; flex: none; }
.page .list-item .ic { background: var(--panel); border: 1px solid var(--line); }
.list-item .grow b { display: block; font-size: 14.5px; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.tag.g { background: rgba(22, 163, 74, .12); color: var(--green); }
.tag.r { background: rgba(220, 38, 38, .12); color: var(--red); }
.tag.y { background: var(--accent-soft); color: #9a6b00; }
.seg { display: flex; background: var(--panel-2); border-radius: 13px; padding: 3px; gap: 3px; }
.page .seg { background: var(--panel); border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: none; height: 36px; border-radius: 10px; font-size: 13.5px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.photos figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: var(--line); }
.timeline div { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.timeline time { color: var(--muted); margin-left: 8px; direction: ltr; display: inline-block; }

/* chat */
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.6; word-wrap: break-word; }
.msg.me { align-self: flex-start; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-end; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg time { display: block; font-size: 10.5px; opacity: .6; margin-top: 2px; }
.composer { padding: 8px 12px calc(10px + var(--safe-b)); background: var(--panel); border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 8px; }
.composer input { flex: 1; height: 46px; border-radius: 23px; border: 1px solid var(--line); background: var(--panel-2); padding: 0 16px; outline: 0; }
.composer button.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.composer .chips { margin-bottom: 8px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.empty .ms { font-size: 46px; display: block; margin-bottom: 6px; opacity: .5; }

/* modal, toast, loading */
.modal-bg { position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; }
.modal { width: 100%; background: var(--panel); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); max-height: 85vh; overflow-y: auto; }
.toast { position: fixed; left: 16px; right: 16px; top: 66px; z-index: 80; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow); }
.toast.err { border-color: rgba(220, 38, 38, .45); color: var(--red); }
.loading { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ------------------------------------------------------------------ round 4 */
.choices { display: grid; gap: 8px; margin: 10px 0; }
.choice { text-align: right; border: 1px solid var(--line); background: var(--panel-2); border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; }
.choice b { font-size: 15px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.choice:active { background: var(--accent-soft); }
.add-next { width: 100%; margin-top: 8px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; text-align: right;
  border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: 16px; padding: 10px 14px; font-weight: 800; }
.add-next .ms { grid-row: span 2; color: #c98a00; font-size: 26px; }
.add-next small { font-weight: 400; color: var(--muted); font-size: 12px; }
.ring-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.ring { --p: 0; width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
.ring b { width: 60px; height: 60px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 17px; font-weight: 900; }
.ad { position: relative; display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-radius: 16px; padding: 8px; margin-bottom: 10px; overflow: hidden; cursor: pointer; }
.ad img { width: 100%; max-height: 120px; object-fit: cover; border-radius: 12px; }
.ad img + span { position: absolute; bottom: 10px; right: 12px; left: 12px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); font-weight: 700; }
.ad span { font-size: 14px; }
.ad i { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 10px; background: rgba(0, 0, 0, .45); color: #fff; padding: 1px 6px; border-radius: 6px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 6px; font-size: 14px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-line a { color: var(--blue); }
.sel-box { width: 22px; height: 22px; accent-color: var(--red); flex: none; }
.timeline .ev { display: flex; gap: 6px; align-items: flex-start; }
.timeline .ev .grow { flex: 1; }
.timeline .ev button { border: 0; background: none; color: var(--muted); padding: 0 4px; }

/* ------------------------------------------------------------------ chat attachments, notifications (round 5) */
.msg .att { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin-bottom: 4px; object-fit: cover; }
.msg.sys { align-self: center; max-width: 92%; background: var(--panel-2); color: var(--muted); font-size: 12.5px; text-align: center; border-radius: 12px; }
.att-voice, .att-loc { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 8px 12px; background: rgba(0, 0, 0, .07); color: inherit; font-size: 14px; margin-bottom: 4px; width: 100%; text-align: right; }
.att-loc small { display: block; opacity: .7; font-size: 11px; direction: ltr; }
.att-loc.live .ms { color: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.composer form { align-items: center; }
.att-btn { width: 40px; height: 46px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; padding: 0; }
.att-btn.rec { color: var(--red); animation: pulse 1s infinite; }
#live-pill { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 50%; transform: translateX(-50%); z-index: 90; border: 0; border-radius: 20px; background: var(--red); color: #fff; padding: 8px 16px; font-size: 13px; box-shadow: var(--shadow); }
.zoom-bg { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .88); display: grid; place-items: center; }
.zoom-bg img { max-width: 100%; max-height: 100%; }
.chk { display: grid; place-items: center; padding: 0 6px; }
.chk input { width: 20px; height: 20px; }
.card.note.new { border-color: var(--accent); background: var(--accent-soft); }
#bell { position: relative; }
#bell .cnt { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-style: normal; display: none; place-items: center; padding: 0 4px; }
#bell.has .cnt { display: grid; }

#adbar { position: fixed; top: 62px; left: 12px; right: 12px; height: var(--adh, 44px); z-index: 35; }
.adx .ad { height: 100%; margin: 0; padding: 0; border-radius: var(--adr, 14px); border: 1px solid var(--line); color: var(--text); font-weight: 700;
  background: linear-gradient(90deg, var(--accent-soft), var(--panel) 55%); box-shadow: 0 4px 14px rgba(15, 23, 42, .10); }
.adx .ad::before { content: ''; position: absolute; inset: 0 0 0 auto; width: 4px; background: var(--accent); z-index: 2; }
.adx .ad::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 38%, rgba(255, 191, 0, .28) 50%, transparent 62%);
  transform: translateX(-120%); animation: adshine 4.2s ease-in-out infinite; pointer-events: none; }
.adx .ad img { width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: cover; }
.adx .ad img + span { position: absolute; inset: auto 0 0 0; padding: 12px 14px 3px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; text-shadow: none; font-size: 12px; }
.adx .ad > span { flex: 1; min-width: 0; padding: 0 16px 0 52px; font-size: var(--adsz, 14px); line-height: 1.35; overflow: hidden; text-align: start;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.adx .ad > span.mq { display: block; white-space: nowrap; }
.adx .ad > span.mq b { display: inline-block; padding-inline-start: 100%; font-weight: 800; animation: admq var(--adsp, 12s) linear infinite; }
.adx .ad i { top: 50%; left: 8px; transform: translateY(-50%); z-index: 2; background: var(--accent); color: var(--accent-ink); font-size: 10px; padding: 2px 7px; border-radius: 7px; font-weight: 800; }
.adx .ad-x { position: absolute; top: -7px; right: -5px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.adx .ad-x .ms { font-size: 14px; }
body.has-ad .page header { padding-top: calc(72px + var(--adh, 44px)); }
body.has-ad .fab { top: calc(72px + var(--adh, 44px)); }
@keyframes adshine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes admq { 0% { transform: translateX(0); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .adx .ad::after, .adx .ad > span.mq b { animation: none; } }

/* countdown for requests that wait for a driver */
.tmr { margin: 10px 0 4px; }
.tmr-top { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tmr-top .ms { font-size: 17px; }
.tmr-t { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--text); font-size: 15px; direction: ltr; }
.tmr-line { height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin-top: 5px; }
.sheet .tmr-line { background: var(--line); }
.tmr-line i { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--green); transition: width 1s linear, background .4s; will-change: width; }
.tmr.mid .tmr-line i { background: var(--amber); }
.tmr.low .tmr-line i { background: var(--red); }
.tmr.low .tmr-t { color: var(--red); }

/* admin: banner preview and crop editor */
.adprev { position: relative; height: var(--adh, 44px); margin: 8px 0 12px; }
.adcrop { display: grid; gap: 6px; margin: 6px 0 4px; }
.adcrop label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.adcrop input[type=range] { flex: 1; }
.adcrop canvas { width: 100%; aspect-ratio: 8 / 1; border-radius: 10px; border: 1px dashed var(--line); background: var(--panel-2); }

/* round 6d: reports, bars, checkboxes, login */
.big { font-size: 26px; font-weight: 800; margin: 4px 0 10px; }
.card.slim { padding: 10px 12px; margin-bottom: 8px; }
.bt { height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin: 6px 0 4px; }
.bt i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.bar-row .bt { margin: 0; height: 10px; }
.bar-row .bl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checks { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chk input { width: 18px; height: 18px; }
.tag.ok { background: rgba(34, 197, 94, .18); color: #16a34a; }
.big-logo { width: 72px; height: 72px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 20px; }
.big-logo .ms { font-size: 38px; }
/* shared-ride screens */
.shtag { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--text); border-radius: 20px; padding: 2px 12px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.shtag .ms { font-size: 17px; }
.pax { border-top: 1px solid var(--line); padding: 8px 0 4px; margin-top: 6px; }
.pax .row { cursor: pointer; align-items: center; gap: 8px; }
.card.running { border: 1px solid var(--accent); }
.btn.inline { width: auto; display: inline-flex; padding: 4px 12px; margin: 0; }
details > summary { cursor: pointer; padding: 4px 0; }
.btn[disabled] { opacity: .55; }

/* touch time picker */
.tp-field { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--text); font: inherit; cursor: pointer; }
.tp-field b { font-size: 20px; flex: 1; text-align: start; }
.tp-field small { color: var(--muted); font-size: 11px; }
.tp-wheels { position: relative; display: flex; justify-content: center; gap: 8px; direction: ltr; margin: 6px 0 10px; }
.tp-wheels::before { content: ''; position: absolute; left: 12px; right: 12px; top: 88px; height: 44px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--accent); pointer-events: none; }
.tp-wheel { position: relative; width: 38%; max-width: 140px; height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 88px 0; box-sizing: border-box;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.tp-wheel::-webkit-scrollbar { display: none; }
.tp-it { height: 44px; line-height: 44px; text-align: center; font-size: 24px; font-weight: 700; scroll-snap-align: center; color: var(--muted); cursor: pointer; position: relative; z-index: 1; }
.tp-it.on { color: var(--text); font-size: 28px; }
.tp-sep { align-self: center; font-size: 30px; font-weight: 800; position: relative; z-index: 1; }
.row-between{display:flex;justify-content:space-between;align-items:center;gap:8px}
.driver-acc{cursor:pointer}

/* banner options set by the admin */
#adbar[data-pos='0'] .ad { align-items: flex-start; } #adbar[data-pos='0'] .ad > span { padding-top: 4px; }
#adbar[data-pos='2'] .ad { align-items: flex-end; } #adbar[data-pos='2'] .ad > span { padding-bottom: 4px; }
#adbar[data-pos='0'] .ad img + span { inset: 0 0 auto 0; padding: 3px 14px 12px; background: linear-gradient(rgba(0,0,0,.65), transparent); }
#adbar[data-pos='1'] .ad img + span { inset: 0; display: flex; align-items: center; background: rgba(0,0,0,.35); }
#adbar[data-dir='1'] .ad > span.mq b { animation-direction: reverse; }
.adx .ad > span.mq.pp b { padding-inline-start: 0; animation: admpp var(--adsp, 12s) ease-in-out infinite alternate; }
@keyframes admpp { 0%, 12% { transform: translateX(0); } 88%, 100% { transform: translateX(var(--adov, 0px)); } }
#adbar[data-bold='0'] .ad, #adbar[data-bold='0'] .ad > span.mq b { font-weight: 500; }
#adbar[data-shine='0'] .ad::after { display: none; }
#adbar[data-bg='1'] .ad { background: var(--accent); } #adbar[data-bg='1'] .ad > span { color: var(--accent-ink); }
#adbar[data-bg='2'] .ad { background: #151a26; } #adbar[data-bg='2'] .ad > span { color: #fff; }
#adbar[data-bg='3'] .ad { background: #fff; } #adbar[data-bg='3'] .ad > span { color: #111; }
#adbar[data-col='1'] .ad > span { color: #fff; } #adbar[data-col='2'] .ad > span { color: #111; } #adbar[data-col='3'] .ad > span { color: #ffbf00; }
