/* Payroll Precheck – Design
   Schrift: Overused Grotesk (SIL OFL, siehe fonts/OFL-OverusedGrotesk.txt), lokal eingebunden.
   Stil: helle, weiche Flaechen; taktile Buttons mit Verlauf, Lichtkante und feinem Ring;
   segmentierte Umschalter; Primaerfarbe Blau mit Verlauf. */
@font-face {
  font-family: "Overused Grotesk";
  src: url("fonts/OverusedGrotesk-VF.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f3f3f2;
  --surface: #ffffff;
  --surface-2: #f4f4f3;
  --surface-3: #ebebea;
  --border: #ebebea;
  --border-strong: #dcdcdb;
  --text: #1f1f1f;
  --text-2: #5b5b5a;
  --text-3: #8a8a88;
  --accent: #2965ec;
  --accent-2: #5c89f8;
  --accent-hover: #1f55d4;
  --accent-ring: #2459d6;
  --accent-soft: #eaf0fe;
  --accent-glow: rgba(75, 131, 253, .28);
  /* Primaerbutton: etwas dunkler, damit weisse Schrift ueberall >= 4,5:1 hat (WCAG AA) */
  --btn-blau-hell: #3a6fe8;
  --btn-blau-dunkel: #2258d8;
  --series-1: #2965ec;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --critical: #d03b3b;
  --critical-soft: #fcecec;
  --critical-text: #a42a2a;
  --warning: #fab219;
  --warning-soft: #fdf4de;
  --warning-text: #7a5300;
  --good: #0ca30c;
  --good-text: #006300;
  --good-soft: #e7f5e7;
  --info-soft: #f0f0ef;
  --info-text: #4d4d4b;
  --shadow-card: 0 1px 0 rgba(0,0,0,.02), 0 10px 30px -18px rgba(0,0,0,.18);
  --shadow-float: 0 1px 1px rgba(0,0,0,.04), 0 18px 40px -16px rgba(0,0,0,.22);
  --btn-bg: linear-gradient(#ffffff, #f3f3f2);
  --btn-ring: #dadad8;
  --btn-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px var(--btn-ring), 0 2px 3px -1px rgba(0,0,0,.12);
  --glass: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .7);
  --radius: 18px;
  --radius-s: 12px;
  --font: "Overused Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Dunkel: nach Systemeinstellung, ausser der Benutzer hat „Hell“ gewaehlt; oder fest per „Dunkel“ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #111111;
    --surface: #1a1a1a;
    --surface-2: #222222;
    --surface-3: #2b2b2b;
    --border: #2a2a2a;
    --border-strong: #363636;
    --text: #f2f2f0;
    --text-2: #c2c2be;
    --text-3: #8f8f8b;
    --accent: #5c89f8;
    --accent-2: #7aa0fa;
    --accent-hover: #7aa0fa;
    --accent-ring: #3d6fe8;
    --accent-soft: #1b2540;
    --series-1: #4f82f5;
    --series-2: #d95926;
    --series-3: #199e70;
    --critical-soft: #3a1f1f;
    --critical-text: #f19a9a;
    --warning-soft: #3a3020;
    --warning-text: #f7cf72;
    --good-text: #6fd06f;
    --good-soft: #1d311d;
    --info-soft: #252525;
    --info-text: #c2c2be;
    --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.8);
    --shadow-float: 0 18px 40px -16px rgba(0,0,0,.8);
    --btn-bg: linear-gradient(#2a2a2a, #222222);
    --btn-ring: #3a3a3a;
    --btn-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 0 1px var(--btn-ring), 0 2px 3px -1px rgba(0,0,0,.5);
    --glass: rgba(30, 30, 30, .62);
    --glass-border: rgba(255, 255, 255, .08);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #222222;
  --surface-3: #2b2b2b;
  --border: #2a2a2a;
  --border-strong: #363636;
  --text: #f2f2f0;
  --text-2: #c2c2be;
  --text-3: #8f8f8b;
  --accent: #5c89f8;
  --accent-2: #7aa0fa;
  --accent-hover: #7aa0fa;
  --accent-ring: #3d6fe8;
  --accent-soft: #1b2540;
  --series-1: #4f82f5;
  --series-2: #d95926;
  --series-3: #199e70;
  --critical-soft: #3a1f1f;
  --critical-text: #f19a9a;
  --warning-soft: #3a3020;
  --warning-text: #f7cf72;
  --good-text: #6fd06f;
  --good-soft: #1d311d;
  --info-soft: #252525;
  --info-text: #c2c2be;
  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -18px rgba(0,0,0,.8);
  --shadow-float: 0 18px 40px -16px rgba(0,0,0,.8);
  --btn-bg: linear-gradient(#2a2a2a, #222222);
  --btn-ring: #3a3a3a;
  --btn-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 0 1px var(--btn-ring), 0 2px 3px -1px rgba(0,0,0,.5);
  --glass: rgba(30, 30, 30, .62);
  --glass-border: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 450 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
b, strong { font-weight: 650; }
h1 { font-size: 28px; line-height: 1.12; margin: 0; font-weight: 650; letter-spacing: -.025em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.klein { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Wortmarke: zwei Zeilen, eng gesetzt, mit blauem Punkt */
.wortmarke { display: inline-flex; flex-direction: column; font-family: var(--font); font-weight: 700; font-size: 15px; line-height: .86; letter-spacing: -.045em; color: var(--text); text-transform: lowercase; font-style: oblique 6deg; }
.wortmarke .punkt { display: inline-block; width: .3em; height: .3em; border-radius: 50%; background: linear-gradient(var(--accent), var(--accent-2)); margin-left: .07em; box-shadow: 0 0 0 .06em var(--surface), 0 1px 4px var(--accent-glow); }
.wortmarke.gross { font-size: 30px; }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.marke { display: flex; align-items: center; color: var(--text); white-space: nowrap; }
.marke:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 13px; margin-right: auto; box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.nav a { color: var(--text-2); padding: 6px 13px; border-radius: 10px; font-weight: 550; font-size: 13.5px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.aktiv { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03); }
.wer { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 13px; white-space: nowrap; }

main { max-width: 1320px; margin: 0 auto; padding: 22px 24px 140px; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.kopf p { margin: 6px 0 0; }

.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.karte-innen { padding: 22px 24px; }
.karte > .tabelle-wrap:first-child, .karte > table:first-child { border-radius: var(--radius); }
.raster { display: grid; gap: 16px; }

/* Buttons: taktil mit Verlauf, Lichtkante und feinem Ring */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: var(--btn-bg); color: var(--text); padding: 9px 16px; border-radius: var(--radius-s); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--btn-shadow); transition: transform .06s, box-shadow .15s, filter .15s; }
.btn:hover { text-decoration: none; filter: brightness(.985); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--btn-ring); }
/* Primaer: Ruhe = nach aussen gewoelbt (hell oben), Hover = nach innen (dunkel oben), Klick = gedrueckt */
.btn.primaer { background: linear-gradient(var(--btn-blau-hell), var(--btn-blau-dunkel)); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 0 1px var(--accent-ring), 0 2px 10px var(--accent-glow); }
.btn.primaer:hover, .btn.primaer:active { filter: none; background: linear-gradient(var(--btn-blau-dunkel), var(--btn-blau-hell)); }
.btn.primaer:active { box-shadow: inset 0 1px 3px rgba(0,0,0,.2), 0 0 0 1px var(--accent-ring); }
.btn.leise { background: transparent; box-shadow: none; color: var(--text-2); }
.btn.leise:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 20px 22px; }
.kpi .label { color: var(--text-2); font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.kpi .label::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.kpi:first-child .label::before { background: linear-gradient(var(--accent), var(--accent-2)); box-shadow: none; }
.kpi .wert { font-size: 38px; font-weight: 650; letter-spacing: -.035em; margin-top: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--text-3); font-size: 12.5px; margin-top: 8px; }

/* Diagramm */
.chart-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legende { display: flex; gap: 16px; color: var(--text-2); font-size: 12.5px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; margin-top: 14px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gitter line { stroke: var(--border); stroke-width: 1; }
.chart .achse text { fill: var(--text-3); font-size: 10px; font-family: var(--font); }
.chart .balken rect.hit { fill: transparent; }
.tooltip { position: absolute; pointer-events: none; background: #1c1c1c; color: #f5f5f4; border-radius: 10px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0,0,0,.22); opacity: 0; transform: translate(-50%, -100%); white-space: nowrap; transition: opacity .08s; z-index: 5; }
.tooltip b { font-weight: 650; }
.tooltip .zeile { display: flex; align-items: center; gap: 6px; }
.tooltip .zeile i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12.5px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tabelle-wrap { overflow-x: auto; border-radius: var(--radius); }
.klickbar { cursor: pointer; }

/* Status und Typ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.fehler { background: var(--critical-soft); color: var(--critical-text); }
.badge.fehler::before { background: var(--critical); }
.badge.hinweis { background: var(--warning-soft); color: var(--warning-text); }
.badge.hinweis::before { background: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info-text); }
.badge.in_pruefung { background: var(--accent-soft); color: var(--accent); }
.badge.gesendet { background: var(--warning-soft); color: var(--warning-text); }
.badge.abgeschlossen { background: var(--good-soft); color: var(--good-text); }
.badge.demo { background: var(--surface-2); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); }
.badge.demo::before { display: none; }
.badge.behoben { background: var(--good-soft); color: var(--good-text); }
.badge.behoben::before { content: "✓"; width: auto; height: auto; background: none; font-size: 11px; }

/* Befunde: Filter als segmentierter Umschalter */
.filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.segment { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 11px; box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.chip { border: 0; background: transparent; color: var(--text-2); border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.an { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03); }
.filter select, .filter input[type=search] { font: inherit; font-size: 13px; padding: 7px 10px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.filter input[type=search] { min-width: 200px; }
.befunde td.erklaerung { min-width: 320px; max-width: 540px; color: var(--text-2); }
.befunde td.erklaerung .pruefung { color: var(--text); font-weight: 650; display: block; margin-bottom: 2px; }
.befunde tr.aus td:not(.wahl) { opacity: .42; }
.befunde tr.aus td.erklaerung .pruefung { text-decoration: line-through; }
.befunde tr.behoben td:not(.wahl):not(.status-zelle) { opacity: .55; }
.befunde tr.behoben + tr.behoben td { border-top: 0; }
.befunde tr.trenner td { background: var(--surface-2); color: var(--text-3); font-size: 12.5px; font-weight: 600; padding: 8px 14px; }
.war { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 4px; white-space: nowrap; }
.behoben-info { margin-top: 8px; font-size: 12.5px; color: var(--good-text); }
.befund-aktion { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.mini { padding: 4px 10px; font-size: 12.5px; border-radius: 9px; }
.schalter { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; margin-left: auto; }
.schalter input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.wahl { width: 48px; text-align: center; }
.wahl input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; cursor: pointer; vertical-align: middle; background: var(--btn-bg); box-shadow: var(--btn-shadow); display: inline-grid; place-content: center; }
.wahl input:checked { background: linear-gradient(var(--accent), var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 1px var(--accent-ring), 0 1px 4px var(--accent-glow); }
.wahl input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.wahl input:disabled { opacity: .5; cursor: not-allowed; }
.anmerkung { width: 100%; margin-top: 8px; font: inherit; font-size: 13px; padding: 6px 9px; border: 0; border-radius: 9px; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px transparent; }
.anmerkung:hover { background: var(--surface-2); }
.anmerkung:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); outline: none; }
.anmerkung::placeholder { color: var(--text-3); }
.person { white-space: nowrap; font-weight: 550; color: var(--text); }
.person .nr { color: var(--text-3); font-size: 12px; font-weight: 450; }
.diff-neg { color: var(--critical-text); }

/* Leiste unten: schwebend, Milchglas */
.leiste { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 1272px; margin: 0 auto; z-index: 10;
  background: var(--glass); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255,255,255,.5); }
.leiste-innen { padding: 10px 10px 10px 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leiste .zaehler { flex: 1; min-width: 200px; }
.leiste .zaehler b { font-size: 16px; }
.leiste form { display: inline-flex; }

/* Reiter als segmentierter Umschalter */
.reiter { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 13px; margin: 26px 0 14px; box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.reiter button { border: 0; background: transparent; font: inherit; font-weight: 550; font-size: 13.5px; color: var(--text-2); padding: 6px 14px; border-radius: 10px; cursor: pointer; }
.reiter button.an { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03); }
.reiter .zahl { color: var(--text-3); font-weight: 500; margin-left: 5px; }
.reiter a { font-weight: 550; font-size: 13.5px; color: var(--text-2); padding: 6px 14px; border-radius: 10px; }
.reiter a:hover { color: var(--text); text-decoration: none; }
.reiter a.an { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.03); }
.tarif { font-size: 22px; letter-spacing: -.02em; }

.firmen { display: flex; gap: 12px; flex-wrap: wrap; }
.firma { padding: 14px 18px; min-width: 240px; }
.firma .name { font-weight: 650; }
.firma .zahlen { color: var(--text-2); font-size: 13px; margin-top: 3px; }

.hinweisbox { border-radius: 14px; padding: 13px 16px; margin-bottom: 16px; font-size: 13.5px; }
.hinweisbox.warn { background: var(--warning-soft); color: var(--warning-text); }
.hinweisbox.info { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.hinweisbox.info b { color: var(--text); }
.hinweisbox ul { margin: 6px 0 0; padding-left: 18px; }
.flash { background: var(--critical-soft); color: var(--critical-text); border-radius: 12px; padding: 11px 15px; margin-bottom: 16px; }
.flash.ok { background: var(--good-soft); color: var(--good-text); }

/* Formulare */
.formular { max-width: 720px; }
.feld { margin-bottom: 22px; }
.feld label.titel { display: block; font-weight: 650; margin-bottom: 4px; }
.feld .hilfe { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.ablage { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.ablage input[type=file] { font: inherit; font-size: 13px; color: var(--text-2); }
.ablage input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; border: 0; border-radius: 10px; padding: 7px 13px; margin-right: 10px; background: var(--btn-bg); color: var(--text); box-shadow: var(--btn-shadow); cursor: pointer; }
.ablage .gewaehlt { font-size: 13px; color: var(--text); font-weight: 600; }
.ablage .gewaehlt.leer-hinweis { color: var(--text-3); font-weight: 450; }
.ablage-knoepfe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Eigener Knopf statt des Browser-Dateiwählers (der ist je nach Browser englisch und ungestylt) */
.datei-knopf { position: relative; }
.datei-knopf input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.datei-knopf:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=month], input[type=text], input[type=password], select, textarea { font: inherit; padding: 9px 12px; border: 0; border-radius: 11px; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
input[type=month]:focus, input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
input[readonly] { color: var(--text-2); }

/* Anmeldung */
.login-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 400px; padding: 32px; border-radius: 24px; box-shadow: var(--shadow-float); }
.login .wortmarke { margin-bottom: 30px; }
.login h1 { font-size: 24px; }
.login label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 13px; color: var(--text-2); }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 22px; padding: 11px; }

/* Dialog */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(760px, 92vw); background: var(--surface); color: var(--text); box-shadow: 0 30px 70px rgba(0,0,0,.3), 0 0 0 1px var(--border); }
dialog::backdrop { background: rgba(0,0,0,.3); backdrop-filter: blur(3px); }
dialog .innen { padding: 22px 24px; }
dialog textarea { width: 100%; height: 340px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
dialog .aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(10px); background: #1c1c1c; color: #f5f5f4; padding: 10px 16px; border-radius: 12px; font-weight: 550; opacity: 0; transition: all .18s; z-index: 30; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.zeigen { opacity: 1; transform: translateX(-50%) translateY(0); }

.leer { padding: 56px 24px; text-align: center; color: var(--text-2); }
.leer h2 { color: var(--text); }
.annahmen { color: var(--text-3); font-size: 12.5px; margin-top: 12px; }
.protokoll td { font-size: 13px; }

/* Einstellungen, Lohnbuero */
.raster-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.wahlkarten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 20px; }
.wahlkarte { border-radius: 14px; padding: 14px 16px; cursor: pointer; display: block; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s, background .15s; }
.wahlkarte:has(input:checked) { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.wahlkarte input { margin: 0 6px 0 0; accent-color: var(--accent); }
.wahlkarte b { font-weight: 650; }
.wahlkarte .muted { display: block; font-size: 12.5px; margin-top: 5px; }
.formzeile { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formzeile label, .feldblock label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.formzeile input, .feldblock input, .feldblock select, .formzeile select { width: 100%; }
.feldblock { margin-bottom: 14px; }
.feldblock[hidden] { display: none; }
.linkbox { display: flex; gap: 8px; margin-top: 10px; }
.linkbox input { flex: 1; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.badge.lb-offen { background: var(--surface-2); color: var(--text-2); }
.badge.lb-korrigiert { background: var(--good-soft); color: var(--good-text); }
.badge.lb-korrekt { background: var(--accent-soft); color: var(--accent); }
.badge.lb-rueckfrage { background: var(--warning-soft); color: var(--warning-text); }
.lb-antwort { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; font-size: 13px; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.lb-antwort .wer { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px; }
.antwortfeld { display: flex; flex-direction: column; gap: 6px; min-width: 270px; }
.antwortfeld select { padding: 7px 10px; font-size: 13px; }
.antwortfeld textarea { font-size: 13px; resize: vertical; min-height: 60px; }
.fortschritt { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.fortschritt div { height: 100%; background: linear-gradient(90deg, var(--good), #3cc23c); border-radius: 999px; }

/* Speicherstatus beim automatischen Speichern */
.speicher { display: block; font-size: 12px; color: var(--text-3); min-height: 16px; margin-top: 4px; }
.speicher[data-zustand=offen] { color: var(--warning-text); }
.speicher[data-zustand=speichert] { color: var(--text-2); }
.speicher[data-zustand=ok] { color: var(--good-text); }
.speicher[data-zustand=fehler], .speicher[data-zustand=abgelehnt] { color: var(--critical-text); font-weight: 600; }
.anmerkung + .speicher:empty { display: none; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .raster-2 { grid-template-columns: 1fr; }
  .nav a { padding: 6px 9px; }
  .wer .name { display: none; }
}
@media (max-width: 560px) {
  .chart { overflow-x: auto; }
  .chart svg { min-width: 680px; }
  .chart .achse text { font-size: 16px; }
  .top-inner { gap: 10px; padding: 0 16px; height: 58px; }
  .wortmarke { font-size: 13px; }
  main { padding: 16px 16px 160px; }
  h1 { font-size: 24px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 16px; }
  .kpi .wert { font-size: 28px; }
  .wahlkarten { grid-template-columns: 1fr; }
  .leiste { left: 8px; right: 8px; bottom: 8px; }
}

/* Zwei-Faktor-Anmeldung */
.login.breit { max-width: 460px; }
.login a.btn { display: block; text-align: center; text-decoration: none; }
.schmal { max-width: 560px; }
.code-feld { font: 600 18px ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .12em; }
.schritte { margin: 16px 0 6px; padding-left: 20px; display: grid; gap: 14px; }
.schritte label { display: block; font-weight: inherit; color: inherit; font-size: inherit; margin: 0 0 8px; }
.schritte input { width: 100%; max-width: 240px; }
.mfa-qr { margin: 12px 0 8px; }
.mfa-qr svg { display: block; width: 220px; max-width: 100%; height: auto; aspect-ratio: 1; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--border); }
.mfa-schluessel { display: inline-block; margin-top: 6px; font-size: 13px; user-select: all; }
.mfa-codes { list-style: none; padding: 14px 16px; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px;
  font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border-radius: 12px; user-select: all; }
.haken { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; cursor: pointer; }
.haken input { margin-top: 3px; }

/* Cookie-Hinweis: Karte unten links, zwei Knöpfe */
.cookie { position: fixed; left: 24px; bottom: 24px; z-index: 40; width: 400px; max-width: calc(100vw - 32px); padding: 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: var(--shadow-float); }
.cookie[hidden] { display: none; }
.cookie h2 { margin: 0 0 8px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.cookie p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.cookie-link { font-size: 12.5px; color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.cookie-link:hover { color: var(--text); }
.cookie-knoepfe { display: flex; gap: 8px; margin-top: 16px; }
.cookie .btn { width: auto; margin: 0; padding: 9px 16px; font-size: 13px; border-radius: 12px; }
@media (max-width: 640px) { .cookie { left: 16px; right: 16px; bottom: 16px; width: auto; } }

/* Datenschutzhinweise (ohne Anmeldung erreichbar) */
.rechtstext { max-width: 760px; margin: 0 auto; padding: 48px 24px 120px; }
.rechtstext .wortmarke { margin-bottom: 36px; }
.rechtstext h1 { font-size: 30px; margin: 0 0 6px; }
.rechtstext h2 { font-size: 18px; margin: 34px 0 8px; }
.rechtstext p, .rechtstext li { color: var(--text-2); line-height: 1.6; }
.rechtstext ul { padding-left: 20px; }
.rechtstext table { margin: 10px 0; }
.rechtstext td, .rechtstext th { vertical-align: top; }
.rechts-links { text-align: center; margin-top: 18px; font-size: 12.5px; }
.rechts-links a { color: var(--text-3); }
