/* PUC Check — forecourt console.
   Layout: a one-column console on phones (bottom tabs); on wide screens the same pages sit under a top
   tab bar, max 1120px. The verdict is carried by signal colours; IND-strip blue is the only accent.
   Plates are drawn like HSRP plates because that is what the attendant is matching against. */
:root {
  --ground: #edefec;        /* forecourt concrete */
  --slab: #ffffff;          /* cards */
  --slab-2: #f6f7f5;        /* inset rows */
  --rule: #d5d9d4;
  --ink: #15191d;           /* asphalt */
  --ink-2: #4b5258;
  --ink-3: #6e767c;
  --accent: #1f4e9e;        /* IND strip blue */
  --accent-ink: #ffffff;
  --btn: #1f4e9e;           /* filled primary buttons */
  --btn-ink: #ffffff;
  --accent-wash: #e4ecf8;
  --go: #0b7a3b;   --go-wash: #e2f2e8;   --go-ink: #0a5e2e;
  --stop: #c42b20; --stop-wash: #fbe6e3; --stop-ink: #9e2219;
  --hold: #a86300; --hold-wash: #fcefd6; --hold-ink: #7c4a00;
  --go-panel: #0b7a3b; --stop-panel: #c42b20; --hold-panel: #9a5b00;  /* verdict panels, white text, both themes */
  --bar: #14181c;           /* app bar stays dark in both themes */
  --bar-ink: #eef1f3;
  --bar-ink-2: #a8b0b7;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.06), 0 4px 16px rgba(20, 24, 28, 0.06);
  --series-1: #2a78d6;      /* chart: checked */
  --series-2: #eb6834;      /* chart: not checked */
  --grid: #e1e0d9;
  --font-ui: "Barlow", "Hind", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Hind", "Arial Narrow", system-ui, sans-serif;
  --font-deva: "Hind", "Noto Sans Devanagari", "Barlow", system-ui, sans-serif;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0e1113; --slab: #171b1e; --slab-2: #1d2226; --rule: #2b3237;
    --ink: #eef1f2; --ink-2: #b7bec4; --ink-3: #8e979e;
    --accent: #7ea6ec; --accent-ink: #0e1113; --accent-wash: #1a2740; --btn: #2d62c4; --btn-ink: #ffffff;
    --go: #2fae63; --go-wash: #10281a; --go-ink: #7fd8a3;
    --stop: #ef5b4f; --stop-wash: #2d1513; --stop-ink: #ffaaa3;
    --hold: #e5a236; --hold-wash: #2b2111; --hold-ink: #f3c87c;
    --bar: #0a0c0e; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --series-1: #3987e5; --series-2: #d95926; --grid: #2c2c2a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0e1113; --slab: #171b1e; --slab-2: #1d2226; --rule: #2b3237;
  --ink: #eef1f2; --ink-2: #b7bec4; --ink-3: #8e979e;
  --accent: #7ea6ec; --accent-ink: #0e1113; --accent-wash: #1a2740; --btn: #2d62c4; --btn-ink: #ffffff;
  --go: #2fae63; --go-wash: #10281a; --go-ink: #7fd8a3;
  --stop: #ef5b4f; --stop-wash: #2d1513; --stop-ink: #ffaaa3;
  --hold: #e5a236; --hold-wash: #2b2111; --hold-ink: #f3c87c;
  --bar: #0a0c0e; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --series-1: #3987e5; --series-2: #d95926; --grid: #2c2c2a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:lang(hi) body, [lang="hi"] { font-family: var(--font-deva); }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- app bar ---------------------------------------------------------------------------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--bar); color: var(--bar-ink);
}
.bar__row {
  max-width: 1120px; margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.brand__mark {
  display: inline-flex; align-items: stretch; height: 28px; border: 2px solid var(--bar-ink); border-radius: 5px;
  overflow: hidden; flex: none; background: #f7f7f2;
}
.brand__mark i { width: 8px; background: #1f4e9e; }
.brand__mark b { font-family: var(--font-display); font-weight: 700; color: #111; font-size: 17px; letter-spacing: 0.04em; padding: 0 6px; line-height: 24px; }
.brand__text { min-width: 0; display: grid; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; line-height: 1.1; white-space: nowrap; }
.brand__station { color: var(--bar-ink-2); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__tabs { display: none; gap: 2px; }
.bar__tab {
  color: var(--bar-ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 0.95rem;
}
.bar__tab[aria-current="page"] { color: var(--bar-ink); background: rgba(255, 255, 255, 0.1); }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { background: none; border: 0; color: var(--bar-ink-2); padding: 6px 10px; cursor: pointer; font-size: 0.85rem; font-weight: 600; min-height: 34px; }
.seg button[aria-pressed="true"] { background: var(--bar-ink); color: var(--bar); }
.iconbtn { background: none; border: 0; color: var(--bar-ink-2); padding: 6px; border-radius: 8px; cursor: pointer; display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; text-decoration: none; }
.iconbtn:hover { color: var(--bar-ink); background: rgba(255, 255, 255, 0.08); }
.demo-strip {
  background: repeating-linear-gradient(135deg, #f2b632 0 14px, #e8a920 14px 28px);
  color: #1c1400; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
}
.demo-strip__row { max-width: 1120px; margin: 0 auto; padding: 3px var(--gutter); display: flex; gap: 8px; align-items: center; }

/* ---- page ------------------------------------------------------------------------------- */
.page { max-width: 1120px; margin: 0 auto; padding: 20px var(--gutter) 120px; display: grid; gap: 20px; }
.page--narrow { max-width: 560px; }
.card { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card--flat { box-shadow: none; }
.stack { display: grid; gap: 12px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ---- buttons ------------------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: var(--r-m);
  border: 1px solid var(--rule); background: var(--slab); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.btn--primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn--go { background: var(--go-panel); color: #fff; border-color: transparent; }
.btn--stop { background: var(--stop-panel); color: #fff; border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; border-radius: 8px; }
.btn svg { flex: none; }

.scanbtn {
  width: 100%; border: 0; border-radius: var(--r-l); cursor: pointer;
  background: var(--btn); color: var(--btn-ink);
  display: grid; justify-items: center; gap: 6px; padding: 26px 16px 22px;
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(31, 78, 158, 0.25);
}
:lang(hi) .scanbtn { font-family: var(--font-deva); font-size: 1.5rem; }
.scanbtn small { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500; opacity: 0.85; letter-spacing: 0; }
:lang(hi) .scanbtn small { font-family: var(--font-deva); }
.scanbtn:disabled { opacity: 0.55; cursor: progress; }
.scanbtn:active { transform: translateY(1px); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- segmented control on light surfaces --------------------------------------------------- */
.toggle { display: inline-flex; background: var(--slab-2); border: 1px solid var(--rule); border-radius: 10px; padding: 3px; gap: 2px; }
.toggle button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--ink-2); min-height: 36px; }
.toggle button[aria-pressed="true"] { background: var(--slab); color: var(--ink); box-shadow: var(--shadow); }
.select {
  appearance: none; border: 1px solid var(--rule); background: var(--slab); border-radius: 10px;
  padding: 8px 34px 8px 12px; min-height: 42px; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}

/* ---- the plate (HSRP look) ----------------------------------------------------------------- */
.plate {
  --pw: 2px; --pfs: 1.6rem;
  display: inline-flex; align-items: stretch; gap: 0;
  background: #f7f7f2; color: #111; border: var(--pw) solid #111; border-radius: 6px;
  padding: 3px 10px 3px 3px; max-width: 100%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.plate__ind {
  display: grid; place-items: center; align-content: center; gap: 1px;
  background: #1f4e9e; color: #e8eef7; border-radius: 2px; padding: 2px 4px; margin-right: 8px; flex: none;
  font-size: calc(var(--pfs) * 0.28); font-weight: 700; letter-spacing: 0.04em; line-height: 1;
}
.plate__chakra { width: calc(var(--pfs) * 0.42); height: calc(var(--pfs) * 0.42); border: 1.5px solid currentColor; border-radius: 50%; }
.plate__num {
  font-family: var(--font-display); font-weight: 600; font-size: var(--pfs); letter-spacing: 0.04em;
  line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; align-self: center; overflow: hidden; text-overflow: ellipsis;
}
.plate__num u { text-decoration-color: var(--stop); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.plate--yellow { background: #f4c21b; }
.plate--green { background: #1d7a43; color: #fff; border-color: #0f4d29; }
.plate--green .plate__ind, .plate--green-yellow .plate__ind { background: rgba(255, 255, 255, 0.16); }
.plate--green-yellow { background: #1d7a43; color: #f4c21b; border-color: #0f4d29; }
.plate--black { background: #141414; color: #f4c21b; border-color: #444; }
.plate--sm { --pfs: 1.05rem; padding: 2px 7px 2px 2px; }
.plate--sm .plate__ind { margin-right: 5px; padding: 1px 3px; }
.plate--lg { --pfs: 2.3rem; --pw: 3px; }
.plate--xl { --pfs: clamp(2.6rem, 10vw, 6.5rem); --pw: 5px; border-radius: 12px; padding: 8px 22px 8px 8px; }
.plate--empty .plate__num { color: #8b8f93; }

/* ---- model loading ------------------------------------------------------------------------- */
.loadbar { height: 6px; background: var(--slab-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--rule); }
.loadbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.2s; }
.status { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); flex: none; }
.dot--wait { background: var(--hold); }
.dot--err { background: var(--stop); }

/* ---- demo plates scroller ------------------------------------------------------------------- */
.scroller { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.demo-chip {
  flex: none; scroll-snap-align: start; display: grid; gap: 6px; justify-items: start; text-align: left;
  background: var(--slab-2); border: 1px solid var(--rule); border-radius: var(--r-m); padding: 10px; cursor: pointer; width: 196px;
}
.demo-chip:hover { border-color: var(--ink-3); }
.demo-chip__note { font-size: 0.8rem; color: var(--ink-2); line-height: 1.3; }

/* ---- recent list ---------------------------------------------------------------------------- */
.list { display: grid; gap: 0; }
.list__row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.list__row:first-child { border-top: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 9px; border-radius: 99px; white-space: nowrap; text-transform: uppercase;
}
:lang(hi) .pill { text-transform: none; letter-spacing: 0; }
.pill--fill { background: var(--go-wash); color: var(--go-ink); }
.pill--stop { background: var(--stop-wash); color: var(--stop-ink); }
.pill--check { background: var(--hold-wash); color: var(--hold-ink); }
.pill--info { background: var(--accent-wash); color: var(--accent); }
.pill--plain { background: var(--slab-2); color: var(--ink-2); border: 1px solid var(--rule); }

/* ---- reading ------------------------------------------------------------------------------- */
.photo { position: relative; border-radius: var(--r-m); overflow: hidden; background: #000; display: grid; place-items: center; max-height: 52vh; }
.photo img { display: block; max-width: 100%; max-height: 52vh; object-fit: contain; }
.photo__scan { position: absolute; left: 0; right: 0; height: 3px; background: #6fb0ff; box-shadow: 0 0 18px 6px rgba(111, 176, 255, 0.55); animation: scan 1.4s ease-in-out infinite alternate; top: 10%; }
@keyframes scan { to { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .photo__scan { animation: none; top: 50%; } }
.photo__box { position: absolute; border: 3px solid #6fb0ff; border-radius: 4px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35); }

/* ---- verdict ------------------------------------------------------------------------------- */
.verdict { border-radius: var(--r-l); padding: 20px 20px 18px; color: #fff; display: grid; gap: 6px; }
.verdict--fill { background: var(--go-panel); }
.verdict--stop { background: var(--stop-panel); }
.verdict--check { background: var(--hold-panel); }
.verdict__head { display: flex; align-items: center; gap: 12px; }
.verdict__word { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 12vw, 4rem); line-height: 0.95; letter-spacing: 0.01em; }
:lang(hi) .verdict__word { font-family: var(--font-deva); font-size: clamp(2.1rem, 9vw, 3.1rem); line-height: 1.15; }
.verdict__reason { font-size: 1.1rem; font-weight: 600; }
.verdict__icon { width: 52px; height: 52px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--ink-3); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.crop { max-width: 100%; border-radius: 6px; border: 1px solid var(--rule); max-height: 90px; display: block; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--rule); background: var(--slab-2); border-radius: 99px; padding: 6px 12px; font-weight: 600; cursor: pointer; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.04em; min-height: 36px; }
.chip:hover { border-color: var(--ink-3); }
.question { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--slab-2); border-radius: var(--r-m); border: 1px solid var(--rule); }
.actions { display: grid; gap: 10px; }
.actions--sticky {
  position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(8px);
  padding: 10px 0; margin: 0 -2px;
}
.timing { font-size: 0.82rem; color: var(--ink-3); }
.details summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style-position: inside; }
.details[open] summary { margin-bottom: 4px; }

/* ---- sheets & overlays ------------------------------------------------------------------------ */
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 12, 0.55); z-index: 40; display: grid; align-items: end; justify-items: center; }
.sheet {
  width: 100%; max-width: 560px; background: var(--slab); color: var(--ink); border-radius: 18px 18px 0 0;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
}
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 18px; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.input {
  border: 1px solid var(--rule); background: var(--slab-2); border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%;
}
.input--plate { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.warn { color: var(--hold-ink); background: var(--hold-wash); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; }
.note { color: var(--ink-2); background: var(--slab-2); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; border: 1px solid var(--rule); }

/* customer screen: deliberately bilingual and high contrast */
.customer { position: fixed; inset: 0; z-index: 50; background: var(--slab); color: var(--ink); overflow-y: auto; }
.customer__band { background: #c42b20; color: #fff; padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 18px; }
.customer__inner { max-width: 720px; margin: 0 auto; display: grid; gap: 6px; }
.customer h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); font-family: var(--font-deva); }
.customer .en { font-family: var(--font-ui); }
.customer__body { max-width: 720px; margin: 0 auto; padding: 20px var(--gutter) 40px; display: grid; gap: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; counter-increment: step; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--slab); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }
.steps .hi { font-family: var(--font-deva); font-size: 1.15rem; font-weight: 500; }
.steps .en { color: var(--ink-2); }
.qr { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-m); }
.qr svg { width: 132px; height: 132px; display: block; border-radius: 6px; }
.plateshow { position: fixed; inset: 0; z-index: 50; background: #6b7176; display: grid; place-items: center; padding: 24px; }
.plateshow__close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--ink); color: var(--slab); padding: 10px 16px; border-radius: 10px; font-weight: 600; max-width: calc(100% - 32px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---- bottom tabs (phones) ---------------------------------------------------------------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--slab); border-top: 1px solid var(--rule);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tabs a { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; text-decoration: none; color: var(--ink-3); font-size: 0.75rem; font-weight: 600; border-radius: 10px; }
.tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }
@media (min-width: 900px) {
  .tabs { display: none; }
  .bar__tabs { display: flex; }
  .page { padding-bottom: 48px; }
  .actions--sticky { bottom: 0; }
  .toast { bottom: 28px; }
}

/* ---- dashboard ------------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; }
.kpi__label { font-size: 0.85rem; color: var(--ink-2); }
.kpi__value { font-size: 2rem; font-weight: 600; line-height: 1.1; }
.kpi__sub { font-size: 0.8rem; color: var(--ink-3); }
.kpi--alert { border-color: color-mix(in srgb, var(--hold) 55%, var(--rule)); background: var(--hold-wash); }
.kpi--alert .kpi__label, .kpi--alert .kpi__sub { color: var(--hold-ink); }
.alert { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: var(--hold-wash); color: var(--hold-ink); border: 1px solid color-mix(in srgb, var(--hold) 40%, var(--rule)); border-radius: var(--r-m); padding: 12px 14px; }
.alert strong { color: var(--ink); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.is-flag td { background: var(--hold-wash); }
.table--wrap td { white-space: normal; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font-ui); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip {
  position: absolute; pointer-events: none; background: var(--slab); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 8px; padding: 8px 10px; font-size: 0.85rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 3;
}
.tip b { font-size: 1rem; }
.tip .k { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: middle; }

/* ---- demo data & about ------------------------------------------------------------------------ */
.vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vcard { background: var(--slab); border: 1px solid var(--rule); border-radius: var(--r-m); padding: 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.vcard__meta { font-size: 0.9rem; color: var(--ink-2); }
.vcard__note { font-size: 0.85rem; color: var(--ink-3); }
.prose { display: grid; gap: 12px; max-width: 68ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .flow { grid-template-columns: minmax(0, 1fr); } }
.flow div { background: var(--slab-2); border: 1px solid var(--rule); border-radius: var(--r-m); padding: 10px 12px; font-size: 0.9rem; }
.flow b { display: block; font-size: 0.95rem; color: var(--ink); }
.form { display: grid; gap: 14px; max-width: 560px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
code { font-size: 0.88em; background: var(--slab-2); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 5px; }

/* ---- reader test mode ---------------------------------------------------------------------- */
.kpis.kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.crop--test { max-height: 140px; margin: 0 auto; }
.tlist { display: grid; }
.trow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.trow:first-child { border-top: 0; }
.trow__img { width: 96px; height: 40px; object-fit: contain; background: var(--slab-2); border-radius: var(--r-s); border: 1px solid var(--rule); display: block; }
.trow__text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tmark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--slab-2); color: var(--ink-3); font-weight: 700; }
.tmark--ok { background: var(--go-wash); color: var(--go-ink); }
.tmark--bad { background: var(--stop-wash); color: var(--stop-ink); }
