/* =====================================================================
   Ergänzungen der Kleiderkammer zu basis.css (DLRG Vorgaben/Vorlagen).
   Nur Bausteine, die es in der Vorlage nicht gibt – Farben ausschließlich
   über die Variablen aus basis.css, damit der Dunkelmodus mitgeht.

   Steht absichtlich in einer eigenen Datei: Die Seiten enthalten kein
   style="…" und kein <style>. So kann die Content-Security-Policy
   eingebettete Stile verbieten (siehe main.php, sicherheits_kopfzeilen).
   ===================================================================== */

/* --- Zustände der Kleiderkammer ----------------------------------------
   Rot nur, wo etwas zu tun ist oder verloren ging (Weboberflaeche.md,
   Abschnitt 1). Abgeschlossenes ist grau oder grün. */
.zustand-ausgegeben { color: var(--blau); }       /* noch draußen */
.zustand-genehmigt  { color: var(--blau); }       /* in Bearbeitung */
.zustand-zurueck    { color: var(--gruen); }
.zustand-behalten,
.zustand-getauscht,
.zustand-abgelehnt,
.zustand-gesperrt   { color: var(--grau-hell); }
.zustand-verloren,
.zustand-defekt     { color: var(--rot-text); }

/* --- Zahlen ------------------------------------------------------------- */
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.knapp { color: var(--rot-text); font-weight: bold; }

/* Kennzahlen oben im Lager. Eigener Name, weil .kacheln/.kachel in
   basis.css für Wandbildschirme vergeben sind. */
