/* ============================================================
   Kassenbuch – warme, ruhige Spa-Ästhetik · mobile-first
   ============================================================ */

:root {
    /* Farben (OKLCH) – warmes Leinen, Espresso, Terracotta, Salbei */
    --sand:       oklch(96.5% 0.012 75);
    --sand-deep:  oklch(92.5% 0.018 70);
    --surface:    oklch(99.2% 0.006 85);
    --ink:        oklch(29% 0.022 50);
    --ink-soft:   oklch(50% 0.02 55);
    --line:       oklch(89% 0.015 72);
    --clay:       oklch(60% 0.122 40);
    --clay-deep:  oklch(52% 0.13 38);
    --sage:       oklch(56% 0.075 158);
    --sage-deep:  oklch(46% 0.08 158);
    --rust:       oklch(53% 0.15 32);

    /* Typografie – System-Serif fürs Display, Sans fürs UI */
    --font:       ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-disp:  "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
    --text-base:  clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
    --text-h1:    clamp(1.6rem, 1.3rem + 1.6vw, 2.1rem);

    /* Masse */
    --maxw:       640px;
    --radius:     16px;
    --radius-sm:  10px;
    --space:      clamp(1rem, 0.8rem + 1vw, 1.4rem);
    --shadow:     0 1px 2px oklch(40% 0.03 50 / 0.06), 0 8px 24px oklch(40% 0.03 50 / 0.07);
    --shadow-sm:  0 1px 2px oklch(40% 0.03 50 / 0.08);

    --dur:        220ms;
    --ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

/* hidden-Attribut darf nie von ID/Klassen-Regeln überstimmt werden */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--ink);
    background: var(--sand);
    -webkit-font-smoothing: antialiased;
}

