/* VIDESCA Dach-CSS — helles Design „Galerie hell" (Variante A, Sergej-Wahl 12.06.2026)
   Heller Beige-Grund (AÜ-CD: kein reines Weiß), Kacheln in sechs gedeckten Mittelfarben
   mit Neon-Glow-Rand, AÜ-Rot nur als Akzent. Schriften selbst gehostet (fonts.css). */

:root {
  /* AÜ-Markenfarben */
  --au-rot: #e20613;
  --au-rot-dunkel: #9a1d28;
  --au-beige: #faf6e5;
  --au-dunkelgrau: #666b6e;

  /* Helle Grundflächen */
  --grund: #faf6e5;            /* Seitengrund Beige */
  --flaeche: #fffdf4;          /* Karten/Panels, wärmstes Fast-Weiß */
  --flaeche-tief: #f1ecd9;     /* Eingabefelder */

  /* Linien */
  --linie: #ddd6bf;
  --linie-fein: #e8e2cd;

  /* Texte (Tinte auf hellem Grund) */
  --kopf: #2a2e33;
  --tinte: #2a2e33;
  --tinte-2: #555b60;
  --tinte-3: #6f757b;

  /* Links: Stahlblau-Tinte — NICHT Rot (Kontrast-Falle, E1-Ticket) */
  --link: #2f6790;

  /* Fokus + Akzent */
  --fokus: #2f6790;
  --akzent: var(--au-rot);

  /* Kachel-Mittelfarben (AÜ-Branchenfarben, satt kalibriert: weiße Schrift >= 4.5:1) */
  --kachel-1: #54755f;         /* Salbei      (Glow-Basis #80a190) */
  --kachel-2: #3e6f8f;         /* Stahlblau   (Glow-Basis #5189ac) */
  --kachel-3: #a35a2a;         /* Terrakotta  (Glow-Basis #c97c45) */
  --kachel-4: #2f7c81;         /* Türkis      (Glow-Basis #52abb0) */
  --kachel-5: #605690;         /* Veilchen    (Original, 6.5:1) */
  --kachel-6: #914056;         /* Beere       (Original, 6.9:1) */

  /* Neon-Glow-Ränder (hellere Originaltöne, rein dekorativ) */
  --glow-1: rgba(128,161,144,.55);
  --glow-2: rgba(81,137,172,.55);
  --glow-3: rgba(201,124,69,.55);
  --glow-4: rgba(82,171,176,.55);
  --glow-5: rgba(96,86,144,.50);
  --glow-6: rgba(145,64,86,.50);

  /* Karten-Schatten (hell) */
  --kachel-schatten: 0 2px 12px rgba(102,107,110,.14);

  /* Kopf-/Fußzeile */
  --kopfzeile-grund: #fffdf4;
  --fuss-grund: #f4efdd;

  /* Schriften — selbst gehostet via fonts.css (CSP 'self') */
  --font-head: "Merriweather", Georgia, serif;
  --font-body: "PT Sans", Arial, sans-serif;
}

/* ─── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Grundkörper ──────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--tinte);
  background: var(--grund);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); }

:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}

/* ─── Kopfzeile ────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  background: var(--kopfzeile-grund);
  border-bottom: 1px solid var(--linie-fein);
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--au-rot) 0%, var(--au-rot-dunkel) 38%, transparent 78%);
}

/* Nur fuer Screenreader sichtbar — haelt die Ueberschriften-Hierarchie (h1->h2->h3)
   intakt, ohne das Layout zu veraendern (R-08). */
.nur-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* "Zum Inhalt springen" — versteckt, bis er per Tab fokussiert wird (N-4). */
.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--au-rot);
  color: #fff;
  border-radius: 0 0 6px 6px;
  transition: top .15s ease-in-out;
}
.skip-link:focus { top: 0; outline: 3px solid var(--tinte); }
main:focus { outline: none; }

header .kopf-logo {
  height: 40px;
  width: auto;
  flex: 0 0 auto;
}

header h1 {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 22px;
  color: var(--kopf);
}

header h1 .marke {
  color: var(--au-rot);
  font-weight: 400;
}

/* ─── Haupt-Inhalt ─────────────────────────────────────── */
main {
  flex: 1;
  padding: 40px 32px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ─── Fußzeile ─────────────────────────────────────────── */
footer {
  background: var(--fuss-grund);
  border-top: 1px solid var(--linie-fein);
  color: var(--tinte-2);  /* N-5: dunkler fuer Kontrast >= 4,5:1 (WCAG AA) */
  font-size: 12px;
  text-align: center;
  padding: 12px 32px;
}

/* ─── Login-Karte ──────────────────────────────────────── */
.login-karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--au-rot);
  border-radius: 14px;
  box-shadow: var(--kachel-schatten);
  padding: 36px 40px;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-karte label {
  font-size: 13px;
  color: var(--tinte-2);
  margin-bottom: 2px;
}

.login-karte input[type="email"],
.login-karte input[type="password"] {
  background: var(--flaeche-tief);
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--tinte);
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.15s;
}

