/* Feierklo Verwaltung – Styles
   Gleiche Designsprache wie feierklo.de (Farben, Schriften, Radien), aber als Werkzeug: dichter, klar, schnell.
   Handy zuerst; ab 1024 px Seitenleiste statt unterer Leiste. Keine externen Anfragen. */

/* ---------- Schriften ---------- */
@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-var.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens (wie Website) ---------- */
:root {
  --tanne: #0F5C55;
  --tanne-tief: #0B2E2A;
  --porzellan: #F5F6F3;
  --kachel: #E4ECE8;
  --gelb: #FFD166;
  --stein: #56645F;
  --weiss: #FFFFFF;
  --linie: #CBD8D2;
  --frei: #2F8A5B;
  --besetzt: #C2412D;
  --hell-auf-dunkel: #B9C9C4;

  --f-head: "Young Serif", Georgia, "Times New Roman", serif;
  --f-body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --r-kachel: 12px; --r-ctrl: 10px; --r-klein: 6px;
  --fokus: 0 0 0 2px var(--tanne-tief), 0 0 0 5px var(--gelb);
  --schatten: 0 10px 30px -12px rgba(11, 46, 42, .35);
  --rand: 16px;
  --leiste: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 640px) { :root { --rand: 24px; } }
@media (min-width: 1280px) { :root { --rand: 40px; } }

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--f-body); font-size: 16px; line-height: 1.5;
  color: var(--tanne-tief); background: var(--porzellan);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; text-wrap: balance; }
h1 { font-family: var(--f-head); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); letter-spacing: -.01em; }
h2 { font-size: 1.0625rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .9em; }
a { color: var(--tanne); text-underline-offset: .18em; }
b, strong { font-weight: 650; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; background: var(--kachel); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
small, .klein { font-size: .875rem; color: var(--stein); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

.sprung { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--tanne-tief); color: #fff; padding: 10px 14px; border-radius: var(--r-ctrl); }
.sprung:focus { top: 8px; }
.testband { background: var(--gelb); color: var(--tanne-tief); font-size: .8125rem; font-weight: 600; text-align: center; padding: 4px var(--rand); }

/* ---------- Marke ---------- */
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.marke-zeichen { width: 32px; height: 32px; flex: none; }
.marke-zeichen rect { fill: var(--tanne); }
.marke-zeichen path { fill: var(--gelb); }
.marke-text { font-family: var(--f-head); font-size: 1.4rem; line-height: 1; }
.marke-text b { font-weight: 400; color: var(--tanne); }
.marke-gross .marke-zeichen { width: 44px; height: 44px; }
.marke-gross .marke-text { font-size: 2rem; }

/* ---------- Symbole ---------- */
.sym { width: 22px; height: 22px; flex: none; }

/* ---------- Rahmen: Handy ---------- */
.seitenleiste { display: none; }
.haupt { padding: 0 var(--rand) calc(var(--leiste) + 32px + env(safe-area-inset-bottom)); outline: none; max-width: 1240px; }
.kopfzeile-handy {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  margin: 0 calc(-1 * var(--rand)) 8px; padding: calc(10px + env(safe-area-inset-top)) var(--rand) 10px;
  background: rgba(245, 246, 243, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linie);
}
.kopfzeile-titel { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopfzeile-konto { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; color: var(--tanne-tief); border-radius: var(--r-ctrl); }

.untenleiste {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--leiste) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--weiss); border-top: 1px solid var(--linie); box-shadow: 0 -6px 20px -16px rgba(11, 46, 42, .5);
}
.untenleiste a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--stein); text-decoration: none; font-size: .75rem; font-weight: 600; position: relative;
}
.untenleiste a.ist-aktiv { color: var(--tanne); }
.untenleiste a.ist-aktiv::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--tanne); }

/* ---------- Rahmen: PC ---------- */
@media (min-width: 1024px) {
  .rahmen { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
  .seitenleiste {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    background: var(--tanne-tief); color: var(--weiss); padding: 22px 14px 16px;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
  }
  .ist-test .seitenleiste { height: calc(100dvh - 27px); top: 0; }
  .seitenleiste .marke { padding: 0 10px 22px; }
  .seitenleiste .marke-text b { color: var(--gelb); }
  .menue { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .menue-system { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .menue a, .ich-name {
    display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 7px 12px;
    color: var(--hell-auf-dunkel); text-decoration: none; border-radius: var(--r-ctrl); font-weight: 550;
  }
  .menue a:hover, .ich-name:hover { color: var(--weiss); background: rgba(255, 255, 255, .06); }
  .menue a.ist-aktiv, .ich-name.ist-aktiv { color: var(--weiss); background: rgba(255, 255, 255, .1); box-shadow: inset 3px 0 0 var(--gelb); }
  .menue a.ist-spaeter { opacity: .62; }
  .menue .stufe { margin-left: auto; color: var(--hell-auf-dunkel); font-size: .6875rem; white-space: nowrap; }
  .menue a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ich { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 4px; }
  .ich-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ich .knopf-text { color: var(--hell-auf-dunkel); padding: 6px 12px; }
  .ich .knopf-text:hover { color: var(--weiss); }
  .haupt { padding: 32px var(--rand) 64px; }
  .kopfzeile-handy, .untenleiste, .abmelden-handy { display: none; }
}

/* ---------- Seitenkopf ---------- */
.seitenkopf { margin: 16px 0 24px; }
.seitenkopf h1 { margin-bottom: .2em; }
.unterzeile { color: var(--stein); max-width: 70ch; margin: 0; }
.seitenkopf-aktionen { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pause-kopf .datum { margin: 0 0 4px; color: var(--stein); font-weight: 600; font-size: .875rem; }
@media (min-width: 1024px) { .seitenkopf { margin-top: 0; } }

/* ---------- Bausteine ---------- */
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); padding: 20px; }
.karte > :last-child { margin-bottom: 0; }
.karte h2 { margin-bottom: .75em; }
.karte-schmal { width: 100%; max-width: 440px; }
.karte-breit { width: 100%; max-width: 720px; }
.karte-hervor { border-color: var(--tanne); box-shadow: inset 4px 0 0 var(--tanne); margin-bottom: 20px; }

.raster { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.raster > *, .stapel > * { min-width: 0; }
@media (min-width: 900px) {
  .raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-seite { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}

.block { margin-bottom: 28px; }
.block-titel { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 10px; }
.zahl { font-variant-numeric: tabular-nums; }
.block-titel .zahl { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-klein); background: var(--tanne); color: var(--weiss); font-size: .8125rem; }

.leer { background: var(--kachel); border-radius: var(--r-kachel); padding: 16px 18px; color: var(--tanne-tief); }
.leer p { margin: 0; }
.leer p + p { margin-top: .6em; }
.leer-gross { padding: 28px 24px; max-width: 640px; }
.leer-knapp { padding: 12px 14px; font-size: .9375rem; }
.leer-knapp span { color: var(--stein); }

.karten { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .karten { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.karte-aufgabe { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.karte-aufgabe p { margin: 0; }
.karte-warnung { border-left: 4px solid var(--gelb); }
.karte-fehler { border-left: 4px solid var(--besetzt); }
.karte-info { border-left: 4px solid var(--tanne); }
.karte-aktionen { display: flex; justify-content: flex-end; gap: 8px; }

.kennzahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
@media (min-width: 900px) { .kennzahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kennzahlen div { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); padding: 12px 14px; }
.kennzahlen dt { font-size: .8125rem; color: var(--stein); }
.kennzahlen dd { margin: 2px 0 0; font-size: 1.125rem; font-weight: 650; }

.werte { margin: 0; display: grid; gap: 8px; }
.werte div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--kachel); padding-bottom: 8px; }
.werte dt { color: var(--stein); }
.werte dd { margin: 0; font-weight: 600; text-align: right; }

.liste { list-style: none; margin: 0 0 12px; padding: 0; }
.liste-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--kachel); }
.liste-zeile small { display: block; }
.marke-klein { font-size: .75rem; font-weight: 650; background: var(--kachel); color: var(--tanne); padding: 2px 6px; border-radius: var(--r-klein); }
.punkte { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }

.mehr-liste { list-style: none; margin: 0 0 24px; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); overflow: hidden; }
.mehr-liste a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; color: var(--tanne-tief); text-decoration: none; font-weight: 550; border-bottom: 1px solid var(--kachel); }
.mehr-liste li:last-child a { border-bottom: 0; }
.mehr-liste a.ist-spaeter { color: var(--stein); }
.mehr-liste .stufe { margin-left: auto; }

