/* ==========================================================================
   Sentra Videoauswertung (P-94) — Design-System
   Eine Datei, kein Build. CSP-sicher: Positionen/Breiten kommen NIE über
   style-Attribute, sondern über SVG-Attribute (x/width in %), <progress>
   und <meter>. Klassenreferenz: docs/design/README.md

    1 Tokens (hell = Admin, .theme-dark = Auswerter/Login)
    2 Basis · 3 Typografie (inkl. :lang(ml))
    4 Icons · 5 Buttons · 6 Formulare
    7 Status (Chips, Badges, Statussymbole)
    8 App-Shell (Topbar, Seitennavigation, Seite)
    9 Karten, KPI-Kacheln, Raster
   10 Tabellen · 11 Hinweise/Flash · 12 Modal · 13 Leerzustand
   14 Fortschritt · 15 Tageszeitleiste · 16 Ereignisliste
   17 Login · 18 Auswerter: Meine Videos
   19 Arbeitsplatz (Player, Steuerleiste, Szenenband, Bewertung,
      Seitenspalte, Szenenliste, Befund-Panel, Standbild-Galerie)
   20 Utilities · 21 Responsive · 22 Druck
   ========================================================================== */

/* 1 Tokens ---------------------------------------------------------------- */
:root {
  /* Fläche & Text — hell (Admin). Sentra-Navy als Primärfarbe (Familie P-80). */
  --bg:          #eef1f4;
  --surface:     #ffffff;
  --surface-2:   #f6f8fa;
  --surface-3:   #e8ecf0;
  --line:        #d5dbe1;
  --line-strong: #b7c0ca;
  --text:        #1d2733;
  --text-muted:  #56616e;   /* ≥ 4,5:1 auf --surface und --surface-2 */
  --text-faint:  #7b8693;   /* nur Nebeninfo ≥ 14 px, Rahmen, Icons */
  --primary:     #17406f;
  --primary-hover: #0f2a4a;
  --primary-soft:  #e3ebf5;
  --on-primary:  #ffffff;
  --link:        #1d5797;
  --focus-ring:  #2f74c0;

  /* Status: Okabe-Ito-nah (farbfehlsicht-tauglich) — IMMER mit Symbolform */
  --st-unchecked:    #6b7684;  --st-unchecked-bg: #eef1f4;
  --st-ok:           #0f7a5a;  --st-ok-bg:        #e2f3ec;
  --st-suspicious:   #9a6200;  --st-suspicious-bg:#fbf0d9;
  --st-theft:        #b8360f;  --st-theft-bg:     #fbe6df;
  --st-quiet:        #c7ced6;
  --on-status:       #ffffff;  /* Aussparung in gefüllten Statussymbolen */

  --info:    #1d5797;  --info-bg:    #e3ebf5;
  --success: #0f7a5a;  --success-bg: #e2f3ec;
  --warning: #8a5800;  --warning-bg: #fbf0d9;
  --danger:  #b42318;  --danger-bg:  #fbe4e1;

  /* Video-Bühne ist in beiden Themes dunkel */
  --stage:       #0f1317;

  /* Typografie: nur System-Schriften (CSP: nur self). Malayalam-Glyphen
     fallen glyphweise auf die angehängten Malayalam-Schriften zurück. */
  --font-latin: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont,
                "SF Pro Text", "Noto Sans", Roboto, "Helvetica Neue", Arial;
  --font-ml:    "Noto Sans Malayalam", "Nirmala UI", "Malayalam Sangam MN", "Kartika",
                "Manjari", "Meera";
  --font: var(--font-latin), var(--font-ml), sans-serif;

  --fs-xs: .75rem;    /* 12 */
  --fs-sm: .8125rem;  /* 13 */
  --fs-md: .875rem;   /* 14 — Grundgröße Arbeitswerkzeug */
  --fs-lg: 1rem;      /* 16 */
  --fs-xl: 1.1875rem; /* 19 */
  --fs-2xl: 1.4375rem;/* 23 */
  --fs-3xl: 1.75rem;  /* 28 */
  --lh: 1.5;
  --lh-tight: 1.25;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 3px;   /* Chips, Eingaben, Segmente */
  --r-md: 6px;   /* Buttons, Karten */
  --r-lg: 10px;  /* Modal */
  --shadow-pop: 0 12px 32px rgba(15, 25, 40, .22), 0 2px 6px rgba(15, 25, 40, .12);

  --topbar-h: 48px;
  --nav-w: 224px;
  --side-w: 360px;          /* Arbeitsplatz-Seitenspalte, ab 1600 px breiter */
  --ctrl-h: 40px;           /* Standardhöhe Bedienelemente */
  --hit-lg: 56px;           /* Bewertungsknöpfe */

  color-scheme: light;
}

/* Dunkles Arbeitsplatz-Theme: kühles Graphit statt Schwarz, gedämpftes Weiß
   gegen Blendung bei langen Schichten. */
.theme-dark {
  --bg:          #1a2028;
  --surface:     #222a33;
  --surface-2:   #29323c;
  --surface-3:   #313b47;
  --line:        #36414d;
  --line-strong: #4a5664;
  --text:        #dfe5ec;
  --text-muted:  #a3aeba;
  --text-faint:  #7f8b98;
  --primary:     #6fa6df;
  --primary-hover: #8cbbea;
  --primary-soft:  #243a52;
  --on-primary:  #0f1d2c;
  --link:        #8cbbea;
  --focus-ring:  #9cc6f0;

  --st-unchecked:    #8d99a6;  --st-unchecked-bg: #2a333d;
  --st-ok:           #46b98f;  --st-ok-bg:        #1d3a32;
  --st-suspicious:   #e6b04c;  --st-suspicious-bg:#3d3420;
  --st-theft:        #f0714f;  --st-theft-bg:     #45261f;
  --st-quiet:        #3b4652;
  --on-status:       #15191e;

  --info:    #8cbbea;  --info-bg:    #223649;
  --success: #46b98f;  --success-bg: #1d3a32;
  --warning: #e6b04c;  --warning-bg: #3d3420;
  --danger:  #f07a6a;  --danger-bg:  #45231f;

  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* 2 Basis ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
[hidden] { display: none !important; }
::selection { background: var(--primary-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 3 Typografie ------------------------------------------------------------ */
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); font-weight: 600; color: var(--text); }
h1, .h1 { font-size: var(--fs-2xl); letter-spacing: -.01em; }
h2, .h2 { font-size: var(--fs-xl); }
h3, .h3 { font-size: var(--fs-lg); }
h4, .h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s3); }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.tnum, time, .num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5em; height: 1.5em; padding: 0 .35em;
  font: 600 var(--fs-xs)/1 var(--font-latin), sans-serif;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
}

/* Malayalam: hohe Ober-/Unterlängen und Konjunkte → mehr Zeilenhöhe, etwas
   größer, nie Sperrung oder Versalien, Kürzungen erst nach 2 Zeilen. */
