/* resyDoc – Oberflaeche (Design-System).
   Ruhig, hochwertig, "Apple-like": Klarheit, Zurueckhaltung, Tiefe.
   Bewusst schlank und lokal: keine CDNs, keine externen Schriften, keine
   Tracker (DSGVO, Leitprinzip 5/6). Grundlage: docs/DESIGN.md.
   Bestehende Klassennamen bleiben erhalten – nur ihr Aussehen wird gepflegt. */

/* ============================================================
   1. Gestaltungstoken
   ============================================================ */
:root {
  /* Marke / Akzent – resyDoc-Design-System (2026): vivid blue.
     Sparsam eingesetzt, nur Primaeraktion und aktiver Zustand. */
  --akzent: #2b49d4;
  --akzent-tief: #2139ae;   /* Hover/Active der Primaerflaeche */
  --akzent-hell: #2139ae;   /* Links (WCAG-AA auf Weiss: ~7:1) */
  --akzent-hauch: #eef1fd;  /* zarte Akzent-Tint-Flaeche (aktive Kachel/Tab) */

  /* Neutrale Graustufen (Design-System-Skala) */
  --text: #171a21;          /* Fliesstext / Ueberschriften */
  --grau: #3a4150;          /* Sekundaertext, AA auf Weiss */
  --grau-leise: #66707f;    /* dezente Metatexte; AA auch auf kleinen Badges */
  --grau-zart: #9aa3b2;     /* Platzhalter/Icons */
  --linie: #e4e8ef;         /* Hairline */
  --linie-kraeftig: #d6dce5;
  --flaeche: #ffffff;       /* Karten, Tabellen */
  --flaeche-leise: #eef1f6; /* Tabellenkopf, leise Flaechen */
  --hintergrund: #f5f7fa;

  /* Zustandsfarben – dezent (Flaeche / Rahmen / Text), auf das System abgestimmt */
  --erfolg-fl: #e9f6f0;  --erfolg-li: #b7e0cc;  --erfolg-tx: #157a52;
  --hinweis-fl: #eef1fd; --hinweis-li: #b9c5f5; --hinweis-tx: #2139ae;
  --warnung-fl: #fbf3e3; --warnung-li: #f0e0bc; --warnung-tx: #8a6710;
  --fehler-fl: #fbeeed;  --fehler-li: #edc3bf;  --fehler-tx: #b23a33;

  /* Raster (8px-Basis) */
  --raum-1: 4px;  --raum-2: 8px;  --raum-3: 12px; --raum-4: 16px;
  --raum-5: 20px; --raum-6: 24px; --raum-8: 32px; --raum-10: 40px; --raum-12: 48px;

  /* Radius – eine Skala fuer alles: klein (Felder), Standard (Karten),
     Knopf, gross (Panels, Dialog, Hero-Kacheln) */
  --radius: 12px;
  --radius-klein: 8px;
  --radius-knopf: 10px;
  --radius-gross: 16px;

  /* Schatten – dreistufige Skala, weich und kuehlgrau statt reinem Schwarz:
     leise (Tabellen, ruhige Flaechen) · karte (Karten, Kacheln, Meldungen) ·
     schwebend (Dropdowns, Dialog – alles, was ueber der Seite liegt) */
  --schatten-leise: 0 1px 2px rgba(17, 24, 39, .05);
  --schatten-karte: 0 1px 2px rgba(17, 24, 39, .04), 0 6px 20px rgba(17, 24, 39, .05);
  --schatten: 0 4px 10px rgba(17, 24, 39, .05), 0 18px 44px rgba(17, 24, 39, .13);

  /* Typografie */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Fokus / Bewegung – ein Tempo, eine Kurve (sanftes ease-out) fuer Hover,
     Fokus und Active; --uebergang-ein fuer Einblendungen (Dialog, Meldungen) */
  --fokus-ring: 0 0 0 3px rgba(43, 73, 212, .32);
  --uebergang: 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --uebergang-ein: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Hauchzarte Hover-Flaeche zwischen Weiss und --flaeche-leise */
  --flaeche-hauch: #fafafc;

  --breite: 1080px;

  color-scheme: light;
}

/* ============================================================
   1b. Dunkelmodus – Token-Neubelegung (Komponenten bleiben unberührt, weil sie
   durchgehend die Token nutzen). Greift (a) automatisch bei System-Dunkel,
   sofern der Nutzer nicht ausdrücklich „Hell" gewählt hat, und (b) bei
   ausdrücklicher Wahl „Dunkel". Dokumente/PDFs sind ein eigener Erzeugungspfad
   und NICHT betroffen. Kontraste WCAG-AA-orientiert.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --akzent-hell: #8fb0e6;
    --akzent-hauch: #1b2440;
    --text: #f2f2f5;
    --grau: #adadb5;
    --grau-leise: #9fa0a8;
    --grau-zart: #6b6c74;
    --linie: #33343a;
    --linie-kraeftig: #45464e;
    --flaeche: #1c1c1f;
    --flaeche-leise: #232327;
    --hintergrund: #131315;
    --flaeche-hauch: #242429;
    --erfolg-fl: #16261b; --erfolg-li: #315f3d; --erfolg-tx: #8ad3a0;
    --hinweis-fl: #17233a; --hinweis-li: #2f4a76; --hinweis-tx: #a6c6f2;
    --warnung-fl: #2a2411; --warnung-li: #6a5a2a; --warnung-tx: #e8c979;
    --fehler-fl: #2b1616; --fehler-li: #6b3a3a; --fehler-tx: #f0a1a1;
    --schatten-leise: 0 1px 2px rgba(0, 0, 0, .5);
    --schatten-karte: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .55);
    --schatten: 0 4px 10px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .62);
    --fokus-ring: 0 0 0 3px rgba(143, 176, 230, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --akzent-hell: #8fb0e6;
  --text: #f2f2f5;
  --grau: #adadb5;
  --grau-leise: #9fa0a8;
  --linie: #33343a;
  --linie-kraeftig: #45464e;
  --flaeche: #1c1c1f;
  --flaeche-leise: #232327;
  --hintergrund: #131315;
  --flaeche-hauch: #242429;
  --erfolg-fl: #16261b; --erfolg-li: #315f3d; --erfolg-tx: #8ad3a0;
  --hinweis-fl: #17233a; --hinweis-li: #2f4a76; --hinweis-tx: #a6c6f2;
  --warnung-fl: #2a2411; --warnung-li: #6a5a2a; --warnung-tx: #e8c979;
  --fehler-fl: #2b1616; --fehler-li: #6b3a3a; --fehler-tx: #f0a1a1;
  --schatten-leise: 0 1px 2px rgba(0, 0, 0, .5);
  --schatten-karte: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .55);
  --schatten: 0 4px 10px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .62);
  --fokus-ring: 0 0 0 3px rgba(143, 176, 230, .45);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Scrollleisten-Platz IMMER reservieren (PO-Befund 22.07.): sonst rutscht
     der zentrierte Inhalt – und damit Logo/Navigation – um die Leistenbreite,
     wenn eine Seite (z. B. Dashboard) kürzer als der Viewport ist und keine
     Scrollleiste zeigt. So bleibt der Kopf über alle Seiten deckungsgleich. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--hintergrund);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--akzent-hell); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sichtbarer Fokusring ueberall – nie entfernen. */
:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   2. Skip-Link (Barrierefreiheit)
   ============================================================ */
.skip {
  position: absolute;
  left: var(--raum-2);
  top: -60px;
  z-index: 100;
  background: var(--akzent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-klein);
  font-size: 14px;
  transition: top var(--uebergang);
}
.skip:focus { top: var(--raum-2); text-decoration: none; }

/* ============================================================
   3. Kopf / Navigation – moderner App-Header in zwei Zeilen:
   Zeile 1: Marke links, Konto-Menue (Account-Dropdown) rechts.
   Zeile 2: Themen-Navigation als ruhige Tab-Leiste; auf schmalen
   Screens horizontal wischbar statt umzubrechen.
   ============================================================ */
/* App-Shell: schwebende, abgerundete Flaeche auf ruhigem Grund (Design-System-
   Mockup 2026). Umfasst Kopf + Inhalt; Overlays/Dialoge bleiben ausserhalb. */
.app-huelle {
  /* Vollbild: die Anwendungsfläche füllt den ganzen Bildschirm (kein
     schwebendes Kärtchen mit grauen Rändern). Der Inhalt selbst ist innen
     grosszügig eingerückt und auf sehr breiten Schirmen sanft zentriert,
     damit Fliesstext lesbar bleibt. Tablet/Handy stapelt ohnehin responsiv. */
  max-width: none;
  margin: 0;
  min-height: 100vh;
  background: var(--flaeche);
  border: none;
  border-radius: 0;
  overflow: clip;
}
.app-huelle .kopf { padding-left: var(--raum-8); padding-right: var(--raum-8); }
.app-huelle .kopf-innen { max-width: 1760px; margin: 0 auto; }
.app-huelle > main {
  max-width: 1760px;
  margin: 0 auto;
  padding: var(--raum-8) var(--raum-8) var(--raum-12);
}
@media (max-width: 760px) {
  .app-huelle > main { padding: var(--raum-6) var(--raum-5) var(--raum-10); }
}

.kopf {
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  padding: 0 var(--raum-6);
}
.kopf-innen {
  max-width: var(--breite);
  margin: 0 auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--raum-6);
}

/* Marke: Logo · Hairline-Trenner · Produktname (nicht mehr "geklatscht"). */
.marke {
  display: inline-flex;
  align-items: center;
  gap: var(--raum-3);
  text-decoration: none;
  min-width: 0;
}
.marke:hover { text-decoration: none; }
.kopf img { height: 24px; width: auto; display: block; }
.marke-trenner {
  width: 1px;
  height: 22px;
  background: var(--linie-kraeftig);
  flex: none;
}
.wortmarke {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.wortmarke-akzent { color: var(--akzent); }

/* --- Konto-Menue (klassisches Account-Dropdown rechts) ----------------- */
.konto-menu { position: relative; }
.konto-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--raum-2);
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: 980px;
  background: var(--flaeche);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;                 /* Standard-Dreieck (Firefox) entfernen */
  transition: background var(--uebergang), box-shadow var(--uebergang);
}
.konto-toggle::-webkit-details-marker { display: none; }   /* Safari/Chrome */
.konto-toggle:hover { background: var(--flaeche-leise); }
.konto-toggle:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
/* Dezenter Aufklapp-Pfeil, dreht beim Oeffnen. */
.konto-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--grau);
  border-bottom: 1.5px solid var(--grau);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--uebergang);
  flex: none;
}
.konto-menu[open] .konto-toggle::after { transform: translateY(1px) rotate(-135deg); }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--akzent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.avatar-gross { width: 38px; height: 38px; font-size: 16px; }

/* Objekt-Signet (Runde 4): ruhiges Erkennungszeichen (zwei Initialen) mit
   deterministischer, aus dem Namen abgeleiteter Farbe (Templatetag
   ``objekt_signet``). Abgerundetes Quadrat statt Kreis – unterscheidet sich
   bewusst vom runden Nutzer-Avatar. Die Farbe kommt inline als CSS-Variable
   (--signet), damit die Regel hier zentral bleibt. */
.signet {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--signet, var(--akzent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
  vertical-align: middle;
}
.signet-gross { width: 44px; height: 44px; border-radius: 11px; font-size: 17px; }
/* Signet mit Objekt-Nr. („AS17") statt Initialen: Pille in Auto-Breite. */
.signet-nr { width: auto; min-width: 30px; padding: 0 8px; font-size: 12px; letter-spacing: .02em; }
.signet-gross.signet-nr { min-width: 44px; font-size: 14px; }
/* Zeile „Signet + Name" in Listen: Signet links, Name daneben. */
.signet-zeile { display: inline-flex; align-items: center; gap: var(--raum-2); }

/* Blaupause auf mehrere Objekte (Runde 5): Objekt-Checkboxen als kompaktes,
   umbrechendes Raster – je gewähltes Objekt entsteht ein Entwurf. */
.objekt-mehrfachwahl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--raum-1) var(--raum-4);
  margin-top: var(--raum-2);
}

.konto-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
  padding: var(--raum-2);
  z-index: 60;
}
.konto-kopf {
  display: flex;
  align-items: center;
  gap: var(--raum-3);
  padding: var(--raum-3);
  border-bottom: 1px solid var(--linie);
  margin-bottom: var(--raum-2);
}
.konto-daten { display: flex; flex-direction: column; min-width: 0; }
.konto-benutzer { font-weight: 600; font-size: 14px; }
.konto-mandant { color: var(--grau); font-size: 12.5px; }
.konto-eintrag {
  display: flex;
  align-items: center;
  gap: var(--raum-3);
  width: 100%;
  text-align: left;
  padding: 9px var(--raum-3);
  border: none;
  border-radius: var(--radius-klein);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--uebergang);
}
/* Einheitliche Icon-Spalte im Konto-Menü (alle Einträge tragen ein Icon). */
.konto-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--grau);
}
.konto-eintrag:hover .konto-icon { color: var(--akzent); }
.konto-abmelden:hover .konto-icon { color: var(--fehler-tx); }
.konto-eintrag:hover { background: var(--flaeche-leise); text-decoration: none; color: var(--akzent); }
.konto-eintrag:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.konto-abmelden { color: var(--fehler-tx); }
.konto-abmelden:hover { background: var(--fehler-fl); color: var(--fehler-tx); }
.konto-panel form { margin: 0; }
/* Versionsanzeige als ruhige Fußzeile des Konto-Menüs. */
.konto-fuss {
  margin-top: var(--raum-2);
  padding: var(--raum-2) var(--raum-3) 2px;
  border-top: 1px solid var(--linie);
  color: var(--grau);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
/* Mandanten-Umschalter im Konto-Menü (#10) – nur bei mehreren Mandanten. */
.mandant-wechsel {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--raum-2) var(--raum-3);
  border-top: 1px solid var(--linie);
}
.mandant-wechsel-titel { font-size: 11.5px; color: var(--grau-leise); }
.mandant-wechsel select {
  width: 100%;
  font: inherit; font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--linie-kraeftig); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text);
}

/* Darstellung (Hell/Dunkel/System) – segmentierte Auswahl im Konto-Menue. */
.thema-wahl { padding: var(--raum-2) var(--raum-3) var(--raum-3); border-top: 1px solid var(--linie); }
.thema-titel { display: block; font-size: 12px; color: var(--grau); margin-bottom: var(--raum-2); }
.thema-knoepfe { display: flex; gap: 4px; background: var(--flaeche-leise); border: 1px solid var(--linie); border-radius: var(--radius-knopf); padding: 3px; }
.thema-knopf {
  flex: 1; padding: 5px 8px; font-size: 12px; font-weight: 600; color: var(--grau);
  background: transparent; border: 0; border-radius: 7px; cursor: pointer;
  transition: background var(--uebergang), color var(--uebergang);
}
.thema-knopf:hover { color: var(--text); }
.thema-knopf.aktiv { background: var(--flaeche); color: var(--akzent); box-shadow: var(--schatten-leise); }
.thema-knopf:focus-visible { outline: none; box-shadow: var(--fokus-ring); }

/* --- Themen-Navigation (Zeile 2) --------------------------------------- */
.navzeile {
  border-top: 1px solid var(--linie);
  margin: 0 calc(-1 * var(--raum-6));
  padding: 0 var(--raum-6);
}
.navzeile-innen {
  max-width: var(--breite);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: var(--raum-2);
  /* Am Desktop bei Platzmangel UMBRECHEN statt abschneiden – so ist jeder
     Menüpunkt immer sichtbar und klickbar (kein verstecktes Horizontal-Scroll,
     das mit der Maus schwer erreichbar ist). Am Handy (unten) wieder wischen. */
  flex-wrap: wrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.navzeile-innen::-webkit-scrollbar { display: none; }
/* Nur Touch/Handy: die Leiste bleibt einzeilig und wird gewischt; ein Fade an
   der rechten Kante signalisiert „hier geht es weiter“ (pointer-events:none,
   damit der letzte Eintrag klickbar bleibt). Am Desktop entfällt das dank Umbruch. */
@media (max-width: 640px) {
  .navzeile-innen {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .navzeile { position: relative; }
  .navzeile::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(to right, transparent, var(--flaeche));
    pointer-events: none;
  }
}
.navzeile a {
  color: var(--grau);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 10px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--uebergang), border-color var(--uebergang);
}
.navzeile a:hover { color: var(--akzent); text-decoration: none; }
.navzeile a[aria-current="page"] {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
  font-weight: 600;
}

/* Veraltete Kopf-Hilfsklasse (Benutzername stand frueher in der Nav). */
.benutzer { color: var(--grau); font-size: 13px; }

/* ============================================================
   4. Layout / Typografie
   ============================================================ */
main {
  max-width: var(--breite);
  margin: 0 auto;
  padding: var(--raum-8) var(--raum-6) var(--raum-12);
}

/* Typo-Skala: h1 24 (eng, -0.02em) · h3 17 · Fliesstext 15 auf 1.5 ·
   Kleintext 13 auf 1.5 · h2 als ruhige Eyebrow-Zeile. Zeilenabstaende
   bewusst gross genug, dass Absaetze atmen. */
h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 var(--raum-1);
  letter-spacing: -0.02em;
  font-weight: 600;
}
h2 {
  font-size: 13px;
  line-height: 1.4;
  margin: var(--raum-8) 0 var(--raum-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grau);
  font-weight: 600;
}
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; margin: 0 0 var(--raum-2); }
p { margin: 0 0 var(--raum-3); }
.unterzeile { color: var(--grau); line-height: 1.55; margin: 0 0 var(--raum-6); max-width: 70ch; }

/* --- Seiten-Intro: Icon-Plakette + Titel/Unterzeile (Premium-Einstieg) -------
   Jede Bereichsseite trägt links neben Überschrift und Erläuterung ein weiches
   Akzent-Icon (_seiten_icon.html) – der Einstieg in jeden Bereich liest sich
   damit sofort. Reine Inline-SVGs, keine externen Bilder. */
