/* YouSolar Design System Variables */
/* Based on yousolar.com brand guidelines */

:root {
  /* ============================================
     BRAND COLORS - YouSolar Identity
     ============================================ */
  
  /* Primary Brand Red */
  --yousolar-red: #E31B23;
  --yousolar-red-dark: #B81419;
  --yousolar-red-light: #FF3D44;
  --yousolar-red-alpha-10: rgba(227, 27, 35, 0.1);
  --yousolar-red-alpha-20: rgba(227, 27, 35, 0.2);
  
  /* Neutral Palette */
  --gray-900: #1A1A1A;
  --gray-800: #2D2D2D;
  --gray-700: #404040;
  --gray-600: #525252;
  --gray-500: #6B6B6B;
  --gray-400: #8F8F8F;
  --gray-300: #B3B3B3;
  --gray-200: #D6D6D6;
  --gray-100: #EBEBEB;
  --gray-50: #F5F5F5;
  --white: #FFFFFF;
  
  /* ============================================
     SEMANTIC COLORS - Status & Feedback
     ============================================ */
  
  /* Status Indicators */
  --status-online: #22C55E;
  --status-online-bg: rgba(34, 197, 94, 0.15);
  --status-warning: #F59E0B;
  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-error: #EF4444;
  --status-error-bg: rgba(239, 68, 68, 0.15);
  --status-offline: #6B7280;
  --status-offline-bg: rgba(107, 114, 128, 0.15);
  
  /* Battery Level Colors */
  --battery-full: #22C55E;      /* 80-100% */
  --battery-good: #84CC16;      /* 60-80% */
  --battery-medium: #F59E0B;    /* 40-60% */
  --battery-low: #F97316;       /* 20-40% */
  --battery-critical: #EF4444;  /* 0-20% */
  
  /* Chart Colors - Accessible palette */
  --chart-1: #E31B23;  /* YouSolar Red */
  --chart-2: #2563EB;  /* Blue */
  --chart-3: #16A34A;  /* Green */
  --chart-4: #9333EA;  /* Purple */
  --chart-5: #EA580C;  /* Orange */
  --chart-6: #0891B2;  /* Cyan */
  --chart-7: #CA8A04;  /* Yellow */
  --chart-8: #DB2777;  /* Pink */
  
  /* ============================================
     THEME COLORS - Light Mode (Default)
     ============================================ */
  
  --bg-primary: var(--white);
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-card: var(--white);
  --bg-card-hover: var(--gray-50);
  
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --text-inverse: var(--white);
  
  --border-color: var(--gray-200);
  --border-color-strong: var(--gray-300);
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Aliases for compatibility */
  --surface: var(--bg-secondary);
  --card-bg: var(--bg-card);
  --border: var(--border-color);
  --border-light: var(--border-color);
  
  /* ============================================
     TYPOGRAPHY
     ============================================ */
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* ============================================
     SPACING
     ============================================ */
  
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  
  /* ============================================
     BORDERS & RADIUS
     ============================================ */
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
  
  /* ============================================
     TRANSITIONS
     ============================================ */
  
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* ============================================
     Z-INDEX SCALE
     ============================================ */
  
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-tooltip: 500;
  --z-toast: 600;
}

/* ============================================
   DARK MODE THEME
   ============================================ */

[data-theme="dark"] {
  --bg-primary: var(--gray-900);
  --bg-secondary: var(--gray-800);
  --bg-tertiary: var(--gray-700);
  --bg-card: var(--gray-800);
  --bg-card-hover: var(--gray-700);
  
  --text-primary: var(--gray-50);
  --text-secondary: var(--gray-300);
  --text-tertiary: var(--gray-400);
  
  --border-color: var(--gray-700);
  --border-color-strong: var(--gray-600);
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  
  /* Aliases for compatibility */
  --surface: var(--bg-secondary);
  --card-bg: var(--bg-card);
  --border: var(--border-color);
  --border-light: var(--gray-600);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --bg-tertiary: var(--gray-700);
    --bg-card: var(--gray-800);
    --bg-card-hover: var(--gray-700);
    
    --text-primary: var(--gray-50);
    --text-secondary: var(--gray-300);
    --text-tertiary: var(--gray-400);
    
    --border-color: var(--gray-700);
    --border-color-strong: var(--gray-600);
  }
}

