/* Lead-Crawler-Oberfläche: Tokens und Bausteine, übernommen aus dem freigegebenen Entwurf
   docs/entwurf/entwurf.css (G1, 2026-11-20). Farben und Schrift in E2 an zackmatt.de angelehnt
   (Navy, Gelb für die Hauptaktion, Geist); Kontraste geprüft, siehe DESIGN.md.
   Ergänzungen von D1 (Navigation am Telefon, Kampagnenwahl, Belegkarte als Popover) stehen am Ende.
   Namen aus docs/oberflaeche-konzept.md 7.5, ergänzt um --on-accent, --accent-hover, --bar, --seq-1..4. */

:root {
  color-scheme: light;
  --bg: #F0F2F4;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --line: #DEE4E8;
  --line-strong: #7D8D99;
  --text: #001A2B;
  --text-muted: #4A5B67;
  --accent: #0B5C8E;
  --accent-hover: #084873;
  --accent-weak: #E3EEF6;
  --on-accent: #FFFFFF;
  --ok: oklch(0.47 0.11 150);
  --ok-weak: oklch(0.955 0.03 150);
  --warn: oklch(0.52 0.11 70);
  --warn-weak: oklch(0.96 0.04 85);
  --danger: oklch(0.51 0.17 27);
  --danger-weak: oklch(0.955 0.02 27);
  --running: var(--accent);
  --neutral-mark: #E6EAED;
  --bar: #C9D2D8;
  --seq-1: #0B5C8E;
  --seq-2: #3F82AE;
  --seq-3: #7AAACB;
  --seq-4: #B6D1E3;
  --shadow-overlay: 0 8px 24px rgb(0 26 43 / 0.14), 0 2px 6px rgb(0 26 43 / 0.08);
  /* E2, angelehnt an zackmatt.de: Navy für Kopf und Navigation, Gelb für die Hauptaktion */
  --navy: #00121E;
  --nav-text: #FFFFFF;
  --nav-muted: #9FB0BC;
  --nav-hover: rgb(255 255 255 / 0.06);
  --nav-aktiv: rgb(255 255 255 / 0.10);
  --nav-line: rgb(255 255 255 / 0.12);
  --haupt: #FFD60A;
  --haupt-hover: #FFDE2E;
  --haupt-rand: #E6BD00;
  --on-haupt: #001A2B;

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;   --lh-xs: 1rem;
  --text-sm: 0.8125rem; --lh-sm: 1.125rem;
  --text-md: 0.875rem;  --lh-md: 1.25rem;
  --text-lg: 1rem;      --lh-lg: 1.375rem;
  --text-xl: 1.25rem;   --lh-xl: 1.625rem;
  --text-2xl: 1.75rem;  --lh-2xl: 2rem;
  --text-3xl: 2.25rem;  --lh-3xl: 2.5rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s10: 40px;
  --radius-sm: 4px; --radius-md: 6px; --radius-pille: 100px;
  --dur-fast: 120ms; --dur: 180ms; --ease: cubic-bezier(.2, 0, 0, 1);
  --sidebar: 216px; --panel: 440px; --row: 32px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #00121E;
  --surface: #001A2B;
  --surface-2: #06253A;
  --line: #173447;
  --line-strong: #5F7A8C;
  --text: #F2F5F7;
  --text-muted: #A3B4C0;
  --accent: #8CCBF2;
  --accent-hover: #B3DDF7;
  --accent-weak: #0B3550;
  --on-accent: #00121E;
  --ok: oklch(0.76 0.12 150);
  --ok-weak: oklch(0.29 0.04 150);
  --warn: oklch(0.81 0.12 80);
  --warn-weak: oklch(0.30 0.04 80);
  --danger: oklch(0.74 0.13 27);
  --danger-weak: oklch(0.30 0.05 27);
  --neutral-mark: #12324A;
  --bar: #2B4A5E;
  --seq-1: #B3DDF7;
  --seq-2: #8CCBF2;
  --seq-3: #4E93C0;
  --seq-4: #2B6A94;
  --shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.4);
  --navy: #000C14;
  --nav-line: rgb(255 255 255 / 0.10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #00121E;
    --surface: #001A2B;
    --surface-2: #06253A;
    --line: #173447;
    --line-strong: #5F7A8C;
    --text: #F2F5F7;
    --text-muted: #A3B4C0;
    --accent: #8CCBF2;
    --accent-hover: #B3DDF7;
    --accent-weak: #0B3550;
    --on-accent: #00121E;
    --ok: oklch(0.76 0.12 150);
    --ok-weak: oklch(0.29 0.04 150);
    --warn: oklch(0.81 0.12 80);
    --warn-weak: oklch(0.30 0.04 80);
    --danger: oklch(0.74 0.13 27);
    --danger-weak: oklch(0.30 0.05 27);
    --neutral-mark: #12324A;
    --bar: #2B4A5E;
    --seq-1: #B3DDF7;
    --seq-2: #8CCBF2;
    --seq-3: #4E93C0;
    --seq-4: #2B6A94;
    --shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.4);
    --navy: #000C14;
    --nav-line: rgb(255 255 255 / 0.10);
  }
}

