/*
 * Bausteine der Oberfläche (docs/DESIGN.md Abschnitt 5). Seiten bauen nur aus diesen Teilen;
 * die Stilvorlage „Admin → Komponenten“ zeigt jeden Baustein mit Beispieldaten.
 */

/* --- Symbole (Lucide-Sprite, Strichstärke 1,75) ------------------------------------------- */

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--20 { width: 20px; height: 20px; }
.icon--24 { width: 24px; height: 24px; }
.icon--32 { width: 32px; height: 32px; stroke-width: 1.5; }

/* --- Wortmarke ---------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--text-1);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

/* flex: none – sonst schrumpft das Symbol in engen Köpfen bis auf 0 px (base.css: svg
   max-width: 100 %), während der Schriftzug stehen bleibt. */
.logo {
  flex: none;
  width: 28px;
  height: 28px;
}

.logo__wick {
  stroke: currentcolor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.logo__candle--main { fill: var(--accent); }
.logo__candle--main-wick { stroke: var(--accent); }
.logo__candle--side { fill: var(--accent-deep); }
.logo__candle--side-wick { stroke: var(--accent-deep); }

/* --- Kopf und Navigation (DESIGN 5 „Navigation“) ------------------------------------------ */

.site-header {
  position: relative;
  z-index: var(--z-header);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  height: var(--header-height);
  max-width: calc(var(--content-max) + 2 * var(--page-gutter));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.site-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.site-header .site-header__toggle {
  display: none;
}

.main-nav__list {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
  height: var(--header-height);
}

.main-nav__list > li {
  display: flex;
}

.main-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-inline: 14px;
  color: var(--text-2);
  font: var(--text-nav);
  text-decoration: none;
  transition: color var(--ease);
}

.main-nav__link:hover {
  color: var(--text-1);
}

.main-nav__link[aria-current] {
  color: var(--text-1);
}

.main-nav__link[aria-current]::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 14px;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 50%, rgba(255, 255, 255, 0));
}

.main-nav__icon,
.main-nav__status {
  display: none;
}

/* Kompakter Kopf zwischen 900 und 1100 px (z. B. halber 1920-px-Bildschirm): Das vollständige
   Menü bleibt sichtbar (DESIGN 5: Panel erst unter 900 px), Abstände werden enger und die
   Datenstand-Pill zeigt nur ihren Punkt. Ohne das schiebt das Menü den Konto-Knopf aus dem Bild. */
@media (900px <= width < 1100px) {
  .site-header__inner {
    gap: var(--space-3);
  }

  .main-nav__link {
    padding-inline: 10px;
  }

  .site-header__tools .status-pill {
    gap: 0;
    padding-inline: 9px;
  }

  /* Text nur optisch aus; Punkt-Farbe, Tooltip und Vorlesetext bleiben (DESIGN 8). */
  .site-header__tools .status-pill__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (width < 900px) {
  .site-header__inner {
    grid-template-columns: 1fr auto auto;
    gap: var(--space-2);
  }

  .site-header .site-header__toggle {
    display: inline-flex;
    order: 3;
  }

  .site-header__tools .status-pill {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: calc(var(--header-height) - 4px);
    right: var(--page-gutter);
    left: var(--page-gutter);
    display: none;
    padding: var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--gradient-card);
    box-shadow: var(--shadow-float);
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav__list {
    flex-direction: column;
    gap: 2px;
    height: auto;
  }

  .main-nav__link {
    flex: 1;
    gap: var(--space-3);
    min-height: 48px;
    padding-inline: var(--space-4);
    border-radius: var(--r-input);
  }

  .main-nav__link:hover,
  .main-nav__link[aria-current] {
    background: var(--surface-pill);
  }

  .main-nav__link[aria-current]::after {
    display: none;
  }

  .main-nav__icon {
    display: block;
    color: var(--text-3);
  }

  .main-nav__link[aria-current] .main-nav__icon {
    color: var(--accent);
  }

  .main-nav__status {
    display: flex;
    padding: var(--space-3) var(--space-4) var(--space-2);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-2);
  }
}

/* Konto-Menü: schwebende Karte unter dem Symbolknopf. */
.account-menu {
  position: relative;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: var(--z-menu);
  width: 280px;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  background: var(--gradient-card);
  box-shadow: var(--shadow-float);
}

