/* Design tokens — shared across themes
   Primary color (--p) is injected from PHP in the layout.
*/
:root {
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);

  /* Typography */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;

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

  /* Layout */
  --sidebar-width: 15rem;
  --header-height: 3.5rem;
  --page-max: 1120px;

  /* Fallback primary (overridden by layout) */
  --p: #7c3aed;
  --p-fallback: #7c3aed;
}

/* Light theme defaults (app-shell.css also defines these; kept for early paint) */
:root,
[data-theme="light"] {
  --bg: #f8fafc;
  --card: #ffffff;
  --bd: #e2e8f0;
  --tx: #0f172a;
  --mu: #64748b;
  --sf: #f1f5f9;
  --nv: #ffffff;
  --ok-bg: #ecfdf5;
  --ok-bd: #a7f3d0;
  --ok-tx: #065f46;
  --err-bg: #fef2f2;
  --err-bd: #fecaca;
  --err-tx: #991b1b;
  --warn-bg: #fffbeb;
  --warn-bd: #fde68a;
  --warn-tx: #92400e;
  --shadow: var(--shadow-lg);
  --input-bg: #ffffff;
  --hover-row: #fff7ed;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --card: #111827;
  --bd: #1f2a3a;
  --tx: #e5e7eb;
  --mu: #94a3b8;
  --sf: #1a2332;
  --nv: #0f172a;
  --ok-bg: #052e1c;
  --ok-bd: #065f46;
  --ok-tx: #6ee7b7;
  --err-bg: #3f0d0d;
  --err-bd: #7f1d1d;
  --err-tx: #fca5a5;
  --warn-bg: #3b2a05;
  --warn-bd: #854d0e;
  --warn-tx: #fcd34d;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --input-bg: #0f172a;
  --hover-row: #1a2332;
}
