/* Vereinsplattform – Oberfläche nach dem Design-Prototyp.
   Schrift: Source Sans 3, falls installiert, sonst Systemschrift (keine Dateien von außen laden).
   Die Grundschrift ist mit 18 px etwas größer als im Prototyp, weil viele Nutzer älter sind. */

:root {
  --grund: #f4f6f1;
  --text: #1f2a22;
  --gedaempft: #55655a;
  --dunkel: #1f3a28;
  --akzent: #2f6b3f;
  --akzent-dunkel: #1f3a28;
  --karte: #ffffff;
  --rand: #dce1d8;
  --linie: #eef1eb;
  --eingabe-rand: #6f7f73;
  --menue-linie: #3c5a45;
  --menue-text: #c9d8cc;
  --ok-grund: #e3f0e6;
  --ok-rand: #9bc5a6;
  --warn-grund: #fcebd7;
  --warn-text: #7a3e06;
  --info-grund: #e2ecf6;
  --info-text: #173f66;
  --fehler: #9a1b1b;
  --fehler-grund: #fbe9e9;
}

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

html { font-size: 18px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grund);
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.45;
}

a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h1 { font-size: 1.85rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; margin-top: 1.6rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.2rem; }
p { margin: 0 0 .9rem; }
code { font-size: .95rem; word-break: break-all; }

:focus-visible { outline: 3px solid #0b57d0; outline-offset: 2px; }

.sprunglink {
  position: absolute; left: -999px; top: 0; background: var(--karte); color: var(--text);
  padding: .6rem 1rem; z-index: 10;
}
.sprunglink:focus { left: .5rem; top: .5rem; }

/* ---------- Gerüst: Seitenleiste und Inhalt ---------- */

.app { min-height: 100vh; display: flex; flex-wrap: wrap; }

.seitenleiste {
  flex: 1 1 230px; max-width: 280px;
  background: var(--dunkel); color: #fff;
  padding: 24px 14px; display: flex; flex-direction: column; gap: 6px;
}
.marke-block { padding: 0 10px 18px; display: flex; flex-direction: column; gap: 2px; }
.marke { color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.marke:hover { color: #fff; text-decoration: underline; }
.untertitel { font-size: .85rem; color: var(--menue-text); }

.menue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.menue a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 8px; color: #fff; text-decoration: none; font-weight: 600;
}
.menue a:hover { background: var(--menue-linie); color: #fff; }
.menue a.aktiv { background: var(--akzent); }

.angemeldet {
  margin-top: 18px; padding: 14px 10px 0; border-top: 1px solid var(--menue-linie);
  font-size: .85rem; color: var(--menue-text);
}
.angemeldet strong { color: #fff; font-size: 1rem; }
.angemeldet form { margin-top: 10px; }

.hauptbereich {
  flex: 999 1 560px; min-width: 0;
  padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 4px;
}
.demo-zeile { display: flex; justify-content: flex-end; margin: 0 0 6px; }

/* Anmeldung und 2FA: ohne Seitenleiste, zentriert */
.gast { justify-content: center; }
.gast .hauptbereich { flex: 0 1 34rem; padding-top: 4rem; }
.gast-marke { font-size: 1.2rem; font-weight: 700; color: var(--dunkel); margin-bottom: 1rem; }

@media (max-width: 760px) {
  .seitenleiste { max-width: none; flex-basis: 100%; padding: 14px; }
  .menue { flex-direction: row; flex-wrap: wrap; }
  .angemeldet { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; padding-top: 10px; }
  .angemeldet form { margin: 0; }
  .hauptbereich { padding: 20px 16px 40px; }
}

/* ---------- Karten und Kennzahlen ---------- */

.karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 10px;
  padding: 20px; min-width: 0;
}
.karte > :last-child { margin-bottom: 0; }
.karte h2:first-child, .karte h3:first-child { margin-top: 0; }

.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kennzahl-titel { color: var(--gedaempft); font-size: .85rem; }
.kennzahl-wert { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.kennzahl-zusatz { color: var(--gedaempft); font-size: .85rem; }

.spalten { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.spalten > .karte { flex: 1 1 360px; }

.aufgabe {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linie);
}
.aufgabe:last-child { border-bottom: 0; }
.aufgabe-titel { font-weight: 600; }
.gedaempft, .aufgabe-zusatz { color: var(--gedaempft); font-size: .85rem; }

/* ---------- Tabellen ---------- */

.scroll { overflow-x: auto; }

.tabelle {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: .4rem 0 1.2rem;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; overflow: hidden;
  font-size: .9rem;
}
.tabelle th, .tabelle td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle;
}
.tabelle thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #4a5a4e;
  font-weight: 600; border-bottom: 1px solid var(--rand); white-space: nowrap;
}
.tabelle tbody tr:last-child th, .tabelle tbody tr:last-child td, .tabelle tr:last-child > * { border-bottom: 0; }
.tabelle th[scope="row"] { font-weight: 600; width: 38%; }
.tabelle .zahl, .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle .hilfe { font-weight: 400; }

/* ---------- Schaltflächen, Marken ---------- */

.knopf, button.knopf, a.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--akzent); background: var(--akzent); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.knopf:hover, a.knopf:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); color: #fff; }
.knopf-leise { background: transparent; border-color: #fff; color: #fff; }
.knopf-leise:hover { background: var(--menue-linie); border-color: #fff; }
.knopf-leise-dunkel, a.knopf-leise-dunkel { background: var(--karte); color: var(--akzent); }
.knopf-leise-dunkel:hover, a.knopf-leise-dunkel:hover { background: var(--ok-grund); color: var(--akzent-dunkel); }
.knopf-gefahr, a.knopf-gefahr { background: var(--fehler); border-color: var(--fehler); }
.knopf-gefahr:hover, a.knopf-gefahr:hover { background: #7a1414; border-color: #7a1414; }
.knopf-klein { min-height: 36px; padding: 0 12px; }
.knopfleiste { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem;
  font-weight: 600; white-space: nowrap;
}
.tag-warn { background: var(--warn-grund); color: var(--warn-text); }
.tag-ok { background: var(--ok-grund); color: var(--akzent-dunkel); border: 1px solid var(--ok-rand); }
.tag-info { background: var(--info-grund); color: var(--info-text); }
.tag-fehler { background: var(--fehler-grund); color: var(--fehler); border: 1px solid var(--fehler); }

.hinweis {
  padding: .7rem 1rem; border-radius: 8px; background: var(--ok-grund);
  border: 1px solid var(--ok-rand); margin: 0 0 1rem;
}
.fehlerbox {
  padding: .7rem 1rem; border-radius: 8px; background: var(--fehler-grund);
  border: 2px solid var(--fehler); margin: 0 0 1rem;
}
.errorlist { color: var(--fehler); font-weight: 600; list-style: none; padding: 0; margin: .3rem 0; }

/* ---------- Formulare ---------- */

label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=file], select, textarea {
  font: inherit; min-height: 44px; padding: .5rem .7rem; max-width: 100%;
  border: 1px solid var(--eingabe-rand); border-radius: 8px; background: #fff; color: var(--text);
}
input[type=text], input[type=email], input[type=password], textarea { width: 100%; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; vertical-align: middle; accent-color: var(--akzent); }
.formular p { margin: 1rem 0; }
.formular-karte { max-width: 44rem; }
.hilfe { display: block; color: var(--gedaempft); font-size: .85rem; font-weight: 400; margin-top: .15rem; }
form.inline { display: inline; margin-left: .8rem; }

.suche { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: 1rem 0; }
.suche label { margin: 0; }
.suche input[type=text] { width: 16rem; }

/* ---------- Unternavigation (Reiter) ---------- */

.unternavigation { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.2rem; }
.unternavigation a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--rand); background: var(--karte); color: var(--akzent);
  font-weight: 600; text-decoration: none;
}
.unternavigation a:hover { background: var(--ok-grund); }
.unternavigation a.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; }