.menu-panel__head {
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-1);
}

.menu-panel__name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}

.menu-panel__email {
  overflow: hidden;
  color: var(--text-2);
  font-size: 0.8125rem;
  text-overflow: ellipsis;
}

.menu-panel__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-1);
  text-align: left;
  text-decoration: none;
  transition: background-color var(--ease);
}

.menu-panel__item .icon {
  color: var(--text-2);
}

.menu-panel__item:hover {
  background: var(--surface-pill);
}

.menu-panel__separator {
  height: 1px;
  margin: var(--space-1) 0;
  background: var(--border-subtle);
}

/* --- Fußzeile (DESIGN 5 „Fußzeile“) -------------------------------------------------------- */

/* --text-2 statt --text-3: Der Hinweis ist Pflicht (Bauplan 16.1), und --text-3 erreicht auf dem
   warmen Hintergrund am unteren Rand nur etwa 3 : 1 (DESIGN 8 verlangt 4,5 : 1; V-08). */
.site-footer {
  flex: none;
  color: var(--text-2);
  font-size: 0.75rem;
  line-height: 1rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  max-width: calc(var(--content-max) + 2 * var(--page-gutter));
  margin-inline: auto;
  padding: var(--space-6) var(--page-gutter) var(--space-7);
}

.site-footer__links {
  display: flex;
  gap: var(--space-3);
}

.site-footer__links li::before,
.site-footer__links li:first-child::before {
  content: "·";
  margin-right: var(--space-3);
}

@media (width < 600px) {
  .site-footer__links li:first-child::before {
    content: none;
  }
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text-1);
}

/* --- Seitenkopf --------------------------------------------------------------------------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.page-head__eyebrow {
  margin-bottom: var(--space-1);
  color: var(--text-3);
  font: var(--text-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-head__lead {
  max-width: 68ch;
  margin-top: var(--space-2);
  color: var(--text-2);
}

/* --- Knöpfe und Links (DESIGN 5) ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ease), border-color var(--ease), filter var(--ease), color var(--ease);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn--primary {
  background: var(--gradient-light);
  color: var(--text-inverse);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn--secondary {
  border-color: var(--border-subtle);
  background: var(--surface-pill);
  color: var(--text-1);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--surface-pill-hover);
}

.btn--accent {
  background: var(--gradient-accent);
  color: #1a1208;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px -14px rgba(240, 174, 102, 0.8);
}

.btn--accent:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-pill);
  color: var(--text-1);
}

.btn--sm {
  height: 32px;
  padding: 0 14px;
  font-size: 0.8125rem;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--surface-pill);
  color: var(--text-1);
  transition: background-color var(--ease), border-color var(--ease);
}

.icon-btn:hover,
.icon-btn[aria-expanded="true"] {
  border-color: var(--border);
  background: var(--surface-pill-hover);
}

.icon-btn__close,
.icon-btn[aria-expanded="true"] .icon-btn__open {
  display: none;
}

.icon-btn[aria-expanded="true"] .icon-btn__close {
  display: block;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-1);
  font-weight: 500;
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(2px);
}

/* --- Karten und Bento-Raster (DESIGN 4, 7) ------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.bento--compact {
  gap: var(--grid-gap-compact);
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (width < 1200px) {
  .span-3 { grid-column: span 6; }
  .span-4 { grid-column: span 6; }
  .span-8 { grid-column: span 12; }
}

@media (width < 900px) {
  .span-3,
  .span-4,
  .span-6,
  .span-8 {
    grid-column: span 12;
  }

  .bento--tiles > .span-3 {
    grid-column: span 6;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
}

.card--compact {
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--r-tile);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

/* Hero-Karte: höchstens eine je Seite, warmes Licht und Bernstein-Rand unten. */
.card--hero {
  border-color: rgba(240, 174, 102, 0.16);
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(240, 174, 102, 0.1), transparent 70%),
    var(--gradient-card);
}

.card--hero::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: -1px;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 174, 102, 0), rgba(240, 174, 102, 0.75) 50%, rgba(240, 174, 102, 0));
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  min-height: 32px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: var(--text-h2);
}

.card--compact .card__title {
  font: var(--text-h3);
}

.card__subtitle {
  color: var(--text-2);
}