.seiten-intro {
  display: flex;
  align-items: flex-start;
  gap: var(--raum-4);
  min-width: 0;
}
.seiten-intro > div { min-width: 0; }
/* Bereichs-Plakette: gefüllter Akzent-Verlauf mit weißem Icon statt blassem
   Tint (PO 22.07. „zu trist"). Die Akzentfarbe ist mandant-brandbar – der
   Verlauf bleibt dadurch je Mandant konsistent. */
.seiten-icon {
  flex: none;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--akzent), var(--akzent-tief));
  color: #fff;
  box-shadow: 0 6px 16px -6px var(--akzent);
  margin-top: 2px;
}
.seiten-icon svg { width: 34px; height: 34px; }
@media (max-width: 640px) {
  .seiten-icon { width: 52px; height: 52px; border-radius: 15px; }
  .seiten-icon svg { width: 28px; height: 28px; }
}
/* Prozess-Rundgang (PO 22.07. „zu trist, wie ein Katalog"): Verzeichnis als
   Chip-Kacheln, je Abschnitt ein Akzent-Kopf mit Nummer, Schritte als
   nummerierte Akzent-Chips – rein visuell, Inhalt/Reihenfolge unverändert. */
.rundgang { counter-reset: rundgang-abschnitt; }
.rundgang-toc {
  list-style: none;
  padding: 0;
  margin: var(--raum-3) 0 var(--raum-6);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--raum-3);
}
.rundgang-toc li { margin: 0; }
.rundgang-toc a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: var(--raum-3) var(--raum-4);
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: var(--flaeche);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rundgang-toc a:hover {
  border-color: var(--akzent);
  box-shadow: 0 8px 20px -12px var(--akzent);
  transform: translateY(-1px);
}
.rundgang-toc-titel { font-weight: 650; color: var(--text); }
.rundgang-toc-text { font-size: 13px; color: var(--grau); }
.rundgang > section { margin-top: var(--raum-6); }
.rundgang > section > h2 {
  counter-increment: rundgang-abschnitt;
  display: flex;
  align-items: center;
  gap: var(--raum-3);
}
.rundgang > section > h2::before {
  content: counter(rundgang-abschnitt);
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--akzent), var(--akzent-tief));
  color: #fff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px -6px var(--akzent);
}
.rundgang > section > .karte > ol {
  list-style: none;
  counter-reset: rundgang-schritt;
  padding: 0;
  margin: var(--raum-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--raum-3);
}
.rundgang > section > .karte > ol > li {
  counter-increment: rundgang-schritt;
  position: relative;
  padding-left: calc(28px + var(--raum-3));
  line-height: 1.55;
}
.rundgang > section > .karte > ol > li::before {
  content: counter(rundgang-schritt);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--akzent-hauch);
  color: var(--akzent);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hinweis { color: var(--grau); font-size: 13px; line-height: 1.5; }
/* #134: weicher Warnton im Fließtext (z. B. Dubletten-Hinweis im Add-Formular) –
   keine harte Fehlerbox, nur ein sichtbarer Akzentrahmen zur Aufmerksamkeit. */
.hinweis-warnung {
  color: var(--text);
  background: var(--warnung-fl);
  border: 1px solid var(--warnung-li);
  border-left: 3px solid var(--warnung-tx);
  padding: var(--raum-2) var(--raum-3);
  border-radius: 0 6px 6px 0;
}
/* Inline-Warnton (z. B. „keine E-Mail-Adresse hinterlegt"). */
.warnung { color: var(--warnung-tx); font-weight: 600; }
/* Beträge und Aktionszellen brechen nie um (Premium-Audit: Fraktura-Tabelle). */
td.zahl, th.zahl { white-space: nowrap; }
td.aktion { white-space: nowrap; width: 1%; }
.knopf-kompakt { padding: 3px 10px; font-size: 12px; }
/* Großer Touch-Knopf für die mobile Einsatzkraft-Ansicht („Einsatz starten/beenden“):
   fingerfreundliches Ziel, in der Karte volle Breite. */
.knopf-gross { padding: 14px 24px; font-size: 16px; width: 100%; margin-top: var(--raum-2); }
/* Status-/Undo-Leiste der Kachel-Personalisierung (Premium-Audit). */
.kachel-status {
  margin: 0 0 var(--raum-3);
  padding: var(--raum-2) var(--raum-3);
  background: var(--hinweis-fl);
  border: 1px solid var(--hinweis-li);
  border-radius: var(--radius);
  color: var(--hinweis-tx);
  font-size: 13px;
}
/* Gefahr-Knopf: destruktive/irreversible Aktionen (Stornieren) klar getrennt. */
.knopf-gefahr {
  background: var(--fehler-tx);
  border-color: var(--fehler-tx);
  color: #fff;
}
.knopf-gefahr:hover { filter: brightness(0.92); }
/* Nummernkreis-Karten in den Beleg-Einstellungen: zwei je Reihe. */
.nummernkreis-gitter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--raum-4);
}
.nummernkreis-karte h3 { margin: 0 0 var(--raum-2); }
.nummernkreis-vorschau {
  margin: 0 0 var(--raum-3);
  padding: var(--raum-2) var(--raum-3);
  background: var(--flaeche-leise);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
@media (max-width: 900px) {
  .nummernkreis-gitter { grid-template-columns: 1fr; }
}

.seitenkopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--raum-4);
  margin-bottom: var(--raum-6);
  flex-wrap: wrap;
}
.seitenkopf .unterzeile { margin-bottom: 0; }
/* Titel/Intro im Seitenkopf: ohne Aussenabstand, damit Kopf und Aktionsknopf
   auf einer Linie stehen (Layoutgesetz: einheitlicher Seitenkopf mit <h1>). */
.seitenkopf h1, .seitenkopf h2, .seitenkopf .seiten-intro { margin: 0; align-self: center; }

/* ============================================================
   5. Kacheln / Kennzahlen
   ============================================================ */
.kacheln {
  display: grid;
  /* Kompakte, gleich breite Zahlen-Kacheln: Spuren wachsen nur bis 260px und
     bleiben linksbündig – vorher zerrte „1fr" drei Kacheln über die volle
     Shell-Breite zu riesigen leeren Flächen (PO-Befund Kalender-Seite).
     Der Außenabstand unten trennt die Kachelreihe von der Folgekarte
     (PO-Befund Wochenübersicht: „die Kacheln kleben"). */
  grid-template-columns: repeat(auto-fit, minmax(146px, 260px));
  justify-content: start;
  gap: var(--raum-4);
  /* Symmetrischer Abstand oben UND unten: ohne margin-top klebte die
     Kachelreihe an der Karte/Überschrift darüber (wiederkehrender PO-Befund
     „die Kacheln kleben", zuletzt Kalender-Seite 22.07.). */
  margin-top: var(--raum-5);
  margin-bottom: var(--raum-5);
}
.kachel {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: var(--raum-4) var(--raum-6);
  box-shadow: var(--schatten-karte);
  transition: box-shadow var(--uebergang), transform var(--uebergang);
}
.kachel:hover {
  transform: translateY(-1px);
  box-shadow: var(--schatten);
}
.kachel .zahl {
  font-size: 30px;
  font-weight: 600;
  color: var(--akzent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kachel .wert {
  font-size: 20px;
  font-weight: 600;
  color: var(--akzent);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.kachel .titel {
  color: var(--grau);
  font-size: 13px;
  margin-top: var(--raum-1);
}
/* Klickbare Zahl-Kachel (PO 21.07.): die ganze Kachel führt zum Inhalt. */
.kachel-zahl-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.kachel-zahl-link .zahl,
.kachel-zahl-link .titel {
  display: block;
}
.kachel-zahl-link:hover .titel,
.kachel-zahl-link:focus-visible .titel {
  color: var(--akzent);
  text-decoration: underline;
}

/* --- Interaktives Dashboard (static/js/dashboard.js) --------------------- */
/* Kopfzeile mit „＋ Kachel"-Knopf. */
.ueberblick-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--raum-3);
  margin-bottom: var(--raum-3);
}
.dashboard-werkzeuge { position: relative; }
/* Geist-Knopf (dezent, gefuellt erst bei Hover) – „＋ Kachel". */
.knopf-geist {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--akzent-hell);
  background: transparent;
  border: 1px solid var(--linie-kraeftig);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background var(--uebergang), border-color var(--uebergang);
}
.knopf-geist:hover { background: var(--akzent-hauch); border-color: var(--akzent); }
.knopf-geist[aria-disabled="true"] { color: var(--grau-zart); cursor: default; }
.knopf-geist[aria-disabled="true"]:hover { background: transparent; border-color: var(--linie-kraeftig); }

/* Kachel wird zum interaktiven Container: ⋯-Knopf oben rechts, Drag-Griff. */
.dashboard-js .kachel { position: relative; }
.dashboard-js .kachel[draggable="true"] { cursor: grab; }
.kachel-zieht { opacity: .45; cursor: grabbing; }
.kachel-neu { animation: kachel-ein var(--uebergang-ein); }
@keyframes kachel-ein { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.kachel-menue-knopf {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px;
  background: var(--flaeche-leise); color: var(--grau);
  font-size: 17px; line-height: 1; cursor: pointer;
  /* Immer sichtbar (leicht gedämpft), damit erkennbar ist: JEDE Kachel lässt
     sich über ⋯ entfernen. Über der (die Karte füllenden) Sprung-Verknüpfung,
     damit der Klick auf ⋯ nicht im Link versickert. */
  opacity: .7;
  z-index: 6;
  transition: opacity var(--uebergang), background var(--uebergang), color var(--uebergang);
}
.kachel:hover .kachel-menue-knopf,
.kachel:focus-within .kachel-menue-knopf,
.kachel-menue-knopf[aria-expanded="true"] { opacity: 1; }
.kachel-menue-knopf:hover { background: var(--linie); color: var(--text); }

/* Aufklapp-Menue je Kachel (Entfernen). */
.kachel-menue {
  position: absolute;
  top: 34px; right: 8px;
  min-width: 130px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten);
  padding: 4px;
  z-index: 20;
}
.kachel-menue button {
  display: block; width: 100%;
  text-align: left;
  font: inherit; font-size: 13px;
  color: var(--text);
  background: transparent; border: none; border-radius: 6px;
  padding: 7px 10px; cursor: pointer;
}
.kachel-menue button:hover { background: var(--fehler-fl); color: var(--fehler-tx); }

/* „＋ Kachel"-Auswahl (Popover unter dem Knopf). */
.kachel-auswahl {
  position: absolute;
  top: calc(100% + 6px); right: 0;
  min-width: 220px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten);
  padding: 6px;
  z-index: 30;
}
.dashboard-werkzeuge .kachel-auswahl { right: 0; }
.kachel-auswahl-eintrag {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  font: inherit; font-size: 13.5px;
  color: var(--text);
  background: transparent; border: none; border-radius: 7px;
  padding: 8px 10px; cursor: pointer; text-align: left;
}
.kachel-auswahl-eintrag:hover { background: var(--akzent-hauch); }
.kachel-auswahl-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none;
  border-radius: 6px; background: var(--akzent-hauch); color: var(--akzent-hell);
  font-weight: 600;
}
.kachel-auswahl-leer { color: var(--grau-leise); font-size: 13px; padding: 8px 10px; margin: 0; }

/* Der „Ohne JavaScript anpassen"-Rückfall ist bei aktivem JS ausgeblendet. */
.dashboard-js #kacheln-fallback { display: none; }

/* Verknuepfungs-Kacheln (Sprung-Karten) – wie die Bereichskarten, aber im
   anpassbaren Dashboard-Brett. */
.kachel-verknuepfung,
.kachel-aktion { padding: 0; }
.kachel-verknuepfung .kachel-link,
.kachel-aktion .kachel-link {
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--raum-4) var(--raum-6);
  height: 100%;
  text-decoration: none; color: inherit;
  border-radius: inherit;
}
.kachel-link-titel { font-size: 16px; font-weight: 600; color: var(--akzent-hell); letter-spacing: -0.01em; }
.kachel-link-beschreibung { font-size: 13px; color: var(--grau); line-height: 1.45; }
.kachel-verknuepfung:hover .kachel-link-titel,
.kachel-aktion:hover .kachel-link-titel { color: var(--akzent-tief); }
/* Schnellaktion: grünes ＋ vor dem Titel – die „Neues anlegen"-Sprache. */
.kachel-aktion .kachel-link-titel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kachel-aktion-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--erfolg-fl);
  color: var(--erfolg-tx);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: background var(--uebergang), color var(--uebergang);
}
.kachel-aktion:hover .kachel-aktion-plus {
  background: var(--erfolg-tx);
  color: #fff;
}

/* Tipp des Tages im Startseiten-Kopf. */
.start-tipp { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tipp-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--akzent-hell); background: var(--akzent-hauch);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}

/* ============================================================
   6. Tabellen / Listen
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--schatten-leise);
}
th, td {
  text-align: left;
  padding: 12px var(--raum-4);
  border-bottom: 1px solid var(--linie);
}
/* Kopfzeile behutsam verfeinert: hauchzarte Flaeche statt kraeftigem Grau,
   dafuer eine etwas festere Unterkante als ruhige Trennlinie. */
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grau);
  background: var(--flaeche-hauch);
  border-bottom-color: var(--linie-kraeftig);
  font-weight: 600;
}
/* Zeilenkoepfe (z. B. Einheiten in der Allstimmigkeits-Matrix) sind Inhalt,
   keine Spaltenkoepfe – normale Typografie statt Uppercase-Geschrei. */
tbody th[scope="row"] {
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  background: transparent;
  font-weight: 500;
}
tbody tr { transition: background var(--uebergang); }
tbody tr:hover { background: var(--flaeche-hauch); }
tr:last-child td { border-bottom: none; }
/* Ziffern in Tabellen laufen immer auf Tabellenziffern – Datums- und
   Betragsspalten stehen dadurch ruhig untereinander. */
td, th { font-variant-numeric: tabular-nums; }
td.zahl, th.zahl { text-align: right; }
/* Betragsfelder in Formularen: rechtsbündig mit Ziffern gleicher Breite –
   konsistent zu den Tabellenspalten (td.zahl). Rein visuell, keine Format-
   Logik. */
input.geld { text-align: right; font-variant-numeric: tabular-nums; }
.leer { color: var(--grau); font-style: italic; }

/* ============================================================
   7. Knoepfe
   ============================================================ */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--raum-2);
  background: var(--akzent);
  color: #fff;
  border: 1px solid var(--akzent);
  border-radius: var(--radius-knopf);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background var(--uebergang), border-color var(--uebergang),
              box-shadow var(--uebergang), transform var(--uebergang);
}
.knopf:hover { background: var(--akzent-tief); border-color: var(--akzent-tief); text-decoration: none; }
/* Active: dezentes Einsinken (Scale statt Verrutschen) – leises, spuerbares Feedback. */
.knopf:active { background: var(--akzent-tief); transform: scale(0.985); }
.knopf:focus-visible { outline: none; box-shadow: var(--fokus-ring); }

/* Sekundaerer Knopf: helle Pill mit Hairline – ueberall dieselbe ruhige
   Zweitaktion (Konsistenz mit Kopfzeile/Startseite). */
.knopf-schlicht {
  background: var(--flaeche);
  color: var(--akzent-hell);
  border-color: var(--linie-kraeftig);
  border-radius: 980px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.knopf-schlicht:hover {
  background: var(--flaeche-leise);
  color: var(--akzent-tief);
  border-color: var(--linie-kraeftig);
  text-decoration: none;
}
.knopf-schlicht:active { transform: scale(0.985); }

/* ============================================================
   8. Karten
   ============================================================ */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: var(--raum-6);
  box-shadow: var(--schatten-karte);
}
.formular-schmal { max-width: 460px; }

/* ============================================================
   9. Formularfelder
   ============================================================ */
.feld { margin-bottom: var(--raum-4); }
.feld label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--grau);
  margin-bottom: var(--raum-1);
}
.feld input,
.feld select,
.feld textarea {
  width: 100%;
  padding: 10px var(--raum-3);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--text);
  transition: border-color var(--uebergang), box-shadow var(--uebergang);
}
.feld input:focus,
.feld select:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: var(--fokus-ring);
}
.feld input[aria-invalid="true"],
.feld select[aria-invalid="true"],
.feld textarea[aria-invalid="true"] { border-color: var(--fehler-li); }
.feld-hinweis { margin: var(--raum-1) 0 0; font-size: 12px; color: var(--grau); }
.feld-fehler { margin: var(--raum-1) 0 0; font-size: 12px; color: var(--fehler-tx); font-weight: 500; }

.pflicht-stern { color: var(--fehler-tx); font-weight: 700; }
.pflicht-offen {
  margin: var(--raum-2) 0 0;
  padding-left: 18px;
  color: var(--warnung-tx);   /* offener Wert ist zulaessig (Grau-Konvention) – Warnton, kein Fehlerrot */
  font-size: 13px;
}

fieldset {
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  margin: 0 0 var(--raum-4);
  padding: var(--raum-3) var(--raum-4);
}
legend { font-size: 13px; color: var(--grau); padding: 0 6px; font-weight: 500; }

.kontrollfeld { display: block; margin-bottom: var(--raum-2); font-size: 14px; }
.kontrollfeld .feld-hinweis { display: block; margin-left: 22px; }

.vergleich-zeile { display: flex; gap: var(--raum-2); margin-bottom: var(--raum-2); }
.vergleich-zeile input {
  flex: 1;
  min-width: 0;
  padding: 10px var(--raum-3);
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--text);
  transition: border-color var(--uebergang), box-shadow var(--uebergang);
}
.vergleich-zeile input:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: var(--fokus-ring);
}
.erzeugen { margin-top: var(--raum-4); }

/* ============================================================
   10. Meldungsbanner (global, aria-live)
   ============================================================ */
