/* Fast Track web booking — the v3 customer app's look (FTTheme.swift tokens).
   navy #0E366D · navySoft #1D519C · navyDeep #09254F · yellow #F6B121 · yellowDeep #EC9C0B · yellowWash #FFF9E8
   canvas #F4F7FA · hairline #E2E8EF · inkSoft #7A8BA3 */
:root {
  --navy: #0E366D; --navy-soft: #1D519C; --navy-deep: #09254F;
  --yellow: #F6B121; --yellow-deep: #EC9C0B; --wash: #FFF9E8;
  --canvas: #F4F7FA; --hair: #E2E8EF; --ink-soft: #7A8BA3; --red: #D9463A; --green: #1E9E5A;
  --sheet-h: 46vh;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Roboto, 'Segoe UI', sans-serif;
  color: var(--navy); background: var(--canvas); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
i { font-style: normal; }
h1 { font-size: 21px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 800; margin: 0 0 10px; }

.app { position: relative; height: 100vh; height: 100dvh; max-width: 520px; margin: 0 auto; overflow: hidden; background: #fff; }
.app[data-mode="vehicles"] { --sheet-h: 62vh; }
.app[data-mode="pick"] { --sheet-h: 196px; }
.app[data-mode="trip"] { --sheet-h: 50vh; }
.app[data-mode="trip"] .pill { display: none; } /* the nearby-cabs count belongs to home */
.app[data-mode="trip"] .trip-places span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map .mk.cab.live img { width: 30px !important; transition: none; }

/* ---------- map stage ---------- */
.stage { position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--sheet-h) - 22px); background: #E9EDF2; transition: bottom .28s cubic-bezier(.2,.8,.2,1); }
.map { position: absolute; inset: 0; z-index: 0; isolation: isolate; } /* own stacking context: Leaflet's panes use z-index up to 1000 */
.topbar { position: absolute; left: 14px; right: 14px; top: calc(12px + var(--safe-t)); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; z-index: 3; }
.logo-chip { background: #fff; border-radius: 999px; padding: 7px 12px; box-shadow: 0 4px 14px rgba(14,54,109,.16); display: flex; }
.logo-chip img { height: 22px; display: block; }
.top-left { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* My rides: on the map from the first paint, under the logo (it used to sit at the bottom of the sheet, below the fold) */
.rides-pill { pointer-events: auto; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 8px 13px 8px 11px; font-size: 13px; font-weight: 800; color: var(--navy); box-shadow: 0 4px 14px rgba(14,54,109,.16); }
.app:not([data-mode="home"]) .rides-pill:not(.back-home) { display: none; }
.app:not([data-mode="trip"]) .back-home { display: none; } /* the ride screen's way back to Home (the ride keeps running) */
.back-home span { font-size: 19px; line-height: 14px; margin-top: -3px; }
.pill { background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 13px; font-size: 13px; display: flex; align-items: center; gap: 7px; box-shadow: 0 4px 14px rgba(14,54,109,.22); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.pill.warn { background: var(--red); }
.pill.warn .dot { background: #fff; }

.pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; z-index: 2; pointer-events: none; }
.callout { pointer-events: auto; max-width: min(78vw, 360px); margin-bottom: 6px; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; font-weight: 700; text-align: left;
  background: linear-gradient(90deg, var(--wash), #fff 60%); border: 1px solid rgba(246,177,33,.45); box-shadow: 0 6px 18px rgba(14,54,109,.16); }
.callout span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin-art { display: block; filter: drop-shadow(0 3px 5px rgba(9,37,79,.3)); transition: transform .15s; }
.pin.moving .pin-art { transform: translateY(-8px); }
.pin-shadow { width: 12px; height: 5px; border-radius: 50%; background: rgba(9,37,79,.28); margin-top: -3px; }
.app:not([data-mode="home"]):not([data-mode="pick"]) .pin { display: none; }
.app[data-mode="pick"] .pill { display: none; }

.recenter { position: absolute; right: 14px; bottom: 36px; width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(14,54,109,.18); display: flex; align-items: center; justify-content: center; z-index: 3; }
.recenter i { width: 15px; height: 15px; border-radius: 50%; border: 3px solid var(--navy); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--navy); }
.app:not([data-mode="home"]):not([data-mode="pick"]) .recenter { display: none; }

.route-pill { position: absolute; left: 14px; right: 14px; top: calc(12px + var(--safe-t)); z-index: 4; background: #fff; border-radius: 999px; padding: 9px 14px 9px 8px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(14,54,109,.18); text-align: left; }
.route-pill .back { width: 30px; height: 30px; border-radius: 50%; background: var(--canvas); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; padding-bottom: 3px; flex: none; }
.route-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.route-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; min-width: 0; }
.route-text i { color: var(--yellow-deep); font-weight: 800; flex: none; }
.route-pill .edit { font-size: 12.5px; font-weight: 800; color: var(--navy-soft); flex: none; }
.app[data-mode="vehicles"] .topbar { display: none; }

/* map markers (OverlayView) */
.mk { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.map .mk.cab img { width: 26px !important; height: auto; display: block; transition: transform .6s linear; } /* !important: Leaflet resets marker-pane img width */
.mk.stop { width: 18px; height: 18px; border-radius: 50%; background: var(--navy); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(9,37,79,.4); }
.mk.stop.drop { border-radius: 4px; background: var(--yellow-deep); }

/* ---------- sheets ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: var(--sheet-h); background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(14,54,109,.12);
  padding: 10px 18px calc(14px + var(--safe-b)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; z-index: 5; display: flex; flex-direction: column; }
.sheet > * { flex-shrink: 0; }
.handle { width: 40px; height: 4px; border-radius: 2px; background: #D5DCE5; align-self: center; margin-bottom: 14px; }
.search-pill { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--canvas); border: 1px solid var(--hair); border-radius: 16px; padding: 15px 16px; font-size: 16px; font-weight: 700; color: var(--ink-soft); text-align: left; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; background: var(--wash); border: 1px solid rgba(246,177,33,.5); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 700; max-width: 200px; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip::before { content: "★"; color: var(--yellow-deep); }
.label { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; color: var(--ink-soft); margin: 18px 0 4px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); text-align: left; width: 100%; }
.item:last-child { border-bottom: 0; }
.item .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--canvas); display: flex; align-items: center; justify-content: center; flex: none; }
.item .ico svg { display: block; }
.item .txt { min-width: 0; flex: 1; }
.item .txt b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .txt small { display: block; font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.unserved { margin-top: 12px; background: #FDECEA; color: var(--red); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; font-weight: 700; }
.testnote { margin: 14px 0 0; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--yellow-deep); text-align: center; }

/* trip tabs (home) and one way / round trip (outstation) */
.seg { display: flex; background: var(--canvas); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--navy); font-weight: 800; box-shadow: 0 1px 4px rgba(14,54,109,.16); }
.seg.way { margin: 10px 0 0; }
.rental-go { margin-top: 0; }
.chip.tier { background: #fff; border-color: var(--hair); }
.chip.tier::before { content: none; }
.chip.tier.on { background: var(--wash); border-color: var(--yellow); }
#tier-chips { margin-top: 10px; }
.return-chip { align-self: flex-start; margin-top: 8px; }

/* vehicle selection */
.trip-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.trip-line b { font-size: 14px; white-space: nowrap; }
.when-chip { background: var(--wash); border: 1px solid rgba(246,177,33,.6); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.night { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.offer { margin: 8px 0 0; font-size: 12.5px; font-weight: 800; color: var(--green); background: #E9F7EF; border-radius: 10px; padding: 7px 10px; }
.label.first { margin-top: 0; }
.pick-address { margin: 6px 0 4px; font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.map-row { border-bottom: 1px solid var(--hair); margin-top: 6px; }
.mk.route-end { display: none; }
.vlist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; flex: 1 0 auto; }
.vgroup { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; color: var(--ink-soft); margin: 8px 0 0; }
.vrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--hair); border-radius: 16px; padding: 10px 12px; background: #fff; }
.vrow.sel { background: var(--wash); border-color: var(--yellow); }
.vrow img { width: 64px; height: 31px; object-fit: contain; flex: none; }
.vrow .vt { flex: 1; min-width: 0; }
.vrow .vt b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .vt small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.vrow .vt small span { white-space: nowrap; }
.eta { background: var(--canvas); border-radius: 999px; padding: 2px 8px; font-weight: 700; color: var(--navy-soft); }
.vrow .vf { text-align: right; flex: none; }
.vrow .vf small { display: block; font-size: 10.5px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.vrow .vf b { font-size: 16px; }
.vrow .vf s { font-weight: 600; }
.mk-host { background: none; border: 0; }
.leaflet-container { font: inherit; background: #E9EDF2; }
.leaflet-control-attribution { font-size: 9px; opacity: .75; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C9D3DF; flex: none; display: flex; align-items: center; justify-content: center; }
.vrow.sel .radio { border-color: var(--yellow-deep); background: var(--yellow); }
.vrow.sel .radio::after { content: "✓"; font-size: 12px; font-weight: 900; color: var(--navy-deep); }
.skeleton { height: 58px; border-radius: 16px; background: linear-gradient(90deg, var(--canvas) 25%, #fff 50%, var(--canvas) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.quote-error { background: var(--canvas); border-radius: 16px; padding: 16px; margin: 6px 0 12px; }
.quote-error p { margin: 0 0 12px; font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.quote-error .row { display: flex; gap: 8px; flex-wrap: wrap; }
.dock { position: sticky; bottom: calc(-14px - var(--safe-b)); background: #fff; margin: auto -18px calc(-14px - var(--safe-b)); padding: 8px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--hair); }
.footer-row { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13px; font-weight: 700; padding-bottom: 9px; }
.footer-row i { width: 1px; height: 14px; background: var(--hair); }
.cta-row { display: flex; gap: 10px; }
.coupon-chip { font-size: 13px; font-weight: 700; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon-chip.on { color: var(--green); font-weight: 800; }
.coupon-chip[disabled] { color: inherit; opacity: 1; cursor: default; }
/* Home's ride card (the app's rideBanner card and LiveRidesCard) */
#home-ride-card { margin-bottom: 14px; }
.ride-one { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid rgba(246,177,33,.6);
  background: linear-gradient(135deg, var(--wash), rgba(246,177,33,.45)); }
.ride-one .ico, .ride-many .ico { width: 40px; height: 40px; border-radius: 50%; background: rgba(246,177,33,.35); display: flex; align-items: center; justify-content: center; flex: none; }
.ride-one .txt { flex: 1; min-width: 0; }
.ride-one .txt b { display: block; font-size: 14px; }
.ride-one .txt small { display: block; font-size: 12px; color: var(--navy-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--navy-soft); font-size: 20px; font-weight: 700; flex: none; line-height: 1; }
.ride-many { border-radius: 16px; border: 1px solid rgba(246,177,33,.6); background: #fff; box-shadow: 0 4px 10px rgba(14,54,109,.08); overflow: hidden; }
.ride-many .hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; font-weight: 800; }
.ride-many .ico { width: 34px; height: 34px; }
.ride-many .row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border-top: 1px solid var(--hair); }
.ride-many .row .txt { flex: 1; min-width: 0; }
.ride-many .who { display: flex; align-items: center; gap: 6px; }
.ride-many .who i { font-size: 9px; font-weight: 900; letter-spacing: .02em; border-radius: 999px; padding: 3px 6px; background: var(--canvas); color: var(--ink-soft); }
.ride-many .who i.corp { background: rgba(246,177,33,.35); color: var(--navy); }
.ride-many .who b { font-size: 13px; font-variant-numeric: tabular-nums; }
.ride-many .st { display: block; font-size: 12px; font-weight: 700; color: var(--green); margin-top: 4px; }
.ride-many .st.later { color: var(--yellow-deep); }
.ride-many .rt { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app[data-rides="many"] #hello { display: none; } /* the picker takes the greeting's room */
.ride-card.focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(246,177,33,.25); }

.corp-chip { align-self: flex-start; max-width: 100%; background: var(--navy); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 800; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon-entry { display: flex; gap: 8px; margin-top: 6px; }
.coupon-entry input { flex: 1; min-width: 0; border: 1.5px solid var(--hair); border-radius: 12px; padding: 12px 13px; font-size: 15.5px; font-weight: 700; text-transform: uppercase; background: var(--canvas); outline: 0; }
.coupon-entry input::placeholder { text-transform: none; font-weight: 600; color: var(--ink-soft); }
.applied { margin: 0 0 10px; font-size: 13.5px; font-weight: 800; color: var(--green); background: #E9F7EF; border-radius: 10px; padding: 9px 11px; }
.coupon-list { max-height: 34vh; overflow-y: auto; }
.coupon-list .item .ico { background: var(--wash); font-size: 15px; }
.coupon-list .item .txt small { white-space: normal; }
.modal-card { max-height: 88%; overflow-y: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; padding: 15px 14px; font-size: 14.5px; font-weight: 800; letter-spacing: .03em; text-decoration: none; flex: 1; text-align: center; }
.btn.primary { background: var(--yellow); color: var(--navy-deep); box-shadow: 0 6px 16px rgba(236,156,11,.3); }
.btn.outline { border: 1.5px solid var(--navy); color: var(--navy); background: #fff; flex: 0 0 38%; }
.btn.small { flex: none; padding: 10px 14px; font-size: 13px; border-radius: 12px; }
.btn.text { color: var(--ink-soft); font-weight: 700; letter-spacing: 0; }
.btn.wide { width: 100%; flex: none; margin-top: 10px; }
.btn[disabled] { opacity: .5; }

/* ---------- my rides ---------- */
.hdr-link { margin-left: auto; font-size: 13.5px; font-weight: 800; color: var(--navy-soft); }
.ride-card { border: 1.5px solid var(--hair); border-radius: 16px; padding: 12px 14px; margin-top: 8px; }
.ride-card.off { opacity: .72; }
.ride-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ride-top b { font-size: 14.5px; }
.tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 9px; background: var(--canvas); color: var(--navy-soft); white-space: nowrap; }
.tag.assign { background: var(--wash); color: var(--yellow-deep); }
.tag.despatch, .tag.ontrip { background: #E9F7EF; color: var(--green); }
.tag.cancelled { background: #FDECEA; color: var(--red); }
.ride-card .trip-places { margin-bottom: 6px; font-size: 13px; }
.ride-meta { font-size: 12.5px; color: var(--ink-soft); }
.ride-actions { display: flex; gap: 8px; margin-top: 10px; }
.home-rides { margin-top: 8px; color: var(--navy-soft); font-weight: 800; }
.modal.top { z-index: 60; }
#rides-body { padding-bottom: 20px; }

/* ---------- the ride sheet ---------- */
.trip-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.trip-head h1 { margin: 0; flex: 1; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(246,177,33,.7); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { to { box-shadow: 0 0 0 16px rgba(246,177,33,0); } }
.trip-sub { margin: 0 0 14px; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.driver-card { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--hair); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.driver-card .txt { flex: 1; min-width: 0; }
/* the app's trip sheet (3B): OTP on its own line, round Call / Chat on the driver card, Support / Share pills */
.otp-line { margin: -4px 0 12px; }
.otp-line small { display: block; font-size: 13px; color: var(--ink-soft); }
.otp-line b { display: block; font-size: 36px; line-height: 40px; font-weight: 800; letter-spacing: .09em; margin-top: 4px; }
.round { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; font-size: 11px; font-weight: 800; color: var(--navy); }
.round i { width: 44px; height: 44px; border-radius: 50%; background: #D3DDE9; display: flex; align-items: center; justify-content: center; }
.round.msg i { background: var(--yellow); }
.pills { display: flex; gap: 8px; margin: -4px 0 12px; }
.pills > * { flex: 1; height: 36px; border-radius: 999px; background: #DCE4EE; color: var(--navy); font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
#modal-assist .btn.outline { flex: none; }
.cancel-opt { display: block; width: 100%; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--hair); font-size: 15px; font-weight: 700; color: var(--navy); }
.cancel-opt.another { color: var(--green); }
.cancel-opt.another small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-top: 2px; }
.round i { position: relative; }
.round .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.round.sm i { width: 40px; height: 40px; }
.round.sm { font-size: 10.5px; text-decoration: none; }
.round.sm i.x { font-size: 14px; font-weight: 800; color: var(--navy); background: #DCE4EE; }
.round[disabled], .round.dim { opacity: .5; }
.driver-card { flex-wrap: wrap; }
.driver-card .preview { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; margin: 10px -12px -12px; padding: 9px 12px; background: #E3EAF3; border-top: 1px solid var(--hair); border-radius: 0 0 14px 14px; font-size: 12.5px; color: var(--navy); text-align: left; }
.driver-card .preview .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--yellow); flex: none; }
.driver-card .preview .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-card .preview .txt b { display: inline; font-size: inherit; }
.driver-card .preview .reply { font-weight: 800; flex: none; }

/* ---------- trip chat (the tracking page's 1C sheet, on this page's tokens) ---------- */
.chatpane { position: absolute; left: 0; right: 0; top: calc(150px + var(--safe-t)); bottom: 0; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -8px 30px rgba(14,54,109,.12); display: flex; flex-direction: column; overflow: hidden; z-index: 25; transform: translateY(0); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.chatpane.closing { transform: translateY(110%); }
.chat-grip { padding: 10px 0 0; display: flex; justify-content: center; flex: none; }
.chat-grip .handle { margin-bottom: 0; }
.chat-head { padding: 10px 16px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #CAD4E0; flex: none; }
.chat-head .avatar.sm { width: 42px; height: 42px; font-size: 14px; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-name { font-size: 15.5px; font-weight: 800; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub .plate { font-weight: 800; color: var(--navy); letter-spacing: .04em; }
.chat-banner { flex: none; background: #FFF6E6; border-bottom: 1px solid #FADBA0; color: #7A5A12; font-size: 12.5px; padding: 8px 16px; text-align: center; }
.chat-banner.err { background: #FDECEA; border-color: #F5C2BD; color: #8A2A22; }
.chat-msgs { flex: 1; min-height: 0; background: #F4F7FB; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.chat-msgs .spacer { flex: 1; }
.bubble { max-width: 78%; font-size: 14.5px; line-height: 1.4; padding: 10px 14px; color: var(--navy); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.them { align-self: flex-start; background: #DCE4EE; border-radius: 18px 18px 18px 6px; }
.bubble.them.cont { border-top-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--yellow); font-weight: 600; border-radius: 18px 18px 6px 18px; }
.bubble.me.cont { border-top-right-radius: 6px; }
.bubble.me.pending { opacity: .7; }
.bubble.me.failed { background: #FDECEA; border: 1px solid #F5C2BD; cursor: pointer; }
.bubble.agent { align-self: flex-start; background: #fff; border: 1px solid #BCC8D6; border-radius: 18px 18px 18px 6px; }
.bubble.system { align-self: center; background: transparent; color: var(--ink-soft); font-size: 12px; text-align: center; padding: 4px 8px; }
.stamp { font-size: 11px; color: var(--ink-soft); margin: 2px 0 10px 4px; align-self: flex-start; }
.stamp.me { align-self: flex-end; margin: 2px 4px 4px 0; }
.stamp .seen { color: var(--green); font-weight: 700; }
.stamp .fail { color: var(--red); font-weight: 700; }
.caption-agent { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--ink-soft); margin: 6px 0 2px 4px; letter-spacing: .04em; text-transform: uppercase; }
.chat-empty { align-self: center; margin: auto; text-align: center; color: var(--ink-soft); font-size: 13px; line-height: 1.5; padding: 0 20px; }
.chat-tray { background: #FFF6E6; border-top: 1px solid #FADBA0; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.tray-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: #B07A1C; text-transform: uppercase; }
.tray-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tray-row::-webkit-scrollbar { display: none; }
.tray-chip { background: #fff; border: 1px solid #F2C877; border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; flex: none; }
.tray-chip:disabled { opacity: .5; }
.composer { background: #fff; padding: 10px 16px calc(14px + var(--safe-b)); display: flex; align-items: center; gap: 10px; flex: none; }
.composer-field { flex: 1; min-width: 0; height: 48px; border-radius: 999px; background: #F4F7FB; border: 1px solid #BCC8D6; padding: 0 18px; font-size: 16px; color: var(--navy); outline: none; }
.composer-field:focus { border-color: var(--navy); }
.composer-send { width: 48px; height: 48px; border-radius: 999px; background: var(--yellow); display: flex; align-items: center; justify-content: center; flex: none; }
.composer-send:disabled { opacity: .5; cursor: default; }
.app.chat-open .sheet, .app.chat-open .topbar { visibility: hidden; } /* the chat takes the sheet's place; the map stays above it */
.driver-card .txt b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-card .txt small { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otp { background: var(--wash); border: 1px solid rgba(246,177,33,.6); border-radius: 12px; padding: 6px 10px; text-align: center; flex: none; }
.otp small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--ink-soft); }
.otp b { font-size: 19px; letter-spacing: .08em; }
.trip-places { font-size: 13.5px; line-height: 1.45; margin-bottom: 12px; }
.trip-places div { display: flex; gap: 10px; padding: 3px 0; }
.trip-places .dot { margin-top: 5px; }
.trip-actions { display: flex; gap: 10px; margin-top: auto; }
.btn.danger { border: 1.5px solid var(--red); color: var(--red); background: #fff; }
.track-link { margin: 0 0 10px; flex: none; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.stars button { font-size: 34px; line-height: 1; color: #D5DCE5; }
.stars button.on { color: var(--yellow); }
.bill { font-size: 30px; font-weight: 800; margin: 2px 0 2px; }
#trip-body { display: flex; flex-direction: column; flex: 1 0 auto; }

/* ---------- pages ---------- */
.page { position: absolute; inset: 0; background: #fff; z-index: 20; display: flex; flex-direction: column; padding: calc(8px + var(--safe-t)) 18px calc(16px + var(--safe-b)); overflow-y: auto; }
.page.center { align-items: center; justify-content: center; text-align: center; padding-left: 26px; padding-right: 26px; }
.page-hdr { display: flex; align-items: center; gap: 10px; height: 48px; font-size: 17px; }
.back-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--canvas); font-size: 24px; line-height: 1; padding-bottom: 3px; }
.stops { border: 1.5px solid var(--hair); border-radius: 16px; padding: 4px 14px; margin-top: 8px; position: relative; }
.stop { display: flex; align-items: center; gap: 12px; height: 50px; }
.stop input { flex: 1; border: 0; outline: 0; background: none; font-size: 15.5px; font-weight: 700; min-width: 0; }
.stop input::placeholder { color: var(--ink-soft); font-weight: 600; }
.stop-line { display: block; height: 1px; background: var(--hair); margin-left: 24px; }
.dot.pickup { width: 12px; height: 12px; border-radius: 50%; background: var(--navy); flex: none; }
.dot.drop { width: 12px; height: 12px; border-radius: 3px; background: var(--yellow-deep); flex: none; }
.results .item { padding: 13px 0; }
.muted { color: var(--ink-soft); font-size: 13.5px; line-height: 1.45; margin: 8px 0 0; }
.err { color: var(--red); font-size: 13.5px; font-weight: 700; margin: 10px 0 0; }

.modal { position: absolute; inset: 0; z-index: 30; background: rgba(9,37,79,.45); display: flex; align-items: flex-end; }
.modal-card { background: #fff; width: 100%; border-radius: 24px 24px 0 0; padding: 22px 18px calc(16px + var(--safe-b)); }
.dt { width: 100%; margin-top: 12px; border: 1.5px solid var(--hair); border-radius: 14px; padding: 14px; font-size: 16px; font-weight: 700; background: var(--canvas); }
.summary { text-align: left; background: var(--canvas); border-radius: 16px; padding: 14px; font-size: 14px; line-height: 1.5; width: 100%; }
.summary div { display: flex; gap: 10px; padding: 3px 0; }
.summary div span:first-child { flex: none; width: 22px; text-align: center; }
.summary div span:last-child { min-width: 0; }
.summary b { font-size: 15.5px; }
.done-badge { width: 76px; height: 76px; border-radius: 50%; background: var(--yellow); color: var(--navy-deep); font-size: 40px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; box-shadow: 0 10px 24px rgba(236,156,11,.35); }
.gate-logo { height: 46px; margin-bottom: 22px; }

.toast { position: absolute; left: 18px; right: 18px; bottom: calc(24px + var(--safe-b)); z-index: 40; background: var(--navy-deep); color: #fff; border-radius: 14px; padding: 13px 15px; font-size: 13.5px; font-weight: 700; text-align: center; box-shadow: 0 10px 26px rgba(9,37,79,.35); }
.loading { position: absolute; inset: 0; z-index: 50; background: #fff; display: flex; align-items: center; justify-content: center; }
.loading i { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--hair); border-top-color: var(--yellow); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app:not([data-mode="boot"]) .loading { display: none; }
