/* Liquiditäts-Cockpit – ruhig, hell, eine Akzentfarbe */
:root {
  --akzent: #1f6b52;
  --akzent-hell: #e6f1ec;
  --akzent-dunkel: #164d3b;
  --text: #1c2522;
  --text-2: #5b6763;
  --text-3: #8a9591;
  --rand: #e3e7e5;
  --rand-2: #d2d8d5;
  --flaeche: #ffffff;
  --hinter: #f5f7f6;
  --rot: #c0392b;
  --rot-hell: #fdecea;
  --gelb: #a86b00;
  --gelb-hell: #fff6e0;
  --gruen: #1f7a4d;
  --gruen-hell: #e7f5ed;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(20, 30, 25, .05), 0 1px 3px rgba(20, 30, 25, .06);
  --schatten-hoch: 0 10px 30px rgba(20, 30, 25, .14), 0 2px 6px rgba(20, 30, 25, .08);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--hinter); color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 620; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 620; }
p { margin: 0 0 10px; }
[x-cloak] { display: none !important; }
.klein { font-size: 12px; }
.leise { color: var(--text-2); }
.sehr-leise { color: var(--text-3); }
.rechts { text-align: right; }
.mono { font-family: var(--mono); font-size: 12px; }
.ein { color: var(--gruen); }
.aus { color: var(--text); }
.neg { color: var(--rot); }
.nowrap { white-space: nowrap; }
.kuerzen { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zeile.zwischen { justify-content: space-between; }
.spalte { display: flex; flex-direction: column; gap: 4px; }
.luft { margin-top: 16px; }
.luft-gross { margin-top: 24px; }
.wachsen { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ Layout */
.rahmen { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.seitenleiste {
  background: var(--flaeche); border-right: 1px solid var(--rand); padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
}
.marke { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.marke-logo {
  width: 32px; height: 32px; border-radius: 8px; background: var(--akzent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.marke-text { line-height: 1.15; }
.marke-text b { display: block; font-size: 14px; }
.marke-text span { font-size: 11.5px; color: var(--text-2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--hinter); color: var(--text); }
.nav a.aktiv { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .zaehler {
  margin-left: auto; background: var(--akzent); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 600; padding: 1px 7px; min-width: 20px; text-align: center;
}
.seitenleiste-fuss { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--rand); }
.seitenleiste-fuss .name { font-weight: 600; font-size: 13px; }
.haupt { padding: 24px 28px 48px; min-width: 0; max-width: 1400px; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kopf .unter { color: var(--text-2); margin-top: 4px; }
.mobilkopf { display: none; }

@media (max-width: 900px) {
  .rahmen { grid-template-columns: 1fr; }
  .seitenleiste {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--schatten-hoch);
  }
  .seitenleiste.offen { transform: none; }
  .mobilkopf {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40;
    background: var(--flaeche); border-bottom: 1px solid var(--rand); padding: 10px 16px;
  }
  .haupt { padding: 16px 14px 40px; }
  .schleier { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 55; }
}

/* ------------------------------------------------------------ Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); }
.karte-innen { padding: 16px 18px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rand); }
.karte-kopf h2 { margin: 0; }
.raster { display: grid; gap: 16px; }
.raster-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px) { .raster-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .raster-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .raster-4, .raster-3, .raster-2 { grid-template-columns: 1fr; } }

.kachel { padding: 16px 18px; }
.kachel .titel { color: var(--text-2); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kachel .wert { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; white-space: nowrap; }
.kachel .hinweis { color: var(--text-2); font-size: 12px; margin-top: 4px; }

.saldo-kopf { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; padding: 18px 20px; }
.saldo-kopf .gross { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.saldo-kopf .etikett { color: var(--text-2); font-size: 12.5px; font-weight: 550; margin-bottom: 4px; }
.saldo-kopf .trenner { width: 1px; align-self: stretch; background: var(--rand); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--rand-2); background: var(--flaeche); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.knopf:hover { background: var(--hinter); }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover { background: var(--akzent-dunkel); }
.knopf.gefahr { color: var(--rot); }
.knopf.gefahr:hover { background: var(--rot-hell); }
.knopf.gefahr-voll { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf.leer { border-color: transparent; background: transparent; }
.knopf.leer:hover { background: var(--hinter); }
.knopf.klein { height: 28px; padding: 0 10px; font-size: 12.5px; }
.knopf.symbol { width: 30px; padding: 0; height: 30px; }
.knopf svg { width: 16px; height: 16px; }

.feld { display: flex; flex-direction: column; gap: 4px; }
.feld > span, .feld > label { font-size: 12px; font-weight: 550; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  height: 34px; border: 1px solid var(--rand-2); border-radius: 8px; padding: 0 10px; font: inherit;
  background: var(--flaeche); color: var(--text); min-width: 0; width: 100%;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus, .knopf:focus-visible, .kat-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 1px; border-color: var(--akzent);
}
input.betrag { text-align: right; font-variant-numeric: tabular-nums; }
.checkbox { width: 16px; height: 16px; accent-color: var(--akzent); cursor: pointer; }

.segment { display: inline-flex; border: 1px solid var(--rand-2); border-radius: 8px; overflow: hidden; height: 34px; }
.segment button { border: 0; background: var(--flaeche); padding: 0 12px; font: inherit; color: var(--text-2); cursor: pointer; border-right: 1px solid var(--rand); }
.segment button:last-child { border-right: 0; }
.segment button.aktiv { background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 600; }

.marke-klein { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 550; background: var(--hinter); color: var(--text-2); border: 1px solid var(--rand); white-space: nowrap; }
.marke-klein.gruen { background: var(--gruen-hell); color: var(--gruen); border-color: transparent; }
.marke-klein.rot { background: var(--rot-hell); color: var(--rot); border-color: transparent; }
.marke-klein.gelb { background: var(--gelb-hell); color: var(--gelb); border-color: transparent; }
.marke-klein.akzent { background: var(--akzent-hell); color: var(--akzent-dunkel); border-color: transparent; }

.meldung { border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.meldung.rot { background: var(--rot-hell); border-color: #f3c3bd; color: #7d2117; }
.meldung.gelb { background: var(--gelb-hell); border-color: #f0dca8; color: #6b4600; }
.meldung.gruen { background: var(--gruen-hell); border-color: #bfe3cd; color: #144d31; }
.meldung.info { background: var(--akzent-hell); border-color: #c4ddd2; color: var(--akzent-dunkel); }
.meldung b { font-weight: 650; }
.meldung .knopf { margin-left: auto; }
.meldung-gross { font-size: 15px; padding: 16px 18px; }

/* ------------------------------------------------------------ Tabellen */
.tabelle-wrap { overflow-x: auto; }
table.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 12px; border-bottom: 1px solid var(--rand); background: #fafbfa; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tabelle td { padding: 10px 12px; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: #fafcfb; }
.tabelle tr.markiert td { background: var(--akzent-hell); }
.tabelle .betrag { text-align: right; white-space: nowrap; font-weight: 600; }
.tabelle .saldo { text-align: right; white-space: nowrap; color: var(--text-2); }
.tabelle .partner { font-weight: 550; }
.tabelle .zweck { color: var(--text-2); font-size: 12.5px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tabelle td.aktionen { white-space: nowrap; text-align: right; }
.tabelle tr.klickbar { cursor: pointer; }

@media (max-width: 760px) {
  table.karten thead { display: none; }
  table.karten, table.karten tbody, table.karten tr, table.karten td { display: block; width: 100%; }
  table.karten tr { border-bottom: 1px solid var(--rand); padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  table.karten td { border: 0; padding: 0; max-width: none !important; }
  /* Karte: oben Datum | Betrag, darunter Text, darunter Kategorie */
  table.karten td.betrag { order: 2; }
  table.karten td.m-voll { grid-column: 1 / -1; order: 3; }
  table.karten td.m-unten { grid-column: 1 / -1; order: 4; }
  table.karten td.m-weg { display: none; }
  table.karten .zweck { max-width: none; }
  .saldo-kopf { gap: 16px; }
  .saldo-kopf .trenner { display: none; }
  .saldo-kopf .gross { font-size: 30px; }
}

.leerzustand { text-align: center; padding: 48px 20px; color: var(--text-2); }
.leerzustand .symbol { font-size: 30px; margin-bottom: 8px; }
.leerzustand h3 { color: var(--text); font-size: 16px; }

/* ------------------------------------------------------------ Kategorie-Chip und Auswahl */
.kat-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px; height: 28px; padding: 0 10px;
  border-radius: 999px; border: 1px dashed var(--rand-2); background: var(--flaeche); color: var(--text-3);
  font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.kat-chip:hover { border-color: var(--akzent); color: var(--akzent); }
.kat-chip.gesetzt { border-style: solid; border-color: transparent; background: var(--hinter); color: var(--text); }
.kat-chip.gesetzt:hover { border-color: var(--rand-2); }
.kat-chip .punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.kat-chip .punkt.einzahlung { background: var(--gruen); }
.kat-chip .punkt.auszahlung { background: #b5562f; }
.kat-chip .punkt.neutral { background: #8a9591; }
.kat-chip span.text { overflow: hidden; text-overflow: ellipsis; }
.kat-chip svg { width: 14px; height: 14px; flex: none; }
.kat-chip .regel { font-size: 10px; color: var(--akzent); font-weight: 650; }

.picker {
  position: fixed; z-index: 90; width: 360px; max-height: 440px; display: flex; flex-direction: column;
  background: var(--flaeche); border: 1px solid var(--rand-2); border-radius: var(--radius); box-shadow: var(--schatten-hoch);
}
.picker input { border: 0; border-bottom: 1px solid var(--rand); border-radius: var(--radius) var(--radius) 0 0; height: 40px; }
.picker input:focus { outline: none; }
.picker-liste { overflow-y: auto; padding: 6px; }
.picker-gruppe { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 8px 8px 4px; }
.picker-eintrag { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.picker-eintrag.aktiv { background: var(--akzent-hell); }
.picker-eintrag .art { margin-left: auto; font-size: 11px; color: var(--text-3); }
.picker-eintrag.gewaehlt { font-weight: 650; }
.picker-eintrag.gruppe { color: var(--text-2); font-weight: 600; }
.picker-leer { padding: 14px; color: var(--text-3); text-align: center; }

/* ------------------------------------------------------------ Dialoge, Schublade, Toast */
.dialog-hinter { position: fixed; inset: 0; background: rgba(15, 25, 20, .35); z-index: 70; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--flaeche); border-radius: 14px; box-shadow: var(--schatten-hoch); width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.dialog.breit { width: min(860px, 100%); }
.dialog-kopf { padding: 16px 20px; border-bottom: 1px solid var(--rand); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-kopf h2 { margin: 0; }
.dialog-inhalt { padding: 18px 20px; overflow-y: auto; }
.dialog-fuss { padding: 14px 20px; border-top: 1px solid var(--rand); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.schublade-hinter { position: fixed; inset: 0; background: rgba(15, 25, 20, .25); z-index: 65; }
.schublade { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--flaeche); z-index: 66; box-shadow: var(--schatten-hoch); display: flex; flex-direction: column; }
.schublade .dialog-inhalt { flex: 1; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.dl dt { color: var(--text-2); }
.dl dd { margin: 0; word-break: break-word; }

.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 36px); }
.toast { background: #1c2522; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--schatten-hoch); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.toast.fehler { background: var(--rot); }

/* ------------------------------------------------------------ Seiten-spezifisch */
.filterleiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 14px 16px; }
.filterleiste .breit { grid-column: span 2; }
.summenleiste { display: flex; gap: 20px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--rand); background: #fafbfa; font-size: 13px; border-radius: 0 0 var(--radius) var(--radius); }

.massenleiste { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--akzent-dunkel); color: #fff; border-radius: var(--radius); box-shadow: var(--schatten-hoch); margin-bottom: 12px; flex-wrap: wrap; }
.massenleiste .knopf { background: #fff; border-color: #fff; }

.vorschlag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); border: 0; font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.vorschlag:hover { background: #d4e8de; }

.ablage { border: 2px dashed var(--rand-2); border-radius: 14px; padding: 36px 20px; text-align: center; background: var(--flaeche); transition: border-color .15s, background .15s; cursor: pointer; }
.ablage.drueber { border-color: var(--akzent); background: var(--akzent-hell); }
.ablage .symbol { font-size: 30px; }
.kennzahl { padding: 12px 14px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); }
.kennzahl .z { font-size: 20px; font-weight: 650; }
.kennzahl .t { font-size: 12px; color: var(--text-2); }

.regel-zeile { display: grid; grid-template-columns: 28px 36px minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1fr) 80px 120px; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rand); background: var(--flaeche); }
.regel-zeile:last-child { border-bottom: 0; }
.regel-zeile.inaktiv { opacity: .55; }
.regel-zeile .griff { cursor: grab; color: var(--text-3); display: grid; place-items: center; }
.regel-zeile .nr { color: var(--text-3); font-weight: 600; font-size: 12px; }
.sortable-ghost { background: var(--akzent-hell) !important; }
.bedingung { display: inline-block; font-size: 12px; background: var(--hinter); border: 1px solid var(--rand); border-radius: 6px; padding: 1px 6px; margin: 2px 4px 2px 0; }
@media (max-width: 900px) {
  .regel-zeile { grid-template-columns: 24px 1fr auto; }
  .regel-zeile .nr, .regel-zeile .m-weg { display: none; }
  .regel-zeile .m-voll { grid-column: 2 / -1; }
}
.bed-zeile { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.bed-zeile .doppel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.trefferbox { border-radius: var(--radius); background: var(--hinter); padding: 12px 14px; font-size: 13px; }
.trefferbox ul { margin: 8px 0 0; padding: 0; list-style: none; }
.trefferbox li { display: flex; gap: 10px; padding: 3px 0; border-top: 1px solid var(--rand); font-size: 12.5px; }

.raster-bereiche { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.bereich-karte .karte-kopf { flex-wrap: wrap; }
.bereich-karte .kat { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--rand); }
.bereich-karte .kat > .kuerzen { flex: 1 1 180px; min-width: 0; }
.bereich-karte .kat:last-child { border-bottom: 0; }
.bereich-karte .kat.archiviert { opacity: .5; }
@media (max-width: 700px) { .bereich-karte .kat .m-weg { display: none; } }

.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 18px; overflow-x: auto; }
.reiter button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 550; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter button.aktiv { color: var(--akzent-dunkel); border-bottom-color: var(--akzent); }

.top5 .eintrag { padding: 9px 0; border-bottom: 1px solid var(--rand); }
.top5 .eintrag:last-child { border-bottom: 0; }
.top5 .balken { height: 6px; border-radius: 3px; background: var(--hinter); margin-top: 6px; overflow: hidden; }
.top5 .balken div { height: 100%; background: #b5562f; border-radius: 3px; }
.diagramm { position: relative; height: 280px; }

/* Login */
.login-seite { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-karte { width: min(400px, 100%); padding: 28px; }
.login-karte .marke { padding: 0 0 20px; }

/* ------------------------------------------------------------ Planung */
.legende { display: inline-block; width: 16px; height: 0; vertical-align: middle; margin-right: 4px; }
.plan-wrap { overflow-x: auto; }
.plan-tabelle { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.plan-tabelle th, .plan-tabelle td { padding: 6px 10px; border-bottom: 1px solid var(--rand); text-align: right; white-space: nowrap; background: var(--flaeche); }
.plan-tabelle th { position: sticky; top: 0; z-index: 2; background: #fafbfa; color: var(--text-2); font-weight: 600; font-size: 12px; }
.plan-tabelle .fest { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 230px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--rand); }
.plan-tabelle th.fest { z-index: 3; }
.plan-tabelle .regel-spalte { text-align: left; min-width: 150px; }
.plan-tabelle .ist { background: #f6f7f6; color: var(--text-2); }
.plan-tabelle th.ist { background: #f0f2f1; }
.plan-tabelle .summe { font-weight: 600; border-left: 1px solid var(--rand); }
.plan-tabelle tr.ober td { font-weight: 600; }
.plan-tabelle tr.abschnitt td { background: var(--akzent-hell); font-weight: 700; color: var(--akzent-dunkel); }
.plan-tabelle tr.abschnitt td.ist { background: #dbe9e2; }
.plan-tabelle tr.netto td, .plan-tabelle tr.stand td { background: #eef1ef; color: var(--text); }
.plan-tabelle tr.stand td { border-top: 2px solid var(--rand-2); }
.plan-tabelle td.neg { color: var(--rot); }
.plan-tabelle td.stand-gelb { background: var(--gelb-hell); color: var(--gelb); }
.plan-tabelle td.stand-rot { background: var(--rot-hell); color: var(--rot); }
.plan-tabelle td.bearbeitbar { cursor: text; }
.plan-tabelle td.bearbeitbar:hover { box-shadow: inset 0 0 0 1px var(--akzent); }
.plan-tabelle td.manuell { background: #fff4d6; font-weight: 600; position: relative; }
.plan-tabelle td.manuell::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--gelb); }
.plan-tabelle td.geschaetzt { font-style: italic; color: var(--text-3); }
.plan-tabelle .aufklapp { border: 0; background: none; cursor: pointer; color: var(--text-3); width: 16px; padding: 0; font-size: 11px; }
.zelle-eingabe { width: 90px !important; height: 26px !important; text-align: right; padding: 0 6px !important; font-size: 12.5px; }
.regel-knopf { border: 1px solid var(--rand); background: var(--hinter); border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regel-knopf:hover { border-color: var(--akzent); color: var(--akzent-dunkel); }
.regel-knopf.leer { color: var(--text-3); border-style: dashed; background: transparent; }
.regel-knopf.ober { background: transparent; color: var(--text-2); font-weight: 500; }
.methode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rand); border-radius: var(--radius); cursor: pointer; }
.methode.aktiv { border-color: var(--akzent); background: var(--akzent-hell); }
.methode input { margin-top: 3px; accent-color: var(--akzent); }
.muster { display: inline-block; width: 14px; height: 12px; vertical-align: middle; border-radius: 3px; margin-right: 4px; text-align: center; font-size: 11px; line-height: 12px; }
.muster.manuell { background: #fff4d6; border: 1px solid #f0dca8; }
.muster.geschaetzt { font-style: italic; color: var(--text-3); }
.muster.ist { background: #f0f2f1; border: 1px solid var(--rand); }
.kursiv { font-style: italic; color: var(--text-3); }
.diagramm-hoch { height: 340px; }
.planzeile { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rand); font-size: 13px; }

/* Szenarien */
.szenario-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--rand); background: #fafbfa; }
.szenario-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rand-2); background: var(--flaeche); font: inherit; font-size: 13px; cursor: pointer; color: var(--text-2); }
.szenario-chip:hover { border-color: var(--text-3); color: var(--text); }
.szenario-chip.aktiv { border-color: var(--text); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--text) inset; }
.szenario-chip .punkt, .punkt-gross { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.punkt-gross { width: 10px; height: 10px; vertical-align: middle; }
.tabelle.vergleich td, .tabelle.vergleich th { padding: 7px 10px; font-size: 13px; }
.anpassung-zeile { padding: 6px 0; border-bottom: 1px solid var(--rand); font-size: 13px; }
.anpassung-form { border: 1px solid var(--rand); border-radius: var(--radius); padding: 14px; background: var(--hinter); }
.plan-tabelle td.szenario { background: #efeafc; }
.plan-tabelle td.szenario.manuell { background: #e4dcfa; }

/* Liquiditätsübersicht im Agicap-Stil: feste linke Spalte, gemeinsamer Scrollbereich für Diagramm und Tabelle */
.haupt:has(.liq) { max-width: none; }
.liq-leiste { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.zeitraum { display: inline-flex; align-items: center; gap: 6px; background: var(--flaeche); border: 1px solid var(--rand-2); border-radius: 8px; padding: 2px 6px; }
.zeitraum select { border: 0; height: 32px; width: auto; font-weight: 600; padding: 0 4px; background: transparent; }
.zeitraum .pfeil { color: var(--text-3); }
.liq { display: grid; grid-template-columns: 330px minmax(0, 1fr); overflow: hidden; }
.liq-links { border-right: 1px solid var(--rand); background: var(--flaeche); z-index: 2; }
.liq-feld { height: 360px; position: relative; }
.liq-kpi { position: absolute; inset: 14px 66px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.liq-kpi-box { background: #f1f5fc; border-radius: 10px; padding: 12px 14px; }
.liq-kpi-wert { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.liq-kpi-titel { color: #2a78d6; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.liq-kpi-titel .punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.liq-kpi-plan { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; padding: 0 4px; }
.liq-achse { position: absolute; top: 0; right: 0; width: 58px; height: 100%; }
.liq-rechts { overflow-x: auto; overflow-y: hidden; }
.liq-innen { position: relative; }
.liq-tabelle { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.liq-namen { width: 100%; }
.liq-tabelle th, .liq-tabelle td { height: 48px; padding: 0 12px; border-bottom: 1px solid var(--rand); white-space: nowrap; background: var(--flaeche); }
.liq-tabelle thead th { height: 48px; border-bottom: 1px solid var(--rand-2); background: #fafbfa; }
.liq-werte td, .liq-werte th { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.liq-werte th { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-2); line-height: 1.15; }
.liq-werte th .spalten-art { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0; min-height: 12px; }
.liq-werte .heute { background: #f0f2f1; }
.liq-werte th.heute { background: #e8ecea; color: var(--text); }
.liq-werte td.plan { color: #3b4542; }
.liq-werte .jahr { position: sticky; right: 0; z-index: 1; border-left: 2px solid var(--rand-2); font-weight: 650; background: #fafbfa; }
.liq-werte th.jahr { text-align: center; white-space: nowrap; padding: 0 4px; }
.jahr-pfeil { border: 0; background: none; cursor: pointer; color: var(--text-3); font-size: 16px; padding: 0 4px; }
.jahr-pfeil:hover { color: var(--text); }
.liq-tabelle tr.abschnitt td { font-weight: 700; background: #f6f8f7; }
.liq-werte tr.abschnitt td.heute { background: #eceeed; }
.liq-tabelle tr.bestand td { font-weight: 650; background: #f6f8fb; }
.liq-werte tr.bestand td.heute { background: #e9edf3; }
.liq-tabelle tr.netto td { font-weight: 600; }
.liq-tabelle tr.ober td { font-weight: 600; }
.liq-tabelle tr.offen td { color: var(--text-2); }
.liq-werte td.neg { color: var(--rot); }
.liq-werte td.link { cursor: pointer; }
.liq-werte td.link:hover { text-decoration: underline; }
.liq-werte td.bearbeitbar { cursor: pointer; }
.liq-werte td.bearbeitbar:hover { box-shadow: inset 0 0 0 1px #2a78d6; }
.liq-werte td.manuell { background: #fff4d6; font-weight: 600; }
.liq-werte td.szenario { background: #efeafc; }
.liq-werte td.geschaetzt { font-style: italic; color: var(--text-3); }
.liq-werte td.stand-gelb { background: var(--gelb-hell); color: var(--gelb); }
.liq-werte td.stand-rot { background: var(--rot-hell); color: var(--rot); }
.liq-namen .name { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.liq-namen .einzug { padding-left: 46px; }
.symbolbox { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.symbolbox.gruen { background: #1e9e5a; } .symbolbox.rot { background: #d33a2c; } .symbolbox.blau { background: #2a78d6; } .symbolbox.grau { background: #8a9591; }
.kat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.kat-name { overflow: hidden; text-overflow: ellipsis; }
.regel-mini { border: 0; background: none; padding: 0; font: inherit; font-size: 11px; font-weight: 500; color: #2a78d6; cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.regel-mini:hover { color: #2a78d6; text-decoration: underline; }
.liq-namen .aufklapp { border: 0; background: none; cursor: pointer; color: var(--text-3); width: 16px; padding: 0; font-size: 11px; flex: none; }
.aufklapp-platz { width: 16px; flex: none; }
.liq-suche { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rand-2); border-radius: 8px; padding: 0 10px; height: 34px; background: var(--flaeche); }
.liq-suche svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.liq-suche input { border: 0; height: 30px; padding: 0; font-weight: 400; }
.liq-suche input:focus { outline: none; }
.liq-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.muster-balken { display: inline-block; width: 10px; height: 12px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
@media (max-width: 760px) {
  .liq { grid-template-columns: 170px minmax(0, 1fr); }
  .liq-kpi-plan { display: none; }
  .liq-kpi { right: 60px; }
  .liq-kpi-wert { font-size: 15px; }
  .liq-kpi { inset: 10px 60px 10px 8px; }
  .liq-kpi-box { padding: 8px; }
  .liq-kpi-box .klein { display: none; }
  .liq-werte .jahr { position: static; }
  .liq-tabelle td, .liq-tabelle th { padding: 0 8px; }
  .liq-namen .einzug { padding-left: 20px; }
  .symbolbox { display: none; }
}

/* Menü an einer Planzelle */
.liq-werte td.aktiv { box-shadow: inset 0 0 0 2px #2a78d6; }
.liq-tipp { color: var(--text-2); font-weight: 500; }
.zell-pop { position: fixed; z-index: 60; width: 330px; background: var(--flaeche); border: 1px solid var(--rand-2); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 30, 26, .18); font-size: 13px; }
.zell-pop-kopf { display: flex; align-items: flex-start; gap: 8px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--rand); }
.zell-pop-kopf > div { flex: 1; min-width: 0; }
.zell-pop-kopf .klein { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zell-pop-monat { background: #f1f5fc; color: #2a78d6; font-weight: 600; font-size: 12px; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.zell-pop-zu { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text-3); padding: 0 2px; }
.zell-pop-teil { padding: 10px 14px; }
.zell-pop-teil + .zell-pop-teil { border-top: 1px solid var(--rand); }
.zell-pop-teil input { height: 34px; }
.zell-pop-teil .knopf { white-space: nowrap; }
.zell-methoden { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.zell-methoden button { border: 1px solid var(--rand-2); background: var(--flaeche); border-radius: 999px; padding: 4px 10px; font: inherit;
  font-size: 12px; cursor: pointer; }
.zell-methoden button:hover { border-color: #2a78d6; color: #2a78d6; }

/* Zwei-Faktor-Anmeldung */
.login-karte.breit { width: min(440px, 100%); }
.zf-schritte { padding-left: 20px; margin: 8px 0; color: var(--text-2); }
.zf-schritte li + li { margin-top: 4px; }
.zf-qr { display: grid; place-items: center; padding: 6px 0 10px; }
.zf-qr svg { width: min(280px, 100%); height: auto; }
.zf-schluessel { margin-top: 4px; padding: 8px 10px; background: var(--flaeche-2, #f4f6f5); border-radius: 6px; word-break: break-all; color: var(--text); }
.zf-code { font-size: 22px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