/* Schrift Geist und Geist Mono, lokal (OFL 1.1, @fontsource 5.3.0, Lizenz in static/schrift/) */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/schrift/geist-latin-400-normal.woff2") format("woff2") }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/schrift/geist-latin-500-normal.woff2") format("woff2") }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/schrift/geist-latin-600-normal.woff2") format("woff2") }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/schrift/geist-mono-latin-400-normal.woff2") format("woff2") }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/schrift/geist-mono-latin-500-normal.woff2") format("woff2") }

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--text-md)/var(--lh-md) var(--font);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased }
::selection { background: var(--accent-weak); color: var(--text) }
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline; text-underline-offset: 3px }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px }
h1, h2, h3 { margin: 0; text-wrap: balance }
p { text-wrap: pretty }
p { margin: 0 }
code, .mono { font-family: var(--mono); font-size: 0.92em }
svg.sym { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px }
.leise { color: var(--text-muted) }
.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
kbd { font: 500 11px/1 var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px;
  padding: 2px 4px; color: var(--text-muted); background: var(--surface) }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent }

/* Rahmen: Seitenleiste | Inhalt | Panel */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh }
.app.mit-panel { grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--panel) }
.seitenleiste { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  gap: var(--s4); padding: var(--s3) var(--s2); position: sticky; top: 0; height: 100vh }
.kampagnenwahl { display: flex; align-items: center; gap: var(--s2); width: 100%; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--radius-md); padding: 6px var(--s2); font: inherit; color: var(--text); text-align: left; cursor: pointer }
.kampagnenwahl .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kampagnenwahl small { display: block; font-size: var(--text-xs); color: var(--text-muted); font-weight: 400 }
.nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none }
.nav a { display: flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s2); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none }
.nav a:hover { background: var(--line) }
.nav a[aria-current="page"] { background: var(--accent-weak); color: var(--accent); font-weight: 500 }
.nav .anzahl { margin-left: auto; font-size: var(--text-xs); color: var(--text-muted) }
.nav-titel { font-size: var(--text-xs); color: var(--text-muted); padding: 0 var(--s2); margin-bottom: 2px }
.lauf-anzeige { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s2); border-radius: var(--radius-sm);
  color: var(--accent); background: var(--accent-weak); font-size: var(--text-sm); font-weight: 500; text-decoration: none }
.lauf-anzeige .leise { font-weight: 400 }
.puls { width: 8px; height: 8px; border-radius: 50%; background: var(--running); flex: none; animation: puls 2s ease-in-out infinite }
@keyframes puls { 50% { opacity: .35 } }
.seitenleiste .unten { margin-top: auto; display: flex; flex-direction: column; gap: var(--s3) }
.nutzer { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2); font-size: var(--text-sm); color: var(--text-muted) }
.thema { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 0 var(--s2) }
.thema button { font: var(--text-xs)/1 var(--font); color: var(--text-muted); background: var(--surface); border: 0; padding: 6px 0; cursor: pointer }
.thema button + button { border-left: 1px solid var(--line) }
.thema button[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent); font-weight: 500 }
.kopfleiste { display: none }

.inhalt { min-width: 0; display: flex; flex-direction: column }
.kopf { display: flex; align-items: flex-end; gap: var(--s4); padding: var(--s6) var(--s6) var(--s4) }
.kopf h1 { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 600 }
.kopf .kontext { color: var(--text-muted); margin-top: 2px }
.kopf .aktionen { margin-left: auto; display: flex; gap: var(--s2); align-items: center }
.bereich { padding: 0 var(--s6) var(--s8) }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 var(--s3);
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 500 var(--text-md)/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease) }
.knopf:hover { background: var(--surface-2); text-decoration: none }
.knopf.haupt { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.knopf.haupt:hover { background: var(--accent-hover); border-color: var(--accent-hover) }
.knopf.gefahr { background: var(--danger); border-color: var(--danger); color: var(--on-accent) }
.knopf.still { border-color: transparent; background: transparent; color: var(--text-muted) }
.knopf.still:hover { background: var(--surface-2); color: var(--text) }
.knopf.klein { height: 24px; padding: 0 var(--s2); font-size: var(--text-sm) }
.knopf:disabled, .knopf[aria-disabled="true"] { background: var(--surface-2); border-color: var(--line); color: var(--text-muted); cursor: not-allowed }
.knopf.laedt { color: var(--text-muted); cursor: progress }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer }

/* Marken, Belegmarken, Sperrvermerk */
.marke { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--radius-sm);
  font-size: var(--text-xs); line-height: 1; font-weight: 500; white-space: nowrap; background: var(--neutral-mark); color: var(--text) }
.marke svg.sym { width: 12px; height: 12px; vertical-align: 0 }
.marke.ok { background: var(--ok-weak); color: var(--ok) }
.marke.warn { background: var(--warn-weak); color: var(--warn) }
.marke.gefahr { background: var(--danger-weak); color: var(--danger) }
.marke.akzent { background: var(--accent-weak); color: var(--accent) }
.marke.umriss { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text) }
.marke.probe { background: transparent; box-shadow: none; outline: 1px dashed var(--line-strong); outline-offset: -1px; color: var(--text-muted) }
.marke.leer { background: transparent; color: var(--text-muted); padding: 0 }
.marke .punkt { width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.beleg { position: relative; display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border: 1px solid var(--line-strong);
  border-radius: 3px; font: var(--text-xs)/1 var(--mono); color: var(--text-muted); white-space: nowrap; cursor: help; vertical-align: 1px; background: none }
.beleg:hover, .beleg:focus-visible { color: var(--text); border-color: var(--text-muted) }
.beleg-karte { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 300px; padding: var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay);
  font: var(--text-sm)/var(--lh-sm) var(--font); color: var(--text); white-space: normal; cursor: auto; text-align: left }
