/* Design-System „Klar“: ruhige Mac-App mit Seitenleiste, gruppierten Listen und Systemblau als einziger Akzentfarbe. */
:root{
  --bg:#f5f5f7;--surface:#fff;--surface-hover:#fafafc;--sidebar:#ececee;--sidebar-line:#d9d9de;
  --text:#1d1d1f;--text-2:#3a3a3c;--muted:#6e6e73;--line:#e5e5ea;--line-soft:#efeff2;--field:#d2d2d7;--fill:#e8e8ed;
  --accent:#0071e3;--accent-hover:#0062c4;--accent-tint:#e8f1fc;--accent-text:#0058b0;--focus:rgba(0,113,227,.4);
  --positive:#1d7a3a;--positive-tint:#e3f4e8;--positive-text:#1d6b34;
  --check:#e08600;--check-tint:#fff1dd;--check-text:#8a4b00;
  --danger-tint:#fdecec;--danger-text:#9b1c1c;
  --radius-group:12px;--radius-control:8px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",system-ui,sans-serif;color:var(--text);background:var(--bg);font-synthesis:none;-webkit-font-smoothing:antialiased;letter-spacing:-.01em
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg)}
button,input,select,textarea{font:inherit;letter-spacing:inherit}
button{cursor:pointer;color:inherit}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:var(--accent)}
[hidden]{display:none!important}
h1,h2,h3,h4,p{margin-top:0}
h1{font-size:15px;font-weight:600;margin:0;letter-spacing:-.01em}
h2{font-size:32px;font-weight:700;letter-spacing:-.025em;line-height:1.15;margin-bottom:6px}
h3{font-size:17px;font-weight:600;letter-spacing:-.015em;margin-bottom:14px}
h4{font-size:14px;margin-bottom:8px}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

/* Scrollleisten: schmal, abgerundet, ohne sichtbare Spur, wie in macOS */
@supports selector(::-webkit-scrollbar){
  ::-webkit-scrollbar{width:12px;height:12px;background:transparent}
  ::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:transparent}
  ::-webkit-scrollbar-thumb{min-height:32px;min-width:32px;border:3px solid transparent;border-radius:999px;background-color:rgba(60,60,67,.22);background-clip:padding-box}
  :hover::-webkit-scrollbar-thumb{background-color:rgba(60,60,67,.36)}
  ::-webkit-scrollbar-thumb:hover{border-width:2px;background-color:rgba(60,60,67,.5)}
  ::-webkit-scrollbar-thumb:active{background-color:rgba(60,60,67,.62)}
  ::-webkit-scrollbar-button{display:none;width:0;height:0}
}
@supports not selector(::-webkit-scrollbar){
  *{scrollbar-width:thin;scrollbar-color:rgba(60,60,67,.32) transparent}
}

/* Rahmen: Seitenleiste und Arbeitsfläche */
.shell{display:flex;align-items:stretch;min-height:100vh}
.sidebar{flex:0 0 232px;position:sticky;top:0;height:100vh;overflow-y:auto;background:var(--sidebar);border-right:1px solid var(--sidebar-line);padding:22px 12px;display:flex;flex-direction:column;gap:24px}
.brand{display:flex;align-items:center;gap:10px;padding:0 10px}
.brand-mark{width:28px;height:28px;flex:none;border-radius:7px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}
.brand-mark svg{width:16px;height:16px}
.tabs{display:flex;flex-direction:column;gap:2px}
.tabs button{display:flex;align-items:center;gap:10px;min-height:40px;padding:0 10px;border:0;border-radius:var(--radius-control);background:transparent;color:var(--text);font-size:14px;text-align:left;white-space:nowrap}
.tabs button svg{width:18px;height:18px;flex:none;color:var(--accent)}
.tabs button:hover{background:#e2e2e6}
.tabs button[aria-current="page"]{background:#dadadf;font-weight:600}
.sidebar-foot{margin-top:auto;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0 10px}
.local-mark{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.local-mark svg{width:16px;height:16px;flex:none}
.workspace{flex:1;min-width:0;max-width:1180px;padding:14px 40px 0}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;min-height:48px}
.month-picker{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:500;color:var(--muted);white-space:nowrap}
.month-picker input{width:160px;font-weight:600;color:var(--text)}
.display-toolbar{display:flex;align-items:center;gap:8px}
.display-toggles{display:flex;gap:8px}
.display-toggles .button[aria-pressed="true"]{background:var(--accent-tint);color:var(--accent-text);font-weight:600}
main{min-height:64vh;outline:none}
footer{color:var(--muted);font-size:12px;padding:36px 16px 44px}

/* Text und Überschriften */
.eyebrow{color:var(--muted);font-size:13px;font-weight:600;margin:0 0 6px}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:26px 0 22px}
.page-heading p:last-child{color:var(--muted);margin:0;font-size:14px;line-height:1.5}
.muted,.hint{color:var(--muted);font-size:13px;line-height:1.5}
.hint{margin:16px 0 0}
.optional{font-weight:400;color:var(--muted)}
.orange-text{color:var(--check-text)!important}
.summary-hint{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:var(--surface);border-radius:var(--radius-group);padding:10px 12px 10px 16px;color:var(--text);font-size:14px;line-height:1.5;margin:14px 0 28px}
.summary-hint:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--check);margin-right:4px}
.drill-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin:0 0 14px}

