/* ==========================================================================
   Movra rider & driver apps — mobile-first shell
   Phones: full-bleed map with a draggable bottom sheet and a tab bar.
   Desktop: navigation rail, a floating panel and the map beside it.
   ========================================================================== */
html, body { height: 100%; }
body.app { background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body.app.is-page { overflow: auto; }

.shell { position: relative; height: 100%; display: flex; }
.shell-map { position: absolute; inset: 0; z-index: 0; }
.shell-main { position: relative; z-index: 2; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- navigation ---------- */
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 700; color: var(--faint); position: relative; }
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a.is-active { color: var(--ink); }
.tabbar a.is-active::before { content: ""; position: absolute; top: -7px; width: 22px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.tabbar .dot { position: absolute; top: 4px; margin-left: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.rail { display: none; }

/* ---------- page layout (non-map) ---------- */
.page { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; width: 100%; }
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: rgba(243, 245, 249, .92); backdrop-filter: blur(14px); }
.appbar h1 { font-size: 20px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar .btn-icon { --bh: 40px; border-radius: 12px; background: var(--surface); box-shadow: var(--sh-1); }
.page-hero { padding: 6px 0 18px; }
.page-hero h1 { font-size: 28px; margin-bottom: 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.section-title h2 { font-size: 16px; margin: 0; }
.section-title a { font-size: 13px; font-weight: 700; color: var(--brand-700); }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-1); border: 1px solid var(--line); }
.card-pad { padding: 18px; }
.card + .card { margin-top: 12px; }
.list { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; position: relative; transition: background .15s; }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
button.list-item { width: 100%; text-align: left; }
.list-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink); flex-shrink: 0; }
.list-icon.is-brand { background: var(--brand-50); color: var(--brand-700); }
.list-icon.is-accent { background: var(--accent-50); color: var(--accent-700); }
.list-icon.is-red { background: var(--red-50); color: var(--red-700); }
.list-icon.is-blue { background: var(--blue-50); color: #2554C7; }
.list-body { flex: 1; min-width: 0; }
.list-title { display: block; font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.3; }
.list-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.list-trail { color: var(--faint); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }

.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-art { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 26px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); }
.empty h3 { font-size: 17px; margin-bottom: 4px; }

/* ---------- map screens ---------- */
.map-top { position: absolute; z-index: 20; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.fab { width: 46px; height: 46px; border-radius: 15px; background: var(--surface); box-shadow: var(--sh-2); display: grid; place-items: center; color: var(--ink); transition: transform .15s; }
.fab:active { transform: scale(.95); }
.fab-avatar { padding: 3px; }
.fab-avatar img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.map-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-2); font-weight: 700; font-size: 13.5px; }
.map-chip .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .25); animation: blink 1.6s infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 6px rgba(var(--brand-rgb), .06); } }
.map-locate { position: absolute; z-index: 15; right: 12px; transition: bottom .35s var(--ease); }
.center-pin { position: absolute; z-index: 12; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; transition: transform .2s var(--ease); }
.center-pin svg { width: 40px; height: 52px; filter: drop-shadow(0 8px 10px rgba(11, 19, 36, .3)); }
.center-pin.is-lifted { transform: translate(-50%, -118%); }
.center-pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 4px; border-radius: 50%; background: rgba(11, 19, 36, .35); transform: translateX(-50%); }