/* ---------- Hinweise ---------- */
.hinweise { display: grid; gap: 8px; margin: 12px 0 20px; }
.hinweis { margin: 0; padding: 12px 14px; border-radius: var(--r-ctrl); background: var(--kachel); border-left: 4px solid var(--tanne); }
.hinweis-ok { border-left-color: var(--frei); }
.hinweis-warnung { border-left-color: var(--gelb); background: #FFF6DD; }
.hinweis-fehler { border-left-color: var(--besetzt); background: #FBE9E5; }
.hinweis-info { border-left-color: var(--tanne); }
.karte .hinweis, .haupt > .hinweis { margin-bottom: 16px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.1em; border: 1.5px solid transparent; border-radius: var(--r-ctrl);
  font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.knopf:active { transform: translateY(1px); }
.knopf-haupt { background: var(--tanne); color: var(--weiss); }
.knopf-haupt:hover { background: var(--tanne-tief); color: var(--weiss); }
.knopf-zweit { background: transparent; color: var(--tanne); border-color: var(--tanne); }
.knopf-zweit:hover { background: var(--kachel); }
.knopf-gefahr { background: transparent; color: var(--besetzt); border-color: var(--besetzt); }
.knopf-gefahr:hover { background: #FBE9E5; }
.knopf-klein { min-height: 36px; padding: .35em .8em; font-size: .875rem; }
.knopf-breit { width: 100%; }
.knopf-text { background: none; border: 0; padding: 0; color: var(--tanne); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; }
.leiste-speichern { position: sticky; bottom: calc(var(--leiste) + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 12px 0; margin-top: 16px; background: linear-gradient(transparent, var(--porzellan) 30%); }
@media (min-width: 1024px) { .leiste-speichern { bottom: 0; } }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 16px; }
.feld { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.feld > span, .feld > label, .feld legend { font-weight: 600; font-size: .9375rem; padding: 0; }
.karte .feld + .feld { margin-top: 14px; }
.formular .feld + .feld { margin-top: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--weiss); border: 1.5px solid var(--linie); border-radius: var(--r-ctrl);
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--stein); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--tanne-tief); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--tanne); flex: none; }
.haken { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.haken small { display: block; }
.code-eingabe { font-size: 1.5rem !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.suchleiste { display: flex; gap: 8px; margin-bottom: 16px; max-width: 560px; }

/* ---------- Tabellen ---------- */
.tabelle-rahmen { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tabelle th { text-align: left; font-size: .8125rem; font-weight: 650; color: var(--stein); padding: 8px 10px; border-bottom: 1.5px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 10px; border-bottom: 1px solid var(--kachel); vertical-align: top; }
.tabelle-dicht td { padding: 7px 10px; }
.tabelle .zahl { text-align: right; }
.tabelle tr.ist-gesperrt td { color: var(--stein); }
.tabelle .details code { font-size: .8rem; }
.zelle-aktionen { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.blaettern { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; color: var(--stein); font-size: .875rem; }

.status { display: inline-block; font-size: .8125rem; font-weight: 650; padding: 2px 8px; border-radius: var(--r-klein); background: var(--kachel); color: var(--tanne-tief); white-space: nowrap; }
.status-ok, .status-aktiv { background: #E1F1E7; color: #1F6040; }
.status-fehler, .status-gesperrt { background: #FBE9E5; color: #9A2F1F; }
.status-eingeladen, .status-Einrichtung-offen, .status-laeuft { background: #FFF1CC; color: #6B4B00; }
.status-entfernt { color: var(--stein); }

/* ---------- Anmeldung (schlichtes Layout) ---------- */
.schlicht-haupt { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 24px; padding: calc(40px + env(safe-area-inset-top)) var(--rand) 40px; }
@media (min-height: 760px) { .schlicht-haupt { padding-top: 10vh; } }
.schlicht-haupt .hinweise { width: 100%; max-width: 440px; margin: 0; }
.schritte { padding-left: 1.2em; margin: 0 0 16px; display: grid; gap: 4px; }
.qr { margin: 0 0 18px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.qr img { width: 220px; height: 220px; background: #fff; border: 1px solid var(--linie); border-radius: var(--r-kachel); padding: 6px; image-rendering: pixelated; }
.qr figcaption { font-size: .875rem; color: var(--stein); }
.geheim { font-size: 1rem; letter-spacing: .05em; cursor: copy; }
.codes { columns: 2; gap: 16px; padding-left: 1.6em; margin: 0 0 16px; font-size: 1.05rem; }
.codes li { margin-bottom: 6px; }
.schluessel { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--tanne-tief); color: var(--weiss); padding: 14px 16px; border-radius: var(--r-ctrl); font-size: .85rem; }
.link-kasten code { display: block; padding: 10px 12px; font-size: .875rem; }
.aufklapp { margin-top: 16px; }
.aufklapp summary { cursor: pointer; color: var(--tanne); font-weight: 600; min-height: 32px; }
.aufklapp p { margin-top: 8px; }

/* ---------- Tastaturkürzel-Hilfe ---------- */
.kuerzel-hilfe { border: 0; border-radius: var(--r-kachel); padding: 24px; box-shadow: var(--schatten); max-width: 420px; }
.kuerzel-hilfe::backdrop { background: rgba(11, 46, 42, .4); }
.kuerzel-hilfe dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.kuerzel-hilfe dt kbd { font-family: inherit; font-weight: 650; background: var(--kachel); padding: 2px 7px; border-radius: 5px; }
.kuerzel-hilfe dd { margin: 0; }

/* ---------- Druck (Wiederherstellungscodes) ---------- */
@media print {
  .seitenleiste, .untenleiste, .kopfzeile-handy, .testband, .aktionen, .marke { display: none !important; }
  body { background: #fff; }
  .karte { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Stufe 2: Buchungen, Kalender, Marktanalyse
   ===================================================================== */
.abstand-oben { margin-top: 16px; }
.abstand-unten { margin-bottom: 16px; }
.zurueck { margin: 8px 0 0; font-size: .9375rem; }
.zurueck a::before { content: "\2039\00a0"; }
.stapel { display: grid; gap: 16px; align-content: start; }
.abschnitt-titel { margin: 32px 0 12px; font-family: var(--f-head); font-weight: 400; font-size: 1.5rem; }
form.inline { display: inline; }

/* Karten auf „Pause“ */
.karte-kopf { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.karte-kopf span { font-variant-numeric: tabular-nums; font-weight: 650; }
.karte-aufgabe > div:first-child p:last-child { margin: 0; }
.kurzliste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9375rem; }
.kurzliste li { padding: 8px 0; border-top: 1px solid var(--kachel); }
.karte-neu p:first-child { margin: 0; }

/* Terminlisten */
.terminliste { list-style: none; margin: 0; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); overflow: hidden; }
.terminliste li + li { border-top: 1px solid var(--kachel); }
.terminliste a { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; min-height: 56px; color: inherit; text-decoration: none; }
.terminliste a:hover { background: var(--porzellan); }
.t-zeit { font-size: .875rem; font-weight: 650; color: var(--stein); font-variant-numeric: tabular-nums; line-height: 1.3; }
.t-text { min-width: 0; }
.t-text small { color: var(--stein); }
.t-helfer { font-size: .8125rem; font-weight: 650; color: var(--tanne); text-align: right; }
.t-helfer.ist-offen { color: #8A5A00; background: #FFF1CC; padding: 2px 8px; border-radius: var(--r-klein); }
.ist-erledigt .t-text { text-decoration: line-through; color: var(--stein); }
.terminliste-gross a { min-height: 72px; }

/* Filter, Tabellen mit Detailansicht */
.filterleiste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filterleiste input[type=search] { flex: 1 1 220px; }
.filterleiste select { flex: 0 1 180px; width: auto; }
.arbeitsbereich { display: grid; gap: 16px; }
@media (min-width: 1100px) {
  .arbeitsbereich.mit-detail { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .arbeitsbereich-detail { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; }
}
.arbeitsbereich-detail { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); padding: 18px; }
.detail-schliessen { display: flex; gap: 16px; justify-content: flex-end; margin: -4px 0 8px; font-size: .875rem; }
.tabelle-klickbar tbody tr:hover { background: var(--porzellan); }
.tabelle-klickbar tr.ist-gewaehlt { background: var(--kachel); }
.tabelle-klickbar td:first-child a { font-weight: 650; }
.sortieren { color: inherit; text-decoration: none; }
.sortieren.ist-aktiv { color: var(--tanne-tief); }
.tabelle tr.summe td { font-weight: 700; border-top: 1.5px solid var(--linie); }
.tabelle-hoch { max-height: 420px; overflow-y: auto; }

.status-b-anfrage { background: #FFF1CC; color: #6B4B00; }
.status-b-bestaetigt { background: #E1F1E7; color: #1F6040; }
.status-b-geliefert, .status-b-zurueck { background: var(--kachel); color: var(--tanne); }
.status-b-abgeschlossen { background: var(--porzellan); color: var(--stein); }
.status-b-storniert { background: #FBE9E5; color: #9A2F1F; }

/* Buchung im Detail */
.detail-kopf p { margin: 0 0 6px; }
.detail-titel { font-family: var(--f-head); font-weight: 400; font-size: 1.5rem; margin: 0 0 6px; }
.aktionen-status { margin: 12px 0 18px; }
.aufklapp-knopf summary { list-style: none; }
.aufklapp-knopf summary::-webkit-details-marker { display: none; }
.mini-formular { gap: 10px; margin-top: 10px; }
.notiz { background: var(--porzellan); border-radius: var(--r-ctrl); padding: 10px 12px; margin: 10px 0 0; }
.karte h3 { margin-top: 20px; }

/* Formulare (Buchung anlegen, Termin) */
.feldreihe { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.feld-schmal { max-width: 140px; }
.wahlreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl { position: relative; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; }
.wahl span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--linie); border-radius: var(--r-ctrl); background: var(--weiss); font-weight: 600; }
.wahl input:checked + span { border-color: var(--tanne); background: var(--kachel); color: var(--tanne-tief); box-shadow: inset 0 0 0 1px var(--tanne); }
.wahl input:focus-visible + span { box-shadow: var(--fokus); }
.preisvorschau { position: sticky; top: 16px; display: grid; gap: 12px; }
.preiszeilen { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9375rem; }
.preiszeilen li { display: flex; justify-content: space-between; gap: 12px; }
.preiszeilen li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.preissumme { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px solid var(--linie); padding-top: 10px; margin: 0; }
.preissumme b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.feld-zeile { grid-template-columns: 1fr 110px auto; align-items: center; column-gap: 8px; }
.feld-zeile > span:first-child { font-weight: 550; }
.eingabe-zahl { text-align: right; font-variant-numeric: tabular-nums; }
.einheit { color: var(--stein); }
.unten-aktion { position: sticky; bottom: calc(var(--leiste) + env(safe-area-inset-bottom) + 8px); margin-top: 16px; }
@media (min-width: 1024px) { .unten-aktion { position: static; max-width: 360px; } }

/* Kalender */
.kalender-steuerung { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.umschalter { display: inline-flex; flex-wrap: wrap; background: var(--weiss); border: 1.5px solid var(--linie); border-radius: var(--r-ctrl); padding: 3px; gap: 2px; }
.umschalter a { padding: 7px 14px; border-radius: 7px; text-decoration: none; color: var(--tanne-tief); font-weight: 600; font-size: .9375rem; }
.umschalter a.ist-aktiv { background: var(--tanne); color: var(--weiss); }
.blaetterer { display: flex; gap: 6px; }
.monat { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); overflow: hidden; }
.monat-kopf, .monat-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.monat-kopf span { padding: 8px; font-size: .8125rem; font-weight: 650; color: var(--stein); border-bottom: 1px solid var(--linie); }
.monat-tag { min-height: 112px; padding: 4px 5px 6px; border-right: 1px solid var(--kachel); border-bottom: 1px solid var(--kachel); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.monat-woche .monat-tag:nth-child(7) { border-right: 0; }
.monat-tag.ist-fremd { background: var(--porzellan); }
.monat-tag.ist-fremd .monat-zahl { color: var(--stein); }
.monat-tag.ist-heute .monat-zahl { background: var(--tanne); color: var(--weiss); }
.monat-tag.ist-belegt { background: #FCEFEC; }
.monat-tag.ist-ziel { outline: 2px dashed var(--tanne); outline-offset: -3px; }
.monat-zahl { align-self: flex-start; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 6px; font-size: .875rem; font-weight: 650; text-decoration: none; color: var(--tanne-tief); }
.monat-zahl:hover { background: var(--kachel); }
.termin, .beleg { display: block; font-size: .75rem; line-height: 1.3; padding: 3px 6px; border-radius: 5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.termin { background: var(--kachel); color: var(--tanne-tief); border-left: 3px solid var(--tanne); cursor: grab; }
.termin-selbstabholung, .termin-rueckgabe { border-left-color: var(--stein); }
.termin-wartung { border-left-color: var(--besetzt); }
.termin.ohne-helfer { background: #FFF1CC; }
.termin.ist-erledigt { opacity: .55; text-decoration: line-through; }
.beleg { color: #9A2F1F; font-weight: 600; background: transparent; padding-left: 2px; }
.beleg-sperre { color: var(--stein); }
.tag-block { margin-bottom: 18px; }
.tag-titel { font-size: 1rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.tag-leer { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--kachel); margin-bottom: 6px; }
.tag-leer .tag-titel { margin: 0; color: var(--stein); font-weight: 550; }
.beleg-zeile { display: flex; gap: 10px; align-items: baseline; margin: 0 0 8px; font-size: .875rem; }
@media (max-width: 767px) {
  .monat-tag { min-height: 64px; padding: 2px; }
  .termin, .beleg { font-size: .6875rem; padding: 2px 3px; }
}

/* Marktanalyse */
.kennzahlen-gross { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kennzahlen-gross { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .kennzahlen-gross { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kennzahlen-gross dd { font-size: 1.6rem; }
.kennzahlen small { display: block; color: var(--stein); font-size: .8125rem; margin-top: 2px; }
.balken-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.balken-liste li { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .875rem; }
.b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-balken { width: 100%; height: 14px; background: var(--porzellan); border-radius: 3px; }
.b-balken rect { fill: var(--tanne); }
.b-wert { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; min-width: 64px; text-align: right; }
.b-wert small { font-weight: 400; color: var(--stein); }
.karte-plz { width: 100%; max-width: 560px; height: auto; background: var(--porzellan); border-radius: var(--r-ctrl); }
.k-hintergrund circle { fill: #C3D0CA; }
.k-ringe circle { fill: none; stroke: var(--stein); stroke-width: .4; stroke-dasharray: 2 2; }
.k-ringe text { font-size: 4.4px; fill: var(--stein); font-family: var(--f-body); }
.k-punkte circle { fill: rgba(15, 92, 85, .72); stroke: var(--weiss); stroke-width: .5; }
.k-orte text { font-size: 5.2px; fill: var(--tanne-tief); font-family: var(--f-body); font-weight: 600; paint-order: stroke; stroke: var(--porzellan); stroke-width: 1.2px; }
.k-orte .k-lohne { font-size: 6px; fill: var(--tanne); }

@media (min-width: 1280px) { .raster-karte { grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); } }

/* ---------- Stufe 3: Checkliste, Kaution, Postausgang, Wagen-Akte ---------- */
.sync-band { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-ctrl); background: #FFF1CC; color: #6B4B00; font-weight: 600; font-size: .9375rem; }
.sync-band.ist-fehler { background: #FBE9E5; color: #9A2F1F; }

.checkliste { display: grid; gap: 14px; max-width: 720px; }
.ck-gruppe { margin: 0; min-width: 0; }
.ck-gruppe legend { font-weight: 650; font-size: 1.0625rem; padding: 0 6px; margin-left: -6px; }
.ck-gruppe[disabled] { opacity: .7; }
.ck-punkt { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--kachel); scroll-margin: 90px; transition: background .3s var(--ease); }
.ck-punkt:last-child { border-bottom: 0; }
.ck-punkt.ist-fehlend { background: #FFF1CC; border-radius: var(--r-klein); }
.ck-text b { display: block; }
.ck-text small { display: block; }
.ck-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck-wahl-drei { grid-template-columns: repeat(3, 1fr); }
.ck-wahl label { position: relative; cursor: pointer; }
.ck-wahl input { position: absolute; opacity: 0; inset: 0; }
.ck-wahl span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid var(--linie);
  border-radius: var(--r-ctrl); background: var(--weiss); font-weight: 650; text-align: center; line-height: 1.2; }
.ck-wahl input:checked + span { border-color: var(--frei); background: #E1F1E7; color: #1F6040; box-shadow: inset 0 0 0 1px var(--frei); }
.ck-wahl .ck-schlecht input:checked + span { border-color: var(--besetzt); background: #FBE9E5; color: #9A2F1F; box-shadow: inset 0 0 0 1px var(--besetzt); }
.ck-wahl input:focus-visible + span { box-shadow: var(--fokus); }
.ck-mangel { display: grid; gap: 10px; padding: 12px; background: #FDF4F1; border-radius: var(--r-ctrl); }
.ck-foto-knopf { justify-self: start; gap: 8px; cursor: pointer; }
.ck-fotos { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-fotos:empty { display: none; }
.ck-fotos figure { margin: 0; display: grid; gap: 4px; width: 96px; }
.ck-fotos img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-klein); border: 1px solid var(--linie); }
.ck-foto-weg { font: inherit; font-size: .75rem; background: none; border: 0; color: var(--besetzt); padding: 2px; cursor: pointer; text-decoration: underline; }
.ck-summe { font-weight: 600; }
.ck-summe p { margin: 0; }
.checkliste textarea, .checkliste .feld input { width: 100%; }

.status-k-offen { background: var(--kachel); color: var(--stein); }
.status-k-pruefen { background: #FFF1CC; color: #6B4B00; }
.status-k-vorgemerkt, .status-k-nachforderung { background: #FBE9E5; color: #9A2F1F; }
.status-k-erledigt { background: #E1F1E7; color: #1F6040; }
.status-m-entwurf { background: #FFF1CC; color: #6B4B00; }
.status-m-freigegeben { background: var(--kachel); color: var(--tanne); }
.status-m-gesendet { background: #E1F1E7; color: #1F6040; }
.status-m-fehler { background: #FBE9E5; color: #9A2F1F; }
.status-m-verworfen { background: var(--porzellan); color: var(--stein); }
h2 .status { vertical-align: middle; margin-left: 6px; }
.marke-hell { background: var(--porzellan); color: var(--stein); }

.mail-vorschau { width: 100%; height: 72vh; min-height: 480px; border: 1px solid var(--linie); border-radius: var(--r-kachel); background: var(--porzellan); }
.platzhalter { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: .875rem; margin: 8px 0 0; }
.platzhalter dd { margin: 0; color: var(--stein); }

.tabelle-formular td { padding: 6px 6px 6px 0; vertical-align: middle; }
.tabelle-formular input:not([type="checkbox"]), .tabelle-formular select { width: 100%; min-width: 0; }
.tabelle-formular td:first-child { min-width: 200px; }
.zelle-mitte { text-align: center; }
.eingabe-kurz { max-width: 5em; }
.tabelle-formular .eingabe-zahl { max-width: 7em; }
input.ist-fehlend { border-color: var(--besetzt); background: #FDF4F1; }

.uebergabe { border-top: 1px solid var(--kachel); padding-top: 12px; margin-top: 12px; }
.uebergabe h3 small { font-weight: 400; color: var(--stein); }
.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.foto-raster img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--r-klein); border: 1px solid var(--linie); }

.akte { list-style: none; margin: 0; padding: 0; }
.akte li { padding: 10px 0 10px 14px; border-left: 3px solid var(--linie); margin-left: 4px; }
.akte li p { margin: 0 0 4px; }
.akte-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.akte-kopf .zahl { margin-left: auto; font-weight: 650; }
.akte-reparatur { border-left-color: var(--besetzt) !important; }
.akte-pruefung { border-left-color: var(--gelb) !important; }
.akte-reinigung { border-left-color: var(--frei) !important; }

/* ---------- Einstellungen: Kopf mit Reitern ---------- */
.bereich-kopf { margin: 16px 0 24px; }
.bereich-kopf h1 { margin-bottom: 14px; }
.reiter {
  display: flex; gap: 2px; margin: 0 calc(-1 * var(--rand)) 16px; padding: 0 var(--rand);
  border-bottom: 1px solid var(--linie); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  position: relative; flex: none; padding: 10px 14px 12px; color: var(--stein); text-decoration: none;
  font-weight: 600; font-size: .9375rem; white-space: nowrap; border-radius: var(--r-klein) var(--r-klein) 0 0;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.reiter a:hover { color: var(--tanne-tief); background: var(--kachel); }
.reiter a.ist-aktiv { color: var(--tanne-tief); }
.reiter a.ist-aktiv::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--tanne); }
.reiter a:focus-visible { box-shadow: var(--fokus); }
.reiter-zurueck { margin: 0 0 8px; }
.unterseite-titel { font-family: var(--f-head); font-weight: 400; font-size: 1.4rem; margin-bottom: .25em; }
@media (min-width: 1024px) {
  .bereich-kopf { margin-top: 0; }
  .reiter { margin-left: 0; margin-right: 0; padding: 0; }
}

.karte-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.karte-zeile p { margin: 0; flex: 1 1 280px; }
.vergleich { margin-bottom: 10px; }
.vergleich summary { display: flex; gap: 10px; align-items: baseline; }
.vergleich-liste { margin: 12px 0 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: .9375rem; }
.vergleich-liste del, .vergleich-liste ins { display: block; text-decoration: none; padding: 4px 8px; border-radius: var(--r-klein); }
.vergleich-liste del { background: #FBE9E5; color: #9A2F1F; }
.vergleich-liste ins { background: #E1F1E7; color: #1F6040; margin-top: 3px; }

/* ---------- Mängel vom Vormieter ---------- */
.ck-vorher { display: block; margin-top: 4px; padding: 4px 8px; border-radius: var(--r-klein); background: var(--kachel); color: var(--tanne-tief) !important; font-weight: 600; }
.nachmeldung { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-ctrl); background: #FFF6DD; border: 1px solid #F1D98C; }
.nachmeldung p { margin: 0 0 6px; }
.nachmeldung .aktionen { margin-top: 8px; align-items: center; }
.nachmeldung .feld-zeile { display: inline-flex; align-items: center; gap: 6px; }
tr.ist-vorher td { color: var(--stein); }

/* ---------- Finanzen ---------- */
.bereich-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.bereich-zeile h1 { margin: 0; }
.bereich-zeile .aktionen { margin: 0; }
.jahr-wahl select { min-width: 92px; font-weight: 650; }
.betrag-einnahme { color: #1F6040; }
.betrag-ausgabe { color: var(--tanne-tief); }
.ist-minus { color: #9A2F1F; }
.gross-betrag { font-family: var(--f-head); font-size: 2rem; line-height: 1.1; margin: 0 0 12px; }
.gross-betrag .status { font-family: var(--f-body); vertical-align: middle; }
tr.ist-storno td { color: var(--stein); }
tr.ist-storno td:not(:last-child) { text-decoration: line-through; text-decoration-color: rgba(86, 100, 95, .5); }
tr.ist-storno .marke-mini, tr.ist-storno a { text-decoration: none; }
.tabelle tfoot td { border-top: 1.5px solid var(--tanne); font-weight: 650; }
.marke-mini { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: var(--kachel); color: var(--tanne-tief); font-size: .75rem; font-weight: 650; vertical-align: 1px; }
.marke-storno { background: #FBE9E5; color: #9A2F1F; }
.status-r-offen { background: #FFF1CC; color: #6B4B00; }
.status-r-bezahlt { background: #E1F1E7; color: #1F6040; }
.status-r-storniert { background: var(--kachel); color: var(--stein); }
.aufgabenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aufgabenliste a { display: block; padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--porzellan); text-decoration: none; color: var(--tanne-tief); }
.aufgabenliste a:hover { background: var(--kachel); }
.aufgabenliste .ist-warnung a { background: #FFF6DD; }
.datei-knopf { position: relative; cursor: pointer; }
.datei-knopf .sym { width: 18px; height: 18px; }
.datei-knopf.ist-laedt { opacity: .6; pointer-events: none; }
.datei-knopf.ist-laedt::after { content: " …"; }
.ablage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ablage > div:first-child { flex: 1 1 320px; }
.ablage h2 { margin-bottom: 4px; }
.ablage p { margin: 0; }
.grenze svg { width: 100%; height: 12px; display: block; margin: 4px 0 10px; }
.grenze .g-hinten { fill: var(--kachel); }
.grenze .g-vorne { fill: var(--frei); }
.grenze-warnung .g-vorne { fill: #D9A300; }
.grenze-fehler .g-vorne { fill: var(--besetzt); }
.grenze line { stroke: var(--weiss); stroke-width: .8; }
.euer tr.ist-leer td { color: var(--stein); }
.euer-ergebnis { text-align: center; }
.euer-ergebnis p:first-child { margin: 0; color: var(--stein); font-weight: 600; }
.euer-ergebnis .gross-betrag { font-size: 2.4rem; margin: 4px 0; }

/* Belege */
.beleg-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .beleg-liste { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.beleg-liste a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); color: var(--tanne-tief); text-decoration: none; }
.beleg-liste a:hover { border-color: var(--tanne); }
.beleg-bild { width: 56px; height: 56px; border-radius: var(--r-klein); background: var(--kachel); display: grid; place-items: center; overflow: hidden; font-size: .6875rem; text-align: center; }
.beleg-bild img { width: 100%; height: 100%; object-fit: cover; }
.beleg-text small { display: block; color: var(--stein); }
.beleg-betrag { font-weight: 650; }
.beleg-vorschau img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-ctrl); background: var(--kachel); }
.beleg-zeile-form { align-items: end; }
.beleg-zeilen .aufklapp { margin: 6px 0; }

/* Kontoauszug */
.umsatz-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; }
.umsatz-kopf h2 { margin: 0; }
.umsatz-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.umsatz-karte { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px 14px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); }
.umsatz-karte.ist-sicher { border-color: #9CCDB0; box-shadow: inset 4px 0 0 var(--frei); }
.umsatz-haken { padding-top: 2px; }
.umsatz-info p { margin: 0 0 2px; }
.umsatz-zeile { display: flex; justify-content: space-between; gap: 12px; }
.umsatz-zeile span { font-weight: 650; white-space: nowrap; }
.umsatz-grund { font-size: .8125rem; color: var(--stein); }
.ist-sicher .umsatz-grund { color: #1F6040; font-weight: 600; }
.umsatz-wahl { grid-column: 1 / -1; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: center; }
@media (min-width: 1100px) {
  .umsatz-karte { grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  .umsatz-wahl { grid-column: auto; }
}
.schritte-klein { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .9375rem; }
.export-karte .feldreihe { margin-bottom: 10px; }
.export-karte .feld-zeile { margin-bottom: 10px; }

/* Diagramme (SVG) */
.raster-diagramme { display: grid; gap: 16px; }
@media (min-width: 1100px) { .raster-diagramme { grid-template-columns: repeat(2, minmax(0, 1fr)); } .raster-diagramme .karte-voll { grid-column: 1 / -1; } }
.diagramm { width: 100%; height: auto; display: block; overflow: visible; }
.diagramm + .diagramm { margin-top: 12px; }
.d-gitter { stroke: var(--linie); stroke-width: 1; stroke-dasharray: 2 4; }
.d-null { stroke: var(--stein); stroke-dasharray: none; }
.d-achse { fill: var(--stein); font-size: 12px; font-family: var(--f-body); font-variant-numeric: tabular-nums; }
.d-wert { fill: var(--tanne-tief); font-size: 13px; font-weight: 650; font-family: var(--f-body); }
.d-leer { fill: var(--stein); font-size: 14px; font-family: var(--f-body); }
rect.d-r1, circle.d-r1 { fill: var(--tanne); }
rect.d-r2, circle.d-r2 { fill: var(--gelb); }
rect.d-r3, circle.d-r3 { fill: var(--besetzt); }
rect:hover { opacity: .8; }
.d-linie { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.d-linie.d-r1 { stroke: var(--tanne); }
.d-linie.d-r2 { stroke: #C99A1E; }
.d-flaeche { stroke: none; opacity: .12; }
.d-flaeche.d-r1 { fill: var(--tanne); }
.d-flaeche.d-r2 { fill: var(--gelb); opacity: .35; }
.d-prognose { stroke: var(--stein); stroke-dasharray: 5 5; }
.d-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; font-size: .8125rem; color: var(--stein); }
.d-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.d-legende .d-r1 i { background: var(--tanne); }
.d-legende .d-r2 i { background: var(--gelb); }
.d-legende .d-r3 i { background: var(--besetzt); }
.d-kern { margin: 0 0 8px; }
.d-kern .d-r1 { color: var(--tanne); font-weight: 650; }
.d-kern .d-r2 { color: #8A6A00; font-weight: 650; }
.d-kern .d-r3 { color: var(--besetzt); font-weight: 650; }
.diagramm.d-breit { display: none; }
@media (min-width: 1100px) { .diagramm.d-breit { display: block; } .diagramm.d-schmal { display: none; } }
.mit-einheit { display: flex; align-items: center; gap: 6px; }
.mit-einheit input { flex: 1; min-width: 0; }
@media (max-width: 639px) {
  .bereich-zeile .aktionen { width: 100%; display: flex; flex-wrap: nowrap; gap: 8px; }
  .bereich-zeile .aktionen .knopf { flex: 1 1 auto; padding: 9px 10px; font-size: .9375rem; white-space: nowrap; }
  .bereich-zeile .jahr-wahl { flex: none; }
  .bereich-zeile .jahr-wahl select { width: 96px; min-width: 96px; }
  .bereich-zeile .aktionen .knopf { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Postfach ---------- */
.reiter-zahl { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--kachel); color: var(--tanne-tief); font-size: .75rem; text-align: center; }
.mail-liste { list-style: none; margin: 0; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); overflow: hidden; }
.mail-liste li + li { border-top: 1px solid var(--linie); }
.mail-liste a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; color: var(--tanne-tief); text-decoration: none; position: relative; }
.mail-liste a:hover { background: var(--porzellan); }
.mail-liste .ist-ungelesen a::before { content: ""; position: absolute; left: 6px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--tanne); }
.mail-liste .ist-ungelesen .mail-wer, .mail-liste .ist-ungelesen .mail-betreff { font-weight: 700; }
.mail-liste .ist-erledigt a { color: var(--stein); }
.mail-wer { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-wer small { color: var(--stein); font-weight: 400; }
.mail-zeit { font-size: .8125rem; color: var(--stein); white-space: nowrap; }
.mail-betreff { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-auszug { grid-column: 1 / -1; font-size: .875rem; color: var(--stein); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-marken { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mail-marken:empty { display: none; }
.mail-marken .marke-mini { margin-left: 0; }
.marke-gruen { background: #E1F1E7; color: #1F6040; }
.marke-leise { background: transparent; border: 1px solid var(--linie); color: var(--stein); font-weight: 500; }
.faden-titel { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); overflow-wrap: anywhere; }
.mail-karte { padding: 16px 18px; }
.mail-karte.mail-aus { background: #F4F8F6; border-color: #CFE0D8; }
.mail-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.mail-text { overflow-wrap: anywhere; line-height: 1.55; }
.mail-zitat { margin-top: 10px; }
.mail-zitat .mail-text { color: var(--stein); font-size: .9375rem; border-left: 3px solid var(--linie); padding-left: 10px; margin-top: 6px; }
.mail-fuss { margin: 10px 0 0; }
.anhang-liste { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--linie); display: grid; gap: 6px; font-size: .9375rem; }
.anhang-liste form.inline { display: inline; }
.antwort-karte { border-color: var(--tanne); box-shadow: inset 4px 0 0 var(--tanne); }
.antwort-text { min-height: 260px; font-family: var(--f-body); line-height: 1.55; }
.knopf-text .sym { width: 16px; height: 16px; vertical-align: -3px; }
.karte-mittel { max-width: 720px; }
.vorlage-ki { padding: 10px 0; border-top: 1px solid var(--linie); }
.vorlage-ki:first-of-type { border-top: 0; }
.vorlage-ki summary { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }

/* ---------- Mail wie Outlook: Ordnerleiste, Auswahl ---------- */
.mail-rahmen { display: grid; gap: 16px; align-items: start; }
.mail-ordner { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--rand) * -1); padding: 0 var(--rand) 4px; }
.mail-ordner::-webkit-scrollbar { display: none; }
.mail-ordner ul { display: contents; list-style: none; margin: 0; padding: 0; }
.mail-ordner a { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; border-radius: var(--r-ctrl); border: 1px solid var(--linie);
  background: var(--weiss); color: var(--tanne-tief); text-decoration: none; font-size: .875rem; font-weight: 600; }
.mail-ordner a.ist-aktiv { background: var(--tanne); border-color: var(--tanne); color: var(--weiss); }
.mail-ordner a.ist-aktiv .ordner-zahl { background: rgba(255, 255, 255, .2); color: var(--weiss); }
.ordner-gruppe { display: none; }
.ordner-zahl { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--kachel); font-size: .75rem; text-align: center; font-weight: 600; }
.ordner-zahl.ist-fett { font-weight: 750; }
.ordner-warnung .ordner-zahl { background: #F9E1DC; color: var(--besetzt); }
@media (min-width: 1024px) {
  .mail-rahmen { grid-template-columns: 224px minmax(0, 1fr); }
  .mail-ordner { display: block; position: sticky; top: 16px; margin: 0; padding: 10px 8px; overflow: visible;
    background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); }
  .mail-ordner ul { display: block; margin-bottom: 6px; }
  .mail-ordner a { justify-content: space-between; border: 0; border-radius: var(--r-klein); padding: 6px 10px; background: transparent; font-weight: 500; font-size: .9375rem; }
  .mail-ordner a:hover { background: var(--porzellan); }
  .mail-ordner a.ist-aktiv { background: var(--kachel); color: var(--tanne-tief); font-weight: 650; }
  .mail-ordner a.ist-aktiv .ordner-zahl { background: var(--weiss); color: var(--tanne-tief); }
  .mail-ordner .ordner-haupt { font-weight: 650; }
  .mail-ordner .ordner-unter { padding-left: 22px; }
  .ordner-gruppe { display: block; margin: 8px 10px 4px; font-size: .8125rem; font-weight: 650; color: var(--stein); }
  .ordner-gruppe:first-child { margin-top: 2px; }
  .ordner-sonder { border-top: 1px solid var(--linie); padding-top: 6px !important; }
}
.mail-inhalt { min-width: 0; }
.mail-inhalt .filterleiste { margin-bottom: 10px; }
.mail-inhalt .filterleiste input[type=search] { flex: 1; }

.auswahl-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: -1px; background: var(--kachel);
  border: 1px solid var(--linie); border-radius: var(--r-kachel) var(--r-kachel) 0 0; position: sticky; top: 0; z-index: 2; }
.auswahl-leiste + .mail-liste { border-top-left-radius: 0; border-top-right-radius: 0; }
.auswahl-alle { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; min-width: 110px; cursor: pointer; }
.auswahl-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.auswahl-knoepfe[hidden] { display: none; }
.auswahl-knoepfe .knopf { padding: 6px 12px; min-height: 34px; font-size: .875rem; }
.auswahl-knoepfe .knopf .sym { width: 16px; height: 16px; }
.auswahl-knoepfe select { min-height: 34px; padding: 4px 30px 4px 10px; font-size: .875rem; }
@media (max-width: 640px) { .auswahl-knoepfe .knopf span { display: none; } .auswahl-knoepfe .knopf .sym + span { display: none; } }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--tanne); }
.mail-liste-auswahl li { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
.mail-haken { display: flex; justify-content: center; padding-top: 14px; cursor: pointer; }
.mail-liste-auswahl a { padding-left: 16px; }
.mail-liste-auswahl .ist-ungelesen a::before { left: 4px; }
.mail-liste li.ist-gewaehlt { background: #EAF3EF; }
.mail-liste li.ist-markiert .mail-zeit .sym { width: 14px; height: 14px; color: var(--besetzt); vertical-align: -2px; }
.mail-liste li.ist-problem { box-shadow: inset 3px 0 0 var(--besetzt); }
.faden-leiste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.faden-leiste .knopf { padding: 6px 12px; min-height: 34px; font-size: .875rem; }
.faden-leiste .knopf .sym, .kunde-box .sym { width: 16px; height: 16px; vertical-align: -3px; }
.sym-fahne { width: 22px; height: 22px; color: var(--besetzt); vertical-align: -2px; }
.kunde-box { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--linie); }
.kunde-box p { margin: 0; }

/* ---------- Kunden ---------- */
.marke-stamm { background: #FFF1CC; color: #7A5300; }
.marke-stamm .sym { width: 12px; height: 12px; vertical-align: -1px; }
.liste-schlicht { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste-schlicht li small { color: var(--stein); }
.doppelt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doppelt-liste li { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--kachel); }
.doppelt-liste small { color: var(--stein); }
.doppelt-knoepfe { display: flex; gap: 6px; margin-top: 6px; }
.umschalter-klein a { padding: 4px 10px; font-size: .8125rem; }
.verlauf { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.verlauf a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--r-ctrl); text-decoration: none; color: var(--tanne-tief); }
.verlauf a:hover { background: var(--porzellan); }
.verlauf-aus a { background: #F4F8F6; margin-left: 24px; }
.verlauf-ein a { margin-right: 24px; }
.verlauf .ist-problem a { border-color: var(--besetzt); }
.verlauf-kopf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.verlauf-kopf .marke-mini { margin-left: 0; }
.verlauf-kopf .klein { margin-left: auto; }
.verlauf-betreff { font-weight: 600; overflow-wrap: anywhere; }
.verlauf-auszug { font-size: .875rem; color: var(--stein); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fest { padding: 10px 0; border-top: 1px solid var(--kachel); }
.fest:first-of-type { border-top: 0; }
.fest p { margin: 0 0 6px; }
.fest.ist-aus { opacity: .6; }
.fest-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fest .mini-formular, .fest-vorschlag .mini-formular { margin-top: 10px; }
.fest-vorschlag summary { color: var(--tanne); }
.zusammen-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--kachel); }
.notiz-text { white-space: normal; font-size: .9375rem; background: var(--porzellan); border-radius: var(--r-klein); padding: 10px 12px; }
.termin-kunde { border-left-color: var(--gelb); }
.karte h2 .sym { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- Angebot (Seite für Kunden) ---------- */
.angebot-seite { width: 100%; }
.angebot-seite h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.werte .werte-summe { border-top: 2px solid var(--tanne-tief); padding-top: 10px; border-bottom: 0; }
.werte .werte-summe dd { font-size: 1.25rem; }
.angebot-nein { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.angebot-fuss { margin-top: 24px; text-align: center; }
@media (min-width: 900px) { .kennzahlen-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kennzahlen-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Symbole im Text (Überschriften, Marken, Links) stehen in der Zeile */
.karte h2 .sym, .marke-mini .sym, .kunde-box .sym, .faden-titel .sym, .mail-zeit .sym, .knopf-text .sym, .auswahl-knoepfe .sym, .faden-leiste .sym { display: inline-block; }

/* ---------- Briefkopf ---------- */
.briefkopf-logo { width: 72px; height: 72px; border-radius: 12px; margin-bottom: 8px; }
.signatur-vorschau { width: 100%; height: 330px; border: 1px solid var(--linie); border-radius: var(--r-ctrl); background: #fff; }

/* ---------- Akquise ---------- */
.regeln ul, .regeln-kasten ul { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.regeln summary { cursor: pointer; }
.status-a-neu { background: var(--kachel); color: var(--tanne-tief); }
.status-a-angesprochen { background: #E3EEF7; color: #1D4F75; }
.status-a-interessiert { background: #FFF1CC; color: #7A5300; }
.status-a-angebot { background: #F6E3F2; color: #6D2A61; }
.status-a-gebucht { background: #E1F1E7; color: #1F6040; }
.status-a-kein_interesse { background: #F2F2F0; color: var(--stein); }
.tafel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.tafel-spalte { background: var(--kachel); border-radius: var(--r-kachel); padding: 10px; display: grid; gap: 8px; border-top: 4px solid var(--linie); }
.tafel-spalte h2 { display: flex; justify-content: space-between; align-items: center; font-size: .9375rem; margin: 0 2px 2px; }
.status-rand-angesprochen { border-top-color: #4F86B5; } .status-rand-interessiert { border-top-color: var(--gelb); }
.status-rand-angebot { border-top-color: #A3528F; } .status-rand-gebucht { border-top-color: var(--frei); } .status-rand-kein_interesse { opacity: .75; }
.tafel-karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-ctrl); padding: 10px 12px; display: grid; gap: 3px; font-size: .9375rem; }
.tafel-karte a { text-decoration: none; color: var(--tanne-tief); }
.tafel-karte small { color: var(--stein); }
.tafel-karte .marke-mini { margin-left: 0; justify-self: start; }
.tafel-bedarf { font-size: .8125rem; color: var(--tanne-tief); }
.ist-faellig { color: var(--besetzt); font-weight: 650; }
.legende { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .875rem; }
.punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.k-akquise circle { stroke: #fff; stroke-width: .35; }
.k-akquise .status-a-neu { fill: #7F8F89; } .k-akquise .status-a-angesprochen { fill: #4F86B5; } .k-akquise .status-a-interessiert { fill: #E8B23A; }
.k-akquise .status-a-angebot { fill: #A3528F; } .k-akquise .status-a-gebucht { fill: var(--frei); } .k-akquise .status-a-kein_interesse { fill: #C9CFCC; }
.legende .status-a-neu { background: #7F8F89; } .legende .status-a-angesprochen { background: #4F86B5; } .legende .status-a-interessiert { background: #E8B23A; }
.legende .status-a-angebot { background: #A3528F; } .legende .status-a-gebucht { background: var(--frei); } .legende .status-a-kein_interesse { background: #C9CFCC; }
.karte-akquise { border-color: var(--tanne); box-shadow: inset 4px 0 0 var(--tanne); }
.kontaktwege { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.kontaktwege .sym { width: 18px; height: 18px; display: inline-block; }
.knopf.ist-gesperrt { opacity: .45; cursor: not-allowed; }
.wege-gruende { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 2px; }
.wege-gruende .ist-ok b { color: var(--frei); } .wege-gruende .ist-nein b { color: var(--stein); }
.leitfaden { white-space: normal; line-height: 1.6; }
.verlauf-akquise li { border: 1px solid var(--linie); border-radius: var(--r-ctrl); padding: 8px 12px; display: grid; gap: 4px; }
.verlauf-auszug-lang { font-size: .9375rem; overflow-wrap: anywhere; }
.haken-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.funde { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fund { display: grid; grid-template-columns: 40px minmax(0, 1fr); background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); padding: 12px 14px 12px 0; }
.fund h2 { margin: 0 0 4px; }
.fund p { margin: 0 0 4px; }
.fund.ist-erledigt { opacity: .7; }
.fund.ist-gewaehlt { background: #EAF3EF; }
@media (max-width: 639px) {
  .kennzahlen { gap: 8px; }
  .kennzahlen div { padding: 8px 10px; }
  .kennzahlen dd { font-size: 1rem; }
}
/* Sicherheitsnetz: Am Handy lässt sich die Seite nie seitlich verschieben (clip statt hidden, damit „sticky“ weiter funktioniert) */
html, body { overflow-x: clip; }

/* ---------- Zeilenlisten (Heute): eine Zeile je Punkt, die ganze Zeile ist der Link ---------- */
.zeilen { list-style: none; margin: 0; padding: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r-kachel); overflow: hidden; }
.zeilen li + li { border-top: 1px solid var(--kachel); }
.zeile { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 12px 14px; color: var(--tanne-tief); text-decoration: none; }
.zeile:hover { background: var(--porzellan); }
.zeile-art { font-size: .8125rem; font-weight: 650; color: var(--stein); }
.zeile-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile-meta { font-size: .8125rem; color: var(--stein); white-space: nowrap; }
.zeile.ist-warnung { box-shadow: inset 3px 0 0 var(--gelb); }
.zeile.ist-warnung .zeile-art { color: #7A5300; }
@media (max-width: 639px) {
  .zeile { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 14px; }
  .zeile-art { grid-column: 1 / -1; font-size: .75rem; }
}
@media (max-width: 639px) { .zeile-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
@media (max-width: 767px) { .nur-pc { display: none; } }
.tafel-karte[draggable="true"] { cursor: grab; }
.tafel-karte.ist-gezogen { opacity: .5; }
.tafel-spalte.ist-ziel { outline: 2px dashed var(--tanne); outline-offset: -2px; }
