/* =============================================================================
   WorkFabric colours.

   The Aegis component library reads every colour from an --aegis-* variable.
   This file only gives those variables new values; it contains no layout.
   It must load AFTER aegis.css so these values win.

   Dark is the default. <html data-theme="light"> switches to light.
   ============================================================================= */

/* ---- Dark: "executive portfolio, dark", supplied by the UX team --------------
   "aegis-dark" is the name the UX team uses for it, kept here so their CSS can be
   pasted in unchanged. */
:root,
[data-theme="dark"],
[data-theme="aegis-dark"] {
  color-scheme: dark;

  /* #003c2f, retained as the brand signature */
  --aegis-brand: oklch(0.318 0.059 176);
  --aegis-brand-foreground: oklch(0.985 0 0);

  /* Lifted evergreen for interactive elements on dark surfaces */
  --aegis-primary: oklch(0.62 0.105 166);
  --aegis-primary-foreground: oklch(0.16 0.01 170);
  --aegis-ring: oklch(0.68 0.11 166);

  /* Shell and surfaces */
  --aegis-background: oklch(0.141 0.005 285.8);
  --aegis-foreground: oklch(0.945 0.006 286);
  --aegis-card: oklch(0.19 0.008 285.9);
  --aegis-card-foreground: oklch(0.945 0.006 286);
  --aegis-popover: oklch(0.21 0.008 285.9);
  --aegis-popover-foreground: oklch(0.945 0.006 286);

  /* Supporting UI */
  --aegis-secondary: oklch(0.255 0.01 286);
  --aegis-secondary-foreground: oklch(0.91 0.006 286);
  --aegis-muted: oklch(0.235 0.008 286);
  --aegis-muted-foreground: oklch(0.69 0.01 286);
  --aegis-accent: oklch(0.245 0.018 170);
  --aegis-accent-foreground: oklch(0.94 0.01 170);
  --aegis-border: oklch(0.28 0.009 286);
  --aegis-input: oklch(0.235 0.008 286);

  /* Status */
  --aegis-success: oklch(0.72 0.16 155);
  --aegis-success-foreground: oklch(0.16 0.01 170);
  --aegis-warning: oklch(0.8 0.15 76);
  --aegis-warning-foreground: oklch(0.18 0.015 76);
  /* The Aegis default, not the UX team's duller blue: the Completed dots on the timeline
     must match the Aegis demo site. Changed 2026-11-04. */
  --aegis-info: oklch(0.746 0.16 232.661);
  --aegis-info-foreground: oklch(0.16 0.01 220);
  --aegis-destructive: oklch(0.67 0.18 25);
  --aegis-destructive-foreground: oklch(0.985 0 0);

  /* Sidebar */
  --aegis-sidebar: oklch(0.17 0.007 285.9);
  --aegis-sidebar-foreground: oklch(0.91 0.006 286);
  --aegis-sidebar-primary: var(--aegis-primary);
  --aegis-sidebar-primary-foreground: var(--aegis-primary-foreground);
  --aegis-sidebar-accent: var(--aegis-accent);
  --aegis-sidebar-accent-foreground: var(--aegis-accent-foreground);
  --aegis-sidebar-border: var(--aegis-border);
  --aegis-sidebar-ring: var(--aegis-ring);

  --aegis-radius: 0.625rem;
}

/* ---- Light -------------------------------------------------------------------
   NOT from the UX team yet. These values were matched by eye to their light mockup,
   using the same evergreen brand. Replace them when the official light theme arrives. */
[data-theme="light"] {
  color-scheme: light;

  --aegis-brand: oklch(0.318 0.059 176);
  --aegis-brand-foreground: oklch(0.985 0 0);

  /* On a light surface the deep brand green is strong enough to be the interactive colour. */
  --aegis-primary: oklch(0.318 0.059 176);
  --aegis-primary-foreground: oklch(0.985 0 0);
  --aegis-ring: oklch(0.45 0.08 170);

  --aegis-background: oklch(0.975 0.003 286);
  --aegis-foreground: oklch(0.2 0.01 286);
  --aegis-card: oklch(1 0 0);
  --aegis-card-foreground: oklch(0.2 0.01 286);
  --aegis-popover: oklch(1 0 0);
  --aegis-popover-foreground: oklch(0.2 0.01 286);

  --aegis-secondary: oklch(0.955 0.004 286);
  --aegis-secondary-foreground: oklch(0.25 0.01 286);
  --aegis-muted: oklch(0.955 0.004 286);
  --aegis-muted-foreground: oklch(0.5 0.012 286);
  --aegis-accent: oklch(0.945 0.025 170);
  --aegis-accent-foreground: oklch(0.27 0.05 176);
  --aegis-border: oklch(0.915 0.005 286);
  --aegis-input: oklch(0.915 0.005 286);

  --aegis-success: oklch(0.55 0.13 155);
  --aegis-success-foreground: oklch(0.985 0 0);
  --aegis-warning: oklch(0.72 0.15 76);
  --aegis-warning-foreground: oklch(0.18 0.015 76);
  --aegis-info: oklch(0.685 0.169 237.323);   /* the Aegis default, as in the dark theme */
  --aegis-info-foreground: oklch(0.985 0 0);
  --aegis-destructive: oklch(0.56 0.2 25);
  --aegis-destructive-foreground: oklch(0.985 0 0);

  --aegis-sidebar: oklch(0.985 0.002 286);
  --aegis-sidebar-foreground: oklch(0.3 0.01 286);
  --aegis-sidebar-primary: var(--aegis-primary);
  --aegis-sidebar-primary-foreground: var(--aegis-primary-foreground);
  --aegis-sidebar-accent: var(--aegis-accent);
  --aegis-sidebar-accent-foreground: var(--aegis-accent-foreground);
  --aegis-sidebar-border: var(--aegis-border);
  --aegis-sidebar-ring: var(--aegis-ring);
}