/* Kartenfuß: sitzt immer am unteren Rand der Karte (.card ist eine Flex-Spalte). Ohne
   `margin-top: auto` schloss er direkt an den Inhalt an, und die Trennlinien dreier gleich
   hoher Karten einer Reihe lagen auf drei verschiedenen Höhen (AP 1.7, Review). */
.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-2);
}

/* Fließtext im Kartenfuß. `.card__foot` ist eine Flex-Zeile mit `space-between`: Ein Satz mit
   Auszeichnung darin (`<code>`, `<strong>`) zerfällt sonst in mehrere Flex-Kinder, die über die
   volle Breite auseinandergezogen werden – aus einem Satz wurden drei Zeilen (AP 1.7, Review).
   Entweder diese Variante verwenden oder den Satz in genau ein Kind fassen. */
.card__foot--text {
  display: block;
}

/* Große Zähler, z. B. „Signale des letzten Handelstags“ (DESIGN 3 „display“). */
.counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.counter {
  display: grid;
  gap: var(--space-1);
  justify-items: center;
  padding: var(--space-4) var(--space-2);
  text-align: center;
}

.counter__value {
  font: var(--text-display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.counter__value--hero {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.counter__label {
  color: var(--text-2);
}

.counter__value--empty {
  color: var(--text-3);
}

/* --- Kennzahl-Kachel, Veränderung, Sparkline (DESIGN 2.4, 5) ------------------------------- */

.stat-tile {
  position: relative;
  display: grid;
  gap: var(--space-2);
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: var(--space-5) var(--space-4);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-tile);
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.stat-tile--start {
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  text-align: left;
}

.stat-tile--start .stat-tile__spark {
  grid-row: 1 / span 3;
  grid-column: 2;
  align-self: center;
}

.stat-tile--glow-up {
  background: var(--glow-pos-light), var(--gradient-card);
  box-shadow: var(--glow-pos), var(--shadow-card);
}

.stat-tile--glow-down {
  background: var(--glow-neg-light), var(--gradient-card);
  box-shadow: var(--glow-neg), var(--shadow-card);
}

.stat-tile__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-1);
  font-size: 0.9375rem;
  font-weight: 500;
}

.stat-tile__label .icon {
  color: var(--text-2);
}

.stat-tile__value {
  font: var(--text-value);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-tile__value--up { color: var(--pos); }
.stat-tile__value--down { color: var(--neg); }

.stat-tile__spark {
  width: 120px;
  height: 32px;
}

.change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.change--up { color: var(--pos); }
.change--down { color: var(--neg); }
.change--flat { color: var(--text-2); }
.change--neutral { color: var(--text-1); }

.sparkline {
  display: block;
  width: 120px;
  height: 32px;
  overflow: visible;
}

.sparkline path {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sparkline--up path { stroke: var(--pos); }
.sparkline--down path { stroke: var(--neg); }
.sparkline--flat path { stroke: var(--text-2); }
.sparkline--neutral path { stroke: var(--text-1); }
.sparkline--accent path { stroke: var(--accent); }

/* --- Pills, Chips, Badges (DESIGN 5) ------------------------------------------------------- */

.status-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(126, 210, 144, 0.12);
  border-radius: var(--r-pill);
  background: var(--pos-bg);
  color: var(--pos-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pos-soft);
  box-shadow: var(--dot-glow-pos);
}

.status-pill--warning {
  border-color: rgba(240, 174, 102, 0.16);
  background: rgba(240, 174, 102, 0.1);
  color: var(--accent);
}

.status-pill--warning .status-pill__dot {
  background: var(--accent);
  box-shadow: var(--dot-glow-accent);
}

.status-pill--error {
  border-color: rgba(240, 138, 147, 0.14);
  background: var(--neg-bg);
  color: var(--neg-soft);
}

.status-pill--error .status-pill__dot {
  background: var(--neg-soft);
  box-shadow: var(--dot-glow-neg);
}

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: var(--r-chip);
  background: var(--tag-bg);
  color: var(--tag-text);
  font: var(--text-chip);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  /* Chips sind Pillen, keine Fließtext-Links: Ein Chip, der verlinkt (Filter „Anzahl je Art“),
     trüge sonst als einziger in der Anwendung eine Unterstreichung. */
  text-decoration: none;
}

.chip--neutral {
  background: var(--surface-pill);
  color: var(--text-2);
}

.chip--accent {
  background: rgba(210, 102, 42, 0.18);
  color: var(--accent);
}

/* Ein Chip, der verlinkt, braucht einen sichtbaren Zustand unter dem Zeiger und bei Tastatur. */
a.chip:hover,
a.chip:focus-visible {
  background: var(--surface-pill-hover);
  color: var(--text-1);
}

a.chip--accent:hover,
a.chip--accent:focus-visible {
  background: rgba(210, 102, 42, 0.28);
  color: var(--accent);
}

/* Reihe dicht nebeneinander stehender Chips, z. B. „Anzahl je Art“ (F-ADM-05). Ohne eigene
   Ausrichtung zöge `.card__foot` sie mit `space-between` über die ganze Kartenbreite. */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
}

