/* Hausblick by TBBN. Farben als Variablen, hell und dunkel über prefers-color-scheme. */

:root {
  --grund: #f4f6f4;
  --flaeche: #ffffff;
  --flaeche-2: #eef1ef;
  --linie: #e1e6e3;
  --linie-stark: #c8d0cc;
  --text: #17211f;
  --text-2: #56635f;
  --text-3: #7f8b87;
  --akzent: #17425a;
  --marke: #17425a;
  --akzent-stark: #0f3145;
  --akzent-sanft: #e1ecf3;
  --akzent-ring: rgba(23, 66, 90, 0.18);
  --auf-akzent: #ffffff;
  --ampel-gruen: #2e9d5f; --ampel-gelb: #e3a80b; --ampel-rot: #d43c30;
  --gut: #1f7a4d;
  --gut-sanft: #e2f3ea;
  --achtung: #8f5d00;
  --achtung-sanft: #fbf0d9;
  --gefahr: #b3372f;
  --gefahr-sanft: #fbe6e3;
  --schatten: 0 1px 2px rgba(16, 32, 30, 0.05), 0 8px 24px rgba(16, 32, 30, 0.06);
  --schatten-hoch: 0 2px 6px rgba(16, 32, 30, 0.08), 0 24px 60px rgba(16, 32, 30, 0.18);
  --radius: 14px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8b87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0f1514;
    --flaeche: #171f1e;
    --flaeche-2: #1f2a28;
    --linie: #293634;
    --linie-stark: #3b4b48;
    --text: #e8eeec;
    --text-2: #a5b3af;
    --text-3: #7d8b87;
    --akzent: #7fb8d8;
    --marke: #b9d6e6;
    --akzent-stark: #a7d0e6;
    --akzent-sanft: #182b36;
    --akzent-ring: rgba(127, 184, 216, 0.28);
    --auf-akzent: #06202d;
    --gut: #5ecb92;
    --gut-sanft: #153126;
    --achtung: #e6b450;
    --achtung-sanft: #33290f;
    --gefahr: #f08b80;
    --gefahr-sanft: #3a1c19;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --schatten-hoch: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

/* ---------------------------------------------------------------- Grundlagen */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 0.9375rem/1.5 var(--schrift);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.25; }
h2 { font-size: 1.05rem; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--akzent); text-underline-offset: 3px; }
small { font-size: 0.82rem; }
dl, dd { margin: 0; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
#haupt:focus, #haupt:focus-visible { outline: none; }

.sym { flex: none; width: 20px; height: 20px; }
.unsichtbar {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.leise { color: var(--text-2); }
.klein { font-size: 0.85rem; }
.mono { font-family: var(--mono); }
.rechts { text-align: right; }
.mitte { text-align: center; }
.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stark { font-weight: 700; font-size: 1.1rem; }
.umbruch { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.mit-sym { display: inline-flex; align-items: center; gap: 6px; }
.mit-sym .sym { width: 16px; height: 16px; color: var(--text-3); }
.nur-druck { display: none; }

.ton-neutral { --ton: var(--text-2); --ton-sanft: var(--flaeche-2); }
.ton-akzent { --ton: var(--akzent); --ton-sanft: var(--akzent-sanft); }
.ton-gut { --ton: var(--gut); --ton-sanft: var(--gut-sanft); }
.ton-achtung { --ton: var(--achtung); --ton-sanft: var(--achtung-sanft); }
.ton-gefahr { --ton: var(--gefahr); --ton-sanft: var(--gefahr-sanft); }

kbd {
  font: 600 0.72rem var(--schrift);
  padding: 2px 6px;
  border: 1px solid var(--linie-stark);
  border-radius: 6px;
  color: var(--text-3);
  background: var(--flaeche-2);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Knöpfe und Felder */

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.knopf:active { transform: translateY(1px); }
.knopf.haupt { background: var(--akzent); color: var(--auf-akzent); }
.knopf.haupt:hover { background: var(--akzent-stark); }
.knopf.zweit { background: var(--flaeche); border-color: var(--linie-stark); }
.knopf.zweit:hover { border-color: var(--akzent); color: var(--akzent); }
.knopf.still { color: var(--text-2); }
.knopf.still:hover { background: var(--flaeche-2); color: var(--text); }
.knopf.gefahr { background: var(--gefahr-sanft); border-color: var(--gefahr); color: var(--gefahr); }
.knopf.klein { min-height: 32px; padding: 0 10px; font-size: 0.85rem; border-radius: 8px; gap: 6px; }
.knopf.klein .sym { width: 16px; height: 16px; }
.knopf.gross { min-height: 50px; font-size: 1rem; border-radius: 12px; }
.knopf.breit { width: 100%; }
.knopf.rund { width: 40px; padding: 0; border-radius: 50%; }
.knopf:disabled, .knopf.aus { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

:where(input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea) {
  width: 100%; min-height: 42px; padding: 0 12px;
  border: 1px solid var(--linie-stark); border-radius: 10px;
  background-color: var(--flaeche); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
:where(select) {
  padding-right: 34px;
  background-image: var(--pfeil); background-repeat: no-repeat;
  background-position: right 10px center; background-size: 18px;
  text-overflow: ellipsis;
}
:where(input, select, textarea):focus-visible {
  outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-ring);
}
input::placeholder { color: var(--text-3); opacity: 1; }
input[readonly] { background-color: var(--flaeche-2); color: var(--text-2); }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); flex: none; }

.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > span, .feld > label, fieldset legend { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; }
.feldfehler { margin: 0; color: var(--gefahr); font-size: 0.88rem; font-weight: 600; }
.feldgruppe { border: 1px solid var(--linie); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feldgruppe legend { padding: 0 6px; }
.auswahlliste { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: 190px; overflow: auto; }
.auswahlliste .schalter { min-height: 34px; }

.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 16px; }
.filter .feld { flex: 1 1 160px; }
.filter .feld.weit { flex: 2 1 240px; }
.filter .feld.schmal { flex: 0 1 152px; }
.filter .schalter { white-space: nowrap; }
.filter .knopf { min-height: 42px; }

.chipzeile { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; }
.chipzeile > * { margin-bottom: 14px; }
.still-link { font-size: 0.85rem; color: var(--text-2); }

/* ---------------------------------------------------------------- Gestell */

.sprung {
  position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 14px;
  background: var(--akzent); color: var(--auf-akzent); border-radius: 10px; font-weight: 600;
  transform: translateY(-200%);
}
.sprung:focus { transform: none; }

.gestell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.mobilkopf { display: none; }

.leiste {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px 16px;
  background: var(--flaeche); border-right: 1px solid var(--linie);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 1.05rem; line-height: 1.15; letter-spacing: -0.01em;
}
.logo small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.logo-bild { flex: none; }
.leiste .logo { padding: 0 6px; }
/* Zeichen der Hausverwaltung (aus den Einstellungen der Installation, --hv-zeichen) rechts neben der Produktmarke, durch eine feine Linie getrennt. Als Maske, damit es der Textfarbe folgt. */
.leiste-kopf { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.leiste-kopf .logo { padding: 0; }
.mandant { flex: none; display: flex; align-items: center; margin-left: auto; padding: 5px 0 5px 12px; border-left: 1px solid var(--linie); }
.mandant::before {
  content: ""; width: 46px; height: 24px; background: var(--text-2);
  -webkit-mask: var(--hv-zeichen) center / contain no-repeat; mask: var(--hv-zeichen) center / contain no-repeat;
}

.leiste-suche {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--linie); border-radius: 10px;
  background: var(--grund); color: var(--text-3); text-align: left;
  transition: border-color 0.15s, color 0.15s;
}
.leiste-suche:hover { border-color: var(--akzent); color: var(--text); }
.leiste-suche span { flex: 1; }
.leiste-suche .sym { width: 18px; height: 18px; }

.leiste-punkte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow: auto; }
.leiste-punkte a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.leiste-punkte a:hover { background: var(--flaeche-2); color: var(--text); }
.leiste-punkte a.aktiv { background: var(--akzent-sanft); color: var(--akzent-stark); }

.nav-rollen { display: block; font-size: 0.68rem; font-weight: 400; line-height: 1.2; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste-punkte a.nav-aus { opacity: 0.7; }
.nav-stern { color: var(--gut); font-weight: 700; }
.leiste-punkte a.nav-aus .nav-rollen { color: var(--achtung, var(--text-3)); }
.leiste-punkte a span { min-width: 0; }
.freigabe { position: fixed; right: 12px; bottom: 12px; z-index: 40; max-width: min(360px, calc(100vw - 24px)); padding: 6px 10px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche, var(--grund)); color: var(--text-2); font-size: 0.75rem; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); pointer-events: none; }
.freigabe.aus { border-color: var(--achtung, var(--linie)); }

.leiste-fuss { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--linie); }
.leiste-wer { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.leiste-wer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste-wer small { color: var(--text-3); }
.leiste-fuss .knopf { margin-left: -10px; }

#haupt { min-width: 0; padding: 36px 40px 64px; }
.ansicht { max-width: 1180px; margin: 0 auto; animation: rein 0.2s ease-out; }
.mieter-haupt { padding: 0 !important; }

@keyframes rein { from { opacity: 0; transform: translateY(4px); } }
@keyframes schimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes puls { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1); } }

