/* =====================================================================
   e-bill Design-Tokens  (Formblatt Look & Feel, siehe design/STYLEGUIDE.md)
   Zum Übertragen in ein anderes Projekt: nur diese Datei austauschen.
   Alle Komponenten in app.css nutzen ausschließlich diese Variablen.
   ===================================================================== */
:root {
  color-scheme: light dark;

  /* Farben – hell */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-2: #eef1f5;
  --color-border: #d3dae3;
  --color-border-strong: #7a8798;
  --color-text: #17202c;
  --color-text-muted: #4f5b6b;
  --color-primary: #1d5bb8;
  --color-primary-hover: #174a96;
  --color-on-primary: #ffffff;
  --color-primary-soft: #e4edfa;
  --color-success: #17693c;
  --color-success-bg: #def3e6;
  --color-warning: #7d5200;
  --color-warning-bg: #fcefd2;
  --color-danger: #b0261b;
  --color-danger-hover: #8f1e15;
  --color-danger-bg: #fde6e3;
  --color-info: #1d5bb8;
  --color-info-bg: #e4edfa;
  --color-neutral: #3d4757;
  --color-neutral-bg: #e7ebf0;
  --color-focus: #1d5bb8;
  --color-overlay: rgba(15, 20, 27, 0.45);

  /* Typografie – System-Schriftstapel, keine Webfonts */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    "Liberation Sans", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 650;

  /* Abstände (4-px-Raster) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radien */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Schatten */
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --shadow-2: 0 4px 14px rgba(16, 24, 40, 0.14);

  /* Layout (Breakpoints nur dokumentarisch – in @media als Zahl verwenden:
     Tablet ≥ 768px, Desktop ≥ 1100px) */
  --bp-tablet: 768px;
  --bp-desktop: 1100px;
  --content-max: 72rem;
  --sidebar-width: 15rem;
  --tabbar-height: 4rem;
  --tap-min: 44px;

  /* Bewegung */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0e131a;
    --color-surface: #161d26;
    --color-surface-2: #1e2732;
    --color-border: #2f3b49;
    --color-border-strong: #6b7a8c;
    --color-text: #e5eaf0;
    --color-text-muted: #a5b1bf;
    --color-primary: #7cb0ff;
    --color-primary-hover: #a3c8ff;
    --color-on-primary: #0b1422;
    --color-primary-soft: #1b2b44;
    --color-success: #6fd59b;
    --color-success-bg: #12301f;
    --color-warning: #f3c86f;
    --color-warning-bg: #36290c;
    --color-danger: #ff8f85;
    --color-danger-hover: #ffb1aa;
    --color-danger-bg: #3a1714;
    --color-info: #7cb0ff;
    --color-info-bg: #1b2b44;
    --color-neutral: #c9d2dd;
    --color-neutral-bg: #252f3b;
    --color-focus: #7cb0ff;
    --color-overlay: rgba(0, 0, 0, 0.6);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, 0.55);
  }
}
