/*
 * Web-Formulare STANDBY Leuchtfeuer — Layout und Komponenten.
 * Setzt tokens.css voraus. Farben/Flächen AUSSCHLIESSLICH über die
 * semantischen Projekt-Tokens (Dark Mode in M8 = reiner Token-Tausch).
 * Mobile-first: Basisregeln gelten fürs Handy, ab 768px Tablet/Desktop.
 */

/* --- Schrift: Poppins, lokal gehostet (kein CDN) --------------------------- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Poppins/Poppins-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Poppins/Poppins-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Poppins/Poppins-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Poppins/Poppins-Bold.woff2') format('woff2');
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--flaeche);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ueberschrift);
  line-height: 1.25;
  margin: 0 0 var(--space-2);
}

h1 { font-size: var(--text-2xl); font-weight: 700; }
h2 { font-size: var(--text-xl);  font-weight: 600; }
h3 { font-size: var(--text-lg);  font-weight: 600; }

p { margin: 0 0 var(--space-2); }

a { color: var(--link); }

:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}

/* --- Kopfleiste --------------------------------------------------------------- */
.kopfleiste {
  background: var(--flaeche-kopf);
  border-bottom: 1px solid var(--rahmen);
  box-shadow: var(--shadow-sm);
}

.kopfleiste-innen {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 10px var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 64px;
}

.marke {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.marke img {
  height: 40px;
  width: auto;
  display: block;
}

/* Dienstname neben dem Logo, durch feine Linie abgesetzt.
   Auf sehr schmalen Handys reicht das Logo (Kopfleiste wird sonst eng). */
.marke-dienst {
  display: none;
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--ueberschrift);
  border-left: 1px solid var(--rahmen);
  padding-left: 12px;
  line-height: 1.2;
}

@media (min-width: 430px) {
  .marke-dienst {
    display: block;
  }
}

.kopf-rechts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* --- Seitengerüst: Master-Detail ---------------------------------------------- */
.inhalt {
  flex: 1;
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-2);
}

.master-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  align-items: start;
}

/* Formular-Navigation: auf dem Handy zunächst gestapelt (Slide-in folgt in M3) */
.seitenleiste {
  background: var(--flaeche-karte);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
}

.seitenleiste-titel {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dezent);
  margin: 0 0 var(--space-1);
}

.detail {
  min-width: 0;
}

@media (min-width: 768px) {
  .inhalt {
    padding: var(--space-3);
  }
  .master-detail {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: var(--space-3);
  }
}

/* --- Karten -------------------------------------------------------------------- */
.karte {
  background: var(--flaeche-karte);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.karte + .karte {
  margin-top: var(--space-2);
}

.text-dezent {
  color: var(--text-dezent);
}

/* --- Buttons ---------------------------------------------------------------------
 * Nach Marken-Baustein, für die Verwaltung dezenter dimensioniert (ca. 40px),
 * auf Touch-Flächen (öffentliche Ausfüllstrecke) mindestens 44px hoch. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 22px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.btn-primaer {
  background: var(--primaer);
  color: var(--primaer-text);
  box-shadow: var(--shadow-sm);
}

.btn-primaer:hover,
.btn-primaer:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gelb);
}

.btn-sekundaer {
  background: var(--sekundaer);
  color: var(--sekundaer-text);
  box-shadow: var(--shadow-sm);
}

.btn-sekundaer:hover,
.btn-sekundaer:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-kontur {
  background: transparent;
  color: var(--ueberschrift);
  border: 2px solid var(--rahmen-stark);
}

.btn-kontur:hover,
.btn-kontur:focus-visible {
  border-color: var(--ueberschrift);
}

/* Verwaltung: eine Stufe dezenter */
.btn-klein {
  min-height: 40px;
  padding: 7px 18px;
  font-size: var(--text-sm);
}

/* --- Fußleiste ---------------------------------------------------------------- */
.fussleiste {
  border-top: 1px solid var(--rahmen);
  padding: var(--space-2);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-dezent);
}

/* =============================================================================
 * Formular-Dokument (öffentliche Ausfüllstrecke und Vorschau)
 * Mobile-first; Optik nach Bewerbungsbogen-Referenz, Web-tauglich übersetzt.
 * ========================================================================== */

.inhalt-schmal {
  max-width: 860px;
}