/* Start und Anmeldung */
.start { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); }
.start-punkt, .lesen-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--akzent); animation: puls 1.2s ease-in-out infinite; }
.ohne-js { padding: 24px; text-align: center; }

.tor { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 16px; }
.tor-karte {
  width: 100%; max-width: 400px; padding: 32px 28px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 22px; box-shadow: var(--schatten);
  animation: rein 0.25s ease-out;
}
.tor-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--marke);
  font-weight: 800; font-size: 1.3rem; letter-spacing: 0.06em; line-height: 1.15; margin-bottom: 26px; }
.tor-logo small { display: block; margin-top: 3px; font-size: 0.74rem; font-weight: 400; letter-spacing: 0.32em; color: var(--marke); }
.tor-karte h1 { margin: 0 0 8px; font-size: 1.6rem; }
.tor-karte form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.tor-hinweis { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--achtung-sanft); font-size: 0.9rem; }
.tor-hinweis strong { font-size: 1.05rem; letter-spacing: 0.08em; }
.tor-schritt { margin: 0 0 6px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tor-schritte { margin: 16px 0 4px; padding-left: 1.3em; display: grid; gap: 6px; font-size: 0.92rem; }
.tor-karte .qr { display: block; width: 188px; height: 188px; margin: 14px auto 6px; border-radius: 12px; box-shadow: 0 0 0 1px var(--linie); }
.tor-details { margin-top: 6px; font-size: 0.9rem; }
.tor-details summary { cursor: pointer; text-align: center; padding: 6px; }
.tor-details .schluessel { margin: 6px 0 10px; padding: 10px; border-radius: 10px; background: var(--flaeche-2); text-align: center; font-size: 0.95rem; letter-spacing: 0.04em; user-select: all; word-break: break-word; }
.tor-hilfe { margin-top: 14px; text-align: center; }
.tor-merken { margin-bottom: -6px; }
.tor-merken-hinweis { margin: 0 0 4px; }
.geraete { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.geraete li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.geraete li:last-child { border-bottom: 1px solid var(--linie); }
.geraete li > div { min-width: 0; }
.geraete small { display: block; margin-top: 2px; color: var(--text-3); }
.tor-fuss { margin: 0; color: var(--text-3); font-size: 0.82rem; }
.tor-mandant { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hv-logo, .hv-zeichen { display: block; flex: none; background: var(--text); }
.hv-logo { width: 131px; height: 52px; -webkit-mask: var(--hv-logo) center / contain no-repeat; mask: var(--hv-logo) center / contain no-repeat; }
.hv-zeichen { width: 55px; height: 28px; -webkit-mask: var(--hv-zeichen) center / contain no-repeat; mask: var(--hv-zeichen) center / contain no-repeat; }
.tor-mandant .hv-logo { background: var(--text-2); }
.tor-name { margin: 0; font-weight: 600; color: var(--text-2); }
.code-eingabe { min-height: 58px; text-align: center; font: 700 1.7rem var(--mono); letter-spacing: 0.35em; padding-left: 0.35em; }

/* ---------------------------------------------------------------- Bausteine */

.kopf { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin: 0 0 22px; }
.kopf h1 { margin: 0; font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.2; }
.kopf p { margin: 6px 0 0; color: var(--text-2); max-width: 72ch; }
.kopf-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px -4px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
.zurueck:hover { color: var(--akzent); }
.zurueck .sym { width: 18px; height: 18px; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px; min-width: 0; }
.karte.ohne-rand { padding: 0; overflow: hidden; }
.karte-kopf, .abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; }
.karte-kopf a, .abschnitt-kopf a { font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.karte-kopf a:hover, .abschnitt-kopf a:hover { text-decoration: underline; }
.karte-kopf .leise, .abschnitt-kopf .leise { font-size: 0.85rem; }
.abschnitt { margin: 32px 0 0; }
.abschnitt-kopf { margin-bottom: 12px; }
.abschnitt-kopf h2 { font-size: 1.12rem; }
.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 20px; }

.skelett { display: grid; gap: 10px; }
.skelett div {
  height: 52px; border-radius: 12px;
  background: linear-gradient(90deg, var(--flaeche-2) 25%, var(--linie) 37%, var(--flaeche-2) 63%);
  background-size: 400% 100%; animation: schimmer 1.4s ease infinite;
}
.laedt { opacity: 0.55; transition: opacity 0.15s; }

.leer { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; text-align: center; color: var(--text-2); }
.leer .sym { width: 32px; height: 32px; color: var(--text-3); margin-bottom: 4px; }
.leer strong { color: var(--text); }
.leer p { margin: 0; max-width: 46ch; }

.hinweis { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 16px; border-radius: 12px; background: var(--ton-sanft); }
.hinweis > .sym { color: var(--ton); margin-top: 1px; }
.hinweis p { margin: 2px 0 0; }
.hinweis p:first-child { margin-top: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--ton-sanft); color: var(--ton);
  font-size: 0.76rem; font-weight: 700; line-height: 1.6; white-space: nowrap; text-decoration: none;
}
.chip.entfernbar { padding: 4px 8px 4px 12px; font-size: 0.85rem; max-width: 100%; white-space: normal; }
.chip.entfernbar .sym { width: 14px; height: 14px; }
.chip.entfernbar:hover { color: var(--text); }

.etikett { display: inline-block; padding: 2px 8px; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche-2); font: 700 0.85rem var(--mono); white-space: nowrap; }
.etikett.gross { padding: 6px 14px; border-radius: 10px; font-size: 1.3rem; background: var(--flaeche); border-color: var(--linie-stark); }
.kuerzel { display: inline-block; padding: 3px 8px; border-radius: 7px; background: var(--akzent-sanft); color: var(--akzent-stark); font: 700 0.8rem var(--mono); white-space: nowrap; }
.kuerzel.gross { font-size: 1rem; margin-right: 12px; vertical-align: middle; }