.signal-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.signal-badge--new {
  background: rgba(240, 174, 102, 0.14);
  color: var(--accent);
}

.signal-badge--reactivated {
  background: rgba(167, 139, 250, 0.14);
  color: var(--violet);
}

.signal-badge--up {
  background: var(--pos-bg);
  color: var(--pos-soft);
}

.signal-badge--down {
  background: var(--neg-bg);
  color: var(--neg-soft);
}

.signal-badge--neutral {
  background: var(--surface-pill);
  color: var(--text-2);
}

kbd,
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-1);
  color: var(--text-2);
  font: 500 0.75rem/1 var(--font-sans);
}

/* --- Segment-Umschalter und Unter-Navigation (DESIGN 5, 7) --------------------------------- */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.segmented__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  background: var(--surface-pill);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease);
}

.segmented__item:hover {
  background: var(--surface-pill-hover);
  color: var(--text-1);
}

.segmented__item[aria-current],
.segmented__item[aria-pressed="true"] {
  border-color: var(--border);
  background: var(--surface-active);
  color: var(--text-1);
}

.segmented--sm .segmented__item {
  height: 32px;
  padding: 0 14px;
  font-size: 0.8125rem;
}

.with-sidebar {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

.side-nav {
  position: sticky;
  top: var(--space-6);
  display: grid;
  gap: var(--space-3);
}

.side-nav__title {
  padding-inline: var(--space-4);
  color: var(--text-3);
  font: var(--text-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-nav__list {
  display: grid;
  gap: 4px;
}

.side-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}

.side-nav__link .icon {
  color: var(--text-3);
}

.side-nav__link:hover {
  background: var(--surface-pill);
  color: var(--text-1);
}

.side-nav__link[aria-current="page"] {
  border-color: var(--border-subtle);
  background: var(--surface-pill);
  color: var(--text-1);
}

.side-nav__link[aria-current="page"] .icon {
  color: var(--accent);
}

@media (width < 900px) {
  .with-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .side-nav {
    position: static;
    overflow-x: auto;
    scrollbar-width: none;
  }

  /* Reicht die Reihe über den Rand hinaus (js/navigation.js), zeigen ausgeblendete Enden, dass
     es weitergeht. */
  .side-nav[data-scrollable] {
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }

  .side-nav__title {
    display: none;
  }

  .side-nav__list {
    display: flex;
    gap: var(--space-2);
  }

  .side-nav__link {
    flex: none;
    border-color: var(--border-subtle);
    background: var(--surface-pill);
    white-space: nowrap;
  }
}

/* --- Formulare (DESIGN 5 „Eingabefeld“, „Suchfeld“, „Autovervollständigung“) --------------- */

.form {
  display: grid;
  gap: var(--space-4);
}

/* Formular in einer Zeile, z. B. „Neue Einladung“ über der Liste (Admin). */
.form--inline {
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 320px);
  align-items: start;
  justify-content: start;
}

.form--inline > .btn {
  /* Auf Höhe der Eingabefelder: Beschriftung (16 px) plus Abstand (6 px). */
  margin-top: 22px;
}

@media (width < 760px) {
  .form--inline {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .form--inline > .btn {
    margin-top: 0;
    justify-self: start;
  }
}

.form__errors {
  display: grid;
  gap: var(--space-2);
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  color: var(--text-2);
  font: var(--text-label);
}

.field__required {
  color: var(--accent);
}

/* --text-2 (6,1 : 1), nicht --text-3 (3,25 : 1): Der Hilfetext ist die Anleitung zum Feld und
   damit eine Pflichtinfo – DESIGN 2.2 lässt --text-3 dafür nicht zu, DESIGN 8 verlangt 4,5 : 1
   (AP 1.7, Review; dieselbe Korrektur wie bei der ISIN-Zeile in AP 1.4). */
.field__help {
  color: var(--text-2);
  font-size: 0.75rem;
  line-height: 1rem;
}

.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--neg-soft);
  font-size: 0.75rem;
  line-height: 1rem;
}

