/* Pyrylandia — design tokens.
 *
 * SINGLE SOURCE OF TRUTH dla kolorów markowych i DaisyUI theme overrides.
 * Każdy plik HTML / inny CSS który potrzebuje brand color powinien
 * referować przez CSS variable (--pyr-brand), nie hardkodować hex'a.
 *
 * `oklch(...)` (jako function call, nie raw triplet) MOŻE być TYLKO tu —
 * lint w CI (.github/workflows/test.yml) blokuje merge gdy ten string
 * pojawi się gdzie indziej. Reason: PR #50 (Sprint 1 F1) załatwił bug
 * gdzie DaisyUI default oklch() fioletowy nadpisywał brand blue —
 * lint zapobiega podobnym regresjom.
 *
 * Tailwind config (`templates/base/shell.html`) wciąż używa hex literałów
 * w `colors` (nazwane utility classes typu `bg-brand`, `text-signal-red`)
 * — to OK, bo to jeden plik definicji, nie scattered values w 50
 * komponentach. Lint nie tyka hex'ów, tylko `oklch()`.
 */

/* ---------- Pyrylandia brand tokens (hex) ---------- */
:root {
  /* Brand blue — primary CTA, navbar, focus rings. */
  --pyr-brand:       #1a56db;
  --pyr-brand-dark:  #1e429f;
  --pyr-brand-light: #3b82f6;

  /* Signal palette — operational status, rail-industry coding. */
  --pyr-signal-red:    #d32f2f;
  --pyr-signal-yellow: #f9a825;
  --pyr-signal-green:  #2e7d32;

  /* Steel scale — neutrals (nav backgrounds, borders, text-content). */
  --pyr-steel-50:  #f8fafc;
  --pyr-steel-100: #f1f5f9;
  --pyr-steel-200: #e2e8f0;
  --pyr-steel-400: #94a3b8;
  --pyr-steel-700: #334155;
  --pyr-steel-800: #1e293b;
  --pyr-steel-900: #0f172a;

  /* Section palette — sidebar grouping. */
  --pyr-section-serwis:   #ef4444;
  --pyr-section-aktywa:   #f59e0b;
  --pyr-section-operacje: #22c55e;
  --pyr-section-firma:    #8b5cf6;
}

/* ---------- DaisyUI OKLCH overrides ----------
 * DaisyUI v4 czyta CSS variables w formacie "L% C H" (3-element OKLCH).
 * Bez nich `.btn-primary` używa default `light` theme = fiolet
 * oklch(0.49 0.31 275) (bug znaleziony w QA F1 PR #50).
 *
 * Wartości tu są SOT — wszystkie shell-like templates (shell.html,
 * portal/base.html, errors/{403,404}.html) linkują ten plik.
 */
:root, [data-theme="light"] {
  --p:  45% 0.18 264;      /* primary  = #1a56db brand blue */
  --pc: 100% 0 0;          /* primary-content = white */
  --s:  25% 0.04 257;      /* secondary = #1e293b steel-800 */
  --sc: 100% 0 0;
  --a:  45% 0.18 264;      /* accent ⇒ primary */
  --ac: 100% 0 0;
}

[data-theme="pyrlandia-dark"] {
  /* Dyspozytornia 24/7 — Sprint 3 S5 (PR #55) */
  color-scheme: dark;
  --b1: 17% 0.02 257;
  --b2: 13% 0.015 257;
  --b3: 10% 0.01 257;
  --bc: 95% 0.005 257;
  --p:  60% 0.18 264;
  --pc: 100% 0 0;
  --s:  85% 0.02 257;
  --sc: 17% 0.02 257;
  --a:  60% 0.18 264;
  --ac: 100% 0 0;
  --n:  25% 0.02 257;
  --nc: 95% 0.005 257;
  --in: 65% 0.13 230;
  --inc: 10% 0.02 257;
  --su: 60% 0.18 145;
  --suc: 10% 0.02 257;
  --wa: 75% 0.16 80;
  --wac: 10% 0.02 257;
  --er: 65% 0.20 25;
  --erc: 100% 0 0;
}
