/* Vereinsverwaltung: ein Stylesheet, keine Skripte, hell und dunkel. */
:root {
  --grund: #f6f4ef;
  --flaeche: #ffffff;
  --text: #1f2328;
  --leise: #646b75;
  --linie: #d9d5cb;
  --akzent: #2b4a7a;
  --akzent-text: #ffffff;
  --ok: #23683a;
  --ok-grund: #e2f1e5;
  --warn: #8a5300;
  --warn-grund: #fbecd0;
  --rot: #a12a22;
  --rot-grund: #fbe4e1;
  --aus-grund: #e8e6e0;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #16181c;
    --flaeche: #20242a;
    --text: #e7e9ec;
    --leise: #9aa2ad;
    --linie: #363c45;
    --akzent: #8fb2ea;
    --akzent-text: #10141a;
    --ok: #86d39b;
    --ok-grund: #1c3524;
    --warn: #f0c170;
    --warn-grund: #3d2f12;
    --rot: #f19990;
    --rot-grund: #46201d;
    --aus-grund: #2c3037;
  }
}

* { box-sizing: border-box; }
html { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { margin: 0; background: var(--grund); color: var(--text); }
a { color: var(--akzent); }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; line-height: 1.2; }
h1 .leise { font-weight: 400; font-size: 1.1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
code { background: var(--aus-grund); padding: .1em .35em; border-radius: 4px; }
.leise { color: var(--leise); font-size: .92em; }

.kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  padding: .6rem 1rem; background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.kopf .marke { font-weight: 700; color: var(--text); text-decoration: none; }
.kopf nav { display: flex; flex-wrap: wrap; gap: .15rem; flex: 1; }
.kopf nav a { padding: .35rem .65rem; border-radius: 6px; color: var(--text); text-decoration: none; }
.kopf nav a:hover { background: var(--aus-grund); }
.kopf nav a.aktiv { background: var(--akzent); color: var(--akzent-text); }
.kopf .konto { display: flex; align-items: center; gap: .75rem; margin: 0; }

.demo { margin: 0; padding: .45rem 1rem; text-align: center; font-size: .92rem; background: var(--warn-grund); color: var(--warn); }
main { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.schmal { max-width: 28rem; margin: 0 auto; }

.leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.leiste h1, .leiste h2 { margin: 0; }
.leiste > span { display: flex; flex-wrap: wrap; gap: .5rem; }
h2 + .leiste, .kacheln + .leiste, .tabelle + .leiste { margin-top: 2rem; }

button, .knopf {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .5rem .95rem; border-radius: 6px; border: 1px solid var(--akzent);
  background: var(--akzent); color: var(--akzent-text);
}
button.zweit, .knopf.zweit { background: transparent; color: var(--akzent); }
button.rot { background: var(--rot); border-color: var(--rot); color: var(--flaeche); }
button.schlicht { background: none; border: none; color: var(--akzent); padding: .25rem; font-weight: 400; text-decoration: underline; }
button.rot-text { color: var(--rot); }
button:focus-visible, .knopf:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--akzent); outline-offset: 2px;
}

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.karte h2 { margin-top: 0; }
fieldset { border: none; border-top: 1px solid var(--linie); margin: 1rem 0 0; padding: .75rem 0 0; }
legend { font-weight: 700; padding-right: .5rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 1rem; }
.feld { margin-bottom: .75rem; }
.feld label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .2rem; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%; padding: .45rem .6rem;
  background: var(--grund); border: 1px solid var(--linie); border-radius: 6px;
}
input, select { min-height: 2.5rem; }
input[type="checkbox"] { width: auto; min-height: 0; }
.haken { display: block; margin: .35rem 0; }
.knoepfe { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }

.filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 .75rem; margin: .75rem 0; }
.filter .feld { flex: 1 1 10rem; }
.filter button { margin-bottom: .75rem; }
.reihe { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 .75rem; flex: 1; }
.reihe .feld { flex: 1 1 12rem; }
.reihe button { margin-bottom: .75rem; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.zeile form { margin: 0; }
form.eng { min-width: 14rem; padding-top: .5rem; }

.tabelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: .55rem .75rem; border-bottom: 1px solid var(--linie); }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td.fest, td a[href*="/inventar/"] { white-space: nowrap; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; margin: .5rem 0 1rem; }
.kachel {
  display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1rem; text-decoration: none; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
}
.kachel:hover { border-color: var(--akzent); }
.kachel strong { font-size: 1.9rem; line-height: 1.1; }
.kachel span { color: var(--leise); }
.kacheln.klein .kachel span { color: var(--text); font-weight: 600; }

