/* IMO App – Designsystem (D14, Designsprache 20.11.2026).
   Tannengrün als einzige Akzentfarbe, Messing nur als feine Linie und Auszeichnung.
   Kompakt und informationsdicht, feine Linien statt Schatten, Dunkelmodus.
   Bewusst anders als EDU (dunkle Seitenleiste, Limette, Pillen) und GZL (Petrol, Bernstein).

   Farben A110 (Auftrag Sven 24.11.2026): Messing als Signalfarbe für das Wichtige, Tannengrün
   kräftiger in Köpfen und Flächen, klarere Statusfarben, deutlichere Hervorhebung; WCAG AA hell
   und dunkel (geprüft in tests/test_a110_farben.py).

   Schalter A110: jeder Punkt lässt sich mit einer Zeile im ersten :root-Block zurücknehmen,
   indem der Wert nach „zurück:“ eingesetzt wird (gilt hell und dunkel).
     --knopf-haupt          Hauptknöpfe Messing          zurück: var(--accent)
     --knopf-haupt-hover    dazu beim Darüberfahren       zurück: var(--accent-hover)
     --knopf-haupt-text     Schrift auf Hauptknöpfen      zurück: var(--on-accent)
     --knopf-haupt-rand     Rand der Hauptknöpfe (3:1)   zurück: var(--knopf-haupt)
     --seitengrund          grüner Seitengrund            zurück: var(--bg)
     --leiste-linie         Messinglinie unter der Leiste zurück: 1px solid var(--line)
     --menue-aktiv-flaeche  aktiver Menüpunkt Messing     zurück: var(--reiter-aktiv-flaeche)
     --menue-aktiv-text     Schrift im aktiven Menüpunkt  zurück: var(--titel-farbe)
     --reiter-aktiv-flaeche aktiver Reiter hinterlegt     zurück: var(--hover)
     --reiter-aktiv-linie   Linie unter aktivem Reiter    zurück: var(--brass)
     --titel-farbe          Seitentitel Tannengrün        zurück: var(--text)
     --kopf-flaeche         Tabellenköpfe Tannengrün hell zurück: var(--surface-2)
     --filter-flaeche       Filterzeile der Tabellen      zurück: var(--surface)
     --kartenkopf-flaeche   Kartenköpfe Tannengrün hell   zurück: transparent
     --kopf-schrift         Schrift in Köpfen             zurück: var(--th)
     --kopf-linie-farbe     Linie unter Köpfen, Kartenrand zurück: var(--line)
     --summen-flaeche       Summenzeilen                  zurück: var(--surface-2)
     --knopf2-flaeche       Zweitknöpfe hinterlegt        zurück: var(--surface)
     --knopf2-text          Schrift der Zweitknöpfe       zurück: var(--accent)
     --kennzahl-farbe       Kennzahlen in Messing         zurück: var(--text)
     --kennzahl-symbol      Symbol der Kennzahl           zurück: var(--brass)
     --kennzahl-streifen    Messingstreifen der Kennzahlen zurück: var(--line)
     --zaehler-farbe        Zähler und Schnellfilter      zurück: var(--text)
     --zeile-hover-farbe    Zeile beim Darüberfahren      zurück: var(--hover)
     --zeile-auswahl-farbe  gewählte Zeile               zurück: var(--hover)
     --status-streifen      farbiger Rand in „Zu tun“     zurück: 0px
   Kopfzeile A127 (Variante C, Freigabe Sven 24.11.2026): weiße Kopfzeile mit dünner Messinglinie,
   aktiver Menüpunkt als Messing-Fläche, übrige Menüpunkte grau; Desktop und Handy.
   Statusfarben: Block „Statusfarben A110“ unter den Designwerten löschen. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/inter/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500 600; font-style: normal; font-display: swap;
  src: url("../fonts/inter/Inter-Medium.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-2: #f8faf7;
  --hover: #eef3ef;
  --line: #dce3dc;
  --line-strong: #c3cec5;
  --text: #17211c;
  --muted: #5a6a61;
  --faint: #5f6e65;           /* AA auch auf dem grünen Seitengrund (A110) */
  --th: #3f4d45;              /* Spaltenköpfe, AA: 8,5 */
  --accent: #1d4433;          /* Tannengrün */
  --accent-hover: #15342a;
  --accent-soft: #e2ece6;
  --on-accent: #f4f7f4;
  --brass: #b08f55;           /* Messing: Linien, Auszeichnung */
  --brass-text: #7a5c2b;      /* Messing als Text (Kontrast ausreichend) */
  --brass-soft: #f4ede0;
  --ok: #2f7a4d;    --ok-soft: #e4f1e8;
  --warn: #9a6512;  --warn-soft: #f8eedb;
  --bad: #ad3b33;   --bad-soft: #f8e5e3;
  --info: #3a6580;  --info-soft: #e3edf3;
  /* Farben A110 (Palette) */
  --signal: #c39a4f;            /* Messing kräftig: Hauptknöpfe, aktive Reiter */
  --signal-hover: #b0873d;
  --on-signal: #1d160a;         /* Text auf Messing */
  --signal-text: #7a5a22;       /* Messing als Text */
  --signal-soft: #f6ecd8;
  --signal-linie: #a57f36;      /* Messing als Linie, 3:1 auf Weiß */
  --kopf: #dfeae3;              /* Tannengrün hell für Köpfe (Nebentext darauf AA) */
  --kopf-text: #173a2b;
  --kopf-linie: #a9c2b2;
  --summe: #c9ddd0;
  --summe-leise: #4a5850;      /* Nebentext in Summenzeilen, 5,3:1 (A110) */
  --grund: #edf2ec;             /* Seitengrund leicht grün */
  --knopf2: #eef5f0;
  --zeile-hover: #e6f1ea;
  --zeile-auswahl: #f3e7cd;
  --titel: #1d4433;
  /* Schalter A110 (siehe Kopf der Datei); nur hier, der Dunkelmodus ändert nur die Palette */
  --knopf-haupt: var(--signal);
  --knopf-haupt-hover: var(--signal-hover);
  --knopf-haupt-text: var(--on-signal);
  --knopf-haupt-rand: var(--signal-linie);
  --seitengrund: var(--grund);
  --leiste-linie: 1px solid var(--signal);       /* A127 Variante C: dünne Linie */
  --menue-aktiv-flaeche: var(--signal);         /* A127: aktiver Menüpunkt als Messing-Fläche */
  --menue-aktiv-text: var(--on-signal);
  --reiter-aktiv-flaeche: var(--signal-soft);
  --reiter-aktiv-linie: var(--signal-linie);
  --titel-farbe: var(--titel);
  --kopf-flaeche: var(--kopf);
  --filter-flaeche: var(--kopf);
  --kartenkopf-flaeche: var(--kopf);
  --kopf-schrift: var(--kopf-text);
  --kopf-linie-farbe: var(--kopf-linie);
  --summen-flaeche: var(--summe);
  --knopf2-flaeche: var(--knopf2);
  --knopf2-text: var(--titel);
  --kennzahl-farbe: var(--signal-text);
  --kennzahl-symbol: var(--signal-text);
  --kennzahl-streifen: var(--signal);
  --zaehler-farbe: var(--signal-text);
  --zeile-hover-farbe: var(--zeile-hover);
  --zeile-auswahl-farbe: var(--zeile-auswahl);
  --status-streifen: 3px;
  --radius: 4px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Mindestwerte (A141, zentral): Text und Tabellen 14 px, Hinweise 13 px, Marken und Zähler 12 px;
     Felder und Knöpfe 40 px (Handy 44 px); dichte Tabellen: Zeile 28 px, Filterzeile 32 px.
     Ein Test (tests/test_a141_mindestwerte.py) lehnt kleinere Werte ab. */
  --fs: 14px;
  --fs-s: 13px;
  --fs-xs: 13px;
  --fs-marke: 12px;
  --row: 28px;
  --feld-h: 40px;
  --knopf-h: 40px;
  --klick: 40px;
  --filter-h: 32px;
  --header-h: 46px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1512; --surface: #141d19; --surface-2: #19241f; --hover: #1f2c26;
    --line: #26342d; --line-strong: #33453c; --text: #e3eae5; --muted: #9baba1; --faint: #8d9e94; --th: #b4c2b9;
    --accent: #6fae8c; --accent-hover: #86c0a1; --accent-soft: #1d2f27; --on-accent: #0c1410;
    --brass: #c6a46a; --brass-text: #d4b47c; --brass-soft: #2a2418;
    --ok: #6cbf8c; --ok-soft: #17291f; --warn: #d9a548; --warn-soft: #2c2414;
    --bad: #e07a70; --bad-soft: #2f1a18; --info: #7fb0cf; --info-soft: #172530;
    --signal: #d6b06a; --signal-hover: #e2c07f; --on-signal: #17120a; --signal-text: #e0bd7b; --signal-soft: #2f2716; --signal-linie: #d6b06a;
    --kopf: #1f3329; --kopf-text: #cfe3d6; --kopf-linie: #36503f; --summe: #26402f; --summe-leise: #a9b9af; --grund: #0c1310;
    --knopf2: #182620; --zeile-hover: #1f3329; --zeile-auswahl: #3a301b; --titel: #8cc4a4;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1512; --surface: #141d19; --surface-2: #19241f; --hover: #1f2c26;
  --line: #26342d; --line-strong: #33453c; --text: #e3eae5; --muted: #9baba1; --faint: #8d9e94; --th: #b4c2b9;
  --accent: #6fae8c; --accent-hover: #86c0a1; --accent-soft: #1d2f27; --on-accent: #0c1410;
  --brass: #c6a46a; --brass-text: #d4b47c; --brass-soft: #2a2418;
  --ok: #6cbf8c; --ok-soft: #17291f; --warn: #d9a548; --warn-soft: #2c2414;
  --bad: #e07a70; --bad-soft: #2f1a18; --info: #7fb0cf; --info-soft: #172530;
  --signal: #d6b06a; --signal-hover: #e2c07f; --on-signal: #17120a; --signal-text: #e0bd7b; --signal-soft: #2f2716; --signal-linie: #d6b06a;
  --kopf: #1f3329; --kopf-text: #cfe3d6; --kopf-linie: #36503f; --summe: #26402f; --summe-leise: #a9b9af; --grund: #0c1310;
  --knopf2: #182620; --zeile-hover: #1f3329; --zeile-auswahl: #3a301b; --titel: #8cc4a4;
}

