/* Shared portal palette (auth, public shell, minimal login). Import before site.css or login-shell.css.
   Light is the default (:root). Dark overrides live in [data-theme="dark"] below — flip the attribute
   on <html> to switch the whole app. To re-skin a theme, edit only the variables here. */
:root {
  color-scheme: light;
  --bg: #e8f4fc;
  --bg-2: #d4e8f7;
  --bg-soft: #f3f9fe;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --brand: #0f8eca;
  --brand-rgb: 15, 142, 202;
  --brand-2: #075985;
  --brand-2-rgb: 7, 89, 133;
  --brand-light: #98e6f5;
  --brand-light-rgb: 152, 230, 245;
  --secondary: #00897b;
  --accent: #ff6d00;
  --freshwater: #2e7d32;
  --saltwater: #0277bd;
  --saltwater-rgb: 2, 119, 189;
  --text: #0a2540;
  --text-rgb: 10, 37, 64;
  --muted: #5b7a99;
  --line: #c7ddf0;
  --danger: #d32f2f;
  --danger-rgb: 211, 47, 47;
  --tile-grad-start: #f5fbff;
  --tile-grad-end: #eaf4fc;

  /* Secondary accent (Reports / Details action UI) */
  --accent-2: #07b5d9;
  --accent-2-rgb: 7, 181, 217;
  --accent-2-strong: #0f8eca;

  /* Semantic status */
  --success: #2e7d32;
  --success-rgb: 46, 125, 50;
  --success-fg: #15803d;
  --success-strong: #166534;
  --warn-fg: #92400e;

  /* Neutral data surfaces (audit grids, history tables) */
  --data-header-bg: #1e293b;
  --data-header-fg: #e2e8f0;
  --data-muted: #64748b;
  --data-muted-2: #94a3b8;
  --data-text: #334155;
  --data-border: #cbd5e1;
  --data-border-soft: #eef1f5;
  --data-line: #d8dee9;
  --data-colh-bg: #f1f5f9;
  --data-row-hover: #f8fafc;

  /* Before / after diff colours */
  --diff-before: #b91c1c;
  --diff-after: #15803d;

  /* Operation badges (add / modify / delete) */
  --badge-add-bg: #dcfce7;
  --badge-add-fg: #166534;
  --badge-mod-bg: #fef3c7;
  --badge-mod-fg: #92400e;
  --badge-del-bg: #fee2e2;
  --badge-del-fg: #b91c1c;

  /* UI accent for pagers / primary form buttons on data pages */
  --ui-accent: #0f8eca;

  /* Report status pills */
  --status-ok: var(--success-strong);
  --status-bad: #9a2222;
  --status-review: var(--brand-2);
  --status-ok-dot: #27ae60;
  --status-bad-dot: #c0392b;
  --status-review-dot: var(--brand-2);
}

/* ── Dark theme ─────────────────────────────────────────────────────────
   Activated by <html data-theme="dark">. Same variable names, dark values. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1622;
  --bg-2: #0e1d2e;
  --bg-soft: #122236;
  --surface: #15212f;
  --surface-rgb: 21, 33, 47;
  --brand: #3b9bff;
  --brand-rgb: 59, 155, 255;
  --brand-2: #6cb6ff;
  --brand-2-rgb: 108, 182, 255;
  --secondary: #26a69a;
  --accent: #ff8a3d;
  --freshwater: #66bb6a;
  --saltwater: #4fc3f7;
  --saltwater-rgb: 79, 195, 247;
  --text: #e6eef7;
  --text-rgb: 230, 238, 247;
  --muted: #93a8c0;
  --line: #28394d;
  --danger: #f87171;
  --danger-rgb: 248, 113, 113;
  --tile-grad-start: #16273a;
  --tile-grad-end: #0f2030;

  --accent-2: #22b8e6;
  --accent-2-rgb: 34, 184, 230;
  --accent-2-strong: #4fc8ef;

  --success: #4ade80;
  --success-rgb: 74, 222, 128;
  --success-fg: #6ee7a0;
  --success-strong: #86efac;
  --warn-fg: #fbbf24;

  /* Neutral data surfaces */
  --data-header-bg: #0e1b2a;
  --data-header-fg: #d8e3f0;
  --data-muted: #8aa0b8;
  --data-muted-2: #6b829c;
  --data-text: #c4d2e2;
  --data-border: #2c3e54;
  --data-border-soft: #1e2c3d;
  --data-line: #2c3e54;
  --data-colh-bg: #16273a;
  --data-row-hover: #19283a;

  --diff-before: #f87171;
  --diff-after: #4ade80;

  --badge-add-bg: rgba(74, 222, 128, 0.16);
  --badge-add-fg: #86efac;
  --badge-mod-bg: rgba(251, 191, 36, 0.16);
  --badge-mod-fg: #fcd34d;
  --badge-del-bg: rgba(248, 113, 113, 0.16);
  --badge-del-fg: #fca5a5;

  --ui-accent: #3b82f6;

  --status-ok: var(--success-strong);
  --status-bad: #f87171;
  --status-review: var(--brand-2);
  --status-ok-dot: #4ade80;
  --status-bad-dot: #f87171;
  --status-review-dot: var(--brand-2);
}
