/* Palm Eye Cloud portal — Live, Sessions, Missing data and Settings page details (pages/live.js, sessions.js, missing.js,
 * settings.js). Tokens only — every colour is a CSS variable, so light and dark both follow the theme.
 * Copyright © 2026 Palm Digitalz. All rights reserved. */

.p2-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- live ---------- */
.lv-win-k { font-size: var(--t-subhead); }
.lv-status { font-size: var(--t-subhead); margin: -12px 0 14px; }
.live-grid.lv-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.lv-card { display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s; }
.lv-card.lv-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.lv-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lv-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 600; }
.lv-title .pulse, .lv-title .dot { flex: none; }
.lv-veh { color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lv-veh:hover { color: var(--accent); }
.lv-who { font-size: var(--t-subhead); color: var(--secondary); overflow-wrap: anywhere; }
.lv-who .owner { white-space: normal; }
.lv-age { font-size: 13px; }
.lv-age .grow { min-width: 0; }
.lv-age-x { font-size: var(--t-foot); }
.lv-chip { padding: 6px 10px; border-radius: 10px; }
.lv-chip .chip-k { font-size: var(--t-foot); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-chip .chip-v { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-chip-u { font-size: var(--t-foot); color: var(--secondary); margin-left: 3px; font-weight: 500; letter-spacing: 0; }
.lv-pid { font-family: var(--mono); font-size: 10px; color: var(--tertiary); }
.lv-kv { font-size: var(--t-subhead); gap: 5px 12px; }
.lv-kv dd { font-variant-numeric: tabular-nums; }
.lv-kv .dot { width: 7px; height: 7px; }
.lv-catch[hidden] { display: none; }
.lv-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--hairline-soft); font-size: 13px; }
.lv-foot .grow { flex: 1; }
.lv-foot .btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.lv-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lv-meta { font-size: 13px; margin-bottom: 6px; }
.lv-meta .grow { min-width: 0; }
.lv-warn { color: var(--yellow); }
.lv-warn:empty { display: none; }
.lv-table td { height: 40px; }
.lv-table td.num { font-variant-numeric: tabular-nums; }
.lv-key { font-size: 11px; }
.tail.lv-tail { max-height: 440px; min-height: 120px; line-height: 1.55; }
.tail .rx { color: var(--label); }

/* ---------- sessions ---------- */
.sx-veh { display: inline-flex; align-items: center; gap: 6px; }
.sx-ok { color: var(--green); font-weight: 500; }

/* ---------- missing data ---------- */
.mx-filters { margin-bottom: 8px; }
.mx-count { margin-bottom: 8px; }
.mx-count:empty { display: none; }
.mx-stack { width: 160px; }
.mx-stack i + i { box-shadow: inset 1px 0 0 var(--surface); }
.mx-table td { height: auto; padding-top: 8px; padding-bottom: 8px; }
.mx-label { min-width: 160px; max-width: 300px; }
.mx-words { min-width: 180px; max-width: 320px; font-size: var(--t-subhead); color: var(--secondary); }
.mx-why { min-width: 220px; font-size: var(--t-subhead); }
.mx-ex > td { background: color-mix(in srgb, var(--surface2) 55%, transparent); }
.mx-examples { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; white-space: normal; }
.mx-example { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: var(--t-subhead); }
.mx-example .grow { flex: 1 1 240px; min-width: 0; color: var(--secondary); overflow-wrap: anywhere; }
.mx-group > summary { flex-wrap: wrap; row-gap: 2px; }
.mx-group > summary .legend-sw { align-self: center; }
.mx-gw { flex: 1 1 100%; font-size: 12px; font-weight: 400; padding-left: 21px; }
.mx-group .disclosure-body { padding-bottom: 8px; }
.pidcell.mx-cell { color: var(--label); }
.pidcell.mx-cell.st-good { background: color-mix(in srgb, var(--green) 50%, var(--surface2)); cursor: pointer; }
.pidcell.mx-cell.st-bad { background: color-mix(in srgb, var(--red) 50%, var(--surface2)); cursor: pointer; }
.pidcell.mx-cell.st-info { background: color-mix(in srgb, var(--blue) 40%, var(--surface2)); cursor: pointer; }
.pidcell.mx-cell.st-warn { background: color-mix(in srgb, var(--yellow) 45%, var(--surface2)); cursor: pointer; }
.pidcell.mx-cell.st-idle { background: color-mix(in srgb, var(--grey) 22%, var(--surface2)); color: var(--secondary); cursor: pointer; }
.pidcell.mx-cell.mx-none { background: transparent; border: 1px dashed var(--hairline-soft); color: var(--quaternary); }
.pidcell.mx-cell:not(.mx-none):hover { border-color: var(--label); }
.legend-sw.mx-none-sw { border: 1px dashed var(--hairline); background: transparent; }
.mx-sel > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
@media (prefers-reduced-motion: no-preference) { .mx-hit > td { animation: rowNew 1.6s var(--ease) both; } }

/* ---------- settings ---------- */
.sg-p { margin: 0 0 12px; font-size: var(--t-callout); color: var(--secondary); line-height: 1.5; }
.sg-kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--hairline); border-bottom-width: 2px; background: var(--surface2); color: var(--label); font: 500 12px/1.4 var(--mono); text-align: center; }