:lang(ml) {
  --lh: 1.75;
  --lh-tight: 1.5;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
/* Schriftgrößen-Tokens für ML-Seiten ca. 6 % größer (html lang="ml") */
/* Design-Review 7: Malayalam-Kleintext mind. 15 px, Fließtext 16 px → --fs-xs gibt es
   unter :lang(ml) faktisch nicht (= --fs-sm). Lateinische Einsprengsel behalten ihre Größe nicht
   separat, damit Zeilen nicht springen. */
:root:lang(ml) {
  --fs-xs: .9375rem; --fs-sm: .9375rem; --fs-md: 1rem; --fs-lg: 1.0625rem;
  --fs-xl: 1.25rem; --fs-2xl: 1.5rem;
}
:lang(ml) h1, :lang(ml) .h1 { font-size: calc(var(--fs-2xl) * .96); }
:lang(ml) .btn, :lang(ml) .chip, :lang(ml) .tab { line-height: 1.45; }
/* Lateinische Einsprengsel (Dateinamen, Zeiten) in ML-Seiten */
[lang="de"], [lang="en"], .latin { --lh: 1.5; --lh-tight: 1.25; }

/* 4 Icons ----------------------------------------------------------------- */
/* <svg class="ico"><use href="#i-play"/></svg> — Sprite: docs/design/_icons.svg */
.ico {
  display: inline-block; width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.2em;
}
.ico--sm { width: 14px; height: 14px; }
.ico--md { width: 18px; height: 18px; }
.ico--lg { width: 22px; height: 22px; }
.ico--xl { width: 32px; height: 32px; }
/* Aussparung in gefüllten Symbolen (Statusformen) */
.ico-knock { stroke: var(--on-status); fill: none; }
.ico-fill  { fill: currentColor; stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; } /* nicht display:none → Pattern bleiben nutzbar */
/* Marke (Symbol #i-brand) */
.brand-bg  { fill: var(--primary); stroke: none; }
.brand-fg  { fill: none; stroke: var(--on-primary); stroke-width: 2.2; }
.brand-dot { fill: var(--on-primary); stroke: none; }
.shell--admin .topbar .brand-bg { fill: #fff; }
.shell--admin .topbar .brand-fg { stroke: var(--primary-hover); }
.shell--admin .topbar .brand-dot { fill: var(--primary-hover); }
/* Szenenband-Muster (#pat-suspicious = Schraffur, #pat-theft = Kreuzgitter auf Vollton) */
.pat-bg-susp  { fill: var(--st-suspicious-bg); }
.pat-fg-susp  { fill: var(--st-suspicious); }
.pat-bg-theft { fill: var(--st-theft); }
.pat-fg-theft { stroke: var(--st-theft-bg); stroke-width: 1.1; fill: none; }

/* 5 Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--ctrl-h); padding: 0 var(--s4);
  font: 500 var(--fs-md)/1.2 var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.theme-dark .btn--danger { color: var(--on-status); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn--sm { min-height: 30px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.btn--lg { min-height: 48px; padding: 0 var(--s5); font-size: var(--fs-lg); }
.btn--icon { width: var(--ctrl-h); padding: 0; }
.btn--icon.btn--sm { width: 30px; }
.btn--block { width: 100%; }
.btn .kbd { margin-left: var(--s1); }
.btn--primary .kbd { color: inherit; background: transparent; border-color: currentColor; opacity: .75; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

/* Segmentierte Auswahl (Geschwindigkeit, Zeitraum) */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.seg__item {
  min-height: 32px; padding: 0 var(--s3);
  font: 500 var(--fs-sm)/1 var(--font); font-variant-numeric: tabular-nums;
  color: var(--text-muted); background: transparent;
  border: 0; border-left: 1px solid var(--line);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.seg__item:first-child { border-left: 0; }
.seg__item:hover { color: var(--text); background: var(--surface-2); }
.seg__item.is-active, .seg__item[aria-pressed="true"], .seg__item[aria-current] {
  color: var(--on-primary); background: var(--primary);
}
/* Tempo > 2× zählt als Plausibilitätswarnung → dezent markiert */
.seg__item.is-fast { color: var(--warning); }
.seg__item.is-fast.is-active { color: var(--on-status); background: var(--warning); }

/* 6 Formulare ------------------------------------------------------------- */
.field { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.field__label { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.field__hint { font-size: var(--fs-sm); color: var(--text-muted); }
.field > .seg { justify-self: start; }
.field__error { font-size: var(--fs-sm); color: var(--danger); display: flex; gap: var(--s1); align-items: flex-start; }
.input, .select, .textarea {
  width: 100%; min-height: var(--ctrl-h); padding: 0 var(--s3);
  font: var(--fs-md)/1.4 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.textarea { padding: var(--s2) var(--s3); min-height: 84px; resize: vertical; line-height: var(--lh); }
.select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: var(--focus-ring); }
.input[aria-invalid="true"], .is-invalid { border-color: var(--danger); }
.input--sm, .select--sm { min-height: 32px; font-size: var(--fs-sm); }
.select--auto { width: auto; }
.check { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -1px; }

/* Filterleiste über Tabellen */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s4); }
.filters .field { margin: 0; min-width: 150px; }
.filters .field--grow { flex: 1 1 220px; }
.filters__actions { margin-left: auto; display: flex; gap: var(--s2); }

/* 7 Status ---------------------------------------------------------------- */
/* Statussymbol-Formen (Sprite): unchecked = gestrichelter Ring,
   ok = Kreis mit Haken, suspicious = Dreieck mit !, theft = Achteck mit ✕.
   Farbe ist immer nur zweites Merkmal. */
.st { color: var(--st-unchecked); }
.st--unchecked { color: var(--st-unchecked); }
.st--ok { color: var(--st-ok); }
.st--suspicious { color: var(--st-suspicious); }
.st--theft { color: var(--st-theft); }

/* Chip = Symbol + Text, für Listen/Tabellen */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; padding: 1px var(--s2) 1px 6px;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.2;
  border-radius: var(--r-sm); white-space: nowrap;
  color: var(--text); background: var(--surface-3);
}
.chip .ico { width: 14px; height: 14px; }
.chip--unchecked  { background: var(--st-unchecked-bg); }
.chip--unchecked .ico { color: var(--st-unchecked); }
.chip--ok         { background: var(--st-ok-bg); }
.chip--ok .ico { color: var(--st-ok); }
.chip--suspicious { background: var(--st-suspicious-bg); }
.chip--suspicious .ico { color: var(--st-suspicious); }
.chip--theft      { background: var(--st-theft-bg); box-shadow: inset 3px 0 0 var(--st-theft); padding-left: 9px; }
.chip--theft .ico { color: var(--st-theft); }

/* Badge = neutrale Zustände ohne Schwere (Verarbeitung, Rolle, Prüfstatus) */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; min-height: 22px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.2;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text-muted); background: var(--surface); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge--info    { color: var(--info);    border-color: currentColor; background: var(--info-bg); }
.badge--success { color: var(--success); border-color: currentColor; background: var(--success-bg); }
.badge--warning { color: var(--warning); border-color: currentColor; background: var(--warning-bg); }
.badge--danger  { color: var(--danger);  border-color: currentColor; background: var(--danger-bg); }
.badge--running::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* Zähler-Paket je Schwere: "2 ▲ 1 ⯃" */
.sev-counts { display: inline-flex; gap: var(--s3); align-items: center; font-variant-numeric: tabular-nums; }
.sev-counts > span { display: inline-flex; gap: 3px; align-items: center; }
.sev-counts .is-zero { color: var(--text-faint); }
.sev-counts .is-zero .ico { opacity: .45; }

/* Plausibilitätswarnung */
.flag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px var(--s2); font-size: var(--fs-xs); font-weight: 600;
  color: var(--warning); background: var(--warning-bg);
  border-radius: var(--r-sm); line-height: 1.3;
}
.flag .ico { width: 13px; height: 13px; }
.table .flag { white-space: nowrap; }

