/* Gestaltung nach dem DLRG CD/CI-Handbuch 2023:
   Hausfarben Rot #e30613 und Gelb #ffed00 (Gelb nur für die Wortmarke auf Rot),
   Schrift 80 % Schwarz #575756, Hausschrift Univers mit Arial als zugelassener Ersatzschrift.
   Blau ist der Bildmarke vorbehalten und wird hier nicht verwendet. */
:root {
  --rot: #e30613;
  --rot-dunkel: #b3000e;
  --rot-hell: #fdeced;
  --gelb: #ffed00; /* nur in der Wortmarke */
  --warnung-akzent: #d68a00;
  --grau: #575756;
  --text: #2e2e2d;
  --text-leise: #6b6b69;
  --flaeche: #f4f4f2;
  --karte: #ffffff;
  --linie: #e3e3df;
  --feld: #c8c8c3;
  --ok-hg: #e6f4ea; --ok-text: #1d6b33;
  --fehler-hg: #fdecec; --fehler-text: #a5000d;
  --warnung-hg: #fff4dc; --warnung-text: #7a4a00;
  --schatten: 0 1px 2px rgba(30, 30, 28, 0.06), 0 2px 10px rgba(30, 30, 28, 0.05);
  --schatten-hoch: 0 8px 28px rgba(30, 30, 28, 0.16);
  --radius: 14px;
  --radius-klein: 10px;
  --leiste: 264px;
  --schrift: "Univers", "DLRG Univers", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --rot-druck: #b3000e; /* Knopf gedrückt/Hover, in beiden Modi gleich */
  --ok-knopf: #1d6b33;
  --flaeche-leicht: #fafaf8;
  --chip: #ecebe7; --chip-text: #3d3d3c;
  --notiz: #fffbe0;
  --platzhalter: #9a9a96;
  --feld-hover: #a9a9a4;
  --blase: #2e2e2d; --blase-text: #ffffff; --blase-link: #ffffff;
  color-scheme: light dark;
}

/* Dunkler Modus nach der Geräteeinstellung (E-103). Kopfleiste bleibt DLRG-Rot; Rot als
   Schriftfarbe wird aufgehellt, damit es auf dunklem Grund lesbar bleibt. Druck bleibt hell. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --rot-dunkel: #ff8a8f;
    --rot-hell: #3d1a1c;
    --grau: #b4b4ae;
    --text: #ecece7;
    --text-leise: #a8a8a2;
    --flaeche: #141413;
    --karte: #1f1f1e;
    --linie: #353533;
    --feld: #575752;
    --ok-hg: #15301e; --ok-text: #7fd394;
    --fehler-hg: #3d1517; --fehler-text: #ff9a9e;
    --warnung-hg: #3a2c0c; --warnung-text: #f3c56b;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.35);
    --schatten-hoch: 0 8px 28px rgba(0, 0, 0, 0.6);
    --flaeche-leicht: #272726;
    --chip: #33332f; --chip-text: #dcdcd6;
    --notiz: #33300f;
    --platzhalter: #7d7d78;
    --feld-hover: #7a7a74;
    --blase: #ecece7; --blase-text: #1a1a19; --blase-link: #b3000e;
  }
  /* Bilder und Skizzen mit weißem Grund nicht grell: leicht abdunkeln */
  .skizze { filter: brightness(0.92); }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.suchzeile { display: block; margin: 0 0 12px; }