@media (max-width: 640px) {
  .lv-status { margin-top: -8px; }
  .mx-stack { width: 110px; }
  .lv-foot { gap: 10px; }
}

/* Root cause (vehicle page, 2026-10-06): one bar per cylinder, the findings, what follows */
.rca-basis { margin: 0 0 16px; }
.rca-cyls { display: flex; gap: 12px; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.rca-cyl { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rca-num { font-size: 13px; color: var(--secondary); }
.rca-bar { width: 28px; height: 120px; border-radius: 8px; background: var(--track); display: flex; align-items: flex-end; overflow: hidden; }
.rca-fill { width: 100%; background: var(--secondary); border-radius: 8px 8px 0 0; min-height: 2px; transition: height .4s var(--ease); }
.rca-cyl.bad .rca-fill { background: var(--red); }
.rca-cyl.bad .rca-num, .rca-cyl.bad .rca-label { color: var(--red); }
.rca-label { font-size: 12px; color: var(--secondary); }
.rca-codes { font-size: 11px; color: var(--orange); }
.rca-legend { margin: 8px 0 0; font-size: 12px; }
.rca-findings { display: grid; gap: 16px; margin-top: 20px; }
.rca-finding { padding: 16px; border-radius: var(--r-tile); background: var(--surface2); display: grid; gap: 6px; }
.rca-evidence { margin: 0; padding-left: 18px; color: var(--secondary); }
.rca-whatif { margin-top: 20px; display: grid; gap: 10px; }
.rca-sub { font-size: 13px; color: var(--tertiary); }
.rca-if { padding-left: 12px; border-left: 2px solid var(--orange); display: grid; gap: 2px; }

/* Readings (session page, 2026-10-07): every value, grouped as on the phone, at the cursor */
.rd-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-range { flex: 1 1 240px; accent-color: var(--accent); min-width: 160px; }
.rd-time { color: var(--secondary); font-size: 13px; white-space: nowrap; }
.rd-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 6px; flex-wrap: wrap; }
/* groups flow side by side: a two-value group takes two tiles' width and the next group sits beside it, so no row is
   left half empty (2026-10-23); a large group takes the whole line */
.rd-groups { display: flex; flex-wrap: wrap; column-gap: 24px; align-items: flex-start; }
.rd-groups > * { flex: 1 1 100%; }
.rd-groups > .rd-group { flex: 0 1 calc(var(--n, 4) * 146px - 10px); max-width: 100%; min-width: min(100%, 282px); margin-top: 18px; }
.rd-gtitle { font-size: var(--t-subhead); font-weight: 600; color: var(--secondary); margin: 0 0 8px; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.rd-tile { all: unset; box-sizing: border-box; display: grid; gap: 4px; padding: 12px 12px 10px; border-radius: var(--r-tile); background: var(--surface2); cursor: pointer; min-width: 0; transition: background .15s var(--ease); }
.rd-tile:hover { background: var(--surface3); }
.rd-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd-label { font-size: 12px; color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-row { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.rd-val { font-size: 22px; font-weight: 500; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-unit { font-size: 12px; color: var(--tertiary); white-space: nowrap; }
.rd-stale .rd-val { color: var(--tertiary); }
.rd-spark { width: 100%; height: 24px; display: block; }
.rd-line { fill: none; stroke: var(--accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rd-cursor { stroke: var(--label); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .55; }
.rd-range-text { font-size: 11px; }

/* Care (2026-10-09): dash warnings, service, breakdowns */
.care { display: grid; gap: 16px; }
.care-sec { display: grid; gap: 6px; }
.care-sub { font-weight: 600; font-size: 13px; color: var(--secondary); display: flex; gap: 8px; align-items: center; }
.care-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }

/* Engineering (2026-10-09): campaigns, coverage, runs */
.rnd-protocols { display: grid; gap: 20px; }
.rnd-proto { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--hairline-soft); }
.rnd-proto:last-child { border-bottom: 0; }
.rnd-proto.superseded { opacity: .6; }
.rnd-proto-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rnd-proto-head .grow { flex: 1; }
.rnd-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--secondary); display: grid; gap: 2px; }
.rnd-cov-head { font-size: 13px; margin: 6px 0; }
.rnd-bar { width: 120px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.rnd-bar-fill { height: 100%; background: var(--green); }
.rnd-excluded { font-size: 13px; color: var(--secondary); margin-top: 8px; }
.rnd-json { max-height: 420px; overflow: auto; font-size: 12px; background: var(--surface2); padding: 12px; border-radius: 10px; }

/* Timeline (Engineering) */
.tl-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tl-bar .select { width: auto; max-width: 340px; flex: 0 1 auto; }
.tl-time { margin-left: auto; color: var(--secondary); }
.tl-lanes { display: grid; gap: 10px; }
.tl-lane { display: grid; gap: 2px; }
.tl-head { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.tl-head .grow { flex: 1; }
.tl-name { font-weight: 600; }
.tl-val { font-size: 12px; min-width: 64px; text-align: right; }
.tl-canvas { width: 100%; display: block; background: var(--surface2); border-radius: 8px; cursor: crosshair; }
.tl-map { height: 420px; }
.tl-video { width: 100%; max-height: 360px; background: #000; border-radius: 10px; }
.tl-vnote { margin-top: 8px; font-size: 12px; }

/* ---------- Engineering › Analysis (rule builder + results) ---------- */
.eng-builder { display: grid; gap: 12px; }
.eng-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eng-rules { display: grid; gap: 10px; }
.eng-rule { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface2); }
.eng-rule-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eng-rule-head .select, .eng-rule-head .input { width: auto; flex: 0 1 auto; min-width: 0; }
.eng-rule-head .input[aria-label="Rule label"] { flex: 1 1 140px; }
.eng-rule-body { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.eng-f { display: grid; gap: 4px; min-width: 120px; flex: 0 1 160px; }
.eng-f.wide { flex: 1 1 100%; }
.eng-fl { font-size: 12px; color: var(--secondary); }
.eng-json { width: 100%; font-size: 12px; line-height: 1.45; resize: vertical; }
.eng-json.bad { border-color: var(--red); }
.eng-err { color: var(--red); font-size: 13px; min-height: 0; }
.eng-err:empty { display: none; }
.eng-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--secondary); }
.eng-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eng-actions .select { width: auto; }
.eng-actions .grow { flex: 1; }
.eng-expr { display: grid; gap: 6px; flex: 1 1 100%; }
.eng-clauses { display: grid; gap: 6px; }
.eng-clause { display: flex; gap: 6px; flex-wrap: wrap; }
.eng-clause .input, .eng-clause .select { width: auto; flex: 0 1 120px; min-width: 0; }
.eng-clause .input.mono { flex: 1 1 220px; }
.eng-clause-head .select { width: auto; }
.eng-results { margin-top: 16px; }
.eng-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.eng-score-col { display: grid; gap: 6px; align-content: start; }
.eng-score { font-size: 40px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.eng-score-u { font-size: 15px; color: var(--tertiary, var(--secondary)); font-weight: 500; margin-left: 4px; }
.eng-comps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.eng-comps li { display: grid; grid-template-columns: 1fr auto 56px; gap: 8px; }
.eng-comps li .faint { text-align: right; }
.eng-excl { font-size: 13px; color: var(--secondary); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eng-delta { font-size: 11px; font-variant-numeric: tabular-nums; }
.eng-delta.up { color: var(--orange, var(--yellow)); }
.eng-delta.down { color: var(--blue); }
.eng-share { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); margin: 12px 0 6px; }
.eng-share-seg { display: block; height: 100%; }
.eng-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--secondary); margin-bottom: 12px; }
.eng-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.eng-map { height: 380px; border-radius: 12px; overflow: hidden; }
.eng-lims { margin: 12px 0; padding-left: 18px; font-size: 13px; color: var(--secondary); display: grid; gap: 4px; }
.eng-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.eng-tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--surface2); }
.rnd-drivers { margin-bottom: 16px; }
.trip-toggle { margin: 0 0 8px; }

/* ---- secure sharing (access.js) ---- */
.ss-form { display: grid; gap: 14px; }
.ss-lede { margin: 0; font-size: var(--t-callout); line-height: 1.5; }
.ss-note { margin: -4px 0 0; }
.ss-msg { min-height: 72px; }
.ss-check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-callout); line-height: 1.45; cursor: pointer; }
.ss-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.ss-result { padding: 14px 0; border-bottom: 1px solid var(--hairline-soft); }
.ss-result-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ss-result .share-url { margin-top: 10px; }
.ss-result .hint { margin-top: 6px; }
.acc { display: grid; gap: 10px; }
.acc .share-h { margin: 10px 0 0; }
.acc-kpis { display: flex; gap: 24px; flex-wrap: wrap; font-size: var(--t-callout); padding-bottom: 6px; border-bottom: 1px solid var(--hairline-soft); }
.acc-kpis b { font-size: 20px; font-variant-numeric: tabular-nums; }
.acc-empty { font-size: 13px; }
.acc-viewers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.acc-viewer { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface2); font-size: 13px; min-width: 0; }
.acc-viewer .grow { min-width: 0; }
.acc-viewer b { overflow-wrap: anywhere; }
.avatar.sm { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; }
.acc-grant { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); font-size: var(--t-callout); }
.acc-grant .grow { flex: 1; min-width: 0; display: grid; gap: 3px; }
.acc-grant.past { opacity: .72; }
.acc-grant[data-depth="1"] { padding-left: 22px; }
.acc-grant[data-depth="2"] { padding-left: 44px; }
.acc-grant[data-depth="3"], .acc-grant[data-depth="4"] { padding-left: 66px; }
.acc-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acc-who b { overflow-wrap: anywhere; }
.acc-branch { color: var(--tertiary); }
.acc-grant .muted { font-size: var(--t-subhead); }
.acc-grant .faint { font-size: 12px; }
.acc-msg { font-size: var(--t-subhead); color: var(--secondary); font-style: italic; }
.acc-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 50%; }
.btn.acc-revoke { color: var(--red); }
.acc-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.acc-ev { display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 13px; }
.acc-ev .grow { flex: 1; min-width: 0; }
.acc-ev-t { flex: none; font-size: 12px; color: var(--secondary); min-width: 150px; }
.acc-ev.ev-code_wrong b, .acc-ev.ev-wrong_email b, .acc-ev.ev-denied b { color: var(--orange); }
@media (max-width: 820px) {
  .acc-grant { flex-direction: column; }
  .acc-actions { max-width: none; justify-content: flex-start; }
  .acc-ev { flex-wrap: wrap; gap: 4px 12px; }
  .acc-ev-t { min-width: 0; }
}

