/* ═══════════════════════════════════════════════════════════════════════
   Freikarten der Naturbühne Hohensyburg

   Farben, Schriften und Maße sind aus `nbh-web/src/styles/global.css`
   übernommen, damit der Dienst wie ein Teil des Ganzen wirkt — abgeschrieben,
   nicht eingebunden, wie beim Fundus. Anders als dort liegen die Schriftdateien
   hier mit (public/schriften/, Kopien von der Website): TeX Gyre Adventor
   (GUST Font License) für Überschriften, Aleo (SIL Open Font License) für Text.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "TeX Gyre Adventor"; src: url("/schriften/adventor-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TeX Gyre Adventor"; src: url("/schriften/adventor-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "TeX Gyre Adventor"; src: url("/schriften/adventor-bold-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Aleo"; src: url("/schriften/aleo-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
    --grund: #ffffff;
    --flaeche: #ffffff;
    --text: #000000;
    --text-leise: #575656;
    --linie: rgba(87, 86, 86, 0.102);
    --schleier: rgba(87, 86, 86, 0.078);

    --sonne: #fbdd15;
    --himmelblau: #14adda;
    --gruen: #83b83a;
    --grau: #b3b2b2;
    --banner-rot: #b80000;

    --radius-karte: 20px;
    --radius-knopf: 10px;
    --schatten-karte: 0 10px 20px rgba(0, 0, 0, 0.1);

    --schrift-display: "TeX Gyre Adventor", "Century Gothic", "URW Gothic",
        "Avant Garde", ui-rounded, system-ui, sans-serif;
    --schrift-text: "Aleo", Georgia, ui-serif, serif;
    --schrift-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --grund: #0d0d0d;
        --flaeche: #161616;
        --text: #ffffff;
        --text-leise: #b3b2b2;
        --linie: rgba(255, 255, 255, 0.102);
        --schleier: rgba(255, 255, 255, 0.078);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font-family: var(--schrift-text); font-size: 16px; line-height: 1.5; }
/* Bedienelemente und Tabellen bleiben in der Systemschrift: Aleo ist eine Leseschrift, in Knöpfen und Zahlenspalten wirkt sie schwer. */
button, input, select, textarea, table, .leiste__wege, .leiste__fuss, .marke, .chip, .kennzahl span, .leise, code, pre.text, label { font-family: var(--schrift-ui); }
h1, h2, h3 { font-family: var(--schrift-display); font-weight: 700; margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
a { color: inherit; }
code { font-size: 14px; background: var(--schleier); padding: 1px 6px; border-radius: 6px; }

/* ── Seitenleiste ──────────────────────────────────────────────────────── */

.rahmen { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.leiste { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; border-right: 1px solid var(--linie); background: var(--flaeche); }
.leiste__marke { font-family: var(--schrift-display); font-weight: 700; font-size: 20px; text-decoration: none; }
.leiste__marke::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--sonne); }
.leiste__haus { margin: -12px 0 0 20px; font-size: 12px; color: var(--text-leise); }
.leiste__wege { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.leiste__wege a { display: block; padding: 9px 12px; border-radius: var(--radius-knopf); color: var(--text); text-decoration: none; }
.leiste__wege a:hover { background: var(--schleier); }
.leiste__wege a[aria-current="page"] { background: var(--schleier); font-weight: 700; box-shadow: inset 3px 0 0 var(--sonne); }
.leiste__abgleich { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); }
.leiste__abgleich .leise { margin: 0; font-size: 12px; }
.leiste__fuss { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--linie); font-size: 13px; }
.leiste__fuss a, .leiste__fuss span { padding: 6px 12px; border-radius: var(--radius-knopf); color: var(--text-leise); text-decoration: none; }
.leiste__fuss a:hover { background: var(--schleier); color: var(--text); }

.bereich { display: flex; flex-direction: column; min-width: 0; }