.beleg:hover .beleg-karte, .beleg:focus .beleg-karte { display: block }
.beleg[aria-expanded="true"] { color: var(--text); border-color: var(--accent) }
.panel .beleg-karte, .tabelle .beleg-karte { left: 0; right: auto; width: min(300px, calc(var(--panel) - 160px)) }
/* Im Entwurf aufgeklappt gezeigt, im Fluss. D1: Popover mit Positionierung. */
.beleg-karte.statisch { display: block; position: static; width: 100%; margin-top: 2px; box-shadow: none }
.beleg-karte dl { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3); margin: 0 }
.beleg-karte dt { color: var(--text-muted) }
.beleg-karte dd { margin: 0; overflow-wrap: anywhere }
.sperrvermerk { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--danger-weak);
  color: var(--danger); border-radius: var(--radius-sm); font-weight: 500 }
.sperrvermerk .leise { color: var(--text); font-weight: 400 }

/* Hinweise */
.hinweis { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s2) var(--s3); border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: var(--text-sm); line-height: var(--lh-sm) }
.hinweis.warn { background: var(--warn-weak) }
.hinweis.warn > svg { color: var(--warn) }
.hinweis.gefahr { background: var(--danger-weak) }
.hinweis.gefahr > svg { color: var(--danger) }
.hinweis > svg { margin-top: 1px; color: var(--text-muted) }

/* Kennzeichen: jede Zahl ist ein Filter */
a.filter-zahl { color: inherit; text-decoration: underline dotted var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 5px }
a.filter-zahl:hover { color: var(--accent); text-decoration: underline solid var(--accent) }
.wert a.filter-zahl { text-underline-offset: 6px }
.wert .null { color: var(--text-muted); font-weight: 400 }

.naechster { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line) }
.naechster > svg { color: var(--accent) }
.naechster p { flex: 1 }
.naechster b { font-weight: 600 }

.abschnitt { margin-top: var(--s8) }
.abschnitt > header { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3) }
.abschnitt > header h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600 }
.abschnitt > header a { margin-left: auto; font-size: var(--text-sm) }
.zwei { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s8) }

.kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4) }
.kennzahlen.vier { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.kennzahl { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: var(--s2) }
.kennzahl .w { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 600 }
.kennzahl .l { font-size: var(--text-sm); color: var(--text-muted) }
.messer { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 6px }
.messer i { display: block; height: 100%; background: var(--accent) }
.messer.warn i { background: var(--warn) }

/* Ansichtswahl, Filterleiste, Tabelle */
.sichten { display: flex; gap: var(--s1); padding: 0 var(--s6); border-bottom: 1px solid var(--line) }
.sichten a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--s2); color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; font-size: var(--text-sm) }
.sichten a:hover { color: var(--text) }
.sichten a[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 500 }
.sichten .anzahl { color: var(--text-muted); font-weight: 400 }
.filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3) var(--s6); background: var(--surface-2); border-bottom: 1px solid var(--line) }
.suche { display: flex; align-items: center; gap: 6px; height: 32px; width: 260px; padding: 0 var(--s2); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--text-muted) }
.suche input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--text) }
.suche input::placeholder { color: var(--text-muted) }
.suche:focus-within { outline: 2px solid var(--accent); outline-offset: 1px }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 var(--s2); border-radius: var(--radius-sm);
  background: var(--accent-weak); color: var(--text); font-size: var(--text-sm); white-space: nowrap }
.chip b { font-weight: 500; color: var(--accent) }
.chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; background: none; color: var(--text-muted); border-radius: 3px; cursor: pointer; padding: 0 }
.chip button:hover { background: var(--surface); color: var(--text) }
.filterleiste .rechts { margin-left: auto; display: flex; align-items: center; gap: var(--s3); font-size: var(--text-sm) }
.auswahlleiste { display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s6); background: var(--accent-weak); border-bottom: 1px solid var(--line); font-size: var(--text-sm) }
.auswahlleiste b { color: var(--accent) }

.tabelle-rahmen { overflow: auto; flex: 1; background: var(--surface) }
table.tabelle { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--text-md) }
.tabelle th, .tabelle td { height: var(--row); padding: 0 var(--s2); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle }
.tabelle th:first-child, .tabelle td:first-child { padding-left: var(--s6) }
.tabelle th:last-child, .tabelle td:last-child { padding-right: var(--s6) }
.tabelle thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); border-bottom-color: var(--line-strong) }
.tabelle thead th a { color: inherit; display: inline-flex; align-items: center; gap: 2px }
.tabelle thead th[aria-sort] { color: var(--text) }
.tabelle th.zahl, .tabelle td.zahl { text-align: right }
.tabelle tbody tr { cursor: pointer }
.tabelle tbody tr:hover td { background: var(--surface-2) }
.tabelle tbody tr[aria-selected="true"] td { background: var(--accent-weak) }
.tabelle tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--accent) }
.tabelle tbody tr.falsch td:not(:first-child) { color: var(--text-muted) }
.tabelle td .name { font-weight: 500; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom }
.tabelle td .sub { display: none }
.tabelle .wahl { width: 1%; padding-right: 0 }
.tabelle input[type="checkbox"], .feld input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; vertical-align: -3px }
.tabelle .gesperrt-sym { color: var(--danger) }
.tabelle.locker td { height: 36px }
.app.mit-panel .tabelle .spaet { display: none }
.fuss { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s6); border-top: 1px solid var(--line); background: var(--surface); font-size: var(--text-sm); color: var(--text-muted) }
.fuss .rechts { margin-left: auto; display: flex; gap: var(--s1) }
.laed-streifen { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: streifen 1.2s linear infinite }
@keyframes streifen { from { background-position: -40% 0 } to { background-position: 140% 0 } }
tr.laeuft td { background: color-mix(in oklch, var(--accent-weak) 55%, var(--surface)) }
.fortschritt { display: inline-flex; align-items: center; gap: var(--s2) }
.fortschritt .messer { width: 72px; margin: 0 }