.meldungen { margin-bottom: var(--raum-6); }
/* Meldungen als schwebende, abgerundete Toasts im Dokumentfluss: weicher
   Kartenschatten, Zeichen-Signet vorn (reines CSS), sanftes Hereingleiten.
   aria-live bleibt in base.html – hier nur die Optik. */
.meldung {
  display: flex;
  align-items: flex-start;
  gap: var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 12px var(--raum-4);
  font-size: 14px;
  line-height: 1.5;
  margin: var(--raum-3) 0;
  box-shadow: var(--schatten-karte);
  animation: meldung-ein var(--uebergang-ein) both;
}
.meldung:first-child { margin-top: 0; }
/* Mehrere Meldungen gleiten leicht versetzt herein – ruhige Staffelung. */
.meldung:nth-child(2) { animation-delay: 60ms; }
.meldung:nth-child(n+3) { animation-delay: 120ms; }
@keyframes meldung-ein {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
/* Zeichen-Signet: kleiner runder Chip in der Zustandsfarbe, Haken bei Erfolg,
   Ausrufezeichen bei Fehler und Warnung, i bei Hinweisen – kein Bild, kein Icon-Font. */
.meldung-success::before,
.meldung-error::before,
.meldung-warning::before,
.meldung-info::before {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.meldung-success::before { content: "\2713"; background: var(--erfolg-tx); }
.meldung-error::before   { content: "!"; background: var(--fehler-tx); }
.meldung-warning::before { content: "!"; background: var(--warnung-tx); }
.meldung-info::before    { content: "i"; background: var(--hinweis-tx); font-style: italic; font-family: Georgia, serif; }
.meldung-success { background: var(--erfolg-fl); border-color: var(--erfolg-li); color: var(--erfolg-tx); }
.meldung-info    { background: var(--hinweis-fl); border-color: var(--hinweis-li); color: var(--hinweis-tx); }
.meldung-warning { background: var(--warnung-fl); border-color: var(--warnung-li); color: var(--warnung-tx); }
.meldung-error   { background: var(--fehler-fl); border-color: var(--fehler-li); color: var(--fehler-tx); }
.meldung-debug   { background: var(--flaeche-leise); border-color: var(--linie); color: var(--grau); }

/* Fehlerbanner in Formularen */
.fehler {
  background: var(--fehler-fl);
  border: 1px solid var(--fehler-li);
  color: var(--fehler-tx);
  border-radius: var(--radius-klein);
  padding: 12px var(--raum-4);
  font-size: 14px;
  margin-bottom: var(--raum-4);
}
.fehler ul { margin: var(--raum-1) 0 0; padding-left: 20px; }

/* ============================================================
   11. Status-Badges (neu) – Vorgangs-/Versammlungsstatus + Ergebnis
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  border: 1px solid var(--linie);
  background: var(--flaeche-leise);
  color: var(--grau);
  white-space: nowrap;
}
.badge-entwurf            { background: var(--flaeche-leise); border-color: var(--linie-kraeftig); color: var(--grau); }
.badge-versendet          { background: var(--hinweis-fl); border-color: var(--hinweis-li); color: var(--hinweis-tx); }
.badge-zustande_gekommen,
.badge-angenommen         { background: var(--erfolg-fl); border-color: var(--erfolg-li); color: var(--erfolg-tx); }
.badge-verkuendet         { background: #eceff6; border-color: #c4d6ef; color: var(--akzent); }
.badge-archiviert         { background: var(--flaeche-leise); border-color: var(--linie-kraeftig); color: var(--grau-leise); }
.badge-abgelehnt,
.badge-gescheitert        { background: var(--fehler-fl); border-color: var(--fehler-li); color: var(--fehler-tx); }
.badge-offen              { background: var(--warnung-fl); border-color: var(--warnung-li); color: var(--warnung-tx); }
/* Fraktura-Belegstatus (UX-Audit: eigene Paletten statt Grau-Einheitsbrei). */
.badge-festgeschrieben    { background: #eceff6; border-color: #c4d6ef; color: var(--akzent); }
.badge-bezahlt            { background: var(--erfolg-fl); border-color: var(--erfolg-li); color: var(--erfolg-tx); }
.badge-storniert          { background: var(--fehler-fl); border-color: var(--fehler-li); color: var(--fehler-tx); }
.badge-schlicht           { background: var(--flaeche-leise); border-color: var(--linie-kraeftig); color: var(--grau); font-size: 11px; padding: 2px 8px; }
/* Aufträge & Einsätze: Auftrags-, Einsatz- und Prioritäts-Badges (Welle 2). */
.badge-geplant,
.badge-einsatz-geplant    { background: var(--hinweis-fl); border-color: var(--hinweis-li); color: var(--hinweis-tx); }
.badge-in_arbeit          { background: var(--warnung-fl); border-color: var(--warnung-li); color: var(--warnung-tx); }
.badge-erledigt,
.badge-einsatz-erledigt   { background: var(--erfolg-fl); border-color: var(--erfolg-li); color: var(--erfolg-tx); }
.badge-abgerechnet        { background: #eceff6; border-color: #c4d6ef; color: var(--akzent); }
.badge-einsatz-ausgefallen{ background: var(--flaeche-leise); border-color: var(--linie-kraeftig); color: var(--grau-leise); }
.badge-prio-hoch          { background: var(--fehler-fl); border-color: var(--fehler-li); color: var(--fehler-tx); }
.zeilen-aktionen { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeilen-aktionen form { margin: 0; }

/* ============================================================
   12. Positionen / Bausteine
   ============================================================ */
.position { margin-bottom: var(--raum-3); padding: var(--raum-4) var(--raum-6); }
.position-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--raum-3); }
.position-kopf form { margin-left: auto; }
.baustein-kennung { color: var(--grau); font-size: 13px; }
.baustein-wahl { margin-bottom: var(--raum-4); }

details.position summary {
  cursor: pointer;
  font-weight: 500;
  list-style-position: inside;
}
details.position summary:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
details.position p { margin: var(--raum-3) 0 0; color: var(--text); }

/* htmx-Zielregionen ruhig einbetten */
#position-formular:empty,
#top-formular:empty { display: none; }

/* Dezenter htmx-Ladehinweis (kein Spinner) */
.htmx-indicator { opacity: 0; transition: opacity var(--uebergang); }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* ============================================================
   13. Anmeldung / gesperrt
   ============================================================ */
.anmeldung { max-width: 380px; margin: 12vh auto; padding: 0 var(--raum-6); }
.anmeldung img { height: 30px; margin-bottom: var(--raum-8); }
.anmeldung .karte { box-shadow: var(--schatten); padding: var(--raum-8); }
.fuss { margin-top: var(--raum-6); font-size: 12px; color: var(--grau); text-align: center; }

/* --- Anmeldung als Split-Screen (Design-System-Mockup 2026) -------------- */
.anmeldung-seite {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--raum-6);
  background: var(--hintergrund);
}
.anmeldung-huelle {
  width: 100%; max-width: 940px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 22px;
  box-shadow: var(--schatten);
  overflow: clip;
}
/* Linkes Markenpanel – dunkel. */
.anmeldung-marke {
  background: #171a21;
  color: #eef1f6;
  padding: var(--raum-12) var(--raum-8);
  display: flex; flex-direction: column; gap: var(--raum-8);
  position: relative;
}
.anmeldung-marke-kopf { display: flex; align-items: center; gap: 12px; }
.logo-marke { position: relative; width: 34px; height: 34px; display: inline-block; }
.logo-marke-1, .logo-marke-2 {
  position: absolute; width: 22px; height: 22px; border: 3px solid; border-radius: 5px;
}
.logo-marke-1 { top: 0; left: 0; border-color: var(--akzent); }
.logo-marke-2 { bottom: 0; right: 0; border-color: #eef1f6; background: transparent; }
.logo-wort { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.anmeldung-marke-text h1 {
  font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--raum-4);
  color: #fff;
}
.anmeldung-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600;
  color: #9aa9ff; margin: 0 0 var(--raum-3);
}
.anmeldung-unter { color: #b6bdc9; font-size: 15px; line-height: 1.55; margin: 0; max-width: 34ch; }
.anmeldung-marke-fuss { margin-top: auto; font-size: 12.5px; color: #7a8494; }
/* Rechtes Formularpanel. */
.anmeldung-form { padding: var(--raum-12) var(--raum-8); display: flex; flex-direction: column; }
.anmeldung-form h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 var(--raum-2); }
.anmeldung-form-unter { color: var(--grau); margin: 0 0 var(--raum-8); }
.anmeldung-form .feld { margin-bottom: var(--raum-4); }
.anmeldung-status {
  margin-top: var(--raum-6); font-size: 12.5px; color: var(--grau-leise);
  display: flex; align-items: center; gap: 8px;
}
.anmeldung-punkt {
  width: 8px; height: 8px; border-radius: 50%; background: var(--erfolg-tx); display: inline-block;
}
@media (max-width: 720px) {
  .anmeldung-huelle { grid-template-columns: 1fr; max-width: 440px; }
  .anmeldung-marke { display: none; }
}

/* Rechtliche Pflicht-Links (Datenschutz/Impressum/AGB): dezente Fußzeile,
   auf der Login-Seite (im Formular-Panel) und im App-Fuß identisch. */
.rechtslinks-fuss {
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  font-size: 12.5px;
}
.rechtslinks-fuss a { color: var(--grau); text-decoration: none; }
.rechtslinks-fuss a:hover { color: var(--akzent); text-decoration: underline; }
.anmeldung-form .rechtslinks-fuss { margin-top: var(--raum-4); }
.app-fuss {
  margin-top: var(--raum-6);
  padding: var(--raum-5) var(--raum-6);
  border-top: 1px solid var(--linie);
}

/* ============================================================
   14. Reduzierte Bewegung / Druck
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  /* Saemtliche Bewegungs-Momente stillegen: kein Einsinken, kein Lift,
     kein Hereingleiten – Zustaende erscheinen sofort und unbewegt. */
  .knopf:active,
  .knopf-schlicht:active,
  .startseite .kopf-aktionen .knopf:active { transform: none; }
  .kachel:hover,
  .startseite .kachel:hover,
  .bereich-karte:hover { transform: none; }
  .meldung,
  .schnellsuche[open],
  .schnellsuche[open]::backdrop { animation: none; }
}

/* Druck-Hilfsklassen: `.kein-druck` verschwindet im Ausdruck, `.nur-druck` ist
   nur im Ausdruck sichtbar (saubere Read-Only-Register statt leerer Formulare). */
.nur-druck { display: none; }

@media print {
  .kopf, .skip, .knopf, form, .kein-druck { display: none !important; }
  .nur-druck { display: block !important; }
  table.nur-druck { display: table !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .karte, table, .kachel { box-shadow: none; }
  a[href]::after { content: ""; }
  h2 { break-after: avoid; }
  tr, .kachel { break-inside: avoid; }
}

/* ============================================================
   15. Kleine Bildschirme
   ============================================================ */
@media (max-width: 640px) {
  .kopf-innen { min-height: 0; padding: var(--raum-3) 0; }
  main { padding: var(--raum-6) var(--raum-4) var(--raum-8); }
  h1 { font-size: 21px; }
}

/* ============================================================
   16. Beschluss-Sammlung (AP4.5, Folgewelle) – additive Layoutregeln.
   Bewusst nur Layout (Flex/Abstand); Farben/Radius/Token wie oben. Keine
   neuen Komponenten – Karten, Felder, Badges bleiben das bestehende Vokabular.
   ============================================================ */
/* Aktionsgruppe im Seitenkopf (mehrere Knoepfe nebeneinander, umbrechend). */
.kopf-aktionen { display: flex; flex-wrap: wrap; gap: var(--raum-2); align-items: center; }
/* Erzeugen-Formular IM Seitenkopf: der globale .erzeugen-Abstand (Sektionen)
   drueckte den Knopf sonst nach unten – im Kopf buendig mit den Nachbarn. */
.kopf-aktionen .erzeugen { margin-top: 0; }
/* Vorschau-Seite (Umlauf/Versammlung): das echte Dokument-PDF fuellt die Seite. */
.vorschau-seite-pdf { height: 78vh; min-height: 540px; }
.vorschau-textkontrolle { margin-top: var(--raum-4); }
.vorschau-textkontrolle > summary { cursor: pointer; font-weight: 600; }
/* Filterleiste der Sammlung (Art/Herkunft nebeneinander statt gestapelt). */
.sammlung-filter { display: flex; flex-wrap: wrap; gap: var(--raum-4); align-items: flex-end; margin-bottom: var(--raum-4); }
.sammlung-filter .feld { margin-bottom: 0; min-width: 200px; }
/* Sammlungs-Eintrag: ruhiger Abstand + wortlautgetreue Zeilenumbrueche. */
.sammlung-eintrag { margin-bottom: var(--raum-3); }
.sammlung-wortlaut { margin: var(--raum-3) 0 0; color: var(--text); white-space: pre-line; }
/* Erfassungszeile der Vorverwalter-Uebernahme (eine Zeile = ein Alt-Beschluss). */
.vorverwalter-zeile { margin-bottom: var(--raum-4); }

/* ============================================================
   17. Responsiver Tabellen-/Matrix-Scrollcontainer (N4).
   Breite Listen und vor allem die Allstimmigkeits-Matrix duerfen auf
   schmalen Bildschirmen (Tablet/Handy) horizontal scrollen, statt den
   ganzen Viewport zu sprengen. Reines CSS, kein JS, kein Layout-Risiko.
   Radius passt zur umschlossenen Tabelle; Fokusreihenfolge bleibt unberuehrt.
   ============================================================ */
.tabelle-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--linie-kraeftig) transparent;
  /* Scroll-Schatten (Premium-Audit R3): dezenter Hinweis, dass horizontal noch
     Inhalt folgt. Die beiden Deck-Verlaeufe (background-attachment: local) haben
     die Flaechenfarbe und wandern mit dem Inhalt; die beiden Schatten (scroll)
     bleiben am Rahmen stehen und werden vom Deck ueberlagert, sobald ein Rand
     erreicht ist – der Schatten erscheint also NUR bei echtem Ueberlauf und nur
     auf der Seite, an der noch etwas kommt. Theme-aware ueber --flaeche. */
  background:
    linear-gradient(to right, var(--flaeche) 30%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(to left, var(--flaeche) 30%, transparent) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.14), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.14), transparent) right / 12px 100% no-repeat scroll;
  background-color: var(--flaeche);
}
/* Dezente Scrollbalken (WebKit): schmale, gerundete Daumen ohne Laufflaeche –
   gilt fuer Tabellen-Scroller und die Trefferliste der Schnellsuche. */
.tabelle-scroll::-webkit-scrollbar,
.schnellsuche-ergebnisse::-webkit-scrollbar { width: 8px; height: 8px; }
.tabelle-scroll::-webkit-scrollbar-track,
.schnellsuche-ergebnisse::-webkit-scrollbar-track { background: transparent; }
.tabelle-scroll::-webkit-scrollbar-thumb,
.schnellsuche-ergebnisse::-webkit-scrollbar-thumb {
  background: var(--linie-kraeftig);
  border-radius: 999px;
}
.tabelle-scroll::-webkit-scrollbar-thumb:hover,
.schnellsuche-ergebnisse::-webkit-scrollbar-thumb:hover { background: var(--grau-leise); }
/* Handy (Premium-Audit R3): die erste Spalte (Zeilen-Anker: Nummer/Name) bleibt
   beim Wischen stehen – Orientierung und Primärlink gehen nie verloren. Eigener
   Hintergrund, damit dahinter durchlaufender Inhalt nicht durchscheint. */
@media (max-width: 640px) {
  .tabelle-scroll th:first-child,
  .tabelle-scroll td:first-child {
    position: sticky;
    left: 0;
    background: var(--flaeche);
    z-index: 1;
  }
  .tabelle-scroll thead th:first-child { background: var(--flaeche-hauch); }
}

/* ============================================================
   18. Kontext-Subnavigation je Versammlung (N11).
   Leichte, untergeordnete Reiterleiste, die die zusammengehoerenden
   Ansichten einer Versammlung (Uebersicht/Vollmachten/Sitzung)
   verbindet. Bewusst dezent: neutraler Text, nur eine Hairline; der
   aktive Schritt (aria-current) traegt sparsam die Marke – dasselbe
   Muster wie die Hauptnav, aber leiser. Reines CSS, kein JS.
   ============================================================ */
.versammlung-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-4);
  margin: 0 0 var(--raum-6);
  border-bottom: 1px solid var(--linie);
}
.versammlung-subnav a {
  color: var(--grau);
  text-decoration: none;
  font-size: 14px;
  padding: var(--raum-2) var(--raum-1);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  transition: color var(--uebergang), border-color var(--uebergang);
}
.versammlung-subnav a:hover { color: var(--akzent); }
.versammlung-subnav a:focus-visible {
  outline: none;
  box-shadow: var(--fokus-ring);
  border-radius: var(--radius-klein);
}
.versammlung-subnav a[aria-current="page"] {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
  font-weight: 600;
}

/* ============================================================
   19. Grau-Konvention in der Dokument-Vorschau (FE-N9).
   Bewusst offene Platzhalter erscheinen in der HTML-Vorschau grau als
   [Label] – exakt die Dokument-Konvention (#666666, CLAUDE.md Domaenenregel 5
   / settings.PLATZHALTER_FARBE), damit die Vorschau zeigt, was spaeter grau
   im Word steht. Nur Anzeige, kein Layout-Nachbau (Layout-Gesetz).
   ============================================================ */
