/* =====================================================================
   Inkasso-Datenbank – Oberfläche
   Ruhiges, gut lesbares Business-Layout. Hell und dunkel (je nach System).
   ===================================================================== */

:root {
  --bg: #f6f7f9;
  --flaeche: #ffffff;
  --flaeche-2: #f1f3f6;
  --rand: #e3e6eb;
  --text: #1c2230;
  --text-2: #5b6474;
  --text-3: #8a93a3;
  --akzent: #2f6fdf;
  --akzent-hell: #e8f0fd;
  --gruen: #1f8a4c;  --gruen-hell: #e4f5eb;
  --gelb: #9a6700;   --gelb-hell: #fdf3d8;
  --rot: #c62f2f;    --rot-hell: #fde8e8;
  --leiste: #151b28;
  --leiste-text: #c3c9d4;
  --leiste-aktiv: #ffffff;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(16, 24, 40, .05);
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131b;
    --flaeche: #171c26;
    --flaeche-2: #1e2430;
    --rand: #2a3140;
    --text: #e6e9ef;
    --text-2: #a5adbb;
    --text-3: #77808f;
    --akzent: #6c9cf5;
    --akzent-hell: #1c2a45;
    --gruen: #5cc98a;  --gruen-hell: #16301f;
    --gelb: #e3b341;   --gelb-hell: #33290f;
    --rot: #f07070;    --rot-hell: #3a1a1a;
    --leiste: #0b0e14;
    --schatten: none;
  }
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: var(--schrift);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2rem 0 1.2rem; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 .8rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
       background: var(--flaeche-2); padding: .1em .35em; border-radius: 4px; }
.gedimmt { color: var(--text-3); font-weight: normal; }

/* ---------- Rahmen: Navigation links, Inhalt rechts ---------- */
.rahmen { display: flex; min-height: 100vh; }
.seitenleiste {
  width: 220px; flex-shrink: 0;
  background: var(--leiste); color: var(--leiste-text);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 1.1rem .8rem;
}
.marke { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700;
         font-size: 1.1rem; padding: .2rem .5rem 1.2rem; }
.marke:hover { text-decoration: none; }
.marke-zeichen { display: inline-grid; place-items: center; width: 28px; height: 28px;
                 border-radius: 7px; background: var(--akzent); color: #fff; font-size: .95rem; }
.seitenleiste ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.seitenleiste li a {
  display: block; padding: .5rem .7rem; border-radius: 7px;
  color: var(--leiste-text); font-weight: 500;
}
.seitenleiste li a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.seitenleiste li a.aktiv { background: rgba(255,255,255,.1); color: var(--leiste-aktiv); }
.nav-gruppe { margin: 1.2rem .7rem .3rem; font-size: .72rem; text-transform: uppercase;
              letter-spacing: .08em; color: #6f7888; }
.benutzerbox { border-top: 1px solid rgba(255,255,255,.08); padding: .9rem .5rem 0;
               display: flex; justify-content: space-between; align-items: center; font-size: .85rem; gap: .5rem; }
.benutzerbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benutzerbox a { color: var(--leiste-text); }

.inhalt { flex: 1; min-width: 0; }
.kopfleiste {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rand);
  padding: .7rem 2rem;
}
.globalsuche input {
  width: 100%; max-width: 560px;
  padding: .55rem .9rem .55rem 2.2rem;
  border: 1px solid var(--rand); border-radius: 8px;
  background: var(--flaeche) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a93a3' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat .75rem center;
  color: var(--text); font: inherit;
}
main { padding: 1.6rem 2rem 3rem; max-width: 1400px; }

/* ---------- Formulare & Knöpfe ---------- */
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]):not([type=radio]), select {
  border: 1px solid var(--rand); border-radius: 7px; padding: .45rem .7rem;
  background: var(--flaeche); color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); }
button, .knopf-primaer {
  border: 1px solid var(--rand); background: var(--flaeche); color: var(--text);
  padding: .45rem .9rem; border-radius: 7px; cursor: pointer; font-weight: 500;
}
button:hover { background: var(--flaeche-2); }
.knopf-primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf-primaer:hover { filter: brightness(1.08); background: var(--akzent); }
.knopf-link { padding: .45rem .3rem; }

/* ---------- Listen ---------- */
.werkzeugleiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.werkzeugleiste input[type=search] { min-width: 260px; }
.werkzeugleiste .anzahl { margin-left: auto; color: var(--text-2); font-size: .9rem; }

.tabelle-rahmen { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
                  overflow-x: auto; box-shadow: var(--schatten); }
