/* Die Dunkelwerte gelten fuer beide Wege: Systemeinstellung und manuelle Wahl.
   Vorher fehlten --positive/--negative hier komplett und fielen auf die
   Hellwerte zurueck — 3,7-3,8:1 gegen die dunkle Flaeche. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12242E;
    --surface: #1e303b;
    --surface-muted: #283b45;
    --text: #F2FFFB;
    --text-muted: #8da6a8;
    --select-arrow-accent: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%3E%3Cpath%20d%3D%22M1%201.5%206%206.5l5-5%22%20fill%3D%22none%22%20stroke%3D%22%235FE3C0%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    --calendar-tint: invert(83%) sepia(24%) saturate(700%) hue-rotate(110deg) brightness(97%) contrast(92%);
    --select-arrow: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%3E%3Cpath%20d%3D%22M1%201.5%206%206.5l5-5%22%20fill%3D%22none%22%20stroke%3D%22%238da6a8%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    --border: #324550;
    --border-control: #6e8688;
    /* Auf dunklem Grund ist das CD-Mint auch als SCHRIFT lesbar (8,6:1) —
       --accent und --accent-ink fallen hier zusammen. Genau deshalb braucht es
       die Trennung nur im Hellmodus. */
    --accent: #5FE3C0;
    --accent-ink: #5FE3C0;
    --accent-strong: #5FE3C0;
    --accent-hover: #8FEEDA;
    --accent-soft: #074033;
    --on-accent: #12242E;
    /* Status bewusst WEG vom Mint: ein grünes „positiv" in Mintnähe sähe aus
       wie ein Knopf. #4ba752 steht 1,9:1 vom Akzent entfernt. */
    --positive: #59b45f;
    --negative: #f77d76;
    --on-negative: #12242E;
    --warning: #d99305;
    --tone-positive-surface: #223723;
    --tone-negative-surface: #482b28;
    --tone-warning-surface: #413018;
    --tone-neutral-surface: #0f383b;
    --person-blue-surface: #1f3654;
    --person-blue-text: #68a0e6;
    --person-green-surface: #203d21;
    --person-green-text: #6aaf6c;
    --person-amber-surface: #47300c;
    --person-amber-text: #ca933e;
    --person-violet-surface: #3a2e50;
    --person-violet-text: #ab8edf;
    --person-rose-surface: #50282b;
    --person-rose-text: #e18089;
    --person-slate-surface: #233845;
    --person-slate-text: #89a1b0;
    --chart-1: #d95926;
    --chart-2: #3987e5;
    --chart-3: #c98500;
    --chart-4: #9085e9;
    --chart-5: #008300;
    --chart-6: #d55181;
    --chart-other: #8da6a8;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-raised: 0 1px 4px rgb(0 0 0 / 45%);
    --shadow-hover: 0 8px 24px rgb(0 0 0 / 35%);
    --shadow: 0 12px 36px rgb(0 0 0 / 30%);
    --shadow-float: 0 6px 18px rgb(0 0 0 / 50%);
  }
}

:root[data-theme="dark"] {
  --bg: #12242E;
  --surface: #1e303b;
  --surface-muted: #283b45;
  --text: #F2FFFB;
  --text-muted: #8da6a8;
  --select-arrow-accent: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%3E%3Cpath%20d%3D%22M1%201.5%206%206.5l5-5%22%20fill%3D%22none%22%20stroke%3D%22%235FE3C0%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --calendar-tint: invert(83%) sepia(24%) saturate(700%) hue-rotate(110deg) brightness(97%) contrast(92%);
  --select-arrow: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%20viewBox%3D%220%200%2012%208%22%3E%3Cpath%20d%3D%22M1%201.5%206%206.5l5-5%22%20fill%3D%22none%22%20stroke%3D%22%238da6a8%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --border: #324550;
  --border-control: #6e8688;
  /* Auf dunklem Grund ist das CD-Mint auch als SCHRIFT lesbar (8,6:1) —
     --accent und --accent-ink fallen hier zusammen. Genau deshalb braucht es
     die Trennung nur im Hellmodus. */
  --accent: #5FE3C0;
  --accent-ink: #5FE3C0;
  --accent-strong: #5FE3C0;
  --accent-hover: #8FEEDA;
  --accent-soft: #074033;
  --on-accent: #12242E;
  /* Status bewusst WEG vom Mint: ein grünes „positiv" in Mintnähe sähe aus
     wie ein Knopf. #4ba752 steht 1,9:1 vom Akzent entfernt. */
  --positive: #59b45f;
  --negative: #f77d76;
  --on-negative: #12242E;
  --warning: #d99305;
  --tone-positive-surface: #223723;
  --tone-negative-surface: #482b28;
  --tone-warning-surface: #413018;
  --tone-neutral-surface: #0f383b;
  --person-blue-surface: #1f3654;
  --person-blue-text: #68a0e6;
  --person-green-surface: #203d21;
  --person-green-text: #6aaf6c;
  --person-amber-surface: #47300c;
  --person-amber-text: #ca933e;
  --person-violet-surface: #3a2e50;
  --person-violet-text: #ab8edf;
  --person-rose-surface: #50282b;
  --person-rose-text: #e18089;
  --person-slate-surface: #233845;
  --person-slate-text: #89a1b0;
  --chart-1: #d95926;
  --chart-2: #3987e5;
  --chart-3: #c98500;
  --chart-4: #9085e9;
  --chart-5: #008300;
  --chart-6: #d55181;
  --chart-other: #8da6a8;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-raised: 0 1px 4px rgb(0 0 0 / 45%);
  --shadow-hover: 0 8px 24px rgb(0 0 0 / 35%);
  --shadow: 0 12px 36px rgb(0 0 0 / 30%);
  --shadow-float: 0 6px 18px rgb(0 0 0 / 50%);
}