.input,
.field :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: var(--surface-input);
  color: var(--text-1);
  font-size: 0.875rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field textarea {
  height: auto;
  min-height: 96px;
  padding-block: 10px;
  resize: vertical;
}

.field select,
select.input {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A9AA0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px;
}

.input::placeholder,
.field :is(input, textarea)::placeholder {
  color: var(--text-3);
}

.input:hover,
.field :is(input, select, textarea):hover {
  border-color: var(--border-strong);
}

.input:focus,
.field :is(input, select, textarea):focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--focus-ring);
}

.field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: rgba(216, 78, 90, 0.7);
}

.field--check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.field--check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 640px;
}

.search__icon {
  position: absolute;
  left: 18px;
  color: var(--text-2);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 48px;
  padding: 0 56px 0 48px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-input);
  color: var(--text-1);
  font-size: 0.9375rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.search__input::placeholder {
  color: var(--text-3);
}

.search__input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--focus-ring);
}

.search__hint {
  position: absolute;
  right: 16px;
  transition: opacity var(--ease);
}

/* Der Tastenhinweis „/“ führt ins Feld; im Feld ist er überflüssig und macht der Ladeanzeige
   Platz (ergänzt mit AP 1.4). */
.search__input:focus ~ .search__hint {
  opacity: 0;
}

.search__spinner {
  /* Links neben dem Lösch-Knopf, den Browser für type="search" selbst zeichnen. */
  position: absolute;
  right: 44px;
}

.autocomplete {
  position: relative;
  max-width: 640px;
}

.autocomplete__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: var(--z-menu);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  background: var(--gradient-card);
  box-shadow: var(--shadow-float);
}

.autocomplete__list--static {
  position: static;
  margin-top: var(--space-2);
}

.autocomplete__option {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: 10px;
  cursor: pointer;
}

.autocomplete__option[aria-selected="true"],
.autocomplete__option:hover {
  background: var(--surface-pill);
}

/* Die ausgewählte Zeile liegt auf derselben Fläche wie die neutralen Chips; ohne diese Regel
   verlören sie dort ihre Pillenform (DESIGN 5 „Autovervollständigung“). */
.autocomplete__option[aria-selected="true"] .chip--neutral,
.autocomplete__option:hover .chip--neutral {
  background: var(--surface-1);
  border-color: var(--border);
}

.autocomplete__symbol {
  font-weight: 600;
}