.tabelle { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabelle th {
  text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); background: var(--flaeche-2); padding: .6rem .9rem; white-space: nowrap;
  border-bottom: 1px solid var(--rand);
}
.tabelle th a { color: inherit; }
.tabelle td { padding: .6rem .9rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.tabelle.kompakt td, .tabelle.kompakt th { padding: .45rem .8rem; }
.zahl { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.datum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.zeilenlink { color: inherit; }

.seiten { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; color: var(--text-2); }
.seiten .aus { color: var(--text-3); }

.leer { background: var(--flaeche); border: 1px dashed var(--rand); border-radius: var(--radius);
        padding: 2rem; text-align: center; color: var(--text-2); }
.leer.klein { padding: 1rem; font-size: .92rem; }

/* ---------- Badges & Chips ---------- */
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 99px; font-size: .78rem; font-weight: 600;
         background: var(--akzent-hell); color: var(--akzent); white-space: nowrap; vertical-align: middle; }
.badge-gruen { background: var(--gruen-hell); color: var(--gruen); }
.badge-gelb  { background: var(--gelb-hell);  color: var(--gelb); }
.badge-rot   { background: var(--rot-hell);   color: var(--rot); }
.badge-grau  { background: var(--flaeche-2);  color: var(--text-2); }
.chip { display: inline-block; padding: .25rem .6rem; border-radius: 7px; border: 1px solid var(--rand);
        background: var(--flaeche); font-size: .85rem; margin: .2rem .3rem .2rem 0; color: var(--text); }
.chip-kosten { background: var(--flaeche-2); }

/* ---------- Detailseiten ---------- */
.kopfzeile-detail { display: flex; justify-content: space-between; align-items: center; margin: -.6rem 0 1.2rem; }
.zurueck { color: var(--text-2); font-size: .9rem; }
.badges { display: flex; gap: .4rem; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.kachel { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
          padding: 1rem 1.1rem; box-shadow: var(--schatten); }
.kachel-titel { color: var(--text-2); font-size: .82rem; font-weight: 500; }
.kachel-wert { font-size: 1.45rem; font-weight: 650; margin-top: .2rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kachel-hinweis { color: var(--text-3); font-size: .8rem; margin-top: .15rem; }
.betrag-offen { color: var(--rot); }
.betrag-ok { color: var(--gruen); }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
         padding: 1.1rem 1.2rem; box-shadow: var(--schatten); }
.karte h2, .abschnitt h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.karte-titel { font-weight: 600; font-size: 1.05rem; margin: 0 0 .4rem; }
.kontakt { margin-top: .5rem; color: var(--text-2); font-size: .92rem; }
.abschnitt { margin-bottom: 1.6rem; }
.felder + .abschnitt { margin-top: 1.6rem; }
.summe { text-align: right; margin-top: .5rem; color: var(--text-2); }
.einleitung { color: var(--text-2); max-width: 760px; margin-top: -.4rem; }

.felder { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: .35rem 1rem; margin: 0; font-size: .93rem; }
.felder dt { color: var(--text-2); }
.felder dd { margin: 0; overflow-wrap: anywhere; }

.schrittfolge { list-style: none; padding: 0; margin: .8rem 0 0; border-left: 2px solid var(--rand); }
.schrittfolge li { position: relative; padding: .2rem 0 .2rem 1rem; font-size: .9rem; color: var(--text-3); }
.schrittfolge li::before { content: ""; position: absolute; left: -6px; top: .6rem; width: 10px; height: 10px;
                           border-radius: 50%; background: var(--flaeche); border: 2px solid var(--rand); }
.schrittfolge li.erledigt { color: var(--text-2); }
.schrittfolge li.erledigt::before { background: var(--gruen); border-color: var(--gruen); }
.schrittfolge li.aktuell { color: var(--text); font-weight: 600; }
.schrittfolge li.aktuell::before { background: var(--akzent); border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }

.zeitleiste { list-style: none; margin: 0; padding: 0; }
.zeitleiste li { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px;
                 padding: .6rem .8rem; margin-bottom: .5rem; }
.zeitleiste li.brief { border-left: 3px solid var(--akzent); }
.zeitleiste .zeit { font-size: .8rem; color: var(--text-3); margin-bottom: .2rem; }
.zeitleiste .text { font-size: .92rem; overflow-wrap: anywhere; }

.ablauf { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.ablauf li { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .5rem; }
.ablauf-kopf { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ablauf-nr { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%;
             background: var(--akzent-hell); color: var(--akzent); font-weight: 700; font-size: .85rem; }
.ablauf-details { margin: .5rem 0 0 2.2rem; }
.liste-einfach { margin: 0; padding-left: 1.1rem; }

.briefvorschau { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
                 padding: 1.6rem 2rem; max-width: 820px; font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
mark.platzhalter { background: var(--gelb-hell); color: var(--gelb); padding: 0 .2em; border-radius: 3px;
                   font-family: ui-monospace, Menlo, monospace; font-size: .85em; }

/* ---------- Meldungen & Login ---------- */
.meldung { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .93rem; }
.meldung-fehler { background: var(--rot-hell); color: var(--rot); }
.ohne-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; max-width: none; }
.login-box { width: 100%; max-width: 380px; background: var(--flaeche); border: 1px solid var(--rand);
             border-radius: 14px; padding: 2rem; box-shadow: 0 10px 30px rgba(16,24,40,.08); }
.login-marke { color: var(--text); padding: 0 0 1rem; }
.login-box h1 { font-size: 1.3rem; margin-bottom: 1rem; }
.login-box label { display: block; font-size: .88rem; color: var(--text-2); margin-bottom: .9rem; }
.login-box input { display: block; width: 100%; margin-top: .3rem; }
.login-box button { width: 100%; padding: .6rem; margin-top: .4rem; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 860px) {
  .rahmen { flex-direction: column; }
  .seitenleiste { width: auto; height: auto; position: static; padding: .7rem; }
  .seitenleiste ul { display: flex; flex-wrap: wrap; gap: .2rem; }
  .nav-gruppe { display: none; }
  .marke { padding-bottom: .5rem; }
  .benutzerbox { border: 0; padding-top: .5rem; }
  main, .kopfleiste { padding-left: 1rem; padding-right: 1rem; }
  .raster-2 { grid-template-columns: 1fr; }
}

/* ---------- Druck ---------- */
@media print {
  .seitenleiste, .kopfleiste, .werkzeugleiste, .seiten, .zurueck { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
}

/* ---------- Reiter (ohne JavaScript) ---------- */
.reiter > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.reiter-leiste { display: flex; gap: .2rem; border-bottom: 1px solid var(--rand); margin-bottom: 1.2rem; overflow-x: auto; }
.reiter-leiste label { padding: .6rem 1rem; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter-leiste label:hover { color: var(--text); }
.reiter-leiste .zahl-badge { margin-left: .35rem; font-size: .75rem; background: var(--flaeche-2); color: var(--text-2); padding: .05rem .45rem; border-radius: 99px; }
.reiter-inhalt { display: none; }
.karte-titel.gross { font-size: 1.25rem; margin-bottom: 1rem; }
.reiter > input:nth-of-type(1):checked ~ .reiter-leiste label:nth-of-type(1) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(1):checked ~ div.reiter-inhalt:nth-of-type(2) { display: block; }
.reiter > input:nth-of-type(1):focus-visible ~ .reiter-leiste label:nth-of-type(1) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(2):checked ~ .reiter-leiste label:nth-of-type(2) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(2):checked ~ div.reiter-inhalt:nth-of-type(3) { display: block; }
.reiter > input:nth-of-type(2):focus-visible ~ .reiter-leiste label:nth-of-type(2) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(3):checked ~ .reiter-leiste label:nth-of-type(3) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(3):checked ~ div.reiter-inhalt:nth-of-type(4) { display: block; }
.reiter > input:nth-of-type(3):focus-visible ~ .reiter-leiste label:nth-of-type(3) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(4):checked ~ .reiter-leiste label:nth-of-type(4) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(4):checked ~ div.reiter-inhalt:nth-of-type(5) { display: block; }
.reiter > input:nth-of-type(4):focus-visible ~ .reiter-leiste label:nth-of-type(4) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(5):checked ~ .reiter-leiste label:nth-of-type(5) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(5):checked ~ div.reiter-inhalt:nth-of-type(6) { display: block; }
.reiter > input:nth-of-type(5):focus-visible ~ .reiter-leiste label:nth-of-type(5) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(6):checked ~ .reiter-leiste label:nth-of-type(6) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(6):checked ~ div.reiter-inhalt:nth-of-type(7) { display: block; }
.reiter > input:nth-of-type(6):focus-visible ~ .reiter-leiste label:nth-of-type(6) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(7):checked ~ .reiter-leiste label:nth-of-type(7) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(7):checked ~ div.reiter-inhalt:nth-of-type(8) { display: block; }
.reiter > input:nth-of-type(7):focus-visible ~ .reiter-leiste label:nth-of-type(7) { outline: 2px solid var(--akzent); }
.reiter > input:nth-of-type(8):checked ~ .reiter-leiste label:nth-of-type(8) { color: var(--akzent); border-bottom-color: var(--akzent); }
.reiter > input:nth-of-type(8):checked ~ div.reiter-inhalt:nth-of-type(9) { display: block; }
.reiter > input:nth-of-type(8):focus-visible ~ .reiter-leiste label:nth-of-type(8) { outline: 2px solid var(--akzent); }
label.link { color: var(--akzent); cursor: pointer; }
label.link:hover { text-decoration: underline; }
.hinweis { color: var(--text-3); font-size: .85rem; margin-top: .6rem; }
.meldung-hinweis { background: var(--gelb-hell); color: var(--gelb); }
.meldung-ok { background: var(--gruen-hell); color: var(--gruen); }
.aufstellung .summenzeile td { border-top: 2px solid var(--rand); font-weight: 600; }
.rechenblock { margin-bottom: 1rem; }
.rechenkopf { display: flex; justify-content: space-between; margin-bottom: .6rem; font-size: 1.02rem; }
.klein { font-size: .85rem; }
.ohne-abstand { margin: 0; }

/* ---------- Briefe (Stufe Briefe, 26.11.2026) ---------- */
.formular-zeile { align-items: center; }
.formular-zeile select { max-width: 100%; }
.formular { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: .55rem 1rem; align-items: center; max-width: 900px; }
.formular label { color: var(--text-2); font-size: .92rem; }
.formular > div { grid-column: 2; }
@media (max-width: 700px) { .formular { grid-template-columns: 1fr; } .formular > div { grid-column: 1; } }
.ohne-abstand { margin: 0; }
mark.fehlt { background: var(--rot-hell); color: var(--rot); padding: 0 .2em; border-radius: 3px; font-weight: 600; }
.brief-aktion { margin-top: 1rem; }
.brief-rahmen { overflow-x: auto; padding: 1rem 0; }

/* Briefblatt: A4 wie die Alvarium-Briefe (Logo oben Mitte, Firmenblock rechts, Fußzeile auf jeder Seite);
   Anschriftfeld nach DIN 5008 (links 25 mm, ab ca. 45 mm von oben). Maße in mm. */
.briefblatt {
  width: 210mm; min-height: 297mm; box-sizing: border-box; margin: 0 auto; position: relative;
  padding: 8mm 20mm 8mm 25mm; background: #fff; color: #111;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 10pt; line-height: 1.3;
  box-shadow: 0 2px 12px rgba(0,0,0,.18); display: flex; flex-direction: column;
}
.briefblatt i { font-style: italic; }
.brief-logo { height: 24mm; text-align: center; }
.brief-logo img { max-height: 22mm; max-width: 70mm; }
.brief-seiten, .brief-seiten > tbody, .brief-seiten > * > tr, .brief-seiten > * > tr > td { display: block; padding: 0; border: 0; }
.brief-seiten { flex: 1; width: 100%; border-collapse: collapse; }
.brief-seiten > thead, .brief-seiten > tfoot { display: none; }
.brief-oben { display: flex; justify-content: space-between; gap: 6mm; margin-top: 8mm; }
.brief-anschriftfeld { width: 85mm; flex: none; }
.brief-ruecksendung { font-size: 7pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 14mm -14mm; }
.brief-ruecksendung i, .brief-anschrift > i { font-size: 9pt; margin-right: 1.5mm; }
.brief-anschrift { display: flex; margin-left: -5mm; }
.brief-anschrift > i { width: 5mm; flex: none; }
.brief-anschrift > div { font-weight: 700; line-height: 1.3; }
.brief-firmenblock { font-style: normal; text-align: right; font-size: 10.5pt; line-height: 1.35; display: flex; flex-direction: column; gap: 3.5mm; }
.brief-firmenblock .gross { font-size: 11pt; }
.brief-info { display: grid; grid-template-columns: 37mm 1fr; gap: .8mm 0; margin: 8mm 0 9mm; font-size: 10.5pt; }
.brief-info dt { font-style: italic; }
.brief-info dd { margin: 0; }
.brief-text { text-align: justify; hyphens: auto; }
.brief-text p { margin: 0 0 1em; }
.brief-fuss { order: 9; margin-top: 8mm; font-size: 6.8pt; line-height: 1.3; color: #333; text-align: justify; }
.brief-aufstellung { border-collapse: collapse; margin: .6em 0 1em; text-align: left; }
.brief-aufstellung th { font-weight: 700; text-align: left; padding: 0 3mm .6mm 0; }
.brief-aufstellung td { padding: .3mm 3mm .3mm 0; vertical-align: top; }
.brief-aufstellung .zahl { text-align: right; white-space: nowrap; padding-left: 5mm; }
.brief-aufstellung .datum { white-space: nowrap; }
.brief-aufstellung.voll { width: 100%; }
.brief-aufstellung tr.brief-summe td { font-weight: 700; padding-top: 1.2mm; }
.email-blatt { max-width: 760px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.email-text { margin-top: 1rem; line-height: 1.5; }

@media print {
  @page { size: A4; margin: 8mm 20mm 8mm 25mm; @bottom-right { content: "Seite " counter(page) " von " counter(pages); font: 6.5pt Arial, sans-serif; color: #555; } }
  .nicht-drucken, .kopfzeile-detail, .brief-aktion, .meldung, main > h1 { display: none !important; }
  .rahmen, .inhalt, main, .brief-rahmen { display: block; padding: 0 !important; margin: 0 !important; overflow: visible; }
  .briefblatt { width: auto; min-height: 0; padding: 0; box-shadow: none; display: block; zoom: 1 !important; }
  /* Logo oben und Fußzeile unten auf jeder Seite; Kopf-/Fußzeilen der Tabelle halten den Platz frei */
  .brief-logo { position: fixed; top: 0; left: 0; right: 0; }
  .brief-fuss { position: fixed; bottom: 4mm; left: 0; right: 0; margin: 0; }
  .brief-seiten { display: table; }
  .brief-seiten > thead { display: table-header-group; }
  .brief-seiten > tfoot { display: table-footer-group; }
  .brief-seiten > tbody { display: table-row-group; }
  .brief-seiten > * > tr { display: table-row; }
  .brief-seiten > * > tr > td { display: table-cell; }
  .brief-platz-oben { height: 26mm; }
  .brief-platz-unten { height: 18mm; }
  .brief-aufstellung tr { break-inside: avoid; }
  mark.fehlt { background: none; color: inherit; font-weight: 400; }
}
.feld-kurz { width: 5.5rem; }
@media screen and (max-width: 1100px) { .briefblatt { zoom: .75; } }
@media screen and (max-width: 860px)  { .briefblatt { zoom: .5; } }
.logo-vorschau { max-height: 48px; vertical-align: middle; margin-right: .6rem; background: #fff; padding: 4px; border-radius: 4px; }
.karte-alt { opacity: .6; }
/* Bearbeiten (Stufe A) */
.formular textarea { border: 1px solid var(--rand); border-radius: 7px; padding: .45rem .7rem; background: var(--flaeche); color: var(--text); width: 100%; box-sizing: border-box; }
.formular textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.feld-mittel { width: 8.5rem; }
.staffel-eingabe { display: flex; flex-direction: column; gap: .3rem; }
.formular-knoepfe { display: flex; gap: .6rem; flex-wrap: wrap; }
.knopf-gefahr { color: var(--rot); border-color: var(--rot); }
.ws-tabelle input[type=number] { width: 4.5rem; }
.platzhalter-liste { columns: 2; font-size: .85rem; }
.platzhalter-liste code { cursor: text; }
/* Neues Dossier (Stufe B) */
.dossier-neu > section { margin-bottom: 1rem; }
.formular .volle-breite { grid-column: 1 / -1; margin: .2rem 0 .1rem; }
.formular h3.volle-breite { font-size: .95rem; color: var(--text-2); border-top: 1px solid var(--rand); padding-top: .8rem; }
.volle-breite-feld { width: 100%; box-sizing: border-box; }
.formular > span { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.forderung-eingabe input[type=text] { width: 100%; box-sizing: border-box; min-width: 7rem; }
/* Abrechnung (Stufe C) */
.brief-zwischen { font-size: 10.5pt; font-style: italic; margin: 5mm 0 1mm; color: #111; }
.brief-aufstellung tr.brief-zwischensumme td { border-top: .2mm solid #999; }
.brief-aufstellung.rechnung thead th { border-bottom: .3mm solid #111; }
.brief-aufstellung.rechnung tbody td { border-bottom: .1mm solid #ccc; }
.aufteilung { max-width: 720px; }
.abrechnung-kunde { margin-bottom: 1rem; }
/* Pipeline der Dossiers */
.pipeline { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .8rem; }
.pipeline-phase { flex: 1 0 8.5rem; display: flex; flex-direction: column; gap: .15rem; padding: .65rem .8rem; border: 1px solid var(--rand);
  border-radius: var(--radius); background: var(--flaeche); color: var(--text); border-top: 4px solid var(--phase, var(--akzent)); text-decoration: none; }
.pipeline-phase:hover { background: var(--flaeche-2); }
.pipeline-phase.aktiv { outline: 2px solid var(--phase, var(--akzent)); background: var(--akzent-hell); }
.pipeline-phase.leer { opacity: .5; }
.pipeline-titel { font-size: .8rem; color: var(--text-2); line-height: 1.2; min-height: 2em; }
.pipeline-zahl { font-size: 1.5rem; font-weight: 700; }
.pipeline-summe { font-size: .78rem; color: var(--text-3); }
.phase-neu { --phase: #8a93a3; } .phase-schriftlich { --phase: #2f6fdf; } .phase-telefon { --phase: #0e9aa7; }
.phase-ratenzahlung { --phase: #1f8a4c; } .phase-klaerung { --phase: #9a6700; } .phase-mahnverfahren { --phase: #c2410c; }
.phase-vollstreckung { --phase: #c62f2f; } .phase-insolvenz_anwalt { --phase: #7c3aed; } .phase-abschluss { --phase: #475569; } .phase-sonstiges { --phase: #94a3b8; }
.pipeline-schritte { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.chip-aktiv { outline: 2px solid var(--akzent); }
/* Testbereich */
.testbanner { position: sticky; top: 0; z-index: 50; background: #c62f2f; color: #fff; text-align: center; padding: .45rem 1rem; font-weight: 600; font-size: .9rem; }
.testbanner a { color: #fff; text-decoration: underline; margin-left: .5rem; }
body.im-testbereich .seitenleiste { border-right: 4px solid #c62f2f; }
.code-ansicht { white-space: pre-wrap; word-break: break-all; font-size: .75rem; background: var(--flaeche); border: 1px solid var(--rand); padding: 1rem; border-radius: var(--radius); }
@media print { .testbanner { display: none; } }
.phase-brief1 { --phase: #2f6fdf; } .phase-brief2 { --phase: #1d4ed8; } .phase-brief3 { --phase: #1e3a8a; }
.phase-adresse { --phase: #9a6700; } .phase-bonitaet { --phase: #b45309; } .phase-mahnbescheid { --phase: #c2410c; }
.phase-gerichtsvollzieher { --phase: #b91c1c; } .phase-pfueb { --phase: #991b1b; } .phase-insolvenz { --phase: #7c3aed; } .phase-anwalt { --phase: #5b21b6; }
/* Fall für Fall */
.blaettern { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem;
  padding: .5rem .7rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); }
.blaettern-mitte { color: var(--text-2); font-size: .9rem; text-align: center; flex: 1; }
@media print { .blaettern { display: none; } }

/* Copyright im Seitenfuß */
.seitenfuss { margin-top: 2.5rem; padding-top: .8rem; border-top: 1px solid var(--rand); color: var(--text-3); font-size: .75rem; text-align: center; }

/* Übersicht: Balken Zahlungseingang */
.balken { width: 100%; height: auto; max-height: 220px; }
.balken rect { fill: var(--akzent); }
.balken g:hover rect { opacity: .75; }
.balken text { fill: var(--text-3); font-size: 10px; }

/* Portal-Rechte beim Kunden */
.rechte-liste { display: grid; gap: .4rem; }
.rechte-liste label { display: flex; gap: .5rem; align-items: center; }
.rechte-liste .rechte-haupt { padding-bottom: .4rem; border-bottom: 1px solid var(--rand); margin-bottom: .2rem; }

/* Schuldnerportal */
.login-box.breit { max-width: 520px; }
.login-box label.zeile { display: block; font-weight: 400; }
.nachrichten { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.nachricht { max-width: 80%; padding: .6rem .8rem; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--rand); }
.nachricht.ausgang { align-self: flex-start; }
.nachricht.eingang { align-self: flex-end; background: var(--akzent-hell); }
.nachricht .kopf { font-size: .75rem; color: var(--text-3); margin-bottom: .2rem; }
.unterschrift-feld { border: 1px dashed var(--rand); border-radius: 8px; background: #fff; touch-action: none; width: 100%; max-width: 520px; height: 160px; display: block; }
.vereinbarung { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1rem 1.2rem; max-width: 820px; }

/* Admin-Vorschau */
.vorschaubanner { background: #6d28d9; }
.vorschaubanner form.inline { display: inline; }
.vorschaubanner .knopf-link { color: #fff; text-decoration: underline; }


/* =====================================================================
   Apple-Design (Stufe 7, 27.11.2026) – nach den WWDC-Prinzipien:
   Systemschrift mit größenabhängiger Laufweite, ruhige Systemfarben, durchscheinende
   Materialien (Seitenleiste, Kopfleiste), sofortiges Feedback beim Drücken,
   Segment-Reiter, hell/dunkel, weniger Bewegung/Transparenz/mehr Kontrast.
   Diese Schicht überschreibt die Grundgestaltung darüber (HTML unverändert).
   ===================================================================== */
:root {
  --bg: #f5f5f7;
  --flaeche: #ffffff;
  --flaeche-2: #f2f2f7;
  --flaeche-3: #e5e5ea;
  --rand: rgba(60, 60, 67, .13);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --akzent: #0071e3;
  --akzent-hell: rgba(0, 113, 227, .10);
  --gruen: #248a3d;  --gruen-hell: rgba(52, 199, 89, .14);
  --gelb: #b25000;   --gelb-hell: rgba(255, 159, 10, .16);
  --rot: #d70015;    --rot-hell: rgba(255, 59, 48, .12);
  --leiste: rgba(246, 246, 248, .78);
  --leiste-text: #1d1d1f;
  --leiste-aktiv: #ffffff;
  --material: rgba(255, 255, 255, .72);
  --radius: 14px;
  --radius-klein: 10px;
  --schatten: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 18px rgba(0, 0, 0, .04);
  --schatten-gross: 0 12px 40px rgba(0, 0, 0, .12);
  --fokus: 0 0 0 4px rgba(0, 113, 227, .28);
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-anzeige: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --feder: cubic-bezier(.25, .1, .25, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --flaeche: #1c1c1e;
    --flaeche-2: #2c2c2e;
    --flaeche-3: #3a3a3c;
    --rand: rgba(84, 84, 88, .55);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --akzent: #0a84ff;
    --akzent-hell: rgba(10, 132, 255, .18);
    --gruen: #30d158;  --gruen-hell: rgba(48, 209, 88, .16);
    --gelb: #ffd60a;   --gelb-hell: rgba(255, 214, 10, .14);
    --rot: #ff453a;    --rot-hell: rgba(255, 69, 58, .16);
    --leiste: rgba(28, 28, 30, .78);
    --leiste-text: #f5f5f7;
    --material: rgba(28, 28, 30, .72);
    --schatten: 0 0 0 .5px rgba(255, 255, 255, .08);
    --schatten-gross: 0 16px 48px rgba(0, 0, 0, .6);
    --fokus: 0 0 0 4px rgba(10, 132, 255, .4);
  }
}

/* ---------- Typografie: Laufweite und Zeilenabstand je Größe ---------- */
html { font-size: 93.75%; }   /* 15 px, folgt aber der Schriftgröße des Nutzers */
body { letter-spacing: -.008em; font-feature-settings: "kern"; text-rendering: optimizeLegibility; }
h1 { font-family: var(--schrift-anzeige); font-size: 2rem; font-weight: 700; line-height: 1.1;
     letter-spacing: -.024em; margin: .4rem 0 1.4rem; }
h2 { font-family: var(--schrift-anzeige); letter-spacing: -.012em; }
.karte h2, .abschnitt h2 { text-transform: none; letter-spacing: -.012em; font-size: 1.12rem;
                           font-weight: 600; color: var(--text); margin-bottom: .9rem; }
.einleitung { font-size: 1.02rem; line-height: 1.55; }
a { transition: opacity .15s var(--feder); }
a:hover { text-decoration: none; opacity: .75; }
a.zeilenlink:hover, .seitenleiste a:hover, .pipeline-phase:hover, .marke:hover { opacity: 1; }
::selection { background: var(--akzent-hell); }

/* ---------- Seitenleiste: helles Material wie in macOS ---------- */
.seitenleiste {
  background: var(--leiste); color: var(--leiste-text);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-right: .5px solid var(--rand); width: 232px; padding: 1.2rem .7rem;
}
.marke { color: var(--text); letter-spacing: -.02em; font-weight: 700; }
.marke-zeichen { border-radius: 8px; background: linear-gradient(180deg, #2a8cff, var(--akzent)); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.seitenleiste li a { color: var(--leiste-text); font-weight: 500; padding: .42rem .7rem; border-radius: 8px; margin: 1px 0;
                     transition: background-color .12s var(--feder), transform .1s var(--feder); }
.seitenleiste li a:hover { background: rgba(120, 120, 128, .12); color: var(--leiste-text); }
.seitenleiste li a:active { transform: scale(.98); }
.seitenleiste li a.aktiv { background: var(--akzent); color: #fff; }
.nav-gruppe { color: var(--text-3); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .78rem; margin: 1.3rem .7rem .35rem; }
.benutzerbox { border-top: .5px solid var(--rand); }
.benutzerbox, .benutzerbox a { color: var(--text-2); }

/* ---------- Kopfleiste: durchscheinend, Inhalt läuft darunter ---------- */
.kopfleiste { background: var(--material); border-bottom: .5px solid var(--rand);
              -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); padding: .65rem 2.2rem; }
.globalsuche input { border: 0; background-color: rgba(118, 118, 128, .12); border-radius: 10px; padding-top: .5rem; padding-bottom: .5rem; }
.globalsuche input:focus { outline: none; box-shadow: var(--fokus); background-color: var(--flaeche); }
main { padding: 1.8rem 2.2rem 3rem; }

/* ---------- Eingabefelder ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  border: .5px solid var(--rand); border-radius: var(--radius-klein); padding: .5rem .75rem;
  background: var(--flaeche); color: var(--text);
  transition: box-shadow .15s var(--feder), border-color .15s var(--feder);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent); box-shadow: var(--fokus); }
input[type=checkbox], input[type=radio] { accent-color: var(--akzent); width: 1.05em; height: 1.05em; }
select { -webkit-appearance: none; appearance: none; padding-right: 2rem;
  background: var(--flaeche) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238e8e93' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E") no-repeat right .75rem center; }

/* ---------- Knöpfe: Kapselform, Feedback sofort beim Drücken ---------- */
button, .knopf-primaer {
  border: 0; border-radius: 980px; padding: .5rem 1.1rem; font-weight: 500; letter-spacing: -.01em;
  background: rgba(118, 118, 128, .12); color: var(--akzent);
  transition: transform .1s var(--feder), background-color .15s var(--feder), filter .15s var(--feder);
}
button:hover { background: rgba(118, 118, 128, .18); }
button:active, .knopf-primaer:active, .knopf-link:active { transform: scale(.97); }
button:focus-visible, .knopf-primaer:focus-visible, a:focus-visible { outline: none; box-shadow: var(--fokus); }
.knopf-primaer { display: inline-block; background: var(--akzent); color: #fff; }
.knopf-primaer:hover { background: var(--akzent); filter: brightness(1.08); opacity: 1; }
.knopf-link { display: inline-block; border-radius: 980px; color: var(--akzent); padding: .45rem .5rem; transition: transform .1s var(--feder); }
button.knopf-link { background: transparent; padding: .35rem .4rem; }

/* ---------- Karten, Kacheln, Tabellen ---------- */
.karte, .kachel, .tabelle-rahmen, .briefvorschau, .vereinbarung { border: 0; border-radius: var(--radius); box-shadow: var(--schatten); }
.karte { padding: 1.25rem 1.4rem; }
.kacheln { gap: .9rem; }
.kachel { padding: 1.05rem 1.2rem 1.1rem; }
.kachel-titel { font-size: .86rem; font-weight: 500; color: var(--text-2); }
.kachel-wert { font-family: var(--schrift-anzeige); font-size: 1.85rem; font-weight: 600; letter-spacing: -.022em; line-height: 1.15; margin-top: .25rem; }
.kachel-hinweis { font-size: .8rem; }
.tabelle { font-size: .94rem; }
.tabelle th { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: var(--text-2);
              background: transparent; border-bottom: .5px solid var(--rand); padding: .7rem 1rem .55rem; }
.tabelle td { border-bottom: .5px solid var(--rand); padding: .62rem 1rem; }
.tabelle tbody tr { transition: background-color .12s var(--feder); }
.tabelle tbody tr:hover { background: rgba(118, 118, 128, .07); }
.leer { border: 0; background: var(--flaeche); box-shadow: var(--schatten); border-radius: var(--radius); color: var(--text-3); }
.badge { font-weight: 600; letter-spacing: 0; padding: .14rem .55rem; }
.chip { border: 0; background: rgba(118, 118, 128, .12); border-radius: 980px; padding: .28rem .75rem; }
.meldung { border-radius: 12px; padding: .8rem 1rem; }
.felder dt { color: var(--text-2); }
.zeitleiste li, .ablauf li { border: 0; border-radius: 12px; box-shadow: var(--schatten); }
.zeitleiste li.brief { box-shadow: inset 3px 0 0 var(--akzent), var(--schatten); }

/* ---------- Reiter als Segment-Steuerung ---------- */
.reiter-leiste { display: inline-flex; max-width: 100%; gap: 2px; padding: 3px; border: 0; border-radius: 11px;
                 background: rgba(118, 118, 128, .12); margin-bottom: 1.4rem; }
.reiter-leiste label { border: 0; margin: 0; padding: .38rem .95rem; border-radius: 8px; font-size: .9rem; color: var(--text);
                       transition: background-color .15s var(--feder), box-shadow .15s var(--feder); }
.reiter-leiste label:hover { background: rgba(118, 118, 128, .1); }
.reiter > input:nth-of-type(1):checked ~ .reiter-leiste label:nth-of-type(1) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(2):checked ~ .reiter-leiste label:nth-of-type(2) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(3):checked ~ .reiter-leiste label:nth-of-type(3) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(4):checked ~ .reiter-leiste label:nth-of-type(4) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(5):checked ~ .reiter-leiste label:nth-of-type(5) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(6):checked ~ .reiter-leiste label:nth-of-type(6) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(7):checked ~ .reiter-leiste label:nth-of-type(7) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
.reiter > input:nth-of-type(8):checked ~ .reiter-leiste label:nth-of-type(8) { background: var(--flaeche); color: var(--text); border-bottom-color: transparent; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) {
  .reiter-leiste label { color: var(--text); }
}

/* ---------- Pipeline: ruhige Karten mit Akzent der Auswahl ---------- */
.pipeline-phase { border: 0; border-radius: 12px; background: var(--flaeche); box-shadow: var(--schatten);
                  transition: transform .1s var(--feder), box-shadow .15s var(--feder); }
.pipeline-phase:hover { background: var(--flaeche); box-shadow: var(--schatten), 0 0 0 .5px var(--rand); }
.pipeline-phase:active { transform: scale(.98); }
.pipeline-phase.aktiv { outline: 0; background: var(--akzent); box-shadow: 0 4px 14px rgba(0, 113, 227, .3); }
.pipeline-phase.aktiv .pipeline-titel, .pipeline-phase.aktiv .pipeline-zahl, .pipeline-phase.aktiv .pipeline-summe { color: #fff; }
.pipeline-zahl { font-family: var(--schrift-anzeige); letter-spacing: -.02em; font-weight: 600; }

/* ---------- Anmeldung, Banner, Fuß ---------- */
.login-box { border: 0; border-radius: 20px; box-shadow: var(--schatten-gross); padding: 2.2rem 2rem; }
.login-box h1 { font-size: 1.6rem; }
.login-box input { margin-top: .35rem; }
.login-box button { border-radius: 12px; padding: .7rem; background: var(--akzent); color: #fff; }
.testbanner { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); background: rgba(215, 0, 21, .88); font-weight: 600; letter-spacing: -.01em; }
.vorschaubanner { background: rgba(94, 92, 230, .9); }
.seitenfuss { border-top: .5px solid var(--rand); color: var(--text-3); }
.nachricht { border: 0; border-radius: 18px; background: rgba(118, 118, 128, .12); }
.nachricht.eingang { background: var(--akzent); color: #fff; }
.nachricht.eingang .kopf { color: rgba(255, 255, 255, .75); }
.unterschrift-feld { border-radius: 12px; }
.balken rect { fill: var(--akzent); }

/* ---------- Kleine Bildschirme: Leiste oben als Material ---------- */
@media (max-width: 860px) {
  .seitenleiste { width: auto; position: sticky; top: 0; z-index: 20; border-right: 0; border-bottom: .5px solid var(--rand); padding: .6rem .7rem; }
  .seitenleiste ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .seitenleiste li a { white-space: nowrap; }
  .kopfleiste { position: static; }
  h1 { font-size: 1.6rem; }
  main, .kopfleiste { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Barrierefreiheit (Systemeinstellungen) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  button:active, .knopf-primaer:active, .knopf-link:active, .pipeline-phase:active, .seitenleiste li a:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .seitenleiste, .kopfleiste, .testbanner { -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root { --leiste: #f2f2f7; --material: #f5f5f7; }
}
@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  :root { --leiste: #1c1c1e; --material: #1c1c1e; }
}
@media (prefers-contrast: more) {
  :root { --rand: rgba(0, 0, 0, .45); --text-2: #3a3a3c; --text-3: #48484a; }
  .karte, .kachel, .tabelle-rahmen, .pipeline-phase, .leer { box-shadow: 0 0 0 1px var(--rand); }
}
@media print {
  .karte, .kachel, .tabelle-rahmen { box-shadow: none; border: 1px solid #ccc; }
}
.kachel-wert { font-size: clamp(1.3rem, 1rem + 1.1vw, 1.85rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kachel { padding: .85rem .95rem; }
  .benutzerbox { justify-content: flex-start; gap: 1rem; }
}
.kopfzeile-detail { flex-wrap: wrap; gap: .5rem; }
.kopfzeile-detail .badge { white-space: normal; }

/* =====================================================================
   Liquid Glass nach Skill „apple-liquid-glass“ (xenitV1, MIT; .claude/skills/apple-liquid-glass)
   Regel 1: Glas NUR in der Bedienebene (Seitenleiste, Kopfleiste, Anmeldekarte) –
   Inhaltskarten bleiben massiv mit Schatten. Glas = getönt + blur(28px) saturate(180%)
   + Lichtkante (::before, oben links am hellsten) + Glanz (::after) + Brechung an der Kante
   (assets/refraction.js, Chromium; Safari/Firefox: sauberes Milchglas).
   ===================================================================== */
:root {
  --bg: #f2f2f7;  --bg-2: #e9e9ef;
  --flaeche: #ffffff; --flaeche-2: #f6f6f8;
  --glas: rgba(252, 252, 254, .72);
  --glas-dicht: rgba(252, 252, 254, .92);
  --glas-brechung: rgba(252, 252, 254, .42);
  --glas-rand-1: rgba(255, 255, 255, .90); --glas-rand-2: rgba(255, 255, 255, .16); --glas-rand-3: rgba(255, 255, 255, .55);
  --glas-kante: rgba(255, 255, 255, .85); --glas-kante-2: rgba(255, 255, 255, .35);
  --glas-schatten: 0 8px 26px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .06);
  --glas-blur: saturate(180%) blur(28px);
  --glas-glanz: .30;
  --karten-schatten: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .045);
  --karten-schatten-h: 0 2px 4px rgba(0, 0, 0, .06), 0 14px 34px rgba(0, 0, 0, .085);
  --radius: 18px;
  --radius-klein: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131316;  --bg-2: #0b0b0d;
    --flaeche: #1d1d20; --flaeche-2: #26262a;
    --glas: rgba(38, 38, 43, .72);
    --glas-dicht: rgba(32, 32, 36, .94);
    --glas-brechung: rgba(30, 30, 34, .48);
    --glas-rand-1: rgba(255, 255, 255, .42); --glas-rand-2: rgba(255, 255, 255, .06); --glas-rand-3: rgba(255, 255, 255, .20);
    --glas-kante: rgba(255, 255, 255, .22); --glas-kante-2: rgba(255, 255, 255, .08);
    --glas-schatten: 0 10px 34px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
    --glas-glanz: .15;
    --karten-schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    --karten-schatten-h: 0 2px 4px rgba(0, 0, 0, .45), 0 14px 34px rgba(0, 0, 0, .4);
  }
}

/* Grund: graue Seite, weiße Karten; ruhiger Farbschimmer, damit das Glas etwas zu brechen hat */
html, body { background: var(--bg); }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(0, 113, 227, .16), transparent 60%),
    radial-gradient(760px 560px at 92% 4%, rgba(97, 85, 245, .14), transparent 62%),
    radial-gradient(900px 700px at 70% 110%, rgba(0, 195, 208, .10), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ---------- Glas-Grundbaustein ---------- */
.glass {
  position: relative; isolation: isolate;
  background: var(--glas);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
  box-shadow: inset 0 .5px 0 var(--glas-kante), inset 0 0 0 .5px var(--glas-kante-2), var(--glas-schatten);
}
.glass::after {   /* Glanz: unterscheidet Liquid Glass von bloßer Transparenz */
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, var(--glas-glanz)) 0%, rgba(255, 255, 255, calc(var(--glas-glanz) * .2)) 34%, transparent 62%);
}
.glass::before {  /* Lichtkante: oben links am hellsten, wie eine Glasfase */
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--glas-rand-1) 0%, var(--glas-rand-2) 45%, var(--glas-rand-3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass.is-refracting { background-color: var(--glas-brechung); }
.glass.glass-text.is-refracting { background-color: var(--glas); }   /* Text bleibt lesbar */

/* ---------- Bedienebene: Seitenleiste (durchgehend, randlos) ---------- */
.seitenleiste.glass { position: sticky; margin: 0; top: 0; height: 100vh; border-radius: 0; border-right: .5px solid var(--rand); }
.seitenleiste li a { border-radius: 9px; }
.seitenleiste li a:hover { background: rgba(120, 120, 128, .10); }
.seitenleiste li a.aktiv { background: var(--akzent); color: #fff; font-weight: 600; box-shadow: none; }
.benutzerbox { border-top: .5px solid var(--rand); }

/* ---------- Bedienebene: Kopfleiste (eine durchgehende Leiste, Inhalt läuft darunter) ---------- */
.kopfleiste.glass { position: sticky; top: 0; z-index: 30; border-radius: 0; border-bottom: .5px solid var(--rand); padding: .6rem 2.2rem; }
.globalsuche input { background-color: rgba(118, 118, 128, .12); box-shadow: none; border-radius: 10px;
                     -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Inhaltsebene: massiv, Schatten statt Glas ---------- */
.karte, .kachel, .tabelle-rahmen, .leer, .pipeline-phase, .zeitleiste li, .ablauf li, .vereinbarung, .briefvorschau, .nachricht {
  background: var(--flaeche); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 0; box-shadow: var(--karten-schatten);
}
.kachel, .pipeline-phase { transition: box-shadow .2s cubic-bezier(.22, 1, .36, 1), transform .12s cubic-bezier(.22, 1, .36, 1); }
.pipeline-phase:hover { box-shadow: var(--karten-schatten-h); }
.pipeline-phase.aktiv { background: var(--akzent); box-shadow: 0 6px 18px rgba(0, 113, 227, .28); }
.tabelle tbody tr:hover { background: rgba(120, 120, 128, .07); }
.nachricht.eingang { background: var(--akzent); }
.meldung { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-radius: 12px; }

/* Segment-Reiter: gefüllte Schiene, erhabener massiver Daumen (kein Glas) */
.reiter-leiste { background: rgba(118, 118, 128, .12); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-radius: 10px; padding: 2px; }
.reiter-leiste label { border-radius: 8px; }
.reiter > input:checked ~ .reiter-leiste label { box-shadow: none; }

/* Knöpfe: Farbe sparsam – nur die Hauptaktion farbig, Rest neutral gefüllt */
button { background: rgba(118, 118, 128, .12); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; color: var(--akzent); }
button:hover { background: rgba(118, 118, 128, .18); }
.knopf-primaer, .login-box button { background: var(--akzent); color: #fff; box-shadow: none; }
.knopf-primaer:hover { background: #0077ed; filter: none; }

/* Anmeldekarte schwebt als Glas über dem Hintergrund */
.login-box.glass { border-radius: 26px; }

/* ---------- Handy: Leiste oben als durchgehende Glasleiste ---------- */
@media (max-width: 860px) {
  .seitenleiste.glass { height: auto; position: sticky; top: 0; z-index: 40; border-right: 0; border-bottom: .5px solid var(--rand); }
  .kopfleiste.glass { position: static; }
}

/* ---------- Ausweichlösungen (Pflicht laut Skill) ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glas-dicht); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--glas-dicht); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass::after { display: none; }
  .glass.is-refracting { background: var(--glas-dicht); }
  body::before { display: none; }
}
@media (prefers-contrast: more) {
  .glass { background: var(--glas-dicht); }
  .karte, .kachel, .tabelle-rahmen, .pipeline-phase, .leer { box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); }
}
@media print {
  body::before { display: none; }
  .glass { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}

/* =====================================================================
   Kanzlei-Farben (Entwurf C) + Aktenweg (Aufbau Entwurf A), Nutzerwahl 27.11.2026
   Warmes Papier statt kaltem Grau, Oxblood als einzige Akzentfarbe.
   Glas bleibt auf der Bedienebene (Seitenleiste, Kopfleiste), warm getönt.
   ===================================================================== */
:root {
  --bg: #efe9dd;  --bg-2: #e7dfcf;
  --flaeche: #fffdf9; --flaeche-2: #f6f1e7; --flaeche-3: #ece4d4;
  --rand: rgba(36, 32, 26, .16);
  --text: #24201a; --text-2: #6b6255; --text-3: #81776a;
  --akzent: #7a2a1d; --akzent-dunkel: #5f1f15; --akzent-hell: rgba(122, 42, 29, .10);
  --rot: #a3261a;   --rot-hell: rgba(163, 38, 26, .11);
  --gruen: #2f6b3a; --gruen-hell: rgba(47, 107, 58, .12);
  --gelb: #8a5a00;  --gelb-hell: rgba(178, 120, 20, .14);
  --blau: #2b4a8b;
  --fokus: 0 0 0 4px rgba(122, 42, 29, .22);
  --glas: rgba(250, 246, 238, .72);
  --glas-dicht: rgba(250, 246, 238, .94);
  --glas-brechung: rgba(250, 246, 238, .42);
  --karten-schatten: 0 1px 2px rgba(60, 40, 10, .07), 0 8px 24px rgba(60, 40, 10, .07);
  --karten-schatten-h: 0 2px 4px rgba(60, 40, 10, .08), 0 14px 34px rgba(60, 40, 10, .11);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171411;  --bg-2: #100e0c;
    --flaeche: #221e1a; --flaeche-2: #2b2621; --flaeche-3: #353028;
    --rand: rgba(241, 235, 224, .12);
    --text: #f1ebe0; --text-2: #b5aa99; --text-3: #968b7b;
    --akzent: #e0907d; --akzent-dunkel: #eca08f; --akzent-hell: rgba(224, 144, 125, .16);
    --rot: #ff8a75;   --rot-hell: rgba(255, 138, 117, .15);
    --gruen: #86c995; --gruen-hell: rgba(134, 201, 149, .14);
    --gelb: #e6b866;  --gelb-hell: rgba(230, 184, 102, .14);
    --blau: #9ab6ec;
    --fokus: 0 0 0 4px rgba(224, 144, 125, .3);
    --glas: rgba(36, 32, 27, .72);
    --glas-dicht: rgba(30, 27, 23, .95);
    --glas-brechung: rgba(34, 30, 26, .48);
    --karten-schatten: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .3);
  }
}
body::before {
  background:
    radial-gradient(900px 620px at 10% -10%, rgba(122, 42, 29, .10), transparent 60%),
    radial-gradient(800px 600px at 95% 0%, rgba(176, 138, 76, .14), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.seitenleiste li a.aktiv { background: var(--akzent); color: #fff; }
.knopf-primaer, .login-box button { background: var(--akzent); }
.knopf-primaer:hover { background: var(--akzent-dunkel); }
.marke-zeichen { background: var(--akzent); }
.zeitleiste li.brief { box-shadow: inset 3px 0 0 var(--akzent), var(--karten-schatten); }
.nachricht.eingang { background: var(--akzent); }
.balken rect { fill: var(--akzent); }
.testbanner { background: rgba(163, 38, 26, .9); }

/* ---------- Aktenweg: die Pipeline als Linienplan (Stationen auf einer Linie) ---------- */
.pipeline { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 1.4rem; scrollbar-width: thin; }
.pipeline-phase {
  position: relative; flex: 1 0 104px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; padding: 0 4px; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--text);
}
.pipeline-phase:hover { background: transparent; box-shadow: none; }
.pipeline-phase::before {   /* Linienstück durch die Mitte der Station */
  content: ''; position: absolute; left: 0; right: 0; top: 30px; height: 5px; background: var(--text); opacity: .85; z-index: 0;
}
.pipeline-phase:first-child::before { left: 50%; }
.pipeline-phase:last-child::before { right: 50%; }
.pipeline-zahl {
  order: -1; position: relative; z-index: 1; margin-top: 7px;
  min-width: 46px; height: 46px; padding: 0 6px; box-sizing: border-box; border-radius: 999px;
  display: grid; place-items: center; background: var(--flaeche); color: var(--text);
  font-size: .86rem; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--text);
  transition: transform .12s cubic-bezier(.22, 1, .36, 1);
}
.pipeline-phase:hover .pipeline-zahl { transform: scale(1.06); }
.pipeline-phase:active .pipeline-zahl { transform: scale(.96); }
.pipeline-titel { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.2; min-height: 2.4em; }
.pipeline-summe { font-size: .76rem; color: var(--text-2); }
.pipeline-phase.aktiv, .pipeline-phase.aktiv:hover { background: transparent; box-shadow: none; }
.pipeline-phase.aktiv .pipeline-zahl { min-width: 60px; height: 60px; margin-top: 0; background: var(--rot); color: #fff; font-size: .95rem;
                                       box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--rot), 0 8px 20px rgba(163, 38, 26, .3); }
.pipeline-phase.aktiv .pipeline-titel { color: var(--rot); }
.pipeline-phase.aktiv .pipeline-summe { color: var(--text-2); }
.pipeline-phase.phase-abschluss .pipeline-zahl { background: var(--text); color: var(--bg); }
.pipeline-phase.leer { opacity: .45; }
@media (prefers-color-scheme: dark) { .pipeline-phase.aktiv .pipeline-zahl { color: #1a0f0c; } }

/* ---------- Übersicht im Aufbau „Aktenweg“ ---------- */
.uebersicht-kopf { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin: -.6rem 0 1.4rem; color: var(--text-2); font-size: 1.02rem; }
.uebersicht-raster { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.6rem; }
.uebersicht-raster > * { min-width: 0; }
.karten-kopf { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.karten-kopf h2 { margin: 0; }
.karten-kopf .mehr { margin-left: auto; font-weight: 500; }
.akzentkarte { background: var(--akzent); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--karten-schatten); }
.akzentkarte .klein { opacity: .8; }
.akzentkarte .gross { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: .2rem 0; }
@media (prefers-color-scheme: dark) { .akzentkarte { color: #1a0f0c; } }
.heute-liste { display: flex; flex-direction: column; }
.heute-liste a { display: flex; justify-content: space-between; padding: .55rem 0; color: var(--text); box-shadow: inset 0 -.5px 0 var(--rand); }
.heute-liste a:last-child { box-shadow: none; }
.heute-liste strong { font-variant-numeric: tabular-nums; }
.spalte { display: flex; flex-direction: column; gap: 1.2rem; }
@media (max-width: 960px) { .uebersicht-raster { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  .seitenleiste li a.aktiv, .knopf-primaer, .login-box button, .nachricht.eingang, .pipeline-phase.aktiv .pipeline-zahl { color: #1a0f0c; }
  .nachricht.eingang .kopf { color: rgba(26, 15, 12, .7); }
}

/* ---------- Logo wie Entwurf B: weißes Feld, rotes Quadrat, blaues „P“ + Firmenname ---------- */
.marke { display: flex; align-items: center; gap: .7rem; padding: .2rem .5rem 1.3rem; color: var(--text); }
.logo { position: relative; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 0 0 .5px rgba(0, 0, 0, .06); }
.logo-rot { position: absolute; left: 7px; top: 7px; width: 11px; height: 11px; border-radius: 2px; background: #e2231a; }
.logo-p { position: absolute; left: 13px; top: 13px; width: 16px; height: 16px; border-radius: 3px 8px 8px 3px; background: #141c4d; }
.marke-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.marke-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: var(--text); }
.marke-zusatz { font-size: .76rem; color: var(--text-2); font-weight: 500; }
.login-marke { padding: 0 0 1.1rem; }
@media (max-width: 860px) { .marke { padding-bottom: .5rem; } .marke-zusatz { display: none; } }

/* ---------- Web-App: Gefühl wie eine App (28.11.2026) ----------
   Idee der Seitenübergänge nach admin-os (lroy-stack/admin-os, src/ds/styles/motion.css, MIT-Lizenz);
   hier eigene, schlanke Umsetzung für mehrseitiges PHP (Cross-Document View Transitions).
   Nur der Inhaltsbereich gleitet; Leisten bleiben stehen (benannte Leisten würden ihr Glas-Weichzeichnen verlieren). */
@view-transition { navigation: auto; }
main { view-transition-name: inhalt; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(inhalt) { animation: 120ms ease-in both vt-aus; }
::view-transition-new(inhalt) { animation: 220ms ease-out 40ms both vt-ein, 340ms cubic-bezier(.2, .9, .3, 1) 40ms both vt-hoch; }
::view-transition-group(inhalt) { animation-duration: 0s; }
@keyframes vt-aus { to { opacity: 0; } }
@keyframes vt-ein { from { opacity: 0; } }
@keyframes vt-hoch { from { translate: 0 10px; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*), ::view-transition-new(*), ::view-transition-group(*) { animation: none !important; }
}

/* Im eigenen App-Fenster (zum Dock / Startbildschirm hinzugefügt) */
@media (display-mode: standalone) {
  html { overscroll-behavior-y: none; }                         /* kein Gummiband der ganzen Seite */
  body { -webkit-tap-highlight-color: transparent; }
  .seitenleiste, .kopfleiste, .knopf-primaer, button { -webkit-user-select: none; user-select: none; }
  a, button, input, select, textarea, label { touch-action: manipulation; }   /* kein Doppeltipp-Zoom */
}

/* ---------- Seitenleiste: aufklappbare Gruppe „Einstellungen“ (28.11.2026) ---------- */
.nav-aufklapp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  border-radius: 8px; padding: .3rem .7rem; margin: 1.1rem 0 .2rem; -webkit-user-select: none; user-select: none; }
.nav-aufklapp > summary::-webkit-details-marker { display: none; }
.nav-aufklapp > summary::after { content: ""; width: .45rem; height: .45rem; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s ease; opacity: .7; }
.nav-aufklapp[open] > summary::after { transform: rotate(45deg); }
.nav-aufklapp > summary:hover { background: rgba(120, 120, 128, .10); }
.nav-aufklapp > summary:focus-visible { outline: none; box-shadow: var(--fokus); }
.nav-aufklapp > ul { list-style: none; margin: 0; padding: 0; }
@media (max-width: 860px) {
  .nav-gruppe-eintrag { display: flex; }
  .nav-aufklapp { display: flex; align-items: center; }
  .nav-aufklapp > summary.nav-gruppe { display: flex; gap: .4rem; margin: 0; white-space: nowrap; }
  .nav-aufklapp > summary::after { transform: rotate(-135deg); }
  .nav-aufklapp[open] > summary::after { transform: rotate(45deg); }
  .nav-aufklapp > ul { display: flex; flex-wrap: nowrap; }
}

/* ---------- Umschalter (zwei Knöpfe, aktiver hervorgehoben) – Kundenseite „Jahresbeitragskunde“ ---------- */
.umschalter { display: inline-flex; gap: 2px; padding: 2px; border-radius: 11px; background: rgba(118, 118, 128, .12); margin: .2rem 0 .6rem; flex-wrap: wrap; }
.umschalter button { background: transparent; color: var(--text-2); border: 0; border-radius: 9px; padding: .5rem 1rem; font-weight: 500; box-shadow: none; }
.umschalter button:hover { background: rgba(118, 118, 128, .12); color: var(--text); }
.umschalter button.an { background: var(--akzent); color: #fff; font-weight: 600; }
.umschalter button:disabled { cursor: default; }

/* ---------- Unterlagen je Rubrik (OneDrive-Ablage, 28.11.2026) ---------- */
.ablage-kopf { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ablage-knoepfe { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ablage-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8rem; }
.ablage-rubrik { background: var(--flaeche); border: .5px solid var(--rand); border-radius: 14px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .5rem;
  transition: box-shadow .15s ease, border-color .15s ease; }
.ablage-rubrik h3 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ablage-haken { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .75rem; background: rgba(118,118,128,.14); color: var(--text-3, var(--text-2)); }
.ablage-voll .ablage-haken { background: var(--gruen); color: #fff; }
.ablage-aktuell { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
.ablage-rubrik.ueber { border-color: var(--akzent); box-shadow: 0 0 0 3px rgba(122, 42, 29, .18); }
.ablage-dateien { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.ablage-dateien li { display: flex; flex-direction: column; gap: .1rem; padding: .4rem .5rem; border-radius: 9px; background: rgba(118,118,128,.06); }
.ablage-dateien li[draggable] { cursor: grab; }
.ablage-dateien li.zieht { opacity: .5; }
.ablage-dateien a { font-weight: 500; word-break: break-word; }
.ablage-sicht { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.chip { font-size: .72rem; padding: .12rem .5rem; border-radius: 99px; border: .5px solid var(--rand); background: transparent; color: var(--text-2); box-shadow: none; }
.chip.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.ablage-aendern summary { cursor: pointer; color: var(--text-2); }
.ablage-aendern form { margin-top: .3rem; flex-wrap: wrap; gap: .3rem; }
.ablage-zone { margin-top: auto; display: flex; flex-direction: column; gap: .35rem; }
.ablage-ziel { display: block; border: 1.5px dashed var(--rand); border-radius: 10px; padding: .6rem; text-align: center; color: var(--text-2); font-size: .85rem; cursor: pointer; }
.ablage-ziel:hover, .ablage-rubrik.ueber .ablage-ziel { border-color: var(--akzent); color: var(--akzent); }
.ablage-zone.mit-js .ablage-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ablage-zone.laedt .ablage-ziel span::after { content: " – wird hochgeladen …"; }
.ablage-optionen { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ablage-optionen select { max-width: 11rem; }
.versteckt { display: none; }
.text-rot { color: var(--rot); }
form.inline { display: inline; }
.pflicht { color: var(--rot); font-weight: 600; font-size: .85em; }
.doc-chips { display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.doc-chip { font-size: .68rem; font-weight: 600; padding: .05rem .38rem; border-radius: 5px; background: rgba(118,118,128,.12); color: var(--text-3, var(--text-2)); }
.doc-chip.da { background: var(--gruen-hell, #e4f5eb); color: var(--gruen); }

/* ---------- Kalender (28.11.2026) ---------- */
.agenda { display: flex; flex-direction: column; gap: .8rem; }
.agenda-tag h3 { margin: 0 0 .3rem; font-size: .95rem; }
.agenda-eintrag { display: flex; gap: .8rem; padding: .45rem .7rem; border-radius: 10px; background: var(--flaeche); border: .5px solid var(--rand); margin-bottom: .3rem; color: var(--text); text-decoration: none; }
.agenda-eintrag:hover { border-color: var(--akzent); text-decoration: none; }
.agenda-eintrag.art-buchung { border-left: 3px solid var(--gruen); }
.agenda-eintrag.art-blocker { opacity: .75; border-left: 3px solid var(--text-2); }
.agenda-zeit { min-width: 7.5rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.termin-tage { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.termin-tag { padding: .45rem .75rem; border-radius: 10px; border: .5px solid var(--rand); background: var(--flaeche); color: var(--text); text-decoration: none; }
.termin-tag.an { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.termin-tag.an .gedimmt { color: rgba(255,255,255,.8); }
.termin-zeiten { display: flex; flex-wrap: wrap; gap: .35rem; }
.termin-zeit { border: .5px solid var(--rand); border-radius: 9px; padding: .35rem .6rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.termin-zeit:has(input:checked) { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.termin-zeit input { position: absolute; opacity: 0; pointer-events: none; }
.tabelle.kompakt td, .tabelle.kompakt th { padding: .3rem .5rem; }

/* ---------- Meine Aufgaben (28.11.2026) ---------- */
.todo-neu { display: flex; flex-direction: column; gap: .5rem; }
.todo-titel { width: 100%; font-size: 1rem; }
.todo-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; }
.todo-bereich { background: var(--flaeche); border: .5px solid var(--rand); border-radius: 14px; padding: .7rem .9rem; }
.todo-bereich h3 { margin: 0 0 .4rem; font-size: .95rem; }
.todo-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.todo-liste li { display: flex; gap: .55rem; align-items: flex-start; padding: .3rem .2rem; border-radius: 8px; }
.todo-liste li.prio-1 { box-shadow: inset 3px 0 0 var(--rot); }
.todo-liste li.prio-2 { box-shadow: inset 3px 0 0 #c77700; }
.todo-text { display: flex; flex-direction: column; min-width: 0; }
.todo-text a { word-break: break-word; }
.todo-haken { flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1.5px solid var(--text-2); background: transparent; padding: 0; font-size: .75rem; line-height: 1; color: #fff; box-shadow: none; }
.todo-haken:hover { border-color: var(--gruen); background: var(--gruen-hell, #e4f5eb); }
.todo-haken.an { background: var(--gruen); border-color: var(--gruen); }
.agenda-eintrag.art-aufgabe { border-left: 3px solid var(--akzent); background: rgba(118,118,128,.05); }
.phase-setzen { margin: -.3rem 0 .8rem; } .phase-setzen form { margin-top: .4rem; }
.kat { font-size: .68rem; font-weight: 600; padding: .05rem .4rem; border-radius: 5px; margin-left: .2rem; }
.kat-umsatz { background: var(--gruen-hell, #e4f5eb); color: var(--gruen); }
.kat-behaltung { background: #e8eef9; color: #2b4a8b; }
.kat-verwaltung { background: rgba(118,118,128,.14); color: var(--text-2); }
.etikett { font-size: .68rem; padding: .05rem .4rem; border-radius: 99px; margin-left: .2rem; color: var(--f, #6b6255); border: .5px solid var(--f, #6b6255); text-decoration: none; }
.balken-zeile { display: inline-block; width: 140px; height: .55rem; border-radius: 99px; background: rgba(118,118,128,.14); vertical-align: middle; overflow: hidden; }
.balken-wert { display: block; height: 100%; border-radius: 99px; background: var(--text-2); }
.balken-wert.kat-umsatz { background: var(--gruen); } .balken-wert.kat-behaltung { background: #2b4a8b; } .balken-wert.kat-verwaltung { background: #8e8e93; }
.aufwand-zeile { margin: -.4rem 0 .6rem; }
.feld-breit { min-width: 22rem; flex: 1; } .freigabe-kasten form { margin-top: .4rem; }

/* ---------- Seitenleiste: Symbole, einklappbar, Breite ziehbar (28.11.2026) ---------- */
:root { --leiste-breite: 232px; }
.seitenleiste li a, .nav-aufklapp > summary.nav-gruppe, .benutzerbox a { display: flex; align-items: center; gap: .6rem; }
.nav-ico { flex: none; opacity: .85; }
.seitenleiste li a.aktiv .nav-ico { opacity: 1; }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.benutzerbox { display: flex; flex-direction: column; gap: .15rem; }
.benutzerbox a { padding: .3rem .7rem; border-radius: 8px; }
.benutzerbox a:hover { background: rgba(120, 120, 128, .10); text-decoration: none; }
.benutzerbox > .nav-text { padding: 0 .7rem .2rem; font-weight: 600; }
.leiste-umschalter { align-self: flex-end; margin-top: .4rem; width: 2rem; height: 2rem; padding: 0; border-radius: 8px; display: grid; place-items: center;
  background: transparent; color: var(--text-2); box-shadow: none; }
.leiste-umschalter:hover { background: rgba(120, 120, 128, .12); }
.leiste-umschalter svg { transition: transform .2s ease; }
.leiste-griff { position: absolute; top: 0; right: -3px; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; border-radius: 3px; }
.leiste-griff:hover, .leiste-griff:focus-visible, .leiste-zieht .leiste-griff { background: rgba(122, 42, 29, .25); outline: none; }
.leiste-zieht, .leiste-zieht * { cursor: col-resize !important; user-select: none !important; }
@media (min-width: 861px) {
  .rahmen > .seitenleiste { width: var(--leiste-breite) !important; transition: width .18s ease; }
  .leiste-zieht .rahmen > .seitenleiste { transition: none; }
  .seitenleiste > ul { overflow-y: auto; overflow-x: hidden; }
  html.leiste-eingeklappt .rahmen > .seitenleiste { width: 64px !important; padding-left: .45rem; padding-right: .45rem; }
  html.leiste-eingeklappt .seitenleiste .nav-text, html.leiste-eingeklappt .seitenleiste .marke-text,
  html.leiste-eingeklappt .seitenleiste .nav-aufklapp > summary::after { display: none; }
  html.leiste-eingeklappt .seitenleiste li a, html.leiste-eingeklappt .nav-aufklapp > summary.nav-gruppe,
  html.leiste-eingeklappt .benutzerbox a { justify-content: center; padding-left: 0; padding-right: 0; }
  html.leiste-eingeklappt .seitenleiste .marke { justify-content: center; }
  html.leiste-eingeklappt .leiste-umschalter { align-self: center; }
  html.leiste-eingeklappt .leiste-umschalter svg { transform: rotate(180deg); }
}
@media (max-width: 860px) { .leiste-umschalter, .leiste-griff { display: none; } }
@media (prefers-reduced-motion: reduce) { .rahmen > .seitenleiste, .leiste-umschalter svg { transition: none !important; } }
.fibu-erkl { color: var(--text-2); font-style: italic; } .fibu-buchen input[list] { max-width: 28rem; }

/* ---------- Kalender-Ansichten Tag / Woche / Monat / Jahr (28.11.2026) ---------- */
.kal-kopf { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.kal-ansicht a { padding: .45rem 1.1rem; border-radius: 9px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.kal-ansicht a.an { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.kal-blaettern { display: flex; gap: .4rem; align-items: center; }
.kal-blaettern .knopf-link { font-size: 1.05rem; padding: .2rem .5rem; }
.kal-titel { font-size: 1.15rem; margin-left: .4rem; }
.kal-e { display: block; font-size: .76rem; padding: .08rem .35rem; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(122, 42, 29, .10); color: var(--text); text-decoration: none; border-left: 2px solid var(--akzent); }
.kal-e.art-buchung, .kal-block.art-buchung { border-left-color: var(--gruen); background: var(--gruen-hell, #e4f5eb); }
.kal-e.art-blocker, .kal-block.art-blocker { border-left-color: #8e8e93; background: rgba(118,118,128,.14); }
.kal-e.art-aufgabe, .kal-block.art-aufgabe { border-left-color: #2b4a8b; background: #e8eef9; }
.kal-e.art-faellig { border-left-color: #c77700; background: rgba(199,119,0,.10); }
.kal-z { font-variant-numeric: tabular-nums; color: var(--text-2); }
/* Jahr */
.kal-jahr { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.kal-mini { background: var(--flaeche); border: .5px solid var(--rand); border-radius: 14px; padding: .6rem .7rem; }
.kal-mini h3 { margin: 0 0 .35rem; font-size: .95rem; } .kal-mini h3 a { color: var(--akzent); text-decoration: none; }
.kal-mini-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .78rem; }
.kal-wt { color: var(--text-3, var(--text-2)); font-size: .68rem; }
.kal-mt { padding: .18rem 0; border-radius: 6px; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.kal-mt.we { color: var(--text-2); } .kal-mt.hat { background: rgba(122, 42, 29, .14); font-weight: 600; }
.kal-mt.heute { background: var(--akzent); color: #fff; } .kal-mt:hover { outline: 1px solid var(--akzent); }
/* Monat */
.kal-monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: .5px solid var(--rand); border-radius: 14px; overflow: hidden; background: var(--rand); gap: .5px; }
.kal-kopfzelle { background: var(--flaeche); padding: .4rem .5rem; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.kal-kopfzelle.heute a, .kal-kopfzelle.heute { color: var(--akzent); }
.kal-zelle { background: var(--flaeche); min-height: 6.5rem; padding: .3rem .35rem; min-width: 0; }
.kal-zelle.fremd { opacity: .45; } .kal-zelle.we { background: color-mix(in srgb, var(--flaeche) 92%, var(--text) 8%); }
.kal-zelle.heute .kal-nr { background: var(--akzent); color: #fff; }
.kal-nr { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--text); text-decoration: none; }
.kal-mehr { font-size: .72rem; color: var(--text-2); }
/* Woche / Tag */
.kal-woche { display: grid; grid-template-columns: 3.4rem repeat(var(--sp, 7), minmax(0, 1fr)); border: .5px solid var(--rand); border-radius: 14px; overflow: hidden; background: var(--flaeche); }
.kal-woche.spalten-1 { --sp: 1; } .kal-woche.spalten-7 { --sp: 7; }
.kal-woche .kal-kopfzelle { border-bottom: .5px solid var(--rand); border-left: .5px solid var(--rand); text-align: center; }
.kal-woche .kal-kopfzelle a { color: inherit; text-decoration: none; }
.kal-ganztags { border-left: .5px solid var(--rand); border-bottom: .5px solid var(--rand); padding: .2rem; min-height: 1.6rem; }
.kal-ecke { border-bottom: .5px solid var(--rand); padding: .2rem; }
.kal-stunden { display: grid; grid-template-rows: repeat(14, 3.2rem); font-size: .7rem; color: var(--text-2); text-align: right; padding-right: .35rem; }
.kal-stunden div { transform: translateY(-.45rem); }
.kal-spalte { position: relative; height: calc(14 * 3.2rem); border-left: .5px solid var(--rand);
  background-image: repeating-linear-gradient(to bottom, var(--rand) 0 .5px, transparent .5px 3.2rem); }
.kal-spalte.heute { background-color: rgba(122, 42, 29, .03); }
.kal-frei { position: absolute; left: 0; right: 0; background: rgba(47, 107, 58, .06); pointer-events: none; }
.kal-block { position: absolute; left: 3px; right: 3px; overflow: hidden; border-radius: 7px; padding: .15rem .35rem; font-size: .75rem; line-height: 1.25;
  background: rgba(122, 42, 29, .12); border-left: 3px solid var(--akzent); color: var(--text); text-decoration: none; }
.kal-block:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 2; }
.kal-jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--rot); z-index: 3; }
@media (max-width: 860px) { .kal-woche.spalten-7 { grid-template-columns: 2.6rem repeat(7, minmax(4.5rem, 1fr)); overflow-x: auto; } .kal-zelle { min-height: 4.5rem; } }
/* Kalenderfarben hell/dunkel lesbar (durchscheinend statt fester Hellfarben) */
.kal-e.art-buchung, .kal-block.art-buchung { background: rgba(47, 107, 58, .18); }
.kal-e.art-aufgabe, .kal-block.art-aufgabe { background: rgba(43, 74, 139, .20); }
.kal-e.art-blocker, .kal-block.art-blocker { background: rgba(118, 118, 128, .22); }
.kal-e.art-faellig { background: rgba(199, 119, 0, .18); }
.kal-e, .kal-block { color: var(--text); }
/* Buchungsvorschläge */
.vorschlag-liste { display: flex; flex-direction: column; gap: .5rem; }
.vorschlag { background: var(--flaeche); border: .5px solid var(--rand); border-radius: 12px; padding: .55rem .8rem; }
.vorschlag.mit-hinweis { border-left: 3px solid #c77700; }
.vorschlag-kopf { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.vorschlag-betrag { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.vorschlag-zeilen { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin: .25rem 0; font-variant-numeric: tabular-nums; }
.text-hinweis { color: #c77700; }

/* Meine Aufgaben: Bereiche als Spalten nebeneinander, seitlich scrollbar (wie die Pipeline) */
.todo-spalten { display: flex; gap: .8rem; overflow-x: auto; align-items: flex-start; padding-bottom: .6rem; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.todo-spalten > .todo-bereich { flex: 0 0 min(19rem, 85vw); scroll-snap-align: start; max-height: 75vh; overflow-y: auto; scroll-margin-left: .5rem; }
.todo-spalten > .todo-bereich h3 { position: sticky; top: -.7rem; background: var(--flaeche); padding: .2rem 0 .3rem; z-index: 1; }
.todo-system { align-items: flex-start; }
.todo-system-punkt { flex: none; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; }
.todo-system-punkt::before { content: ""; width: .45rem; height: .45rem; border-radius: 2px; background: var(--akzent); transform: rotate(45deg); }

/* BWA / GuV */
.fibu-auswertung tr.fibu-summe td { border-top: 1px solid var(--rand); background: var(--flaeche-2, transparent); }
.fibu-konten > summary { cursor: pointer; }
.fibu-konten > div { margin: .15rem 0 0 1rem; }

/* Belege */
.beleg-drop { padding: 1.2rem; border: 1.5px dashed var(--rand); border-radius: 12px; background: var(--flaeche-2, transparent); width: 100%; }
