/* Airtec Auftragstool — Design-Fundament
   Grundlage: Airtec-Designsystem (Manrope, Flame Orange als einzige Akzentfarbe,
   warmes Steingrau, kantige Radien, flache Karten) + Token-Muster des Assistenten.
   Dichte bewusst B2B: Tabellen eng, Ziffern tabular, SKUs mono. */

:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --surface-3: #e6e3dc;
  --line: #dedbd3;
  --line-strong: #c8c4ba;
  --ink: #1d1c19;
  --ink-2: #4a4843;
  --muted: #7a776f;
  --accent: #f29100;
  --accent-hover: #d87f00;
  --accent-pressed: #bf6f00;
  --accent-soft: #fff1dc;
  --accent-ink: #8a5200;
  --on-accent: #ffffff;
  --ok: #2f7a4f;
  --ok-soft: #e4f2e9;
  --warn: #8a6d00;
  --warn-soft: #fbf3d2;
  --danger: #b3261e;
  --danger-soft: #fae8e6;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-xs: 11px; --t-sm: 13px; --t-base: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 26px; --t-2xl: 34px;
  --lh: 1.5; --lh-eng: 1.2;

  --r-sm: 4px; --r-md: 6px; --r-lg: 8px;
  --sh-1: 0 1px 2px rgba(29, 28, 25, 0.06);
  --sh-2: 0 6px 20px rgba(29, 28, 25, 0.10);
  --dur-fast: 100ms; --dur: 160ms; --ease: cubic-bezier(0.2, 0, 0, 1);
  --topbar-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151412;
    --surface: #1e1d1a;
    --surface-2: #27251f;
    --surface-3: #312e27;
    --line: #34322c;
    --line-strong: #4a4740;
    --ink: #ecebe6;
    --ink-2: #c9c7c0;
    --muted: #9a978f;
    --accent: #ffa32b;
    --accent-hover: #ffb24d;
    --accent-pressed: #f29100;
    --accent-soft: #3a2a12;
    --accent-ink: #ffc97f;
    --on-accent: #1d1c19;
    --ok: #6ccb93;
    --ok-soft: #163220;
    --warn: #e6c25a;
    --warn-soft: #3a3113;
    --danger: #f0908a;
    --danger-soft: #3b1b18;
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.35);
    --sh-2: 0 6px 20px rgba(0, 0, 0, 0.5);
  }
}

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

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  font: var(--t-base) / var(--lh) var(--font);
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
input, textarea, select, button { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

kbd {
  display: inline-block; min-width: 20px; padding: 1px 5px; text-align: center;
  font: 600 var(--t-xs) / 1.3 var(--font); color: var(--muted);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-sm);
  background: var(--surface); vertical-align: middle;
}

/* ---------------------------------------------------------------- Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-5);
  padding: 0 var(--s-6);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.marke { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); }
.marke img { height: 40px; width: auto; align-self: flex-start; display: block; }
.marke .wort { font-weight: 800; font-size: var(--t-md); letter-spacing: -0.01em; line-height: 1; padding-left: var(--s-2); border-left: 1px solid var(--line-strong); }
.marke .sub { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; gap: var(--s-1); margin-left: var(--s-2); }
.nav button {
  background: none; border: 0; border-radius: var(--r-md); padding: 7px 12px;
  font-weight: 700; font-size: var(--t-sm); color: var(--muted); cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button.active { background: var(--ink); color: var(--bg); }
.nav button kbd { margin-left: 6px; opacity: 0.7; }

.topbar .rechts { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.quellen { display: flex; gap: 6px; }
.quelle {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: var(--t-xs); font-weight: 700; color: var(--muted); white-space: nowrap;
}
.quelle i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.quelle.live i { background: var(--ok); }
.quelle.cache i { background: var(--warn); }
.quelle.aus i { background: var(--danger); }
.konto { display: inline-flex; align-items: center; gap: var(--s-2); padding-left: var(--s-3); border-left: 1px solid var(--line); font-size: var(--t-sm); }
.konto .avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: var(--t-xs);
}
.konto button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: var(--t-xs); font-weight: 700; padding: 4px 6px; border-radius: var(--r-sm); }
.konto button:hover { color: var(--ink); background: var(--surface-2); }

/* ---------------------------------------------------------------- Layout */
main { padding: var(--s-6); max-width: 1480px; margin: 0 auto; }
.view[hidden] { display: none; }
.seitenkopf { display: flex; align-items: flex-end; gap: var(--s-4); margin-bottom: var(--s-5); }
.seitenkopf h1 { margin: 0; font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; line-height: var(--lh-eng); }
.seitenkopf .unter { color: var(--muted); font-size: var(--t-sm); margin-top: 4px; }
.seitenkopf .werkzeuge { margin-left: auto; display: flex; gap: var(--s-2); }

