/* Nachwuchswache */
:root {
  --rot: #c1121f;
  --rot-dunkel: #8f0d17;
  --rot-hell: #fdecec;
  --orange: #e8590c;
  --gruen: #2b8a3e;
  --gruen-hell: #e6f4ea;
  --gelb-hell: #fff4d6;
  --gelb: #b7791f;
  --blau-hell: #e7f0fb;
  --blau: #1c5fa8;
  --text: #1d2330;
  --text-2: #5b6474;
  --linie: #e1e4ea;
  --flaeche: #f4f5f8;
  --karte: #ffffff;
  --seite: #1f2633;
  --seite-text: #c9cfdb;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--flaeche); }
body { font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--blau); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.25; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.versteckt { display: none !important; }
.klein { font-size: .85em; color: var(--text-2); }
.fett { font-weight: 600; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.zeile { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.zeile.ende { justify-content: flex-end; }
.zeile.zwischen { justify-content: space-between; }
.abstand { margin-top: 1rem; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Knöpfe & Felder ─────────────────────────────────────────── */
button, .knopf {
  font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--linie);
  background: var(--karte); color: var(--text); padding: .55rem .95rem; min-height: 40px;
  display: inline-flex; align-items: center; gap: .45rem; justify-content: center; text-decoration: none;
}
button:hover { background: #f0f2f6; }
button:disabled { opacity: .55; cursor: default; }
button.primaer, .knopf.primaer { background: var(--rot); border-color: var(--rot); color: #fff; font-weight: 600; }
button.primaer:hover, .knopf.primaer:hover { background: var(--rot-dunkel); }
.knopf:hover { background: #f0f2f6; }
.knopf.mini { min-height: 32px; padding: .3rem .6rem; font-size: .88em; font-weight: 400; margin: 0; }
button.gefahr { color: var(--rot); border-color: #f1b5b9; }
button.gefahr:hover { background: var(--rot-hell); }
button.flach { border-color: transparent; background: transparent; }
button.flach:hover { background: rgba(0, 0, 0, .05); }
button.mini { min-height: 32px; padding: .3rem .6rem; font-size: .88em; }
label { display: block; font-weight: 600; font-size: .9em; margin-bottom: .3rem; }
.feld { margin-bottom: .9rem; }
.feld .hinweis { font-weight: 400; font-size: .82em; color: var(--text-2); margin-top: .25rem; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid #cfd4dc; border-radius: 8px;
  background: #fff; color: var(--text); min-height: 42px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid #f08c94; outline-offset: 1px; border-color: var(--rot); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; margin: .35rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--rot); }
.pw-feld { position: relative; }
.pw-feld input { padding-right: 3rem; }
.pw-feld button { position: absolute; right: 2px; top: 2px; bottom: 2px; min-height: 0; border: 0; background: transparent; padding: 0 .7rem; color: var(--text-2); }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .raster2 { grid-template-columns: 1fr; } }

/* ── Anmeldung ───────────────────────────────────────────────── */
.anmelde-seite { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: linear-gradient(160deg, #2a0a0d 0%, #5c0f16 45%, #1f2633 100%); }
.anmelde-karte { width: 100%; max-width: 420px; background: var(--karte); border-radius: 14px; padding: 2rem 1.8rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.anmelde-karte.breit { max-width: 560px; }
.anmelde-kopf { text-align: center; margin-bottom: 1.4rem; }
.anmelde-kopf .logo { width: 64px; height: 64px; margin: 0 auto .6rem; display: block; }
.anmelde-kopf h1 { margin: 0; font-size: 1.3rem; }
.anmelde-kopf .klein { margin-top: .2rem; }
.anmelde-karte button.primaer { width: 100%; min-height: 46px; margin-top: .4rem; }
.schritte { counter-reset: s; padding: 0; margin: 0 0 1rem; list-style: none; }
.schritte li { counter-increment: s; position: relative; padding-left: 2.2rem; margin-bottom: .9rem; }
.schritte li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--rot); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.qr { display: block; margin: .6rem auto; width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--linie); border-radius: 8px; }
.code-eingabe { font-size: 1.5rem; letter-spacing: .4em; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.notfallcodes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; background: var(--flaeche); border: 1px dashed #b9bfca; border-radius: 8px; padding: .8rem; margin: .6rem 0; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; text-align: center; }

/* ── Meldungen ───────────────────────────────────────────────── */
.meldung { padding: .7rem .9rem; border-radius: 8px; margin-bottom: .9rem; font-size: .93em; border: 1px solid transparent; }
.meldung.fehler { background: var(--rot-hell); color: #7a0a12; border-color: #f5c2c6; }
.meldung.info { background: var(--blau-hell); color: #133f70; border-color: #c4daf3; }
.meldung.ok { background: var(--gruen-hell); color: #1d5e2b; border-color: #bfe3c8; }
.meldung.warnung { background: var(--gelb-hell); color: #6b4a0e; border-color: #f0d9a4; }
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: #1f2633; color: #fff; padding: .75rem 1rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: rein .2s ease-out; }
.toast.fehler { background: #8f0d17; }
.toast.ok { background: #20662f; }
@keyframes rein { from { transform: translateY(8px); opacity: 0; } }

/* ── Grundlayout ─────────────────────────────────────────────── */
.rahmen { display: grid; grid-template-columns: 250px 1fr; min-height: 100%; }
.seitenleiste { background: var(--seite); color: var(--seite-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marke { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; color: #fff; text-decoration: none; }
.marke .logo { width: 38px; height: 38px; flex: none; }
.marke b { display: block; font-size: 1rem; }
.marke span { font-size: .78rem; color: var(--seite-text); }
.nav { padding: .4rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.nav-titel { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8892a6; padding: .9rem .7rem .3rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 8px; color: var(--seite-text); text-decoration: none; font-size: .95rem; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.aktiv { background: var(--rot); color: #fff; }
.nav a .zaehler { margin-left: auto; background: var(--orange); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; min-width: 1.3rem; text-align: center; font-weight: 700; }
.nav a.aktiv .zaehler { background: #fff; color: var(--rot); }
.leiste-fuss { margin-top: auto; padding: .8rem 1rem 1rem; font-size: .78rem; color: #8892a6; border-top: 1px solid rgba(255, 255, 255, .07); }
.hauptbereich { min-width: 0; display: flex; flex-direction: column; }
.kopfleiste { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.4rem; background: var(--karte); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 20; min-height: 60px; }
.kopfleiste h1 { margin: 0; font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopfleiste .wer { text-align: right; font-size: .85rem; line-height: 1.25; }
.kopfleiste .wer b { display: block; }
.kopfleiste .wer span { color: var(--text-2); }
.menue-knopf { display: none; }
.inhalt { padding: 1.4rem; max-width: 1200px; width: 100%; }
@media (max-width: 900px) {
  .rahmen { grid-template-columns: 1fr; }
  .seitenleiste { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 100; transform: translateX(-100%); transition: transform .2s; }
  .rahmen.menue-offen .seitenleiste { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .rahmen.menue-offen::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 90; }
  .menue-knopf { display: inline-flex; }
  .kopfleiste { padding: .6rem .9rem; }
  .kopfleiste .wer span { display: none; }
  .inhalt { padding: 1rem .9rem; }
}

/* ── Karten, Kacheln, Tabellen ───────────────────────────────── */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.karte > h2:first-child { margin-top: 0; }
.karten-kopf { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.karten-kopf h2 { margin: 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1rem 1.1rem; display: flex; gap: .85rem; align-items: center; text-decoration: none; color: inherit; }
a.kachel:hover { border-color: #f1b5b9; }
.kachel .kachel-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--rot-hell); color: var(--rot); display: flex; align-items: center; justify-content: center; flex: none; }
.kachel.warnung .kachel-icon { background: var(--gelb-hell); color: var(--gelb); }
.kachel .wert { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.kachel .titel { font-size: .85rem; color: var(--text-2); }
.kachel .untertitel { font-size: .78rem; color: var(--text-2); }
.tabelle-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .92em; background: #fff; }
th, td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: middle; }
th { background: #f7f8fa; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.aktionen { white-space: nowrap; text-align: right; width: 1%; }
td .mono, td.mono { white-space: nowrap; }
.klein-icon { width: 14px; height: 14px; vertical-align: -2px; }
td.aktionen button { margin-left: .25rem; }
.leer { text-align: center; color: var(--text-2); padding: 2rem 1rem; }
.marke-chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--flaeche); color: var(--text-2); white-space: nowrap; }
.marke-chip.gruen { background: var(--gruen-hell); color: var(--gruen); }
.marke-chip.rot { background: var(--rot-hell); color: var(--rot); }
.marke-chip.gelb { background: var(--gelb-hell); color: var(--gelb); }
.marke-chip.blau { background: var(--blau-hell); color: var(--blau); }

/* ── Reiter ──────────────────────────────────────────────────── */
.reiter { display: flex; gap: .25rem; border-bottom: 1px solid var(--linie); margin-bottom: 1rem; overflow-x: auto; }
.reiter a { padding: .65rem .9rem; text-decoration: none; color: var(--text-2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.reiter a.aktiv { color: var(--rot); border-bottom-color: var(--rot); }

/* ── Nachrichten ─────────────────────────────────────────────── */
.nachricht { border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .7rem; background: #fff; position: relative; }
.nachricht.ungelesen { border-left: 4px solid var(--orange); background: #fffaf6; }
.nachricht.wichtig { border-left: 4px solid var(--rot); }
.nachricht-kopf { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.nachricht-kopf h3 { margin: 0; font-size: 1rem; }
.nachricht-meta { font-size: .8rem; color: var(--text-2); margin: .2rem 0 .5rem; }
.nachricht-text { white-space: pre-wrap; word-wrap: break-word; }
.nachricht-fuss { display: flex; gap: .4rem; justify-content: flex-end; margin-top: .5rem; }
.filter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filter input, .filter select { width: auto; min-width: 160px; flex: 1; }

/* ── Dialog ──────────────────────────────────────────────────── */
.dialog-grund { position: fixed; inset: 0; background: rgba(17, 22, 31, .5); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem; overflow-y: auto; }
.dialog { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); animation: rein .18s ease-out; }
.dialog.breit { max-width: 760px; }
.dialog-kopf { padding: 1rem 1.2rem; border-bottom: 1px solid var(--linie); display: flex; align-items: center; justify-content: space-between; }
.dialog-kopf h2 { margin: 0; }
.dialog-inhalt { padding: 1.1rem 1.2rem; }
.dialog-fuss { padding: .8rem 1.2rem; border-top: 1px solid var(--linie); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.zugangsdaten { border: 1px solid var(--linie); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .6rem; }
.zugangsdaten .mono { font-size: 1.05rem; }

/* ── Sitzungs-Warnung ────────────────────────────────────────── */
#leerlauf { position: fixed; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 250; background: var(--gelb-hell); border: 1px solid #f0d9a4; border-radius: 10px; padding: .7rem 1rem; box-shadow: var(--schatten); display: flex; gap: .8rem; align-items: center; }

/* ── Druck ───────────────────────────────────────────────────── */
.versteckt-bildschirm { display: none; }
@media print {
  .versteckt-bildschirm { display: block; }
  .dialog-grund { position: static; background: none; padding: 0; }
  .dialog { box-shadow: none; }
  body * { visibility: hidden; }
  .druckbereich, .druckbereich * { visibility: visible; }
  .druckbereich { position: absolute; left: 0; top: 0; width: 100%; }
  .nicht-drucken { display: none !important; }
}

/* ── Mitglieder ──────────────────────────────────────────────── */
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: #fafbfc; }
td a.fett { color: var(--text); text-decoration: none; }
td a.fett:hover { color: var(--rot); }
td input, td select { min-height: 36px; padding: .35rem .5rem; }
table.medikamente td { padding: .35rem .4rem; }
table.medikamente td:first-child { min-width: 150px; }
table.medikamente td input { min-width: 70px; }
textarea.kurz { min-height: 90px; }
.nur-schmal { display: none; }
@media (max-width: 760px) { .nur-breit { display: none; } .nur-schmal { display: block; } }
.akte-kopf { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.akte-name { flex: 1; min-width: 220px; }
.akte-name h2 { margin-bottom: .35rem; }
.akte-aktionen { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
@media (max-width: 760px) { .akte-aktionen { flex-direction: row; flex-wrap: wrap; width: 100%; } }
.foto-rahmen { width: 110px; height: 130px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; }
.foto-rahmen img { width: 100%; height: 100%; object-fit: cover; }
.foto-platzhalter { width: 56px; height: 56px; color: #b6bcc7; stroke-width: 1.5; }
.foto-knoepfe label.knopf { display: inline-flex; }
.raster-adresse { display: grid; grid-template-columns: 3fr 1fr 1fr 2fr; gap: 0 1rem; }
@media (max-width: 640px) { .raster-adresse { grid-template-columns: 3fr 1fr; } }
.speicherleiste { position: sticky; bottom: 0; background: rgba(244, 245, 248, .96); backdrop-filter: blur(4px); border-top: 1px solid var(--linie); padding: .7rem 0; display: flex; gap: .6rem; justify-content: flex-end; align-items: center; z-index: 10; }
.speicherleiste [data-ungespeichert] { margin-right: auto; color: var(--orange); }

/* ── Termine ─────────────────────────────────────────────────── */
.marke-chip.lila { background: #efe9fb; color: #5b3aa8; }
.marke-chip.orange { background: #fff0e6; color: #b5480b; }
.kachel .wert.klein-wert { font-size: 1.05rem; line-height: 1.25; }
.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 9px; overflow: hidden; }
.umschalter button { border: 0; border-radius: 0; min-height: 38px; }
.umschalter button.aktiv { background: var(--rot); color: #fff; }
.monats-titel { margin: 1.1rem 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.monats-titel:first-child { margin-top: 0; }
.termin-zeile { display: flex; gap: .9rem; align-items: flex-start; padding: .7rem .6rem; border-radius: 10px; text-decoration: none; color: inherit; border: 1px solid transparent; }
.termin-zeile:hover { background: #fafbfc; border-color: var(--linie); }
.termin-zeile.heute { background: #fff8f2; }
.termin-zeile.abgesagt .termin-titel { text-decoration: line-through; color: var(--text-2); }
.datum-block { width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--rot-hell); color: var(--rot); padding: .3rem 0; line-height: 1.1; }
.datum-block span { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.datum-block b { display: block; font-size: 1.35rem; }
.datum-block.gross { width: 68px; padding: .5rem 0; }
.datum-block.gross b { font-size: 1.8rem; }
.termin-info { flex: 1; min-width: 0; }
.termin-titel { font-weight: 600; }
.termin-chips { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.monat-kopf { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.monat-kopf h3 { margin: 0 .4rem; min-width: 150px; text-align: center; }
.monat-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--linie); border-left: 1px solid var(--linie); }
.monat-wt { font-size: .75rem; font-weight: 600; color: var(--text-2); padding: .35rem; text-align: center; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); background: #f7f8fa; }
.monat-tag { min-height: 96px; padding: .25rem; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.monat-tag.fremd { background: #fafbfc; }
.monat-tag.fremd .tag-nr { color: #b6bcc7; }
.monat-tag.heute .tag-nr { background: var(--rot); color: #fff; border-radius: 999px; width: 1.6rem; text-align: center; }
.tag-nr { font-size: .8rem; font-weight: 600; padding: 0 .2rem; align-self: flex-start; }
.monat-termin { display: block; font-size: .75rem; padding: .1rem .3rem; border-radius: 4px; background: #eef0f4; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid #9aa3b2; }
.monat-termin.blau { background: var(--blau-hell); border-left-color: var(--blau); }
.monat-termin.gruen { background: var(--gruen-hell); border-left-color: var(--gruen); }
.monat-termin.rot { background: var(--rot-hell); border-left-color: var(--rot); }
.monat-termin.gelb { background: var(--gelb-hell); border-left-color: var(--gelb); }
.monat-termin.gemeinde { box-shadow: inset 0 0 0 1px #c9b8f0; }
.monat-termin.abgesagt { text-decoration: line-through; opacity: .6; }
@media (max-width: 640px) { .monat-tag { min-height: 64px; } .monat-termin { font-size: .65rem; padding: 0 .15rem; } .monat-termin b { display: none; } }
.raster4 { display: grid; grid-template-columns: 2fr 1fr 2fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .raster4 { grid-template-columns: 2fr 1fr; } }
.unsichtbar { visibility: hidden; }
.einrueck { margin: .2rem 0 .8rem 1.9rem; }
.termin-kopf { display: flex; gap: 1.1rem; align-items: flex-start; flex-wrap: wrap; }
.termin-kopf h2 { margin-bottom: .3rem; }
.durchgestrichen { text-decoration: line-through; color: var(--text-2); }
.info-liste { margin-top: .8rem; display: grid; gap: .35rem; }
.info-zeile { display: grid; grid-template-columns: 110px 1fr; gap: .6rem; }
.info-zeile > span { color: var(--text-2); font-size: .9em; }
.fortschritt { height: 8px; background: var(--flaeche); border-radius: 99px; overflow: hidden; margin: -.3rem 0 .9rem; }
.fortschritt > div { height: 100%; background: var(--gruen); width: 0; }
.gruppe-block { border: 1px solid var(--linie); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem; }
.gruppe-block summary { cursor: pointer; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; list-style: none; }
.gruppe-block summary::-webkit-details-marker { display: none; }
.gruppe-block summary::before { content: '▸'; color: var(--text-2); }
.gruppe-block[open] summary::before { content: '▾'; }
.zaehler-reihe { display: flex; gap: .3rem; flex-wrap: wrap; margin-left: auto; }
.antwort-liste { margin-top: .5rem; }
.antwort-zeile { display: grid; grid-template-columns: minmax(150px, 1.2fr) auto minmax(120px, 1fr); gap: .6rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--linie); }
.antwort-name b { display: block; }
.antwort-knoepfe { display: flex; gap: .3rem; }
.wahl .icon { width: 16px; height: 16px; }
.wahl.ja.gewaehlt { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.wahl.vielleicht.gewaehlt { background: #e0a100; border-color: #e0a100; color: #fff; }
.wahl.nein.gewaehlt { background: var(--rot); border-color: var(--rot); color: #fff; }
.antwort-kommentar { min-height: 34px !important; padding: .3rem .5rem !important; }
@media (max-width: 760px) {
  .antwort-zeile { grid-template-columns: 1fr; gap: .35rem; }
  .wahl span { display: none; }
  .wahl { min-width: 48px; }
}
input.zahl { width: 80px; }
table.gruppen-antworten td { vertical-align: top; }
.abo-link { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .6rem; word-break: break-all; font-size: .85rem; }
@media (max-width: 520px) {
  .kacheln { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .kachel { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .8rem; }
  .kachel .kachel-icon { width: 36px; height: 36px; }
}

/* ── Dienstbuch & Unfallbuch ─────────────────────────────────── */
.raster2.eng { gap: 0 .6rem; }
.dauer-anzeige { min-height: 42px; display: flex; align-items: center; font-weight: 600; color: var(--text-2); }
.raster4 .feld-breit { grid-column: span 2; }
.antwort-zeile.anw { grid-template-columns: minmax(150px, 1.2fr) auto minmax(110px, auto); }
.betreuer-check { margin: 0; font-weight: 400; }
@media (max-width: 760px) { .antwort-zeile.anw { grid-template-columns: 1fr; } }
.auswertung-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 1rem; }
@media (max-width: 640px) { .auswertung-raster { grid-template-columns: 1fr; } }
.auswertung-karte h3 { margin-bottom: .6rem; }
table.kennzahlen td { padding: .4rem .5rem; }
table.kennzahlen td:last-child { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.kennzahlen tr.haupt td { font-weight: 600; background: #fafbfc; }
table.kennzahlen tr.zusatz td { color: var(--text-2); font-style: italic; }
.einrueck-zelle { padding-left: 1.4rem !important; }
.vertraulich { display: flex; gap: .6rem; align-items: center; }
.anhang-liste { display: grid; gap: .5rem; }
.anhang { display: flex; gap: .7rem; align-items: center; border: 1px solid var(--linie); border-radius: 8px; padding: .5rem .7rem; }
.anhang-name { flex: 1; min-width: 0; }
.anhang-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhang-name .klein { display: block; }
.druck-unfall { display: none; }
@media print {
  .druck-unfall { display: block; font-size: 11pt; color: #000; }
  .druck-unfall h1 { font-size: 16pt; margin-bottom: .2rem; }
  .druck-unfall h2 { font-size: 12pt; margin: 1rem 0 .3rem; border-bottom: 1px solid #000; }
  .druck-unfall table { border: 0; }
  .druck-unfall th { text-transform: none; font-size: 10pt; color: #000; background: none; width: 30%; vertical-align: top; letter-spacing: 0; }
  .druck-unfall td, .druck-unfall th { border-bottom: 1px solid #ccc; padding: .25rem .4rem; white-space: pre-wrap; }
  .unterschriften { display: flex; gap: 3rem; margin-top: 3rem; }
  .unterschriften div { flex: 1; border-top: 1px solid #000; padding-top: .2rem; font-size: 9pt; }
  .tabelle-huelle { overflow: visible; border: 0; }
  .karte { box-shadow: none; break-inside: avoid; }
}

/* ── Kleiderkammer ───────────────────────────────────────────── */
.groesse-chip { display: inline-block; min-width: 2.2rem; text-align: center; padding: .1rem .4rem; border-radius: 6px; background: var(--blau-hell); color: var(--blau); font-weight: 600; font-size: .82rem; }
.matrix table { font-size: .85rem; }
.matrix th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: .74rem; vertical-align: bottom; min-width: 78px; }
.matrix td.zelle { text-align: center; }
.matrix .fix { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; box-shadow: 1px 0 0 var(--linie); }
.matrix th.fix { background: #f7f8fa; }
.bestand-zeile { display: flex; gap: 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.bestand-zeile.knapp .bestand-name b { color: var(--rot); }
.bestand-zeile.inaktiv, tr.inaktiv { opacity: .55; }
.bestand-name { width: 260px; display: flex; flex-direction: column; gap: .15rem; }
.groessen { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; }
.groesse-box { position: relative; min-width: 52px; border: 1px solid var(--linie); border-radius: 8px; padding: .25rem .4rem; text-align: center; line-height: 1.15; background: #fff; }
.groesse-box span { display: block; font-size: .72rem; color: var(--text-2); }
.groesse-box b { font-size: 1.05rem; }
.groesse-box small { display: block; font-size: .68rem; color: var(--text-2); }
.groesse-box.leer-box { background: #fafbfc; }
.groesse-box.leer-box b { color: #b6bcc7; }
.groesse-box i, .punkt-orange { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.punkt-orange { position: static; display: inline-block; vertical-align: middle; }
.mengen { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.menge-feld span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .15rem; }
.menge-feld small { font-weight: 400; color: var(--text-2); }
td.plus { color: var(--gruen); font-weight: 700; }
td.minus { color: var(--rot); font-weight: 700; }
@media (max-width: 640px) { .bestand-name { width: 100%; } }

/* ── Wissensdatenbank ────────────────────────────────────────── */
.kategorie-leiste { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.kategorie-leiste button { min-height: 34px; border-radius: 999px; padding: .25rem .8rem; font-size: .88rem; }
.kategorie-leiste button.aktiv { background: var(--rot); border-color: var(--rot); color: #fff; }
.kategorie-leiste button span { opacity: .7; margin-left: .2rem; }
.dokument { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem .2rem; border-top: 1px solid var(--linie); }
.dokument-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--flaeche); color: var(--text-2); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.dokument-icon.pdf { background: var(--rot-hell); color: var(--rot); }
.dokument-icon.word { background: var(--blau-hell); color: var(--blau); }
.dokument-icon.excel { background: var(--gruen-hell); color: var(--gruen); }
.dokument-icon.bild { background: #efe9fb; color: #5b3aa8; }
.dokument-icon.link { background: var(--gelb-hell); color: var(--gelb); }
.dokument-info { flex: 1; min-width: 0; }
.dokument-info h3 { margin: 0 0 .15rem; font-size: 1rem; }
.dokument-info p { margin: .25rem 0; white-space: pre-wrap; }
.dokument-aktionen { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .dokument { flex-wrap: wrap; } .dokument-aktionen { width: 100%; justify-content: flex-start; } }
td.aktionen.stapel { white-space: normal; }
td.aktionen.stapel button { display: flex; width: 100%; margin: 0 0 .25rem; }

/* ── Export ──────────────────────────────────────────────────── */
.schnellwahl { margin-bottom: .5rem; }
.gruppen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem 1rem; }
.of-block { border: 1px solid var(--linie); border-radius: 8px; padding: .45rem .6rem; }
.of-block b { display: block; font-size: .9rem; margin-bottom: .1rem; }
.of-block .check { margin: .15rem 0; font-size: .9rem; }
.export-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 1rem; }
.export-karte { display: flex; flex-direction: column; justify-content: space-between; gap: .6rem; }
.export-karte h3 { margin-bottom: .3rem; }
.export-karte p { margin: 0 0 .3rem; }
.export-karte .optionen { font-style: italic; }
.export-knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; }
.abstand-klein { margin-top: .3rem; }

/* Versionsübersicht */
.leiste-version { margin-top: .5rem; font-size: .72rem; }
.leiste-version a { color: #8892a6; text-decoration: none; }
.leiste-version a:hover { color: #fff; text-decoration: underline; }
.versions-kopf { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: var(--flaeche); border-radius: var(--radius); }
.versions-kopf .logo { width: 46px; height: 46px; flex: none; }
.versions-name { font-size: 1.35rem; font-weight: 700; }
.versions-name span { color: var(--rot); }
.info-liste h3 { margin-bottom: .2rem; }
.versions-liste { display: grid; gap: .5rem; }
.versions-eintrag { border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem .9rem; }
.versions-eintrag summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; list-style: none; }
.versions-eintrag summary::-webkit-details-marker { display: none; }
.versions-eintrag summary::before { content: '▸'; color: var(--text-2); }
.versions-eintrag[open] summary::before { content: '▾'; }
.versions-eintrag summary .klein { margin-left: auto; }
.versions-eintrag ul { margin: .5rem 0 .1rem; padding-left: 1.4rem; }
.versions-eintrag li { margin: .15rem 0; }
@media (max-width: 700px) { .versions-eintrag summary .klein { margin-left: 0; width: 100%; } }

/* Als App auf dem Startbildschirm: Ränder von Notch und Home-Leiste freihalten */
.leiste-fuss { padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
.inhalt { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); }
@media (display-mode: standalone) {
  .seitenleiste { padding-left: env(safe-area-inset-left, 0px); }
  .hauptbereich { padding-right: env(safe-area-inset-right, 0px); }
}