/* Statusfarben A110: satter, immer mit Symbol oder Text (zum Zurücknehmen diesen Block löschen) */
:root { --ok: #24703f; --ok-soft: #d9eedf; --warn: #8c5a08; --warn-soft: #f6e4c2; --bad: #a3322a; --bad-soft: #f6d9d6; --info: #2e5d7a; --info-soft: #d9e8f1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ok: #74c895; --ok-soft: #173023; --warn: #e3b25a; --warn-soft: #33270f; --bad: #ec8a80; --bad-soft: #3a1c19; --info: #8ebfdc; --info-soft: #172b38; } }
/* A147: Messing des Logos A5 (hell wie --signal-text, dunkel wie --signal) */
:root { --logo-messing: #7a5a22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-messing: #d6b06a; } }
:root[data-theme="dark"] { --logo-messing: #d6b06a; }
/* A148: Zweitzeichen K1 – hell weißes Abzeichen mit Messingrand, dunkel dunkles Abzeichen ohne Außenrand */
:root { --k1-flaeche: #ffffff; --k1-rand: #7a5a22; --k1-und: #5a6a61; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --k1-flaeche: #0c1310; --k1-rand: none; --k1-und: #9baba1; } }
:root[data-theme="dark"] { --k1-flaeche: #0c1310; --k1-rand: none; --k1-und: #9baba1; }
:root[data-theme="dark"] { --ok: #74c895; --ok-soft: #173023; --warn: #e3b25a; --warn-soft: #33270f; --bad: #ec8a80; --bad-soft: #3a1c19; --info: #8ebfdc; --info-soft: #172b38; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--seitengrund); color: var(--text); font: 400 var(--fs)/1.45 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
.num, td.num, .kpi-value, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-weight: 500; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: 18px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
p { margin: 0 0 8px; }
code { font-size: var(--fs-s); background: var(--surface-2); border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.xs { font-size: var(--fs-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- Kopfzeile */
.hdr { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: var(--leiste-linie); }
.hdr-in { display: flex; align-items: center; gap: 18px; height: var(--header-h); padding: 0 16px; max-width: 1680px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.brand:hover { text-decoration: none; }
.brand svg { height: 22px; width: auto; display: block; }
/* A151: Zeichen nie stauchen oder am Rand beschneiden (Safari rundet die Breite ab) */
.brand { flex-shrink: 0; }
.brand svg, svg.k1 { flex: none; overflow: visible; }
.hdr .brand .wm-a5-symbol { width: 25px; }
/* A147: Logo A5 – I, T und Dreieck in Messing, übrige Buchstaben in Textfarbe */
.brand .wm-a5 { color: var(--text); }
.brand .wm-a5-symbol { display: none; }
/* A149: Wortmarke ohne Zusatz und größer – Kopfzeile 28 px, Anmeldeseite 40 px mittig */
.hdr .brand .wm-a5-voll { height: 30px; width: 160px; }  /* A151: feste, aufgerundete Breite */
.tabs { display: flex; align-self: stretch; gap: 2px; margin-left: 8px; flex: 1 1 auto; min-width: 0; }
.tabs-links { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs-links::-webkit-scrollbar { display: none; }
.tabs-links a { white-space: nowrap; }
.tabs-links > a[hidden] { display: none; }  /* A150: überzählige Reiter stehen im Menü „Mehr“ */
.menu-links hr[data-ueberlauf] { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.tabs a[aria-current="page"] { color: var(--titel-farbe); border-bottom-color: var(--reiter-aktiv-linie); }
.hdr-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.search { position: relative; }
.search input[type=search] { width: 220px; height: var(--feld-h); padding: 0 8px 0 28px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); color: var(--text); font: inherit; }
.search input[type=search]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search svg { position: absolute; left: 8px; top: 6px; color: var(--faint); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--klick); height: var(--klick); padding: 0 6px; border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; font: inherit; }
.iconbtn:hover { background: var(--hover); color: var(--text); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang button { border: 0; background: none; padding: 0 9px; height: var(--klick); font: 500 var(--fs-xs) var(--font); color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 2px 6px; border-radius: var(--radius); }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover { background: var(--hover); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font: 500 var(--fs-marke) var(--font); border: 1px solid var(--line); }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 4px; z-index: 40; }
.menu a, .menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 6px 8px; color: var(--text); border: 0; background: none; font: inherit; cursor: pointer; text-align: left; border-radius: 3px; }
.menu a:hover, .menu button:hover { background: var(--hover); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .menu-head { padding: 6px 8px; color: var(--muted); font-size: var(--fs-s); }

.band { font-size: var(--fs-s); padding: 3px 16px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.band-test { background: var(--brass-soft); color: var(--brass-text); border-bottom: 1px solid var(--line); }
.band-viewas { background: var(--info-soft); color: var(--info); border-bottom: 1px solid var(--line); }
.band form { display: inline; }

/* -------------------------------------------------------------------- Seite */
.page { max-width: 1680px; margin: 0 auto; padding: 12px 16px 72px; }
.pagehead { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 10px; }
.pagehead .crumb { color: var(--muted); font-size: var(--fs-s); }
.pagehead .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; }
/* A186: Die Spalten von .grid-main wachsen nie über ihren Platz hinaus. Ohne feste Spalte
   bekam das innere Raster eine auto-Spalte so breit wie der breiteste Inhalt (Flurstückstabelle
   mit festen Spaltenköpfen), die rechte Spalte lief über den Fensterrand. */
.grid-main > .grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.grid-main > aside table.t th { white-space: normal; hyphens: auto; }
/* A186b: Umbruch nur zwischen Wörtern. overflow-wrap: anywhere machte die Mindestbreite jeder
   Zelle einen Buchstaben breit, Verwalternamen liefen Buchstabe für Buchstabe nach unten.
   break-word bricht ein Wort nur, wenn es allein nicht in die Zeile passt; Silbentrennung nur
   in den Spaltenköpfen. Lange E-Mail-Adressen (ein Wort ohne Trennstelle) dürfen überall brechen. */
.grid-main > aside table.t td { overflow-wrap: break-word; }
.grid-main > aside dl.kv { grid-template-columns: 110px minmax(0, 1fr); }
.grid-main > aside dl.kv dd { min-width: 0; overflow-wrap: break-word; }
.grid-main > aside .card-h { flex-wrap: wrap; }
.grid-main > aside a[href^="mailto:"], [data-dl-objekt] a[href^="mailto:"] { overflow-wrap: anywhere; }
/* Flurstücke (fünf Spalten in 340 px): Silbentrennung für Gemarkung und Wirtschaftsart, engere
   Zellränder; Namen von Personen stehen nicht in dieser Tabelle. */
.grid-main > aside table[data-flurstuecke] td { hyphens: auto; }
.grid-main > aside table[data-flurstuecke] :is(th, td) { padding-left: 4px; padding-right: 4px; }
[data-verwaltung] .vw-status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }

.card { background: var(--surface); border: 1px solid var(--kopf-linie-farbe); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--kopf-linie-farbe); min-height: 34px; background: var(--kartenkopf-flaeche); border-radius: var(--radius) var(--radius) 0 0; }
.card-h h2 { font-size: 13px; font-weight: 600; color: var(--kopf-schrift); }
.card-h .tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.card-b { padding: 8px 10px; }
.card-b.flush { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .chev { transition: transform .15s; color: var(--faint); }
details.fold[open] > summary .chev { transform: rotate(90deg); }

/* Kennzahlenleiste: schmal, nur Werte, die etwas zu zeigen haben (dynamisch) */
.kpis { display: flex; flex-wrap: wrap; gap: 0; background: var(--surface); border: 1px solid var(--kopf-linie-farbe); border-left: 4px solid var(--kennzahl-streifen); border-radius: var(--radius); margin-bottom: 12px; }
.kpi { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .i { color: var(--kennzahl-symbol); }
.kpi-value { font-weight: 600; font-size: 15px; color: var(--kennzahl-farbe); }
.kpi-label { color: var(--muted); font-size: var(--fs-s); }
.kpi.is-warn .kpi-value { color: var(--warn); }
.kpi.is-bad .kpi-value { color: var(--bad); }

/* ------------------------------------------------------------------ Knöpfe */
.btn { display: inline-flex; align-items: center; gap: 6px; height: var(--knopf-h); padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--knopf-haupt-rand); background: var(--knopf-haupt); color: var(--knopf-haupt-text); font: 500 var(--fs) var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--knopf-haupt-hover); border-color: var(--knopf-haupt-rand); text-decoration: none; }
.btn-secondary { background: var(--knopf2-flaeche); color: var(--knopf2-text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--zeile-hover-farbe); border-color: var(--accent); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn-danger:hover { background: var(--bad); border-color: var(--text); }
.btn-sm { height: var(--knopf-h); padding: 0 10px; font-size: var(--fs-s); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- Formular */
.form { max-width: 640px; }
/* align-content: start hält Eingabefelder auf einer Linie, auch wenn ein Nachbar einen Hinweis hat */
.field { display: grid; gap: 3px; margin-bottom: 10px; align-content: start; }
.field label { font-size: var(--fs-s); color: var(--muted); font-weight: 500; }
.field .hint { font-size: var(--fs-xs); color: var(--faint); }
.field .err { font-size: var(--fs-s); color: var(--bad); }
/* .field input:not([type]): Textfeld ohne type-Angabe sieht aus wie die anderen (A105) */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], .field input:not([type]), select, textarea {
  height: var(--feld-h); padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; width: 100%; }
textarea { height: auto; min-height: 70px; padding: 6px 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: start; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.form-block + .form-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.grid-top { align-items: start; }
.field-row > .field-voll { grid-column: 1 / -1; margin: -4px 0 6px; }
/* Häkchen in eigener Zeile über die ganze Breite, links bündig (A64) */
.field-check { grid-column: 1 / -1; }
.field-check .check { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 400; }
.field-check .check input { width: auto; height: auto; margin: 0; }
/* Festes Raster mit drei Spalten (Dokument hochladen); am Handy untereinander */
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; align-items: start; }
.field-grid > .field-voll { grid-column: 1 / -1; }
.field-grid > .field-breit { grid-column: span 2; }
.field-gueltig[hidden], .field[hidden] { display: none; }
@media (max-width: 640px) { .field-grid { grid-template-columns: minmax(0, 1fr); } .field-grid > .field-breit { grid-column: auto; } }
.such-auswahl { display: grid; grid-template-columns: minmax(70px, 0.7fr) minmax(0, 1.3fr); gap: 6px; }
.select-suche { height: var(--feld-h); font-size: var(--fs-s); }
.dt-filters .such-auswahl { grid-template-columns: 1fr; gap: 2px; }
.dt-filters .select-suche { height: var(--filter-h); }
.datei-zeilen { margin: 0 0 12px; }
.datei-zeilen td { vertical-align: middle; }
select[data-kategorie-fest] { opacity: .65; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 0 0 10px; }
legend { font-size: var(--fs-s); color: var(--brass-text); padding: 0 4px; }

/* ---------------------------------------------------------------- Hinweise */
.notice { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; background: var(--surface); }
.notice-success { border-color: var(--ok); background: var(--ok-soft); }
.notice-error { border-color: var(--bad); background: var(--bad-soft); }
.notice-warning { border-color: var(--warn); background: var(--warn-soft); }
.notice-info { border-color: var(--info); background: var(--info-soft); }
.messages { margin-bottom: 10px; }

/* Status: kleine Symbole mit sparsamer Ampel, Erklärung im Tooltip */
.st { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; }
.st svg.i { width: 14px; height: 14px; }
.st-ok { color: var(--ok); background: var(--ok-soft); }
.st-warn { color: var(--warn); background: var(--warn-soft); }
.st-bad { color: var(--bad); background: var(--bad-soft); }
.st-info { color: var(--info); background: var(--info-soft); }
.st-off { color: var(--faint); background: var(--surface-2); }
/* Art einer Telefonnummer (A113): kleines Symbol vor der Nummer, Art im Tooltip */
.tel-art { display: inline-flex; margin-right: 4px; color: var(--muted); }
.tel-art svg.i { width: 13px; height: 13px; vertical-align: -2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 3px; font-size: var(--fs-marke); border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.tag-brass { border-color: var(--brass); color: var(--brass-text); background: var(--brass-soft); }
.tag-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.code { font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* Tooltip über data-tip (jedes Symbol erklärt sich beim Überfahren) */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  background: var(--text); color: var(--surface); font: 400 var(--fs-xs)/1.35 var(--font); padding: 4px 7px; border-radius: 3px;
  white-space: pre; max-width: 320px; z-index: 50; pointer-events: none; }
[data-tip-pos="below"]:hover::after { bottom: auto; top: calc(100% + 6px); }
/* Hover-Info mit Inhalt (Aufschlüsselung, Vorschau) */
.hover { position: relative; }
.hover .pop { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 45; min-width: 220px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 8px; font-size: var(--fs-s); }
/* A188: nur Maus darüber oder Tastaturfokus öffnet; ein Mausklick hält das Fenster nicht offen.
   Ragt das Fenster rechts aus der Seite, setzt imo.js es an die rechte Kante der Kennzahl. */
.hover:hover .pop, .hover:focus-visible .pop { display: block; } .hover:has(:focus-visible) .pop { display: block; }
.hover .pop { max-height: min(60vh, 420px); overflow: auto; }

/* ---------------------------------------------------------------- Listen */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows.link > li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; }
.objrow > summary, .objhead { display: grid; grid-template-columns: 28px 40px minmax(10rem, 1.3fr) var(--objcols, auto); gap: 10px; align-items: center; padding: 6px 10px; cursor: pointer; list-style: none; }
/* Angaben in der zugeklappten Zeile (A76): feste Breiten, damit die Spalten untereinander stehen */
.objhead { cursor: default; padding-top: 2px; padding-bottom: 2px; color: var(--muted); font-size: var(--fs-s); border-bottom: 1px solid var(--line); }
.objhead .c-soll, .objhead .c-fl, .objhead .c-auf { text-align: right; }
.c-eig { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-s); }
.c-soll, .c-fl { text-align: right; font-size: var(--fs-s); white-space: nowrap; }
.c-auf { text-align: right; font-size: var(--fs-s); color: var(--muted); text-decoration: none; }
.c-auf.has { color: var(--text); font-weight: 500; }
.c-frist { font-size: var(--fs-s); white-space: nowrap; }
.c-frist a { color: inherit; }
.c-frist a.is-bad { color: var(--bad); font-weight: 500; }
.c-anteil, .c-einh { text-align: right; white-space: nowrap; }
.objhead > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.objrow .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eig-blaetter { list-style: none; margin: 2px 0 0; padding: 0; }
.eig-blaetter li { display: flex; justify-content: space-between; gap: 8px; }
.objrow > summary::-webkit-details-marker { display: none; }
.objrow > summary:hover { background: var(--hover); }
.objrow > summary { min-height: 44px; }
.objrow .chev { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 36px; cursor: pointer; border-radius: var(--radius); }
.objrow .chev:hover { background: var(--line); }
.objrow-link { color: inherit; text-decoration: none; }
.objrow-link:hover .code, .objrow-link:focus-visible .code, .objrow-link:hover b, .objrow-link:focus-visible b { text-decoration: underline; color: var(--accent); }
.objrow-link:focus-visible { outline: 2px solid var(--accent-soft); border-radius: var(--radius); }
.objrow .detail a { color: inherit; }
.objrow .detail a:hover { color: var(--accent); text-decoration: underline; }
.thumb { width: 40px; height: 30px; border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.objrow .addr { min-width: 0; }
.objrow .addr b { font-weight: 500; }
.objrow .addr span { color: var(--muted); font-size: var(--fs-s); margin-left: 6px; }
.objrow .share { font-variant-numeric: tabular-nums; color: var(--brass-text); font-size: var(--fs-s); }
.objrow .detail { padding: 4px 10px 10px 76px; background: var(--surface-2); border-top: 1px dashed var(--line); }
.zutun .rows li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 10px; }
.empty { padding: 14px 10px; color: var(--faint); text-align: center; font-size: var(--fs-s); }

/* Einfache Tabelle (die Tabellenkomponente erweitert diese Regeln) */
table.t { width: 100%; border-collapse: collapse; font-size: var(--fs); }
table.t th { text-align: left; font-weight: 600; font-size: var(--fs-s); color: var(--kopf-schrift); text-transform: none; padding: 5px 8px; border-bottom: 1px solid var(--kopf-linie-farbe); background: var(--kopf-flaeche); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 4px 8px; border-bottom: 1px solid var(--line); height: var(--row); vertical-align: middle; }
table.t tr:hover td { background: var(--zeile-hover-farbe); }
table.t td.num, table.t th.num { text-align: right; }

dl.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 12px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: var(--fs-s); }
dl.kv dd { margin: 0; }

/* ---------------------------------------------------------------- Anmeldung */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 22px 24px; }
.auth-card .brand { margin-bottom: 18px; justify-content: center; }
.auth-card .brand .wm-a5-voll { height: 42px; width: 224px; margin: 6px 0 4px; }  /* A149 */
.auth-card h1 { margin-bottom: 12px; }
.auth-card .btn { width: 100%; justify-content: center; height: var(--knopf-h); }
.auth-foot { margin-top: 14px; display: flex; justify-content: space-between; color: var(--faint); font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- Handy */
.mobnav { display: none; }
/* A152: Notfallplan am Handy als Liste mit Anruf-Knopf (Tabelle am Desktop und im Druck) */
.notfall-liste { display: none; list-style: none; margin: 0; padding: 0; }
.notfall-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.notfall-liste li:last-child { border-bottom: 0; }
.notfall-liste .nl-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notfall-liste .btn-anruf { flex: none; min-height: 44px; white-space: nowrap; gap: 6px; }
@media (max-width: 860px) {
  .tabs, .search { display: none; }
  .card table.t.notfall-tabelle, .card-b table.t.notfall-tabelle { display: none; }  /* A152: stärker als die Wisch-Regel für Tabellen */
  .notfall-liste { display: block; }
  .hdr .brand .wm-a5-voll { display: none; }  /* A147: am Handy nur das Dreieck */
  .hdr .brand .wm-a5-symbol { display: block; }
  .grid-2, .grid-main { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 10px 10px 72px; }
  .mobnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); }
  .mobnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; color: var(--muted); font-size: var(--fs-marke); }
  .mobnav a[aria-current="page"] { color: var(--titel-farbe); background: var(--reiter-aktiv-flaeche); box-shadow: inset 0 3px 0 var(--reiter-aktiv-linie); font-weight: 600; }
  .objrow > summary { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
  .objrow .addr { white-space: normal; }
  .objhead { display: none; }
  .objrow .chev { min-width: 44px; min-height: 44px; }
  .objrow .thumb, .objrow .hide-m { display: none; }
  .objrow .detail { padding-left: 10px; }
  dl.kv { grid-template-columns: 120px minmax(0, 1fr); }
  /* Phase 3: viele Bereiche in der unteren Leiste wischen statt quetschen */
  .mobnav { overflow-x: auto; scrollbar-width: none; }
  .mobnav a { flex: 1 0 68px; white-space: nowrap; }  /* A153: sichtbare Bereiche füllen die Leiste */
  .mobnav > a[hidden] { display: none; }  /* A153: was nicht ganz passt, steht unter „Alle“ */
  .pagehead { flex-wrap: wrap; }
  .pagehead .actions { flex-wrap: wrap; margin-left: 0; }
  /* einfache Tabellen (ohne Tabellenkomponente) seitlich wischen */
  .card > table.t, .card-b > table.t { display: block; overflow-x: auto; white-space: nowrap; }
  .card[data-verwaltung] > table.t { display: table; white-space: normal; }  /* A186b: eine Spalte, umbrechen statt wischen */
}

@media print {
  .hdr, .mobnav, .band, .pagehead .actions, .no-print { display: none; }
  .card table.t.notfall-tabelle, .card-b table.t.notfall-tabelle { display: table; }  /* A152: im Druck immer die Tabelle */
  a[data-tel] { color: inherit; }
  .notfall-liste { display: none; }
  :root { --k1-flaeche: #ffffff; --k1-rand: #7a5a22; --k1-und: #5a6a61; --logo-messing: #7a5a22; }  /* A148: Druck immer hell */
  .k1-siegel.nur-druck { display: flex; position: fixed; right: 0; bottom: 0; align-items: center; gap: 6px; font-size: 8pt; color: #4a5850; }
  .k1-siegel .k1 { height: 14px; width: 28px; }
  .fuss.no-print { display: none; }  /* A148: Fußzeile nicht drucken (spätere .fuss-Regel hob no-print auf) */
  body { background: #fff; }
  .card { border-color: #bbb; }
}
.codes { font: 500 15px/1.6 ui-monospace, Menlo, monospace; list-style: none; padding: 0; columns: 2; }
.qr img { background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------------------------------------------------------- Tabellenkomponente */
.dt { overflow: visible; }
.dt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dt-search { position: relative; }
.dt-search svg { position: absolute; left: 7px; top: 6px; color: var(--faint); }
.dt-search input[type=search] { height: var(--feld-h); width: 260px; padding-left: 28px; }
.dt-count { color: var(--muted); font-size: var(--fs-s); }
.dt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: var(--filter-h); padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: var(--fs-s); background: var(--surface-2); }
.chip b { font-weight: 600; color: var(--zaehler-farbe); }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.is-on { border-color: var(--reiter-aktiv-linie); background: var(--reiter-aktiv-flaeche); color: var(--titel-farbe); }
.dt-tools { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.dt-menu { position: relative; }
.dt-menu > summary { list-style: none; }
.dt-menu > summary::-webkit-details-marker { display: none; }
.dt-cols { min-width: 260px; max-height: 60vh; overflow: auto; }
.dt-col { display: flex; align-items: center; gap: 2px; padding: 1px 4px; }
.dt-col label { flex: 1; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.dt-col .iconbtn { min-width: var(--filter-h); height: var(--filter-h); }  /* dichte Liste der Spaltenwahl (A141) */
.dt-colbtns, .dt-saveview { display: flex; gap: 6px; padding: 4px; }
.dt-saveview input { height: var(--feld-h); }
.dt-scroll { overflow-x: auto; }
.dt-table th a.dt-sort { color: inherit; }
.dt-table th a.dt-sort.is-asc::after { content: " ↑"; color: var(--brass-text); }
.dt-table th a.dt-sort.is-desc::after { content: " ↓"; color: var(--brass-text); }
.dt-filters th { padding: 3px 4px; background: var(--filter-flaeche); top: 28px; }
.dt-filters input, .dt-filters select { height: var(--filter-h); font-size: var(--fs-s); font-weight: 400; padding: 0 5px; min-width: 60px; border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.dt-table tr[data-href] { cursor: pointer; }
.dt-table tfoot td { border-top: 2px solid var(--kopf-linie-farbe); background: var(--summen-flaeche); color: var(--kopf-schrift); white-space: nowrap; }
.dt-summe-m { display: none; margin: 6px 4px; }
.dt-summe .dt-summe-g td { font-weight: normal; color: var(--muted); border-top: 0; padding-top: 2px; }
.dt-foot { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-top: 1px solid var(--line); }
.dt-foot select { height: var(--filter-h); width: auto; }
.dt-pager { margin-left: auto; display: flex; align-items: center; gap: 6px; }
body.wide .page { max-width: none; }
@media (max-width: 860px) {
  .dt-search input[type=search] { width: 100%; }
  .dt-table thead { display: none; }
  .dt-table, .dt-table tbody, .dt-table tr, .dt-table td { display: block; width: 100%; }
  .dt-table tr { border-bottom: 1px solid var(--line); padding: 6px 4px; }
  .dt-table td { border: 0; height: auto; padding: 1px 6px; display: flex; gap: 8px; text-align: left !important; }
  .dt-table td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); min-width: 110px; }
  .dt-table td.hide-m { display: none; }
  .dt-table tfoot { display: none; }
  .dt-summe-m { display: block; }
}

/* Grafikbereich der Startseite: schlichte Balken */
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px; gap: 8px; align-items: center; }
.bar { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar-row .num { text-align: right; }
.objrow .chev svg { transition: transform .15s; color: var(--faint); }
.objrow[open] .chev svg { transform: rotate(90deg); }
.objrow h3 { margin: 4px 0; font-weight: 500; }
.code, table.t td.num, table.t td.code { white-space: nowrap; }
.objrow .detail.grid-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 860px) { .objrow .detail.grid-2 { grid-template-columns: minmax(0, 1fr); } }
.viewer { width: 100%; height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* Monatsansicht der Fristen */
table.cal { table-layout: fixed; }
table.cal td { vertical-align: top; height: 86px; padding: 3px 4px; border-right: 1px solid var(--line); }
table.cal td.leer { background: var(--surface-2); }
table.cal td.heute { box-shadow: inset 0 2px 0 var(--brass); }
.tag-num { font-size: var(--fs-xs); color: var(--muted); }
.cal-item { display: block; color: inherit; text-decoration: none; font-size: var(--fs-xs); padding: 1px 4px; margin-top: 2px; border-left: 2px solid var(--line-strong); background: var(--surface-2); border-radius: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cal-item:hover { text-decoration: underline; }
.cal-ueberfaellig { border-left-color: var(--bad); }
.cal-faellig { border-left-color: var(--warn); }
.cal-erledigt { opacity: .55; text-decoration: line-through; }
.zutun .rows li { align-items: center; } .zutun .rows li > span { flex: 1; } .zutun .rows li > span.st { flex: 0 0 20px; } .todo-act { margin-left: auto; }
.merkmal { display: flex; gap: 6px; align-items: center; padding: 2px 0; font-size: var(--fs); } fieldset legend .tag { margin-left: 6px; }

.fotos { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.fotos img { height: 84px; border-radius: var(--radius); border: 1px solid var(--line); }
.fotos img.haupt { border-color: var(--brass); }
.foto-neu { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; overflow-x: auto; }
.subtabs a { padding: 6px 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a[aria-current="page"] { color: var(--titel-farbe); border-bottom: 3px solid var(--reiter-aktiv-linie); background: var(--reiter-aktiv-flaeche); font-weight: 600; }
.subtabs a:hover { text-decoration: none; color: var(--text); }

/* Glocke mit Zähler (Phase 4) */
.bell { position: relative; }
.bell .badge { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: var(--fs-marke); line-height: 18px; text-align: center; font-weight: 500; }
.mailtext { white-space: pre-wrap; font-size: var(--fs); max-height: 420px; overflow: auto; }
.navmehr { align-self: center; }
.navmehr > summary { color: var(--muted); font-weight: 500; }
.navmehr > summary[aria-current="page"] { color: var(--accent); }
.menu-links { left: 0; right: auto; min-width: 200px; }
.menu-links a { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: var(--text); border-radius: var(--radius); }
.menu-links a:hover { background: var(--hover); text-decoration: none; }

/* Klauselprüfung (P6-S06): je Klausel Text links, Ergebnis rechts; auf dem Handy untereinander */
.klauseln { list-style: decimal; margin: 0; padding-left: 20px; }
.klausel { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.klausel:last-child { border-bottom: 0; }
.klausel-text { flex: 1; min-width: 0; }
.klausel-text p { margin: 2px 0 0; }
.klausel select { flex: 0 0 210px; width: 210px; }
@media (max-width: 640px) { .klausel { flex-direction: column; gap: 6px; } .klausel select { width: 100%; flex-basis: auto; } }

/* Strukturgrafik (A115) und Beteiligungsstruktur der Zurechnung (P8-S04): gleiche Bausteine */
.sg-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sg { display: block; max-width: none; }
.sg-box rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1; }
.sg-haupt rect { fill: var(--accent-soft); stroke-width: 2; }
.sg-objekt rect { fill: var(--brass-soft); stroke: var(--brass); }
.sg-alt rect, .sg-verdeckt rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-dasharray: 4 3; }
.sg-t1 { font-size: var(--fs-s); font-weight: 600; fill: var(--text); }
.sg-t { font-size: var(--fs-marke); fill: var(--muted); }
.sg-alt .sg-t1 { fill: var(--muted); }
.sg a:hover rect, .sg a:focus rect { stroke-width: 2.5; }
.sg-pfeil { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.sg-pfeil.sg-alt { stroke: var(--line-strong); stroke-dasharray: 4 3; }
.sg-spitze { fill: var(--accent); }
.sg-spitze.sg-alt { fill: var(--line-strong); }
.sg-wert { font-size: var(--fs-marke); font-weight: 600; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.sg-wert.sg-alt { fill: var(--muted); }
.sg-werkzeug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.sg-liste ul { margin: 0 0 8px; padding-left: 18px; }
tr.gedaempft td, li.gedaempft { color: var(--muted); }
/* Handy: Grafik als Überblick auf volle Breite, Einzelheiten in der Liste darunter (A115) */
@media (max-width: 760px) { .sg { max-width: 100%; height: auto; } }
@media print { .sg-rahmen { overflow: visible; } .sg { max-width: 100%; height: auto; } .sg-liste { break-inside: avoid; } }

/* Burger-Übersicht und anpassbare Leisten (P8-S10) */
.burger { position: relative; }
.burger > summary { list-style: none; cursor: pointer; }
.burger > summary::-webkit-details-marker { display: none; }
.burger-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(560px, 92vw); max-height: 75vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 8px 10px; columns: 2 220px; column-gap: 14px; }
.burger-kopf { column-span: all; display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.burger-kopf a { display: inline-flex; gap: 4px; align-items: center; }
.burger-gruppe { break-inside: avoid; margin-bottom: 6px; }
.burger-gruppe > summary { cursor: pointer; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--brass-text, var(--muted)); padding: 3px 2px; }
.burger-gruppe ul { list-style: none; margin: 0; padding: 0; }
.burger-gruppe li { display: flex; align-items: center; gap: 4px; }
.burger-gruppe li a { flex: 1; display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: var(--radius); color: var(--text); }
.burger-gruppe li a:hover { background: var(--hover); text-decoration: none; }
.burger-gruppe li.aktiv a { color: var(--accent); }
.burger-gruppe form { margin: 0; }
.pin { border: 0; background: none; padding: 3px; border-radius: var(--radius); color: var(--faint); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; min-width: var(--row); min-height: var(--row); }  /* in Zeilen: dichte Tabelle (A141) */
.pin:hover, .pin:focus-visible { background: var(--hover); color: var(--text); }
.pin.an { color: var(--brass); }
.leiste-liste, .leiste-frei { list-style: none; margin: 0; padding: 0; }
.leiste-liste li, .leiste-frei li { display: flex; align-items: center; gap: 6px; padding: 4px 4px; border-bottom: 1px solid var(--line); }
.leiste-liste li .name, .leiste-frei li .name { flex: 1; }
.leiste-liste li[draggable="true"] { cursor: grab; }
.leiste-liste li.zieht { opacity: .5; }
.leiste-liste li.ueber { box-shadow: inset 0 2px 0 var(--brass); }
.leiste-liste .griff { color: var(--faint); display: inline-flex; }
.leiste-knoepfe { display: flex; gap: 2px; margin: 0; }
.leiste-knoepfe button[disabled] { opacity: .3; }
@media (max-width: 760px) { .burger-panel { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; columns: 1; max-height: 70vh; } }
.mobnav a[data-burger-oeffnen] { position: sticky; right: 0; background: var(--surface); box-shadow: -6px 0 8px -6px rgba(0, 0, 0, .25); }

/* Platzhalter lesbar (AA), Leerzustände und Erste Schritte (Rückmeldung 22.11.2026) */
::placeholder { color: var(--muted); opacity: 1; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; color: var(--muted); font-size: var(--fs); }
.empty-state b { color: var(--text); font-weight: 600; }
.empty-state span { max-width: 56ch; }
.empty-state .btn { margin-top: 2px; }
td.empty .empty-state, li.empty .empty-state { text-align: center; }
.erste-schritte { margin-bottom: 12px; }
.steps { list-style: none; margin: 0; padding: 6px 10px; display: grid; gap: 4px; }
.steps li { display: flex; align-items: baseline; gap: 8px; }
.steps li.is-done > span:last-child a { color: var(--muted); }
.step-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass-text); font-size: var(--fs-marke); font-weight: 600; }

/* Info-Symbol mit Erklärung (Popover) und Hilfeseite */
.info-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--klick); height: var(--klick); margin: calc((22px - var(--klick)) / 2); padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--brass-text); cursor: pointer; vertical-align: middle; flex: none; }
.info-btn:hover, .info-btn[aria-expanded="true"] { background: var(--brass-soft); border-color: var(--brass); }
.info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.info-btn svg.i { width: 15px; height: 15px; }
.card-h .info-btn { margin-left: -4px; }
.info-pop { position: fixed; inset: auto; margin: 0; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; padding: 10px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-top: 2px solid var(--brass); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.14); font-size: var(--fs-s); line-height: 1.45; text-align: left; font-weight: 400; }
.info-pop h3 { margin: 0 0 6px; font-size: var(--fs); font-weight: 600; }
.info-pop dl { margin: 0; display: grid; gap: 2px; }
.info-pop dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; margin-top: 4px; }
.info-pop dd { margin: 0; }
.info-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
/* Hilfe A185: Suche, Themenkarten, Inhaltsverzeichnis links (Desktop) oder Chips (Handy) */
.hilfe-suche { display: flex; gap: 6px; max-width: 75ch; margin-bottom: 14px; }
.hilfe-suche input[type=search] { flex: 1; min-width: 0; height: var(--klick); font-size: var(--fs); }
.hilfe-suche .btn { height: var(--klick); }
.hilfe-themen-h, .hilfe-treffer h2 { margin: 4px 0 8px; }
.hilfe-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.hilfe-karte .card-b { display: grid; gap: 6px; align-content: start; }
.hilfe-karte .card-b p { margin: 0; color: var(--muted); }
.hilfe-karte .btn { justify-self: start; }
.hilfe-wichtig { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.hilfe-treffer { max-width: 75ch; margin-bottom: 16px; }
/* A194: jede Trefferzeile ist ganz ein Link (vorher nur der Titel; die markierten Wörter im
   Ausschnitt sahen wie Links aus, waren aber keine). Keine Überlagerung, kein absolut gesetztes
   Element in der Liste. */
.hilfe-trefferliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hilfe-trefferliste li { border-bottom: 1px solid var(--line); }
.hilfe-treffer-link { display: block; padding: 6px 8px 8px; margin: 0 -8px; border-radius: var(--radius); color: var(--text); cursor: pointer; }
.hilfe-treffer-link:hover, .hilfe-treffer-link:focus-visible { background: var(--zeile-hover-farbe); text-decoration: none; }
.hilfe-treffer-link:focus-visible { outline: 2px solid var(--signal-linie); outline-offset: 1px; }
.hilfe-treffer-titel { font-weight: 600; color: var(--accent); }
.hilfe-treffer-link:hover .hilfe-treffer-titel { text-decoration: underline; text-underline-offset: 2px; }
.hilfe-ausschnitt { display: block; margin: 2px 0 0; line-height: 1.5; }
.hilfe-seite mark, .hilfe-gruppe mark { background: var(--signal-soft); color: inherit; border-bottom: 1px solid var(--signal-linie); padding: 0 1px; }
.hilfe-gruppe { display: grid; grid-template-columns: 240px minmax(0, 75ch); gap: 18px; align-items: start; }
.hilfe-toc { position: sticky; top: calc(var(--header-h) + 44px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; font-size: var(--fs-s); }
.hilfe-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.hilfe-toc ul ul { margin: 2px 0 6px 10px; padding-left: 8px; border-left: 2px solid var(--brass); }
.hilfe-toc a { display: block; padding: 4px 6px; border-radius: var(--radius); color: var(--text); }
.hilfe-toc a:hover { background: var(--hover); text-decoration: none; }
.hilfe-toc a[aria-current] { font-weight: 600; color: var(--titel-farbe); background: var(--hover); }
.hilfe-chips { display: none; }
.hilfe-einleitung { margin: 0 0 10px; color: var(--muted); }
.hilfe-bereich { margin-bottom: 8px; scroll-margin-top: calc(var(--header-h) + 44px); }
.hilfe-bereich:target, .hilfe-bereich[open] { border-color: var(--brass); }
.hilfe-bereich > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; padding: 8px 12px; min-height: var(--klick); line-height: 1.5; }
.hilfe-bereich > summary::-webkit-details-marker { display: none; }
.hilfe-bereich > summary:hover { background: var(--hover); }
.hilfe-bereich-kopf { display: flex; align-items: center; gap: 6px; }
.hilfe-bereich-kopf h2 { font-size: var(--fs); font-weight: 600; }
.hilfe-bereich .chev { display: inline-flex; color: var(--faint); transition: transform .15s; }
.hilfe-bereich[open] > summary .chev, .hilfe-fachlich[open] > summary .chev { transform: rotate(90deg); }
.hilfe-worum { padding-left: 22px; }
.hilfe-bereich-b { padding: 4px 12px 12px 34px; line-height: 1.55; }
.hilfe-bereich-b h3 { margin: 6px 0 2px; color: var(--muted); font-weight: 600; }
.hilfe-bereich-b p { margin: 0 0 8px; }
.hilfe-pruefband { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-s); }
.hilfe-zur-seite { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hilfe-fachlich { border-top: 1px solid var(--line); padding-top: 6px; }
.hilfe-fachlich > summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--muted); min-height: var(--klick); display: flex; align-items: center; gap: 6px; }
.hilfe-fachlich > summary::-webkit-details-marker { display: none; }
.hilfe-dl { margin: 4px 0 0; display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; }
.hilfe-dl dt { color: var(--muted); font-weight: 600; }
.hilfe-dl dd { margin: 0; }
@media (max-width: 767px) {
  .hilfe-gruppe { grid-template-columns: 1fr; }
  .hilfe-toc { display: none; }
  .hilfe-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -10px 12px; padding: 0 10px 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .hilfe-chip { flex: none; display: inline-flex; align-items: center; min-height: var(--klick); padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); white-space: nowrap; scroll-snap-align: start; }
  .hilfe-chip[aria-current] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
  .hilfe-dl { grid-template-columns: 1fr; gap: 2px; }
  .hilfe-dl dd { margin-bottom: 6px; }
  .hilfe-bereich-b { padding-left: 12px; }
  .hilfe-worum { padding-left: 0; }
  .hilfe-zur-seite .btn, .hilfe-karte .btn { min-height: var(--klick); }
}
@media print { .info-btn, .info-pop { display: none !important; } }

/* Vollständigkeit: Balken mit Ampel und Liste „Noch nachzureichen“ */
.tag-bad { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.vw { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
.vw-bar { display: inline-block; width: 48px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.vw-bar > span { display: block; height: 100%; }
.vw-ok { color: var(--ok); } .vw-ok .vw-bar > span { background: var(--ok); }
.vw-warn { color: var(--warn); } .vw-warn .vw-bar > span { background: var(--warn); }
.vw-bad { color: var(--bad); } .vw-bad .vw-bar > span { background: var(--bad); }
.nachreichen li { display: grid; gap: 3px; padding: 8px 10px; }
.nr-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nr-akt { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 2px; }
.nr-form > summary { list-style: none; cursor: pointer; }
.nr-form > summary::-webkit-details-marker { display: none; }
.nr-form[open] { flex-basis: 100%; }
.nr-form form { margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); max-width: 420px; }
.regeltabelle td.arten { display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 260px; }

/* Auswertbare Merkmale: Wert, Einheit, Erklärung nebeneinander, am Handy untereinander */
.mm { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.mm-w { font-weight: 600; }
.mm-e { color: var(--muted); font-size: var(--fs-s); }
.mm-x { color: var(--muted); font-size: var(--fs-s); font-style: italic; }
.mm-x::before { content: "· "; font-style: normal; }
.mm-leer { color: var(--faint); }
.mm-input { display: flex; align-items: center; gap: 6px; }
.mm-input input { flex: 1; min-width: 96px; }  /* Zahl bleibt lesbar (A64) */
.mm-input .mm-e { white-space: nowrap; }
input.mm-x { font-style: normal; }
input.mm-x::before { content: none; }
tr.summe td { border-top: 1px solid var(--kopf-linie-farbe); background: var(--summen-flaeche); color: var(--kopf-schrift); font-weight: 600; }
/* Nebentext (grau) in Summenzeilen kräftiger, sonst unter 4,5:1 auf der grünen Fläche (A110) */
.dt-table tfoot :is(.muted, .faint, .mm-e, .mm-leer, .mm-x), .dt-table tfoot tr.dt-summe-g td, tr.summe :is(.muted, .faint, .mm-e, .mm-leer, .mm-x) { color: var(--summe-leise); }
.kz-tabelle td.num .mm { justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.kz-tabelle td, .kz-tabelle th { white-space: nowrap; }
/* Handy: Wert und Einheit in einer Zeile, nur die Erklärung darunter (A117) */
@media (max-width: 640px) { .mm { gap: 0 4px; } .mm-x { flex-basis: 100%; } .mm-x::before { content: none; } }
.field-mm { grid-column: span 2; }
.mm-paar { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.4fr); gap: 6px; align-items: center; }
@media (max-width: 640px) { .field-mm { grid-column: auto; } .mm-paar { grid-template-columns: 1fr; } }
.bk-tabelle td:nth-child(2), .bk-tabelle td:first-child b { white-space: nowrap; }

/* ------------------------------------------- Knöpfe: Abstand und Zielgröße (K1) */
/* Mehrere Knöpfe nebeneinander oder untereinander: mindestens 16 px Abstand, auf Touch-Geräten
   24 px; Ziele auf Touch-Geräten und am Handy mindestens 44 px hoch. Der Hauptknopf bleibt
   gefüllt, zurückgenommene Aktionen (Abbrechen, Abmelden) sind hell oder ein Textlink. */
.form-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 12px; }
.form-aktionen-stapel { flex-direction: column; align-items: stretch; }
.actions { gap: 12px; }
form .actions, form.actions { gap: 16px; }
:not(.actions):not(.tools):not(.form-aktionen):not(.pagehead):not(.dt-pager) > .btn + .btn { margin-inline-start: 16px; }
.btn-tertiary { background: none; border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.btn-tertiary:hover { background: none; border-color: transparent; color: var(--text); }
.auth-card .btn { height: auto; min-height: 44px; }
.auth-card .btn-tertiary { width: auto; align-self: center; }
@media (pointer: coarse), (max-width: 860px) {
  :root { --feld-h: 44px; --knopf-h: 44px; --klick: 44px; }  /* Handy: 44 px Klickfläche (A141) */
  .btn, .btn-sm, .iconbtn { min-height: var(--klick); }
  .iconbtn { min-width: var(--klick); }
  .pin { min-width: var(--klick); min-height: var(--klick); }
  .btn { height: auto; }
  .form-aktionen, form .actions, form.actions { gap: 24px; }
  .pagehead .actions { gap: 16px; }
  :not(.actions):not(.tools):not(.form-aktionen):not(.pagehead):not(.dt-pager) > .btn + .btn { margin-inline-start: 24px; }
}

/* ------------------------------------------- Impressum und Datenschutz (IM1) */
.fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: flex-start; margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
.fuss-marke { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-s); }  /* A148 */
.fuss-marke .k1 { height: 22px; width: 44px; display: block; }
.nur-druck { display: none; }
.fuss a, .auth-rechtlich a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--klick); font-size: var(--fs-s); }
.auth-rechtlich { justify-content: center; gap: 16px; margin-top: 8px; }
.rechtlich h2 { font-size: var(--fs); margin: 16px 0 4px; }
.rechtlich p { margin: 0 0 8px; }
@media (pointer: coarse), (max-width: 860px) { .fuss a, .auth-rechtlich a { min-height: 44px; } }
@media (max-width: 860px) { .fuss { row-gap: 0; } .fuss-marke { flex: 1 0 100%; } }  /* A148: am Handy K1 und Version in eigener Zeile */

/* ------------------------------------------- Dokumentenablage (DA1) */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--surface); }
.dropzone.is-drag { border-color: var(--accent); background: var(--hover); }
.dropzone .dz-text { margin: 0 0 8px; }
.dz-liste { margin: 8px 0 0; padding-left: 18px; }
.pdfansicht { display: flex; flex-direction: column; gap: 8px; }
.pdfleiste { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 2; background: var(--seitengrund); padding: 6px 0; }
.pdfseiten { display: flex; flex-direction: column; align-items: center; gap: 12px; overflow: auto; max-height: calc(100vh - 220px); background: var(--hover); padding: 12px; border-radius: var(--radius); touch-action: pan-x pan-y pinch-zoom; }
.pdfseiten canvas { max-width: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); background: #fff; }
.speicher-balken { height: 8px; background: var(--hover); border-radius: 4px; overflow: hidden; }
.speicher-balken > span { display: block; height: 100%; background: var(--accent); }
.speicher-balken.is-knapp > span, .speicher-balken.is-bad > span { background: var(--bad); }
.speicher-balken.is-warn > span { background: var(--warn); }
.speicher-balken.is-ok > span { background: var(--ok); }

/* ------------------------------------------- Rollen, Pfadzeile, aktiver Bereich (U4) */
.rollen-tabelle th.c, .rollen-tabelle td.c { text-align: center; white-space: nowrap; }
.rollen-tabelle .stufe-aendern { color: var(--accent); font-weight: 600; }
.rollen-tabelle .stufe-lesen { color: var(--text); }
.rollen-tabelle .stufe-nichts { color: var(--faint); }
.rollen-hinweis { margin: -4px 0 0; grid-column: 1 / -1; }
.pfad { font-size: var(--fs-s); color: var(--muted); margin: 0 0 6px; }
.pfad ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pfad li + li::before { content: "›"; margin-right: 4px; color: var(--faint); }
.pfad a { color: var(--muted); }
.pfad [aria-current="page"] { color: var(--text); font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--reiter-aktiv-flaeche); border-bottom-width: 3px; font-weight: 600; }
.navmehr > summary[aria-current="page"] { background: var(--reiter-aktiv-flaeche); color: var(--titel-farbe); box-shadow: inset 0 -3px 0 var(--reiter-aktiv-linie); font-weight: 600; }
@media (max-width: 860px) {
  .pfad li:not(:nth-last-child(-n+2)) { display: none; }
  .pfad li:nth-last-child(2):not(:first-child)::before { content: "… ›"; }
}
@media (max-width: 860px) { #objektrollen .hide-m { display: none; } }  /* Rollen je Objekt am Handy (A68) */

/* Auswahlfeld mit Suche (A91, A95): Eingabe, Chips, Liste mit Gruppen */
.suchauswahl { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: var(--feld-h); padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.suchauswahl:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.suchauswahl .sa-chips { display: contents; }
.suchauswahl .sa-chip { height: 24px; gap: 4px; }
.suchauswahl .sa-weg { border: 0; background: none; padding: 0 2px; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; }
.suchauswahl .sa-eingabe { flex: 1 1 140px; min-width: 120px; border: 0; outline: 0; height: 30px; padding: 0 2px; background: transparent; color: var(--text); font: inherit; }
.suchauswahl .sa-original { display: none !important; }
.suchauswahl .sa-liste { position: absolute; z-index: 40; left: -1px; right: -1px; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; max-height: 280px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.suchauswahl .sa-liste li { padding: 5px 10px; cursor: pointer; }
.suchauswahl .sa-liste li.is-aktiv, .suchauswahl .sa-liste li[data-wert]:hover { background: var(--hover); }
.suchauswahl .sa-liste .sa-gruppe { padding: 6px 10px 2px; cursor: default; color: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
.suchauswahl .sa-liste .sa-neu { color: var(--accent); border-top: 1px solid var(--line); margin-top: 4px; }
.suchauswahl .sa-liste .sa-leer { color: var(--faint); cursor: default; }
.sa-dialog { max-width: 420px; width: calc(100% - 32px); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 16px; }
.sa-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.sa-dialog label { display: block; margin: 8px 0 2px; font-size: var(--fs-s); color: var(--muted); }
.sa-dialog input, .sa-dialog select { width: 100%; }
.sa-dialog .sa-tel { display: grid; grid-template-columns: 1fr 120px; gap: 0 8px; }
.sa-dialog [data-fehler] { color: var(--bad); min-height: 1em; margin: 6px 0 0; }

/* Schnellansicht der Dokumentenliste (A89): schmale Spalte, Seitenpanel, am Handy Vollbild */
.sa-clip { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 2px; color: var(--accent); cursor: pointer; }
.sa-clip .sa-zahl { font-size: var(--fs-xs); color: var(--brass-text); }
/* A183: Spalte „Vorschau“ mit großem, sichtbarem Knopf; markierte Zeile hinterlegt */
.sa-knopf { justify-content: center; min-width: 32px; height: 30px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.sa-knopf .i { width: 18px; height: 18px; }
.sa-knopf:hover, .sa-knopf:focus-visible { background: var(--accent-soft); border-color: var(--accent); }
[data-vorschau] tbody tr[tabindex] { cursor: pointer; }
[data-vorschau] tr.is-vorschau > td { background: var(--accent-soft); }
[data-vorschau] tr.is-vorschau .sa-knopf { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sa-seiten { display: block; font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.schnellansicht { position: fixed; z-index: 60; top: var(--header-h); right: 0; bottom: 0; width: min(420px, 100%); overflow-y: auto; padding: 12px 16px 24px; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
.schnellansicht:focus { outline: none; }
.schnellansicht .sa-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.schnellansicht .sa-bild { margin: 10px 0; text-align: center; }
.schnellansicht .sa-bild img { max-width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
.schnellansicht .sa-aktionen { flex-wrap: wrap; }
tr[tabindex]:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 860px) { .schnellansicht { left: 0; width: 100%; border-left: 0; } }
/* A196: Dokumentzeile auf anderen Seiten: Nummer und Titel öffnen die Vorschau, Auge die Vollansicht */
.dok-zeile { display: inline; }
.dok-zeile .dok-link .code { margin-right: 2px; }
.dok-zeile .dok-ansehen { min-width: 28px; height: 26px; padding: 0 4px; vertical-align: middle; color: var(--accent); }
.dok-zeile .dok-ansehen:hover, .dok-zeile .dok-ansehen:focus-visible { background: var(--accent-soft); color: var(--accent); }
.dok-link.is-vorschau { background: var(--accent-soft); border-radius: var(--radius); outline: 2px solid var(--accent-soft); }
/* A196: lange Notiz eingeklappt (erste vier Zeilen), Schalter „Mehr“/„Weniger“ */
.notiz-klapp.is-zu .notiz-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.notiz-schalter { margin-top: 2px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-xs); cursor: pointer; text-decoration: underline; }
.notiz-schalter:hover, .notiz-schalter:focus-visible { color: var(--accent-hover); }

/* Tabellen (A99, A100): fester Kopf beim Scrollen, drei Zeilen je Zelle, ziehbare Breiten */
/* getrennte Rahmen: sonst scheinen beim verschobenen Kopf die Zeilen darunter durch */
.dt-table { border-collapse: separate; border-spacing: 0; }
.dt-table thead { position: relative; z-index: 4; }
.dt-table thead th { background: var(--kopf-flaeche); color: var(--kopf-schrift); }
.dt-table thead .dt-filters th { background: var(--filter-flaeche); }
.dt-table thead.dt-schwebt tr:last-child th { box-shadow: 0 1px 0 var(--line-strong); }  /* A154: deckende Linie statt halbtransparentem Schatten */
/* A143: mitlaufende Titelzeile und Spaltenköpfe deckend, mit feiner Linie darunter */
.objhead.dt-schwebt { z-index: 15; box-shadow: 0 1px 0 var(--line-strong); }
.dt-titel-schwebt { position: absolute; top: 0; left: 0; right: 0; z-index: 16; visibility: hidden; padding: 6px 10px;
  background: var(--kartenkopf-flaeche); color: var(--kopf-schrift); font-size: var(--fs-s); font-weight: 600;
  border-bottom: 1px solid var(--kopf-linie-farbe); box-shadow: 0 1px 0 var(--line-strong); border-radius: var(--radius) var(--radius) 0 0; }
.dt-titel-schwebt.dt-schwebt { visibility: visible; }
.objhead { background: var(--surface); position: relative; }
.dt-table thead.dt-schwebt { position: relative; z-index: 14; }
/* A143 (Sven 25.11.): Streifen langer Listen = Leiste mit Überschrift, Zähler, Suche und Knöpfen,
   darunter Spaltenköpfe und Filterzeile; deckend, feine Linie. Untertitel und Chips laufen nicht mit. */
.dt-bar-titel, .dt-neu-schwebt, .dt-filterzeile-knopf { display: none; }
.dt-bar.dt-schwebt { position: relative; z-index: 15; flex-wrap: nowrap; background: var(--surface);
  box-shadow: 0 1px 0 var(--line-strong); border-radius: var(--radius) var(--radius) 0 0; }
.dt-bar.dt-schwebt .dt-chips { display: none; }
.dt-bar.dt-schwebt .dt-bar-titel { display: block; font-weight: 600; color: var(--titel-farbe); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 30%; flex: 0 1 auto; }
.dt-bar.dt-schwebt .dt-search { flex: 0 1 260px; min-width: 120px; }
.dt-bar.dt-schwebt .dt-search input[type=search] { width: 100%; }
.dt-bar.dt-schwebt .dt-neu-schwebt { display: inline-flex; margin-left: 6px; white-space: nowrap; }
/* A166: Leiste ohne Suchfeld (z. B. Speicher): die Überschrift mit ihren Zahlen darf die Breite nutzen */
.dt-bar.dt-schwebt:not(:has(.dt-search)) .dt-bar-titel { max-width: none; flex: 1 1 auto; }
/* A154/A155: Liste passt in den Rahmen: Leiste und Kopf kleben (position: sticky), der Browser hält
   sie fest. A155: Spaltentitel und Filterzeile kleben als EIN Block (thead) mit einer deckenden
   Fläche, damit zwischen den Zeilen kein Haarspalt entsteht (Safari rastet einzeln klebende Zellen
   auf Gerätepixel ein). Der Rahmen schneidet waagerecht ab (clip), damit kein überstehender
   Zelltext rechts neben dem Kopf durchläuft; clip lässt das Kleben zu. */
.dt.dt-klebt > .dt-scroll { overflow-x: hidden; overflow-x: clip; }
.dt.dt-leiste > .dt-bar { position: sticky; top: var(--dt-oben, var(--kopf-h, var(--header-h))); z-index: 16; background: var(--surface); }
.dt.dt-klebt .dt-table > thead { position: sticky; top: calc(var(--dt-oben, 0px) + var(--dt-bar-h, 0px)); z-index: 14; background: var(--kopf-flaeche); }
.dt.dt-klebt .dt-table > thead th { position: relative; top: auto; }
/* A165 (Sven 27.11.2026), feste Regel für alle Listen und künftigen Seiten: Beim Scrollen bleiben
   Überschrift mit Zähler und Spaltenköpfe stehen, bei jeder Fensterhöhe. Die Filterzeile läuft mit,
   wenn der Trichter in der Leiste eingeschaltet ist (gemerkt im Browser); sonst scrollt sie weg.
   Kennzahlen und große Kopfblöcke laufen nie mit. Vorher (A143) galt das nur bei niedrigem Fenster. */
@media (min-width: 861px) {
  .dt-bar.dt-schwebt .dt-filterzeile-knopf { display: inline-flex; }
  .dt-filterzeile-knopf[aria-pressed="true"] { color: var(--accent); background: var(--surface-2); }
  .dt:not(.dt-filter-an) .dt-table thead.dt-schwebt tr.dt-filters { visibility: hidden; }
  /* A155: ohne zugeschaltete Filterzeile klebt nur die Titelzeile (eine Zeile, kein Spalt) */
  .dt.dt-klebt:not(.dt-filter-an) .dt-table > thead { position: static; background: none; }
  .dt.dt-klebt:not(.dt-filter-an) .dt-table > thead tr:first-child th { position: sticky; z-index: 14; top: calc(var(--dt-oben, 0px) + var(--dt-bar-h, 0px)); }
  .dt.dt-klebt:not(.dt-filter-an) .dt-table thead.dt-schwebt tr.dt-filters { visibility: visible; }
  .dt:not(.dt-filter-an) .dt-table thead.dt-schwebt { box-shadow: none; }
  .dt:not(.dt-filter-an) .dt-table thead.dt-schwebt tr:first-child th { box-shadow: 0 1px 0 var(--line-strong); }
}
/* Handy: Karten ohne Spaltenkopf, im Streifen nur Überschrift und Suche */
@media (max-width: 860px) {
  .dt-bar.dt-schwebt .dt-tools, .dt-bar.dt-schwebt .dt-count, .dt-bar.dt-schwebt > .btn { display: none; }
  .dt-bar.dt-schwebt .dt-search { flex: 1 1 auto; min-width: 0; }
  .dt-bar.dt-schwebt .dt-bar-titel { max-width: 45%; }
}
.dt-table thead th { position: relative; top: auto; }
/* Griff zum Ziehen der Spaltenbreite (A107): sichtbare Linie, große Trefferfläche, Tastatur */
.dt-scroll { position: relative; }
.dt-zieh { position: absolute; top: 0; right: 0; width: 12px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.dt-zieh::before { content: ""; position: absolute; top: 3px; bottom: 3px; right: 0; width: 2px; border-radius: 1px; background: var(--brass); transition: width .08s, background-color .08s; }
.dt-zieh:hover::before, .dt-zieh:focus-visible::before, .dt-zieh.is-aktiv::before { width: 4px; background: var(--accent); }
.dt-zieh:focus-visible { outline: none; }
body.dt-ziehen, body.dt-ziehen * { cursor: col-resize !important; user-select: none; }
.dt-hilfslinie { position: absolute; top: 0; width: 2px; margin-left: -1px; background: var(--accent); opacity: .55; pointer-events: none; z-index: 6; }
@media (pointer: coarse) { .dt-zieh { width: 24px; } }
.dt-table.dt-fest { table-layout: fixed; }
.dt-table.dt-fest th { white-space: normal; overflow: hidden; text-overflow: ellipsis; }
.dt-c { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: break-word; }
/* A140: auch Zellen mit Links (E-Mail, Telefon, Objekte) stehen in .dt-c; lange Wörter wie
   E-Mail-Adressen brechen um, nichts ragt in die Nachbarspalte. */
.dt-table td { overflow-wrap: break-word; }
.dt-c.is-gekuerzt { cursor: zoom-in; }
.dt-c.is-offen { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; cursor: zoom-out; }
/* A142: einzeilige Zellen (Codes, Zahlen) enden mit Auslassungspunkten statt hart abzuschneiden;
   der volle Text steht im Tooltip (tabellen.js) und beim Aufklappen. */
td.code .dt-c, td.num .dt-c { display: block; white-space: nowrap; text-overflow: ellipsis; }
td.code .dt-c.is-offen, td.num .dt-c.is-offen { white-space: normal; }
td:not(.code):not(.num) .dt-c .code { white-space: normal; }
@media (max-width: 860px) {
  .dt-zieh { display: none; }
  .dt-table.dt-fest { table-layout: auto; min-width: 0 !important; }
  .dt-table td .dt-c { flex: 1; min-width: 0; }
  table.t.dt-table td { height: auto; }  /* Karte wächst mit bis zu drei Zeilen */
}

/* Personenliste und Tabellenkomponente (A106): Rollenmarken, Mehrfachfilter, Zählergruppen,
   Inline-Bearbeitung in der Zelle (auch in der Handykarte) */
.rollen { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.rolle { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px 0 4px; border-radius: 3px; font-size: var(--fs-marke); border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.rolle svg.i { width: 12px; height: 12px; }
a.rolle:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.rolle-mieter { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.rolle-eigentuemer { border-color: var(--brass); color: var(--brass-text); background: var(--brass-soft); }
.rolle-hausverwaltung { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.rolle-ohne { border-style: dashed; color: var(--faint); background: transparent; padding: 0 6px; } /* A171 */
.chip-trenner { margin-left: 10px; }
.dt-mehrfach { position: relative; }
.dt-mehrfach > summary { list-style: none; height: var(--filter-h); line-height: calc(var(--filter-h) - 2px); padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: var(--fs-s); font-weight: 400; color: var(--text); background: var(--surface); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-mehrfach > summary::-webkit-details-marker { display: none; }
.dt-mehrfach .menu { left: 0; right: auto; min-width: 180px; }
.dt-mehrfach .menu label { display: flex; gap: 6px; align-items: center; padding: 4px 8px; font-weight: 400; cursor: pointer; }
.dt-table td.dt-edit { cursor: text; }
.dt-table td.dt-edit:hover, .dt-table td.dt-edit:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }
.dt-platzhalter { color: var(--faint); font-size: var(--fs-s); font-style: italic; }
.dt-table td.dt-edit:hover .dt-platzhalter { color: var(--muted); }
.dt-table td.is-bearbeiten { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.dt-eingabe { width: 100%; min-width: 80px; height: var(--row); padding: 0 5px; font: inherit; }
.dt-table td.is-fehler { box-shadow: inset 0 0 0 1px var(--bad); }
.dt-table td.is-fehler .dt-eingabe { border-color: var(--bad); }
.dt-fehler { display: block; margin-top: 2px; color: var(--bad); font-size: var(--fs-xs); white-space: normal; }
.dt-table td.is-speichert { opacity: .6; }
@media (max-width: 860px) {
  .dt-table td.is-bearbeiten { flex-wrap: wrap; }
  .dt-table td.is-bearbeiten .dt-eingabe { flex: 1; height: 36px; }  /* gut zu tippen */
  .dt-table td.is-bearbeiten .dt-fehler { flex-basis: 100%; }
  .dt-table td.dt-edit { min-height: 32px; align-items: center; }
}

/* Kompakte Detailseiten (A117): weniger Innenabstand, Felder und Knöpfe in einer Zeile */
.kompakt-raster { gap: 10px; }
.card.kompakt .card-h { min-height: 30px; padding: 5px 10px; }
.card.kompakt .card-b { padding: 8px 10px; }
.card.kompakt .card-b > * + * { margin-top: 8px; }
.zeilenform { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-end; margin: 0; }
.zeilenform .field { flex: 1 1 130px; min-width: 0; margin: 0; }
.zeilenform .field label { margin-bottom: 2px; }
.zeilenform > .btn { flex: 0 0 auto; }
.zeilenform-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.statuszeile { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.statuszeile > span { display: inline-flex; align-items: center; gap: 6px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.knopfreihe > form { margin: 0; }
.knopf-mit-haken { display: inline-flex; align-items: center; gap: 8px; }
.pflicht-schalter { flex: 1 1 320px; }
@media (max-width: 860px) {
  .zeilenform-paar { grid-template-columns: 1fr; }
  .card.kompakt .card-b { padding: 8px; }
}
/* Drei Spalten für kleine Karten (Fristen, Vorgänge, Aufgaben), A117 */
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
/* Mehrfachauswahl sieht aus wie ein Auswahlfeld (A112): Pfeil, Anzahl je Eintrag, Zurücksetzen */
.dt-mehrfach > summary.dt-auswahl { position: relative; padding-right: 20px; min-width: 70px; }
.dt-mehrfach > summary.dt-auswahl::after { content: ""; position: absolute; right: 7px; top: 9px; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.dt-mehrfach[open] > summary.dt-auswahl { border-color: var(--accent); }
.dt-mehrfach .menu label span:first-of-type { flex: 1; }
.dt-mehrfach .dt-anzahl { color: var(--muted); font-size: var(--fs-marke); }
.dt-mehrfach-reset { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-top: 1px solid var(--line); font-size: var(--fs-s); }
/* Filterzeile bei festen Spaltenbreiten nicht abschneiden, sonst bleibt das Auswahlmenü unsichtbar (A112) */
.dt-table.dt-fest thead .dt-filters th { overflow: visible; }
.dt-table.dt-fest thead .dt-filters th > input, .dt-table.dt-fest thead .dt-filters th > select, .dt-table.dt-fest thead .dt-filters th > details > summary { max-width: 100%; }
.dt-filters .dt-mehrfach input[type=checkbox] { min-width: 0; width: auto; height: auto; margin: 0; }

/* ---------- Farben A110: neue Regeln (nur Designwerte, Schalter im Kopf der Datei) ---------- */
.pagehead h1 { color: var(--titel-farbe); }
.dt-table tbody tr:hover td { background: var(--zeile-hover-farbe); }
.dt-table tbody tr:focus-within td, .dt-table tbody tr[aria-selected="true"] td { background: var(--zeile-auswahl-farbe); }
.rows.link > li:hover { background: var(--zeile-hover-farbe); }
.st { box-shadow: inset 0 0 0 1px currentColor; }
.tag-bad { font-weight: 600; }
.rows > li:has(.st-bad) { box-shadow: inset var(--status-streifen) 0 0 var(--bad); }
.rows > li:has(.st-warn) { box-shadow: inset var(--status-streifen) 0 0 var(--warn); }
.card-h .tag.tnum { background: var(--reiter-aktiv-flaeche); border-color: var(--reiter-aktiv-linie); color: var(--zaehler-farbe); }

/* Knopf mit kurzem Hinweis daneben (A120) */
.knopf-mit-hinweis { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Erklärung an einem Feld (A119): i-Symbol neben der Beschriftung, Hinweis bei bestimmtem Wert */
.feld-kopf { display: flex; align-items: center; gap: 4px; }
.feld-kopf > label { margin-bottom: 0; }
.field-row > .field-breit { grid-column: span 2; }
@media (max-width: 640px) { .field-row > .field-breit { grid-column: auto; } }
.field .hint-warn { color: var(--warn); }
/* Personen-Links (A118): im Druck wie Text */
@media print { a[data-person-link] { color: inherit; text-decoration: none; } }

/* Kopfzeile A127 (Variante C): aktiver Menüpunkt als Messing-Fläche, übrige grau; nur Designwerte */
.tabs a[aria-current="page"], .tabs a[aria-current="page"]:hover,
.navmehr > summary[aria-current="page"] {
  background: var(--menue-aktiv-flaeche); color: var(--menue-aktiv-text);
  border-bottom-color: transparent; box-shadow: none; border-radius: 6px; font-weight: 700;
}
.tabs a[aria-current="page"] svg, .navmehr > summary[aria-current="page"] svg { color: inherit; }
@media (max-width: 860px) {
  .mobnav a[aria-current="page"] {
    background: var(--menue-aktiv-flaeche); color: var(--menue-aktiv-text);
    box-shadow: inset 0 3px 0 var(--signal-linie); font-weight: 700;
  }
}

/* Wochenüberblick (A136, Variante A; früher „Diese Woche“, A132): eine Spalte, Kachelleiste mit
   fünf Zahlen, Abschnitte und Gruppen je Objekt zuklappbar, dezente Marken. Nur Designwerte. */
/* A142: Leiste bleibt beim Scrollen unter der Kopfzeile stehen; Kacheln kompakt, Zahl und Name in
   einer Zeile, klickbar wie bisher. Auf dem Handy bleibt nur die Kachelleiste stehen. */
.we-leiste { position: sticky; top: var(--kopf-h, calc(var(--header-h) + 1px)); z-index: 20; display: flex; align-items: center; gap: 12px;
  margin: 0 -2px 12px; padding: 6px 2px; background: var(--seitengrund); border-bottom: 1px solid var(--line); }
.we-kacheln { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; }
/* A194: alle fünf Kacheln gleich hoch und einzeilig (Zahl, Titel, ggf. kurze Importangabe);
   die Importtage stehen im Hinweis (data-tip) und im Abschnitt „Neu“ darunter. */
.we-kachel { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; height: var(--klick); white-space: nowrap; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 10px; color: var(--text); }
.we-kachel:hover { text-decoration: none; border-color: var(--signal-linie); }
.we-kachel:focus-visible { outline: 2px solid var(--signal-linie); outline-offset: 2px; }
.we-z { font-size: calc(var(--fs) + 2px); font-weight: 600; line-height: 1; flex: 0 0 auto; }
.we-t { font-size: var(--fs-s); color: var(--muted); line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.we-zusatz { flex: 0 0 auto; margin-left: auto; font-size: var(--fs-marke); color: var(--signal-text); }
.we-warn .we-z { color: var(--bad); }
.we-null .we-z { color: var(--faint); }
.we-aktionen { flex: 0 0 auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.we-meine.is-an .i { margin-right: -2px; }
.we-meldung { font-size: 14px; margin: -4px 0 12px; }
.we-abschnitt { scroll-margin-top: calc(var(--kopf-h, var(--header-h)) + 64px); }
.we-leer { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.we-leer span { color: var(--text); }
.we-abschnitt { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.we-abschnitt > summary { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; }
.we-abschnitt > summary::-webkit-details-marker { display: none; }
.we-abschnitt > summary .i { align-self: center; transition: transform .15s; color: var(--muted); }
.we-abschnitt[open] > summary .i { transform: rotate(90deg); }
.we-abschnitt > summary h2 { font-size: 18px; font-weight: 600; margin: 0; color: var(--titel-farbe); }
.we-meta { font-size: 14px; color: var(--muted); }
.we-inhalt { padding: 0 18px 10px; }
.we-unter { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 2px; }
.wk-zahl { font-size: 13px; color: var(--muted); font-weight: 500; }
.wk-objekt { border-top: 1px solid var(--line); }
.wk-objekt > summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 15px; }
.wk-objekt > summary::-webkit-details-marker { display: none; }
.wk-objekt > summary .i { transition: transform .15s; color: var(--muted); }
.wk-objekt[open] > summary .i { transform: rotate(90deg); }
.wk-objekt > summary .code { font-weight: 600; }
.wk-objektname { color: var(--muted); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A142-2: Zahl direkt hinter dem Objektnamen, Marke „dringend“ rechts */
.wk-objekt > summary .wk-marke { margin-left: auto; }
/* A142-1: Import als eigene kleine Zeile in Kachel und Abschnitt „Neu“ */
.we-import { display: block; font-size: var(--fs-s); color: var(--signal-text); }
.we-importtag > summary { cursor: pointer; list-style: none; }
.we-importtag > summary::-webkit-details-marker { display: none; }
.we-importtag > summary::before { content: "▸ "; }
.we-importtag[open] > summary::before { content: "▾ "; }
.wk-liste { list-style: none; margin: 0 0 8px; padding: 0 0 0 24px; }
.we-fristen { padding-left: 0; }
.wk-eintrag { padding: 8px 0; }
.wk-eintrag + .wk-eintrag { border-top: 1px dashed var(--line); }
.we-fristen .wk-eintrag { border-top: 1px solid var(--line); }
.wk-titel { font-size: 15px; line-height: 1.45; }
.wk-titel a { color: var(--text); }
.wk-titel a:hover { color: var(--accent); }
.wk-neben { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.wk-neben a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.wk-marke { display: inline-block; font-size: var(--fs-marke); line-height: 1; padding: 3px 7px; border-radius: 999px; vertical-align: 1px; }
.wk-marke-dringend { color: var(--bad); background: var(--bad-soft); }
.wk-frist { display: flex; gap: 14px; }
.wk-frist .wk-datum { font-size: 14px; font-weight: 600; min-width: 84px; }
@media (max-width: 1180px) { .we-leiste { flex-wrap: wrap; } .we-kacheln { flex-basis: 100%; } .we-aktionen { margin-left: auto; } }
@media (max-width: 860px) {
  /* Handy und schmal: nur die Kachelleiste steht, die Knöpfe scrollen mit */
  .we-leiste { display: contents; }
  .we-kacheln { position: sticky; top: var(--kopf-h, calc(var(--header-h) + 1px)); z-index: 20; display: flex; overflow-x: auto; gap: 6px;
    scrollbar-width: none; margin: 0 -12px 10px; padding: 6px 12px; background: var(--seitengrund); border-bottom: 1px solid var(--line); }
  .we-kacheln::-webkit-scrollbar { display: none; }
  .we-kachel { flex: 0 0 auto; }
  .we-t { overflow: visible; }
  .we-zusatz { margin-left: 0; }
  .we-aktionen { justify-content: flex-start; margin: 0 0 10px; }
}
@media (max-width: 560px) {
  .we-aktionen { gap: 2px; flex-wrap: nowrap; }
  .we-aktionen .btn { padding: 0 8px; font-size: 13px; }
  .we-aktionen .we-drucken { display: none; }
  .we-z { font-size: var(--fs); }
  .we-abschnitt > summary { flex-wrap: wrap; row-gap: 2px; padding: 12px 14px; }
  .we-abschnitt > summary h2 { font-size: 17px; }
  .we-meta { flex-basis: 100%; padding-left: 26px; font-size: 13px; }
  .we-inhalt { padding: 0 14px 8px; }
  .wk-liste { padding-left: 8px; }
  .wk-frist .wk-datum { min-width: 72px; }
}
@media print {
  .we-kacheln { display: none; }
  .we-abschnitt { border: 0; margin-bottom: 14px; }
  .we-abschnitt > summary { padding: 0 0 6px; }
  .we-inhalt { padding: 0; }
  .we-abschnitt > summary .i, .wk-objekt > summary .i { display: none; }
}
/* Tabellenköpfe mittig (A135): zentral für alle Tabellen (Komponente und einfache Tabellen);
   Zellinhalt bleibt wie bisher (Text links, Zahlen rechts), die Filterzeile bleibt links.
   Sortierpfeil steht hinter der Überschrift, der Griff für die Breite rechts absolut. */
table.t thead tr:not(.dt-filters) > th { text-align: center; }

/* Objektanzeige (A134): Zusatz zum Kürzel leise, Schalter in Spaltenwahl und unter Mehrfachauswahl */
.obj-zusatz { color: var(--muted); }
.dt-oa { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
.dt-oa label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); }
.oa-schalter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); }

/* Fragen an die Daten (A141): Hauptfeld in voller Breite und größer als die dichten Formulare,
   Beispielfragen als anklickbare Kacheln. Nur Designwerte. */
.as-hinweis { font-size: 14px; color: var(--muted); margin: 0 0 14px; max-width: 80ch; }
.as-frage { display: flex; gap: 8px; margin: 0 0 18px; }
.as-frage input[type=search] { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; font-size: 16px; }
.as-frage .btn { height: 48px; padding: 0 18px; font-size: 15px; }
.as-nichts { font-size: 14px; }
.as-antwort { margin-bottom: 18px; }
.as-antwort .stack { font-size: 14px; }
.as-titel { font-size: 15px; font-weight: 600; color: var(--titel-farbe); margin: 0 0 10px; }
.as-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.as-kachel { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; line-height: 1.35; }
.as-kachel .i { flex: 0 0 auto; color: var(--signal-text); }
.as-kachel:hover { text-decoration: none; border-color: var(--signal-linie); }
.as-kachel:focus-visible { outline: 2px solid var(--signal-linie); outline-offset: 2px; }
.as-kachel.is-aktiv { border-color: var(--signal-linie); background: var(--signal-soft); }
@media (max-width: 560px) {
  .as-frage .btn { padding: 0 12px; }
  .as-kacheln { grid-template-columns: 1fr; }
}

/* Mindestwerte (A141): Platzhalter wie Fließtext; Knöpfe in Tabellenzeilen folgen der dichten
   Zeile (28 px, Ausnahme für Tabellen), Klickfläche kleiner Symbole über die Polsterung. */
::placeholder { font-size: inherit; color: var(--muted); opacity: 1; }
table.t td .btn, table.t td .btn-sm { height: var(--row); padding: 0 8px; }
/* A160: „Zu tun“ steht als Block über „Meine Objekte“: links Gruppen nach Art mit Zähler (je Gruppe
   aufklappbar), rechts die Fristen der nächsten Wochen; Handy: untereinander. Die frühere rechte
   Spalte (A143-6) entfällt. */
.zutun { margin-bottom: 12px; }
.zt-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.zt-grid.zt-allein { grid-template-columns: minmax(0, 1fr); }
.zt-rechts { border-left: 1px solid var(--line); }
.zt-kopf { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; font-size: var(--fs); font-weight: 600; color: var(--kopf-schrift); border-bottom: 1px solid var(--line); min-height: 44px; }
.zt-gruppe { border-bottom: 1px solid var(--line); }
.zt-gruppe:last-child { border-bottom: 0; }
.zt-gruppe > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; cursor: pointer; list-style: none; }
.zt-gruppe > summary::-webkit-details-marker { display: none; }
.zt-gruppe > summary:hover { background: var(--hover); }
.zt-gruppe > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.zt-gruppe > summary .i { color: var(--faint); transition: transform .15s; }
.zt-gruppe[open] > summary > .i:first-child { transform: rotate(90deg); }
.zt-gruppe > summary .st .i { transform: none; color: inherit; }
.zt-zahl { font-weight: 600; min-width: 26px; justify-content: center; color: var(--text); }
.zt-gruppe.is-bad .zt-zahl { border-color: var(--bad); }
.zt-gruppe.is-warn .zt-zahl { border-color: var(--warn); }
.zt-titel { flex: 1; font-weight: 500; min-width: 0; }
.zt-liste { margin-left: auto; display: inline-flex; align-items: center; min-height: var(--klick); padding: 0 8px; font-size: var(--fs-s); }
.zt-gruppe > .rows { background: var(--surface-2); border-top: 1px dashed var(--line); padding-left: 24px; }
.zt-mehr, .zt-alt { min-height: 32px; }
.zt-alt a { color: inherit; }
.zt-alt .tag { color: var(--bad); border-color: var(--bad); }
.obj-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); margin: 0; }
.seg { min-height: var(--knopf-h); padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-s); cursor: pointer; }
.seg:hover { background: var(--hover); }
.seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg.is-on { background: var(--knopf-haupt); border-color: var(--knopf-haupt-rand); color: var(--knopf-haupt-text); font-weight: 600; }
@media (max-width: 560px) {
  .zutun .card-h .hide-m, .objekte .card-h .hide-m { display: none; }
  .objekte > .card-h { flex-wrap: wrap; }
  .obj-reihe > span { flex: 0 0 100%; }
  .seg { flex: 1 1 40%; }
}
@media (max-width: 860px) {
  .zt-grid { grid-template-columns: minmax(0, 1fr); }
  .zt-rechts { border-left: 0; border-top: 1px solid var(--line); }
}
}

/* ------------------------------------------------ Hauptordner über Listen (A161) */
.dt-ordner { display: grid; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.ordner-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ordner { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
  color: var(--text); font-size: 14px; line-height: 1.25; }
.ordner .i { color: var(--muted); flex: none; }
.ordner b { font-weight: 600; color: var(--zaehler-farbe); }
.ordner > .i:last-child { width: 12px; height: 12px; transition: transform .15s; }
.ordner[aria-expanded="true"] > .i:last-child { transform: rotate(90deg); }
.ordner:hover { border-color: var(--accent); text-decoration: none; }
.ordner.is-on { border-color: var(--reiter-aktiv-linie); background: var(--reiter-aktiv-flaeche); color: var(--titel-farbe); }
.ordner.is-leer { color: var(--faint); background: transparent; border-style: dashed; }
.ordner.is-leer b { color: var(--faint); font-weight: 400; }
.ordner-umschalten { margin-left: auto; font-size: var(--fs-s); color: var(--muted); white-space: nowrap; }
.ordner-unter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 0 2px 14px;
  border-left: 2px solid var(--reiter-aktiv-linie); margin-left: 6px; }
.ordner-unter-titel { font-size: var(--fs-s); color: var(--muted); font-weight: 600; margin-right: 6px; }
@media (min-width: 1600px) { .ordner { font-size: 15px; min-height: 40px; padding: 4px 14px; } }
@media (max-width: 640px) {
  .ordner-reihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ordner { min-height: 44px; }
  .ordner-name { flex: 1; min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .ordner > .i:first-child { display: none; }
  .ordner-alle, .ordner-umschalten { grid-column: 1 / -1; }
  .ordner-umschalten { margin-left: 0; justify-self: end; }
  .ordner-unter { padding-left: 10px; margin-left: 2px; }
}
@media print { .dt-ordner { display: none; } }

/* ------------------------------------- Aufgaben: Kacheln, Gruppen, Sammelzeilen (A162) */
.dt-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.kachel { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border: 1px solid var(--line);
  border-left-width: 4px; border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
.kachel b { font-size: 22px; font-weight: 600; line-height: 1.1; color: var(--titel-farbe); }
.kachel span { font-size: 14px; }
.kachel:hover { border-color: var(--accent); text-decoration: none; }
.kachel.is-on { background: var(--reiter-aktiv-flaeche); border-color: var(--reiter-aktiv-linie); }
.kachel-ueberfaellig { border-left-color: var(--bad); }
.kachel-dringend { border-left-color: var(--warn); }
.kachel-woche { border-left-color: var(--info); }
.kachel-meine { border-left-color: var(--accent); }
.kachel.is-leer b { color: var(--faint); }
.dt-gruppenwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.dt-gruppenwahl .lbl { color: var(--muted); margin-right: 4px; }
tr.dt-gruppe-kopf > th { text-align: left; background: var(--kartenkopf-flaeche); color: var(--kopf-schrift); font-weight: 600;
  padding: 6px 8px; border-top: 1px solid var(--line-strong); cursor: pointer; }
tr.dt-gruppe-kopf .tag { margin-left: 6px; }
tr.dt-sammel-kopf > td { background: var(--surface-2); font-weight: 600; cursor: pointer; }
.dt-auf { display: inline-flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.dt-auf .i { width: 12px; height: 12px; transition: transform .15s; }
.dt-auf[aria-expanded="true"] .i { transform: rotate(90deg); }
tr[hidden] { display: none; }
.objzeile { display: flex; flex-wrap: wrap; gap: 6px; }
.objchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 14px; }
.objchip:hover { border-color: var(--accent); text-decoration: none; }
.objchip.is-on { background: var(--reiter-aktiv-flaeche); border-color: var(--reiter-aktiv-linie); }
.ampel { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.ampel.is-warn { background: var(--warn); }
.ampel.is-bad { background: var(--bad); }
.objchip .tnum { color: var(--muted); }
.sammelleiste { position: sticky; bottom: 0; z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px; background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -1px 0 var(--line-strong); }
.sammelleiste[hidden] { display: none; }
@media (min-width: 1600px) { .kachel b { font-size: 26px; } .kachel span, .objchip { font-size: 15px; } }
@media (max-width: 640px) {
  .dt-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kachel { min-height: 52px; }
  .objchip { min-height: 40px; }
}
.dt-wahl { width: 34px; text-align: center; }
.dt-wahl input { transform: scale(1.25); cursor: pointer; }
col.dt-wahl-col { width: 34px; }
.tag-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); font-weight: 600; }
.dt-table tr[hidden] { display: none !important; }
@media (max-width: 860px) {
  .dt-table td.dt-wahl::before, .dt-table tr.dt-sammel-kopf > td::before { content: none; }
  .dt-table tr.dt-sammel-kopf { display: flex; align-items: center; gap: 4px; }
  .dt-table tr.dt-sammel-kopf > td { width: auto; }
  .dt-table tr.dt-sammel-kopf > td.dt-wahl { flex: none; }
  .dt-table tr.dt-gruppe-kopf > th { display: block; }
}

/* ------------------------------------------- Mietverträge: Status und Legende (A163) */
.st-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0 0 8px; color: var(--muted); }
.st-legende > span { display: inline-flex; align-items: center; gap: 6px; }
.dt-table tr.ist-beendet > td { background: var(--surface-2); color: var(--faint); }
.dt-table tr.ist-beendet a { color: var(--muted); }
[data-table="mietverhaeltnisse"] .dt-table tr > :first-child { width: 1%; white-space: nowrap; text-align: center; }
[data-table="mietverhaeltnisse"] .dt-filters th:first-child select { width: 100%; min-width: 0; }

/* ------------------------------------ Tabellen anpassbar: Ziehen und Festhalten (A165) */
.dt-table thead tr:first-child th[data-spalte] { cursor: grab; }
.dt-table thead tr:first-child th[data-spalte] a.dt-sort { cursor: pointer; }
.dt-table th.is-gezogen { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface-2); }
.dt-einfuegen { position: absolute; top: 0; width: 3px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 20; }
body.dt-verschieben, body.dt-verschieben * { cursor: grabbing !important; user-select: none; }
.dt-col-griff { display: inline-flex; align-items: center; color: var(--muted); cursor: grab; touch-action: none; padding: 0 2px; }
.dt-col.is-gezogen { background: var(--surface-2); outline: 1px solid var(--accent); }
.dt-festwahl { display: flex; flex-direction: column; gap: 2px; padding: 4px; font-size: var(--fs-s); color: var(--muted); }
.dt-festwahl select { width: 100%; }
.dt-colbtns .btn[disabled] { opacity: .55; cursor: default; }
/* festgehaltene Spalten bleiben links stehen, wenn die Liste waagerecht scrollt */
.dt-table th.dt-festsp, .dt-table td.dt-festsp { position: sticky; z-index: 3; }
.dt-table td.dt-festsp { background: var(--surface); }
.dt-table tr:hover > td.dt-festsp { background: var(--zeile-hover-farbe); }
.dt-table tfoot td.dt-festsp { background: var(--summen-flaeche); }
.dt-table .dt-festsp-ende { box-shadow: inset -1px 0 0 var(--line-strong); }
@media (max-width: 860px) {
  .dt-nur-gross { display: none !important; }
  .dt-table th.dt-festsp, .dt-table td.dt-festsp { position: static; }
  /* Menüs der Tabelle (Spalten, Ansichten, Export) bleiben ganz im Bild */
  .dt-tools .dt-menu > .menu { position: fixed; left: 16px; right: 16px; top: auto; min-width: 0; max-height: 50vh; overflow: auto; }
}

/* ------------------------- Einfache Tabellen: Spaltenköpfe kleben unter der Kopfzeile (A169) */
/* Stufe 1 der Kopfregel (A165) für Tabellen mit eigenem HTML (Detail- und Berichtsseiten): die
   Kopfzeile (erste Zeile nur aus th, in thead oder als erste Zeile) bleibt beim Scrollen direkt
   unter der App-Kopfzeile stehen. Zeilenköpfe in Schlüssel-Wert-Tabellen kleben nicht. Wirkt nur
   bei langen Tabellen; Tabellen in einem waagerechten Scrollrahmen kleben, solange sie hineinpassen. */
table.t:not(.dt-table) th { position: static; }
table.t:not(.dt-table) > thead > tr:first-child > th,
table.t:not(.dt-table):not(:has(> thead)) > tbody:first-of-type > tr:first-child:not(:has(> td)) > th {
  position: sticky; top: var(--kopf-h, var(--header-h)); z-index: 5;
  box-shadow: inset 0 -1px 0 var(--kopf-linie-farbe);
}
.dt-scroll.t-passt { overflow-x: clip; }
.schnellansicht table.t th { position: static !important; }  /* eigener Scrollbereich */
@media print { table.t th { position: static !important; box-shadow: none; } }

/* A181 (Sven 27.11.2026): Safari färbt die Tab-Leiste nach der Farbe ganz oben auf der Seite,
   nicht nach theme-color. Darum der Kopfbereich oben hell in Salbei (--kopf-linie), dunkel wie die Leiste
   (--grund). Grau (--muted) hätte auf Salbei nur 3,0:1, darum Schrift dort --kopf-text (6,6:1).
   Anmeldeseite: gleicher Streifen in Kopfhöhe. Zurück: diesen Block löschen. */
:root { --kopf-oben: var(--kopf-linie); --kopf-oben-schrift: var(--kopf-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --kopf-oben: var(--grund); --kopf-oben-schrift: var(--muted); } }
:root[data-theme="dark"] { --kopf-oben: var(--grund); --kopf-oben-schrift: var(--muted); }
.hdr { background: var(--kopf-oben); }
.hdr .tabs a:not([aria-current="page"]), .hdr .navmehr > summary:not([aria-current="page"]),
.hdr .hdr-tools > .iconbtn, .hdr .burger > summary.iconbtn, .hdr .lang button:not([aria-pressed="true"]) { color: var(--kopf-oben-schrift); }
.auth { background: linear-gradient(var(--kopf-oben), var(--kopf-oben)) top / 100% var(--header-h) no-repeat; }
/* A189: mittlere Befunde der Qualitätsprüfung ------------------------------------------------- */
/* Nr. 12 Suche am Handy: Symbol in der Kopfzeile, Suchfeld oben auf der Suchseite */
.hdr .iconbtn.suche-mobil, .search.suche-seite { display: none; }
.search.suche-seite { margin: 0 0 12px; }
@media (max-width: 860px) {
  .hdr .iconbtn.suche-mobil, .search.suche-seite { display: flex; }
  .search.suche-seite input[type=search] { width: 100%; height: 44px; font-size: 16px; }
  .search.suche-seite svg { top: 14px; }
}
/* Nr. 14 Aufgabe: Status ändern und Schließen getrennt im selben Formular */
.aufgabe-block { border: 0; border-top: 1px solid var(--line); margin: 14px 0 0; padding: 10px 0 0; }
.aufgabe-block > legend { font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.aufgabe-block > legend + * { clear: both; }
/* Nr. 16 Trefferflächen mindestens 24 px über Padding (am Handy 44 px) */
.dt-wahl-flaeche { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; cursor: pointer; }
.dt-table th a.dt-sort { display: inline-block; padding: 4px 0; margin: -4px 0; }
.dt-col label, .dt-oa label { min-height: 28px; }
.dt-col input[type=checkbox], .dt-oa input[type=radio], .dt-mehrfach .menu input[type=checkbox] { width: 18px; height: 18px; flex: none; }
li > a.tnum { display: inline-block; padding: 2px 0; }
.hdr .brand { min-height: 24px; }
@media (max-width: 860px) {
  .dt-wahl-flaeche, .hdr .brand { min-width: 44px; min-height: 44px; }
  .hdr .brand { justify-content: center; }
  .dt-col label, .dt-oa label { min-height: 44px; }
  .burger-gruppe > summary { min-height: 44px; display: flex; align-items: center; }
}
/* Nr. 40 Umschalter volle Breite: Zustand zeigen, nur wo er etwas bewirkt (Seite breiter als 1680 px) */
.dt-wide .i + .i, .dt-wide[aria-pressed="true"] .i:first-child { display: none; }
.dt-wide[aria-pressed="true"] .i + .i { display: inline; }
.dt-wide[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 1712px) { .dt-wide:not([aria-pressed="true"]) { display: none; } }
/* Nr. 41 Datum nicht umbrechen; Nr. 42 Spaltenwahl kompakt, an die Fensterhöhe angepasst */
.dt-table:not(.dt-fest) td.date, .dt-table:not(.dt-fest) td.date .dt-c { white-space: nowrap; }
.dt-cols { max-height: calc(100vh - 24px); }
.dt-col { padding: 0 4px; }
@media (hover: hover) and (min-width: 861px) {
  .dt-col [data-move] { opacity: 0; }
  .dt-col:hover [data-move], .dt-col:focus-within [data-move] { opacity: 1; }

/* ==== A190: niedrige Befunde der Gesamtprüfung ==== */
/* Befund 25: rotes Tag (Vermietungsgrad u. a.) im hellen Modus dunkler, Kontrast über 4,5:1 */
:root .tag-bad { color: color-mix(in srgb, var(--bad) 80%, var(--text)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-bad { color: var(--bad); } }
:root[data-theme="dark"] .tag-bad { color: var(--bad); }
/* Befund 29: Status der Mietverträge am Handy (Karte) auch als Text */
.st-text { display: none; }
@media (max-width: 860px) {
  .dt-table td .st-text { display: inline; margin-left: 6px; font-size: var(--fs-s); }
  /* Die schmale Statusspalte (1 %) des Rechners gilt am Handy nicht: Karte in voller Breite */
  [data-table="mietverhaeltnisse"] .dt-table tr > :first-child { width: 100%; text-align: left; }
}
/* Befund 32: Erste Schritte am Handy: Titel fett, Erklärung in eigener Zeile */
@media (max-width: 860px) {
  .erste-schritte .steps li > span:last-child > a { font-weight: 600; }
  .erste-schritte .steps li > span:last-child > .xs { display: block; margin-top: 1px; }
}
/* Befund 17: Dokument am Handy: Prüfwert der Fassung ausblenden, Aktionen dürfen umbrechen */
@media (max-width: 860px) {
  table.t td[data-tip^="SHA-256"] { display: none; }
  table.t:has(td[data-tip^="SHA-256"]) td { white-space: normal; overflow-wrap: anywhere; }
}
/* Befund 17: Dateiauswahl im Stil der App statt des ungestalteten Browser-Knopfs */
input[type="file"] { max-width: 100%; font: inherit; font-size: var(--fs-s); color: var(--muted); }
input[type="file"]::file-selector-button {
  font: inherit; margin-right: 8px; padding: 4px 10px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--knopf2-flaeche); color: var(--knopf2-text);
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); }
/* Befund 39: weitere Spalten rechts außerhalb des Rahmens: rechter Rand blendet sanft aus */
.dt > .dt-scroll[data-mehr-rechts] {
  -webkit-mask-image: linear-gradient(to left, color-mix(in srgb, black 35%, transparent), black 40px);
  mask-image: linear-gradient(to left, color-mix(in srgb, black 35%, transparent), black 40px);
}
