/* =============================================================================
   tokens.css – zentrale Design-Tokens (Kunden-PWA + Admin-Portal)
   Markenfarben PerfectBody: Rot #E01017, Schwarz #070706, Weiß #F7F7F7.
   --accent wird zusätzlich über /theme.css aus den Einstellungen überschrieben.
   Kontrastwerte (WCAG 2.2) jeweils als Kommentar.
   ============================================================================= */

:root {
  /* ---- Marke ---- */
  --accent: #E01017;            /* weiß auf Rot: 4,9:1 (AA) */
  --accent-strong: #B80C12;     /* Hover/Active, weiß darauf: 6,9:1 */
  --accent-on-dark: #FF5A5F;    /* Rot als TEXT auf Schwarz: 6,4:1 (AA) */
  --brand-black: #070706;
  --brand-white: #F7F7F7;

  /* ---- Dunkle Fläche (Kunden-PWA) ---- */
  --dark-bg: #070706;
  --dark-surface: #141413;
  --dark-surface-2: #1E1E1C;
  --dark-border: #4A4A46;       /* Rahmen ggü. Fläche: 3,1:1 */
  --dark-text: #F7F7F7;         /* auf --dark-bg: 18,9:1 */
  --dark-text-muted: #B4B4AE;   /* auf --dark-surface: 8,6:1 */

  /* ---- Helle Fläche (Admin) ---- */
  --light-bg: #F1EFEA;
  --light-surface: #FFFFFF;
  --light-border: #8A877F;      /* Eingaberahmen ggü. Weiß: 3,6:1 */
  --light-divider: #E3E0D9;     /* nur dekorative Trennlinien */
  --light-text: #141413;        /* auf Weiß: 18,2:1 */
  --light-text-muted: #5B5953;  /* auf Weiß: 7,1:1 */

  /* ---- Status (immer zusätzlich mit Text/Icon) ---- */
  --ok: #1E7B34;     --ok-bg: #E3F3E6;     --ok-on-dark: #5FD47A;     /* 5,4:1 | 10,6:1 */
  --warn: #8A5300;   --warn-bg: #FFF1D6;   --warn-on-dark: #F2B441;   /* 6,1:1 | 10,1:1 */
  --bad: #B3141A;    --bad-bg: #FDE5E5;    --bad-on-dark: #FF6B6F;    /* 6,4:1 | 6,9:1 */
  --info: #1F4E8C;   --info-bg: #E5EEFA;   --info-on-dark: #8DB7F0;   /* 8,1:1 | 9,4:1 */
  --neutral: #4D4B46; --neutral-bg: #ECEAE5;

  --color-focus: #2B7FFF;       /* Fokusring: ggü. Weiß 3,6:1, ggü. Schwarz 5,6:1 */

  /* ---- Spacing (4-px-Basis) ---- */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem; --space-24: 6rem;

  /* ---- Typografie ---- */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --text-xs: .8125rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.25rem, 1.15rem + .4vw, 1.375rem);
  --text-2xl: clamp(1.5rem, 1.35rem + .6vw, 1.75rem);
  --text-3xl: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --weight-regular: 400;
  --weight-bold: 650;
  --leading-body: 1.55;
  --leading-tight: 1.2;

  /* ---- Form ---- */
  --radius-sm: .375rem; --radius-md: .625rem; --radius-lg: 1rem; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .08);
  --shadow-2: 0 6px 24px rgb(0 0 0 / .14);
  --z-sticky: 10; --z-modal: 100; --z-toast: 200;
  --tap: 2.75rem; /* 44 px */

  /* ---- Bewegung ---- */
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 320ms;
  --ease-enter: cubic-bezier(.2,.8,.2,1);

  /* ---- Breakpoints (Referenz für Media Queries) ---- */
  --bp-sm: 36rem; --bp-md: 48rem; --bp-lg: 64rem; --bp-xl: 80rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-body); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: var(--leading-tight); margin: 0; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.mono { font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