/* Panel (Detail und Aktion) */
.panel { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; animation: einblenden var(--dur) var(--ease) }
@keyframes einblenden { from { transform: translateX(12px); opacity: .6 } }
.panel-kopf { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: var(--s4) var(--s4) var(--s3); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: var(--s2) }
.panel-kopf .zeile { display: flex; align-items: flex-start; gap: var(--s2) }
.panel-kopf h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600; flex: 1 }
.panel-kopf .ort { color: var(--text-muted); font-size: var(--text-sm) }
.marken { display: flex; flex-wrap: wrap; gap: var(--s1) }
.panel-aktionen { display: flex; flex-wrap: wrap; gap: var(--s2) }
.panel-teil { padding: var(--s4); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2) }
.panel-teil > h3 { font-size: var(--text-sm); font-weight: 600; display: flex; align-items: center; gap: var(--s2) }
.panel-teil > h3 .knopf { margin-left: auto }
.panel-teil ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px }
.paare { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px var(--s3); margin: 0; font-size: var(--text-sm) }
.paare dt { color: var(--text-muted) }
.paare dd { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px }
.fehlt { color: var(--text-muted); font-size: var(--text-sm) }
.person { display: flex; flex-direction: column; gap: 6px; padding: var(--s2) 0 }
.person + .person { border-top: 1px dashed var(--line) }
.person .wer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.person .wer b { font-weight: 600 }
.kontaktweg { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 2px var(--s2); align-items: center; font-size: var(--text-sm) }
.kontaktweg .adresse { font-family: var(--mono); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kontaktweg .belege { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; color: var(--text-muted); font-size: var(--text-xs) }
.kontaktweg.hervor { background: var(--accent-weak); margin: 0 calc(-1 * var(--s2)); padding: 6px var(--s2); border-radius: var(--radius-sm) }
.kontaktweg.falsch .adresse { text-decoration: line-through; color: var(--text-muted) }
.notiz { background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--s2) var(--s3); font-size: var(--text-sm) }
.notiz .von { display: flex; gap: 6px; align-items: center; color: var(--text-muted); font-size: var(--text-xs); margin-top: 4px }
.bearbeiten { border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); background: var(--surface) }
.bearbeiten .knopfzeile { display: flex; gap: var(--s2); justify-content: flex-end }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm) }
.feld > label, .feld > .label { font-weight: 500 }
.feld .hilfe { color: var(--text-muted); font-size: var(--text-xs) }
.eingabe, select.eingabe, textarea.eingabe { height: 32px; padding: 0 var(--s2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: var(--text-md) var(--font); width: 100% }
textarea.eingabe { height: auto; min-height: 64px; padding: 6px var(--s2); resize: vertical; line-height: var(--lh-md) }
.eingabe:focus { outline: 2px solid var(--accent); outline-offset: 1px }
.eingabe.mono { font-family: var(--mono); font-size: var(--text-sm) }
.wahlgruppe { display: grid; gap: var(--s2) }
.wahl-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); cursor: pointer; align-items: start }
.wahl-option input { accent-color: var(--accent); margin: 2px 0 0 }
.wahl-option .titel { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.wahl-option .text { grid-column: 2; color: var(--text-muted); font-size: var(--text-sm) }
.wahl-option:has(input:checked) { border-color: var(--accent); background: var(--accent-weak) }
.wahl-option.aus { cursor: not-allowed; border-style: dashed }
.wahl-option.aus .titel { color: var(--text-muted) }
.inline-feld { display: flex; align-items: center; gap: var(--s2) }
.inline-feld .eingabe { width: 96px; text-align: right }
.check { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--text-md) }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 2px 0 0 }

