/* Farb-Tokens der Plattform (Redesign R0, Spec Kap. 4.1): ein Satz, hell und dunkel.
   --c-me: Blau fuer „Mensch“ in Diagrammen (Cockpit E, nur als var(--c-me)); --karte-*, --plus-*: Kartenschatten und Plus-Schatten des Cockpits (dunkel ohne Kartenschatten); --tief-sh / --schleier: tiefer Schatten eines gewaehlten oder schwebenden Elements und der abdunkelnde Grund hinter einem Blatt (Kalender 29.11.); --marke-rand: Rand mit Markenanteil (Zeichenkaestchen beim Hover); --ordner-1…8: Ordnerfarben der Ablage, --typ-…: Dateitypkuerzel (Files, Kontrast >= 4,5:1).
   --brand / --brand-text kommen aus BrandPalette (--accent, --marke-dunkel, --marke-dunkel-text); --stufe-1…4 (+ -text, -leise, -rand) und --auf-marke ebenso (BrandPalette::stufen, hell und dunkel gerechnet). */
:root {
  --bg: #F4F4F6;
  --surf: #FFFFFF;
  --side: #FBFBFC;
  --tint: #FBFAFC;
  --well: #F2F2F4;
  --navact: #ECECF0;
  --line: #E4E4E7;
  --line-soft: #ECECEE;
  --line-strong: #D4D4D8;
  --ink: #18181B;
  --ink-nav: #3A3A42;
  --ink-2: #52525B;
  --ink-3: #6B6B74;
  --ink-zero: #8A8A93;
  --brand: var(--accent);
  --brand-text: var(--accent);
  --red: #D03231;
  --red-text: #C8302F;
  --red-dark: #9F2424;
  --ok: #16A34A;
  --ok-text: #15803D;
  --seg-wait: #D4D4D8;
  --seg-done: #85858F;
  --seg-strong: #3F3F46;
  --notch: #C4C4CC;
  --inv-bg: #18181B;
  --inv-fg: #FFFFFF;
  --c-me: #3B82C4;
  --ordner-1: #7A3FA8;
  --ordner-2: #2159B0;
  --ordner-3: #146C39;
  --ordner-4: #94500A;
  --ordner-5: #AE2B2B;
  --ordner-6: #0B666D;
  --ordner-7: #A0286A;
  --ordner-8: #4A5568;
  --typ-pdf: #B32424;
  --typ-doc: #2159B0;
  --typ-xls: #146C39;
  --typ-img: #7A3FA8;
  --typ-ppt: #94500A;
  --typ-sonst: #55555E;
  --marke-rand: color-mix(in srgb, var(--brand) 40%, var(--line));
  --karte-rand: color-mix(in srgb, var(--line) 65%, transparent);
  --karte-sh: 0 1px 2px rgba(16, 12, 28, .04), 0 14px 30px -20px rgba(16, 12, 28, .22);
  --karte-sh-hover: 0 2px 4px rgba(16, 12, 28, .05), 0 26px 44px -24px rgba(16, 12, 28, .32);
  --plus-sh: 0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent);
  --plus-sh-hover: 0 12px 22px -8px color-mix(in srgb, var(--brand) 80%, transparent);
  --tief-sh: 0 18px 30px -18px rgba(16, 12, 28, .7);
  --schleier: rgba(16, 12, 28, .38);
  /* Nur im Wiki (Redesign W-1): Ton der Tafeln, der eine Schatten der Suche */
  /* Formregel plattformweit (Case Room 3.10, Phase PF): die Radien stehen NUR in dieser Datei (je Thema derselbe Wert, wie jedes Token; TokensTest). Tafeln, Kacheln, Hero, Menues und Dialoge 2 px;
     alles Bedienbare (Knopf, Chip, Marke, Avatar, Punkt, Balken) rund; Eingabefelder (input, textarea, select, Suchfeld) eckig --r-feld 2 px (Nutzer 01.12.); 12 px nur fuer Karten im Weg und den Technik-Kasten. */
  --r-tafel: 2px;
  --r-bedien: 999px;
  --r-feld: 2px;
  --modal-schleier: rgba(16, 12, 28, .62);
  --modal-fl: #FFFFFF;
  --modal-seite: #F4F4F6;
  --modal-feld: #FFFFFF;
  --modal-feld-rand: #8C8C96;
  --modal-rand: #B9B9C3;
  --modal-linie: #E1E1E6;
  --modal-mu: #6B6B74;
  --modal-sh: 0 0 0 1px rgba(16, 12, 28, .05), 0 48px 96px -32px rgba(16, 12, 28, .6);
  --r-karte: 12px;
  --wiki-tafel: color-mix(in srgb, var(--surf) 62%, var(--bg));
  --wiki-suche-sh: 0 1px 2px rgba(16, 12, 28, .04), 0 10px 24px -20px rgba(16, 12, 28, .25);
  /* Farbstufen der Uebersicht (BrandPalette::stufen, Rueckfall = Standardmarke #7030A0) */
  --auf-marke: var(--auf-marke-h, #FFFFFF);
  --stufe-1: var(--stufe-h-1, #EBE2F2);
  --stufe-1-text: var(--stufe-h-1-text, #18181B);
  --stufe-1-leise: var(--stufe-h-1-leise, #4B484F);
  --stufe-1-rand: var(--stufe-h-1-rand, transparent);
  --stufe-2: var(--stufe-h-2, #D4C1E3);
  --stufe-2-text: var(--stufe-h-2-text, #18181B);
  --stufe-2-leise: var(--stufe-h-2-leise, #45414B);
  --stufe-2-rand: var(--stufe-h-2-rand, transparent);
  --stufe-3: var(--stufe-h-3, #B593CE);
  --stufe-3-text: var(--stufe-h-3-text, #18181B);
  --stufe-3-leise: var(--stufe-h-3-leise, #28242D);
  --stufe-3-rand: var(--stufe-h-3-rand, #FFFFFF);
  --stufe-4: var(--stufe-h-4, #8A55B1);
  --stufe-4-text: var(--stufe-h-4-text, #FFFFFF);
  --stufe-4-leise: var(--stufe-h-4-leise, #F3EEF7);
  --stufe-4-rand: var(--stufe-h-4-rand, #FFFFFF);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E0E11;
  --surf: #17171B;
  --side: #121215;
  --tint: #1E1A25;
  --well: #25252C;
  --navact: #25252C;
  --line: #2B2B33;
  --line-soft: #222229;
  --line-strong: #3A3A44;
  --ink: #EDEDF1;
  --ink-nav: #C6C6CF;
  --ink-2: #B2B2BC;
  --ink-3: #8E8E9A;
  --ink-zero: #63636F;
  --brand: var(--marke-dunkel);
  --brand-text: var(--marke-dunkel-text);
  --red: #E5534B;
  --red-text: #FF8A7E;
  --red-dark: #C24C45;
  --ok: #4CC38A;
  --ok-text: #4CC38A;
  --seg-wait: #4A4A56;
  --seg-done: #6F6F7C;
  --seg-strong: #B2B2BC;
  --notch: #4A4A56;
  --inv-bg: #EDEDF1;
  --inv-fg: #0E0E11;
  --c-me: #4A8FD6;
  --ordner-1: #C79AEC;
  --ordner-2: #7DAEF5;
  --ordner-3: #5FD08F;
  --ordner-4: #F0A95A;
  --ordner-5: #FF8F87;
  --ordner-6: #55CBD2;
  --ordner-7: #F58CC2;
  --ordner-8: #AAB6CC;
  --typ-pdf: #FF8F87;
  --typ-doc: #7DAEF5;
  --typ-xls: #5FD08F;
  --typ-img: #C79AEC;
  --typ-ppt: #F0A95A;
  --typ-sonst: #B2B2BC;
  --marke-rand: color-mix(in srgb, var(--brand) 40%, var(--line));
  --karte-rand: var(--line);
  --karte-sh: none;
  --karte-sh-hover: none;
  --plus-sh: 0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent);
  --plus-sh-hover: 0 12px 22px -8px color-mix(in srgb, var(--brand) 80%, transparent);
  --tief-sh: 0 18px 30px -18px rgba(0, 0, 0, .8);
  --schleier: rgba(0, 0, 0, .6);
  --r-tafel: 2px;
  --r-bedien: 999px;
  --r-feld: 2px;
  --modal-schleier: rgba(0, 0, 0, .78);
  --modal-fl: #2E2E37;
  --modal-seite: #25252C;
  --modal-feld: #1C1C22;
  --modal-feld-rand: #7A7A88;
  --modal-rand: #5A5A66;
  --modal-linie: #45454F;
  --modal-mu: #A9A9B5;
  --modal-sh: 0 0 0 1px rgba(255, 255, 255, .05), 0 48px 96px -24px rgba(0, 0, 0, .95);
  --r-karte: 12px;
  --wiki-tafel: color-mix(in srgb, var(--surf) 62%, var(--bg));
  --wiki-suche-sh: none;
  /* Farbstufen der Uebersicht (BrandPalette::stufen, Rueckfall = Standardmarke #7030A0) */
  --auf-marke: var(--auf-marke-d, #FFFFFF);
  --stufe-1: var(--stufe-d-1, #281F33);
  --stufe-1-text: var(--stufe-d-1-text, #FFFFFF);
  --stufe-1-leise: var(--stufe-d-1-leise, #CBC9CE);
  --stufe-1-rand: var(--stufe-d-1-rand, #FFFFFF);
  --stufe-2: var(--stufe-d-2, #3C284F);
  --stufe-2-text: var(--stufe-d-2-text, #FFFFFF);
  --stufe-2-leise: var(--stufe-d-2-leise, #D0CBD5);
  --stufe-2-rand: var(--stufe-d-2-rand, #FFFFFF);
  --stufe-3: var(--stufe-d-3, #573575);
  --stufe-3-text: var(--stufe-d-3-text, #FFFFFF);
  --stufe-3-leise: var(--stufe-d-3-leise, #EEEBF1);
  --stufe-3-rand: var(--stufe-d-3-rand, #FFFFFF);
  --stufe-4: var(--stufe-d-4, #7C46A9);
  --stufe-4-text: var(--stufe-d-4-text, #FFFFFF);
  --stufe-4-leise: var(--stufe-d-4-leise, #F2EDF6);
  --stufe-4-rand: var(--stufe-d-4-rand, #FFFFFF);
}

/* Bruecke fuer Seiten, die den neuen Rahmen tragen: unter dunklem Thema zeigen die alten Plattform-Tokens
   (Inline-Stil von layout/header.php) auf die neuen Tokens, damit Titel, Fusszeile und Linien mitdunkeln.
   Bewusst ein eigener Block mit anderem Selektor als oben (TokensTest vergleicht nur die zwei Token-Bloecke).
   Schatten, Radien und Schriften bleiben unberuehrt. */
html[data-theme="dark"] {
  --bg-body: var(--bg);
  --bg-surface: var(--surf);
  --text-main: var(--ink);
  --text-muted: var(--ink-3);
  --text-light: var(--ink-3);
  --border: var(--line);
  --border-hover: var(--line-strong);
}