.platzhalter-offen { color: #666666; }
/* Aktionsreihe „Vorschau ansehen" + „… erzeugen" (FE-N9): eine Zeile, umbruch-
   faehig, wie .kopf-aktionen – nur mit dem Abstand der Erzeugen-Sektion. */
.erzeugen-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-2);
  align-items: center;
  margin-top: var(--raum-4);
}
.erzeugen-aktionen .erzeugen { margin-top: 0; }
/* Gleich große Aktions-Buttons (PO 23.07.: „ich hasse ungleiche Buttons").
   Alle Knöpfe einer Aktionsreihe teilen eine Mindestbreite und zentrieren ihre
   Beschriftung – kurze Knöpfe („Beleg (PDF)") wachsen auf die Breite des
   größten Nachbarn, statt schmaler zu erscheinen. Gilt auch für Knöpfe in
   verschachtelten <form>-Elementen derselben Reihe. */
.erzeugen-aktionen > .knopf,
.erzeugen-aktionen > form > .knopf {
  min-width: 13rem;
  justify-content: center;
  text-align: center;
}

/* Ruhige Dokument-Aktionsreihe (Vertrags-/Belegdetail): gleichrangige
   Umriss-Knöpfe zum Erzeugen von Word-/PDF-Dateien. Ein Rechteck-Raster mit
   gleicher Mindestbreite – kein „wildes" Nebeneinander mehrerer farbiger
   Vollflächen-Knöpfe (PO 23.07.). Der einzige Akzent bleibt die echte
   Folgeaktion darunter (z. B. „Courtage-Rechnung erstellen"). */
.dokument-aktionen {
  /* Echtes Gleich-Raster: alle Kacheln exakt gleich breit (PO „ich hasse
     ungleiche Buttons"), egal wie lang das Label ist – anders als Flex+min-width,
     wo lange Labels über die Mindestbreite hinauswachsen. */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: var(--raum-2);
  margin-top: var(--raum-4);
}
.dokument-aktionen > .knopf {
  justify-content: center;
  text-align: center;
}

/* Courtage-Rechnungs-Formular auf dem Vertrags-Detail: bewusste Vorab-Auswahl
   (Zahlungsziel Pflicht, Einleitung optional) vor dem Erzeugen des Belegs. */
.courtage-form { margin-top: var(--raum-5); }
.courtage-form .beleg-felder { margin: var(--raum-3) 0; }

/* „Weiter:"-Anschlussaktionen (Und-jetzt?-Faden): Label + Folgeknöpfe in einer
   ruhigen Flex-Reihe mit echtem Gap statt kollabiertem HTML-Whitespace – bei
   Umbruch bleibt der vertikale Abstand erhalten. Bewusst OHNE feste Knopf-
   Mindestbreite (die Knöpfe tragen unterschiedlich lange, sprechende Labels). */
.weiter-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--raum-2);
  margin-top: var(--raum-3);
}
.weiter-aktionen .unterzeile { margin: 0; }

/* Kacheln im Entwurf per Klick editierbar: der Link füllt die ganze Kachel,
   ohne die Optik zu verändern (kein Unterstrich, geerbte Farbe). */
.kachel .kachel-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.kachel .kachel-link:hover .wert { color: var(--akzent-tief); }

/* Beleg-Anlageformular: volle Breite als Zwei-Spalten-Raster (PO 23.07.:
   „volle Breite nutzen, übersichtlicher" – keine leere rechte Hälfte).
   Kurze Felder liegen nebeneinander; mehrzeilige Felder (Textareas: Einleitung/
   Schluss/Notiz) spannen die ganze Breite. Auf schmalen Viewports einspaltig. */
.beleg-felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--raum-3) var(--raum-4);
  align-items: start;
}
.beleg-felder .feld { margin: 0; }
.beleg-felder .feld:has(textarea) { grid-column: 1 / -1; }

/* Aufgeräumter Beleg-Editor (Markus 24.07.):
   - Label + Pflicht-Stern in EINER Zeile (Stern bricht nicht mehr um).
   - Abschnittsköpfe „Angaben" / „Text & Hinweise".
   - Skonto/Rabatt als Paar-Gruppen (%-Feld über Detail-Feld). */
.feld-kopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.feld-kopf label { display: inline-block; margin-bottom: 0; }
.feld-kopf + input,
.feld-kopf + select,
.feld-kopf + textarea { margin-top: var(--raum-1); }
.beleg-abschnitt-titel { margin: var(--raum-6) 0 var(--raum-3); font-size: 16px; font-weight: 650; }
.beleg-abschnitt-titel:first-child { margin-top: 0; }
.beleg-abschnitt-optional {
  font-size: 12px; font-weight: 500; color: var(--grau);
  border: 1px solid var(--linie); border-radius: 999px; padding: 1px 8px; margin-left: 6px;
}
.beleg-abschnitt-intro { margin-top: 0; margin-bottom: var(--raum-3); }
.beleg-konditionen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--raum-3) var(--raum-4);
  margin-top: var(--raum-4);
}
.beleg-kondition-gruppe {
  margin: 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  padding: var(--raum-3);
  display: flex;
  flex-direction: column;
  gap: var(--raum-3);
}
.beleg-kondition-gruppe > legend {
  font-size: 13px; font-weight: 650; color: var(--grau); padding: 0 var(--raum-1);
}
.beleg-textblock { margin-top: var(--raum-3); }
/* Badge-Reihe: mehrere Status-Badges nebeneinander, umbruchfaehig (Ergebnis-/
   Kennzahlzeilen). Ersetzt ad-hoc inline-flex – konsistent mit .kopf-/.erzeugen-
   aktionen (Innovationsrunde Konsistenz). */
.badge-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
/* Inline-Kontrolle: kleine Checkbox+Label als eigene Zeile (z. B. §-35a-Häkchen
   in der Positions-Bearbeiten-Zeile) – ersetzt ad-hoc inline-style. */
.inline-kontrolle { display: block; margin-top: 4px; }
/* Inhaltsvorschau (FE-N9): dezente Gliederung, kein Layout-Nachbau. */
.vorschau-gegenstand h3 { margin-top: 0; }
.vorschau-abschnitt { margin: var(--raum-4) 0 var(--raum-1); font-size: 14px; color: var(--grau); }
.vorschau-absatz { margin: 0 0 var(--raum-2); }

/* --- Dokument-Briefkopf in der Live-Vorschau (global, auch fuer Rechnungen) ---
   Zeigt, was oben auf dem echten Dokument steht: Logo links, Firmenblock rechts,
   durchgehende duenne Linie darunter. Reine Anzeige der Kopfdaten – der Beleg
   selbst entsteht weiter aus dem eingefrorenen Word-Template (Layout-Gesetz). */
.dokument-briefkopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--raum-4);
  padding-bottom: var(--raum-3);
  border-bottom: 1.5px solid var(--text);
  margin-bottom: var(--raum-5);
}
.dokument-logo {
  flex: none;
  width: 150px;
  height: auto;
  object-fit: contain;
}
.dokument-firmenblock {
  text-align: right;
  font-size: 10px;
  line-height: 1.5;
  color: var(--text);
}
.dokument-firmenblock strong { display: block; font-size: 11px; }
.dokument-firmenblock span { display: block; }
/* Lesende Fusszeilen-Vorschau (Briefkopf-Zentrale): drei Spalten wie auf dem
   Beleg (Firma · Kontakt · Bank/Steuer), rein informativ. */
.fusszeile-vorschau {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--raum-4);
  padding-top: var(--raum-3);
  border-top: 1px solid var(--linie);
  font-size: 12px;
  color: var(--grau);
}
.fusszeile-vorschau strong { display: block; color: var(--text); font-size: 12px; }
.fusszeile-vorschau span { display: block; }
/* Dokument-Titel (zentriert, fett) – wie die Ueberschrift auf dem Beleg. */
.dokument-titel {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 var(--raum-5);
}

/* ============================================================
   20. Fristampel (B2), Rücklauf-Quote (B3), Wiedervorlagen (B4).
   Reine Anzeige – keine Logik, keine automatischen Statuswechsel. Farben aus
   dem bestehenden Ampel-Vokabular (erfolg/warnung/fehler), damit die Ampel
   sich ins vorhandene Badge-System einfügt.
   ============================================================ */
.badge-frist-gruen { background: var(--erfolg-fl);  border-color: var(--erfolg-li);  color: var(--erfolg-tx); }
.badge-frist-gelb  { background: var(--warnung-fl); border-color: var(--warnung-li); color: var(--warnung-tx); }
.badge-frist-rot   { background: var(--fehler-fl);  border-color: var(--fehler-li);  color: var(--fehler-tx); }

/* Rücklauf-Quote als schmaler Balken (B3). */
.quote-balken {
  display: inline-block;
  width: 84px;
  height: 8px;
  vertical-align: middle;
  margin-left: var(--raum-2);
  border-radius: 999px;
  background: var(--flaeche-leise);
  border: 1px solid var(--linie);
  overflow: hidden;
}
.quote-fuellung {
  display: block;
  height: 100%;
  background: var(--akzent);
}
.quote-text { font-variant-numeric: tabular-nums; }
/* Quote-Füllung datengetrieben über CSS-Variable statt Inline-`width:`
   (Runde 5, Inline-Styles → Utility): die Breite bleibt dynamisch, die Regel
   liegt aber hier. Fallback 0 %, falls die Variable fehlt. */
.quote-fuellung[style*="--quote"] { width: var(--quote, 0%); }

/* htmx-Einblenden (Runde 4): frisch geswappte Bereiche mit der Opt-in-Klasse
   .htmx-fade gehen sanft auf. htmx setzt beim Settle kurz `.htmx-settling` auf
   das Ziel; danach blendet die Opazität über den Übergang ein. Nur wenn der
   Nutzer keine reduzierte Bewegung wünscht (A11y). */
@media (prefers-reduced-motion: no-preference) {
  .htmx-fade { transition: opacity 160ms ease-in; }
  .htmx-fade.htmx-settling { opacity: 0; }
}

/* Schmale Eingabefelder (Runde 5, Inline-Styles → Utility): ersetzt
   verstreute style="max-width:…rem" an Zahlen-/Betragsfeldern. */
.feld-schmal { max-width: 8rem; }
.feld-sehr-schmal { max-width: 6rem; }
.feld-mittel { max-width: 12rem; }
.voll-breit { width: 100%; }
/* Lange, technische Zeichenketten (2FA-URI/-Secret) umbrechen bzw. sperren. */
.brechen-alle { word-break: break-all; }
.sperrschrift { letter-spacing: 0.15em; }

/* Wiedervorlagen (B4): schlichte Liste + einzeiliges Anlege-Formular. */
.wiedervorlage-liste { list-style: none; margin: 0 0 var(--raum-4); padding: 0; }
.wiedervorlage-liste li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--raum-3);
  padding: var(--raum-2) 0;
  border-bottom: 1px solid var(--linie);
}
.wiedervorlage-liste form { margin-left: auto; }
.wiedervorlage-notiz { color: var(--grau); }
.wiedervorlage-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-3);
  align-items: flex-end;
}
/* Kompakte, aufgeraeumte Anlege-Zeile: Datum + Notiz + Knopf auf einer
   Grundlinie, ohne den Feld-Grundabstand (der die Zeile sonst verspringen
   liesse). Das Datumsfeld bleibt schmal. */
.wiedervorlage-form .feld { margin-bottom: 0; }
.wiedervorlage-form input[type="date"] { max-width: 11rem; }
.karte.vorschlag { border-left: 3px solid var(--akzent); }

/* ============================================================
   Aktions-Sektionen (Fraktura-Belegdetail): ruhiger Kopf mit
   Info-„!"-Tooltip + einheitliche Knopfzeile. Ziel: je Karte genau
   EINE gefuellte Primaeraktion (.knopf), der Rest schlichte Pille
   (.knopf-schlicht) – konsistent statt bunt.
   ============================================================ */
.aktion-kopf {
  position: relative;                 /* Bezug fuer die absolut liegende Info-Blase */
  display: flex;
  align-items: center;
  gap: var(--raum-2);
  margin: var(--raum-8) 0 var(--raum-3);  /* uebernimmt den h2-Sektionsabstand */
}
.aktion-kopf h2 { margin: 0; }

/* Info-Icon: kleiner, tastaturfokussierbarer Button. Der Erklaertext liegt
   in aria-label (Screenreader) UND in der sichtbaren Blase (aria-hidden,
   rein visuelles Duplikat). Kein JS, kein natives title (sonst Doppel-Tooltip). */
.info-hinweis { display: inline-flex; }
.info-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--linie-kraeftig);
  border-radius: 50%;
  background: var(--flaeche);
  color: var(--grau);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  transition: color var(--uebergang), border-color var(--uebergang);
}
.info-knopf:hover { color: var(--akzent); border-color: var(--akzent); }
.info-knopf:focus-visible {
  outline: none;
  color: var(--akzent);
  border-color: var(--akzent);
  box-shadow: var(--fokus-ring);
}
.info-blase {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;                            /* linksbuendig zum Sektionstitel */
  z-index: 30;
  width: max-content;
  max-width: 420px;
  padding: var(--raum-2) var(--raum-3);
  background: var(--flaeche);
  color: var(--text);
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-karte);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--uebergang), visibility var(--uebergang);
}
.info-hinweis:hover .info-blase,
.info-hinweis:focus-within .info-blase { opacity: 1; visibility: visible; }
/* Schmale Screens: Blase spannt die volle Sektionsbreite (kein H-Overflow). */
@media (max-width: 560px) {
  .info-blase { right: 0; width: auto; max-width: none; }
}

/* Formulare in der Aktionsreihe sitzen ohne Eigenabstand auf einer Linie. */
.erzeugen-aktionen form { margin: 0; }

/* ============================================================
   21. Kopf auf schmalen Screens (loest FE-N14 ab).
   Die Themen-Navigation ist eine horizontal wischbare Tab-Leiste
   (Abschnitt 3) – sie bricht nie um. Hier nur Feinschliff: das
   Konto-Menue zeigt auf Handys nur den Avatar (Name entfaellt),
   und die Marke bleibt kompakt.
   ============================================================ */
@media (max-width: 640px) {
  .konto-name { display: none; }
  .konto-toggle { padding: 4px 10px 4px 4px; }
  .konto-panel { min-width: 230px; }
  .wortmarke { font-size: 15px; }
}

/* ============================================================
   22. A11y-Feinschliff htmx-Add-Formular (FE-N7) + dezenter
   Ladehinweis (FE-N10). Rein additiv; nutzt bestehende Token.
   ============================================================ */

/* Nur fuer Screenreader – visuell verborgen, aber vorlesbar. Traegt die
   Pflicht-/Grau-Konvention programmatisch ans Feld (aria-describedby),
   ohne die ruhige Oberflaeche mit zusaetzlichem Text zu fuellen. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dezenter, ruhiger Textmarker waehrend eines htmx-Swaps (kein Spinner):
   kleiner Sekundaertext, folgt der bestehenden .htmx-indicator-Sichtbarkeit
   (Abschnitt 12) und damit prefers-reduced-motion (Abschnitt 14). */
.htmx-indicator {
  display: inline-block;
  margin-left: var(--raum-2);
  font-size: 13px;
  color: var(--grau);
}

/* Phase 6: KI-Assist „Ausgangslage aus Diktat" (optional, inert by default).
   Dezenter, klar abgesetzter Block ueber dem Ausgangslage-Feld. */
.ki-assist {
  margin: var(--raum-2) 0;
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche-leise);
}
.ki-assist > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--akzent);
}
.ki-hinweis {
  margin: var(--raum-2) 0;
  padding: var(--raum-2) var(--raum-3);
  border-left: 3px solid var(--akzent);
  font-size: 13px;
  color: var(--grau);
}

/* AP4.4: dezenter Inline-Absende-Knopf in Tabellenzellen (E-Mail-Versand). */
.inline-form { display: inline; margin-left: var(--raum-2); }
.knopf-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--akzent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.knopf-link:hover { color: var(--akzent-tief); }
.knopf-link:focus-visible { outline: none; box-shadow: var(--fokus-ring); border-radius: 2px; }

/* ============================================================
   Startseite – Apple-Stil (gescopt auf .startseite; keine anderen
   Seiten betroffen). Grosszuegiger Hero, Pill-Aktionen, luftige
   Kennzahl-Kacheln, ruhige Leerzustaende. Nur lokal, keine externen
   Ressourcen (DSGVO). Systemschriften wie im uebrigen Design.
   ============================================================ */

/* Mehr Vertikalrhythmus als im Standard – die Startseite darf atmen. */
.startseite { --raum-hero: clamp(28px, 5vw, 56px); }