/* Aktionspanel */
.schritte { display: flex; gap: var(--s1); font-size: var(--text-xs); color: var(--text-muted) }
.schritte span { display: inline-flex; align-items: center; gap: 4px }
.schritte span[aria-current="step"] { color: var(--accent); font-weight: 600 }
.schritte span + span::before { content: ""; width: 12px; height: 1px; background: var(--line-strong); margin-right: 4px }
.grosszahl { display: flex; align-items: baseline; gap: var(--s2) }
.grosszahl .w { font-size: var(--text-2xl); line-height: var(--lh-2xl); font-weight: 600 }
.aufschluesselung { width: 100%; border-collapse: collapse; font-size: var(--text-sm) }
.aufschluesselung td { padding: 4px 0; border-bottom: 1px solid var(--line) }
.aufschluesselung td.zahl { width: 4rem }
.aufschluesselung tr.summe td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--line-strong) }
.stichprobe { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm) }
.stichprobe table { border-collapse: collapse; font: var(--text-xs)/1.4 var(--mono); width: max-content; min-width: 100% }
.stichprobe th, .stichprobe td { padding: 4px var(--s2); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap }
.stichprobe th { color: var(--text-muted); font-weight: 500; background: var(--surface-2) }
.panel-fuss { position: sticky; bottom: 0; margin-top: auto; background: var(--surface); border-top: 1px solid var(--line); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s3) }
.panel-fuss .knopfzeile { display: flex; gap: var(--s2) }
.panel-fuss .knopfzeile .knopf:last-child { flex: 1 }

/* Leerer Zustand */
.leer { max-width: 34rem; margin: var(--s8) auto; padding: var(--s6) var(--s6); text-align: left; display: flex; flex-direction: column; gap: var(--s3) }
.leer > svg { width: 24px; height: 24px; color: var(--text-muted) }
.leer h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600 }
.leer p { color: var(--text-muted); max-width: 60ch }
.leer ol { margin: 0; padding-left: 20px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px }

/* Meldung oben rechts */
.meldung { position: fixed; top: var(--s4); right: var(--s4); z-index: 50; display: flex; gap: var(--s3); align-items: flex-start; max-width: 360px;
  padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); font-size: var(--text-sm) }
.meldung > svg { color: var(--ok); margin-top: 1px }

/* Kampagnenliste */
.kampagnen { display: flex; flex-direction: column; gap: var(--s4) }
.kampagne { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-md) }
.kampagne h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600 }
.kampagne h2 a { color: var(--text) }
.kampagne h2 a::after { content: " →"; color: var(--accent) }

/* Telefon: Hauptaktion nur am großen Bildschirm */
.nur-schmal { display: none }

@media (max-width: 1279px) {
  .app.mit-panel { grid-template-columns: var(--sidebar) minmax(0, 1fr) }
  .app.mit-panel .panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(var(--panel), 100vw); z-index: 40; box-shadow: var(--shadow-overlay) }
}
@media (max-width: 959px) {
  .app, .app.mit-panel { grid-template-columns: minmax(0, 1fr) }
  .seitenleiste { display: none }
  .kopfleiste { display: flex; align-items: center; gap: var(--s2); position: sticky; top: 0; z-index: 20; height: 48px; padding: 0 var(--s2) 0 var(--s4);
    background: var(--surface-2); border-bottom: 1px solid var(--line) }
  .kopfleiste .titel { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .kopfleiste .titel small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--text-muted) }
  .kopfleiste .knopf { height: 40px; min-width: 40px; padding: 0 var(--s2) }
  .kopf { padding: var(--s4) var(--s4) var(--s3); flex-wrap: wrap }
  .kopf .aktionen { display: none }
  .nur-schmal { display: flex }
  .nur-breit { display: none !important }
  .bereich { padding: 0 var(--s4) var(--s6) }
  .sichten { padding: 0 var(--s4); overflow-x: auto }
  .filterleiste { padding: var(--s2) var(--s4) }
  .filterleiste .suche { width: auto; flex: 1 }
  .filterleiste .chip, .filterleiste .weitere, .filterleiste .rechts { display: none }
  .tabelle th:first-child, .tabelle td:first-child { padding-left: var(--s4) }
  .tabelle th:last-child, .tabelle td:last-child { padding-right: var(--s4) }
  .tabelle .breit, .tabelle .wahl { display: none }
  .tabelle td { height: 52px }
  .tabelle td .sub { display: block; font-size: var(--text-xs); color: var(--text-muted) }
  .tabelle td .name { max-width: 11rem; display: block }
  .fuss { padding: var(--s2) var(--s4) }
  .auswahlleiste { display: none }
  .zwei, .kennzahlen, .kennzahlen.vier { grid-template-columns: minmax(0, 1fr) }
  .kennzahlen.vier { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .app.mit-panel .panel { width: 100vw; top: auto; height: 82vh; border-radius: 12px 12px 0 0; border-left: 0 }
  .naechster { flex-wrap: wrap }
  .meldung { left: var(--s4); right: var(--s4); max-width: none }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important }
}

/* ---- Ergänzungen D1 ---- */

/* Filterchip: Entfernen ist ein Link auf die Adresse ohne diesen Filter */
.chip a { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--text-muted); border-radius: 3px }
.chip a:hover { background: var(--surface); color: var(--text); text-decoration: none }

/* Kampagnenwahl als Liste unter dem Knopf */
.kampagnenwahl-rahmen { position: relative }
.kampagnenwahl[aria-expanded="true"] { border-color: var(--accent) }
.kampagnenliste { position: absolute; z-index: 35; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: var(--s1); list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay) }
.kampagnenliste a { display: flex; flex-direction: column; padding: 6px var(--s2); border-radius: var(--radius-sm); color: var(--text) }
.kampagnenliste a:hover { background: var(--surface-2); text-decoration: none }
.kampagnenliste a[aria-current="true"] { background: var(--accent-weak); color: var(--accent); font-weight: 500 }
.kampagnenliste small { font: var(--text-xs)/var(--lh-xs) var(--mono); color: var(--text-muted); font-weight: 400 }
.kampagnenliste .alle { border-top: 1px solid var(--line); margin-top: var(--s1); padding-top: var(--s1) }