.ergebniszeile { margin: 0 0 10px; color: var(--text-2); font-size: 0.9rem; }
.blaettern { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 18px 0 0; color: var(--text-2); font-size: 0.9rem; }

.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--grund); font-weight: 600; box-shadow: var(--schatten-hoch); animation: rein 0.2s ease-out; }
.toast.ton-gut { background: var(--gut); }
.toast.ton-gefahr { background: var(--gefahr); }
.toast.weg { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }

/* Fenster */
dialog { border: 0; padding: 0; max-width: calc(100vw - 24px); color: var(--text); background: var(--flaeche); border-radius: 18px; box-shadow: var(--schatten-hoch); }
dialog::backdrop { background: rgba(8, 18, 17, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fenster { width: 540px; }
.fenster-inhalt { display: flex; flex-direction: column; gap: 14px; padding: 24px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; }
.fenster-inhalt h2 { font-size: 1.25rem; }
.fenster-aktionen { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.bildfenster { width: auto; padding: 12px; }
.bildfenster[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bildfenster img { display: block; max-width: min(90vw, 900px); max-height: 78vh; border-radius: 10px; }

/* ---------------------------------------------------------------- Suche und Vorschläge */

.kombi-halter, .grosssuche { position: relative; }
.kombi-liste {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  max-height: min(60vh, 460px); overflow: auto; overscroll-behavior: contain; padding: 6px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; box-shadow: var(--schatten-hoch);
}
.kombi-gruppe { padding: 10px 10px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.kombi-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.kombi-zeile.aktiv { background: var(--akzent-sanft); }
.kombi-leer { padding: 18px 12px; color: var(--text-2); text-align: center; }
.kombi-liste:empty { padding: 0; }
.kz-sym { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--flaeche-2); color: var(--text-2); flex: none; }
.kz-sym .sym { width: 18px; height: 18px; }
.kombi-zeile.aktiv .kz-sym { background: var(--flaeche); color: var(--akzent); }
.kz-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.kz-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-unter { font-size: 0.82rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-rechts { font-size: 0.85rem; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
mark { background: transparent; color: var(--akzent); font-weight: 700; }

.grosssuche {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; margin: 0 0 28px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; box-shadow: var(--schatten);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.grosssuche:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-ring), var(--schatten); }
.grosssuche > .sym, .palette-kopf > .sym { width: 22px; height: 22px; color: var(--text-3); }
.grosssuche input, .palette-kopf input {
  flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 1.1rem;
}
.grosssuche input:focus-visible, .palette-kopf input:focus-visible { box-shadow: none; }

.palette { width: 640px; margin: 12vh auto auto; overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; max-height: 74vh; }
.palette-kopf { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--linie); flex: none; }
.palette .kombi-liste { position: static; flex: 1; min-height: 72px; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
.palette-fuss { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--linie); font-size: 0.8rem; color: var(--text-3); flex: none; }
.palette-fuss kbd { margin-right: 4px; }

/* ---------------------------------------------------------------- Cockpit */

.gruss { margin: 4px 0 22px; }
.gruss-datum { margin: 0 0 4px; color: var(--text-3); font-size: 0.9rem; }
.gruss h1 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.15; }

.kachelrahmen { container: rahmen / inline-size; margin: 0 0 20px; }
/* So viele Spalten, wie mit lesbarem Titel passen: Mit jedem Bereich kommen Kacheln dazu, eine feste Spaltenzahl
   quetschte sie, bis vom Namen nur noch der Anfang stand. */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin: 0; }
@container (max-width: 520px) { .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.kachel {
  position: relative; container-type: inline-size;
  display: flex; flex-direction: column; gap: 4px; padding: 16px; min-width: 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
a.kachel:hover { border-color: var(--akzent); box-shadow: var(--schatten); transform: translateY(-1px); }
.kachel:hover, .kachel:focus-visible { z-index: 6; }
.kachel-titel, .kachel-wert, .kachel-hinweis { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel-titel { font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
/* Ampel: grün, gelb, rot in Signalfarben. Neutral (reine Menge ohne Wertung) bleibt grau. */
/* Der Name geht vor: Er darf zwei Zeilen haben. Die Ampel ist der Rahmen der Kachel und nimmt ihm keinen Platz.
   Reine Mengen ohne Wertung (neutral) behalten den grauen Rand. */
.kachel-titel { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal;
  line-height: 1.3; overflow-wrap: anywhere; }
a.kachel.ton-gut { --ampel: var(--ampel-gruen); }
a.kachel.ton-achtung { --ampel: var(--ampel-gelb); }
a.kachel.ton-gefahr { --ampel: var(--ampel-rot); }
a.kachel.ton-gut, a.kachel.ton-achtung, a.kachel.ton-gefahr { border-color: var(--ampel); box-shadow: inset 0 0 0 1px var(--ampel); }
a.kachel.ton-gut:hover, a.kachel.ton-achtung:hover, a.kachel.ton-gefahr:hover { box-shadow: inset 0 0 0 1px var(--ampel), var(--schatten); }
.kachel-wert { margin-top: auto; font-size: clamp(1rem, 13cqi, 1.7rem); line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kachel-hinweis { font-size: 0.82rem; color: var(--text-3); }
.kachel.ruhig { background: transparent; }
/* Die Erklärung nimmt erst Platz ein, wenn sie gezeigt wird. Unsichtbar mitgeführt, ragte sie rechts aus der Seite und
   ließ sie quer scrollen. */
.kachel-tipp {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 7;
  width: max-content; max-width: min(340px, 86vw); padding: 12px 14px; border-radius: 12px;
  background: var(--text); color: var(--grund); box-shadow: var(--schatten-hoch);
  font-size: 0.85rem; font-weight: 400; line-height: 1.45; letter-spacing: 0; white-space: normal; text-align: left;
  pointer-events: none;
}
.kachel-tipp.rechts { left: auto; right: 0; }
@keyframes tipp-ein { from { opacity: 0; transform: translateY(-4px); } }
@media (hover: hover) {
  .kachel:hover .kachel-tipp, .kachel:focus-visible .kachel-tipp { display: block; animation: tipp-ein 0.15s 0.25s backwards; }
}
@media (hover: none) { .kachel-tipp { display: none; } }
/* Am Handy gibt es kein Mouseover: der Hinweis darf dort zwei Zeilen haben, jede Kachel hält dafür denselben Platz frei. */
@container rahmen (max-width: 520px) {
  .kachel-hinweis { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal;
    line-height: 1.3; min-height: 2.6em; }
}

/* Belegeingang: gestapelte Säulen. Die Farbe gehört zur Belegart und bleibt in fester Reihenfolge. */
:root { --art-1: #2a78d6; --art-2: #eb6834; --art-3: #1baf7a; --art-4: #eda100; --art-5: #e87ba4; --art-6: #008300; --art-7: #6250d6; --art-8: #8a9692; }
@media (prefers-color-scheme: dark) {
  :root { --art-1: #3987e5; --art-2: #d95926; --art-3: #199e70; --art-4: #c98500; --art-5: #d55181; --art-6: #008300; --art-7: #9085e9; --art-8: #73807c; }
}
.art-1 { --art: var(--art-1); } .art-2 { --art: var(--art-2); } .art-3 { --art: var(--art-3); } .art-4 { --art: var(--art-4); }
.art-5 { --art: var(--art-5); } .art-6 { --art: var(--art-6); } .art-7 { --art: var(--art-7); } .art-8 { --art: var(--art-8); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--art); flex: none; }
.seg.art-9, .punkt.art-9 { background: repeating-linear-gradient(135deg, var(--text-3) 0 1.5px, transparent 1.5px 4.5px); box-shadow: inset 0 0 0 1px var(--text-3); }

.balken { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 156px; padding-top: 4px; }
.balken-spalte { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; border-radius: 6px; outline: none; }
.balken-spalte:hover, .balken-spalte:focus-visible { z-index: 5; }
.balken-spalte:focus-visible { box-shadow: 0 0 0 2px var(--akzent-ring); }
.balken-zahl { font-size: 0.7rem; line-height: 1; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 0.7rem; }
.balken-stab { display: flex; flex-direction: column-reverse; gap: 2px; width: 100%; max-width: 26px; transition: opacity 0.15s; }
.balken-stab.null { background: var(--linie-stark); border-radius: 2px; }
.balken:hover .balken-spalte:not(:hover) .balken-stab { opacity: 0.45; }
.seg { flex: 1 0 2px; min-height: 2px; border-radius: 1px; background: var(--art); }
.seg:last-child { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.balken-tag { font-size: 0.7rem; line-height: 1; color: var(--text-3); }
.balken-spalte.ruhe .balken-tag { opacity: 0.55; }
.balken-spalte.heute .balken-tag { color: var(--akzent); font-weight: 700; }
.balken-tipp {
  position: absolute; top: 0; left: calc(100% + 8px); z-index: 8;
  display: flex; flex-direction: column; gap: 4px; width: max-content; min-width: 168px; max-width: 240px; padding: 10px 12px;
  background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 10px; box-shadow: var(--schatten-hoch);
  font-size: 0.8rem; color: var(--text); text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.12s, visibility 0.12s;
}
.balken-spalte.spaet .balken-tipp { left: auto; right: calc(100% + 8px); }
.balken-spalte:hover .balken-tipp, .balken-spalte:focus-visible .balken-tipp { opacity: 1; visibility: visible; }
.tipp-zeile { display: flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; }
.tipp-zeile b { margin-left: auto; padding-left: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.tipp-zeile.summe { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--linie); font-weight: 600; color: var(--text); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--text-2); }
.legende li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legende b { color: var(--text); font-variant-numeric: tabular-nums; }
.zwischentitel { margin: 18px 0 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.rangliste { list-style: none; margin: 0; padding: 0; }
.rangliste a { display: flex; justify-content: space-between; gap: 12px; margin: 0 -10px; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 0.92rem; }
.rangliste a:hover { background: var(--flaeche-2); }
.rangliste span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rangliste b { font-variant-numeric: tabular-nums; }

.zahlenreihe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.zahlenreihe dt { font-size: 0.74rem; color: var(--text-3); }
.zahlenreihe dd { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.zahlenreihe .ton-achtung dd { color: var(--achtung); }
.zahlenreihe.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--linie); }
.zahlenreihe dd small { font-size: 0.74rem; font-weight: 400; color: var(--text-3); white-space: nowrap; }

.vorgaenge, .aufgaben, .mliste, .dliste, .fahrplan-leiste { list-style: none; margin: 0; padding: 0; }
.vorgaenge li { padding: 10px 0; border-top: 1px solid var(--linie); }
.vorgaenge li:last-child { padding-bottom: 0; }
.vorgang-haupt, .vorgang-neben { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vorgang-haupt strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vorgang-neben { margin-top: 2px; font-size: 0.82rem; color: var(--text-2); }
.vorgang-grund { margin: 4px 0 0; font-size: 0.82rem; color: var(--achtung); }

.aufgaben li + li { margin-top: 2px; }
.aufgaben a { display: flex; align-items: center; gap: 12px; margin: 0 -10px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; transition: background 0.12s; }
.aufgaben a:hover { background: var(--flaeche-2); }
.aufgaben a > .sym { color: var(--text-3); width: 18px; height: 18px; }
.aufgabe-zahl { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; background: var(--achtung-sanft); color: var(--achtung); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.aufgabe-zahl.ohne-zahl { background: var(--flaeche-2); color: var(--text-2); }
.aufgabe-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.aufgabe-text strong { font-weight: 600; }
.aufgabe-text small { color: var(--text-2); }

.fahrplan { margin: 36px 0 0; }
.fahrplan-leiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 16px; }
.fahrplan-leiste li { padding: 12px 2px 0; border-top: 2px solid var(--linie-stark); }
.fahrplan-leiste li.stand-laeuft { border-color: var(--akzent); }
.fahrplan-leiste li.stand-bereit { border-color: var(--gut); }
.fahrplan-leiste strong { display: block; margin: 8px 0 2px; font-size: 0.92rem; }
.fahrplan-leiste p { margin: 0; font-size: 0.82rem; color: var(--text-2); }
.fahrplan-leiste li.stand-geplant strong { color: var(--text-2); }
.fahrplan-leiste li.stand-klaeren { border-color: var(--achtung, var(--linie-stark)); border-top-style: dashed; }
.fahrplan-hinweis { margin: 18px 0 0; font-size: 0.82rem; color: var(--text-3); }
.datenstand { margin: 32px 0 0; font-size: 0.78rem; color: var(--text-3); }

/* ---------------------------------------------------------------- Beleglisten und Tabellen */

.bliste { display: flex; flex-direction: column; }
.bkopf { display: none; }
.bzeile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "abs betrag" "meta etikett";
  gap: 2px 14px; padding: 12px 16px; border-top: 1px solid var(--linie);
  color: inherit; text-decoration: none; transition: background 0.12s;
}
.bliste > .bzeile:first-child, .bkopf + .bzeile { border-top: 0; }
.bzeile:hover { background: var(--flaeche-2); }
.b-abs { grid-area: abs; display: flex; flex-direction: column; min-width: 0; }
.b-abs strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-abs small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 0 10px; min-width: 0; color: var(--text-2); font-size: 0.85rem; }
.b-betrag { grid-area: betrag; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-etikett { grid-area: etikett; text-align: right; }
.bliste.kompakt .b-abs small { display: none; }
.karte:not(.ohne-rand) > .bliste .bzeile { margin: 0 -10px; padding: 9px 10px; border-top: 0; border-radius: 10px; }

.tab-rahmen { overflow-x: auto; position: relative; }   /* relative: versteckte Spaltentitel (.unsichtbar) bleiben im Rahmen und verbreitern die Seite nicht */
.tab { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tab th { padding: 10px 16px; border-bottom: 1px solid var(--linie); text-align: left; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.tab td { padding: 11px 16px; border-top: 1px solid var(--linie); vertical-align: middle; }
.tab tbody tr:first-child td { border-top: 0; }
.tab th.rechts, .tab td.rechts { text-align: right; }
.tab small { color: var(--text-3); }
.tab a { font-weight: 600; text-decoration: none; }
.tab a:hover { text-decoration: underline; }
.tab tr.markiert td { background: var(--akzent-sanft); }
.tab tr.inaktiv td { opacity: 0.6; }
.tab tfoot td { padding: 11px 16px; border-top: 2px solid var(--linie-stark); background: var(--flaeche-2); font-weight: 700; white-space: nowrap; }
.tab small.zeile { display: block; font-weight: 400; }

/* Tabelle mit Suche, Filtern und sortierbaren Köpfen */
.tfilter { margin-bottom: 12px; }
.ergebniszeile.unter { margin: 10px 0 0; }
.sortknopf { all: unset; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border-radius: 4px; }
.sortknopf:hover { color: var(--text); }
.sortknopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }
th.rechts .sortknopf { flex-direction: row-reverse; }
.sortpfeil { width: 0; height: 0; border: 4px solid transparent; border-top: 5px solid currentColor; border-bottom: 0; opacity: 0; }
.sortknopf:hover .sortpfeil { opacity: 0.4; }
th[aria-sort="ascending"] .sortknopf, th[aria-sort="descending"] .sortknopf { color: var(--akzent); }
th[aria-sort="ascending"] .sortpfeil { opacity: 1; transform: rotate(180deg); }
th[aria-sort="descending"] .sortpfeil { opacity: 1; }
.stab.klickbar tbody tr { cursor: pointer; transition: background 0.12s; }
.stab.klickbar tbody tr:hover { background: var(--flaeche-2); }
.umschalter { display: inline-flex; padding: 3px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche-2); }
.umschalter button { all: unset; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--text-2); }
.umschalter button .sym { width: 16px; height: 16px; }
.umschalter button[aria-pressed="true"] { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 2px rgba(16, 32, 30, 0.12); }
.umschalter button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

/* Etiketten drucken */
.druckkarte { margin: 0 0 28px; }
.druckkarte > p { margin: 0 0 14px; }
.druckform { margin-bottom: 12px; }
.druckform .feld.schmal { flex: 0 0 152px; }
.druck-bereich { flex: 1 1 220px; align-self: center; }
.rueck-kopf { align-items: flex-end; }
.rueck-kopf p { margin: 4px 0 0; max-width: 62ch; font-size: 0.9rem; }

.etab tbody tr { cursor: pointer; transition: background 0.12s; }
.etab tbody tr:hover { background: var(--flaeche-2); }
.e-nr a { color: var(--text); font: 700 1.2rem var(--mono); letter-spacing: 0.02em; white-space: nowrap; }
.e-nr a.ohne { font: 400 0.85rem var(--schrift); letter-spacing: 0; color: var(--text-3); }
.e-abs { font-weight: 600; }
.kaestchen { display: inline-block; width: 13pt; height: 13pt; border: 1pt solid #000; border-radius: 2pt; vertical-align: middle; }

/* ---------------------------------------------------------------- Beleg */

.beleg-raster { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.beleg-links { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.beleg-rechts { position: sticky; top: 24px; min-width: 0; }
.pdf { display: flex; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 420px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); overflow: hidden; }
.pdf iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.pdf img { margin: auto; max-height: 100%; }
.pdf .leer, .pdf .skelett { flex: 1; margin: auto; }
.pdf .skelett { padding: 20px; }
.pdf-fuss { margin: 10px 0 0; font-size: 0.85rem; }
.pdf-fuss a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
.pdf-fuss .sym { width: 16px; height: 16px; }

.felder { display: grid; gap: 10px; }
.felder > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.felder dt { color: var(--text-2); font-size: 0.85rem; }
.immoware-stand { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- Objekte */

.okarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.okarte {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.okarte:hover { border-color: var(--akzent); box-shadow: var(--schatten); transform: translateY(-1px); }
.okarte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.okarte-marken { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.okarte > strong { font-size: 1.02rem; }
.okarte-zahlen { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linie); font-size: 0.85rem; color: var(--text-2); }
.okarte-art { font-size: 0.82rem; color: var(--text-3); }
.okarte-zahlen span { white-space: nowrap; }
.okarte-zahlen b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Zähler (Team) */

.mkarten { display: grid; gap: 14px; }
.mkarte { display: grid; grid-template-columns: 220px minmax(0, 1fr); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; transition: opacity 0.25s, transform 0.25s; }
.mkarte.weg { opacity: 0; transform: scale(0.98); }
.mkarte-foto { display: block; min-height: 190px; padding: 0; border: 0; background: var(--flaeche-2); cursor: zoom-in; }
.mkarte-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mkarte-foto.ohne { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-3); cursor: default; font-size: 0.85rem; }
.mkarte-inhalt { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; min-width: 0; }
.mkarte-inhalt p { margin: 0; }
.mkarte-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.mkarte-kopf strong { font-size: 1.05rem; }
.werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px 16px; }
.werte dt { font-size: 0.76rem; color: var(--text-3); }
.werte dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.werte dd small { font-weight: 400; color: var(--text-3); }
.werte .haupt dd { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.mkarte-urteil { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.85rem; }
.mkarte-hinweis { padding: 8px 12px; border-radius: 10px; background: var(--achtung-sanft); font-size: 0.88rem; }
.mkarte-aktionen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 2px; }
.mkarte-aktionen .feld { flex: 0 1 160px; }
.mkarte-aktionen .knopf { min-height: 42px; }

/* ---------------------------------------------------------------- Mieter-App */

.app { max-width: 520px; margin: 0 auto; padding: 12px 16px calc(40px + env(safe-area-inset-bottom)); }
.app-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0 18px; }
.app-gruss p { margin: 0; }
.app-gruss h1 { margin: 0 0 16px; font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.15; }
.app-abschnitt { margin-top: 30px; }
.app-abschnitt h2 { margin: 0 0 10px; font-size: 1.08rem; }

.wohnung { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px; }
.wohnung > div { display: flex; flex-direction: column; min-width: 0; }
.wohnung-sym, .erkannt-sym, .zkarte-sym, .dliste-sym { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--akzent-sanft); color: var(--akzent); flex: none; }

.knopf-gross {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px;
  border: 0; border-radius: 18px; background: var(--akzent); color: var(--auf-akzent); text-align: left;
  box-shadow: 0 12px 26px -12px var(--akzent);
  transition: background 0.15s, transform 0.08s;
}
.knopf-gross:hover { background: var(--akzent-stark); }
.knopf-gross:active { transform: scale(0.985); }
.knopf-gross > span:nth-child(2) { flex: 1; min-width: 0; }
.knopf-gross strong { display: block; font-size: 1.15rem; }
.knopf-gross small { opacity: 0.88; }
.knopf-gross-sym { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); flex: none; }
.knopf-gross-sym .sym { width: 26px; height: 26px; }

.zkarten { display: grid; gap: 10px; }
.zkarte {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "sym text wert" "sym stand stand";
  align-items: center; gap: 6px 12px; width: 100%; padding: 14px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); text-align: left;
  transition: border-color 0.15s;
}
.zkarte:hover { border-color: var(--akzent); }
.zkarte-sym { grid-area: sym; align-self: start; }
.zkarte-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.zkarte-text small, .zkarte-wert small { color: var(--text-3); }
.zkarte-wert { grid-area: wert; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.zkarte-stand { grid-area: stand; }

.mliste li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--linie); }
.mliste li:first-child, .dliste li:first-child { border-top: 0; }
.mliste-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mliste-text small { color: var(--text-3); }
.mliste-wert { font-weight: 600; }
.dliste li { border-top: 1px solid var(--linie); }
.dliste button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 2px; border: 0; background: none; text-align: left; }
.dliste button > .sym { color: var(--text-3); width: 18px; height: 18px; }
.dliste-sym { width: 38px; height: 38px; border-radius: 10px; }
.dliste-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dliste-text small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bald-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bald { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border: 1px dashed var(--linie-stark); border-radius: var(--radius); color: var(--text-3); text-align: center; font-size: 0.82rem; line-height: 1.3; }
.bald strong { font-weight: 600; }

.blatt { width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
.blatt-inhalt { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.blatt-inhalt > p, .blatt-inhalt > .hinweis { margin: 0; }
.blatt-inhalt.mitte { align-items: center; padding-top: 36px; }
.blatt-inhalt.mitte h2 { font-size: 1.5rem; }
.blatt-inhalt.dokument { height: min(88vh, 900px); height: min(88dvh, 900px); }
.blatt-inhalt.dokument .pdf { flex: 1; height: auto; min-height: 0; }
.blatt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.blatt-kopf h2 { font-size: 1.25rem; }
/* Aushang: öffentliche Seite hinter dem QR-Code im Treppenhaus */
.aushang-app { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; }
.aushang-app > * { margin: 0; }
.aushang-app .kopf { margin-bottom: 0; }
.aushang-titel { font-size: 1.25rem; letter-spacing: -0.01em; }
.aushang-liste { display: grid; gap: 8px; padding: 0; list-style: none; }
.aushang-wohnung { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche); color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.aushang-wohnung:hover, .aushang-wohnung:focus-visible { border-color: var(--akzent); }
.aushang-wohnung .sym { flex: none; width: 20px; height: 20px; color: var(--text-2); }
.aushang-gewaehlt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche); }
.aushang-gewaehlt > div { display: flex; flex-direction: column; min-width: 0; }
.aushang-fertig h2 { margin: 0 0 8px; font-size: 1rem; }
.aushang-fertig ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.aushang-fertig li { display: flex; align-items: center; gap: 8px; }
.aushang-fertig .sym { flex: none; width: 18px; height: 18px; color: var(--gut); }
.aushang-pruefen { display: flex; flex-direction: column; gap: 14px; }
.aushang-pruefen > * { margin: 0; }
.aushang-zaehlerwahl { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.aushang-zaehlerwahl legend { margin-bottom: 6px; padding: 0; }

.blatt-foto { width: 100%; max-height: 190px; object-fit: cover; border-radius: 14px; }
.blatt-aktionen { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }

.lesen { position: relative; aspect-ratio: 4 / 3; max-height: 46vh; border-radius: 16px; overflow: hidden; background: #000; }
.lesen img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9); }
.lesen-strahl {
  position: absolute; left: 0; right: 0; top: -30%; height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(79, 192, 181, 0.3) 80%, rgba(170, 245, 235, 0.95));
  animation: strahl 1.9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes strahl { to { top: 100%; } }
.lesen-text { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }

.erkannt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--radius); }
.erkannt-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.erkannt-text small { color: var(--text-3); }
.erkannt-text span { color: var(--text-2); font-size: 0.88rem; }

.standfeld { display: flex; flex-direction: column; gap: 6px; }
.standfeld > span:first-child { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.standfeld-zeile { display: flex; align-items: baseline; gap: 10px; padding: 4px 16px; border: 2px solid var(--linie-stark); border-radius: 14px; background: var(--flaeche); transition: border-color 0.15s, box-shadow 0.15s; }
.standfeld-zeile:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-ring); }
.standfeld input { flex: 1; min-width: 0; min-height: 58px; padding: 0; border: 0; border-radius: 0; background: transparent; font: 700 2rem var(--mono); letter-spacing: 0.02em; }
.standfeld input:focus-visible { box-shadow: none; }
#m-einheit { color: var(--text-2); font-weight: 600; }

