:root {
  --ink: #1b2130;
  --ink-2: #232b3d;
  --ink-line: #313a50;
  --surface: #eef1f5;
  --card: #ffffff;
  --line: #e3e7ee;
  --text: #1c2230;
  --text-soft: #6b7488;
  --text-faint: #9aa2b4;
  --pos: #1c8f6b;
  --pos-soft: #e6f4ee;
  --neg: #cf4257;
  --neg-soft: #fbe9ec;
  --amber: #c8791d;
  --accent: #3a6df0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,28,48,.05), 0 8px 24px rgba(20,28,48,.06);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
a { color: var(--accent); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: 252px; height: 100vh;
  background: var(--ink);
  color: #cdd4e3;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  z-index: 40;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, #2bbd8c, #1c8f6b);
  color: #fff; font-weight: 700; font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(28,143,107,.35);
}
.brand-name { font-weight: 650; color: #fff; font-size: 15px; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: #8b95ad; margin-top: 1px; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: #c2cadb; text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .14s, color .14s;
}
.sidebar nav a .ico { width: 18px; text-align: center; opacity: .65; font-size: 13px; }
.sidebar nav a:hover { background: var(--ink-2); color: #fff; }
.sidebar nav a.aktiv { background: var(--ink-2); color: #fff; box-shadow: inset 3px 0 0 var(--pos); }
.sidebar nav a.aktiv .ico { opacity: 1; color: #34c98f; }
.nav-group {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  color: #5d6781; padding: 16px 12px 6px; font-weight: 600;
}
.sidebar-foot {
  margin-top: auto; padding: 14px 12px 4px;
  border-top: 1px solid var(--ink-line);
  font-size: 12px; color: #8b95ad;
}
.sidebar-foot strong { display: block; font-size: 18px; margin-top: 3px; font-variant-numeric: tabular-nums; }

.nav-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 50;
  width: 42px; height: 42px; border: none; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---------- Content ---------- */
.content { margin-left: 252px; padding: 34px 40px 80px; max-width: 1180px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px;
}
.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--amber); font-weight: 700; margin-bottom: 6px;
}
.eyebrow a { color: var(--amber); text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
h1 { font-size: 27px; margin: 0; font-weight: 700; letter-spacing: -.5px; }
.head-summe {
  font-family: var(--mono); font-size: 20px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, #1f273a 0%, #1b2130 60%);
  color: #fff; border-radius: 20px; padding: 30px 32px;
  margin-bottom: 22px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,201,143,.18), transparent 70%);
}
.hero-label { font-size: 13px; color: #9aa6c0; letter-spacing: .02em; }
.hero-zahl {
  font-family: var(--mono); font-size: 52px; font-weight: 700;
  letter-spacing: -1.5px; margin: 6px 0 20px; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-zahl.pos { color: #45d49b; }
.hero-zahl.neg { color: #ff7a8c; }
.hero-flow { display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.07); }
.hero-flow .seg { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; min-width: 0; position: relative; transition: width .4s ease; }
.hero-flow .seg span { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; font-variant-numeric: tabular-nums; }
.hero-flow .seg.janine { background: #6a8dff; }
.hero-flow .seg.cedric { background: #b07cf0; }
.hero-flow .seg.gemeinsam { background: #4a566f; }
.hero-flow .seg.rest { background: rgba(52,201,143,.32); }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.kpi-label { font-size: 12.5px; color: var(--text-soft); display: flex; align-items: center; gap: 7px; }
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; }
.kpi-wert {
  font-family: var(--mono); font-size: 25px; font-weight: 650; margin-top: 9px;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.kpi-sub { font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.kpi-wert.pos { color: var(--pos); }
.kpi-wert.neg { color: var(--neg); }

/* ---------- Cards / Layout ---------- */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card-titel { font-size: 15px; font-weight: 650; margin: 0 0 18px; }
.card-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-kopf .card-titel { margin: 0; }
.card-hint { font-size: 12px; color: var(--text-faint); }
.titel-summe { font-family: var(--mono); font-weight: 600; color: var(--text-soft); font-size: .9em; font-variant-numeric: tabular-nums; }

/* ---------- Balken (Bereiche) ---------- */
.balken-zeile { margin-bottom: 16px; }
.balken-zeile:last-child { margin-bottom: 0; }
.balken-kopf { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.balken-kopf .b-name { color: var(--text); font-weight: 500; }
.balken-kopf .b-wert { font-family: var(--mono); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.balken-spur { height: 9px; background: var(--surface); border-radius: 6px; overflow: hidden; }
.balken-fill { height: 100%; border-radius: 6px; transition: width .4s ease; }

/* ---------- Personen-Karten ---------- */
.personen-grid { display: grid; gap: 14px; }
.person-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.person-box h3 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.person-box .badge { font-size: 11px; font-weight: 600; color: var(--text-soft); background: var(--surface); padding: 2px 8px; border-radius: 20px; }
.person-zeile { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--text-soft); }
.person-zeile .v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.person-zeile.summe { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 9px; font-weight: 650; color: var(--text); }
.person-zeile.summe .v { font-size: 16px; }
.person-zeile.summe .v.pos { color: var(--pos); }
.person-zeile.summe .v.neg { color: var(--neg); }

/* ---------- Daten-Tabellen (Budget) ---------- */
.kat-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.kat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--ink); color: #fff;
}
.kat-head .k-titel { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.kat-head .k-summe { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; color: #9fe9cd; }

.zeile {
  display: grid; grid-template-columns: 1fr 150px 84px;
  align-items: center; gap: 10px; padding: 8px 18px;
  border-bottom: 1px solid var(--line);
}
.zeile:last-child { border-bottom: none; }
.zeile input {
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  padding: 8px 10px; font: inherit; color: var(--text); width: 100%;
}
.zeile input:hover { background: var(--surface); }
.zeile input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.zeile input.betrag { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.zeile-aktionen { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-faint); font-size: 15px; display: grid; place-items: center;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--neg-soft); color: var(--neg); }

.zeile-neu { padding: 12px 18px; background: #fafbfd; }
.btn-add {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed var(--line); background: #fff; color: var(--text-soft);
  border-radius: 9px; padding: 9px 14px; font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color .14s, color .14s;
}
.btn-add:hover { border-color: var(--pos); color: var(--pos); }

.einnahme-spalte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--ink); color: #fff; border: none; border-radius: 10px;
  padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .1s, background .14s;
}
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:active { transform: translateY(1px); }

/* ---------- Buchungen erfassen ---------- */
.erfassen { margin-bottom: 22px; }
.erfassen-grid { display: grid; grid-template-columns: 150px 1.2fr 110px 130px 1fr auto; gap: 10px; align-items: center; }
.erfassen-grid input, .erfassen-grid select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--text); background: #fff; width: 100%;
}
.erfassen-grid input:focus, .erfassen-grid select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.erfassen-grid .betrag { text-align: right; font-family: var(--mono); }

/* Monats-Navigation */
.monat-nav { display: flex; align-items: center; gap: 6px; }
.monat-label { font-weight: 600; min-width: 130px; text-align: center; font-size: 15px; }
.nav-pfeil { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 16px; color: var(--text-soft); }
.nav-pfeil:hover { border-color: var(--accent); color: var(--accent); background: #fff; }

/* ---------- Buchungsliste ---------- */
.buchungs-liste { display: flex; flex-direction: column; }
.b-zeile { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.b-zeile:last-child { border-bottom: none; }
.b-haupt { display: grid; grid-template-columns: 132px 1fr 110px 96px 30px; align-items: center; gap: 10px; }
.b-zeile input, .b-zeile select {
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  padding: 7px 8px; font: inherit; color: var(--text); width: 100%;
}
.b-zeile input:hover, .b-zeile select:hover { background: var(--surface); }
.b-zeile input:focus, .b-zeile select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.b-betrag { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.b-notiz { color: var(--text-soft); font-size: 13px; margin-top: 3px; }

/* ---------- Kategorie-Übersicht ---------- */
.kat-uebersicht { display: flex; flex-direction: column; }
.ku-zeile { margin-bottom: 14px; }
.ku-zeile:last-child { margin-bottom: 0; }
.ku-kopf { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ku-name { color: var(--text); font-weight: 500; }
.ku-wert { font-family: var(--mono); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.ku-wert .ueber { color: var(--neg); margin-left: 6px; font-weight: 600; }

/* ---------- Detailseite ---------- */
.zurueck-link { color: var(--amber); text-decoration: none; }
.zurueck-link:hover { text-decoration: underline; }
.d-zeile { display: grid; grid-template-columns: 56px 1.2fr 1fr auto 30px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.d-zeile:last-child { border-bottom: none; }
.d-datum { font-family: var(--mono); font-size: 13px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.d-kat { font-weight: 500; font-size: 14px; }
.d-notiz { font-size: 13px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-betrag { font-family: var(--mono); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; padding-right: 4px; }

/* ---------- Dashboard: Buchungs-Balken (klickbar) ---------- */
.buchung-bars { display: flex; gap: 22px; align-items: stretch; padding-top: 6px; }
.bb-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; text-decoration: none; cursor: pointer; padding: 10px 4px; border-radius: 12px; transition: background .14s; }
.bb-bar:hover { background: var(--surface); }
.bb-val { font-family: var(--mono); font-weight: 650; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.bb-track { width: 100%; height: 170px; display: flex; align-items: flex-end; justify-content: center; }
.bb-saeule { width: 62%; max-width: 96px; border-radius: 9px 9px 0 0; transition: height .45s ease, filter .15s; }
.bb-bar:hover .bb-saeule { filter: brightness(1.08); }
.bb-name { font-weight: 600; font-size: 14px; color: var(--text); }
.bb-anzahl { font-size: 12px; color: var(--text-soft); }

/* ---------- Verlauf-Diagramm ---------- */
.chart-wrap { margin: 4px 0 6px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .bar-val { font-size: 10px; fill: var(--text-soft); font-family: var(--mono); }
.chart-svg .ax-lbl { font-size: 11px; fill: var(--text-faint); }
.chart-svg .soll-lbl { font-size: 11px; fill: var(--amber); font-weight: 600; }
.chart-legende { display: flex; gap: 22px; font-size: 12.5px; color: var(--text-soft); margin-top: 12px; align-items: center; }
.chart-legende span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legende i { width: 16px; display: inline-block; }
.chart-legende .leg-bar { height: 11px; border-radius: 2px; background: #1c8f6b; }
.chart-legende .leg-line { height: 0; border-top: 2px dashed var(--amber); }

.vt-zeile { display: grid; grid-template-columns: 1.6fr .7fr 1fr 1fr 1fr; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.vt-zeile:last-child { border-bottom: none; }
.vt-head { border-bottom: 2px solid var(--line); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); font-weight: 700; }
.vt-head span:not(:first-child), .vt-zeile span:not(.vt-monat) { text-align: right; }
.vt-monat { color: var(--text); }
.vt-anzahl, .vt-ist, .vt-soll { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text-soft); }
.vt-diff { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.vt-diff.pos { color: var(--pos); }
.vt-diff.neg { color: var(--neg); }

/* ---------- Einstellungen ---------- */
.hinweis { font-size: 13px; color: var(--text-soft); margin: -8px 0 18px; line-height: 1.5; }
.feld { margin-bottom: 14px; }
.feld label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.feld input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--text); }
.feld input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.split-warnung { font-size: 13px; margin: 4px 0 16px; min-height: 18px; }
.split-warnung.warn { color: var(--neg); }
.split-warnung.ok { color: var(--pos); }

.kat-manager { max-width: 620px; margin-top: 22px; }
.km-liste { display: flex; flex-direction: column; }
.km-zeile { display: grid; grid-template-columns: 34px 1fr 120px 30px; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.km-zeile:last-child { border-bottom: none; }
.km-farbe { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.km-farbe::-webkit-color-swatch { border: none; border-radius: 5px; }
.km-farbe::-webkit-color-swatch-wrapper { padding: 2px; }
.km-name { padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; font: inherit; color: var(--text); width: 100%; }
.km-name:hover { background: var(--surface); }
.km-name:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.km-budget { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; width: 100%; color: var(--text); }
.km-budget:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.km-summe { display: flex; justify-content: space-between; padding: 14px 0 4px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-soft); }
.km-summe strong { color: var(--text); }
.km-neu { display: flex; gap: 10px; margin-top: 16px; }
.km-neu input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.km-neu input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }

/* ---------- Leerzustand & Toast ---------- */
.leer { padding: 28px 8px; text-align: center; color: var(--text-faint); font-size: 14px; line-height: 1.6; }
.leer a { color: var(--pos); text-decoration: none; font-weight: 600; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 24px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 11px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(20,28,48,.3);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.fehler { background: var(--neg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .sidebar.offen { transform: translateX(0); }
  .nav-toggle { display: grid; place-items: center; }
  .content { margin-left: 0; padding: 70px 18px 70px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .split-2 { grid-template-columns: 1fr; }
  .hero-zahl { font-size: 40px; }
  .page-head { flex-wrap: wrap; }
  .zeile { grid-template-columns: 1fr 110px 70px; }
  .erfassen-grid { grid-template-columns: 1fr 1fr; }
  .erfassen-grid .btn-primary { grid-column: 1 / -1; }
  .b-haupt { grid-template-columns: 1fr 92px 30px; }
  .b-haupt .b-datum { grid-column: 1 / -1; }
  .b-haupt .b-bereich { grid-column: 1 / -1; }
  .buchung-bars { gap: 10px; }
  .bb-track { height: 120px; }
  .bb-val { font-size: 14px; }
  .vt-zeile { grid-template-columns: 1.4fr 1fr 1fr; }
  .vt-zeile .vt-anzahl, .vt-zeile .vt-soll,
  .vt-head span:nth-child(2), .vt-head span:nth-child(4) { display: none; }
  .d-zeile { grid-template-columns: 46px 1fr auto 28px; }
  .d-notiz { display: none; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* =================== v2: Login / Auth-Seiten =================== */
.auth-body { background: var(--surface); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; font-weight: 700; font-size: 18px; color: var(--text); }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 26px; }
.auth-card h1 { font-size: 22px; margin: 0 0 18px; }
.auth-card form label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 14px; font-weight: 500; }
.auth-card form input { width: 100%; padding: 11px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--text); }
.auth-card form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.auth-btn { width: 100%; margin-top: 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--text-soft); }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-fehler { background: var(--neg-soft); color: var(--neg); padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.auth-text { font-size: 14px; color: var(--text-soft); line-height: 1.55; margin: 0 0 16px; }
.auth-hint { color: var(--text-faint); font-weight: 400; font-size: 12px; }

/* =================== v2: Konto / Logout in der Sidebar =================== */
.sidebar-konto { padding: 12px 12px 2px; margin-top: 12px; border-top: 1px solid var(--ink-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.konto-mail { font-size: 12px; color: #8b95ad; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-logout-form { margin: 0; }
.konto-logout { background: transparent; border: 1px solid var(--ink-line); color: #c2cadb; border-radius: 7px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; transition: background .14s, color .14s; }
.konto-logout:hover { background: var(--ink-2); color: #fff; }
.nav-person { white-space: nowrap; }

/* =================== v2: Ausgaben-Gruppen (Tabellen anlegen/löschen) =================== */
.gruppe-head { gap: 10px; }
.gruppe-name { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; padding: 5px 8px; border-radius: 6px; }
.gruppe-name:hover { background: rgba(255,255,255,.08); }
.gruppe-name:focus { outline: none; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.gruppe-rechts { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn-hell { color: rgba(255,255,255,.55); }
.icon-btn-hell:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-gruppe-neu { margin-top: 2px; }

/* =================== v2: Abos =================== */
.abo-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.abo-form .a-name { flex: 2 1 170px; }
.abo-form .a-betrag { flex: 1 1 110px; }
.abo-form .a-zyklus, .abo-form .a-bereich { flex: 1 1 130px; }
.abo-form > input, .abo-form > select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--text); background: #fff; }
.abo-form .a-betrag { text-align: right; font-family: var(--mono); }
.abo-form .a-feld { flex: 1 1 150px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-soft); }
.abo-form .a-feld input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; color: var(--text); }
.abo-form .a-feld span { display: none; }
.abo-form > input:focus, .abo-form select:focus, .abo-form .a-feld input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.abo-form .btn-primary { flex: 0 0 auto; }

.abo-zeile { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.abo-haupt { display: grid; grid-template-columns: 1.6fr 120px 140px 150px auto 32px; gap: 10px; align-items: center; }
.abo-haupt input, .abo-haupt select { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 8px 9px; font: inherit; color: var(--text); width: 100%; }
.abo-haupt input:hover, .abo-haupt select:hover { background: var(--surface); }
.abo-haupt input:focus, .abo-haupt select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.abo-haupt .a-betrag { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.abo-monatlich { font-family: var(--mono); color: var(--text-soft); text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.abo-vertrag { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-soft); }
.abo-vertrag label { display: inline-flex; align-items: center; gap: 7px; }
.abo-vertrag input[type=date], .abo-vertrag input[type=number] { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; color: var(--text); }
.abo-vertrag input[type=number] { width: 66px; text-align: right; font-family: var(--mono); }
.abo-vertrag input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,109,240,.12); }
.abo-info { margin-left: auto; text-align: right; }
.abo-kbis { display: inline-block; color: #fff; background: var(--amber); padding: 3px 11px; border-radius: 20px; font-size: 12px; margin-left: 8px; }
.abo-kpi-datum { font-size: 18px !important; }

@media (max-width: 900px) {
  .abo-haupt { grid-template-columns: 1fr 100px 32px; }
  .abo-haupt .a-zyklus, .abo-haupt .a-bereich, .abo-haupt .abo-monatlich { grid-column: span 1; }
  .abo-haupt .a-zyklus { grid-column: 1; }
  .abo-haupt .a-bereich { grid-column: 2 / 4; }
  .abo-monatlich { grid-column: 1 / 4; text-align: left; }
  .abo-info { margin-left: 0; text-align: left; }
}