/* Belegkarte als Popover: app.js setzt die Lage, damit Panel und Tabelle sie nicht abschneiden */
.beleg-karte.fest { position: fixed; right: auto; width: 300px; max-width: calc(100vw - 2 * var(--s4)) }

/* Navigation am Telefon: Seitenleiste als Schublade über dem Inhalt */
.schublade-hintergrund { display: none }
@media (max-width: 959px) {
  .app.nav-offen .seitenleiste { display: flex; position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: min(280px, 85vw);
    box-shadow: var(--shadow-overlay) }
  .app.nav-offen .schublade-hintergrund { display: block; position: fixed; inset: 0; z-index: 44; background: oklch(0.2 0.02 250 / 0.35) }
  .seitenleiste .nav a { height: 40px }
}


/* === Ansichten =========================================================================
   Ergänzungen der Ansichten (D2 bis D4), in E1 aus d2.css, d3.css und d4.css zusammengeführt;
   Reihenfolge wie vorher geladen, Tokens von oben. */

/* --- Kampagnen, Übersicht, Läufe, Kosten (D2) --- */

.d2-oben { border-top: 1px solid var(--line) }
.d2-unter { margin-top: 4px }
.d2-abstand { margin-top: var(--s3) }
.d2-klein { font-size: var(--text-sm) }
.d2-mitte { text-align: center; margin-top: var(--s4) }

/* Filterleiste der Läufe: Auswahlfelder statt Suche */
.d2-filter label { display: inline-flex }
.d2-filter select.eingabe { height: 28px; font-size: var(--text-sm); padding-right: var(--s6) }

/* Abbruchgrund unter dem Status, im Klartext */
.d2-grund { display: block; max-width: 28ch; margin-top: 2px; font-size: var(--text-xs); color: var(--text-muted); white-space: normal }

/* Parameter eines Laufs: JSON umbrechen statt die Breite zu sprengen */
.d2-param { overflow-wrap: anywhere; font-size: var(--text-xs) }

/* Verlauf je Tag: schmale Balkenzeilen */
.verlauf .stufe { display: grid; align-items: center; gap: var(--s3); min-height: 28px; grid-template-columns: 4rem minmax(0, 1fr) 4.5rem }
.verlauf .stufe .was { color: var(--text-muted) }
.spur { height: 10px; background: var(--surface-2); border-radius: 2px; overflow: hidden }
.spur i { display: block; height: 100%; background: var(--bar); border-radius: 2px }
.verlauf .spur i { background: var(--seq-2) }


/* Kernzahlen der Läufe umbrechen, damit Kosten ohne Querscrollen sichtbar bleiben */
.tabelle td.d2-kern { white-space: normal; min-width: 14rem; max-width: 26rem }

/* --- Firmen und Kontakte (D3): Filterwahl, Zeilen als Links, Auswahl, Panel --- */

/* Name in der Zeile ist der Link ins Panel; die ganze Zeile öffnet es (d3.js) */
.tabelle td a.name { color: var(--text) }
.tabelle td a.name:hover { color: var(--accent); text-decoration: underline }
.tabelle tbody tr:focus-within td { background: var(--surface-2) }
.tabelle tbody tr[aria-selected="true"]:focus-within td { background: var(--accent-weak) }
.tabelle td .marken { flex-wrap: nowrap }
.tabelle td > .sym { color: var(--text-muted); vertical-align: -3px }

.auswahlleiste[hidden] { display: none }
.auswahlleiste .knopf { margin-left: var(--s2) }

/* Filterwahl: klappt unter der Filterleiste auf, liegt über der Tabelle */
.filterleiste:has(.filterwahl) { position: relative }
.filterwahl { position: static }
.filterwahl > summary { list-style: none; cursor: pointer }
.filterwahl > summary::-webkit-details-marker { display: none }
.filterwahl[open] > summary { background: var(--accent-weak); color: var(--accent) }
.filterwahl-karte { position: absolute; z-index: 30; top: calc(100% - 4px); left: var(--s6); width: min(680px, calc(100% - 2 * var(--s6)));
  max-height: min(70vh, 560px); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s3) }
.filterwahl-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s3) var(--s4); align-items: start }
.filtergruppe { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0 }
.filtergruppe legend, .filtergruppe .legende { font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); padding: 0; margin-bottom: 2px }
.filtergruppe .check { font-size: var(--text-sm); align-items: center }
.filtergruppe .check input { margin: 0 }
.filtergruppe .anzahl { color: var(--text-muted); font-size: var(--text-xs); margin-left: auto; font-variant-numeric: tabular-nums }
.filterwahl-karte .knopfzeile { display: flex; justify-content: flex-end; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3) }

/* Panel */
.panel-teil > ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm) }
.panel-teil > .knopf { align-self: flex-start }
.panel-teil h3 .knopf { margin-left: auto }
.panel-teil .verlauf { margin: 0; font-size: var(--text-sm); display: flex; flex-wrap: wrap; gap: 2px var(--s2) }
.panel-teil .verlauf .leise { font-size: var(--text-xs) }
.kontaktweg[id] { scroll-margin-top: 160px }
.kontaktweg + .bearbeiten { margin-top: var(--s1) }
.bearbeiten .knopf.gefahr .sym { color: inherit }