/* --- Meldungen ------------------------------------------------------------- */
.meldung {
  border-radius: var(--radius-md);
  padding: 12px var(--space-2);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.meldung-hinweis {
  background: var(--hinweis-flaeche);
  border: 1px solid var(--hinweis-rahmen);
  color: var(--text);
}

/* --- Formular-Kopf ----------------------------------------------------------- */
.formular-kopf {
  margin: var(--space-2) 0 var(--space-3);
}

.formular-titel {
  font-size: var(--text-2xl);
  margin-bottom: 6px;
}

.formular-untertitel {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--akzent-text);
  background: var(--akzent-flaeche);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  margin: 0 0 var(--space-1);
}

/* --- Abschnitte ---------------------------------------------------------------- */
.abschnitt {
  background: var(--flaeche-karte);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-sm);
}

.abschnitt-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-2);
}

.abschnitt-nummer {
  flex-shrink: 0;
  min-width: 40px;
  padding: 0 10px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(20deg, var(--farbe-navy), var(--farbe-blau) 85%);
  color: var(--farbe-weiss);
  font-size: var(--text-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abschnitt-titel {
  margin: 0;
  font-size: var(--text-lg);
}

.abschnitt-beschreibung {
  color: var(--text-dezent);
  margin-bottom: var(--space-2);
}

.abschnitt-beschreibung p:last-child {
  margin-bottom: 0;
}

/* --- Elemente -------------------------------------------------------------------- */
.element {
  margin-bottom: var(--space-2);
}

.element:last-child {
  margin-bottom: 0;
}

.feld-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ueberschrift);
  margin-bottom: 6px;
}

/* Eingaben: mind. 16px Schrift (verhindert iOS-Zoom), Feldoptik der Vorlage */
.eingabe {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: max(16px, 1rem);
  color: var(--feld-text);
  background: var(--feld-hintergrund);
  border: 1px solid var(--feld-rahmen);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  scroll-margin-top: 96px; /* Label bleibt beim Fokussieren mit im Bild */
}

.eingabe:focus {
  outline: none;
  border-color: var(--farbe-blau);
  box-shadow: 0 0 0 3px var(--fokus-ring);
}

/* Format-Validierung nur als sanfter Hinweis, nicht blockierend */
.eingabe:user-invalid {
  border-color: var(--fehler);
}

textarea.eingabe {
  resize: vertical;
  field-sizing: content;
  min-height: 88px;
  max-height: 40dvh; /* Label bleibt trotz offener Tastatur sichtbar */
  line-height: 1.55;
}

/* Starthöhe nach Punktlinien-Anzahl der Vorlage (field-sizing ignoriert rows) */
textarea.hoehe-md { min-height: 132px; }
textarea.hoehe-lg { min-height: 176px; }

.feld-hinweis {
  font-size: var(--text-sm);
  color: var(--text-dezent);
  margin: 6px 0 0;
}

/* Einzeilige Felder: ab Tablet Label neben dem Feld (Vorlagen-Anmutung) */
@media (min-width: 768px) {
  .element-feld {
    display: grid;
    grid-template-columns: minmax(200px, 38%) 1fr;
    gap: 12px;
    align-items: center;
  }
  .element-feld .feld-label {
    margin-bottom: 0;
  }
}

/* Konstante: Read-only-Wert in Feldoptik */
.konstante-wert {
  background: var(--feld-hintergrund);
  border: 1px dashed var(--feld-rahmen);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--text);
}

