/* Baumprüfer – Gestaltung "Wald"
 * Farben als Variablen; keine externen Schriften oder CDNs (Datenschutz).
 */
:root {
  --wald: #1f4d3a;          /* Kopfzeile, Überschriften */
  --wald-dunkel: #163a2b;
  --blatt: #2f7a4a;         /* Knöpfe, Links (Kontrast zu Weiß ≥ 4.5:1) */
  --blatt-hell: #4f9d69;    /* Akzente, Dekor */
  --blatt-zart: #e6f2e9;    /* Flächen, Hover */
  --rinde: #7a5c43;         /* zweiter Akzent */
  --rinde-zart: #f3ede6;
  --bg: #f6f8f4;
  --card: #ffffff;
  --text: #1d2b22;
  --muted: #5b6b60;
  --border: #dde5dc;
  --accent: var(--blatt);
  --danger: #b3261e;
  --danger-zart: #fdeceb;
  --warn: #8a5a00;
  --warn-rand: #d99a00;
  --warn-zart: #fff6dc;
  --ok: #1e6b3a;
  --schatten: 0 1px 2px rgba(31, 77, 58, .06), 0 6px 18px rgba(31, 77, 58, .07);
  --radius: 12px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--blatt); text-underline-offset: 2px; }
a:hover { color: var(--wald); }
h1, h2, h3 { color: var(--wald); line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; margin: 0 0 .4em; }
h2 { font-size: 1.2rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blatt-hell); outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopfzeile ---------- */
.kopfzeile { position: relative; background: linear-gradient(180deg, var(--wald-dunkel), var(--wald)); color: #fff; padding-bottom: 22px; }
.kopfzeile a { color: #fff; text-decoration: none; }
.bar { max-width: 1120px; margin: 0 auto; padding: 12px 16px 6px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: .01em; margin-right: auto; }
.brand svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.hauptmenue { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hauptmenue a { padding: 6px 12px; border-radius: 999px; font-weight: 500; }
.hauptmenue a:hover, .hauptmenue a.aktiv { background: rgba(255,255,255,.14); }
.benutzer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.benutzer .user { opacity: .9; }
.benutzer .user a { text-decoration: underline; }
.bar form { margin: 0; }
.bar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 5px 14px; cursor: pointer; font: inherit; font-size: .9rem; }
.bar button:hover { background: rgba(255,255,255,.12); }
.baumlinie { position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; width: 100%; color: var(--bg); display: block; }
.menu-schalter { position: absolute; opacity: 0; pointer-events: none; }
.menu-knopf { display: none; }

@media (max-width: 860px) {
  .menu-knopf { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(255,255,255,.4); }
  .menu-knopf svg { width: 24px; height: 24px; }
  .navigation { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 0 4px; }
  .menu-schalter:checked ~ .navigation { display: flex; }
  .menu-schalter:focus-visible + .menu-knopf { outline: 3px solid var(--blatt-hell); }
  .hauptmenue { flex-direction: column; align-items: stretch; }
  .hauptmenue a { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06); }
  .benutzer { padding: 6px 2px; }
}
@media (min-width: 861px) {
  .navigation { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
}

/* ---------- Grundlayout ---------- */
main { max-width: 1120px; margin: 18px auto 40px; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--schatten); }
.narrow { max-width: 440px; margin: 40px auto; }
.abschnitt { margin-top: 22px; }
.abschnitt h2, .card h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.abschnitt h2::before, h2.blatt::before {
  content: ""; width: 18px; height: 18px; flex: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234f9d69' d='M20 3C10 3 4 8 4 15c0 2 .6 3.6 1.4 5l1.5-1.4C9 13 13 10 17 8c-4 3-7.5 6.3-9.7 11.6C9 20.5 10.5 21 12 21c7 0 9-8 8-18z'/%3E%3C/svg%3E");
}
.kopf { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.kopf h1, .kopf h2 { margin: 0; }
.kopf > div { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.hilfe { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.errorlist { color: var(--danger); margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.ueberfaellig { color: var(--danger); font-weight: 600; }
.loeschen-link { color: var(--danger); }
.zurueck { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; font-weight: 500; }

/* ---------- Meldungen ---------- */
.meldung { background: var(--blatt-zart); border: 1px solid #b9dcc4; border-left: 5px solid var(--blatt-hell); border-radius: 10px; padding: 11px 15px; margin-bottom: 16px; }
.meldung-error { background: var(--danger-zart); border-color: #f0c1bd; border-left-color: var(--danger); }
.meldung-info { background: #eef4fb; border-color: #c8d9ee; border-left-color: #3b6ea5; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; background: var(--blatt); color: #fff; border: 1px solid var(--blatt); border-radius: 10px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--wald); border-color: var(--wald); color: #fff; box-shadow: 0 3px 10px rgba(31,77,58,.2); }
.btn:active { transform: translateY(1px); }
.btn-sekundaer { background: #fff; color: var(--blatt); border-color: #b9d3c0; }
.btn-sekundaer:hover { background: var(--blatt-zart); color: var(--wald); border-color: var(--blatt-hell); }
.btn-gefahr { background: var(--danger); border-color: var(--danger); }
.btn-gefahr:hover { background: #8c1d17; border-color: #8c1d17; }
.btn-klein { margin-top: 0; padding: 5px 12px; font-size: .85rem; border-radius: 8px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; margin-top: 12px; font-size: .95rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfd9ce; border-radius: 10px; font: inherit; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blatt-hell); box-shadow: 0 0 0 3px rgba(79,157,105,.22); }
input[type=checkbox], input[type=radio] { accent-color: var(--blatt); width: 18px; height: 18px; vertical-align: middle; }
.formular-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.feld-voll { grid-column: 1 / -1; }
fieldset.auswahl { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 10px 0 0; background: #fbfcfa; }
fieldset.auswahl legend { font-weight: 600; padding: 0 4px; color: var(--wald); }
fieldset.auswahl label { display: block; font-weight: 400; margin-top: 6px; }
fieldset.auswahl input[type=radio] { width: auto; margin: 0 6px 0 0; }
fieldset.auswahl select { margin-top: 6px; }
details summary { cursor: pointer; color: var(--blatt); font-weight: 600; padding: 4px 0; }
.suche { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.suche input { flex: 1 1 260px; }
.suche select { width: auto; }
.suche .btn { margin-top: 0; }

/* ---------- Tabellen ---------- */
.tabelle-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--schatten); }
.card .tabelle-wrap { box-shadow: none; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #edf1ec; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: #f3f7f2; }
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }
tbody tr:nth-child(even) td { background: #fafcf9; }
tbody tr:hover td { background: var(--blatt-zart); }
tbody tr:last-child td { border-bottom: 0; }
td select, td input[type=text], td input[type=date] { min-width: 140px; padding: 7px 9px; }
td .btn-klein { white-space: nowrap; }
@media (min-width: 861px) {
  .tabelle-wrap.klebend { overflow: visible; }
  .tabelle-wrap.klebend thead th { position: sticky; top: 0; z-index: 1; }
}
/* Listen werden am Handy zu Karten */
@media (max-width: 700px) {
  table.karten-tabelle thead { display: none; }
  table.karten-tabelle, table.karten-tabelle tbody, table.karten-tabelle tr, table.karten-tabelle td { display: block; width: 100%; }
  .tabelle-wrap:has(table.karten-tabelle) { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table.karten-tabelle tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 12px; padding: 6px 4px; }
  table.karten-tabelle tbody tr:nth-child(even) td, table.karten-tabelle tbody tr:hover td { background: transparent; }
  table.karten-tabelle td { border: 0; padding: 6px 12px; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  table.karten-tabelle td::before { content: attr(data-label); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; text-align: left; flex: none; padding-top: 2px; }
  table.karten-tabelle td[data-label=""]::before { content: none; }
  table.karten-tabelle td.titelzelle { font-size: 1.05rem; text-align: left; justify-content: flex-start; border-bottom: 1px solid #edf1ec; margin-bottom: 4px; }
  table.karten-tabelle td.titelzelle::before { content: none; }
  table.karten-tabelle tr.zeile-ueberfaellig { border-left: 6px solid var(--danger); }
  table.karten-tabelle tr.zeile-bald { border-left: 6px solid var(--warn-rand); }
  table.karten-tabelle tr.zeile-ueberfaellig td, table.karten-tabelle tr.zeile-bald td { background: transparent !important; border-left: 0 !important; }
}

/* ---------- Status ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid transparent; white-space: nowrap; background: #eef2ee; color: var(--muted); }
.badge-ok { background: #e3f3e8; color: var(--ok); border-color: #bfe0c9; }
.badge-warn { background: var(--warn-zart); color: var(--warn); border-color: #f0d58a; }
.badge-gefahr { background: var(--danger); color: #fff; }
tr.zeile-ueberfaellig td { background: #fdf0ef !important; }
tr.zeile-ueberfaellig td:first-child { box-shadow: inset 5px 0 0 var(--danger); }
tr.zeile-bald td { background: #fff9e8 !important; }
tr.zeile-bald td:first-child { box-shadow: inset 5px 0 0 var(--warn-rand); }
.legende { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.legende-rot { background: #fdf0ef; border: 2px solid var(--danger); }
.legende-gelb { background: #fff9e8; border: 2px solid var(--warn-rand); }

/* ---------- Kennzahlen (Startseite) ---------- */
.begruessung { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.begruessung h1 { margin: 0; }
.begruessung .rolle { margin: 2px 0 0; color: var(--muted); }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 18px; }
.kennzahl { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten); position: relative; overflow: hidden; }
.kennzahl::after { content: ""; position: absolute; right: -10px; bottom: -14px; width: 70px; height: 70px; opacity: .12;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='12' r='9' fill='%231f4d3a'/%3E%3Crect x='14.5' y='17' width='3' height='12' rx='1.2' fill='%231f4d3a'/%3E%3C/svg%3E"); }
.kennzahl .zahl { font-size: 2rem; font-weight: 800; color: var(--wald); line-height: 1.1; }
.kennzahl .bezeichnung { color: var(--muted); font-size: .9rem; }
.kennzahl.rot { border-top: 4px solid var(--danger); }
.kennzahl.rot .zahl { color: var(--danger); }
.kennzahl.gelb { border-top: 4px solid var(--warn-rand); }
.kennzahl.gelb .zahl { color: var(--warn); }
.kennzahl.gruen { border-top: 4px solid var(--blatt-hell); }

/* ---------- Leere Zustände ---------- */
.leer { text-align: center; padding: 28px 16px; color: var(--muted); }
.leer svg { width: 120px; height: 84px; display: block; margin: 0 auto 10px; }
.leer p { margin: 0; }

/* ---------- Daten & Detailseiten ---------- */
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
dl.daten dt { color: var(--muted); font-size: .92rem; }
dl.daten dd { margin: 0; }
.detail-raster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
.detail-raster > .seite-rechts { display: flex; flex-direction: column; gap: 10px; }
.detail-raster .karte { margin-top: 0; height: 320px; }
@media (max-width: 860px) { .detail-raster { grid-template-columns: 1fr; } }
.massnahme { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fcfdfb; }
.massnahme-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.massnahme-form input[type=text] { flex: 1; min-width: 200px; padding: 8px 10px; }
.massnahme-form select { width: auto; padding: 8px 10px; }
.massnahme-form-gross { display: block; max-width: 520px; }
.massnahme-form-gross textarea, .massnahme-form-gross input { width: 100%; }
.massnahme-form-gross .btn { margin-top: 12px; }
.modus-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.modus { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 600; background: #fff; }
.modus input { width: auto; margin: 0; }
.modus.aktiv { border-color: var(--blatt-hell); background: var(--blatt-zart); }
.modus-anfrage.aktiv { border-color: var(--danger); background: var(--danger-zart); }
@media (max-width: 600px) { .modus-wahl { grid-template-columns: 1fr; } }
.anfrage { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--danger); border-radius: 10px; background: #fdf6f6; }
.rechnung-zeile { margin-top: 8px; padding: 9px 12px; background: var(--rinde-zart); border-left: 4px solid var(--rinde); border-radius: 8px; font-size: .95rem; }
fieldset.rechnung .formular-raster { gap: 0 12px; }
tr.befund-fotos td { border-bottom: 1px solid var(--border); padding-top: 0; }
.seiten { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Aufgaben-Karten ---------- */
.aufgaben { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.aufgabe { background: var(--card); border: 1px solid var(--border); border-left: 6px solid var(--blatt-hell); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--schatten); }
.aufgabe-ueberfaellig { border-left-color: var(--danger); background: #fffafa; }
.aufgabe-bald { border-left-color: var(--warn-rand); background: #fffdf5; }
.aufgabe-faellig { font-size: .9rem; color: var(--muted); }
.aufgabe-ueberfaellig .aufgabe-faellig { color: var(--danger); }
.aufgabe-titel { font-size: 1.2rem; margin: 4px 0; }
.aufgabe-text { margin: 2px 0; }
.aufgabe-baum { margin: 8px 0; }
.aufgabe-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.aufgabe-knoepfe .btn { margin-top: 0; flex: 1; padding: 12px 14px; }

/* ---------- Fotos ---------- */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; transition: transform .15s; }
.galerie a:hover img { transform: scale(1.02); }
.galerie figcaption { font-size: .85rem; margin-top: 4px; }
.galerie-klein { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.foto-upload { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.foto-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.foto-knoepfe .btn { margin-top: 0; }
td .foto-knoepfe { flex-wrap: nowrap; }
.foto-vorschau { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.foto-vorschau:empty { display: none; }
.foto-kachel { position: relative; width: 72px; height: 72px; }
.foto-kachel img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.foto-weg { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 16px; line-height: 26px; padding: 0; cursor: pointer; }

/* ---------- Karten (Leaflet) ---------- */
.standort { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.standort .btn { margin-top: 0; }
.karte { width: 100%; height: 300px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px; z-index: 0; }
.karte-gross { height: 70vh; min-height: 360px; }
.karten-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; }

/* ---------- Anmeldeseite ---------- */
body.seite-login { min-height: 100vh; background: linear-gradient(180deg, #eef5ee 0%, #f6f8f4 55%, #e7f0e6 100%); }
.seite-login .kopfzeile { display: none; }
.seite-login main { position: relative; z-index: 1; margin-top: 0; padding-top: 6vh; }
.login-karte { max-width: 420px; margin: 0 auto; padding: 30px 30px 24px; }
.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo svg { width: 64px; height: 64px; }
.login-logo .name { display: block; font-size: 1.5rem; font-weight: 800; color: var(--wald); margin-top: 4px; }
.login-logo .claim { display: block; color: var(--muted); font-size: .92rem; }
.login-karte .btn { width: 100%; padding: 11px; }
.wald-hintergrund { position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; min-height: 180px; pointer-events: none; z-index: 0; }
.wald-hintergrund svg { position: absolute; left: 0; bottom: 0; width: 100%; }

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  main { margin: 12px auto 32px; }
  .card { padding: 16px; }
  .btn { padding: 11px 16px; }
  .btn-klein { padding: 7px 12px; }
  dl.daten { grid-template-columns: 1fr; gap: 2px; }
  dl.daten dd { margin-bottom: 8px; }
  h1 { font-size: 1.5rem; }
  .kennzahlen { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kennzahl { padding: 10px; }
  .kennzahl .zahl { font-size: 1.5rem; }
  .kennzahl .bezeichnung { font-size: .78rem; }
}

@media print {
  .kopfzeile, .menu-knopf, .btn, form { display: none !important; }
  body { background: #fff; }
  .card, .tabelle-wrap { box-shadow: none; }
}

/* nur auf dem Handy sichtbar (z. B. Baumart in der Kartenüberschrift) */
.nur-handy { display: none; }
@media (max-width: 700px) { .nur-handy { display: inline; } }
.kopf h1 + .muted { display: block; margin-top: 2px; }
.formular-titel { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid #edf1ec; font-size: 1.05rem; }
.formular-raster > .formular-titel:first-child { margin-top: 6px; padding-top: 0; border-top: 0; }
@media (max-width: 600px) { .kennzahl::after { width: 44px; height: 44px; right: -12px; bottom: -14px; opacity: .08; } }

/* Abschluss durch den Koordinator */
.abschluss-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.abschluss-ok { border-top: 4px solid var(--blatt-hell); }
.abschluss-nein { border-top: 4px solid var(--danger); }
.abschluss-nein h2 { color: var(--danger); }
@media (max-width: 760px) { .abschluss-raster { grid-template-columns: 1fr; } }
.zurueckweisung { margin-top: 8px; padding: 8px 12px; background: var(--danger-zart); border-left: 4px solid var(--danger); border-radius: 8px; font-size: .95rem; }

/* Gefällte Bäume */
tr.gefaellt td { color: #8a948c; }
tr.gefaellt td a, tr.gefaellt td span:not(.badge) { text-decoration: line-through; text-decoration-color: #9aa59c; }
tr.gefaellt td a { color: #6f7a72; }
.badge-gefaellt { background: #ece8e3; color: var(--rinde); border-color: #d9cfc4; text-decoration: none !important; }
.banner-gefaellt { display: flex; gap: 12px; align-items: center; background: var(--rinde-zart); border: 1px solid #e2d5c7; border-left: 6px solid var(--rinde); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; color: #4d3a2a; }
.banner-gefaellt svg { width: 36px; height: 36px; flex: none; }

/* Schritte, fehlende Angaben */
.schritte { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.schritte li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #eef2ee; color: var(--muted); font-weight: 600; }
.schritte li span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); }
.schritte li.aktiv { background: var(--blatt); color: #fff; }
.schritte li.aktiv span { color: var(--blatt); border-color: #fff; }
.schritte li.fertig { background: var(--blatt-zart); color: var(--wald); }
.feld-fehlt { background: var(--warn-zart); border: 1px solid #f0d58a; border-radius: 10px; padding: 4px 10px 10px; margin-top: 8px; }
.feld-fehlt > label:first-child::after { content: " – fehlt"; color: var(--warn); font-weight: 600; }
label.nicht-ermittelbar { font-weight: 400; display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.meldung-warn { background: var(--warn-zart); border-color: #f0d58a; border-left-color: var(--warn-rand); }
.bestaetigen-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.bestaetigen-knoepfe .btn { margin-top: 0; }

/* Adresssuche und Adresse aus der Karte */
.adresssuche { width: 100%; }
.adresssuche label { margin-top: 0; }
.adresssuche-zeile { display: flex; gap: 8px; }
.adresssuche-zeile input { flex: 1; }
.adresssuche-zeile .btn { margin-top: 0; }
.adresse-treffer { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.adresse-treffer button { width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #edf1ec; padding: 10px 12px; font: inherit; cursor: pointer; }
.adresse-treffer li:last-child button { border-bottom: 0; }
.adresse-treffer button:hover, .adresse-treffer button:focus { background: var(--blatt-zart); }
.adresse-vorschlag { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; padding: 8px 12px; background: var(--blatt-zart); border: 1px solid #b9dcc4; border-radius: 10px; }

/* Prüfpunkte des Kontrollblatts */
.pp-abschnitt { font-size: 1rem; color: var(--wald); margin: 18px 0 4px; }
.pp-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pp-text { flex: 1 1 260px; min-width: 0; }
.pp-text .hilfe { display: block; margin-top: 2px; }
.pp-wahl { display: flex; flex: 0 0 auto; }
.pp-opt { position: relative; display: inline-block; margin: 0; cursor: pointer; font-size: 1rem; }
.pp-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp-opt span { display: inline-block; min-width: 76px; padding: 9px 12px; text-align: center; border: 1px solid #b9d3c0; background: #fff; color: var(--text); font-weight: 600; }
.pp-opt:first-child span { border-radius: 10px 0 0 10px; }
.pp-opt:last-child span { border-radius: 0 10px 10px 0; border-left: 0; }
.pp-opt-ob input:checked + span { background: var(--blatt-zart); color: var(--ok); border-color: var(--blatt-hell); }
.pp-opt-mangel input:checked + span { background: var(--danger); color: #fff; border-color: var(--danger); }
.pp-opt input:focus-visible + span { outline: 3px solid var(--blatt-hell); outline-offset: 2px; }
.pp-bem { flex: 1 1 100%; display: none; }
.pp-mangel .pp-bem, .pp-bem:has(.errorlist) { display: block; }
.pp-mangel { background: var(--danger-zart); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.feld-titel { display: block; font-weight: 600; margin: 14px 0 6px; }
.ankreuz-liste label { display: block; font-weight: normal; margin: 4px 0; }
.schnellwahl { margin-top: 8px; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-tabelle td.pp-ergebnis { white-space: nowrap; }

/* Sortierbare Spaltenueberschriften */
th a.sortier-link { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sortier-link:hover { color: var(--blatt); }
th a.sortier-link .pfeil { margin-left: 4px; font-size: .75em; opacity: .45; }
th a.sortier-link.aktiv { color: var(--wald); }
th a.sortier-link.aktiv .pfeil { opacity: 1; }
