/* design.css Stand a9b014d7c5dd - nicht von Hand aendern, siehe ankauf/tools/design_abgleich.py */
/* design.css - gemeinsames Erscheinungsbild von ankauf und ebay-inv-sync.
   Quelle: ankauf/static/design.css. Nicht in ebay-inv-sync bearbeiten, sondern hier
   und dann `python tools/design_abgleich.py` ausfuehren (setzt die Pruefsumme und
   kopiert die Datei nach ebay-inv-sync/static/design.css).

   Nur Tokens, Hell/Dunkel und der Fokus-Ring - die Bauteile (Knoepfe, Karten ...)
   baut jede App in ihrer style.css aus diesen Tokens.

   Dunkelmodus:
   - <html data-theme="auto">: folgt der Systemeinstellung (ankauf)
   - <html data-theme="dark"> oder <html class="dark-mode">: immer dunkel (ebay-inv-sync, Schalter)
   - ohne beides: immer hell */

:root {
  /* Flaechen */
  --bg: #f6f5f1;            /* Seitenhintergrund */
  --surface: #ffffff;       /* Karten, Felder, Menues */
  --surface-2: #f3f2ee;     /* abgesetzte Flaeche innerhalb einer Karte */
  --surface-hover: #efeee9; /* Zeilen-/Eintrags-Hover */

  /* Text */
  --ink: #1c2230;           /* Haupttext */
  --ink-2: #4b5363;         /* Nebentext, Beschriftungen */
  --muted: #7a8190;         /* Hinweise, Platzhalter */

  /* Linien */
  --line: #e4e2dc;
  --line-strong: #cfccc4;

  /* Marke */
  --accent: #0f6e63;
  --accent-hover: #0b5a51;
  --accent-ink: #ffffff;    /* Text auf --accent */
  --accent-soft: #e3f1ee;
  --accent-line: #a9d3cb;

  /* Status: Text/Vollfarbe, heller Hintergrund, Rahmen */
  --ok: #17663a;      --ok-soft: #e6f4ea;    --ok-line: #b7dcc2;
  --warn: #9a5b0b;    --warn-soft: #fdf3e2;  --warn-line: #f0d29a;
  --error: #b42318;   --error-soft: #fdecea; --error-line: #f4b4ad;
  /* Vollflaechen mit weisser Schrift (Status-Knoepfe, kraeftige Badges) */
  --ok-strong: #17663a; --warn-strong: #9a5b0b; --error-strong: #b42318;

  /* Kopfleiste */
  --header-bg: #1c2230;
  --header-ink: #ffffff;
  --header-muted: #cfd5df;

  /* Schrift */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: .78rem;
  --text-sm: .88rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.4rem;
  --text-2xl: 2rem;

  /* Abstaende */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Form */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(28,34,48,.06);
  --shadow: 0 1px 2px rgba(28,34,48,.06), 0 4px 16px rgba(28,34,48,.06);
  --shadow-lg: 0 4px 12px rgba(28,34,48,.10), 0 12px 32px rgba(28,34,48,.10);
  --focus: 0 0 0 3px rgba(15,110,99,.28);

  color-scheme: light;
}

/* Dunkel - zweimal dieselben Werte: einmal fest, einmal nach Systemeinstellung */
:root[data-theme="dark"], :root.dark-mode {
  --bg: #12151c;
  --surface: #1b2029;
  --surface-2: #222833;
  --surface-hover: #283040;
  --ink: #e8eaee;
  --ink-2: #b8bec9;
  --muted: #8a92a0;
  --line: #2e3542;
  --line-strong: #3d4554;
  --accent: #4fbfae;
  --accent-hover: #6ccdbf;
  --accent-ink: #0b1a17;
  --accent-soft: #12332f;
  --accent-line: #1f5d55;
  --ok: #6fcf97;      --ok-soft: #10291a;    --ok-line: #1f5a35;
  --warn: #f0b45c;    --warn-soft: #33270f;  --warn-line: #6b4d14;
  --error: #f2867b;   --error-soft: #3a1616; --error-line: #7a2a22;
  --ok-strong: #23824a; --warn-strong: #a86a12; --error-strong: #c0392b;
  --header-bg: #0c0f14;
  --header-ink: #e8eaee;
  --header-muted: #9aa2b1;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.45);
  --focus: 0 0 0 3px rgba(79,191,174,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #12151c;
    --surface: #1b2029;
    --surface-2: #222833;
    --surface-hover: #283040;
    --ink: #e8eaee;
    --ink-2: #b8bec9;
    --muted: #8a92a0;
    --line: #2e3542;
    --line-strong: #3d4554;
    --accent: #4fbfae;
    --accent-hover: #6ccdbf;
    --accent-ink: #0b1a17;
    --accent-soft: #12332f;
    --accent-line: #1f5d55;
    --ok: #6fcf97;      --ok-soft: #10291a;    --ok-line: #1f5a35;
    --warn: #f0b45c;    --warn-soft: #33270f;  --warn-line: #6b4d14;
    --error: #f2867b;   --error-soft: #3a1616; --error-line: #7a2a22;
  --ok-strong: #23824a; --warn-strong: #a86a12; --error-strong: #c0392b;
    --header-bg: #0c0f14;
    --header-ink: #e8eaee;
    --header-muted: #9aa2b1;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.45);
    --focus: 0 0 0 3px rgba(79,191,174,.35);
    color-scheme: dark;
  }
}

/* Tastaturfokus sichtbar - fuer alle bedienbaren Elemente gleich */
:where(a, button, [role="button"], summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection { background: var(--accent-soft); color: var(--ink); }
