/* ============================================
   ForexTrade Pro â€” Design Tokens
   ============================================ */

:root[data-accent="purple"] {
  --accent-primary: #78159c;
  --accent-primary-hover: #61137d;
  --primary-green: #78159c;
  --primary-green-hover: #61137d;
  --card-primary-bg: #78159c;
  --card-primary-text: #ffffff;
  --green-glow: color-mix(in srgb, #78159c 35%, transparent);
  --bs-primary: #78159c;
  --bs-primary-rgb: 120, 21, 156;
}

:root[data-accent="navy"] {
  --accent-primary: #405189;
  --accent-primary-hover: #354570;
  --primary-green: #405189;
  --primary-green-hover: #354570;
  --card-primary-bg: #405189;
  --card-primary-text: #ffffff;
  --green-glow: color-mix(in srgb, #405189 35%, transparent);
  --bs-primary: #405189;
  --bs-primary-rgb: 64, 81, 137;
}

:root[data-accent="teal"] {
  --accent-primary: #066b5e;
  --accent-primary-hover: #055a4f;
  --primary-green: #066b5e;
  --primary-green-hover: #055a4f;
  --card-primary-bg: #066b5e;
  --card-primary-text: #ffffff;
  --green-glow: color-mix(in srgb, #066b5e 35%, transparent);
  --bs-primary: #066b5e;
  --bs-primary-rgb: 6, 107, 94;
}

:root,
:root[data-accent="blue"] {
  --accent-primary: #b9903f;
  --accent-primary-hover: #8a6a25;
  --accent-primary-light: #c5a059;
  --accent-secondary: #8a6a25;
  --primary-green: #b9903f;
  --primary-green-hover: #8a6a25;
  --card-primary-bg: #b9903f;
  --card-primary-text: #ffffff;
  --green-glow: color-mix(in srgb, #b9903f 35%, transparent);
  --bs-primary: #b9903f;
  --bs-primary-rgb: 185, 144, 63;
}

:root {
  /* Brand structural palette — golden theme via data-accent="blue" */
  --primary-blue: var(--accent-primary);
  --primary-gold: var(--accent-primary);
  --accent-gold: #b9903f;
  --accent-gold-light: #c5a059;
  --accent-gold-dark: #8a6a25;
  --accent-gold-hover: #a8861e;
  --accent-lime: var(--accent-gold-light);
  --dark-green: #8a6a25;
  --forest-green: #b9903f;

  /* Auth / brand panel */
  --auth-brand-bg:
    radial-gradient(ellipse 90% 70% at 100% 0%, color-mix(in srgb, var(--accent-primary-light) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%, var(--accent-secondary), transparent 52%),
    linear-gradient(155deg, var(--accent-primary) 0%, var(--accent-primary-light) 36%, var(--accent-secondary) 58%, var(--accent-gold-dark) 100%);
  --auth-brand-glow: color-mix(in srgb, var(--accent-primary) 18%, transparent);

  /* Neutrals */
  --sidebar-bg: #0f1419;
  --sidebar-surface: #1a222d;
  --sidebar-border: #2a3544;
  --sidebar-text: #8b9cb3;
  --sidebar-text-active: #ffffff;

  /* Dashboard surfaces */
  --body-bg: #111318;
  --surface: #1a1f28;
  --surface-elevated: #222833;
  --surface-border: #2a3140;
  --surface-muted: #141922;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Semantic */
  --success: #22c55e;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #3b82f6;

  /* Metric card dark */
  --card-dark-bg: linear-gradient(135deg, #0f1419 0%, #8a6a25 55%, #b9903f 100%);

  /* Typography */
  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgb(15 20 25 / 0.05);
  --shadow-md: 0 4px 12px rgb(15 20 25 / 0.08);
  --shadow-lg: 0 8px 24px rgb(15 20 25 / 0.12);
  --shadow-card: 0 2px 8px rgb(15 20 25 / 0.06);

  /* Layout */
  --sidebar-width: 220px;
  --topbar-height: 72px;
  --header-height: 72px;
  --content-max-width: 1400px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-sidebar: 100;
  --z-header: 90;
  --z-overlay: 200;
  --z-modal: 300;

  /* Bootstrap overrides */
  --bs-primary: var(--accent-primary);
  --bs-primary-rgb: 185, 144, 63;
  --bs-body-font-family: var(--font-family);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-lg: var(--radius-lg);
}

/* ============================================
   Light theme overrides
   ============================================ */
:root[data-theme="light"] {
  /* Sidebar follows the light theme */
  --sidebar-bg: #ffffff;
  --sidebar-surface: #f1f5f9;
  --sidebar-border: #e2e8f0;
  --sidebar-text: #64748b;
  --sidebar-text-active: #0f172a;

  /* Dashboard surfaces */
  --body-bg: #eef1f6;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-border: #e2e8f0;
  --surface-muted: #f5f7fa;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Semantic backgrounds stay light-friendly */
  --success-bg: #ecfdf5;
  --danger-bg: #fef2f2;
  --warning-bg: #fffbeb;

  /* Metric dark card */
  --card-dark-bg: linear-gradient(135deg, #8a6a25 0%, #b9903f 55%, #c5a059 100%);

  /* Shadows â€” slightly stronger on light backgrounds */
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 8px 24px rgb(15 23 42 / 0.12);
  --shadow-card: 0 1px 3px rgb(15 23 42 / 0.08);
}

@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --body-bg: #0a0e13;
    --surface: #141b24;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
  }
}