/* ==========================
   🎨 Root & Global Variables
   ========================== */
:root {
  /* ── Existing brand tokens (do not change) ── */
  --main-accent: #255aab;
  --accent-darker: #1e4a91;
  --accent-gradient: #255aab;
  --text-dark: #4a004a;

  /* ── ERP Design System v1 — additive tokens ──────────────────────────
     These are new. They do NOT override any existing rules.
     Use --erp-* in new panels and gradual migrations only.
  ─────────────────────────────────────────────────────────────────────── */

  /* Surfaces */
  --erp-bg:           #f1f4f8;
  --erp-surface:      #ffffff;
  --erp-surface-soft: #f8fafc;

  /* Borders */
  --erp-border:       #e2e8f0;
  --erp-border-soft:  #f1f5f9;

  /* Shadows */
  --erp-shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --erp-shadow-md:    0 4px 12px rgba(0,0,0,.08);

  /* Radius */
  --erp-radius-sm:    4px;
  --erp-radius-md:    8px;
  --erp-radius-lg:    10px;

  /* Blue accent (action, selection, links) */
  --erp-blue:         #2563eb;
  --erp-blue-dark:    #1d4ed8;
  --erp-blue-bg:      #eff6ff;
  --erp-blue-border:  #bfdbfe;

  /* Status — green */
  --erp-green:        #059669;
  --erp-green-bg:     #dcfce7;
  --erp-green-text:   #166534;

  /* Status — amber */
  --erp-amber:        #d97706;
  --erp-amber-bg:     #fef3c7;
  --erp-amber-text:   #92400e;

  /* Status — red */
  --erp-red:          #dc2626;
  --erp-red-bg:       #fee2e2;
  --erp-red-text:     #991b1b;

  /* Typography scale */
  --erp-text-1:       #1e293b;   /* primary headings */
  --erp-text-2:       #374151;   /* body */
  --erp-text-3:       #64748b;   /* secondary / labels */
  --erp-text-4:       #94a3b8;   /* muted / metadata */

  /* Spacing rhythm: 4 / 8 / 12 / 16 / 24 / 32 */
  --erp-sp-1:         4px;
  --erp-sp-2:         8px;
  --erp-sp-3:         12px;
  --erp-sp-4:         16px;
  --erp-sp-5:         24px;
  --erp-sp-6:         32px;

  /* ── Extended tokens (26-Oct-2026 CSS cleanup) ──────────────────────
     Each value is the EXACT literal already used most across panel CSS,
     so swapping a literal for its token changes nothing on screen.
     Bootstrap greys/primary: don't add tokens — use var(--bs-gray-100..900)
     and var(--bs-primary), which Bootstrap 5.3.3 defines on :root.
     Inside panel CSS injected from JS, always write the fallback form
     var(--erp-x, #literal): browser unit specs mount panels without this file.
  ─────────────────────────────────────────────────────────────────────── */

  /* Neutrals (slate / gray) */
  --erp-ink:            #0f172a;
  --erp-text-slate:     #475569;
  --erp-text-slate-2:   #334155;
  --erp-border-strong:  #cbd5e1;
  --erp-gray-200:       #e5e7eb;
  --erp-gray-300:       #d1d5db;
  --erp-gray-400:       #9ca3af;
  --erp-gray-500:       #6b7280;

  /* Status, extended */
  --erp-green-soft:     #f0fdf4;
  --erp-green-border:   #bbf7d0;
  --erp-green-mid:      #16a34a;
  --erp-green-strong:   #15803d;
  --erp-amber-soft:     #fffbeb;
  --erp-amber-border:   #fde68a;
  --erp-amber-strong:   #b45309;
  --erp-red-soft:       #fef2f2;
  --erp-red-border:     #fecaca;
  --erp-red-strong:     #b91c1c;
  --erp-blue-100:       #dbeafe;
  --erp-blue-500:       #3b82f6;
  --erp-blue-800:       #1e40af;

  /* Radius (sm/md/lg above) */
  --erp-radius-xl:      12px;
  --erp-radius-pill:    999px;

  /* Layers — use these instead of new magic numbers */
  --erp-z-sticky:       5;
  --erp-z-dropdown:     1060;
  --erp-z-overlay:      1080;
  --erp-z-toast:        1090;

  /* Font sizes */
  --erp-fs-xs:          11px;
  --erp-fs-sm:          12px;
  --erp-fs-md:          13px;
  --erp-fs-base:        14px;
  --erp-fs-lg:          16px;
  --erp-fs-xl:          20px;
}

/* ── Breakpoints (custom properties can't be used inside @media) ─────────
   New CSS uses only these two:
     phone  : @media (max-width: 640px)
     tablet : @media (max-width: 991.98px)   — the shell drawer switches here
     (optional wide: @media (min-width: 1200px))
   Older panels still use 25+ other values; move them only with an owner
   preview, because shifting a breakpoint changes layout between widths.
   ───────────────────────────────────────────────────────────────────── */