.login-karte input[type="email"]:focus,
.login-karte input[type="password"]:focus {
  outline: none;
  border-color: var(--link);
}

.login-karte button[type="submit"] {
  margin-top: 8px;
  background: var(--au-rot);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.login-karte button[type="submit"]:hover {
  background: var(--au-rot-dunkel);
}

/* ─── Fehler- und Hinweis-Meldungen ───────────────────── */
.fehler {
  background: var(--au-rot-dunkel);
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
}

.meldung {
  background: var(--flaeche);
  border-left: 4px solid var(--au-rot);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* ─── Logout-Form (Kopfzeile rechts) ──────────────────── */
.logout-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logout-form .nutzer {
  font-size: 13px;
  color: var(--tinte-2);
  background: #ece6d2;
  border-radius: 18px;
  padding: 5px 13px;
}

.logout-form button {
  background: transparent;
  border: 1px solid var(--linie);
  border-radius: 6px;
  color: var(--tinte-2);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.logout-form button:hover {
  border-color: var(--au-rot);
  color: var(--tinte);
}

/* ─── Arbeitsfluss-Navigation ──────────────────────────── */
.arbeitsfluss {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.schritt {
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--linie);
}

.schritt.geplant {
  background: var(--flaeche);
  color: var(--tinte-3);
}

.schritt.aktiv {
  background: var(--kachel-2);
  border-color: var(--kachel-2);
  color: #fff;
  box-shadow: 0 0 14px var(--glow-2);
}

/* ─── Modul-Kacheln (Startseite, „Galerie hell") ───────── */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 6px 0 28px;
}

.kachel {
  display: block;
  border-radius: 14px;
  padding: 20px 22px;
  min-height: 110px;
  color: #fff;
  text-decoration: none;
}

.kachel h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
  opacity: .95;
}

.kachel .wert {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 32px;
  margin: 8px 0 4px;
}

.kachel .neben { font-size: 13.5px; opacity: .95; }

.kachel.k1 { background: var(--kachel-1); box-shadow: 0 0 14px var(--glow-1); }
.kachel.k2 { background: var(--kachel-2); box-shadow: 0 0 14px var(--glow-2); }
.kachel.k3 { background: var(--kachel-3); box-shadow: 0 0 14px var(--glow-3); }
.kachel.k4 { background: var(--kachel-4); box-shadow: 0 0 14px var(--glow-4); }
.kachel.k5 { background: var(--kachel-5); box-shadow: 0 0 14px var(--glow-5); }
.kachel.k6 { background: var(--kachel-6); box-shadow: 0 0 14px var(--glow-6); }

a.kachel:hover { filter: brightness(1.06); }

/* ─── Panels (Verwaltung u. a.) ────────────────────────── */
.panel {
  background: var(--flaeche);
  border: 1px solid var(--linie-fein);
  border-radius: 14px;
  box-shadow: var(--kachel-schatten);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.panel h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 14px;
}

.zurueck { margin-bottom: 18px; font-size: 14px; }

.verwaltung-link { margin-top: 18px; font-size: 14px; }

/* ─── Formulare (Verwaltung) ───────────────────────────── */
.formular-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.formular-zeile label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--tinte-2);
}

input[type="email"], input[type="password"], select {
  background: var(--flaeche-tief);
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--tinte);
  font-size: 14px;
  padding: 8px 12px;
}

button {
  background: var(--flaeche-tief);
  border: 1px solid var(--linie);
  border-radius: 6px;
  color: var(--tinte);
  font-size: 13px;
  padding: 7px 14px;
  cursor: pointer;
}

button:hover { border-color: var(--link); }

.formular-zeile button[type="submit"] {
  background: var(--au-rot);
  border-color: var(--au-rot);
  color: #fff;
  font-weight: 600;
  padding: 9px 20px;
}

.formular-zeile button[type="submit"]:hover { background: var(--au-rot-dunkel); }

/* ─── Nutzer-Tabelle ───────────────────────────────────── */
.nutzer-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.nutzer-tabelle th {
  background: var(--au-rot);
  color: #fff;
  text-align: left;
  padding: 9px 12px;
}

.nutzer-tabelle td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--linie-fein);
  vertical-align: middle;
}

.nutzer-tabelle form { display: flex; gap: 8px; align-items: center; }