/* --- Hero ------------------------------------------------------------- */
.startseite .start-hero {
  align-items: center;
  gap: var(--raum-6);
  margin: var(--raum-2) 0 var(--raum-hero);
}
.startseite .start-hero h1 {
  font-size: clamp(30px, 4.5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 var(--raum-2);
}
.startseite .start-hero .unterzeile {
  font-size: 17px;
  line-height: 1.45;
  color: var(--grau);
  max-width: 56ch;
}

/* Aktionen als saubere Pill-Gruppe (Apple: gerundet, weicher Schatten). */
.startseite .kopf-aktionen { gap: var(--raum-3); }
.startseite .kopf-aktionen .knopf {
  border-radius: 980px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background var(--uebergang), box-shadow var(--uebergang),
              transform var(--uebergang);
}
.startseite .kopf-aktionen .knopf:hover { box-shadow: 0 4px 14px rgba(31, 56, 100, .22); }
.startseite .kopf-aktionen .knopf:active { transform: scale(0.985); }
/* Sekundaeraktionen: helle, umrandete Pills statt Textlinks – klarer Trio-Look. */
.startseite .kopf-aktionen .knopf-schlicht {
  background: var(--flaeche);
  color: var(--akzent-hell);
  border: 1px solid var(--linie-kraeftig);
  border-radius: 980px;
  padding: 10px 20px;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.startseite .kopf-aktionen .knopf-schlicht:hover {
  background: var(--flaeche-leise);
  border-color: var(--linie-kraeftig);
  color: var(--akzent-tief);
}

/* --- Abschnitts-Eyebrows ---------------------------------------------- */
.startseite h2 {
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--grau-leise);
  margin: var(--raum-hero) 0 var(--raum-4);
}
.startseite section:first-of-type h2 { margin-top: var(--raum-2); }

/* --- Kennzahl-Kacheln -------------------------------------------------- */
/* Festes 6-Spalten-Raster: reine Zahl-Kacheln stehen zu SECHST in einer Reihe,
   Verknüpfungs-/Sprung-Kacheln überspannen zwei Spalten und stehen damit zu
   DRITT (so gross wie die Bereichskarten). Auf schmaleren Schirmen wird das
   Raster stufenweise kleiner. */
.startseite .kacheln {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--raum-5);
}
.startseite .kachel-verknuepfung,
.startseite .kachel-aktion { grid-column: span 2; }
@media (max-width: 1280px) {
  .startseite .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Premium-Audit: die 2er-Stufe erst am Handy – ein iPad (834px) behaelt die
   4er-Stufe, sonst verschenkt der Zahlenueberblick die halbe Breite. */
@media (max-width: 700px) {
  .startseite .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .startseite .kacheln { grid-template-columns: 1fr; }
  .startseite .kachel-verknuepfung,
  .startseite .kachel-aktion { grid-column: auto; }
}
.startseite .kachel {
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  padding: var(--raum-6);
  box-shadow: var(--schatten-karte);
  display: flex;
  flex-direction: column;
  gap: var(--raum-2);
  min-height: 148px;
  justify-content: center;
  transition: box-shadow var(--uebergang), transform var(--uebergang);
}
.startseite .kachel:hover {
  box-shadow: var(--schatten);
  transform: translateY(-2px);
}
/* Grosse, ruhige, monochrome Zahl (Apple: Farbe sparsam, Typo traegt). */
.startseite .kachel .zahl {
  font-size: clamp(34px, 3.4vw, 44px);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}
.startseite .kachel .titel {
  color: var(--grau);
  font-size: 13.5px;
  margin: 0;
  line-height: 1.35;
}

/* --- Leerzustand „Braucht Aufmerksamkeit" ----------------------------- */
.startseite section .karte {
  border-radius: var(--radius-gross);
  padding: var(--raum-8);
  text-align: center;
}
.startseite section .karte .leer {
  font-style: normal;
  color: var(--grau);
  font-size: 15px;
  margin: 0;
}

/* --- Objekt-Tabelle: etwas luftiger, weicher gerundet ------------------ */
.startseite table { border-radius: var(--radius-gross); }
.startseite th, .startseite td { padding: 14px var(--raum-4); }

/* ============================================================
   UI-Premium-Sweep (Testphasen-Review): ruhige Hinweiskaesten,
   kompakte Blaupause-Zeile, Anmeldekarte mit Logo.
   ============================================================ */

/* Fachliche Hinweise (z. B. Tagesordnungs-Rahmen): Warnflaeche, kein Fehlerrot. */
.hinweis-rahmen {
  background: var(--warnung-fl);
  border: 1px solid var(--warnung-li);
  border-radius: var(--radius);
  color: var(--warnung-tx);
  padding: var(--raum-4) var(--raum-6);
  margin: var(--raum-4) 0;
}
.hinweis-rahmen ul { margin: var(--raum-2) 0; padding-left: 18px; }
.hinweis-rahmen form { margin-top: var(--raum-2); }

/* Blaupause speichern: kompakte einzeilige Form (Feld + Knopf buendig). */
.blaupause-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--raum-3);
  align-items: flex-end;
}
.blaupause-form .feld { flex: 1 1 280px; margin: 0; }

/* Anmeldekarte: Logo sitzt IN der Karte (weisser Bildhintergrund unsichtbar). */
.anmeldung .karte img { height: 28px; margin-bottom: var(--raum-4); }
.anmeldung-titel {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 var(--raum-6);
}

/* Busy-Zustand lang laufender Download-Knoepfe (ZIP-/PDF-Serien): der Knopf
   bleibt sichtbar, wird aber inaktiv und pulsiert dezent, bis der Download
   beim Browser angekommen ist (Cookie-Signal, base.html). */
a.laedt {
  opacity: .65;
  pointer-events: none;
  animation: laedt-puls 1.2s ease-in-out infinite;
}
@keyframes laedt-puls {
  0%, 100% { opacity: .65; }
  50% { opacity: .4; }
}
@media (prefers-reduced-motion: reduce) {
  a.laedt { animation: none; }
}

/* Einzelstimmen-Erfassung (Sitzungs-Modus): kompakte Ja/Nein/Enth.-Knoepfe,
   aktive Richtung farbig; nicht stimmberechtigte Zeilen gedimmt. */
.stimmliste-block { margin: var(--raum-3) 0; }
.stimmliste-block > summary { cursor: pointer; font-size: 14px; color: var(--akzent); }
.stimmliste-warnung { color: var(--warnung-tx); }
.stimme-gruppe { display: inline-flex; gap: var(--raum-1); }
.stimme-knopf {
  border: 1px solid var(--linie-kraeftig);
  background: var(--flaeche);
  border-radius: 980px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--uebergang), border-color var(--uebergang);
}
.stimme-knopf:hover { background: var(--flaeche-leise); }
.stimme-knopf:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.stimme-knopf.aktiv-ja { background: var(--erfolg-fl); border-color: var(--erfolg-li); color: var(--erfolg-tx); font-weight: 600; }
.stimme-knopf.aktiv-nein { background: var(--fehler-fl); border-color: var(--fehler-li); color: var(--fehler-tx); font-weight: 600; }
.stimme-knopf.aktiv-enthaltung { background: var(--warnung-fl); border-color: var(--warnung-li); color: var(--warnung-tx); font-weight: 600; }
.stimme-loeschen { color: var(--grau); }
.stimmliste-inaktiv { opacity: .55; }
.stimmliste-tabelle td, .stimmliste-tabelle th { padding: 8px var(--raum-3); }
.dokument-liste { margin: 0 0 var(--raum-2); padding-left: 18px; }

/* Objekt-Nr. (Fachschlüssel wie in impower/facilioo) neben dem Kurznamen. */
.objekt-nr {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.72em;
  font-weight: 600;
  color: var(--akzent, #1F3864);
  background: var(--flaeche-leise, #f2f4f8);
  border: 1px solid var(--linie-kraeftig, #d5dae3);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  vertical-align: middle;
}

/* Gesprächsnotizen (apps/kontakte): Aktionszelle der Notizen-Liste –
   Erledigt-Toggle und Word-Download nebeneinander, tastaturfreundlich. */
.notiz-aktionen { display: flex; flex-wrap: wrap; gap: var(--raum-2); align-items: center; }
.notiz-aktionen form { margin: 0; }

/* ============================================================
   Kopf-Rechts: „Externe Systeme" + Konto (Reihe 1)
   ============================================================ */
.kopf-rechts { display: flex; align-items: center; gap: var(--raum-3); }

.extern-menu { position: relative; }
.extern-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--raum-2);
  padding: 6px 12px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: 980px;
  background: var(--flaeche);
  color: var(--grau);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  transition: background var(--uebergang), color var(--uebergang);
}
.extern-toggle::-webkit-details-marker { display: none; }
.extern-toggle:hover { background: var(--flaeche-leise); color: var(--akzent); }
.extern-toggle:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.extern-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
  padding: var(--raum-2);
  z-index: 60;
}
@media (max-width: 640px) { .extern-text { display: none; } }

/* ============================================================
   Bereichsseiten: ein Nav-Punkt je Thema -> Karten-Seite
   ============================================================ */
.bereich-gitter {
  display: grid;
  /* Standard: bis zu DREI große Karten je Reihe (sechs Karten → 3×2). */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--raum-5);
  margin-top: var(--raum-6);
  /* Abstand zu nachfolgenden Bloecken (z. B. Einstellungen-Karte im
     Vertragsmanagement, zweites Raster der Auswertungen) – kollabiert mit
     deren margin-top, es entsteht also nie doppelter Abstand. */
  margin-bottom: var(--raum-6);
}
/* Mengen-Query: hat das Raster GENAU zwei bzw. eine Karte, soll die Reihe voll
   gefüllt werden (kein toter Rand rechts, den die fixe dritte Spalte hinterließ –
   der historische „Kacheln passen nicht"-Fehler). Nur ab Desktop, damit die
   schmaleren Breakpoints unten (Tablet/Handy) nicht überstimmt werden. */
@media (min-width: 1001px) {
  .bereich-gitter:has(> :last-child:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bereich-gitter:has(> :last-child:nth-child(1)) {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Genau VIER Karten: 2×2 statt 3+1 – sonst steht in der zweiten Reihe eine
     einzelne Karte allein (z. B. Bereich Kommunikation). Ausgewogenes Raster. */
  .bereich-gitter:has(> :last-child:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .bereich-gitter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bereich-gitter { grid-template-columns: 1fr; }
}
.bereich-karte {
  display: flex;
  flex-direction: column;
  gap: var(--raum-2);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: var(--raum-6);
  box-shadow: var(--schatten-karte);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow var(--uebergang), border-color var(--uebergang), transform var(--uebergang);
}
.bereich-karte:hover {
  text-decoration: none;
  border-color: var(--akzent-hell);
  box-shadow: var(--schatten);
  transform: translateY(-1px);
}
.bereich-karte:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.bereich-titel {
  font-size: 16px;
  font-weight: 600;
  color: var(--akzent);
  letter-spacing: -0.01em;
}
.bereich-titel::after { content: " \2192"; font-weight: 400; opacity: .6; }
.bereich-text { color: var(--grau); font-size: 13.5px; line-height: 1.5; }
/* Kleine Kennzahl-Zeile in einer Bereichskarte (z. B. „3 angelegt"). */
.bereich-zahl {
  margin-top: var(--raum-1);
  font-size: 12px;
  font-weight: 600;
  color: var(--grau-leise);
}

/* Aufklapp-Dreieck der <details>-Summaries im Kopf browserfest entfernen
   (Firefox nutzt ::marker, WebKit ::-webkit-details-marker). */
header summary { list-style: none; }
header summary::marker { content: ""; }
header summary::-webkit-details-marker { display: none; }

/* ============================================================
   Dashboard-Politur: Begruessungs-Hero + Sektionskarten
   ============================================================ */
.start-hero .begruessung-name { color: var(--akzent); }
.dash-sektion { margin-top: var(--raum-8); }
.dash-sektion > h2 { margin-top: 0; }

/* --- „Anpassen"-Panel: ganze Bereiche ein-/ausblenden (Apple-Stil) --------
   <details> als Popover am Hero: ruhiger Pill-Knopf, rechts verankertes
   Karten-Panel mit Schalter-Zeilen (Label + Themen im Bereich). Funktioniert
   ohne JavaScript; die Schalter sind echte Checkboxen. */
.dash-anpassen { position: relative; flex-shrink: 0; }
.dash-anpassen > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.dash-anpassen > summary::marker { content: ""; }
.dash-anpassen > summary::-webkit-details-marker { display: none; }
.dash-anpassen[open] > summary { background: var(--flaeche-sanft, #f0f1f4); }
.dash-anpassen-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(440px, 92vw);
  padding: var(--raum-5);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
  border-radius: 16px;
}
.dash-anpassen-titel { margin: 0 0 var(--raum-1); font-size: 19px; }
.dash-anpassen-panel > p.unterzeile { margin-top: 0; }
.dash-anpassen-liste {
  list-style: none;
  margin: var(--raum-4) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.dash-anpassen-zeile + .dash-anpassen-zeile { border-top: 1px solid var(--linie); }

/* Schalter-Zeile: Text links, iOS-artiger Kippschalter rechts. */
.schalter-zeile {
  display: flex;
  align-items: center;
  gap: var(--raum-4);
  padding: 10px 0;
  cursor: pointer;
}
.schalter-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.schalter-label { font-weight: 600; }
.schalter-beschreibung { font-size: 13px; line-height: 1.4; color: var(--grau); }
/* Checkbox bleibt zugaenglich (Fokus, Screenreader), aber unsichtbar –
   der sichtbare Schalter haengt am :checked-Zustand. */
.schalter-eingabe {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.schalter {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--linie-kraeftig, #c9cdd4);
  position: relative;
  transition: background var(--uebergang);
}
.schalter::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform var(--uebergang);
}
.schalter-eingabe:checked ~ .schalter { background: var(--akzent); }
.schalter-eingabe:checked ~ .schalter::after { transform: translateX(18px); }
.schalter-eingabe:focus-visible ~ .schalter {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .schalter, .schalter::after { transition: none; }
}
@media (max-width: 640px) {
  /* Auf dem Handy als fliessende Karte statt Popover (kein Abschneiden). */
  .dash-anpassen-panel { position: static; width: 100%; margin-top: var(--raum-3); }
}

/* Auswertungen-Block auf dem Dashboard: ausklappbar (<details data-merker>),
   merkt sich Auf/Zu je Browser. Kopf wie eine Sektionsüberschrift, darunter das
   vertraute Karten-Raster (.bereich-gitter). */
.dash-auswertungen { margin-top: var(--raum-8); }
.dash-auswertungen > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--raum-2) var(--raum-3);
  padding: var(--raum-2) 0;
  border-bottom: 1px solid var(--linie);
}
.dash-auswertungen > summary::-webkit-details-marker { display: none; }
.dash-auswertungen > summary::before {
  content: "▸";
  color: var(--grau);
  transition: transform var(--uebergang);
}
.dash-auswertungen[open] > summary::before { transform: rotate(90deg); }
.dash-auswertungen-titel { font-size: 18px; font-weight: 650; color: var(--text); }
.dash-auswertungen-hinweis { font-size: 13px; color: var(--grau); }
.dash-auswertungen-gitter { margin-top: var(--raum-4); }
.dash-auswertungen > summary:focus-visible {
  outline: none;
  box-shadow: var(--fokus-ring);
  border-radius: var(--radius-klein);
}
/* Auslaufende Vertraege: dezente Warnfarbe am linken Rand der Karte. Bewusst
   das Warn-Vokabular (bernstein) statt Info-Blau – konsistent mit badge-offen
   und der Fristampel. (--hinweis-li ist hellblau; der Amber-Fallback griff nie.) */
.dash-warnkarte { border-left: 3px solid var(--warnung-li); }

/* ============================================================
   Usability-Sweep (Senior): Formular-Layout + Kontrollfelder
   ============================================================ */
/* Breite Formulare: nutzt den Schirm, ohne Zeilen unlesbar lang zu machen. */
.formular-breit { max-width: 780px; }

/* Zwei zusammengehoerige Felder nebeneinander (Datum von/bis, PLZ/Ort ...).
   Auf schmalen Screens automatisch untereinander. */
.feld-reihe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--raum-4);
}
@media (max-width: 640px) { .feld-reihe { grid-template-columns: 1fr; } }

/* Kontrollfelder: Checkbox/Radio LINKS neben dem Text in einer Zeile - vorher
   blies ".feld input { width:100% }" die Kontrolle zum Block auf (Premium-Audit:
   Versandart-Radios standen ZENTRIERT ueber ihrem Label). */
.feld input[type="checkbox"],
.feld input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--akzent);
}
/* Label-Variante (Radio/Checkbox IM Label, z. B. Versandart im Umlauf-Anlegen):
   Kontrolle und Text buendig nebeneinander, mehrzeiliger Text haengt sauber. */
label.kontrollfeld {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.feld.kontrollfeld label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.feld.kontrollfeld { margin-bottom: var(--raum-3); }

/* ============================================================
   Vertragsmanagement: Lebenszyklus-Badges (additiv)
   „entwurf“ und „versendet“ nutzen die bestehenden Badge-Klassen
   aus Abschnitt 11; hier nur die drei neuen Vertragsstatus.
   ============================================================ */
.badge-unterschrieben { background: var(--erfolg-fl);     border-color: var(--erfolg-li);      color: var(--erfolg-tx); }
.badge-gekuendigt     { background: var(--warnung-fl);    border-color: var(--warnung-li);     color: var(--warnung-tx); }
.badge-beendet        { background: var(--flaeche-leise); border-color: var(--linie-kraeftig); color: var(--grau-leise); }

/* ============================================================
   Globale Schnellsuche (Strg+K, P1) – Kopf-Knopf + Overlay
   Additiv am Dateiende; Vokabular wie oben (karte/flaeche/fokus-ring).
   ============================================================ */
/* Kopf-Knopf: Pille wie .extern-toggle; ohne JS ein normaler Link auf /suche/. */
.suche-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--raum-2);
  padding: 6px 12px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: 980px;
  background: var(--flaeche);
  color: var(--grau);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--uebergang), color var(--uebergang);
}
.suche-toggle:hover { background: var(--flaeche-leise); color: var(--akzent); text-decoration: none; }
.suche-toggle:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
/* Tastenkuerzel (Strg K) als leise Tastenkappe: heller Deckel, hauchduenne
   Unterkante als Tiefenkante – wirkt gedrueckt-praezise statt aufgeklebt. */
.suche-kuerzel {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--grau-leise);
  border: 1px solid var(--linie-kraeftig);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--flaeche);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .suche-text, .suche-kuerzel { display: none; } }

/* Overlay: natives <dialog>, oben zentriert wie eine Befehls-Palette. */
.schnellsuche {
  width: min(640px, calc(100vw - 2 * var(--raum-4)));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  color: var(--text);
}
/* Sanftes Einblenden der Befehls-Palette: kurzer Weg von oben plus Opacity,
   ease-out – praezise, nicht verspielt. Abschaltung s. prefers-reduced-motion. */
