/* NAQAAE Coordinator Portal — design tokens
 *
 * Source of truth: the authority's colour file (8 official colours).
 * Derived shades (navy-700, teal-700, ...) exist only to make the palette
 * accessible on real surfaces. Screen code must use the role/status tokens,
 * never a raw hex.
 */
:root {
  /* Brand anchors — official, do not change without the authority. */
  --brand-navy: #18608a;
  --brand-blue: #1886c4;
  --brand-teal: #09a1b2;
  --brand-crimson: #c23455;
  --brand-orange: #e37138;
  --brand-amber: #fbad32;
  --brand-sky: #ccebf4;
  --brand-peach: #fde5d8;

  /* Derived shades */
  --navy-700: #134d6e;
  --navy-900: #0e3a53;
  --blue-700: #126493;
  --teal-700: #06646e;
  --orange-700: #ae4a18;
  --amber-800: #945b03;
  --crimson-700: #9f2b46;
  --teal-100: #d6f0f3;
  --crimson-100: #f8dde3;

  /* Neutrals */
  --ink: #221f20;
  --ink-muted: #5b6b7a;
  --surface-000: #ffffff;
  --surface-050: #f5f8fa;
  --surface-100: #e6ecf1;
  --border-subtle: #d5dee6;
  --border-strong: #7f8e9c;

  /* Colour roles */
  --role-bg: var(--surface-000);
  --role-text: var(--ink);
  --role-btn-primary: var(--brand-navy);
  --role-btn-secondary: var(--surface-000);
  --role-border: var(--border-subtle);
  --role-success: var(--brand-teal);
  --role-warning: var(--brand-amber);
  --role-error: var(--brand-crimson);
  --role-info: var(--brand-blue);
  --role-focus: var(--brand-blue);

  /* Status categories */
  --status-draft-fg: var(--ink-muted);
  --status-draft-bg: var(--surface-100);
  --status-action-fg: var(--orange-700);
  --status-action-bg: var(--brand-peach);
  --status-progress-fg: var(--blue-700);
  --status-progress-bg: var(--brand-sky);
  --status-done-fg: var(--teal-700);
  --status-done-bg: var(--teal-100);
  --status-attention-fg: var(--amber-800);
  --status-attention-bg: #fef0d6;
  --status-rejected-fg: var(--crimson-700);
  --status-rejected-bg: var(--crimson-100);
  --status-closed-fg: var(--ink-muted);
  --status-closed-bg: var(--surface-000);

  /* Spacing, radii, elevation */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(14, 58, 83, 0.08);
  --shadow-pop: 0 8px 24px rgba(14, 58, 83, 0.16);

  --font-sans: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", sans-serif;
}

.display { font-family: var(--font-sans); font-size: 32px; line-height: 44px; font-weight: 700; }
.h1 { font-family: var(--font-sans); font-size: 24px; line-height: 36px; font-weight: 700; }
.h2 { font-family: var(--font-sans); font-size: 20px; line-height: 30px; font-weight: 600; }
.h3 { font-family: var(--font-sans); font-size: 16px; line-height: 26px; font-weight: 600; }
.body { font-family: var(--font-sans); font-size: 15px; line-height: 26px; font-weight: 400; }
.body-strong { font-family: var(--font-sans); font-size: 15px; line-height: 26px; font-weight: 600; }
.label { font-family: var(--font-sans); font-size: 13px; line-height: 20px; font-weight: 500; }
.caption { font-family: var(--font-sans); font-size: 12px; line-height: 18px; font-weight: 400; color: var(--ink-muted); }

/* Dark theme keeps the same role/status semantics on dark surfaces.
 * The spec's white page is the light theme; these values mirror the
 * existing portal dark surfaces so contrast stays ≥ 4.5:1.
 */
.dark {
  --ink: #e6f1f5;
  --ink-muted: #9db4bf;
  --surface-000: #0e1c24;
  --surface-050: #14262f;
  --surface-100: #1a2c35;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.28);

  --role-bg: var(--surface-000);
  --role-text: var(--ink);
  --role-btn-primary: #1f6f9c;
  --role-btn-secondary: var(--surface-000);
  --role-border: var(--border-subtle);
  --role-focus: #4aa8d8;

  --teal-100: #0f3a40;
  --crimson-100: #3a1822;
  --status-draft-bg: #1a2c35;
  --status-action-bg: #3a2418;
  --status-progress-bg: #0f2f40;
  --status-done-bg: #0f3a40;
  --status-attention-bg: #3d2e12;
  --status-rejected-bg: #3a1822;
  --status-closed-bg: var(--surface-000);

  --status-draft-fg: #9db4bf;
  --status-action-fg: #f0a878;
  --status-progress-fg: #7ec6e8;
  --status-done-fg: #6fd3dc;
  --status-attention-fg: #f6c46a;
  --status-rejected-fg: #f08ba3;
  --status-closed-fg: #9db4bf;
}
