/* Farbschemata, wählbar unter Einstellungen → Darstellung (Einstellung „palette“, Attribut data-palette am <html>).
   Überschreibt nur Farbvariablen aus style.css. Statusfarben (ok/warn/danger) und Pegel bleiben überall gleich.
   Reihenfolge je Schema: hell, dunkel per Gerät (ohne Umschalter auf hell), dunkel per Umschalter. */

:root[data-palette="nachtblau"] { --bg: #f6f5f0; --bg-glow: rgba(240, 180, 40, .14); --surface: #ffffff; --surface-2: #f0eee6; --field: #ffffff; --border: #e4e1d6; --text: #171a26; --text-2: #5d6172; --accent: #1f2a55; --accent-text: #ffffff; --accent-soft: #fbefc8; --income: #0e8b9a; --expense: #d9592e; --profit: #d39b00; --grid: #ebe8df; --info-bg: #fbf3da; }
@media (prefers-color-scheme: dark) {
  :root[data-palette="nachtblau"]:not([data-theme="light"]) { --bg: #0a0e1a; --bg-glow: rgba(245, 190, 70, .09); --surface: #121829; --surface-2: #1b2236; --field: #0e1322; --border: #262e45; --text: #ecedf3; --text-2: #9ba3ba; --accent: #f5c451; --accent-text: #1a1300; --accent-soft: #2a2614; --income: #4fc9d9; --expense: #ff8a65; --profit: #f5c451; --grid: #1e2539; --info-bg: #1f2233; --stars: block; }
}
:root[data-palette="nachtblau"][data-theme="dark"] { --bg: #0a0e1a; --bg-glow: rgba(245, 190, 70, .09); --surface: #121829; --surface-2: #1b2236; --field: #0e1322; --border: #262e45; --text: #ecedf3; --text-2: #9ba3ba; --accent: #f5c451; --accent-text: #1a1300; --accent-soft: #2a2614; --income: #4fc9d9; --expense: #ff8a65; --profit: #f5c451; --grid: #1e2539; --info-bg: #1f2233; --stars: block; }

:root[data-palette="roehre"] { --bg: #fcfbf8; --bg-glow: rgba(255, 180, 60, .10); --surface: #ffffff; --surface-2: #f4f1eb; --field: #ffffff; --border: #e3ddd2; --text: #1f1810; --text-2: #5c5245; --accent: #8a5000; --accent-text: #ffffff; --accent-soft: #fcefd6; --income: #24807a; --expense: #bf4a2a; --profit: #c98500; --grid: #eeeae2; --info-bg: #fdf3e1; }
@media (prefers-color-scheme: dark) {
  :root[data-palette="roehre"]:not([data-theme="light"]) { --bg: #15120e; --bg-glow: rgba(255, 170, 50, .11); --surface: #1f1a14; --surface-2: #2a231b; --field: #18140f; --border: #3a3026; --text: #f3ece2; --text-2: #b3a693; --accent: #ffb938; --accent-text: #1d1200; --accent-soft: #352817; --income: #7cc6c0; --expense: #e5735a; --profit: #ffb938; --grid: #2c251d; --info-bg: #2e2418; --stars: none; }
}
:root[data-palette="roehre"][data-theme="dark"] { --bg: #15120e; --bg-glow: rgba(255, 170, 50, .11); --surface: #1f1a14; --surface-2: #2a231b; --field: #18140f; --border: #3a3026; --text: #f3ece2; --text-2: #b3a693; --accent: #ffb938; --accent-text: #1d1200; --accent-soft: #352817; --income: #7cc6c0; --expense: #e5735a; --profit: #ffb938; --grid: #2c251d; --info-bg: #2e2418; --stars: none; }

:root[data-palette="mond"] { --bg: #f4f4f2; --bg-glow: rgba(255, 210, 63, .14); --surface: #ffffff; --surface-2: #ececea; --field: #ffffff; --border: #dcdcd8; --text: #18191b; --text-2: #5f6268; --accent: #1d4ed8; --accent-text: #ffffff; --accent-soft: #fff2bf; --income: #0e8f8f; --expense: #e0522f; --profit: #e0a800; --grid: #e6e6e3; --info-bg: #eef2fd; }
@media (prefers-color-scheme: dark) {
  :root[data-palette="mond"]:not([data-theme="light"]) { --bg: #111214; --bg-glow: rgba(255, 210, 63, .06); --surface: #1a1b1f; --surface-2: #24262b; --field: #151619; --border: #2e3036; --text: #eeeeef; --text-2: #a0a3aa; --accent: #ffd23f; --accent-text: #161200; --accent-soft: #2b2816; --income: #4cc9c0; --expense: #ff6f59; --profit: #ffd23f; --grid: #25272c; --info-bg: #22242a; --stars: block; }
}
:root[data-palette="mond"][data-theme="dark"] { --bg: #111214; --bg-glow: rgba(255, 210, 63, .06); --surface: #1a1b1f; --surface-2: #24262b; --field: #151619; --border: #2e3036; --text: #eeeeef; --text-2: #a0a3aa; --accent: #ffd23f; --accent-text: #161200; --accent-soft: #2b2816; --income: #4cc9c0; --expense: #ff6f59; --profit: #ffd23f; --grid: #25272c; --info-bg: #22242a; --stars: block; }

:root[data-palette="sonne"] { --bg: #f7f5fc; --bg-glow: rgba(255, 200, 70, .18); --surface: #ffffff; --surface-2: #f0edf8; --field: #ffffff; --border: #e3def0; --text: #1c1730; --text-2: #635d7a; --accent: #5b3fc4; --accent-text: #ffffff; --accent-soft: #fff1cc; --income: #0f9488; --expense: #d6406a; --profit: #e0a100; --grid: #ece8f5; --info-bg: #f1ecfd; }
@media (prefers-color-scheme: dark) {
  :root[data-palette="sonne"]:not([data-theme="light"]) { --bg: #120f22; --bg-glow: rgba(160, 110, 255, .15); --surface: #1b1730; --surface-2: #251f3f; --field: #15122a; --border: #322a52; --text: #efecf8; --text-2: #a9a2c4; --accent: #ffcb47; --accent-text: #1d1400; --accent-soft: #2f2833; --income: #45d1c2; --expense: #ff7f9f; --profit: #ffcb47; --grid: #241f3b; --info-bg: #241e40; --stars: block; }
}
:root[data-palette="sonne"][data-theme="dark"] { --bg: #120f22; --bg-glow: rgba(160, 110, 255, .15); --surface: #1b1730; --surface-2: #251f3f; --field: #15122a; --border: #322a52; --text: #efecf8; --text-2: #a9a2c4; --accent: #ffcb47; --accent-text: #1d1400; --accent-soft: #2f2833; --income: #45d1c2; --expense: #ff7f9f; --profit: #ffcb47; --grid: #241f3b; --info-bg: #241e40; --stars: block; }


/* Auswahl in den Einstellungen */
.palette-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.palette-option { display: flex; gap: .75rem; align-items: center; margin: 0; padding: .75rem .85rem; cursor: pointer;
  color: var(--text); font-size: .95rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.palette-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.palette-option input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.palette-option .sw { display: flex; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.palette-option .sw span { width: 14px; height: 30px; }
.palette-option small { display: block; color: var(--text-2); font-size: .78rem; line-height: 1.3; }
