/**
 * MBF Forex CRM - Global Theme Variables
 * Professional Color Scheme and Typography System
 * Supports Light and Dark Modes
 */

:root {
  /* ============================================
     COLOR SYSTEM - LIGHT MODE (DEFAULT)
     ============================================ */
  --background: #ffffff;
  --foreground: #020817;
  --card: #ffffff;
  --card-foreground: #020817;
  --popover: #ffffff;
  --popover-foreground: #020817;
  --primary: #003341;
  --primary-foreground: #f8fafc;
  --secondary: #3a596a;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #3a596a;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --success: #003341;
  --success-foreground: #f8fafc;
  --warning: #ffc107;
  --warning-foreground: #020817;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #003341;
  
  /* Chart Colors */
  --chart-1: #003341;
  --chart-2: #3a596a;
  --chart-3: #427794;
  --chart-4: #4292bd;
  --chart-5: #156e9e;
  
  /* Sidebar Colors */
  --sidebar: #f1f5f9;
  --sidebar-foreground: #020817;
  --sidebar-primary: #3a596a;
  --sidebar-primary-foreground: #f8fafc;
  --sidebar-accent: #f1f5f9;
  --sidebar-accent-foreground: #0f172a;
  --sidebar-border: #e2e8f0;
  --sidebar-ring: #3a596a;
  
  /* ============================================
     TYPOGRAPHY SYSTEM
     ============================================ */
  --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  
  /* ============================================
     BORDER RADIUS SYSTEM
     ============================================ */
  --radius: 0.5rem;
  
  /* ============================================
     SHADOW SYSTEM
     ============================================ */
  --shadow-x: 0;
  --shadow-y: 0;
  --shadow-blur: 0;
  --shadow-spread: 0;
  --shadow-opacity: 0;
  --shadow-color: 0 0 0 0;
  --shadow-2xs: 0 0 0 0 hsl(0 0 0 0 / 0.00);
  --shadow-xs: 0 0 0 0 hsl(0 0 0 0 / 0.00);
  --shadow: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 1px 2px -1px hsl(0 0 0 0 / 0.00);
  --shadow-md: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 2px 4px -1px hsl(0 0 0 0 / 0.00);
  --shadow-lg: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 4px 6px -1px hsl(0 0 0 0 / 0.00);
  --shadow-xl: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 8px 10px -1px hsl(0 0 0 0 / 0.00);
  --shadow-2xl: 0 0 0 0 hsl(0 0 0 0 / 0.00);
  
  /* ============================================
     LETTER SPACING SYSTEM
     ============================================ */
  --tracking-normal: 0;
}

/* ============================================
   DARK MODE COLOR SYSTEM
   ============================================ */
.dark {
  --background: #020817;
  --foreground: #f8fafc;
  --card: #020817;
  --card-foreground: #f8fafc;
  --popover: #020817;
  --popover-foreground: #f8fafc;
  --primary: #003341;
  --primary-foreground: #f8fafc;
  --secondary: #1e293b;
  --secondary-foreground: #f8fafc;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --accent: #1e293b;
  --accent-foreground: #f8fafc;
  --destructive: #7f1d1d;
  --destructive-foreground: #f8fafc;
  --success: #1e293b;
  --success-foreground: #020817;
  --warning: #fbbf24;
  --warning-foreground: #020817;
  --border: #1e293b;
  --input: #1e293b;
  --ring: #003341;
  
  /* Chart Colors - Dark Mode */
  --chart-1: #17c4c1;
  --chart-2: #7590eb;
  --chart-3: #eec677;
  --chart-4: #a774c3;
  --chart-5: #f99e4e;
  
  /* Sidebar Colors - Dark Mode */
  --sidebar: #1e293b;
  --sidebar-foreground: #f8fafc;
  --sidebar-primary: #003341;
  --sidebar-primary-foreground: #f8fafc;
  --sidebar-accent: #1e293b;
  --sidebar-accent-foreground: #f8fafc;
  --sidebar-border: #1e293b;
  --sidebar-ring: #003341;
  
  /* Typography remains the same */
  --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  
  /* Border radius remains the same */
  --radius: 0.5rem;
  
  /* Shadows remain the same */
  --shadow-x: 0;
  --shadow-y: 0;
  --shadow-blur: 0;
  --shadow-spread: 0;
  --shadow-opacity: 0;
  --shadow-color: 0 0 0 0;
  --shadow-2xs: 0 0 0 0 hsl(0 0 0 0 / 0.00);
  --shadow-xs: 0 0 0 0 hsl(0 0 0 0 / 0.00);
  --border: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 1px 2px -1px hsl(0 0 0 0 / 0.00);
  --shadow: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 1px 2px -1px hsl(0 0 0 0 / 0.00);
  --shadow-md: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 2px 4px -1px hsl(0 0 0 0 / 0.00);
  --shadow-lg: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 4px 6px -1px hsl(0 0 0 0 / 0.00);
  --shadow-xl: 0 0 0 0 hsl(0 0 0 0 / 0.00), 0 8px 10px -1px hsl(0 0 0 0 / 0.00);
  --shadow-2xl: 0 0 0 0 hsl(0 0 0 0 / 0.00);
}

/* ============================================
   THEME INLINE UTILITIES
   ============================================ */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);

  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
  --font-serif: var(--font-serif);

  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --shadow-2xs: var(--shadow-2xs);
  --shadow-xs: var(--shadow-xs);
  --border: var(--border);
  --shadow: var(--shadow);
  --shadow-md: var(--shadow-md);
  --shadow-lg: var(--shadow-lg);
  --shadow-xl: var(--shadow-xl);
  --shadow-2xl: var(--shadow-2xl);

  --tracking-tighter: calc(var(--tracking-normal) - 0.05em);
  --tracking-tight: calc(var(--tracking-normal) - 0.025em);
  --tracking-normal: var(--tracking-normal);
  --tracking-wide: calc(var(--tracking-normal) + 0.025em);
  --tracking-wider: calc(var(--tracking-normal) + 0.05em);
  --tracking-widest: calc(var(--tracking-normal) + 0.1em);
}

/* ============================================
   BODY TYPOGRAPHY
   ============================================ */
body {
  letter-spacing: var(--tracking-normal);
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
}

/* ============================================
   LEGACY COMPATIBILITY MAPPINGS
   ============================================ */
:root {
  /* Map new variables to legacy variable names for backward compatibility */
  --base-color: var(--primary);
  --base-color-rgb: 0, 51, 65;
  --heading-color: var(--foreground);
  --body-color-light: var(--muted-foreground);
  --border-color-light: var(--border);
  --card-bg: var(--card);
  --sidebar-bg: var(--sidebar);
}

