/* ══════════════════════════════════════════════════════════════════
   App-Tokens — EINE Quelle für Farben, Schrift, Abstände, Radien und Schatten der HR-App-Seiten
   (hell + Dunkelmodus). Bis 26.10.2026 trug jede Seite eine eigene Inline-Kopie dieses Blocks
   (31 :root-Kopien, Handbuch-Review Z01/D11); die Werte hier sind die der Dashboards.

   Einbindung: genau an der Stelle, wo die Seite früher ihren Inline-Block hatte — meist NACH
   css/sidebar.css. Grund: sidebar.css setzt unter :root Ersatzwerte (--ink, --bg-card, --r-lg …),
   die diese Tokens überschreiben müssen; vor sidebar.css gewänne der Ersatzwert.
   Seiteneigene Abweichungen (z. B. --coral-text, --blue-text, --violet, Statistik-Dunkelpalette)
   bleiben als kleiner Rest-Block auf der Seite, nach dieser Datei. Neue verstreute :root-Blöcke
   meldet tests/app-tokens-eine-quelle.test.js (Ratsche, Liste darf nur schrumpfen).
   Gemeinsame Teile (Kontrast-, Modul-, Titel-Tokens) stehen weiter in css/sidebar.css.
   ══════════════════════════════════════════════════════════════════ */

/* ═══ DESIGN TOKENS ═══ */
:root {
  /* Warm neutral palette */
  --bg:          #F8F7F4;
  --bg-warm:     #F3F1EC;
  --bg-card:     #FFFFFF;
  --bg-hover:    #FAFAF7;
  --bg-elevated: #FCFBF9;
  --bg-inset:    #EFEEE9;

  /* Borders */
  --border:       #E6E3DC;
  --border-light: #EDEBE5;
  --border-hover: #D4D0C7;

  /* Text */
  --ink:       #1B1918;
  --ink-2:     #4A4643;
  --ink-3:     #7A756F;
  --ink-4:     #A9A39B;
  --ink-5:     #CBC6BE;

  /* Brand Gold — evolved, richer */
  --gold:      #9A6E06;
  --gold-hot:  #7F5A04;
  --gold-soft: rgba(154, 110, 6, 0.08);
  --gold-med:  rgba(154, 110, 6, 0.14);
  --gold-text: #7F5A04;

  /* Teal (success) */
  --teal:      #0D9488;
  --teal-soft: rgba(13, 148, 136, 0.07);
  --teal-med:  rgba(13, 148, 136, 0.14);

  /* Coral (danger) */
  --coral:      #DC4A3A;
  --coral-soft: rgba(220, 74, 58, 0.07);
  --coral-med:  rgba(220, 74, 58, 0.14);

  /* Amber (warning) */
  --amber:      #D97706;
  --amber-soft: rgba(217, 119, 6, 0.07);
  --amber-med:  rgba(217, 119, 6, 0.14);

  /* Blue (info) */
  --blue:      #2563EB;
  --blue-soft: rgba(37, 99, 235, 0.07);

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'Geist Mono', 'SF Mono', monospace;

  /* Shadows — warm, layered */
  --sh-xs:  0 1px 2px rgba(27,25,24,0.04);
  --sh-sm:  0 1px 3px rgba(27,25,24,0.05), 0 1px 2px rgba(27,25,24,0.03);
  --sh-md:  0 4px 12px rgba(27,25,24,0.06), 0 1px 3px rgba(27,25,24,0.04);
  --sh-lg:  0 8px 28px rgba(27,25,24,0.07), 0 2px 6px rgba(27,25,24,0.04);
  --sh-xl:  0 16px 48px rgba(27,25,24,0.1), 0 4px 12px rgba(27,25,24,0.05);
  --sh-glow-gold: 0 0 0 3px var(--gold-soft), 0 0 16px rgba(154,110,6,0.08);

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;

  /* Radius */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 180ms;

  /* Hero Gradient */
  --hero-mesh:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(154,110,6,0.12), transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 10%, rgba(212,175,55,0.08), transparent 60%);
}

/* ═══ DARK MODE ═══ */
:root[data-theme="dark"] {
  --bg:          #0F0E0C;
  --bg-warm:     #15130F;
  --bg-card:     #1A1814;
  --bg-hover:    #22201B;
  --bg-elevated: #1F1D18;
  --bg-inset:    #13110E;

  --border:       #2F2A22;
  --border-light: #27221B;
  --border-hover: #453E33;

  --ink:       #F5F2EA;
  --ink-2:     #D4CFC3;
  --ink-3:     #9B9589;
  --ink-4:     #6E6860;
  --ink-5:     #4A4640;

  --gold:      #E9C46A;
  --gold-hot:  #F1D48C;
  --gold-soft: rgba(233, 196, 106, 0.10);
  --gold-med:  rgba(233, 196, 106, 0.18);
  --gold-text: #E9C46A;

  --teal:      #2DD4BF;
  --teal-soft: rgba(45, 212, 191, 0.08);
  --teal-med:  rgba(45, 212, 191, 0.16);

  --coral:      #F87171;
  --coral-soft: rgba(248, 113, 113, 0.09);
  --coral-med:  rgba(248, 113, 113, 0.16);

  --amber:      #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.09);
  --amber-med:  rgba(251, 191, 36, 0.16);

  --blue:      #60A5FA;
  --blue-soft: rgba(96, 165, 250, 0.09);

  --sh-xs:  0 1px 2px rgba(0,0,0,0.3);
  --sh-sm:  0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --sh-md:  0 4px 12px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.25);
  --sh-lg:  0 8px 28px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
  --sh-xl:  0 16px 48px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.35);
  --sh-glow-gold: 0 0 0 3px rgba(233,196,106,0.15), 0 0 20px rgba(233,196,106,0.15);

  --hero-mesh:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(233,196,106,0.18), transparent 60%),
    radial-gradient(ellipse 40% 30% at 85% 10%, rgba(241,212,140,0.12), transparent 60%);
}