.status { font-size: 12.5px; padding: 3px 10px; border-radius: 12px; }
.status.aktiv { background: #e1ead2; color: #3c5a2e; }
.status.inaktiv { background: #f0dede; color: #8a3535; }

/* ─── Hinweis-Text ─────────────────────────────────────── */
.hinweis {
  color: var(--tinte-2);
  font-size: 14px;
}

/* ─── Daten-Tabelle (Katalog / Werkstatt / Validierung) ─── */
.tabelle {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: var(--flaeche);
  box-shadow: var(--kachel-schatten);
}
.tabelle th, .tabelle td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--linie-fein);
  text-align: left;
}
.tabelle th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tinte-3);
}
.ampel.gruen { color: #2e6b46; font-weight: 700; }   /* Tannengrün, >= 4.5:1 auf #fffdf4 */
.ampel.warn  { color: #9a5b00; font-weight: 700; }   /* Bernstein-Braun, >= 4.5:1 */
.wert.klein  { font-size: 1.05rem; }

/* ─── Download-Liste (Werkstatt) ─────────────────────────── */
.download-liste { list-style: none; padding: 0; margin: 12px 0; }
.download-liste li { padding: 6px 0; border-bottom: 1px solid var(--linie-fein); }
.download-liste .neben { color: var(--tinte-3); font-size: 13px; margin-left: 8px; }

/* ─── Erzeugen-Formular (Derivate / Serie / Generator) ───── */
.derivat-erzeugen {
  background: var(--flaeche);
  border: 1px solid var(--linie-fein);
  border-radius: 10px;
  box-shadow: var(--kachel-schatten);
  padding: 18px 20px;
  margin-top: 14px;
}

.erzeuge-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 620px;
}

.erzeuge-form > label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--tinte-2);
}

.erzeuge-form textarea {
  background: var(--flaeche-tief);
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--tinte);
  font: inherit;
  font-size: 14px;
  padding: 8px 12px;
  resize: vertical;
}

.erzeuge-form select:focus,
.erzeuge-form textarea:focus { outline: 2px solid var(--fokus); outline-offset: 1px; }

/* Methoden-/Linien-Wahl als Optionskarten (native Radios bleiben sichtbar = Fallback) */
.methoden-wahl {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.methoden-wahl legend {
  font-size: 13px;
  color: var(--tinte-2);
  padding: 0 0 2px;
}

.methoden-wahl label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--flaeche-tief);
  border: 1.5px solid var(--linie);
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--tinte);
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
}

.methoden-wahl label:hover { border-color: var(--link); }
.methoden-wahl input[type="radio"] { margin-top: 2px; accent-color: var(--au-rot); }

/* Ausgewaehlte Karte hervorheben (Progressive Enhancement via :has) */
.methoden-wahl label:has(input:checked) {
  border-color: var(--au-rot);
  background: #fff;
  box-shadow: 0 0 0 1px var(--au-rot) inset;
}

.echt-schalter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--tinte-2);
}
.echt-schalter input { accent-color: var(--au-rot); }

button.primaer {
  align-self: flex-start;
  background: var(--au-rot);
  border: 1px solid var(--au-rot);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 7px;
}
button.primaer:hover { background: var(--au-rot-dunkel); border-color: var(--au-rot-dunkel); }

/* Verlinkung zur Serien-Seite */
.primaer-link {
  display: inline-block;
  margin: 4px 0 8px;
  font-weight: 600;
  color: var(--au-rot);
  text-decoration: none;
}
.primaer-link:hover { text-decoration: underline; }

/* ─── Lektor / Sprachprüfung (Derivat-Ergebnis) ──────────── */
.lektor {
  background: var(--flaeche);
  border: 1px solid var(--linie-fein);
  box-shadow: var(--kachel-schatten);
  padding: 18px 20px;
  margin-top: 18px;
}
.lektor #lektor-knopf:disabled { opacity: .6; cursor: progress; }
.lektor-ergebnis { margin-top: 14px; }

.lektor-liste {
  list-style: decimal;
  margin: 10px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
}
.lektor-liste li {
  background: var(--flaeche-tief);
  border: 1px solid var(--linie-fein);
  border-radius: 7px;
  padding: 10px 12px;
}
.lektor-stelle {
  display: inline-block;
  font-weight: 600;
  color: var(--au-rot-dunkel);
  margin-bottom: 4px;
}
.lektor-nachricht { color: var(--tinte); font-size: 14px; }
.lektor-vorschlaege { color: var(--tinte-2); font-size: 13.5px; margin-top: 4px; }
.lektor-kategorie {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--tinte-3);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ─── Dubletten-Check (Katalog) ──────────────────────────── */
.dubletten {
  background: var(--flaeche);
  border: 1px solid var(--linie-fein);
  box-shadow: var(--kachel-schatten);
  padding: 18px 20px;
  margin-top: 18px;
}
.dubletten-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.dubletten-zeile input[type="text"] {
  flex: 1 1 320px;
  background: var(--flaeche-tief);
  border: 1px solid var(--linie);
  border-radius: 7px;
  color: var(--tinte);
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
}
.dubletten-zeile input[type="text"]:focus { outline: 2px solid var(--fokus); outline-offset: 1px; }
.dubletten #dubletten-knopf:disabled { opacity: .6; cursor: progress; }
.dubletten-ergebnis { margin-top: 14px; }
.hinweis.sperre { color: var(--au-rot-dunkel); font-weight: 600; }

.dubletten-liste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.dubletten-liste li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  background: var(--flaeche-tief);
  border: 1px solid var(--linie-fein);
  border-radius: 7px;
  padding: 9px 12px;
}
.dubletten-kurs { color: var(--tinte); font-size: 14px; }
.dubletten-quote { color: var(--au-rot-dunkel); font-weight: 600; font-size: 13px; white-space: nowrap; }
