/* ==========================================================================================
   PSF AUTO — Spójny system projektowy (design tokens)
   Wszystkie kolory, typografia, odstępy, promienie, cienie i z-index w jednym miejscu.
   ========================================================================================== */
:root {
  color-scheme: dark;

  /* ── Paleta kolorów ────────────────────────────────────────────── */
  --color-bg:        #07080c;
  --color-surface:   #12141c;
  --color-surface-2: #0c1117;
  --color-surface-3: #151d27;
  --color-line:      #2c3342;
  --color-line-strong: #3a4a5c;
  --color-text:      #f4f7fb;
  --color-muted:     #c5ceda;
  --color-accent:    #f5a623;
  --color-neon:      #3ad7ff;
  --color-heat:      #ff4b9a;
  --color-ok:        #6bd36b;
  --color-warn:      #f0e442;
  --color-bad:       #ff6b5e;

  /* ── Stany spraw (mapowane na kolory semantyczne) ──────────────── */
  --st-new:    #8eabef;
  --st-progress: #56b4e9;
  --st-waiting: #f0e442;
  --st-ready:   #6bd36b;
  --st-late:   #ff6b5e;

  /* ── Gradienty i efekty ────────────────────────────────────────── */
  --sunset: linear-gradient(90deg, var(--color-accent), #ff7a1a);
  --teal: var(--color-neon);
  --gold: var(--color-accent);
  --copper: var(--color-heat);

  /* ── Typografia ────────────────────────────────────────────────── */
  --font-sans: "Segoe UI", Arial, sans-serif;
  --font-title: "Bahnschrift", "Segoe UI", Arial, sans-serif;
  --font-impact: Impact, "Arial Narrow", sans-serif;
  --font-mono: Consolas, monospace;

  --fs-base: 16px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;
  --fs-4xl: 34px;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 900;

  --lh-tight: 1.12;
  --lh-normal: 1.55;
  --lh-loose: 1.75;

  --ls-tight: -0.06em;
  --ls-normal: 0.01em;
  --ls-wide: 0.14em;
  --ls-wider: 0.42em;

  /* ── Odstępy (spacing scale) ───────────────────────────────────── */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* ── Promienie (border-radius) ─────────────────────────────────── */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 999px;

  /* ── Cienie ────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 0 rgba(255,255,255,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
  --shadow-xl: 0 14px 32px rgba(0,0,0,0.8);

  /* ── Przejścia ─────────────────────────────────────────────────── */
  --transition-fast: 140ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 240ms ease-out;

  /* ── Z-index (warstwy) ─────────────────────────────────────────── */
  --z-dropdown: 10;
  --z-tooltip: 20;
  --z-sticky: 30;
  --z-modal: 40;
  --z-toast: 60;

  /* ── Aliasy dla kompatybilności wstecznej ──────────────────────── */
  --background: var(--color-bg);
  --bg: var(--color-bg);
  --panel: var(--color-surface);
  --surface: var(--color-surface);
  --surface-2: var(--color-surface-2);
  --surface-3: var(--color-surface-3);
  --line: var(--color-line);
  --line-strong: var(--color-line-strong);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --ok: var(--color-ok);
  --warn: var(--color-warn);
  --bad: var(--color-bad);
  --accent: var(--color-accent);
  --neon: var(--color-neon);
  --heat: var(--color-heat);
  --title: var(--font-title);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.55 "Segoe UI",Arial,sans-serif; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(135deg,#ffffff0d 0 1px,transparent 1px 8px),
    repeating-linear-gradient(45deg,#ffffff08 0 1px,transparent 1px 8px);
  mask-image: radial-gradient(ellipse at center,#000 30%,transparent 80%);
}
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; padding: 16px max(24px,calc((100% - 1240px)/2)); background: linear-gradient(180deg, #0a1018 0%, #06090e 100%); border-bottom: 0; position: relative; box-shadow: var(--shadow-sm); }
header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--color-neon), var(--color-heat) 72%, var(--color-accent));
  opacity: .9;
}
header strong {
  font-family: var(--font-impact);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.06em;
  color: var(--color-text);
  text-shadow: 0 0 20px rgba(58, 215, 255, 0.35);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}
header span {
  color: var(--color-neon);
  font-family: var(--font-title);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
header span::before {
  content: ""; width: 6px; height: 6px; flex-shrink: 0;
  background: var(--color-neon); box-shadow: 0 0 12px rgba(58, 215, 255, 0.6); border-radius: 50%;
}
header .shell-toggle { order: 0; }
main,#message { max-width: 1240px; margin: 36px auto; padding: 0 24px; }
h1,h2,h3,p { margin: 0 0 14px; }
h1 { font: 400 clamp(28px,4vw,46px)/1.1 Impact,"Arial Narrow",sans-serif; letter-spacing: .06em; text-transform: uppercase; }
h2 { font-family: Bahnschrift,"Segoe UI",Arial,sans-serif; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; }
h3 { font-family: Bahnschrift,"Segoe UI",Arial,sans-serif; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
/* Kicker — małe etykiety nad nagłówkami, kodują sekcję, nie ozdabiają */
.kicker { display: inline-block; font: 700 10px/1.2 var(--font-title); letter-spacing: .26em; text-transform: uppercase; color: var(--color-neon); margin-bottom: var(--space-2); }
.kicker::before { content: "//" / ""; margin-right: 6px; color: var(--color-accent); }
/* Display number — duża cyfra z małą etykietą, używana w KPI i statystykach */
.display-num { font: 800 48px/1 var(--font-impact); letter-spacing: -.04em; color: var(--color-text); }
.display-num + .display-label { font: 600 11px/1.4 var(--font-title); letter-spacing: .16em; text-transform: uppercase; color: var(--color-muted); }
section { padding: 24px; border: 1px solid var(--line); background: var(--panel); margin: 22px 0; border-radius: 4px; overflow-wrap: anywhere; }
section section { background: #0f1620; padding: 18px; }
form,label { display: grid; gap: 8px; }
form { gap: 18px; }
label { font-size: 14px; font-weight: 600; color: var(--muted); }
button,input,textarea,select { font: inherit; min-width: 0; max-width: 100%; border: 1px solid #6b819b; border-radius: 3px; padding: 11px 13px; }
input,textarea,select { width: 100%; background: #0c131c; color: var(--text); font-size: 16px; }
input::placeholder,textarea::placeholder { color: #8d9cad; opacity: 1; }
textarea { min-height: 114px; resize: vertical; }
button { background: #1b2633; border-color: #6b819b; color: var(--text); cursor: pointer; min-height: 46px; font-weight: 650; text-align: left; white-space: normal; }
button:hover { background: #243244; border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
form > button { background: var(--accent); border-color: var(--accent); color: #1a1205; text-align: center; }
form > button:hover { background: #ffc04d; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
a { color: #ffb45e; }
main > button { margin: 0 8px 12px 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row button { flex: 0 1 auto; }
.muted { color: var(--muted); }
.pickup { padding: 12px 14px; border-left: 3px solid var(--accent); background: #2b2412; color: #ffe2a8; font-weight: 650; }
.public-note { border-left: 2px solid #6bd36b; padding-left: 16px; }
#message { color: #ffcfb4; }
#message:empty { margin: 0; padding: 0; }
#message:not(:empty) { padding: 16px 24px; border-left: 3px solid #ffb58d; background: #2e1d12; }
.login-panel { max-width: 500px; margin: 9vh auto; padding: 36px; border-top: 4px solid var(--accent); }
.login-panel h1 { font-size: 34px; }
.login-panel form { margin: 28px 0 20px; }
.login-panel > button { width: 100%; text-align: center; }
:root[data-theme="light"] .login-panel > button {
  background: var(--color-surface-2);
  border-color: var(--light-control);
}
:root[data-theme="light"] .login-panel > button:hover {
  background: var(--light-hover);
  border-color: var(--color-neon);
}
.login-panel > a { display: block; width: fit-content; margin: 16px auto 0; padding: 6px; text-underline-offset: 4px; }
.workspace-heading { padding: 4px 0 20px; }
.workspace-heading p { margin-top: 12px; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0 24px; border-top: 1px solid var(--line); }
.workspace-nav button:last-child { margin-left: auto; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.workspace-grid > section { margin: 0; }
.create-panel { border-top: 3px solid var(--accent); }
.create-panel h2,.claims-panel h2 { margin-bottom: 24px; }
.claims-panel > .muted { margin: 12px 0 8px; font-size: 13px; }
.claim-list { max-height: 600px; overflow-y: auto; scrollbar-color: #4a5d73 #0f1620; }
.claim-list .row { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; padding: 16px 8px 16px 0; }
.claim-list button { background: transparent; border: 0; border-left: 3px solid #6b819b; border-radius: 0; padding: 6px 12px; font-size: 17px; }
.claim-list button:hover { border-color: var(--accent); color: var(--accent); background: #1d2a38; }
.claim-list .muted { padding-left: 15px; font-size: 14px; }
/* Pusty stan — zachęca do działania, nie smuci. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
  color: var(--color-muted);
  text-align: center;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-accent) 4%, transparent);
}
.empty-state::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-surface-3);
  border: 1px solid var(--color-line);
  box-shadow: inset 0 0 0 1px var(--color-line-strong);
  margin-bottom: var(--space-3);
  mask-image: none;
}
label:has(:is(input, select, textarea)[data-submission-invalid]) > .field-label {
  color: var(--color-bad);
}
label:has([data-submission-invalid]) > .field-label::after {
  content: " · sprawdź pole";
  font-weight: 500;
}
form :is(input, select, textarea)[data-submission-invalid][aria-invalid="true"] {
  border-color: var(--color-bad);
}
@media(max-width:800px) {
  .workspace-grid { grid-template-columns: minmax(0,1fr); }
  .workspace-nav button { flex: 1 1 180px; }
  .workspace-nav button:last-child { margin-left: 0; }
}
@media(max-width:480px) {
  .workspace-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-nav button:first-child { grid-column: 1 / -1; }
  .workspace-nav button { font-size: 14px; }
  .claim-list { max-height: 360px; }
  header { padding: 15px 18px; gap: 12px; min-height: 78px; }
  header strong { font-size: 28px; flex-shrink: 0; }
  header span { font-size: 11px; max-width: 135px; text-align: right; }
  main,#message { padding-left: 16px; padding-right: 16px; margin-top: 26px; }
  section { padding: 18px; }
  .login-panel { padding: 24px; margin-top: 7vh; }
}
fieldset label:has(input[type=checkbox]),form label:has(>input[type=checkbox]){display:flex;align-items:center;gap:9px}input[type=checkbox]{width:18px;height:18px;accent-color:#f5a623}
.blocker-fields{min-width:0;margin:0;border:1px solid #6b819b;border-radius:6px;padding:8px 12px 12px}.blocker-fields label+label{margin-top:8px}
[hidden]{display:none!important}

/* Claim heading — sekcja nagłówka sprawy z metalową krawędzią boczną. */
.claim-heading {
  position: relative;
  padding-left: 20px;
  overflow-wrap: anywhere;
  margin-bottom: var(--space-4);
}
.claim-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 14px;
  width: 3px;
  background: linear-gradient(180deg, var(--color-neon), var(--color-heat));
}
.claim-heading .muted {
  max-width: 80ch;
  overflow-wrap: anywhere;
  color: var(--color-muted);
}

/* Claim summary — karta podsumowania z tłem powierzchni i wyraźną krawędzią. */
.claim-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-neon);
}
.claim-summary strong { color: var(--color-neon); }
.claim-summary span { color: var(--color-muted); }

.claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Case card — karta sprawy w rejestrze, metalowy wygląd z wyraźną krawędzią stanu. */
.case-card {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  margin: 0 0 var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-surface-3), var(--color-surface-2));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.case-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--color-neon);
}
.case-card.is-late::before { background: var(--color-bad); }
.case-card.is-waiting::before { background: var(--color-warn); }
.case-card.is-ready::before { background: var(--color-ok); }
.case-open {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--color-neon);
  font-family: var(--font-title);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
.case-vehicle { margin: 0; font-size: var(--fs-xl); font-weight: 700; color: var(--color-text); }
.case-kicker {
  margin: 0 0 var(--space-2);
  color: var(--color-neon);
  font-family: var(--font-title);
  font-size: var(--fs-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.next-line {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--color-warn) 12%, transparent);
  color: var(--color-warn);
  font-weight: 650;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-warn);
}
.clock-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.clock-tile {
  margin: 0;
  padding: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}
.clock-tile strong {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xl);
  color: var(--color-text);
}
.case-steps { margin: 0; padding-left: var(--space-4); }
.case-steps li { margin: var(--space-1) 0; }
.movement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.movement-grid form, .case-board form {
  background: var(--color-surface-2);
  padding: var(--space-3);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
}
.party-list .row { padding: var(--space-2) 0; }
.repair-desk { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.doc-list { margin: 0; padding-left: var(--space-4); }
.doc-list li { margin: var(--space-2) 0; }
.priority-high {
  margin: 0;
  color: var(--color-bad);
  font-weight: 650;
}
@media (max-width: 720px) {
  .clock-row, .movement-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .next-line, .case-card, .clock-tile { transition: none; }
}
.claim-shortcuts { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 20px 0; margin-top: 14px; border-bottom: 1px solid var(--line); }
.claim-shortcuts a { text-underline-offset: 5px; padding: 4px 0; font-size: 14px; }
.claim-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,360px); gap: 24px; align-items: start; }
.claim-layout > * { min-width: 0; }
.claim-layout > :is(.claim-overview-panels, #claim-damage) { grid-column: 1 / -1; }
.claim-layout { row-gap: 0; }
.claim-overview-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: start; gap: 0 24px; }
@media (max-width: 899px) { .claim-overview-panels { grid-template-columns: minmax(0, 1fr); } }
.claim-layout section { scroll-margin-top: 20px; }
.claim-layout h2 { font-size: 21px; }
.claim-sidebar section { background: #0f1620; }
.claim-sidebar button { max-width: 100%; }
.claim-history ul { max-height: 320px; overflow-y: auto; padding-left: 20px; color: var(--muted); font-size: 14px; }
.claim-history li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.claim-publication form { grid-template-columns: repeat(2,minmax(0,1fr)); }
.claim-publication form label:last-of-type,.claim-publication form > button { grid-column: 1 / -1; }
.damage-publication-guide {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 18px; margin: 12px 0; padding: 10px 14px;
  border: 1px solid var(--color-line); border-radius: var(--radius-md);
  background: var(--color-surface-2); color: var(--color-text);
}
.damage-publication-guide > div { flex: 1 1 310px; min-width: 0; }
.damage-publication-guide p { margin: 0; color: var(--color-muted); font-size: 14px; }
.damage-publication-guide button { min-height: 44px; max-width: 100%; white-space: normal; }
.claim-publication-status { font-weight: 700; }
.case-next-step { padding: 10px 12px; border-inline-start: 3px solid var(--neon); }
.case-next-step :is(.next-line, p) { margin: 4px 0 0; }
.case-next-step button { margin-top: 8px; }
.customer-next-step { border-inline-start: 3px solid var(--neon); }
.customer-next-step .customer-task-label { font-weight: 700; }
.customer-contact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-top: 12px; }
.customer-contact p { margin: 0; font-weight: 650; }
.customer-contact a { overflow-wrap: anywhere; }
.case-movement-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.case-movement-intro :is(h2,p,button) { margin-block: 0; }
.case-movement-intro p { flex-basis: 100%; }
.customer-protocol-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.customer-protocol-actions form { grid-template-columns: minmax(0,1fr); margin: 0; }
.customer-protocol-actions button { min-height: 44px; white-space: normal; }
.customer-protocol-result { font-weight: 700; }
@media(max-width:850px) {
  .claim-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media(max-width:480px) {
  .claim-summary { display: grid; gap: 8px; font-size: 14px; }
  .claim-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .claim-actions button { font-size: 14px; }
  .claim-actions button:last-child { grid-column: 1 / -1; }
  .claim-publication form { grid-template-columns: minmax(0,1fr); }
}

/* Short, interruptible UI feedback. Motion never delays an action. */
button,input,textarea,select {
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
button:active:not(:disabled) { transform: translateY(1px); }
input:focus,textarea:focus,select:focus { border-color: var(--color-neon); }
/* header: zdefiniowane powyżej (gradient tła, neon-border, logo typografia, dotykowy indicator). */
.workspace-heading { position: relative; padding-left: 18px; }
.workspace-heading::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 30px;
  width: 3px; background: linear-gradient(var(--accent),#ffa24d);
}
.create-panel,.login-panel { position: relative; }
.create-panel::after,.login-panel::after {
  content: ""; position: absolute; top: -3px; right: 0;
  width: 42px; height: 3px;
  background: repeating-linear-gradient(120deg,#07080c 0 3px,var(--neon) 3px 7px);
}
.claim-list .row { transition: background-color 140ms ease; }
.claim-list .row:focus-within { background: #1d2a38; }
.claim-list .claim-date { padding-left: 15px; color: #9fb0c2; font: 12px/1.5 Consolas,monospace; }
/* Only a running action shows the spinner; a merely disabled button stays still. */
button[aria-busy="true"]::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 10px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: working 700ms linear infinite;
}
/* `backwards`, not `both`: a kept end state leaves an identity transform on the panel, and a
   transformed ancestor turns position:fixed children (the new-claim drawer) relative to the panel. */
.dashboard,.login-panel { animation: panel-enter 240ms ease-out backwards; }
@keyframes panel-enter { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes working { to { transform: rotate(360deg); } }
@media(hover:hover) {
  .workspace-nav button:hover { box-shadow: inset 0 -2px var(--accent); }
  .claim-list .row:hover { background: #1b2734; }
  form > button:hover { box-shadow: 0 3px 18px #f5a62333; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; }
  button:active:not(:disabled) { transform: none; }
}

/* Original night-canyon HUD: carbon ground, cyan instrument light, magenta rim. Gold stays on actions. No game logos, fonts or copied graphics. */
/* Zmienne --sunset, --teal, --font-synthesis, text-rendering zdefiniowane w głównym systemie :root powyżej. */
body {
  background:
    radial-gradient(980px 520px at 108% -12%,#ff4b9a2e,transparent 62%),
    radial-gradient(860px 460px at -12% -10%,#3ad7ff24,transparent 60%),
    var(--background);
  background-attachment: fixed;
}
/* Impact has a single 400 weight; synthetic bold smeared the glyph edges. */
.claim-heading,.workspace-heading { border-left: 0; position: relative; padding-left: 18px; }
.claim-heading::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 14px; width: 3px; background: linear-gradient(var(--neon),var(--heat)); }
.workspace-heading::before { background: linear-gradient(var(--neon),var(--heat)); }
.login-panel,.create-panel { border-top-color: transparent; border-image: linear-gradient(90deg,var(--neon),var(--heat)) 1; border-image-width: 4px 0 0 0; }
form > button { background: var(--sunset); border: 0; color: #1a1205; font-weight: 700; }
form > button:hover { background: linear-gradient(90deg,#ffbe4d,#ff9440); }
/* claim-summary i claim-summary strong: zdefiniowane powyżej (metalowa krawędź, kolory neon/heat). */
a { color: #9aefff; }

/* Stany --st-new, --st-progress, --st-waiting, --st-ready, --st-late zdefiniowane w głównym systemie :root powyżej. */
.ic { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; vertical-align: -0.2em; margin-right: .5em; }
h2 .ic { color: var(--teal); }
.blip, .pill { display: inline-flex; align-items: center; gap: .35em; max-width: 100%; margin: 2px 8px 2px 0; vertical-align: middle; }
.blip.is-new, .pill.is-new { --mark: var(--st-new); }
.blip.is-progress, .pill.is-progress { --mark: var(--st-progress); }
.blip.is-waiting, .pill.is-waiting { --mark: var(--st-waiting); }
.blip.is-ready, .pill.is-ready { --mark: var(--st-ready); }
.blip.is-late, .pill.is-late { --mark: var(--st-late); }
.blip-shape, .blip-glyph { width: 1.15em; height: 1.15em; flex: 0 0 auto; color: var(--mark); stroke: currentColor; }
.blip-glyph { fill: none; }
.blip-label, .pill { color: var(--text); }
.pill { padding: 2px 10px; border: 1px solid var(--mark); border-radius: 999px; background: color-mix(in srgb, var(--mark) 18%, #121a24); color: #f4f6f8; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.pill .ic { color: var(--mark); width: 1em; height: 1em; margin: 0; vertical-align: 0; }
.claim-marks, .kind-filters, .legend-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.kind-filters { margin: 8px 0; }
.kind-filters button { min-height: 40px; padding: 6px 10px; }
.kind-filters button[aria-pressed="true"] { border-color: var(--neon); background: #102833; color: var(--text); box-shadow: inset 0 -2px var(--neon); }
.legend { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel); }
.legend summary { cursor: pointer; font-weight: 650; }
.legend-group { margin-top: 10px; }
.damage-map { container-type: inline-size; width: 100%; max-width: none; }
.damage-frame { display: grid; gap: 16px; grid-template-columns: minmax(0,1fr); align-items: start; }
.damage-detail-parts { grid-column: 1; min-width: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; }
.damage-detail-parts summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 700; }
.damage-detail-parts label { display: grid; gap: 4px; min-width: 0; }
.damage-detail-parts :is(select, input) { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.damage-detail-parts .damage-choice { margin-block: 8px; }
.damage-detail-views { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 10px 4px; }
.damage-detail-views button { min-height: 44px; }
.damage-board { display: grid; gap: 10px; width: 100%; min-width: 0; }
.damage-ledger {
  min-width: 0; padding: 12px 12px 8px; border: 1px solid var(--line); background: #0c1018;
}
.damage-ledger-note { margin: 4px 0 10px; color: var(--muted); font: 13px/1.45 Bahnschrift,"Segoe UI",Arial,sans-serif; }
/* damage-editor: zdefiniowane niżej (HUD panel edycji uszkodzeń). min-width: 0 dziedziczone. */
@container (min-width: 680px) {
  .damage-frame { grid-template-columns: minmax(0,1.35fr) minmax(200px,.78fr); gap: 16px 18px; }
  .damage-board { grid-column: 1; grid-row: 1; }
  .damage-ledger {
    grid-column: 2; grid-row: 1; position: sticky; top: 12px;
    max-height: calc(100vh - 24px); overflow: auto;
  }
  .damage-editor { grid-column: 1 / -1; }
}
.car3d-presets, .zone-strip { display: grid; gap: 6px; }
.car3d-presets { grid-template-columns: repeat(3,minmax(0,1fr)); }
.zone-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
.damage-board .car3d-presets button,
.damage-board .zone-strip button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 40px; padding: 8px 8px; text-align: center;
  font-family: Bahnschrift,"Segoe UI",Arial,sans-serif; font-size: 13px; letter-spacing: .02em; line-height: 1.2;
  position: relative; overflow: hidden;
}
.damage-board .car3d-presets button::before,
.damage-board .zone-strip button::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, var(--neon) 50%, transparent 100%);
  opacity: 0; transition: opacity 140ms ease; pointer-events: none;
}
.damage-board .car3d-presets button:hover,
.damage-board .zone-strip button:hover {
  border-color: var(--neon); background: #102833; color: var(--text);
}
.damage-board .car3d-presets button:hover::before,
.damage-board .zone-strip button:hover::before { opacity: 0.15; }
.damage-board .car3d-presets button:active,
.damage-board .zone-strip button:active { transform: scale(0.98); }
.car3d-presets button[aria-pressed="true"] { border-color: var(--neon); background: #102833; color: var(--text); box-shadow: inset 0 -2px var(--neon), 0 0 12px var(--neon); }
.damage-board .zone-strip button[aria-pressed="true"] { border-color: var(--neon); background: #102833; color: var(--text); box-shadow: inset 0 -2px var(--neon), 0 0 12px var(--neon); }
.zone-btn.is-active { box-shadow: inset 0 0 0 2px var(--neon), 0 0 12px var(--neon); }
/* Car 3D stage — instrument cluster HUD. Metalowe krawędzie, ciemne tło, neonowe akcenty. */
.car3d-stage {
  position: relative;
  height: 380px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, #1f2a36 0%, #0c1018 55%, #07080c 100%);
  box-shadow:
    0 0 0 1px var(--color-neon),
    0 0 0 6px rgba(0,0,0,0.6),
    0 0 28px rgba(58, 215, 255, 0.15);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.car3d-stage:active { cursor: grabbing; }
.car3d-stage.is-painting { cursor: crosshair; }
.car3d-stage.is-painting + .car3d-help {
  color: var(--color-text);
  border-left: 3px solid var(--color-heat);
  padding-left: var(--space-3);
}

/* Stany ładowania i błędu — HUD alerty na ramce sceny. */
.car3d-stage[data-state="loading"] {
  border-color: var(--color-accent);
  box-shadow:
    0 0 0 1px var(--color-accent),
    0 0 0 6px rgba(0,0,0,0.6),
    0 0 28px rgba(245, 166, 35, 0.2);
}
.car3d-stage[data-state="loading"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(245,166,35,0.15) 50%, transparent 100%);
  animation: stage-loading 1.5s ease-in-out infinite;
}
@keyframes stage-loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.car3d-stage[data-state="error"] {
  border-color: var(--color-bad);
  box-shadow:
    0 0 0 1px var(--color-bad),
    0 0 0 6px rgba(0,0,0,0.6),
    0 0 28px rgba(255, 75, 154, 0.2);
}
.car3d-stage[data-state="error"]::after {
  content: "Model 3D niedostępny";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font: 600 13px/1.4 var(--font-title);
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(7, 8, 12, 0.92);
}

/* Spinner i retry overlay. */
.car3d-spinner {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-3);
  background: rgba(7, 8, 12, 0.85);
}
.car3d-spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid #243342;
  border-top-color: var(--color-neon);
  border-radius: 50%;
  animation: spinner-spin 0.8s linear infinite;
}
.car3d-spinner-text {
  color: var(--color-muted);
  font: 600 13px/1 var(--font-title);
  letter-spacing: .08em;
  text-transform: uppercase;
}
@keyframes spinner-spin { to { transform: rotate(360deg); } }
.car3d-retry {
  display: inline-flex;
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  /* `translate`, not `transform`: the global button:active transform would replace it and the button
     would jump from under the finger on press. Sits just below the scene's "Model 3D niedostępny". */
  translate: -50% 22px;
  min-height: 44px;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--color-neon);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-text);
  font: 600 13px/1 var(--font-title);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.car3d-retry[hidden] { display: none; }
.car3d-retry:hover { background: var(--color-surface-3); border-color: var(--color-text); }
.car3d-retry:focus-visible {
  outline: 3px solid var(--color-neon);
  outline-offset: 2px;
}

/* Przyciski bryły i koloru — HUD toggle. */
.car3d-bodies, .car3d-paint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.car3d-bodies { margin-top: var(--space-2); }
.damage-board .car3d-bodies button,
.damage-board .car3d-paint button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: auto;
  min-width: 72px;
  min-height: 34px;
  padding: 4px 10px;
  font-family: var(--font-title);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.damage-board .car3d-bodies button::before,
.damage-board .car3d-paint button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--color-neon) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}
.damage-board .car3d-bodies button:hover,
.damage-board .car3d-paint button:hover {
  border-color: var(--color-neon);
  background: var(--color-surface-3);
  color: var(--color-text);
}
.damage-board .car3d-bodies button:hover::before,
.damage-board .car3d-paint button:hover::before { opacity: 0.15; }
.damage-board .car3d-bodies button:active,
.damage-board .car3d-paint button:active { transform: scale(0.97); }
.damage-board .car3d-bodies button[aria-pressed="true"],
.damage-board .car3d-paint button[aria-pressed="true"] {
  border-color: var(--color-neon);
  background: var(--color-surface-3);
  color: var(--color-text);
  box-shadow: inset 0 -2px var(--color-neon), 0 0 12px rgba(58, 215, 255, 0.25);
}
.car3d-paint-label {
  margin-right: var(--space-2);
  color: var(--color-muted);
  font: 600 var(--fs-xs)/1 var(--font-title);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.swatch-chip {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: inset -3px -3px 6px rgba(0,0,0,0.4), inset 2px 2px 4px rgba(255,255,255,0.25);
}
.car3d-stage canvas { display: block; width: 100%; height: 100%; }
.car3d-help, .car3d-credit {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
  font: 13px/1.45 var(--font-title);
}
.car3d-credit { margin-top: var(--space-1); }
/* The line under the model changes with its state (loading, error, help); two lines kept on a phone
   so that change never moves the zone buttons below it. */
@media (max-width: 600px) { .car3d-help { min-height: calc(2 * 1.45em); } }
.car3d-credit a { color: rgba(154, 239, 255, 0.9); }
.zone-badge {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin: 0;
  border: 1px solid currentColor; border-radius: 999px;
  font-family: Bahnschrift,Consolas,sans-serif; font-size: 12px; letter-spacing: 0;
}
.zone-btn[data-count="0"] .zone-badge { opacity: .4; }
.zone-btn.is-active { box-shadow: inset 0 0 0 2px var(--neon); }
.zone-btn.is-late { border-color: var(--st-late); }
.zone-btn.is-late .zone-badge { color: var(--st-late); opacity: 1; }
.zone-btn.is-ready { border-color: var(--st-ready); }
.zone-btn.is-ready .zone-badge { color: var(--st-ready); opacity: 1; }
/* Damage editor — HUD panel edycji uszkodzeń. Metalowe krawędzie, kolory per typ uszkodzenia. */
.damage-editor {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.damage-zone-title {
  margin: 0 0 var(--space-2);
  color: var(--color-neon);
  font: 600 var(--fs-xs)/1.3 var(--font-title);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.damage-sheet {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-3);
  border-left: 3px solid var(--color-neon);
}
.damage-kicker {
  margin: 0;
  color: var(--color-neon);
  font: 600 var(--fs-xs)/1.3 var(--font-title);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.damage-sheet h3 {
  margin: 0;
  color: var(--color-text);
  font: 700 var(--fs-2xl)/1.2 var(--font-title);
  letter-spacing: 0;
  text-transform: none;
}
.damage-hint {
  margin: 0;
  color: var(--color-muted);
  font: var(--fs-md)/1.45 var(--font-title);
}
.damage-remove {
  justify-self: start;
  width: auto;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  text-align: center;
  background: transparent;
  color: var(--color-text);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.damage-remove:hover { border-color: var(--color-line-strong); background: var(--color-surface-2); }

/* Tryby oględzin — HUD segmenty. */
.damage-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.damage-modes:empty { display: none; }
.damage-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 64px;
  text-align: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-title);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.damage-mode .ic {
  width: 24px;
  height: 24px;
  margin: 0;
  stroke: currentColor;
  fill: none;
}
.damage-mode:hover {
  border-color: var(--color-neon);
  background: var(--color-surface-3);
}
.damage-mode[aria-pressed="true"],
.damage-mode[aria-pressed="true"]:hover {
  background: var(--color-neon);
  border-color: var(--color-neon);
  color: #07080c;
  box-shadow: 0 0 16px rgba(58, 215, 255, 0.35);
}

/* Wybór uszkodzenia — kolorowa kropka + etykieta. */
.damage-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: stretch;
}
.damage-choice { display: inline-flex; }
.damage-choice[data-damage="scratch"] { --mark: var(--color-bad); }
.damage-choice[data-damage="dent"] { --mark: var(--color-neon); }
.damage-choice[data-damage="crack"] { --mark: #d4a5ff; }
.damage-choice[data-damage="missing"] { --mark: var(--color-warn); }
.damage-choice[data-damage="paint"] { --mark: var(--color-ok); }
.damage-choice[data-damage="deformation"] { --mark: #ffb087; }
.damage-choice[data-damage="engine"] { --mark: #ff8c6b; }
.damage-choice[data-damage="gearbox"] { --mark: #c4b5fd; }
.damage-choice[data-damage="suspension"] { --mark: #7dd3c0; }
.damage-choice[data-damage="brakes"] { --mark: #ff6b8a; }
.damage-choice[data-damage="steering"] { --mark: #9ecbff; }
.damage-choice[data-damage="electrical"] { --mark: #e2c14a; }
.damage-choice[data-damage="cooling"] { --mark: #5ec8e6; }
.damage-choice[data-damage="exhaust"] { --mark: #d08a62; }
.damage-choice > button {
  min-height: 40px;
  text-align: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-title);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.damage-choice > button::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: var(--space-2);
  border-radius: var(--radius-full);
  background: var(--mark);
  box-shadow: 0 0 8px var(--mark);
  vertical-align: 0.05em;
}
.damage-choice > button:hover {
  border-color: var(--mark);
  background: color-mix(in srgb, var(--mark) 10%, transparent);
}
.damage-choice > button[aria-pressed="true"] {
  border-color: var(--mark);
  box-shadow: inset 0 0 0 1px var(--mark);
  background: color-mix(in srgb, var(--mark) 15%, transparent);
}

/* Rozwinięte pola uszkodzenia. */
.damage-choice:has(.damage-fields) {
  order: 1;
  flex: 1 0 100%;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--mark);
  background: var(--color-surface-3);
}
.damage-fields {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.4fr);
  gap: var(--space-3) var(--space-4);
  align-items: end;
  width: 100%;
}
.damage-fields select,
.damage-fields input {
  width: 100%;
  min-width: 0;
}
.status-field,
.level-field,
.liability-field,
.note-field {
  display: grid;
  gap: var(--space-1);
  align-content: end;
  min-width: 0;
  color: var(--color-muted);
  font-size: var(--fs-md);
  font-weight: 600;
}
.note-field { grid-column: 1 / -1; }
.level-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.level-control select {
  flex: 1 1 auto;
  min-width: 0;
}
.level-meter {
  display: inline-flex;
  align-items: end;
  gap: var(--space-1);
  height: 22px;
  flex: 0 0 auto;
}
.level-meter i {
  display: block;
  width: 7px;
  background: #314152;
}
.level-meter i:nth-child(1) { height: 8px; }
.level-meter i:nth-child(2) { height: 14px; }
.level-meter i:nth-child(3) { height: 20px; }
.level-meter[data-level="1"] { --mark: #8ea4bb; }
.level-meter[data-level="2"] { --mark: var(--color-neon); }
.level-meter[data-level="3"] { --mark: var(--color-bad); }
.level-meter[data-level="1"] i:nth-child(-n+1),
.level-meter[data-level="2"] i:nth-child(-n+2),
.level-meter[data-level="3"] i { background: var(--mark); }

/* Akcje edytora. */
.damage-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.damage-actions button {
  width: auto;
  flex: 1 1 160px;
  min-height: 40px;
  text-align: center;
}
.damage-actions button[aria-pressed="true"] {
  border-color: var(--color-heat);
  box-shadow: inset 0 0 0 1px var(--color-heat);
}
.damage-editor > button {
  justify-self: start;
  width: auto;
  min-width: min(100%, 280px);
  text-align: center;
  background: var(--sunset);
  border: 0;
  color: #1a1205;
  font-weight: 700;
  font-family: var(--font-title);
  letter-spacing: .04em;
}
.damage-editor > button:hover {
  background: linear-gradient(90deg, #ffbe4d, #ff9440);
}

/* Lista uszkodzeń. */
.damage-note {
  display: block;
  margin-top: var(--space-1);
  color: var(--color-muted);
  font-size: var(--fs-md);
  font-weight: 400;
}
.damage-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.damage-list li {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line);
  border-left: 3px solid #8ea4bb;
  background: var(--color-surface-3);
  font-size: var(--fs-md);
}
.damage-list li[data-level="1"] { border-left-color: #8ea4bb; }
.damage-list li[data-level="2"] { border-left-color: var(--color-neon); }
.damage-list li[data-level="3"] { border-left-color: var(--color-bad); }
.damage-list li[data-area="1"] {
  box-shadow: inset 0 0 0 1px rgba(58, 215, 255, 0.2);
}
.damage-list li.damage-empty {
  border-left-color: var(--color-line);
  background: transparent;
  color: var(--color-muted);
}

/* Tooltips exist only while hovered or keyboard-focused, so hidden tips never widen the page.
   Busy buttons keep ::after for the work spinner. */
button[data-tip] { position: relative; }
button[data-tip]:not(:disabled):focus-visible::after { content: attr(data-tip) / ""; }
@media(hover:hover) { button[data-tip]:not(:disabled):hover::after { content: attr(data-tip) / ""; animation: tip-in 140ms ease-out 350ms both; } }
button[data-tip]:not(:disabled):focus-visible::after { animation: tip-in 140ms ease-out both; }
button[data-tip]:not(:disabled):is(:hover,:focus-visible)::after {
  position: absolute; z-index: 20; left: 0; bottom: calc(100% + 10px);
  width: max-content; max-width: min(280px,calc(100vw - 48px)); padding: 8px 11px;
  background: #060a10; color: var(--text); border: 1px solid #6b819b; border-left: 3px solid var(--teal);
  font: 500 13px/1.4 "Segoe UI",Arial,sans-serif; text-align: left; white-space: normal; box-shadow: 0 8px 24px #00000080; pointer-events: none;
}
.workspace-nav button[data-tip]:last-child:is(:hover,:focus-visible)::after,
.claim-sidebar button[data-tip]:is(:hover,:focus-visible)::after,
.claim-actions button[data-tip]:nth-child(even):is(:hover,:focus-visible)::after { left: auto; right: 0; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Instrument labels sit above the control. Uppercase stays on the kicker, never on the field value. */
.field-label, .level-name {
  font-family: Bahnschrift,"Segoe UI",Arial,sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
form label:has(>input[type=checkbox]) .field-label,
fieldset label:has(input[type=checkbox]) .field-label {
  font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text);
}
header span { font-family: Bahnschrift,"Segoe UI",sans-serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
section > h2 { padding-bottom: 10px; border-bottom: 1px solid #243044; }
.workspace-nav button, .claim-actions button, .kind-filters button { text-align: center; }
.legend summary, .claims-panel > .muted, .blip-label, .claim-summary span, .claim-summary strong {
  font-family: Bahnschrift,"Segoe UI",Arial,sans-serif;
}
.blip {
  padding: 2px 8px 2px 4px;
  border: 1px solid color-mix(in srgb,var(--mark) 50%,transparent);
  background: color-mix(in srgb,var(--mark) 12%,#0c1018);
}
.blip-label { font-size: 13px; letter-spacing: .01em; }
.zone-strip button span:first-child { min-width: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--neon); box-shadow: 0 0 0 1px #3ad7ff55; }
@media (min-width: 720px) {
  .car3d-presets { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .damage-fields { grid-template-columns: minmax(0,1fr); }
  .damage-editor > button { justify-self: stretch; width: 100%; }
}
@media (max-width: 480px) {
  header span { font-size: 12px; letter-spacing: .06em; }
  .car3d-presets { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .car3d-stage { height: 280px; }
}

.view-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.view-chip { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; text-align: center; background: #141820; }
.view-chip[aria-pressed="true"] { background: #e7eef3; color: #12141c; border-color: #e7eef3; }
/* case-card, case-open, case-vehicle, case-kicker, next-line: zdefiniowane powyżej (metalowy wygląd, krawędź stanu). */
.clock-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.clock-tile { margin: 0; padding: 12px; background: #10141c; border: 1px solid #2c3342; }
.clock-tile strong { display: block; font-variant-numeric: tabular-nums; font-size: 18px; }
.case-steps { margin: 0; padding-left: 18px; }
.case-steps li { margin: 4px 0; }
.movement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.movement-grid form, .case-board form { background: #0c1016; padding: 12px; border: 1px solid #243044; }
.party-list .row { padding: 8px 0; }
.repair-desk { display: grid; gap: 12px; margin-top: 8px; }
.doc-list { margin: 0; padding-left: 18px; }
.doc-list li { margin: 6px 0; }
.priority-high { margin: 0; color: #ff6b5e; font-weight: 650; }
@media (max-width: 720px) {
  .clock-row, .movement-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .next-line, .case-card, .clock-tile { transition: none; }
}

/* Side panel: grouped navigation with collapsible menus (staff only). */
.side-shell, .shell-toggle, .shell-backdrop { display: none; }
body.has-shell { padding-left: 252px; }
body.has-shell .side-shell {
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; width: 252px; overflow-y: auto;
  background: linear-gradient(180deg,#0a1018 0%,#06090e 100%); border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 #3ad7ff1f, 14px 0 32px #0009;
}
.shell-brand { display: grid; gap: 2px; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); }
.shell-brand strong { font: 700 15px/1.2 Bahnschrift,"Segoe UI",Arial,sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.shell-brand strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--accent); box-shadow: 0 0 10px #f5a623aa; transform: rotate(45deg) translateY(-2px); }
.shell-sub { color: var(--muted); font: 12px/1.3 Bahnschrift,"Segoe UI",Arial,sans-serif; letter-spacing: .04em; }
.shell-nav { flex: 1; padding: 12px 8px; }
.shell-group + .shell-group { margin-top: 4px; }
.side-shell button { margin: 0; border-radius: 2px; box-shadow: none; }
.side-shell .shell-group-toggle, .side-shell .shell-item, .side-shell .shell-collapse {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent;
}
.side-shell .shell-group-toggle {
  min-height: 42px; padding: 8px 10px; color: var(--text);
  font: 600 12px/1.2 Bahnschrift,"Segoe UI",Arial,sans-serif; letter-spacing: .12em; text-transform: uppercase;
}
.side-shell .shell-group-toggle .ic { color: var(--neon); margin: 0; }
.side-shell .shell-group-toggle:hover { background: #111a24; border-color: var(--line); }
.shell-chevron { width: 7px; height: 7px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 140ms; }
.shell-group-toggle[aria-expanded="true"] .shell-chevron { transform: rotate(45deg); }
.shell-items { margin: 2px 0 8px 19px; padding: 0 0 0 8px; list-style: none; border-left: 1px solid #3ad7ff33; }
.shell-items[hidden] { display: none; }
.side-shell .shell-item {
  min-height: 38px; padding: 6px 10px; border-left: 2px solid transparent; color: var(--muted);
  font: 13px/1.25 Bahnschrift,"Segoe UI",Arial,sans-serif;
}
.side-shell .shell-item .ic { margin: 0; flex: 0 0 auto; }
.side-shell .shell-item:hover { color: var(--text); background: #0f1822; border-color: transparent; border-left-color: #3ad7ff66; }
.side-shell .shell-item[aria-current="page"] { color: var(--text); border-left-color: var(--accent); background: linear-gradient(90deg,#f5a62329,transparent 85%); }
.side-shell .shell-item[aria-current="page"] .ic { color: var(--accent); }
.shell-foot { display: grid; gap: 6px; padding: 12px 10px 16px; border-top: 1px solid var(--line); }
.shell-user { display: grid; gap: 2px; margin: 0 0 4px; padding: 0 4px; overflow-wrap: anywhere; }
.side-shell .shell-collapse { min-height: 36px; padding: 6px 10px; color: var(--muted); font: 12px/1.2 Bahnschrift,"Segoe UI",Arial,sans-serif; }
.side-shell .shell-collapse:hover { color: var(--text); border-color: var(--line); }
.side-shell .shell-logout:hover { border-left-color: #ff6b5e; }

body.has-shell.shell-collapsed { padding-left: 68px; }
body.shell-collapsed .side-shell { width: 68px; }
body.shell-collapsed .side-shell .shell-label,
body.shell-collapsed .shell-chevron,
body.shell-collapsed .shell-items,
body.shell-collapsed .shell-sub,
body.shell-collapsed .shell-user { display: none; }
body.shell-collapsed .shell-brand { padding: 20px 0 16px; justify-items: center; }
body.shell-collapsed .shell-brand strong { font-size: 0; }
body.shell-collapsed .shell-brand strong::before { margin: 0; }
body.shell-collapsed .side-shell .shell-group-toggle,
body.shell-collapsed .side-shell .shell-collapse,
body.shell-collapsed .side-shell .shell-item { justify-content: center; padding-left: 0; padding-right: 0; }
body.shell-collapsed .side-shell .shell-collapse .ic { transform: scaleX(-1); }

@media (max-width: 899px) {
  body.has-shell, body.has-shell.shell-collapsed { padding-left: 0; }
  /* Closed: also hidden, so its shadow does not show along the left edge and Tab skips it. */
  body.has-shell .side-shell { width: min(86vw,300px); transform: translateX(-102%); visibility: hidden; transition: transform 200ms ease, visibility 0s linear 200ms; }
  body.has-shell .side-shell.is-open { transform: none; visibility: visible; transition: transform 200ms ease; }
  body.shell-collapsed .side-shell { width: min(86vw,300px); }
  body.shell-collapsed .side-shell .shell-label, body.shell-collapsed .shell-chevron, body.shell-collapsed .shell-sub, body.shell-collapsed .shell-user { display: revert; }
  body.shell-collapsed .shell-items:not([hidden]) { display: block; }
  .side-shell .shell-collapse { display: none; }
  .shell-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 39; background: #000000a8; }
  body.has-shell .shell-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; margin-right: 12px;
    font: 600 12px/1 Bahnschrift,"Segoe UI",Arial,sans-serif; letter-spacing: .12em; text-transform: uppercase;
  }
  .shell-bars { width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
  body.has-shell header { justify-content: flex-start; }
  body.has-shell header span { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .side-shell, .shell-chevron { transition: none !important; }
}

/* Feedback toast: fixed, so errors and confirmations are seen wherever the page is scrolled. */
#message {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: flex-start; gap: 12px;
  max-width: min(440px, calc(100vw - 32px)); margin: 0; padding: 0; background: none; border: 0;
}
#message:empty { display: none; }
#message:not(:empty) {
  padding: 14px 12px 14px 16px; border: 1px solid #ff6b5e; border-left: 4px solid #ff6b5e;
  background: #2a1512; color: #ffe1d6; box-shadow: 0 12px 32px #000a; font-weight: 600;
  animation: toast-in 180ms ease-out;
}
#message[data-tone="ok"]:not(:empty) { border-color: #6bd36b; border-left-color: #6bd36b; background: #0f2414; color: #dcffd9; }
.toast-text { flex: 1; padding-top: 2px; }
#message .toast-close { min-height: 32px; min-width: 32px; padding: 0; margin: 0; background: transparent; border: 1px solid #ffffff33; color: inherit; font-size: 18px; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Register filters: wrap instead of hidden horizontal scroll, mute empty views, label both groups. */
.view-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.view-chip.is-empty:not([aria-pressed="true"]) { color: #8b96a5; border-color: #232a36; background: #0d1117; }
.filter-label { display: block; margin: 14px 0 6px; }

/* Claim card: section shortcuts on desktop, a compact native picker on mobile. */
.claim-section-nav {
  position: sticky; top: 0; z-index: 20; margin-top: 14px;
  background: #07080cf0; backdrop-filter: blur(6px);
}
.claim-shortcuts {
  flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: thin;
  padding: 8px 0; margin: 0;
}
.claim-section-select { display: none; }
@media (max-width: 768px) {
  .claim-shortcuts { display: none; }
  .claim-section-select {
    display: flex; align-items: center; gap: 8px; padding: 4px 8px;
    border-bottom: 1px solid var(--line); color: var(--text); font-size: 12px;
  }
  .claim-section-select span { flex: 0 0 auto; }
  .claim-section-select select { flex: 1 1 0; width: 0; min-width: 0; }
}
.claim-shortcuts a {
  flex: 0 0 auto; padding: 6px 10px; border: 1px solid transparent; border-radius: 2px; color: var(--muted);
  text-decoration: none; font: 13px/1.2 Bahnschrift,"Segoe UI",Arial,sans-serif; white-space: nowrap;
}
.claim-shortcuts a:hover { color: var(--text); border-color: var(--line); }
.claim-shortcuts a[aria-current="location"] { color: #12141c; background: var(--neon); border-color: var(--neon); }
.claim-layout section, .claim-layout [id] { scroll-margin-top: 64px; }

/* Print one container. */
.has-print { position: relative; }
.has-print > h2 { padding-right: 104px; }
.print-btn {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; margin: 0; padding: 4px 10px; background: #0c1118; border: 1px solid var(--line); color: var(--muted);
  font: 12px/1 Bahnschrift,"Segoe UI",Arial,sans-serif; letter-spacing: .04em;
}
.print-btn .ic { margin: 0; }
.print-btn:hover { color: var(--text); border-color: var(--neon); background: #102833; }
.case-card.has-print .print-btn { top: 10px; right: 10px; }
@media (max-width: 560px) {
  .print-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .has-print > h2 { padding-right: 48px; }
}

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body { padding: 0 !important; font-size: 11pt; }
  body::before { display: none; }
  header, .side-shell, .shell-backdrop, .shell-toggle, #message, .print-btn, .claim-section-nav, .claim-actions, .damage-save { display: none !important; }
  main { max-width: none; margin: 0; padding: 0; }
  main, main * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; }
  main section, main article { border-color: #999 !important; break-inside: avoid; }
  main button:not(.case-open), main input[type="file"] { display: none !important; }
  .car3d-stage { border: 1px solid #999 !important; height: 300px; }
  body.printing-one main *:not(.print-path, .print-target, .print-target *) { display: none !important; }
  body.printing-one .print-path {
    display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    position: static !important; max-height: none !important; overflow: visible !important;
  }
  body.printing-one .print-target { margin: 0 !important; border: 0 !important; padding: 0 !important; }
  body.printing-one::before {
    content: attr(data-print-title); display: block !important; position: static; inset: auto; z-index: auto;
    margin: 0 0 6mm; padding: 0 0 3mm; border-bottom: 1px solid #000; background: none; mask-image: none;
    font: 600 10pt/1.3 "Segoe UI",Arial,sans-serif;
  }
}
.print-btn.is-inline { position: static; display: flex; width: max-content; margin: -4px 0 10px auto; }
@media print { .print-btn.is-inline { display: none !important; } }
@media print {
  .car3d-bodies, .car3d-paint, .car3d-help, .car3d-presets, .damage-modes, .zone-strip, .legend { display: none !important; }
  .damage-ledger { position: static !important; max-height: none !important; overflow: visible !important; }
  .damage-sheet, .damage-list li { break-inside: avoid; border-color: #999 !important; }
}
body.has-shell header strong { white-space: nowrap; }
/* WCAG 1.4.11: control boundaries at least 3:1 (#6b819b on #0c1118 ≈ 4.6:1, #56657a on #0d1117 ≈ 3.1:1). */
.print-btn { border-color: #6b819b; }
.view-chip.is-empty:not([aria-pressed="true"]) { border-color: #56657a; }

/* ==========================================================================================
   Theme "Los Santos dusk" — toned down (GTA V / Driver): graphite-navy base, muted teal for
   selection, PSF gold for primary actions, copper as a sparing edge accent, film grain.
   ========================================================================================== */
/* Wszystkie zmienne tego tematu (--bg, --surface, --line, --text, --muted, --teal, --gold,
   --copper, --ok, --warn, --bad, --background, --panel, --accent, --neon, --heat, --title)
   są zdefiniowane w głównym systemie :root na górze pliku. Blok :root poniżej usunięty
   dla uniknięcia duplikatów. */
body {
  background:
    radial-gradient(120% 60% at 85% -10%, #e0a44522 0%, transparent 55%),
    radial-gradient(90% 50% at 10% 110%, #1fa3b014 0%, transparent 60%),
    linear-gradient(180deg, #0d131b 0%, var(--bg) 40%);
  background-attachment: fixed;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* header: zdefiniowane w głównym systemie powyżej (gradient tła, neon-border, logo typografia). */

/* Side panel brand with inline SVG logo (no external file dependency) and one subtle light sweep on first open. */
.shell-brand { position: relative; overflow: hidden; display: grid; flex-shrink: 0; justify-items: start; gap: 6px; }
.shell-brand strong::before { content: none; }
.shell-logo { display: block; width: 180px; max-width: 100%; height: auto; }
.shell-mark { display: none; width: 40px; height: auto; }
.shell-tagline { color: var(--muted); font: 600 10px/1 var(--title); letter-spacing: .42em; text-transform: uppercase; }
.product-brand { display: inline-flex; align-items: center; }
.product-brand img { display: block; width: clamp(113px, 16vw, 143px); height: auto; }
.shell-brand.is-shining::after {
  content: ""; position: absolute; inset: -20% auto -20% -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, #fff7e000 20%, #fff3d655 50%, #fff7e000 80%, transparent 100%);
  transform: skewX(-18deg); animation: brand-shine 1.6s cubic-bezier(.4,.1,.2,1) .35s 1 both;
}
@keyframes brand-shine { from { left: -60%; } to { left: 130%; } }
body.shell-collapsed .shell-logo, body.shell-collapsed .shell-tagline { display: none; }
body.shell-collapsed .shell-mark { display: block; }
body.has-shell .side-shell { background: linear-gradient(180deg, #0c121a 0%, #080b10 100%); }
.side-shell .shell-item[aria-current="page"] { border-left-color: var(--teal); background: linear-gradient(90deg, #1fa3b026, transparent 85%); }
.side-shell .shell-item[aria-current="page"] .ic { color: var(--teal); }

/* Breadcrumbs */
.crumbs:empty { display: none; }
.crumbs { display: flex; align-items: center; gap: 10px; max-width: 1240px; margin: 18px auto -14px; padding: 0 24px; color: var(--muted); font: 13px/1.2 var(--title); }
.crumbs .crumb[aria-current="page"] { color: var(--text); font-weight: 600; }
.crumb-sep { opacity: .5; }
.crumbs .crumb-home { min-height: 32px; padding: 4px 8px; background: transparent; border-color: transparent; color: var(--muted); }
.crumbs .crumb-home .ic { margin: 0; }

/* Page hero — thesis statement otwierająca każdą stronę. Jeden silny element wizualny,
   reszta cicha. Zdjęcie sceny jest tłem, nie ozdobą. */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 var(--space-6);
  min-height: 140px;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15)),
    var(--color-surface-2);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-photo, none);
  background-size: cover;
  background-position: center;
  opacity: .25;
  pointer-events: none;
}
.page-hero.has-photo::before { opacity: .35; }
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  margin: 0;
  font: italic 800 clamp(30px, 4vw, 48px)/1.02 var(--font-title);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--color-text);
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
  max-width: 70ch;
}
.page-hero h1::before {
  content: "//" / "";
  margin-right: 12px;
  font-style: italic;
  letter-spacing: -.12em;
  background: linear-gradient(180deg, var(--color-accent), var(--color-heat));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 8px 0 0 4px;
  color: var(--color-muted);
  font: 600 12px/1.35 var(--font-title);
  letter-spacing: .2em;
  text-transform: uppercase;
  max-width: 55ch;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
button.is-primary, form > button[type="submit"] {
  background: linear-gradient(180deg, #ebb45a, #d08e33); border-color: #d99a3e; color: #1d1305; text-align: center;
  box-shadow: 0 6px 18px #e0a44530, inset 0 1px 0 #fff3;
}
button.is-primary:hover, form > button[type="submit"]:hover { background: linear-gradient(180deg, #f2c06a, #d9973a); border-color: #f0c070; }

/* Scene: hanging banner + tilted LED screen */
.page-hero.has-scene { min-height: 190px; }
.hero-stage { position: absolute; right: 190px; top: -14px; display: flex; align-items: flex-start; gap: 26px; perspective: 900px; pointer-events: none; }
.hanging-banner {
  position: relative; margin-top: 30px; padding: 10px 18px 12px; transform-origin: 50% -30px;
  background: linear-gradient(180deg, #2a2117, #1a140d); border: 1px solid #e0a44555; border-top: 3px solid var(--gold);
  color: #f3dcb0; font: italic 700 13px/1 var(--title); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 10px 24px #0009; animation: banner-sway 7s ease-in-out infinite;
}
.banner-cord { position: absolute; top: -30px; width: 1px; height: 30px; background: linear-gradient(#0000, #b9a17a); }
.banner-cord.is-left { left: 14px; } .banner-cord.is-right { right: 14px; }
@keyframes banner-sway { 0%,100% { transform: rotate(-.8deg); } 50% { transform: rotate(.8deg); } }
.jumbotron { position: relative; transform: rotateY(-20deg) rotateX(4deg); transform-style: preserve-3d; }
.jumbotron-screen {
  position: relative; display: grid; gap: 4px; width: 250px; padding: 12px 14px; border: 6px solid #1b222b; border-radius: 4px;
  background:
    radial-gradient(circle, #ffffff0d 0.7px, transparent 0.8px) 0 0 / 4px 4px,
    linear-gradient(180deg, #071318, #050a0d);
  box-shadow: 0 0 0 1px #2c3744, 0 18px 40px #000a, 0 0 32px #1fa3b022;
  font: 600 12px/1.25 var(--title); color: #9fe3e8; text-shadow: 0 0 6px #1fa3b088;
}
.jumbotron[data-level="amber"] .jumbotron-screen { color: #f2d29a; text-shadow: 0 0 6px #e0a44588; box-shadow: 0 0 0 1px #2c3744, 0 18px 40px #000a, 0 0 32px #e0a44522; }
.jumbotron[data-level="red"] .jumbotron-screen { color: #f3b3a3; text-shadow: 0 0 6px #d0553f99; box-shadow: 0 0 0 1px #2c3744, 0 18px 40px #000a, 0 0 32px #d0553f2a; }
.tron-title { font-size: 9px; letter-spacing: .3em; opacity: .7; }
.tron-status { font: italic 800 22px/1 var(--title); letter-spacing: .04em; text-transform: uppercase; }
.tron-ticker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.jumbotron-mount { position: absolute; left: 50%; bottom: -46px; width: 10px; height: 40px; transform: translateX(-50%); background: linear-gradient(#2a333e, #11161c); }

/* KPI tiles */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.kpi-tile {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 14px 16px; text-align: left;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text);
  box-shadow: inset 0 1px 0 #ffffff08;
}
.kpi-tile::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--copper), transparent); opacity: .45; }
button.kpi-tile:hover { border-color: var(--teal); background: linear-gradient(160deg, #18232e, var(--surface-2)); }
.kpi-tile[aria-pressed="true"] { border-color: var(--teal); box-shadow: inset 0 0 0 1px #1fa3b055, 0 0 18px #1fa3b026; }
.kpi-tile[aria-pressed="true"]::after { background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: .9; }
.kpi-tile.is-red::after { background: linear-gradient(90deg, transparent, var(--bad), transparent); opacity: .9; }
.kpi-tile.is-amber::after { background: linear-gradient(90deg, transparent, var(--warn), transparent); opacity: .9; }
.kpi-icon { width: 30px; height: 30px; margin: 0; flex: 0 0 auto; color: var(--teal); stroke-width: 1.6; }
.kpi-text { display: grid; gap: 2px; }
.kpi-label { color: var(--muted); font: 13px/1.2 var(--title); }
.kpi-value { font: italic 800 30px/1 var(--title); font-variant-numeric: tabular-nums; }

/* Panels: italic uppercase headings with a slash ornament */
main section > h2, .panel-head h2 {
  font: italic 800 20px/1.15 var(--title); letter-spacing: .02em; text-transform: uppercase;
}
main section > h2::after, .panel-head h2::after { content: " ///" / ""; color: #1fa3b055; letter-spacing: -.1em; font-style: italic; }
main section { background: linear-gradient(170deg, #121a23 0%, #0d131a 100%); border-color: var(--line); border-radius: 6px; box-shadow: 0 10px 30px #0006, inset 0 1px 0 #ffffff06; }
/* The heading never shrinks: on a phone the description wraps below it instead of squeezing the
   title into one syllable per line ("PO / JAZ / DY"). */
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head > h2 { flex: 0 0 auto; max-width: 100%; }
.panel-count { color: var(--muted); font: 600 14px/1 var(--title); }
.table-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 220px); gap: 12px; align-items: end; }

/* Form guide ("naprowadzacz") */

/* Register cards with a car */
/* case-card i jego warianty is-late/is-waiting/is-ready: zdefiniowane powyżej (krawędź stanu, gradient powierzchni). */
.case-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: start; }
.case-side { display: grid; justify-items: end; gap: 8px; }
.case-side .clock-row { grid-template-columns: repeat(2, minmax(118px, auto)); }
.case-vehicle { font: italic 800 22px/1.15 var(--title); }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.case-meta .case-details { margin-left: auto; min-height: 36px; padding: 6px 14px; border-color: var(--teal); color: #c7f0f3; background: #0f2a2e; }
.meta-alert { color: #f3b3a3; }
@media (max-width: 760px) { .case-top { grid-template-columns: 1fr; } .case-side { justify-items: start; } }

/* Car silhouettes */
.car-art { display: block; overflow: visible; }
.car-art-xs { width: 64px; height: 26px; }
.car-art-sm { width: 96px; height: 38px; }
.car-art-md { width: 170px; height: 68px; }
.car-art-lg { width: min(320px, 100%); height: auto; aspect-ratio: 120 / 48; }
.car-body { stroke: #ffffff2e; stroke-width: .6; }
.car-glass { fill: #0c1a24; opacity: .9; stroke: #9fd8e033; stroke-width: .4; }
.car-tyre { fill: #0b0d10; stroke: #2b3139; stroke-width: 1; }
.car-rim { fill: #9aa3ad; stroke: #5d656e; stroke-width: .5; }
.car-shadow { fill: #000; opacity: .45; }
.car-art.is-guessed .car-body { opacity: .82; }

/* Vehicle picker */
.vehicle-picker { display: grid; gap: 10px; margin: 0 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #0b1016; }
.vehicle-picker legend { padding: 0 6px; color: var(--muted); font: 600 12.5px/1 var(--title); letter-spacing: .08em; text-transform: uppercase; }
.vehicle-preview { display: grid; place-items: center; min-height: 112px; padding: 8px 8px 2px; border-radius: 6px;
  background: radial-gradient(70% 55% at 50% 85%, #1fa3b01f, transparent 70%), linear-gradient(180deg, #0f1720, #0a0f15); }
.vehicle-caption { margin: 0; color: var(--muted); font: 13px/1.3 var(--title); text-align: center; }
.vehicle-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-combo { position: relative; }
.brand-listbox {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto; margin: 0; padding: 4px; list-style: none;
  background: #0d141c; border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 16px 36px #000c;
}
.brand-option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.brand-option:hover, .brand-option[aria-selected="true"] { background: #16303a; }
.brand-badge {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2c3844, #141b23); border: 1px solid #ffffff26;
  color: #e9eef3; font: 700 10px/1 var(--title); letter-spacing: .02em;
}
.brand-badge img { width: 18px; height: 18px; object-fit: contain; filter: grayscale(1) brightness(1.8); }
.paint-palette { display: grid; gap: 6px; }
.paint-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.paint-group-name { width: 72px; color: var(--muted); font: 12px/1.1 var(--title); letter-spacing: .06em; }
.paint-name { color: var(--text); letter-spacing: 0; text-transform: none; }
.paint-swatch {
  width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid #ffffff40;
  background: radial-gradient(circle at 32% 28%, #ffffff55, transparent 42%), var(--paint);
  box-shadow: inset 0 -3px 6px #0006;
}
.paint-swatch[aria-checked="true"] { outline: 2px solid var(--teal); outline-offset: 2px; }
.segmented { display: inline-flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; width: max-content; }
.segmented button { min-height: 38px; padding: 6px 16px; border: 0; border-radius: 0; background: #0d131a; color: var(--muted); }
.segmented button[aria-checked="true"] { background: #16303a; color: var(--text); box-shadow: inset 0 -2px var(--teal); }
.gus-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.gus-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-color: var(--teal); color: #c7f0f3; background: #0f2a2e; }
.gus-button .ic { margin: 0; }
.gus-status { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.gus-status[data-tone="ok"] { color: #9fe0b8; } .gus-status[data-tone="warn"] { color: #f2d29a; } .gus-status[data-tone="error"] { color: #f3b3a3; }
.company-note { margin: -4px 0 0; font-size: 13px; }
.form-cancel { text-align: center; background: transparent; }
.create-panel form { position: relative; }

/* Live monitor with analog + digital gauges */
.monitor-panel { position: relative; }
.monitor-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.monitor-head h2 { margin-right: auto; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid #4caf7a66; border-radius: 999px; color: #b7ecc9; font: 700 12px/1 var(--title); letter-spacing: .12em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 #4caf7a88; animation: live-pulse 1.8s ease-out infinite; }
.live-badge.is-stale { border-color: #e0a44566; color: #f2d29a; }
.live-badge.is-stale .live-dot { background: var(--warn); animation: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 #4caf7a88; } 100% { box-shadow: 0 0 0 10px #4caf7a00; } }
.monitor-overall { font: italic 700 14px/1 var(--title); text-transform: uppercase; letter-spacing: .06em; }
.monitor-panel[data-level="green"] .monitor-overall { color: #9fe0b8; }
.monitor-panel[data-level="amber"] .monitor-overall { color: #f2d29a; }
.monitor-panel[data-level="red"] .monitor-overall { color: #f3b3a3; }
.monitor-stamp { color: var(--muted); font: 12px/1 var(--title); font-variant-numeric: tabular-nums; }
.gauge-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 14px 0; }
.gauge { position: relative; margin: 0; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: radial-gradient(90% 70% at 50% 60%, #16212c, #0a0f14); box-shadow: inset 0 0 0 4px #0a0e13, inset 0 0 0 5px #2a3542; }
.gauge-dial { display: block; width: 100%; height: auto; }
.gauge-track { fill: none; stroke: #0b1015; stroke-width: 16; }
.gauge-band { fill: none; stroke-width: 9; opacity: .32; }
.band-green { stroke: var(--ok); } .band-amber { stroke: var(--warn); } .band-red { stroke: var(--bad); }
.gauge[data-level="green"] .band-green, .gauge[data-level="amber"] .band-amber, .gauge[data-level="red"] .band-red { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
.gauge-tick { stroke: #ffffff40; stroke-width: 1.2; } .gauge-tick.is-major { stroke: #ffffffa0; stroke-width: 2; }
.gauge-needle { transform-origin: 100px 98px; transform: rotate(-120deg); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.gauge-needle path { fill: #f2e6d0; filter: drop-shadow(0 0 3px #e0a44599); }
.gauge-hub { fill: #1b232c; stroke: #e0a445; stroke-width: 2; }
.gauge-digital { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); display: grid; justify-items: center; padding: 3px 10px;
  background: #050a0d; border: 1px solid #22303b; border-radius: 4px; }
.gauge-value { font: 700 22px/1 "Consolas", "Cascadia Mono", monospace; color: #9fe3e8; text-shadow: 0 0 6px #1fa3b088; font-variant-numeric: tabular-nums; }
.gauge[data-level="amber"] .gauge-value { color: #f2d29a; text-shadow: 0 0 6px #e0a44588; }
.gauge[data-level="red"] .gauge-value { color: #f3b3a3; text-shadow: 0 0 6px #d0553f99; }
.gauge-unit { color: var(--muted); font: 11.5px/1.2 var(--title); letter-spacing: .1em; text-transform: uppercase; }
.gauge-caption { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font: 600 13px/1 var(--title); }
.gauge-name { text-transform: uppercase; letter-spacing: .12em; }
.gauge[data-level="green"] .gauge-state { color: #9fe0b8; } .gauge[data-level="amber"] .gauge-state { color: #f2d29a; } .gauge[data-level="red"] .gauge-state { color: #f3b3a3; }
.alert-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 4px; background: #0c1218; }
.alert-item.is-amber { border-left-color: var(--warn); } .alert-item.is-red { border-left-color: var(--bad); }
.alert-level { min-width: 72px; font: 700 12px/1 var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.alert-item.is-red .alert-level { color: #f3b3a3; } .alert-item.is-amber .alert-level { color: #f2d29a; } .alert-item.is-green .alert-level { color: #9fe0b8; }
.alert-text { flex: 1; }
.alert-open, .row-open { min-height: 34px; padding: 4px 12px; font-size: 13px; }

/* Activity chart */
.overview-split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.overview-split > section, .overview > section { margin: 0 0 18px; }
.chart-frame { position: relative; }
.activity-chart { display: block; width: 100%; height: auto; touch-action: none; }
.chart-grid { stroke: #ffffff12; stroke-width: 1; }
.chart-axis { fill: var(--muted); font: 12px var(--title); }
.chart-area { fill: #1fa3b026; }
.chart-line { fill: none; stroke: #1fa3b0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-cross { stroke: #ffffff55; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-dot { fill: #1fa3b0; stroke: var(--surface); stroke-width: 2; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); display: grid; gap: 2px; padding: 6px 10px; pointer-events: none;
  background: #0b1117f2; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 12px; white-space: nowrap; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }
.chart-table table { width: 100%; margin-top: 8px; font-size: 13px; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--line); }

/* Tables, chips */
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 10px 10px; color: var(--muted); font: 600 12px/1.25 var(--title); letter-spacing: .08em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line-strong); }
.data-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover, .data-table tr:hover td { background: #ffffff05; }
.cell-car { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.cell-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-person div, .cell-ids, .cell-reach { display: grid; gap: 2px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #16303a; color: #c7f0f3; font: 700 13px/1 var(--title); }
.avatar.is-company { background: #2a2117; color: var(--gold); }
.avatar .ic { margin: 0; }
.role-chip, .kind-chip, .date-chip { display: inline-block; margin: 2px 6px 2px 0; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; white-space: nowrap; }
.date-chip.is-today { border-color: var(--gold); color: #f2d29a; }
.upcoming-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.upcoming-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.upcoming-text { display: grid; gap: 2px; }
.contact-create .segmented { margin-bottom: 12px; }

@media (max-width: 1180px) { .hero-stage { right: 0; top: -40px; transform: scale(.85); transform-origin: right top; } }
@media (max-width: 980px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-split { grid-template-columns: 1fr; }
  .hero-stage { display: none; }
  .page-hero.has-scene { min-height: 120px; }
}
@media (max-width: 640px) {
  .gauge-row { grid-template-columns: 1fr; }
  .table-filters, .vehicle-pair { grid-template-columns: 1fr; }
  .page-hero { flex-direction: column; align-items: flex-start; min-height: 0; }
  .upcoming-item { grid-template-columns: minmax(0, 1fr) auto; }
  .upcoming-item .kind-chip { grid-column: 1 / -1; width: max-content; }
}
@media (prefers-reduced-motion: reduce) {
  .hanging-banner, .live-dot, .shell-brand.is-shining::after { animation: none !important; }
  .gauge-needle { transition: none; }
}
@media print {
  body::after, .hero-stage, .live-badge { display: none !important; }
  .page-hero h1 { text-shadow: none; }
}

/* Registration plates */
.plate { display: inline-flex; align-items: stretch; overflow: hidden; border-radius: 5px; background: linear-gradient(180deg, #fbfcfd, #dfe4ea); border: 2px solid #111; box-shadow: 0 0 0 1px #ffffff55, 0 6px 16px #0007; }
.plate-eu { display: grid; place-items: center; align-content: center; gap: 1px; padding: 2px 5px; background: #1d4fbf; color: #fff; }
.plate-stars { width: 15px; height: 15px; fill: #ffd84a; }
.plate-country { font: 700 10px/1 var(--title); letter-spacing: .04em; }
.plate-text { padding: 2px 9px; color: #111; font: 700 15px/1.3 "Bahnschrift", "DIN Alternate", Arial, sans-serif; letter-spacing: .08em; white-space: nowrap; }
.plate-sm { flex: 0 0 auto; }
.plate-lg { width: min(100%, 360px); border-width: 3px; }
.plate-lg .plate-eu { padding: 4px 8px; }
.plate-lg .plate-stars { width: 22px; height: 22px; }
.plate-lg .plate-country { font-size: 14px; }
input.plate-field, .plate-lg input.plate-field {
  flex: 1; min-width: 0; height: auto; border: 0; border-radius: 0; background: transparent; color: #111; box-shadow: none;
  padding: 6px 14px; font: 700 30px/1.1 "Bahnschrift", "DIN Alternate", Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
input.plate-field::placeholder { color: #68717c; }
input.plate-field:focus { outline: none; }
.plate-lg:focus-within { box-shadow: 0 0 0 2px var(--teal), 0 0 18px #1fa3b055; }
.plate-lg:has([data-submission-invalid]) { border-color: var(--color-bad); }
.case-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.case-title .case-vehicle { margin: 0; }
.monitor-head h2, .panel-head h2 { margin: 0; font: italic 800 20px/1.15 var(--title); letter-spacing: .02em; text-transform: uppercase; }
.monitor-head h2::after { content: " ///" / ""; color: #1fa3b055; letter-spacing: -.1em; }
.has-print > .monitor-head, .has-print > .panel-head { padding-right: 104px; }

/* Compact density pass: smaller gauges beside the alerts, tighter hero, tiles and panels. */
.monitor-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head head" "dials alerts"; gap: 12px 18px; }
.monitor-head { grid-area: head; }
.monitor-panel .gauge-row { grid-area: dials; display: flex; gap: 10px; margin: 0; }
.monitor-panel .alert-list { grid-area: alerts; align-content: start; }
.gauge { width: 148px; padding: 6px 6px 8px; border-radius: 8px; }
.gauge-digital { top: 50%; padding: 2px 6px; }
.gauge-value { font-size: 15px; }
.gauge-unit { font-size: 8px; }
.gauge-caption { margin-top: 4px; font-size: 12px; }
.gauge-name { letter-spacing: .08em; }
.alert-item { padding: 6px 8px; font-size: 13px; }
.alert-level { min-width: 60px; font-size: 12px; }
.page-hero { min-height: 84px; margin: 0 0 14px; }
.page-hero.has-scene { min-height: 132px; }
.page-hero h1 { font-size: clamp(24px, 3vw, 34px); }
.hero-sub { font-size: 12px; letter-spacing: .2em; }
.hero-stage { transform: scale(.78); transform-origin: right top; top: -18px; }
.kpi-row { gap: 10px; margin-bottom: 14px; }
.kpi-tile { min-height: 62px; padding: 10px 12px; gap: 10px; }
.kpi-icon { width: 22px; height: 22px; }
.kpi-label { font-size: 12px; }
.kpi-value { font-size: 22px; }
main section { padding: 16px 18px; margin: 14px 0; }
main section > h2, .panel-head h2, .monitor-head h2 { font-size: 16px; }
.overview-split > section, .overview > section { margin: 0 0 14px; }
.activity-chart { max-height: 190px; }
.data-table td { padding: 7px 10px; }
.case-vehicle { font-size: 18px; }
.car-art-md { width: 132px; height: 53px; }
@media (max-width: 900px) {
  .monitor-panel { grid-template-columns: 1fr; grid-template-areas: "head" "dials" "alerts"; }
  .monitor-panel .gauge-row { flex-wrap: wrap; }
}
@media (max-width: 1180px) { .hero-stage { transform: scale(.68); } }

/* Overview: main column + sticky monitor widget on the right */
.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.overview-main { min-width: 0; }
.overview-main .overview-split { grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); }
.overview-aside { position: sticky; top: 12px; }
.monitor-panel.is-widget { display: grid; grid-template-columns: 1fr; grid-template-areas: "head" "dials" "alerts"; gap: 10px; margin: 0; padding: 14px; }
.monitor-panel.is-widget .monitor-head { gap: 6px 10px; padding-right: 0; }
.monitor-panel.is-widget .monitor-head h2 { width: 100%; font-size: 14px; }
.monitor-panel.is-widget .monitor-stamp { width: 100%; }
.monitor-panel.is-widget > .print-btn { top: 10px; right: 10px; min-height: 28px; padding: 2px 8px; }
.monitor-panel.is-widget > .print-btn .print-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.monitor-panel.is-widget .gauge-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.monitor-panel.is-widget .gauge { width: auto; padding: 4px 4px 6px; border-radius: 6px; box-shadow: inset 0 0 0 2px #0a0e13, inset 0 0 0 3px #2a3542; }
.monitor-panel.is-widget .gauge-value { font-size: 12px; }
.monitor-panel.is-widget .gauge-unit { display: none; }
.monitor-panel.is-widget .gauge-caption { flex-direction: column; align-items: center; gap: 2px; font-size: 12px; text-align: center; }
.monitor-panel.is-widget .alert-item { flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.monitor-panel.is-widget .alert-text { flex-basis: 100%; order: 2; }
.monitor-panel.is-widget .alert-open { order: 3; margin-left: auto; min-height: 28px; }
@media (max-width: 1100px) {
  .overview-layout { grid-template-columns: 1fr; }
  .overview-aside { position: static; order: -1; }
}
.monitor-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 8px 2px 4px; margin: 0; border-radius: 999px; font: 600 12px/1 var(--title); background: #0c1218; }
.switch-track { position: relative; width: 28px; height: 16px; border-radius: 999px; background: #3a4a5c; transition: background .14s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #e9eef3; transition: transform .14s; }
.monitor-switch[aria-checked="true"] .switch-track { background: var(--teal); }
.monitor-switch[aria-checked="true"] .switch-track::after { transform: translateX(12px); }
.monitor-panel.is-off .gauge-row, .monitor-panel.is-off .alert-list, .monitor-panel.is-off .live-badge, .monitor-panel.is-off .monitor-overall, .monitor-panel.is-off .monitor-stamp { display: none; }
.monitor-panel.is-off { opacity: .8; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-track::after { transition: none; } }

/* Side panel refinement: smaller logo, slimmer rows, clearer selection. */
body.has-shell { padding-left: 232px; }
body.has-shell .side-shell { width: 232px; }
.shell-brand { padding: 16px 16px 12px; gap: 4px; }
.shell-logo { width: 124px; }
.shell-tagline { font-size: 9px; letter-spacing: .36em; }
.shell-nav { padding: 8px 8px; }
.side-shell .shell-group-toggle { min-height: 36px; padding: 6px 10px; font-size: 12px; letter-spacing: .1em; color: #c9d2dc; }
.side-shell .shell-group-toggle .ic { width: 16px; height: 16px; }
.side-shell .shell-group-toggle[aria-expanded="true"] { color: var(--text); }
.shell-items { margin: 0 0 6px 17px; padding-left: 6px; border-left-color: #ffffff14; }
.side-shell .shell-item { min-height: 32px; padding: 5px 10px; font-size: 13px; color: #aab5c1; border-left-width: 2px; border-radius: 0 4px 4px 0; }
.side-shell .shell-item .ic { width: 15px; height: 15px; color: #7f8b98; }
.side-shell .shell-item:hover { color: var(--text); background: #ffffff08; border-left-color: #ffffff30; }
.side-shell .shell-item:hover .ic { color: #c9d2dc; }
.side-shell .shell-item[aria-current="page"] { color: #ffffff; background: linear-gradient(90deg, #1fa3b030, #1fa3b008 80%); border-left-color: var(--teal); box-shadow: none; }
.side-shell .shell-item[aria-current="page"] .ic { color: #5fd3dd; }
.side-shell .shell-item:focus-visible, .side-shell .shell-group-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.shell-foot { padding: 10px 8px 12px; }
.shell-user strong { font-size: 13px; }
body.has-shell.shell-collapsed { padding-left: 64px; }
body.shell-collapsed .side-shell { width: 64px; }
body.shell-collapsed .shell-mark { width: 36px; }
.crumbs, main, #message { transition: none; }

/* Overview density at medium widths */
.data-table td, .data-table th { white-space: nowrap; }
.data-table td.cell-car span { white-space: normal; min-width: 120px; }
@media (max-width: 1440px) { .overview-main .overview-split { grid-template-columns: 1fr; } }

/* Category colours and larger category icons in the side panel */
.shell-group { --cat: var(--teal); --cat-soft: #1fa3b030; }
.shell-group[data-group="desk"] { --cat: #2bb3bf; --cat-soft: #2bb3bf2e; }
.shell-group[data-group="claims"] { --cat: #e0a445; --cat-soft: #e0a4452b; }
.shell-group[data-group="people"] { --cat: #a58ad6; --cat-soft: #a58ad62b; }
.shell-group[data-group="plan"] { --cat: #5fb98a; --cat-soft: #5fb98a2b; }
.shell-group[data-group="fleets"] { --cat: #5c9ee0; --cat-soft: #5c9ee02b; }
.shell-group[data-group="reports"] { --cat: #d08a62; --cat-soft: #d08a622b; }
.shell-group[data-group="admin"] { --cat: #9aa7b5; --cat-soft: #9aa7b52b; }
.side-shell .shell-group-toggle .ic { width: 22px; height: 22px; padding: 3px; border-radius: 6px; color: var(--cat); background: var(--cat-soft); stroke-width: 1.8; }
.side-shell .shell-group-toggle { gap: 10px; }
.shell-group .shell-items { border-left-color: color-mix(in srgb, var(--cat) 30%, transparent); }
.side-shell .shell-group .shell-item[aria-current="page"] { background: linear-gradient(90deg, var(--cat-soft), transparent 85%); border-left-color: var(--cat); }
.side-shell .shell-group .shell-item[aria-current="page"] .ic { color: var(--cat); }
.side-shell .shell-group .shell-item:hover { border-left-color: color-mix(in srgb, var(--cat) 60%, transparent); }
body.shell-collapsed .side-shell .shell-group-toggle .ic { width: 28px; height: 28px; padding: 5px; }
.cell-car { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.cell-car span { white-space: normal; }
.cell-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.case-card.has-print .print-btn { top: 8px; right: 8px; min-height: 28px; padding: 2px 7px; }
.case-card.has-print .print-btn .print-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.case-card.has-print .case-top { padding-right: 38px; }

/* Departure / drag-strip board */
.hero-stage, .hero-stage { transform: none; top: -22px; right: 170px; }
.jumbotron { transform: rotateY(-14deg) rotateX(3deg); }
.jumbotron-screen { width: 400px; gap: 6px; padding: 10px 14px 12px; border: 7px solid #161c23; border-radius: 6px;
  background: radial-gradient(circle, #ffffff10 0.75px, transparent 0.85px) 0 0 / 3px 3px, linear-gradient(180deg, #06090b, #030506);
  font-family: "Consolas", "Cascadia Mono", monospace; color: #ffbf5a; text-shadow: 0 0 6px #ff9f2e88; }
.tron-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid #ffffff14; }
.tron-title { flex: 1; font: 700 11.5px/1 var(--title); letter-spacing: .18em; color: #c9d2dc; text-shadow: none; opacity: .85; }
.tron-clock { font-size: 15px; letter-spacing: .08em; color: #9fe3e8; text-shadow: 0 0 6px #1fa3b088; }
.tron-lights { display: inline-flex; gap: 5px; }
.tron-lamp { width: 10px; height: 10px; border-radius: 50%; background: #1c2228; box-shadow: inset 0 0 2px #000; }
.jumbotron[data-level="green"] .lamp-green { background: #4caf7a; box-shadow: 0 0 8px #4caf7a; }
.jumbotron[data-level="amber"] .lamp-amber { background: #e0a445; box-shadow: 0 0 8px #e0a445; }
.jumbotron[data-level="red"] .lamp-red { background: #d0553f; box-shadow: 0 0 8px #d0553f; }
.tron-rows { display: grid; gap: 3px; }
.tron-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 3px 6px; background: #ffffff05; border-radius: 2px; }
.tron-label { font: 600 12px/1.2 var(--title); letter-spacing: .1em; text-transform: uppercase; color: #8d99a6; text-shadow: none; }
.tron-value { font-size: 17px; font-weight: 700; letter-spacing: .12em; white-space: pre; }
.row-status .tron-value { font-size: 19px; }
.jumbotron[data-level="green"] .row-status .tron-value { color: #9fe0b8; text-shadow: 0 0 6px #4caf7a88; }
.jumbotron[data-level="red"] .row-status .tron-value { color: #ff9a85; text-shadow: 0 0 6px #d0553f99; }
.row-next .tron-value { max-width: 230px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.jumbotron-mount { bottom: -40px; width: 8px; height: 36px; }
.jumbotron-mount.is-left { left: 22%; } .jumbotron-mount.is-right { left: 78%; }
.page-hero.has-scene { min-height: 196px; }
@media (max-width: 1360px) { .hero-stage { right: 150px; transform: scale(.86); transform-origin: right top; } }
@media (max-width: 1180px) { .hero-stage { right: 0; top: -30px; transform: scale(.74); } }

.hero-stage { right: 205px; }
@media (max-width: 1360px) { .hero-stage { right: 185px; } }
@media (max-width: 1180px) { .hero-stage { right: 0; } }

/* Racing steering wheel prop */
.race-wheel { position: relative; width: 330px; height: 168px; margin-top: 4px; transform: rotateX(8deg); transform-style: preserve-3d;
  background: linear-gradient(180deg, #1d242c, #0e1317); border-radius: 46px 46px 70px 70px / 40px 40px 90px 90px;
  border: 1px solid #2f3a46; box-shadow: 0 18px 36px #000b, inset 0 2px 0 #ffffff12, inset 0 -6px 14px #0008; }
.wheel-grip { position: absolute; top: 26px; width: 46px; height: 132px; border-radius: 22px; background:
  repeating-linear-gradient(180deg, #14181d 0 4px, #1b2026 4px 8px); box-shadow: inset 0 0 0 1px #0008, 0 6px 12px #0007; }
.wheel-grip.is-left { left: -26px; transform: rotate(-8deg); } .wheel-grip.is-right { right: -26px; transform: rotate(8deg); }
.shift-lights { position: absolute; top: 10px; left: 50%; display: flex; gap: 4px; transform: translateX(-50%); }
.shift-led { width: 11px; height: 11px; border-radius: 50%; background: #20262d; box-shadow: inset 0 1px 2px #000a; }
.shift-led.is-on.led-green { background: #4caf7a; box-shadow: 0 0 7px #4caf7a; }
.shift-led.is-on.led-amber { background: #e0a445; box-shadow: 0 0 7px #e0a445; }
.shift-led.is-on.led-red { background: #d0553f; box-shadow: 0 0 7px #d0553f; }
.race-wheel[data-level="red"] .shift-led.is-on { animation: shift-blink 1s steps(2, start) infinite; }
@keyframes shift-blink { 50% { opacity: .35; } }
.wheel-lcd { position: absolute; left: 50%; top: 32px; width: 176px; display: grid; gap: 3px; padding: 7px 9px; transform: translateX(-50%);
  background: radial-gradient(circle, #ffffff0c .6px, transparent .7px) 0 0 / 3px 3px, linear-gradient(180deg, #0a1612, #050b09);
  border: 2px solid #050607; border-radius: 6px; box-shadow: inset 0 0 12px #1fa3b022, 0 0 0 1px #2c3744;
  font-family: "Consolas", "Cascadia Mono", monospace; color: #9fe3e8; text-shadow: 0 0 5px #1fa3b088; }
.lcd-clock { position: absolute; top: 6px; right: 8px; font-size: 11.5px; opacity: .75; }
.lcd-status { font: italic 800 17px/1 var(--title); letter-spacing: .06em; }
.race-wheel[data-level="green"] .lcd-status { color: #9fe0b8; text-shadow: 0 0 6px #4caf7a88; }
.race-wheel[data-level="amber"] .lcd-status { color: #f2d29a; text-shadow: 0 0 6px #e0a44588; }
.race-wheel[data-level="red"] .lcd-status { color: #ff9a85; text-shadow: 0 0 6px #d0553f99; }
.lcd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lcd-cell { display: grid; justify-items: center; padding: 2px 0; background: #ffffff06; border-radius: 2px; }
.lcd-label { font-size: 8px; letter-spacing: .14em; opacity: .7; }
.lcd-value { font-size: 18px; font-weight: 700; line-height: 1.05; }
.lcd-next { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.wheel-knob { position: absolute; top: 74px; width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, #3a4550, #1a2027, #3a4550, #1a2027, #3a4550); box-shadow: 0 0 0 3px #10151a, 0 3px 6px #000a; }
.wheel-knob::after { content: ""; position: absolute; top: 3px; left: 50%; width: 2px; height: 9px; transform: translateX(-50%); background: var(--gold); border-radius: 1px; }
.wheel-knob.is-left { left: 28px; } .wheel-knob.is-right { right: 28px; transform: rotate(40deg); }
.wheel-btn { position: absolute; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 2px 4px #000a, inset 0 1px 0 #ffffff33; }
.wheel-btn.b1 { left: 34px; top: 118px; background: #c2674a; } .wheel-btn.b2 { left: 58px; top: 128px; background: #1fa3b0; }
.wheel-btn.b3 { right: 34px; top: 118px; background: #e0a445; } .wheel-btn.b4 { right: 58px; top: 128px; background: #5c9ee0; }
.page-hero.has-scene { min-height: 200px; }
@media (prefers-reduced-motion: reduce) { .race-wheel[data-level="red"] .shift-led.is-on { animation: none; } }

/* Hung on chains, dropping out of the header on first paint, then a damped swing. */
.hero-stage { top: -34px; }
.race-wheel { transform-origin: 50% -90px; animation: wheel-drop 1.9s cubic-bezier(.25,.9,.3,1) both; }
.wheel-chain { position: absolute; top: -96px; width: 6px; height: 100px; z-index: -1;
  background: repeating-linear-gradient(180deg, #8b939c 0 7px, transparent 7px 9px, #5d656e 9px 16px, transparent 16px 18px);
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 22%); mask: linear-gradient(180deg, transparent 0, #000 22%);
  border-radius: 3px; filter: drop-shadow(0 2px 2px #0009); }
.wheel-chain.is-left { left: 62px; } .wheel-chain.is-right { right: 62px; }
.hanging-banner { animation: banner-drop 1.6s cubic-bezier(.25,.9,.3,1) .25s both, banner-sway 7s ease-in-out 2s infinite; }
@keyframes wheel-drop {
  0% { transform: translateY(-160px) rotateX(8deg) rotate(0deg); opacity: 0; }
  35% { transform: translateY(10px) rotateX(8deg) rotate(-4deg); opacity: 1; }
  55% { transform: translateY(-4px) rotateX(8deg) rotate(3deg); }
  72% { transform: translateY(2px) rotateX(8deg) rotate(-1.6deg); }
  86% { transform: translateY(0) rotateX(8deg) rotate(.8deg); }
  100% { transform: translateY(0) rotateX(8deg) rotate(0deg); }
}
@keyframes banner-drop {
  0% { transform: translateY(-120px) rotate(0deg); opacity: 0; }
  40% { transform: translateY(6px) rotate(2deg); opacity: 1; }
  65% { transform: translateY(-2px) rotate(-1.2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .race-wheel, .hanging-banner { animation: none !important; } }

/* Evo-style triple gauge pod */
.gauge-pod { position: relative; display: grid; gap: 6px; padding: 10px 12px 8px; margin-top: 4px;
  background: linear-gradient(180deg, #1b2229, #0d1115); border: 1px solid #2f3a46; border-radius: 26px 26px 14px 14px;
  box-shadow: 0 18px 36px #000b, inset 0 2px 0 #ffffff10, inset 0 -6px 12px #0008;
  transform-origin: 50% -90px; animation: wheel-drop 1.9s cubic-bezier(.25,.9,.3,1) both; }
.gauge-pod .wheel-chain.is-left { left: 48px; } .gauge-pod .wheel-chain.is-right { right: 48px; }
.pod-face { display: flex; gap: 8px; }
.pod-face .gauge { width: 108px; padding: 4px 4px 6px; border-radius: 50% 50% 18px 18px / 46% 46% 18px 18px;
  background: radial-gradient(80% 70% at 50% 45%, #18222d, #07090c); box-shadow: inset 0 0 0 3px #090c10, inset 0 0 0 4px #39434f, 0 4px 10px #0009; }
.pod-face .gauge-value { font-size: 12px; }
.pod-face .gauge-unit { display: none; }
.pod-face .gauge-digital { top: 48%; padding: 1px 5px; }
.pod-face .gauge-caption { justify-content: center; margin-top: 2px; font-size: 11px; }
.pod-face .gauge-state { display: none; }
.pod-strip { display: flex; align-items: center; gap: 10px; padding: 4px 8px; background: #05080a; border: 1px solid #22303b; border-radius: 4px;
  font-family: "Consolas", "Cascadia Mono", monospace; font-size: 11px; color: #9fe3e8; text-shadow: 0 0 5px #1fa3b077; }
.pod-status { font: italic 800 12px/1 var(--title); letter-spacing: .08em; }
.gauge-pod[data-level="green"] .pod-status { color: #9fe0b8; } .gauge-pod[data-level="amber"] .pod-status { color: #f2d29a; } .gauge-pod[data-level="red"] .pod-status { color: #ff9a85; }
.pod-next { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.pod-clock { opacity: .7; }
@media (prefers-reduced-motion: reduce) { .gauge-pod { animation: none !important; } }

/* Latest register mockup: teal primary, table, six tiles, slide-over drawer */
:root { --primary: #22b8bf; --primary-ink: #04181a; }
button.is-primary, form > button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, #33c9cf, #1fa8ae); border-color: #2bc0c6; color: var(--primary-ink);
  box-shadow: 0 6px 18px #22b8bf33, inset 0 1px 0 #ffffff40;
}
button.is-primary:hover, form > button[type="submit"]:hover { background: linear-gradient(180deg, #45d6dc, #25b2b8); border-color: #5fe0e5; }
button.is-primary .ic, form > button[type="submit"] .ic { color: var(--primary-ink); margin: 0; }
.kpi-row.is-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.register .view-chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.claim-row td:first-child { border-left: 3px solid var(--teal); }
.claim-row.is-late td:first-child { border-left-color: var(--bad); }
.claim-row.is-waiting td:first-child { border-left-color: var(--warn); }
.claim-row.is-new td:first-child { border-left-color: #7aa2ff; }
.cell-case { display: table-cell; }
.cell-case .case-open { display: block; font-size: 15px; }
.cell-case .claim-date { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cell-vehicle { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.cell-vehicle-text { display: grid; gap: 4px; justify-items: start; }
.cell-model { font-weight: 600; white-space: nowrap; }
.cell-client { min-width: 140px; white-space: normal !important; }
.cell-clock { color: var(--text); font-size: 13px; }
.next-chip { display: inline-block; max-width: 180px; padding: 4px 8px; border-radius: 4px; background: #ffffff0a; font-size: 12px; white-space: normal; }
.next-chip.is-ours { background: #e0a44520; color: #f2d29a; border: 1px solid #e0a44555; }
.cell-actions .case-details { min-height: 32px; padding: 4px 12px; border-color: var(--primary); color: #bff1f3; background: #0f2a2e; }
.register-table .claim-marks { flex-direction: column; align-items: flex-start; gap: 4px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pager-size { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pager-size select { width: auto; min-height: 40px; padding: 6px 10px; }
.pager-summary { color: var(--muted); font-size: 13px; }
.pager-pages { display: flex; flex-wrap: wrap; min-width: 0; gap: 4px; }
.pager-btn { min-height: 32px; min-width: 34px; padding: 4px 8px; text-align: center; }
.pager-btn.is-current { border-color: var(--primary); color: #bff1f3; background: #0f2a2e; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(420px, 100vw); overflow-y: auto;
  background: linear-gradient(180deg, #0f161e, #0a0f14); border-left: 1px solid var(--line-strong); box-shadow: -24px 0 48px #000a;
  transform: translateX(100%); transition: transform 220ms ease; }
.drawer.is-open { transform: none; }
.drawer .drawer-panel { margin: 0; min-height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.drawer-close { position: absolute; top: 12px; right: 12px; min-height: 36px; min-width: 36px; padding: 0; text-align: center; font-size: 22px; line-height: 1; background: transparent; }
.drawer .create-panel > h2 { padding-right: 48px; }
.drawer form > button[type="submit"] { width: 100%; min-height: 48px; font-size: 16px; }
body.drawer-open::before { background-color: #0008; }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; }
/* A choice is a word or two: never split it mid-word (sections allow overflow-wrap:anywhere). */
.segmented button { overflow-wrap: normal; word-break: normal; white-space: nowrap; }
.handover-field .segmented button { white-space: normal; text-wrap: balance; }
.segmented button .ic { margin: 0; }
.drawer .segmented { width: 100%; }
@media (max-width: 1200px) { .kpi-row.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpi-row.is-six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

/* "Nowa sprawa" street-racing button (own artwork, no film branding) */
.nc-button { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 22px 6px 10px; overflow: hidden;
  transform: skewX(-12deg); border: 1px solid #45d6dc; border-radius: 4px; color: #04181a; text-align: left;
  background: linear-gradient(100deg, #e9f6f7 0%, #9fe3e8 18%, #2bc0c6 46%, #1a8f95 100%);
  box-shadow: 0 8px 22px #22b8bf40, inset 0 1px 0 #ffffffaa, inset 0 -3px 0 #0a5b5f; }
.nc-button > * { transform: skewX(12deg); }
.nc-button::after { content: ""; position: absolute; inset: 0 auto 0 -40%; width: 30%; background: linear-gradient(100deg, transparent, #ffffff88, transparent); transform: skewX(-12deg); transition: left .5s ease; }
.nc-button:hover::after { left: 120%; }
.nc-button:hover { background: linear-gradient(100deg, #f1fbfc, #b9f2f4 24%, #60dadf 48%, #2cafb6 100%); border-color: #8af0f4; box-shadow: 0 10px 26px #22b8bf66, inset 0 1px 0 #ffffffaa, inset 0 -3px 0 #0a5b5f; }
.nc-art { position: relative; display: inline-block; width: 92px; height: 40px; }
.nc-art .car-art { position: absolute; right: 0; bottom: 0; width: 82px; height: 33px; filter: drop-shadow(0 2px 2px #0007); }
.nc-art .car-body { fill: #0b2a2d; stroke: #ffffff66; }
.nc-art .car-glass { fill: #9fe3e8; opacity: .6; }
.nc-streaks { position: absolute; left: -6px; top: 8px; display: grid; gap: 4px; }
.nc-streaks span { display: block; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #0b2a2dcc); }
.nc-streaks span:nth-child(1) { width: 26px; } .nc-streaks span:nth-child(2) { width: 38px; margin-left: 6px; }
.nc-streaks span:nth-child(3) { width: 22px; margin-left: 2px; } .nc-streaks span:nth-child(4) { width: 30px; margin-left: 10px; }
.nc-plus { position: absolute; right: -6px; top: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #e0a445; color: #1d1305; font: 800 15px/1 var(--title); box-shadow: 0 0 0 2px #0b2a2d; }
.nc-text { display: grid; gap: 1px; }
.nc-text strong { font: italic 900 17px/1 var(--title); letter-spacing: .04em; text-transform: uppercase; }
.nc-text small { font: 600 11px/1 var(--title); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.nc-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .nc-button::after { transition: none; } }
.cell-vehicle { min-width: 190px; }
.cell-client { min-width: 110px; }
.register-scroll { container-type: inline-size; }
.register .table-filters { margin-bottom: 10px; }
.register .view-chips { margin-bottom: 12px; }
.register-table td, .register-table th { padding-inline: 8px; white-space: normal; overflow-wrap: normal; }
.register-table .cell-vehicle, .register-table .cell-vehicle-text, .register-table .cell-client { min-width: 0; }
.register-table .claim-date, .register-table .cell-model { white-space: normal; }
.register-table :is(.cell-model, .client-marker, .vehicle-fleet) { overflow-wrap: anywhere; }
.register-table .cell-clock { font-size: 13px; }
.register-table .pill { margin-right: 0; }
.register-table .case-details { padding-inline: 10px; }
@container (width >= 1020px) {
  .register-table :is(th, td):nth-child(2) { min-width: 136px; }
  .register-table :is(th, td):nth-child(3) { min-width: 110px; }
}
@container (width < 1020px) {
  .register-table, .register-table tbody { display: block; }
  .register-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .register-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-strong);
  }
  .register-table td { min-width: 0; border: 0; padding: 5px 8px; }
  .register-table .cell-vehicle-text { max-width: 100%; }
  .register-table td[colspan] { grid-column: 1 / -1; }
  .register-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 600;
  }
  .register-table .pill > span { min-width: 0; white-space: normal; overflow-wrap: break-word; }
}
@container (690px <= width < 1020px) {
  .register-table tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) repeat(2, minmax(0, 1fr)) minmax(104px, .85fr); }
  .register-table .cell-next { grid-column: span 2; }
  .register-table .cell-actions { align-self: end; }
}
@container (width < 690px) {
  .register-table :is(.cell-case, .cell-actions, td:nth-child(2)) { grid-column: 1 / -1; }
  .register-table .claim-row td { padding-block: 6px; border-bottom: 0; }
}
body.has-shell main, body.has-shell .crumbs { width: 100%; min-width: 0; max-width: min(1760px, 100%); }
.claims-panel, .dashboard.register { min-width: 0; max-width: 100%; }

/* Side panel sub-items as a manual gearbox gate seen from above: rail, cross-gates, numbered knobs. */
.shell-items { counter-reset: gear; position: relative; margin: 2px 0 8px 20px; padding: 2px 0 2px 0; border-left: 0; }
.shell-items::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 55%, #2a3440), #1a2129); box-shadow: 0 0 0 1px #0007; }
.shell-items li { counter-increment: gear; position: relative; }
.shell-items li::before { content: ""; position: absolute; left: 10px; top: 50%; width: 14px; height: 2px; background: #2a3440; transform: translateY(-50%); }
.side-shell .shell-group .shell-item { position: relative; margin-left: 24px; width: calc(100% - 24px); padding-left: 30px; border-left: 0; border-radius: 4px; }
.side-shell .shell-group .shell-item::before { content: counter(gear); position: absolute; left: 6px; top: 50%; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #3a4552, #161c23); border: 1px solid #ffffff26; color: #aab5c1;
  font: 700 10px/1 var(--title); font-variant-numeric: tabular-nums; box-shadow: 0 1px 2px #000a; }
.side-shell .shell-group .shell-item .ic { display: none; }
.side-shell .shell-group .shell-item:hover::before { border-color: color-mix(in srgb, var(--cat) 70%, transparent); color: var(--text); }
.side-shell .shell-group .shell-item[aria-current="page"] { background: linear-gradient(90deg, var(--cat-soft), transparent 85%); }
.side-shell .shell-group .shell-item[aria-current="page"]::before { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cat) 80%, #fff), var(--cat));
  color: #0b0f14; border-color: transparent; box-shadow: 0 0 10px var(--cat); }
.shell-items li:has(.shell-item[aria-current="page"])::before { background: var(--cat); box-shadow: 0 0 6px var(--cat); }

/* Gear numbers as ivory shift knobs (taller than wide), engraved digit; engaged gear gets the category ring. */
.side-shell .shell-group .shell-item::before {
  width: 15px; height: 21px; border-radius: 48% 48% 44% 44% / 40% 40% 60% 60%;
  background: radial-gradient(ellipse at 35% 28%, #ffffff 0%, #ece7dc 38%, #c9c2b3 100%);
  border: 1px solid #00000066; color: #2a2723; font: 700 10px/1 var(--title);
  text-shadow: 0 1px 0 #ffffffaa; box-shadow: inset 0 -2px 3px #0000004d, 0 2px 3px #000b;
}
.side-shell .shell-group .shell-item:hover::before { border-color: color-mix(in srgb, var(--cat) 80%, #000); color: #111; }
.side-shell .shell-group .shell-item[aria-current="page"]::before {
  background: radial-gradient(ellipse at 35% 28%, #ffffff 0%, #f3eee4 38%, #d4ccbb 100%); color: #111;
  border-color: transparent; box-shadow: 0 0 0 2px var(--cat), 0 0 10px var(--cat), inset 0 -2px 3px #0000004d;
}
.shell-items::before { left: 13px; }
.shell-items li::before { left: 14px; width: 12px; }
.side-shell .shell-group .shell-item::before { left: 7px; }

/* Gear knobs: tall leather body with stitching, silver top cap engraved with the gear number. */
.side-shell .shell-group .shell-item::before {
  content: ""; left: 7px; width: 16px; height: 23px; border-radius: 46% 46% 38% 38% / 36% 36% 64% 64%;
  background: radial-gradient(ellipse at 30% 25%, #4a4f55 0%, #24272b 45%, #121417 100%);
  border: 1px dashed #6b7076; outline: 1px solid #0b0c0e; outline-offset: -3px;
  box-shadow: 0 2px 3px #000c, inset 0 -3px 4px #0009; text-shadow: none;
}
.side-shell .shell-group .shell-item::after {
  content: counter(gear); position: absolute; left: 10px; top: calc(50% - 7px); display: grid; place-items: center;
  width: 10px; height: 10px; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #ffffff, #c9ced4 60%, #8d949c);
  color: #1b1d20; font: 800 7px/1 var(--title); box-shadow: 0 0 0 1px #0007;
}
.side-shell .shell-group .shell-item:hover::before { border-color: color-mix(in srgb, var(--cat) 80%, #6b7076); }
.side-shell .shell-group .shell-item[aria-current="page"]::before {
  background: radial-gradient(ellipse at 30% 25%, #4a4f55 0%, #24272b 45%, #121417 100%);
  border-color: var(--cat); box-shadow: 0 0 8px var(--cat), inset 0 -3px 4px #0009;
}
.side-shell .shell-group .shell-item[aria-current="page"]::after {
  background: radial-gradient(circle at 35% 30%, #ffffff, color-mix(in srgb, var(--cat) 60%, #fff) 60%, var(--cat)); color: #0b0f14;
}

/* GT-style instruments: carbon face, aluminium bezel, white numerals, red-orange needle */
.gauge { background: none; border: 0; box-shadow: none; padding: 2px; }
.monitor-panel.is-widget .gauge, .pod-face .gauge { background: none; box-shadow: none; border-radius: 0; padding: 0; }
.gauge-dial { filter: drop-shadow(0 6px 10px #000c); }
.gauge-center { fill: #0b0d10; stroke: #2a2f36; stroke-width: 1; }
.gauge-band { stroke-width: 4; opacity: .35; }
.gauge-tick { stroke: #ffffff8c; stroke-width: 1.4; } .gauge-tick.is-major { stroke: #ffffff; stroke-width: 3; }
.gauge-numeral { fill: #f2f4f6; font: 700 15px/1 var(--title); }
.gauge-needle { transform-origin: 100px 98px; }
.gauge-needle path { fill: #ff5a2a; filter: drop-shadow(0 0 3px #ff5a2a99); }
.gauge-hub { fill: #15181c; stroke: #c9ced4; stroke-width: 2.5; }
.gauge-digital { top: 66%; background: #050708e6; border-color: #2a2f36; }
.gauge-value { color: #f2f4f6; text-shadow: none; }
.gauge[data-level="amber"] .gauge-value { color: #f2d29a; } .gauge[data-level="red"] .gauge-value { color: #ff9a85; }
/* Cluster layout in the hero pod: speedo-left, big centre, small aux right. */
.pod-face { align-items: center; }
.pod-face .gauge[data-key="documents"] { order: 1; width: 100px; }
.pod-face .gauge[data-key="terms"] { order: 2; width: 142px; }
.pod-face .gauge[data-key="workshop"] { order: 3; width: 84px; }
.pod-face .gauge-numeral { font-size: 17px; }
.gauge-pod { border-radius: 30px 30px 16px 16px; background: linear-gradient(180deg, #14181d, #08090b); }
.pod-mid { min-height: 26px; }
.pod-page { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-page.is-flip { animation: mid-flip .35s ease-out; }
@keyframes mid-flip { from { opacity: 0; transform: translateY(4px); } }
.pod-dots { display: inline-flex; gap: 3px; }
.pod-dots span { width: 5px; height: 5px; border-radius: 50%; background: #2a3a44; }
.pod-dots span.is-on { background: #9fe3e8; box-shadow: 0 0 4px #1fa3b0; }
@media (prefers-reduced-motion: reduce) { .pod-page.is-flip { animation: none; } }

/* H-pattern alternation: odd gears on the left of the item, even gears on the right. */
.shell-items li:nth-child(even) .shell-item { padding-left: 12px; padding-right: 30px; }
.side-shell .shell-group .shell-items li:nth-child(even) .shell-item::before { left: auto; right: 7px; }
.side-shell .shell-group .shell-items li:nth-child(even) .shell-item::after { left: auto; right: 10px; }
.shell-items li:nth-child(even)::before { width: 22px; }

/* ===== Side panel v3 (user mockup 24.11): cards, outline icons, live counts, highlighted "Nowa sprawa" ===== */
body.has-shell { padding-left: 264px; }
body.has-shell .side-shell { width: 264px; background:
  radial-gradient(120% 40% at 100% 0%, #1fa3b014 0%, transparent 60%),
  linear-gradient(180deg, #0b1016 0%, #07090d 100%); }
.shell-group[data-group="claims"] { --cat: #c99a62; --cat-soft: #c99a6226; }
.shell-brand { justify-items: center; text-align: center; padding: 18px 14px 14px; gap: 6px; }
.shell-logo { width: 116px; }
.shell-tagline { font-size: 10px; letter-spacing: .42em; color: #dfe5eb; }
.shell-motto { display: inline-flex; align-items: center; gap: 8px; font: 700 9px/1 var(--title); letter-spacing: .24em; text-transform: uppercase; color: #a7b2be; }
.motto-slash { color: var(--copper); letter-spacing: -.1em; font-style: italic; }
.shell-nav { display: grid; gap: 10px; padding: 10px 12px; }

/* Pulpit card */
.side-shell .shell-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 12px; margin: 0;
  text-align: left; border: 1px solid #2bb3bf88; border-radius: 10px; color: var(--text);
  background: linear-gradient(135deg, #10232a, #0b1218 70%); box-shadow: 0 0 0 1px #2bb3bf22, 0 8px 22px #0008, inset 0 1px 0 #ffffff0d; }
.side-shell .shell-card > .ic { width: 26px; height: 26px; margin: 0; color: #2bb3bf; }
.shell-card-text { display: grid; gap: 2px; }
.shell-card-text strong { font: 700 15px/1.1 var(--title); }
.shell-card-sub { color: #a7b2be; font: 12px/1.2 var(--title); }
.shell-card-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.shell-card-bars span { width: 5px; border-radius: 1px; background: linear-gradient(180deg, #5fd3dd, #1f8c93); box-shadow: 0 0 6px #2bb3bf66; }
.shell-card-bars span:nth-child(1) { height: 30%; } .shell-card-bars span:nth-child(2) { height: 50%; } .shell-card-bars span:nth-child(3) { height: 40%; }
.shell-card-bars span:nth-child(4) { height: 72%; } .shell-card-bars span:nth-child(5) { height: 100%; }
.side-shell .shell-card:hover { border-color: #5fd3dd; }
.side-shell .shell-card[aria-current="page"] { border-color: #5fd3dd; box-shadow: 0 0 0 1px #5fd3dd55, 0 0 22px #2bb3bf33, inset 0 1px 0 #ffffff12; }

/* Group cards */
.shell-group { padding: 4px 6px 6px; border: 1px solid #1b2530; border-radius: 10px; background: linear-gradient(170deg, #0f161e, #0a0f14); }
.shell-group + .shell-group { margin-top: 0; }
.side-shell .shell-group-toggle { min-height: 40px; padding: 6px 8px; font: 700 12px/1 var(--title); letter-spacing: .12em; color: var(--text); }
.side-shell .shell-group-toggle .ic { width: 24px; height: 24px; padding: 0; background: none; color: var(--cat); stroke-width: 1.7; }
.shell-items { margin: 0 0 2px 19px; padding: 0 0 0 8px; border-left: 1px solid color-mix(in srgb, var(--cat) 55%, transparent); }
.shell-items::before, .shell-items li::before { content: none; display: none; }
.side-shell .shell-group .shell-item { margin-left: 0; width: 100%; padding: 5px 8px; gap: 10px; min-height: 36px; border-radius: 6px; color: #d3dae2; font: 500 13.5px/1.2 var(--title); }
.side-shell .shell-group .shell-item::before, .side-shell .shell-group .shell-item::after { content: none; display: none; }
.side-shell .shell-group .shell-items li:nth-child(even) .shell-item { padding: 5px 8px; }
.side-shell .shell-group .shell-item .ic { display: inline-block; width: 19px; height: 19px; flex: 0 0 auto; color: var(--cat); stroke-width: 1.7; }
.side-shell .shell-group .shell-item .shell-label { flex: 1; }
.side-shell .shell-group .shell-item:hover { background: #ffffff08; color: #fff; }
.side-shell .shell-group .shell-item[aria-current="page"] { background: linear-gradient(90deg, var(--cat-soft), transparent 90%); color: #fff; box-shadow: inset 2px 0 0 var(--cat); }

/* Counts */
.shell-badge { flex: 0 0 auto; min-width: 22px; padding: 1px 6px; border-radius: 999px; text-align: center; font: 400 12px/1.35 var(--race); font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; border: 1px solid #6d7c8c; color: #d5dee6; background: transparent; }
.shell-badge.is-total { border-color: #c99a62; color: #f0dcc0; }
.shell-badge.is-overdue { border-color: #e07a68; color: #ffb0a2; }
.shell-badge.is-intakeToday { border-color: #3ec4cf; color: #9fe7ee; }
.shell-badge.is-missingDocuments { border-color: #e0a445; color: #ffc48a; }
.shell-badge.is-zero { opacity: .72; background: transparent; color: #8b97a3; border-color: #3a4a5c; }

/* Highlighted "Nowa sprawa" */
.side-shell .shell-group .shell-item.is-cta { margin: 2px 0; color: #04181a; font-weight: 700; border: 1px solid #45d6dc;
  background: linear-gradient(100deg, #9fe3e8 0%, #33c9cf 40%, #1fa8ae 100%); box-shadow: 0 4px 14px #22b8bf33; }
.side-shell .shell-group .shell-item.is-cta .ic { color: #04181a; }
.side-shell .shell-group .shell-item.is-cta:hover { background: linear-gradient(100deg, #bff1f3 0%, #45d6dc 40%, #25b2b8 100%); color: #04181a; }
.side-shell .shell-group .shell-item.is-cta[aria-current="page"] { box-shadow: 0 0 0 2px #0b1016, 0 0 0 3px #45d6dc, 0 4px 14px #22b8bf55; }

/* Header tools and their shared popover. */
.shell-foot { gap: 10px; padding: 12px 12px 16px; }
.staff-tools { display: flex; align-items: center; gap: 6px; }
.staff-tools[hidden] { display: none; }
.staff-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 9px; border-radius: 6px; font: 650 13px/1.2 var(--font-sans); white-space: nowrap; }
.staff-tool .ic { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; color: var(--color-neon); }
header :is(.staff-tools, .staff-popover) span { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
header :is(.staff-tools, .staff-popover) span::before { content: none; }
body.has-shell header :is(.staff-tools, .staff-popover) span { margin-inline-start: 0; }
header .staff-tool .notice-count { display: grid; place-items: center; flex: 0 0 auto; min-width: 22px; padding: 1px 5px; border-radius: 999px; border: 1px solid #3ec4cf; color: #9fe7ee; font-size: 12px; font-variant-numeric: tabular-nums; }
header .notice-count.is-alert { border-color: #e07a68; color: #ffb0a2; }
header .notice-count.is-amber { border-color: #e0a445; color: #ffc48a; }
header .notice-count.is-zero { color: var(--muted); border-color: var(--line-strong); }
.staff-popover { position: absolute; z-index: 45; inset-block-start: calc(100% + 8px); inset-inline-end: 12px; width: min(360px, 100% - 24px); max-height: min(70vh, 480px); overflow: auto; padding: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--color-surface); box-shadow: 0 16px 40px #000a; }
.staff-popover-title { margin: 0 0 9px; font-size: 15px; font-weight: 750; }
.staff-popover > label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; min-height: 40px; }
.staff-popover > label + label { border-top: 1px solid var(--line); }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notice-item { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; padding: 8px; border: 1px solid #243140; border-radius: 8px; background: transparent; color: #d5dee6; font: 12px/1.35 Bahnschrift, "Segoe UI", Arial, sans-serif; }
.notice-item span { min-width: 0; overflow-wrap: anywhere; }
.notice-item .ic { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.notice-item.is-alert { border-color: #e07a68; }
.notice-item.is-alert .ic { color: #ffb0a2; }
.notice-item.is-amber .ic { color: #ffc48a; }
.notice-item.is-teal .ic { color: #9fe7ee; }
.notice-item.is-gold .ic { color: #f0c56a; }
.notice-empty { color: var(--muted); }
@media (max-width: 899px) { .staff-popover .staff-pref-desktop { display: none; } }
@media (max-width: 620px) {
  .staff-tool { min-height: 40px; gap: 5px; padding-inline: 7px; }
  header .staff-tools .staff-tool-label { display: none; }
  .staff-tool:last-child { min-width: 40px; justify-content: center; }
}
@media (max-width: 360px) { body.has-shell header > span { flex-basis: 100%; justify-content: flex-end; } }
.shell-user-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #c2674a66; border-radius: 10px; background: #0d1319; }
.shell-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; border: 2px solid #3a4a5c; background: #16303a; color: #c7f0f3; font: 700 13px/1 var(--title); }
.shell-user { margin: 0; }
.shell-foot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-shell .shell-foot-row .shell-collapse, .side-shell .shell-foot-row .shell-logout { justify-content: center; min-height: 38px; padding: 6px 8px; border: 1px solid #243140; border-radius: 6px; color: #c9d2dc; font: 600 12px/1 var(--title); }
.side-shell .shell-foot-row .shell-logout .ic { display: inline-block; }
body.shell-collapsed .shell-card-text, body.shell-collapsed .shell-card-bars, body.shell-collapsed .shell-badge, body.shell-collapsed .shell-motto, body.shell-collapsed .shell-user-card > .shell-user { display: none; }
body.shell-collapsed .side-shell .shell-card { grid-template-columns: 1fr; justify-items: center; padding: 10px 0; }
body.shell-collapsed .shell-foot-row { grid-template-columns: 1fr; }
body.shell-collapsed .shell-user-card { justify-content: center; padding: 8px 0; }
body.has-shell.shell-collapsed { padding-left: 72px; }
body.shell-collapsed .side-shell { width: 72px; }
@media (max-width: 899px) { body.has-shell { padding-left: 0; } body.has-shell .side-shell { width: min(88vw, 300px); } }

/* Jersey-style numerals (system fonts, no licensed kit font): fill, dark gap, light outline. */
.kpi-value {
  position: relative; display: inline-block; isolation: isolate; padding: 2px 3px;
  font-family: Impact, "Haettenschweiler", "Bahnschrift", "Arial Narrow", sans-serif; font-style: normal; font-weight: 400;
  font-size: 34px; line-height: 1; letter-spacing: .04em; color: #f2f4f6;
  -webkit-text-stroke: 5px #0b0f14; paint-order: stroke fill;
}
.kpi-value::before {
  content: attr(data-n); position: absolute; inset: 2px 3px; z-index: -1;
  color: transparent; -webkit-text-stroke: 9px #c9d2dc; paint-order: stroke fill;
}
.kpi-tile[aria-pressed="true"] .kpi-value::before { -webkit-text-stroke-color: #45d6dc; }
.kpi-tile.is-red .kpi-value::before { -webkit-text-stroke-color: #d0553f; }
.kpi-tile.is-amber .kpi-value::before { -webkit-text-stroke-color: #e0a445; }
.kpi-tile { min-height: 70px; }

/* Fixes from the 24.11 overview screenshot */
.data-table button { white-space: nowrap; }
.monitor-panel.is-widget .gauge { display: flex; flex-direction: column; align-items: center; }
.monitor-panel.is-widget .gauge-digital { position: static; transform: none; margin: -30px auto 2px; padding: 1px 6px; }
/* The digital readout's -30px margin pulled the caption 10px under the dial, hiding the gauge name. */
.monitor-panel.is-widget .gauge-caption { position: relative; z-index: 1; margin-top: 12px; }

/* Racing Sans One (SIL OFL 1.1, self-hosted) for numerals; replaces the outlined jersey look. */
@font-face { font-family: "Racing Sans One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/racing-sans-one-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Racing Sans One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/racing-sans-one-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root { --race: "Racing Sans One", "Bahnschrift", Impact, sans-serif; }
.kpi-value { font-family: var(--race); font-size: 32px; letter-spacing: .02em; padding: 0; color: #f2f4f6; -webkit-text-stroke: 0; paint-order: normal; text-shadow: 0 2px 0 #0008; }
.kpi-value::before { content: none; display: none; }
.kpi-tile[aria-pressed="true"] .kpi-value { color: #5fd3dd; }
.kpi-tile.is-red .kpi-value { color: #ff9a85; }
.shell-badge { font-family: var(--race); font-size: 12px; letter-spacing: .03em; }
.gauge-numeral { font-family: var(--race) !important; font-weight: 400 !important; }

/* Overview lower cards (mockup 24.11): tasks, attention, recent */
.monitor-panel.is-widget .alert-list { display: none; }
.overview-split.is-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-panel { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-right: 92px; }
.card-panel.has-print > .card-head { padding-right: 96px; }
.card-title { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 17px/1.2 var(--title) !important; text-transform: none !important; letter-spacing: 0 !important; }
.card-title::after { content: none !important; }
.card-title .ic { width: 22px; height: 22px; margin: 0; color: var(--gold); }
.attention-panel .card-title .ic { color: #ff7a63; }
.card-count { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; border: 1px solid #e07a68; background: transparent; color: #ffb0a2; font: 400 13px/1 var(--race); white-space: nowrap; }
.card-count.is-zero { background: transparent; color: #8b97a3; border-color: #3a4a5c; }
.card-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border: 0; background: transparent; color: #5fd3dd; font: 600 13px/1 var(--title); white-space: nowrap; }
.card-link .ic { width: 15px; height: 15px; margin: 0; }
.card-link:hover { color: #9fe3e8; background: #ffffff08; }
.task-list, .attention-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.task-open { display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 4px; border: 0; border-bottom: 1px solid #ffffff10; border-radius: 0; background: transparent; color: var(--text); text-align: left; font: 500 13.5px/1.25 var(--title); }
.task-open:hover { background: #ffffff06; }
.task-icon { width: 20px; height: 20px; margin: 0; color: var(--gold); }
.is-pickup .task-icon { color: #5fd3dd; }
.task-when { color: #c9d2dc; white-space: nowrap; }
.task-when.is-today { color: #f2d29a; font-weight: 700; }
.case-chip { padding: 2px 8px; border-radius: 4px; background: #d6dbe1; color: #111; font: 700 12px/1.3 var(--title); }
.attention-list { gap: 8px; }
.attention-open { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid #ffffff12; border-left: 3px solid #d0553f; border-radius: 6px; background: #0c1218; color: var(--text); text-align: left; }
.attention-row.is-amber .attention-open { border-left-color: var(--warn); }
.attention-open:hover { background: #111a24; border-color: #ffffff22; }
.attention-car { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #1b232c; }
.attention-car .ic { width: 22px; height: 22px; margin: 0; color: #dfe5eb; }
.attention-text { display: grid; gap: 2px; font: 500 13px/1.25 var(--title); }
.attention-text strong { font-weight: 700; }
.attention-chevron { width: 18px; height: 18px; margin: 0; color: #a7b2be; }
.recent-table td { vertical-align: middle; }
.cell-art { width: 72px; }
.type-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: #1b232c; font: 500 12.5px/1 var(--title); }
.type-tag .ic { width: 15px; height: 15px; margin: 0; color: #c9d2dc; }
.row-more { min-height: 32px; min-width: 36px; padding: 0 8px; border: 0; background: transparent; color: #c9d2dc; font-size: 18px; letter-spacing: .1em; text-align: center; }
.row-more:hover { background: #ffffff0a; }
@media (max-width: 1100px) { .overview-split.is-cards { grid-template-columns: 1fr; } }
.overview-main { container-type: inline-size; }
@container (max-width: 760px) { .overview-split.is-cards { grid-template-columns: 1fr; } }
.card-panel.has-print > .print-btn { min-height: 30px; padding: 2px 8px; top: 12px; right: 12px; }
.card-panel.has-print > .print-btn .print-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.card-head, .card-panel.has-print > .card-head { padding-right: 48px; }
.card-title span:not(.card-count) { white-space: nowrap; }

/* GTA-style radar (abstract: quadrant = stage, radius = age) */
.overview-aside { display: grid; gap: 14px; }
.radar-panel { margin: 0; padding: 14px; }
.radar { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1d2a22 0%, #121b16 55%, #0a100c 100%);
  border: 3px solid #0b0f14; box-shadow: 0 0 0 2px #3a4a5c, 0 10px 24px #000a, inset 0 0 30px #000c; }
.radar-ring { position: absolute; left: 50%; top: 50%; border: 1px solid #6fbf8a33; border-radius: 50%; transform: translate(-50%, -50%); }
.radar-ring.r1 { width: 33%; height: 33%; } .radar-ring.r2 { width: 63%; height: 63%; } .radar-ring.r3 { width: 92%; height: 92%; }
.radar-axis { position: absolute; background: #6fbf8a26; }
.radar-axis.is-h { left: 4%; right: 4%; top: 50%; height: 1px; } .radar-axis.is-v { top: 4%; bottom: 4%; left: 50%; width: 1px; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #6fbf8a00 0deg, #6fbf8a00 300deg, #6fbf8a40 355deg, #9fe8b680 360deg);
  animation: radar-sweep 4s linear infinite; }
@keyframes radar-sweep { to { transform: rotate(360deg); } }
.radar-north { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: #0b0f14; color: #e9eef3; font: 700 10px/1 var(--title); box-shadow: 0 0 0 1px #6fbf8a66; }
.radar-quad { position: absolute; color: #9fbfa9; font: 600 9px/1 var(--title); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.radar-quad.q-nw { left: 20%; top: 22%; } .radar-quad.q-ne { right: 18%; top: 22%; } .radar-quad.q-se { right: 20%; bottom: 20%; } .radar-quad.q-sw { left: 18%; bottom: 20%; }
.radar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -60%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 12px solid #e9eef3; filter: drop-shadow(0 0 3px #000); }
.radar-blip { position: absolute; z-index: 2; width: 14px; height: 14px; min-height: 0; padding: 0; margin: 0; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid #0b0f14; box-shadow: 0 0 6px currentColor; cursor: pointer; color: #9fe3e8; background: currentColor; }
.radar-blip::before { content: ""; position: absolute; inset: -12px; }
.radar-blip:hover, .radar-blip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.radar-blip.is-new, .radar-dot.is-new { color: #9db7ff; }
.radar-blip.is-progress, .radar-dot.is-progress { color: #5fd3dd; }
.radar-blip.is-waiting, .radar-dot.is-waiting { color: #e0a445; }
.radar-blip.is-late, .radar-dot.is-late { color: #ff6b5e; }
.radar-blip.is-ready, .radar-dot.is-ready { color: #6bd36b; }
.radar-blip.is-late { animation: radar-pulse 1.4s ease-out infinite; }
@keyframes radar-pulse { 0% { box-shadow: 0 0 0 0 #ff6b5e99; } 100% { box-shadow: 0 0 0 12px #ff6b5e00; } }
.radar-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 0; padding: 0; list-style: none; font: 500 12px/1 var(--title); color: #c9d2dc; }
.radar-legend li { display: inline-flex; align-items: center; gap: 6px; }
.radar-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; }
.radar-note { margin: 8px 0 0; color: #a7b2be; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .radar-sweep, .radar-blip.is-late { animation: none; } }
@media print { .radar-sweep { display: none; } }

/* Small plates: closer to the real 520×114 mm ratio (~4.5:1). */
.plate-sm { height: 20px; border-width: 1.5px; border-radius: 3px; align-items: stretch; }
.plate-sm .plate-eu { gap: 0; padding: 0 3px; }
.plate-sm .plate-stars { width: 8px; height: 8px; }
.plate-sm .plate-country { font-size: 6.5px; line-height: 1; }
.plate-sm .plate-text { display: flex; align-items: center; padding: 0 7px; font-size: 12.5px; line-height: 1; letter-spacing: .06em; }

.radar-sweep { animation-duration: 9s; }

.radar { width: min(100%, 180px); margin: 0 auto; }
.radar-quad { font-size: 8px; letter-spacing: .1em; }
.radar-blip { width: 12px; height: 12px; }

.overview-widget { display: grid; gap: 8px; margin-top: 12px; }
.overview-widget > label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; font-size: 12px; }
.overview-widget > label select { flex: 1; min-width: 10rem; margin: 0; }
.overview-widget-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.overview-widget-list li, .overview-widget-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.overview-widget-list li { min-height: 30px; font-size: 13px; }
.overview-widget-list button { width: 100%; margin: 0; text-align: left; }
.overview-widget-list strong { flex: 0 0 auto; color: #d5dee6; background: transparent; }
.overview-widget-list .widget-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.overview-widget-list .widget-name .ic { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; color: #9fe7ee; }
.overview-widget-list .is-release .widget-name .ic { color: #f0c56a; }

.overview .page-hero { min-height: 0; margin-bottom: 12px; }
.overview .overview-aside { min-width: 0; }

.side-shell .shell-group[data-group="claims"] .shell-items { border-left-color: #354450; }
.side-shell .shell-group[data-group="claims"] .shell-group-toggle .ic { color: #a8b8c7; }
.side-shell .shell-group[data-group="claims"] .shell-item:not(.is-cta)[aria-current="page"] { background: #17323e; box-shadow: inset 2px 0 #65bac5; }
.shell-badge.is-missingDocuments:not(.is-zero) { color: #ffc48a; border-color: #e0a445; background: transparent; }
.shell-badge.is-reminding { outline: 2px solid #a9edf2; outline-offset: 2px; animation: documents-reminder 1.4s ease-in-out 4; }
@keyframes documents-reminder { 50% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .shell-badge.is-reminding { animation: none; } }
#message[data-tone="reminder"]:not(:empty) { background: #142e38; color: #e2faff; border-color: #65bac5; }
.contact-preferences { min-width: 0; border: 1px solid #405565; border-radius: 8px; padding: 10px 12px; }
.contact-preferences legend { padding: 0 5px; }
.contact-preferences p { margin: 4px 0 8px; }
.contact-options:not([hidden]) { display: grid; gap: 6px; }
.contact-preferences input[type="checkbox"] { accent-color: #58bfc8; flex: 0 0 auto; }
.email-preview { margin-top: 8px; }
.email-preview summary { cursor: pointer; }
.email-preview > p { white-space: pre-line; overflow-wrap: anywhere; }

body.has-shell header { min-height: 48px; padding-block: 7px; justify-content: flex-end; padding-inline: max(24px,calc((100% - 1760px)/2)); }
/* Staff panel uses the width beside the side menu on wide screens; the customer portal keeps the 1240px reading column. */
body.has-shell main, body.has-shell #message, body.has-shell .crumbs { max-width: 1760px; }
body.has-shell header > strong { display: none; }
.radar-panel .card-head { padding-right: 0; }
.radar { background: radial-gradient(circle, #1c4144, #0a1a20 72%); border-color: #507c77; }
.radar::after { border: 0; width: 4px; height: 4px; background: #afe8e2; border-radius: 50%; pointer-events: none; }
.radar-blip { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; background: #0b191e; box-shadow: 0 0 6px currentColor; }
.radar-blip::before { inset: 3px; border-radius: 50%; background: currentColor; }
.radar-blip:hover, .radar-blip:focus-visible { z-index: 3; }
.radar-blip.is-late { border-radius: 4px; }
.radar-readout { min-height: 32px; margin: 8px 0 0; color: #d9eff0; font-size: 12px; }
.readiness-battery { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 8px; margin: 12px 0; align-items: center; font-size: 12px; }
.readiness-battery progress { grid-column: 1/-1; width: calc(100% - 6px); height: 19px; appearance: none; accent-color: #70daca; border: 2px solid #7db9b3; border-radius: 4px; padding: 2px; position: relative; }
.readiness-battery progress::after { content:""; position:absolute; inset: 4px -6px 4px auto; width: 4px; background:#7db9b3; border-radius: 0 2px 2px 0; }
.readiness-battery progress::-webkit-progress-bar { background: #0e1b24; }
.readiness-battery progress::-webkit-progress-value { background: repeating-linear-gradient(90deg,#5ac9ba 0 16px,#152a31 16px 19px); transform-origin: left; animation: battery-charge .7s ease-out; }
@keyframes battery-charge { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .readiness-battery progress::-webkit-progress-value { animation: none; } }
.vehicle-brand { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #36515b; border-radius: 9px; background: #14232d; color: #e1eded; font-size: 11px; }
.vehicle-brand svg { width: 23px; height: 23px; fill: currentColor; }
.vehicle-concept { display: block; max-width: 100%; width: 320px; height: auto; transition: filter .2s; }
.plate-flag { width: 20px; height: 13px; }
.plate-sm .plate-flag { width: 14px; height: 9px; }
.plate[data-country="UK"], .plate[data-country="UK"] .plate-field { background: #f5cf42; }
.plate[data-country="UK"] .plate-field::placeholder { color: #655525; }
.client-marker { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.client-marker .ic { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; color: #b2ceef; }
.client-marker[data-type="company"] .ic { color: #b9aaf7; }
/* Wraps only between words: sections inherit overflow-wrap:anywhere, which split "Nieokreślony" mid-word. */
.type-tag { color: #d5dee7; background: #1d2935; border: 1px solid #415264; white-space: normal; overflow-wrap: normal; word-break: normal; line-height: 1.2; min-height: 28px; }
.type-tag .ic { color: inherit; flex: 0 0 15px; }
.type-tag[data-kind="oc_cesja"] { color: #c6e7ff; background: #172d45; border-color: #4e78a5; }
.type-tag[data-kind="ac"] { color: #dcd0ff; background: #2a2142; border-color: #7967a4; }
.type-tag[data-kind="private"] { color: #d7ebc6; background: #253327; border-color: #648274; }
.type-tag[data-kind="import"] { color: #fbe1c7; background: #392c26; border-color: #9b7359; }
.type-tag[data-kind="vancar_claim"] { color: #f5cce1; background: #3d2436; border-color: #925878; }
.type-tag[data-kind="cargo"] { color: #bfeee5; background: #193435; border-color: #4e8b8b; }
.register-incident { display: block; color: var(--muted); margin-top: 3px; }
/* Status labels never wrap (see .pill), so the 999px radius stays a capsule instead of a two-line circle. */
.data-table .pill { min-height: 28px; padding: 4px 11px 4px 9px; gap: 7px; border: 1px solid color-mix(in srgb,var(--mark,#6c7f93) 70%,transparent); color: #eef3f7; background: color-mix(in srgb,var(--mark,#6c7f93) 16%,#101820); font: 600 12.5px/1 var(--title); letter-spacing: .02em; }
.data-table .pill::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--mark,#6c7f93); box-shadow: 0 0 0 3px color-mix(in srgb,var(--mark,#6c7f93) 25%,transparent); }
.data-table .pill .ic { display: none; }
.register-wrap .kpi-icon, .kpi-row.is-six .kpi-icon { width: 30px; height: 30px; padding: 4px; border: 1px solid #40636f; border-radius: 7px; background: #122b36; color: #b3e6ee; }
.kpi-row.is-six [data-view="overdue"] .kpi-icon { color: #ffb3a5; background: #301f22; border-color: #855357; }
.kpi-row.is-six [data-view="missing_documents"] .kpi-icon { color: #ffe4a6; background: #342c1d; border-color: #867245; }
.overview-split.is-cards > section, .overview .recent-panel { min-width: 0; }
@media (max-width: 1100px) {
  .overview-split.is-cards { grid-template-columns: minmax(0,1fr); }
  .overview .card-head { flex-wrap: wrap; }
  .table-filters { grid-template-columns: minmax(0,1fr); }
  .contacts-table,.recent-table,.contacts-table tbody,.recent-table tbody { display: block; min-width: 0; }
  .contacts-table thead,.recent-table thead,.recent-table tbody > tr:first-child:has(th) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .contacts-table tr,.recent-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 3px 10px; padding: 8px 0; border-bottom: 1px solid var(--line-strong); }
  .contacts-table td,.recent-table td { min-width: 0; border: 0; padding: 5px 2px; white-space: normal; overflow-wrap: anywhere; }
  .contacts-table td:first-child,.recent-table td[colspan],.contacts-table td[colspan] { grid-column: 1 / -1; }
  .contacts-table td[data-label]::before,.recent-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; margin-bottom: 3px; }
  .recent-table td.cell-art { width: auto; }
  .cell-vehicle,.cell-person { min-width: 0; }
  .cell-person > div,.cell-vehicle-text { min-width: 0; }
  .card-title { min-width: 0; }
}

.document-reminder-setting[hidden] { display: none; }
.document-reminder-setting:not([hidden]) { display: flex; align-items: center; margin: 0 0 10px; }
@media (max-width: 899px) { body.has-shell header { justify-content: flex-start; } }

.repair-week-nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:12px; }
.repair-week-nav button { margin:0; }
.repair-week-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-top:14px; }
.repair-day { min-width:0; padding:9px; border:1px solid var(--line); border-radius:7px; background:#101a24; }
.repair-day[data-today="true"] { border-color:#65bac5; }
.repair-day h3 { font-size:14px; text-transform:capitalize; }
.repair-day p { font-size:12px; }
.repair-slot { display:grid; gap:3px; width:100%; margin:0 0 6px; padding:6px; text-align:left; overflow-wrap:anywhere; }
.repair-slot small { color:var(--muted); font-weight:400; }
@media (max-width:1200px) { .repair-week-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:600px) { .repair-week-grid { grid-template-columns:minmax(0,1fr); } }

.register-fleet-bar { display:flex; flex-wrap:wrap; align-items:end; gap:8px 12px; margin-bottom:12px; }
.register-fleet-bar label { flex:1 1 220px; max-width:420px; }
.register-fleet-bar button { margin:0; }
.vehicle-fleet { color:#a6d6e0; font-size:11px; white-space:normal; }
.fleet-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:12px; }
.fleet-card { min-width:0; margin:0; padding:16px; border-radius:8px; }
.fleet-card button { margin:5px 8px 0 0; }
.fleet-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(85px,1fr)); gap:8px; }
.fleet-metrics div { border-top:1px solid var(--line-strong); padding-top:6px; }
.fleet-metrics dt { color:var(--muted); font-size:11px; }
.fleet-metrics dd { margin:0; color:#d6f2f6; font:400 25px var(--race); }
.fleet-vehicle-name { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.fleet-vehicle-name h3 { margin:0; }

.staff-account-list { display:grid; gap:5px; }
.staff-account-row { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.staff-account-row > div { flex:1 1 140px; min-width:0; overflow-wrap:anywhere; }
.staff-account-row small { display:block; color:var(--muted); }
.staff-account-row button { margin:0; }
.account-state { padding:3px 8px; border:1px solid var(--line-strong); border-radius:16px; font-size:12px; color:var(--muted); }
.account-state.is-active { border-color:#54856c; color:#b3efca; }
.workshop-kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); }
.workshop-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:10px; }
.workshop-alert { min-width:0; margin:0; }

.plate-ocr { margin:0; padding:8px 10px; border:1px solid var(--line-strong); border-radius:6px; }
.plate-ocr > summary { cursor:pointer; color:#b3e6ee; font-size:13px; font-weight:700; }
.plate-ocr > p { margin:8px 0; font-size:12px; }
.plate-ocr-review:not([hidden]) { display:grid; gap:8px; margin-top:8px; }
.plate-ocr button { justify-self:start; margin:0; }

.plate-ocr > label + label { margin-top:8px; }

/* Damage map: legend for the zone tint drawn on the 3D model (colours match ZONE_TINT in blips.js). */
.car3d-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 2px; color: #c9d2dc; font: 500 12.5px/1.2 var(--title); }
.car3d-legend span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.03); transition: background 140ms ease; }
.car3d-legend span:hover { background: rgba(255,255,255,0.08); }
.car3d-legend span::before { content: ""; width: 14px; height: 10px; border: 2px solid var(--tone); border-radius: 3px; background: color-mix(in srgb, var(--tone) 35%, transparent); box-shadow: 0 0 8px var(--tone); }
.car3d-legend [data-tone="light"] { --tone: #ff9a2e; }
.car3d-legend [data-tone="heavy"] { --tone: #ff4438; }
.car3d-legend [data-tone="done"] { --tone: #4fd18b; }
.car3d-legend [data-tone="known"] { --tone: #8f9eff; }
.car3d-legend [data-tone="focus"],
.car3d-legend [data-tone="seam"] { --tone: #2ee6d6; }
.car3d-stage[data-state="error"] ~ .car3d-legend { display: none; }
/* Legend labels for screen readers */
.car3d-legend span::after { content: attr(data-tone); }
/* Mechanics mode lists systems instead of body zones: wrap the longer names in an even grid. */
.zone-strip.is-systems { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.zone-strip.is-systems button { grid-column: auto; }
.zone-strip.is-parts { display: grid; grid-template-columns: minmax(0, 1fr); }
.part-group { display: grid; gap: 6px; }
.part-group > p { margin: 0; color: #c9d2dc; font: 600 12.5px/1.2 Bahnschrift, "Segoe UI", Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.part-group > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.damage-board .zone-strip.is-parts button { justify-content: flex-start; text-align: left; gap: 8px; min-height: 44px; }
.part-glyph { width: 28px; height: 28px; flex: 0 0 28px; margin: 0; stroke: currentColor; fill: none; color: #9aefff; }
.part-glyph.is-flip { transform: scaleX(-1); }
.part-glyph.is-added, .zone-btn.is-added .part-glyph { color: #9db7ff; }
.zone-btn.is-added { color: #d5e2ff; }
.zone-strip.is-parts .zone-badge { margin-left: auto; }
.zone-strip.is-parts .zone-btn[data-count="0"] .zone-badge { visibility: hidden; }
.damage-sheet-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.damage-sheet-title h3 { min-width: 0; }
@media (max-width: 520px) {
  .damage-modes { grid-template-columns: minmax(0, 1fr); }
}

/* Type scale. Informational text stays at least 12px. Inputs stay 16px on narrow screens so iOS does not zoom.
   Display sizes are capped so a 2560px window does not enlarge headings with the viewport. */
body { font-size: 14px; line-height: 1.45; }
input, textarea, select { font-size: 14px; }
/* h1, h2, h3: zdefiniowane wyżej (Impact/Bahnschrift, var(--font-title), clamp). */
.login-panel h1 { font-size: 26px; }
/* header strong: zdefiniowane wyżej (34px, Impact, font-weight: 900). */
button { min-height: 40px; padding: 8px 12px; }
/* .page-hero h1: zdefiniowane wyżej (italic 800, clamp(30px,4vw,48px)). */
.claim-list button { font-size: 15px; }
.kpi-value { font-size: 24px; }
.fleet-metrics dd { font-size: 20px; }
.case-vehicle, .damage-list li { font-size: 15px; }
.clock-tile strong, .tron-status, .drawer-close { font-size: 16px; }
.drawer form > button[type="submit"] { min-height: 42px; font-size: 15px; }
input.plate-field, .plate-lg input.plate-field { font-size: 22px; }
.claim-heading .muted, .damage-hint, .damage-ledger-note, section > p { max-width: 78ch; }
main form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px 14px;
  align-items: end;
}
main form > button,
main form > p,
main form > .muted,
main form > div,
main form > fieldset,
main form > section,
main form label:has(textarea) { grid-column: 1 / -1; }
main form > button { justify-self: start; width: auto; min-width: min(100%, 240px); }
.login-panel form { grid-template-columns: minmax(0, 1fr); }
.login-panel form > button { width: 100%; justify-self: stretch; min-width: 0; }
@media (min-width: 1680px) {
  body.has-shell main, body.has-shell #message, body.has-shell .crumbs { max-width: 1600px; }
  .overview-split.is-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .claim-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); }
  .workshop-results { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
}
@media (max-width: 720px) {
  main form { grid-template-columns: minmax(0, 1fr); }
  input, textarea, select { font-size: 16px; }
  /* h1, header strong, header span: zdefiniowane wyżej (responsywne clamp i stałe rozmiary). */
  header span { font-size: 12px; max-width: none; }
  .kpi-value { font-size: 20px; }
  .kpi-row, .kpi-row.is-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main section { padding: 12px; }
  /* .damage-sheet h3: zdefiniowane wyżej (var(--fs-2xl)). */
}

/* Overview counts keep a stable meaning: teal = open work, gold = new, red = late, amber = missing papers.
   A zero stays quiet so an empty late count does not look like an alarm. */
.kpi-tile.is-teal::after { background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: .95; }
.kpi-tile.is-gold::after { background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .95; }
.kpi-tile.is-ok::after { background: linear-gradient(90deg, transparent, var(--ok), transparent); opacity: .95; }
.kpi-tile.is-teal .kpi-icon { color: #7ee7ef; }
.kpi-tile.is-gold .kpi-icon { color: #f0c56a; }
.kpi-tile.is-ok .kpi-icon { color: #8ed9a8; }
.kpi-tile.is-amber .kpi-icon { color: #ffb15a; }
.kpi-tile.is-red .kpi-icon { color: #ff9a85; }
.kpi-tile.is-teal .kpi-value { color: #b7f4f8; }
.kpi-tile.is-gold .kpi-value { color: #ffe3ad; }
.kpi-tile.is-ok .kpi-value { color: #b6ebc8; }
.kpi-tile.is-amber .kpi-value { color: #ffc48a; }
.kpi-tile.is-red .kpi-value { color: #ffc2b4; }
.kpi-tile.is-zero .kpi-value { color: #c5ced6; }
.kpi-tile.is-zero.is-red .kpi-icon,
.kpi-tile.is-zero.is-amber .kpi-icon { opacity: .55; }
.kpi-tile.is-zero.is-red::after,
.kpi-tile.is-zero.is-amber::after { opacity: .35; }
.kpi-tile[aria-pressed="true"] { border-color: #f4f7fb; box-shadow: inset 0 0 0 1px #ffffff55; }
.shell-badge.is-missingDocuments:not(.is-zero) { border-color: #e0a445; background: transparent; color: #ffc48a; }
.print-btn { color: #ffe3ad; border-color: #c4923e; background: #1a150e; }
.print-btn .ic { color: #f0c56a; }
.print-btn:hover { color: #fff6e4; border-color: #f0c56a; background: #2a2114; }
.chart-panel > h2 { color: #d8f6f8; }
.chart-panel > h2::after { color: #5fd3dd; }
.chart-axis { fill: #d5f3f6; }
.chart-line { stroke: #7ee7ef; stroke-width: 2.5; }
.chart-area { fill: #7ee7ef2e; }
.chart-dot { fill: #ffe3ad; stroke: #0c1117; }
.card-count { background: transparent; }
.fleet-metrics dd { color: #b7f4f8; }

.page-hero.has-photo {
  min-height: 148px;
  margin: 0 0 16px;
  padding: 22px 22px 18px;
  border: 1px solid #1c3c44;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #070b10 0%, #070b10f2 34%, #070b1088 58%, #070b1030 100%),
    var(--hero-photo) right center / cover no-repeat;
}
.page-hero.has-photo h1,
.page-hero.has-photo .hero-sub,
.page-hero.has-photo .hero-actions { position: relative; z-index: 1; }
.page-hero.has-photo .hero-sub { color: #c5d4de; max-width: 42rem; }
.kpi-tile.is-new::after { background: linear-gradient(90deg, transparent, #7aa2ff, transparent); opacity: .95; }
.kpi-tile.is-new .kpi-icon { color: #9db7ff; }
.kpi-tile.is-new .kpi-value { color: #d5e2ff; }
.kpi-tile.is-zero.is-new .kpi-icon { opacity: .55; }
.kpi-tile.is-zero.is-new::after { opacity: .35; }
.plate.has-frame {
  border-color: var(--plate-frame, #1fa3b0);
  box-shadow: 0 0 0 1px var(--plate-frame, #1fa3b0), 0 6px 16px #0007;
}
.report-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  margin: 0;
}
.report-mark { display: flex; }
.report-card .vehicle-brand { width: 52px; height: 52px; }
.report-card .vehicle-brand svg { width: 32px; height: 32px; }
.report-card h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 15px; }
.report-card-body { min-width: 0; }
.report-card-body p { margin: 0 0 6px; }
.report-card-body button { margin: 4px 8px 0 0; }
.fleet-register .panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.fleet-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.fleet-actions button { margin: 0; }
.fleet-table :is(td, th) { white-space: normal; overflow-wrap: anywhere; }
.fleet-table tbody th { color: var(--text); }
.fleet-cell-label { display: none; }
@media screen and (max-width: 1100px) {
  .fleet-table, .fleet-table tbody { display: block; min-width: 0; }
  .fleet-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .fleet-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding-block: 10px; }
  .fleet-table tbody tr + tr { border-top: 1px solid var(--line); }
  .fleet-table tbody :is(th, td) { display: block; padding: 4px 0; border: 0; }
  .fleet-table tbody :is(th, .fleet-actions, .empty-state) { grid-column: 1 / -1; }
  .fleet-table tbody th { background: none; }
  .fleet-table tbody .fleet-actions { display: flex; }
  .fleet-cell-label { display: block; color: var(--muted); font-size: var(--fs-xs); }
}
@media (max-width: 720px) {
  .page-hero.has-photo { min-height: 112px; padding: 16px; background-position: 72% center; }
}
@media print {
  .page-hero.has-photo { background: none !important; border: 0; padding: 0; min-height: 0; }
}
.edge-rail {
  display: none;
  position: fixed;
  z-index: 24;
  top: 50%;
  right: 0;
  width: 64px;
  transform: translateY(-50%);
  flex-direction: column;
  gap: 8px;
  padding: 8px 18px 8px 6px;
  background: transparent;
  pointer-events: none;
}
.edge-link {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #2a3c4c;
  border-radius: 10px;
  background: #0c121acc;
  color: #9db7c4;
}
.edge-link .ic { width: 18px; height: 18px; margin: 0; }
.edge-link[aria-current="page"] { color: #d5e2ff; border-color: #7aa2ff; box-shadow: inset 0 0 0 1px #7aa2ff; }
@media (min-width: 1101px) {
  body.has-shell.has-edge { padding-right: 64px; }
  body.has-shell.has-edge .edge-rail { display: flex; }
}
@media (max-width: 1100px) {
  .edge-rail { display: none !important; }
  body.has-edge { padding-right: 0; }
}

/* ==========================================================================================
   Responsywność — cele dotykowe, breakpointy mobilne, układy 375/768/1024
   ========================================================================================== */

/* Cele dotykowe minimum 44×44 px dla wszystkich interaktywnych elementów (WCAG 2.5.5). */
@media (max-width: 768px) {
  button,
  input,
  select,
  textarea,
  .btn,
  .form-control,
  .form-select,
  .damage-mode,
  .car3d-bodies button,
  .car3d-paint button,
  .zone-btn,
  .view-chip,
  .kind-filters button,
  .shell-item,
  .shell-group-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Mobile 375px — pojedyncza kolumna, kompaktowe nagłówki, mniejszy 3D stage. */
@media (max-width: 375px) {
  header { padding: 12px 16px; gap: 12px; min-height: 72px; }
  header strong { font-size: 26px; }
  header span { font-size: 10px; letter-spacing: .08em; }
  main, #message { margin-top: 20px; padding: 0 12px; }
  .page-hero { padding: var(--space-4); min-height: 100px; margin-bottom: var(--space-4); }
  .page-hero h1 { font-size: clamp(22px, 9vw, 30px); }
  .hero-sub { font-size: 10px; letter-spacing: .14em; }
  .car3d-stage { height: 240px; }
  .damage-modes { grid-template-columns: minmax(0, 1fr); }
  .damage-fields { grid-template-columns: minmax(0, 1fr); }
  .damage-editor > button { justify-self: stretch; width: 100%; }
  .kpi-row { grid-template-columns: 1fr; gap: var(--space-3); }
  .claim-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .claim-list .row { padding: 12px 8px; }
  .empty-state { padding: var(--space-8) var(--space-4); }
}

/* Tablet 768px — dwie kolumny gdzie to możliwe, większy 3D stage. */
@media (min-width: 376px) and (max-width: 768px) {
  .car3d-stage { height: 300px; }
  .damage-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .workspace-nav button { flex: 1 1 auto; font-size: var(--fs-sm); }
}

/* Desktop 1024px+ — pełny układ, side shell, edge rail. */
@media (min-width: 769px) {
  .page-hero { min-height: 140px; }
  .car3d-stage { height: 380px; }
}

/* Pasek boczny na mobile — overlay, nie sidebar. */
@media (max-width: 899px) {
  body.has-shell, body.has-shell.shell-collapsed { padding-left: 0; }
  body.has-shell .side-shell {
    width: min(88vw, 300px);
    transform: translateX(-102%);
    transition: transform 200ms ease;
  }
  body.has-shell .side-shell.is-open { transform: none; }
  body.shell-collapsed .side-shell { width: min(88vw, 300px); }
  body.shell-collapsed .side-shell .shell-label,
  body.shell-collapsed .side-shell .shell-chevron,
  body.shell-collapsed .side-shell .shell-items,
  body.shell-collapsed .side-shell .shell-sub,
  body.shell-collapsed .side-shell .shell-user { display: revert; }
  body.shell-collapsed .shell-items:not([hidden]) { display: block; }
  .side-shell .shell-collapse { display: none; }
  .shell-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: #000000a8;
  }
  body.has-shell .shell-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    margin-right: 12px;
    font: 600 var(--fs-xs)/1 var(--font-title);
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .shell-bars {
    width: 16px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -5px currentColor, 0 5px currentColor;
  }
  body.has-shell header { justify-content: flex-start; }
  body.has-shell header span { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .side-shell, .shell-chevron { transition: none !important; }
}

/* KPI tiles na mniejszych ekranach. */
@media (max-width: 1200px) {
  .kpi-row.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpi-row.is-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Redukcja ruchu — wyłącz animacje gdy użytkownik tak woli. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  button:active:not(:disabled) { transform: none; }
  .next-line, .case-card, .clock-tile { transition: none; }
}
@media print {
  .edge-rail { display: none !important; }
  body.has-shell.has-edge { padding-right: 0 !important; }
}
.fleet-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.fleet-tabs button { margin: 0; }
.fleet-tabs button[aria-selected="true"] { color: #d5e2ff; border-color: #7aa2ff; box-shadow: inset 0 0 0 1px #7aa2ff; }
.vehicle-photo { display: block; max-width: min(100%, 320px); height: auto; margin-top: 8px; border: 1px solid #2a3c4c; }
.damage-desk { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.damage-tree, .damage-stage { margin: 0; min-width: 0; }
.damage-tree-list { display: grid; gap: 6px; max-height: min(70vh, 820px); overflow: auto; }
.damage-tree-item { display: grid; gap: 2px; width: 100%; margin: 0; text-align: left; }
.damage-tree-item small { color: var(--muted); font-size: 12px; font-weight: 500; }
.damage-tree-item[aria-selected="true"] { border-color: #7aa2ff; box-shadow: inset 3px 0 #7aa2ff; }
.damage-stage .row { margin-bottom: 12px; }
@media (max-width: 980px) {
  .damage-desk { grid-template-columns: minmax(0, 1fr); }
  .damage-tree-list { max-height: 280px; }
}
.mail-screen { display: grid; gap: 12px; }
.mail-screen textarea { width: 100%; min-height: 120px; }

/* ==========================================================================================
   Komponenty UI — spójny system przycisków, pól formularza, kart, paneli i alertów
   ========================================================================================== */

/* ── Przyciski ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font: var(--fw-semibold) var(--fs-md)/1.25 var(--font-sans);
  letter-spacing: var(--ls-normal);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.btn:hover:not(:disabled) {
  background: var(--color-surface-3);
  border-color: var(--color-accent);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  fill: none;
}

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #1a1205;
  font-weight: var(--fw-bold);
}
.btn-primary:hover:not(:disabled) {
  background: #ffc04d;
  box-shadow: 0 3px 18px rgba(245, 166, 35, 0.3);
}
.btn-primary:focus-visible {
  outline-color: var(--color-accent);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-line);
  color: var(--color-text);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface-3);
  border-color: var(--color-neon);
}

.btn-danger {
  background: transparent;
  border-color: var(--color-bad);
  color: var(--color-bad);
}
.btn-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-bad) 12%, transparent);
  border-color: var(--color-bad);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-muted);
  padding: 0 10px;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--color-surface-3);
  color: var(--color-text);
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: var(--fs-sm);
}
.btn-md {
  min-height: 40px;
  padding: 0 16px;
  font-size: var(--fs-md);
}
.btn-lg {
  min-height: 48px;
  padding: 0 24px;
  font-size: var(--fs-lg);
}

/* ── Pola formularza ─────────────────────────────────────────────────── */
.form-group {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font: var(--fw-semibold) var(--fs-sm)/1.25 var(--font-sans);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-muted);
}

.form-hint {
  font: var(--fs-sm)/1.4 var(--font-sans);
  color: var(--color-muted);
}

.form-error {
  font: var(--fs-sm)/1.4 var(--font-sans);
  color: var(--color-bad);
  margin-top: var(--space-1);
}

.form-control {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font: var(--fs-md)/1.45 var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control::placeholder {
  color: #8d9cad;
  opacity: 1;
}
.form-control:focus {
  border-color: var(--color-neon);
  box-shadow: 0 0 0 1px var(--color-neon);
  outline: none;
}
.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--color-surface-2);
}
.form-control.error {
  border-color: var(--color-bad);
}
.form-control.error:focus {
  box-shadow: 0 0 0 1px var(--color-bad);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath stroke='%23c5ceda' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  padding-right: 32px;
}
.form-select::-ms-expand {
  display: none;
}

.form-textarea {
  min-height: 114px;
  resize: vertical;
  font-family: var(--font-sans);
}

.form-fieldset {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--color-surface-2);
}
.form-fieldset legend {
  padding: 0 var(--space-2);
  font: var(--fw-semibold) var(--fs-sm)/1.25 var(--font-sans);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-muted);
  width: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   KREDO Vehicle Picker — dynamiczny formularz wyboru pojazdu (Car2DB + CEPiK)
   ───────────────────────────────────────────────────────────────────────── */
.vehicle-picker { display: grid; gap: var(--space-4); }
.vehicle-picker .form-group { display: grid; gap: var(--space-1); }
.vehicle-picker .form-label {
  font: var(--fw-semibold) var(--fs-xs)/1.2 var(--font-title);
  letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--color-muted);
}
.vehicle-specs { min-height: 48px; }
.vehicle-specs .spec-list { display: grid; gap: var(--space-2); margin: 0; }
.vehicle-specs .spec-row {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr);
  gap: var(--space-3); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface-2);
}
.vehicle-specs .spec-row dt { font-weight: var(--fw-semibold); color: var(--color-neon); }
.vehicle-specs .spec-row dd { margin: 0; color: var(--color-text); font-variant-numeric: tabular-nums; }
.vehicle-manual {
  border: 1px dashed var(--color-line); border-radius: var(--radius-md);
  padding: var(--space-3); background: color-mix(in srgb, var(--color-accent) 4%, transparent);
}
.vehicle-manual summary { cursor: pointer; font-weight: var(--fw-semibold); color: var(--color-muted); }
.vehicle-manual .form-group { margin-top: var(--space-3); }
.vehicle-picker .search-results { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: var(--space-1); }
.vehicle-picker .search-results li { margin: 0; }
@media (max-width: 640px) {
  .vehicle-specs .spec-row { grid-template-columns: 1fr; }
}

/* ── Karty ───────────────────────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: var(--space-4) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--color-line);
}
.card-body {
  padding: var(--space-4);
  flex: 1;
}
.card-footer {
  padding: var(--space-2) var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-line);
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* ── Panele ──────────────────────────────────────────────────────────── */
.panel {
  position: relative;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #121a23 0%, #0d131a 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}
.panel-body {
  padding: var(--space-4);
}

/* ── Alerty ──────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  font: var(--fs-md)/1.45 var(--font-sans);
}
.alert-success {
  background: color-mix(in srgb, var(--color-ok) 15%, transparent);
  border: 1px solid var(--color-ok);
  color: var(--color-text);
}
.alert-warning {
  background: color-mix(in srgb, var(--color-warn) 15%, transparent);
  border: 1px solid var(--color-warn);
  color: var(--color-text);
}
.alert-error {
  background: color-mix(in srgb, var(--color-bad) 15%, transparent);
  border: 1px solid var(--color-bad);
  color: var(--color-text);
}
.alert-info {
  background: color-mix(in srgb, var(--color-neon) 15%, transparent);
  border: 1px solid var(--color-neon);
  color: var(--color-text);
}

/* ── Ładowanie / szkielety ───────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-line);
  border-top-color: var(--color-neon);
  border-radius: 50%;
  animation: spinner-spin 0.8s linear infinite;
}
@keyframes spinner-spin { to { transform: rotate(360deg); } }

.skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-surface-3) 50%, var(--color-surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.handover-logout {
  width: min(28rem, calc(100% - 2rem));
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--color-text);
  background: var(--color-surface-2);
}
.handover-logout::backdrop { background: rgb(0 0 0 / .56); }
.handover-logout h2 { margin-top: 0; }

@media (min-width: 769px) {
  :is(.register-table, .contacts-table) .table-reveal {
    display: block;
    min-width: 0;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .register-table .table-reveal { max-width: 8rem; }
  .contacts-table td:is(.cell-ids, .cell-reach) { display: table-cell; }
  .contacts-table td:is(.cell-ids, .cell-reach) > span { display: block; }
  .contacts-table .cell-reach .table-reveal { max-width: 11rem; }
  :is(.register-table, .contacts-table) .table-reveal:focus,
  .contacts-table .cell-reach .table-reveal:focus {
    white-space: normal;
    overflow-wrap: anywhere;
    outline-offset: -2px;
  }
  .contacts-table .cell-person { min-width: 0; }
  .contacts-table .cell-person > div { min-width: 0; }
  .contacts-table .cell-person .muted { overflow-wrap: anywhere; }
  .contacts .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .contacts .contact-create { max-width: 42rem; }
}
@media (min-width: 1380px) {
  .contacts .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(17rem, .35fr); }
}
/* ── Tabele ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font: var(--fw-semibold) var(--fs-xs)/1.25 var(--font-sans);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface-2);
}
.data-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text);
  font: var(--fs-md)/1.45 var(--font-sans);
}
.data-table tr:hover td {
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
}

/* ── Body panel inspector (mockup layout, 2026-11-27) ─────────────────────────────────────────────
   Tokens from the inspector brief. Orange is the selection only; damage uses the danger red. */
.damage-map {
  --viewer-bg: #06121e; --viewer-surface: #0c1c2a; --viewer-border: #244354; --viewer-cyan: #00ddf5;
  --viewer-active: #ff8b26; --viewer-text: #f1f6fa; --viewer-muted: #a8bbcb; --viewer-danger: #ff4d67; --viewer-ok: #4fd18b;
}
.car3d.is-inspector { display: grid; gap: 10px; container: insp / inline-size; }
.insp-head { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 14px; border: 1px solid var(--viewer-cyan); border-radius: 10px; background: var(--viewer-surface); box-shadow: 0 0 14px rgba(0,221,245,.18); }
.insp-head h3 { margin: 0; text-align: left; width: 100%; color: var(--viewer-text); font: 700 22px/1.15 var(--title, Bahnschrift, "Segoe UI", sans-serif); letter-spacing: .02em; }
.insp-en { margin: 0; color: var(--viewer-cyan); font: 600 12px/1.3 Bahnschrift, "Segoe UI", sans-serif; letter-spacing: .28em; text-transform: uppercase; }
.car3d-legend.insp-legend span { padding: 4px 8px; }
.car3d-legend.insp-legend span::after { content: none; }
.car3d-legend.insp-legend b { font-weight: 600; color: var(--viewer-text); }
.car3d-legend.insp-legend small { color: var(--viewer-muted); font-size: 11px; }
.car3d-legend.insp-legend [data-tone="pick"] { --tone: var(--viewer-active); }
.car3d-legend.insp-legend [data-tone="seam"] { --tone: var(--viewer-cyan); }
.car3d-legend.insp-legend [data-tone="light"] { --tone: #ff8a3d; }
.car3d-legend.insp-legend [data-tone="heavy"] { --tone: var(--viewer-danger); }
.car3d-legend.insp-legend [data-tone="done"] { --tone: var(--viewer-ok); }
.insp-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.insp-tools button { min-height: 44px; padding: 6px 14px; border: 1px solid var(--viewer-border); border-radius: 8px; background: var(--viewer-surface); color: var(--viewer-text); font: 600 13px/1 Bahnschrift, "Segoe UI", sans-serif; cursor: pointer; }
.insp-tools button[aria-pressed="true"] { border-color: var(--viewer-cyan); box-shadow: inset 0 -2px var(--viewer-cyan); }
.insp-tools button[hidden] { display: none; }
.insp-tools button:focus-visible, .insp-label:focus-visible, .part-card:focus-visible, .insp-views button:focus-visible { outline: 2px solid var(--viewer-cyan); outline-offset: 2px; }
.insp-viewport { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.insp-scene { position: relative; min-width: 0; }
.insp-scene .car3d-stage { width: 100%; height: clamp(280px, 56cqw, 560px); background: radial-gradient(ellipse 80% 70% at 50% 42%, #10283a 0%, var(--viewer-bg) 62%, #040a12 100%); }
.insp-callouts { position: absolute; inset: 0; pointer-events: none; transition: opacity 140ms ease; }
.insp-callouts.is-moving { opacity: 0; }
.insp-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.insp-leaders polyline { fill: none; stroke: var(--viewer-cyan); stroke-width: 1.4; opacity: .85; }
.insp-leaders circle { fill: var(--viewer-bg); stroke: var(--viewer-cyan); stroke-width: 2; }
.insp-leaders .is-damaged { stroke: var(--viewer-danger); }
.insp-leaders .is-active { stroke: var(--viewer-active); opacity: 1; }
.insp-label { position: absolute; display: grid; gap: 1px; max-width: 176px; min-height: 36px; padding: 5px 10px; pointer-events: auto; text-align: left; border: 1px solid var(--viewer-cyan); border-radius: 8px; background: rgba(12, 28, 42, .92); color: var(--viewer-text); cursor: pointer; box-shadow: 0 0 10px rgba(0,221,245,.18); }
.insp-label b { font: 600 13px/1.2 Bahnschrift, "Segoe UI", sans-serif; }
.insp-label small { color: var(--viewer-muted); font: 11px/1.2 Bahnschrift, "Segoe UI", sans-serif; }
.insp-label.is-damaged { border-color: var(--viewer-danger); }
.insp-label.is-damaged b::after { content: " ●"; color: var(--viewer-danger); }
.insp-label.is-active { border-color: var(--viewer-active); background: rgba(48, 26, 6, .94); box-shadow: 0 0 14px rgba(255,139,38,.45); }
.insp-notice { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: calc(100% - 24px); padding: 8px 12px; border: 1px solid var(--viewer-active); border-radius: 8px; background: rgba(12, 28, 42, .95); color: var(--viewer-text); font: 13px/1.3 Bahnschrift, "Segoe UI", sans-serif; }
.insp-notice[hidden] { display: none; }
.insp-notice button { min-height: 36px; padding: 4px 10px; border: 1px solid var(--viewer-active); border-radius: 6px; background: transparent; color: var(--viewer-text); cursor: pointer; }
.car3d-presets.insp-views { display: flex; gap: 6px; overflow-x: auto; padding: 8px; border: 1px solid var(--viewer-border); border-radius: 10px; background: var(--viewer-surface); }
.car3d-presets.insp-views { scroll-snap-type: x proximity; scrollbar-width: thin; }
.car3d-presets.insp-views > button { scroll-snap-align: start; }
.car3d-presets.insp-views[data-more] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.insp-views-title { display: none; margin: 0 0 4px; color: var(--viewer-text); font: 700 14px/1.2 Bahnschrift, "Segoe UI", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.insp-views-title span { display: block; color: var(--viewer-cyan); font-size: 11px; letter-spacing: .24em; }
.damage-board .car3d-presets.insp-views button { flex: 0 0 auto; width: auto; justify-content: start; display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 48px; padding: 6px 10px; text-align: left; border-color: var(--viewer-border); }
.insp-views .view-glyph { grid-row: 1 / 3; width: 34px; height: 26px; color: var(--viewer-cyan); }
.insp-views .view-glyph.is-flip { transform: scaleX(-1); }
.insp-views .view-name { font: 600 13px/1.15 Bahnschrift, "Segoe UI", sans-serif; color: var(--viewer-text); }
.insp-views .view-en { font: 11px/1.15 Bahnschrift, "Segoe UI", sans-serif; color: var(--viewer-muted); text-transform: none; letter-spacing: 0; }
.damage-board .car3d-presets.insp-views button[aria-pressed="true"] { border-color: var(--viewer-active); background: rgba(255,139,38,.12); box-shadow: 0 0 12px rgba(255,139,38,.35); }
.insp-views button[aria-pressed="true"] .view-glyph, .insp-views button[aria-pressed="true"] .view-en { color: var(--viewer-active); }
.zone-strip.is-parts { gap: 8px; }
.insp-catalog-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.insp-catalog-title { margin: 0; color: var(--viewer-text); font: 700 15px/1.2 Bahnschrift, "Segoe UI", sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.insp-catalog-title span { margin-left: 6px; color: var(--viewer-muted); font-size: 11px; letter-spacing: .12em; }
.insp-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.insp-tabs button { min-height: 36px; padding: 4px 10px; border: 1px solid var(--viewer-border); border-radius: 6px; background: transparent; color: var(--viewer-muted); font: 600 12px/1 Bahnschrift, "Segoe UI", sans-serif; cursor: pointer; }
.insp-tabs button[aria-pressed="true"] { border-color: var(--viewer-cyan); color: var(--viewer-text); }
.insp-catalog { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 168px); gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.damage-board .zone-strip.is-parts .part-card { scroll-snap-align: start; display: grid; grid-template-columns: 1fr; justify-items: start; align-content: start; gap: 3px; min-height: 104px; padding: 10px; text-align: left; border-radius: 10px; border-color: var(--viewer-border); background: var(--viewer-surface); }
.part-card .part-glyph { width: 30px; height: 30px; flex-basis: auto; }
.part-card .part-name { color: var(--viewer-text); font: 600 13px/1.2 Bahnschrift, "Segoe UI", sans-serif; }
.part-card .part-en { color: var(--viewer-muted); font: 11px/1.2 Bahnschrift, "Segoe UI", sans-serif; }
.part-card .part-state { margin-top: auto; color: var(--viewer-muted); font: 600 11.5px/1.2 Bahnschrift, "Segoe UI", sans-serif; }
.part-card.is-late .part-state { color: var(--viewer-danger); }
.part-card.is-ready .part-state { color: var(--viewer-ok); }
.damage-board .zone-strip.is-parts .part-card.is-active { border-color: var(--viewer-active); box-shadow: inset 0 0 0 1px var(--viewer-active), 0 0 12px rgba(255,139,38,.35); }
.part-card.is-active .part-glyph { color: var(--viewer-active); }
.insp-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 6px 0 2px; font: 13px/1.35 Bahnschrift, "Segoe UI", sans-serif; }
.insp-facts dt { color: var(--viewer-muted); }
.insp-facts dd { margin: 0; color: var(--viewer-text); overflow-wrap: anywhere; }
.damage-add { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 8px; }
@container insp (min-width: 900px) {
  .insp-viewport { grid-template-columns: minmax(0, 1fr) 196px; }
  .car3d-presets.insp-views { flex-direction: column; overflow: visible; }
  .insp-views-title { display: block; }
  .damage-board .car3d-presets.insp-views button { width: 100%; }
}
.car3d-staff .insp-head { border-color: var(--viewer-border); box-shadow: none; }
.car3d-staff .insp-tools button { font: 600 14px/1.2 var(--font-sans); }
.car3d-staff .insp-views .view-name { font: 650 13px/1.2 var(--font-sans); }
.car3d-staff .car3d-bodies { margin: 0; padding: 8px; border: 1px solid var(--viewer-border); border-radius: 10px; background: var(--viewer-surface); }
.damage-board .car3d-staff .car3d-bodies button { min-height: 44px; color: var(--viewer-text); font: 650 14px/1.2 var(--font-sans); letter-spacing: normal; text-transform: none; }
.insp-fixed-paint { display: inline-flex; align-items: center; gap: 7px; padding: 6px; color: var(--viewer-muted); font: 600 13px/1.25 var(--font-sans); }
.insp-fixed-paint::before { content: ""; inline-size: 13px; block-size: 13px; border: 1px solid var(--viewer-muted); border-radius: 50%; background: var(--inspection-paint); }
@container insp (width < 900px) {
  .car3d-staff .car3d-presets.insp-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; overflow: visible; }
  .damage-board .car3d-staff .car3d-presets.insp-views button { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 44px; padding: 3px; gap: 4px; text-align: center; }
  .car3d-staff .insp-views .view-glyph { width: 20px; height: 19px; flex: 0 0 20px; }
  .car3d-staff .car3d-legend.insp-legend:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .car3d-staff .car3d-legend.insp-legend span { min-width: 0; line-height: 1.3; }
  .car3d-staff .insp-views .view-en, .car3d-staff .insp-legend small { display: none; }
}
@container insp (max-width: 310px) {
  .car3d-staff .insp-views .view-glyph { display: none; }
}
@media (prefers-reduced-motion: reduce) { .insp-callouts { transition: none; } }
.damage-board .zone-strip.is-parts .insp-tabs button { width: auto; min-height: 36px; padding: 4px 10px; justify-content: flex-start; }
.damage-board .zone-strip.is-parts .insp-catalog .part-card { width: 100%; }
.insp-label { max-width: 150px; }
/* With the inspector the saved-damage list goes under the map until the column is really wide. */
@container (min-width: 680px) {
  .damage-frame:has(.is-inspector) { grid-template-columns: minmax(0, 1fr); }
  .damage-frame:has(.is-inspector) .damage-ledger { grid-column: 1; grid-row: auto; position: static; max-height: none; }
}
@container (min-width: 1240px) {
  .damage-frame:has(.is-inspector) { grid-template-columns: minmax(0, 1.6fr) minmax(240px, .6fr); }
  .damage-frame:has(.is-inspector) .damage-board { grid-column: 1; grid-row: 1; }
  .damage-frame:has(.is-inspector) .damage-ledger { grid-column: 2; grid-row: 1; position: sticky; top: 12px; max-height: calc(100vh - 24px); }
}
/* Part inspection outcome: checked (✓) and not applicable (n/d). Text and mark carry the state, not colour alone. */
.insp-decide { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.insp-decide .damage-add { margin-top: 0; }
.insp-check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--viewer-border); border-radius: 8px; background: var(--viewer-surface); color: var(--viewer-text); font: 600 13px/1.2 Bahnschrift, "Segoe UI", sans-serif; cursor: pointer; }
.insp-check .ic { width: 18px; height: 18px; margin: 0; }
.insp-check[data-state="ok"][aria-pressed="true"] { border-color: var(--viewer-ok); box-shadow: inset 0 -2px var(--viewer-ok); }
.insp-check[data-state="not_applicable"][aria-pressed="true"] { border-color: var(--viewer-muted); box-shadow: inset 0 -2px var(--viewer-muted); }
.insp-check:focus-visible { outline: 2px solid var(--viewer-cyan); outline-offset: 2px; }
.part-card.is-checked .part-state { color: var(--viewer-ok); }
.part-card.is-checked .part-state::before { content: "✓ "; }
.part-card.is-na .part-state { color: var(--viewer-muted); font-style: italic; }
.insp-label.is-checked { border-color: var(--viewer-ok); }
.insp-label.is-checked b::after { content: " ✓"; color: var(--viewer-ok); }
.insp-label.is-na b::after { content: " · n/d"; color: var(--viewer-muted); font-weight: 400; }
.damage-presentation {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.damage-presentation button { min-height: 44px; }
.damage-presentation button[aria-pressed="true"] {
  border-color: var(--neon);
  color: var(--neon);
}
.car3d[hidden], .damage-diagram[hidden] { display: none; }
.damage-diagram {
  padding: var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.damage-diagram-surface {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 11 / 13;
  margin-inline: auto;
}
.damage-diagram-surface canvas, .damage-diagram-controls {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.damage-diagram .damage-diagram-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  background: #0b1620;
  color: var(--color-text);
}
.damage-diagram [data-state="open"] { --damage-marker: var(--st-late); }
.damage-diagram [data-state="mixed"] { --damage-marker: var(--st-waiting); }
.damage-diagram [data-state="repaired"] { --damage-marker: var(--st-ready); }
.damage-diagram .damage-diagram-mark { border-color: var(--damage-marker, var(--color-line-strong)); }
.damage-diagram-mark:is(:focus-visible, .is-active) {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}
.damage-diagram .damage-diagram-mark .zone-badge {
  display: inline-flex;
  gap: 3px;
  padding-inline: 3px;
  opacity: 1;
  border-color: transparent;
  color: var(--damage-marker, var(--color-text));
}
.damage-diagram-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.damage-diagram-legend[hidden] { display: none; }
.damage-diagram-legend b {
  display: inline-block;
  min-width: 1em;
  margin-inline-end: 4px;
  color: var(--damage-marker);
}
.damage-diagram > .damage-hint { text-align: center; }

@media print {
  .damage-presentation { display: none !important; }
}
.damage-diagram-label {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 0 4px;
  border-radius: 4px;
  background: #0b1620;
  color: var(--color-text);
  font: 600 11px/1.5 var(--font-title);
  white-space: nowrap;
}

.damage-save {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.damage-save[hidden] { display: none; }
.damage-save[data-pending="true"] {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  border-color: var(--color-line-strong);
}
.damage-save .damage-hint { margin: 0; }
.damage-save-button { min-height: 44px; }
.damage-save-button:not(:disabled) { border-color: var(--neon); }
.damage-review { min-height: 44px; margin-inline-start: auto; }
.damage-ledger > .damage-zone-title[tabindex] { scroll-margin-block-start: 72px; }
.damage-review[hidden] { display: none; }
@container (max-width: 560px) {
  .damage-save:has(.damage-review:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 6px 8px;
  }
  .damage-save:has(.damage-review) .damage-hint { grid-column: 1 / -1; }
  .damage-save:has(.damage-review) button { margin: 0; padding-inline: 6px; white-space: normal; }
}

.damage-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  overflow-anchor: none;
}
.damage-workspace > .insp-viewport {
  grid-template-columns: minmax(0, 1fr);
  position: sticky;
  top: 8px;
  z-index: 2;
  min-width: 0;
  gap: 5px;
  background: var(--color-surface);
  border-radius: 6px;
}
.claim-workspace .damage-workspace > .insp-viewport { top: 64px; }
.damage-workspace .insp-scene .car3d-stage { height: clamp(145px, 23dvh, 195px); }
.damage-workspace .car3d-presets.insp-views { flex-direction: row; overflow-x: auto; padding: 4px; }
.damage-workspace .insp-views-title { display: none; }
.damage-board .damage-workspace .car3d-presets.insp-views button { min-height: 44px; }
.damage-workspace > .damage-editor { max-block-size: min(340px, 40dvh); overflow: auto; padding: 3px; scroll-padding-block: 8px; }
.damage-workspace > .damage-editor:empty { display: none; }
.damage-workspace .damage-sheet { gap: 10px; background: var(--color-surface-2); }
.damage-workspace .damage-sheet h3 { font-size: 19px; line-height: 1.25; }
.damage-workspace .damage-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.damage-workspace .liability-field { grid-column: 1 / -1; }
.damage-workspace .damage-fields .level-name {
  color: var(--color-text);
  font: 650 13px/1.35 var(--font-sans);
  letter-spacing: normal;
  text-transform: none;
}
.damage-workspace .damage-fields :is(select, input) { min-height: 44px; font-size: 14px; }
.damage-workspace .level-meter { display: none; }
@container insp (max-width: 340px) {
  .damage-workspace .damage-fields { grid-template-columns: minmax(0, 1fr); }
}
.damage-workspace[data-short-input] .car3d-stage { height: clamp(86px, calc(var(--input-viewport) * .28), 140px); }
.damage-workspace[data-short-input] :is(.insp-views, .car3d-help) { display: none; }
.damage-workspace[data-short-input] > .damage-editor { max-block-size: max(82px, calc(var(--input-viewport) * .72 - 90px)); }
.damage-frame:has(.damage-workspace[data-short-input]) > .damage-save { position: static; }
.damage-sheet-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.damage-part-facts { padding: 5px 8px; border: 1px solid var(--color-line); border-radius: 5px; }
.damage-part-facts summary { cursor: pointer; color: var(--color-text); font: 600 13px/1.4 var(--font-sans); }
.damage-next-part { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 6px 10px; border-color: var(--color-neon); }
.damage-next-part .ic { margin: 0; }
@container insp (min-width: 690px) {
  .damage-workspace:has(> .damage-editor:not(:empty)) { grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); }
  .damage-workspace > .insp-viewport { top: 64px; }
  .damage-workspace .insp-scene .car3d-stage { height: clamp(205px, 43dvh, 390px); }
  .damage-workspace > .damage-editor { grid-column: auto; max-block-size: min(530px, 65dvh); }
}
@media (max-width: 600px) {
  .damage-workspace .damage-fields :is(select, input) { font-size: 16px; }
}
@media print {
  .damage-workspace > .insp-viewport { position: static; }
  .damage-workspace > .damage-editor { max-block-size: none; overflow: visible; }
}

.damage-ledger-link {
  display: block;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.damage-ledger-details {
  display: block;
  color: var(--color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.damage-choice { scroll-margin-block: 72px; }

@media (max-width: 768px) {
  .damage-ledger-link { min-height: 44px; }
}

@media print {
  .damage-ledger-link {
    border: 0;
    color: #000;
    padding: 0;
    min-height: 0;
    text-decoration: none;
  }
}

.damage-finish {
  min-height: 44px;
  margin-block-start: 6px;
  border-color: var(--neon);
}

.car3d-legend[hidden] { display: none; }
.damage-layer-toggle {
  min-height: 44px;
  margin-block-start: 6px;
}
.damage-layer-toggle[aria-pressed="true"] { border-color: var(--neon); }

/* Vehicle handover: vehicle list, five-step wizard, signatures and history (handover.js). */
:is(.handover-panel, .handover-wizard:not(.is-body-step), .handover-compare, .handover-claims, .handover-done, .remote-sign) {
  font-size: 1rem;
  line-height: 1.5;
}
.page-hero:has(+ :is(.handover-panel, .handover-wizard:not(.is-body-step), .handover-done)) .hero-sub {
  font: 550 .9375rem/1.4 var(--font-sans);
  letter-spacing: normal;
  text-transform: none;
}
.handover-field small { font-size: .875rem; }
.handover-wizard .handover-field > .field-label,
.handover-wizard .signature-pad > .field-label { color: var(--text); font: 650 .9375rem/1.4 var(--font-sans); letter-spacing: normal; text-transform: none; }
.handover-compare label > .field-label { color: var(--text); font: 650 .9375rem/1.4 var(--font-sans); letter-spacing: normal; }
.handover-compare select { font: 500 1rem/1.45 var(--font-sans); }
.handover-panel, .handover-wizard, .handover-compare, .handover-claims, .handover-done { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-top: 16px; }
.handover-desk .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.handover-desk .panel-head h2 { margin: 0; }
.handover-desk :is(.panel-head button, .segmented button, .handover-vehicle-actions button) { min-height: 44px; }
.handover-vehicle-states { flex: 1 0 100%; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 5px 8px; }
.handover-vehicle-states .pill { justify-self: start; }
:is(.handover-vehicle-states, .handover-diff) .pill { max-width: 100%; white-space: normal; }
.handover-state-label { font-size: .875rem; font-weight: 650; color: var(--text); }
.handover-queue-heading h3 {
  margin: 4px 0 0;
  padding: 4px 0 4px 10px;
  border-inline-start: 2px solid var(--line-strong);
  font: 700 .9375rem/1.4 var(--font-sans);
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
}
.handover-connection button, .handover-problem button { display: block; margin-top: 8px; min-height: 44px; }
.handover-connection button[hidden] { display: none; }
.case-quick-links { display: none; }
@media (min-width: 1024px) {
  .case-quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px 14px; }
}
@media (max-width: 600px) {
  .page-hero.handover-desk-hero { min-height: 0; margin-bottom: 8px; padding: 14px 12px; }
  .page-hero.handover-desk-hero h1 { font-size: clamp(19px, 6vw, 24px); margin: 0; }
  .handover-panel.handover-desk { margin-top: 8px; padding: 12px; gap: 8px; }
  .handover-desk .handover-vehicle-head { display: grid; gap: 4px; }
}
.handover-vehicles, .handover-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.handover-vehicle, .handover-event { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.handover-vehicle-head, .handover-event-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.handover-plate { font: 700 1.125rem/1.25 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: .025em; padding: 2px 8px; border: 2px solid var(--line-strong); border-radius: 4px; }
.handover-vehicle-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.handover-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.handover-step-button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 58px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12.5px; }
.handover-step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; border: 2px solid currentColor; font: 700 .875rem/1 var(--font-sans); }
.handover-step-button[aria-current="step"] { color: var(--text); border-color: var(--teal); box-shadow: inset 0 -3px var(--teal); }
.handover-step-button[data-done="true"] { color: var(--color-ok); }
.handover-step-title { display: grid; gap: 2px; margin: 0 0 8px; font: 700 1.25rem/1.25 var(--font-sans); letter-spacing: normal; text-transform: none; }
.handover-step-count { color: var(--muted); font: 600 .875rem/1.4 var(--font-sans); letter-spacing: normal; text-transform: none; }
.handover-claims[hidden] { display: none; }
.handover-nav.is-static { position: static; background: none; }
.handover-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.handover-field { display: grid; gap: 6px; align-content: start; }
.handover-field .segmented { width: 100%; flex-wrap: wrap; }
.handover-field .segmented button { min-width: 44px; padding: 6px 8px; }
/* Fuel as a gauge: nine equal cells in one row, or 5 + 4 when the field is narrow (never 7 + 2). */
.handover-fuel { container-type: inline-size; }
.handover-field .segmented.is-gauge { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 1px; background: var(--line-strong); }
.handover-field .segmented.is-gauge button { position: relative; min-width: 0; min-height: 44px; padding: 6px 2px; font-variant-numeric: tabular-nums; }
.handover-field .segmented.is-gauge button[data-lit] { background-image: linear-gradient(color-mix(in srgb, var(--teal) 16%, transparent) 0 0); color: var(--text); }
.handover-field .segmented.is-gauge button[data-previous]::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #8f9eff; }
[data-theme="light"] .handover-field .segmented.is-gauge button[data-previous]::after { background: #3f4dc0; }
@container (max-width: 470px) {
  .handover-field .segmented.is-gauge { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .handover-field .segmented.is-gauge button:last-child { grid-column: span 2; }
}
.handover-nav { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 4px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgba(0,0,0,.45); }
.handover-nav button { min-height: 46px; min-width: 120px; }
.handover-nav button[hidden] { display: none; }
.handover-nav button:last-child { margin-inline-start: auto; }
.handover-diff { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill.is-known { --mark: #8f9eff; }
[data-theme="light"] .pill.is-known { --mark: #3f4dc0; }
.handover-status { margin: 0; padding: 8px 12px; border-radius: 6px; border-left: 4px solid var(--st-ready); background: color-mix(in srgb, var(--st-ready) 12%, transparent); }
.handover-status.is-warn { border-left-color: var(--st-late); background: color-mix(in srgb, var(--st-late) 12%, transparent); }
.handover-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.handover-shots.is-return { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.handover-return-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.handover-return-side { display: grid; min-width: 0; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.handover-return-side > strong { font-size: .875rem; }
.handover-return-side .handover-upload { width: 100%; }
.handover-return-side .handover-upload svg { flex-shrink: 0; }
.handover-return-preview { display: grid; gap: 6px; }
.handover-shot { display: grid; gap: 8px; align-content: start; padding: 10px; border: 2px dashed var(--line-strong); border-radius: 8px; background: var(--surface); }
.handover-shot[data-state="done"] { border-style: solid; border-color: var(--color-ok); }
.handover-shot[data-state="missing"] { border-color: var(--st-late); }
.handover-shot[data-state="queued"] { border-style: solid; border-color: var(--st-waiting, var(--st-late)); }
.handover-shot-queued { justify-self: start; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--st-waiting, var(--st-late)) 18%, transparent); font-size: 0.85rem; font-weight: 650; }
.handover-thumbs img.is-queued { outline: 2px dashed var(--st-waiting, var(--st-late)); outline-offset: 2px; opacity: 0.85; }
.handover-connection { position: sticky; top: 0; z-index: 3; }
/* Yellow on white is ~1.3:1; amber keeps the queued frame visible (WCAG 1.4.11, 3:1). */
[data-theme="light"] .handover-shot[data-state="queued"], [data-theme="light"] .handover-thumbs img.is-queued { border-color: #9a6a00; outline-color: #9a6a00; }
[data-theme="light"] .handover-shot-queued { background: #fff1c2; color: #5c4000; }
.handover-shot img, .handover-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface); }
.handover-return-pair img { object-fit: contain; }
.handover-shot-label { font-weight: 650; }
.handover-upload { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 12px; border: 1px solid var(--teal); border-radius: 6px; color: var(--text); cursor: pointer; font-weight: 650; }
.handover-upload:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.handover-upload[data-busy] { opacity: .6; pointer-events: none; }
.handover-upload-control { display: grid; gap: 6px; min-width: 0; }
.handover-upload-status:empty { display: none; }
.handover-upload-status, .handover-shot-confirmed { font-size: .875rem; }
.handover-upload-status.is-warn { color: var(--text); border-inline-start: 3px solid var(--st-late); padding-inline-start: 8px; }
.handover-shot.is-next-shot { grid-column: 1 / -1; gap: 6px; border: 1px solid var(--teal); border-inline-start-width: 4px; padding: 12px 14px; }
.handover-shot.is-next-shot .handover-shot-label { font-size: 1.125rem; }
.handover-shot.is-next-shot p { margin: 0; color: var(--text); }
.handover-shot.is-next-shot .handover-upload-control { justify-self: start; margin-top: 4px; }
.handover-shot-next { font-size: .875rem; font-weight: 650; color: var(--text); }
.handover-pinned .handover-thumbs figure { margin: 0; display: grid; justify-items: start; gap: 4px; }
.handover-photo-comparison, .handover-photo-side { display: grid; gap: 8px; min-width: 0; }
.handover-photo-comparison { margin-block: 12px; scroll-margin-block: 12px; }
.handover-photo-comparison h3, .handover-photo-side p { margin: 0; }
.handover-photo-pair, .remote-discrepancy { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding-inline: 12px; }
.handover-photo-pair summary, .remote-discrepancy summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 650; }
.handover-photo-pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; padding-block: 6px 12px; }
.handover-photo-side { align-content: start; overflow-wrap: anywhere; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.handover-photo-side img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; }
.remote-discrepancy p { margin-block: 0 12px; }
.remote-sign-instructions { margin: 0; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.handover-pinned { display: grid; gap: 10px; }
.handover-pinned h3 { margin: 6px 0 0; }
.handover-pinned-row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.handover-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.handover-thumbs img { width: 84px; }
.handover-equipment { display: grid; gap: 8px; }
.handover-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.handover-gap button { min-height: 44px; }
.handover-equipment-group { display: grid; min-inline-size: 0; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.handover-equipment-group legend { padding-inline: 5px; font-weight: 700; }
.handover-equipment-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: end; gap: 6px 12px; padding-block: 4px; }
.handover-equipment-row label { display: grid; gap: 4px; margin: 0; min-width: 0; }
.handover-equipment-row select { width: 100%; min-height: 44px; font-size: 16px; }
.handover-equipment-row p { margin: 0; padding-block: 8px; }
.handover-equipment-row.has-change { border-inline-start: 2px solid currentColor; padding-inline-start: 8px; }
.handover-equipment-result:not(:empty) { grid-column: 1 / -1; font-weight: 700; }
.handover-equipment-summary summary, .handover-equipment-evidence summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 700; }
.handover-equipment-evidence { grid-column: 1 / -1; min-inline-size: 0; }
.handover-equipment-evidence textarea { width: 100%; min-height: 44px; font-size: 16px; }
.handover-equipment-evidence .handover-thumbs { margin-block: 8px; }
.handover-equipment-evidence figure { display: grid; gap: 4px; justify-items: start; margin: 0; }
.handover-summary { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.handover-summary dt { color: var(--muted); }
.handover-summary dd { margin: 0; font-weight: 650; }
.handover-statement { margin: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; }
.handover-party { display: grid; gap: 10px; }
.handover-party[hidden] { display: none; }
.signature-pad { display: grid; gap: 6px; }
.signature-pad canvas { width: 100%; max-width: 600px; aspect-ratio: 600 / 220; touch-action: none; border: 2px solid var(--line-strong); border-radius: 8px; background: #fcfcfd; cursor: crosshair; }
.signature-pad[data-signed="true"] canvas { border-color: var(--color-ok); }
.signature-pad .link-button { justify-self: start; background: none; border: 0; padding: 4px 0; color: var(--teal); text-decoration: underline; min-height: 32px; }
.handover-absent { display: flex; align-items: center; gap: 8px; font-size: .9375rem; line-height: 1.5; }
.handover-absent > span { color: var(--text); }
.handover-sign-button { min-height: 52px; font-size: 16px; font-weight: 700; }
.handover-done { justify-items: start; }
.handover-done > .ic { width: 42px; height: 42px; color: var(--color-ok); }
.handover-readiness {
  display: grid;
  justify-items: start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.handover-readiness :is(h3, p, label) { margin: 0; overflow-wrap: anywhere; }
.handover-readiness form { display: grid; gap: 12px; width: 100%; max-width: 620px; min-width: 0; }
.handover-readiness form button { justify-self: start; }
.handover-readiness-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.handover-readiness label { display: grid; gap: 4px; min-width: 0; }
.handover-readiness :is(select, input, textarea) { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.handover-readiness summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 700; }
.handover-readiness ul { display: grid; gap: 8px; padding-inline-start: 20px; }
.return-task-list { display: grid; gap: 12px; min-width: 0; }
.return-task-list h4 { margin: 0; }
.return-task { display: grid; gap: 10px; min-inline-size: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.return-task legend { padding-inline: 5px; font-weight: 700; }
.return-task label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.return-task input[type="checkbox"] { width: 22px; min-height: 22px; margin: 0; }
.return-task-forecast:not(:empty) { padding: 10px; border-inline-start: 3px solid currentColor; font-weight: 700; }
.fleet-service-content { max-width: 760px; min-width: 0; }
.fleet-service-section, .fleet-service-entry { display: grid; gap: 12px; min-width: 0; }
.fleet-service-section[hidden], .handover-vehicle-actions[hidden] { display: none; }
.fleet-service-entry { justify-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.fleet-service-section :is(h2,h3,p,label) { margin: 0; overflow-wrap: anywhere; }
.fleet-service-section form { display: grid; gap: 10px; width: min(100%, 560px); }
.fleet-service-section form button { justify-self: start; }
.fleet-service-section :is(select,input) { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.fleet-service-section summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 700; }
.handover-review { width: 100%; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.handover-review summary { padding-block: 12px; cursor: pointer; font-weight: 650; }
.handover-review dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 12px; margin: 0 0 12px; }
.handover-review dt { color: var(--muted); }
.handover-review dd { margin: 0; font-weight: 650; }
.handover-review p { white-space: pre-wrap; }
.handover-map-legend { min-width: 0; padding-inline: 10px; border: 1px solid var(--viewer-border); border-radius: 8px; }
.handover-map-legend[hidden] { display: none; }
.handover-map-legend summary { display: list-item; min-height: 44px; padding-block: 12px; cursor: pointer; font-weight: 650; }
.handover-map-legend .car3d-legend { margin-block: 0 10px; }
.handover-hash { max-width: 100%; overflow-wrap: anywhere; font-size: 12px; color: var(--muted); }
.handover-event[data-kind="issue"], .handover-event[data-kind="delivery"] { border-left: 4px solid var(--teal); }
.handover-event[data-kind="return"], .handover-event[data-kind="intake"] { border-left: 4px solid var(--gold); }
.customer-handovers { display: grid; gap: 8px; margin-top: 12px; }
.customer-handover { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 560px) {
  .handover-panel, .handover-wizard, .handover-compare, .handover-claims, .handover-done { padding: 12px; }
  .page-hero.is-body-step { min-height: 0; padding: 9px 12px; margin-bottom: 6px; gap: 6px; }
  .page-hero.is-body-step h1 { font-size: clamp(17px, 5vw, 22px); margin-bottom: 3px; overflow-wrap: anywhere; }
  .page-hero.is-body-step .hero-sub { margin: 0; font-size: 11px; letter-spacing: .05em; }
  .page-hero.is-body-step .hero-actions { margin-top: 2px; }
  .page-hero.is-body-step .hero-actions button { margin-block: 0; }
  .handover-wizard.is-body-step { margin-top: 8px; gap: 6px; }
  .handover-wizard.is-body-step .handover-step-title { display: block; font-size: 17px; }
  .handover-wizard.is-body-step .handover-step-count { font-size: .8125rem; line-height: 1.2; }
  .handover-wizard.is-body-step .handover-body > .muted { margin-bottom: 8px; }
  .handover-wizard.is-body-step .insp-head { display: none; }
  .handover-wizard.is-body-step .damage-workspace:not([data-short-input]) .car3d-stage { height: clamp(230px, 31dvh, 290px); }
  .handover-step-button { min-height: 44px; font-size: 0; gap: 0; }
  .handover-pinned-row { grid-template-columns: 1fr; }
  .handover-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .handover-summary { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .handover-summary dd:not(:last-child) { margin-bottom: 6px; }
}

@media screen and (pointer: coarse) {
  .pager-btn, .pager-size select,
  :is(.has-print, .case-card.has-print, .monitor-panel.is-widget) > .print-btn, .print-btn.is-inline {
    min-width: 44px;
    min-height: 44px;
  }
  .print-btn { justify-content: center; }
  .handover-step-button { min-height: 48px; }
}

/* Read-only views and the fleet panel. */
.fleet-vehicle-card { display: grid; gap: 10px; }
.fleet-vehicle-card[hidden] { display: none; }
.fleet-filter-results { margin: 8px 0; }
@media (min-width: 1280px) {
  .fleet-dashboard-kpis.is-six { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.fleet-vehicle-card > h2 { margin: 0; }
@media (pointer: coarse) {
  /* The finger target is ::after: ::before draws the dot, and enlarging it painted 36 px discs. */
  .radar-blip::after { content: ""; position: absolute; inset: -10px; }
  /* The dot stays a dot: the generic 44 px minimum for buttons stretched it into an oval. */
  .radar .radar-blip { min-width: 0; min-height: 0; }
  /* Colour swatches as 44 px circles under a finger. */
  .paint-swatch { width: 44px; height: 44px; }
}

/* Remote signature and damage claim from a handover. */
.handover-remote { gap: 10px; }
.handover-link { width: 100%; font: 13px/1.4 Consolas, monospace; }
.handover-claim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; }
.remote-sign { display: grid; gap: 14px; max-width: 640px; margin: 16px auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.remote-sign > .ic { width: 42px; height: 42px; color: var(--color-ok); }
.remote-sign h1 { margin: 0; }
.remote-sign h2 { margin: 8px 0 0; font: 700 1.125rem/1.35 var(--font-sans); letter-spacing: normal; text-transform: none; }
.remote-damage { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.remote-damage li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.remote-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
@media (max-width: 375px) {
  .remote-confirmation .remote-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.remote-photo { margin: 0; display: grid; gap: 4px; }
.remote-photo a { display: block; min-height: 44px; border-radius: 6px; overflow: hidden; }
.remote-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.remote-photo figcaption { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.remote-technical summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); }

.recent-table .cell-when { white-space: nowrap; }
.recent-table .cell-when small { display: block; }

/* "Nowa sprawa" is an action, not the current page: outlined with a plus, never filled like a selection. */
.side-shell .shell-group .shell-item.is-cta:not([aria-current="page"]) { background: transparent; color: var(--teal); border: 1px dashed color-mix(in srgb, var(--teal) 70%, transparent); font-weight: 700; }
.side-shell .shell-group .shell-item.is-cta:not([aria-current="page"])::before { content: "+"; margin-right: 6px; font-weight: 800; }
.side-shell .shell-group .shell-item.is-cta:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--text); }
[data-theme="light"] .side-shell .shell-group .shell-item.is-cta:not([aria-current="page"]) { background: transparent; color: #0a5d66; border-color: #4aa9b2; }

/* Phone register: compact cards and one scrollable row of view filters. */
@container (width < 690px) {
  .register-table tr { gap: 2px 12px; padding: 10px 0; }
  .register-table td { padding: 3px 8px; }
  .register-table :is(.cell-case, .cell-actions, td:nth-child(2), td:nth-child(4), td:nth-child(5))[data-label]::before { display: none; }
  .register-table td:nth-child(4), .register-table td:nth-child(5) { grid-column: auto; align-self: center; }
  .register-table .cell-actions { display: flex; justify-content: flex-end; padding-top: 0; }
  .register-table .cell-case { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
}
@media (max-width: 690px) {
  .register .view-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .register .view-chips > * { flex: 0 0 auto; scroll-snap-align: start; }
}
:root { --operations-date: #96e7f2; --operations-id: #f6d48f; }
:root[data-theme="light"] { --operations-date: #005765; --operations-id: #754100; }
.operations-date, .rental-calendar input.operations-date {
  color: var(--operations-date); font-weight: 700; font-variant-numeric: tabular-nums;
}
.operations-id { color: var(--operations-id); font-weight: 750; }
.rental-calendar input.operations-date::-webkit-datetime-edit { color: inherit; }
.rental-calendar, .rental-agenda { display: grid; gap: 12px; min-width: 0; }
.rental-calendar [hidden], .rental-agenda [hidden] { display: none; }
.rental-agenda h3, .rental-agenda h4, .rental-agenda p { margin: 0; overflow-wrap: anywhere; }
.rental-calendar .repair-week-nav { flex-wrap: wrap; }
.rental-calendar form .rental-verified:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  min-height: 44px;
}
.rental-calendar .rental-verified input { width: 22px; min-height: 22px; margin: 0; }
.rental-view-modes button[aria-pressed="true"], .rental-month-grid [aria-current="date"] {
  border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
}
.rental-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(2px, 1vw, 8px); max-width: 860px; }
.rental-weekday { text-align: center; padding: 4px 0; color: var(--operations-date); font-weight: 700; }
.rental-month-grid > button {
  display: grid; gap: 2px; min-width: 0; min-height: 48px; padding: 4px 0; margin: 0;
  justify-items: center; align-content: center; font-variant-numeric: tabular-nums;
}
.rental-day-count { font-size: .88rem; color: var(--muted); }
.rental-month-grid .has-bookings .rental-day-count { color: var(--operations-id); font-weight: 750; }
.rental-board { display: grid; grid-template-columns: repeat(7, minmax(210px, 1fr)); gap: 10px; overflow-x: auto; padding: 4px 4px 12px; }
.rental-board-day { display: grid; align-content: start; gap: 8px; min-height: 160px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.rental-board-card { background: var(--surface); padding: 10px; }
.rental-board-card[draggable="true"] { cursor: grab; }
.rental-board-card button { max-width: 100%; }
.vehicle-passport, .passport-timeline { display: grid; min-width: 0; gap: 12px; }
.vehicle-passport h3, .passport-timeline h4, .passport-timeline p { margin: 0; overflow-wrap: anywhere; }
.passport-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.passport-filters [hidden] { display: none; }
.passport-map { margin: 0; display: grid; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.passport-map-direction { display: flex; justify-content: space-between; font-weight: 650; }
.passport-map svg { display: block; width: 100%; max-height: 380px; }
.passport-underbody-shell { fill: #233344; stroke: #71859b; stroke-width: 4; }
.passport-underbody-wheel { fill: #121b26; stroke: #71859b; stroke-width: 3; }
.passport-region { cursor: pointer; --group-color: #93c9fd; }
.passport-region rect { fill: color-mix(in srgb, var(--group-color) 20%, #162536); stroke: var(--group-color); stroke-width: 2; }
.passport-region text { fill: #f8fafc; font-size: 22px; font-weight: 700; pointer-events: none; }
.passport-region:hover rect, .passport-region:focus rect, .passport-region[aria-pressed="true"] rect { stroke: #fff; stroke-width: 4; }
.passport-region[aria-pressed="true"] rect { fill: color-mix(in srgb, var(--group-color) 47%, #102031); }
[data-group="running"] { --group-color: #6de0b0; }
[data-group="exhaust"] { --group-color: #ffc073; }
[data-group="structure"] { --group-color: #89c9ff; }
[data-group="covers"] { --group-color: #c3adff; }
.passport-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0; list-style: none; }
.passport-legend li { display: flex; align-items: center; gap: 6px; }
.passport-legend li::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: var(--group-color); }
.passport-photos summary { cursor: pointer; min-height: 44px; padding-block: 9px; }
.passport-photos .handover-thumbs figure { margin: 0; }
.passport-photos .handover-thumbs img { object-fit: contain; }