svg { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

h1, h2 { font-family: var(--font-disp); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: var(--text-h1); margin: 0; }
h2 { font-size: 1.25rem; margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Layout ---------- */
.content {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: var(--space);
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}
.stack > * + * { margin-top: var(--space); }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

/* ---------- Topbar + Firma-Switcher ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    max-width: var(--maxw); margin-inline: auto;
    padding: 0.6rem var(--space);
    background: oklch(96.5% 0.012 75 / 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.switcher { position: relative; }
.switcher summary {
    display: flex; align-items: center; gap: 0.5rem;
    list-style: none; cursor: pointer;
    padding: 0.35rem 0.6rem; border-radius: var(--radius-sm);
}
.switcher summary::-webkit-details-marker { display: none; }
.switcher__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.switcher__name { font-weight: 600; font-family: var(--font-disp); font-size: 1.1rem; }
.chev { width: 1.1em; height: 1.1em; color: var(--ink-soft); transition: transform var(--dur) var(--ease); }
.switcher[open] .chev { transform: rotate(180deg); }
.switcher__menu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 0.4rem; display: flex; flex-direction: column;
}
.switcher__menu a { padding: 0.7rem 0.8rem; border-radius: var(--radius-sm); }
.switcher__menu a.is-active { background: var(--sand-deep); font-weight: 600; }
.switcher__manage { color: var(--clay-deep); border-top: 1px solid var(--line); margin-top: 0.3rem; }
.topbar__logout { color: var(--ink-soft); padding: 0.5rem; }

/* ---------- Tabbar ---------- */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    display: flex; justify-content: space-around; align-items: center;
    max-width: var(--maxw); margin-inline: auto;
    padding: 0.3rem 0.5rem calc(0.3rem + env(safe-area-inset-bottom));
    background: oklch(99% 0.008 80 / 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    border-top: 1px solid var(--line);
}
.tab {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    flex: 1; padding: 0.5rem 0; font-size: 0.66rem; color: var(--ink-soft);
    transition: color var(--dur) var(--ease);
}
.tab.is-active { color: var(--clay-deep); }
.tab--fab {
    flex: 0 0 auto; margin-top: -22px; width: 58px; height: 58px; border-radius: 50%;
    background: var(--clay); color: #fff; justify-content: center;
    box-shadow: 0 6px 18px oklch(60% 0.12 40 / 0.45); border: 4px solid var(--sand);
}
.tab--fab svg { width: 1.6em; height: 1.6em; }
.tab--fab:active { transform: scale(0.94); }

/* ---------- Karten & Formulare ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: var(--space); box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
input, select, textarea {
    font: inherit; color: var(--ink); width: 100%;
    padding: 0.7rem 0.8rem; background: var(--sand);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--clay);
    box-shadow: 0 0 0 3px oklch(60% 0.122 40 / 0.16); background: var(--surface);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    font: inherit; font-weight: 600; cursor: pointer; text-align: center;
    padding: 0.8rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid transparent;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--clay); color: #fff; box-shadow: 0 4px 12px oklch(60% 0.122 40 / 0.3); }
.btn--primary:hover { background: var(--clay-deep); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--sand-deep); }
.btn--danger { background: transparent; color: var(--rust); border-color: oklch(53% 0.15 32 / 0.4); }
.btn--danger:hover { background: oklch(53% 0.15 32 / 0.08); }
.btn--block { width: 100%; }
.btn--small { padding: 0.5rem 0.85rem; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Statistik-Kacheln ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem; display: flex; flex-direction: column; gap: 0.2rem; box-shadow: var(--shadow-sm);
}
.stat--profit { grid-column: 1 / -1; background: linear-gradient(135deg, var(--clay), var(--clay-deep)); border: none; color: #fff; }
.stat--profit.is-negative { background: linear-gradient(135deg, var(--rust), oklch(45% 0.15 32)); }
.stat__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
.stat__value { font-family: var(--font-disp); font-size: 1.55rem; font-weight: 600; }
.stat--income .stat__value { color: var(--sage-deep); }
.stat--expense .stat__value { color: var(--rust); }

/* ---------- Buchungsliste ---------- */
.entry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.entry {
    display: flex; align-items: center; gap: 0.9rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 0.7rem 0.9rem; box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.entry:active { transform: scale(0.99); }
.entry__date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 48px; height: 48px; flex: 0 0 48px; border-radius: var(--radius-sm);
    background: var(--sand-deep); line-height: 1;
}
.entry__date .d { font-family: var(--font-disp); font-size: 1.25rem; font-weight: 600; }
.entry__date .m { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.entry__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.entry__main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry__main small { color: var(--ink-soft); font-size: 0.82rem; }
.entry__amount { font-family: var(--font-disp); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.entry__amount.is-income { color: var(--sage-deep); }
.entry__amount.is-expense { color: var(--ink); }
.clip { margin-left: 0.3rem; }

/* ---------- Segmented control (Ausgabe/Einnahme) ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 0.55rem; border-radius: 8px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
#kind-inc:checked + label { color: var(--sage-deep); }

/* ---------- Beleg-Vorschau ---------- */
.receipt-preview { text-align: center; }
.receipt-preview img { max-width: 100%; max-height: 280px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- Dropzone (Scan) ---------- */
.dropzone { display: block; cursor: pointer; }
.dropzone__inner {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center;
    padding: 2.4rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius);
    background: var(--sand); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dropzone:hover .dropzone__inner { border-color: var(--clay); background: var(--surface); }
.dropzone__inner svg { width: 2.4em; height: 2.4em; color: var(--clay); }
.dropzone__inner span { color: var(--ink-soft); font-size: 0.88rem; }
#preview { max-width: 100%; max-height: 320px; border-radius: var(--radius); display: block; margin-inline: auto; }
.hint { font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin: 0; }

/* ---------- Listen, Tags, Editor ---------- */
.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.card-list__head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card-list__head small { display: block; width: 100%; }
.badge { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--sage); color: #fff; padding: 0.15rem 0.5rem; border-radius: 999px; }
.editor summary { cursor: pointer; color: var(--clay-deep); font-weight: 600; font-size: 0.9rem; margin-top: 0.6rem; }
.editor > * + * { margin-top: 0.8rem; }
.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.4rem 0.35rem 0.8rem; font-size: 0.9rem; }
.tag form { display: inline; }
.tag button { border: none; background: var(--sand-deep); color: var(--ink-soft); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.tag button:hover { background: var(--rust); color: #fff; }
.addline { display: flex; gap: 0.5rem; }
.addline input { flex: 1; }

/* ---------- Balken (Auswertung) ---------- */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.bars__top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.3rem; }
.bars__top strong { font-family: var(--font-disp); }
.bar { height: 8px; background: var(--sand-deep); border-radius: 999px; overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 999px; }
.bar__fill--expense { background: linear-gradient(90deg, var(--clay), var(--clay-deep)); }
.bar__fill--income { background: linear-gradient(90deg, var(--sage), var(--sage-deep)); }

/* ---------- Toasts, Notices, Empty ---------- */
.toast { padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin-bottom: var(--space); box-shadow: var(--shadow-sm); animation: slideIn var(--dur) var(--ease); }
.toast--ok { background: oklch(56% 0.075 158 / 0.14); color: var(--sage-deep); border: 1px solid oklch(56% 0.075 158 / 0.3); }
.toast--err { background: oklch(53% 0.15 32 / 0.1); color: var(--rust); border: 1px solid oklch(53% 0.15 32 / 0.3); }
.notice { padding: 0.9rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.notice--warn { background: oklch(80% 0.1 75 / 0.18); border: 1px solid oklch(70% 0.1 75 / 0.4); }
.notice--info { background: oklch(70% 0.06 230 / 0.14); border: 1px solid oklch(70% 0.06 230 / 0.35); }
.notice code { background: oklch(40% 0.03 50 / 0.1); padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.85em; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft); }
.empty__actions { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Auth (Login) ---------- */
body.auth { display: flex; align-items: center; min-height: 100svh; }
.login { max-width: 380px; margin-inline: auto; padding: var(--space); width: 100%; }
.login > * + * { margin-top: var(--space); }
.login__brand { text-align: center; }
.login__mark { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 20px; background: linear-gradient(135deg, var(--clay), var(--clay-deep)); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow); }
.login__mark svg { width: 2em; height: 2em; }
.login__brand h1 { margin: 0; }
.login__brand p { color: var(--ink-soft); font-size: 0.92rem; margin: 0.4rem 0 0; }

.yearpick select { padding: 0.4rem 0.6rem; width: auto; font-weight: 600; }
.link-back { color: var(--clay-deep); font-weight: 600; font-size: 0.9rem; }

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

/* ============================================================
   Doppelte Buchführung – Buchungen, Vorlagen, Auswertungen
   ============================================================ */

/* Buchungsfluss Soll → Haben (in Listen) */
.booking-flow { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.acc-soll, .acc-haben { font-variant-numeric: tabular-nums; font-weight: 600; padding: 0.05rem 0.4rem; border-radius: 6px; font-size: 0.78rem; }
.acc-soll { background: oklch(60% 0.122 40 / 0.12); color: var(--clay-deep); }
.acc-haben { background: oklch(56% 0.075 158 / 0.14); color: var(--sage-deep); }
.flow-arrow { width: 0.95em; height: 0.95em; color: var(--ink-soft); stroke-width: 2.4; }

/* Schnell-Buchungs-Chips */
.chip-group { display: flex; flex-direction: column; gap: 0.4rem; }
.chip-group__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
    font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
    padding: 0.5rem 0.85rem; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink);
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip--income { border-color: oklch(56% 0.075 158 / 0.4); }
.chip--income:hover { background: oklch(56% 0.075 158 / 0.1); }
.chip--expense { border-color: oklch(60% 0.122 40 / 0.4); }
.chip--expense:hover { background: oklch(60% 0.122 40 / 0.1); }
.chip--transfer:hover { background: var(--sand-deep); }
.chip.is-selected { background: var(--clay); color: #fff; border-color: var(--clay); box-shadow: var(--shadow-sm); }

/* Kontenplan-Liste */
.acc-list, .tmpl-list, .led-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acc-list > li { border-bottom: 1px solid var(--line); }
.acc-list .editor summary { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0; color: var(--ink); font-weight: 400; }
.acc-no { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--clay-deep); min-width: 3.2em; }
.acc-name { flex: 1; }
.badge--off { background: var(--ink-soft); }
.row-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Vorlagen-Liste */
.tmpl-list > li { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.tmpl-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.icon-del { border: none; background: var(--sand-deep); color: var(--ink-soft); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; flex: 0 0 auto; }
.icon-del:hover { background: var(--rust); color: #fff; }

/* Erfolgsrechnung / Bilanz */
.ledger-block { margin-bottom: 0.4rem; }
.ledger-block__head { font-family: var(--font-disp); font-size: 1.05rem; font-weight: 600; padding: 0.4rem 0 0.2rem; color: var(--clay-deep); border-bottom: 2px solid var(--line); }
.acc-row { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 0.6rem; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.acc-row__no { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.85rem; }
.acc-row__amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.acc-row__amt.is-income { color: var(--sage-deep); }
.acc-row__amt.is-expense { color: var(--rust); }
.acc-row--total { font-weight: 700; border-bottom: none; border-top: 2px solid var(--line); margin-top: 0.2rem; }
.acc-row--total span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.result-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--sage), var(--sage-deep)); color: #fff; }
.result-bar.is-negative { background: linear-gradient(135deg, var(--rust), oklch(45% 0.15 32)); }
.result-bar strong { font-family: var(--font-disp); font-size: 1.4rem; }

/* Kontenblatt */
.ledger-head { display: flex; flex-direction: column; gap: 0.3rem; }
.ledger-saldi { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-soft); font-size: 0.9rem; }
.ledger-saldi strong { color: var(--ink); font-family: var(--font-disp); font-size: 1.1rem; }
.led-row { display: grid; grid-template-columns: 3em 1fr auto auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.led-row__date { font-size: 0.8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.led-row__main { min-width: 0; display: flex; flex-direction: column; }
.led-row__main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.led-row__amt { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.9rem; text-align: right; }
.led-row__amt.is-debit { color: var(--sage-deep); }
.led-row__amt.is-credit { color: var(--rust); }
.led-row__bal { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 0.85rem; text-align: right; min-width: 5em; }

/* Flüssige-Mittel-Diagramm (SVG) */
.cashflow-chart { width: 100%; height: auto; display: block; }
.cashflow-chart rect { stroke: none; }
.cashflow-chart .bar-in { fill: var(--sage); }
.cashflow-chart .bar-out { fill: var(--clay); }
.cashflow-chart .cf-label { fill: var(--ink-soft); stroke: none; font-size: 13px; text-anchor: middle; font-family: var(--font); }
.cashflow-chart .cf-axis { stroke: var(--line); stroke-width: 1; }
.cf-legend { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; font-size: 0.88rem; }
.cf-leg { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-soft); }
.cf-leg::before { content: ''; width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cf-leg--in::before { background: var(--sage); }
.cf-leg--out::before { background: var(--clay); }
.cf-leg strong { font-family: var(--font-disp); color: var(--ink); }

/* Scan-Buttons + Abrechnungs-Prüfung */
.scan-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.stmt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.stmt-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; align-items: center; padding: 0.7rem 0.8rem; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stmt-info { display: flex; flex-direction: column; min-width: 0; }
.stmt-info strong { font-family: var(--font-disp); font-size: 1.1rem; }
.stmt-row select { width: auto; max-width: 52vw; }
.stmt-summary { display: flex; flex-direction: column; gap: 0.3rem; padding-top: 0.6rem; }
.stmt-summary > div { display: flex; justify-content: space-between; color: var(--ink-soft); }
.stmt-summary strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.stmt-summary__total { border-top: 2px solid var(--line); padding-top: 0.5rem; margin-top: 0.2rem; }
.stmt-summary__total span { color: var(--ink); font-weight: 600; }
.stmt-summary__total strong { font-family: var(--font-disp); font-size: 1.15rem; color: var(--sage-deep); }

/* Bankabgleich */
.reco-stats { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 0.5rem; }
.reco-stats .stat { padding: 0.6rem 0.4rem; text-align: center; gap: 0.3rem; }
.reco-stats .stat__label { font-size: 0.66rem; text-transform: none; letter-spacing: 0; }
.reco-stats .stat__value { font-family: var(--font-disp); font-size: 1.5rem; }
.stat--alert { background: oklch(80% 0.1 75 / 0.2); border-color: oklch(70% 0.1 75 / 0.45); }
.reco-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reco-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.reco-row:last-child { border-bottom: none; }
.reco-row__main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.reco-row__main strong { font-variant-numeric: tabular-nums; }
.reco-ok { color: var(--sage-deep); font-size: 1.2rem; flex: 0 0 auto; }
details.card summary { cursor: pointer; font-weight: 600; }
