/* ==========================================================================
   AutoRebuildFax Design Tokens — v1.0
   Single source of truth for color, radius, and Bootstrap override tokens
   across the dashboard, auth, and marketing surfaces.
   Ported from .claude/skills/arf-design-system/assets/arf-design.css
   Canonical reference: DESIGN.md
   Load order: after bootstrap.css / app.min.css / styles.css, before arf-ui.css.
   ========================================================================== */

:root {
  /* --- Brand: ARF Red (action / primary) --- */
  --arf-primary:              #8a1a1f;
  --arf-primary-hover:        #6f1419;
  --arf-primary-active:       #5e1115;
  --arf-primary-active-border:#4a0d10;
  --arf-primary-subtle:       rgba(138, 26, 31, 0.12);
  --arf-primary-border-subtle:rgba(138, 26, 31, 0.30);
  --arf-primary-focus-ring:   rgba(138, 26, 31, 0.25);
  --arf-focus-border:         #b52229;
  --arf-primary-rgb:          138, 26, 31;

  /* --- Neutrals (ink → surface) --- */
  --arf-ink:                  #24272c;
  --arf-ink-deep:             #21252f;
  --arf-body:                 #696665;
  --arf-muted:                #8e8e93;
  --arf-border:               #ededed;
  --arf-border-soft:          #efefef;
  --arf-surface-alt:          #f8f8f9;
  --arf-white:                #ffffff;

  /* --- Semantic / status (also rebuild score thresholds) --- */
  --arf-success:              #14a077;  /* Good ≥ 60% — Approved / Paid */
  --arf-success-accent:       #6bc044;  /* Alt accent green */
  --arf-warning:              #ffa920;  /* Fair 30–59% — Pending */
  --arf-warning-bg:           #fff5e0;
  --arf-warning-text:         #903f00;
  --arf-danger:               #c0392b;  /* Critical < 30% — Errors */

  /* --- Elevation & radius --- */
  --arf-radius-sm:            8px;
  --arf-radius-md:            10px;
  --arf-radius-lg:            14px;
  --arf-radius-xl:            16px;   /* house default for cards */
  --arf-radius-2xl:           24px;
  --arf-radius-pill:          999px;

  /* Restrained elevation — clean & documentary, not skeuomorphic */
  --arf-shadow-xs:            0 1px 2px rgba(36, 39, 44, 0.06);
  --arf-shadow-sm:            0 6px 24px -12px rgba(36, 39, 44, 0.14);
  --arf-shadow-md:            0 10px 30px -12px rgba(20, 20, 30, 0.18);
  --arf-shadow-lg:            0 24px 60px -20px rgba(20, 20, 30, 0.26);

  /* Motion */
  --arf-ease:                 cubic-bezier(0.22, 0.61, 0.36, 1);
  --arf-transition:           0.25s var(--arf-ease);

  /* --- Type --- */
  --arf-font-display:         'Outfit', 'Inter', system-ui, sans-serif;
  --arf-font-body:            'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arf-font-mono:            'Courier New', ui-monospace, monospace;

  /* --- Gradients --- */
  --arf-gradient-dark:        linear-gradient(135deg, #21252f 0%, #171a21 100%);
  --arf-gradient-hero:        linear-gradient(135deg, #24272c 0%, #171a21 100%);
  --arf-gradient-cta:         linear-gradient(135deg, #8a1a1f 0%, #24272c 100%);

  /* --- Bootstrap override: map primary → ARF red --- */
  --bs-primary:               #8a1a1f;
  --bs-primary-rgb:           138, 26, 31;
  --bs-link-color:            #8a1a1f;
  --bs-link-color-rgb:        138, 26, 31;
  --bs-link-hover-color:      #6f1419;

  /* --- Bootstrap btn overrides (prevents admin theme reverting to blue) --- */
  --bs-btn-bg:                #8a1a1f;
  --bs-btn-border-color:      #8a1a1f;
  --bs-btn-hover-bg:          #6f1419;
  --bs-btn-hover-border-color:#6f1419;
  --bs-btn-active-bg:         #5e1115;
  --bs-btn-active-border-color:#4a0d10;
  --bs-btn-focus-shadow-rgb:  138, 26, 31;

  /* --- Focus / form --- */
  --bs-focus-ring-color:      rgba(138, 26, 31, 0.25);
  --bs-input-focus-border-color: #b52229;
  --bs-input-focus-box-shadow:   0 0 0 0.2rem rgba(138, 26, 31, 0.15);
}
