/* =========================================================================
   audio-tools — Design-System
   Framework-frei. Tokens in OKLCH, Hell/Dunkel über [data-theme].
   ========================================================================= */

/* ---- 1. Tokens : Hell (Standard) -------------------------------------- */
:root {
  color-scheme: light;

  /* Neutrale, leicht kühl getönt (Hue ~262) – nie reines Schwarz/Weiß */
  --bg:            oklch(0.985 0.004 262);
  --surface:       oklch(0.972 0.006 262);
  --surface-2:     oklch(0.945 0.009 262);
  --border:        oklch(0.895 0.011 262);
  --border-strong: oklch(0.820 0.014 262);

  --text:        oklch(0.290 0.020 262);
  --text-muted:  oklch(0.520 0.018 262);
  --text-faint:  oklch(0.640 0.014 262);

  /* Akzent: Logo-Rot #f71d51, im Hellen bewusst etwas ruhiger (gleiche Werte wie Dunkel) */
  --accent:        oklch(0.665 0.230 18);
  --accent-hover:  oklch(0.715 0.215 19);
  --accent-press:  oklch(0.610 0.225 17);
  --accent-deep:   oklch(0.255 0.075 18);   /* dunkles Ende des Button-Verlaufs */
  --accent-soft:   oklch(0.955 0.030 17);
  --on-accent:     oklch(0.990 0.012 17);
  --ring:          oklch(0.627 0.240 17 / 0.45);

  --ok:   oklch(0.620 0.120 150);
  --warn: oklch(0.700 0.150 75);
  --err:  oklch(0.560 0.200 27);

  /* Radius */
  --r-1: 7px; --r-2: 11px; --r-3: 18px; --r-pill: 999px;

  /* Schatten (im Brand-Hue getönt) */
  --shadow-1: 0 1px 2px oklch(0.29 0.02 262 / .06), 0 1px 3px oklch(0.29 0.02 262 / .08);
  --shadow-2: 0 8px 28px oklch(0.29 0.02 262 / .10), 0 2px 8px oklch(0.29 0.02 262 / .07);

  /* Abstände */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;

  /* Typografie */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Segoe UI Mono", Consolas, monospace;

  --maxw: 1080px;
}

/* ---- 2. Tokens : Dunkel ----------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg:            oklch(0.185 0.012 262);
  --surface:       oklch(0.225 0.014 262);
  --surface-2:     oklch(0.270 0.016 262);
  --border:        oklch(0.330 0.018 262);
  --border-strong: oklch(0.420 0.020 262);

  --text:        oklch(0.950 0.008 262);
  --text-muted:  oklch(0.740 0.013 262);
  --text-faint:  oklch(0.600 0.013 262);

  --accent:        oklch(0.665 0.230 18);
  --accent-hover:  oklch(0.715 0.215 19);
  --accent-press:  oklch(0.610 0.225 17);
  --accent-deep:   oklch(0.380 0.130 18);
  --accent-soft:   oklch(0.320 0.075 17);
  --on-accent:     oklch(0.990 0.012 17);
  --ring:          oklch(0.720 0.190 18 / 0.55);

  --shadow-1: 0 1px 2px oklch(0 0 0 / .35), 0 1px 3px oklch(0 0 0 / .40);
  --shadow-2: 0 12px 36px oklch(0 0 0 / .48), 0 3px 10px oklch(0 0 0 / .40);
}

/* Dunkel ist Standard – auch ohne JS. Hell nur über [data-theme="light"]. */
:root:not([data-theme]) {
  color-scheme: dark;
  --bg:            oklch(0.185 0.012 262);
  --surface:       oklch(0.225 0.014 262);
  --surface-2:     oklch(0.270 0.016 262);
  --border:        oklch(0.330 0.018 262);
  --border-strong: oklch(0.420 0.020 262);
  --text:        oklch(0.950 0.008 262);
  --text-muted:  oklch(0.740 0.013 262);
  --text-faint:  oklch(0.600 0.013 262);
  --accent:        oklch(0.665 0.230 18);
  --accent-hover:  oklch(0.715 0.215 19);
  --accent-press:  oklch(0.610 0.225 17);
  --accent-deep:   oklch(0.380 0.130 18);
  --accent-soft:   oklch(0.320 0.075 17);
  --on-accent:     oklch(0.990 0.012 17);
  --ring:          oklch(0.720 0.190 18 / 0.55);
  --shadow-1: 0 1px 2px oklch(0 0 0 / .35), 0 1px 3px oklch(0 0 0 / .40);
  --shadow-2: 0 12px 36px oklch(0 0 0 / .48), 0 3px 10px oklch(0 0 0 / .40);
}

