/* PTSC Digital Ticketing concept demo. Prepared by Deep Focus. */

:root {
  --red: #D62F26;
  --red-ink: #AE211A;
  --red-tint: #FCEBEA;
  --ink: #16161A;
  --ink-2: #4B4B53;
  --ink-3: #6F6F78;
  --paper: #EDEFF2;
  --card: #fff;
  --line: #DDE0E5;
  --ok: #17803D;
  --ok-tint: #E2F5E8;
  --warn: #8F5400;
  --warn-tint: #FFF0D2;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', 'Barlow', sans-serif;
  --phone-w: 372px;
  --phone-h: clamp(600px, calc(100dvh - 284px), 800px);
  --gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 500 16px/1.4 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
select { font: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.dark :focus-visible { outline-color: #fff; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Page chrome ---------- */

.top { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; }
.brand strong { display: block; font: 700 21px/1.05 var(--cond); }
.brand span { display: block; font-size: 13px; color: var(--ink-3); }
.views { display: none; gap: 4px; background: var(--paper); padding: 4px; border-radius: 999px; }
.views button { padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.views button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.pill { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.pill:hover { background: #000; }
.pill.quiet { background: var(--paper); color: var(--ink); }
.pill.quiet:hover { background: var(--line); }

.guide { list-style: none; margin: 0; padding: 10px 20px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.guide::-webkit-scrollbar { display: none; }
.guide li { flex: 0 0 auto; }
.guide li:first-child { margin-left: auto; }
.guide li:last-child { margin-right: auto; }
.guide button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 16px 7px 7px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.2; }
.guide .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font); background: var(--paper); color: var(--ink-2); flex: none; }
.guide .n svg { width: 15px; height: 15px; stroke-width: 3; }
.guide li.done .n { background: var(--ok); color: #fff; }
.guide li.now button { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.guide li.now .n { background: var(--red); color: #fff; }

.stage { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; gap: var(--gap); padding: 10px 20px 24px; }
.panel { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.panel-ops { flex: 1; max-width: 780px; align-items: stretch; }
.caption { margin: 0; text-align: center; max-width: var(--phone-w); align-self: center; color: var(--ink-2); font-size: 14px; }
.caption b { display: block; color: var(--ink); font-size: 16px; }

.foot { padding: 4px 20px 22px; text-align: center; color: var(--ink-3); font-size: 13px; }
.foot p { margin: 0 auto; max-width: 820px; }

/* ---------- Phone frame ---------- */

.device { position: relative; width: var(--phone-w); height: var(--phone-h); border-radius: 42px; background: #fff; border: 9px solid #17171A; box-shadow: 0 28px 50px -24px rgba(0, 0, 0, .45); overflow: hidden; display: flex; flex-direction: column; flex: none; }
.statusbar { height: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; font: 700 13px var(--font); flex: none; background: #fff; }
.sb-icons { display: flex; gap: 5px; align-items: center; }
.sb-icons i { width: 16px; height: 10px; border-radius: 2px; background: currentColor; opacity: .85; }
.sb-icons i:nth-child(2) { width: 14px; clip-path: polygon(0 100%, 100% 100%, 100% 0); height: 10px; border-radius: 0; }
.sb-icons i.bat { width: 24px; border-radius: 3px; opacity: 1; background: none; border: 2px solid currentColor; position: relative; height: 12px; }
.sb-icons i.bat::after { content: ''; position: absolute; inset: 1px; right: 4px; background: currentColor; border-radius: 1px; }
.screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--paper); }
.view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 24px; -webkit-overflow-scrolling: touch; }

.dark { background: #0F0F11; border-color: #0A0A0B; }
.dark .statusbar { background: #0F0F11; color: #fff; }
.dark .screen { background: #0F0F11; color: #F2F2F4; }

/* ---------- Passenger app ---------- */

.appbar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; flex: none; }
.appbar .roundel { width: 36px; height: 36px; flex: none; }
.appbar strong { display: block; font: 700 18px/1 var(--cond); }
.appbar small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 500; margin-top: 1px; }
.appbar.back button { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin-left: -6px; border: 1px solid var(--line); }
.appbar.back strong { font-size: 21px; }

.hero-q { font: 700 32px/1 var(--cond); margin: 2px 0 12px; }

.route { position: relative; background: #fff; border-radius: 18px; padding: 4px 14px; border: 1px solid var(--line); }
.stop { display: flex; align-items: center; gap: 14px; padding: 8px 46px 8px 0; }
.stop + .stop { border-top: 1px solid var(--line); }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); flex: none; }
.pin.to { background: var(--red); border-color: var(--red); }
.stop small { display: block; font-size: 12.5px; color: var(--ink-3); }
.stop strong { font: 600 20px/1.15 var(--font); }
.swap { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.swap:active svg { transform: rotate(180deg); }
.swap svg { transition: transform .25s; }

.service { display: flex; align-items: center; gap: 10px; margin: 9px 2px; font-size: 14px; color: var(--ink-2); }
.service b { background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 9px; font-weight: 600; }

.days { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; text-align: left; line-height: 1.25; }
.day b { display: block; font-weight: 700; }
.day span { font-size: 13px; color: var(--ink-3); }
.day[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.h2 { font: 700 22px/1 var(--cond); margin: 14px 2px 8px; }
.trips { display: flex; flex-direction: column; gap: 8px; }
.trip { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; transition: transform .12s; }
.trip .time { font: 700 32px/1 var(--cond); font-variant-numeric: tabular-nums; }
.trip-mid strong { display: block; font-weight: 600; font-size: 15px; }
.trip-fare { font-weight: 700; }
.trip:not(.off):hover { border-color: var(--ink); }
.trip:not(.off):active { transform: scale(.985); }
.trip.off { opacity: .5; }
.chip { display: inline-block; margin-top: 3px; padding: 1px 9px; border-radius: 999px; background: var(--paper); font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.red { background: var(--red-tint); color: var(--red-ink); }
.fine { color: var(--ink-3); font-size: 13px; margin: 14px 2px 0; }

.tabbar { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 6px 12px; flex: none; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.tabbar button[aria-current="page"] { color: var(--red); }
.tabbar .i { width: 25px; height: 25px; }

.sheet-wrap { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, .5); }
.sheet { position: relative; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 20px 24px; }
.sheet.in { animation: up .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font: 700 30px/1 var(--cond); margin: 0; }
.sheet p { margin: 4px 0 14px; color: var(--ink-2); }
.qty { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 26px; text-align: center; font: 700 28px var(--cond); }
.sum { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; color: var(--ink-2); }
.sum strong { font: 700 34px/1 var(--cond); color: var(--ink); }

.btn { display: block; width: 100%; padding: 15px 18px; border-radius: 14px; font-weight: 700; font-size: 17px; text-align: center; }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-ink); }
.btn.primary:disabled { opacity: .5; }
.btn.ghost { background: #fff; border: 1.5px solid var(--line); }

.summary { background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line); margin-bottom: 4px; }
.summary .time { font: 700 48px/1 var(--cond); }
.summary p { margin: 4px 0 12px; color: var(--ink-2); }
.lines div { display: flex; justify-content: space-between; padding: 5px 2px; color: var(--ink-2); }
.lines .total { color: var(--ink); font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.methods { display: flex; flex-direction: column; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; text-align: left; }
.method[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.method .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; position: relative; }
.method[aria-checked="true"] .radio { border-color: var(--red); }
.method[aria-checked="true"] .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--red); }
.method strong { display: block; font-weight: 600; }
.method small { display: block; color: var(--ink-3); font-size: 13px; }
.method:disabled { opacity: .5; }
.cta { padding: 12px 18px 18px; background: #fff; border-top: 1px solid var(--line); flex: none; }

.center-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px; }
.center-stage h2 { font: 700 30px/1 var(--cond); margin: 0; }
.center-stage p { margin: 0; color: var(--ink-2); }
.spinner { width: 58px; height: 58px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--red); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.okmark { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; color: #fff; animation: pop .35s cubic-bezier(.2, .9, .3, 1.3); }
.okmark svg { width: 40px; height: 40px; stroke-width: 3.2; }
.okmark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .12s forwards ease-out; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

/* The ticket. The flag band is the one bold move in the app. */
.pass { position: relative; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 22px 34px -20px rgba(0, 0, 0, .4); }
.pass-head { position: relative; background: var(--red); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px; min-height: 86px; overflow: hidden; }
.pass-head img { width: 50px; height: 50px; background: #fff; border-radius: 50%; flex: none; }
.pass-head strong { display: block; font: 700 23px/1 var(--cond); }
.pass-head span { font-size: 13px; opacity: .95; }
.pass-head > div { position: relative; z-index: 1; }
.band { position: absolute; top: -40%; bottom: -40%; left: 77%; width: 52px; transform: skewX(28deg); background: linear-gradient(90deg, #fff 0 9px, #000 9px 43px, #fff 43px); }
.band.in { animation: wipe .8s .2s cubic-bezier(.6, 0, .2, 1) both; }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.pass-route { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 16px 18px 2px; }
.legs { list-style: none; margin: 0; padding: 0; position: relative; }
.legs::before { content: ''; position: absolute; left: 6px; top: 22px; bottom: 22px; border-left: 2px dotted var(--ink-3); }
.legs li { display: flex; align-items: center; gap: 11px; font: 700 23px/1.1 var(--cond); padding: 6px 0; }
.depart { text-align: right; }
.depart b { display: block; font: 700 46px/.95 var(--cond); font-variant-numeric: tabular-nums; }
.depart span { color: var(--ink-3); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin: 10px 18px 0; padding: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 700; font-size: 16px; }
.perf { position: relative; margin: 18px 0 0; border-top: 2px dashed var(--line); height: 0; }
.perf::before, .perf::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); }
.perf::before { left: -12px; }
.perf::after { right: -12px; }
.pass-qr { padding: 18px 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr { width: min(232px, 72%); aspect-ratio: 1; background: #fff; border-radius: 6px; }
.qr svg { display: block; width: 100%; height: 100%; }
.timer-row { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; text-align: left; }
.timer { position: relative; width: 36px; height: 36px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer .track { stroke: var(--line); }
.timer .prog { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 106.8; transition: stroke-dashoffset 1s linear; }
.timer .secs { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px var(--font); color: var(--ink); }
.boarded { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0 10px; text-align: center; }
.boarded h3 { margin: 0; font: 700 32px/1 var(--cond); color: var(--ok); }
.boarded p { margin: 0; color: var(--ink-2); }
.pass-actions { margin-top: 14px; }

.tk { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; }
.tk + .tk { margin-top: 8px; }
.tk .time { font: 700 34px/1 var(--cond); }
.tk small { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.tk .chip { margin: 0; justify-self: end; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: 18px; padding: 28px 20px; text-align: center; color: var(--ink-2); }
.empty b { display: block; font: 700 24px/1.1 var(--cond); color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.balance { background: var(--ink); color: #fff; border-radius: 20px; padding: 20px; }
.balance span { opacity: .75; font-size: 14px; }
.balance b { display: block; font: 700 54px/1.05 var(--cond); }
.topups { display: flex; gap: 8px; margin-top: 14px; }
.topups button { flex: 1; padding: 11px; border-radius: 12px; background: rgba(255, 255, 255, .14); font-weight: 700; }
.topups button:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Conductor phone ---------- */

.c-head { padding: 8px 18px 10px; flex: none; }
.c-head h3 { margin: 0; font: 700 26px/1 var(--cond); }
.c-head small { color: #A3A3AB; font-size: 13.5px; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.c-head small .i { width: 16px; height: 16px; }
.c-trip { position: relative; margin-top: 10px; }
.c-trip select { width: 100%; padding: 12px 40px 12px 14px; border-radius: 12px; background: #1E1E22; color: #fff; border: 1px solid #34343A; font-weight: 600; font-size: 16px; appearance: none; -webkit-appearance: none; }
.c-trip::after { content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.c-body { flex: 1; overflow-y: auto; padding: 0 18px 20px; overscroll-behavior: contain; }
.c-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.c-counts div { background: #1B1B1F; border-radius: 14px; padding: 10px 12px; }
.c-counts b { display: block; font: 700 38px/1 var(--cond); font-variant-numeric: tabular-nums; }
.c-counts span { font-size: 13px; color: #A3A3AB; }
.finder { position: relative; height: 138px; border-radius: 20px; background: #17171A; overflow: hidden; display: grid; place-items: center; text-align: center; color: #8E8E96; font-size: 15px; padding: 0 56px; }
.finder i { position: absolute; width: 30px; height: 30px; border: 4px solid #fff; border-radius: 8px; }
.finder .tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.finder .tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; }
.finder .bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.finder .br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }
.finder .sweep { position: absolute; left: 24px; right: 24px; height: 3px; background: var(--red); box-shadow: 0 0 18px 5px rgba(214, 47, 38, .65); top: 24px; animation: sweep 1.1s ease-in-out; }
@keyframes sweep { 0% { top: 24px; } 50% { top: calc(100% - 28px); } 100% { top: 24px; } }
.c-body .btn { margin-top: 12px; }
.c-body .btn:disabled { opacity: .6; }
.tests-h { margin: 14px 0 6px; font-size: 13.5px; color: #A3A3AB; }
.tests { display: flex; gap: 8px; flex-wrap: wrap; }
.tests button { padding: 8px 13px; border-radius: 999px; border: 1px solid #3A3A40; color: #D6D6DB; font-size: 13.5px; font-weight: 600; }
.tests button:hover:not(:disabled) { border-color: #fff; }
.tests button:disabled { opacity: .5; }
.result { margin-top: 14px; border-radius: 20px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.result.ok { background: #12301D; border: 1px solid #1F6B3A; }
.result.bad { background: #3A1411; border: 1px solid #8A2A22; }
.result.info { background: #1B1B1F; border: 1px solid #34343A; }
.result .mark { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.result .mark .i { width: 28px; height: 28px; stroke-width: 3; }
.result.ok .mark { background: #2BB45F; color: #05230F; }
.result.bad .mark { background: #FF6155; color: #2B0805; }
.result.info .mark { background: #34343A; color: #fff; }
.result h4 { margin: 0; font: 700 28px/1.05 var(--cond); }
.result p { margin: 4px 0 0; color: #D1D1D6; font-size: 15px; }
.result p.sub { color: #9A9AA3; font-size: 13.5px; }
.result .btn { margin-top: 10px; padding: 11px 14px; font-size: 15px; background: #fff; color: #111; }
.result.in { animation: pop .32s cubic-bezier(.2, .9, .3, 1.2); }
.log { list-style: none; padding: 0; margin: 14px 0 0; }
.log h5 { margin: 0 0 4px; font: 700 18px var(--cond); }
.log li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #26262B; font-size: 14px; color: #C9C9CF; }
.log .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.log .dot.ok { background: #2BB45F; }
.log .dot.bad { background: #FF6155; }
.log small { margin-left: auto; color: #85858D; white-space: nowrap; }

/* ---------- Operations dashboard ---------- */

.ops { container-type: inline-size; background: #fff; border-radius: 24px; border: 1px solid var(--line); padding: 22px; }
.ops-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ops h2 { margin: 0; font: 700 34px/1 var(--cond); }
.ops-head p { margin: 5px 0 0; color: var(--ink-3); font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 4px; }
@container (min-width: 560px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--paper); border-radius: 14px; padding: 12px 14px; }
.kpi b { display: block; font: 700 40px/1 var(--cond); font-variant-numeric: tabular-nums; transform-origin: left center; }
.kpi span { font-size: 13px; color: var(--ink-2); }
.kpi.bump b { animation: bump .6s; }
@keyframes bump { 30% { transform: scale(1.14); color: var(--red); } }
.card-h { font: 700 22px/1 var(--cond); margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-h small { font: 500 13px var(--font); color: var(--ink-3); }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 6px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
.bar b { font-size: 12.5px; color: var(--ink); font-weight: 700; }
.bar i { display: block; width: 100%; background: #CBD0D6; border-radius: 6px 6px 2px 2px; min-height: 4px; }
.bar.today i { background: var(--red); }
.trips-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.trips-t th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 0 6px 8px; }
.trips-t td { padding: 9px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.trips-t .t { font: 700 22px/1 var(--cond); font-variant-numeric: tabular-nums; }
.trips-t .r { display: block; color: var(--ink-3); font-size: 12.5px; }
.trips-t .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.trips-t tr.dep { color: var(--ink-3); }
.trips-t tr.flash td { animation: flash 1.8s; }
.load { height: 8px; border-radius: 4px; background: var(--paper); overflow: hidden; min-width: 64px; margin-top: 5px; }
.load i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.load.full i { background: var(--red); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed time { flex: none; width: 70px; color: var(--ink-3); font-size: 13px; }
.feed li.new { animation: flash 1.8s; }
@keyframes flash { from { background: var(--red-tint); } }

dialog { border: 0; border-radius: 26px; padding: 0; max-width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); width: 100%; color: var(--ink); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5); }
dialog::backdrop { background: rgba(10, 10, 12, .55); }
.about { position: relative; padding: 28px 26px 26px; }
.about h2 { font: 700 38px/1 var(--cond); margin: 0 0 8px; }
.about h3 { font: 700 21px/1 var(--cond); margin: 22px 0 8px; }
.about p { margin: 0 0 8px; color: var(--ink-2); }
.about .lead { font-size: 18px; color: var(--ink); max-width: 60ch; }
.about ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.about li { margin: 4px 0; }
.about-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.about-df { display: flex; align-items: center; gap: 16px; margin: 24px 0 18px; padding: 16px; background: var(--paper); border-radius: 18px; }
.about-df img { width: 64px; height: 64px; flex: none; }
.about-df strong { display: block; font-size: 17px; }
.about-df span, .about-df a { display: block; font-size: 14px; color: var(--ink-2); }
.about-df a { color: var(--red-ink); font-weight: 600; }

/* ---------- Layout by width ---------- */

@media (min-width: 1180px) and (max-width: 1499px) {
  :root { --phone-w: 340px; --gap: 24px; }
}
@media (min-width: 1180px) {
  .ops { height: var(--phone-h); overflow-y: auto; }
}

@media (max-width: 1179px) {
  .views { display: flex; }
  .top-actions { margin-left: 0; }
  .panel { display: none; width: 100%; }
  body[data-view="passenger"] #view-passenger,
  body[data-view="conductor"] #view-conductor,
  body[data-view="ops"] #view-ops { display: flex; }
  .stage { padding-top: 6px; }
  .guide { justify-content: flex-start; }
  .panel-ops { max-width: 760px; margin: 0 auto; }
  :root { --phone-h: clamp(620px, calc(100dvh - 250px), 820px); }
}

.brand strong i, .pill i { font-style: normal; }

@media (max-width: 700px) {
  .top { padding: 8px 14px; gap: 8px; }
  .brand { flex: 1; gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: 21px; }
  .brand span { display: none; }
  .opt { display: none; }
  .views { order: 3; width: 100%; }
  .views button { flex: 1; }
  .top-actions { margin-left: auto; }
  .pill { padding: 7px 14px; }
  .guide { padding: 8px 14px; }
  body { height: 100vh; height: 100dvh; overflow: hidden; }
  .stage { padding: 0; align-items: stretch; min-height: 0; }
  .panel { gap: 0; flex: 1; min-height: 0; }
  .caption { display: none; }
  .device { flex: 1; width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
  .appbar:not(.back) { display: none; }
  .panel-ops { padding: 12px 12px 16px; overflow-y: auto; }
  .ops { padding: 16px; border-radius: 20px; }
  .foot { padding: 6px 14px calc(8px + env(safe-area-inset-bottom)); font-size: 11px; line-height: 1.3; background: #fff; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* cash credit */
.cashrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.cashrow strong { display: block; font-size: 15px; }
.cashrow small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.cashrow .chev { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.cashrow .chev svg { width: 18px; height: 18px; }
.lede { font-size: 14.5px; color: var(--ink-2, var(--ink)); margin: 4px 2px 14px; }
.acct { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.acct-qr { width: 150px; height: 150px; }
.acct-qr svg { width: 100%; height: 100%; display: block; }
.chips { display: flex; gap: 8px; }
.chips button { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.chips button[aria-pressed="true"] { border-color: var(--red); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.cash-ok { text-align: center; padding: 28px 8px; }
.cash-ok .okmark { margin: 0 auto 12px; }
.cash-ok h3 { font: 700 30px/1.1 var(--cond); margin-bottom: 6px; }