.erfassung { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; }
.erfassung > aside { position: sticky; top: calc(var(--topbar-h) + var(--s-5)); }
@media (max-width: 1100px) { .erfassung { grid-template-columns: 1fr; } .erfassung > aside { position: static; } }

/* ---------------------------------------------------------------- Karten */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: var(--s-4); }
.card > .kopf {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.card > .kopf h2 { margin: 0; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card > .kopf .werkzeuge { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.card > .inhalt { padding: var(--s-4) var(--s-5); }
.card > .inhalt.eng { padding: 0; }

/* ---------------------------------------------------------------- Formulare */
.feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feld label { font-size: var(--t-xs); font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.feld input, .feld select, .feld textarea, .eingabe {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.feld input:hover, .feld select:hover, .eingabe:hover { border-color: var(--muted); }
.feld input:focus, .feld select:focus, .feld textarea:focus, .eingabe:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.feld .hinweis { font-size: var(--t-xs); color: var(--muted); }
.feldreihe { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.feldreihe + .feldreihe { margin-top: var(--s-3); }

.segment { display: inline-flex; padding: 2px; background: var(--surface-2); border-radius: var(--r-md); }
.segment button {
  border: 0; background: none; padding: 5px 12px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 700; color: var(--muted); cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.segment button.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.segment button:hover:not(.active) { color: var(--ink); }

/* Suche mit Tastenhinweis */
.suche { position: relative; }
.suche .eingabe { padding-left: 38px; padding-right: 64px; min-height: 42px; font-size: var(--t-md); }
.suche .eingabe.gross { min-height: 44px; }
.suche svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.suche kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.treffer {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); overflow: hidden;
}
.treffer .status { padding: var(--s-3) var(--s-4); font-size: var(--t-sm); color: var(--muted); display: flex; align-items: center; gap: var(--s-2); }
.treffer .status i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: 0 0 auto; }

/* ---------------------------------------------------------------- Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-md); padding: 0 14px; min-height: 36px;
  font-weight: 700; font-size: var(--t-sm); cursor: pointer; line-height: 1; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-1); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:active { background: var(--accent-pressed); box-shadow: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--muted); background: var(--surface-2); }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.gross { min-height: 46px; font-size: var(--t-md); width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn kbd { border-color: rgba(255,255,255,0.35); color: inherit; background: transparent; }

/* ---------------------------------------------------------------- Chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.akzent { background: var(--accent-soft); color: var(--accent-ink); }
.chipreihe { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-4); }
.filter button {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 4px 10px; font-size: var(--t-xs); font-weight: 700; color: var(--muted); cursor: pointer;
}
.filter button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------------------------------------------------------------- Tabellen */
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tabelle th {
  text-align: left; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap;
}
.tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle th.r, .tabelle td.r { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle tbody tr:hover td { background: var(--surface-2); }
.tabelle .sku { font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); }
.tabelle td.editierbar { padding: 4px 6px; }
.tabelle td.editierbar input {
  width: 100%; min-height: 30px; padding: 2px 8px; text-align: right; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent;
}
.tabelle td.editierbar input:hover { border-color: var(--line-strong); background: var(--surface); }
.tabelle td.editierbar input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.tabelle .marge.gut { color: var(--ok); }
.tabelle .marge.knapp { color: var(--warn); }
.tabelle .marge.minus { color: var(--danger); font-weight: 700; }
.tabelle .leer td { padding: var(--s-8) var(--s-4); text-align: center; color: var(--muted); }
.tabelle .leer td strong { display: block; color: var(--ink); font-weight: 700; margin-bottom: 4px; }

/* ---------------------------------------------------------------- Zusammenfassung */
.summe { display: flex; justify-content: space-between; gap: var(--s-3); padding: 6px 0; font-size: var(--t-sm); }
.summe .w { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summe.total { border-top: 2px solid var(--ink); margin-top: var(--s-2); padding-top: var(--s-3); font-size: var(--t-md); font-weight: 800; }
.summe.gedimmt { color: var(--muted); }
.marge-balken { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 6px 0 var(--s-3); }
.marge-balken > span { display: block; height: 100%; background: var(--ok); width: 0; transition: width var(--dur) var(--ease); }
.aside-hinweis { font-size: var(--t-xs); color: var(--muted); margin-top: var(--s-3); line-height: 1.5; }

/* ---------------------------------------------------------------- Kunde anlegen (Phase 3) */
.anlegen-panel { margin-top: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.anlegen-panel .kopfzeile { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.anlegen-panel .kopfzeile strong { font-weight: 800; }
.anlegen-panel .kopfzeile .werkzeuge { margin-left: auto; display: flex; gap: 6px; }
.anlegen-panel .person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.anlegen-panel .person:last-child { border-bottom: 0; }
.anlegen-panel .person .name { font-weight: 700; }
.anlegen-panel .person .meta { grid-column: 1; font-size: var(--t-xs); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.anlegen-panel .person .aktion { grid-column: 2; grid-row: 1 / span 2; }
.anlegen-panel .hinweis { padding: var(--s-3) var(--s-4); font-size: var(--t-sm); color: var(--ink-2); }
.anlegen-panel .hinweis.fehler { color: var(--danger); background: var(--danger-soft); }
.anlegen-panel ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------- Meldungen */
.banner {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--t-sm); margin-bottom: var(--s-5);
}
.banner strong { display: block; font-weight: 800; }
.banner .text { color: var(--ink-2); }
.leerzustand { padding: var(--s-12) var(--s-4); text-align: center; color: var(--muted); }
.leerzustand strong { display: block; color: var(--ink); font-size: var(--t-md); font-weight: 800; margin-bottom: 4px; }

@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--s-6); z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-md);
  font-size: var(--t-sm); font-weight: 600; box-shadow: var(--sh-2); max-width: 90vw;
  animation: toast-in var(--dur) var(--ease);
}
.toast.fehler { background: var(--danger); color: #fff; }

/* ---------------------------------------------------------------- Login */
.loginseite { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6); }
.loginbox {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-8) var(--s-8) var(--s-6); box-shadow: var(--sh-1);
}
.loginbox .marke { margin-bottom: var(--s-8); gap: var(--s-4); }
.loginbox .marke img { height: 64px; }
.loginbox .marke .wort { font-size: var(--t-lg); border-left: 0; padding-left: 0; }
.loginbox h1 { margin: 0 0 4px; font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.01em; }
.loginbox p.unter { color: var(--muted); font-size: var(--t-sm); margin: 0 0 var(--s-6); }
.loginbox .feld { margin-bottom: var(--s-4); }
.konten { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.konten button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  font-weight: 700; font-size: var(--t-sm); color: var(--ink-2);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.konten button .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: var(--t-xs); font-weight: 800; }
.konten button:hover { border-color: var(--muted); }
.konten button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.konten button.active .avatar { background: var(--accent); color: var(--on-accent); }
.loginbox .fehler { color: var(--danger); font-size: var(--t-sm); min-height: 20px; margin-top: var(--s-3); }
.loginbox .fuss { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- Erfassung (Phase 1) */
.treffer ul { list-style: none; margin: 0; padding: 4px; max-height: 360px; overflow-y: auto; }
.treffer li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.treffer li:hover, .treffer li.aktiv { background: var(--accent-soft); }
.treffer li .haupt { grid-column: 1; grid-row: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.treffer li .haupt .sku { font-family: var(--mono); font-weight: 600; color: var(--accent-ink); margin-right: 8px; font-size: var(--t-xs); }
.treffer li .neben { grid-column: 1; grid-row: 2; font-size: var(--t-xs); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.treffer li .rechts { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-variant-numeric: tabular-nums; font-size: var(--t-sm); white-space: nowrap; }
.treffer li .rechts .preis { font-weight: 800; display: block; }
.treffer li .rechts .bestand { font-size: var(--t-xs); color: var(--muted); }
.treffer li .rechts .bestand.knapp { color: var(--warn); }
.treffer li .rechts .bestand.leer { color: var(--danger); }
.treffer .fuss { padding: 6px 12px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); display: flex; gap: 10px; align-items: center; }
.treffer .fuss i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.treffer .fuss.warn i { background: var(--warn); }
.treffer .fuss.aus i { background: var(--danger); }

.kundenkarte {
  margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); background: var(--surface-2); display: flex; gap: var(--s-4); align-items: flex-start; flex-wrap: wrap;
}
.kundenkarte .name { font-weight: 800; }
.kundenkarte .meta { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.kundenkarte .rechts { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.tabelle td.editierbar input.rabatt, .tabelle td.editierbar input.menge { width: 100%; }
.tabelle tr.unter-ek td { background: var(--danger-soft); }
.tabelle .grund { display: block; font-size: var(--t-xs); color: var(--accent-ink); margin-top: 2px; }
.tabelle .warnchip { font-size: 10px; padding: 1px 6px; }
.tabelle button.loeschen { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; border-radius: var(--r-sm); }
.tabelle button.loeschen:hover { color: var(--danger); background: var(--danger-soft); }

.popover {
  position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-2); padding: var(--s-3); width: 300px;
}
.popover label { display: block; font-size: var(--t-xs); font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.popover .knopfzeile { display: flex; gap: 6px; justify-content: flex-end; margin-top: var(--s-2); }

.fehlerliste { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); background: var(--danger-soft); color: var(--danger); border-radius: var(--r-md); font-size: var(--t-sm); }
.fehlerliste ul { margin: 0; padding-left: 18px; }
.erfolg-nr { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.02em; margin: var(--s-2) 0 var(--s-3); font-variant-numeric: tabular-nums; }
input.kompakt { min-height: 28px; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--t-sm); }
input.kompakt.prozent { width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