/* Statusmarken */
.badge{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:12px;background:#efeff2;color:var(--text-2);font-size:12px;font-weight:600;white-space:nowrap}
.badge.sage{background:var(--positive-tint);color:var(--positive-text)}
.badge.orange{background:var(--check-tint);color:var(--check-text)}
.badge.orange:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--check)}

/* Schaltflächen */
.button{display:inline-flex;justify-content:center;align-items:center;min-height:36px;padding:0 14px;border:1px solid var(--field);border-radius:var(--radius-control);background:var(--surface);color:var(--text);font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap}
.button:hover{background:var(--surface-hover)}
.button.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.button.subtle{background:var(--fill);border-color:transparent}
.button.subtle:hover{background:#dedee3}
.text-button{background:none;border:0;padding:6px 0;color:var(--accent);font-size:13px;font-weight:500;text-align:left;text-decoration:none}
.text-button:hover{color:var(--accent-hover);text-decoration:underline}
.text-button.danger{color:var(--danger-text)}
.icon-button{min-width:40px;min-height:40px;flex:none;border:0;border-radius:20px;background:transparent;font-size:24px;line-height:1;color:var(--muted)}
.icon-button:hover{background:var(--fill);color:var(--text)}
.help-button,.breakdown .help-button{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex:none;width:32px;min-height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:12px;cursor:help}
.help-button span{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border:1.5px solid currentColor;border-radius:50%;font-size:10px;font-weight:700;font-style:normal;line-height:1;text-decoration:none!important}
.help-button:hover,.breakdown .help-button:hover{background:var(--fill);color:var(--text)}

/* Hinweise */
.notice{border-radius:var(--radius-group);padding:12px 16px;margin:0 0 18px;background:var(--surface);color:var(--text);font-size:14px;line-height:1.5}
.notice.error{background:var(--danger-tint);color:var(--danger-text)}
.dialog-notice{margin:0}

/* Kennzahlen: eine Fläche, Trennlinien durch 1 px Abstand */
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border-radius:var(--radius-group);overflow:hidden;margin-bottom:14px}
.metric-wrap{position:relative;min-width:0;background:var(--surface)}
.metric-wrap>.metric{width:100%;height:100%;min-height:132px;padding-bottom:34px}
.metric-wrap>.help-button{position:absolute;right:8px;bottom:6px}
.metric{display:flex;flex-direction:column;align-items:flex-start;gap:4px;border:0;background:var(--surface);padding:18px 18px 20px;text-align:left}
.metric:hover{background:var(--surface-hover)}
.metric-label{display:flex;justify-content:space-between;gap:10px;width:100%;font-size:13px;color:var(--muted)}
.metric-label [aria-hidden]{color:#b0b0b6}
.metric strong{font-size:28px;font-weight:600;letter-spacing:-.03em;margin-top:auto;padding-top:14px;font-variant-numeric:tabular-nums;color:var(--text)}
.metric small{color:var(--muted);line-height:1.4}

/* Gruppen und Listen */
.panel{background:var(--surface);border-radius:var(--radius-group);padding:20px 22px;margin-bottom:24px;min-width:0}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.panel-head h3{margin-bottom:14px}
.two-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:24px}
.two-columns .panel{margin-bottom:0}
.breakdown button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:46px;padding:10px 4px;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;font-size:14px;color:var(--text)}
.breakdown button:hover{background:var(--surface-hover)}
.breakdown strong{color:var(--text-2);font-size:14px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.breakdown .explanation-row{display:flex;align-items:center;gap:6px;border-top:1px solid var(--line)}
.breakdown .explanation-row>button:first-child{flex:1;min-width:0;border:0}
.breakdown .explanation-row>button:first-child>span{min-width:0}
.coverage-item,.rule-list>div,.import-history>div{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:10px 0;border-top:1px solid var(--line)}
.coverage-item strong,.rule-list strong,.import-history strong{font-size:14px;font-weight:500}
.coverage-item small,.rule-list small,.import-history small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:1.4}
.rule-list .text-button{white-space:nowrap}
.empty{background:var(--surface);border:1px dashed var(--field);border-radius:var(--radius-group);padding:32px;margin:0 0 24px}
.empty h3{margin-bottom:8px}
.empty p{font-size:14px;color:var(--muted);max-width:520px;line-height:1.5}
.steps{padding-left:20px;color:var(--text-2);font-size:14px;line-height:2.1}