.autocomplete__name {
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ergänzungen mit AP 1.4: Treffer hervorheben, ISIN als zweite Zeile, Leerzustand. */
.autocomplete__option:link,
.autocomplete__option:visited {
  color: var(--text-1);
  text-decoration: none;
}

.autocomplete__option mark {
  background: none;
  color: var(--accent);
  font-weight: 600;
}

.autocomplete__title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete__isin {
  /* --text-2, nicht --text-3: 12 px zählen nicht als „große Zahl“, und --text-3 erreicht auf der
     Kartenfläche nur ca. 3,2 : 1 (DESIGN 8 verlangt 4,5 : 1). */
  color: var(--text-2);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.autocomplete__tags {
  display: flex;
  gap: 6px;
}

/* Auf schmalen Bildschirmen bleibt nur der Börsen-Chip (DESIGN 5); der Name braucht den Platz. */
@media (width < 480px) {
  .autocomplete__type {
    display: none;
  }
}

.autocomplete__empty {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--text-2);
  font-size: 0.875rem;
}

.autocomplete__empty svg {
  flex: none;
}

/* Eine lange Eingabe steht gekürzt in der Zeile (DESIGN 5: „eine Zeile“) und darf die Seite
   nicht waagerecht aufschieben. */
.autocomplete__empty-text {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Tabelle (DESIGN 5 „Tabelle“), mobil als Liste ----------------------------------------- */

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font: var(--text-table);
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 36px;
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-3);
  font: var(--text-label);
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  height: 40px;
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

/* Lange Fließtexte (z. B. der Befund der Datenqualität) dürfen umbrechen; ohne das schöbe ein
   langer Satz die Aktionsspalte aus dem sichtbaren Bereich (DESIGN 5 „Tabelle“, AP 1.6). */
.table td[data-wrap] {
  white-space: normal;
  min-width: 28ch;
}

.table th:first-child,
.table td:first-child {
  padding-left: var(--space-5);
}

.table th:last-child,
.table td:last-child {
  padding-right: var(--space-5);
}

.table tbody tr {
  position: relative;
  transition: background-color var(--ease);
}

.table tbody tr:hover {
  background: var(--surface-3);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
}

.table td.num {
  font-weight: 500;
}

.table--compact td {
  height: 34px;
}

.table__symbol {
  font-weight: 600;
}

/* Zwei Zeilen in einer Zelle: Hauptangabe, darunter die Nebenangabe (Job und sein Zeitplan,
   letzter Lauf und seine Dauer). Spart eine Spalte, ohne die Angabe zu verlieren – mit eigenen
   Spalten lief die Jobtabelle rechts aus der Karte (DESIGN 5 „Tabelle“, AP 1.7). */
.cell-stack {
  /* inline-flex, nicht flex: Auf dem Telefon steht die Beschriftung der Zelle als ::before
     davor; als Block drängte die Zelle sie in eine eigene Zeile. */
  display: inline-flex;
  flex-direction: column;
  vertical-align: top;
  gap: 2px;
  padding-block: var(--space-2);
  white-space: normal;
}

/* Erste Spalte: Der Name soll in einer Zeile stehen, sonst bricht jede Zeile dreifach um und
   die Nachbarspalte bekommt Platz, den sie nicht braucht. */
.cell-stack--title {
  /* min(): Auf schmalen Bildschirmen zählt die Breite der Karte, nicht die des Namens. */
  min-width: min(30ch, 100%);
}

.cell-stack__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font: var(--text-label);
}

.table td.table__wrap {
  min-width: 220px;
  padding-block: var(--space-2);
  white-space: normal;
}

.table__name {
  max-width: 260px;
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
}

/* Sortierbarer Kopf: Knopf mit Pfeil; aria-sort am <th>. */
.sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sort:hover,
[aria-sort] > .sort {
  color: var(--text-1);
}

.sort .icon {
  opacity: 0.6;
}

/* Klickbare Zeilen: der Link der ersten Zelle deckt die ganze Zeile ab. */
.row-link {
  color: inherit;
  text-decoration: none;
}

.row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.table tbody tr:has(.row-link) {
  cursor: pointer;
}

.table tbody tr:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.row-link:focus-visible {
  outline: none;
}

@media (width < 640px) {
  .table--responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table--responsive,
  .table--responsive tbody {
    display: block;
  }

  .table--responsive tbody {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-2);
  }

  .table--responsive tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-input);
    background: var(--surface-2);
  }

  .table--responsive td,
  .table--responsive td:first-child,
  .table--responsive td:last-child {
    height: auto;
    padding: 0;
    border: 0;
  }

  .table--responsive td[data-label]:not([data-primary], [data-trailing])::before {
    content: attr(data-label) ": ";
    color: var(--text-3);
  }

  .table--responsive td[data-optional] {
    display: none;
  }

  /* In der Listendarstellung steht die Beschriftung der Zelle als ::before davor. Der eigene
     Innenabstand der zweizeiligen Zelle schöbe ihren Inhalt gegenüber dieser Beschriftung nach
     unten – „Letzter Lauf:“ und der Wert stünden nicht auf einer Linie (AP 1.7, Review). */
  .table--responsive .cell-stack {
    padding-block: 0;
  }

  /* Die Aktionszelle bekommt eine eigene volle Zeile. Vorher stand sie rechts neben Spalte 1;
     weil ihre Knöpfe nicht umbrechen (white-space: nowrap), holte sie sich ihre max-content-
     Breite, Spalte 1 schrumpfte auf 0 und ihr Inhalt lief unter die Knöpfe (AP 1.3, Review). */
  .table--responsive td[data-trailing] {
    grid-column: 1 / -1;
    text-align: left;
  }

  /* minmax(0, 1fr) allein genügt nicht: Ohne min-width: 0 behalten Zellen ihre Mindestbreite
     aus dem Inhalt und laufen über. */
  .table--responsive td:not([data-trailing]) {
    grid-column: 1;
    min-width: 0;
  }

  .table--responsive td[data-trailing] .cell-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }
}

