/* ============================================================
   FRONIVA DESIGN TOKENS — the single source of truth.
   (Phase 0 of dashboard/REDESIGN-BLUEPRINT.md, July 2026.)

   Every page consumes this sheet — via styles.css's @import or a
   direct <link> on standalone pages (login). Pages may define
   page-scoped component tokens (e.g. inventario's --bk-*), but
   MUST NOT redefine anything declared here. One theme pair:
   warm-editorial LIGHT (default) + warm-editorial DARK, the
   values previously duplicated per-page on pricing/capital.

   Color contract:
     amber   = brand punctuation + REVIEW/watch. Never large fills.
     green   = brand stamp + RAISE/good.
     rust    = CUT/action.
     warm gray = HOLD/neutral.
     hairlines = var(--hair), one value per theme — never literals.
   ============================================================ */

:root {
  /* ---- Brand (light) ---- */
  --froniva-green:          #1a4d2e;
  --froniva-green-light:    #2a7a4a;
  --froniva-green-glow:     rgba(26, 77, 46, 0.12);
  --froniva-green-subtle:   rgba(26, 77, 46, 0.08);
  --froniva-amber:          #b5851f;   /* deeper amber for text on cream */
  --froniva-amber-light:    #d4a843;   /* brand amber for marks */
  --froniva-amber-glow:     rgba(212, 168, 67, 0.25);
  --froniva-amber-subtle:   rgba(212, 168, 67, 0.16);

  /* ---- Surfaces ---- */
  --bg:                     #f5f2ec;
  --bg-charcoal:            #efeae0;
  --bg-card:                #fbf9f4;
  --bg-surface:             #efeae0;
  --hair:                   rgba(13, 18, 16, 0.12);
  --fill-subtle:            rgba(13, 18, 16, 0.05);
  --fill-faint:             rgba(13, 18, 16, 0.025);
  --bg-blur:                rgba(245, 242, 236, 0.82);
  --shadow-pop:             0 18px 50px rgba(13, 18, 16, 0.13);
  --shadow-drawer:          -24px 0 60px rgba(13, 18, 16, 0.13);
  --live-pulse:             rgba(13, 18, 16, 0.35);

  /* ---- Foreground ---- */
  --fg-1:                   #0d1210;
  --fg-2:                   #2a352e;
  --fg-3:                   rgba(13, 18, 16, 0.56);
  --fg-4:                   rgba(13, 18, 16, 0.40);

  /* ---- Semantic (team-report verbs) ---- */
  --sem-raise:              #2a7a4a;
  --sem-raise-bg:           rgba(42, 122, 74, 0.13);
  --sem-hold:               #6b6256;
  --sem-hold-bg:            rgba(13, 18, 16, 0.06);
  --sem-cut:                #b3492f;
  --sem-cut-bg:             rgba(179, 73, 47, 0.12);
  --sem-review:             #9c6a12;
  --sem-review-bg:          rgba(212, 168, 67, 0.18);
  --sem-divergent:          #7b1fa2;
  --sem-info:               #1565c0;

  --delta-up:               #2a7a4a;
  --delta-up-bg:            rgba(42, 122, 74, 0.10);
  --delta-down:             #b3492f;
  --delta-down-bg:          rgba(179, 73, 47, 0.10);

  /* ---- Typography ---- */
  --font-display:           'Playfair Display', Georgia, serif;
  --font-body:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* ---- Radii ---- */
  --radius-xs:              2px;
  --radius-sm:              3px;
  --radius-md:              4px;
  --radius-lg:              6px;
  --radius-xl:              12px;
  --radius-card:            14px;
  --radius-full:            9999px;

  /* ---- Motion ---- */
  --ease-out:               cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:                 0.2s;
  --t-base:                 0.3s;
}

/* Warm-editorial DARK — forest-ink + cream + brand amber.
   (The tuned per-page values from pricing/capital, now canonical;
   replaces the legacy Portal-v4 dark palette.) */
:root[data-theme="dark"] {
  /* ---- Brand ---- */
  --froniva-green:          #2a7a4a;
  --froniva-green-light:    #4fb07a;
  --froniva-green-glow:     rgba(42, 122, 74, 0.25);
  --froniva-green-subtle:   rgba(42, 122, 74, 0.10);
  --froniva-amber:          #d4a843;
  --froniva-amber-light:    #e2bd5c;
  --froniva-amber-glow:     rgba(212, 168, 67, 0.25);
  --froniva-amber-subtle:   rgba(212, 168, 67, 0.16);

  /* ---- Surfaces ---- */
  --bg:                     #0d1210;
  --bg-charcoal:            #1e2723;
  --bg-card:                #161d19;
  --bg-surface:             #1e2723;
  --hair:                   rgba(245, 242, 236, 0.13);
  --fill-subtle:            rgba(245, 242, 236, 0.06);
  --fill-faint:             rgba(245, 242, 236, 0.03);
  --bg-blur:                rgba(13, 18, 16, 0.80);
  --shadow-pop:             0 24px 70px rgba(0, 0, 0, 0.6);
  --shadow-drawer:          -30px 0 80px rgba(0, 0, 0, 0.6);
  --live-pulse:             rgba(245, 242, 236, 0.7);

  /* ---- Foreground ---- */
  --fg-1:                   #f5f2ec;
  --fg-2:                   #d7dcd6;
  --fg-3:                   rgba(245, 242, 236, 0.58);
  --fg-4:                   rgba(245, 242, 236, 0.38);

  /* ---- Semantic ---- */
  --sem-raise:              #4fb07a;
  --sem-raise-bg:           rgba(79, 176, 122, 0.16);
  --sem-hold:               #9a9388;
  --sem-hold-bg:            rgba(245, 242, 236, 0.07);
  --sem-cut:                #d8704e;
  --sem-cut-bg:             rgba(216, 112, 78, 0.16);
  --sem-review:             #d4a843;
  --sem-review-bg:          rgba(212, 168, 67, 0.18);
  --sem-divergent:          #ab47bc;
  --sem-info:               #1e88e5;

  --delta-up:               #4fb07a;
  --delta-up-bg:            rgba(79, 176, 122, 0.12);
  --delta-down:             #d8704e;
  --delta-down-bg:          rgba(216, 112, 78, 0.12);
}