.schnellsuche[open] { animation: dialog-ein 160ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.schnellsuche[open]::backdrop { animation: schleier-ein 160ms ease-out both; }
@keyframes dialog-ein {
  from { opacity: 0; transform: translateY(-8px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes schleier-ein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.schnellsuche::backdrop { background: rgba(29, 29, 31, .35); }

/* Lightbox „Vorschau vergrößern": großes Blatt, mittig, scrollbar. Nutzt dieselbe
   Einblend-Animation wie die Schnellsuche (dialog-ein). */
.dokument-vorschau-modal {
  width: min(920px, calc(100vw - 2 * var(--raum-4)));
  max-height: calc(100vh - 2 * var(--raum-5));
  margin: auto;
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  color: var(--text);
  overflow: auto;
}
.dokument-vorschau-modal[open] { animation: dialog-ein 160ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.dokument-vorschau-modal::backdrop { background: rgba(29, 29, 31, .45); }
.dokument-vorschau-modal-kopf {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--raum-4);
  padding: var(--raum-3) var(--raum-4);
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche);
}
.dokument-vorschau-modal-titel { font-weight: 600; font-size: 14px; }
/* Das eingebettete A4-Blatt größer darstellen (mehr Innenabstand, volle Breite). */
.dokument-vorschau-modal-blatt { padding: var(--raum-5) var(--raum-6); }
/* Vertragsseite (#133): zweispaltige Arbeitsfläche wie der Umlauf-Editor –
   links Info/Aktionen, rechts das ECHTE Dokument als eingebettetes PDF (sticky).
   Diese Klassen sind global (die Vertragsseite lädt nur app.css). */
.vertrag-arbeitsflaeche {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: var(--raum-6);
  align-items: start;
  margin-top: var(--raum-5);
}
.vertrag-spalte-info { min-width: 0; }
.vertrag-spalte-vorschau {
  position: sticky; top: var(--raum-4);
  display: flex; flex-direction: column; gap: var(--raum-3);
}
.vertrag-spalte-vorschau .editor-vorschau-kopf {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--raum-3);
}
.vertrag-spalte-vorschau .editor-vorschau-kopf h2 { margin: 0; font-size: 15px; }
.vertrag-vorschau-pdf {
  width: 100%; height: 640px;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: #fff; box-shadow: var(--schatten-leise);
}
.vorschau-leer {
  border: 1px dashed var(--linie); border-radius: var(--radius);
  padding: var(--raum-6); background: var(--flaeche-leise); color: var(--grau);
}
.vertrag-vorschau-fuss { margin: 0; }
.platzhalter-grau { color: #666666; }
@media (max-width: 1100px) {
  .vertrag-arbeitsflaeche { grid-template-columns: 1fr; }
  .vertrag-spalte-vorschau { position: static; }
  .vertrag-vorschau-pdf { height: 520px; }
}
.dokument-vorschau-modal-blatt .vorschau-blatt {
  width: 100%; max-width: none; margin: 0; box-shadow: none; border: 1px solid var(--linie);
  font-size: 15px;
}
.dokument-vorschau-modal .schnellsuche-hinweis { padding: 0 var(--raum-4) var(--raum-3); }
/* Vergrößertes echtes Dokument (PDF) in der Lightbox: hoher iframe. */
.dokument-vorschau-modal:has(.dokument-vorschau-modal-pdf) {
  width: min(1000px, calc(100vw - 2 * var(--raum-4)));
}
.dokument-vorschau-modal-pdf {
  width: 100%; height: min(82vh, 1000px);
  border: 0; display: block; background: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .dokument-vorschau-modal[open] { animation: none; }
}
.schnellsuche-form {
  display: flex;
  align-items: center;
  gap: var(--raum-2);
  padding: var(--raum-3) var(--raum-4);
  border-bottom: 1px solid var(--linie);
}
.schnellsuche-form:focus-within { box-shadow: inset 0 -2px 0 var(--akzent); }
.schnellsuche-lupe { color: var(--grau-leise); font-size: 18px; }
.schnellsuche-form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  background: transparent;
  color: var(--text);
}

/* Trefferliste (Overlay UND /suche/-Vollseite): Kategorien + Linkzeilen. */
.schnellsuche .schnellsuche-ergebnisse {
  max-height: min(48vh, 420px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--linie-kraeftig) transparent;
}
.suche-gruppe { padding: var(--raum-2) 0; }
.suche-gruppe + .suche-gruppe { border-top: 1px solid var(--linie); }
.suche-gruppe-titel {
  margin: 0;
  padding: var(--raum-2) var(--raum-4) var(--raum-1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grau-leise);
}
.suche-liste { list-style: none; margin: 0; padding: 0; }
.suche-treffer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--raum-3);
  padding: var(--raum-2) var(--raum-4);
  border-radius: var(--radius-klein);
  color: var(--text);
  text-decoration: none;
  transition: background var(--uebergang), color var(--uebergang);
}
.suche-treffer:hover { background: var(--flaeche-leise); color: var(--akzent); text-decoration: none; }
.suche-treffer:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.suche-treffer-meta { color: var(--grau-leise); font-size: 12.5px; white-space: nowrap; }
.suche-leer { padding: var(--raum-3) var(--raum-4); margin: 0; }
.schnellsuche-hinweis {
  margin: 0;
  padding: var(--raum-2) var(--raum-4);
  border-top: 1px solid var(--linie);
  color: var(--grau-leise);
  font-size: 12px;
}

/* /suche/-Vollseite (ohne JS): Formular-Karte + Ergebnis-Karte darunter. */
.schnellsuche-seitenform {
  display: flex;
  align-items: flex-end;
  gap: var(--raum-3);
  max-width: 640px;
}
.schnellsuche-seitenform .feld { flex: 1; margin-bottom: 0; }
.schnellsuche-seitenergebnisse {
  max-width: 640px;
  margin-top: var(--raum-4);
  padding: var(--raum-2) 0;   /* die Gruppen bringen ihr eigenes Innenpolster mit */
}

/* ============================================================
   Startseite: Kennzahl-Kacheln pro Benutzer anpassen (additiv)
   ============================================================ */
/* Eyebrow-Ueberschrift und „Anpassen"-Toggle auf einer Linie; das h2 behaelt
   seine Abstaende (Flex-Item), der Toggle richtet sich an der Grundlinie aus. */
.ueberblick-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--raum-4);
  flex-wrap: wrap;
}
.kacheln-anpassen { position: relative; }
.kacheln-anpassen > summary {
  cursor: pointer;
  list-style: none;
  color: var(--grau);
  font-size: 13px;
  padding: 2px var(--raum-2);
  border-radius: var(--radius);
}
.kacheln-anpassen > summary::-webkit-details-marker { display: none; }
.kacheln-anpassen > summary:hover,
.kacheln-anpassen[open] > summary { color: var(--text); background: var(--flaeche-leise); }
/* Panel im karte-Stil, rechtsbuendig unter dem Toggle aufklappend. */
.kacheln-anpassen-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 250px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
  padding: var(--raum-4);
}
.kacheln-anpassen-panel .hinweis { margin: 0 0 var(--raum-2); }
.kacheln-anpassen-panel .kontrollfeld { margin-bottom: var(--raum-2); }
.kacheln-anpassen-panel .knopf { margin-top: var(--raum-2); }
/* Kachel-Zeile im Anpassen-Panel: Häkchen links, Sortier-Pfeile rechts. */
.kachel-zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--raum-3); }
.kachel-sortier { display: inline-flex; gap: 4px; flex: none; }
.sortier-knopf {
  width: 26px; height: 26px; padding: 0; line-height: 1;
  border: 1px solid var(--linie); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text); cursor: pointer;
  font-size: 13px;
}
.sortier-knopf:hover:not(:disabled) { background: var(--flaeche-leise); color: var(--akzent); border-color: var(--akzent-hell); }
.sortier-knopf:disabled { opacity: 0.35; cursor: default; }
.sortier-knopf:focus-visible { outline: none; box-shadow: var(--fokus-ring); }

/* O2: „Weitere Aktionen"-Ausklapper im Objekt-Cockpit – seltene Aktionen
   ruhig zusammengefasst. Toggle wie ein Knopf, Panel als aufklappendes
   Overlay mit vertikal gestapelten Links (gleiches Overlay-Muster wie oben). */
.weitere-aktionen { position: relative; display: inline-block; }
.weitere-aktionen > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.weitere-aktionen > summary::-webkit-details-marker { display: none; }
.weitere-aktionen > summary::after { content: "▾"; font-size: 11px; }
.weitere-aktionen[open] > summary::after { content: "▴"; }
.weitere-aktionen-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: var(--raum-2);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
  padding: var(--raum-4);
}
.weitere-aktionen-panel .knopf { width: 100%; text-align: center; }

/* ============================================================
   Einstellungs-Center (/einstellungen/, kern/einstellungen.html)
   Additive Zusatzstile zu den Bereichskarten: Karten mit mehreren
   Zielen (Link-Liste statt Vollflaechen-Link), kursiver Hinweis
   (Rechtstexte) und die dezente Maschinenraum-Fussnote.
   ============================================================ */
.einstellung-titel-ohne-pfeil::after { content: ""; }
.einstellung-links {
  display: flex;
  flex-direction: column;
  gap: var(--raum-1);
  margin-top: var(--raum-1);
}
.einstellung-link {
  color: var(--akzent);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
}
.einstellung-link::after { content: " \2192"; font-weight: 400; opacity: .6; }
.einstellung-link:hover { text-decoration: underline; }
.einstellung-hinweis { color: var(--grau); font-size: 12.5px; font-style: italic; }
.einstellung-karte-dezent {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}
.einstellung-karte-dezent .bereich-titel { color: var(--grau); font-weight: 500; }

/* ============================================================
   Schrittkette – Vorgangs-Lebenszyklus als ruhige Fortschrittslinie
   (Genuss #3, docs/INNOVATIONSRUNDE_4.md). Reine Anzeige aus vorgang.status:
   erledigte Stationen gefuellt im Akzent, die aktuelle betont, kommende leise
   grau. Nur bestehendes Design-Vokabular (Akzent, --linie, --grau, Radien,
   --uebergang) – keine neuen Farben, keine externen Ressourcen. Bricht auf
   schmalen Screens um (flex-wrap).
   ============================================================ */
.schrittkette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--raum-2) 0;
  list-style: none;
  margin: 0 0 var(--raum-6);
  padding: 0;
}
.schrittkette-schritt {
  display: inline-flex;
  align-items: center;
  gap: var(--raum-2);
}
/* Verbindungslinie vor jeder Station ausser der ersten (Hairline). Sie traegt
   die Akzentfarbe, sobald die folgende Station erreicht ist (erledigt/aktuell). */
.schrittkette-schritt:not(:first-child)::before {
  content: "";
  flex: 0 0 auto;
  width: var(--raum-8);
  height: 1.5px;
  margin: 0 var(--raum-3);
  background: var(--linie-kraeftig);
  border-radius: 999px;
}
.schrittkette-erledigt:not(:first-child)::before,
.schrittkette-aktuell:not(:first-child)::before { background: var(--akzent); }

/* Punkt je Station – der sichtbare Fortschrittsmarker. Groesser gehalten, damit
   die erledigte Station ein weisses Haekchen tragen kann (wie im Entwurf). */
.schrittkette-punkt {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 1.5px solid var(--linie-kraeftig);
  border-radius: 999px;
  background: var(--flaeche);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background var(--uebergang), border-color var(--uebergang),
              box-shadow var(--uebergang);
}
/* Erledigt = gruen mit Haekchen (die klarste „fertig"-Sprache). */
.schrittkette-erledigt .schrittkette-punkt {
  background: var(--erfolg-tx);
  border-color: var(--erfolg-tx);
}
.schrittkette-erledigt .schrittkette-punkt::after {
  content: "\2713";  /* ✓ */
}
.schrittkette-aktuell .schrittkette-punkt {
  border-color: var(--akzent);
  background: var(--akzent);
  box-shadow: 0 0 0 3px rgba(31, 56, 100, .18);  /* betonter Ring im Akzent */
}
/* Erledigte Verbindungslinie in Gruen, damit der Fortschritt durchgehend liest. */
.schrittkette-erledigt:not(:first-child)::before { background: var(--erfolg-tx); }

/* Beschriftung: erledigt dunkel, aktuell im Akzent betont, offen leise/grau. */
.schrittkette-label { font-size: 13px; color: var(--grau); white-space: nowrap; }
.schrittkette-erledigt .schrittkette-label { color: var(--text); }
.schrittkette-aktuell .schrittkette-label { color: var(--akzent); font-weight: 600; }
.schrittkette-offen .schrittkette-label { color: var(--grau-leise); }

/* Ruhe unter prefers-reduced-motion: keine Bewegung am Punkt (der globale
   Reduce-Block in Abschnitt 14 deckt Transitions bereits ab; hier explizit,
   damit die Absicht dokumentiert bleibt). */
@media (prefers-reduced-motion: reduce) {
  .schrittkette-punkt { transition: none; }
}

/* ============================================================
   Sitzungs-Modus – Beamer-/Saal-Präsentation (Vollbild-Kiosk)
   Eigenständige Vollbild-Seite (versammlung_praesentation.html,
   NICHT base.html): eine TOP-Folie zur Zeit, große Arial-Typo,
   monochrom + RESYDICT-Akzent. Ohne JavaScript stehen alle Folien
   untereinander (progressive enhancement). Personendatenfrei
   (Saal-Sicht, Domänenregel 4).
   ============================================================ */
.praesentation-body { margin: 0; background: var(--flaeche); color: var(--text); }
.praesentation {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Dezente Kopfleiste – auf dem Beamer ruhig, nicht störend. */
.praesentation-kopf {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  font-size: 14px;
}
.praesentation-marke { font-weight: 700; letter-spacing: -0.01em; }
.praesentation-objekt { color: var(--grau); }
.praesentation-leitermarke { color: var(--akzent); font-weight: 600; }
.praesentation-kopf-aktionen { margin-left: auto; display: flex; gap: 18px; }
.praesentation-kopf-aktionen a { color: var(--akzent-hell); }

/* Bühne: eine Folie zentriert. schritt-modus (mit JS) zeigt nur die aktive. */
.folie {
  flex: 1 1 auto;
  min-height: 0;  /* Flex-Item darf unter Inhaltsgröße schrumpfen → innerer Scroll greift */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 56px 128px;
  box-sizing: border-box;
}
/* Hero-Folien (Titel/Abschluss) mittig; TOP-Folien beginnen oben, damit der
   Antragstext frei fließen kann und die Ergebnis-Kachel unten andockt. */
.folie-titel, .folie-schluss { justify-content: center; }
/* Kiosk mit JS: Bühne auf Bildschirmhöhe fixieren, damit die aktive Folie den
   Schirm füllt, der Antragstext bei Bedarf INNERHALB scrollt (min-height:0) und
   die Ergebnis-Kachel unten sichtbar bleibt statt hinter die Steuerleiste zu
   rutschen. Ohne JS scrollt die Seite normal durch alle Folien. */
.praesentation.schritt-modus { height: 100vh; height: 100dvh; overflow: hidden; }
.praesentation.schritt-modus .folie { display: none; }
.praesentation.schritt-modus .folie.aktiv { display: flex; }
.praesentation:not(.schritt-modus) .folie + .folie { border-top: 1px solid var(--linie); }
.folie:focus { outline: none; }

.folie-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 600;
  color: var(--akzent);
}

/* Titelfolie */
.folie-titel-name {
  margin: 0;
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.folie-titel-anschrift { margin: 0; font-size: clamp(18px, 2.4vw, 30px); color: var(--grau); }
.folie-titel-daten { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 12px 0 0; }
.folie-titel-daten div { min-width: 160px; }
.folie-titel-daten dt {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grau-leise);
}
.folie-titel-daten dd { margin: 2px 0 0; font-size: clamp(18px, 2vw, 26px); }
.folie-quorum {
  margin-top: 12px;
  padding: 18px 24px;
  border-radius: var(--radius-gross);
  border: 1px solid var(--linie-kraeftig);
  border-left: 6px solid var(--akzent);
  background: var(--flaeche-leise);
  max-width: 640px;
}
.folie-quorum.quorum-nein { border-left-color: #b23b3b; }
.folie-quorum-zahl { margin: 0; font-size: clamp(22px, 3vw, 36px); font-weight: 700; }
.folie-quorum-text { margin: 4px 0 0; font-size: clamp(15px, 1.7vw, 20px); color: var(--grau); }

/* TOP-Folie */
.folie-top-titel {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  /* Globale h2-Regel (klein/grau/VERSAL) hier bewusst zurücksetzen: der
     TOP-Titel erscheint groß, dunkel und exakt wie eingegeben. */
  color: var(--text);
  text-transform: none;
}
.folie-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.folie-sachverhalt { color: var(--grau); font-size: clamp(15px, 1.7vw, 21px); line-height: 1.5; }
.folie-sachverhalt p { margin: 0 0 8px; }
.folie-antrag-label {
  margin: 14px 0 6px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--akzent);
}
.folie-antrag { font-size: clamp(19px, 2.4vw, 32px); line-height: 1.4; }
.folie-antrag p { margin: 0 0 10px; }
.folie-antrag .platzhalter-offen,
.folie-sachverhalt .platzhalter-offen { color: var(--grau-leise); }

/* Ergebnis-Kachel (aggregiert, personendatenfrei) */
.folie-ergebnis {
  padding: 18px 24px;
  border-radius: var(--radius-gross);
  border: 1px solid var(--linie-kraeftig);
  border-left: 8px solid var(--linie-kraeftig);
  background: var(--flaeche-leise);
}
.folie-ergebnis-status { margin: 0; font-size: clamp(18px, 2.2vw, 28px); color: var(--grau); }
.folie-ergebnis-feststellung {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.folie-ergebnis-angenommen { border-left-color: var(--akzent); }
.folie-ergebnis-angenommen .folie-ergebnis-feststellung { color: var(--akzent); }
.folie-ergebnis-abgelehnt { border-left-color: #b23b3b; }
.folie-ergebnis-abgelehnt .folie-ergebnis-feststellung { color: #b23b3b; }
.folie-ergebnis-zahlen {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  font-size: clamp(16px, 1.9vw, 24px);
  color: var(--grau);
}
.folie-ergebnis-zelle .zahl {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  color: var(--text);
}

/* Leiter-Schnellerfassung (nur ?modus=leiter; nie auf der Leinwand) */
.folie-leiter {
  padding: 14px 18px;
  border: 1px dashed var(--linie-kraeftig);
  border-radius: var(--radius);
  background: var(--flaeche-hauch);
}
.folie-leiter-felder { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.folie-leiter-felder label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--grau);
}
.folie-leiter-felder input,
.folie-leiter-felder select {
  padding: 8px 10px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  font: inherit;
  font-size: 16px;
}
.folie-leiter-felder input[name="ja"],
.folie-leiter-felder input[name="nein"],
.folie-leiter-felder input[name="enthaltung"] { width: 6ch; }
.folie-leiter-notiz {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--grau);
}
.folie-leiter-notiz textarea {
  padding: 8px 10px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}
.folie-leiter-hinweis { margin: 8px 0 0; font-size: 12.5px; color: var(--grau-leise); }

/* Schlussfolie */
.folie-schluss-titel {
  margin: 0;
  font-size: clamp(30px, 5vw, 64px);
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}
.folie-schluss-bilanz { margin: 0; font-size: clamp(18px, 2.2vw, 28px); }
.folie-schluss-hinweis { margin: 0; color: var(--grau); font-size: clamp(15px, 1.7vw, 20px); }
.folie-schluss-aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; }

