/* Hell/Dunkel. Wird als letztes Stylesheet geladen. Hell: die bisherigen Farben der Seiten; Dunkel: Farben der App
   (App/macOS/Theme.swift, je Paar der zweite Wert). Das Thema setzt static/theme.js auf <html data-theme>. */
:root {
  --line: #eff0f6;      /* Trennlinien in Listen */
  --line2: #eceef6;     /* Gitterlinien, helle Flächen */
  --chip: #eef0f6;      /* Chips, Fortschrittsbalken-Hintergrund */
  --soft: #eceefe;      /* zarte Blau-Fläche */
  --hover: #f5f6fb;
  --field: #ffffff;     /* Eingabefelder, Knöpfe */
  --shadow: #1c1f3a0d;
}
html[data-theme="dark"] {
  --bg: #111220; --card: #1c1d30; --border: #34364f;
  --text: #e8e9f3; --muted: #9aa0b8;
  --green: #34c66b; --red: #f06a6e; --blue: #8080f0; --purple: #a78bfa; --amber: #f59e0b;
  --soft: #26284a; --chip: #2a2c44; --hover: #24253a; --line: #2c2e45; --line2: #2c2e45;
  --field: #24253a; --shadow: #00000040; --text2: #c4c7d8;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .card, html[data-theme="dark"] .section-card, html[data-theme="dark"] .chart-card,
html[data-theme="dark"] .kpi, html[data-theme="dark"] .int-section, html[data-theme="dark"] .upload-item,
html[data-theme="dark"] .upload-form, html[data-theme="dark"] .reparse-result, html[data-theme="dark"] .cov-card {
  box-shadow: 0 1px 2px #00000030, 0 6px 20px #00000030;
}
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { color-scheme: dark; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6f7590; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #34364f; }
html[data-theme="dark"] dialog { background: var(--card); color: var(--text); }
html[data-theme="dark"] dialog::backdrop { background: #00000080; }
/* Hinweis- und Fehlerflächen */
html[data-theme="dark"] .load-error { background: #3a1d24; color: #ffc9cb; }
html[data-theme="dark"] .load-error, html[data-theme="dark"] .pw-bar { background: #3a1d24; border-color: #5c2a33; color: #ffc9cb; }
html[data-theme="dark"] .ds-bar, html[data-theme="dark"] .next-steps.warn { background: #3a2a14; border-color: #5c4320; color: #fcd9a8; }
html[data-theme="dark"] .next-steps { background: #15321f; color: #bdeccd; }
html[data-theme="dark"] .next-steps.preview { background: var(--soft); color: var(--text); }
html[data-theme="dark"] tr.focus-row td { background: #3a2a14; }
html[data-theme="dark"] .btn-clear:hover, html[data-theme="dark"] .btn-del-tx:hover { background: #3a1d24; }
html[data-theme="dark"] .cat-badge.transfer, html[data-theme="dark"] .kpi:has(.value.transfer) .unit { background: #3a2a14; color: #fbbf24; }
html[data-theme="dark"] #help-win, html[data-theme="dark"] .tour-tip { box-shadow: 0 18px 50px #00000080; }
/* Dashboard: Chips und Kennzeichen mit hellen Flächen */
html[data-theme="dark"] .kpi:has(.value.income) .unit, html[data-theme="dark"] .doc-icon.pl { background: #15321f; color: #6ee7a0; }
html[data-theme="dark"] .kpi:has(.value.expense) .unit { background: #3a1d24; color: #ff9ea1; }
html[data-theme="dark"] .kpi:has(.value.balance) .unit { background: var(--soft); color: #b8b9ff; }
html[data-theme="dark"] .account-badge { background: var(--soft); color: #b8b9ff; }
html[data-theme="dark"] .account-badge:hover, html[data-theme="dark"] .cat-badge:hover { background: #33366a; }
html[data-theme="dark"] tr:hover td, html[data-theme="dark"] .account-row:hover td { background: var(--hover); }
html[data-theme="dark"] .account-row.selected td { background: var(--soft); }
html[data-theme="dark"] .ds-actions a, html[data-theme="dark"] .ds-item-actions a, html[data-theme="dark"] .ds-toggle, html[data-theme="dark"] .ds-hide { color: #fbbf24; }
html[data-theme="dark"] .ds-toggle, html[data-theme="dark"] .ds-hide { border-color: #7a5a24; }
