/* Prime Taxi live fleet
   Tokens first; every status colour is defined once here. */
:root {
  --bg: #e6e9ed;
  --surface: #ffffff;
  --surface-2: #f2f4f6;
  --surface-3: #e9ecf0;
  --ink: #16202a;
  --ink-2: #4c5764;
  --ink-3: #7c8693;
  --line: #d5dae0;
  --line-2: #e4e8ec;
  --focus: #2f6be0;

  --trip: #f0b400;
  --trip-ink: #2b2000;
  --alert: #d62839;
  --warn: #ea7310;
  --passenger: #2f6be0;
  --driving: #14995a;
  --waiting: #0b8784;
  --parked: #8a949f;
  --nosignal: #b3bbc4;
  --on-tone: #ffffff;

  --lamp-engine: #16202a;
  --lamp-moving: var(--driving);
  --lamp-passenger: var(--passenger);
  --lamp-meter: var(--trip);

  --tile-filter: saturate(1.08);
  --shadow: 0 1px 2px rgba(22, 32, 42, 0.08), 0 6px 18px rgba(22, 32, 42, 0.08);
  --radius: 10px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1318;
    --surface: #161d24;
    --surface-2: #1c242d;
    --surface-3: #232d37;
    --ink: #e8edf2;
    --ink-2: #a9b4bf;
    --ink-3: #74808c;
    --line: #2b3540;
    --line-2: #222b35;
    --focus: #6b9bff;
    --trip: #ffc21f;
    --alert: #ff4d5e;
    --warn: #ff9536;
    --passenger: #5f8fff;
    --driving: #2fc678;
    --waiting: #25b4ae;
    --parked: #6c7783;
    --nosignal: #47525e;
    --lamp-engine: #e8edf2;
    --tile-filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.88) saturate(1.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1318;
  --surface: #161d24;
  --surface-2: #1c242d;
  --surface-3: #232d37;
  --ink: #e8edf2;
  --ink-2: #a9b4bf;
  --ink-3: #74808c;
  --line: #2b3540;
  --line-2: #222b35;
  --focus: #6b9bff;
  --trip: #ffc21f;
  --alert: #ff4d5e;
  --warn: #ff9536;
  --passenger: #5f8fff;
  --driving: #2fc678;
  --waiting: #25b4ae;
  --parked: #6c7783;
  --nosignal: #47525e;
  --lamp-engine: #e8edf2;
  --tile-filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.88) saturate(1.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* tone helper: any element with .tone-x gets --tone */
.tone-trip { --tone: var(--trip); --tone-ink: var(--trip-ink); }
.tone-alert { --tone: var(--alert); --tone-ink: #fff; }
.tone-warn { --tone: var(--warn); --tone-ink: #fff; }
.tone-passenger { --tone: var(--passenger); --tone-ink: #fff; }
.tone-driving { --tone: var(--driving); --tone-ink: #fff; }
.tone-waiting { --tone: var(--waiting); --tone-ink: #fff; }
.tone-parked { --tone: var(--parked); --tone-ink: #fff; }
.tone-nosignal { --tone: var(--nosignal); --tone-ink: var(--ink); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.4 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 40px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-3); }
.warn { color: var(--warn); }
.bad { color: var(--alert); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.link { color: var(--focus); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--tone); flex: none; }
.icon { flex: none; display: block; }

/* ---------- shell ---------- */
.shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shell > * { flex: none; }
.shell > main { flex: 1 1 auto; min-height: 0; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark {
  align-self: center;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--trip);
  color: var(--trip-ink);
}
.brand-name { font: 700 20px/1 var(--font-cond); letter-spacing: 0.01em; }
.brand-sub { color: var(--ink-3); font-weight: 500; }
.conn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}
.conn-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.conn-meta { color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.conn-ok .conn-dot { background: var(--driving); box-shadow: 0 0 0 0 var(--driving); animation: pulse 2s infinite; }
.conn-warn { color: var(--warn); }
.conn-warn .conn-dot { background: var(--warn); }
.conn-bad { color: var(--alert); background: color-mix(in srgb, var(--alert) 12%, var(--surface)); }
.conn-bad .conn-dot { background: var(--alert); }
.conn-wait .conn-dot { background: var(--ink-3); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--driving) 60%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.clock { font: 600 18px/1 var(--font-cond); white-space: nowrap; }
.clock-day { color: var(--ink-3); font-weight: 500; font-size: 15px; margin-right: 4px; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg.small button { padding: 4px 10px; font-size: 13px; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); justify-content: center; }
.btn.float { box-shadow: var(--shadow); border-color: transparent; }

/* ---------- fleet bar ---------- */
.fleetbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 14px 20px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.fleetbar-main { display: flex; gap: 20px; align-items: flex-start; min-width: 0; }
.fleet-count { display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.fleet-count-n { font: 700 44px/0.9 var(--font-cond); }
.fleet-count-l { color: var(--ink-3); font-weight: 500; }
.statebar-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.statebar {
  display: flex; gap: 3px; height: 40px; border-radius: 9px; overflow: hidden;
}
.statebar button {
  min-width: 34px; display: flex; align-items: center; padding: 0 12px;
  background: var(--tone); color: var(--tone-ink);
  font: 700 20px/1 var(--font-cond);
  transition: opacity 0.15s, flex-grow 0.4s;
}
.statebar button.faded { opacity: 0.25; }
.statebar button.picked { box-shadow: inset 0 0 0 3px var(--ink); }
.statebar-empty { color: var(--ink-3); align-self: center; padding: 0 4px; }
.statebar .seg-trip { --tone: var(--trip); --tone-ink: var(--trip-ink); }
.statebar .seg-alert { --tone: var(--alert); --tone-ink: #fff; }
.statebar .seg-warn { --tone: var(--warn); --tone-ink: #fff; }
.statebar .seg-passenger { --tone: var(--passenger); --tone-ink: #fff; }
.statebar .seg-driving { --tone: var(--driving); --tone-ink: #fff; }
.statebar .seg-waiting { --tone: var(--waiting); --tone-ink: #fff; }
.statebar .seg-parked { --tone: var(--parked); --tone-ink: #fff; }
.statebar .seg-nosignal {
  --tone: var(--nosignal); --tone-ink: var(--ink);
  background: repeating-linear-gradient(135deg, var(--nosignal) 0 6px, color-mix(in srgb, var(--nosignal) 70%, var(--surface)) 6px 12px);
}
.legend { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 7px;
  border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.legend-item b { font-weight: 700; color: var(--ink); }
.legend-item:hover { background: var(--surface-2); }
.legend-item.picked { background: var(--ink); color: var(--surface); }
.legend-item.picked b { color: var(--surface); }
.legend-item.zero { opacity: 0.5; }

.fleetbar-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.signals { display: flex; gap: 6px; }
.signal {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px;
  align-items: center; padding: 6px 12px 6px 8px; border-radius: 9px; background: var(--surface-2);
  text-align: left; border: 1px solid transparent;
}
.signal .lamp { grid-row: 1 / 3; }
.signal-n { font: 700 22px/1 var(--font-cond); }
.signal-l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.signal:hover { border-color: var(--line); }
.signal.picked { border-color: var(--ink); background: var(--surface); }
.today {
  display: flex; gap: 14px; align-items: baseline; font-size: 14px; color: var(--ink-2);
  padding: 5px 10px; margin: -5px -10px; border-radius: 8px; text-align: left;
}
.today:hover { background: var(--surface-2); }
.today .bad b { color: var(--alert); }
.today.has-flag { background: color-mix(in srgb, var(--alert) 9%, var(--surface)); }
.today b { color: var(--ink); font: 700 17px/1 var(--font-cond); }
.today-l { font-weight: 600; color: var(--ink-3); }

/* ---------- alert banner ---------- */
.alert-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 20px; background: var(--alert); color: #fff;
}
.alert-banner .icon { margin-top: 1px; }
.alert-list { display: flex; flex-direction: column; gap: 2px; }
.alert-list button { text-align: left; color: #fff; font-weight: 500; }
.alert-list button:hover { text-decoration: underline; }
.alert-list .muted { color: rgba(255, 255, 255, 0.8); }

/* ---------- plate ---------- */
.plate {
  display: inline-flex; align-items: stretch; height: 26px;
  border: 1.5px solid #1b1f24; border-radius: 5px; overflow: hidden; background: #fff; color: #111;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  flex: none;
}
.plate-eu {
  display: grid; place-items: end center; width: 15px; padding-bottom: 2px;
  background: #1446a0; color: #fff; font: 700 8px/1 var(--font); letter-spacing: 0.02em;
}
.plate-num {
  display: flex; align-items: center; padding: 0 7px 0 6px;
  font: 700 16px/1 var(--font-cond); letter-spacing: 0.04em; white-space: nowrap;
}
.plate.lg { height: 38px; border-width: 2px; border-radius: 7px; }
.plate.lg .plate-eu { width: 22px; font-size: 11px; padding-bottom: 4px; }
.plate.lg .plate-num { font-size: 25px; padding: 0 11px 0 9px; }

/* ---------- lamps ---------- */
.lamp {
  position: relative; display: inline-grid; place-items: center;
  width: 30px; height: 26px; border-radius: 7px; flex: none;
  color: color-mix(in srgb, var(--ink-3) 55%, transparent);
  background: var(--surface-2);
}
.lamp-engine { --lamp: var(--lamp-engine); }
.lamp-moving { --lamp: var(--lamp-moving); }
.lamp-passenger { --lamp: var(--lamp-passenger); }
.lamp-meter { --lamp: var(--lamp-meter); }
.lamp.is-on { background: var(--lamp); color: var(--surface); }
.lamp-meter.is-on { color: var(--trip-ink); }
.lamp.is-stale-on { background: color-mix(in srgb, var(--lamp) 30%, var(--surface)); color: var(--lamp); outline: 1.5px dashed var(--lamp); outline-offset: -1.5px; }
.lamp.is-stale-off { outline: 1.5px dashed var(--line); outline-offset: -1.5px; }
.lamp.is-na { background: transparent; opacity: 0.6; }
.lamp.is-unknown { background: transparent; outline: 1.5px dashed var(--line); outline-offset: -1.5px; }
.lamp-q {
  position: absolute; right: -3px; top: -5px; font: 700 11px/1 var(--font); color: var(--ink-3);
  background: var(--surface); border-radius: 50%; width: 13px; height: 13px; display: grid; place-items: center;
}

/* ---------- state tag ---------- */
.state-tag {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; white-space: nowrap;
}
.tone-alert .state-tag, .state-tag.tone-alert { color: var(--alert); }
.state-tag.tone-warn { color: var(--warn); }

/* ---------- split view ---------- */
.split { display: grid; grid-template-columns: minmax(600px, 660px) minmax(0, 1fr); }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.side-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); }
.side-tabs button, .tabs button {
  padding: 8px 10px 9px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.side-tabs button b { font-weight: 600; margin-left: 4px; color: var(--ink-3); }
.side-tabs button b.flag { color: #fff; background: var(--alert); padding: 1px 7px; border-radius: 999px; font-size: 12.5px; }
.side-tabs button.on, .tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.list { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.list-tools { display: flex; gap: 10px; align-items: center; padding: 12px 16px 8px; }
.search {
  flex: 1; min-width: 0; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2);
}
.search:focus { outline: 2px solid var(--focus); outline-offset: -1px; background: var(--surface); }
.filter-note { padding: 0 16px 8px; color: var(--ink-2); font-size: 14px; display: flex; gap: 10px; }
.filter-note.wide { padding: 0 0 12px; }

.list-head, .row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 140px 40px 152px;
  align-items: center;
  column-gap: 12px;
}
.list-head {
  padding: 6px 16px 6px 20px; font-size: 12.5px; color: var(--ink-3); font-weight: 500;
  border-bottom: 1px solid var(--line-2);
}
.lamp-heads { display: grid; grid-template-columns: repeat(4, 30px); gap: 6px; }
.lamp-heads span { text-align: center; white-space: nowrap; font-size: 11.5px; }
.rows { list-style: none; margin: 0; padding: 4px 8px 16px; overflow: auto; flex: 1; }
.row {
  width: 100%; text-align: left; padding: 9px 8px 9px 12px; border-radius: 9px;
  position: relative; min-height: 58px;
}
.row::before {
  content: ""; position: absolute; left: 2px; top: 10px; bottom: 10px; width: 4px; border-radius: 3px; background: var(--tone);
}
.row:hover { background: var(--surface-2); }
.row.sel { background: color-mix(in srgb, var(--focus) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--focus); }
.row.quiet .row-state, .row.quiet .row-plate { opacity: 0.72; }
.row-state { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row-sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-lamps { display: grid; grid-template-columns: repeat(4, 30px); gap: 6px; }
.row-speed { font: 700 19px/1 var(--font-cond); }
.row-today { min-width: 0; }
.row-ride { grid-column: 2 / -1; padding-top: 6px; min-width: 0; }
.row { row-gap: 0; }
.rows .empty, .events .empty { padding: 24px 16px; color: var(--ink-3); list-style: none; }

/* ---------- map ---------- */
.mapcol { position: relative; min-width: 0; min-height: 0; }
.map-wrap { position: absolute; inset: 0; }
.map { position: absolute; inset: 0; background: var(--surface-3); }
.map .leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 11px; }
.map-tools { position: absolute; left: 14px; top: 14px; z-index: 500; display: flex; gap: 8px; align-items: center; }
.map-note { background: var(--surface); padding: 6px 10px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); }
.map-legend {
  position: absolute; left: 14px; bottom: 22px; z-index: 500; display: flex; flex-direction: column; gap: 3px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); padding: 8px 11px; border-radius: 8px;
  font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow);
}
.map-legend span { display: flex; align-items: center; gap: 8px; }
.lg-line { width: 22px; height: 5px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1.5px rgba(16, 22, 29, 0.55); }
.lg-off { background: var(--alert); }
.lg-on { background: var(--trip); }
.lg-empty { height: 0; box-shadow: none; border-top: 3px dotted #4a5663; border-radius: 0; }
.ride-tip {
  background: #10161d; color: #fff; border: 0; font: 600 12.5px var(--font); padding: 3px 8px; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.ride-tip::before { display: none; }
.ride-chip {
  position: absolute; left: 14px; top: 60px; z-index: 550; max-width: calc(100% - 28px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 8px 7px 14px;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); border-left: 5px solid var(--tone); font-size: 14px;
}
.has-detail .ride-chip { max-width: calc(100% - 450px); }
.ride-chip-main b { font: 700 16px var(--font-cond); letter-spacing: 0.03em; margin-right: 4px; }
.ride-chip-off { color: var(--alert); font-weight: 600; }
.ride-chip .icon-btn { width: 28px; height: 28px; }
.has-detail .map-tools { right: 430px; }

.mk-wrap { background: none; border: 0; }
.mk {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px 0 6px;
  border-radius: 14px; background: var(--tone); color: var(--tone-ink); white-space: nowrap;
  font: 700 14px/1 var(--font-cond); letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px var(--surface), 0 3px 8px rgba(0, 0, 0, 0.3);
  transform-origin: 14px 14px; transition: transform 0.15s;
}
.mk-ico { display: grid; place-items: center; width: 16px; height: 16px; }
.mk-ico svg { display: block; transition: transform 0.6s; }
.mk-speed { font-weight: 600; opacity: 0.85; padding-left: 4px; border-left: 1px solid color-mix(in srgb, var(--tone-ink) 40%, transparent); }
.mk.old { opacity: 0.75; }
.mk.stacked { box-shadow: 0 0 0 2px var(--surface), 0 2px 5px rgba(0, 0, 0, 0.25); }
.mk { position: relative; }
.mk.tone-parked, .mk.tone-nosignal { box-shadow: 0 0 0 2px var(--surface), 0 2px 5px rgba(0, 0, 0, 0.25); }
.mk.sel { transform: scale(1.22); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--surface), 0 6px 16px rgba(0, 0, 0, 0.35); }
.mk.tone-alert { animation: blink 1.2s infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 9px color-mix(in srgb, var(--alert) 35%, transparent); } }

/* ---------- detail ---------- */
.detail {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: 404px; z-index: 600;
  display: flex; flex-direction: column; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line);
}
.detail-head { padding: 16px 18px 14px; border-top: 5px solid var(--tone); }
.detail-id { display: flex; align-items: center; justify-content: space-between; }
.detail-state { display: flex; flex-direction: column; margin-top: 12px; }
.detail-state-l { display: flex; align-items: center; gap: 9px; font: 700 24px/1.1 var(--font-cond); }
.detail-state-l .swatch { width: 14px; height: 14px; border-radius: 4px; }
.detail-state-s { color: var(--ink-2); font-weight: 500; margin-top: 3px; }
.detail-hint { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }
.detail-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.detail-body { padding: 14px 18px 20px; overflow: auto; flex: 1; }
.detail-body.flush { padding: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--surface-2);
}
.tile .lamp { width: 38px; height: 34px; border-radius: 9px; }
.tile .lamp:not(.is-on) { background: var(--surface); }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-k { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.tile-v { font-weight: 700; font-size: 16px; line-height: 1.2; }
.tile-s { font-size: 12.5px; color: var(--ink-2); }
.current-trip {
  margin-top: 10px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 12px;
  padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--trip) 22%, var(--surface));
}
.ct-l { font-weight: 600; }
.ct-v { font: 700 24px/1 var(--font-cond); justify-self: end; }
.ct-s { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.facts { margin: 14px 0 0; display: grid; grid-template-columns: 1fr; }
.facts > div {
  display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px;
}
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sub { font: 600 15px/1.2 var(--font); margin: 20px 0 0; color: var(--ink); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.bars i { width: 3px; background: var(--line); border-radius: 1px; }
.bars i.on { background: var(--ink-2); }

.trips { padding: 4px 18px 4px; }
.trips table, .signals-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.trips th, .trips td, .signals-table th, .signals-table td {
  padding: 6px 4px; border-bottom: 1px solid var(--line-2); text-align: left;
}
.trips th, .signals-table th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.trips .num, .signals-table .num { text-align: right; }
.signals-table { margin: 4px 0; }
.signals-table th:first-child, .signals-table td:first-child { padding-left: 18px; }
.signals-table th:last-child, .signals-table td:last-child { padding-right: 18px; }
.note { font-size: 12.5px; color: var(--ink-3); padding: 8px 18px 16px; margin: 0; }

/* ---------- activity ---------- */
.activity { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chips { display: flex; gap: 6px; padding: 12px 16px 8px; flex-wrap: wrap; }
.chips button { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.chips button.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.events { list-style: none; margin: 0; padding: 0 8px 16px; overflow: auto; flex: 1; }
.ev {
  display: grid; grid-template-columns: 46px 26px 1fr; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px; font-size: 14.5px;
}
.ev:hover { background: var(--surface-2); }
.ev time { color: var(--ink-3); font-weight: 500; }
.ev-icon {
  display: grid; place-items: center; width: 26px; height: 24px; border-radius: 6px;
  background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone);
}
.ev.tone-trip .ev-icon { background: var(--trip); color: var(--trip-ink); }
.ev.tone-alert .ev-icon { background: var(--alert); color: #fff; }
.ev.tone-parked .ev-icon { color: var(--ink-3); }
.ev-body { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.ev-plate { font: 700 15px/1 var(--font-cond); letter-spacing: 0.03em; }
.ev-plate:hover { text-decoration: underline; }
.ev.tone-alert .ev-text { color: var(--alert); font-weight: 600; }
.ev-detail { color: var(--ink-3); font-size: 13.5px; }
.ev-day { list-style: none; padding: 12px 8px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.activity.compact .chips { padding-top: 14px; }

/* ---------- board ---------- */
.boardview { display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.board { overflow: auto; padding: 18px 20px 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: var(--surface); border-radius: 12px; padding: 14px 14px 12px 18px; border: 1px solid var(--line);
  overflow: hidden;
}
.card:hover { border-color: var(--ink-3); }
.card.sel { box-shadow: 0 0 0 2px var(--focus); border-color: var(--focus); }
.card-band { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tone); }
.card.tone-nosignal .card-band { background: repeating-linear-gradient(180deg, var(--nosignal) 0 6px, transparent 6px 10px); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-speed { font: 700 26px/1 var(--font-cond); }
.card-speed small { font: 500 13px var(--font); color: var(--ink-3); margin-left: 3px; }
.card-state { font: 700 20px/1.15 var(--font-cond); margin-top: 8px; }
.card.tone-alert .card-state { color: var(--alert); }
.card.tone-warn .card-state { color: var(--warn); }
.card-since { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-lamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.card-lamp { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.card-lamp .lamp { width: 100%; height: 32px; }
.card-lamp-l { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.card-lamp-s { font-size: 11.5px; color: var(--ink-3); min-height: 14px; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3);
}
.card-foot > span:last-child { display: inline-flex; align-items: center; gap: 8px; }
.card.quiet .card-state, .card.quiet .card-top { opacity: 0.75; }
.board-side { position: relative; border-left: 1px solid var(--line); background: var(--surface); min-height: 0; display: flex; flex-direction: column; }
.board-side .detail { position: static; inset: auto; width: auto; flex: 1; border-radius: 0; box-shadow: none; border: 0; }
.board-activity { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.board-activity .sub { margin: 16px 16px 0; font-size: 17px; }

/* ---------- sign-in ---------- */
.signin {
  margin: 16px 20px; padding: 18px 20px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line);
  display: grid; gap: 10px; max-width: 420px;
}
.signin h2 { margin: 0; font: 700 20px/1.2 var(--font-cond); }
.signin p { margin: 0; color: var(--ink-2); font-size: 14px; }
.signin label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.signin input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .fleetbar { grid-template-columns: 1fr; gap: 12px; }
  .fleetbar-side { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .split { grid-template-columns: minmax(560px, 600px) minmax(0, 1fr); }
  .boardview { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 980px) {
  .shell { height: auto; min-height: 100dvh; overflow: visible; display: block; }
  .topbar { flex-wrap: wrap; gap: 10px 14px; padding: 10px 16px; position: sticky; top: 0; z-index: 1000; }
  .brand-sub, .clock-day { display: none; }
  .conn { order: 3; flex-basis: 100%; justify-content: flex-start; background: none; padding: 0; }
  .conn-bad { background: none; }
  .fleetbar { padding: 12px 16px; }
  .fleet-count-n { font-size: 36px; }
  .signals { flex-wrap: wrap; }
  .split { display: flex; flex-direction: column; }
  .side { border-right: 0; }
  .rows { overflow: visible; }
  .events { overflow: visible; max-height: none; }
  .mapcol { height: 62vh; min-height: 380px; border-top: 1px solid var(--line); }
  .detail, .board-side .detail {
    position: fixed; inset: 0; width: auto; z-index: 2000; border-radius: 0; border: 0;
  }
  .has-detail .map-tools { right: auto; }
  .boardview { display: block; }
  .board { padding: 14px 16px; overflow: visible; }
  .board-side { border-left: 0; border-top: 1px solid var(--line); }
  .events { padding-bottom: 24px; }
}
@media (max-width: 600px) {
  .seg button { padding: 6px 9px; }
  .list-head { display: none; }
  .row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "plate state speed" "lamps lamps today" "ride ride ride";
    row-gap: 8px;
  }
  .row-plate { grid-area: plate; }
  .row-state { grid-area: state; }
  .row-speed { grid-area: speed; }
  .row-lamps { grid-area: lamps; grid-template-columns: repeat(4, 38px); }
  .row-lamps .lamp { width: 38px; }
  .row-today { grid-area: today; text-align: right; }
  .row-ride { grid-area: ride; grid-column: auto; padding-top: 0; }
  .row-speed::after { content: " km/h"; font: 500 12px var(--font); color: var(--ink-3); }
  .legend-item { font-size: 13px; }
  .legend-item.zero { display: none; }
  .signals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .signal { grid-template-columns: auto 1fr; padding: 6px; column-gap: 6px; }
  .signal .lamp { width: 24px; height: 22px; }
  .signal-l { font-size: 11.5px; white-space: normal; line-height: 1.1; }
  .signal-n { font-size: 19px; }
  .fleetbar-side { gap: 8px; }
  .topbar { gap: 8px 10px; }
  .brand-name { font-size: 18px; }
  .clock { display: none; }
  .today { flex-wrap: wrap; gap: 4px 12px; }
  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- rides: the theft-spotting pieces ---------- */
.ride-now { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ride-line { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.ride-line b { color: var(--ink); font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.pill.bad { background: var(--alert); color: #fff; }
.pill.ok { background: var(--trip); color: var(--trip-ink); }
.share { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); min-width: 40px; }
.share i { display: block; min-width: 3px; }
.share .s-on { background: var(--trip); }
.share .s-off { background: var(--alert); }
.share .s-unk { background: var(--passenger); }
.ride-now.big .ride-line { font-size: 15px; }

.today-cell { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; white-space: nowrap; color: var(--ink-2); }
.today-cell b { color: var(--ink); font-weight: 700; }
.today-cell .bad, .today-cell .bad b { color: var(--alert); font-weight: 600; }
.today-cell.dim, .today-cell .dim { color: var(--ink-3); }

.verdict {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--tone); color: var(--tone-ink); white-space: nowrap;
}
.verdict.tone-parked { background: var(--surface-3); color: var(--ink-3); }

.ridelist { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rides { list-style: none; margin: 0; padding: 0 8px 16px; overflow: auto; flex: 1; }
.rides .empty { padding: 24px 12px; color: var(--ink-3); }
.ride {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 9px 10px 9px 14px;
  border-radius: 9px; position: relative;
}
.ride::before { content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px; width: 4px; border-radius: 3px; background: var(--line); }
.ride.flag::before { background: var(--alert); }
.ride:hover { background: var(--surface-2); }
.ride.sel { background: color-mix(in srgb, var(--focus) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--focus); }
.ride.quiet { opacity: 0.65; }
.ride-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ride-plate { font: 700 16px/1 var(--font-cond); letter-spacing: 0.03em; min-width: 62px; }
.ride-time { font-weight: 600; }
.ride-len { color: var(--ink-2); }
.ride-top .verdict { margin-left: auto; align-self: center; }
.ride-bottom { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.ride-meter { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.ride-meter .bad { font-weight: 600; }

.ride-card {
  margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--trip) 16%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--trip) 60%, var(--surface));
}
.ride-card.off { background: color-mix(in srgb, var(--alert) 9%, var(--surface)); border-color: var(--alert); }
.ride-card-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.ride-card-head b { font: 700 28px/1 var(--font-cond); }
.ride-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ride-stats > div { display: flex; flex-direction: column; padding: 7px 9px; border-radius: 8px; background: var(--surface); }
.ride-stats span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.ride-stats b { font: 700 20px/1.15 var(--font-cond); }
.ride-stats small { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.ride-stats .st-off b, .ride-stats .st-off small { color: var(--alert); }
.ride-card .share { height: 8px; }
.ride-note { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.detail .tiles { margin-top: 0; }
.detail .sub:first-child { margin-top: 0; }
.card-ride { margin-top: 2px; }

/* ---------- timeline ---------- */
.tl { display: flex; flex-direction: column; gap: 10px; }
.tl-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tl-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tl-key { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.k-off { background: var(--alert); }
.k-pass { background: var(--passenger); }
.k-meter { background: var(--trip); }
.k-engine { background: color-mix(in srgb, var(--ink-3) 30%, var(--surface)); }
.tl-grid { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 10px; }
.tl-row {
  display: grid; grid-template-columns: 196px minmax(0, 1fr) 132px; column-gap: 14px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--line-2);
}
.tl-row:last-child { border-bottom: 0; }
.tl-row.sel { background: color-mix(in srgb, var(--focus) 8%, var(--surface)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--focus) 8%, var(--surface)); border-radius: 4px; }
.tl-head { font-size: 12.5px; color: var(--ink-3); font-weight: 500; padding: 4px 0 2px; }
.tl-axis { position: relative; height: 18px; }
.tl-tick { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-tick.now { transform: translateX(-100%); font-weight: 600; color: var(--ink-2); }
.tl-id { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.tl-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-lane { position: relative; height: 34px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.tl-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-seg { position: absolute; min-width: 2px; padding: 0; border: 0; }
.tl-seg.engine { top: 0; bottom: 0; background: color-mix(in srgb, var(--ink-3) 22%, var(--surface)); }
.tl-seg.pass { top: 3px; height: 15px; border-radius: 3px; background: var(--passenger); cursor: pointer; }
.tl-seg.pass.unmetered { background: var(--alert); }
.tl-seg.pass:hover { filter: brightness(1.15); outline: 2px solid var(--ink); }
.tl-seg.meter { bottom: 3px; height: 11px; border-radius: 3px; background: var(--trip); }

@media (max-width: 980px) {
  .tl-row { grid-template-columns: 104px minmax(0, 1fr); }
  .tl-row > .today-cell, .tl-head > span:last-child { display: none; }
  .tl-state { display: none; }
  .ride-chip, .has-detail .ride-chip { left: 12px; right: 12px; max-width: none; }
}

/* ------------------------------------------------------------ drivers, shifts and takings */
.row-plate { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.row-driver {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.detail-driver { color: var(--ink-2); font-weight: 500; margin-top: 3px; }
.detail-driver b { color: var(--ink); }
.today-cell .lek b { font-weight: 700; }
.btn.small { padding: 4px 9px; font-size: 13px; }

.boardview.solo { grid-template-columns: minmax(0, 1fr); }
.sh { display: flex; flex-direction: column; gap: 14px; max-width: 1180px; }
.sh-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sh-tools .chips { padding: 0; }
.sh-warn {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}
.sh-warn .icon { color: var(--warn); margin-top: 1px; }
.sh-warn .link { white-space: nowrap; margin-left: auto; }
.sh-totals { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; }
.sh-totals > div {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.sh-totals span { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.sh-totals b { font: 700 28px/1.15 var(--font-cond); }
.sh-totals small { font-size: 13px; color: var(--ink-2); }
.sh-totals .is-bad b { color: var(--alert); }
.sh-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.sh-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sh-table th {
  text-align: left; font-size: 12.5px; font-weight: 500; color: var(--ink-3);
  padding: 10px 12px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.sh-table th.num { text-align: right; }
.sh-table td { padding: 9px 12px; vertical-align: middle; white-space: nowrap; }
.sh-table tr.first td { border-top: 1px solid var(--line-2); }
.sh-table tbody tr:first-child td { border-top: 0; }
.sh-table small { display: block; font-size: 12.5px; }
.sh-table .empty { padding: 24px 16px; color: var(--ink-3); }
.sh-table tr.quiet .sh-hours { color: var(--ink-2); }
.sh-lek { font: 700 18px/1.2 var(--font-cond); }
.sh-editrow td { padding: 0; white-space: normal; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.sh-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.sh > .sh-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.sh-form h3 { margin: 0; font: 600 16px/1.2 var(--font); }
.sh-form p { margin: 0; font-size: 13.5px; }
.sh-form input {
  padding: 7px 10px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.sh-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 16px; }
.sh-fields label { display: grid; gap: 4px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.sh-input { display: flex; align-items: center; gap: 8px; }
.sh-input input { width: 110px; }
.sh-input i { font-style: normal; font-size: 13px; color: var(--ink-3); }
.sh-shift { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-name { flex: 1 1 180px; max-width: 280px; }
.sh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .sh-totals { grid-template-columns: 1fr; }
  .tb-rows li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id value" "track track"; row-gap: 6px; }
  .tb-id { grid-area: id; }
  .tb-track { grid-area: track; }
  .tb-value { grid-area: value; }
  .tb figcaption { flex-direction: column; align-items: flex-start; }
  .sh-warn { flex-wrap: wrap; }
  .sh-warn .link { margin-left: 28px; }
}

/* ------------------------------------------------------------ dashboard login */
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-page .signin { width: 100%; margin: 0; padding: 24px; gap: 12px; box-shadow: var(--shadow); }
.auth-page .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.signin .bad { color: var(--alert); }
.account { position: relative; }
.account-pop {
  position: absolute; right: 0; top: 44px; z-index: 3000; width: min(320px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.account-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); }
.account-who b { color: var(--ink); }
.signin.plain { margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; background: none; max-width: none; }
.signin.plain h2 { font: 600 15px/1.2 var(--font); }
.sh-date { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.sh-date input { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; }

/* ------------------------------------------------------------ expected money */
.today-money b { font-size: 22px; }
.today-cell .lek b { font: 700 16px/1.25 var(--font-cond); letter-spacing: 0.01em; }
.sh-totals .is-main { border-color: var(--ink-3); }
.sh-totals .is-main b { font-size: 36px; }

/* One bar per taxi: yellow = on the meter, red = without it. Same colours as the map routes and the timeline. */
.tb { margin: 0; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tb figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; margin-bottom: 10px; }
.tb-title { font: 600 15px/1.2 var(--font); }
.tb-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.tb-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tb-key { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.tb-key.on, .tb-seg.on { background: var(--trip); }
.tb-key.off, .tb-seg.off { background: var(--alert); }
.tb-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tb-rows li {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 132px; align-items: center; column-gap: 14px;
  padding: 7px 0; border-top: 1px solid var(--line-2);
}
.tb-rows li:first-child { border-top: 0; }
.tb-id { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.tb-track { display: flex; gap: 2px; height: 16px; padding-right: 2px; min-width: 0; }
.tb-seg { flex: none; height: 100%; min-width: 3px; }
.tb-seg:last-child { border-radius: 0 4px 4px 0; }
.tb-seg:hover { filter: brightness(1.12); outline: 2px solid var(--ink); outline-offset: 1px; }
.tb-value { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.tb-value b { font: 700 18px/1.2 var(--font-cond); color: var(--ink); }
.tb-value small { font-size: 12px; color: var(--ink-3); }
.tb-idle { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------------------ money to expect: metered + unmetered = total */
.today-op { color: var(--ink-3); font-weight: 600; }
.today-cell.money { gap: 1px; min-width: 0; }
.today-cell.money > span { display: flex; justify-content: space-between; gap: 10px; }
.today-cell.money .m-total { color: var(--ink); font-weight: 600; }
.today-cell.money .m-total b { font: 700 16px/1.25 var(--font-cond); }
.today-cell.money .m-line { font-size: 12.5px; }
.today-cell.money .m-line.bad { color: var(--alert); font-weight: 600; }

.sh-h { margin: 6px 0 -4px; font: 600 16px/1.2 var(--font); }
.sh-hint { margin: 0; font-size: 14px; color: var(--ink-2); }
.sum { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: stretch; gap: 10px; }
.sum-box {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0;
}
.sum-l { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sum-box b { font: 700 30px/1.15 var(--font-cond); white-space: nowrap; }
.sum-box small { font-size: 13px; color: var(--ink-3); }
.sum-box.is-off b { color: var(--alert); }
.sum-box.is-total { border: 2px solid var(--ink); padding: 13px 15px; }
.sum-box.is-total b { font-size: 38px; }
.sum-op { align-self: center; font: 700 28px/1 var(--font-cond); color: var(--ink-3); }

.cabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; align-items: start; }
.cab {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.cab.live { border-color: var(--trip); }
.cab.idle { background: var(--surface-2); }
.cab.idle .cab-head .plate { opacity: 0.75; }
.cab-head { display: flex; align-items: center; gap: 10px; }
.cab-who { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.cab-who b { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cab-total span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.cab-total b { font: 700 32px/1.1 var(--font-cond); white-space: nowrap; }
.cab-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.cab-bar i { min-width: 3px; }
.cab-bar .on { background: var(--trip); }
.cab-bar .off { background: var(--alert); }
.cab-lines { margin: 0; display: flex; flex-direction: column; }
.cab-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.cab-lines dt { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.cab-lines dd { margin: 0; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.cab-lines dd small { font-size: 12.5px; color: var(--ink-3); }
.cab-lines dd b { font: 700 20px/1.2 var(--font-cond); min-width: 92px; text-align: right; }
.cab-lines .is-off dd b { color: var(--alert); }
.cab-note { margin: 0; font-size: 14px; color: var(--ink-3); }
.cab .sh-form { padding: 12px 0 0; border-top: 1px solid var(--line-2); }
@media (max-width: 760px) {
  .sum { grid-template-columns: 1fr; }
  .sum-op { justify-self: center; font-size: 22px; }
  .cabs { grid-template-columns: 1fr; }
}