.bezug { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bezug dt { font-size: 0.76rem; color: var(--text-3); }
.bezug dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.bezug dd small { display: block; font-weight: 400; color: var(--text-3); }
#m-bezug .hinweis { margin: 12px 0 0; }

.fertig-haken svg { display: block; fill: none; stroke: var(--gut); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fertig-haken circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: zeichnen 0.5s ease-out forwards; }
.fertig-haken path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: zeichnen 0.3s 0.4s ease-out forwards; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
.fertig-wert { font-size: 1.1rem; }

/* ---------------------------------------------------------------- Breiten */

@media (min-width: 1000px) {
  .bliste:not(.kompakt) .bkopf,
  .bliste:not(.kompakt) .bzeile {
    display: grid; grid-template-areas: none; align-items: center; gap: 0 16px;
    grid-template-columns: 96px minmax(0, 2.4fr) 84px minmax(0, 1.2fr) 116px 96px;
  }
  .bliste:not(.kompakt) .bkopf { padding: 10px 16px; border-bottom: 1px solid var(--linie); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
  .bliste:not(.kompakt) .b-meta { display: contents; }
  .bliste:not(.kompakt) .b-datum { grid-area: 1 / 1; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
  .bliste:not(.kompakt) .b-abs { grid-area: 1 / 2; }
  .bliste:not(.kompakt) .b-obj { grid-area: 1 / 3; font-size: 0.9rem; color: var(--text-2); white-space: nowrap; }
  .bliste:not(.kompakt) .b-art { grid-area: 1 / 4; font-size: 0.9rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bliste:not(.kompakt) .b-betrag { grid-area: 1 / 5; }
  .bliste:not(.kompakt) .b-etikett { grid-area: 1 / 6; text-align: left; }
}

@media (max-width: 1080px) and (min-width: 761px) {
  .gestell { grid-template-columns: 84px minmax(0, 1fr); }
  .leiste { padding: 16px 8px; align-items: stretch; }
  .leiste-kopf { justify-content: center; padding: 0; }
  .mandant { display: none; }
  .nav-rollen { display: none; }
  .leiste .logo span, .leiste-suche span, .leiste-suche kbd, .leiste-wer, .leiste-fuss .knopf span, .leiste-fuss .chip { display: none; }
  .leiste-suche { justify-content: center; }
  .leiste-punkte a { flex-direction: column; gap: 4px; padding: 10px 2px; font-size: 0.7rem; text-align: center; }
  .leiste-fuss { align-items: center; padding: 10px 0 0; }
  .leiste-fuss .knopf { margin: 0; }
  #haupt { padding: 28px 24px 56px; }
}

@media (max-width: 900px) {
  .raster-2, .beleg-raster { grid-template-columns: minmax(0, 1fr); }
  .beleg-rechts { position: static; }
  .pdf { height: 72vh; height: 72dvh; }
}

@media (max-width: 760px) {
  .gestell { display: block; }
  .mobilkopf {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30; padding: 8px 12px 8px 16px;
    background: var(--grund); border-bottom: 1px solid var(--linie);
  }
  .mobilkopf-aktionen { display: flex; gap: 2px; }
  .leiste {
    position: fixed; inset: auto 0 0 0; z-index: 30; height: auto;
    flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--linie);
  }
  .leiste-kopf, .leiste-suche, .leiste-fuss { display: none; }
  .nav-rollen { display: none; }
  .leiste-punkte { flex-direction: row; overflow: visible; }
  .leiste-punkte a { flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 2px; font-size: 0.68rem; text-align: center; }
  .leiste-punkte a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  #haupt { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .mieter-haupt { padding: 0 !important; }
  .grosssuche { height: 54px; padding: 0 14px; margin-bottom: 20px; border-radius: 16px; }
  .grosssuche kbd { display: none; }
  .kachel { padding: 14px; }
  .karte { padding: 16px; }
  .filter .feld.schmal { flex: 1 1 130px; }
  .palette { margin-top: 8px; }
  .palette-fuss { display: none; }
  .toasts { left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); align-items: center; }
  .mkarte { grid-template-columns: minmax(0, 1fr); }
  .mkarte-foto { min-height: 0; height: 190px; }
  .felder > div { grid-template-columns: 104px minmax(0, 1fr); }
  .kopf-aktionen .knopf { min-height: 42px; }
}

@media (max-width: 560px) {
  .blatt { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .blatt-inhalt { min-height: 100%; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .blatt-inhalt.dokument { height: 100%; }
  .fenster-inhalt { padding: 18px; }
}

@media screen and (max-width: 640px) {
  .etab thead { display: none; }
  .etab tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 16px; border-top: 1px solid var(--linie); }
  .etab tbody tr:first-child { border-top: 0; }
  .etab td { display: block; padding: 0; border: 0; }
  .etab td.nur-druck { display: none; }
  .etab .e-nr { order: 1; flex: 1 1 auto; }
  .etab .e-betrag { order: 2; margin-left: auto; font-weight: 600; }
  .etab .e-abs { order: 3; flex: 1 0 100%; }
  .etab .e-datum, .etab .e-obj, .etab .e-art { order: 4; color: var(--text-2); font-size: 0.85rem; }
}

@media (pointer: coarse) {
  :where(input:not([type="checkbox"], [type="radio"]), select, textarea) { font-size: 16px; }
  .standfeld input { font-size: 2rem; }
  .code-eingabe { font-size: 1.7rem; }
  .knopf.klein { min-height: 40px; padding: 0 12px; }
  kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .lesen-strahl { display: none; }
}

/* ---------------------------------------------------------------- Druck: Etikettenliste auf A4, schwarz auf weiß */

/* ---------- Ablesung: Kamera mit Taschenlampe ---------- */
.kamera { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.kamera::backdrop { background: #000; }
.kamera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kamera-rahmen { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.kamera-rahmen span { width: min(82vw, 440px); aspect-ratio: 4 / 3; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
.kamera-kopf { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; background: linear-gradient(rgba(0, 0, 0, 0.6), transparent); }
.kamera-kopf p { flex: 1; margin: 4px 0 0; text-align: center; }
.kamera-kopf strong { display: block; font-size: 1.05rem; }
.kamera-kopf small { display: block; opacity: 0.85; font-size: 0.85rem; }
.kamera-rund { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; cursor: pointer; }
.kamera-rund .sym { width: 22px; height: 22px; }
.kamera-rund.an, .kamera-rund[aria-pressed="true"] { background: #fff; color: #000; }
.kamera-meldung { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); margin: 0; padding: 14px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.75); text-align: center; }
.kamera-fuss { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 16px max(22px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); }
.kamera-klein { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; justify-self: center; min-width: 64px; padding: 6px; border: 0; background: none; color: #fff; font: inherit; font-size: 0.78rem; cursor: pointer; }
.kamera-klein .sym { width: 24px; height: 24px; }
.kamera-ausloeser { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: transform 0.1s; }
.kamera-ausloeser:active { transform: scale(0.92); }
.kamera-ausloeser:disabled { opacity: 0.4; cursor: default; }

/* ---------- Ablesung: Zählwerke und Rückfragen ---------- */
.werke { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.werk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.werk input { min-width: 0; }
.werk-wert { font-variant-numeric: tabular-nums; text-align: right; }
.rueckfragen { display: grid; gap: 12px; }
.rueckfrage { display: grid; gap: 8px; }
.rueckfrage .hinweis { margin: 0; }
.gruende { display: grid; gap: 6px; }
.wahl { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); cursor: pointer; }
.wahl:has(input:checked) { border-color: var(--akzent); background: var(--akzent-sanft); }
.wahl input { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); }

/* ---------- Vor Ort ---------- */
.vliste { display: grid; gap: 10px; }
.vkarte { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); color: inherit; text-decoration: none; }
.vkarte:hover { border-color: var(--akzent); }
.vkarte-sym { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--akzent-sanft); color: var(--akzent); }
.vkarte-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vkarte-text small, .vkarte-stand small { color: var(--text-3); font-size: 0.8rem; }
.vkarte-stand { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.v-suche { margin: 16px 0 4px; }
@media (max-width: 560px) {
  .vkarte { flex-wrap: wrap; }
  .vkarte-stand { flex-basis: 100%; flex-direction: row; align-items: center; justify-content: flex-start; padding-left: 58px; }
}

/* ---------- Ableseaktion auf der Objektseite ---------- */
.o-ablesung { margin-bottom: 16px; }
.aktion-start { display: grid; gap: 14px; }
.aktion-start p { margin: 0; }
.feldreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.aktion { display: grid; gap: 14px; }
.aktion-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.aktion-kopf small { display: block; color: var(--text-3); font-size: 0.82rem; }
.aktion-zahl { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fortschritt { height: 8px; border-radius: 99px; background: var(--flaeche-2); overflow: hidden; }
.fortschritt span { display: block; height: 100%; border-radius: inherit; background: var(--gut, var(--akzent)); transition: width 0.3s; }
.aktion-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.restliste { display: grid; margin: 0; padding: 0; list-style: none; }
.restliste > li { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--linie); }
.rest-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rest-kopf strong small { font-weight: 400; color: var(--text-3); }
.rest-zaehler { display: flex; flex-wrap: wrap; gap: 6px; }
.rest-z { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px dashed var(--linie-stark, var(--linie)); border-radius: 99px; font-size: 0.82rem; color: var(--text-2); }
.rest-z .sym { width: 15px; height: 15px; }
.rest-z.ja { border-style: solid; border-color: var(--gut, var(--akzent)); color: var(--text); }
.rest-z small { color: var(--text-3); }

/* Ablesebriefe: nur im Druck sichtbar */
.briefe-druck { display: none; }

.vorschau-leiste { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; padding: 10px 16px; background: var(--achtung-sanft); border-bottom: 1px solid var(--linie); }
.vorschau-leiste > strong { align-self: center; }
.vorschau-leiste .feld { min-width: 140px; }
.vorschau-leiste .feld span { font-size: 0.72rem; }
.vorschau-leiste small { flex-basis: 100%; }

@media print {
  @page { size: A4 portrait; margin: 14mm 12mm 16mm; }

  :root {
    --grund: #fff; --flaeche: #fff; --flaeche-2: #fff;
    --linie: #999; --linie-stark: #000;
    --text: #000; --text-2: #000; --text-3: #333;
    --akzent: #000; --akzent-stark: #000; --akzent-sanft: #fff; --marke: #000;
    --gut: #000; --achtung: #000; --gefahr: #000;
    --gut-sanft: #fff; --achtung-sanft: #fff; --gefahr-sanft: #fff;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #000; font-size: 10pt; }
  .leiste, .mobilkopf, .toasts, .sprung, .nicht-drucken, dialog, .skelett, .zurueck { display: none !important; }
  .gestell { display: block; min-height: 0; }
  #haupt { padding: 0 !important; }
  .ansicht { max-width: none; animation: none; }
  .karte, .okarte, .kachel, .mkarte { border-color: #999; box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .tab-rahmen { overflow: visible; }
  .laedt { opacity: 1; }

  .nur-druck { display: block !important; }
  th.nur-druck, td.nur-druck { display: table-cell !important; }

  .druckkopf { margin: 0 0 6mm; padding-bottom: 4mm; border-bottom: 1pt solid #000; }
  .druckkopf h1 { margin: 0 0 1mm; font-size: 16pt; }
  .druckkopf p { margin: 0 0 1mm; font-size: 10pt; }
  .druckbereich .ergebniszeile { display: none; }
  .druckbereich .karte { border: 0; border-radius: 0; }

  .etab { font-size: 10pt; }
  .etab thead { display: table-header-group; }
  .etab th { padding: 2mm 2mm; border-bottom: 1pt solid #000; color: #000; font-size: 8pt; }
  .etab td { padding: 2.2mm 2mm; border-top: 0.5pt solid #999; }
  .etab tbody tr { break-inside: avoid; page-break-inside: avoid; cursor: auto; }
  .etab .haken-spalte { width: 9mm; padding-left: 0; }
  .e-nr a { font-size: 13pt; }
  .e-nr a.ohne { font-size: 9pt; color: #333; }
  body.druckt-briefe > *:not(.briefe-druck) { display: none !important; }
  body.druckt-briefe .briefe-druck { display: block !important; }
  .ablesebrief { break-after: page; page-break-after: always; font-size: 11pt; line-height: 1.45; }
  .ablesebrief:last-child { break-after: auto; page-break-after: auto; }
  .ablesebrief h1 { margin: 10mm 0 5mm; font-size: 16pt; }
  .ablesebrief ol { padding-left: 6mm; }
  .brief-absender { margin: 0 0 3mm; font-size: 8pt; text-decoration: underline; }
  .brief-an { margin: 0 0 12mm; min-height: 25mm; }
  .brief-qr { display: flex; align-items: center; gap: 8mm; margin: 8mm 0; }
  .brief-qr .qr { width: 45mm; height: 45mm; flex: none; }
  .brief-link { font-family: ui-monospace, Menlo, monospace; font-size: 9pt; word-break: break-all; color: #000; }
}

/* Zählerverlauf: Stände, Versorger, Auszug */
.filter-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zverlauf tr.ungueltig td { color: var(--text-3); }
.zverlauf tr.ungueltig td.zahl { text-decoration: line-through; }
.zverlauf td .knopf { margin-left: 4px; }
.versorger .werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.versorger .auszug-hinweis { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--akzent); background: var(--flaeche-2); border-radius: var(--radius); }
.versorger .auszug-hinweis p { margin: 4px 0 0; }
.versorger-form textarea { width: 100%; }
.nummer-hinweis { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius); background: var(--achtung-sanft); color: var(--text); font-size: .9em; }
.nummer-hinweis svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* Mieterlink senden: Wahl des Weges */
.wege { display: flex; flex-direction: column; gap: 8px; }
.weg-wahl { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); color: inherit; font: inherit; cursor: pointer; }
.weg-wahl:hover:not(:disabled) { border-color: var(--akzent); }
.weg-wahl:disabled { opacity: .5; cursor: not-allowed; }
.weg-wahl span { display: flex; flex-direction: column; gap: 2px; }
.weg-wahl small { color: var(--text-2); }
.weg-wahl svg { flex: none; width: 20px; height: 20px; }

/* Mieter: schmale Leiste, sobald Bereiche dem Mieter eigene Ansichten anbieten */
.mieter-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--linie, #d9dfdc); }
.mieter-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: inherit; }
.mieter-nav a.aktiv { background: var(--akzent, #17425a); color: #fff; }
.mieter-nav svg { width: 18px; height: 18px; }
.mieter-nav button { margin-left: auto; }

/* Vor-Ort-Link für Dienstleister */
.vlink-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vlink-form .feld:first-child { flex: 1 1 220px; }
.vlink-neu { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche-2); }
.vlink-neu .qr { width: 150px; height: 150px; flex: none; }
.vlink-neu > div { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vlink-neu .brief-link { word-break: break-all; font-family: var(--mono); font-size: .85rem; margin: 0; }
.vlink-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vlink-liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.vlink-liste li span { display: flex; flex-direction: column; min-width: 0; }
.vlink-liste small { color: var(--text-2); }
@media (max-width: 760px) { .freigabe { bottom: calc(108px + env(safe-area-inset-bottom)); } }