/* Formulare */
input,select,textarea{min-height:36px;background:var(--surface);border:1px solid var(--field);color:var(--text);border-radius:var(--radius-control);padding:7px 10px;min-width:0;max-width:100%;font-size:14px}
textarea{resize:vertical;width:100%;line-height:1.4}
.filter-panel{display:grid;grid-template-columns:2fr repeat(3,minmax(0,1fr)) auto;gap:10px;align-items:end;margin-bottom:16px}
.filter-panel label,.dialog-form label,.panel form>label,.panel .form-grid label,.mapping-grid label,.import-layout label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;color:var(--text-2)}
.checkbox-row{flex-direction:row!important;align-items:center;gap:8px!important;font-weight:400!important;line-height:1.4}
.checkbox-row input{width:18px;min-height:18px;height:18px;accent-color:var(--accent)}
.filter-panel .checkbox-row{padding-bottom:9px}
.mapping-grid,.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Buchungen */
.list-heading{display:flex;justify-content:space-between;gap:16px;color:var(--muted);font-size:12px;padding:0 16px 8px}
.transaction-list{background:var(--surface);border-radius:var(--radius-group);overflow:hidden}
.transaction{padding:14px 18px;border-top:1px solid var(--line-soft)}
.transaction:first-child{border-top:0}
.transaction:hover{background:var(--surface-hover)}
.transaction-main{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:16px;align-items:start}
.transaction-main>div{min-width:0}
.transaction time{font-size:13px;color:var(--muted);padding-top:1px;font-variant-numeric:tabular-nums}
.transaction-main strong{font-size:14px;font-weight:500}
.transaction-main p{margin:3px 0;color:var(--text-2);font-size:13px;line-height:1.4}
.transaction-main small{color:var(--muted);font-size:12px}
.transaction-main p,.transaction-main small,.transaction-meta span,.account-card p,.coverage-item small,.import-history strong,.rule-list strong{overflow-wrap:anywhere}
.amount{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.amount:not(.negative){color:var(--positive)}
.amount.negative{color:var(--text)}
.transaction-meta{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin:8px 0 0 112px}
.transaction-meta button{margin-left:auto}

/* Import */
.import-layout .panel{margin-bottom:0}
.import-layout label{margin:14px 0}
.import-stage{margin-top:24px}
.file-tag{font-size:12px;color:var(--text-2);margin:12px 0 0}
.inbox-panel .file-tag{overflow-wrap:anywhere}
.inbox-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.inbox-list{border-top:1px solid var(--line);margin-top:16px}
.sample-wrap{overflow-x:auto;margin-top:22px}
table{border-collapse:collapse;width:100%;min-width:580px;font-size:13px}
th,td{text-align:left;padding:10px;border-bottom:1px solid var(--line-soft);max-width:230px;overflow-wrap:anywhere}
th{color:var(--muted);font-weight:600}
.preview-list{max-height:490px;overflow:auto;border-top:1px solid var(--line);margin:18px 0}
.preview-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:18px;padding:12px 0;border-bottom:1px solid var(--line-soft);font-size:13px}
.preview-row small{display:block;color:var(--muted);margin-top:3px}
.preview-context{font-size:13px;color:var(--text-2);overflow-wrap:anywhere}
.statement-check{border-radius:10px;background:var(--bg);padding:16px;margin-bottom:22px}
.statement-check small{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-top:4px;overflow-wrap:anywhere}
.statement-check .hint{font-size:12px}
.balance-equation{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:center;margin-top:16px}
.balance-equation strong{display:block;font-size:17px;font-weight:600;font-variant-numeric:tabular-nums;margin-top:4px}
.balance-equation>span{color:var(--muted)}
.sample-wrap:focus-visible,.preview-list:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

/* Konten */
.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.account-grid .panel{margin-bottom:0}
.account-grid+.panel{margin-top:24px}
.account-card .muted{margin-bottom:6px}

