/* hidden-Attribut immer respektieren (sonst überschreiben display-Regeln wie grid/flex das Ausblenden per JavaScript) */
[hidden] { display: none !important; }

/* Schriften lokal (keine Verbindung zu Google) – Barlow, SIL Open Font License */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

/* Anlagenausweis – Gestaltung angelehnt an ein Typenschild */
:root {
    --papier: #F4F5F6;
    --flaeche: #FFFFFF;
    --tinte: #2B3036;
    --grau: #5F666D;   /* WCAG AA: mind. 4,5:1 auch auf hellgrauen Bändern */
    --linie: #E0E3E6;
    --feld: #FAFAFB;
    --pv: #F2B705;
    --pv-tinte: #1F2328;
    --haus: #1D5C8C;
    --haus-tinte: #FFFFFF;
    --gefahr: #B42318;
    --ok: #1E7B45;
    --fokus: #1D5C8C;
    --schrift: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --schrift-schmal: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
    margin: 0;
    background: var(--papier);
    color: var(--tinte);
    font: 400 1.0625rem/1.55 var(--schrift);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.wrap.narrow { max-width: 30rem; }
.admin .wrap { max-width: 82rem; }

h1, h2, h3 { font-family: var(--schrift-schmal); line-height: 1.15; margin: 0 0 .6rem; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

/* ---------- Das Typenschild ---------- */
.schild {
    --akzent: var(--pv);
    --akzent-tinte: var(--pv-tinte);
    background: #FFFFFF;           /* bleibt hell wie ein echtes Schild */
    color: #1F2328;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 0 0 1px rgba(43,48,54,.07), 0 8px 24px -16px rgba(43,48,54,.3);
    margin-bottom: 1.25rem;
    position: relative;
}
.schild::before, .schild::after {   /* Befestigungslöcher */
    content: ""; position: absolute; top: .45rem; width: .55rem; height: .55rem;
    border-radius: 50%; box-shadow: inset 0 0 0 1.5px #C4CAD0;
}
.schild::before { left: .45rem; }
.schild::after { right: .45rem; }

.schild-kopf {
    display: flex; align-items: center; gap: .75rem;
    background: var(--akzent); color: var(--akzent-tinte);
    padding: .6rem .9rem; margin: .5rem 0 1rem;
}
.schild-symbol { font-size: 2rem; line-height: 1; }
.schild-art { margin: 0; font-weight: 600; font-size: .9rem; opacity: .85; }
.schild-titel { margin: 0; font-size: clamp(1.5rem, 5vw, 2rem); overflow-wrap: anywhere; min-width: 0; }

.schild-inhalt { display: flex; gap: 1rem; align-items: flex-start; }
.schild-daten { flex: 1; min-width: 0; }

dl { margin: 0; }
dt { color: #5B636B; font-size: .85rem; }
dd { margin: 0; font-family: var(--schrift-schmal); font-weight: 600; font-size: 1.2rem; overflow-wrap: anywhere; }

.kennwerte { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; padding-bottom: .8rem; border-bottom: 2px solid #D2D7DB; margin-bottom: .8rem; }
.kennwerte dd { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .6rem 1.5rem; }
.felder.liste { grid-template-columns: 1fr; margin-bottom: 1rem; }
.felder.liste dt { color: var(--grau); }

.schild-band {
    margin: 1rem 0 .3rem; padding: .45rem .9rem;
    background: #1F2328; color: #FFFFFF; font-weight: 600; font-size: .95rem;
}

.schild-qr { text-align: center; flex: 0 0 auto; }
.qr { border: 2px solid #1F2328; border-radius: 8px; padding: 6px; background: #fff; display: inline-block; }
.qr img, .qr canvas { display: block; width: 100%; height: auto; }
.qr-text { margin: .3rem 0 0; font-weight: 600; font-size: .85rem; }
.qr-id { margin: .1rem 0 0; font: .7rem/1.3 ui-monospace, "Cascadia Mono", Menlo, monospace; color: #5B636B; word-break: break-all; }

/* ---------- Blöcke & Formulare ---------- */
.block {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 1.1rem 1rem;
    margin-bottom: 1rem;
}
.block.intern { border-left: 4px solid var(--grau); }
.hinweis-text { margin-top: 0; overflow-wrap: anywhere; }
.wrap p, .wrap h1, .wrap h2, .meldung { overflow-wrap: anywhere; }   /* lange Titel/Links (öffentliche Ansicht, Melden) sprengen die Seite nicht */

label { display: block; font-weight: 500; margin-bottom: .8rem; }
input[type=text], input[type=password], input:not([type]), select, textarea, input[type=file] {
    display: block; width: 100%; margin-top: .3rem;
    font: inherit; color: var(--tinte); background: var(--feld);
    border: 1px solid var(--linie); border-radius: 6px; padding: .6rem .7rem;
}
input[type=file] { padding: .5rem; }
textarea { resize: vertical; }
.reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 1rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; }
.check { display: flex; gap: .5rem; align-items: center; }
.optional, .hinweis, .klein { color: var(--grau); font-weight: 400; font-size: .9rem; }
.sicht { font-size: .75rem; font-weight: 600; margin-left: .35rem; padding: .05rem .4rem; border-radius: 4px; }
.sicht.oeffentlich { background: rgba(30,123,69,.12); color: var(--ok); }
.sicht.geschuetzt { background: rgba(31,35,40,.08); color: var(--grau); }

button, .btn {
    display: inline-block; font: 600 1rem var(--schrift); cursor: pointer; text-decoration: none;
    background: var(--tinte); color: var(--papier);
    border: 1px solid var(--tinte); border-radius: 6px; padding: .6rem 1.1rem;
}
button.zweitrangig, .btn.zweitrangig { background: transparent; color: var(--tinte); }
.link-btn { background: none; border: 0; padding: .2rem .4rem; font-size: .9rem; color: var(--grau); text-decoration: underline; }
.link-btn.gefahr { color: var(--gefahr); }
form.inline { display: inline; }

.pin-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.pin-form label { margin: 0; flex: 1 1 10rem; }
.pin-form input { letter-spacing: .15em; font-size: 1.2rem; font-family: ui-monospace, Menlo, monospace; }

.aufklapp { margin-top: 1rem; border-top: 1px solid var(--linie); padding-top: .8rem; }
.aufklapp summary { cursor: pointer; font-weight: 600; margin-bottom: .8rem; }
.abmelden { margin-top: 1.2rem; }

/* ---------- Dokumentlisten ---------- */
.kat { margin-top: 1rem; font-size: 1rem; color: var(--grau); font-family: var(--schrift); font-weight: 600; }
.bereich { margin-top: 1.2rem; }
.doks { list-style: none; margin: 0; padding: 0; }
.doks li { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--linie); }
.doks li:last-child { border-bottom: 1px solid var(--linie); }
.doks a { flex: 1; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 .75rem; padding: .65rem 0; text-decoration: none; min-width: 0; }
.ext {
    grid-row: span 2; align-self: center; text-align: center;
    font: 700 .75rem var(--schrift-schmal); letter-spacing: .03em;
    border: 1.5px solid var(--tinte); border-radius: 4px; padding: .35rem 0;
}
.dok-titel { font-weight: 600; overflow-wrap: anywhere; }
.dok-meta { color: var(--grau); font-size: .85rem; }
.leer { color: var(--grau); }

/* ---------- Meldungen ---------- */
.meldung { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid var(--linie); background: var(--flaeche); }
.meldung.ok { border-left: 4px solid var(--ok); }
.meldung.fehler { border-left: 4px solid var(--gefahr); }
.meldung.fehler h1 { font-size: 1.6rem; }
.pin-box { border-left: 4px solid var(--pv); }
.pin-box p { margin: 0; }
.pin-gross { font: 700 2rem ui-monospace, Menlo, monospace; letter-spacing: .12em; overflow-wrap: anywhere; }

/* ---------- Admin ---------- */
.admin-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-kopf h1, .admin-kopf p { margin: 0; }
.aktionen { display: flex; gap: .5rem; flex-wrap: wrap; }
.url code { word-break: break-all; font-size: .9rem; }
.suche { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.suche label { flex: 1 1 14rem; margin: 0; }
.tabelle-scroll { overflow-x: auto; margin-top: 1rem; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle th { font-size: .85rem; color: var(--grau); font-weight: 600; }
.fuss { color: var(--grau); font-size: .8rem; text-align: center; word-break: break-all; }

@media (max-width: 34rem) {
    .schild-inhalt { flex-direction: column; }
    .kennwerte dd { font-size: 1.6rem; }
}

/* ---------- Druckvorlage 105 × 60 mm ---------- */
.druck { background: #fff; color: #1F2328; }
.druck-seite { padding: 1rem; }
@media print {
    @page { size: 105mm 60mm; margin: 0; }
    .nicht-drucken { display: none; }
    .druck-seite { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Komponenten ---------- */
.komp {
    border: 1px solid var(--linie); border-radius: 8px; padding: .8rem .9rem;
    border-left: 4px solid var(--linie);
}
.komp h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; font-size: 1.25rem; }
.komp-art { font: 500 .85rem var(--schrift); color: var(--grau); flex-basis: 100%; }
.komp dt { color: var(--grau); }
.schloss { font-size: .75rem; }
.geheim .link-btn { font-size: .8rem; }
.geheim-wert { font-family: ui-monospace, Menlo, monospace; font-size: 1rem; }
.komp-neu { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--linie); }

/* ---------- Leiste, Sprungnavigation ---------- */
.leiste { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.leiste .klein { flex: 1 1 14rem; }
.sprung { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 1rem; }
.sprung a { font-weight: 600; }
.mt { margin-top: 1rem; }

/* ---------- Komponenten-Formulare ---------- */
.komp-form { margin-bottom: 1rem; }
/* Status: rot = neu/ungespeichert, grün = gespeichert */
form.verfolgt { border-left: 5px solid var(--ok); }
.datenform.verfolgt { padding-left: .9rem; border-radius: 6px; }
form.verfolgt.status-neu, form.verfolgt.geaendert { border-left-color: var(--gefahr); }
.status-text { font-size: .85rem; font-weight: 600; color: var(--ok); margin-right: auto; }
form.status-neu .status-text, form.geaendert .status-text { color: var(--gefahr); }
.komp-form.zuletzt { box-shadow: 0 0 0 2px rgba(30,123,69,.35); }
.komp-kopf { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: flex-end; margin-bottom: .6rem; }
.komp-kopf > label:first-child { flex: 1 1 16rem; margin: 0; }
.komp-kopf .komp-art { display: block; }
.komp-name { font: 600 1.15rem var(--schrift-schmal); }
.feld-kopf, .feld-zeile {
    display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.6fr) auto auto auto;
    gap: .3rem .7rem; align-items: center;
}
.feld-kopf { font-size: .8rem; color: var(--grau); font-weight: 600; padding-bottom: .2rem; border-bottom: 1px solid var(--linie); }
.feld-zeile { padding: .35rem 0; border-bottom: 1px dashed var(--linie); border-top: 0; }
.feld-zeile label { margin: 0; font-weight: 400; }
.feld-zeile input, .feld-zeile textarea { margin-top: 0; padding: .45rem .55rem; }
.feld-zeile.neu input[name$="[label]"] { border-style: dashed; }
.feld-zeile .check { white-space: nowrap; font-size: .9rem; }
.check.gefahr { color: var(--gefahr); }
.nur-mobil { display: none; }
.komp-form .knoepfe { margin-top: .8rem; justify-content: flex-start; }
@media (max-width: 40rem) {
    .feld-kopf { display: none; }
    .feld-zeile { grid-template-columns: 1fr 1fr 1fr; padding: .7rem 0; }
    .feld-zeile .f-label, .feld-zeile .f-wert { grid-column: 1 / -1; }
    .nur-mobil { display: block; font-size: .8rem; color: var(--grau); }
}

/* ---------- Historie & Wartung ---------- */
.komp-gruppe { margin-bottom: 1.2rem; }
.komp-gruppe .komp-form { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.anhang {
    border: 1px solid var(--linie); border-top: 0; border-radius: 0 0 8px 8px;
    padding: .6rem .9rem; background: var(--feld);
}
.anhang summary { cursor: pointer; font-weight: 600; }
.anhang[open] summary { margin-bottom: .6rem; }
.anhang h4, .komp h4 { margin: 1rem 0 .4rem; font: 600 1rem var(--schrift); color: var(--grau); }
.plan-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0 .8rem; }
.plan-raster label { margin-bottom: .5rem; font-size: .9rem; }
.plan-form, .hist-form { padding: .6rem 0; border-top: 1px dashed var(--linie); }
.plan-form .knoepfe { justify-content: flex-start; }
.plan-status { font-size: .85rem; font-weight: 600; color: var(--grau); margin-right: auto; }
.plan-form.ueberfaellig .plan-status, .plan.ueberfaellig .plan-status { color: var(--gefahr); }
.plan-form.bald .plan-status, .plan.bald .plan-status { color: #A86A00; }
.plan-form.ok .plan-status, .plan.ok .plan-status { color: var(--ok); }
.plaene { list-style: none; margin: 0; padding: 0; }
.plan { display: flex; flex-wrap: wrap; gap: .1rem .8rem; padding: .35rem 0; border-top: 1px solid var(--linie); }
.plan-name { font-weight: 600; }
.plan-info { color: var(--grau); font-size: .9rem; }
.zeitleiste { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--linie); }
.zeitleiste li { position: relative; padding: .2rem 0 .7rem .4rem; }
.zeitleiste li::before {
    content: ""; position: absolute; left: -1.42rem; top: .55rem; width: .7rem; height: .7rem;
    border-radius: 50%; background: var(--flaeche); border: 2px solid var(--grau);
}
.zeitleiste li.ereignis-installation::before, .zeitleiste li.ereignis-inbetriebnahme::before { border-color: var(--ok); background: var(--ok); }
.zeitleiste li.ereignis-austausch::before, .zeitleiste li.ereignis-reparatur::before { border-color: var(--gefahr); }
.z-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.z-kopf time { font-weight: 600; font-variant-numeric: tabular-nums; }
.z-art { font-weight: 600; }
.z-von { color: var(--grau); font-size: .9rem; }
.z-loeschen { margin-left: auto; }
.z-text { margin: .15rem 0 0; }
.z-beleg { display: inline-block; margin-top: .15rem; font-size: .9rem; }
input[type=date], input[type=time], input[type=month], input[type=number], input[type=email], input[type=tel], input[type=url], input[type=search] {
    display: block; width: 100%; margin-top: .3rem; font: inherit; color: var(--tinte);
    background: var(--feld); border: 1px solid var(--linie); border-radius: 6px; padding: .55rem .6rem;
}

/* ======================================================================
   Einklappbare Ansicht (Update: Kategorien, Komponenten, Wartungspläne)
   ====================================================================== */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: "›"; display: inline-block; width: 1rem; margin-right: .35rem;
    font-weight: 700; color: var(--grau); transition: transform .15s;
}
details[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details > summary::before { transition: none; } }

/* Ansicht: Kategorie → Komponente */
.kat-gruppe { border: 1px solid var(--linie); border-radius: 8px; margin-bottom: .6rem; background: var(--flaeche); }
.kat-gruppe > summary { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; font-weight: 600; font-size: 1.1rem; }
.kat-gruppe[open] > summary { border-bottom: 1px solid var(--linie); }
.anzahl { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--grau); background: var(--papier); border-radius: 999px; padding: .1rem .55rem; }
.komp-ansicht { border-top: 1px solid var(--linie); }
.kat-gruppe > .komp-ansicht:first-of-type { border-top: 0; }
.komp-ansicht > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding: .6rem .9rem .6rem 1.4rem; }
.komp-titel { font-weight: 600; }
.komp-ansicht .komp-art, .komp-gruppe .komp-art { flex-basis: auto; font: 400 .88rem var(--schrift); color: var(--grau); }
.komp-inhalt { padding: 0 .9rem .9rem 2.8rem; }
.mehrzeilig, .geheim-wert { white-space: pre-line; }

/* PIN je Feld */
.geheim { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .4rem; }

/* Bearbeiten: Komponenten eingeklappt, Status links */
.kat-ueberschrift { margin: 1.2rem 0 .5rem; font: 600 .95rem var(--schrift); color: var(--grau); text-transform: uppercase; letter-spacing: .04em; }
.komp-gruppe {
    border: 1px solid var(--linie); border-left: 5px solid var(--ok); border-radius: 8px;
    background: var(--flaeche); margin-bottom: .6rem;
}
.komp-gruppe.status-neu, .komp-gruppe.geaendert { border-left-color: var(--gefahr); }
.komp-gruppe > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; padding: .65rem .9rem; }
.status-punkt { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ok); flex: none; }
.komp-gruppe.status-neu .status-punkt, .komp-gruppe.geaendert .status-punkt { background: var(--gefahr); }
.komp-gruppe[open] > summary { border-bottom: 1px dashed var(--linie); }
.komp-gruppe .komp-form { border: 0; border-radius: 0; margin: 0; padding: .8rem .9rem; box-shadow: none; }
.komp-gruppe form.verfolgt { border-left: 0; }
.komp-gruppe .anhang { border: 0; border-top: 1px dashed var(--linie); border-radius: 0 0 8px 8px; margin: 0; }
.felder-klappe { margin: .4rem 0 .2rem; }
.felder-klappe > summary { font-weight: 600; padding: .3rem 0; }
.felder-klappe[open] > summary { margin-bottom: .4rem; }

.feld-kopf, .feld-zeile {
    grid-template-columns: minmax(7rem, 1fr) minmax(9rem, 1.6fr) 4.5rem auto auto;
}
.f-einheit input { text-align: center; }
@media (max-width: 40rem) {
    .feld-zeile { grid-template-columns: 1fr 1fr 1fr; }
    .feld-zeile .f-label, .feld-zeile .f-wert { grid-column: 1 / -1; }
    .feld-zeile .f-einheit { grid-column: 1 / -1; }
    .feld-zeile .f-sicht { grid-column: span 2; }
    .f-einheit input { text-align: left; }
}

/* Wartungspläne einzeln eingeklappt */
.plan-klappe { border: 1px solid var(--linie); border-left: 4px solid var(--linie); border-radius: 6px; margin-bottom: .45rem; background: var(--flaeche); }
.plan-klappe > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; padding: .5rem .7rem; }
.plan-klappe.ok { border-left-color: var(--ok); }
.plan-klappe.bald { border-left-color: #A86A00; }
.plan-klappe.ueberfaellig { border-left-color: var(--gefahr); }
.plan-klappe.erledigt, .plan-klappe.pausiert { opacity: .75; }
.plan-klappe.neu > summary { font-weight: 600; color: var(--tinte); }
.plan-klappe .plan-form { border-top: 1px dashed var(--linie); padding: .6rem .7rem; }
.plan-klappe summary .plan-status { margin-left: auto; margin-right: 0; }
.plan.erledigt .plan-status, .plan-klappe.erledigt .plan-status { color: var(--grau); }
.wartung-felder[data-typ="einmalig"] .nur-intervall,
.wartung-felder[data-typ="intervall"] .nur-einmalig { display: none; }

/* ---------- Pläne ---------- */
fieldset.klar { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.klar[disabled] { opacity: .6; }
.tarif-leiste { display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline;
    padding: .6rem .9rem; border-radius: 8px; border: 1px solid var(--linie); border-left: 4px solid var(--ok);
    background: var(--flaeche); margin: 0 0 1rem; }
.tarif-leiste.abgelaufen { border-left-color: var(--gefahr); }
.gesperrt-hinweis { margin: .6rem .9rem; font-size: .9rem; color: var(--grau); }
.komp-gruppe.gesperrt { border-left-color: var(--linie); }
.komp-gruppe.gesperrt .status-punkt { background: var(--linie); }
td.warnung { color: var(--gefahr); font-weight: 600; }

/* ---------- Admin-Navigation, Bestellungen ---------- */
.admin-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.admin-nav a { font-weight: 600; text-decoration: none; color: var(--grau); padding-bottom: .15rem; border-bottom: 3px solid transparent; }
.admin-nav a[aria-current] { color: var(--tinte); border-bottom-color: var(--pv); }
.bestell-kopf { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.bestell-kopf strong { font: 700 1.3rem var(--schrift-schmal); }
.marke-status { font-size: .8rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: #FCF0C7; color: #7A5A00; }
.marke-status.bezahlt { background: rgba(30,123,69,.12); color: var(--ok); }
.marke-status.storniert { background: rgba(180,35,24,.1); color: var(--gefahr); }
.marke-status.ml-kaufm { background: rgba(60,100,180,.12); color: #2b4f8f; }   /* Mail-Protokoll: Aufbewahrungsklasse */
.marke-status.ml-sonstig { background: rgba(95,102,109,.12); color: var(--grau); }
.tabs-admin { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }

.suche-zeile { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; }
.suche-zeile .suche { flex: 1 1 28rem; }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.5rem; }
.zwei-spalten > * { min-width: 0; }
@media (max-width: 56rem) { .zwei-spalten { grid-template-columns: minmax(0, 1fr); } }
.kennzahl { display: inline-block; margin-right: 1.5rem; }
.kennzahl strong { display: block; font: 700 1.6rem var(--schrift-schmal); }

/* Feldtabellen: feste Spalten, damit Kopf und Zeilen genau übereinander stehen */
@media (min-width: 40.01rem) {
    .feld-kopf, .feld-zeile { grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.7fr) 4.4rem 12rem 7rem; }
    .f-sicht select { margin-top: 0; padding: .45rem .5rem; width: 100%; }
}
.feld-zeile > *, .plan-raster > label { min-width: 0; }
.wrap.breit { max-width: 64rem; }

/* ---------- Löschen ---------- */
.gefahrzone { border-color: rgba(180,35,24,.35); border-left: 4px solid var(--gefahr); }
.gefahr-btn { background: var(--gefahr); border-color: var(--gefahr); color: #fff; }

/* ---------- Admin auf dem Handy: kleiner und Tabellen scrollbar ---------- */
.admin table.tabelle { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.admin table.tabelle th, .admin table.tabelle td { white-space: nowrap; }
@media (max-width: 48rem) {
    html:has(body.admin) { font-size: 80%; }
    .admin .wrap { padding-left: .6rem; padding-right: .6rem; }
    .admin .block { padding: .8rem .7rem; }
}
.mail-text { white-space: pre-wrap; background: var(--feld); border: 1px solid var(--linie); border-radius: 8px; padding: 1rem; font: .9rem/1.5 ui-monospace, Menlo, monospace; overflow-x: auto; }

.z-felder { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; margin: .3rem 0 0; }
.z-felder dt { font-size: .8rem; color: var(--grau); } .z-felder dd { font-size: 1rem; }
.hf-zeile { display: grid; grid-template-columns: 1fr 1.4fr 5rem; gap: .5rem; margin-bottom: .4rem; }
.hf-zeile input { margin: 0; }

.kpi-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.kpi-raster .kennzahl { margin: 0; color: var(--grau); font-size: .9rem; }
.kpi-raster .kennzahl strong { color: var(--tinte); }
.balken { display: flex; align-items: flex-end; gap: .4rem; height: 14rem; padding-top: 1.2rem; overflow-x: auto; }
.balken-spalte { flex: 1 0 2.4rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .2rem; }
.balken-stab { width: 70%; background: var(--pv); border-radius: 4px 4px 0 0; min-height: 2px; }
.balken-wert, .balken-monat { font-size: .75rem; color: var(--grau); white-space: nowrap; }

/* Eingabefelder nie breiter als ihr Platz */
input, select, textarea { box-sizing: border-box; max-width: 100%; }
.feld-zeile label, .feld-zeile input, .feld-zeile textarea { min-width: 0; }

a.balken-spalte { text-decoration: none; border-radius: 6px; }
a.balken-spalte:hover .balken-stab, a.balken-spalte.aktiv .balken-stab { background: var(--tinte); }
.dok-zeile { grid-template-columns: 1.4fr 1fr 1.2fr; }
.dok-zeile .check { margin: 0; }

/* Schild als SVG (identisch mit dem PDF) */
.druck-svg { display: flex; justify-content: center; margin: 1.5rem 0; }
.druck-svg .schild-svg { box-shadow: 0 10px 30px -18px rgba(43,48,54,.6); border-radius: 2mm; }
.schild-svg.gross { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; border-radius: 10px; box-shadow: 0 14px 34px -22px rgba(43,48,54,.6); }
@media print {
    @page { size: 105mm 60mm; margin: 0; }
    .nicht-drucken, .kopf, .fuss, header, footer { display: none !important; }
    body, .druck-seite { margin: 0; padding: 0; background: #fff; }
    .druck-svg { margin: 0; display: block; }
    .druck-svg .schild-svg { box-shadow: none; border-radius: 0; width: 105mm; height: 60mm; }
}

.speicher { margin: .2rem 0 .9rem; max-width: 26rem; }
.speicher-balken { height: .45rem; background: var(--zink); border-radius: 99px; overflow: hidden; margin-bottom: .25rem; }
.speicher-balken span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.speicher.voll .speicher-balken span { background: var(--gefahr); }
.speicher.kurz { margin: .35rem 0 0; max-width: 16rem; }

/* ---------- Ordner und Bildergalerie ---------- */
details.ordner { border: 1px solid var(--linie); border-radius: 8px; margin: .5rem 0; background: #fff; }
details.ordner > summary { padding: .55rem .8rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
details.ordner[open] > summary { border-bottom: 1px solid var(--linie); }
.ordner-symbol { width: 1.15rem; height: .85rem; background: var(--gelb); border-radius: 2px 3px 3px 3px; position: relative; flex: none; }
.ordner-symbol::before { content: ""; position: absolute; left: 0; top: -.2rem; width: .5rem; height: .25rem; background: var(--gelb); border-radius: 2px 2px 0 0; }
.ordner-inhalt { padding: .3rem .8rem .7rem; }
.ordner-werkzeug, .datei-werkzeug { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin: .3rem 0; font-size: .85rem; }
.ordner-werkzeug input { width: auto; display: inline-block; padding: .25rem .45rem; margin: 0; }
.datei-werkzeug select { width: auto; display: inline-block; padding: .2rem .4rem; margin: 0; font-size: .85rem; }
.galerie { list-style: none; margin: .5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; }
.galerie li { background: #fff; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.galerie a { display: block; text-decoration: none; color: inherit; }
.galerie img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--zink); }
.galerie-titel { display: block; padding: .35rem .5rem; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.galerie .datei-werkzeug { padding: 0 .5rem .4rem; }
.mini-vorschau { width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: 4px; flex: none; }

/* ---------- Klappbare Abschnitte (Ansicht und Bearbeiten) ---------- */
details.block.klapp { padding: 0; }
details.block.klapp > summary.klapp-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .9rem 1rem; }
details.block.klapp > summary.klapp-kopf h2 { margin: 0; font-size: 1.35rem; }
details.block.klapp > summary.klapp-kopf::before { align-self: center; }
details.block.klapp[open] > summary.klapp-kopf { border-bottom: 1px solid var(--linie); }
.klapp-inhalt { padding: 1rem; }
details.block.klapp:not([open]) { background: var(--papier, #F6F7F8); }
details.block.notfall { border-left: 4px solid var(--gefahr); }
details.block.notfall > summary h2::before { content: "!"; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-right: .45rem;
    border-radius: 50%; background: var(--gefahr); color: #fff; font-size: .85rem; vertical-align: .15rem; }

/* Umschalter Kategorie / Raum */
.gruppierung-wahl { margin-left: auto; display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.gruppierung-wahl button { border: 0; border-radius: 0; background: transparent; color: inherit; padding: .3rem .8rem; font-size: .9rem; font-weight: 600; min-height: 0; }
.gruppierung-wahl button[aria-pressed="true"] { background: var(--graphit, #2B3036); color: #fff; }

/* Räume */
.raum-symbol { width: .95rem; height: .95rem; border: 2px solid var(--grau); border-top-width: 4px; border-radius: 2px; flex: none; }
.raum-gruppe .raum-inhalt { padding: 0 0 .2rem; }
.raum-gruppe .raum-gruppe { margin: .5rem .7rem; }
.raum-liste { list-style: none; margin: 0 0 .5rem; padding: 0; }
.raum-liste li { padding: .3rem 0 .3rem calc(var(--tiefe, 0) * 1.4rem); border-bottom: 1px dashed var(--linie); }
.raum-zeile { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.raum-zeile input { flex: 1 1 10rem; margin: 0; }
.raum-zeile select { flex: 0 1 12rem; margin: 0; }
/* Kopf einer Komponente: Bezeichnung, Raum und Haken auf einer Linie */
.komp-kopf { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) auto; align-items: end; gap: .4rem 1rem; }
.komp-kopf > label { margin: 0; }
.komp-kopf input.komp-name, .komp-kopf select { height: 2.75rem; margin-top: .25rem; }
.komp-kopf > label.check { padding-bottom: .7rem; }
@media (max-width: 40rem) { .komp-kopf { grid-template-columns: 1fr; } .komp-kopf > label.check { padding-bottom: 0; } }

/* Vermietermodus */
.melden-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .8rem 1rem; margin-bottom: 1rem;
    background: color-mix(in srgb, var(--pv) 12%, #fff); border: 1px solid var(--pv); border-radius: 10px; }
/* Gastzugang (lib/gast.php): schlanke Leiste unter dem Kopf, solange eine Gast-Sitzung läuft */
.gast-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: .5rem 1rem;
    background: color-mix(in srgb, var(--haus) 10%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--haus) 35%, #fff); color: var(--tinte); font-size: .92rem; }
.gast-leiste-aktionen { display: flex; align-items: center; gap: .8rem; white-space: nowrap; }
.gast-leiste .link-btn { font-size: inherit; }
.gast-leiste { position: relative; }
.gast-info { position: static; }
.gast-info > summary::before, .gast-info > summary::after { content: none !important; display: none !important; }
.gast-info > summary { cursor: pointer; text-decoration: underline; list-style: none; }
.gast-info > summary::-webkit-details-marker { display: none; }
.gast-info-inhalt { position: absolute; right: 1rem; top: calc(100% + .2rem); z-index: 50; width: min(24rem, calc(100vw - 2rem)); padding: .8rem 1rem;
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); white-space: normal; }
.gast-info-inhalt ul { margin: .2rem 0 .6rem; padding-left: 1.2rem; }
.gast-info-inhalt p { margin: .2rem 0; }
@media (max-width: 40rem) { .gast-leiste-aktionen { flex-wrap: wrap; } .gast-info { flex-basis: 100%; order: 3; } .gast-info-inhalt { position: static; width: auto; margin-top: .4rem; box-shadow: none; } }
.gast-liste td { vertical-align: top; }
.gast-code { font: 600 1.6rem/1.2 var(--schrift); letter-spacing: .3em; max-width: 12rem; text-align: center; }
.falle { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.meldung-eintrag { border: 1px solid var(--linie); border-left: 4px solid var(--gefahr); border-radius: 8px; padding: .8rem 1rem; margin-bottom: .8rem; }
.meldung-eintrag.erledigt { border-left-color: #1E7B45; opacity: .85; }
.meldung-eintrag header { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.meldung-eintrag p { margin: .6rem 0; }

/* Wartungspläne: Bezeichnung, Rhythmus/Fälligkeit und Status in festen Spalten (bündig untereinander) */
@media (min-width: 40.01rem) {
    .plan-klappe:not(.neu) > summary { display: grid; grid-template-columns: 1.35rem minmax(9rem, 16rem) minmax(0, 1fr) auto; align-items: baseline; }
    .plan-klappe:not(.neu) > summary .plan-status { margin: 0; text-align: right; }
    .plan { display: grid; grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr) auto; align-items: baseline; gap: .1rem .8rem; }
    .plan .plan-status { margin: 0; text-align: right; }
}
.plan-text { grid-column: 1 / -1; flex-basis: 100%; color: var(--grau); font-size: .88rem; }
.plan-raster .ganz { grid-column: 1 / -1; }
.z-plan-text { margin: .3rem 0 .5rem; padding: .4rem .6rem; background: var(--papier); border-radius: 6px; font-size: .92rem; }
.notfall-dateien { padding: .4rem 1.2rem .8rem; border-top: 1px dashed var(--linie); }
.notfall-dateien h4 { margin: .3rem 0 .5rem; }
.plan-details { border-top: 1px dashed var(--linie); padding: .5rem .8rem .7rem 2rem; }
.klapp-kopf .anzahl { margin-left: .2rem; }
.z-betrifft { font-size: .85rem; color: var(--grau); }
/* Knopf in einer Formular-Reihe auf Höhe der Eingabefelder */
.reihe > .knopf-zelle { align-self: end; margin-bottom: .8rem; }
.reihe > .knopf-zelle button { width: 100%; }
.reihe > .knopf-zelle button { box-sizing: border-box; height: 3rem; }
.reihe select { box-sizing: border-box; min-height: 3rem; }

/* Abgelaufener Ausweis */
.ablauf-hinweis { display: flex; flex-direction: column; align-items: center; gap: .9rem;
    padding: 1rem 1.2rem; margin-bottom: 1.8rem; background: #FDEEEC; border: 1px solid #F2C4BD; border-left: 4px solid #C8432E; border-radius: 10px; }
.ablauf-hinweis > div { align-self: stretch; }
.ablauf-hinweis > .btn { min-width: 14rem; text-align: center; }
.ablauf-hinweis > div > strong { display: block; margin-bottom: .2rem; }
.gesperrt-kachel { opacity: .45; filter: grayscale(1); cursor: not-allowed; user-select: none;
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.gesperrt-kachel h2 { margin: 0; font-size: 1.35rem; }
.gesperrt-kachel h2::before { content: "🔒 "; font-size: .9em; }

/* ---------- Schild eines Fachbetriebs (Logo, Kontakt, „Powered by“) ---------- */
.schild.partner .schild-kopf { background: #FFFFFF; color: #1F2328; border-bottom: 4px solid #1F2328; padding: .4rem 0 .7rem; gap: 1rem; }
.schild.partner .schild-art { color: #5B636B; }
.schild-logo { max-height: 3.4rem; max-width: 9.5rem; width: auto; height: auto; flex: 0 0 auto; }
.schild-firma { font-weight: 700; font-size: 1.05rem; max-width: 9rem; }
.schild-betrieb { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .7rem; margin-top: 1rem; padding-top: .7rem; border-top: 1px solid #D2D7DB; }
.schild-betrieb .klein { flex-basis: 100%; color: #5B636B; }
.schild-betrieb-kontakt { display: flex; flex-wrap: wrap; gap: .2rem .9rem; flex-basis: 100%; }
.schild-betrieb-kontakt a { color: inherit; }
.schild.partner .schild-band { text-align: center; font-size: .85rem; letter-spacing: .02em; }

/* ---------- Drei-Punkte-Menü (⋮) ---------- */
.mehr-menue { position: relative; display: inline-block; vertical-align: middle; }
.mehr-menue > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
    border-radius: 8px; border: 1px solid var(--linie); background: #fff; color: #2B3036; }
.mehr-menue > summary::-webkit-details-marker { display: none; }
.mehr-menue > summary::marker { content: ""; }
.mehr-menue > summary:hover, .mehr-menue[open] > summary { background: #EEF0F2; }
.mehr-menue > summary:focus-visible { outline: 3px solid var(--fokus, #2B6CB0); outline-offset: 2px; }
.mehr-liste { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30; min-width: 14rem; max-width: 20rem; max-height: 70vh; overflow-y: auto;
    background: #fff; border: 1px solid var(--linie); border-radius: 10px; padding: .3rem; box-shadow: 0 14px 30px -12px rgba(31,35,40,.35); text-align: left; }
.mehr-liste.oben { top: auto; bottom: calc(100% + .3rem); }
.mehr-liste form { margin: 0; display: block; }
.mehr-eintrag { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border: 0; border-radius: 7px; background: none;
    color: #1F2328; font: inherit; font-size: .95rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mehr-eintrag:hover, .mehr-eintrag:focus-visible { background: #EEF0F2; outline: none; }
.mehr-eintrag.gefahr { color: var(--gefahr, #B42318); }
.mehr-eintrag.gefahr:hover { background: #FDEEEC; }
.mehr-titel { display: block; padding: .5rem .75rem .2rem; font-size: .78rem; font-weight: 700; color: var(--grau, #5F666D); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--linie); margin-top: .2rem; }
.mehr-formular { padding: .4rem .5rem .6rem; border-bottom: 1px solid var(--linie); margin-bottom: .2rem !important; }
.mehr-formular label { margin: 0 0 .4rem; font-size: .85rem; }
.mehr-formular button { width: 100%; }
.datei-werkzeug, .ordner-werkzeug { display: flex; justify-content: flex-end; }
.galerie li { position: relative; }
.galerie .datei-werkzeug { position: absolute; top: .3rem; right: .3rem; }
.zeilen-aktionen { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; flex-wrap: nowrap; }
.mehr-formular input { width: 100% !important; display: block !important; margin: .2rem 0 .4rem !important; }
.galerie .datei-werkzeug { padding: 0; margin: 0; }
details.mehr-menue > summary::before { content: none; display: none; }
details.mehr-menue > summary { padding: 0; margin: 0; }
.aufklapp details.mehr-menue > summary, .anhang details.mehr-menue > summary { margin: 0; }
.mehr-liste a.mehr-eintrag, .mehr-liste button.mehr-eintrag { display: block; width: 100%; margin: 0; padding: .55rem .75rem; border: 0; border-radius: 7px; gap: 0;
    background: none; box-shadow: none; min-height: 0; font-size: .95rem; font-weight: 500; line-height: 1.3; color: #1F2328; text-decoration: none; }
.mehr-liste a.mehr-eintrag:hover, .mehr-liste button.mehr-eintrag:hover { background: #EEF0F2; }
.mehr-liste button.mehr-eintrag.gefahr { color: var(--gefahr, #B42318); }
.mehr-liste button.mehr-eintrag.gefahr:hover { background: #FDEEEC; }
.mehr-liste.links { right: auto; left: 0; }
@media (max-width: 30rem) { .mehr-liste { max-width: calc(100vw - 2rem); } }
.admin-leiste { order: -1; flex-basis: 100%; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding-bottom: .7rem; border-bottom: 1px solid var(--linie); }
.admin-abmelden { margin: 0; }
.admin-abmelden button { padding: .35rem .8rem; }
.kachel-aufklapp > summary { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.kachel-aufklapp > summary h2 { margin: 0; }
.kachel-aufklapp[open] > summary { margin-bottom: 1rem; }
.text-gefahr { color: var(--gefahr, #B42318); }
tr.kuendigung-ausserordentlich td { background: #FDEEEC; }
tr.kuendigung-ausserordentlich td:first-child { box-shadow: inset 4px 0 0 var(--gefahr, #B42318); }
.admin-kopf > .meldung { flex-basis: 100%; margin: 0; }
.zeilen-formular { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin: 1rem 0 .3rem; }
.zeilen-formular label { margin: 0; flex: 0 1 auto; }
.zeilen-formular input { margin-bottom: 0; }
.zeilen-formular button { white-space: nowrap; }
.zeilen-formular input, .zeilen-formular button { height: 2.9rem; box-sizing: border-box; }
.diagramm-box { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #F6F7F8; border: 1px solid var(--linie); border-radius: 8px; padding: .7rem 1rem; margin: .6rem 0; }
.diagramm-box p { margin: 0; }
.diagramm-links { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .5rem; }
.diagramm-links li { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.mehr-liste.schwebend { position: fixed; right: auto; bottom: auto; z-index: 1000; }
.diagramm-box .diagramm-sicht { margin: .5rem 0 0; }
.diagramm-liste-klein { list-style: none; margin: 0 0 .3rem; padding: 0; }
.diagramm-liste-klein li { padding: .15rem 0; }
.diagramm-box .daten-knoepfe { display: flex; gap: .5rem; align-items: center; }
.diagramm-box form { margin: 0; }

/* Vorschläge „Hersteller / Typ“ (Datenblatt-Vorlagen) */
.vorschlag-feld { position: relative; display: block; }
.vorschlaege { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; margin: 0; padding: .25rem 0; list-style: none;
    max-height: 18rem; overflow-y: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px;
    box-shadow: 0 6px 18px rgba(31, 35, 40, .14); font-weight: 400; }
.vorschlaege li { padding: .4rem .7rem; cursor: pointer; line-height: 1.3; }
.vorschlaege li strong { display: block; font-weight: 600; color: var(--tinte); }
.vorschlaege li span { display: block; font-size: .85rem; color: var(--grau); }
.vorschlaege li:hover, .vorschlaege li.aktiv { background: var(--feld); box-shadow: inset 3px 0 0 var(--pv); }

/* Status, Speichern und ⋮-Menü in der Kopfzeile der Kacheln */
.kopf-aktionen { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; flex-wrap: nowrap; }
.kopf-aktionen .status-text { margin: 0; white-space: nowrap; }
.kopf-aktionen .status-text.fehler { white-space: normal; }   /* lange Fehlermeldung (z. B. „inzwischen an anderer Stelle geändert“) umbrechen statt abschneiden */
.kopf-aktionen .status-text::before { flex-shrink: 0; }
.kopf-aktionen .status-text.neu, .kopf-aktionen .status-text.geaendert { color: var(--gefahr); }
.kopf-aktionen .klein-knopf { padding: .35rem .8rem; font-size: .9rem; min-height: 0; white-space: nowrap; flex-shrink: 0; }
.kopf-aktionen .mehr-menue > summary { width: 2.1rem; height: 2.1rem; }
@media (max-width: 560px) {
    .kopf-aktionen { margin-left: 0; width: 100%; justify-content: flex-end; }
}

/* =====================================================================
   Designs – Auswahl in config.php: 'projekt' => ['design' => 'signal' | 'petrol' | 'kobalt' | 'material' | 'industrie' | 'sanft']
   signal = Signalgelb und Graphit (Standard), petrol = Petrol und Anthrazit, kobalt = Kobaltblau und Nachtblau.
   Die Seiten setzen data-design am <html>-Element (design_attr()).
   ===================================================================== */
:root { --gelb-hover: #E0A800; --gelb-tinte: #2B3036; --akzent-dunkel: #F2B705; }
html[data-design="petrol"] {
    --papier: #F1F4F3; --flaeche: #FFFFFF; --linie: #DAE3E1; --feld: #F8FAF9; --tinte: #17292C; --grau: #5A6B6D;
    --pv: #0E7C74; --pv-tinte: #FFFFFF; --haus: #0E5F6B; --fokus: #0E7C74;
    --gelb: #0E7C74; --gelb-hover: #0A635D; --gelb-hell: #DDF1EE; --gelb-tinte: #FFFFFF; --akzent-dunkel: #5FD3C2;
    --graphit: #17292C; --zink: #DEE6E4; --blau: #0E5F6B;
}
html[data-design="kobalt"] {
    --papier: #F3F5FA; --flaeche: #FFFFFF; --linie: #DCE2EE; --feld: #F9FAFD; --tinte: #141C2F; --grau: #5D687E;
    --pv: #2D5BE3; --pv-tinte: #FFFFFF; --haus: #2D5BE3; --fokus: #2D5BE3;
    --gelb: #2D5BE3; --gelb-hover: #2147C0; --gelb-hell: #E4EAFD; --gelb-tinte: #FFFFFF; --akzent-dunkel: #93AEFF;
    --graphit: #141C2F; --zink: #E0E5EF; --blau: #2D5BE3;
}
/* modernere Formen in den beiden neuen Designs */
html[data-design] .btn-gross, html[data-design] .btn.gelb { border-radius: 10px; }
html[data-design="kobalt"] .btn-gross { border-radius: 999px; padding-inline: 1.6rem; }
html[data-design] .funktion { border-width: 1px; box-shadow: 0 14px 30px -26px rgba(20, 28, 47, .55); }
html[data-design] .schild-kopf, html[data-design] .demo-kopf { border-radius: 6px; }


/* ---------------------------------------------------------------------
   Designs mit eigenen Formen: material, industrie, sanft
   --------------------------------------------------------------------- */
/* Material: angelehnt an Material Design 3 – Flächen statt Rahmen, Schatten als Ebenen, Pillen-Knöpfe, ruhige Groteskschrift */
html[data-design="material"] {
    --papier: #F8FAFD; --flaeche: #FFFFFF; --linie: #DDE3EA; --feld: #EDF1F7; --tinte: #1F1F1F; --grau: #5F6368;
    --pv: #0B57D0; --pv-tinte: #FFFFFF; --haus: #0B57D0; --fokus: #0B57D0;
    --gelb: #0B57D0; --gelb-hover: #0842A0; --gelb-hell: #D3E3FD; --gelb-tinte: #FFFFFF; --akzent-dunkel: #A8C7FA;
    --graphit: #1F1F1F; --zink: #E3E8EF; --blau: #0B57D0;
    --schrift: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
    --schrift-schmal: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
    --m-ebene1: 0 1px 2px rgba(0, 0, 0, .18), 0 1px 3px 1px rgba(0, 0, 0, .08);
    --m-ebene2: 0 1px 2px rgba(0, 0, 0, .2), 0 2px 6px 2px rgba(0, 0, 0, .1);
}
html[data-design="material"] h1, html[data-design="material"] h2 { font-weight: 500; letter-spacing: -.015em; }
html[data-design="material"] h3 { font-weight: 500; }
html[data-design="material"] .hero h1 { font-weight: 500; line-height: 1.05; letter-spacing: -.03em; font-size: clamp(2.5rem, 5.6vw, 4.2rem); }
html[data-design="material"] :is(button, .btn):not(.mehr-eintrag, .link-btn, .gruppierung-wahl button) { border-radius: 999px; padding: .6rem 1.5rem; font-weight: 500; letter-spacing: .01em; }
html[data-design="material"] button.zweitrangig, html[data-design="material"] .btn.zweitrangig { border-color: #747775; color: var(--gelb); }
html[data-design="material"] :is(.block, .karte, .funktion, .plan-schild, .privat-nutzen > div, .hilfe-wege .karte, .meldung, .kat-gruppe, .tipps, .avv-kasten) {
    border: 0; border-radius: 16px; box-shadow: var(--m-ebene1); }
html[data-design="material"] :is(.karte, .plan-schild, .hilfe-wege .karte):hover { box-shadow: var(--m-ebene2); }
html[data-design="material"] .funktions-gruppe { border: 0; border-radius: 28px; background: #EEF2F8; }
html[data-design="material"] .gruppe-kopf { border-top: 0; }
html[data-design="material"] :is(.funktion, .plan-schild)::before, html[data-design="material"] :is(.funktion, .plan-schild)::after { content: none; }
html[data-design="material"] .funktion header { background: var(--gelb-hell); border-radius: 16px 16px 0 0; }
html[data-design="material"] .funktion h3 { color: #041E49; font-weight: 500; }
html[data-design="material"] .funktion.warn header { background: #FCE8E6; box-shadow: none; }
html[data-design="material"] .funktion.warn header .icon { background: var(--gefahr); }
html[data-design="material"] .funktion ul { border-top: 1px solid var(--linie); }
html[data-design="material"] .funktion li::before { border: 0; border-radius: 50%; }
html[data-design="material"] .plan-band { border-radius: 12px; margin-inline: 0; }
html[data-design="material"] :is(input[type=text], input[type=password], input:not([type]), select, textarea, input[type=date], input[type=time], input[type=number], input[type=email], input[type=tel], input[type=url], input[type=search]) {
    border: 0; border-bottom: 1px solid #747775; border-radius: 4px 4px 0 0; background: var(--feld); }
html[data-design="material"] :is(input, select, textarea):focus { outline: none; border-bottom: 2px solid var(--gelb); }
html[data-design="material"] .kopf { background: rgba(248, 250, 253, .92); border-bottom-color: transparent; box-shadow: var(--m-ebene1); }
html[data-design="material"] .band { background: var(--flaeche); border-block: 0; }
html[data-design="material"] .highlight { background: #1F2A3C; }
html[data-design="material"] .laufzeit-wahl { border-radius: 999px; } html[data-design="material"] .laufzeit-wahl span { border-radius: 999px; }
html[data-design="material"] .demo-schild { border-radius: 20px; }
html[data-design="material"] .bild img, html[data-design="material"] .highlight-bild img { border-radius: 20px; }

/* Industrie: kantig und kontrastreich – keine Rundungen, kräftige Rahmen, harte Schatten, Signalorange */
html[data-design="industrie"] {
    --papier: #ECEBE7; --flaeche: #FFFFFF; --linie: #1A1A1A; --feld: #FFFFFF; --tinte: #141414; --grau: #4D4D4A;
    --pv: #FF5A1F; --pv-tinte: #141414; --haus: #141414; --fokus: #FF5A1F;
    --gelb: #FF5A1F; --gelb-hover: #E5480F; --gelb-hell: #FFE2D6; --gelb-tinte: #141414; --akzent-dunkel: #FF7A45;
    --graphit: #141414; --zink: #D6D4CE; --blau: #141414;
}
html[data-design="industrie"] *, html[data-design="industrie"] *::before, html[data-design="industrie"] *::after { border-radius: 0 !important; }
/* Schrauben, Nummern und Punkte bleiben rund */
html[data-design="industrie"] :is(.status-punkt, .badge),
html[data-design="industrie"] :is(.schritt-liste > li, .schritte h3, .demo-schild, .demo-schrauben, .plan-schild, .funktion, .schild)::before,
html[data-design="industrie"] :is(.demo-schild, .demo-schrauben, .plan-schild, .funktion, .schild)::after { border-radius: 50% !important; }
html[data-design="industrie"] h1, html[data-design="industrie"] h2 { text-transform: uppercase; letter-spacing: .01em; }
html[data-design="industrie"] .hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .95; }
html[data-design="industrie"] :is(button, .btn):not(.mehr-eintrag, .link-btn, .gruppierung-wahl button) {
    border: 2px solid var(--graphit); font-family: var(--schrift-schmal); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    box-shadow: 4px 4px 0 var(--graphit); transition: transform .08s, box-shadow .08s; }
html[data-design="industrie"] :is(button, .btn):not(.mehr-eintrag, .link-btn, .gruppierung-wahl button):hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--graphit); }
html[data-design="industrie"] .btn.gelb { border-color: var(--graphit); }
html[data-design="industrie"] :is(.block, .karte, .plan-schild, .privat-nutzen > div, .hilfe-wege .karte, .meldung, .kat-gruppe, .tipps, .avv-kasten, .funktions-gruppe) {
    border: 2px solid var(--graphit); box-shadow: 6px 6px 0 var(--graphit); }
html[data-design="industrie"] .funktion { border-width: 2px; box-shadow: 6px 6px 0 var(--graphit); }
html[data-design="industrie"] .funktions-gruppe { background: var(--flaeche); }
html[data-design="industrie"] .gruppe-kopf { border-top-width: 6px; }
html[data-design="industrie"] .funktion h3, html[data-design="industrie"] .plan-band h3 { text-transform: uppercase; }
html[data-design="industrie"] :is(input[type=text], input[type=password], input:not([type]), select, textarea, input[type=date], input[type=time], input[type=number], input[type=email], input[type=tel], input[type=url], input[type=search]) {
    border: 2px solid var(--graphit); background: #fff; }
html[data-design="industrie"] .kopf { background: #fff; border-bottom: 3px solid var(--graphit); }
html[data-design="industrie"] .band { border-block: 3px solid var(--graphit); }
html[data-design="industrie"] .highlight { background: var(--graphit); border-block: 6px solid var(--gelb); }
html[data-design="industrie"] .highlight-bild img { box-shadow: 10px 10px 0 var(--gelb); }
html[data-design="industrie"] .bild img { border: 2px solid var(--graphit); box-shadow: 6px 6px 0 var(--graphit); }
html[data-design="industrie"] .demo-schild { transform: none; border: 3px solid var(--graphit); box-shadow: 10px 10px 0 var(--graphit); }
html[data-design="industrie"] .faq details { border-bottom: 2px solid var(--graphit); }

/* Sanft: weiche Flächen, große Rundungen, Glas-Kopfzeile und dezente Verläufe in Salbeigrün */
html[data-design="sanft"] {
    --papier: #F3F7F4; --flaeche: #FFFFFF; --linie: #E1EAE4; --feld: #F6FAF7; --tinte: #1D2B25; --grau: #5D6E66;
    --pv: #1C9A6C; --pv-tinte: #FFFFFF; --haus: #1C7A5A; --fokus: #1C9A6C;
    --gelb: #1C9A6C; --gelb-hover: #157C56; --gelb-hell: #DCF3E8; --gelb-tinte: #FFFFFF; --akzent-dunkel: #7DDCB4;
    --graphit: #1D2B25; --zink: #E4ECE7; --blau: #1C7A5A;
    --s-schatten: 0 18px 40px -24px rgba(29, 43, 37, .35), 0 2px 6px -2px rgba(29, 43, 37, .08);
}
html[data-design="sanft"] body { background: radial-gradient(60rem 40rem at 90% -10%, #DDF3E8 0, transparent 60%), radial-gradient(50rem 30rem at -10% 20%, #E8F0FB 0, transparent 55%), var(--papier); }
html[data-design="sanft"] :is(button, .btn):not(.mehr-eintrag, .link-btn, .gruppierung-wahl button) { border-radius: 999px; padding-inline: 1.4rem; }
html[data-design="sanft"] .btn-gross { padding: .9rem 1.8rem; box-shadow: 0 12px 24px -14px rgba(28, 154, 108, .8); }
html[data-design="sanft"] :is(.block, .karte, .funktion, .plan-schild, .privat-nutzen > div, .hilfe-wege .karte, .meldung, .kat-gruppe, .tipps, .avv-kasten) {
    border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; box-shadow: var(--s-schatten); }
html[data-design="sanft"] .funktions-gruppe { border: 0; border-radius: 32px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(8px); }
html[data-design="sanft"] .gruppe-kopf { border-top: 0; }
html[data-design="sanft"] :is(.funktion, .plan-schild)::before, html[data-design="sanft"] :is(.funktion, .plan-schild)::after { content: none; }
html[data-design="sanft"] .funktion header { background: linear-gradient(135deg, var(--gelb-hell), #EAF6F0); border-radius: 21px 21px 0 0; }
html[data-design="sanft"] .funktion h3 { color: var(--tinte); }
html[data-design="sanft"] .funktion header .icon { border-radius: 12px; }
html[data-design="sanft"] .funktion.warn header { background: linear-gradient(135deg, #FDE3DF, #FFF1EE); box-shadow: none; }
html[data-design="sanft"] .funktion.warn header .icon { background: var(--gefahr); color: #fff; }
html[data-design="sanft"] .funktion ul { border-top: 1px solid var(--linie); }
html[data-design="sanft"] .funktion li::before { border: 0; border-radius: 50%; }
html[data-design="sanft"] .plan-band { border-radius: 14px; margin-inline: 0; }
html[data-design="sanft"] :is(input[type=text], input[type=password], input:not([type]), select, textarea, input[type=date], input[type=time], input[type=number], input[type=email], input[type=tel], input[type=url], input[type=search]) {
    border-radius: 12px; background: #fff; }
html[data-design="sanft"] .kopf { background: rgba(255, 255, 255, .62); backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: rgba(29, 43, 37, .06); }
html[data-design="sanft"] .band { background: rgba(255, 255, 255, .6); border-block: 0; }
html[data-design="sanft"] .highlight { background: linear-gradient(140deg, #16372B, #1D2B25 55%, #1A3340); }
html[data-design="sanft"] .highlight-liste .icon { border-radius: 12px; }
html[data-design="sanft"] .laufzeit-wahl { border-radius: 999px; } html[data-design="sanft"] .laufzeit-wahl span { border-radius: 999px; }
html[data-design="sanft"] .demo-schild { border-radius: 24px; }
html[data-design="sanft"] .bild img, html[data-design="sanft"] .highlight-bild img { border-radius: 22px; }
html[data-design="sanft"] .schritte img { border-radius: 22px; }
/* Material: Typenschilder und Marke behalten die schmale Schrift, Menü etwas kompakter */
html[data-design="material"] :is(.demo-schild, .schild, .marke, .fuss-marke) { --schrift-schmal: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; }
html[data-design="material"] .marke span, html[data-design="material"] .fuss-marke { font-family: var(--schrift-schmal); }
html[data-design="material"] .haupt { gap: 1.1rem; }
html[data-design="material"] .haupt a, html[data-design="material"] .kopf-rechts a { font-size: .95rem; }

/* ---------- Installationsdiagramme: Übersicht (diagramm/index.php) ---------- */
.streifen { display: inline-flex; height: 30px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px #3A464E; flex: none; }
.streifen i { width: 6px; }
.streifen .leiter-L1 { background: #7B4A2A; } .streifen .leiter-L2 { background: #24282B; } .streifen .leiter-L3 { background: #8C9398; }
.streifen .leiter-N { background: #2F6DB5; }
.streifen :is(.leiter-PE, .leiter-PEN) { background: repeating-linear-gradient(135deg, #2E9A47 0 4px, #F2CE1B 4px 8px); }
.dg-kopf { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .3rem 1rem; }
.dg-kopf > div { min-width: 0; }
.dg-kopf h1 { margin: 0; }
.dg-kopf .anzahl { margin-left: 0; white-space: nowrap; }
.dg-dach { margin: 0 0 .15rem; font-size: .85rem; color: var(--grau); }
.dg-text { margin: .4rem 0 1rem; }
.dg-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.dg-zeile { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--linie); }
.dg-link { flex: 1; min-width: 0; display: grid; justify-items: start; gap: .1rem; text-align: left; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: inherit !important; font: inherit; cursor: pointer; min-height: 0; }
.dg-link strong { font-size: 1.05rem; font-weight: 600; }
.dg-link:hover strong { text-decoration: underline; }
.dg-symbol { flex: none; width: 34px; display: flex; justify-content: center; }
.dg-aktionen { display: flex; align-items: center; gap: .4rem; flex: none; }
.dg-zeile { flex-wrap: wrap; }
.dg-staende { flex: 1 1 100%; display: grid; gap: .35rem; margin-left: calc(34px + 1rem); padding: .6rem .8rem; background: var(--flaeche-2, #F4F5F6); border-radius: 8px; }
.dg-staende-titel { font-weight: 600; font-size: .9rem; }
.dg-stand { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.dg-stand-name { flex: 1 1 12rem; min-width: 0; }
.dg-stand-neu { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; }
.dg-stand-neu input { flex: 1 1 14rem; min-width: 0; }
@media (max-width: 640px) { .dg-staende { margin-left: 0; } }
.dg-leer { text-align: center; padding: 1.5rem .5rem .5rem; border-top: 1px solid var(--linie); }
.dg-leer .streifen { height: 48px; -webkit-mask: linear-gradient(#000 40%, transparent); mask: linear-gradient(#000 40%, transparent); border-radius: 4px 4px 0 0; }
.dg-leer h2 { margin: .8rem 0 .3rem; }
.dg-leer p { max-width: 46ch; margin: 0 auto 1rem; }
.dg-dialog { width: min(34rem, calc(100vw - 1.5rem)); padding: 0; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--tinte); box-shadow: 0 24px 60px rgba(20, 30, 40, .3); }
.dg-dialog::backdrop { background: rgba(28, 40, 48, .45); }
.dg-dialog form { padding: 1.3rem; }
.dg-dialog h2 { margin-top: 0; }
.dg-netzformen { border: 0; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.dg-netzformen legend { font-weight: 500; margin-bottom: .5rem; padding: 0; }
.dg-netzform { margin: 0; font-weight: 400; }
.dg-netzform input { position: absolute; opacity: 0; }
.dg-netzform-inhalt { display: grid; grid-template-columns: 34px 1fr; column-gap: .8rem; padding: .6rem .75rem; border: 1px solid var(--linie); border-radius: 10px; cursor: pointer; }
.dg-netzform-inhalt .streifen { grid-row: span 2; align-self: center; }
.dg-netzform-inhalt small { color: var(--grau); }
.dg-netzform input:checked + .dg-netzform-inhalt { border-color: var(--tinte); box-shadow: inset 0 0 0 1px var(--tinte); background: var(--feld); }
.dg-netzform input:focus-visible + .dg-netzform-inhalt { outline: 2px solid var(--fokus); outline-offset: 2px; }
.dg-dialog-aktionen { display: flex; justify-content: flex-end; gap: .6rem; }
.dg-hinweis { margin: 0 0 1rem; padding: .7rem .85rem; border-left: 3px solid var(--tinte); border-radius: 6px; background: var(--feld); color: var(--grau); font-size: .86rem; line-height: 1.45; }
.dg-hinweis strong { color: var(--tinte); font-weight: 600; }
.fehler-text { color: var(--gefahr); }
/* Bereiche eines Plansatzes (Elektro, Wasser/Heizung, Installationsplan) untereinander, gleich breit */
.dg-aktionen { align-items: flex-start; }
.dg-bereiche { display: grid; gap: .35rem; min-width: 11.5rem; }
.dg-bereiche > button { width: 100%; justify-content: flex-start; text-align: left; }
.dg-modi .dg-netzform-inhalt { grid-template-columns: 1fr; }   /* ohne Netzform-Streifen: Text über die ganze Breite */
.dg-dialog { max-height: calc(100dvh - 1.5rem); overflow: auto; }
.dg-dialog form { max-width: 100%; }
@media (max-width: 560px) {
    .dg-zeile { flex-wrap: wrap; }
    .dg-zeile { gap: .4rem .8rem; }
    .dg-zeile .dg-link { flex: 1 1 calc(100% - 34px - .8rem); }
    .dg-aktionen { margin-left: 0; width: 100%; }
    .dg-bereiche { flex: 1; min-width: 0; }
    .dg-stand { display: grid; grid-template-columns: 1fr 1fr; }
    .dg-stand-name { grid-column: 1 / -1; }
    .dg-stand > button { width: 100%; }
    .dg-dialog form { padding: 1rem; }
    .dg-dialog-aktionen { flex-wrap: wrap; }
    .dg-dialog-aktionen > button { flex: 1 1 8rem; }
}

/* ---------- Admin: Zugriffsprotokoll ---------- */
.zg-filter label { flex: 1 1 10rem; }
.zg-filter label:first-child { flex: 2 1 14rem; }
.zg-schnell { margin: .75rem 0 0; }
.zg-balken td { padding: .3rem .5rem; }
.zg-balken .zg-zahl { text-align: right; width: 4rem; font-variant-numeric: tabular-nums; }
.zg-balken .zg-balken-zelle { width: 60%; }
.zg-balken-zelle span { display: block; height: .7rem; min-width: 2px; border-radius: 3px; background: var(--haus); }
.zg-zeiten { display: flex; flex-wrap: wrap; gap: .3rem .9rem; max-height: 22rem; overflow-y: auto; padding: .5rem 0; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--grau); }
.zg-seiten { margin-top: 1rem; }
.zg-seiten a, .zg-seiten strong { display: inline-block; padding: .2rem .5rem; }
.zg-loeschen { margin-top: 1.25rem; }
.zg-seite { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; }
.zg-seite code, .zg-balken code { font-size: .85rem; }
.zg-verlauf { max-height: 28rem; overflow-y: auto; }

/* Banking (admin/banking.php) */
.bk-betrag { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.bk-betrag.ein { color: var(--ok); }
.bk-betrag.aus { color: var(--tinte); }
.rechts, .tabelle th.rechts, .tabelle td.rechts { text-align: right; }
.bk-tabelle { width: 100%; }
.bk-tabelle td { vertical-align: top; }
.bk-datum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-zweck { min-width: 14rem; max-width: 30rem; overflow-wrap: anywhere; word-break: break-word; }
.bk-vorgemerkt { opacity: .7; font-style: italic; }
.bk-filter label { flex: 1 1 9rem; }
.bk-filter label.bk-suche { flex: 2 1 14rem; }
.bk-filter .check { flex: 0 0 auto; }
.bk-kopfzeile { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bk-schalter { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .25rem 0; }
.bk-zustand.an strong { color: var(--ok); }
.bk-zustand.aus strong { color: var(--grau); }
a.bk-kpi { text-decoration: none; color: var(--grau); border-radius: 8px; padding: .25rem .5rem; margin: -.25rem -.5rem; }
a.bk-kpi:hover { background: var(--flaeche); }
.marke-status.bk-geplant { background: rgba(60,100,180,.12); color: #2b4f8f; }
.marke-status.bk-bearbeitung { background: #FCF0C7; color: #7A5A00; }
.marke-status.bk-verzug, .marke-status.bk-storniert { background: rgba(180,35,24,.1); color: var(--gefahr); }
.marke-status.bk-erledigt { background: rgba(30,123,69,.12); color: var(--ok); }
.marke-status.bk-ausgesetzt { background: rgba(120,120,120,.15); color: var(--grau); }
.marke-status.bk-ueberzahlt { background: #FBE3D2; color: #9A3B0C; }
.marke-status.bk-erstattet { background: rgba(30,123,69,.12); color: var(--ok); }
.marke-status.bk-rueck { background: #FBE3D2; color: #9A3B0C; font-size: .75rem; margin-top: .3rem; display: inline-block; }
tr.bk-ueberzahlt td:first-child { box-shadow: inset 3px 0 0 #D9692A; }
.bk-rueck-form { margin-top: .45rem; }
.bk-freigabe { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; padding: .4rem .6rem; border-radius: 6px; background: #FFF6DA; font-size: .85rem; }
.bk-freigabe.ok { background: rgba(30,123,69,.12); } .bk-freigabe.fehler { background: rgba(180,35,24,.1); }
.bk-warten { width: .9rem; height: .9rem; border: 2px solid #C9A227; border-top-color: transparent; border-radius: 50%; animation: bk-dreh 1s linear infinite; flex: 0 0 auto; }
.bk-freigabe.ok .bk-warten, .bk-freigabe.fehler .bk-warten { display: none; }
@keyframes bk-dreh { to { transform: rotate(360deg); } }
tr.bk-verzug td:first-child { box-shadow: inset 3px 0 0 var(--gefahr); }
tr.bk-vorschau { color: var(--grau); }
tr.bk-vorschau strong { color: var(--grau); }
.bk-info { color: var(--grau); }
tr.bk-verzug .bk-info { color: var(--gefahr); }
.bk-regel { border: 1px solid var(--linie); border-radius: 8px; padding: .75rem 1rem; margin-bottom: .75rem; }
.bk-regel.aus { opacity: .75; }
.bk-regel summary { cursor: pointer; }
.bk-info-tabelle th { width: 11rem; text-align: left; vertical-align: top; }
.bk-formular [hidden] { display: none; }
.tarif-leiste.warn { border-left-color: #D99A00; }

/* Werbung (admin/werbung.php) */
.marke-status.wb-angeworben { background: rgba(60,100,180,.12); color: #2b4f8f; }
.marke-status.wb-eingeloggt { background: #FCF0C7; color: #7A5A00; }
.marke-status.wb-abonniert { background: rgba(30,123,69,.12); color: var(--ok); }
tr.wb-neu td { background: #FFF8DC; }
.wb-auswahl { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.wb-auswahl label { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.wb-tabelle { width: 100%; }
.wb-tabelle td { vertical-align: top; }

/* Dokumente: Bereiche Öffentlich/Privat aufklappbar, darin Kacheln Dokumente, Bilder, Prüfprotokolle (zugeklappt) */
details.dok-bereich { margin: 0 0 1rem; }
details.dok-bereich > summary { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; cursor: pointer; list-style: none; padding: .3rem 0 .6rem; }
details.dok-bereich > summary::-webkit-details-marker { display: none; }
details.dok-bereich > summary::before { content: ''; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; align-self: center; margin-right: .2rem; }
details.dok-bereich[open] > summary::before { transform: rotate(45deg); }
details.dok-bereich > summary h3.bereich { margin: 0; }
details.unterkachel { border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche, #fff); margin: 0 0 .6rem; }
details.unterkachel > summary { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; cursor: pointer; list-style: none; font-weight: 600; }
details.unterkachel > summary::-webkit-details-marker { display: none; }
details.unterkachel[open] > summary { border-bottom: 1px solid var(--linie); }
.unterkachel-inhalt { padding: .8rem 1rem 1rem; }
details.unterkachel .anzahl { font-weight: 600; }

/* Kurzübersicht Zählerschrank (Kachel Pläne & 3D) */
.kurzuebersicht { margin-top: 1rem; }
.kurzuebersicht h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.kurzuebersicht ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.kurzuebersicht li { display: grid; grid-template-columns: 5rem 7rem 1fr; gap: .6rem; align-items: baseline; padding: .5rem .2rem; border-bottom: 1px solid var(--linie); }
.ku-bmk { font-weight: 700; font-variant-numeric: tabular-nums; }
.ku-wert { color: var(--grau); font-size: .92rem; }
.ku-name { font-weight: 500; }
@media (max-width: 560px) { .kurzuebersicht li { grid-template-columns: 4rem 1fr; } .ku-wert { grid-column: 2; grid-row: 2; } .ku-name { grid-column: 2; grid-row: 1; } }
/* Export & Unterlagen */
.export-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.export-liste .export-form button { width: 100%; }
.export-form { margin: 0; }
.export-form button[disabled] { opacity: .5; cursor: not-allowed; }
/* Absperrpunkte in den Notfallinformationen */
.absperr { margin-top: 12px; }
.absperr h3 { font-size: 1rem; margin: 0 0 6px; }
.absperr-liste { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.absperr-liste li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; background: rgba(28, 126, 214, .08); }
.absperr-ort { color: var(--grau, #5C6A74); font-size: .92em; }

/* Sprachumschalter der Kundenansicht (DE/EN) */
.sprache-wahl { display: flex; justify-content: flex-end; gap: .15rem; margin: 0 0 .6rem; font-size: .85rem; }
.sprache-wahl a, .sprache-wahl span { padding: .2rem .55rem; border-radius: 999px; text-decoration: none; }
.sprache-wahl a { color: inherit; opacity: .75; }
.sprache-wahl a:hover, .sprache-wahl a:focus-visible { opacity: 1; background: rgba(0,0,0,.06); }
.sprache-wahl [aria-current] { background: #22272C; color: #fff; font-weight: 600; }

/* Testausweis der Werbung: kleiner Hinweis über dem Titel */
.test-hinweis { margin: 0 0 .15rem; font-size: .8rem; line-height: 1.3; color: var(--grau, #6E767E); }

/* ---------- Admin-Menü in Gruppen ---------- */
.admin-nav { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.admin-nav-gruppe { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border-radius: 8px; font-weight: 600; color: var(--grau); text-decoration: none; cursor: pointer; border: 0; }
a.admin-nav-gruppe { border-bottom: 0; }
.admin-nav-gruppe:hover, .admin-nav-menue[open] > .admin-nav-gruppe { background: #EEF0F2; color: var(--tinte); }
.admin-nav a.admin-nav-gruppe[aria-current], .admin-nav-menue.aktiv > .admin-nav-gruppe { color: var(--tinte); box-shadow: inset 0 -3px 0 var(--pv); border-radius: 8px 8px 0 0; }
.admin-nav-wo { font-weight: 500; font-size: .85rem; color: var(--grau); padding-left: .45rem; border-left: 1px solid var(--linie); }
.admin-nav-menue { position: relative; }
details.admin-nav-menue > summary { list-style: none; }
details.admin-nav-menue > summary::-webkit-details-marker { display: none; }
details.admin-nav-menue > summary::before { content: none; display: none; }
.admin-nav-pfeil { width: .42rem; height: .42rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.admin-nav-menue[open] .admin-nav-pfeil { transform: rotate(-135deg) translateY(-1px); }
.admin-nav-liste { position: absolute; left: 0; top: calc(100% + .3rem); z-index: 40; min-width: 13rem; background: #fff; border: 1px solid var(--linie); border-radius: 10px; padding: .3rem;
    box-shadow: 0 14px 30px -12px rgba(31,35,40,.35); display: grid; }
.admin-nav .admin-nav-liste a { display: block; padding: .55rem .75rem; border-radius: 7px; border: 0; color: #1F2328; font-weight: 500; text-decoration: none; }
.admin-nav .admin-nav-liste a:hover { background: #EEF0F2; }
.admin-nav .admin-nav-liste a[aria-current] { background: #FFF6D6; font-weight: 700; }
@media (max-width: 40rem) { .admin-nav-wo { display: none; } }

/* Sicherheitshinweise (Admin) – eine eingeklappte Zeile */
details.sicherheit-hinweise { flex-basis: 100%; order: -2; border: 1px solid var(--linie); border-radius: 8px; background: #FFF8F7; box-shadow: inset 4px 0 0 var(--gefahr); }
details.sicherheit-hinweise > summary { display: flex; align-items: center; gap: .55rem; padding: .5rem .9rem; font-weight: 600; font-size: .93rem; color: var(--gefahr, #B42318); }
details.sicherheit-hinweise > summary::before { order: 9; margin-left: auto; }
.sicherheit-zeichen { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--gefahr, #B42318); color: #fff; font-size: .8rem; }
details.sicherheit-hinweise ul { margin: 0; padding: .2rem 1rem .8rem 2.6rem; font-size: .92rem; }
details.sicherheit-hinweise li { margin: .25rem 0; }

/* Akkordeon-Kacheln */
details.akkordeon > summary.klapp-kopf h2 { font-size: 1.2rem; }
.klapp-zusatz { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: var(--grau); font-size: .9rem; font-weight: 500; }
.klapp-zusatz .rechts { margin-left: auto; }
details.akkordeon > summary.klapp-kopf .klapp-zusatz:last-child { margin-left: auto; }
.anzahl-marke { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.45rem; padding: 0 .45rem; border-radius: 999px; background: #EEF0F2; color: #2B3036; font-size: .82rem; font-weight: 700; }
.anzahl-marke.warn { background: #FDEEEC; color: var(--gefahr, #B42318); }
.anzahl-marke.ok { background: #E6F4EA; color: #1E7B45; }
details.akkordeon + details.akkordeon { margin-top: .6rem; }
details.gefahrzone { border-color: #F2C7C2; }
details.gefahrzone > summary.klapp-kopf h2 { color: var(--gefahr, #B42318); font-size: 1.05rem; }
details.gefahrzone:not([open]) { background: #FFF8F7; }

/* Erklärtexte zum Aufklappen */
details.erklaerung { margin: .2rem 0 1rem; font-size: .93rem; }
details.erklaerung > summary { display: inline-flex; align-items: center; gap: .35rem; color: var(--grau); font-weight: 600; }
details.erklaerung > summary::before { content: "i"; transform: none !important; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%;
    border: 1.5px solid currentColor; font-size: .72rem; font-weight: 700; font-style: italic; transition: none; }
details.erklaerung[open] > summary { color: var(--tinte); margin-bottom: .4rem; }
.erklaerung-inhalt { padding: .6rem .9rem; border-left: 3px solid var(--linie); background: var(--papier, #F6F7F8); border-radius: 0 8px 8px 0; }
.erklaerung-inhalt > :first-child { margin-top: 0; } .erklaerung-inhalt > :last-child { margin-bottom: 0; }

/* Filterfeld über langen Listen */
.filter-feld { display: flex; align-items: center; gap: .5rem; margin: 0 0 .8rem; }
.filter-feld input { max-width: 26rem; }
.hersteller-liste { list-style: none; margin: 0; padding: 0; columns: 15rem auto; column-gap: 1.5rem; }
.hersteller-liste li { padding: .2rem 0; break-inside: avoid; }
details.vorlagen-art { margin-bottom: .4rem; }
details.vorlagen-art > summary .klein { margin-left: auto; color: var(--grau); font-weight: 500; }

/* Bestellungen (Admin): kompakte Zeilen zum Aufklappen */
details.bestell-zeile { background: var(--flaeche, #fff); border: 1px solid var(--linie); border-radius: 10px; margin: 0 0 .45rem; }
details.bestell-zeile > summary { display: grid; grid-template-columns: 1rem auto auto auto minmax(8rem, 1fr) minmax(0, 1.4fr) auto auto; align-items: center; gap: .3rem .8rem; padding: .6rem .9rem; }
details.bestell-zeile > summary .bz-was { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--grau); }
details.bestell-zeile > summary .bz-betrag { text-align: right; white-space: nowrap; }
details.bestell-zeile[open] > summary { border-bottom: 1px solid var(--linie); }
details.bestell-zeile:target, details.bestell-zeile[open] { box-shadow: 0 6px 18px -12px rgba(31,35,40,.4); }
.bestell-inhalt { padding: .8rem 1rem 1rem; }
@media (max-width: 52rem) {
    details.bestell-zeile > summary { display: flex; flex-wrap: wrap; align-items: center; }
    details.bestell-zeile > summary .bz-betrag { order: 1; margin-left: auto; white-space: nowrap; }
    details.bestell-zeile > summary .bz-name, details.bestell-zeile > summary .bz-was, details.bestell-zeile > summary .bz-datum { order: 2; flex-basis: 100%; padding-left: 1.35rem; }
}
.protokoll-filter { margin: 0 0 .8rem; }
.protokoll-filter label { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.protokoll-filter select { width: auto; }
details.unterkachel > summary .klein { color: var(--grau); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sprungleiste (Bearbeiten): bleibt beim Scrollen oben, Knopf „Alle aufklappen“ rechts */
main.wrap > nav.sprung { position: sticky; top: 0; z-index: 20; background: var(--flaeche, #fff); padding: .5rem .7rem; border-radius: 10px; box-shadow: 0 6px 16px -12px rgba(31,35,40,.45); align-items: center; }
nav.sprung .sprung-alle { margin-left: auto; white-space: nowrap; flex: none; padding: .3rem .75rem; min-height: 0; font-size: .85rem; background: transparent; color: var(--tinte); border: 1px solid var(--linie); border-radius: 8px; }
nav.sprung .sprung-alle:hover { background: #EEF0F2; }
/* Komponenten (Bearbeiten): Kategorien klappbar */
details.komp-kat { margin: .4rem 0 .8rem; }
details.komp-kat > summary { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; }
details.komp-kat > summary h3.kat-ueberschrift { margin: 0; }
details.komp-kat > summary .klein { color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
details.komp-kat[open] > summary .klein { display: none; }
details.komp-kat > summary h3.kat-ueberschrift::after { content: none; display: none; }
details.komp-kat > summary { border-bottom: 1px solid var(--linie); margin-bottom: .5rem; }
/* Sicherungen (Admin) */
.backup-offen-kopf { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem .8rem; margin: 0 0 1rem; border-radius: 8px; background: #E6F4EA; }
.backup-offen-kopf p, .backup-offen-kopf form { margin: 0; }
tr.backup-offen td { background: #F3FAF5; }
.backup-form fieldset { margin: .3rem 0 .6rem; }
.backup-form input.kurz { display: inline-block; width: auto; min-width: 16rem; margin-left: .4rem; }
details.backup-ausweis > summary .klein { margin-left: auto; color: var(--grau); font-weight: 500; }
@media (max-width: 40rem) { .admin-nav { position: relative; } .admin-nav-menue { position: static; } .admin-nav-liste { left: 0; right: 0; } }
.mail-filter { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.mail-filter label { margin: 0; }
.mail-filter label:first-child { flex: 1 1 18rem; }

/* ---------- Mitteilungen (Glocke im Kopf, nur Admin) ---------- */
details.glocke { position: relative; }
details.glocke > summary { list-style: none; cursor: pointer; position: relative; }
details.glocke > summary::-webkit-details-marker { display: none; }
details.glocke > summary::before { content: none; display: none; }
details.glocke .glocke-zahl { position: absolute; top: -.2rem; right: -.35rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--gefahr, #B42318);
    color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
details.glocke .glocke-zahl[hidden] { display: none; }
.glocke-liste { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60; width: min(24rem, calc(100vw - 1.5rem)); max-height: 70vh; overflow-y: auto; background: #fff; color: #1F2328;
    border: 1px solid var(--linie); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(31,35,40,.45); text-align: left; }
.glocke-kopf { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: #fff; }
.glocke-kopf form { margin: 0; }
.glocke-eintrag { display: grid; gap: .1rem; padding: .65rem .9rem; border-bottom: 1px solid #EEF0F2; color: inherit; text-decoration: none; box-shadow: inset 3px 0 0 var(--gelb, #F2B705); }
.glocke-eintrag:hover { background: #F6F7F8; }
.glocke-eintrag strong { font-size: .95rem; }
.glocke-eintrag span { font-size: .85rem; color: #5B636B; }
.glocke-art { font-size: .75rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.glocke-eintrag.art-zahlung_verzug, .glocke-eintrag.art-kuendigung_ausser, .glocke-eintrag.art-mail_fehler, .glocke-eintrag.art-system { box-shadow: inset 3px 0 0 var(--gefahr, #B42318); }
.glocke-leer { margin: 0; padding: 1rem .9rem; color: #5B636B; font-size: .9rem; }
.glocke-fuss { display: block; padding: .65rem .9rem; font-size: .88rem; font-weight: 600; text-align: center; }
.mitteilung-arten { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .3rem 1.2rem; margin-bottom: 1rem; }
.mitteilung-liste { list-style: none; margin: 0; padding: 0; }
.mitteilung-liste li { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .7rem .8rem; border-bottom: 1px solid var(--linie); }
.mitteilung-liste li > div { display: grid; gap: .1rem; }
.mitteilung-liste li.neu { background: #FFFBEB; box-shadow: inset 3px 0 0 var(--gelb, #F2B705); }
.mitteilung-liste li form { margin: 0; flex: none; }
.mitteilung-text { color: #5B636B; font-size: .92rem; }

/* ---------- Postfach (Admin) ---------- */
main.wrap.breit:has(.pf-raster) { max-width: 1400px; }
.pf-raster { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.pf-seite { position: sticky; top: .5rem; display: grid; gap: .5rem; }
.pf-neu { text-align: center; justify-content: center; }
.pf-konto { background: var(--flaeche, #fff); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.pf-konto-name { display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; font-weight: 700; color: inherit; text-decoration: none; }
.pf-konto-name span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-konto.aktiv .pf-konto-name { background: #2B3036; color: #fff; }
.pf-ordner { display: grid; padding: .3rem; }
.pf-ordner a { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border-radius: 7px; color: inherit; text-decoration: none; font-size: .95rem; }
.pf-ordner a:hover { background: #EEF0F2; }
.pf-ordner a[aria-current] { background: #FFF6D6; font-weight: 700; }
.pf-ordner a span:nth-child(2) { flex: 1; }
.pf-zahl { min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: #F2B705; color: #2B3036; font-size: .78rem; text-align: center; }
.pf-warn { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--gefahr, #B42318); color: #fff; font-size: .75rem; }
.pf-verwalten { padding: .4rem .6rem; font-size: .9rem; color: var(--grau); }
.pf-ico { width: 1rem; height: 1rem; flex: none; border-radius: 3px; background: #C9CED2; -webkit-mask: var(--pf-i) center / contain no-repeat; mask: var(--pf-i) center / contain no-repeat; }
.pf-ico { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); background: #8F979E; border-radius: 0; }
.pf-ico.pf-inbox { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13l3-8h12l3 8v6H3zm2 0h4a3 3 0 0 0 6 0h4l-2-6H7z'/%3E%3C/svg%3E"); }
.pf-ico.pf-sent { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2z'/%3E%3C/svg%3E"); }
.pf-ico.pf-trash { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 7h12l-1 14H7zM4 4h5l1-1h4l1 1h5v2H4z'/%3E%3C/svg%3E"); }
.pf-ico.pf-junk { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l10 18H2zm-1 7v5h2V9zm0 7v2h2v-2z'/%3E%3C/svg%3E"); }
.pf-ico.pf-drafts { --pf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.2V21h3.8L18 9.8 14.2 6zM20.7 7a1 1 0 0 0 0-1.4l-2.3-2.3a1 1 0 0 0-1.4 0L15.2 5 19 8.8z'/%3E%3C/svg%3E"); }
.pf-haupt .block { margin-top: 0; }
.pf-listenkopf { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .6rem; }
.pf-listenkopf h2 { margin: 0; }
.pf-suche { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0; }
.pf-suche input[type=search] { width: 16rem; max-width: 100%; }
.pf-suche .check { margin: 0; font-size: .88rem; }
.pf-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .4rem 0 .6rem; border-bottom: 1px solid var(--linie); }
.pf-leiste .check { margin: 0; }
.pf-leiste form { margin: 0; }
.pf-verschieben { display: inline-flex; gap: .3rem; }
.pf-verschieben select { width: auto; }
.pf-alle { padding: 0 .55rem; }
.pf-liste { list-style: none; margin: 0; padding: 0; }
.pf-liste li { display: flex; align-items: stretch; border-bottom: 1px solid #EEF0F2; }
.pf-liste li:hover { background: #F6F7F8; }
.pf-wahl { display: grid; place-items: center; padding: 0 .55rem; margin: 0; }
.pf-liste a { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .05rem .8rem; padding: .55rem .6rem .55rem 0; color: inherit; text-decoration: none; }
.pf-von, .pf-betr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-betr { grid-column: 1 / -1; color: #5B636B; font-size: .93rem; }
.pf-zeit { color: var(--grau, #5F666D); font-size: .85rem; white-space: nowrap; }
.pf-liste li.neu .pf-von, .pf-liste li.neu .pf-betr { font-weight: 700; color: #1F2328; }
.pf-liste li.neu { box-shadow: inset 3px 0 0 #F2B705; }
@media (min-width: 70rem) { .pf-liste a { grid-template-columns: 15rem minmax(0, 1fr) auto; } .pf-betr { grid-column: auto; grid-row: 1; grid-column-start: 2; } .pf-zeit { grid-column-start: 3; grid-row: 1; } }
.pf-betreff { margin: .8rem 0 .4rem; font-size: 1.45rem; }
.pf-kopf { display: grid; gap: .15rem; margin: 0 0 .8rem; font-size: .93rem; }
.pf-kopf div { display: flex; gap: .6rem; }
.pf-kopf dt { width: 4rem; color: var(--grau, #5F666D); flex: none; }
.pf-kopf dd { margin: 0; word-break: break-word; }
.pf-anhaenge { list-style: none; margin: 0 0 .8rem; padding: .5rem .7rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; background: #F6F7F8; border-radius: 8px; }
.pf-anzeige { margin: 0 0 .4rem; color: var(--grau, #5F666D); }
.pf-html { width: 100%; height: 70vh; min-height: 24rem; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
.pf-textinhalt { padding: .8rem 1rem; border: 1px solid var(--linie); border-radius: 8px; background: #fff; white-space: normal; overflow-wrap: anywhere; font-size: .97rem; line-height: 1.55; }
.pf-text { font-family: inherit; font-size: .97rem; line-height: 1.5; }
.pf-konto-zeile { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--linie); }
@media (max-width: 52rem) {
    .pf-raster { grid-template-columns: 1fr; }
    .pf-seite { position: static; }
    .pf-ordner { display: flex; flex-wrap: wrap; }
}

/* ---------- Kontaktformular (kontakt.php) und Admin → Kontakt ---------- */
.kontakt-formular select { width: 100%; }
.kontakt-danke h2 { margin-top: 0; }
.kontakt-leiste { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; }
.kontakt-leiste .tabs-admin { margin: 0; }
.kontakt-suche { display: flex; gap: .5rem; margin: 0; }
.kontakt-suche input[type=search] { margin: 0; min-width: 16rem; }
.kontakt-tabelle tr.ungelesen td { font-weight: 600; }
.kontakt-tabelle tr.ungelesen td:first-child { box-shadow: inset 3px 0 0 var(--gelb, #F2B705); }
.kontakt-tabelle td.kontakt-auszug { color: var(--grau); max-width: 30rem; font-weight: 400; }
.kontakt-tabelle td.kontakt-auszug { white-space: normal; min-width: 16rem; }
.kontakt-auszug-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: normal; }   /* höchstens 2 Zeilen, Rest mit … */
.kontakt-detail h2 { margin: 0 0 .2rem; }
.kontakt-daten { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 1rem 0; }
.kontakt-daten dt { color: var(--grau); }
.kontakt-daten dd { margin: 0; overflow-wrap: anywhere; }
.kontakt-nachricht { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--feld, #F6F7F8); border-radius: 10px; padding: 1rem 1.1rem; line-height: 1.55; }
.kontakt-aktionen { display: flex; flex-wrap: wrap; align-items: center; margin: 1rem 0; gap: .5rem; }
.kontakt-aktionen form { margin: 0; display: inline-flex; }
.kontakt-daten a { font: inherit; }
.kontakt-notiz { margin-top: 1rem; border-top: 1px solid var(--linie); padding-top: 1rem; }
.gefahr-text { color: var(--gefahr, #B42318) !important; }
@media (max-width: 40rem) {
    .kontakt-suche { width: 100%; }
    .kontakt-suche input[type=search] { min-width: 0; flex: 1 1 auto; }
    .kontakt-tabelle th:nth-child(4), .kontakt-tabelle td:nth-child(4) { display: none; }
}

/* ---------- Spamfilter im Postfach ---------- */
.pf-liste li.spam .pf-von, .pf-liste li.spam .pf-betr { opacity: .75; }
.pf-spam-marke { display: inline-block; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: rgba(180, 35, 24, .1); color: var(--gefahr, #B42318); vertical-align: .1em; }
.pf-spam-box { margin: .6rem 0 1rem; padding: .8rem 1rem; border-radius: 10px; background: #FFF7E6; border: 1px solid #F3D9A4; }
.pf-spam-box.hoch { background: #FDECEA; border-color: #F5C2BC; }
.pf-spam-box p { margin: 0 0 .4rem; }
.pf-spam-box ul { margin: .2rem 0 .6rem 1.1rem; padding: 0; }
.pf-spam-box li { margin: .1rem 0; }
.pf-spam-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf-spam-info { margin: .3rem 0 .8rem; color: var(--grau); }
.pf-spam-info ul { margin: .3rem 0 .4rem 1.1rem; padding: 0; }
.pf-spamliste { list-style: none; margin: 0; padding: 0; }
.pf-spamliste li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--linie); }
.pf-spamliste li form { margin-left: auto; }

/* Sicherheitsprotokoll (admin/sicherheit.php) und Backup-Code */
.sl-balken { display: flex; align-items: flex-end; gap: 3px; height: 9rem; padding: .3rem 0 1.2rem; }
.sl-stunde { position: relative; flex: 1 1 0; height: 100%; display: flex; flex-direction: column-reverse; min-width: 6px; }
.sl-stunde i { display: block; width: 100%; }
.sl-stunde small { position: absolute; bottom: -1.15rem; left: 50%; transform: translateX(-50%); font-size: .65rem; color: var(--grau, #5F666D); }
.sl-f { background: #C8432E; } .sl-o { background: #9DB7A0; }
.sl-legende { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; vertical-align: -1px; }
tr.warn-zeile td { background: #FDEEEC; }
.kennzahl.warn strong { color: #C8432E; }
.backup-code { font: 600 1.25rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; padding: .3rem .6rem; background: #fff; border: 1px dashed #A9B1B9; border-radius: 6px; user-select: all; }
.backup-code-kasten .geheim, .meldung .geheim { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .3rem 0 .5rem; }
.admin-passwort label.check input[type=text] { display: inline-block; width: auto; min-width: 14rem; margin-left: .4rem; }
.sl-tabelle td.nowrap { white-space: nowrap; }
#zugang h3 { margin-top: 1.2rem; }
/* Sprunglink für Tastatur/Screenreader: erst beim Fokus sichtbar */
.sprung-link { position: fixed; left: .5rem; top: -4rem; z-index: 100000; padding: .55rem .9rem; background: var(--gelb, #F2B705); color: #1D2025; font-weight: 700; border-radius: 8px; text-decoration: none; transition: top .15s; }
.sprung-link:focus { top: .5rem; }
#inhalt { display: block; height: 0; outline: none; }
/* iPhone zoomt bei Feldern unter 16 px beim Antippen hinein – auf Touchgeräten mindestens 16 px */
@media (pointer: coarse) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); }
}
.ausweis-code { overflow-wrap: normal; word-break: normal; font-variant-numeric: tabular-nums; }   /* nur zwischen den 4er-Gruppen umbrechen */
.qr-id { overflow-wrap: normal; word-break: normal; }
input.nur-lesen, input[readonly] { background: var(--hintergrund, #F3F4F2); color: var(--grau, #5F666D); cursor: default; }
/* Infobanner unter dem Seitenkopf (config: infobanner) */
.infobanner { width: 100%; font-size: .95rem; line-height: 1.4; }
.infobanner-innen { max-width: 72rem; margin: 0 auto; padding: .6rem 1rem; text-align: center; font-weight: 600; overflow-wrap: anywhere; }
.app-inhalt > .infobanner { border-radius: 8px; margin-bottom: 1rem; }

/* Admin Rechnungen: Schritt von Hand auslösen (ohne Qonto) */
.tabelle .klein-knopf { padding: .3rem .7rem; font-size: .85rem; min-height: 0; margin-top: .3rem; white-space: nowrap; }

/* ---------- Admin → System → Datenbank (admin/datenbank.php) ---------- */
.wrap.voll { max-width: none; padding-bottom: 1rem; }
.dbb-einleitung { color: var(--grau); font-size: .92rem; margin: 0 0 1rem; }
.dbb-leise { color: var(--grau); font-size: .88rem; margin: 0; }
.dbb-raster { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1rem; height: var(--dbb-h, calc(100vh - 13rem)); min-height: 24rem; }   /* Höhe setzt admin-datenbank.js bis zum Fensterrand */
.dbb-seite { height: 100%; min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: .5rem; padding: .75rem; margin: 0; }
.dbb-seite input[type=search] { width: 100%; margin: 0; }
.dbb-tabellen { overflow-y: auto; min-height: 0; overscroll-behavior: contain; display: grid; align-content: start; margin: 0 -.35rem; }
.dbb-tabellen a { display: flex; justify-content: space-between; gap: .5rem; padding: .28rem .5rem; border-radius: 5px; text-decoration: none; color: var(--tinte); font-size: .9rem; }
.dbb-tabellen a:hover { background: var(--papier); }
.dbb-tabellen a[aria-current] { background: var(--pv); color: var(--pv-tinte); font-weight: 600; }
.dbb-zahl { color: var(--grau); font-variant-numeric: tabular-nums; }
.dbb-tabellen a[aria-current] .dbb-zahl { color: var(--pv-tinte); }
.dbb-haupt { display: flex; flex-direction: column; gap: .75rem; min-width: 0; min-height: 0; height: 100%; }
.dbb-haupt > * { flex: 0 0 auto; }
.dbb-haupt > .dbb-uebersicht { flex: 1 1 auto; min-height: 0; overflow: auto; }
.dbb-haupt > .dbb-detail { max-height: 45%; overflow: auto; }
.dbb-haupt > .block { margin: 0; }
.dbb-zeile { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; }
.dbb-zeile h2 { margin: 0 auto 0 0; }
.dbb-kopf { display: grid; gap: .7rem; }
.dbb-kopf input[type=search] { margin: 0; }
.dbb-wachsen { flex: 1 1 20rem; }
.dbb-inline { display: flex; gap: .4rem; align-items: center; white-space: nowrap; font-size: .92rem; margin: 0; }
.dbb-inline select { width: auto; margin: 0; }
.dbb-hilfe code { font-size: .82rem; background: var(--papier); padding: 0 .25rem; border-radius: 3px; }
.dbb-rechts { text-align: right !important; font-variant-numeric: tabular-nums; }
.dbb-scroll { flex: 1 1 auto; min-height: 10rem; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
.dbb-scroll table { border-collapse: collapse; font-size: .84rem; width: max-content; min-width: 100%; font-variant-numeric: tabular-nums; }
.dbb-scroll thead { position: sticky; top: 0; z-index: 2; }
.dbb-scroll th { background: var(--flaeche); text-align: left; padding: .45rem .5rem; white-space: nowrap; font-size: .8rem; color: var(--grau); font-weight: 600; }
.dbb-scroll th a { color: var(--tinte); text-decoration: none; }
.dbb-scroll tr.dbb-filter th { padding-top: 0; box-shadow: inset 0 -1px 0 var(--linie); }
.dbb-filter input { font: inherit; font-size: .8rem; width: 100%; min-width: 6rem; padding: .22rem .35rem; margin: 0; min-height: 0; border: 1px solid var(--linie); border-radius: 4px; background: var(--feld); }
.dbb-filter input:not(:placeholder-shown) { border-color: var(--pv); background: var(--flaeche); }
.dbb-scroll td { padding: .4rem .5rem; border-top: 1px solid var(--linie); white-space: nowrap; max-width: 32rem; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.dbb-scroll tbody tr:hover td { background: var(--papier); }
.dbb-scroll tr.dbb-gewaehlt td { background: #FFF3C4; }
.dbb-nr { position: sticky; left: 0; background: var(--flaeche); z-index: 1; width: 2rem; text-align: center; }
.dbb-nr a { text-decoration: none; color: var(--grau); font-weight: 700; }
.dbb-pk { font-size: .7rem; }
.dbb-null, td.dbb-null { color: var(--grau); font-style: italic; }
.dbb-scroll mark { background: #FCE38A; color: inherit; border-radius: 2px; }
.dbb-blaettern { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.dbb-blaettern a { text-decoration: none; font-weight: 600; }
.dbb-detail dl { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: .35rem 1.1rem; margin: .8rem 0 0; }
.dbb-detail dt { font-weight: 600; font-size: .9rem; }
.dbb-detail dd { margin: 0; min-width: 0; }
.dbb-detail pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: .85rem/1.45 ui-monospace, Consolas, monospace; background: var(--papier); padding: .3rem .5rem; border-radius: 5px; max-height: 22rem; overflow: auto; }
@media (max-width: 60rem) { .dbb-raster { grid-template-columns: 1fr; height: auto; } .dbb-seite { height: 22rem; } .dbb-haupt { height: auto; } .dbb-scroll { max-height: 80vh; } }
.dbb-scroll tbody td:not(.dbb-nr), .dbb-detail dd[data-sp] { cursor: cell; }
.dbb-dialog { border: 1px solid var(--linie); border-radius: 12px; padding: 1.2rem 1.3rem; width: min(52rem, 94vw); background: var(--flaeche); color: var(--tinte); box-shadow: 0 20px 50px -20px rgba(0,0,0,.45); }
.dbb-dialog::backdrop { background: rgba(20, 24, 28, .45); }
.dbb-dialog form { display: grid; gap: .7rem; }
.dbb-dialog h2 { margin: 0; }
.dbb-dialog textarea { width: 100%; margin: 0; font: .92rem/1.45 ui-monospace, Consolas, monospace; resize: vertical; }
.dbb-dialog .meldung { margin: 0; }

/* Datenbank-Browser kompakt: ohne Kundensuche oben, flache Kopfzeile, kleinere Schrift */
body:has(.dbb-main) .app-kopf { height: 2.9rem; }
body:has(.dbb-main) .app-suche { display: none; }
.admin-app .app-inhalt .wrap.dbb-main { padding: .6rem 1rem .5rem; }
.dbb-main .admin-kopf { margin-bottom: .5rem; }
.admin-app .dbb-main .admin-kopf h1 { font-size: 1.35rem; }
.dbb-main .sicherheit-hinweise { margin-bottom: .5rem; font-size: .85rem; }
.dbb-main .sicherheit-hinweise > summary { padding-top: .3rem; padding-bottom: .3rem; }
.dbb-main .meldung { padding: .4rem .7rem; margin-bottom: .5rem; font-size: .88rem; }
.dbb-main .dbb-raster { gap: .6rem; grid-template-columns: 14.5rem minmax(0, 1fr); font-size: .875rem; }
.dbb-main .block { padding: .55rem .7rem; border-radius: 8px; }
.dbb-main .dbb-haupt { gap: .45rem; }
.dbb-main h2 { font-size: 1.1rem; }
.dbb-main input[type=search], .dbb-main input[type=text], .dbb-main select { padding: .3rem .5rem; font-size: .85rem; min-height: 0; border-radius: 5px; }
.dbb-main button, .dbb-main .btn { padding: .3rem .75rem; font-size: .85rem; min-height: 0; border-radius: 5px; }
.dbb-main .dbb-seite { padding: .5rem; gap: .35rem; }
.dbb-main .dbb-tabellen a { font-size: .82rem; padding: .16rem .45rem; }
.dbb-main .dbb-kopf { gap: .4rem; }
.dbb-main .dbb-zeile { gap: .4rem .6rem; }
.dbb-main .dbb-inline { font-size: .82rem; }
.dbb-main .dbb-leise { font-size: .8rem; }
.dbb-main .dbb-hilfe { font-size: .75rem; line-height: 1.4; }
.dbb-main .dbb-hilfe code { font-size: .72rem; }
.dbb-main .dbb-blaettern { font-size: .82rem; gap: .7rem; }
.dbb-main .dbb-scroll table { font-size: .78rem; }
.dbb-main .dbb-scroll th { font-size: .74rem; padding: .3rem .45rem; }
.dbb-main .dbb-scroll td { padding: .24rem .45rem; max-width: 26rem; }
.dbb-main .dbb-filter input { font-size: .74rem; padding: .15rem .3rem; min-width: 5rem; }
.dbb-main .dbb-detail dl { gap: .2rem .9rem; margin-top: .5rem; }
.dbb-main .dbb-detail dt { font-size: .8rem; }
.dbb-main .dbb-detail pre { font-size: .78rem; padding: .2rem .45rem; }
.dbb-main .dbb-uebersicht .tabelle th, .dbb-main .dbb-uebersicht .tabelle td { padding: .25rem .5rem; font-size: .82rem; }
.dbb-dialog textarea { font-size: .85rem; }
.bk-tabelle td .bk-info { white-space: normal; display: inline-block; max-width: 24rem; }

/* ---------- Finanzen → Steuern (admin/steuern.php) ---------- */
.st-vorgaben { display: flex; flex-wrap: wrap; gap: .4rem; }
.st-zeitraum { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-top: .9rem; }
.st-zeitraum label { margin: 0; }
.st-hinweis { color: var(--grau); margin: .8rem 0 0; }
.st-kopf { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.st-kopf h2 { margin: 0; }
.st-kopf .aktionen { display: flex; flex-wrap: wrap; gap: .5rem; }
.st-aufteilung { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.2rem; margin-top: 1rem; }
.st-liste td { white-space: normal; }
.st-liste td:first-child, .st-liste td.rechts { white-space: nowrap; }
.st-liste td.st-inhalt { min-width: 14rem; max-width: 24rem; white-space: normal !important; }
.st-liste td.rechts { padding-left: 1rem; }
tr.st-erstattung td { color: var(--gefahr); }
.st-uebersicht { max-width: 46rem; }
.st-uebersicht td.rechts { white-space: nowrap; padding-left: 1rem; }
.st-uebersicht td.st-einzug { padding-left: 1.6rem; color: var(--grau); }
tr.st-erstattung td.st-einzug { color: var(--gefahr); }
.st-uebersicht tr.st-summe td { font-weight: 700; border-top: 2px solid var(--linie, #ccc); }
@media (max-width: 52rem) { .st-aufteilung { grid-template-columns: 1fr; } }

td.bk-aus { color: var(--gefahr); } td.bk-ein { color: var(--ok); }
td.bk-archiv { display: flex; flex-wrap: wrap; gap: .4rem; white-space: normal; }

/* Admin → Kündigungen: Fenster „Anbieterwechsel annehmen“ */
dialog.dialog { border: 1px solid var(--linie); border-radius: 12px; padding: 1.2rem 1.3rem; width: min(40rem, 94vw); background: var(--flaeche); color: var(--tinte); box-shadow: 0 20px 50px -20px rgba(0,0,0,.45); }
dialog.dialog::backdrop { background: rgba(20, 24, 28, .45); }
dialog.dialog form { display: grid; gap: .7rem; }
dialog.dialog h2 { margin: 0; }
dialog.dialog .werte-liste { margin: 0; }
dialog.dialog label.haken { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }

/* Admin → DSGVO */
.dsgvo-form fieldset { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .9rem; margin: 0 0 .8rem; display: grid; gap: .3rem; }
.dsgvo-form label.haken { display: flex; gap: .5rem; align-items: baseline; font-weight: 400; }
.dsgvo-aktionen { white-space: nowrap; } .dsgvo-aktionen form.inline { display: inline; }
tr.dsgvo-neu td { background: rgba(242,183,5,.15); }
.dsgvo-ergebnis { padding: .6rem .9rem; border-radius: 8px; margin: .4rem 0 .8rem; }
.dsgvo-ergebnis.ok { background: rgba(30,123,69,.12); } .dsgvo-ergebnis.warnung { background: #FFF6DA; } .dsgvo-ergebnis.fehler { background: rgba(180,35,24,.12); }
.dsgvo-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; align-items: start; }
dialog.dialog { box-sizing: border-box; overflow-x: hidden; }
dialog.dialog form { grid-template-columns: minmax(0, 1fr); }
dialog.dialog form > * { min-width: 0; max-width: 100%; }
dialog.dialog p, dialog.dialog dd, dialog.dialog label { white-space: normal; overflow-wrap: anywhere; }
dialog.dialog input[type=checkbox] { width: auto; flex: none; }
dialog.dialog label > input:not([type=checkbox]) { width: 100%; }
dialog.dialog .werte-liste dd { overflow-wrap: anywhere; }
dialog.dialog label.haken > span { display: inline; }

/* Verlauf einer Zahlung (admin/zahlung_verlauf.php) */
button.zv-nr { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; min-height: 0; box-shadow: none; }
button.zv-nr:hover { text-decoration-style: solid; }
dialog.zv-dialog { width: min(44rem, 94vw); max-height: 88vh; overflow-y: auto; }
dialog.zv-dialog h2 { margin: 0 0 .3rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
dialog.zv-dialog h3 { margin: 1.2rem 0 .2rem; }
.zv-liste { list-style: none; margin: .8rem 0 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--linie); }
.zv-liste li { position: relative; padding: .1rem 0 .75rem .2rem; display: grid; gap: .1rem; }
.zv-liste li::before { content: ''; position: absolute; left: -1.53rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--flaeche); border: 2px solid var(--grau); }
.zv-liste li.zv-ok::before { border-color: #2e8b57; background: #2e8b57; }
.zv-liste li.zv-warn::before { border-color: #d9a400; background: #d9a400; }
.zv-liste li.zv-fehler::before { border-color: var(--gefahr); background: var(--gefahr); }
.zv-liste li.zv-mail::before { border-color: #3b7dd8; }
.zv-liste li.zv-admin::before { border-color: var(--tinte); }
.zv-liste time { font-size: .82rem; color: var(--grau); }
.zv-liste span { font-size: .9rem; color: var(--grau); overflow-wrap: anywhere; }
.zv-hinweis { margin-top: 1rem; color: var(--grau); }
dialog.zv-dialog .formular-fuss { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

/* Kunde → Ereignisprotokoll (lib/kunde_protokoll.php) */
.kp-tabelle td.kp-detail { white-space: normal; max-width: 36rem; color: var(--grau); }
.kp-tabelle tr.kp-ok td:nth-child(1) { border-left: 3px solid var(--ok); }
.kp-tabelle tr.kp-warn td:nth-child(1) { border-left: 3px solid #C98A00; }
.kp-tabelle tr.kp-fehler td:nth-child(1) { border-left: 3px solid var(--gefahr); }
.kp-tabelle tr.kp-neutral td:nth-child(1) { border-left: 3px solid var(--linie); }
.marke-status.kp-konto { background: rgba(95,102,109,.12); color: var(--grau); }
.marke-status.kp-vertrag { background: rgba(60,100,180,.12); color: #2b4f8f; }
.marke-status.kp-kuendigung { background: rgba(180,35,24,.1); color: var(--gefahr); }
.marke-status.kp-zahlung { background: rgba(30,123,69,.12); color: var(--ok); }
.marke-status.kp-mail { background: #FCF0C7; color: #7A5A00; }
.marke-status.kp-ausweis { background: rgba(120,80,170,.12); color: #5a3d85; }
.kp-filter { flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
tr.wb-fehler td { background: #FDECEA; }

/* ---------- Komponenten: „Aus dem Plan übernehmen“ (lib/geraete.php, assets/js/plan-uebernahme.js) ---------- */
.plan-uebernahme { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1rem 0; padding: .8rem .9rem; border: 1px solid var(--linie); border-left: 4px solid var(--haus); border-radius: 8px; background: var(--feld); }
.plan-uebernahme button { display: inline-flex; align-items: center; gap: .45rem; }
.plan-uebernahme .klein { flex: 1 1 16rem; }
.pu-dialog { width: min(46rem, calc(100vw - 1.5rem)); max-height: min(46rem, calc(100vh - 1.5rem)); padding: 0; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--tinte); box-shadow: 0 18px 60px rgba(20, 24, 28, .28); }
.pu-dialog::backdrop { background: rgba(20, 24, 28, .45); }
.pu-form { display: flex; flex-direction: column; max-height: inherit; margin: 0; }
.pu-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem .6rem; }
.pu-kopf h3 { margin: 0; font-size: 1.35rem; }
.pu-zu { width: 2.2rem; height: 2.2rem; padding: 0; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--tinte); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pu-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .35rem 1.1rem; }
.pu-leiste .check { margin: 0; }
.pu-umschalter { display: inline-flex; padding: 3px; border: 1px solid var(--linie); border-radius: 9px; background: var(--feld); }
.pu-umschalter button { padding: .3rem .75rem; border: 0; border-radius: 6px; background: none; color: var(--tinte); font: inherit; font-size: .95rem; cursor: pointer; }
.pu-umschalter button[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.pu-klein { font-size: .92rem; color: var(--grau); }
.pu-baum { flex: 1 1 auto; min-height: 8rem; overflow: auto; margin: .3rem 1.1rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--feld); }
.pu-gruppe { border-bottom: 1px solid var(--linie); }
.pu-gruppe:last-child { border-bottom: 0; }
.pu-gruppe > summary { display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem; font-weight: 600; cursor: pointer; background: var(--flaeche); position: sticky; top: 0; z-index: 1; }
.pu-gruppe > summary .anzahl-marke { margin-left: auto; }
.pu-unter-kopf { display: flex; align-items: center; gap: .55rem; padding: .35rem .7rem .2rem 1.6rem; font-size: .92rem; font-weight: 600; color: var(--grau); }
.pu-zeile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .4rem .7rem .4rem 1.6rem; border-top: 1px dashed var(--linie); cursor: pointer; }
.pu-unter .pu-zeile { padding-left: 2.6rem; }
.pu-zeile:hover { background: var(--flaeche); }
.pu-name { display: grid; min-width: 0; }
.pu-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-name small { color: var(--grau); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-bmk { font: 600 .82rem var(--schrift-schmal); color: var(--grau); }
.pu-plan { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; }
.pu-plan i { font-style: normal; font-size: .76rem; padding: .05rem .4rem; border-radius: 999px; background: #EEF0F2; color: #2B3036; white-space: nowrap; }
.pu-baum input[type="checkbox"], .pu-leiste input[type="checkbox"] { width: 1.15rem; height: 1.15rem; flex: none; }
.pu-hinweis { margin: .2rem 1.1rem 0; }
.pu-fuss { display: flex; justify-content: flex-end; gap: .6rem; padding: .8rem 1.1rem 1rem; }
@media (max-width: 560px) { .pu-plan { display: none; } .pu-zeile { grid-template-columns: auto minmax(0, 1fr); } }

/* Planübersicht: Prüfprotokolle, Listen, Export & Unterlagen */
.dg-unterlagen { gap: .45rem; }
.dg-unterlagen .dg-staende-titel:not(:first-child) { margin-top: .35rem; }
.dg-export { margin-top: 1.2rem; }
.dg-export h2 { margin: 0; }
.dg-export-gruppe { padding: .9rem 0 0; }
.dg-export-gruppe + .dg-export-gruppe { margin-top: .9rem; border-top: 1px solid var(--linie, #E2E5E8); }
.dg-export-gruppe h3 { margin: 0 0 .35rem; font-size: 1rem; }
.dg-export-mappe { display: grid; gap: .5rem; justify-items: start; margin-top: .6rem; }
.dg-export-knoepfe { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 .6rem; }
.dg-export-form { margin: 0; }

/* „Wird gerade bearbeitet“ (lib/bearbeitung.php) */
.bearbeitung-hinweis { border-left: 4px solid #D9822B; background: #FFF4E5; color: #5A3A10; }
.bearbeitung-hinweis[hidden], .bearbeitung-marke[hidden] { display: none; }
.bearbeitung-marke { white-space: nowrap; }
.bearbeitung-karte[hidden], .bearbeitung-karte li[hidden] { display: none; }

/* Mitarbeiter mit Einzelrechten auf der Bearbeiten-Seite (bearbeiten.php, lib/monteure.php): fehlende Rechte – Knöpfe ausblenden (der Server prüft ohnehin) */
.ohne-loeschen button[value$="loeschen"], .ohne-loeschen .mehr-eintrag.gefahr { display: none; }
.ohne-wartungsplaene button[value="wart_anlegen"], .ohne-wartungsplaene button[value="wart_speichern"] { display: none; }
.ohne-wartung button[value="hist_anlegen"] { display: none; }
/* ganze „+ Neuer Eintrag“/„+ Neuer Wartungsplan“-Klappen und den Schalter „Pläne öffentlich zeigen“ ohne passendes Recht ausblenden */
.ohne-wartung details:has(> form.hist-form button[value="hist_anlegen"]), .ohne-wartungsplaene details:has(> form.plan-form button[value="wart_anlegen"]),
.ohne-angaben form.diagramm-sicht { display: none; }
/* ohne Recht „Angaben …“: Anlegen und Hochladen ausblenden (der Server lehnt es ohnehin ab) */
.ohne-angaben form.komp-neu, .ohne-angaben form.upload, .ohne-angaben form:has(input[name="aktion"][value="raum_anlegen"]),
.ohne-angaben details:has(input[name="aktion"][value="ordner_anlegen"]), .ohne-angaben button[value="komp_anlegen"], .ohne-angaben button[value="notfall_anlegen"] { display: none; }
.rechte-liste { grid-column: 1 / -1; border: 0; padding: 0; margin: .25rem 0; display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.rechte-liste legend { font-weight: 600; margin-bottom: .2rem; padding: 0; }

/* Benachrichtigungen im Dashboard des Fachbetriebs (lib/benachrichtigungen.php) */
.bn-kopf { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bn-kopf h2 { margin-bottom: .4rem; }
.bn-liste { list-style: none; margin: 0 0 .6rem; padding: 0; }
.bn-eintrag { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--linie); }
.bn-eintrag:first-child { border-top: 0; }
.bn-symbol { flex: 0 0 1.6rem; text-align: center; font-size: 1.1rem; line-height: 1.5; }
.bn-inhalt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.bn-inhalt form { margin: 0; }
.bn-titel { all: unset; cursor: pointer; font-weight: 600; color: var(--tinte); overflow-wrap: anywhere; }
.bn-titel:hover, .bn-titel:focus-visible { text-decoration: underline; }
.bn-titel:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.bn-eintrag:not(.ungelesen) .bn-titel { font-weight: 400; color: var(--grau); }
.bn-eintrag.ungelesen.bn-stoerung .bn-symbol { color: var(--gefahr); }
.bn-zeit { color: var(--grau); }
.bn-weg { margin: 0; flex: 0 0 auto; }
.bn-einstellungen { display: flex; flex-direction: column; gap: .2rem; margin-top: .4rem; }
.bn-einstellungen button { align-self: flex-start; margin-top: .4rem; }
.rechte-liste .rollen-wahl { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; width: 100%; }
.rechte-liste .rechte-haken { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; width: 100%; margin-top: .3rem; padding-top: .3rem; border-top: 1px dashed var(--linie); }
.rechte-liste .rechte-haken > p { width: 100%; margin: 0; }
.rechte-liste:has(input[name=rolle][value=buero]:checked) .rechte-haken { display: none; }
.zf-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin: .6rem 0; padding: .5rem 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.dg-netzform-wahl > summary { cursor: pointer; font-weight: 600; margin: .9rem 0 .5rem; }
.dg-netzform-wahl > summary .klein { font-weight: 400; }
/* Admin: Formular in einer Reihe (Anbieterwechsel erfassen) */
.formular-reihe { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.formular-reihe > label { display: grid; gap: 4px; font-size: 14px; min-width: 150px; }
.formular-reihe > label.check { display: flex; align-items: center; gap: 6px; }
/* Betriebsregister (lib/register.php) */
.register-suche { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.register-suche label { flex: 1 1 240px; margin: 0; }
.register-suche button { margin: 0; }
.register-suche input { width: 100%; }
.register-liste { list-style: none; margin: 8px 0; padding: 0; }
.register-liste li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linie, #e4e7ec); }
.register-liste li > div:first-child { display: grid; gap: 2px; }
.register-wahl textarea { width: 100%; }
@media (max-width: 560px) { .register-liste li { flex-direction: column; align-items: flex-start; } }
.register-liste .register-themen { color: var(--text-leise, #475467); }
.register-suche select { width: 100%; }
.register-themen-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2px 16px; margin: 10px 0; }
.register-themen-wahl legend { grid-column: 1 / -1; }
.register-tipp { margin-top: 12px; }
.register-tipp p:last-child { margin-bottom: 0; }
/* Admin: Notizbuch (admin/notizen.php) */
.an-notiz-neu-zeile { display: flex; gap: 8px; }
.an-notiz-neu-zeile input { flex: 1; font-size: 16px; }
.an-notiz-neu details { margin-top: 8px; }
.an-notiz-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.an-notiz { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 12px 6px; border-bottom: 1px solid #e4e7ec; }
.an-notiz.wichtig { border-left: 3px solid #f5b800; padding-left: 8px; }
.an-notiz.erledigt .an-notiz-titel strong { text-decoration: line-through; color: #667085; }
.an-notiz-titel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.an-notiz-text { margin: 4px 0; color: #344054; }
.an-notiz-kreis { width: 24px; height: 24px; min-height: 0; border-radius: 50%; border: 2px solid #98a2b3; background: #fff; padding: 0; line-height: 20px; font-size: 13px; color: #12b76a; cursor: pointer; }
.an-notiz-kreis:hover { border-color: #12b76a; background: #ecfdf3; }
.an-notiz-aktionen form { display: flex; gap: 10px; }
.an-notiz-bearbeiten { margin-top: 4px; }
@media (max-width: 640px) { .an-notiz { grid-template-columns: 30px 1fr; } .an-notiz-aktionen { grid-column: 2; } }

/* rote Zahl an Reitern (wie Glocke/Menü) */
.tab-zahl { display: inline-block; min-width: 1.3rem; padding: .05rem .38rem; margin-left: .25rem; border-radius: 999px; background: #D64535; color: #fff; font: 700 .72rem/1.3 var(--schrift, inherit); text-align: center; vertical-align: .1em; }
.register-nachricht .vorformatiert { white-space: normal; margin: .4rem 0; }