/* --- Ankreuz-Optik (Checkboxen/Radios im Markenstil) ----------------------- */
.ankreuz {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ankreuz:hover {
  background: var(--flaeche-dezent);
}

.ankreuz input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ankreuz-box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 2px solid var(--pink-700);
  border-radius: 6px;
  background: var(--flaeche-karte);
  position: relative;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.ankreuz input[type="radio"] + .ankreuz-box {
  border-radius: 50%;
}

.ankreuz input:checked + .ankreuz-box {
  background: var(--pink-700);
}

.ankreuz input:checked + .ankreuz-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid var(--farbe-weiss);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.ankreuz input:focus-visible + .ankreuz-box {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}

.ankreuz-text {
  align-self: center;
}

.ankreuz-solo {
  display: inline-flex;
  padding: 10px;
}

/* --- Auswahl-Gruppen -------------------------------------------------------- */
.element-auswahl {
  border: none;
  padding: 0;
  margin-inline: 0;
  min-inline-size: 0; /* Fieldset-Default (min-content) würde die Karte sprengen */
}

.element-auswahl legend {
  padding: 0;
}

.auswahl-optionen {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auswahl-sonstiges {
  display: flex;
  flex-direction: column;
}

.auswahl-sonstiges .eingabe {
  margin: 0 12px 8px 48px;
  width: auto;
  min-height: 40px;
}

@media (min-width: 768px) {
  .auswahl-optionen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
  }
  .auswahl-sonstiges {
    grid-column: 1 / -1;
  }
  .auswahl-sonstiges .eingabe {
    max-width: 420px;
  }
}

/* --- Tabellen ------------------------------------------------------------------ */
/* Handy: jede Zeile als kleine Karte (Spaltenlabel über den Werten) */
.element-tabelle table,
.element-tabelle tbody,
.element-tabelle tr,
.element-tabelle td {
  display: block;
  width: 100%;
}

.element-tabelle thead {
  display: none;
}

.element-tabelle {
  border-collapse: collapse;
}

.tabelle-zeile {
  background: var(--flaeche-karte);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.tabelle-zeile td {
  padding: 6px 0;
}

.tabelle-zeile td::before {
  content: attr(data-spalte);
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ueberschrift);
  margin-bottom: 4px;
}

.zelle-statisch {
  font-weight: 500;
}

.zeile-hinzufuegen {
  margin-top: 4px;
}

/* Ab Tablet: echte Tabelle */
@media (min-width: 768px) {
  .element-tabelle table {
    display: table;
    border: 1px solid var(--rahmen);
    border-radius: var(--radius-md);
    border-spacing: 0;
    overflow: hidden;
  }
  .element-tabelle thead {
    display: table-header-group;
  }
  .element-tabelle tbody {
    display: table-row-group;
  }
  .element-tabelle tr {
    display: table-row;
  }
  .element-tabelle th,
  .element-tabelle td {
    display: table-cell;
    width: auto;
    vertical-align: middle;
    text-align: left;
    padding: 8px 10px;
  }
  .element-tabelle th {
    background: var(--flaeche-dezent);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ueberschrift);
    border-bottom: 1px solid var(--rahmen);
  }
  .tabelle-zeile {
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }
  .tabelle-zeile + .tabelle-zeile td {
    border-top: 1px solid var(--rahmen);
  }
  .tabelle-zeile td::before {
    display: none;
  }
  .spalte-ankreuz {
    text-align: center !important;
    width: 1%;
    white-space: nowrap;
  }
  .element-tabelle .eingabe {
    min-height: 40px;
    padding: 7px 10px;
  }
}

/* --- Hinweis-Box ------------------------------------------------------------ */
.element-hinweis {
  background: linear-gradient(135deg, rgba(237, 110, 167, 0.07) 0%, rgba(92, 160, 203, 0.07) 100%);
  border-left: 4px solid var(--farbe-pink);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px var(--space-2);
}

.element-hinweis p {
  margin: 0 0 8px;
}

.element-hinweis p:last-child {
  margin-bottom: 0;
}

/* --- Info-Text ---------------------------------------------------------------- */
.element-info p:last-child,
.element-info ul:last-child,
.element-info ol:last-child {
  margin-bottom: 0;
}

/* --- Unterschriften ---------------------------------------------------------- */
.element-unterschriften {
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .element-unterschriften {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.unterschrift-karte {
  background: var(--feld-hintergrund);
  border: 1px solid var(--feld-rahmen);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.unterschrift-karte .feld-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  color: var(--akzent-text);
}

.unterschrift-karte .eingabe {
  background: var(--flaeche-karte);
}

.unterschrift-hinweis {
  margin: 0;
  color: var(--text-dezent);
  font-size: var(--text-sm);
}

/* --- Aktionen am Formular-Ende ------------------------------------------------- */
.formular-aktionen {
  margin: var(--space-3) 0;
}

.formular-aktionen .btn {
  width: 100%;
}

@media (min-width: 768px) {
  .formular-aktionen .btn {
    width: auto;
    min-width: 220px;
  }
}

/* =============================================================================
 * Verwaltung: Navigation, Slide-in-Menü, Einträge, Lese-Ansicht (M3)
 * ========================================================================== */

/* --- Burger und Slide-in (Handy) -------------------------------------------- */
.nav-burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  border-radius: var(--radius-md);
  color: var(--ueberschrift);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-burger:hover {
  background: var(--flaeche-dezent);
}

.nav-overlay {
  display: none;
}

.seitenleiste-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}

.seitenleiste-kopf .seitenleiste-titel {
  margin: 0;
}

.nav-schliessen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-dezent);
  cursor: pointer;
}

