/*
 * CabinetWorks Pro — Worker Theme
 *
 * Canonical color palette for ALL worker-facing surfaces (tablets at
 * stations + foreman + admin/floor). Ivory-on-slate "paper ticket"
 * aesthetic, established by shop-floor-v2.html lines 55-58 and
 * promoted here as the single source of truth.
 *
 * RULES (per [[feedback_strict_color_tokens]]):
 *   - Every color in a worker page MUST be var(--TOKEN).
 *   - NO hex literals, NOT EVEN var(--x, #fallback) fallbacks.
 *   - Worker pages link this file FIRST, then add per-page overrides
 *     only when necessary.
 *
 * Pattern matches index.html's `:root[data-theme="ascut"]` block
 * shape so the same body-attribute theme toggle that drives the main
 * app also drives the worker UI.
 *
 * To activate this theme on a page:
 *   <link rel="stylesheet" href="/worker-theme.css">
 *   <body data-theme="worker">
 */

:root[data-theme="worker"] {

  /* ─── BASELINE SURFACES ───────────────────────────────────────── */
  /* PR-CART-F3 (2026-08-27, owner directive): "less tiled, clean easy
     WHITE." The ivory-tickets-on-slate palette is retired — one calm
     near-white page, white cards separated by hairlines instead of
     dark gutters. Token NAMES unchanged so every widget re-skins for
     free; contrast pairs re-checked (ink 16181d on fff = 15.6:1). */
  --bg:           #f6f7f8;   /* page canvas — near-white               */
  --pn:           #ffffff;   /* card — clean white                     */
  --pn-2:         #f1f3f5;   /* inset — secondary surface              */
  --pn-rule:      #e3e6ea;   /* hairline rule                          */
  --bdr:          #e3e6ea;   /* edge between card + canvas             */

  /* ─── INK / TEXT ──────────────────────────────────────────────── */
  --ink:          #16181d;   /* primary ink — near-black               */
  --txt:          var(--ink);
  --dim:          #5b6472;   /* secondary text, captions               */
  --muted:        #79818f;   /* hint text, placeholders                */
  --faint:        #a7aeba;   /* disabled, hairline labels              */

  /* On-canvas ink — the canvas is light now, so canvas text is dark. */
  --bg-ink:       #16181d;
  --bg-dim:       #5b6472;

  /* ─── SEMANTIC STATE ──────────────────────────────────────────── */
  --acc:          #047857;   /* emerald — primary success accent       */
  --acc-soft:     #d1fae5;   /* emerald-100 — tap-state background     */
  --warn:         #c2410c;   /* orange — caution                       */
  --warn-soft:    #fed7aa;
  --no:           #991b1b;   /* oxblood — stop / failure               */
  --no-soft:      #fecaca;
  --info:         #1e40af;   /* indigo — informational                 */
  --info-soft:    #dbeafe;

  /* ─── ANSI Z535 / NFPA-aligned hazard tokens ─────────────────── */
  /* Reserved for safety callouts. Don't reuse for general UI.      */
  --hz-danger:    #c8102e;   /* Z535.1 Safety Red (stop / kill)       */
  --hz-warning:   #f78f1e;   /* Z535.1 Safety Orange                  */
  --hz-caution:   #ffd100;   /* Z535.1 Safety Yellow                  */
  --hz-safe:      #00964c;   /* Z535.1 Safety Green                   */
  --hz-info:      #00658d;   /* Z535.1 Safety Blue                    */

  /* ─── COMPATIBILITY ALIASES ────────────────────────────────────── */
  /* shop-floor-v2.html already uses --st-* tokens. Map them onto the */
  /* canonical worker palette so the existing file works under the    */
  /* new theme attribute without any line changes.                    */
  --st-canvas:    var(--bg);
  --st-paper:     var(--pn);
  --st-ink:       var(--ink);
  --st-ink-dim:   var(--dim);
  --st-rule:      var(--pn-rule);
  --st-emerald:   var(--acc);
  --st-oxblood:   var(--no);

  /* admin-shell.css uses --muted, --accent — both already aliased. */
  --accent:       var(--acc);
  --hairline:     var(--pn-rule);

  /* ─── INTERACTIVE STATES ──────────────────────────────────────── */
  --focus-ring:   #f59e0b;   /* amber-500 — high-contrast focus ring  */
  --tap-flash:    var(--acc-soft);
  --link:         var(--info);
}