.kennzahlen {
  display: grid; gap: .8rem; margin-bottom: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.kennzahl {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 4px;
  padding: .8rem 1rem; text-decoration: none; color: var(--grau); display: block; min-width: 0;
}
a.kennzahl:hover { background: var(--karte-grau); }
.kennzahl .wert {
  display: block; font-size: 1.7rem; font-weight: bold; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kennzahl .wert.offen { color: var(--rot-text); }
.kennzahl .titel { font-size: .88rem; color: var(--grau-hell); }

/* Zähler offener Dinge (Menü, Überschrift) – offene Vorgänge dürfen rot sein. */
.zaehler {
  display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px;
  background: var(--rot); color: #fff; font-size: .75rem; font-weight: bold;
  text-align: center; line-height: 1.4; vertical-align: .1em;
}

/* --- Formulare ---------------------------------------------------------- */
/* Nebeneinander stehende Felder (Artikel – Größe – Anzahl). */
.felder { display: flex; gap: .8rem; flex-wrap: wrap; }
.felder > div { flex: 1 1 11rem; min-width: 0; }
.felder > div.schmal { flex: 0 0 7rem; }

fieldset.schlicht { border: none; padding: 0; margin: .9rem 0 0; }
fieldset.schlicht legend { font-weight: bold; padding: 0; margin-bottom: .25rem; }

label.abstand { margin-top: .9rem; }
textarea.kurz { min-height: 6rem; }
input.zahlfeld { width: 5.5rem; }
input.breiter { width: 10rem; }
.reihe .breit, .reihe input.breit { flex: 1; min-width: 12rem; width: auto; }
.reihe.oben { margin-top: .8rem; }
h1.ohne-abstand, h2.ohne-abstand { margin: 0; }
hr.trennlinie { border: none; border-top: 1px solid var(--linie); margin: 1rem 0; }

/* Ein Datenfeld oder Konto mit seinen Einstellungen. */
.feldblock {
  border: 1px solid var(--linie); border-radius: 4px;
  padding: .7rem .8rem; margin-bottom: .7rem; background: var(--karte-grau);
}

/* Größen als Pillen mit Löschknopf (Verwaltung). */
form.pille {
  display: inline-flex; align-items: center; gap: .25rem;
  border: 1px solid var(--linie); border-radius: 999px; padding: .05rem .2rem .05rem .6rem;
  font-size: .85rem; background: var(--karte);
}
button.pille-knopf {
  border: none; background: none; padding: 0 .35rem; font-size: 1rem; line-height: 1.2;
  color: var(--grau-hell);
}
button.pille-knopf:hover { color: var(--rot-text); background: none; }

/* Filterknöpfe: die gewählte Auswahl wie im Menü mit blauem Strich. */
.filter a.btn.aktiv {
  font-weight: bold; box-shadow: inset 0 -3px 0 var(--link); background: var(--karte-grau);
}

/* --- Anträge ------------------------------------------------------------ */
.gross-nummer {
  font-size: 1.8rem; font-weight: bold; letter-spacing: .03em; margin: 0 0 .3rem;
  font-variant-numeric: tabular-nums;
}
.meldungstext {
  white-space: pre-wrap; overflow-wrap: break-word;
  background: var(--karte-grau); border-radius: 3px; padding: .8rem 1rem;
}
.angabenliste { width: auto; margin-top: .6rem; font-size: .95rem; }
.angabenliste th {
  background: none; text-align: left; padding: .2rem 1.2rem .2rem 0;
  border: none; color: var(--grau-hell); font-weight: normal; white-space: nowrap;
}
.angabenliste td { border: none; padding: .2rem 0; font-weight: bold; }
.mehrzeilig { white-space: pre-line; }

/* Buchen innerhalb einer Tabellenzeile (Karteikarte). */
details.buchen > summary {
  cursor: pointer; font-size: .85rem; color: var(--link); list-style: none; white-space: nowrap;
}
details.buchen > summary::-webkit-details-marker { display: none; }
details.buchen > summary::before { content: "▸ "; color: var(--grau-hell); }
details.buchen[open] > summary::before { content: "▾ "; }
details.buchen[open] {
  border: 1px solid var(--linie); border-radius: 4px; padding: .4rem .6rem;
  background: var(--karte-grau); min-width: 14rem;
}

/* --- Logbuch: eine Zeile je Eintrag, bewusst schmal --------------------- */
table.logbuch { font-size: .88rem; }
table.logbuch td { padding: .28rem .5rem .28rem 0; vertical-align: top; }
table.logbuch td.zeit { color: var(--grau-hell); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.logbuch td.vorgang { white-space: nowrap; color: var(--grau-hell); }
table.logbuch td.wer { color: var(--grau-hell); white-space: nowrap; text-align: right; }
@media (max-width: 700px) {
  /* Auf dem Handy reicht die Breite nicht für vier Spalten. */
  table.logbuch, table.logbuch tbody, table.logbuch tr, table.logbuch td { display: block; }
  table.logbuch tr { border-bottom: 1px solid var(--linie); padding: .4rem 0; }
  table.logbuch td { border: none; padding: 0; }
  table.logbuch td.zeit, table.logbuch td.vorgang, table.logbuch td.wer {
    display: inline; text-align: left; font-size: .82rem;
  }
  table.logbuch td.vorgang::before, table.logbuch td.wer::before { content: " · "; }
}

/* --- Verliehenes je Person (Ausgabe-Seite) ------------------------------ */
details.person {
  border: 1px solid var(--linie); border-radius: 4px;
  padding: .5rem .7rem; margin-bottom: .5rem; background: var(--karte-grau);
}
details.person > summary {
  cursor: pointer; list-style: none; display: flex; gap: .6rem; align-items: baseline;
}
details.person > summary::-webkit-details-marker { display: none; }
details.person > summary::before { content: "▸"; color: var(--grau-hell); }
details.person[open] > summary::before { content: "▾"; }
details.person[open] > summary { margin-bottom: .6rem; }
details.person .name { font-weight: bold; }

/* --- Hilfen ------------------------------------------------------------- */
/* Für die Vorlesehilfe da, auf dem Bildschirm unsichtbar. */
.unsichtbar {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Nur ohne JavaScript nötig (z. B. „Anzeigen“ neben einer Auswahl, die
   sich mit Skript selbst absendet). */
.js .ohne-skript { display: none; }