.seitenkopf { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: start; padding: 20px 28px; border-bottom: 1px solid var(--linie); background: var(--schleier); }
.seitenkopf__titel { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seitenkopf__pfad { grid-column: 1; font-size: 13px; color: var(--text-leise); }
.seitenkopf__werkzeuge { grid-row: 1; grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
    .rahmen { grid-template-columns: 1fr; }
    .leiste { border-right: none; border-bottom: 1px solid var(--linie); }
    .leiste__wege { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
    .leiste__fuss { grid-auto-flow: column; justify-content: start; margin-top: 0; }
    .seitenkopf { grid-template-columns: 1fr; }
    .seitenkopf__werkzeuge { grid-row: auto; grid-column: 1; }
}

/* ── Knöpfe, Chips, Marken ─────────────────────────────────────────────── */

.knopf { padding: 8px 14px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--flaeche); color: var(--text); font: inherit; font-family: var(--schrift-ui); cursor: pointer; white-space: nowrap; }
.knopf:hover { background: var(--schleier); }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
.knopf--wichtig { background: var(--sonne); color: #000; border-color: transparent; font-weight: 600; }
.knopf--leise { border: none; background: none; color: var(--text-leise); }
.knopf--klein { padding: 4px 9px; font-size: 13px; }

.chip { padding: 2px 10px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--grund); font-size: 13px; color: var(--text-leise); }
.marke { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--schleier); font-size: 12px; white-space: nowrap; }
.marke--gut { background: var(--gruen); color: #000; }
.marke--warnung { background: var(--banner-rot); color: #fff; }
.marke--hinweis { background: var(--sonne); color: #000; }
.marke--blau { background: var(--himmelblau); color: #000; }

/* ── Aufbau ────────────────────────────────────────────────────────────── */

main { padding: 24px 28px 80px; }
section { margin-bottom: 36px; }
section > h2 { margin-bottom: 10px; }
.zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeile--verteilt { justify-content: space-between; }
.leise { color: var(--text-leise); font-size: 13px; }
.hinweis { padding: 40px 0; color: var(--text-leise); text-align: center; }
.fehler { color: var(--banner-rot); }
.kennzahlen { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.kennzahl { display: grid; gap: 2px; min-width: 130px; padding: 12px 16px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--flaeche); }
.kennzahl b { font-family: var(--schrift-display); font-size: 22px; }
.kennzahl span { font-size: 12px; color: var(--text-leise); }
.suchfeld { width: min(360px, 100%); padding: 9px 14px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--grund); color: var(--text); font: inherit; font-family: var(--schrift-ui); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--linie); font-size: 14px; vertical-align: top; }
th { font-size: 12px; color: var(--text-leise); font-weight: 600; }
tr:hover td { background: var(--schleier); }
tr.storniert td { color: var(--text-leise); }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
td.werkzeuge { white-space: nowrap; text-align: right; }
.vergabe { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px dashed var(--linie); }
.vergabe:last-child { border-bottom: none; }
.vergabe__kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.verlauf { display: grid; gap: 4px; }
.verlauf__zeile { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.verlauf__zeile span:first-child { color: var(--text-leise); font-size: 13px; }
.warnkasten { padding: 12px 16px; border-left: 4px solid var(--banner-rot); background: var(--schleier); border-radius: 0 var(--radius-knopf) var(--radius-knopf) 0; }
.hinweiskasten { padding: 12px 16px; border-left: 4px solid var(--sonne); background: var(--schleier); border-radius: 0 var(--radius-knopf) var(--radius-knopf) 0; }
.haken { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; }
.haken label { display: flex; gap: 8px; align-items: center; margin: 0; padding: 6px 8px; border-radius: var(--radius-knopf); color: var(--text); font-size: 14px; }
.haken label:hover { background: var(--schleier); }
pre.text { white-space: pre-wrap; padding: 12px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--grund); font: inherit; font-family: var(--schrift-ui); font-size: 14px; }

/* ── Dialoge und Formulare ─────────────────────────────────────────────── */

dialog { width: min(560px, 92vw); padding: 22px; border: none; border-radius: var(--radius-karte); background: var(--flaeche); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin-bottom: 12px; }
label { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--text-leise); }
label.nebeneinander { grid-template-columns: auto 1fr; align-items: center; }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--linie); border-radius: var(--radius-knopf); background: var(--grund); color: var(--text); font: inherit; font-family: var(--schrift-ui); }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; }

/* ── Anmeldeseite ──────────────────────────────────────────────────────── */

.anmeldung { display: grid; gap: 14px; width: min(380px, 92vw); margin: 12vh auto; padding: 28px; border-radius: var(--radius-karte); background: var(--flaeche); box-shadow: var(--schatten-karte); }