@media (max-width: 959px) {
  .filterwahl-karte { left: var(--s4); width: calc(100% - 2 * var(--s4)); max-height: 65vh }
  .filterwahl-felder { grid-template-columns: minmax(0, 1fr) }
}

/* --- Aktionen und Sperrliste (D4): Formulare im Panel fließen wie Panel-Teile --- */

.panel > form { display: contents }
.panel .nur-schmal { margin: var(--s3) var(--s4) 0 }
.panel fieldset.feld { border: 0; padding: 0; margin: 0; min-width: 0 }
.panel fieldset.feld > legend { padding: 0; margin-bottom: 4px; font-weight: 500 }
.d4-wahl { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4) }
.feld.fehler .eingabe { border-color: var(--danger) }
.d4-fehler { color: var(--danger) !important }

/* Paare mit Schlüsseln beliebiger Länge (Parameter, Ergebnis, Sperre) */
.paare.frei { grid-template-columns: max-content minmax(0, 1fr) }
.paare.frei dd { overflow-wrap: anywhere }
.d4-methode { font-weight: 500 }

/* laufender Lauf: Punkt .puls aus dem Rahmen (E1: ein Muster statt zwei) */
.d4-laufstatus { display: flex; align-items: center; gap: var(--s2) }

/* Kostenschätzung gegen Budget je Lauf */
.d4-budget { display: flex; flex-direction: column; gap: 6px }
.d4-balken { height: 8px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden }
.d4-balken i { display: block; height: 100%; background: var(--accent) }
.d4-balken.ueber i { background: var(--warn) }

.d4-abbrechen { display: flex; flex-direction: column; gap: var(--s2) }
.d4-datei { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; font-size: var(--text-sm) }
.d4-filter { display: flex; flex-wrap: wrap; gap: 4px }
.d4-zwischentitel { font-size: var(--text-sm); font-weight: 600; padding: 0 0 var(--s2) }
.d4-stufen tr[aria-current="true"] td { background: var(--accent-weak) }

/* Sperrliste: neu eingetragene Zeile hervorgehoben, Herkunft darf umbrechen */
.d4-sperren tbody tr { cursor: default }
.d4-sperren tr.neu td { background: var(--accent-weak) }
.d4-herkunft { white-space: normal !important; max-width: 360px }
.d4-sperrfilter .d4-geltung select { width: auto }
.d4-leer-knopf { display: flex; justify-content: center; margin-top: var(--s3) }

/* === E2: Optik an zackmatt.de angelehnt, ohne Umbau ======================================
   Navy für Kopf und Navigation, Gelb für die Hauptaktion, Knöpfe als Pillen, mehr Luft in
   Übersicht und Panels; Tabellen bleiben dicht. */

h1, h2, h3 { letter-spacing: -0.02em }
.kopf h1 { font-size: var(--text-2xl); line-height: var(--lh-2xl); font-weight: 600; letter-spacing: -0.03em }
.kopf { padding: var(--s8) var(--s8) var(--s6) }
.bereich { padding: 0 var(--s8) var(--s10) }
.sichten, .filterleiste, .auswahlleiste, .fuss { padding-left: var(--s8); padding-right: var(--s8) }
.tabelle th:first-child, .tabelle td:first-child { padding-left: var(--s8) }
.tabelle th:last-child, .tabelle td:last-child { padding-right: var(--s8) }

/* Navigation in Navy */
.seitenleiste { background: var(--navy); border-right: 0; color: var(--nav-text); padding: var(--s4) var(--s3) }
.seitenleiste .nav a { color: var(--nav-muted); border-radius: var(--radius-md); height: 34px }
.seitenleiste .nav a:hover { background: var(--nav-hover); color: var(--nav-text) }
.seitenleiste .nav a[aria-current="page"] { background: var(--nav-aktiv); color: var(--nav-text); box-shadow: inset 3px 0 0 var(--haupt) }
.seitenleiste .nav .anzahl, .seitenleiste .nutzer { color: var(--nav-muted) }
.seitenleiste .kampagnenwahl { background: var(--nav-hover); border-color: var(--nav-line); color: var(--nav-text) }
.seitenleiste .kampagnenwahl small { color: var(--nav-muted) }
.seitenleiste .kampagnenwahl[aria-expanded="true"] { border-color: var(--haupt) }
.seitenleiste .lauf-anzeige { background: var(--nav-aktiv); color: var(--nav-text) }
.seitenleiste .lauf-anzeige .leise { color: var(--nav-muted) }
.seitenleiste .puls { background: var(--haupt) }
.seitenleiste .thema { border-color: var(--nav-line); border-radius: var(--radius-pille) }
.seitenleiste .thema button { background: transparent; color: var(--nav-muted) }
.seitenleiste .thema button + button { border-left-color: var(--nav-line) }
.seitenleiste .thema button[aria-pressed="true"] { background: var(--nav-aktiv); color: var(--nav-text) }
.seitenleiste :focus-visible { outline-color: var(--haupt) }
.kopfleiste { background: var(--navy) !important; color: var(--nav-text); border-bottom-color: var(--nav-line) !important }
.kopfleiste .titel small { color: var(--nav-muted) !important }
.kopfleiste .knopf { background: transparent; border-color: var(--nav-line); color: var(--nav-text) }