.suchzeile input { width: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 16px; color: var(--text); background: var(--flaeche); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--rot-dunkel); text-underline-offset: 2px; }
a:hover { color: var(--rot); }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 19px; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
img { max-width: 100%; }
.i { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.i-klein { width: 16px; height: 16px; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; border-radius: 6px; }
.sprungmarke { position: absolute; left: -999px; top: 8px; background: var(--karte); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.sprungmarke:focus { left: 8px; }

/* --- Gerüst: Seitenleiste (Desktop), App-Leiste und Tab-Leiste (Smartphone) --- */
.inhalt { max-width: 1160px; margin: 0 auto; padding: 28px 20px 56px; }
.angemeldet .inhalt { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.marke { display: inline-flex; align-items: center; text-decoration: none; }
.marke img { height: 40px; width: auto; display: block; }

.appleiste, .gastkopf { position: sticky; top: 0; z-index: 30; background: var(--rot); color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); min-height: 60px; }
.appleiste-titel { font-weight: 400; font-size: 16px; color: #fff; margin-left: 6px; line-height: 1.1; letter-spacing: .02em; }
.appleiste-person { margin-left: auto; color: #fff; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
.appleiste-person .i { width: 26px; height: 26px; }
.appleiste-person:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.seitenleiste { display: none; }
.seitenleiste-kopf { background: var(--rot); display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 72px; }
/* App-Name getrennt von der Wortmarke (Handbuch: Wortmarke | eine Bezeichnung, hier „Bezirk Bonn e.V.“) */
.seitenleiste-app { color: #fff; font-weight: 400; font-size: 16px; margin-left: 6px; line-height: 1.1; letter-spacing: .02em; }
.seitenleiste-zu { margin-left: auto; color: #fff; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
.seitenleiste-zu:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }
.menue { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; overflow-y: auto; }
.menue-eintrag { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--radius-klein); color: var(--text); text-decoration: none; font: inherit; font-weight: 700; font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left; }
.menue-eintrag .i { color: var(--grau); }
.menue-eintrag:hover { background: var(--flaeche); color: var(--text); }
.menue-eintrag[aria-current="page"] { background: var(--rot-hell); color: var(--rot-dunkel); }
.menue-eintrag[aria-current="page"] .i { color: var(--rot); }
.menue-eintrag.klein { font-weight: 400; font-size: 14px; min-height: 40px; }
.menue-gruppe > summary { list-style: none; }
.menue-gruppe > summary::-webkit-details-marker { display: none; }
.menue-gruppe .pfeil { margin-left: auto; transition: transform 0.15s; }
.menue-gruppe[open] .pfeil { transform: rotate(180deg); }
.menue-gruppe.enthaelt-aktiv:not([open]) > summary { background: var(--rot-hell); color: var(--rot-dunkel); }
.menue-gruppe.enthaelt-aktiv > summary .i:first-child { color: var(--rot); }
.menue-unter { display: flex; flex-direction: column; padding: 2px 0 6px 44px; }
.menue-unter a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.menue-unter a:hover { background: var(--flaeche); }
.menue-unter a[aria-current="page"] { color: var(--rot-dunkel); font-weight: 700; background: var(--rot-hell); }
.seitenleiste-fuss { margin-top: auto; padding: 10px; border-top: 1px solid var(--linie); }
.seitenleiste-fuss form { margin: 0; }
.person-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-klein); color: var(--text); text-decoration: none; }
.person-zeile .i { width: 32px; height: 32px; color: var(--grau); stroke-width: 1.5; }
.person-zeile span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.person-zeile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-zeile small { color: var(--text-leise); }
.person-zeile:hover { background: var(--flaeche); color: var(--text); }
.version { font-size: 12px; color: var(--text-leise); margin: 8px 12px 0; }
.version a { color: inherit; }

.tableiste { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--karte); border-top: 1px solid var(--linie); display: flex; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(30, 30, 28, 0.06); }
.tableiste a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--text-leise); text-decoration: none; font-size: 12px; font-weight: 700; }
.tableiste a .i { width: 24px; height: 24px; }
.tableiste a[aria-current="page"] { color: var(--rot); }
.tab-symbol { position: relative; display: inline-flex; }
.tab-symbol .zaehler { position: absolute; top: -6px; left: 14px; }
.tableiste a.tab-melden .tab-symbol { width: 44px; height: 44px; margin-top: -14px; border-radius: 50%; background: var(--rot); color: #fff; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(30, 30, 28, 0.25); }
.tableiste a.tab-melden .i { width: 26px; height: 26px; }
.menue-eintrag .zaehler { margin-left: auto; }

/* Smartphone: Menü als Blatt über der Seite */
@media (max-width: 999px) {
  .menue-offen { overflow: hidden; }
  .menue-offen .seitenleiste, .seitenleiste:target { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 50; background: var(--karte); overflow-y: auto; }
  /* Das ganze Blatt scrollt, nicht nur das Hauptmenü: das persönliche Menü ist länger geworden */
  .seitenleiste .menue { overflow: visible; flex: 0 0 auto; }
  .seitenleiste-fuss { margin-top: 0; }
  .seitenleiste-kopf { padding-top: calc(14px + env(safe-area-inset-top)); }
  .seitenleiste-fuss { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Desktop: feste Seitenleiste links */
@media (min-width: 1000px) {
  .angemeldet { padding-left: var(--leiste); }
  .angemeldet .inhalt { padding: 32px 40px 64px; }
  .appleiste, .tableiste { display: none; }
  .seitenleiste { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--leiste); background: var(--karte); border-right: 1px solid var(--linie); z-index: 20; overflow-y: auto; }
  /* Bei wenig Höhe scrollt die ganze Leiste; sonst steht das persönliche Menü unten */
  .seitenleiste .menue { overflow: visible; flex: 1 0 auto; }
  .seitenleiste-zu { display: none; }
  .menue { flex: 1 1 auto; }
}
.gastkopf { justify-content: flex-start; }
.gast .inhalt { max-width: 560px; }

/* --- Seiteninhalt --- */
.leise { color: var(--text-leise); font-size: 14px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.umbruch { white-space: pre-line; }
.pfad { font-size: 14px; margin-bottom: 10px; color: var(--text-leise); }
.pfad a { color: var(--text-leise); text-decoration: none; }
.pfad a:first-child::before { content: "‹ "; }
.pfad a:hover { color: var(--rot); text-decoration: underline; }
.titelzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.titelzeile h1, .titelzeile h2 { margin: 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-bottom: 16px; }
.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 22px; margin-bottom: 16px; }
.raster .karte { margin-bottom: 0; }
.karte.schmal { max-width: 560px; margin: 8px auto 16px; }
.karte > h2:first-child { margin-top: 0; }
.karte-vertraulich { box-shadow: inset 4px 0 0 var(--rot), var(--schatten); }
@media (max-width: 600px) {
  .inhalt { padding: 20px 14px 56px; }
  h1 { font-size: 24px; }
  .karte { padding: 18px 16px; border-radius: 12px; }
}

/* Hinweise */
/* Testsystem (E-151): auf jeder Seite unübersehbar */
.testband { position: sticky; top: 0; z-index: 60; padding: 6px 16px; text-align: center; font-size: 14px; color: #1b1b1b; background: repeating-linear-gradient(-45deg, #ffd400 0 18px, #ffe866 18px 36px); border-bottom: 2px solid #1b1b1b; }
.testband a { color: #1b1b1b; text-decoration: underline; margin-left: 6px; }
.hinweis { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-klein); font-weight: 700; margin: 0 0 16px; }
.hinweis a { color: inherit; }
.hinweis-ok { background: var(--ok-hg); color: var(--ok-text); }
.hinweis-fehler { background: var(--fehler-hg); color: var(--fehler-text); }
.hinweis-warnung { background: var(--warnung-hg); color: var(--warnung-text); }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: 16px; }
.formular label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.formular small { font-weight: 400; color: var(--text-leise); font-size: 13px; }
.formular.zeile { flex-direction: row; flex-wrap: wrap; align-items: flex-start; margin-top: 16px; }
/* Felder oben bündig, auch wenn ein Feld einen Hinweis darunter hat (R-1055); Knopf unten */
.formular.zeile > .knopf, .formular.zeile > .knopf-klein, .formular.zeile > button { align-self: flex-end; }
.formular.zeile label { flex: 1 1 200px; }
input, select, textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 11px 14px; min-height: 48px; border: 1px solid var(--feld); border-radius: var(--radius-klein); background: var(--karte); color: var(--text); transition: border-color 0.12s, box-shadow 0.12s; }
input::placeholder, textarea::placeholder { color: var(--platzhalter); }
input:hover, select:hover, textarea:hover { border-color: var(--feld-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.18); }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23575756' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select[multiple] { min-height: 140px; background-image: none; padding-right: 14px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--rot); }
textarea { resize: vertical; min-height: 96px; }
.optionen { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.optionen legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.formular .option { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; font-size: 15px; min-height: 40px; }
.option input { min-height: 0; width: 22px; height: 22px; flex: 0 0 22px; }
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filter label { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.filter input, .filter select { width: 100%; }
.filter input[type="search"] { padding-left: 42px; background: var(--karte) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23575756' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.zweispaltig > * { min-width: 0; }
@media (max-width: 520px) { .zweispaltig { grid-template-columns: 1fr; } }
.formular input, .formular select, .formular textarea { max-width: 100%; min-width: 0; }
fieldset { min-width: 0; }
fieldset.karte { margin: 0 0 16px; border: 0; }
fieldset.karte legend { padding: 0; float: left; width: 100%; margin-bottom: 12px; }
fieldset.karte legend h2 { margin: 0; }
fieldset.karte legend + * { clear: both; }
details > summary { cursor: pointer; }
.karte details > summary, .formular details > summary { font-weight: 700; min-height: 40px; display: flex; align-items: center; gap: 6px; color: var(--text); }
.karte details[open] > summary { margin-bottom: 8px; }
.zahl-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zahl-zeile input { width: 84px; }
.formular .zahl-zeile { flex-direction: row; justify-content: space-between; align-items: center; font-weight: 400; font-size: 15px; }
.formular .zahl-zeile input { width: 84px; flex: 0 0 84px; }

/* Knöpfe */
.knopf, .knopf-klein, .knopf-hell, .knopf-zweit { font: inherit; font-weight: 700; border-radius: var(--radius-klein); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s; }
.knopf { background: var(--rot); color: #fff; border: 0; min-height: 48px; padding: 0 22px; font-size: 16px; box-shadow: 0 1px 2px rgba(179, 0, 14, 0.3); }
.knopf:hover { background: var(--rot-druck); color: #fff; }
.knopf:active { transform: translateY(1px); }
.knopf.breit { width: 100%; }
.knopf-klein { background: var(--karte); color: var(--text); border: 1px solid var(--feld); min-height: 40px; padding: 0 14px; font-size: 14px; }
.knopf-klein:hover { border-color: var(--grau); background: var(--flaeche-leicht); color: var(--text); }
.knopf-hell { background: rgba(255, 255, 255, 0.15); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); min-height: 40px; padding: 0 14px; font-size: 14px; }
.knopf-zweit { background: var(--karte); color: var(--rot-dunkel); border: 2px solid var(--rot); min-height: 48px; padding: 0 20px; font-size: 16px; width: 100%; }
.knopf-zweit:hover { background: var(--rot-hell); }
.knopf-link { font: inherit; background: none; border: 0; padding: 4px 0; color: var(--rot-dunkel); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.knopf-link:hover { color: var(--rot); }
.knopfreihe { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.knopfreihe form { margin: 0; }
button[disabled] { opacity: 0.5; cursor: not-allowed; }
td form { margin: 0; }
form.inline { display: inline; margin-left: 8px; }
.typgruppe { margin-top: 18px; }
.typtabelle { table-layout: fixed; min-width: 640px; }
.typtabelle th:nth-child(1) { width: 28%; } .typtabelle th:nth-child(2) { width: 14%; }
.typtabelle th:nth-child(3) { width: 18%; } .typtabelle th:nth-child(4) { width: 16%; }
.typtabelle th:nth-child(6) { width: 120px; }
.typtabelle td:nth-child(6) { white-space: nowrap; overflow-wrap: normal; }
.typtabelle td { overflow-wrap: anywhere; }
.kategoriezeile { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.kategoriezeile:last-of-type { border-bottom: 0; }
.typgruppe h2 { margin: 0 0 8px; font-size: 1.1rem; }

/* Tabellen und Listen */
.tabellenrahmen { overflow-x: auto; background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 16px; }
.karte .tabellenrahmen { box-shadow: none; border-radius: 0; margin: 0 -4px 8px; }
.tabelle { width: 100%; border-collapse: collapse; background: transparent; }
.tabelle th, .tabelle td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--linie); font-size: 15px; vertical-align: middle; }
.tabelle th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-leise); background: var(--flaeche-leicht); white-space: nowrap; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: var(--flaeche-leicht); }
.tabelle a { font-weight: 700; text-decoration: none; }
.tabelle a:hover { text-decoration: underline; }
.liste { margin: 0; padding-left: 20px; }
.liste li { padding: 6px 0; }
.zeile-mit-aktion { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.liste .zeile-mit-aktion { list-style: none; margin-left: -20px; border-bottom: 1px solid var(--linie); padding: 10px 0; }
.liste .zeile-mit-aktion:last-child { border-bottom: 0; }
.baum { list-style: none; margin: 0; padding-left: 0; }
.baum .baum { padding-left: 20px; border-left: 2px solid var(--linie); margin: 4px 0 4px 8px; }
.baum li { padding: 4px 0; }
.daten { display: grid; grid-template-columns: minmax(9em, max-content) minmax(0, 1fr); gap: 8px 20px; margin: 0 0 12px; }
.daten dt { font-weight: 700; font-size: 14px; color: var(--text-leise); }
.daten dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .daten { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .daten dd { margin-bottom: 10px; }
}
.historie { margin: 12px 0 0; padding-left: 0; list-style: none; }
.historie li { position: relative; padding: 6px 0 6px 20px; border-left: 2px solid var(--linie); margin-left: 6px; }
.historie li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--karte); border: 2px solid var(--feld); }
.zeitleiste-neu::before { background: var(--rot) !important; border-color: var(--rot) !important; }
.zeitleiste-zurueckgenommen { color: var(--text-leise); }
.zeitleiste-berichtigt::before { border-style: dashed !important; }
.historie summary { cursor: pointer; font-weight: 700; min-height: 36px; }
.trenner { text-align: center; color: var(--text-leise); margin: 20px 0 12px; }
.funktionsliste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) { .nur-breit { display: none; } }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--chip-text); line-height: 1.5; white-space: nowrap; }
.chip-ok { background: var(--ok-hg); color: var(--ok-text); }
.chip-fehler { background: var(--fehler-hg); color: var(--fehler-text); }
.chip-warnung { background: var(--warnung-hg); color: var(--warnung-text); }

