/* ============================================================================
   VoltraPay — Design Token Layer
   ----------------------------------------------------------------------------
   Single source of truth for the VoltraPay brand. Loaded LAST in index.html
   so its :root / [data-theme="dark"] blocks override the legacy admin
   template tokens (public/assets/css/style.css) by cascade source-order.

   - Redefines the legacy token names the template already consumes
     (--primary-*, --neutral-*, --brand, --lilac-*) so existing screens
     re-skin automatically.
   - Adds new brand tokens (--vp-*) consumed by src/components/ui/* primitives
     and Tailwind (via tailwind.config.js var() mappings).
   ========================================================================== */

:root {
  /* --- Primary: royal blue / fintech navy ------------------------------ */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb; /* brand primary */
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  --brand: #2563eb;

  /* Accent: electric cyan (speed, transaction signals, focus highlights) */
  --vp-accent-50: #ecfeff;
  --vp-accent-100: #cffafe;
  --vp-accent-300: #67e8f9;
  --vp-accent-500: #06b6d4;
  --vp-accent-600: #0891b2;
  --vp-accent-700: #0e7490;

  /* Secondary: violet (gradients / secondary emphasis) */
  --vp-secondary-500: #8b5cf6;
  --vp-secondary-600: #7c3aed;
  --lilac-600: #7c3aed;

  /* --- Neutrals: cool slate -------------------------------------------- */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* --- Semantic scales (kept close to template, refined) --------------- */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;

  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;

  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --info-500: #3b82f6;
  --info-600: #2563eb;
  --info-700: #1d4ed8;

  /* --- Surfaces & text (semantic, theme-aware) ------------------------- */
  --vp-bg: #f6f7fb;          /* app background */
  --vp-surface: #ffffff;     /* cards, panels */
  --vp-surface-2: #f8fafc;   /* subtle raised / table header */
  --vp-surface-3: #f1f5f9;   /* hover fills */
  --vp-border: #e2e8f0;
  --vp-border-strong: #cbd5e1;
  --vp-text: #0f172a;        /* primary text */
  --vp-text-muted: #64748b;  /* secondary text */
  --vp-text-subtle: #94a3b8; /* tertiary / placeholder */
  --vp-text-inverse: #ffffff;
  --vp-ring: rgba(37, 99, 235, 0.45); /* focus ring */

  /* Sidebar (brand surface) */
  --vp-sidebar-bg: #ffffff;
  --vp-sidebar-text: #475569;
  --vp-sidebar-active-bg: #eff6ff;
  --vp-sidebar-active-text: #2563eb;

  /* --- Radius --------------------------------------------------------- */
  --vp-radius-sm: 6px;
  --vp-radius-md: 10px;
  --vp-radius-lg: 14px;
  --vp-radius-xl: 20px;
  --vp-radius-pill: 999px;

  /* --- Shadows -------------------------------------------------------- */
  --vp-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --vp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --vp-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --vp-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --vp-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);

  /* --- Spacing scale (4px base) --------------------------------------- */
  --vp-space-1: 4px;
  --vp-space-2: 8px;
  --vp-space-3: 12px;
  --vp-space-4: 16px;
  --vp-space-5: 20px;
  --vp-space-6: 24px;
  --vp-space-8: 32px;
  --vp-space-10: 40px;
  --vp-space-12: 48px;

  /* --- Motion --------------------------------------------------------- */
  --vp-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --vp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --vp-dur-fast: 120ms;
  --vp-dur: 200ms;
  --vp-dur-slow: 320ms;
}

/* ============================================================================
   Dark theme — declared AFTER :root so it wins when [data-theme="dark"] is set.
   ========================================================================== */
[data-theme="dark"] {
  /* Lift primary slightly for contrast on dark surfaces */
  --primary-50: #172554;
  --primary-100: #1e3a8a;
  --primary-200: #1e40af;
  --primary-500: #60a5fa;
  --primary-600: #3b82f6;
  --primary-700: #93c5fd;
  --brand: #60a5fa;

  --neutral-50: #0f172a;
  --neutral-100: #111a2e;
  --neutral-200: #1e293b;
  --neutral-300: #334155;
  --neutral-400: #64748b;
  --neutral-500: #94a3b8;
  --neutral-600: #cbd5e1;
  --neutral-700: #e2e8f0;
  --neutral-800: #f1f5f9;
  --neutral-900: #f8fafc;

  --vp-bg: #0b1120;
  --vp-surface: #111a2e;
  --vp-surface-2: #172137;
  --vp-surface-3: #1e293b;
  --vp-border: #1e293b;
  --vp-border-strong: #334155;
  --vp-text: #f1f5f9;
  --vp-text-muted: #94a3b8;
  --vp-text-subtle: #64748b;
  --vp-text-inverse: #0b1120;
  --vp-ring: rgba(96, 165, 250, 0.55);

  /* --- Semantic scales, dark variants ----------------------------------
     Convention: the 50/100 steps are TINTED FILLS (chips, alerts, soft
     buttons) and the 700 step is the TEXT/ICON colour that sits on them, so
     both must flip for dark mode — otherwise a "bg-success-50" chip stays
     near-white and burns a hole in a dark screen. The 500/600 steps stay
     saturated: they are solid action fills that carry white text in both
     themes. */
  --success-50: #06281d;
  --success-100: #0b4032;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #6ee7b7;

  --warning-50: #2e1f05;
  --warning-100: #45300a;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #fcd34d;

  --danger-50: #33121a;
  --danger-100: #4c1620;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #fca5a5;

  --info-50: #10233f;
  --info-100: #16305a;
  --info-500: #3b82f6;
  --info-600: #2563eb;
  --info-700: #93c5fd;

  /* Accent (cyan): same fill/text split as above */
  --vp-accent-50: #062c33;
  --vp-accent-100: #0a4552;
  --vp-accent-300: #67e8f9;
  --vp-accent-500: #22d3ee;
  --vp-accent-600: #06b6d4;
  --vp-accent-700: #a5f3fc;

  --vp-sidebar-bg: #111a2e;
  --vp-sidebar-text: #94a3b8;
  --vp-sidebar-active-bg: #172554;
  --vp-sidebar-active-text: #93c5fd;

  --vp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --vp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --vp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --vp-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --vp-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}