@media (max-width: 767px) {
  .seitenleiste {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(320px, 85vw);
    z-index: 50;
    border-radius: 0;
    border-right: 1px solid var(--rahmen);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform var(--transition-base);
  }
  .nav-schalter:checked ~ main .seitenleiste {
    transform: none;
  }
  .nav-schalter:checked ~ main .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(17, 29, 61, 0.45);
  }
}

@media (min-width: 768px) {
  .nav-burger,
  .nav-schliessen {
    display: none;
  }
}

/* --- Formular-Navigation ------------------------------------------------------ */
.formular-navi {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.navi-punkt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
}

.navi-punkt svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--text-dezent);
}

.navi-punkt:hover {
  background: var(--flaeche-dezent);
}

.navi-punkt.aktiv {
  background: var(--nav-aktiv);
  color: var(--ueberschrift);
  font-weight: 600;
}

.navi-punkt.aktiv svg {
  color: var(--fokus);
}

.navi-titel {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

.navi-anzahl {
  flex-shrink: 0;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--abzeichen-flaeche);
  color: var(--abzeichen-text);
  font-size: var(--text-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Detail-Karten ------------------------------------------------------------- */
.detail-titel {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.meta-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--space-2);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--flaeche-dezent);
  border: 1px solid var(--rahmen);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-dezent);
}

.aktionen-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meldung-fehler {
  background: var(--fehler-flaeche);
  border: 1px solid var(--fehler-rahmen);
  color: var(--fehler);
}

/* --- Eintragsliste ------------------------------------------------------------- */
.eintrag-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eintrag-liste li + li {
  border-top: 1px solid var(--rahmen);
}

.eintrag-zeile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 6px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.eintrag-zeile:hover {
  background: var(--flaeche-dezent);
}

.eintrag-zeile > svg {
  margin-left: auto;
  color: var(--text-dezent);
  flex-shrink: 0;
}

.eintrag-datum {
  font-weight: 600;
  color: var(--ueberschrift);
  font-size: var(--text-sm);
}

.eintrag-email {
  font-size: var(--text-sm);
  color: var(--text-dezent);
}

/* --- Eintrags-Ansicht ----------------------------------------------------------- */
.eintrag-kopf {
  margin: var(--space-1) 0 var(--space-2);
}

.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.zurueck:hover {
  text-decoration: underline;
}

.umschalter {
  display: inline-flex;
  border: 1px solid var(--rahmen-stark);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
  background: var(--flaeche-karte);
  margin-bottom: var(--space-1);
}

.umschalter-punkt {
  padding: 7px 16px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dezent);
  text-decoration: none;
}

.umschalter-punkt.aktiv {
  background: var(--sekundaer);
  color: var(--sekundaer-text);
}

/* --- Werte in der Lese-Ansicht ---------------------------------------------- */
.wert {
  background: var(--feld-hintergrund);
  border: 1px solid var(--feld-rahmen);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
}

.wert-leer {
  min-height: 44px;
}

.wert-mehrzeilig {
  white-space: normal;
}

.wert-mehrzeilig.hoehe-sm { min-height: 88px; }
.wert-mehrzeilig.hoehe-md { min-height: 132px; }
.wert-mehrzeilig.hoehe-lg { min-height: 176px; }

.wert-sonstiges {
  margin: 0 12px 8px 48px;
  min-height: 40px;
}

.tabelle-ansicht .wert {
  min-height: 40px;
  padding: 7px 10px;
}

/* Statische Ankreuz-Darstellung */
.ankreuz-ansicht {
  cursor: default;
}

.ankreuz-box.ist-angekreuzt {
  background: var(--pink-700);
}