/* --- Fortschritt, Hinweise, Meldungen (DESIGN 5) ------------------------------------------- */

.progress {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface-pill);
  appearance: none;
}

.progress::-webkit-progress-bar {
  border-radius: var(--r-pill);
  background: var(--surface-pill);
}

.progress::-webkit-progress-value {
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #e4964e, #f6c27f);
}

.progress::-moz-progress-bar {
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #e4964e, #f6c27f);
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-3);
  align-items: center;
}

.progress-row .progress {
  grid-column: 1 / -1;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--sky);
  border-radius: var(--r-input);
  background: var(--surface-2);
}

.alert > .icon {
  margin-top: 1px;
  color: var(--sky);
}

.alert__title {
  font-weight: 500;
}

.alert__text {
  color: var(--text-2);
}

.alert--success { border-left-color: var(--pos); }
.alert--success > .icon { color: var(--pos); }
.alert--warning { border-left-color: var(--accent); }
.alert--warning > .icon { color: var(--accent); }
.alert--error { border-left-color: var(--neg); }
.alert--error > .icon { color: var(--neg); }

.toast-region {
  position: fixed;
  top: calc(var(--header-height) + var(--space-2));
  right: var(--page-gutter);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-2);
  width: min(380px, calc(100vw - 2 * var(--page-gutter)));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sky);
  border-radius: var(--r-input);
  background: var(--surface-2);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
  animation: toast-in 200ms ease-out;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

.toast__icon {
  margin-top: 1px;
  color: var(--sky);
}

.toast__text {
  flex: 1;
  padding-top: 1px;
}

.toast__close {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-2);
}

.toast__close:hover {
  background: var(--surface-pill);
  color: var(--text-1);
}

.toast--success { border-left-color: var(--pos); }
.toast--success .toast__icon { color: var(--pos); }
.toast--warning { border-left-color: var(--accent); }
.toast--warning .toast__icon { color: var(--accent); }
.toast--error { border-left-color: var(--neg); }
.toast--error .toast__icon { color: var(--neg); }

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* --- Leer- und Ladezustand (DESIGN 5) ------------------------------------------------------ */

.empty-state {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  padding: var(--space-8) var(--space-6);
  color: var(--text-2);
  text-align: center;
}

.empty-state--compact {
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
}

/* Im Kartenfuß (Flex-Zeile) füllt der Leerzustand die Breite, damit er mittig steht statt links
   zu kleben (AP 1.6). */
.card__foot > .empty-state {
  flex: 1;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-1);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05), transparent 70%);
  color: var(--text-3);
}

.empty-state--compact .empty-state__icon {
  width: 52px;
  height: 52px;
}

.empty-state__title {
  color: var(--text-1);
  font: var(--text-h3);
}

/* Überschriften der Fehlerseiten (403, 404) erben sonst --text-2 und wirken ausgeblichen. */
.empty-state h1 {
  color: var(--text-1);
}

.empty-state__text {
  max-width: 46ch;
}

.skeleton {
  display: grid;
  gap: var(--space-3);
}

.skeleton__bar {
  height: 12px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--surface-pill) 0%, var(--surface-pill-hover) 50%, var(--surface-pill) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton__bar--title { width: 40%; height: 16px; }
.skeleton__bar--long { width: 92%; }
.skeleton__bar--medium { width: 70%; }
.skeleton__bar--short { width: 48%; }

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.spinner {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(240, 174, 102, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* HTMX-Ladeanzeige (includeIndicatorStyles ist aus, CSP ohne Inline-Stile). */
.htmx-indicator {
  opacity: 0;
  transition: opacity var(--ease);
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* --- Tooltip (DESIGN 5) -------------------------------------------------------------------- */

.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip__content,
.tooltip-card {
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow-float);
  font-size: 0.75rem;
  line-height: 1rem;
}

.tooltip__content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: var(--z-menu);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity var(--ease), transform var(--ease);
}

.tooltip:hover .tooltip__content,
.tooltip:focus-within .tooltip__content {
  opacity: 1;
  transform: translate(-50%, 0);
}

.kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px var(--space-4);
}

