/*
 * Disponto Redaktion.
 *
 * Farben und Schriftbild folgen dem CI-Paket (03_Farbe/tokens.css): Nacht als
 * Grund, Bernstein als Signalfarbe, Petrol für ruhige Flächen. Bewusst schlicht
 * — die Oberfläche soll Inhalte zeigen, nicht sich selbst.
 */

:root {
  --nacht: #0d1418;
  --nacht-tief: #080e11;
  --flaeche: #121a1f;
  --flaeche-hoch: #172228;
  --linie: #23323a;
  --papier: #f5f3ee;
  --gedaempft: #96a2a4;
  --leise: #74807f;
  --petrol: #0f5c63;
  --petrol-hell: #17888f;
  --bernstein: #e8a33d;
  --gruen: #4fbf8f;
  --rot: #c4552f;
  --radius: 12px;
  --schrift: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-fest: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--nacht-tief);
  color: var(--papier);
  font: 15px/1.55 var(--schrift);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bernstein); }
code { font-family: var(--schrift-fest); font-size: 0.9em; color: var(--gedaempft); }

/* ------------------------------------------------------------------ Kopf */
.kopf {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  height: 60px;
  background: var(--nacht);
  border-bottom: 1px solid var(--linie);
  position: sticky;
  top: 0;
  z-index: 10;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: var(--papier);
  text-decoration: none;
  white-space: nowrap;
}

.bildmarke { width: 22px; height: 22px; color: var(--bernstein); }

.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }

.nav-punkt {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--gedaempft);
  text-decoration: none;
  font-size: 14px;
}

.nav-punkt:hover { background: var(--flaeche); color: var(--papier); }
.nav-punkt.ist-aktiv { background: var(--petrol); color: var(--papier); }

.abmelden { color: var(--leise); text-decoration: none; font-size: 14px; }
.abmelden:hover { color: var(--papier); }

/* --------------------------------------------------------------- Gerüst */
.inhalt { max-width: 860px; margin: 0 auto; padding: 32px 24px 96px; }

h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0 0 8px; }

.einleitung { color: var(--gedaempft); margin: 0; max-width: 62ch; }

.seitenkopf {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.seitenkopf-knoepfe { display: flex; gap: 8px; }

.zurueck {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--gedaempft);
  text-decoration: none;
}

.zurueck:hover { color: var(--papier); }

/* -------------------------------------------------------------- Kacheln */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.kachel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.kachel:hover { border-color: var(--petrol-hell); }
.kachel-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kachel-text { color: var(--gedaempft); font-size: 13.5px; }
.kachel-fuss { color: var(--leise); font-size: 12px; margin-top: 4px; }

.zaehler {
  background: var(--petrol);
  color: var(--papier);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- Tabelle */
.tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
}

.tabelle th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leise);
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1px solid var(--linie);
}

.tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.titelzelle a { color: var(--papier); text-decoration: none; font-weight: 500; }
.titelzelle a:hover { color: var(--bernstein); }
.werkzeugzelle { text-align: right; white-space: nowrap; }
.mini { display: inline; }

/* --------------------------------------------------------------- Karten */
.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 22px;
}

.karte--schmal { max-width: 440px; margin: 48px auto; }
.karte--hinweis { margin-top: 28px; background: var(--nacht); }
.kopf--schmal { justify-content: center; }

.schritte { margin: 10px 0; padding-left: 20px; color: var(--gedaempft); }
.schritte li { margin-bottom: 4px; }

.token {
  background: var(--nacht-tief);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--schrift-fest);
  font-size: 12.5px;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--bernstein);
}

/* -------------------------------------------------------------- Felder */
.feld { margin-bottom: 20px; }
.feld:last-child { margin-bottom: 0; }

.feld-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.pflicht { color: var(--bernstein); margin-left: 3px; }
.feld-hilfe { margin: 0 0 7px; font-size: 12.5px; color: var(--leise); max-width: 68ch; }
.feld-fehler { margin: 6px 0 0; font-size: 12.5px; color: var(--rot); }
.hat-fehler input, .hat-fehler textarea, .hat-fehler select { border-color: var(--rot); }

input[type="text"], input[type="password"], input[type="date"], textarea, select {
  width: 100%;
  background: var(--nacht-tief);
  border: 1px solid var(--linie);
  border-radius: 8px;
  color: var(--papier);
  font: inherit;
  padding: 9px 11px;
}

textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--petrol-hell); outline-offset: 1px; border-color: transparent; }
input:disabled, button:disabled { opacity: 0.4; cursor: not-allowed; }
.schmal { width: auto; min-width: 130px; }

.schalter { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.schalter input { width: auto; }

.kaestchen { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.kaestchen label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.kaestchen input { width: auto; }

.gruppe {
  border-left: 2px solid var(--linie);
  padding-left: 16px;
  display: grid;
  gap: 16px;
}

.leerhinweis { color: var(--leise); font-size: 13.5px; }

/* ------------------------------------------------- Wiederholbare Zeilen */
.wiederholung-zeilen { display: grid; gap: 10px; margin-bottom: 10px; }

.zeile, .block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--nacht);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 12px;
}

.zeile-felder { flex: 1; display: grid; gap: 12px; }
.zeile-werkzeuge { display: flex; flex-direction: column; gap: 4px; }

.block { align-items: center; }
.block-inhalt { flex: 1; display: grid; gap: 8px; }
.block-kopfzeile { display: flex; gap: 8px; }
.block-typ {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leise);
  width: 108px;
  line-height: 1.3;
  flex: none;
  align-self: flex-start;
  padding-top: 10px;
}

.block-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }

/* -------------------------------------------------------------- Knöpfe */
.knopf {
  display: inline-block;
  background: var(--bernstein);
  color: var(--nacht);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font: 600 14px var(--schrift);
  text-decoration: none;
  cursor: pointer;
}

.knopf:hover { background: #f2b35a; }

.knopf--leise {
  background: transparent;
  color: var(--papier);
  border-color: var(--linie);
  font-weight: 500;
}

.knopf--leise:hover { background: var(--flaeche-hoch); border-color: var(--petrol-hell); }

.werkzeug {
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--gedaempft);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 5px 8px;
}

.werkzeug:hover:not(:disabled) { background: var(--flaeche-hoch); color: var(--papier); }
.werkzeug--weg:hover:not(:disabled) { border-color: var(--rot); color: var(--rot); }

.formular-fuss { margin-top: 22px; display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------ Meldungen */
.meldung {
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0 0 18px;
  font-size: 14px;
  border: 1px solid;
}

.meldung--erfolg { background: rgb(79 191 143 / 0.1); border-color: rgb(79 191 143 / 0.4); color: var(--gruen); }
.meldung--fehler { background: rgb(196 85 47 / 0.12); border-color: rgb(196 85 47 / 0.45); color: #e08260; }
.meldung--warnung { background: rgb(232 163 61 / 0.1); border-color: rgb(232 163 61 / 0.4); color: var(--bernstein); }

@media (max-width: 640px) {
  .kopf { height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .inhalt { padding: 20px 16px 72px; }
  .zeile, .block { flex-direction: column; }
  .zeile-werkzeuge { flex-direction: row; align-self: flex-end; }
  .block-typ { padding-top: 0; }
}

/* Ein gesetzter Verweis, dessen Ziel es nicht mehr gibt. */
.kaestchen .ist-verwaist span { color: var(--bernstein); }