.sheet { position: absolute; z-index: 25; left: 0; right: 0; bottom: 0; max-height: calc(100% - 70px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -12px 40px -12px rgba(var(--ink-rgb), .28); transition: transform .38s var(--ease), max-height .3s var(--ease); padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.sheet.no-tabbar { padding-bottom: env(safe-area-inset-bottom); }
.sheet-handle { display: flex; justify-content: center; padding: 9px 0 3px; cursor: grab; touch-action: none; flex-shrink: 0; }
.sheet-handle::before { content: ""; width: 42px; height: 5px; border-radius: 99px; background: var(--line-2); }
.sheet-body { overflow-y: auto; padding: 4px 18px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 18px 14px; border-top: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
.sheet h2 { font-size: 21px; }
.sheet.is-collapsed .sheet-body { max-height: 120px; overflow: hidden; }
.sheet.is-home { max-height: 57%; }
.sheet.trip-sheet { max-height: 62%; }
.sheet.in-options { max-height: 74%; }
.driver-card { flex-wrap: wrap; }
.driver-card .who { min-width: 0; }
.driver-card .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver-card .plate { flex-basis: 100%; margin-left: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); text-align: left; }
.driver-card .plate small { margin-top: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; white-space: nowrap; min-width: 0; flex: 1; }
.driver-card .plate b { flex-shrink: 0; }

.greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.greeting h2 { margin: 0; font-size: 23px; }
.greeting p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 14px; }
.segmented button, .segmented a { height: 40px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .2s; }
.segmented .is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.where-to { display: flex; align-items: center; gap: 12px; width: 100%; height: 58px; padding: 0 8px 0 16px; margin-top: 14px; border-radius: 18px; background: var(--surface-3); text-align: left; transition: background .15s; }
.where-to:hover { background: var(--line); }
.where-to .ic { color: var(--ink); }
.where-to span { flex: 1; font-weight: 800; font-size: 17px; color: var(--ink); }
.where-to .now { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 13px; background: var(--surface); font-weight: 700; font-size: 13px; color: var(--text-2); box-shadow: var(--sh-1); }

.quick-places { display: flex; gap: 10px; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px 4px; scrollbar-width: none; }
.quick-places::-webkit-scrollbar { display: none; }
.quick-place { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; max-width: 220px; }
.quick-place:hover { border-color: var(--line-2); }
.quick-place .list-icon { width: 34px; height: 34px; border-radius: 11px; }
.quick-place b { display: block; font-size: 14px; color: var(--ink); }
.quick-place small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.promo-rail { display: flex; gap: 12px; overflow-x: auto; margin: 16px -18px 2px; padding: 0 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-rail::-webkit-scrollbar { display: none; }
.promo { scroll-snap-align: start; flex-shrink: 0; width: min(300px, 78vw); min-height: 118px; border-radius: 20px; padding: 16px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; color: #fff; isolation: isolate; }
.promo h3 { color: inherit; font-size: 17px; margin: 0 0 4px; max-width: 70%; line-height: 1.2; }
.promo p { font-size: 12.5px; margin: 0; opacity: .85; max-width: 68%; }
.promo .promo-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12.5px; font-weight: 800; }
.promo svg.promo-art { position: absolute; right: -6px; bottom: -8px; width: 118px; height: 118px; z-index: -1; }
.promo-teal { background: linear-gradient(135deg, #0CA678, #12B886 55%, #63E6BE); color: var(--ink); }
.promo-ink { background: linear-gradient(135deg, #0B1324, #1D2B47); }
.promo-sun { background: linear-gradient(135deg, #FF9F1C, #FFC857); color: var(--ink); }
.promo-violet { background: linear-gradient(135deg, #5B3FD9, #8C7BFF); }
.promo-rose { background: linear-gradient(135deg, #E03E5B, #FF7E95); }
.promo-sky { background: linear-gradient(135deg, #2F6BEB, #5FA8FF); }

/* ---------- trip planner ---------- */
.planner { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; position: relative; }
.planner-dots { display: flex; flex-direction: column; align-items: center; padding: 19px 0; }
.planner-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.planner-dots i.is-drop { border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 3px var(--surface-3); }
.planner-dots i.is-parcel { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.planner-dots span { flex: 1; width: 2px; margin: 5px 0; background: repeating-linear-gradient(to bottom, var(--line-2) 0 4px, transparent 4px 8px); }
.planner-fields { display: flex; flex-direction: column; gap: 8px; }
.place-field { position: relative; display: flex; align-items: center; height: 52px; border-radius: 14px; background: var(--surface-3); border: 1.5px solid transparent; transition: all .15s; }
.place-field.is-focus { background: var(--surface); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), .06); }
.place-field input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 14px; background: none; border: 0; outline: none; font-weight: 700; font-size: 15px; color: var(--ink); }
.place-field input::placeholder { color: var(--muted); font-weight: 600; }
.place-field .clear { width: 34px; height: 34px; margin-right: 6px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.planner-swap { position: absolute; right: -4px; top: 50%; transform: translate(0, -50%); width: 34px; height: 34px; border-radius: 11px; background: var(--surface); box-shadow: var(--sh-2); display: grid; place-items: center; z-index: 2; }

.results { margin-top: 10px; }
.result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 4px; text-align: left; border-radius: 12px; }
.result:hover { background: var(--surface-2); }
.result .list-icon { width: 38px; height: 38px; }
.result b { display: block; font-size: 15px; color: var(--ink); font-weight: 700; }
.result small { display: block; font-size: 13px; color: var(--muted); }
.result .dist { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.results-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 14px 4px 4px; }

.route-summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 12px; }
.route-summary .grow b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-summary .grow small { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px 8px 8px; border-radius: 18px; border: 2px solid transparent; background: var(--surface); text-align: left; transition: border-color .15s, background .15s; position: relative; }
.option:hover { background: var(--surface-2); }
.option.is-selected { border-color: var(--ink); background: var(--surface); }
.option .vart { width: 74px; height: 46px; flex-shrink: 0; }
.option-body { flex: 1; min-width: 0; }
.option-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; color: var(--ink); }
.option-name .cap { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.option-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.option-price { text-align: right; }
.option-price b { display: block; font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.option-price s { font-size: 12px; color: var(--faint); font-weight: 600; }
.option-tag { position: absolute; top: -8px; left: 90px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; background: var(--accent); color: var(--ink); }
.option-tag.is-fast { background: var(--brand); }
.option.is-unavailable { opacity: .5; }

.pay-row { display: flex; align-items: center; gap: 10px; }
.pay-btn { flex: 1; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 12px; border-radius: 14px; background: var(--surface-3); font-weight: 700; font-size: 14px; color: var(--ink); text-align: left; min-width: 0; }
.pay-btn .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 900; flex-shrink: 0; }
.pay-logo.cash { background: #DCFCE7; color: #15803D; }
.pay-logo.wallet { background: var(--ink); color: var(--brand); }
.pay-logo.bkash { background: #E2136E; color: #fff; }
.pay-logo.card { background: #E0E7FF; color: #3730A3; }

/* ---------- modal / action sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 13, 24, .45); animation: fadeIn .2s; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); animation: slideUp .32s var(--ease); }
.modal-card h3 { font-size: 20px; margin: 10px 0 4px; }
.modal-card .modal-lead { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: .6; } }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); margin-top: 8px; text-align: left; font-weight: 700; }
.choice.is-selected { border-color: var(--ink); background: var(--surface-2); }
.choice .radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; }
.choice.is-selected .radio { border: 6px solid var(--ink); }

/* ---------- live trip ---------- */
.status-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.status-head h2 { margin: 0; font-size: 21px; }
.status-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.eta-bubble { margin-left: auto; min-width: 64px; padding: 8px 10px; border-radius: 16px; background: var(--ink); color: #fff; text-align: center; line-height: 1.05; }
.eta-bubble b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.eta-bubble small { font-size: 11px; font-weight: 700; opacity: .75; }
.progress-track { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-bottom: 16px; }
.progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #fff)); border-radius: inherit; transition: width 1s linear; }
.progress-track.is-indeterminate i { width: 35%; animation: indeterminate 1.4s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.driver-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.driver-card .avatar { width: 54px; height: 54px; }
.driver-card .who b { display: block; font-size: 16px; color: var(--ink); }
.driver-card .who small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.plate { margin-left: auto; text-align: right; }
.plate b { display: inline-block; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .02em; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 9px; padding: 3px 8px; white-space: nowrap; }
.plate small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; white-space: nowrap; }
.vehicle-art-mini { width: 64px; height: 38px; }
.pin-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: #fff; }
.pin-code small { display: block; font-size: 12px; opacity: .7; font-weight: 600; }
.pin-code b { font-size: 14px; font-weight: 700; }
.pin-digits { display: flex; gap: 5px; }
.pin-digits span { width: 32px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--brand); }
.trip-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.trip-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-2); }
.trip-action .ic { color: var(--ink); }
.trip-action.is-sos { background: var(--red-50); color: var(--red-700); }
.trip-action.is-sos .ic { color: var(--red); }

.stops { position: relative; padding-left: 26px; margin: 14px 0 4px; }
.stops::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 2px; background: repeating-linear-gradient(to bottom, var(--line-2) 0 4px, transparent 4px 8px); }
.stop { position: relative; padding: 6px 0; }
.stop::before { content: ""; position: absolute; left: -24px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.stop.is-drop::before { border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 3px var(--surface-3); }
.stop b { display: block; font-size: 14.5px; color: var(--ink); }
.stop small { display: block; font-size: 12.5px; color: var(--muted); }

.searching { text-align: center; padding: 8px 0 4px; }
.searching h2 { font-size: 22px; margin-bottom: 4px; }
.searching p { color: var(--muted); font-weight: 600; }
.search-cars { display: flex; justify-content: center; gap: 6px; margin: 14px 0; }
.search-cars span { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: bounce 1.2s infinite; }
.search-cars span:nth-child(2) { animation-delay: .15s; }
.search-cars span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

.rating-stars { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.rating-stars button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--line-2); transition: transform .15s var(--spring), color .15s; }
.rating-stars button svg { width: 38px; height: 38px; fill: currentColor; }
.rating-stars button.is-on { color: var(--accent); transform: scale(1.08); }
.tag-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tip-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tip-grid .chip { justify-content: center; padding: 0 6px; }

.receipt { font-size: 14px; }
.receipt-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; color: var(--text-2); font-weight: 600; }
.receipt-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.receipt-row.is-total { border-top: 1.5px dashed var(--line-2); margin-top: 8px; padding-top: 12px; font-size: 17px; color: var(--ink); font-weight: 800; }
.receipt-row.is-discount b { color: var(--brand-700); }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--line-2); }
.tl-item.is-done::before { border-color: var(--brand); background: var(--brand); }
.tl-item.is-current::before { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .2); }
.tl-item b { display: block; font-size: 14px; color: var(--ink); }
.tl-item small { font-size: 12.5px; color: var(--muted); }

/* ---------- wallet / stats ---------- */
.balance-card { position: relative; overflow: hidden; border-radius: 24px; padding: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, rgba(var(--brand-rgb), .55) 0%, transparent 55%), linear-gradient(145deg, var(--ink) 0%, var(--ink-3) 100%); }
.balance-card small { font-size: 13px; opacity: .75; font-weight: 600; }
.balance-card .amount { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 14px; }
.balance-card .btn-brand { box-shadow: none; }
.balance-card svg.deco { position: absolute; right: -30px; bottom: -40px; width: 180px; opacity: .14; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.stat small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.offer-card { display: flex; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.offer-card::before { content: ""; position: absolute; left: 68px; top: -8px; bottom: -8px; border-left: 2px dashed var(--line-2); }
.offer-badge { width: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); font-family: var(--font-display); font-weight: 800; font-size: 15px; text-align: center; line-height: 1.05; padding: 8px 4px; }
.offer-card h3 { font-size: 16px; margin: 0 0 2px; }
.offer-card p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.code-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px; border: 1.5px dashed var(--ink-3); font-family: var(--font-display); font-weight: 800; letter-spacing: .06em; font-size: 13px; color: var(--ink); }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; grid-template-rows: auto 1fr; background: var(--surface); }
.auth-visual { position: relative; height: 38vh; min-height: 250px; overflow: hidden; background: var(--ink); }
.auth-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-visual .logo-wrap { position: absolute; left: 20px; top: calc(18px + env(safe-area-inset-top)); z-index: 2; }
.auth-visual .auth-tag { position: absolute; left: 20px; right: 20px; bottom: 26px; z-index: 2; color: #fff; }
.auth-visual .auth-tag h1 { color: #fff; font-size: 30px; margin: 0; max-width: 360px; }
.auth-visual .auth-tag p { margin: 6px 0 0; opacity: .75; font-weight: 600; }
.auth-body { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-width: 460px; width: 100%; margin: 0 auto; }
.phone-input { display: flex; align-items: center; height: 56px; border-radius: 16px; border: 1.5px solid var(--line-2); overflow: hidden; }
.phone-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), .07); }
.phone-input .cc { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px 0 14px; font-weight: 800; border-right: 1.5px solid var(--line); background: var(--surface-2); }
.phone-input input { flex: 1; height: 100%; border: 0; outline: none; padding: 0 14px; font-size: 18px; font-weight: 700; letter-spacing: .02em; min-width: 0; }
.otp-inputs { display: flex; gap: 8px; justify-content: space-between; }
.otp-inputs input { width: 100%; max-width: 54px; height: 60px; border-radius: 14px; border: 1.5px solid var(--line-2); text-align: center; font-family: var(--font-display); font-size: 26px; font-weight: 800; outline: none; }
.otp-inputs input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), .07); }
.demo-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); font-size: 13.5px; font-weight: 600; }
.demo-note .ic { margin-top: 1px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 700; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  body.app { overflow: hidden; }
  body.app.is-page { overflow: hidden; }
  .shell { display: grid; grid-template-columns: 92px 1fr; }
  .tabbar { display: none; }
  .rail { position: relative; z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; background: var(--ink); }
  .rail .rail-logo { margin-bottom: 18px; }
  .rail a { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 0; border-radius: 16px; color: rgba(255,255,255,.55); font-size: 11.5px; font-weight: 700; position: relative; }
  .rail a:hover { color: #fff; background: rgba(255,255,255,.06); }
  .rail a.is-active { color: #fff; background: rgba(255,255,255,.1); }
  .rail a.is-active .ic { color: var(--brand); }
  .rail .dot { position: absolute; top: 8px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
  .rail .rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .shell-main { position: relative; overflow: hidden; }
  .shell.has-map .shell-map { left: 92px; }
  .shell.has-map .sheet, .shell.has-map .sheet.is-home, .shell.has-map .sheet.trip-sheet, .shell.has-map .sheet.in-options { top: 16px; left: 16px; bottom: 16px; right: auto; width: 430px; max-height: none; border-radius: 26px; padding-bottom: 0; box-shadow: var(--sh-3); }
  .shell.has-map .sheet-handle { display: none; }
  .shell.has-map .sheet-body { padding-top: 18px; flex: 1; }
  .shell.has-map .map-top { left: 462px; }
  .shell.has-map .map-top .fab-menu { display: none; }
  .shell.is-page .shell-main { overflow-y: auto; }
  .page { padding-bottom: 48px; }
  .appbar { padding-top: 18px; max-width: 792px; margin: 0 auto; width: 100%; background: rgba(243, 245, 249, .92); }
  .modal { align-items: center; }
  .modal-card { border-radius: 26px; padding-bottom: 20px; }
  .auth { grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr; height: 100%; }
  .auth-visual { height: 100%; }
  .auth-visual .auth-tag { bottom: 48px; left: 48px; }
  .auth-visual .auth-tag h1 { font-size: 44px; max-width: 520px; }
  .auth-visual .logo-wrap { left: 48px; top: 40px; }
  .auth-body { align-self: center; padding: 40px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