/* Knöpfe als Pillen, Hauptaktion Gelb */
.knopf { border-radius: var(--radius-pille); padding: 0 var(--s4); border-color: var(--line) }
.knopf.klein { padding: 0 var(--s3) }
.knopf.haupt { background: var(--haupt); border-color: var(--haupt-rand); color: var(--on-haupt) }
.knopf.haupt:hover { background: var(--haupt-hover); border-color: var(--haupt-rand) }
.knopf.haupt:focus-visible { outline-color: var(--text) }
.knopf.gefahr { color: #FFFFFF }
.marke, .chip, .hinweis, .suche, .eingabe { border-radius: var(--radius-md) }

/* Die vier Zahlen (Übersicht, Kampagnen, Kosten) */
.kennzahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) }
.kennzahl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--s4) var(--s6) var(--s6); gap: var(--s1) }
.kennzahl .l { order: -1; font-size: var(--text-sm); color: var(--text-muted) }
.kennzahl .w { font-size: var(--text-3xl); line-height: var(--lh-3xl); font-weight: 500; letter-spacing: -0.03em }
.kennzahl .w a.filter-zahl { text-underline-offset: 8px }
.kennzahl .w .null { color: var(--text-muted) }
.kennzahl .u { font-size: var(--text-sm); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center }
.kennzahl.warn { border-color: color-mix(in oklch, var(--warn) 45%, var(--line)) }
.messer.voll i { background: var(--warn) }
.kampagne .kennzahl { border: 0; padding: 0; background: none }

.naechster { margin-top: var(--s6); padding: var(--s4) var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md) }
.naechster > svg { color: var(--text) }

/* Stufen als Statuszeile */
.stufenzeile { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s2); margin: 0; padding: 0; list-style: none }
.stufenzeile li { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0 }
.stufenzeile .stufe-kopf { display: flex; align-items: center; gap: 6px }
.stufenzeile .name { font-weight: 500; font-size: var(--text-sm); line-height: var(--lh-sm) }
.stufenzeile .punkt { align-self: flex-start; margin-top: 5px }
.stufenzeile .punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--bar) }
.stufenzeile [data-zustand="fertig"] .punkt { background: var(--ok) }
.stufenzeile [data-zustand="laeuft"] .punkt,
.stufenzeile [data-zustand="angefordert"] .punkt { background: var(--accent); animation: puls 2s ease-in-out infinite }
.stufenzeile [data-zustand="angehalten"] .punkt { background: var(--warn) }
.stufenzeile [data-zustand="fehler"] .punkt { background: var(--danger) }
.stufenzeile .bestand { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.stufenzeile .bestand a.filter-zahl, .stufenzeile .bestand .null { font-weight: 600 }
.stufenzeile .zustand { font-size: var(--text-xs); color: var(--text-muted) }
.stufenzeile .zustand .marke { height: 18px }

/* Budget ändern (Kosten) */
.budget-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s2) }
.budget-form label { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--text-sm); color: var(--text-muted) }
.eingabe-euro { display: inline-flex; align-items: center; gap: 6px; color: var(--text) }
.eingabe-euro input { width: 7rem; height: 34px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); font: 500 var(--text-md)/1 var(--mono); text-align: right }
.eingabe-euro input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }

/* Prüfaktion: Zahl und Aufteilung links */
.d4-gross { font-size: var(--text-xl); line-height: var(--lh-xl); margin-bottom: var(--s2) }
.d4-teile { margin: 0 0 var(--s4); padding-left: var(--s4); color: var(--text-muted) }

@media (max-width: 1279px) {
  .stufenzeile { grid-template-columns: repeat(4, minmax(0, 1fr)) }
}
@media (max-width: 959px) {
  .kopf { padding: var(--s4) var(--s4) var(--s3) }
  .kopf h1 { font-size: var(--text-xl); line-height: var(--lh-xl) }
  .bereich { padding: 0 var(--s4) var(--s6) }
  .sichten, .filterleiste, .fuss { padding-left: var(--s4); padding-right: var(--s4) }
  .tabelle th:first-child, .tabelle td:first-child { padding-left: var(--s4) }
  .tabelle th:last-child, .tabelle td:last-child { padding-right: var(--s4) }
  .kennzahlen, .kennzahlen.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) }
  .kennzahl { padding: var(--s3) var(--s4) var(--s4) }
  .kennzahl .w { font-size: var(--text-2xl); line-height: var(--lh-2xl) }
  .stufenzeile { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .kampagne { padding: var(--s4) }
}


/* Login und Konten (B1) */
.einfach { max-width: 360px; margin: 12vh auto 0; padding: 0 var(--s4); display: flex; flex-direction: column; gap: var(--s4) }
.einfach h1 { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 600 }
.einfach-marke { font-weight: 600; color: var(--text-muted) }
.einfach-form { display: flex; flex-direction: column; gap: var(--s3); max-width: 360px }
.einfach-form .knopf { align-self: flex-start }
.nutzer a { display: flex; align-items: center; gap: var(--s2); color: inherit; min-width: 0 }
.nutzer form { margin-left: auto }
.konto-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) }
.konto-form select.eingabe { width: auto; min-width: 7rem }
.konto-form .eingabe[type="password"] { width: 12rem }
.konten-tabelle td { white-space: normal; height: auto; padding-block: var(--s1) }
