/* Gemeinsames Aussehen für Portal, Login und Verwaltung. */
:root {
  /* Layout: eine Spalte, max. 820px; Kopf mit Marke, darunter Reiter, darunter Blöcke als Karten in Kursreihenfolge. */
  --ground: #F2F5FA;
  --surface: #FFFFFF;
  --ink: #101B33;
  --muted: #4A5670;
  --line: #CCD5E4;
  --accent: #1746D1;
  --accent-ink: #FFFFFF;
  --brand: #C4530A;
  --good: #0B6B3A;
  --good-bg: #DDF3E6;
  --warn-bg: #FBE9D7;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0D1322; --surface: #172036; --ink: #EEF2FA; --muted: #A9B4CC; --line: #33405E;
    --accent: #8FB0FF; --accent-ink: #0D1322; --brand: #FF9A4D; --good: #6FD9A0; --good-bg: #173B29; --warn-bg: #4A2E12;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0D1322; --surface: #172036; --ink: #EEF2FA; --muted: #A9B4CC; --line: #33405E;
  --accent: #8FB0FF; --accent-ink: #0D1322; --brand: #FF9A4D; --good: #6FD9A0; --good-bg: #173B29; --warn-bg: #4A2E12;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; }
main { max-width: 820px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 6.5vw, 40px); line-height: 1.08; margin: 0; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.2; margin: 0; text-wrap: balance; }
h3 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 700; }
p { margin: 0; max-width: 65ch; }
a { color: var(--accent); font-weight: 700; }
.top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.brand { font-family: var(--display); font-size: 19px; font-weight: 600; }
.brand b { color: var(--brand); font-weight: 800; }
.brand span { color: var(--muted); font-family: var(--body); font-weight: 400; font-size: 15px; }
.who { color: var(--muted); font-size: 15px; }
.proto { background: var(--warn-bg); border-radius: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 15px; }
.proto .row { gap: 6px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a { flex: 1 1 130px; text-align: center; text-decoration: none; padding: 11px 8px; min-height: 46px; border-radius: 12px; border: 2px solid var(--line); color: var(--ink); background: var(--surface); }
nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.view { display: flex; flex-direction: column; gap: 16px; }
.view[hidden] { display: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.locked { border-style: dashed; }
.head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.head .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.open { background: var(--good-bg); color: var(--good); }
.pill.shut { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
button { font: inherit; font-weight: 700; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.small { min-height: 36px; padding: 4px 12px; font-size: 15px; }
button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button:disabled { opacity: .55; cursor: default; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.prompt { background: var(--ground); border-radius: 12px; padding: 12px 14px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note { color: var(--muted); font-size: 15px; }
.verdict { font-weight: 700; }
.verdict.hit { color: var(--good); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
textarea, input[type="text"] { width: 100%; font: inherit; color: var(--ink); background: var(--ground); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
textarea { min-height: 84px; resize: vertical; }
label { font-weight: 700; display: block; margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.bar { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 44px; gap: 10px; align-items: center; }
.bar .track { height: 16px; background: var(--ground); border-radius: 8px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.q { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; padding-top: 0; }
.q .qt { font-weight: 700; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
ul.plain { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 65ch; }
footer { color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.regie { background: var(--warn-bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.step { display: grid; grid-template-columns: 112px 34px 1fr; gap: 10px; align-items: baseline; font-size: 16px; }
@media (max-width: 520px) { .step { grid-template-columns: 1fr 34px; } .step span:last-child { grid-column: 1 / -1; } }
.step b { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.step .min { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
details.done { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
details.done summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; }
details.done[open] { padding-bottom: 16px; }
details.done .inner { display: flex; flex-direction: column; gap: 12px; }
.now { border: 2px solid var(--accent); }
.pause { text-align: center; color: var(--muted); font-weight: 700; padding: 6px; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.form input[type="email"], .form input[type="password"], .form input[type="date"], .form select, .form input[type="number"] { width: 100%; font: inherit; color: var(--ink); background: var(--ground); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 46px; }
.meldung { border-radius: 12px; padding: 12px 14px; }
.meldung.gut { background: var(--good-bg); color: var(--good); }
.meldung.schlecht { background: var(--warn-bg); }
table.liste { width: 100%; border-collapse: collapse; font-size: 16px; }
table.liste th, table.liste td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.scroll { overflow-x: auto; }
.inline { display: inline; }
.qr-bogen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.qr-karte { border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; background: #fff; color: #101B33; break-inside: avoid; }
.qr-karte img { width: 170px; height: 170px; }
@media print { nav, .nicht-drucken, footer { display: none !important; } body { background: #fff; } }

/* Aufbau aus Vorlagen */
#views { display: flex; flex-direction: column; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.balken { display: flex; flex-direction: column; gap: 8px; }
.notiztext { white-space: pre-wrap; font-size: 16px; }
.video { width: 100%; border-radius: 12px; background: #000; }
.video-rahmen { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.video-rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Folien: klein im Mitgliederbereich, gross auf dem Beamer */
.folie { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1em 1.3em; display: flex; flex-direction: column; gap: .55em; font-size: 16px; }
.folie .f-oben { font-size: .75em; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.folie .f-titel { font-family: var(--display); font-weight: 800; font-size: 1.5em; line-height: 1.15; text-wrap: balance; }
.folie .f-nummer { font-family: var(--display); font-weight: 800; font-size: 2.6em; line-height: 1; color: var(--brand); }
.folie .f-text { color: var(--muted); font-size: 1.05em; }
.folie ul, .folie ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: .4em; }
.folie .f-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; }
@media (max-width: 560px) { .folie .f-spalten { grid-template-columns: 1fr; } }
.folie .f-spalte { background: var(--ground); border-radius: 12px; padding: .8em 1em; display: flex; flex-direction: column; gap: .5em; }
.folie .f-spaltentitel { font-weight: 700; }
.folie .f-scroll { overflow-x: auto; }
.folie table { border-collapse: collapse; width: 100%; }
.folie th, .folie td { text-align: left; padding: .4em .6em; border-bottom: 1px solid var(--line); vertical-align: top; }
.folie-kapitel, .folie-titel { justify-content: center; }