/* Netz-Status-Pille im Kopf (nur bei Offline eingeblendet) + Offline-Hinweis
   der Leiter-Erfassung. Zurückhaltendes Warnrot, kein Alarm. */
.netz-status {
  font-size: 13px;
  font-weight: 600;
  color: #b23b3b;
  padding: 4px 10px;
  border: 1px solid #e6c7c7;
  border-radius: 999px;
  background: #fbf3f3;
  white-space: nowrap;
}
.folie-leiter-offline { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #b23b3b; }

/* Steuerleiste (fix am unteren Rand, Pillen-Form) */
.praesentation-leiste {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--flaeche);
  border: 1px solid var(--linie-kraeftig);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.praesentation-knopf {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--uebergang);
}
.praesentation-knopf:hover { background: var(--flaeche-leise); text-decoration: none; }
.praesentation-zaehler {
  font-variant-numeric: tabular-nums;
  color: var(--grau);
  padding: 0 6px;
  min-width: 8ch;
  text-align: center;
}

/* Vollbild: Container füllt den Screen. */
.praesentation:fullscreen { background: var(--flaeche); }
.praesentation:fullscreen .folie { max-width: 1280px; }

@media (max-width: 640px) {
  .folie { padding: 32px 22px 116px; }
  .praesentation-kopf { gap: 10px; padding: 10px 14px; font-size: 13px; }
  .praesentation-kopf-aktionen { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .praesentation-knopf { transition: none; }
}

/* ============================================================
   Innovationszirkel – Nutzung · Handlung · Optik (additiv)
   Rein additiv am Dateiende, nur bestehendes Token-Vokabular.
   ============================================================ */

/* Ruhiger Leerzustand in Tabellen: der leere Datensatz ist ein bewusster
   "Hier geht's los"-Moment, kein beiläufiger Kleingedruckt-Satz. Zentriert,
   luftig, aufrecht (statt kursiv) – die Handlung (Knopf) bekommt Abstand und
   steht ruhig unter dem Text. Nur Tabellenzellen (td.leer); das inline
   genutzte p.leer / .leer bleibt unberührt. */
td.leer {
  text-align: center;
  padding-top: var(--raum-8);
  padding-bottom: var(--raum-8);
  font-style: normal;
  color: var(--grau);
}
td.leer .knopf,
td.leer .knopf-schlicht {
  margin-top: var(--raum-3);
}

/* Einheitlicher Abschnittsabstand statt vereinzelter Inline-Styles –
   gleiche 8px-Basis wie das übrige Raster (ersetzt style="margin-top:2rem"). */
.abschnitt-luft { margin-top: var(--raum-8); }

/* Online-Zustimmung: kopierbares Link-Feld in der Übersicht (Weg A). */
.link-feld {
  width: 100%;
  min-width: 22ch;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12.5px;
  padding: 6px 8px;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  background: var(--flaeche-leise);
  color: var(--text);
}

/* ============================================================
   Einführungsguide – Lektions-Karten + Schritt-für-Schritt-Stepper.
   Reines HTML/CSS + Mini-JS (static/js/einfuehrung.js); ohne JS stehen alle
   Schritte untereinander (progressive enhancement).
   ============================================================ */
.guide-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--raum-4); margin-top: var(--raum-4); }
.guide-karte {
  display: flex; flex-direction: column; gap: var(--raum-2);
  padding: var(--raum-6); border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--flaeche); box-shadow: var(--schatten-karte); color: var(--text);
  text-decoration: none; transition: box-shadow var(--uebergang), transform var(--uebergang);
}
.guide-karte:hover { box-shadow: var(--schatten); transform: translateY(-2px); text-decoration: none; }
.guide-karte:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.guide-karte-dauer { font-size: 12px; color: var(--grau); font-weight: 600; letter-spacing: .02em; }
.guide-karte-titel { margin: 0; font-size: 20px; }
.guide-karte-kurz { margin: 0; color: var(--text); }
.guide-karte-ziel { margin: 0; color: var(--grau); font-size: 14px; }
.guide-karte-start { margin-top: auto; color: var(--akzent-hell); font-weight: 600; }

.guide-fortschritt { display: flex; align-items: center; gap: var(--raum-3); margin: var(--raum-4) 0; }
.guide-fortschritt-balken { flex: 1; height: 6px; background: var(--flaeche-leise); border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.guide-fortschritt-fuellung { display: block; height: 100%; width: 0; background: var(--akzent); transition: width var(--uebergang-ein); }
.guide-zaehler { font-size: 13px; color: var(--grau); font-weight: 600; white-space: nowrap; }

.guide-schritt {
  padding: var(--raum-6); border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--flaeche); box-shadow: var(--schatten-karte); margin-bottom: var(--raum-4);
}
.guide-stepper.stepper-aktiv .guide-schritt { display: none; margin-bottom: 0; }
.guide-stepper.stepper-aktiv .guide-schritt.aktiv { display: block; animation: guide-ein var(--uebergang-ein); }
@keyframes guide-ein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.guide-schritt:focus-visible { outline: none; box-shadow: var(--fokus-ring); }
.guide-schritt-nr { margin: 0 0 var(--raum-1); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--akzent-hell); }
.guide-schritt-titel { margin: 0 0 var(--raum-3); font-size: 22px; }
.guide-schritt-text { margin: 0 0 var(--raum-3); font-size: 16px; line-height: 1.6; }
.guide-beispiel { margin: 0 0 var(--raum-2); padding: var(--raum-3); border-left: 3px solid var(--linie-kraeftig); background: var(--flaeche-leise); border-radius: var(--radius-klein); }
.guide-hinweis { margin: 0 0 var(--raum-3); padding: var(--raum-3); border-left: 3px solid var(--hinweis-li); background: var(--hinweis-fl); color: var(--hinweis-tx); border-radius: var(--radius-klein); }
.guide-aktion { margin: var(--raum-3) 0 0; }
.guide-steuerung { display: flex; gap: var(--raum-3); align-items: center; margin-top: var(--raum-4); flex-wrap: wrap; }
.guide-steuerung #guide-selbst { margin-left: auto; }

/* ============================================================
   === Screen-Politur 2026 ===
   Additive Feinschliff-Regeln für die Bereiche Verträge, Kontakte,
   Schreiben, Rechnungen (Fraktura) und Sitzungs-Modus. Ausschließlich
   bestehende Gestaltungstoken (Farben/Radius/Schatten/Abstände) – keine
   hartkodierten Farben, kein :root-Eingriff. Nur Optik/Layout, keine
   Fachlogik. Ergänzt das bestehende Komponenten-Vokabular, ersetzt es nicht.
   ============================================================ */

/* --- Summenblock in Belegen (Fraktura, tfoot) --------------------------
   Der Summenteil einer Rechnung hebt sich ruhig, aber deutlich vom
   Positionskörper ab: leise Fläche, festere Trennkante über der ersten
   Summenzeile, die Brutto-Endsumme betont. Rein visuell – die rechtsbündigen
   Beträge (td.zahl) bleiben unberührt. tfoot kommt nur im Belegkörper vor. */
tfoot { background: var(--flaeche-leise); }
tfoot td, tfoot th { border-bottom: 1px solid var(--linie); }
tfoot tr:first-child td, tfoot tr:first-child th { border-top: 2px solid var(--linie-kraeftig); }
/* Zeilenköpfe im Summenblock sind Beschriftungen, keine Spaltenköpfe –
   ruhige Fließtext-Typo statt Versalien. */
tfoot th[scope="row"] {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--grau);
  background: transparent;
  font-weight: 500;
}
/* Endsumme (letzte Summenzeile) betont: dunkler Text, kräftiger, keine Kante. */
tfoot tr:last-child td, tfoot tr:last-child th {
  border-bottom: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}
tfoot tr:last-child th[scope="row"] { color: var(--text); font-weight: 700; }

/* --- Sitzungs-Modus: Ja/Nein/Enthaltung nebeneinander -------------------
   Die drei Stimmzahl-Felder der Abstimmungserfassung stehen als kompakte
   Dreiergruppe statt gestapelt – die Felder selbst behalten ihr Standard-
   Aussehen (.feld). Bricht auf schmalen Screens automatisch um. */
.abstimmung-felder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--raum-4);
}
.abstimmung-felder .feld { margin-bottom: var(--raum-3); }
@media (max-width: 480px) { .abstimmung-felder { grid-template-columns: 1fr; } }

/* ============================================================
   Fraktura – Beleg-Papieroptik (Rechnungs-App).
   Kleine, in sich geschlossene Papier-Optik fuer die Beleg-Vorschau der
   Rechnungs-App. Bewusst NICHT die umlauf-editor.css-Variante (die traegt der
   Umlauf-Editor); hier nur Tokens, keine Farb-Hardcodes. Reine Anzeige – der
   Beleg selbst entsteht weiter aus dem (kuenftigen) eingefrorenen Word-Template.
   ============================================================ */
.beleg-blatt {
  max-width: 820px;
  /* Premium-Audit: am Desktop zentriert statt linksbuendig mit 600px Leerraum. */
  margin: 0 auto var(--raum-8);
  padding: var(--raum-8);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten-karte);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.beleg-anschrift { margin: 0 0 var(--raum-6); line-height: 1.5; }
/* Beleg-Positionstabelle (UI-Sweep 20.07.2026): acht Spalten muessen in das
   820px-Blatt passen – kompaktere Zellen und umbruchfaehige Spaltentitel,
   sonst haengt der „Entfernen“-Knopf abgeschnitten hinter dem Tabellen-Scroll. */
.beleg-blatt th,
.beleg-blatt td {
  padding: 10px;
}
.beleg-blatt thead th { white-space: normal; }
/* Summenblock unter der Positionstabelle (Premium-Audit R2): steht ausserhalb
   des Scrollers, damit der Brutto-Betrag am Handy immer sichtbar bleibt. */
.beleg-summen {
  margin: var(--raum-3) 0 0 auto;
  max-width: 460px;
}
.beleg-summen > div {
  display: flex;
  justify-content: space-between;
  gap: var(--raum-4);
  padding: var(--raum-1) 0;
}
.beleg-summen dt { margin: 0; color: var(--grau); }
.beleg-summen dd { margin: 0; font-variant-numeric: tabular-nums; }
.beleg-summen .beleg-summen-brutto {
  border-top: 1px solid var(--linie-kraeftig);
  margin-top: var(--raum-1);
  padding-top: var(--raum-2);
  font-weight: 600;
}
.beleg-summen .beleg-summen-brutto dt { color: var(--text); }
.beleg-betreff { margin: 0 0 var(--raum-4); text-align: center; }
/* Kopfdaten (§ 14 UStG) als schmale Definitionsliste, Label links. */
.beleg-kopfdaten { margin: 0 0 var(--raum-6); }
.beleg-kopfdaten > div {
  display: flex;
  gap: var(--raum-4);
  padding: var(--raum-1) 0;
}
.beleg-kopfdaten dt { flex: 0 0 12em; margin: 0; color: var(--grau); }
.beleg-kopfdaten dd { margin: 0; font-weight: 600; }
.beleg-einleitung { margin: 0 0 var(--raum-4); }
.beleg-zahlung { margin: var(--raum-6) 0 0; }
.beleg-schluss { margin: var(--raum-4) 0 0; }
/* Klassische Rechnungs-Fußzeile: drei Spalten, klein/grau, dünne Oberlinie. */
.beleg-fusszeile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--raum-4);
  margin: var(--raum-8) 0 0;
  padding: var(--raum-3) 0 0;
  border-top: 1px solid var(--linie);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--grau);
}
.beleg-fusszeile > div { display: flex; flex-direction: column; }
.beleg-fusszeile strong { color: var(--text); font-size: 0.72rem; margin-bottom: 2px; }
@media (max-width: 640px) {
  .beleg-fusszeile { grid-template-columns: 1fr; gap: var(--raum-3); }
}
/* Artikel-Picker im Positions-Formular ueber die volle Breite. */
.baustein-wahl .feld-breit { flex-basis: 100%; }
/* Runde-5-Backlog: Utility-Klassen statt Inline-style= (Token-System durchhalten).
   Die dynamischen Custom-Property-Styles (--signet/--quote) bleiben bewusst inline –
   sie transportieren berechnete Werte, keine statische Gestaltung. */
.text-vorformatiert { white-space: pre-wrap; }
.hinweis-absatz { color: var(--grau); font-size: 14px; margin: 0; }

/* Statische Abstands-/Anzeige-Utilities (C-10): ersetzen wiederkehrende
   Inline-style=. Bewusst schmal gehalten und an das Raum-Token-System gebunden;
   DYNAMISCHE Styles (berechnete Breiten/Custom-Properties) bleiben inline. */
.u-mt-0 { margin-top: 0; }
.u-text-zentriert { text-align: center; }
.u-mt-2 { margin-top: var(--raum-2); }
.u-mt-3 { margin-top: var(--raum-3); }
.u-mt-4 { margin-top: var(--raum-4); }
.u-m-0 { margin: 0; }
.u-mb-2 { margin: 0 0 var(--raum-2); }
.u-mb-3 { margin: 0 0 var(--raum-3); }
.u-mb-5 { margin-bottom: var(--raum-5); }
.u-inline { display: inline; }
.u-inline-block { display: inline-block; }
.u-pointer { cursor: pointer; }
.u-justify-between { justify-content: space-between; }

/* ============================================================
   Innovationsrunde 7 · Optik O3/O4 (rein additiv, bestehendes Token-Vokabular).
   ============================================================ */
/* O3 – Wochenübersicht: eine ruhige Woche zeigt je Sektion nur einen
   einzeiligen Hinweis statt einer leeren Tabelle. Kompakter Abstand,
   print-neutral (kein feste Höhe, kein Rahmen). */
.sektion-leer { margin: 0 0 var(--raum-6); padding: var(--raum-2) 0 0; }
/* O4 – Kalender „Nächste Termine": Datums-Zwischenüberschrift je Tag; die
   Einträge darunter wiederholen das Datum nicht mehr. Kein Uppercase-Kopf,
   sondern eine ruhige, linksbündige Tageszeile. */
.datum-kopf th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--flaeche-leise);
}
.datum-kopf:hover { background: var(--flaeche-leise); }

/* ============================================================
   Aufträge & Einsätze (Welle 3c) – Einsatzplan-Wochenraster, Foto-Kacheln,
   mobile Karten-Ansicht der Auftragsliste. Rein additiv, bestehendes
   Token-Vokabular; keine neuen Komponenten-Farben.
   ============================================================ */
/* Einsatzplan: Kopfzeile (Wochen-Navigation + Mitarbeiter-Filter). */
.plan-navigation { display: flex; flex-wrap: wrap; gap: var(--raum-4); align-items: flex-end; justify-content: space-between; margin-bottom: var(--raum-4); }
.plan-navigation .erzeugen { margin-top: 0; }
/* Wochenraster: 7 Spalten (Mo–So); mobil eine Spalte = ein Tag, leere Tage
   verschwinden (Konzept § 2.9 – der Tagesblick auf dem Handy). */