/* 8 App-Shell ------------------------------------------------------------- */
.shell { min-height: 100vh; display: grid; grid-template-rows: var(--topbar-h) 1fr; }
.shell--admin { grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-areas: "top top" "nav main"; }
.shell--admin .topbar { grid-area: top; }
.shell--admin .sidenav { grid-area: nav; }
.shell--admin .page { grid-area: main; }
.shell--workspace { height: 100vh; min-height: 0; overflow: hidden; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s4);
  height: var(--topbar-h); padding: 0 var(--s4);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.shell--admin .topbar { background: var(--primary-hover); border-bottom-color: var(--primary-hover); color: #fff; }
.shell--admin .topbar .topbar__meta, .shell--admin .topbar .btn--ghost { color: #d6e1ee; }
.shell--admin .topbar .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__name { font-size: var(--fs-md); }
.brand__product { font-weight: 400; opacity: .8; }
.topbar__nav { display: flex; gap: var(--s1); }
.topbar__link {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 34px; padding: 0 var(--s3);
  color: var(--text-muted); text-decoration: none; border-radius: var(--r-md); font-weight: 500;
}
.topbar__link:hover { color: var(--text); background: var(--surface-2); }
.topbar__link[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.topbar__spacer { flex: 1; }
.topbar__meta { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.topbar__user { display: inline-flex; align-items: center; gap: var(--s2); }
.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
  font: 600 var(--fs-xs)/1 var(--font-latin), sans-serif;
  color: var(--text); background: var(--surface-3); border-radius: 50%;
}
.shell--admin .topbar .avatar { background: rgba(255,255,255,.16); color: #fff; }
/* Aktivitäts-Anzeige (Heartbeat): ehrlich sichtbar für den Auswerter */
.live-dot { display: inline-flex; align-items: center; gap: 6px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.live-dot.is-idle::before { background: var(--text-faint); }

.sidenav {
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: var(--s4) var(--s3); background: var(--surface); border-right: 1px solid var(--line);
}
.sidenav__group { margin-bottom: var(--s5); }
.sidenav__title { padding: 0 var(--s3) var(--s2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-faint); }
.sidenav__link {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 36px; padding: 0 var(--s3); margin-bottom: 2px;
  color: var(--text-muted); text-decoration: none; font-weight: 500; border-radius: var(--r-md);
}
.sidenav__link:hover { color: var(--text); background: var(--surface-2); }
.sidenav__link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.sidenav__count { margin-left: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text-faint); }
.sidenav__count--alert { color: var(--st-theft); font-weight: 700; }
.sidenav__count--warn { color: var(--warning); font-weight: 700; }

.page { min-width: 0; padding: var(--s5) var(--s6) var(--s7); }
.page--narrow { max-width: 1100px; }
.page--center { margin-inline: auto; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
.page-head__title { display: grid; gap: 2px; }
.page-head__sub { color: var(--text-muted); font-size: var(--fs-sm); }
.page-head__actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.btn-row .input, .btn-row .select { width: auto; }
.breadcrumb { display: flex; gap: var(--s2); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--s2); }
.breadcrumb a { color: var(--text-muted); }
.section { margin-top: var(--s6); }
.section__head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.section__head .h3 + .muted { font-size: var(--fs-sm); }
.section__head > :last-child:not(:first-child) { margin-left: auto; }

/* 9 Karten, KPI-Kacheln, Raster -------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.card__head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.card__head .h4 { flex: 1; }
.card__body { padding: var(--s4); }
.card__foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); font-size: var(--fs-sm); }
.card--flush .card__body { padding: 0; }

.grid { display: grid; gap: var(--s4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }

/* KPI-Reihe: eine durchgehende Leiste mit Trennlinien statt Einzelkarten */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.kpi { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.kpi:first-child { border-left: 0; }
.kpi__label { font-size: var(--fs-sm); color: var(--text-muted); }
.kpi__value { font-size: var(--fs-3xl); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.kpi__value small { font-size: var(--fs-lg); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.kpi__note { font-size: var(--fs-sm); color: var(--text-muted); }
.kpi__note .ico { width: 14px; height: 14px; }
.kpi--alert .kpi__value { color: var(--st-theft); }
.kpi--alert { box-shadow: inset 0 3px 0 var(--st-theft); }
.kpi .progress { margin-top: var(--s2); }

/* Definitionsliste (Detailseiten) */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; font-variant-numeric: tabular-nums; }

/* 10 Tabellen -------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
.table th, .table td { padding: 9px var(--s3); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table thead th {
  position: sticky; top: 0; z-index: 1;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
  background: var(--surface-2); white-space: nowrap;
}
.table thead th a { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.table thead th[aria-sort] { color: var(--text); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover > * { background: var(--surface-2); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .col-check { width: 36px; padding-right: 0; }
.table .col-main { min-width: 300px; }
.table .progress { min-width: 72px; }
.table .progress-row { grid-template-columns: minmax(72px, 1fr) auto; }
.table td .sub:lang(ml) { font-size: var(--fs-md); line-height: 1.7; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table td .sub { display: block; font-size: var(--fs-sm); color: var(--text-muted); }
.table--dense th, .table--dense td { padding: 6px var(--s3); }
.table tr.is-selected > * { background: var(--primary-soft); }
/* Zeile mit Plausibilitätswarnung: Kante links */
.table tr.has-warning > :first-child { box-shadow: inset 3px 0 0 var(--warning); }
.table tr.has-alert > :first-child { box-shadow: inset 3px 0 0 var(--st-theft); }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line-strong); border-bottom: 0; }
.table-foot { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); font-size: var(--fs-sm); color: var(--text-muted); border-top: 1px solid var(--line); }
.table-foot .pager { margin-left: auto; display: flex; gap: var(--s1); }
.bulkbar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); background: var(--primary-soft); border: 1px solid var(--primary); border-radius: var(--r-md); margin-bottom: var(--s3); font-weight: 500; }
.bulkbar .btn-row { margin-left: auto; }

/* 11 Hinweise / Flash ------------------------------------------------------ */
.alert {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s3) var(--s4); margin-bottom: var(--s4);
  border: 1px solid; border-left-width: 4px; border-radius: var(--r-md);
  color: var(--text); background: var(--surface);
}
.alert > .ico { margin-top: 2px; width: 18px; height: 18px; }
.alert__body { flex: 1; }
.alert__title { font-weight: 600; }
.alert--info    { border-color: var(--info);    background: var(--info-bg); }    .alert--info > .ico { color: var(--info); }
.alert--success { border-color: var(--success); background: var(--success-bg); } .alert--success > .ico { color: var(--success); }
.alert--warning { border-color: var(--warning); background: var(--warning-bg); } .alert--warning > .ico { color: var(--warning); }
.alert--danger  { border-color: var(--danger);  background: var(--danger-bg); }  .alert--danger > .ico { color: var(--danger); }
.alert .btn--ghost { margin: -6px -8px -6px 0; }
/* Flash-Stapel unten rechts (Livewire-Events) — verdeckt weder Kopf noch Topbar */
.toasts { position: fixed; bottom: var(--s4); right: var(--s4); z-index: 60; display: grid; gap: var(--s2); width: min(380px, calc(100vw - 32px)); }
.toasts .alert { margin: 0; box-shadow: var(--shadow-pop); animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* 12 Modal ----------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--s5); background: rgba(12, 18, 26, .55); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.modal--wide { width: min(820px, 100%); }
.modal__head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.modal__head .h3 { flex: 1; }
.modal__body { padding: var(--s5); overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* 13 Leerzustand ----------------------------------------------------------- */
.empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s5); text-align: center; color: var(--text-muted); }
.empty > .ico { width: 32px; height: 32px; color: var(--text-faint); margin-bottom: var(--s1); }
.empty__title { font-weight: 600; color: var(--text); font-size: var(--fs-lg); }
.empty p { max-width: 42ch; margin: 0; }
.empty .btn { margin-top: var(--s2); }
.empty--compact { padding: var(--s5) var(--s4); }

