/*
 * Mamore UI v2 — LIGHT theme.
 *
 * Deliberately designed, not an inversion of dark. The characteristic of a
 * cheap admin panel is grey fills used to separate surfaces; this theme
 * separates surfaces with BORDERS and restrained shadows instead, which is what
 * keeps it looking composed rather than templated.
 *
 * Only SEMANTIC tokens are defined here. Raw brand tokens are never overridden,
 * so a chart series or the brand lockup stays identical across themes.
 *
 * The selector is `[data-theme="light"]` and deliberately NOT a bare `:root`.
 * tokens.css already carries the light values as its own defaults; if this file
 * also matched `:root`, then both this file and dark.css would apply at equal
 * specificity and whichever is linked last would win unconditionally -- the
 * page would render dark no matter what the user chose. Attribute-scoped
 * themes make stylesheet order irrelevant instead of load-bearing.
 *
 * `data-theme` is written server-side by Core\AppShell on every response, so the
 * attribute is always present by the time this stylesheet applies.
 */

[data-theme="light"] {
  color-scheme: light;

  /* ------------------------------------------------------------ surfaces */
  --bg-app: #F4F6FA;              /* cool neutral app ground */
  --surface-1: #FFFFFF;           /* panels, cards */
  --surface-2: #FFFFFF;           /* tables, nested panels */
  --surface-3: #F8FAFD;           /* hovered / striped rows */
  --surface-raised: #FFFFFF;      /* popovers, dropdowns, drawers */
  --surface-sunken: #EEF2F8;      /* wells, skeletons, code blocks */
  --surface-nav: #012F6C;         /* sidebar */
  --surface-nav-2: #00225D;       /* sidebar footer / active well */
  --surface-topbar: #FFFFFF;

  /* ---------------------------------------------------------------- text */
  --text-primary: #0B1A2E;
  --text-secondary: #46587A;
  /* Muted text is still body text and must clear 4.5:1, not 3:1. Measured:
     5.27:1 on white, 4.87:1 on --bg-app, 4.69:1 on --surface-sunken. */
  --text-muted: #5C6D86;
  --text-inverse: #FFFFFF;
  --text-on-accent: #0B1A2E;      /* on gold fill */
  --text-link: #0A429A;

  /* -------------------------------------------------------------- borders */
  --border-subtle: #E8ECF3;
  --border-default: #D8E0EC;
  --border-strong: #B9C6DA;
  /* See tokens.css: this is the token that identifies a control, so it must
     clear WCAG 1.4.11 at 3:1 on every surface it can land on. Measured:
     3.81:1 on white, 3.39:1 on --surface-sunken -- the sunken surface is the
     darkest backdrop an input ever sits on in this theme, so it is the
     binding constraint. */
  --border-control: #72849F;
  --border-focus: #0A429A;
  --border-nav: rgba(255, 255, 255, 0.12);
  /* Measured over --surface-nav (#012F6C): 0.34 -> 2.76, 0.40 -> 3.28. */
  --border-nav-strong: rgba(255, 255, 255, 0.40);

  /* ------------------------------------------------------------- shadows */
  /* Tinted with brand navy so elevation reads as part of the identity rather
     than a generic grey blur. */
  --shadow-sm: 0 1px 2px rgba(1, 47, 108, 0.06);
  --shadow-md: 0 4px 12px rgba(1, 47, 108, 0.08), 0 1px 3px rgba(1, 47, 108, 0.05);
  --shadow-lg: 0 12px 32px rgba(1, 47, 108, 0.12), 0 2px 6px rgba(1, 47, 108, 0.06);
  --shadow-overlay: 0 24px 60px rgba(1, 47, 108, 0.22);

  /* ---------------------------------------------------- status (light) */
  /* Slightly deeper than the raw tokens so 4.5:1 holds on white. */
  --tone-success: #0F6B41;
  --tone-warning: #8F4C07;
  --tone-danger: #B32219;
  --tone-info: #0A5290;
  --tone-neutral: #4E5F79;
  --tone-success-bg: rgba(15, 107, 65, 0.09);
  --tone-warning-bg: rgba(143, 76, 7, 0.09);
  --tone-danger-bg: rgba(179, 34, 25, 0.09);
  --tone-info-bg: rgba(10, 82, 144, 0.09);
  --tone-neutral-bg: rgba(78, 95, 121, 0.09);

  /* --------------------------------------------------- charts (light) */
  --chart-grid: rgba(11, 26, 46, 0.08);
  --chart-axis: #6B7C99;

  /* ------------------------------------------------------------ skeleton */
  --skeleton-base: #E7ECF4;
  --skeleton-sheen: #F4F7FB;
}