.plan-zeile { margin-bottom: var(--raum-4); }
.plan-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--raum-2); }
.plan-tag { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: var(--raum-2); min-height: 72px; background: var(--flaeche-hauch); }
.plan-tag-heute { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.plan-tag-kopf { margin: 0 0 var(--raum-1); font-size: 12px; font-weight: 600; color: var(--grau); }
.plan-einsatz { display: block; margin-bottom: var(--raum-1); padding: var(--raum-1) var(--raum-2); border: 1px solid var(--linie); border-radius: var(--radius-klein); font-size: 13px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.plan-einsatz-geplant { background: var(--hinweis-fl); border-color: var(--hinweis-li); }
.plan-einsatz-erledigt { background: var(--erfolg-fl); border-color: var(--erfolg-li); }
.plan-einsatz-ausgefallen { background: var(--flaeche-leise); color: var(--grau-leise); text-decoration: line-through; }
@media (max-width: 900px) {
  .plan-woche { grid-template-columns: 1fr; }
  .plan-tag { min-height: 0; }
  .plan-tag-leer { display: none; }
  /* Große Touch-Ziele auf dem Handy (Konzept § 2.9). */
  .plan-einsatz { padding: var(--raum-2) var(--raum-3); font-size: 14px; }
}
/* ============================================================
   Dispo-Plantafel (Disposition) – server-autoritatives Wochenraster mit
   Auslastung, Konfliktmarken und Drag&Drop-Progressive-Enhancement. Rein
   additiv, bestehendes Token-Vokabular (keine neuen Komponentenfarben).
   ============================================================ */
/* Status-Region der Umplanungen (OOB-Ziel). Leer = eingeklappt. */
.plantafel-status { margin: var(--raum-3) 0; }
.plantafel-status:empty { display: none; }
.plantafel-status-erfolg { color: var(--erfolg-tx); font-weight: 600; }
.plantafel-status-fehler { color: var(--fehler-tx); font-weight: 600; }
/* Waagerecht scrollbar in EIGENEM Container – der Seitenbody scrollt nie seitwärts. */
.plantafel-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plantafel {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(7, minmax(132px, 1fr));
  gap: var(--raum-1);
  min-width: 920px;
  margin-top: var(--raum-3);
}
.plantafel-kopf { padding: var(--raum-2); font-size: 12px; font-weight: 600; color: var(--grau); text-transform: capitalize; }
.plantafel-eckzelle { color: var(--text); }
.plantafel-kopf-heute { color: var(--akzent); }
.plantafel-name { display: flex; flex-direction: column; gap: var(--raum-1); padding: var(--raum-2); border-top: 1px solid var(--linie); }
.plantafel-monteur { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.plantafel-zelle { min-height: 68px; padding: var(--raum-1); border: 1px dashed transparent; border-top: 1px solid var(--linie); border-radius: var(--radius-klein); }
.plantafel-zelle-leer { color: var(--grau-zart); }
/* Drop-Ziel-Hervorhebung (Drag-Schicht setzt/entfernt die Klasse). */
.plantafel-zelle-ziel { border-color: var(--akzent); background: var(--akzent-hauch); }
/* Zelle mit Doppelbelegung: dezenter roter Rahmen (zusätzlich zur Block-Marke). */
.plantafel-zelle-konflikt { border-color: var(--fehler-li); background: var(--fehler-fl); }
/* Einsatz-Block: draggable; erbt die Status-Farben aus dem Einsatzplan. */
.plantafel .plan-einsatz { cursor: grab; display: flex; flex-direction: column; gap: 2px; }
.plantafel .plan-einsatz:active { cursor: grabbing; }
.plantafel-zieht { opacity: 0.5; }
.plan-einsatz-konflikt { border-color: var(--fehler-tx); box-shadow: inset 0 0 0 1px var(--fehler-tx); }
.plan-einsatz-zeit { font-weight: 600; }
.plan-einsatz-ort { color: var(--grau); overflow-wrap: anywhere; }
.plan-konflikt-hinweis { color: var(--fehler-tx); font-size: 12px; font-weight: 600; }
/* Schnell-Umplanen: kompaktes Inline-Formular im nativen <details>. */
.plan-umplanen { margin-top: var(--raum-1); }
.plan-umplanen > summary { display: inline-flex; cursor: pointer; font-size: 12px; }
.plan-umplanen-form { display: flex; flex-direction: column; gap: var(--raum-1); margin-top: var(--raum-1); }
.plan-umplanen-zeiten { display: flex; gap: var(--raum-2); }
.feld-kompakt { display: flex; flex-direction: column; font-size: 12px; color: var(--grau); gap: 2px; }
.feld-kompakt select, .feld-kompakt input { font-size: 13px; }
/* Auslastungs-Badge (Ist vs. Soll der Woche), farbcodiert. */
.auslastung { display: flex; flex-direction: column; gap: 2px; }
.auslastung-balken { position: relative; height: 6px; border-radius: 999px; background: var(--flaeche-leise); overflow: hidden; }
.auslastung-fuellung { position: absolute; inset: 0; width: var(--auslastung, 0%); background: var(--akzent); border-radius: 999px; }
.auslastung-text { font-size: 12px; color: var(--grau); overflow-wrap: anywhere; }
.auslastung-unterlastet .auslastung-fuellung { background: var(--warnung-tx); }
.auslastung-unterlastet .auslastung-text { color: var(--warnung-tx); }
.auslastung-ok .auslastung-fuellung { background: var(--erfolg-tx); }
.auslastung-ok .auslastung-text { color: var(--erfolg-tx); }
.auslastung-ueberlastet .auslastung-fuellung { background: var(--fehler-tx); }
.auslastung-ueberlastet .auslastung-text { color: var(--fehler-tx); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  /* Keine erzwungene Animation – Drag-Feedback rein statisch. */
  .plantafel-zieht { opacity: 1; }
}

/* Fotos-Tab: Kachelraster – das Thumbnail ist dieselbe Datei, per CSS
   skaliert (bewusst keine zweite Ableitung auf Platte). */
.foto-motivregel { margin-bottom: var(--raum-4); }
.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--raum-3); margin-top: var(--raum-4); }
.foto-kachel { margin: 0; border: 1px solid var(--linie); border-radius: var(--radius-klein); overflow: hidden; background: var(--flaeche); }
.foto-kachel img { display: block; width: 100%; height: 140px; object-fit: cover; }
.foto-kachel figcaption { display: flex; flex-direction: column; gap: var(--raum-1); align-items: flex-start; padding: var(--raum-2); font-size: 13px; }
.foto-zeit { color: var(--grau); }
.foto-bemerkung { overflow-wrap: anywhere; }
/* Mobile Karten-Ansicht (Konzept § 2.9): unter 640 px wird die Tabelle zu
   gestapelten Karten – Kopfzeile weg, jede Zelle eine beschriftete Zeile
   (data-label). Hebt gezielt das Sticky-Muster aus Abschnitt 17 auf. */
@media (max-width: 640px) {
  .tabelle-karten table, .tabelle-karten tbody, .tabelle-karten tr,
  .tabelle-karten th, .tabelle-karten td { display: block; width: 100%; }
  .tabelle-karten thead { display: none; }
  .tabelle-karten tr {
    margin-bottom: var(--raum-3);
    padding: var(--raum-3) var(--raum-4);
    border: 1px solid var(--linie);
    border-radius: var(--radius-klein);
    background: var(--flaeche);
  }
  .tabelle-karten th, .tabelle-karten td { padding: 2px 0; border: 0; }
  .tabelle-karten th:first-child, .tabelle-karten td:first-child { position: static; }
  .tabelle-karten th[scope="row"] { font-size: 15px; }
  .tabelle-karten td.zahl { text-align: left; }
  .tabelle-karten td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--grau);
    font-size: 12px;
  }
  .tabelle-karten td.leer { padding: var(--raum-2) 0; }
}

/* ============================================================================
   T9 · Mobil-Feinschliff (PWA-Light). Sparsam, rein ADDITIV – bestehende
   Klassen/Breakpoints bleiben unangetastet. Ziel: angenehme Touch-Bedienung
   und kein horizontales Scrollen auf schmalen Viewports.
   ============================================================================ */

/* Sichere Bereiche fuer Geraete mit Notch/abgerundeten Ecken (viewport-fit=cover
   im base.html-Viewport). env() ist auf alten Browsern schlicht 0 – kein Bruch. */
@supports (padding: max(0px)) {
  .kopf-innen,
  .navzeile-innen,
  #inhalt {
    padding-left: max(var(--raum-4, 16px), env(safe-area-inset-left));
    padding-right: max(var(--raum-4, 16px), env(safe-area-inset-right));
  }
}

@media (max-width: 640px) {
  /* Kein horizontales Wischen der ganzen Seite: breite Inhalte (Tabellen,
     Code, Vorschau) scrollen weiterhin in ihren eigenen overflow-x-Containern. */
  html, body { overflow-x: hidden; }
  /* Medien nie ueber die Breite hinaus – haeufigste Ursache fuer Rand-Ueberlauf. */
  img, svg, canvas, video { max-width: 100%; height: auto; }

  /* Groessere, klar trennbare Tap-Ziele (Richtwert 44 px, Empfehlung WCAG 2.5.5).
     Additive Mindesthoehe – bestehende Paddings/Farben bleiben. */
  .knopf,
  .knopf-geist,
  .knopf-schlicht,
  .knopf-gefahr,
  .konto-eintrag,
  .thema-knopf {
    min-height: 44px;
  }
  /* Formularfelder ebenfalls fingerfreundlich und ohne iOS-Auto-Zoom
     (Schriftgroesse >= 16px verhindert das Einzoomen beim Fokus). */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  button {
    min-height: 44px;
    font-size: max(16px, 1rem);
  }
  /* Navigations-Reiter mit mehr vertikaler Trefferflaeche. */
  .navzeile-innen a { padding-top: 10px; padding-bottom: 10px; }
}

/* Doppel-Antippen loest kein versehentliches Zoomen auf interaktiven Elementen
   aus; horizontales Scrollen innerhalb der Tab-Leiste bleibt per Wisch moeglich. */
@media (pointer: coarse) {
  .knopf, .knopf-geist, .knopf-schlicht, .knopf-gefahr,
  .navzeile-innen a, .konto-eintrag { touch-action: manipulation; }
}

/* Installierte PWA (Startbildschirm, eigenes Fenster): der noindex-Hinweis
   „Zum Inhalt springen" bleibt, sonst keine Sonderbehandlung – bewusst schlank. */
@media (display-mode: standalone) {
  .skip { top: env(safe-area-inset-top, 0); }
}

/* Offline-Ausgangskorb der Feld-Erfassung „Weg B" (Meine Einsätze).
   Standard: dezenter Hinweis („N Erfassungen warten"). Getrennt: Warnfarbe
   („Offline …"). Wird nur per JS sichtbar geschaltet – ohne JS bleibt sie hidden. */
.offline-status {
  margin: 0 0 var(--raum-4);
  padding: var(--raum-3) var(--raum-4);
  border: 1px solid var(--hinweis-li);
  border-radius: var(--radius-klein);
  background: var(--hinweis-fl);
  color: var(--hinweis-tx);
  font-size: 14px;
  line-height: 1.5;
}
.offline-status-getrennt {
  border-color: var(--warnung-li);
  background: var(--warnung-fl);
  color: var(--warnung-tx);
}

/* --- Artikel-Suche im Beleg-Editor (G3+) -------------------------------------
   Serverseitige Suche/Vorschläge statt „alle Artikel im DOM"-Auswahlmenü. Jeder
   Treffer ist ein Ein-Klick-Knopf, der den Artikel als Position übernimmt. */
.artikel-suche {
  margin: 0 0 var(--raum-4);
  padding: var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  box-shadow: var(--schatten-karte);
}
.artikel-suche-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--raum-2);
}
.artikel-suche-feld {
  width: 100%;
  box-sizing: border-box;
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-knopf);
  background: var(--flaeche);
  color: var(--text);
  font-size: 15px;
}
.artikel-suche-feld:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
  border-color: var(--akzent);
}
#artikel-treffer { margin-top: var(--raum-3); }
/* Warengruppen-Chips: zweiter Weg in den Katalog (nach Warengruppe stöbern).
   Aktiver Chip trägt die Akzentfarbe. */
.warengruppen-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--raum-3); }
.warengruppen-chips .chip {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--linie-kraeftig);
  background: var(--flaeche); color: var(--text);
  transition: border-color var(--uebergang), background var(--uebergang), color var(--uebergang);
}
.warengruppen-chips .chip:hover { border-color: var(--akzent); }
.warengruppen-chips .chip:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.warengruppen-chips .chip-aktiv {
  background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600;
}
/* „Position frei anlegen" – klar als zweiter, gleichwertiger Weg neben dem
   Katalog gekennzeichnet (Markus 24.07.). */
.positionen-frei-kopf { margin: var(--raum-5) 0 var(--raum-2); }
.positionen-frei-titel { margin: 0; font-size: 15px; font-weight: 650; }
.positionen-frei-hinweis { margin-top: 2px; }
.artikel-treffer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--raum-2);
  /* Bei großem Katalog nicht endlos wachsen – die Trefferzahl ist ohnehin
     serverseitig begrenzt; hier zusätzlich innerer Scroll für den Notfall. */
  max-height: 21rem;
  overflow-y: auto;
}
.artikel-treffer-form {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--raum-2);
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  background: var(--flaeche-hauch);
}
.artikel-treffer-form .artikel-treffer-text { flex: 1 1 auto; }
.artikel-treffer-menge {
  flex: 0 0 5rem;
  width: 5rem;
  padding: var(--raum-1) var(--raum-2);
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-knopf);
  background: var(--flaeche);
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.artikel-treffer-menge:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
  border-color: var(--akzent);
}
.artikel-treffer-knopf {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--raum-1);
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--akzent);
  border-radius: var(--radius-knopf);
  background: var(--akzent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: filter .12s;
}
.artikel-treffer-knopf:hover,
.artikel-treffer-knopf:focus-visible { filter: brightness(1.08); outline: none; }
.artikel-treffer-plus { font-weight: 700; line-height: 1; }
.artikel-treffer-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.artikel-treffer-titel { font-weight: 600; }
.artikel-treffer-meta {
  font-size: 13px;
  color: var(--grau-leise);
  font-variant-numeric: tabular-nums;
}

/* --- E-Rechnungs-Voraussetzungen (Checkliste schon im Entwurf) --------------- */
.voraussetzungen-liste {
  list-style: none;
  margin: var(--raum-3) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--raum-2);
}
.voraussetzung {
  display: flex;
  align-items: flex-start;
  gap: var(--raum-2);
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche-hauch);
}
.voraussetzung.erfuellt {
  border-color: var(--erfolg-li);
  background: var(--erfolg-fl);
}
.voraussetzung.offen-pflicht {
  border-color: var(--fehler-li);
  background: var(--fehler-fl);
}
.voraussetzung.offen-empfehlung {
  border-color: var(--warnung-li);
  background: var(--warnung-fl);
}
.voraussetzung-markierung {
  flex: 0 0 auto;
  font-weight: 700;
  line-height: 1.4;
}
.voraussetzung.erfuellt .voraussetzung-markierung { color: var(--erfolg-tx); }
.voraussetzung.offen-pflicht .voraussetzung-markierung { color: var(--fehler-tx); }
.voraussetzung.offen-empfehlung .voraussetzung-markierung { color: var(--warnung-tx); }
.voraussetzung-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voraussetzung-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--warnung-tx);
}
.voraussetzung-hinweis { font-size: 13px; color: var(--grau); }

/* --- Empfänger-Universalpicker (P1): föderierte Trefferliste mit Herkunft ---- */
.empfaenger-treffer {
  list-style: none;
  margin: var(--raum-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
}
.empfaenger-treffer-zeile {
  padding: var(--raum-2) var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--raum-3);
}
.empfaenger-treffer-zeile:hover { background: var(--flaeche-leise); }
.empfaenger-treffer-note { font-size: 12px; color: var(--grau); flex-shrink: 0; max-width: 45%; }
.empfaenger-treffer-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.empfaenger-treffer-name { font-weight: 600; }
.empfaenger-treffer-anschrift { font-size: 13px; color: var(--grau); }
.empfaenger-herkunft { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2); }
.empfaenger-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--akzent-hauch);
  background: var(--akzent-hauch);
  color: var(--akzent-hell);
}
.empfaenger-badge-ro {
  border-color: var(--warnung-li);
  background: var(--warnung-fl);
  color: var(--warnung-tx);
}
.empfaenger-detail { font-size: 12px; color: var(--grau-leise); }

/* Empfänger-Universalpicker P1: Suchfeld + Trefferbox im Anlegen-Formular. */
.empfaenger-picker { margin-bottom: var(--raum-2); }
/* Suchfeld auf dieselbe Höhe/Optik wie ein normales Eingabefeld (war als
   type=search vorher flacher als die übrigen Felder). */
.empfaenger-suche-feld {
  width: 100%;
  padding: 10px var(--raum-3);
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  border: 1px solid var(--linie-kraeftig);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.empfaenger-suche-feld:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: var(--fokus-ring);
}
.empfaenger-treffer-box:not(:empty) { margin-top: var(--raum-2); }
.knopf-klein { padding: 3px 10px; font-size: 13px; flex-shrink: 0; }
/* Monospace-Eingabe für JSON/Prompt (Alt-Beschluss-Import): volle Breite, Umbruch. */
.u-mono {
  width: 100%;
  font-family: ui-monospace, "Cascadia Code", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  white-space: pre;
  overflow-wrap: normal;
}
/* P2 (Fraktura): eigenständiger Suchblock über dem Empfänger-Auswahlmenü. */
.empfaenger-picker-label { display: block; font-weight: 600; margin-bottom: 4px; }
.empfaenger-uebernommen {
  margin-top: var(--raum-2);
  color: var(--erfolg-tx);
  font-weight: 600;
}

/* --- Mengenstaffel-Editor je Artikel (Staffelpreise) ------------------------- */
.staffel-vorschau {
  margin: 0 0 var(--raum-4);
  padding: var(--raum-3);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche-hauch);
}
.staffel-vorschau h3 { margin: 0 0 var(--raum-2); font-size: 15px; }
.staffel-bereiche {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--raum-1);
}
.staffel-bereiche li {
  display: flex;
  justify-content: space-between;
  gap: var(--raum-3);
  padding: var(--raum-1) var(--raum-2);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  border: 1px solid var(--linie);
}
.staffel-bereich-menge { color: var(--grau); }
.staffel-bereich-preis { font-weight: 600; font-variant-numeric: tabular-nums; }
.staffel-tabelle td.zahl { font-variant-numeric: tabular-nums; }
.staffel-neu { margin-top: var(--raum-3); }

/* Versammlungsmanagement V2 – Beschluss-Editor (Gegenstände links, Vorschau rechts) */
.beschluss-raster { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
.beschluss-raster aside { position: sticky; top: 1rem; }
.beschluss-raster .feld-check { display: flex; gap: .5rem; align-items: flex-start; margin: .25rem 0; }
.beschluss-raster .vorschau-schluss { margin-top: 1rem; }
@media (max-width: 900px) { .beschluss-raster { grid-template-columns: 1fr; } .beschluss-raster aside { position: static; } }

/* Gate-Seiten (2FA-Einrichtung/-Bestätigung u. a.) – schlanke Hülle OHNE App-Navigation */
.gate-seite { margin: 0; min-height: 100vh; }
.gate-huelle { max-width: 34rem; margin: 0 auto; padding: 3rem 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.gate-marke { display: inline-flex; align-items: center; gap: .5rem; font-size: 20px; font-weight: 700; }
.otp-qr { border: 1px solid var(--rand, #ddd); border-radius: 8px; background: #fff; padding: 8px; }
