/* ============================================================================
   AGC Quarry ERP — Design Tokens
   Source: the AGC Brand Portal (portal.html, brand system v2.1, 2026-02-22).
   Palette: #191e2b #23aa08 #46b82e #536877 #c5c7c4 #edece5 #ce272d · Inter.
   The portal's component CSS also defines the concrete surfaces used below
   (canvas #eae9e3, body text #3f3c39, card border #e8e7e3, row line #f0f0ec,
   layered card shadows, 6/12px radii) — semantic tokens now mirror those
   real portal values instead of invented approximations.
   ============================================================================ */

:root {
  /* --- Brand primitives (exact, from portal) --- */
  --agc-dark:        #191e2b; /* primary dark — text, headers, sidebar */
  --agc-green:       #23aa08; /* primary accent — CTAs, logos, highlights */
  --agc-green-2:     #46b82e; /* secondary green — hover states */
  --agc-slate:       #536877; /* muted/secondary text */
  --agc-grey:        #c5c7c4; /* borders, dividers, disabled */
  --agc-offwhite:    #edece5; /* background surfaces, cards */
  --agc-red:         #ce272d; /* error / alert */

  /* --- Portal component values (from portal.html CSS) --- */
  --agc-dark-90:     #2a3244; /* dark hover (portal btn-print hover) */
  --agc-canvas:      #eae9e3; /* portal page canvas */
  --agc-text-body:   #3f3c39; /* portal long-form/body text */
  --agc-green-deep:  #147006; /* portal deep green (gradients, text on tint) */
  --agc-green-tint:  #e8f7e5; /* portal btn-row-add background */
  --agc-red-tint:    #fbe7e8;
  --agc-amber:       #d98a00; /* warning — not in brand, added for state (derived) */
  --agc-amber-tint:  #fbf1df;

  /* --- Semantic roles --- */
  --color-bg:            var(--agc-canvas);
  --color-surface:       #ffffff;
  --color-surface-alt:   #f8f8f6;   /* portal totals-box / hint surfaces */
  --color-text:          var(--agc-dark);
  --color-text-body:     var(--agc-text-body);
  --color-text-muted:    var(--agc-slate);
  --color-border:        #e8e7e3;   /* portal card/table border */
  --color-border-row:    #f0f0ec;   /* portal row divider */
  --color-primary:       var(--agc-green);
  --color-primary-hover: var(--agc-green-2);
  --color-on-primary:    #ffffff;

  --color-success:       var(--agc-green);
  --color-success-bg:    var(--agc-green-tint);
  --color-warning:       var(--agc-amber);
  --color-warning-bg:    var(--agc-amber-tint);
  --color-danger:        var(--agc-red);
  --color-danger-bg:     var(--agc-red-tint);

  /* Audit/chatter highlight — BRD 6.1.2 requires by-product changes in red */
  --color-audit-flag:    var(--agc-red);

  /* --- Typography (portal) --- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading-weight: 800;   /* portal: headings 800–900 */
  --font-body-weight:    400;   /* portal: body 300–400 */
  --tracking-heading: -0.02em;  /* portal: headings -0.02em */
  --tracking-label:    0.12em;  /* portal micro-labels: +0.1 to +0.3em */

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;

  /* --- Radius / shadow / spacing (portal card + table values) --- */
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow:    0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 40px rgba(0, 0, 0, 0.14);
  --gradient-chrome: linear-gradient(180deg, #191e2b, #161b27);
  --gradient-accent: linear-gradient(90deg, #23aa08, #46b82e, #23aa08);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-6: 24px; --space-8: 32px;
}
