/* Feuerwehr Lernplattform – Stylesheet (Gestaltung wie Hydrantenkontrolle) */
:root {
    --rot: #a3141b;
    --rot-dunkel: #7c0f14;
    --rot-hell: #fbeaea;
    --gelb: #b77900;
    --gelb-hell: #fff5d6;
    --gruen: #1d7a3e;
    --gruen-hell: #e3f4e8;
    --grau: #6b7280;
    --grau-hell: #f1f2f4;
    --text: #1c1f24;
    --muted: #5f6672;
    --linie: #dde0e5;
    --bg: #f6f6f4;
    --karte: #ffffff;
    --radius: 10px;
    --schatten: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--rot); }
h1 { font-size: 1.55rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.nowrap { white-space: nowrap; }

/* Kopfzeile */
.topbar {
    background: var(--rot); color: #fff; display: flex; align-items: center; gap: 1rem;
    padding: .55rem 1rem; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 1.05rem; }
.brand small { opacity: .8; font-size: .78rem; }
.mainnav { display: flex; gap: .15rem; flex-wrap: wrap; }
.mainnav a {
    color: #fff; text-decoration: none; padding: .45rem .7rem; border-radius: 7px; font-weight: 500; opacity: .9;
}
.mainnav a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.mainnav a.active { background: rgba(255,255,255,.2); opacity: 1; }
.mainnav .count { background: #fff; color: var(--rot); border-radius: 99px; padding: 0 .45rem; font-size: .78rem; font-weight: 700; }
.mainnav .usernav { margin-left: .6rem; border-left: 1px solid rgba(255,255,255,.25); border-radius: 0 7px 7px 0; }
.mainnav .usernav small { display: block; font-size: .7rem; opacity: .8; font-weight: 400; line-height: 1; }
.navtoggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; }

/* Seitenkopf */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.pagehead .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Karten */
.card { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--schatten); margin-bottom: 1rem; }
.card > h2:first-child { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat {
    background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem 1rem;
    text-decoration: none; color: inherit; box-shadow: var(--schatten); border-left: 5px solid var(--grau);
}
.stat:hover { border-color: #c5c9d0; }
.stat .zahl { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .88rem; }
.stat.rot { border-left-color: var(--rot); } .stat.rot .zahl { color: var(--rot); }
.stat.gelb { border-left-color: var(--gelb); } .stat.gelb .zahl { color: var(--gelb); }
.stat.gruen { border-left-color: var(--gruen); } .stat.gruen .zahl { color: var(--gruen); }

/* Fortschritt */
.progress { height: 12px; background: var(--grau-hell); border-radius: 99px; overflow: hidden; display: flex; }
.progress span { display: block; height: 100%; }

/* Badges */
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.b-rot { background: var(--rot-hell); color: var(--rot); }
.b-gelb { background: var(--gelb-hell); color: var(--gelb); }
.b-gruen { background: var(--gruen-hell); color: var(--gruen); }
.b-grau { background: var(--grau-hell); color: var(--grau); }
.b-blau { background: #e6eefb; color: #1d4f91; }
.b-lila { background: #f0e9fb; color: #5b2a9a; }
.typ { display: inline-block; min-width: 2.6rem; text-align: center; font-weight: 700; font-size: .75rem; padding: .1rem .35rem; border-radius: 5px; background: #1c1f24; color: #fff; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1rem;
    border-radius: 8px; border: 1px solid var(--linie); background: #fff; color: var(--text);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--grau-hell); }
.btn-primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn-primary:hover { background: var(--rot-dunkel); }
.btn-gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn-gruen:hover { filter: brightness(.92); background: var(--gruen); }
.btn-danger { color: var(--rot); border-color: #e6b5b7; }
.btn-danger:hover { background: var(--rot-hell); }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; }

/* Tabellen */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: .55rem .6rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; }
table.list th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafafa; position: sticky; top: 0; }
table.list tbody tr:hover { background: #fafafa; }
table.list td.r, table.list th.r { text-align: right; }
table.list a.rowlink { color: inherit; text-decoration: none; font-weight: 600; }
table.list a.rowlink:hover { color: var(--rot); }
table.kv { border-collapse: collapse; width: 100%; }
table.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: .3rem .8rem .3rem 0; width: 40%; vertical-align: top; }
table.kv td { padding: .3rem 0; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: .8rem 1rem; }
.f { grid-column: span 12; display: flex; flex-direction: column; gap: .25rem; }
.f-2 { grid-column: span 2; } .f-3 { grid-column: span 3; } .f-4 { grid-column: span 4; }
.f-6 { grid-column: span 6; } .f-8 { grid-column: span 8; } .f-9 { grid-column: span 9; }
label { font-weight: 600; font-size: .88rem; }
label .req { color: var(--rot); }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
    font: inherit; padding: .55rem .65rem; border: 1px solid #c9cdd4; border-radius: 8px; background: #fff; width: 100%; color: var(--text);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(163,20,27,.25); border-color: var(--rot); }
.hint { font-size: .8rem; color: var(--muted); }
.filterbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filterbar .f { grid-column: auto; min-width: 150px; flex: 1; }
.filterbar .f.grow { flex: 3; min-width: 220px; }
.filterbar .f:not(.grow) { max-width: 240px; }
@media (max-width: 860px) { .filterbar .f:not(.grow) { max-width: none; } }
.formactions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* Hinweise */
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.flash-ok { background: var(--gruen-hell); color: var(--gruen); border: 1px solid #b7dfc4; }
.flash-err { background: var(--rot-hell); color: var(--rot); border: 1px solid #e6b5b7; }
.flash-info { background: #eaf1fb; color: #1d4f91; border: 1px solid #c4d6ef; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* Legende */
.map-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; margin-top: .6rem; }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }

/* Schnellsuche */
.quick { display: flex; gap: .5rem; }
.quick input { flex: 1; font-size: 1.05rem; }

/* Druck */
.print-only { display: none; }
@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #fff; font-size: 10.5pt; }
    .topbar, .footer, .no-print, .flash, .navtoggle { display: none !important; }
    .print-only { display: block; }
    .wrap { max-width: none; padding: 0; }
    .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
    table.list th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .badge { border: 1px solid #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
}

/* Mobil */
@media (max-width: 860px) {
    .navtoggle { display: block; }
    .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--rot-dunkel); flex-direction: column; padding: .5rem; }
    body.nav-open .mainnav { display: flex; }
    .mainnav .usernav { margin-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.25); border-radius: 0; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .f-2, .f-3, .f-4, .f-6, .f-8, .f-9 { grid-column: span 12; }
    .f-2.keep, .f-3.keep, .f-4.keep { grid-column: span 6; }
    .check-row { flex-direction: column; align-items: stretch; }
    .seg { width: 100%; }
    .seg label { flex: 1; }
    .ergebnis-wahl { grid-template-columns: 1fr; }
    .hide-m { display: none; }
    h1 { font-size: 1.3rem; }
}

/* Rechte-Matrix */
table.matrix td.c { text-align: center; }
table.matrix th.rolle-kopf { text-align: center; min-width: 120px; vertical-align: bottom; }
table.matrix tr.gruppe td { background: var(--grau-hell); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: .45rem; padding-bottom: .45rem; }
table.matrix input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--rot); cursor: pointer; }
table.matrix input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
.matrix-save { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.2rem; background: #fff; border-top: 1px solid var(--linie); border-radius: 0 0 var(--radius) var(--radius); }

/* Verwaltungsmenü */
.navmenu { position: relative; }
.navmenu summary { list-style: none; cursor: pointer; color: #fff; padding: .45rem .7rem; border-radius: 7px; font-weight: 500; opacity: .9; user-select: none; }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu summary:hover, .navmenu[open] summary { background: rgba(255,255,255,.12); opacity: 1; }
.navmenu.active summary { background: rgba(255,255,255,.2); opacity: 1; }
.navmenu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); min-width: 200px; padding: .35rem; display: flex; flex-direction: column; z-index: 1100; }
.mainnav .navmenu-list a { color: var(--text); opacity: 1; }
.mainnav .navmenu-list a:hover { background: var(--grau-hell); }
.mainnav .navmenu-list a.active { background: var(--rot-hell); color: var(--rot); }
@media (max-width: 860px) {
    .navmenu-list { position: static; background: transparent; box-shadow: none; padding: 0 0 0 1rem; }
    .mainnav .navmenu-list a { color: #fff; }
    .mainnav .navmenu-list a:hover, .mainnav .navmenu-list a.active { background: rgba(255,255,255,.15); color: #fff; }
}

/* Einstellungen: Vorschau der Kopfzeile */
.vorschau { display: flex; align-items: center; gap: .6rem; background: var(--rot); color: #fff; padding: .55rem 1rem; border-radius: 8px; margin-top: 1rem; }
.vorschau img { border-radius: 8px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.vorschau span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.vorschau strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.vorschau small { opacity: .8; font-size: .78rem; overflow-wrap: anywhere; }

/* Namen der Lernplattform auf die Farben der Hydrantenkontrolle abbilden */
:root {
    --red: var(--rot); --red-dark: var(--rot-dunkel); --red-soft: var(--rot-hell); --red-line: #e6b5b7;
    --green: var(--gruen); --amber: var(--gelb); --blue: #1d4f91;
    --card: var(--karte); --line: var(--linie); --shadow: var(--schatten);
}
body { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { flex: 1; width: 100%; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .mainnav a:hover, .navmenu-list a:hover, .chip:hover, .tile:hover, .row:hover, .stat:hover, .post-card:hover { text-decoration: none; }

/* Karten, Kacheln, Listen */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card h2:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tile { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; color: var(--text); border-top: 4px solid var(--red);
  display: flex; flex-direction: column; gap: 6px; transition: transform .1s, box-shadow .1s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.tile-icon { font-size: 2rem; } .tile-name { font-weight: 600; } .tile-desc { font-size: .85rem; color: var(--muted); }
.grid.small .tile-icon { font-size: 1.5rem; }
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafafa; text-decoration: none; }
.row-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row.done strong { color: var(--green); }
.row > span:first-child:not(.check) { flex: 1; }
.check { font-size: 1.1rem; }

/* Fortschritt */
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: auto; }
.progress .bar { height: 100%; background: linear-gradient(90deg, #22c55e, var(--green)); }
.progress-label { font-size: .75rem; color: var(--muted); }
.cat-progress { max-width: 360px; margin-bottom: 8px; }

/* Kopf mit Buttons */
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

/* Buttons */
.btn { display: inline-block; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--text);
  font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.danger { color: #b91c1c; border-color: #fca5a5; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { padding: 3px 9px; font-size: .85rem; }
.btn.wide { width: 100%; padding: 10px; }

/* Formulare */
.form label { display: block; margin-bottom: 14px; font-weight: 500; }
.form label.inline, label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-bottom: 8px; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d1d5db;
  border-radius: 7px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 10px 14px; }
legend { font-weight: 600; padding: 0 6px; }
.form-actions { display: flex; gap: 8px; margin-top: 6px; }
.narrow { max-width: 480px; }
.inline-form { display: inline; margin: 0; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.icon-pick .icon-input { width: 70px; margin: 0 6px 0 0; font-size: 1.2rem; text-align: center; }
.emoji { font-size: 1.2rem; background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer; padding: 2px 4px; }
.emoji:hover { border-color: var(--line); background: var(--bg); }
.two-col { display: grid; grid-template-columns: minmax(300px, 1fr) 1.4fr; gap: 16px; align-items: start; }
.roles-help { border-top: 1px solid var(--line); margin-top: 16px; font-size: .9rem; }
.roles-help p { margin: 4px 0; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
tr.inactive { opacity: .55; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .78rem; font-weight: 600; background: var(--bg); }
.role-admin { background: var(--red-soft); color: var(--red-dark); }
.role-ausbilder { background: #fef3c7; color: #92400e; }
.role-mitglied { background: #e0f2fe; color: #075985; }

/* Admin-Baum */
.admin-tree { list-style: none; margin: 0; padding: 0; }
.admin-tree .admin-tree { padding-left: 22px; border-left: 2px solid var(--line); margin-left: 8px; }
.at-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 6px; }
.at-row:hover { background: var(--bg); }

/* Unterlage */
.prose { white-space: normal; line-height: 1.65; }
.file-card { padding: 12px 14px; }
.file-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.viewer { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 6px; background: #525659; }
.viewer.short { height: 40vh; background: #fff; }
.viewer-img { max-width: 100%; border-radius: 6px; display: block; }
.viewer-video { width: 100%; max-height: 75vh; border-radius: 6px; background: #000; }
.done-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px 18px; margin-top: 20px; }
.done-box.is-done { border: 2px solid #86efac; background: #f0fdf4; }

/* Meldungen */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.flash.err { background: #fef2f2; color: #7f1d1d; border-color: #fca5a5; }
.flash.warn { background: #fffbeb; color: #78350f; border-color: #fcd34d; }


/* ---------------------------------------------------------------- Prüfungen */
.badge.pass { background: #dcfce7; color: #14532d; }
.badge.fail { background: #fee2e2; color: #7f1d1d; }
.btn.big { padding: 11px 22px; font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.exam-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.exam-facts span { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.exam-facts strong { font-size: 1.15rem; }
.exam-bar { position: sticky; top: 56px; z-index: 10; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: #fff; border-bottom: 3px solid var(--red); margin: -24px -32px 18px; padding: 12px 32px; box-shadow: var(--shadow); }
.timer { margin-left: auto; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; background: var(--bg); padding: 3px 12px; border-radius: 6px; }
.timer.warn { background: var(--red); color: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .6; } }
.question { border-left: 4px solid var(--line); }
.question.answered { border-left-color: #22c55e; }
.q-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.q-num { font-weight: 700; color: var(--red-dark); }
.q-text { font-size: 1.05rem; font-weight: 500; margin-bottom: 12px; }
.q-img { max-width: 100%; max-height: 340px; border-radius: 6px; margin-bottom: 12px; display: block; }
.q-answers { display: flex; flex-direction: column; gap: 6px; }
.answer { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
label.answer:hover { background: var(--bg); }
.answer input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--red); }
label.answer:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.review.ok { border-left-color: #22c55e; } .review.nok { border-left-color: #ef4444; }
.answer.correct { border-color: #86efac; background: #f0fdf4; }
.answer.wrong { border-color: #fca5a5; background: #fef2f2; }
.answer.chosen { border-color: #93c5fd; background: #eff6ff; }
.answer .mark { width: 18px; flex-shrink: 0; }
.answer .tag { margin-left: auto; font-size: .75rem; color: var(--green); font-weight: 600; }
.explain { margin-top: 10px; padding: 10px 12px; background: #fffbeb; border-radius: 7px; font-size: .92rem; }
.result-box { display: flex; align-items: center; gap: 24px; padding: 20px 24px; border-radius: var(--radius); margin-bottom: 10px; }
.result-box.pass { background: #f0fdf4; border: 2px solid #86efac; }
.result-box.fail { background: #fef2f2; border: 2px solid #fca5a5; }
.result-pct { font-size: 2.6rem; font-weight: 800; }
.result-verdict { font-size: 1.3rem; font-weight: 700; }
.ans-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ans-row input[type=text] { margin: 0; }
.ans-row .ans-correct { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--green); }
.q-thumb { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.q-thumb img { max-height: 80px; border-radius: 6px; }
.q-list { padding-left: 22px; margin: 0; }
.q-list li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.q-list li > div:first-child { display: inline; }
.q-list li { display: list-item; }
.q-list li .nowrap { margin-top: 4px; }
.q-list li.editing { background: var(--red-soft); }
@media (max-width: 900px) { .exam-bar { margin: -18px -16px 14px; padding: 10px 16px; } .result-box { flex-direction: column; text-align: center; gap: 6px; } }
@media print { .exam-bar { position: static; } }

@media (max-width: 520px) {
  .row { flex-wrap: wrap; }
  .row-main { flex-basis: calc(100% - 40px); }
  .row > .badge { margin-left: 34px; }
}

/* ---------------------------------------------------------------- Beiträge */
.badge.new { background: var(--red); color: #fff; font-size: .68rem; vertical-align: middle; }
.badge.upd { background: #fef3c7; color: #92400e; font-size: .68rem; vertical-align: middle; }
.two-col.even { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.two-col.even > section { min-width: 0; }
.head-row > a.small { align-self: center; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 8px; }
.post-feed { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.post-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; color: var(--text); border-left: 4px solid #3b82f6; transition: box-shadow .1s, transform .1s; }
.post-card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
.post-card.pinned { border-left-color: var(--red); background: linear-gradient(180deg, #fff 0%, #fffafa 100%); }
.post-meta { font-size: .8rem; color: var(--muted); }
.post-title { font-size: 1.12rem; font-weight: 700; }
.post-excerpt { color: #374151; font-size: .93rem; }
.post-more { font-size: .85rem; color: var(--red-dark); font-weight: 600; margin-top: auto; }
.kicker { font-size: .8rem; font-weight: 600; color: var(--red-dark); text-transform: uppercase; letter-spacing: .05em; }
.doc-view.post { max-width: 900px; }
.filter-form select { width: auto; margin: 0; padding: 6px 10px; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }

/* formatierter Text */
.rich { line-height: 1.7; }
.rich > :first-child { margin-top: 0; } .rich > :last-child { margin-bottom: 0; }
.rich h2 { font-size: 1.35rem; margin: 1.2em 0 .4em; } .rich h3 { font-size: 1.12rem; margin: 1.1em 0 .3em; } .rich h4 { margin: 1em 0 .3em; }
.rich p { margin: 0 0 .8em; }
.rich ul, .rich ol { padding-left: 1.6em; margin: 0 0 .8em; }
.rich blockquote { margin: 1em 0; padding: 10px 14px; border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 0 7px 7px 0; }
.rich img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.rich hr { border: 0; border-top: 2px solid var(--line); margin: 1.4em 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 1em 0; display: block; overflow-x: auto; }
.rich th, .rich td { border: 1px solid #d1d5db; padding: 6px 10px; text-align: left; vertical-align: top; min-width: 60px; }
.rich th { background: var(--bg); }
.rich pre { background: #1f2328; color: #f3f4f6; padding: 12px; border-radius: 7px; overflow-x: auto; }

/* Editor */
.field { margin-bottom: 14px; }
.field-label { display: block; font-weight: 500; margin-bottom: 4px; }
.rte { border: 1px solid #d1d5db; border-radius: 8px; background: #fff; position: relative; }
.rte:focus-within { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #fafafa;
  border-radius: 8px 8px 0 0; position: sticky; top: 56px; z-index: 5; }
.rte-bar button { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: none;
  cursor: pointer; font: inherit; font-size: .9rem; color: var(--text); }
.rte-bar button:hover { background: #fff; border-color: var(--line); }
.rte-bar button.on { background: var(--red-soft); border-color: #fca5a5; color: var(--red-dark); }
.rte-sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 280px; max-height: 70vh; overflow-y: auto; padding: 14px 16px; outline: none; }
.rte-area:empty::before { content: 'Hier schreiben …'; color: var(--muted); }
.rte.busy::after { content: attr(data-status); position: absolute; right: 12px; bottom: 10px; background: var(--text);
  color: #fff; padding: 4px 10px; border-radius: 6px; font-size: .8rem; }
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.form .kind-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 2px solid var(--line); border-radius: 9px;
  cursor: pointer; font-weight: 400; margin: 0; }
.kind-opt:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.kind-opt input { margin-top: 4px; accent-color: var(--red); }
.kind-opt small { display: block; color: var(--muted); font-size: .82rem; }
.kind-icon { font-size: 1.6rem; line-height: 1; }
.pin-opt { align-self: end; margin-bottom: 18px !important; }

/* Letzte Änderungen */
.changes .row { align-items: flex-start; }
.list .row.change > span.ch-icon { flex: 0 0 24px; font-size: 1.1rem; text-align: center; }
.change.unseen { background: #eff6ff; box-shadow: inset 3px 0 0 #3b82f6; }
.unseen-hint { background: #eff6ff; border-left: 3px solid #3b82f6; padding: 0 6px; }
.day-sep { padding: 7px 16px; background: var(--bg); font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.badge.act-create { background: #dcfce7; color: #14532d; }
.badge.act-update { background: #e0f2fe; color: #075985; }
.badge.act-delete { background: #fee2e2; color: #7f1d1d; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { padding: 5px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .88rem; }
.chip:hover { text-decoration: none; border-color: #fca5a5; }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.history { margin-top: 18px; }
.history summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 0; }
.history .list { margin-top: 6px; }

@media (max-width: 900px) { .two-col.even, .kind-switch { grid-template-columns: 1fr; } .rte-bar { top: 66px; } }

/* ---------------------------------------------------------------- Sichtbarkeit & Gruppen */
.badge.vis-hidden { background: #f3f4f6; color: #4b5563; border: 1px dashed #9ca3af; font-size: .72rem; }
.badge.vis-groups { background: #ede9fe; color: #5b21b6; font-size: .72rem; }
.badge.grp { background: #ede9fe; color: #5b21b6; font-size: .7rem; margin: 2px 4px 0 0; }
.admin-tree li.restricted > .at-row > span:first-child > a { color: var(--muted); }
.vis-ic { font-size: .8rem; opacity: .8; margin-left: 2px; }
.vis-note { font-size: .9rem; }
.vis-box .vis-groups-box { display: none; margin: 4px 0 8px 26px; }
.vis-box:has(input[value=groups]:checked) .vis-groups-box { display: block; }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist.scroll { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; }
.checklist label.inline { margin: 0; padding: 3px 0; }
.list-filter { margin-bottom: 6px !important; }
.group-card h3 { margin: 0; }
.chip.small-chip { padding: 2px 9px; font-size: .8rem; display: inline-block; margin: 2px 2px 0 0; }
.form .icon-pick input.icon-input { width: 70px; display: inline-block; margin: 0 6px 0 0; }

/* ---------------------------------------------------------------- Upload-Fortschritt & Videos */
.upload-progress { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: -6px 0 14px; background: #fafafa; }
.up-row + .up-row { margin-top: 10px; }
.up-head { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 4px; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.up-row .progress { height: 10px; }
.up-row.ok .bar { background: var(--green); }
.rich video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 8px; margin: 8px 0; }
.rte-area video { pointer-events: auto; }
button:disabled { opacity: .6; cursor: wait; }

/* ---------------------------------------------------------------- Rollen & Rechte */
.form .perm-opt { align-items: flex-start; padding: 6px 0; margin: 0; }
.perm-opt input { margin-top: 4px; }
.perm-opt small { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
.scope-box .scope-cats { display: none; margin: 6px 0 4px 26px; }
.scope-box:has(input[value=areas]:checked) .scope-cats { display: block; }
.role-card h3 { margin: 0; }
.role-card.editing { outline: 2px solid var(--red); }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.perm-chip { font-size: .76rem; padding: 2px 8px; border-radius: 12px; background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }
.perm-chip.on { background: #dcfce7; color: #14532d; text-decoration: none; }
.role-custom { background: #e0e7ff; color: #3730a3; }




/* =====================================================================
   Angleichung der Lernplattform-Bausteine an die Hydrantenkontrolle
   ===================================================================== */
.mainnav a.logout { opacity: .9; }
.navtoggle { margin-left: auto; }
.mainnav { align-items: center; }
.wrap > h1:first-child, .wrap > .flash + h1 { margin-bottom: 1.1rem; }

/* Seitenkopf (wie .pagehead) */
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.head-row h1 { margin: 0 0 .25rem; }
.page-sub { color: var(--muted); margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.card > .head-row, section.card > .head-row { align-items: center; margin-bottom: .75rem; }
.card > .head-row h2, section.card > .head-row h2 { margin: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 0 .75rem; }
.section-head h2 { margin: 0; }
h2 { margin-top: 1.4rem; } .card h2:first-child, .card > h2 { margin-top: 0; }

/* Karten, Listen, Kacheln */
.card { margin-bottom: 1rem; }
.two-col { display: grid; grid-template-columns: minmax(300px, 1fr) 1.4fr; gap: 1rem; align-items: start; }
.two-col.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col.even > .card { margin-bottom: 0; }
.list { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.card > .list, .card section > .list { border: 0; box-shadow: none; border-top: 1px solid var(--linie); border-radius: 0 0 var(--radius) var(--radius); margin: 0 -1.2rem -1.1rem; }
.row { padding: .65rem 1rem; border-bottom: 1px solid var(--linie); }
.row:hover { background: #fafafa; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tile { background: var(--karte); border: 1px solid var(--linie); border-left: 5px solid var(--rot); border-top: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: .9rem 1rem; transform: none !important; }
.tile:hover { border-color: #c5c9d0; border-left-color: var(--rot); box-shadow: var(--schatten); }
.tile-icon { font-size: 1.8rem; }
.stat.blau { border-left-color: #1d4f91; } .stat.blau .zahl { color: #1d4f91; }
.empty, .card .empty { text-align: center; padding: 2rem 1rem; color: var(--muted); margin: 0; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.area-card { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.area-card h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.area-card h2 a { color: var(--text); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-left: 18px; border-left: 2px solid var(--linie); margin-left: 10px; }
.tree li > a { display: flex; gap: 6px; padding: .3rem .5rem; border-radius: 6px; color: var(--text); }
.tree li > a:hover { background: var(--rot-hell); color: var(--rot); text-decoration: none; }
.tree .cnt { margin-left: auto; color: var(--muted); font-size: .8rem; }
.post-card { background: var(--karte); border: 1px solid var(--linie); border-left: 5px solid #1d4f91; border-radius: var(--radius); box-shadow: var(--schatten); transform: none !important; }
.post-card.pinned { border-left-color: var(--rot); background: var(--karte); }
.post-card:hover { border-color: #c5c9d0; box-shadow: var(--schatten); }
.post-grid { gap: 1rem; margin-bottom: 1rem; }

/* Fortschritt (wie Hydrantenkontrolle) */
.progress { height: 12px; background: var(--grau-hell); border-radius: 99px; overflow: hidden; display: flex; margin-top: auto; }
.progress .bar { height: 100%; background: var(--gruen); }
.progress-label { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

/* Buttons: Klassennamen der Lernplattform */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1rem; border-radius: 8px;
  border: 1px solid var(--linie); background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--grau-hell); }
.btn.primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.primary:hover { background: var(--rot-dunkel); }
.btn.danger { color: var(--rot); border-color: #e6b5b7; background: #fff; }
.btn.danger:hover { background: var(--rot-hell); }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.btn.big { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn.wide { width: 100%; }
button:disabled { opacity: .6; cursor: wait; }

/* Formulare: Felder liegen hier innerhalb der <label> */
.form label { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .88rem; }
.form label.inline, label.inline { display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .95rem; margin-bottom: .5rem; }
.form label small, label .muted { font-weight: 400; }
label input:not([type=checkbox]):not([type=radio]), label select, label textarea { margin-top: .25rem; font-size: 15px; font-weight: 400; }
input[type=email], input[type=url], input[type=file], input:not([type]) { font: inherit; padding: .55rem .65rem; border: 1px solid #c9cdd4; border-radius: 8px; background: #fff; width: 100%; color: var(--text); }
input[type=file] { padding: .45rem; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { display: block; width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--rot); width: 16px; height: 16px; }
fieldset { border: 1px solid var(--linie); border-radius: 8px; margin: 0 0 1rem; padding: .7rem 1rem .9rem; }
legend { font-weight: 700; padding: 0 .4rem; font-size: .9rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.form-grid { gap: .8rem 1rem; }
.form .form-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.narrow { max-width: 520px; }
.inline-form { display: inline; margin: 0; }
.form .icon-pick input.icon-input { width: 70px; display: inline-block; margin: 0 6px 0 0; font-size: 1.2rem; text-align: center; }

/* Suchkarte (wie "Hydrant prüfen") */
.search-row { display: flex; gap: .5rem; }
.search-row input { flex: 1; font-size: 1.05rem !important; margin: 0 !important; }
.search-card h2 { margin-bottom: .75rem; }

/* Tabellen (wie table.list) */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .55rem .6rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #fafafa; }
.table tbody tr:hover { background: #fafafa; }

/* Hinweise: beide Schreibweisen (flash-ok / flash ok) */
.flash, .flash.ok { background: var(--gruen-hell); color: var(--gruen); border: 1px solid #b7dfc4; }
.flash-err, .flash.err { background: var(--rot-hell); color: var(--rot); border: 1px solid #e6b5b7; }
.flash-warn, .flash.warn { background: var(--gelb-hell); color: #7a5200; border: 1px solid #ecd28a; }
.flash-info, .flash.info, .card.flash-info { background: #eaf1fb; color: #1d4f91; border: 1px solid #c4d6ef; }
.card.flash-info h2 { color: #1d4f91; }
.flash a { color: inherit; text-decoration: underline; }

/* Badges (wie b-rot, b-gelb …) */
.badge { padding: .1rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--grau-hell); color: var(--grau); }
.badge.pass, .badge.act-create { background: var(--gruen-hell); color: var(--gruen); }
.badge.fail, .badge.act-delete { background: var(--rot-hell); color: var(--rot); }
.badge.act-update { background: #e6eefb; color: #1d4f91; }
.badge.new { background: var(--rot); color: #fff; font-size: .68rem; }
.badge.upd { background: var(--gelb-hell); color: var(--gelb); font-size: .68rem; }
.role-admin { background: var(--rot-hell); color: var(--rot); }
.role-ausbilder { background: var(--gelb-hell); color: var(--gelb); }
.role-mitglied { background: #e6eefb; color: #1d4f91; }
.role-custom, .badge.grp, .badge.vis-groups { background: #f0e9fb; color: #5b2a9a; }
.badge.vis-hidden { background: var(--grau-hell); color: var(--grau); border: 1px dashed #b9bec7; }
.chip { border-radius: 99px; border-color: var(--linie); }
.chip.active { background: var(--rot); border-color: var(--rot); color: #fff; }
.kicker { color: var(--rot); }

/* Prüfung / Editor: klebende Leisten unter der Kopfzeile */
.exam-bar { top: 52px; margin: -1.25rem -1rem 1rem; padding: .7rem 1rem; border-bottom: 3px solid var(--rot); border-radius: 0; }
.rte-bar { top: 52px; }
.question { border-left: 5px solid var(--linie); }
.question.answered, .review.ok { border-left-color: var(--gruen); }
.review.nok { border-left-color: var(--rot); }
.answer.correct { border-color: #b7dfc4; background: var(--gruen-hell); }
.answer.wrong { border-color: #e6b5b7; background: var(--rot-hell); }
.result-box.pass { background: var(--gruen-hell); border: 2px solid #b7dfc4; }
.result-box.fail { background: var(--rot-hell); border: 2px solid #e6b5b7; }
.done-box.is-done { border: 2px solid #b7dfc4; background: var(--gruen-hell); }

/* Navigation: bei vielen Menüpunkten früher einklappen */
@media (max-width: 1150px) {
    .navtoggle { display: block; }
    .mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--rot-dunkel); flex-direction: column; align-items: stretch; padding: .5rem; }
    body.nav-open .mainnav { display: flex; }
    .mainnav .usernav { margin-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.25); border-radius: 0; }
    .navmenu-list { position: static; background: transparent; box-shadow: none; padding: 0 0 0 1rem; }
    .mainnav .navmenu-list a { color: #fff; }
    .mainnav .navmenu-list a:hover, .mainnav .navmenu-list a.active { background: rgba(255,255,255,.15); color: #fff; }
}
@media (max-width: 860px) {
    .two-col, .two-col.even, .kind-switch { grid-template-columns: 1fr; }
    .viewer { height: 65vh; }
    .search-row { flex-direction: column; }
    .exam-bar { margin: -1.25rem -1rem 1rem; }
}
@media print { .exam-bar { position: static; } .done-box, .actions { display: none !important; } }
label.answer, .kind-opt, .perm-opt { font-size: .95rem; font-weight: 400; }
.kind-opt strong, .perm-opt strong { font-weight: 600; }
/* Button-Varianten der Hydrantenkontrolle (nach den Grundregeln, damit sie greifen) */
.btn-primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn-primary:hover { background: var(--rot-dunkel); }
.btn-gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn-danger { color: var(--rot); border-color: #e6b5b7; }
.btn-danger:hover { background: var(--rot-hell); }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; }

/* ---------------------------------------------------------------- Übersicht aus Bausteinen */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; align-items: start; }
.hb-cell { min-width: 0; }
.hb-full { grid-column: 1 / -1; }
.hb-cell > .card, .hb-cell > section.card { margin-bottom: 1rem; }
.hb-cell > .stats, .hb-cell > .post-grid, .hb-cell > .grid { margin-bottom: 1rem; }
.hb-cell > .section-head:first-child { margin-top: .4rem; }
.hb-title { margin: .4rem 0 .75rem; }
.hb-red { border-left: 5px solid var(--rot); }
.hb-plain { margin-bottom: 1rem; }
.card.flash-warn h2 { color: #7a5200; }

/* Editor "Übersicht gestalten" */
.hb-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.hb-item { margin: 0; padding: .7rem 1rem; transition: opacity .15s, box-shadow .15s; }
.hb-item.is-off { opacity: .55; background: #fafafa; }
.hb-item.dragging { opacity: .4; outline: 2px dashed var(--rot); }
.hb-head { display: flex; align-items: center; gap: .6rem; }
.hb-grip { cursor: grab; color: var(--muted); font-size: 1.2rem; padding: 0 .2rem; user-select: none; }
.hb-ic { font-size: 1.3rem; }
.hb-name { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hb-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-body { margin-top: .6rem; border-top: 1px solid var(--linie); padding-top: .5rem; }
.hb-body > summary { cursor: pointer; color: var(--rot); font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.hb-body:not([open]) { border-top: 0; padding-top: 0; margin-top: .3rem; }
.hb-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.hb-save { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1.2rem; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.checklist.cols { flex-direction: row; flex-wrap: wrap; gap: .2rem 1.4rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--grau); }
.dot.gruen { background: var(--gruen); } .dot.gelb { background: var(--gelb); } .dot.rot { background: var(--rot); } .dot.blau { background: #1d4f91; }
/* Ein/Aus-Schalter */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #c9cdd4; border-radius: 99px; cursor: pointer; transition: background .15s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--gruen); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--rot); outline-offset: 2px; }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } .hb-half { grid-column: 1 / -1; } }