/* ---- 3. Reset / Basis ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: var(--s2) var(--s4); border-radius: 0 0 var(--r-2) 0;
  box-shadow: var(--shadow-1);
}
.skip:focus { left: 0; }

/* ---- 4. Layout -------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s5);
}
main.wrap { flex: 1 0 auto; padding-block: var(--s7) var(--s8); }

.muted  { color: var(--text-muted); }
.faint  { color: var(--text-faint); }

/* Spacing-Utilities (vermeiden Inline-Styles -> strikte CSP) */
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-6 { margin-top: var(--s6); }
.mt-7 { margin-top: var(--s7); }
.mb-5 { margin-bottom: var(--s5); }

/* ---- 5. Typografie ---------------------------------------------------- */
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem); }
h3 { font-size: 1.2rem; font-weight: 650; }

.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 60ch; }
p { max-width: 70ch; }

.eyebrow {
  font-size: .76rem; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }

/* ---- 6. Topbar / Brand ------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 62px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand__logo { height: 24px; width: auto; }
.topbar__actions { display: inline-flex; align-items: center; gap: var(--s3); }
.topbar-auth { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.topbar-auth svg { color: var(--text-muted); transition: color .16s; }
.topbar-auth:hover { color: var(--accent); }
.topbar-auth:hover svg { color: var(--accent); }

/* Theme-Toggle */
.tgl {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-muted);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.tgl:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.tgl__sun, .tgl__moon { position: absolute; }
.tgl__sun  { display: none; }
.tgl__moon { display: block; }
[data-theme="dark"] .tgl__sun  { display: block; }
[data-theme="dark"] .tgl__moon { display: none; }

