/* 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;
  --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;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
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: #fff; 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: 700; font-size: 17px; color: #fff; padding-left: 12px; border-left: 2px solid rgba(255, 237, 0, 0.9); line-height: 1.1; }
.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; }
.seitenleiste-app { color: #fff; font-weight: 700; font-size: 17px; padding-left: 12px; border-left: 2px solid rgba(255, 237, 0, 0.9); line-height: 1.1; }
.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-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; }

.tableiste { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: #fff; 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); }

/* 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: #fff; overflow-y: auto; }
  .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: #fff; border-right: 1px solid var(--linie); z-index: 20; }
  .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 */
.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-end; margin-top: 16px; }
.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: #fff; color: var(--text); transition: border-color 0.12s, box-shadow 0.12s; }
input::placeholder, textarea::placeholder { color: #9a9a96; }
input:hover, select:hover, textarea:hover { border-color: #a9a9a4; }
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: #fff 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-dunkel); color: #fff; }
.knopf:active { transform: translateY(1px); }
.knopf.breit { width: 100%; }
.knopf-klein { background: #fff; 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: #fafaf8; 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: #fff; 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; }

/* 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: #fafaf8; white-space: nowrap; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: #fbfbf9; }
.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: #fff; border: 2px solid var(--feld); }
.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: #ecebe7; color: #3d3d3c; 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-text); color: #fff; border: 2px solid var(--ok-text); }
.knopf-nein { background: #fff; 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: #f0f0ee; }
.nachricht-notiz { border-left-color: var(--gelb); background: #fffbe0; }
.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; }
.etiketten { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 4mm; }
.etikett { 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: #ecebe7; 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; }
.lage-alles { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); grid-template-areas: "karte fahrzeuge" "karte termine"; }
.lage-alles .lage-kartenfeld { grid-area: karte; }
@media (max-width: 1100px) { .lage-alles { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; } .lage-alles .lage-kartenfeld { grid-area: auto; } }
.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; }
#lage-karte { height: 520px; width: 100%; }
.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(--gelb); color: #000 !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; }
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 { grid-template-columns: 1fr; }

/* 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: 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: 1fr; } }

/* 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: #f3f2ee; 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%; } }