.ankreuz-box.ist-angekreuzt::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid var(--farbe-weiss);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Nur für Screenreader */
.nur-vorleser {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Bestätigungsseite --------------------------------------------------------- */
.bestaetigung {
  margin-top: var(--space-3);
}

/* =============================================================================
 * Mail-Versand und Einstellungen (M5)
 * ========================================================================== */
.zahnrad {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-dezent);
}

.zahnrad:hover {
  background: var(--flaeche-dezent);
  color: var(--ueberschrift);
}

.meldung-erfolg {
  background: var(--erfolg-flaeche);
  border: 1px solid var(--erfolg-rahmen);
  color: var(--erfolg);
}

.versand-zeile {
  margin-top: 10px;
}

.versand-zeile form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.versand-zeile .eingabe {
  width: auto;
  flex: 1 1 220px;
  min-height: 40px;
  padding: 7px 12px;
}

.versand-eigene-block {
  border-top: 1px solid var(--rahmen);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}

.versand-eigene-block .ankreuz {
  margin-bottom: var(--space-1);
}

/* =============================================================================
 * Bereitstellung und Token-Strecke (M6)
 * ========================================================================== */
.kopf-link {
  display: none;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ueberschrift);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.kopf-link:hover {
  background: var(--flaeche-dezent);
}

@media (min-width: 768px) {
  .kopf-link {
    display: inline-flex;
  }
}

.seitenleiste-fuss {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rahmen);
}

.seitenleiste-fuss .btn {
  width: 100%;
}

/* --- Sortier-Liste ------------------------------------------------------------ */
.sortier-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sortier-zeile {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rahmen);
  border-radius: var(--radius-md);
  background: var(--flaeche-karte);
  padding: 2px 6px;
  margin-bottom: 8px;
  cursor: grab;
}

.sortier-zeile.wird-gezogen {
  opacity: 0.5;
  border-style: dashed;
}

.sortier-wahl {
  flex: 1;
  min-width: 0;
}

/* Lange Formulartitel dürfen nicht unter die Pfeile laufen */
.sortier-wahl .ankreuz-text {
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Pfeile: auf dem Handy vertikal (mehr Platz für die Titel), ab Tablet nebeneinander */
.sortier-pfeile {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .sortier-pfeile {
    flex-direction: row;
    gap: 2px;
  }
}

.pfeil {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  color: var(--text-dezent);
  cursor: pointer;
}

.pfeil:hover:not(:disabled) {
  background: var(--flaeche-dezent);
  color: var(--ueberschrift);
}

.pfeil:disabled {
  opacity: 0.3;
  cursor: default;
}

/* --- Ergebnis: Einmal-Link ------------------------------------------------------ */
.ergebnis-liste {
  margin: 0 0 var(--space-2);
  padding-left: 24px;
}

.link-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-2);
}

.link-zeile .eingabe {
  flex: 1 1 260px;
  font-size: var(--text-sm);
  color: var(--text-dezent);
}

/* --- Fortschritt in der Token-Strecke ----------------------------------------- */
.fortschritt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-2);
}

.fortschritt-text {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ueberschrift);
  white-space: nowrap;
}

.fortschritt-balken {
  display: flex;
  gap: 6px;
  flex: 1;
}

.fortschritt-schritt {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--rahmen);
}

.fortschritt-schritt.fertig {
  background: var(--farbe-blau);
}

.fortschritt-schritt.aktiv {
  background: var(--primaer);
}

/* --- Kiosk: dezenter Rückkehr-Link (M7) -------------------------------------- */
.mitarbeiter-bereich {
  margin-top: var(--space-8);
  text-align: center;
}

.mitarbeiter-link {
  font-size: var(--text-xs);
  color: var(--text-dezent);
  text-decoration: none;
}

.mitarbeiter-link:hover {
  text-decoration: underline;
}


/* --- Theme-Toggle (M8) --------------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  color: var(--text-dezent);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--flaeche-dezent);
  color: var(--ueberschrift);
}

.theme-toggle .icon-sonne { display: none; }
.theme-toggle .icon-mond  { display: block; }

[data-theme="dark"] .theme-toggle .icon-sonne { display: block; }
[data-theme="dark"] .theme-toggle .icon-mond  { display: none; }


/* Logo im Dark Mode weiß-monochrom (Navy-Buchstaben säufen sonst ab) */
[data-theme="dark"] .marke img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