.seiten { display: flex; gap: 1rem; align-items: center; }
.qr svg { width: 14rem; height: 14rem; background: #fff; padding: .5rem; border: 1px solid var(--rand); border-radius: 8px; }

/* ---------- Protokolle ---------- */

.sitzung-kopf { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: flex-end; }
.sitzung-kopf label { display: block; font-weight: 600; margin-bottom: .2rem; }
.speicherstatus { position: sticky; top: 0; z-index: 5; margin: 0 0 .8rem; padding: .3rem .8rem; background: var(--ok-grund); border: 1px solid var(--ok-rand); border-radius: 6px; font-size: .95rem; }
.speicherstatus.fehler { background: var(--fehler-grund); border-color: var(--fehler); color: var(--fehler); }
.anwesenheit-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .5rem 0; border-bottom: 1px solid var(--linie); }
.anwesenheit-zeile .name { flex: 1 1 12rem; font-weight: 600; }
.status-knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; }
.status-knoepfe form { margin: 0; }
.status-knoepfe button { min-height: 44px; padding: 0 14px; border: 2px solid var(--akzent); border-radius: 8px; background: var(--karte); color: var(--akzent); font: inherit; font-weight: 600; cursor: pointer; }
.status-knoepfe button.gewaehlt { background: var(--akzent); color: #fff; }
.status-knoepfe button.gewaehlt.entschuldigt { background: var(--warn-text); border-color: var(--warn-text); }
.status-knoepfe button.gewaehlt.unentschuldigt { background: var(--fehler); border-color: var(--fehler); }
.punkt-karte textarea { min-height: 9rem; font-size: 1.05rem; }
.punkt-kopf { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.punkt-kopf .nr { font-weight: 700; color: var(--akzent); min-width: 3.2rem; }
.punkt-kopf input[type=text] { flex: 1 1 16rem; font-weight: 600; }
.beschluss { margin: .6rem 0; padding: .5rem .8rem; border-left: 4px solid var(--akzent); background: var(--grund); }
.beschluss-form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.beschluss-form input[type=number] { width: 6rem; }
.reihenfolge-knoepfe { display: inline-flex; gap: .3rem; }
.protokolltext { white-space: pre-wrap; }

/* Auswahlfelder und Eingaben sprengen auf schmalen Bildschirmen nicht die Seite */
select, input[type=search], input[type=text], input[type=date] { max-width: 100%; }
