/* Rotkreuz-Hub · DRK OV Weitersburg
   Design A „Klar & hell“ (Standard) mit Dunkelmodus. Farben nur über Variablen,
   Systemschriften (keine externen Dienste). */

/* ================= Farben ================= */
:root, :root[data-theme="hell"] {
  --rot: #e30613; --rot-dunkel: #b8050f; --rot-text: #d00512; --rot-flaeche: #fdecee;
  --bg: #f2f2f6; --karte: #ffffff; --karte-2: #f2f2f6; --linie: #e6e6eb; --linie-karte: transparent;
  --text: #1c1c1e; --text-2: #86868b;
  --gruen: #1d8a4b; --gruen-bg: #e5f5ec; --gruen-rand: #9fd8b5;
  --gelb: #9a6200; --gelb-bg: #fff3d9; --gelb-rand: #f1c96b;
  --rot-bg: #fdecee; --rot-rand: #f3a7ad;
  --blau: #2f5fc4; --blau-bg: #eaf0fd; --tuerkis: #0b8f88; --tuerkis-bg: #e2f6f5;
  --grau-bg: #efeff3;
  --schatten: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --kopf-bg: #ffffff; --nav-bg: rgba(255,255,255,.97); --nav-linie: #e5e5ea;
  --feld-bg: #f4f4f7; --dialog-bg: #f2f2f6; --overlay: rgba(0,0,0,.35);
  --aktiv-bg: #1c1c1e; --aktiv-text: #ffffff;
  --figur-bg: radial-gradient(circle at 50% 40%, #e7e7ec, #d4d4dc);
  --hl-bg: linear-gradient(135deg, #fff5f5 0%, #ffffff 70%); --hl-rand: #f6c9cc;
  --tabelle-akt: rgba(0,0,0,.025);
  --weiss: #ffffff;
  --radius: 18px;
  color-scheme: light;
}
:root[data-theme="dunkel"] {
  --rot: #e30613; --rot-dunkel: #b0000e; --rot-text: #ff5d63; --rot-flaeche: #3b1517;
  --bg: #121214; --karte: #1e1e21; --karte-2: #29292c; --linie: #323236; --linie-karte: #2c2c30;
  --text: #f2f2f2; --text-2: #a1a1a7;
  --gruen: #5fd08d; --gruen-bg: #15301f; --gruen-rand: #2e6b46;
  --gelb: #f2b75b; --gelb-bg: #3a2b12; --gelb-rand: #8a6418;
  --rot-bg: #3b1517; --rot-rand: #7a2323;
  --blau: #8fb0ff; --blau-bg: #172544; --tuerkis: #4fe0d6; --tuerkis-bg: #0f3533;
  --grau-bg: #2a2a2d;
  --schatten: none;
  --kopf-bg: #1c1c1f; --nav-bg: rgba(28,28,31,.97); --nav-linie: #2e2e32;
  --feld-bg: #29292c; --dialog-bg: #161618; --overlay: rgba(0,0,0,.6);
  --aktiv-bg: #ffffff; --aktiv-text: #111111;
  --figur-bg: radial-gradient(circle at 50% 40%, #2c2c30, #222225);
  --hl-bg: linear-gradient(135deg, #2c1517 0%, #1e1e21 70%); --hl-rand: #5a2226;
  --tabelle-akt: rgba(255,255,255,.035);
  color-scheme: dark;
}

/* ================= Grundlagen ================= */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
main { max-width: 680px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); }
h2 { font-size: 24px; font-weight: 800; margin: 4px 0 14px; letter-spacing: -.4px; text-wrap: balance; }
h3 { font-size: 12px; margin: 0 0 10px; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.klein { font-size: 13px; color: var(--text-2); }
.kennzahl { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.leer { color: var(--text-2); font-size: 14px; text-align: center; padding: 14px 10px; line-height: 1.45; }

/* App-Hülle: Inhalt scrollt, Leiste bleibt unten */
body.app-modus { position: fixed; top: 0; left: 0; right: 0; height: var(--app-h, 100%); overflow: hidden; }
body.app-modus #app { height: 100%; display: flex; flex-direction: column; }
body.app-modus .scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }

/* ================= Kopf ================= */
.kopf { position: sticky; top: 0; z-index: 10; background: var(--kopf-bg); border-bottom: 3px solid var(--rot);
  padding: calc(env(safe-area-inset-top) + 8px) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 12px; }
.logo-platte { display: flex; align-items: center; flex: none; }
.logo-platte img { height: 46px; width: auto; display: block; }
.logo-platte .logo-dunkel { display: none; }
:root[data-theme="dunkel"] .logo-platte .logo-hell { display: none; }
:root[data-theme="dunkel"] .logo-platte .logo-dunkel { display: block; }
.glocke { margin-left: auto; position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--karte-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.glocke svg { width: 22px; height: 22px; }
.glocke i { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--rot); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--kopf-bg); }
.kopf .titel-klein { margin-left: auto; font-size: 12px; color: var(--rot); font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.demo-schalter { display: flex; background: var(--karte-2); border-radius: 999px; padding: 2px; margin-left: 8px; }
.demo-schalter button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.demo-schalter button.an { background: var(--rot); color: #fff; font-weight: 600; }

/* ================= Navigation ================= */
nav.unten { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--nav-bg); border-top: 1px solid var(--nav-linie);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; justify-content: space-around;
  padding: 6px max(4px, env(safe-area-inset-right)) max(4px, calc(env(safe-area-inset-bottom) - 14px)) max(4px, env(safe-area-inset-left)); }
body.app-modus nav.unten { position: relative; flex: none; }
nav.unten a { flex: 1; text-align: center; text-decoration: none; color: var(--text-2); font-size: 10.5px; font-weight: 600; padding: 4px 0; }
nav.unten a svg { display: block; margin: 0 auto 3px; width: 25px; height: 25px; }
nav.unten a.an { color: var(--rot); }

/* ================= Karten & Zeilen ================= */
.karte { background: var(--karte); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--linie-karte); box-shadow: var(--schatten); }
.karte.link { cursor: pointer; }
.karte.leer { padding: 26px 18px; }
.karte.highlight { background: var(--hl-bg); border-color: var(--hl-rand); }
.karte.gelb-rand { border-color: var(--gelb-rand); background: linear-gradient(135deg, var(--gelb-bg) 0%, var(--karte) 70%); }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.raster .karte { margin: 0; }
.zeile { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); }
.zeile:first-child { border-top: 0; padding-top: 0; }
.zeile:last-child { padding-bottom: 0; }
.zeile .haupt { flex: 1; min-width: 0; }
.zeile .titel { font-weight: 600; }
.abgehakt .titel, .abgehakt .plan-aufgabe { text-decoration: line-through; color: var(--text-2); }
details summary { cursor: pointer; color: var(--rot-text); font-size: 14px; font-weight: 600; margin-top: 6px; }
details summary.weiss { color: var(--text); }
details.zeile summary { list-style-position: inside; }
.checkliste { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.checkliste li { margin: 2px 0; }
.hinweis { background: var(--gelb-bg); color: var(--gelb); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.gelb-text { color: var(--gelb); }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: none; }

/* Startseite */
.gruss { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 2px 0 0; }
.gruss-datum { color: var(--text-2); font-size: 14px; margin: 0 0 14px; }
.pinnwand .pin { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; border-top: 1px solid var(--linie); }
.pinnwand .pin:first-of-type { border-top: 0; padding-top: 0; }
.pinnwand .pin b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.pinnwand .pin .punkt { margin-top: 6px; }
.pinnwand .kopfzeile { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pinnwand .kopfzeile h3 { margin: 0; }
.x-knopf { background: none; border: 0; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.plan-karte { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; }
.plan-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--rot); display: grid; place-items: center; }
.plan-icon svg { width: 28px; height: 28px; }
.plan-aufgabe { font-size: 19px; font-weight: 750; margin: 2px 0 4px; }

/* Fortschritt */
.leiste { height: 10px; border-radius: 999px; background: var(--grau-bg); overflow: hidden; margin: 10px 0 6px; display: flex; }
.leiste > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rot-dunkel), var(--rot)); }
.leiste.voll > span { background: linear-gradient(90deg, #1d8a4b, #2fbf6e); }
.leiste .geplant { background: repeating-linear-gradient(135deg, rgba(46,158,94,.55) 0 5px, transparent 5px 9px) !important; }

/* Pillen & Chips */
.pille { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.p-gruen { background: var(--gruen-bg); color: var(--gruen); }
.p-gelb { background: var(--gelb-bg); color: var(--gelb); }
.p-rot { background: var(--rot-bg); color: var(--rot-text); }
.p-grau { background: var(--grau-bg); color: var(--text-2); }
.p-blau { background: var(--blau-bg); color: var(--blau); }
.p-tuerkis { background: var(--tuerkis-bg); color: var(--tuerkis); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--karte-2); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }

/* Datum */
.datum-box { width: 48px; flex: none; text-align: center; border-radius: 12px; background: var(--karte-2); padding: 6px 0 5px; }
.datum-box span { display: block; font-size: 10.5px; text-transform: uppercase; font-weight: 800; color: var(--rot-text); letter-spacing: .5px; }
.datum-box b { display: block; font-size: 20px; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }

/* ================= Knöpfe & Formulare ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; cursor: pointer; background: var(--rot); color: #fff; text-decoration: none; }
.btn:active { background: var(--rot-dunkel); }
.btn.zweit { background: var(--karte-2); color: var(--text); }
.btn.gruen { background: #1f8a4c; color: #fff; }
.btn.gelb { background: #d49512; color: #111; }
.btn.rot-rahmen { background: transparent; border: 1px solid var(--rot); color: var(--rot-text); }
.btn.klein { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.voll { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .btn-text:focus-visible, a:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; }
.btn-text { background: none; border: 0; color: var(--rot-text); font-weight: 700; cursor: pointer; padding: 4px; }
.knopfzeile { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.knopfzeile.zwei-knoepfe > * { flex: 1; }
label { display: block; font-size: 13px; color: var(--text-2); font-weight: 600; margin: 10px 0 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--linie); background: var(--feld-bg); font-size: 16px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rot); outline-offset: -1px; }
input[type=checkbox]:focus, input[type=radio]:focus { outline: none; }
input[type=checkbox], input[type=radio] { accent-color: var(--rot); }
input[type=date], input[type=datetime-local], input[type=time] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
input[type=file] { padding: 8px; font-size: 14px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zwei > * { min-width: 0; }
.zwei.unten { align-items: end; }
.reiter { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button { border: 1px solid var(--linie); background: var(--karte); border-radius: 999px; padding: 7px 14px; font-size: 14px; white-space: nowrap; cursor: pointer; font-weight: 600; }
.reiter button.an { background: var(--aktiv-bg); color: var(--aktiv-text); border-color: var(--aktiv-bg); }
.haken-zeile { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); margin: 10px 0 4px; font-size: 14.5px; }
.haken-zeile input { width: auto; flex: none; }
.gruppen-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.gruppe-chip { margin: 0; cursor: pointer; }
.gruppe-chip input { position: absolute; opacity: 0; width: 0; }
.gruppe-chip > span { display: inline-flex; align-items: center; border: 1px solid var(--linie); background: var(--karte); border-radius: 999px; padding: 7px 12px; font-size: 14px; color: var(--text); font-weight: 600; }
.gruppe-chip input:checked + span { background: var(--aktiv-bg); color: var(--aktiv-text); border-color: var(--aktiv-bg); }

/* Schalter (Einstellungen) */
.schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--linie); color: var(--text); font-weight: 500; font-size: 15px; cursor: pointer; }
.schalter-zeile:last-child { border-bottom: 0; }
.schalter-zeile input[type=radio] { width: 20px; height: 20px; flex: none; }
.schalter { appearance: none; -webkit-appearance: none; width: 48px !important; height: 29px; min-height: 0 !important; border-radius: 999px; background: #c7c7cc; position: relative; flex: none; cursor: pointer; padding: 0 !important; border: 0 !important; transition: background .2s; }
:root[data-theme="dunkel"] .schalter { background: #48484c; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.schalter:checked { background: #34c759; }
.schalter:checked::after { transform: translateX(19px); }

/* ================= Dialoge ================= */
.dialog-hg { position: fixed; inset: 0; background: var(--overlay); z-index: 20; display: flex; align-items: flex-end; justify-content: center; padding-top: calc(env(safe-area-inset-top) + 24px); }
.dialog { background: var(--dialog-bg); width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; overflow-x: hidden; border-radius: 20px 20px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
@media (min-width: 700px) { .dialog-hg { align-items: center; padding-bottom: 24px; } .dialog { border-radius: 20px; } }
.dialog h2 { margin-top: 0; }
.dialog .karte { box-shadow: none; border-color: var(--linie); }
.wahl { display: grid; gap: 8px; margin-top: 12px; }
.wahl .btn { justify-content: flex-start; padding: 12px 14px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--aktiv-bg); color: var(--aktiv-text); padding: 10px 16px; border-radius: 12px; z-index: 30; font-size: 14px; max-width: 90vw; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
@media (prefers-reduced-motion: no-preference) { .dialog { animation: rein .25s ease-out; } }
@keyframes rein { from { transform: translateY(10px); opacity: .4; } to { transform: none; opacity: 1; } }
.popup-kopf { margin: -2px 0 8px; }
.popup-marke { background: var(--rot); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 3px 8px; border-radius: 6px; }

/* ================= Login ================= */
.login-seite { min-height: 100vh; background: linear-gradient(180deg, rgba(18,16,17,.15), rgba(18,16,17,.55) 40%, rgba(18,16,17,.92) 75%), url("bilder/login.jpg") center top/cover no-repeat; }
.login { max-width: 400px; margin: 0 auto; padding: 8vh 16px 24px; }
.login .logo-feld { background: #fff; border-radius: 20px; padding: 22px 26px; box-shadow: 0 10px 40px rgba(0,0,0,.45); margin-bottom: 14px; }
.login .logo-feld img { display: block; width: 100%; height: auto; }
.login .untertitel { text-align: center; color: #f0eeee; font-size: 14px; margin: 0 0 18px; }

/* ================= Diverses ================= */
.stimme { display: flex; flex-direction: column; align-items: center; min-width: 44px; border: 1px solid var(--linie); border-radius: 10px; background: var(--karte-2); padding: 4px 6px; cursor: pointer; }
.stimme.an { border-color: var(--rot); color: var(--rot-text); background: var(--rot-flaeche); }
.stimme b { font-size: 15px; }
table.liste { width: 100%; border-collapse: collapse; font-size: 14px; }
table.liste th, table.liste td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--linie); }
table.liste th { color: var(--text-2); font-weight: 600; font-size: 12px; border-top: 0; }
.dok { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.dok .pdf { width: 40px; height: 48px; border-radius: 6px; background: var(--rot-flaeche); color: var(--rot); font-size: 11px; font-weight: 800; display: grid; place-items: end center; padding-bottom: 6px; flex: none; }
.zurueck-leiste { margin: -4px 0 6px; }
.zurueck-leiste .btn-text { padding-left: 0; }
.dok-leiste { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--bg); margin: -16px -16px 10px; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.dok-leiste .btn-text { flex: none; }
.dok-titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; text-align: center; }
.dok-seiten img { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; margin-bottom: 10px; box-shadow: 0 1px 8px rgba(0,0,0,.18); }
.dok-seiten iframe { width: 100%; height: 75vh; border: 0; border-radius: 8px; background: #fff; }

/* Kleidung: Männchen */
.kleidung-raster { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; }
.figur-box, .figur-mini { background: var(--figur-bg); border-radius: 14px; padding: 8px; }
.figur { width: 100%; height: auto; display: block; }
.widget { display: flex; gap: 14px; align-items: center; }
.figur-mini { width: 92px; flex: none; padding: 6px; }
@media (max-width: 360px) { .kleidung-raster { grid-template-columns: 1fr; } .figur-box { max-width: 160px; margin: 0 auto; } }

/* Personensuche & Dienstzeiten */
.suche { position: relative; }
.treffer { margin-top: 6px; border: 1px solid var(--linie); border-radius: 12px; background: var(--karte); overflow: hidden; }
.treffer button { display: block; width: 100%; text-align: left; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--linie); cursor: pointer; font-size: 15.5px; }
.treffer button:last-child { border-bottom: 0; }
.treffer button:hover, .treffer button:focus { background: var(--karte-2); outline: none; }
.gewaehlt { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.gewaehlt:empty { display: none; }
.person { border: 1px solid var(--linie); background: var(--karte); border-radius: 14px; padding: 8px 10px 8px 14px; }
.person-kopf { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.person-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-weg { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--karte-2); font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.eigene-zeit { padding: 2px 4px 6px 0; }
.eigene-zeit label { margin-top: 6px; }
.ue-liste { display: flex; flex-direction: column; gap: 12px; }
.summe-box { margin-top: 16px; border-radius: 16px; padding: 14px 16px; background: var(--gruen-bg); border: 1px solid var(--gruen-rand); text-align: center; }
.summe-box .klein { color: var(--gruen); margin: 0; }
.summe-zahl { font-size: 40px; font-weight: 800; color: var(--gruen); line-height: 1.1; letter-spacing: -.5px; margin: 2px 0; }
.summe-box.leer { background: var(--karte); border-color: var(--linie); }
.summe-box.leer, .summe-box.leer .klein { color: var(--text-2); font-size: 14px; }
.summe-box.fehler { background: var(--rot-bg); border-color: var(--rot-rand); color: var(--rot-text); font-weight: 600; }
.entscheid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.entscheid [data-vorschlag] { grid-column: 1 / -1; }
.tn-wahl { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; font-weight: 500; color: var(--text); font-size: 15px; }
.tn-wahl input { width: 20px; height: 20px; flex: none; }
.einteilung .tn-wahl { padding: 8px 0; }
.leit-dienste details summary .pille { vertical-align: 1px; }
.anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.anhang { border: 1px solid var(--linie); background: var(--karte-2); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; cursor: pointer; text-align: left; }
.anhang-zeile { padding: 6px 0; }

/* Lexikon */
.lex-kachel { display: flex; gap: 12px; align-items: center; }
.lex-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--karte-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.lex-eintrag summary { cursor: pointer; }
.lex-text { margin-top: 10px; font-size: 15px; line-height: 1.5; }

/* Kalender */
.kal-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kal-kopf h2 { margin: 0; font-size: 20px; }
.kal-kopf .btn-text { font-size: 26px; padding: 2px 12px; }
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-bottom: 10px; }
.kal-wt { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-2); padding: 2px 0 4px; }
.kal-tag { min-height: 68px; background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 3px 2px 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; cursor: pointer; text-align: left; overflow: hidden; }
.kal-tag.fremd { opacity: .38; }
.kal-tag.an { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.kal-nr { font-size: 12.5px; font-weight: 700; padding-left: 3px; }
.kal-tag.heute .kal-nr { background: var(--rot); color: #fff; border-radius: 999px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; }
.kal-balken { display: block; background: var(--f); color: #fff; font-size: 9.5px; font-weight: 650; line-height: 1.35; border-radius: 3px; padding: 0 3px; white-space: nowrap; overflow: hidden; }
.kal-balken.unbest { background: repeating-linear-gradient(135deg, var(--f) 0 4px, transparent 4px 7px); outline: 1px solid var(--f); outline-offset: -1px; color: var(--text); }
.kal-balken.abges { opacity: .4; text-decoration: line-through; }
.kal-mehr { font-size: 10px; color: var(--text-2); padding-left: 3px; }
.kal-legende { margin-bottom: 12px; }
.kal-streifen { width: 6px; align-self: stretch; min-height: 36px; border-radius: 3px; background: var(--f); flex: none; }
.kal-streifen.unbest { background: repeating-linear-gradient(180deg, var(--f) 0 5px, transparent 5px 9px); outline: 1px solid var(--f); }
@media (min-width: 600px) { .kal-tag { min-height: 88px; } .kal-balken { font-size: 11px; } }

/* Ordnungsplan */
.plan-farbe { width: 10px; height: 26px; border-radius: 4px; flex: none; display: inline-block; vertical-align: middle; margin-right: 8px; }
.plan-tabelle-box { padding: 0; overflow: hidden; }
.plan-tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-tabelle { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.plan-tabelle th, .plan-tabelle td { padding: 6px; border-bottom: 1px solid var(--linie); vertical-align: top; text-align: left; }
.plan-tabelle thead th { font-size: 11.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.plan-tabelle tbody th { position: sticky; left: 0; background: var(--karte); z-index: 1; white-space: nowrap; font-weight: 650; vertical-align: middle; box-shadow: 1px 0 0 var(--linie); }
.plan-tabelle tbody th .plan-farbe { height: 18px; width: 6px; margin-right: 6px; }
.plan-tabelle .akt { background: var(--tabelle-akt); }
.plan-zelle { min-width: 78px; border-left: 4px solid var(--f); background: color-mix(in srgb, var(--f) 16%, transparent); border-radius: 6px; padding: 4px 6px; display: flex; flex-direction: column; gap: 1px; }
.plan-zelle.leer { background: var(--rot-bg); border-left-color: #c0392b; color: var(--rot-text); text-align: left; padding: 4px 6px; }
.plan-zelle span { white-space: nowrap; }
.plan-zelle span.ich, .ich-text { font-weight: 800; color: var(--text); }
.plan-zelle span.fertig { opacity: .7; }
.plan-zelle em { font-style: normal; font-size: 10.5px; color: var(--text-2); }
.plan-zelle em.zuwenig { color: var(--rot-text); font-weight: 700; }

/* Kleidungstabelle der Leitung */
.kl-tabelle td { text-align: center; font-weight: 700; white-space: nowrap; }
.kl-tabelle td small { display: block; font-weight: 500; font-size: 10.5px; color: var(--text-2); }
.kl-tabelle thead th { white-space: normal; min-width: 64px; font-size: 10.5px; }
.kl-ok { color: var(--gruen); }
.kl-gebr { color: var(--gelb); }
.kl-defekt { color: var(--rot-text); background: var(--rot-bg); }
.kl-fehlt { color: var(--rot-text); background: color-mix(in srgb, var(--rot-bg) 60%, transparent); }
.kl-opt { color: var(--text-2); }
.kl-tabelle tbody th.kl-rot { background: var(--rot-bg); color: var(--rot-text); box-shadow: inset 4px 0 0 #c0392b; }
.kl-tabelle tbody th.kl-gelb { background: var(--gelb-bg); color: var(--gelb); box-shadow: inset 4px 0 0 #d49512; }
.kl-tabelle tbody th.kl-gruen { background: var(--gruen-bg); color: var(--gruen); box-shadow: inset 4px 0 0 #1f8a4c; }
.kl-legende { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 2px 10px; }

/* Bildung */
.lg-ablauf { line-height: 1.5; }
.lg-pruef { border-bottom: 1px solid var(--linie); padding-bottom: 10px; margin-bottom: 8px; }
.lg-pruef:last-child { border-bottom: 0; margin-bottom: 0; }
.lg-pruef .entscheid { margin-top: 4px; }
.lg-monat { font-size: 12px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .7px; margin: 16px 4px 8px; }
.karte .lg-monat:first-of-type { margin-top: 6px; }
.lg-karte.vorbei { opacity: .55; }
.lg-karte.blink { box-shadow: 0 0 0 2px #2e9e5e; }
.lg-plan-zeile { cursor: pointer; align-items: center; }
.lg-plan-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bildung-karte { border-color: var(--gruen-rand); background: linear-gradient(135deg, var(--gruen-bg) 0%, var(--karte) 65%); }
.jahr-kal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 560px) { .jahr-kal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mm-titel { font-size: 13px; font-weight: 750; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.mm-zahl { background: #1f8a4c; color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 6px; line-height: 16px; }
.mm-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mm-wt { font-size: 9px; color: var(--text-2); text-align: center; font-weight: 700; }
.mm-tag { font-size: 10.5px; text-align: center; line-height: 19px; border-radius: 5px; color: var(--text-2); background: none; border: 0; padding: 0; }
.mm-tag.heute { color: var(--text); font-weight: 800; box-shadow: inset 0 0 0 1px var(--rot); }
.mm-tag.lg { background: color-mix(in srgb, #1f8a4c 35%, transparent); color: var(--text); font-weight: 700; cursor: pointer; }
.mm-tag.lg.meins { background: #1f8a4c; color: #fff; }
.mm-legende { margin-top: 10px; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.mm-legende > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mm-legende .mm-tag { display: inline-block; width: 19px; }
.lg-tage { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.lg-tag { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; align-items: center; background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 8px 10px; }
.lg-tag b { font-size: 14px; grid-column: 1 / -1; }

/* Fahrtkosten */
.fk-fahrt { border: 1px solid var(--linie); background: var(--karte); border-radius: 14px; padding: 8px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.fk-kopf { display: grid; grid-template-columns: 1fr 84px 36px; gap: 6px; align-items: center; }
#fk-pdf { margin-top: 12px; }
.fk-warnung { background: var(--gelb-bg); color: var(--gelb); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.fk-rueck { text-align: left; padding: 4px 2px; font-size: 13.5px; }
.fk-zeile { padding: 12px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.fk-zeile:last-child { border-bottom: 0; }
.fk-oben { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.fk-oben b:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fk-betrag { white-space: nowrap; font-size: 17px; }
.fk-anlass { font-size: 14.5px; margin: 2px 0; }

/* Mitglieder */
.m-buchstabe { font-size: 12px; font-weight: 800; color: var(--text-2); margin: 14px 4px 6px; letter-spacing: .5px; }
.m-karte { padding: 4px 0; }
.m-zeile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid var(--linie); text-align: left; cursor: pointer; color: var(--text); }
.m-zeile:last-child { border-bottom: 0; }
.m-avatar { width: 38px; height: 38px; border-radius: 50%; background: #8e8e93; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; }
.m-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-text small { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-rollen { display: flex; gap: 4px; }
.m-rollen i, .m-legende i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.m-legende { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 2px 0; }
.m-legende span { display: inline-flex; align-items: center; gap: 5px; }
.m-fuss { margin: 18px 4px 8px; line-height: 1.8; }
.m-fuss .btn-text { padding: 0 2px; font-size: 13px; }

/* Nachweise */
.nw-feld { display: block; width: 100%; text-align: left; color: var(--text); cursor: pointer; border-left: 6px solid; }
.nw-gruen { background: var(--gruen-bg); border-color: #1f8a4c; }
.nw-gelb { background: var(--gelb-bg); border-color: #d49512; }
.nw-rot { background: var(--rot-bg); border-color: #c0392b; }
.nw-kopf { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 16px; }
.nw-zeile-info { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 2px 0; }
.nw-zeile-info span { color: var(--text-2); }
.nw-zeile-info b { font-weight: 650; text-align: right; }

/* Mehr */
.mehr-gruppe { margin-bottom: 18px; }
.mehr-titel { font-size: 12px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .7px; margin: 0 6px 6px; }
.mehr-liste { background: var(--karte); border: 1px solid var(--linie-karte); border-radius: 18px; overflow: hidden; box-shadow: var(--schatten); }
.mehr-zeile { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--linie); padding: 11px 14px; text-align: left; color: var(--text); cursor: pointer; }
.mehr-zeile:last-child { border-bottom: 0; }
.mehr-zeile:active { background: var(--karte-2); }
.mehr-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.mehr-icon svg { width: 21px; height: 21px; }
.mehr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mehr-text b { font-size: 16px; font-weight: 650; }
.mehr-text small { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mehr-pfeil { color: var(--text-2); font-size: 22px; line-height: 1; }
.mehr-zahl { background: var(--rot); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; }
.mehr-version { text-align: center; font-size: 12px; color: var(--text-2); margin: 6px 0 4px; }

/* Neuigkeiten & Diagnose */
.neu-version { margin-bottom: 14px; }
.neu-version h4 { margin: 0 0 4px; font-size: 15px; }
.neu-version ul { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; }
.neu-version li { margin: 3px 0; }
.diagnose { font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre-wrap; color: var(--text-2); }