.kv dt {
  color: var(--text-2);
}

.kv dd {
  color: var(--text-1);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kv--wide {
  gap: var(--space-3) var(--space-6);
  font-size: 0.875rem;
}

.kv--wide dd {
  text-align: left;
}

.kv__title {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--text-1);
  font-weight: 600;
}

/* --- Chart-Karte (DESIGN 6) ---------------------------------------------------------------- */

.chart {
  position: relative;
  width: 100%;
  height: 360px;
}

.chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--text-2);
  font-size: 0.75rem;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

.legend-swatch--accent { background: var(--accent); }
.legend-swatch--up { background: var(--pos); }
.legend-swatch--down { background: var(--neg); }

/* --- Ergänzungen für Seiten ---------------------------------------------------------------- */

/* Karte als Link, z. B. Bereiche der Admin-Übersicht. */
.card--link {
  color: inherit;
  text-decoration: none;
  transition: border-color var(--ease), background-color var(--ease);
}

.card--link:hover {
  border-color: var(--border-strong);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-pill);
  color: var(--accent);
}

.card__head--padded {
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.error-card {
  max-width: 640px;
  margin: var(--space-8) auto;
}

.check-list {
  display: grid;
  gap: var(--space-3);
  color: var(--text-2);
}

.check-list li {
  display: flex;
  gap: var(--space-3);
}

.check-list .icon {
  margin-top: 2px;
  color: var(--pos-soft);
}

.notice {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-input);
  background: var(--surface-input);
  color: var(--text-2);
  white-space: pre-wrap;
}

/* Inhalte einer Tabellenzelle nebeneinander, z. B. Zustand und kleine Knöpfe (Admin). */
.cell-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  white-space: nowrap;
}

.cell-actions--end {
  justify-content: flex-end;
}

.cell-actions form {
  display: contents;
}

@media (width < 700px) {
  .cell-actions--end {
    justify-content: flex-start;
  }
}

/* Blätterleiste unter einer Tabelle (Admin-Protokoll). */
.pager {
  padding: var(--space-3) var(--space-4);
}

.pager__controls {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Filterleiste im Kartenkopf (Admin-Protokoll). */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.filter-bar .input {
  width: auto;
  min-width: 170px;
  height: 32px;
  padding: 0 var(--space-3);
  font-size: 0.8125rem;
}

.filter-bar select.input {
  padding-right: 34px;
  background-position: right 10px center;
}

/* Gruppe aus Beschriftung und zwei Feldern (z. B. „Handelstag von/bis“, AP 1.6). Sie bleibt
   zusammen und rückt auf schmalen Bildschirmen in eine eigene Zeile; sonst stünde die
   Beschriftung neben dem vorigen Feld und sähe aus, als gehörte sie dorthin. */
.filter-bar__group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* Beschriftung und Feld gehören zusammen und brechen gemeinsam um – sonst stünde „bis“ am Ende
   einer Zeile und sein Feld in der nächsten. */
.filter-bar__pair {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Kurzbeschriftung unmittelbar vor einem Feld („von“, „bis“). Sie steht sichtbar zwischen den
   Feldern: Zwei gleich aussehende Datumsfelder wären sonst nur über den Hinweistext zu
   unterscheiden – und auf schmalen Bildschirmen, wo das zweite Feld umbricht, gar nicht. */
.filter-bar__label {
  color: var(--text-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}

@media (width < 700px) {
  .filter-bar__group {
    flex-basis: 100%;
  }
}

/* Wiederherstellungscodes: gleichmäßiges Raster aus Tastenkappen. */
.code-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
}

.code-list .kbd {
  display: block;
  text-align: center;
}

/* QR-Code der Zwei-Faktor-Einrichtung: heller Grund, damit Kameras ihn sicher erkennen. */
.qr-code {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  padding: var(--space-3);
  border-radius: var(--r-tile);
  background: #ffffff;
}