.reiter { display: flex; gap: .25rem; border-bottom: 1px solid var(--linie); margin: .75rem 0; }
.reiter a { padding: .4rem .8rem; text-decoration: none; color: var(--leise); border-bottom: 3px solid transparent; }
.reiter a.aktiv { color: var(--text); border-color: var(--akzent); font-weight: 600; }

.meldung { padding: .65rem .9rem; border-radius: 8px; margin: 0 0 1rem; background: var(--ok-grund); color: var(--ok); }
.meldung.fehler { background: var(--rot-grund); color: var(--rot); }
.meldung.hinweis { background: var(--warn-grund); color: var(--warn); }
.meldung ul { margin: 0; padding-left: 1.2rem; }
.meldung a { color: inherit; }

.marke-ok, .marke-warn, .marke-aus { display: inline-block; padding: .05rem .5rem; border-radius: 99px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.marke-ok { background: var(--ok-grund); color: var(--ok); }
.marke-warn { background: var(--warn-grund); color: var(--warn); }
.marke-aus { background: var(--aus-grund); color: var(--leise); }

.daten { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .35rem 1rem; margin: 1rem 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 1rem; }
.daten dt { color: var(--leise); }
.daten dd { margin: 0; overflow-wrap: anywhere; }

.wahl { list-style: none; margin: 0; padding: 0; }
.wahl label { display: block; padding: .3rem .25rem; border-radius: 6px; cursor: pointer; }
.wahl label:hover { background: var(--aus-grund); }
.wahl li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.wahl .menge { display: inline-flex; align-items: center; gap: .5rem; }
.wahl .menge label { display: inline; padding: 0; font-weight: 600; font-size: .9rem; }
.wahl .menge input { width: 5rem; min-height: 2rem; padding: .2rem .4rem; }

details summary { cursor: pointer; color: var(--akzent); }
details.gefahr { margin-top: 2.5rem; padding: .75rem 1rem; border: 1px solid var(--linie); border-radius: 10px; }
details.gefahr summary { color: var(--leise); }
details.gefahr form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--linie); }

th.rechts, td.rechts { text-align: right; }
td.plus { color: var(--ok); }
td.minus { color: var(--rot); }
td.aus { color: var(--leise); background: var(--aus-grund); }
td.fest { white-space: nowrap; }
td.aktionen { white-space: nowrap; }
td.aktionen form { display: inline-block; margin: 0 .25rem 0 0; }
td.aktionen button.zweit { padding: .2rem .6rem; }
table.zahlen td:not(:first-child), table.zahlen th:not(:first-child) { text-align: right; }
tr.zwischen td { font-weight: 700; background: var(--aus-grund); }
.jahre a { padding: .15rem .5rem; border-radius: 6px; text-decoration: none; }
.jahre a.aktiv { background: var(--akzent); color: var(--akzent-text); }
h1 .marke-warn { vertical-align: middle; }
td form { margin: 0; }

@media (max-width: 40rem) {
  .daten { grid-template-columns: 1fr; gap: 0; }
  .daten dd { margin-bottom: .5rem; }
  th, td { padding: .5rem; }
}
.schluessel { font-size: 1.15rem; letter-spacing: .05em; padding: .4rem .6rem; display: inline-block; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.codes code { font-size: 1.05rem; }

.qr-rahmen { display: inline-block; padding: .5rem; background: #fff; border-radius: 8px; border: 1px solid var(--linie); line-height: 0; }
.passkeys { list-style: none; padding: 0; margin: 0 0 1rem; }
.passkeys li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--linie); }
.passkeys form { margin: 0; }
[hidden] { display: none !important; }

@media print {
  .kopf nav, .kopf .konto, .knopf, button, .filter, details { display: none; }
  body { background: #fff; }
}