/* 14 Fortschritt ----------------------------------------------------------- */
/* <progress class="progress" value="62" max="100"> — CSP-sicher */
.progress {
  appearance: none; -webkit-appearance: none; display: block;
  width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden;
  background: var(--surface-3); color: var(--primary);
}
.progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 3px; }
.progress::-webkit-progress-value { background: var(--primary); border-radius: 3px; }
.progress::-moz-progress-bar { background: var(--primary); border-radius: 3px; }
.progress--lg { height: 10px; border-radius: 5px; }
.progress--ok::-webkit-progress-value { background: var(--st-ok); }
.progress--ok::-moz-progress-bar { background: var(--st-ok); }
.progress--warn::-webkit-progress-value { background: var(--warning); }
.progress--warn::-moz-progress-bar { background: var(--warning); }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); }
.progress-row__label { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* Gestapelter Balken (Bestand nach Status) — SVG mit %-Rechtecken */
.stackbar { width: 100%; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.stackbar rect { shape-rendering: crispEdges; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--s2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.swatch--session { background: var(--primary-soft); border: 1px solid var(--primary); }
.swatch--active { background: var(--primary); }
.fill-open    { fill: var(--surface-3); }       .swatch.fill-open { background: var(--line-strong); }
.fill-assigned{ fill: #9db7d6; }                .swatch.fill-assigned { background: #9db7d6; }
.fill-review  { fill: var(--link); }            .swatch.fill-review { background: var(--link); }
.fill-done    { fill: var(--st-ok); }           .swatch.fill-done { background: var(--st-ok); }

/* 15 Tageszeitleiste (Sitzungen 0–24 h) ------------------------------------ */
/* SVG ohne viewBox; x/width in % = Minute/1440*100. Zeilen = Tage oder Personen. */
.daytl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px var(--s3); align-items: center; }
.daytl__row-label { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; padding: 6px 0; white-space: nowrap; }
.daytl__track { width: 100%; height: 34px; overflow: visible; }
.daytl__grid line { stroke: var(--line); stroke-width: 1; }
.daytl__grid line.is-major { stroke: var(--line-strong); }
.daytl__bg { fill: var(--surface-2); }
.daytl__session { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1; shape-rendering: crispEdges; }
.daytl__active  { fill: var(--primary); shape-rendering: crispEdges; }
.daytl__mark    { stroke: var(--st-theft); stroke-width: 2; }
.daytl__warn    { fill: var(--warning); }
.daytl__axis { display: grid; grid-template-columns: repeat(24, 1fr); font-size: var(--fs-xs); color: var(--text-faint); font-variant-numeric: tabular-nums; margin-top: 2px; }
.daytl__axis span { border-left: 1px solid transparent; padding-left: 2px; }
.daytl__axis span:nth-child(3n+1) { color: var(--text-muted); }

/* 16 Ereignisliste -------------------------------------------------------- */
.events { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 72px 22px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 8px var(--s4); border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event__time { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: var(--fs-sm); padding-top: 1px; }
.event__icon { color: var(--text-faint); padding-top: 2px; }
.event__icon .ico { width: 16px; height: 16px; }
.event__text { min-width: 0; }
.event__meta { font-size: var(--fs-sm); color: var(--text-muted); }
.event__aside { font-size: var(--fs-sm); color: var(--text-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.event--login .event__icon, .event--logout .event__icon { color: var(--primary); }
.event--failed .event__icon { color: var(--danger); }
.event--warn { background: var(--warning-bg); }
.event--warn .event__icon { color: var(--warning); }
.event--gap { grid-template-columns: 72px minmax(0, 1fr); color: var(--text-faint); font-size: var(--fs-sm); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 12px); }

/* 17 Login ----------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: var(--s5); }
.login__panel { width: min(400px, 100%); }
.login__brand { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.login__brand .brand__mark { width: 36px; height: 36px; }
.login__card { padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.login__card .h2 { margin-bottom: var(--s5); }
.login__lang { display: flex; justify-content: center; gap: var(--s1); margin-top: var(--s4); }
.login__note { margin-top: var(--s5); font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh); }
.login__foot { padding-top: var(--s5); font-size: var(--fs-xs); color: var(--text-faint); }

/* 18 Auswerter: Meine Videos ----------------------------------------------- */
.queue-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-bottom: var(--s5); }
.queue-head .btn--primary { margin-left: auto; }
/* T-1740 Fälle ziehen: Knopf + Pool-Zähler/Sperrhinweis darunter, „Fall zurückgeben" unter der Karte */
.queue-next { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); max-width: 100%; }
.queue-next .btn--primary { margin-left: 0; }
.queue-next__hint { font-size: var(--fs-sm); color: var(--text-muted, #6b7280); text-align: right; }
.casecard__giveback { display: flex; justify-content: flex-end; margin-top: calc(-1 * var(--s1)); }
.today { display: flex; flex-wrap: wrap; gap: var(--s5); padding: var(--s3) var(--s4); margin-bottom: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-muted); }
.today strong { color: var(--text); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; margin-right: 4px; }
.vlist { display: grid; gap: var(--s2); }
.vitem {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 220px auto; gap: var(--s4); align-items: center;
  padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  color: inherit; text-decoration: none;
}
a.vitem:hover { border-color: var(--line-strong); background: var(--surface-2); }
.vitem.is-current { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.vitem.is-done { opacity: .72; }
.vitem__main { min-width: 0; display: grid; gap: 2px; }
.vitem__title { font-weight: 600; }
.vitem__meta { font-size: var(--fs-sm); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 2px var(--s3); }
.vitem__meta > span { display: inline-flex; gap: 5px; align-items: center; }
.vitem__progress { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); }

/* Vorschaubild (Rahmen; Inhalt = <img> oder Platzhalter) */
.thumb {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  background: var(--stage); border-radius: var(--r-sm);
  display: grid; place-items: center; color: #56606b;
}
.thumb > img { width: 100%; height: 100%; object-fit: cover; }
.thumb--sm { width: 112px; }
.thumb__time { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; font-size: 11px; font-variant-numeric: tabular-nums; color: #e9edf1; background: rgba(10, 14, 18, .72); border-radius: 2px; }
.thumb__status { position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; display: grid; place-items: center; background: rgba(10,14,18,.72); border-radius: 50%; }
.thumb__status .ico { width: 15px; height: 15px; }

/* 19 Arbeitsplatz ---------------------------------------------------------- */
/*
  .ws (Grid)
  ├─ .ws-head        Titelzeile über volle Breite
  ├─ .ws-main        Spalte links: .player (.player__stage + .pctl + .sceneband) + .rating
  └─ .ws-side        Spalte rechts: .tabs + .tabpanel(s)
*/
.ws {
  height: calc(100vh - var(--topbar-h)); min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-w);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head head" "main side";
}
.ws-head {
  grid-area: head; display: flex; align-items: center; gap: var(--s4);
  padding: var(--s2) var(--s4); min-height: 52px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.ws-head__back { flex: none; }
.ws-head__title { min-width: 0; display: grid; }
.ws-head__name { font-weight: 600; font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-head__meta { font-size: var(--fs-sm); color: var(--text-muted); display: flex; gap: var(--s3); flex-wrap: wrap; line-height: 1.4; }
.ws-head__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.ws-head__progress { margin-left: auto; width: 220px; flex: none; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.ws-head__progress .progress-row__label b { color: var(--text); font-weight: 600; }
.ws-head__done { flex: none; display: grid; justify-items: end; gap: 2px; }
.ws-head__done-hint { font-size: var(--fs-xs); color: var(--text-muted); max-width: 240px; text-align: right; line-height: 1.4; }

.ws-main { grid-area: main; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: var(--s3) var(--s3) var(--s3) var(--s4); gap: var(--s3); }
.ws-side { grid-area: side; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }

/* Player */
.player { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.player__stage {
  position: relative; flex: 1 1 0; min-height: 160px;
  display: grid; place-items: center; background: var(--stage); overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
/* Video absolut in der Stage: passt IMMER vollständig hinein (contain), egal wie hoch Fallpanel/Leisten sind (Review K1). */
.player__video, .player__stage > .player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player__video::-webkit-media-controls { display: none !important; }
/* Overlays im Bild */
.player__osd { position: absolute; left: var(--s3); top: var(--s3); display: flex; gap: var(--s2); z-index: 3; }
.osd {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: #e9edf1;
  background: rgba(10, 14, 18, .72); border-radius: var(--r-sm);
}
.osd .ico { width: 15px; height: 15px; }
.player__state { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.player__state .ico { width: 64px; height: 64px; color: rgba(255,255,255,.85); padding: 14px; background: rgba(10,14,18,.55); border-radius: 50%; }
.player__loading { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); z-index: 3; animation: load 1.2s linear infinite; transform-origin: left; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: 0; } }

/* Wasserzeichen: Kachelung + feste Ecke. Liegt über dem Video, nimmt keine Klicks. */
.watermark {
  position: absolute; inset: -25%; z-index: 4; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 120px;
  align-items: center; justify-items: center;
  transform: rotate(-18deg);
  font: 600 13px/1 var(--font-latin), sans-serif; font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .13); white-space: nowrap;
  text-shadow: 0 0 2px rgba(0,0,0,.25);
}
.watermark__stamp {
  position: absolute; right: var(--s3); bottom: var(--s3); z-index: 5; pointer-events: none;
  padding: 3px 8px; font: 600 12px/1.3 var(--font-latin), sans-serif; font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .6); background: rgba(10, 14, 18, .45); border-radius: var(--r-sm);
}

/* Steuerleiste */
.pctl {
  display: flex; align-items: center; gap: var(--s1); flex-wrap: nowrap;
  padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--surface);
}
.pctl__group { display: flex; align-items: center; gap: 2px; }
.pctl__sep { width: 1px; height: 24px; background: var(--line); margin: 0 var(--s2); flex: none; }
.pctl__btn {
  position: relative; display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: var(--r-md); cursor: pointer;
}
.pctl__btn:hover { background: var(--surface-3); }
.pctl__btn .ico { width: 20px; height: 20px; }
.pctl__btn--play { width: 46px; height: 46px; color: var(--on-primary); background: var(--primary); border-radius: 50%; }
.pctl__btn--play:hover { background: var(--primary-hover); }
.pctl__btn--play .ico { width: 22px; height: 22px; }
.pctl__btn--play .ico-fill { fill: currentColor; }
.pctl__btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); }
.pctl__label { font-size: var(--fs-xs); color: var(--text-muted); margin-right: var(--s1); }
.pctl__time { font: 600 var(--fs-lg)/1 var(--font-latin), sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
.pctl__time .pctl__dur { color: var(--text-muted); font-weight: 400; }
.pctl__frame { font-size: var(--fs-xs); color: var(--text-faint); font-variant-numeric: tabular-nums; margin-left: var(--s2); white-space: nowrap; }
.pctl__spacer { flex: 1; }
.pctl .seg__item { min-height: 30px; padding: 0 9px; }

/* Szenenband: das zentrale Orientierungselement. SVG, x/width in % der Dauer.
   Zeilen: Szenen (Höhe+Muster = Status), darunter Abdeckung (gesichtet). */
.sceneband { position: relative; padding: var(--s2) var(--s3) var(--s1); border-top: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.sceneband__svg { width: 100%; height: 46px; overflow: visible; }
.sceneband__track { fill: var(--surface-3); }
.sceneband__seg { shape-rendering: crispEdges; }
.sceneband__seg.is-quiet      { fill: var(--st-quiet); }
.sceneband__seg.is-unchecked  { fill: var(--surface); stroke: var(--st-unchecked); stroke-width: 1.25; stroke-dasharray: 3 2; }
.sceneband__seg.is-ok         { fill: var(--st-ok); }
.sceneband__seg.is-suspicious { fill: url(#pat-suspicious); stroke: var(--st-suspicious); stroke-width: 1.25; }
.sceneband__seg.is-theft      { fill: url(#pat-theft); stroke: var(--st-theft); stroke-width: 1.5; }
.sceneband__seg.is-current    { stroke: var(--text); stroke-width: 2; stroke-dasharray: none; }
.sceneband__seg:hover         { filter: brightness(1.15); }
.sceneband__watched { fill: var(--primary); opacity: .85; shape-rendering: crispEdges; }
.sceneband__watched.is-fast { fill: var(--warning); }
.sceneband__watch-bg { fill: var(--surface-3); }
.sceneband__head line { stroke: var(--text); stroke-width: 2; }
.sceneband__head polygon { fill: var(--text); }
.sceneband__pin { color: var(--st-theft); }
.sceneband__pin.is-susp { color: var(--st-suspicious); }
.sceneband__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.sceneband__hover { position: absolute; bottom: calc(100% + 6px); padding: 4px 8px; font-size: var(--fs-xs); white-space: nowrap; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); pointer-events: none; }

/* Bewertungsleiste unter dem Player */
.rating {
  flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center;
  padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.rating__scene { display: grid; gap: 2px; min-width: 150px; }
.rating__scene-title { font-weight: 600; font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--s2); }
.rating__scene-meta { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rating__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.rate {
  position: relative; display: flex; align-items: center; gap: var(--s3);
  min-height: var(--hit-lg); padding: var(--s2) var(--s4);
  font: 600 var(--fs-lg)/1.3 var(--font); color: var(--text); text-align: left;
  background: var(--surface-2); border: 2px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.rate .ico { width: 26px; height: 26px; flex: none; }
.rate .kbd { margin-left: auto; }
.rate:hover:not(:disabled) { border-color: currentColor; }
.rate:disabled { opacity: .45; cursor: not-allowed; }
.rate--ok .ico { color: var(--st-ok); }
.rate--suspicious .ico { color: var(--st-suspicious); }
.rate--theft .ico { color: var(--st-theft); }
.rate--ok:hover:not(:disabled) { border-color: var(--st-ok); }
.rate--suspicious:hover:not(:disabled) { border-color: var(--st-suspicious); }
.rate--theft:hover:not(:disabled) { border-color: var(--st-theft); }
/* gewählt: Fläche getönt + kräftiger Rand + Haken-Kennung oben rechts */
.rate[aria-pressed="true"] { background: var(--surface-3); }
.rate--ok[aria-pressed="true"] { background: var(--st-ok-bg); border-color: var(--st-ok); }
.rate--suspicious[aria-pressed="true"] { background: var(--st-suspicious-bg); border-color: var(--st-suspicious); }
.rate--theft[aria-pressed="true"] { background: var(--st-theft-bg); border-color: var(--st-theft); }
.rate[aria-pressed="true"]::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 0; height: 0;
  border-style: solid; border-width: 0 18px 18px 0; border-color: transparent currentColor transparent transparent;
}
.rate--ok[aria-pressed="true"]::after { color: var(--st-ok); }
.rate--suspicious[aria-pressed="true"]::after { color: var(--st-suspicious); }
.rate--theft[aria-pressed="true"]::after { color: var(--st-theft); }
.rating__tools { display: flex; gap: var(--s2); }
.rating__tools .btn { min-height: var(--hit-lg); }
.rating__warn { grid-column: 1 / -1; margin: 0; font-size: var(--fs-sm); color: var(--warning); display: flex; gap: var(--s2); align-items: center; }

/* Seitenspalte: Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 var(--s1); flex: none; }
.tab {
  position: relative; flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: var(--s2) var(--s2); min-height: 46px;
  font: 600 var(--fs-md)/1.2 var(--font); color: var(--text-muted);
  background: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab.is-active { color: var(--text); }
.tab[aria-selected="true"]::after, .tab.is-active::after { content: ""; position: absolute; left: var(--s2); right: var(--s2); bottom: -1px; height: 3px; background: var(--primary); border-radius: 2px 2px 0 0; }
.tab__count { min-width: 20px; padding: 0 6px; font-size: var(--fs-xs); line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-muted); background: var(--surface-3); border-radius: 9px; }
.tab__count--alert { color: var(--on-status); background: var(--st-theft); }
.tabpanel { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tabpanel__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--surface); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-muted); }
.tabpanel__bar .seg { margin-left: auto; flex: none; }
/* Lange Beschriftungen (Malayalam, schmale Fenster): umbrechen statt rechts abschneiden. */
.tabpanel__bar { flex-wrap: wrap; row-gap: 6px; }
.tabpanel__bar > * { min-width: 0; }
.side-foot { flex: none; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px var(--s3); }
.side-foot span { display: inline-flex; gap: 4px; align-items: center; }

/* Szenenliste */
.scenes { list-style: none; margin: 0; padding: var(--s1) 0; }
.scene {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); align-items: start;
  padding: var(--s2) var(--s3); border-left: 3px solid transparent; cursor: pointer;
}
.scene:hover { background: var(--surface-2); }
.scene.is-current { background: var(--primary-soft); border-left-color: var(--primary); }
.scene__body { min-width: 0; display: grid; gap: 3px; }
.scene__title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s2); font-weight: 600; min-width: 0; }
.scene__title .chip { max-width: 100%; }
.scene__body > * { min-width: 0; } /* Szenenkarte bricht um statt rechts abzuschneiden (360-px-Spalte bei 1440 px) */
.scene__title .ico { width: 16px; height: 16px; }
.scene__time { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.scene__cover { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: center; font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.scene__cover .progress { height: 4px; }
.scene__extras { display: flex; gap: var(--s3); font-size: var(--fs-xs); color: var(--text-muted); }
.scene__extras span { display: inline-flex; gap: 3px; align-items: center; }
.scene__extras .ico { width: 13px; height: 13px; }
/* Ruhige Abschnitte: eingeklappt als schmale Zeile */
.scene--quiet { grid-template-columns: 112px minmax(0, 1fr); padding-top: 4px; padding-bottom: 4px; color: var(--text-faint); font-size: var(--fs-sm); }
.scene--quiet .scene__quietbar { height: 6px; border-radius: 3px; background: var(--st-quiet); align-self: center; }

/* Befund-Panel */
.finding-form { padding: var(--s3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.finding-form__head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.finding-form__head .h4 { flex: 1; }
.finding-form__ctx { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--fs-sm); }
.ctx { display: inline-flex; align-items: center; gap: 6px; padding: 3px var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.ctx .ico { width: 14px; height: 14px; color: var(--text-muted); }
.tpl-group { margin: 0 0 var(--s3); padding: 0; border: 0; min-width: 0; }
.tpl-group > legend { padding: 0; }
.tpl-group__title { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); margin-bottom: var(--s2); }
.tpl-group__title .ico { width: 14px; height: 14px; }
.tpl-list { display: grid; gap: 6px; }
/* Vorlage = großflächige Auswahlkachel (radio) */
.tpl {
  position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: var(--s2); align-items: start;
  padding: var(--s2) var(--s3); min-height: 44px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer;
}
.tpl:hover { border-color: var(--text-faint); }
.tpl input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--primary); }
.tpl__text { line-height: var(--lh); }
.tpl__sub { display: block; font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.4; margin-top: 2px; }
.tpl .kbd { margin-top: 2px; }
.tpl:has(input:checked), .tpl.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.tpl--theft { border-left: 3px solid var(--st-theft); }
.tpl--suspicious { border-left: 3px solid var(--st-suspicious); }
.tpl--info { border-left: 3px solid var(--st-unchecked); }
.finding-form__foot { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s3); }

/* Liste gespeicherter Befunde */
.findings { list-style: none; margin: 0; padding: 0; }
.finding { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s3); padding: var(--s3); border-bottom: 1px solid var(--line); }
.finding__body { min-width: 0; display: grid; gap: 4px; }
.finding__head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.finding__time { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.finding__text { line-height: var(--lh); }
.finding__trans { font-size: var(--fs-sm); color: var(--text-muted); display: flex; gap: 6px; align-items: flex-start; }
.finding__trans .ico { width: 14px; height: 14px; margin-top: 3px; flex: none; }

/* Standbild-Galerie */
.stills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); padding: var(--s3); }
.still { position: relative; display: grid; gap: 4px; margin: 0; cursor: zoom-in; }
.still .thumb { border: 1px solid var(--line); }
.still.is-selected .thumb { outline: 2px solid var(--primary); outline-offset: 1px; }
.still__cap { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.still__kind { display: inline-flex; gap: 3px; align-items: center; }
.still__kind .ico { width: 12px; height: 12px; }
.stills--lg { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 0; gap: var(--s3); }
.stills-group { padding: var(--s2) var(--s3) 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }

/* Befund-Detail (Admin) */
.finding-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s5); }
.finding-detail .thumb { border-radius: var(--r-md); }
.lang-pair { display: grid; gap: var(--s3); }
.lang-pair__item { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.lang-pair__label { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 4px; display: flex; gap: var(--s2); align-items: center; }

/* 20 Utilities ------------------------------------------------------------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stack { display: grid; gap: var(--s3); align-content: start; }
.stack--sm { gap: var(--s2); }
.row { display: flex; align-items: center; gap: var(--s2); }
.row--wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mb-0 { margin-bottom: 0 !important; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-right { text-align: right; }
.text-ok { color: var(--st-ok); } .text-warn { color: var(--warning); } .text-danger { color: var(--danger); }
.print-only { display: none; }

/* 21 Responsive ------------------------------------------------------------ */
/* Arbeitsplatz: Desktop ≥ 1280. Große Bildschirme bekommen breitere Spalte. */
@media (min-width: 1600px) {
  :root { --side-w: 420px; }
  .scene { grid-template-columns: 136px minmax(0, 1fr); }
  .scene--quiet { grid-template-columns: 136px minmax(0, 1fr); }
}
/* 1366×768: niedrige Höhe → Kopf/Leisten verdichten, Video behält Vorrang */
@media (max-height: 820px) {
  .ws-head { min-height: 46px; padding-top: 4px; padding-bottom: 4px; }
  .ws-main { gap: var(--s2); padding-top: var(--s2); padding-bottom: var(--s2); }
  .pctl { padding-top: 4px; padding-bottom: 4px; }
  .pctl__btn--play { width: 40px; height: 40px; }
  .sceneband__svg { height: 40px; }
  .rating { padding: var(--s2) var(--s3); }
  :root { --hit-lg: 50px; }
}
@media (max-width: 1440px) {
  .rating { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "scene scene" "choices tools"; row-gap: var(--s2); }
  .rating__scene { grid-area: scene; display: flex; align-items: baseline; gap: var(--s3); }
  .rating__choices { grid-area: choices; }
  .rating__tools { grid-area: tools; }
  .rating__warn { grid-area: scene; justify-self: end; align-self: center; max-width: 68%; text-align: right; } /* teilt sich die Zeile mit .rating__scene */
  .rating__scene-title { font-size: var(--fs-md); }
  .pctl__frame { display: none; }
}
@media (max-width: 1360px) {
  :root { --side-w: 340px; }
  .tab { font-size: var(--fs-sm); }
  .ws-head__progress { width: 170px; }
  .rate { padding: var(--s2) var(--s3); font-size: var(--fs-md); }
  .rate .kbd { display: none; }
}

/* Admin: optionale Tabellenspalten unter 1500 px ausblenden */
@media (max-width: 1500px) { .table .col-opt { display: none; } }

/* Admin: Tablet */
@media (max-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main-side, .finding-detail { grid-template-columns: minmax(0, 1fr); }
  .page { padding: var(--s4) var(--s4) var(--s6); }
  .vitem { grid-template-columns: 140px minmax(0, 1fr) auto; }
  .vitem__progress { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
  .shell--admin { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "nav" "main"; grid-template-rows: var(--topbar-h) auto 1fr; }
  .sidenav { position: static; height: auto; display: flex; gap: var(--s1); padding: var(--s2) var(--s3); overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidenav__group { display: contents; }
  .sidenav__title { display: none; }
  .sidenav__link { flex: none; margin: 0; }
  .sidenav__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--primary); }
  .topbar__meta .hide-tablet { display: none; }
  .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .daytl { grid-template-columns: 84px minmax(0, 1fr); }
  .daytl__axis span:not(:nth-child(3n+1)) { visibility: hidden; }
}
@media (max-width: 640px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .page-head__actions { margin-left: 0; }
  .vitem { grid-template-columns: minmax(0, 1fr); }
  .vitem__progress { grid-column: auto; }
  .filters__actions { margin-left: 0; }
  .event { grid-template-columns: 56px 18px minmax(0, 1fr); }
  .event__aside { grid-column: 3; }
  .brand__product { display: none; }
}

/* 22 Druck (Berichte, Befundlisten) ---------------------------------------- */
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  :root, .theme-dark {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #eee;
    --line: #bbb; --line-strong: #888; --text: #000; --text-muted: #333; --text-faint: #555;
    --st-ok: #0f7a5a; --st-suspicious: #8a5800; --st-theft: #a8300c; --on-status: #fff;
    --st-ok-bg: #fff; --st-suspicious-bg: #fff; --st-theft-bg: #fff; --st-unchecked-bg: #fff;
    color-scheme: light;
  }
  body { font-size: 10pt; background: #fff; }
  .topbar, .sidenav, .filters, .bulkbar, .btn, .page-head__actions, .toasts, .modal-backdrop,
  .table-foot .pager, .col-check, .col-actions, .no-print { display: none !important; }
  .shell, .shell--admin { display: block; min-height: 0; }
  .page { padding: 0; }
  .print-only { display: block; }
  .card, .table-wrap, .kpis { border-color: #999; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  .table thead th { position: static; background: #f0f0f0; }
  .table tr, .finding, .still { break-inside: avoid; }
  .table tbody tr:hover > *, .table tr.is-selected > * { background: none; }
  .section__head, h1, h2, h3 { break-after: avoid; }
  .finding-detail { grid-template-columns: 1fr 1fr; }
  .chip { border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
  .thumb { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 6pt; margin-bottom: 10pt; }
}

/* ===== Ergänzungen Frontend-Inkrement (2026-10-17) ========================= */
/* Sprachumschalter in der Topbar (kompakte Segmentauswahl) */
.topbar__lang { display: inline-flex; margin: 0; }
.seg--sm .seg__item { min-height: 26px; padding: 0 var(--s2); font-size: var(--fs-xs); }
.shell--admin .topbar .seg { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.shell--admin .topbar .seg__item { color: #d6e1ee; }
.shell--admin .topbar .seg__item[aria-pressed="true"] { background: rgba(255,255,255,.22); color: #fff; }
.topbar__meta form { margin: 0; }
/* Arbeitsplatz: anklickbare Listeneinträge, Großansicht Standbild */
.scene[data-seek], .finding[data-seek], .still[data-full] { cursor: pointer; }
.sceneband { cursor: pointer; }
.modal--wide .thumb > img { object-fit: contain; background: var(--stage, #000); }
.player:fullscreen { background: #000; }
.player:focus { outline: none; } /* tabindex=-1: Fokusziel für Tastenkürzel, kein Ring */
.tabpanel__bar .check { margin: 0; }
.ws-overlays { display: contents; }

/* ===== Fix-Durchgang Design-/Security-/QA-Review (2026-10-17) ============== */
/* Live-Punkt: Verbindung unterbrochen (heartbeat.js) */
.live-dot.is-offline { color: var(--warning); font-weight: 600; }
.live-dot.is-offline::before { background: var(--danger); animation: pulse 1.2s ease-in-out infinite; }
/* Szenenliste: Kennzeichen „unter 50 % gesehen" darf umbrechen */
.scene__extras { flex-wrap: wrap; align-items: center; }
.scene__extras .flag { font-size: var(--fs-xs); }
/* Tageszeitleiste: zusammengefasste Warnsymbole, Sitzungsliste */
.daytl__count { font-size: 11px; font-weight: 600; fill: var(--warning); font-variant-numeric: tabular-nums; }
.daytl__count--theft { fill: var(--st-theft); }
.daytl__axis { display: flex; }
.daytl__axis span { flex: 1 1 0; min-width: 0; overflow: hidden; }
.daytl__axis span:nth-child(3n+1) { color: var(--text-faint); }
.daytl__axis span.is-major { color: var(--text-muted); }
.sessions-list { margin-top: var(--s3); }
.sessions-list .table td, .sessions-list .table th { padding-top: 6px; padding-bottom: 6px; }
/* Protokoll: Statussymbol in Statusfarbe, Warnung als eigenes Kennzeichen neben der IP */
.event__aside { display: inline-flex; align-items: center; gap: var(--s2); }
/* Datumsfeld: Klartext-Anzeige TT.MM.JJJJ unter dem Feld */
.field__hint.tnum { font-variant-numeric: tabular-nums; }
/* Transparenzhinweis „Was wird erfasst?" (details/summary, ohne JS) */
.transparency { margin-top: var(--s4); font-size: var(--fs-sm); color: var(--text-muted); }
.transparency > summary { cursor: pointer; color: var(--link, var(--primary)); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.transparency > summary::-webkit-details-marker { display: none; }
.transparency[open] > summary { margin-bottom: var(--s2); }
.transparency ul { margin: var(--s2) 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.transparency p { margin: var(--s2) 0 0; }
.card .transparency { margin-top: 0; }
/* Dateiname gekürzt (voller Name im title) */
.filename { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* Befund schwerer als Szenenbewertung */
.flag--sev { color: var(--danger); background: var(--danger-bg); }
/* Maschinell übersetzt */
.mt-note { font-size: var(--fs-xs); color: var(--text-muted); display: inline-flex; gap: 4px; align-items: center; }
a.flag { text-decoration: none; }
a.flag:hover { text-decoration: underline; }
.transparency-card { margin-top: calc(-1 * var(--s3)); margin-bottom: var(--s5); }
.transparency-card .card__body { padding: var(--s3) var(--s4); }

/* ===== Forensik-Player (T-1724, an P-80 angeglichen) ======================= */
.pctl { position: relative; }
/* Zeitanzeige: absolute Uhrzeit (ms) groß, darunter Position · Bild */
.pctl__clock { display: grid; gap: 1px; min-width: 0; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pctl__abs { font: 600 var(--fs-md)/1.15 var(--font-latin), sans-serif; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: .01em; }
.pctl__tz { font-weight: 400; font-size: var(--fs-xs); color: var(--text-muted); }
.pctl__tz:empty { display: none; }
.pctl__rel { font-size: var(--fs-xs); color: var(--text-muted); }
.pctl__rel .pctl__dur { color: var(--text-faint); }
.pctl__clock .pctl__frame { margin-left: 0; font-size: inherit; }
.pctl__clock--norec .pctl__rel { font: 600 var(--fs-md)/1.15 var(--font-latin), sans-serif; color: var(--text); }
.pctl__hint { font-size: var(--fs-xs); color: var(--warning); white-space: normal; max-width: 220px; }
.pctl__btn:disabled, .pctl .seg__item:disabled { opacity: .45; cursor: not-allowed; }
.pctl__btn:disabled:hover { background: transparent; }
@media (max-width: 1440px) { .pctl__clock .pctl__frame { display: inline; } }
/* Zeitanzeige schrumpft nie (sonst schiebt sich „MESZ" unter „Springe zu"); Zonenkürzel mit fester Breite,
   damit MEZ/MESZ bzw. das spät gesetzte Kürzel nichts verschieben. */
.pctl__clock { flex: none; }
.pctl__tz { display: inline-block; min-width: 4.2ch; }
/* Tempo: ab 1440 px Segmentleiste, darunter Auswahlfeld (gleicher Zustand, −/+ wirken weiter) */
.pctl__ratesel { display: none; width: auto; min-height: 30px; height: 30px; padding: 0 26px 0 var(--s2);
  font: 500 var(--fs-sm)/1 var(--font-latin), sans-serif; font-variant-numeric: tabular-nums;
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; flex: none; }
.pctl__ratesel.is-fast { color: var(--warning); border-color: var(--warning); }
.pctl__ratesel:disabled { opacity: .45; cursor: not-allowed; }
.pctl__ratesel option { color: var(--text); background: var(--surface); }
@media (max-width: 1440px) {
  .pctl #pctl-rates, .pctl .pctl__label { display: none; }
  .pctl__ratesel { display: inline-block; }
}
/* „Springe zu Uhrzeit": Popover über der Steuerleiste */
.pjump {
  position: absolute; left: var(--s3); bottom: calc(100% + 6px); z-index: 8; min-width: 280px;
  display: grid; gap: var(--s1); padding: var(--s3);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
}
.pjump[hidden] { display: none; }
.pjump__label { font-weight: 600; font-size: var(--fs-sm); }
.pjump__row { display: flex; gap: var(--s2); }
.pjump__row .input { flex: 1 1 auto; font-variant-numeric: tabular-nums; }
.pjump__hint { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pjump__msg { font-size: var(--fs-xs); color: var(--warning); font-weight: 600; }
.pjump__msg:empty { display: none; }
/* Lade-/Pufferstatus im Bild */
.player__status {
  position: absolute; left: var(--s3); bottom: var(--s3); z-index: 3; pointer-events: none;
  padding: 3px 8px; font-size: var(--fs-sm); color: #e9edf1; background: rgba(10, 14, 18, .72); border-radius: var(--r-sm);
}
.player__status[hidden] { display: none; }
.player__state .empty[role="alert"] { max-width: 460px; padding: var(--s4); color: #e9edf1; background: rgba(10, 14, 18, .8); border-radius: var(--r-md); }
.player__state .empty[role="alert"] .ico { width: 32px; height: 32px; padding: 0; background: none; color: var(--warning); }
/* Befund-Markierungen auf der Zeitleiste (gruppiert, fokussierbar) */
.sceneband__pin { cursor: pointer; outline: none; }
.sceneband__pin.is-theft { color: var(--st-theft); }
.sceneband__pin.is-suspicious { color: var(--st-suspicious); }
.sceneband__pin.is-info { color: var(--text-muted); }
.sceneband__pin-hit { fill: transparent; pointer-events: all; }
.sceneband__pin:hover .sceneband__pin-hit, .sceneband__pin:focus-visible .sceneband__pin-hit { fill: var(--surface-3); stroke: var(--text); stroke-width: 1.5; }
.sceneband__pin-count { font: 700 10px/1 var(--font-latin), sans-serif; fill: var(--text); pointer-events: none; }
/* Befund in der Liste nach Klick auf die Markierung kurz hervorheben */
.finding.is-flash { background: var(--primary-soft); transition: background-color .6s; }
.help-note { margin-top: var(--s3); }


/* I7 Stempeluhr (Kopfzeile Auswerter, Sperrhinweis, Sperr-Overlay) --------- */
.topbar__nav { min-width: 0; }
.topbar__link { white-space: nowrap; }
.clockbar { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; padding: 2px 4px 2px var(--s2); border: 1px solid var(--line); border-radius: 999px; }
.clockbar form { display: inline; margin: 0; }
.clockbar .btn { white-space: nowrap; }
.clockbar__status { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.clockbar--working { border-color: var(--success); }
.clockbar--working .clockbar__status .ico { color: var(--success); }
.clockbar--break { border-color: var(--warning); }
.clockbar--break .clockbar__status .ico { color: var(--warning); }
.clockbar--off .clockbar__status .ico { color: var(--text-faint); }
.clockbar__today { color: var(--text-muted); }
.clockbar__label { font-size: var(--fs-xs); }
.clockbar__confirm { position: relative; }
.clockbar__confirm > summary { list-style: none; cursor: pointer; }
.clockbar__confirm > summary::-webkit-details-marker { display: none; }
.clockbar__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 300px; white-space: normal; padding: var(--s3); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-pop); }
.clockbar__pop p { margin: 0 0 var(--s2); }
.cb-short { display: none; }
/* Kompaktform unter 1920 px (Malayalam ist lang): Symbol + Uhrzeit + Kurzbeschriftung; Langtext bleibt für
   Screenreader (sr-only) und im title. */
@media (max-width: 1919px) {
  .cb-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cb-short { display: inline; }
  .clockbar { gap: 6px; }
  .topbar__meta { gap: var(--s2); }
}
@media (max-width: 1399px) {
  .live-dot [data-live-text] { font-size: var(--fs-xs); }
}
.clock-gate { margin: var(--s3) 0; }
.clock-gate p { margin: var(--s1) 0 var(--s2); }
/* Sperr-Overlay im Arbeitsplatz (offener Tab, Stempelstatus aus der Heartbeat-Antwort). */
.clock-lock { position: fixed; inset: var(--topbar-h, 48px) 0 0 0; z-index: 60; display: grid; place-items: center; background: rgba(10, 14, 18, .82); }
.clock-lock[hidden] { display: none; }
.clock-lock__box { max-width: 460px; padding: var(--s5); background: var(--surface); color: var(--text); border: 1px solid var(--warning); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); text-align: center; }
.clock-lock__box p { margin: var(--s2) 0 var(--s4); }
.att-corr .btn-row { flex-wrap: nowrap; }
.att-corr .btn { white-space: nowrap; }
/* Auswerter-Kopfzeile unter 1920 px (Review I7 Frontend K1): Produktname, Navigations- und Abmelde-Text sowie
   Benutzername nur noch für Screenreader/title — die Stempelleiste braucht den Platz. */
@media (max-width: 1919px) {
  .shell:not(.shell--admin) .brand__product { display: none; }
  .shell:not(.shell--admin) .topbar__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shell:not(.shell--admin) .topbar__user .latin { display: none; }
}
/* Unter 1280 px (Malayalam bei 1024 px lief ~55 px über): „Heute aktiv" nur noch für Screenreader, sichtbar bleibt
   Punkt + Stundenzahl (Langtext im title des Live-Punkts). */
@media (max-width: 1279px) {
  .shell:not(.shell--admin) .live-dot__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Auswerter-Kopfzeile ab 1920 px (Re-Review I7 M1): langer Benutzername wird gekürzt (voll im title), Marke und
   Navigation dürfen schrumpfen — Reserve für Windows-Scrollbar (17 px) und längere Stempeltexte. */
@media (min-width: 1920px) {
  .shell:not(.shell--admin) .topbar__user .latin { display: inline-block; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
}
/* Spalte auf die Fensterbreite begrenzen (sonst wächst die Kopfzeile mit dem Inhalt und nichts schrumpft). */
.shell:not(.shell--admin) { grid-template-columns: minmax(0, 1fr); }
.shell:not(.shell--admin) .brand { min-width: 0; overflow: hidden; }
/* Nur die Marke schrumpft; die Navigation nicht (und ohne overflow:hidden, sonst wird der Fokusrahmen abgeschnitten,
   Re-Review N1). Produktname ganz oder gar nicht: er bricht in eine unsichtbare zweite Zeile um, statt gekürzt zu
   werden (N3). */
.shell:not(.shell--admin) .topbar__nav { flex-shrink: 0; }
.shell:not(.shell--admin) .brand__name { display: flex; flex-wrap: wrap; column-gap: .3em; min-width: 0; height: 1.5em; line-height: 1.5; overflow: hidden; }
/* Offline am Live-Punkt immer kurz (Re-Review M2: Malayalam-Langtext lief selbst bei 1920 px über); Langtext für
   Screenreader + im title, die ausführliche Meldung kommt als Toast. */
.live-dot [data-live-offline] .cb-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.live-dot [data-live-offline] .cb-short { display: inline; }
/* Gesperrter Arbeitsplatz-Tab: Stempelleiste stammt vom Seitenladen und wäre veraltet → ausblenden (Review G3). */
.clock-locked .clockbar { visibility: hidden; }
/* 22 Fall (T-1726 I2) + Kamera-Vorschauen (T-1727 I3b) ----------------------- */
/* Fallpanel über dem Player: Kopfzeile, Kameraknöpfe (Vorschau zur selben Uhrzeit), Fall-Zeitleiste. */
.casepanel {
  flex: none; display: grid; gap: var(--s2); padding: var(--s2) var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.casepanel__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); font-size: var(--fs-sm); color: var(--text-muted); }
.casepanel__title { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.casepanel__meta { font-variant-numeric: tabular-nums; }
.casepanel__keys { margin-left: auto; }
.casepanel__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; }
.camlist { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s2); max-width: 62vw; overflow-x: auto; }
.camtile {
  position: relative; display: grid; gap: 3px; width: 152px; padding: 4px; text-align: left;
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
}
.camtile:hover { border-color: var(--line-strong); background: var(--surface-3); }
.camtile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.camtile.is-current { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); cursor: default; }
.camtile__img {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; width: 100%;
  background-color: var(--stage); background-repeat: no-repeat; border-radius: var(--r-sm); overflow: hidden;
}
.camtile__ph { color: #56606b; }
.camtile__ph .ico { width: 22px; height: 22px; }
.camtile__img.is-loaded .camtile__ph { display: none; }
.camtile.is-norec .camtile__img { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .05) 6px 12px) !important; }
.camtile__label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-sm); font-weight: 600; }
.camtile__label .kbd { flex: none; }
.camtile__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camtile__state { min-height: 1.3em; font-size: var(--fs-xs); color: var(--text-muted); }
.camtile.is-norec .camtile__state { color: var(--warning); }
.camtile.is-current .camtile__state { color: var(--primary); }

.casetl { min-width: 0; cursor: pointer; }
.casetl__svg { display: block; width: 100%; overflow: visible; }
.casetl__track { fill: var(--surface-2); }
.casetl__clip { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; transform: translateY(2px); }
.casetl__clip.is-current { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1.5; }
.casetl__clip.is-pending { stroke-dasharray: 3 2; }
.casetl__seen { fill: var(--primary); opacity: .85; shape-rendering: crispEdges; }
.casetl__label { font: 600 10px/1 var(--font-latin), var(--font-ml), sans-serif; fill: var(--text-muted); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.casetl__lane.is-current .casetl__label { fill: var(--text); }
.casetl__lane:hover .casetl__track { fill: var(--surface-3); }
.casetl__head { stroke: var(--text); stroke-width: 2; pointer-events: none; }
.casetl__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; padding-top: 2px; }

/* Abschluss-Dialog */
.case-summary__cams { margin: var(--s1) 0 0; padding-left: var(--s4); }
.case-result { margin: 0; padding: 0; border: 0; display: grid; gap: var(--s2); }
.case-result__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.case-choice {
  display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: var(--s2) var(--s3);
  font-weight: 600; background: var(--surface-2); border: 2px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer;
}
.case-choice .ico { width: 22px; height: 22px; flex: none; }
.case-choice input { margin: 0; }
.case-choice:has(input:checked) { background: var(--surface-3); }
.case-choice--ok:has(input:checked) { background: var(--st-ok-bg); border-color: var(--st-ok); }
.case-choice--suspicious:has(input:checked) { background: var(--st-suspicious-bg); border-color: var(--st-suspicious); }
.case-choice--theft:has(input:checked) { background: var(--st-theft-bg); border-color: var(--st-theft); }
.case-choice:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
#case-error[hidden], #case-warn[hidden], #case-unrated[hidden] { display: none; }

/* „Meine Fälle": Karten wie .vitem */
.casecard .vitem__title { display: flex; flex-wrap: wrap; gap: 0 6px; }
@media (max-width: 1100px) { .casepanel__body { grid-template-columns: minmax(0, 1fr); } .camlist { max-width: none; } }
@media (max-width: 1440px) { .casepanel__keys { display: none; } .camlist { max-width: 48vw; } }

/* Fallpanel einklappbar (Zustand in localStorage sva.casepanel.collapsed) */
.casepanel__toggle { margin-left: auto; }
.casepanel__keys + .casepanel__toggle { margin-left: 0; }
.casepanel__toggle .ico { transition: transform .15s; }
.casepanel.is-collapsed .casepanel__toggle .ico { transform: rotate(-90deg); }
.casepanel.is-collapsed .casepanel__body, .casepanel.is-collapsed .camlist, .casepanel.is-collapsed .casetl { display: none; }
.camtile__state:empty { display: none; }

/* Niedrige Fenster (1366×768, 1280×720): Fallpanel kompakt — Kacheln klein mit Text im Bild, Zeitleiste daneben,
   ohne Achse; Video behält Vorrang (Review K1: sichtbare Bildhöhe ≥ 300 px). */
@media (max-height: 820px) {
  .casepanel { padding: 4px var(--s2); gap: 2px var(--s3); grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "tiles head" "tiles tl"; }
  .casepanel.is-collapsed { grid-template-areas: "head head"; }
  .casepanel__head { grid-area: head; gap: 2px var(--s3); }
  .casepanel__body { display: contents; }
  .camlist { grid-area: tiles; align-self: start; gap: 4px; }
  .casetl { grid-area: tl; }
  .casetl__axis { display: none; }
  .camtile { width: 100px; padding: 2px; grid-template: "c" auto / 100%; gap: 0; }
  .camtile__img, .camtile__label, .camtile__state { grid-area: c; }
  .camtile__label { align-self: end; z-index: 1; padding: 1px 4px; font-size: var(--fs-xs); color: #e9edf1; background: rgba(10, 14, 18, .72); border-radius: 0 0 var(--r-sm) var(--r-sm); }
  .camtile__label .kbd { font-size: 10px; padding: 0 3px; }
  .camtile__state { align-self: start; justify-self: start; z-index: 1; min-height: 0; padding: 0 4px; font-size: 11px; line-height: 1.5; background: rgba(10, 14, 18, .72); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
  .camtile.is-current .camtile__state { color: #9cc6f0; }
  .camtile.is-norec .camtile__state { color: #e6b04c; }
  .ws-main { padding-top: 6px; padding-bottom: 6px; gap: 6px; }
  .rating__warn { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .rating__warn > span { overflow: hidden; text-overflow: ellipsis; }
  /* Kopfzeile des Fallpanels einzeilig: Kameraanzahl weg, Knopf nur Symbol */
  .casepanel__head { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .casepanel__meta--count { display: none; }
  .casepanel__toggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .casepanel__toggle { margin-left: auto; padding: 0 6px; min-height: 24px; }
  .camtile__state, .camtile__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
@media (max-height: 760px) {
  :root { --hit-lg: 44px; }
  .ws-head { min-height: 42px; }
  .pctl__btn { width: 34px; height: 34px; }
  .sceneband { padding-top: 4px; padding-bottom: 2px; }
  .sceneband__svg { height: 38px; }
  .sceneband__axis { display: none; } /* Zeiten stehen in der Steuerleiste; Fenster ≤ 760 px braucht die Höhe fürs Bild */
  .rating { row-gap: 4px; }
}
@media (max-width: 1360px) {
  .pctl__label { display: none; }
  .pctl .seg__item { padding: 0 7px; }
}
/* Malayalam: Tab-Beschriftungen in der Seitenleiste dürfen umbrechen statt sich zu überlappen */
:lang(ml) .tab { white-space: normal; text-align: center; line-height: 1.25; padding-inline: 4px; }
@media (max-width: 1440px) { :lang(ml) .tab { flex-direction: column; gap: 2px; padding-block: 4px; } }