/* ---- customer mode (role customer): only My vehicles; no fleet search, no settings ---- */
body.role-customer #side a[data-nav]:not([data-nav="mine"]):not([data-nav="team"]),
body:not(.can-team) #side a[data-nav="team"],
body.role-customer #side .side-group-title,
body.role-customer #gsearch-open { display: none !important; }

/* ---- My vehicles / Customer view (pages/mine.js) ---- */
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mine-tile { display: grid; gap: 14px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.mine-tile:hover { transform: translateY(-1px); }
.mine-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mine-tile-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mine-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin-right: auto; }
.mine-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px 16px; margin: 0; }
.mine-facts dt { font-size: var(--t-foot); color: var(--tertiary); }
.mine-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.bad-text { color: var(--red); } .good-text { color: var(--green); }
.mine-list { display: grid; }
.mine-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--hairline-soft); color: inherit; text-decoration: none; font-size: var(--t-callout); }
.mine-row:hover { background: var(--surface2); }
.mine-row .grow { flex: 1; min-width: 0; }
.mine-score { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.doc-frame-wrap { display: grid; gap: 6px; }
.doc-frame { width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 1px solid var(--hairline); border-radius: 16px; background: #F4F1EC; }
.doc-frame-hint { text-align: right; }

/* ---- Customers (pages/customers.js) ---- */
.cust-vehicles { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cust-pick { display: grid; max-height: 280px; overflow: auto; border: 1px solid var(--hairline); border-radius: 12px; padding: 4px; margin-top: 6px; }
.cust-pick-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; font-size: var(--t-callout); cursor: pointer; }
.cust-pick-row:hover { background: var(--surface2); }
.cust-pick-row input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.cust-pick-row .grow { flex: 1; min-width: 0; }
.mine-tile:hover, .mine-tile:hover * { text-decoration: none; }
.facts-none { margin-top: 10px; }
.mail-err { max-width: 420px; white-space: normal; overflow-wrap: anywhere; }

/* ---- a drive's conditions and camera (conditions.js) ---- */
.cond { display: grid; gap: 14px; }
.cond-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cond-tile { padding: 12px 14px; border-radius: 14px; background: var(--surface2); display: grid; gap: 3px; min-width: 0; }
.cond-tile.hot { background: color-mix(in srgb, var(--orange) 12%, var(--surface2)); }
.cond-tile.bad-soft { background: color-mix(in srgb, var(--red) 9%, var(--surface2)); }
.cond-k { font-size: var(--t-foot); color: var(--tertiary); }
.cond-v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cond-s { font-size: 12px; color: var(--secondary); }
.cond-sky { display: inline-flex; gap: 8px; align-items: center; }
.cond-glyph { font-size: 22px; line-height: 1; }
.cond-h { font-size: var(--t-subhead); font-weight: 600; color: var(--secondary); margin: 6px 0; }
.cond-bars { display: grid; gap: 6px; }
.cond-bar { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.cond-bar-track { height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.cond-bar-track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.cond-bar-v { text-align: right; color: var(--secondary); }
.cond-none { margin: 0; font-size: var(--t-callout); }
.cam-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 14px; align-items: start; }
.cam-stage { display: grid; gap: 6px; }
.cam-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; }
.cam-caption { font-size: var(--t-subhead); }
.cam-list { display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.cam-item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 10px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.cam-item:hover { background: var(--surface2); }
.cam-item[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cam-item .grow { flex: 1; min-width: 0; }
.cam-time { color: var(--secondary); }
@media (max-width: 820px) { .cam-grid { grid-template-columns: 1fr; } .cond-bar { grid-template-columns: 100px 1fr 60px; } }

/* ---- Clients (pages/clients.js) ---- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.org-tile { display: grid; gap: 14px; color: inherit; text-decoration: none; }
.org-tile:hover, .org-tile:hover * { text-decoration: none; }
.org-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.org-tile-head { display: flex; gap: 12px; align-items: center; }
.org-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); flex: none; }
.org-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.org-vehicles .pill { text-decoration: none; }
.switchboard .share-h { margin: 14px 0 6px; }
.switchboard .share-h:first-child { margin-top: 0; }
.switch-list { display: grid; }
.switch-row { display: flex; gap: 14px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--hairline-soft); cursor: pointer; font-size: var(--t-callout); position: relative; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row .muted { font-size: var(--t-subhead); }
.switch-changed { margin-left: 8px; font-size: var(--t-caption); color: var(--accent); font-weight: 650; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--hairline); position: relative; transition: background .2s; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-input:checked + .switch-ui { background: var(--green); }
.switch-input:checked + .switch-ui::after { transform: translateX(18px); }
.switch-input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-input:disabled + .switch-ui { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .switch-ui, .switch-ui::after { transition: none; } }

/* ---- the client's dashboard (pages/mine.js) ---- */
.digest { padding: 18px 20px; }
.digest-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.digest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.digest-item { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.digest-item a { color: inherit; }
.digest-item .faint { margin-left: auto; font-size: 12px; white-space: nowrap; }
.digest-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.digest-item.bad .digest-dot { background: var(--red); }
.digest-item.good .digest-dot { background: var(--green); }
.digest-item.warn .digest-dot { background: var(--orange); }
.codes-plain { display: grid; gap: 4px; }
.dash-lamps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.code-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--hairline-soft); font-size: var(--t-callout); }
.code-row .grow { flex: 1; min-width: 0; }
.code-id { display: grid; gap: 4px; justify-items: start; min-width: 92px; }
.code-when { font-size: 12px; text-align: right; white-space: nowrap; }
.twin-teaser { display: grid; gap: 12px; justify-items: start; }
.twin-teaser p { margin: 0; }
.plain-list { margin: 6px 0 0; padding-left: 18px; }
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--t-callout); }
.feat-list li { display: flex; gap: 10px; align-items: flex-start; }
.feat-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--green); }
.feat-list li.off { opacity: .6; }
.feat-list li.off .feat-dot { background: var(--hairline); }
@media (max-width: 820px) { .code-row { flex-wrap: wrap; } .code-when { text-align: left; } }
.preview-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; }
.preview-bar .select { width: auto; min-width: 220px; height: 34px; }
.table .select { width: auto; min-width: 112px; height: 32px; padding: 0 28px 0 10px; font-size: 13px; }