/* ---- 7. Buttons ------------------------------------------------------- */
.btn {
  --pad-y: .7rem; --pad-x: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: var(--pad-y) var(--pad-x);
  border: 1px solid transparent; border-radius: var(--r-2);
  font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .04s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background-image: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--on-accent); box-shadow: var(--shadow-1);
}
.btn--primary:hover  { background-image: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-deep) 100%); }
.btn--primary:active { background-image: linear-gradient(135deg, var(--accent-press) 0%, var(--accent-deep) 100%); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn--lg { --pad-y: .95rem; --pad-x: 1.6rem; font-size: 1.05rem; border-radius: var(--r-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn__arrow { transition: transform .18s cubic-bezier(.2,.7,.2,1); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---- 8. Panels -------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: clamp(var(--s5), 3vw, var(--s7));
  box-shadow: var(--shadow-1);
}

/* ---- 9. Formular / Maße ----------------------------------------------- */
.field { display: grid; gap: .4rem; }
.field__label { font-weight: 600; font-size: .95rem; }
.field__hint  { font-size: .82rem; color: var(--text-faint); }

.input-affix { position: relative; display: flex; align-items: center; }
.input {
  width: 100%;
  padding: .72rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:hover { border-color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.input::placeholder { color: var(--text-faint); }
.input--affixed { padding-right: 2.6rem; }
.input-affix__unit {
  position: absolute; right: .9rem;
  color: var(--text-faint); font-family: var(--mono); font-size: .9rem;
  pointer-events: none;
}

.dim-grid {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 620px) { .dim-grid { grid-template-columns: 1fr; } }

/* Live-Auswertung (Fläche / Volumen) */
.readout {
  display: flex; flex-wrap: wrap; gap: var(--s5);
  margin-top: var(--s5); padding: var(--s4) var(--s5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
}
.readout__item { display: grid; gap: .15rem; }
.readout__key { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.readout__val { font-family: var(--mono); font-size: 1.35rem; font-weight: 600; color: var(--text); }
.readout__val sup { font-size: .62em; }

.form-actions { display: flex; gap: var(--s3); margin-top: var(--s6); flex-wrap: wrap; }

/* Raum-Vorschau (3D-Schema, framework-frei) */
.room-stage {
  margin-top: var(--s5);
  display: grid; justify-items: center; gap: var(--s2);
  padding: var(--s4) var(--s4) var(--s3);
  background:
    radial-gradient(120% 80% at 50% 12%, oklch(from var(--accent) l c h / .07), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
}
.room-viz {
  width: 100%; max-width: 440px; height: auto;
  touch-action: pan-y; cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.room-viz:active { cursor: grabbing; }
.room-viz .face        { stroke: none; }
.room-viz .face--floor { fill: var(--accent); fill-opacity: .16; }
.room-viz .face--wall  { fill: var(--text);   fill-opacity: .045; }
.room-viz .edge {
  fill: none; stroke: var(--border-strong); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.room-viz .edge--base { stroke: var(--accent); stroke-opacity: .85; stroke-width: 1.8; }
.room-viz .label {
  fill: var(--text-muted); font-family: var(--mono);
  font-size: 10px; font-weight: 600;
}
.room-stage__cap {
  font-size: .74rem; letter-spacing: .04em; color: var(--text-faint);
}

.errorbox {
  margin-bottom: var(--s5); padding: var(--s3) var(--s4);
  border: 1px solid var(--err); border-radius: var(--r-2);
  background: oklch(from var(--err) l c h / .10); color: var(--text);
}

/* ---- 10. Stepper ------------------------------------------------------ */
.steps { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s6); flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: .55rem; color: var(--text-faint); }
.step__no {
  width: 26px; height: 26px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  font-size: .82rem; font-weight: 700; font-family: var(--mono);
}
.step__label { font-size: .9rem; font-weight: 600; }
.step--active { color: var(--text); }
.step--active .step__no { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step--done { color: var(--text-muted); }
.step--done .step__no { border-color: var(--accent); color: var(--accent); }
.step__bar { width: 28px; height: 2px; background: var(--border-strong); border-radius: 2px; }

/* ---- 11. Designguide-Bausteine ---------------------------------------- */
.dg-section { margin-top: var(--s8); }
.dg-section > h2 { margin-bottom: var(--s2); }
.dg-section > .lead { margin-bottom: var(--s5); }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s4); }
.sw { display: grid; gap: .5rem; }
.sw__chip { height: 60px; border-radius: var(--r-2); border: 1px solid var(--border); box-shadow: var(--shadow-1) inset; }
.sw__name { font-family: var(--mono); font-size: .82rem; }
.sw__use  { font-size: .78rem; color: var(--text-faint); }

.sw--bg .sw__chip        { background: var(--bg); }
.sw--surface .sw__chip   { background: var(--surface); }
.sw--surface2 .sw__chip  { background: var(--surface-2); }
.sw--border .sw__chip    { background: var(--border); }
.sw--text .sw__chip      { background: var(--text); }
.sw--muted .sw__chip     { background: var(--text-muted); }
.sw--accent .sw__chip    { background: var(--accent); }
.sw--accentH .sw__chip   { background: var(--accent-hover); }
.sw--accentSoft .sw__chip{ background: var(--accent-soft); }
.sw--ok .sw__chip        { background: var(--ok); }
.sw--warn .sw__chip      { background: var(--warn); }
.sw--err .sw__chip       { background: var(--err); }

.specimens { display: grid; gap: var(--s4); }
.specimen { display: grid; gap: .15rem; padding-bottom: var(--s4); border-bottom: 1px solid var(--border); }
.specimen__meta { font-family: var(--mono); font-size: .76rem; color: var(--text-faint); }

.demo-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }

.scale-strip { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.scale-box { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--r-1); display: grid; place-items: end center; }
.scale-box span { font-family: var(--mono); font-size: .7rem; color: var(--text-muted); padding: 2px; }
.scale-1 { width: var(--s1); height: var(--s1); }
.scale-2 { width: var(--s2); height: var(--s2); }
.scale-3 { width: var(--s3); height: var(--s3); }
.scale-4 { width: var(--s4); height: var(--s4); }
.scale-5 { width: var(--s5); height: var(--s5); }
.scale-6 { width: var(--s6); height: var(--s6); }
.scale-7 { width: var(--s7); height: var(--s7); }
.scale-8 { width: var(--s8); height: var(--s8); }

.logo-stage { display: flex; flex-wrap: wrap; gap: var(--s4); }
.logo-card { flex: 1 1 240px; border: 1px solid var(--border); border-radius: var(--r-3); padding: var(--s6); display: grid; place-items: center; min-height: 140px; }
.logo-card--light { background: oklch(0.985 0.004 262); color: oklch(0.29 0.02 262); }
.logo-card--dark  { background: oklch(0.185 0.012 262); color: oklch(0.95 0.008 262); }
.logo-card .brand__logo { width: 240px; max-width: 80%; height: auto; }

/* ---- 12. Footer ------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--border); flex-shrink: 0; }
.site-foot__in {
  display: flex; justify-content: space-between; gap: var(--s4);
  padding-block: var(--s5); font-size: .85rem; color: var(--text-muted);
  flex-wrap: wrap;
}

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

/* ---- 14. Auswahl-Karten (Radio) -------------------------------------- */
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset + .fieldset { margin-top: var(--s6); }
.fieldset__legend { padding: 0; font-weight: 650; font-size: 1.05rem; margin-bottom: var(--s3); }

.choice-group { display: grid; gap: var(--s3); }
@media (min-width: 560px) { .choice-group--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) { .choice-group--3 { grid-template-columns: repeat(3, 1fr); } }

.choice { position: relative; display: block; }
.choice input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.choice__box {
  display: grid; gap: .25rem;
  padding: var(--s4);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  transition: border-color .16s, box-shadow .16s, background .16s;
  height: 100%;
}
.choice__title { font-weight: 600; }
.choice__desc { font-size: .85rem; color: var(--text-faint); line-height: 1.4; }
.choice input:hover + .choice__box { border-color: var(--text-faint); }
.choice input:checked + .choice__box {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
  background: var(--accent-soft);
}
.choice input:focus-visible + .choice__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 15. Ergebnis (Schritt 3) ---------------------------------------- */
.result-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3) var(--s4); }
.config-badge {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem);
  letter-spacing: .02em; color: var(--accent); line-height: 1;
}

.section-h { margin-top: var(--s7); margin-bottom: var(--s3); }

.spec-list {
  display: grid; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  overflow: hidden;
}
.spec-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s4); padding: var(--s3) var(--s4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row__key { color: var(--text); }
.spec-row__val { color: var(--text-muted); text-align: right; }

.notes-list { display: grid; gap: var(--s3); margin-top: var(--s4); padding: 0; list-style: none; }
.notes-list li { display: flex; gap: .65rem; max-width: 72ch; }
.notes-list li::before {
  content: ""; flex: none; width: .5rem; height: .5rem; margin-top: .5rem;
  border-radius: 50%; background: var(--accent);
}

.tag-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.tag {
  font-family: var(--mono); font-size: .8rem;
  padding: .25rem .6rem; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---- 16. Dashboard-Hub ------------------------------------------------ */
.hub-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.hub-card {
  position: relative;
  display: grid; gap: .35rem; align-content: start;
  padding: var(--s5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); box-shadow: var(--shadow-1);
  text-decoration: none; color: var(--text);
  transition: border-color .16s, box-shadow .16s, transform .04s;
}
a.hub-card:hover  { border-color: var(--accent); box-shadow: var(--shadow-2); }
a.hub-card:active { transform: translateY(1px); }
.hub-card__title { font-weight: 650; font-size: 1.1rem; }
.hub-card__desc  { font-size: .9rem; color: var(--text-muted); }
.hub-card__arrow { position: absolute; top: var(--s5); right: var(--s5); color: var(--text-faint); transition: transform .18s, color .16s; }
a.hub-card:hover .hub-card__arrow { color: var(--accent); transform: translateX(3px); }
.hub-card--soon { opacity: .6; }
.hub-card--soon .hub-card__title::after {
  content: "folgt"; margin-left: .5rem; vertical-align: middle;
  font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--border); border-radius: var(--r-pill); padding: .1rem .45rem;
}

/* ---- 17. Adminbar + Flash --------------------------------------------- */
.adminbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.adminbar h1 { margin: 0; }

.flash-ok {
  margin-bottom: var(--s5); padding: var(--s3) var(--s4);
  border: 1px solid var(--ok); border-radius: var(--r-2);
  background: oklch(from var(--ok) l c h / .12); color: var(--text);
}

/* ---- 18. Datentabelle ------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-1); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td {
  text-align: left; padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap;
}
.data-table thead th {
  background: var(--surface-2); color: var(--text-muted);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 650;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .t-main { font-weight: 600; white-space: normal; display: grid; gap: .1rem; }
.data-table .t-sub  { color: var(--text-faint); font-size: .82rem; font-weight: 400; }
.data-table .t-wrap { white-space: normal; }
.data-table td.t-actions { text-align: right; white-space: nowrap; }
.data-table th .t-actions { display: inline-block; }
.data-table td.t-actions > * { vertical-align: middle; }
.cell-form { display: inline; margin-left: var(--s2); }

/* Status-Pills */
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--mono); font-size: .76rem; line-height: 1;
  padding: .28rem .55rem; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
}
.pill--ok   { border-color: oklch(from var(--ok)   l c h / .5); background: oklch(from var(--ok)   l c h / .14); color: var(--text); }
.pill--warn { border-color: oklch(from var(--warn) l c h / .5); background: oklch(from var(--warn) l c h / .16); color: var(--text); }
.pill--muted { color: var(--text-faint); }

/* Positions-Badges */
.pos-badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.pos-badge {
  font-family: var(--mono); font-size: .72rem; line-height: 1;
  padding: .22rem .45rem; border-radius: var(--r-1);
  background: var(--accent-soft); border: 1px solid var(--border); color: var(--text-muted);
}

/* ---- 19. Kleine Buttons / Gefahr -------------------------------------- */
.btn--sm { --pad-y: .45rem; --pad-x: .8rem; font-size: .88rem; border-radius: var(--r-1); }
.btn--danger { background: var(--surface); border-color: var(--border); color: var(--err); }
.btn--danger:hover { background: oklch(from var(--err) l c h / .12); border-color: var(--err); }

/* ---- 20. Bearbeitungs-Formular ---------------------------------------- */
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .col-span { grid-column: 1 / -1; }
textarea.input { min-height: 5.5rem; resize: vertical; line-height: 1.5; }
select.input { cursor: pointer; }

.checks { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.check {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem .7rem; background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-2); cursor: pointer;
  transition: border-color .16s;
}
.check:hover { border-color: var(--text-faint); }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }
.check__name { display: block; font-size: .95rem; }
.check__code { display: block; font-family: var(--mono); font-size: .72rem; color: var(--text-faint); }