/* Reiter */
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.reiter a { padding: 12px 16px; text-decoration: none; color: var(--text-leise); font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.reiter a:hover { color: var(--text); }
.reiter a[aria-current="page"] { color: var(--rot-dunkel); border-bottom-color: var(--rot); }

/* Termine und ähnliche Listen */
.monat { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-leise); margin: 24px 0 8px; }
.terminliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.termin-eintrag { background: var(--karte); border-radius: 12px; box-shadow: var(--schatten); padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.karte .termin-eintrag { box-shadow: none; border: 1px solid var(--linie); }
.termin-eintrag.abgesagt .termin-text strong { text-decoration: line-through; }
.termin-eintrag.ungelesen { box-shadow: inset 4px 0 0 var(--rot), var(--schatten); }
.termin-link { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); flex: 1 1 220px; min-width: 0; }
.termin-link:hover { color: var(--text); }
.termin-link:hover strong { color: var(--rot-dunkel); }
.termin-datum { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 52px; border-radius: 12px; background: var(--rot-hell); font-size: 12px; font-weight: 700; color: var(--rot-dunkel); line-height: 1.15; }
.termin-datum strong { font-size: 16px; color: var(--text); }
.termin-text { display: flex; flex-direction: column; min-width: 0; }
.termin-text strong { overflow-wrap: break-word; hyphens: auto; }
.termin-status { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.antwort-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.knopf-ja, .knopf-nein { font: inherit; font-weight: 700; border-radius: var(--radius-klein); cursor: pointer; min-height: 40px; padding: 0 14px; font-size: 14px; }
.knopf-ja { background: var(--ok-knopf); color: #fff; border: 2px solid var(--ok-knopf); }
.knopf-nein { background: var(--karte); color: var(--text); border: 2px solid var(--feld); }
.antwort-knoepfe.gross button { min-height: 52px; flex: 1 1 140px; font-size: 16px; }
.antwort-knoepfe.klein button { min-height: 34px; padding: 0 10px; font-size: 13px; }
.knopf-ja.gewaehlt, .knopf-nein.gewaehlt { outline: 3px solid var(--text); outline-offset: 2px; }
.antwort-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.antwort-zeile + .antwort-zeile { margin-top: 6px; }
.antwort-name { font-weight: 700; font-size: 14px; }
.meldungstext { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }

/* Kacheln (Formulare, Verwaltung) */
.kachel { display: block; position: relative; padding-right: 48px; text-decoration: none; color: var(--text); transition: box-shadow 0.15s, transform 0.15s; }
.kachel::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--rot); border-top: 2px solid var(--rot); transform: translateY(-50%) rotate(45deg); }
.kachel:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); color: var(--text); }
.kachel:hover h2, .kachel:hover h3 { color: var(--rot-dunkel); }
.kachel p { margin: 0; color: var(--text-leise); }
.kachel h2, .kachel h3 { margin-top: 0; }
.auswahl-zeile { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.auswahl-zeile legend { width: 100%; }
.formular .auswahl-zeile { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
.formular .auswahl-zeile .option { flex: 0 0 auto; }
.schadenfoto { max-width: 100%; max-height: 360px; border-radius: var(--radius-klein); }

/* Vorgänge */
.vorgang-raster { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .vorgang-raster { grid-template-columns: minmax(0, 1fr); } }
.nachricht { border-left: 4px solid var(--linie); padding: 10px 14px; margin: 0 0 14px; background: var(--flaeche); border-radius: 8px; }
.nachricht header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.nachricht-ausgang { border-left-color: var(--grau); background: var(--flaeche-leicht); }
.nachricht-notiz { border-left-color: var(--warnung-akzent); background: var(--notiz); }
.nachricht-kopf { margin: 4px 0 8px; font-size: 13px; overflow-wrap: anywhere; }
.nachricht-text { overflow-wrap: anywhere; font-size: 15px; }
.anhaenge { list-style: none; padding: 0; margin: 8px 0 0; }
.anhaenge li::before { content: "📎 "; }

/* Wartung und Einrichtung */
.protokoll { background: #1f1f1e; color: #f0f0ea; padding: 14px; border-radius: var(--radius-klein); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }
.schritte { list-style: none; padding: 0; display: grid; gap: 10px; }
.schritt { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.schritt > div { flex: 1 1 240px; }
.schritt p { margin: 4px 0 0; }
.schritt.erledigt { opacity: 0.7; }

/* Material */
.qr svg { width: 160px; height: auto; display: block; background: #fff; } /* Scanner brauchen hellen Grund */
.etiketten { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 4mm; }
.etikett { color: #1a1a1a; display: flex; gap: 3mm; align-items: center; border: 1px dashed #bbb; padding: 3mm; break-inside: avoid; font-size: 11pt; background: #fff; }
.etikett .qr svg { width: 26mm; }
.ausgabezeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ausgabezeile strong { flex: 1 1 100%; }
.ausgabezeile label { display: flex; align-items: center; gap: 6px; margin: 0; }
.ausgabezeile input[name=groesse] { width: 5em; }
.frist { border-top: 1px solid var(--linie); padding: 10px 0; }
.frist:first-of-type { border-top: 0; }

/* Ablauf einer Schadensmeldung */
.schrittfolge { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: s; }
.schrittfolge li { counter-increment: s; padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--text-leise); font-size: 14px; }
.schrittfolge li::before { content: counter(s) ". "; }
.schrittfolge li.fertig { background: var(--ok-hg); color: var(--ok-text); }
.schrittfolge li.jetzt { background: var(--rot); color: #fff; font-weight: 700; }

/* Druck */
@media print {
  .appleiste, .seitenleiste, .tableiste, .gastkopf, .nicht-drucken, .hinweis, .sprungmarke { display: none !important; }
  body, .angemeldet { background: #fff; padding: 0; margin: 0; }
  .inhalt, .angemeldet .inhalt { padding: 0; margin: 0; max-width: none; }
  .karte { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Aufklappbereiche in Karten und Formularen mit eigenem Pfeil */
.karte details > summary, .formular details > summary { list-style: none; }
.karte details > summary::-webkit-details-marker, .formular details > summary::-webkit-details-marker { display: none; }
.karte details > summary::before, .formular details > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin: 0 8px 0 2px; transition: transform 0.15s; flex: 0 0 auto; }
.karte details[open] > summary::before, .formular details[open] > summary::before { transform: rotate(45deg); }
.karte details.kategorie { border-top: 1px solid var(--linie); }
.karte details.kategorie > summary { min-height: 52px; gap: 10px; }
.karte details.kategorie > summary h3 { margin: 0; font-size: 16px; }

/* Lagemonitor */
.lage { display: grid; gap: 16px; }
/* Links Karte und darunter die Fahrzeuge nach Status, rechts Warnungen/Pegel und Termine (E-138) */
.lage-alles { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); grid-template-areas: "karte umwelt" "fahrzeuge termine"; align-items: start; }
.lage-alles .lage-kartenfeld { grid-area: karte; }
.lage-alles .lage-fahrzeugfeld { grid-area: fahrzeuge; }
.lage-alles .lage-umweltfeld { grid-area: umwelt; align-self: stretch; }
.lage-alles .lage-terminfeld { grid-area: termine; }
@media (max-width: 1100px) { .lage-alles { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; } .lage-alles > * { grid-area: auto !important; } }
.lage-feld { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; min-width: 0; }
.lage-feld h2 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-leise); }
.lage-kartenfeld { padding: 0; overflow: hidden; }
/* Eigene Stapelebene: Leaflet setzt z-index bis 1000 – sonst liegt die Karte über dem Menü (R-1068, R-1072) */
#lage-karte { height: 520px; width: 100%; position: relative; z-index: 0; isolation: isolate; }
.lage-karte .lage-kartenfeld, .lage-karte #lage-karte { height: calc(100vh - 140px); }
.lage-liste { display: grid; gap: 8px; }
.lage-fahrzeug, .lage-termin { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--flaeche); }
.lage-status { flex: 0 0 52px; height: 52px; border-radius: 12px; color: #fff; font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lage-fahrzeug-text, .lage-termin > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.lage-fahrzeug-text span, .lage-termin span { color: var(--text-leise); font-size: 14px; }
.lage-hinweise { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lage-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; color: #fff !important; }
.lage-chip.rot { background: var(--rot); }
.lage-chip.gelb { background: #b37400; }
.lage-termin-zeit { flex: 0 0 auto; min-width: 92px; font-weight: 700; }
.lage-termin.laeuft { box-shadow: inset 4px 0 0 var(--rot); }
.lage-leer { color: var(--text-leise); }
.lage-marker { position: relative; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.lage-tooltip { font-weight: 700; }
.blinkt { animation: blinken 1s steps(2, start) infinite; }
@keyframes blinken { to { visibility: hidden; } }
#lage-stand.veraltet { color: var(--fehler-text); font-weight: 700; }

/* Vollbild für die Bildschirme in der Station */
body.monitor { background: #1f1f1e; color: #f2f2ee; padding: 0; min-height: 100vh; }
.monitor-kopf { background: var(--rot); display: flex; align-items: center; gap: 16px; padding: 10px 24px; }
.monitor-kopf img { height: 48px; width: auto; }
.monitor-name { color: #fff; opacity: .85; }
.monitor-stand { margin-left: auto; color: #fff; }
.monitor-stand.veraltet { background: var(--warnung-hg); color: var(--warnung-text) !important; padding: 2px 10px; border-radius: 8px; }
.monitor-uhr { color: #fff; font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.monitor .lage { padding: 16px; height: calc(100vh - 68px); }
body.monitor .lage-alles { grid-template-rows: 3fr 2fr; align-items: stretch; }
body.monitor .lage-feld { background: #2b2b2a; box-shadow: none; overflow: auto; }
body.monitor .lage-feld h2 { color: #bdbdb8; }
body.monitor .lage-fahrzeug, body.monitor .lage-termin { background: #363634; }
body.monitor .lage-fahrzeug strong, body.monitor .lage-termin strong { font-size: 22px; color: #fff; }
body.monitor .lage-fahrzeug-text span, body.monitor .lage-termin span, body.monitor .lage-leer { color: #c9c9c4; font-size: 17px; }
body.monitor .lage-status { flex-basis: 72px; height: 72px; font-size: 42px; }
body.monitor .lage-termin-zeit { font-size: 20px; color: #fff; min-width: 120px; }
body.monitor #lage-karte, body.monitor .lage-kartenfeld { height: 100%; min-height: 300px; }
body.monitor .lage-karte, body.monitor .lage-fahrzeuge, body.monitor .lage-termine, body.monitor .lage-umwelt { grid-template-columns: 1fr; }
body.monitor .lage-pegel strong, body.monitor .lage-warnung strong { font-size: 20px; color: #fff; }
body.monitor .lage-pegel-wert { font-size: 28px; color: #fff; }
body.monitor .lage-warnung { background: #363634; }

/* Anwesenheit */
.einchecken h1 { margin-bottom: 4px; }
.einchecken > p.leise:first-child { margin: 0; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.knopf.gross { min-height: 64px; font-size: 20px; margin: 12px 0; }
.einchecken-status { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-klein); margin: 16px 0; font-size: 18px; }
.einchecken-status.ok { background: var(--ok-hg); color: var(--ok-text); }
.einchecken-status .i { width: 32px; height: 32px; }
.qr-blatt { text-align: center; max-width: 640px; margin: 0 auto; }
.qr-gross svg { width: min(100%, 420px); height: auto; margin: 16px auto; display: block; }
.unterschrift { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 64px; }
.unterschrift span { border-top: 1px solid var(--text); padding-top: 6px; font-size: 13px; color: var(--text-leise); }

/* Veranstaltungen: Pool und Einteilung */
.pool { display: grid; gap: 10px; padding: 0; list-style: none; }
.pool-eintrag { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(260px, 1.4fr) auto; gap: 8px 16px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.pool-eintrag .formular { gap: 6px; }
.formular.einteilen .auswahl-zeile { flex-wrap: nowrap; gap: 8px; align-items: center; }
.formular.einteilen .auswahl-zeile select { flex: 1 1 0; width: auto; min-width: 0; }
.formular.einteilen .auswahl-zeile button { flex: 0 0 auto; }
.pool-eintrag > * { min-width: 0; }
.einteilen details summary { font-size: 14px; color: var(--text-leise); cursor: pointer; }
@media (max-width: 760px) { .pool-eintrag { grid-template-columns: auto 1fr; } .pool-eintrag > :not(.profilbild) { grid-column: 2; } }

/* Angebote, Tarife, Kalkulation */
.tarif-kopf { display: grid; grid-template-columns: 110px 1fr; gap: 14px; }
.regelzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.regeln li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.regeln code { font-size: 14px; background: var(--chip); padding: 2px 6px; border-radius: 4px; }
.regelformular { margin-top: 10px; }
.regel-reihenfolge input { max-width: 100px; }
.ohne-rahmen { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
.tabelle .zahl, .tabelle th.zahl { text-align: right; }
.angebotstabelle input { min-height: 36px; padding: 4px 8px; }
.angebotstabelle input.eng, .einzeilig input.eng { width: 76px; text-align: right; }
.angebotstabelle tfoot td { border-bottom: 0; }
.formular .einzeilig { flex-wrap: nowrap; gap: 8px; align-items: center; }
.formular .einzeilig select { flex: 1 1 0; min-width: 0; width: auto; }
.regeln { list-style: none; padding: 0; margin: 0; }
.regeln code { font-family: inherit; }
@media (max-width: 700px) {
  .formular .einzeilig { flex-wrap: wrap; }
  .formular .einzeilig select { flex: 1 1 100%; }
  .angebotstabelle thead { display: none; }
  .angebotstabelle, .angebotstabelle tbody, .angebotstabelle tfoot { display: block; }
  .angebotstabelle tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
  .angebotstabelle tbody td { display: block; border: 0; padding: 2px 0; text-align: left; }
  .angebotstabelle tbody td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-leise); font-weight: 700; }
  .angebotstabelle td.pos-leistung { grid-column: 1 / -1; }
  .angebotstabelle td.pos-aktion { align-self: end; }
  .angebotstabelle tfoot tr { display: flex; justify-content: space-between; }
  .angebotstabelle tfoot td { padding: 6px 0; }
  .tabellenrahmen:has(.angebotstabelle) { overflow: visible; }
}
.regeln li { list-style: none; }
.regeln .zeile-mit-aktion { margin-left: 0; border-bottom: 0; padding: 0 0 4px; }
@media (max-width: 700px) { .angebotstabelle tbody td.zahl { text-align: left; } }

/* Einsatzplan */
.skizze { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: #fff; padding: 8px; }
.skizze svg { display: block; max-width: none; height: auto; }
@media (min-width: 1000px) { .skizze svg { max-width: 100%; } }

/* Rückmeldungen */
.ablauf { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--flaeche-leicht); padding: 10px; border-radius: var(--radius-klein); max-height: 420px; overflow: auto; }
.exporttext { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.option.inline { display: inline-flex; margin-right: 4px; }

/* Breite begrenzen: nichts darf über den Bildschirm hinausragen (u. a. Chrome mit langen
   Auswahllisten und Tabellen in Rastern) */
input, select, textarea { max-width: 100%; }
.formular label, .raster > *, .zweispaltig > *, .regelzahlen > *, .lage-alles > *, .karte { min-width: 0; }
.tabellenrahmen { max-width: 100%; }
.tabelle td { overflow-wrap: break-word; }
.inhalt { min-width: 0; overflow-wrap: break-word; }
/* Nachtragen einer Rückmeldung: Kommentar und Knöpfe in einer Zeile */
.nachtrag { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-end; }
.nachtrag input[name="kommentar"] { flex: 1 1 180px; min-height: 34px; padding: 4px 8px; }
/* Sortierbare Tabellen und Suchfeld in Auswahllisten (static/bedienung.js) */
.tabelle th.sortierbar { cursor: pointer; user-select: none; white-space: nowrap; }
.tabelle th.sortierbar::after { content: " ↕"; color: var(--leise, #888); font-weight: 400; }
.tabelle th[aria-sort="ascending"]::after { content: " ↑"; color: inherit; }
.tabelle th[aria-sort="descending"]::after { content: " ↓"; color: inherit; }
.auswahl-suche { margin-bottom: 4px; }
/* Checklisten durchführen */
.checkpunkt { border: 0; border-bottom: 1px solid var(--linie); padding: 10px 0; margin: 0; display: grid; gap: 8px; }
.checkpunkt legend { font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.checkpunkt .antwort-knoepfe { clear: both; }
.wahl { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 8px; cursor: pointer; }
.wahl-ja:has(input:checked) { background: var(--ok-hg); border-color: var(--ok-text); }
.wahl-nein:has(input:checked) { background: var(--fehler-hg); border-color: var(--fehler-text); }
/* Materialauswahl und Scan-Knöpfe (static/materialwahl.js) */
.materialwahl { display: grid; gap: 6px; }
.materialwahl .zeile-suche { display: flex; gap: 8px; }
.materialwahl .zeile-suche input { flex: 1; }
.materialwahl .treffer { display: grid; gap: 4px; }
.treffer-eintrag { text-align: left; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--karte, #fff); cursor: pointer; font: inherit; }
.treffer-eintrag:hover, .treffer-eintrag:focus { border-color: currentColor; }
.scan-box { display: grid; gap: 6px; margin: 8px 0; }
.scan-box video { width: 100%; max-height: 50vh; border-radius: 8px; background: #000; }
/* Veranstaltung: Bereichsleiste bleibt oben, nächster Schritt hervorgehoben (E-092) */
.reiter.klebend { position: sticky; top: 0; z-index: 5; background: var(--flaeche); }
@media (max-width: 999px) { .reiter.klebend { top: 60px; } }
.naechster-schritt { display: flex; gap: 8px; align-items: flex-start; background: var(--warnung-hg); border-left: 4px solid var(--warnung-akzent); padding: 10px 12px; border-radius: 6px; }
.naechster-schritt .i { flex: none; margin-top: 2px; }
.optionen.spalten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.optionen.spalten legend { grid-column: 1 / -1; }
details.uebernehmen { margin-bottom: 12px; }

/* --- Handbuch und Erklärungen (E-101) --- */
.appleiste-hilfe { margin-left: auto; color: #fff; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
.appleiste-hilfe + .appleiste-person { margin-left: 0; }
.appleiste-hilfe .i { width: 24px; height: 24px; }
.appleiste-hilfe:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.seitenkopf-rechts { display: none; }
@media (min-width: 1000px) {
  .inhalt { position: relative; }
  .seitenkopf-rechts { display: flex; gap: 4px; position: absolute; top: 4px; right: 20px; }
  .seitenhilfe, .seitenglocke { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 14px; color: var(--text-leise); text-decoration: none; }
  .seitenhilfe:hover, .seitenglocke:hover, .seitenglocke[aria-current="page"] { background: var(--rot-hell); color: var(--rot-dunkel); }
}
/* Nachrichten (E-115): Glocke mit Zähler */
.appleiste-glocke { color: #fff; position: relative; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; margin-left: auto; }
.appleiste-glocke .i { width: 24px; height: 24px; }
.appleiste-glocke + .appleiste-hilfe { margin-left: 0; }
.appleiste-glocke .zaehler { position: absolute; top: 4px; right: 2px; }
.zaehler { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rot); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-sizing: border-box; }
.appleiste .zaehler { background: #fff; color: var(--rot); } /* Gelb nur in der Wortmarke (CD-Handbuch S. 7) */
.nachrichten { list-style: none; padding: 0; margin: 0; }
.nachrichten li { border-bottom: 1px solid var(--linie); }
.nachrichten li:last-child { border-bottom: 0; }
.nachrichten a { display: block; padding: 12px 4px 12px 22px; position: relative; color: var(--text); text-decoration: none; }
.nachrichten a:hover { background: var(--flaeche-leicht); }
.nachrichten .neu a::before { content: ""; position: absolute; left: 6px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--rot); }
.nachrichten .neu strong { font-weight: 700; }
.nachrichten strong { font-weight: 500; }
.nachrichten p { margin: 2px 0 0; color: var(--text-leise); font-size: 14px; white-space: pre-line; }
.nachrichten time { font-size: 12px; color: var(--text-leise); }
.hilfe-raster { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) {
  .hilfe-raster { grid-template-columns: minmax(0, 1fr) 260px; }
  .hilfe-inhalt { position: sticky; top: 24px; order: 2; }
}
.hilfe-inhalt { font-size: 14px; }
.hilfe-inhalt h2 { font-size: 15px; margin-bottom: 8px; }
.hilfe-inhalt ol { margin: 0 0 12px; padding-left: 20px; }
.hilfe-inhalt li { padding: 3px 0; }
.handbuch { max-width: 78ch; line-height: 1.6; }
.handbuch h2 { margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--linie); scroll-margin-top: 80px; }
.handbuch h3 { scroll-margin-top: 80px; }
.handbuch dl dt { margin-top: 12px; }
.handbuch dl dd { margin: 2px 0 0 0; padding-left: 12px; border-left: 3px solid var(--linie); }
.handbuch h2:first-of-type { border-top: 0; margin-top: 16px; }
.handbuch :target { background: var(--rot-hell); border-radius: 6px; box-shadow: 0 0 0 6px var(--rot-hell); }
.handbuch ul, .handbuch ol { padding-left: 22px; }
.handbuch li { margin: 4px 0; }
.handbuch code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.handbuch blockquote { margin: 16px 0; padding: 10px 16px; background: var(--warnung-hg); color: var(--warnung-text); border-radius: var(--radius-klein); }
.handbuch blockquote p { margin: 0; }
.handbuch kbd { border: 1px solid var(--linie); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 0.9em; }
.hilfe-blaettern { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--linie); font-size: 15px; }
.hilfe-treffer li { padding: 10px 0; border-bottom: 1px solid var(--linie); list-style: none; margin-left: -20px; }
.tipp { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -6px 0 -6px 2px; border-radius: 50%; color: var(--grau); cursor: pointer; vertical-align: middle; }
.tipp .i { width: 17px; height: 17px; }
.tipp:hover, .tipp[aria-expanded="true"] { color: var(--rot); background: var(--rot-hell); }
.tipp-blase { position: fixed; z-index: 60; max-width: min(340px, calc(100vw - 24px)); background: var(--blase); color: var(--blase-text); padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 400; line-height: 1.45; box-shadow: var(--schatten-hoch); }
.tipp-blase p { margin: 0; }
.tipp-blase a { color: var(--blase-link); display: inline-block; margin-top: 6px; font-weight: 700; }
.pruefliste { list-style: none; padding-left: 0; }
.pruefliste li { padding: 8px 0; border-bottom: 1px solid var(--linie); }
.pruefliste li:last-child { border-bottom: 0; }
.freigabeweg { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: weg; }
.freigabeweg li { counter-increment: weg; position: relative; padding: 8px 0 8px 40px; border-bottom: 1px solid var(--linie); }
.freigabeweg li:last-child { border-bottom: 0; }
.freigabeweg li::before { content: counter(weg); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--chip); color: var(--text-leise); }
.freigabeweg li.erledigt::before { content: "✓"; background: var(--ok-hg); color: var(--ok-text); }
.freigabeweg li.jetzt::before { background: var(--rot); color: #fff; }
.freigabeweg li.jetzt strong { color: var(--rot-dunkel); }
.dokumentliste { list-style: none; margin: 0; padding: 0; }
.dokumentliste li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.dokumentliste li:last-child { border-bottom: 0; }
.dokument-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.dokumentliste .knopf-klein { flex: none; }

/* Stufenleiste der Veranstaltung (E-107) */
.stufenleiste { margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--flaeche); padding: 6px 0; }
@media (max-width: 999px) { .stufenleiste { top: calc(60px + env(safe-area-inset-top)); } }
.stufenleiste ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; min-width: max-content; }
.stufenleiste a { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 999px; text-decoration: none; color: var(--text-leise); font-weight: 700; font-size: 14px; white-space: nowrap; border: 2px solid transparent; }
.stufenleiste a:hover { background: var(--flaeche-leicht); color: var(--text); }
.stufen-nr { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--chip); font-size: 12px; }
.stufenleiste .erledigt .stufen-nr { background: var(--ok-hg); color: var(--ok-text); }
.stufenleiste .aktuell .stufen-nr { background: var(--rot); color: #fff; }
.stufenleiste .aktuell a { color: var(--text); }
.stufenleiste a[aria-current="page"] { border-color: var(--rot); background: var(--karte); color: var(--text); }
.eckdaten { color: var(--text-leise); font-size: 14px; margin: -4px 0 16px; }

/* Kalenderansicht (E-108) */
.kal-ansichten { border-bottom: 0; margin: 0; }
.kal-ebenen { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; padding: 14px 18px; }
.kal-ebenen-feld { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kal-ebenen-feld legend { float: left; font-weight: 700; font-size: 14px; margin-right: 8px; padding: 0; display: flex; align-items: center; }
.kal-ebenen details summary { font-weight: 700; font-size: 14px; cursor: pointer; padding: 6px 0; }
.kal-fahrzeuge { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kal-schalter { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 8px; font-weight: 400; border: 1px solid var(--linie); border-left: 6px solid var(--kal, var(--grau)); font-size: 14px; cursor: pointer; background: var(--karte); }
.kal-kopf { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; }
.kal-kopf h2 { margin: 0 0 0 8px; }
.kal-termine { --kal: #2f6f9f; }
.kal-veranstaltungen { --kal: #e30613; }
.kal-fristen { --kal: #d68a00; }
.kal-f0 { --kal: #1d8a3a; } .kal-f1 { --kal: #7b3fa0; } .kal-f2 { --kal: #00838f; }
.kal-f3 { --kal: #a0522d; } .kal-f4 { --kal: #c2185b; } .kal-f5 { --kal: #5d6d1e; }
.kal-eintrag { display: block; font-size: 13px; line-height: 1.3; padding: 3px 6px; margin: 2px 0; border-radius: 6px; border-left: 4px solid var(--kal, var(--grau)); background: var(--flaeche-leicht); color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.kal-eintrag:hover { background: var(--chip); color: var(--text); }
.kal-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.kal-monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--linie); border: 1px solid var(--linie); border-radius: var(--radius-klein); overflow: hidden; margin-bottom: 16px; }
.kal-wt { background: var(--flaeche-leicht); font-size: 12px; font-weight: 700; color: var(--text-leise); text-align: center; padding: 6px 0; }
.kal-tag { background: var(--karte); min-height: 110px; padding: 4px; min-width: 0; }
.kal-fremd { background: var(--flaeche-leicht); }
.kal-fremd .kal-datum { color: var(--text-leise); }
.kal-datum { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; }
.kal-heute .kal-datum, h3.kal-heute::before { background: var(--rot); color: #fff; }
.kal-mehr { font-size: 12px; color: var(--text-leise); }
.kal-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kal-wochentag { background: var(--karte); border-radius: var(--radius-klein); padding: 8px; box-shadow: var(--schatten); min-width: 0; }
.kal-wochentag h3 { font-size: 14px; margin: 0 0 6px; }
.kal-wochentag.kal-heute { box-shadow: 0 0 0 2px var(--rot); }
.kal-wochentag .kal-eintrag { white-space: normal; }
.kal-liste h3 { font-size: 15px; margin: 16px 0 4px; }
.kal-liste h3:first-child { margin-top: 0; }
.kal-zeilen li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kal-zeilen .kal-eintrag { display: inline-block; max-width: 100%; white-space: normal; }
.nur-handy { display: none; }
@media (max-width: 760px) {
  .kal-monat .kal-tag { min-height: 54px; }
  .kal-monat .kal-eintrag { height: 6px; padding: 0; margin: 2px 0; border-left-width: 0; background: var(--kal, var(--grau)); }
  .kal-monat .kal-eintrag * { display: none; }
  .kal-monat .kal-mehr { display: none; }
  .kal-woche { grid-template-columns: 1fr; }
  .nur-handy { display: block; }
}
.kal-schalter input { min-height: 0; width: auto; margin: 0; }

/* Profilbilder (E-109): Bild oder Initialen im Kreis */
.profilbild { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--flaeche); color: var(--text-leise); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; user-select: none; }
img.profilbild { background: var(--linie); }
.profilbild-klein { width: 28px; height: 28px; font-size: 11px; }
.profilbild-liste { width: 40px; height: 40px; }
.profilbild-menue { width: 32px; height: 32px; font-size: 12px; }
.profilbild-leiste { width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, 0.85); }
.profilbild-gross { width: 72px; height: 72px; font-size: 26px; }
.person-kopf { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person-kopf h1 { margin: 0; }
.mit-bild { display: inline-flex; align-items: center; gap: 10px; }
.profilbild-pflege { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.profilbild-pflege .formular { flex: 1 1 260px; }
@media (max-width: 760px) { .person-kopf .profilbild-gross { width: 52px; height: 52px; font-size: 19px; } }
/* Formular wird gesendet (E-110): Knopf gesperrt, bis die nächste Seite kommt */
button[aria-busy="true"], input[aria-busy="true"] { cursor: progress; opacity: 0.6; }

/* Einsatz- und Funktagebuch (E-111): Erfassung zuerst fürs Handy */
.tb-eingabe { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.tb-eingabe label { margin: 0; display: block; }
.tb-eingabe input:not([type=radio]), .tb-eingabe textarea { width: 100%; box-sizing: border-box; }
.tb-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-zeit { font: inherit; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-klein); border: 1px solid var(--linie); background: var(--flaeche-leicht); color: var(--text-leise); cursor: pointer; }
.tb-zeit.gesetzt { color: var(--text); border-color: var(--rot); background: var(--karte); }
.tb-zeit-feld { width: auto; }
.tb-arten { display: inline-flex; border: 0; margin: 0 0 0 auto; padding: 0; gap: 0; }
.tb-arten label { display: inline-flex; cursor: pointer; }
.tb-arten input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tb-arten span { padding: 10px 12px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--linie); font-size: 14px; font-weight: 600; background: var(--karte); color: var(--text-leise); }
.tb-arten label:first-of-type span { border-radius: var(--radius-klein) 0 0 var(--radius-klein); }
.tb-arten label:last-of-type span { border-radius: 0 var(--radius-klein) var(--radius-klein) 0; }
.tb-arten label + label span { border-left: 0; }
.tb-arten input:checked + span { background: var(--rot); border-color: var(--rot); color: #fff; }
.tb-arten input:focus-visible + span { outline: 2px solid var(--rot); outline-offset: 2px; }
.tb-wer-felder { flex-wrap: nowrap; }
.tb-wer-felder label { flex: 1 1 0; min-width: 0; }
.tb-wer-felder input { font-size: 17px; }
.tb-tauschen { flex: 0 0 44px; height: 44px; font-size: 20px; border-radius: 50%; border: 1px solid var(--linie); background: var(--karte); color: var(--text); cursor: pointer; }
.tb-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tb-chip { flex: 0 0 auto; font: inherit; font-size: 14px; padding: 8px 12px; min-height: 38px; border-radius: 999px; border: 1px solid var(--linie); background: var(--flaeche-leicht); color: var(--text); cursor: pointer; white-space: nowrap; }
.tb-chip:active { background: var(--chip); }
.tb-eingabe textarea { font-size: 17px; min-height: 64px; resize: vertical; }
.tb-senden { justify-content: space-between; }
.tb-senden small { flex: 1 1 200px; }
.tb-meldestand { margin: 0; font-size: 14px; }
.tb-meldestand-warten { color: var(--warnung-text); }
.tb-meldestand-fehler { color: var(--rot-dunkel); font-weight: 600; }
.tb-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 8px; }
.tb-filter input[type=search] { flex: 1 1 220px; width: auto; }
.tb-liste { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.tb-eintrag { background: var(--karte); border-radius: var(--radius-klein); box-shadow: var(--schatten); padding: 10px 14px; border-left: 4px solid var(--linie); }
.tb-funk { border-left-color: #2f6f9f; }
.tb-telefon { border-left-color: #7b3fa0; }
.tb-vermerk { border-left-color: var(--grau); }
.tb-eintrag.tb-status { border-left-color: #d68a00; }
.tb-eintrag.tb-status { padding: 6px 14px; }
.tb-dringend { border-left-color: var(--rot); background: var(--fehler-hg); }
.tb-wartet { border-left-style: dashed; opacity: 0.8; }
.tb-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.tb-nr { color: var(--text-leise); font-variant-numeric: tabular-nums; min-width: 2ch; }
.tb-kopf time { font-variant-numeric: tabular-nums; }
.tb-kopf time small { color: var(--text-leise); }
.tb-wer { font-weight: 600; }
.tb-meldung { margin: 4px 0 2px; font-size: 16px; }
.tb-fuss { margin: 0; font-size: 12px; }
.tb-berichtigt .tb-text { text-decoration: line-through; color: var(--text-leise); }
.tb-berichtigt-hinweis { color: var(--rot-dunkel); font-weight: 600; }
.tb-einstellungen summary { cursor: pointer; }
.tb-einstellungen form + form { margin-top: 16px; }
.tagebuch-hinweis { margin-top: 12px; border-top: 1px solid var(--linie); padding-top: 12px; }
@media (max-width: 760px) {
  .tb-arten { margin-left: 0; }
  .tb-senden .knopf { width: 100%; min-height: 48px; }
}

/* Rückmeldungen: mehrere auswählen und bearbeiten */
.sammelleiste { display: flex; flex-direction: column; gap: 10px; }
.sammelaktionen { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.sammel-status { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sammel-status select, .sammel-status input { width: auto; min-height: 36px; }
.sammelleiste p { margin: 0; }

/* Umschalter Agenda/Kalender (R-1043) */
.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 999px; padding: 3px; background: var(--karte); }
.umschalter a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--text-leise); font-weight: 600; font-size: 14px; min-height: 32px; display: inline-flex; align-items: center; }
.umschalter a[aria-current="page"] { background: var(--rot); color: #fff; }

/* Datenschutzhinweise (E-116) */
.datenschutztext h2 { font-size: 18px; margin: 20px 0 6px; }
.datenschutztext h2:first-child { margin-top: 0; }
.datenschutztext p, .datenschutztext li { max-width: 72ch; }

/* Persönliches Menü: zugeklappt unter dem eigenen Namen */
.persoenlich > summary { list-style: none; cursor: pointer; }
.persoenlich > summary::-webkit-details-marker { display: none; }
.persoenlich > summary .pfeil { margin-left: auto; width: 18px; height: 18px; color: var(--text-leise); transition: transform 0.15s; }
.persoenlich[open] > summary .pfeil { transform: rotate(180deg); }
.persoenlich-punkte { padding-top: 4px; }

/* Fahrtenbuch: berichtigte oder stornierte Fahrten (E-118) */
.fahrt-ungueltig .daten dd { text-decoration: line-through; color: var(--text-leise); }
tr.fahrt-ungueltig td { text-decoration: line-through; color: var(--text-leise); }

/* Verbrauchsmaterial (E-119) */
.verbrauch { list-style: none; padding: 0; }
.verbrauch-zeile { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.verbrauch-zeile:last-child { border-bottom: 0; }
.verbrauch-zeile > details { grid-column: 1 / -1; }
.verbrauch-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.verbrauch-menge { font-variant-numeric: tabular-nums; font-weight: 700; }
.verbrauch-zeile.knapp .verbrauch-menge { color: var(--warnung-text); }
.verbrauch-entnahme { display: flex; gap: 6px; align-items: center; margin: 0; }
.verbrauch-entnahme input { width: 4.5em; text-align: right; }
.groessen-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; max-width: 360px; }
.groessen-raster input { width: 100%; }

/* Rollen und Rechte (E-120) */
.rechtematrix td.mitte, .rechtematrix th:not(:first-child) { text-align: center; }
.rechtematrix .gruppenzeile th { background: var(--flaeche); text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.rechtegruppe { margin-top: 12px; }
.rechtegruppe .option { align-items: flex-start; }

/* On-/Offboarding und Meldungen an den Bezirk (E-123) */
.ablauf-schritte { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.ablauf-schritte li { display: flex; gap: 10px; align-items: flex-start; }
.ablauf-schritte form.inline { margin: 0; }
.ablauf-haken { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--feld); font-weight: 700; color: var(--text-leise); text-decoration: none; flex: 0 0 28px; }
.ablauf-schritte li.erledigt .ablauf-haken { background: var(--ok-hg); border-color: var(--ok-text); color: var(--ok-text); }
.mailtext { white-space: pre-wrap; font-family: inherit; background: var(--flaeche); padding: 12px; border-radius: var(--radius-klein); }
.schmal-feld { width: 64px; }

/* Organisation: einklappbare Zweige (R-1054) */
.baum-zweig > summary { cursor: pointer; list-style: none; }
.baum-zweig > summary::-webkit-details-marker { display: none; }
.baum-zweig > summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--text-leise); transition: transform .15s; }
.baum-zweig[open] > summary::before { transform: rotate(90deg); }

/* Lange Wörter (Adressen, Pfade, Kennungen) brechen statt die Seite auf dem Handy zu
   verbreitern – sonst wandern Kopf- und Menüleiste beim seitlichen Wischen mit (R-1065) */
.liste li, details > summary, .daten dd, .hinweis, .karte > p { overflow-wrap: anywhere; }

/* Tanken (R-1066) */
.tank-balken { height: 10px; background: var(--flaeche); border-radius: 5px; overflow: hidden; margin: 6px 0; }
.tank-balken span { display: block; height: 100%; background: var(--ok-text); }
.tank-staende .titelzeile { margin: 0; }

/* Aufgabenkorb auf der Startseite (E-128) */
.aufgaben { list-style: none; margin: 0; padding: 0; }
.aufgabe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0 10px 12px; border-top: 1px solid var(--linie); border-left: 3px solid transparent; }
.aufgabe:first-child { border-top: 0; }
.aufgabe.dringend { border-left-color: var(--warnung-akzent); }
.aufgabe-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.aufgabe-text:hover strong { text-decoration: underline; }
.aufgabe-bereich { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise); }
.aufgabe-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.aufgabe-aktionen form { margin: 0; }

/* Einsatzmodus (E-129): dunkles Vollbild, große Ziele, für Handschuhe und Sonne */
/* Immer dunkel, unabhängig von der Geräteeinstellung: dieselben Farben wie im dunklen Modus */
body.vollbild {
  --rot-dunkel: #ff8a8f; --rot-hell: #3d1a1c; --grau: #b4b4ae;
  --text: #f2f2ef; --text-leise: #a8a8a2; --flaeche: #111214; --karte: #1c1d20;
  --linie: #2c2d31; --feld: #575752; --flaeche-leicht: #26272b;
  --ok-hg: #15301e; --ok-text: #7fd394; --fehler-hg: #3d1517; --fehler-text: #ff9a9e;
  --warnung-hg: #3a2c0c; --warnung-text: #f3c56b; --chip: #33332f; --chip-text: #dcdcd6;
  --platzhalter: #7d7d78; --schatten: none;
  background: var(--flaeche); color: var(--text); color-scheme: dark;
}
body.vollbild .inhalt { max-width: 760px; margin: 0 auto; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }
body.vollbild .karte { background: #1c1d20; border-color: #2c2d31; color: inherit; box-shadow: none; }
body.vollbild .leise, body.vollbild small { color: #a8a8a2; }
body.vollbild a { color: #ff8a8f; }
body.vollbild input, body.vollbild textarea { background: #0b0b0d; color: #f2f2ef; border-color: #3a3b40; font-size: 18px; min-height: 48px; }
.em-kopf { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 0 10px; background: #111214; }
.em-titel { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.em-titel span { color: #a8a8a2; font-size: 14px; }
#em-uhr { font-size: 20px; font-weight: 700; color: #f2f2ef; font-variant-numeric: tabular-nums; }
.em-beenden { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 2px solid #f2f2ef; color: #f2f2ef !important; font-weight: 700; text-decoration: none; }
.em-reiter { display: flex; gap: 8px; margin: 4px 0 12px; }
.em-reiter a { flex: 1; text-align: center; padding: 12px 0; border-radius: 12px; background: #1c1d20; color: #f2f2ef !important; font-weight: 700; text-decoration: none; min-height: 48px; box-sizing: border-box; }
.em-bereich { scroll-margin-top: 90px; margin-bottom: 20px; }
.em-frage { margin: 8px 0 6px; font-weight: 700; }
.em-namen, .em-schnell { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; margin-bottom: 12px; }
.em-knopf { min-height: 56px; padding: 8px 10px; border-radius: 12px; border: 2px solid #3a3b40; background: #26272b; color: #f2f2ef; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; cursor: pointer; }
.em-name[aria-pressed="true"] { border-color: #fff; background: var(--rot); }
.em-schnell .em-knopf { background: #0f3d22; border-color: #1d8a3a; }
.em-kraefte { list-style: none; margin: 0; padding: 0; }
.em-kraefte li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid #2c2d31; }
.em-status { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; font-size: 26px; font-weight: 800; color: #fff; background: #7a7a78; }
.em-status-gruen { background: #1d8a3a; }
.em-status-gelb { background: #d68a00; }
.em-status-rot { background: #e30613; }
.em-status-blau { background: #2f6f9f; }

/* Benachrichtigungen je Art (E-130) */
.einstellungsliste { list-style: none; margin: 0; padding: 0; }
.einstellungsliste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--linie); }
.einstellungsliste li:first-child { border-top: 0; }
.einstellung-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.einstellung-text label { display: block; margin: 0; font-weight: 700; }
.einstellung-text .leise { font-size: 14px; line-height: 1.35; }
.einstellungsliste select { flex: 0 1 230px; min-width: 0; width: auto; }
@media (max-width: 600px) { .einstellungsliste select { flex-basis: 100%; } }

/* Personen ankreuzen (R-1070) */
.personenauswahl { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.personenauswahl legend { font-weight: 700; padding: 0 4px; }
.personenauswahl .auswahl-suche { width: 100%; margin: 4px 0 6px; }
.personenauswahl-liste { max-height: 240px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 0 12px; }
.personenauswahl-liste .option { min-height: 40px; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }

/* Reiter im Personen-Detailblatt (E-133) */
.person-reiter { margin-top: 4px; }
.reiter-feld > .karte, .reiter-feld > .raster { margin-bottom: 16px; }
.steckbrief .daten { margin: 0; }

/* Kleidergrößen (R-1067) */
.raster-formular { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px 16px; }

/* Funk direkt am Teil (E-134) */
.funk-kasten { margin: 18px 0 16px; padding: 14px 0 16px; border-bottom: 1px solid var(--linie); border-top: 1px solid var(--linie, #ddd); }
.funk-kasten h2 { margin: 0 0 4px; font-size: 1.1rem; }

/* Einsatzbericht: Einsatzmittel mit Besatzung (E-136) */
.berichtsmittel { border-top: 1px solid var(--linie); padding: 12px 0 6px; }
.berichtsmittel .formular, #helfer .formular { margin-bottom: 4px; }
.sprungmarken { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sprungmarken a { padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-text); text-decoration: none; font-size: 14px; }
.sprungmarken a:hover { background: var(--linie); }
.zeitraum { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.zeitraum legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.datum-uhr { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.mittelzeit { display: grid; grid-template-columns: minmax(120px, 160px) minmax(120px, 160px) 1fr; gap: 6px 12px; align-items: end; margin: 8px 0 4px; }
.mittelzeit label { margin: 0; }
.mittelzeit-quelle { margin: 0 0 8px; align-self: center; }
.besatzung { list-style: none; margin: 4px 0 8px; padding: 0; }
.summenzeile { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--linie); }
.mittel-neu h3 { margin-bottom: 6px; }
@media (max-width: 560px) {
  .mittelzeit { grid-template-columns: 1fr 1fr; }
  .mittelzeit-quelle { grid-column: 1 / -1; }
}
.berichtsmittel h3 { margin: 0; font-size: 1.05rem; }
.kraftzeile { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(130px, 1.3fr) 90px minmax(130px, 1fr) auto; gap: 8px 10px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--linie); }
.kraftzeile-name { align-self: center; overflow-wrap: anywhere; }
.kraftzeile label { margin: 0; }
@media (max-width: 720px) {
  .kraftzeile { grid-template-columns: 1fr 1fr; }
  .kraftzeile-name { grid-column: 1 / -1; }
}

/* Lagebild: Rheinpegel und Warnungen (E-138) */
.lage-pegel { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.lage-pegel-wert { min-width: 4.6em; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lage-pegel.stufe-gelb .lage-pegel-wert { color: #b07000; }
.lage-pegel.stufe-orange .lage-pegel-wert { color: #e8590c; }
.lage-pegel.stufe-rot .lage-pegel-wert { color: var(--rot, #e30613); }
.lage-warnung { border-left: 5px solid #2f6f9f; padding: 6px 10px; margin: 6px 0; background: var(--flaeche-leise, rgba(0,0,0,.03)); border-radius: 6px; }
.lage-warnung summary { cursor: pointer; display: flex; flex-direction: column; }
.lage-warnung p { margin: 6px 0 0; white-space: pre-line; }
.lage-quelle { font-size: .8rem; opacity: .7; margin-top: 8px; }
.lage-pegelmarke { position: absolute; transform: translate(-50%, -50%); background: #fff; color: #222; border: 3px solid #2f6f9f; border-radius: 12px; padding: 1px 6px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* Fahrzeuge nach Status gruppiert (E-138) */
.lage-gruppe { display: grid; gap: 6px; }
.lage-gruppe-kopf { margin: 4px 0 0; padding: 2px 0 2px 10px; border-left: 6px solid var(--text-leise); font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.lage-gruppe-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.lage-chip.blau { background: #2f6f9f; }
body.monitor .lage-gruppe-kopf { color: #fff; font-size: 20px; }
body.monitor .lage-gruppe-kacheln { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lage-gruppe-kacheln { align-items: start; }
@media (min-width: 1101px) {
  .lage-alles .lage-kartenfeld { align-self: stretch; display: flex; }
  .lage-alles #lage-karte { height: auto; min-height: 520px; flex: 1; }
}
/* Aufklapper über die ganze Zeile einer Liste (Name ändern) */
.volle-breite { flex-basis: 100%; }

/* Einrichtung: Kartenpunkte setzen, Abschnittstabelle (E-139) */
.punktkarte { height: 360px; border-radius: 12px; margin: 8px 0 12px; position: relative; z-index: 0; isolation: isolate; }
.abschnittstabelle input:not([type=checkbox]):not([type=color]) { width: 100%; min-width: 4.5em; }
.abschnittstabelle td:nth-child(5) input { min-width: 14em; }
.lage-abschnitt { position: absolute; transform: translate(-50%, -50%); color: #fff; font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 6px; white-space: nowrap; text-shadow: 0 0 2px rgba(0,0,0,.6); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.lage-punkt { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: #ffcc00; color: #222; border: 2px solid #222; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.lage-ort { font-weight: 700; color: var(--text) !important; }
body.monitor .lage-ort { color: #fff !important; }
/* Ebenenwahl der Lagekarte (E-139): eigene Formularregeln nicht übernehmen */
.leaflet-control-layers label { display: block; margin: 4px 0; font-size: 14px; font-weight: 600; }
.leaflet-control-layers label > span { display: flex; align-items: center; gap: 8px; }
.leaflet-control-layers input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; }
body.monitor .leaflet-control-layers { color: #222; }

/* Lagemonitor: Fahrzeug antippen → Einzelheiten (E-141) */
.lage-fahrzeug.klickbar { cursor: pointer; }
.lage-fahrzeug.klickbar:hover, .lage-fahrzeug.klickbar:focus-visible { outline: 2px solid var(--rot, #e30613); outline-offset: 2px; }
.lage-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 14px; padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.35); color: var(--text); background: var(--flaeche, #fff); }
.lage-dialog::backdrop { background: rgba(0,0,0,.45); }
.lage-dialog-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lage-dialog h2 { margin: 0; font-size: 1.4rem; }
.lage-dialog h3 { margin: 16px 0 6px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise); }
.lage-meldung { padding: 6px 0; border-bottom: 1px solid var(--linie); }
.lage-meldung .berichtigt { text-decoration: line-through; opacity: .6; }
.lage-verlauf-zeile { display: grid; grid-template-columns: 6.5em 30px 1fr; gap: 8px; align-items: center; padding: 3px 0; }
.lage-status.klein { width: 26px; height: 26px; font-size: 14px; border-radius: 6px; }
.lage-verlauf-zeit { font-variant-numeric: tabular-nums; }
body.monitor .lage-dialog { background: #2b2b29; color: #fff; font-size: 18px; }

/* Material: Massenänderung des Status */
.spalte-wahl { width: 2.2em; text-align: center; }
.spalte-wahl input { width: 20px; height: 20px; margin: 0; }
.massenleiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--flaeche-leise, rgba(0,0,0,.04)); }
.massenleiste label { margin: 0; }