/* Dialoge als Mac-Sheet */
dialog{width:min(520px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;border:0;border-radius:14px;padding:22px;background:var(--surface);color:var(--text);box-shadow:0 24px 70px rgba(0,0,0,.28),0 0 0 .5px rgba(0,0,0,.12)}
dialog::backdrop{background:rgba(29,29,31,.32)}
.dialog-form{width:100%;display:flex;flex-direction:column;gap:16px}
.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.dialog-head h2{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:0}
.dialog-context{background:var(--bg);padding:12px 14px;border-radius:10px;color:var(--text-2);font-size:12px;line-height:1.55}
.dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:4px}
.dialog-form .hint{margin:0}
.dialog-form .form-grid{margin:0}

/* Statistiken */
.statistics-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border-radius:10px;overflow:hidden;margin-top:18px}
.statistics-totals>div{background:var(--bg);padding:14px 16px 16px}
.statistics-totals>div>span{display:block;color:var(--muted);font-size:13px;line-height:1.4}
.statistics-totals strong{display:block;font-size:24px;font-weight:600;letter-spacing:-.03em;font-variant-numeric:tabular-nums;margin-top:6px;overflow-wrap:anywhere}
.statistics-totals strong:focus-visible{outline:3px solid var(--focus);outline-offset:4px;border-radius:3px}
.chart-legend{display:flex;gap:10px 20px;flex-wrap:wrap;font-size:12px;color:var(--text-2);margin:0 0 14px}
.chart-legend>span{display:inline-flex;align-items:center;gap:7px}
.legend-mark{width:10px;height:10px;border-radius:3px;display:inline-block}
.chart-series-0{fill:var(--accent);background:var(--accent)}
.chart-series-1{fill:#7fb6f5;background:#7fb6f5}
.chart-series-2{fill:#c7c7cc;background:#c7c7cc}
.chart-provisional{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:3 2}
.chart-grid{stroke:var(--line-soft);stroke-width:1}
.chart-zero{stroke:#c7c7cc;stroke-width:1}
.chart-axis,.chart-month,.chart-gap-label{fill:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.chart-gap{fill:#fafafb;stroke:#c7c7cc;stroke-width:1.5;stroke-dasharray:4 4}
.chart-gap-label{font-size:11px}
.chart-scroll,.statistics-table-wrap{overflow-x:auto}
.monthly-chart{display:block;width:100%;min-width:920px;max-width:1100px;height:auto;margin:auto}
.monthly-chart.wide{min-width:1300px;max-width:none}
.chart-scroll:focus-visible,.statistics-table-wrap:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.statistics-table{min-width:1050px;font-variant-numeric:tabular-nums}
.statistics-table caption{text-align:left;color:var(--muted);font-size:12px;padding:0 0 12px}
.statistics-table th{font-weight:600}
.statistics-table td{padding:8px;white-space:nowrap}
.statistics-table thead th{font-size:12px;text-align:right}
.statistics-table thead th:first-child,.statistics-table thead th:last-child{text-align:left}
.statistics-table .statistics-quality{white-space:normal;min-width:155px;font-size:12px;color:var(--muted);line-height:1.5}
.statistics-number{border:0;background:transparent;padding:8px 0;width:100%;text-align:right;color:var(--text);font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}
.statistics-number:hover{color:var(--accent);text-decoration:underline}
.statistics-categories strong{font-size:13px}

/* Kategorien mit Unterkategorien und Verlauf */
.category-item{border-top:1px solid var(--line)}
.category-item>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:46px;padding:10px 4px;list-style:none;cursor:pointer;font-size:14px}
.category-item>summary::-webkit-details-marker{display:none}
.category-item>summary>span::before{content:"▸";display:inline-block;width:16px;color:var(--muted);transition:transform .15s}
.category-item[open]>summary>span::before{transform:rotate(90deg)}
.category-item>summary:hover{background:var(--surface-hover)}
.subcategory-list{padding:0 4px 12px 20px;display:grid;gap:2px}
.subcategory-list>div{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--text-2);padding:5px 0;border-top:1px solid var(--line-soft)}
.subcategory-list>div span:last-child{font-variant-numeric:tabular-nums;white-space:nowrap}
.subcategory-list .text-button{justify-self:start;margin-top:6px}
.breakdown-line{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:42px;padding:9px 4px;border-top:1px solid var(--line);font-size:14px}
.year-table,.year-matrix{min-width:760px}
.year-table th,.year-matrix th{white-space:nowrap;text-align:left}
.year-table thead th,.year-matrix thead th{text-align:right;vertical-align:bottom}
.year-table thead th:first-child,.year-matrix thead th:first-child{text-align:left}
.year-table td,.year-matrix td{text-align:right}
.year-table th small,.statistics-table th small{display:block;font-weight:400;font-size:11px;color:var(--muted);margin-top:2px}
.year-matrix tbody{border-top:1px solid var(--line)}
.year-matrix .matrix-sub th{font-weight:400;font-size:13px;color:var(--text-2);padding-left:26px}
.year-matrix .matrix-sub td{font-size:13px;color:var(--text-2)}
.matrix-toggle{border:0;background:transparent;padding:6px 0;font-weight:600;text-align:left}
.matrix-toggle span{display:inline-block;width:14px;color:var(--muted)}
.matrix-total{font-weight:600}
.chart-year{font-weight:600;fill:var(--text-2)}
.chart-cut{font-size:14px;font-weight:700;fill:var(--accent)}
.history-details{margin-top:14px}
.history-details>summary{cursor:pointer;color:var(--accent-text);font-size:14px;padding:8px 0}

/* Sichtschutz */
.money-value{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums}
.concealed{filter:blur(5px);user-select:none;pointer-events:none}
.chart-concealed{min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;background:var(--bg);border-radius:10px}
.chart-concealed>.concealed{font-size:70px;letter-spacing:14px;color:#a1a1a6}
.chart-concealed p{margin:0}
.source-concealed{padding:20px;border:1px dashed var(--field);border-radius:10px;color:var(--muted);font-size:13px;line-height:1.5}

/* Erklärungen */
.tooltip{position:fixed;z-index:1000;left:12px;top:12px;width:max-content;max-width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow-y:auto;padding:12px 14px;border-radius:10px;background:rgba(29,29,31,.96);color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.2);font-size:13px;font-weight:400;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere;animation:tooltip-in .14s ease-out}
@keyframes tooltip-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion: reduce){.tooltip{animation:none}}

/* Schmale Fenster */
@media (max-width:1000px){
  .metrics,.statistics-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-panel .checkbox-row{padding-bottom:0}
  .transaction-meta{margin-left:0}
}
@media (max-width:760px){
  .shell{flex-direction:column}
  .sidebar{position:static;height:auto;flex:none;border-right:0;border-bottom:1px solid var(--sidebar-line);padding:12px 16px;gap:10px}
  .brand{padding:0}
  .tabs{flex-direction:row;overflow-x:auto;margin:0 -4px;scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button{padding:0 10px;font-size:13px;gap:6px}
  .tabs button svg{width:16px;height:16px}
  .sidebar-foot{flex-direction:row;align-items:center;justify-content:space-between;padding:0}
  .workspace{padding:10px 16px 0}
  .toolbar{align-items:stretch;flex-direction:column}
  .month-picker{justify-content:space-between}
  .display-toolbar{width:100%}
  .display-toggles{flex:1;min-width:0}
  .display-toggles button{flex:1;padding:0 8px}
  .page-heading{flex-wrap:wrap;align-items:flex-start;gap:12px;margin:18px 0 18px}
  .page-heading h2{font-size:28px}
  .two-columns,.account-grid,.mapping-grid,.form-grid,.filter-panel{grid-template-columns:1fr}
  .panel{padding:16px}
  .metric-wrap>.metric{min-height:118px}
  .metric strong{font-size:23px}
  .transaction{padding:13px 14px}
  .transaction-main{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .transaction time{grid-column:1/-1}
  .transaction-meta button{margin-left:0}
  .preview-row{grid-template-columns:1fr auto}
  .preview-row .checkbox-row{grid-column:1/-1}
  dialog{padding:18px}
  .balance-equation{grid-template-columns:1fr;gap:6px}
  .balance-equation>span{line-height:1;text-align:center}
  .statement-check .panel-head,.statistics-summary .panel-head,.two-columns .panel-head,.inbox-panel .panel-head{flex-wrap:wrap}
  .inbox-actions{justify-content:flex-start}
  .dialog-actions{flex-wrap:wrap}
  .dialog-actions .button{flex:1}
  .chart-concealed>.concealed{font-size:45px;letter-spacing:7px}
  .year-table,.year-matrix{min-width:640px}
  .statistics-table th,.statistics-table td{padding:6px}
}
@media (max-width:400px){
  .metrics,.statistics-totals{grid-template-columns:1fr}
  .page-heading{flex-direction:column}
}

/* Anmeldung der Online-Lesekopie */
.login-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:16px}
.login-card{flex:none;height:auto;min-height:0;width:100%;max-width:380px;background:var(--surface);border-radius:var(--radius-group);padding:28px 24px}
.login-card .brand{margin-bottom:12px}
.login-card .button{width:100%;margin-top:6px}
