/* ============================================
   PharmaERP Design System - CSS Variables
   Fresh Lemon & Green Theme v5.0
   ============================================ */

:root {
  /* ═══════════════════════════════════════
     COLOR PALETTE
     ═══════════════════════════════════════ */
  
  /* Primary - Fresh Emerald Green */
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-300: #86efac;
  --primary-400: #4ade80;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-800: #166534;
  --primary-900: #14532d;
  --primary: #16a34a;
  --primary-light: #22c55e;
  --primary-dark: #15803d;
  --primary-gradient: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  --primary-gradient-vivid: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);

  /* Accent - Warm Golden Amber */
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;
  --accent-800: #92400e;
  --accent-900: #78350f;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --accent-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

  /* Success - Emerald */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-200: #a7f3d0;
  --success-300: #6ee7b7;
  --success-400: #34d399;
  --success-500: #10b981;
  --success-600: #059669;
  --success-700: #047857;
  --success-800: #065f46;
  --success-900: #064e3b;
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);

  /* Warning - Amber/Orange */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-200: #fde68a;
  --warning-300: #fcd34d;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;
  --warning-800: #92400e;
  --warning-900: #78350f;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --warning-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

  /* Danger - Rose/Red */
  --danger-50: #fff1f2;
  --danger-100: #ffe4e6;
  --danger-200: #fecdd3;
  --danger-300: #fda4af;
  --danger-400: #fb7185;
  --danger-500: #f43f5e;
  --danger-600: #e11d48;
  --danger-700: #be123c;
  --danger-800: #9f1239;
  --danger-900: #881337;
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);

  /* Info - Sky Blue */
  --info-50: #f0f9ff;
  --info-100: #e0f2fe;
  --info-200: #bae6fd;
  --info-300: #7dd3fc;
  --info-400: #38bdf8;
  --info-500: #0ea5e9;
  --info-600: #0284c7;
  --info-700: #0369a1;
  --info-800: #075985;
  --info-900: #0c4a6e;
  --info: #0ea5e9;
  --info-light: #38bdf8;
  --info-dark: #0284c7;
  --info-gradient: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);

  /* Purple - for special elements */
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --purple-800: #6b21a8;
  --purple-900: #581c87;
  --purple: #a855f7;
  --purple-gradient: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);

  /* Pink - for highlights */
  --pink-50: #fdf2f8;
  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;
  --pink-300: #f9a8d4;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --pink-700: #be185d;
  --pink-800: #9d174d;
  --pink-900: #831843;
  --pink: #ec4899;
  --pink-gradient: linear-gradient(135deg, #db2777 0%, #ec4899 100%);

  /* Orange - extra vibrancy */
  --orange: #f97316;
  --orange-light: #fb923c;
  --orange-dark: #ea580c;
  --orange-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);

  /* Teal - Bright & Fresh */
  --teal: #14b8a6;
  --teal-light: #2dd4bf;
  --teal-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);

  /* Neutrals - Cool Gray */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* ═══════════════════════════════════════
     GRADIENT LIBRARY
     ═══════════════════════════════════════ */
  --gradient-royal: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  --gradient-sunset: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --gradient-ocean: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  --gradient-forest: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  --gradient-fire: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --gradient-berry: linear-gradient(135deg, #65a30d 0%, #84cc16 100%);
  --gradient-midnight: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
  --gradient-aurora: linear-gradient(135deg, #16a34a 0%, #84cc16 50%, #fbbf24 100%);
  --gradient-tropical: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  --gradient-candy: linear-gradient(135deg, #f59e0b 0%, #facc15 100%);
  --gradient-page-bg: linear-gradient(180deg, #fffef5 0%, #fefce8 50%, #fef9c3 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  --gradient-sidebar: linear-gradient(180deg, #fefce8 0%, #fef9c3 40%, #fde68a 100%);
  --gradient-header: linear-gradient(90deg, rgba(250,204,21,0.04) 0%, rgba(163,230,53,0.03) 100%);
  --gradient-table-header: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);

  /* ═══════════════════════════════════════
     SEMANTIC COLORS
     ═══════════════════════════════════════ */
  
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-page: var(--gradient-page-bg);
  --bg-sidebar: var(--gradient-sidebar);
  --bg-sidebar-flat: #fefce8;
  --bg-sidebar-hover: rgba(22,163,74,0.08);
  --bg-sidebar-active: rgba(22,163,74,0.12);
  --bg-header: #ffffff;
  --bg-input: #ffffff;
  --bg-modal-overlay: rgba(15, 23, 42, 0.5);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-disabled: #cbd5e1;
  --text-inverse: #ffffff;
  --text-sidebar: #5c6b4f;
  --text-sidebar-active: #15803d;
  --text-link: #16a34a;
  --text-link-hover: #15803d;

  /* Borders */
  --border-light: #e2e8f0;
  --border-color: #cbd5e1;
  --border-dark: #94a3b8;
  --border-focus: #16a34a;
  --border-error: #ef4444;
  --border-success: #10b981;
  --border-gradient: linear-gradient(135deg, #16a34a, #22c55e, #a3e635);

  /* ═══════════════════════════════════════
     TYPOGRAPHY
     ═══════════════════════════════════════ */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.25rem;
  --text-3xl: 1.5rem;
  --text-4xl: 1.875rem;
  --text-5xl: 2.25rem;

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ═══════════════════════════════════════
     SPACING
     ═══════════════════════════════════════ */
  --space-0: 0;
  --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;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ═══════════════════════════════════════
     LAYOUT
     ═══════════════════════════════════════ */
  --sidebar-width: 268px;
  --sidebar-collapsed: 72px;
  --header-height: 66px;
  --page-padding: 20px;
  --container-max: 100%;

  /* ═══════════════════════════════════════
     BORDER RADIUS
     ═══════════════════════════════════════ */
  --radius-none: 0;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl: 18px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ═══════════════════════════════════════
     SHADOWS - Enhanced with color tints
     ═══════════════════════════════════════ */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 4px 15px 0 rgba(22, 163, 74, 0.25), 0 2px 6px rgba(22, 163, 74, 0.12);
  --shadow-primary-lg: 0 8px 25px rgba(22, 163, 74, 0.3), 0 4px 10px rgba(22, 163, 74, 0.15);
  --shadow-success: 0 4px 15px 0 rgba(16, 185, 129, 0.3);
  --shadow-danger: 0 4px 15px 0 rgba(239, 68, 68, 0.3);
  --shadow-warning: 0 4px 15px 0 rgba(245, 158, 11, 0.3);
  --shadow-info: 0 4px 15px 0 rgba(14, 165, 233, 0.3);
  --shadow-purple: 0 4px 15px 0 rgba(139, 92, 246, 0.3);
  --shadow-pink: 0 4px 15px 0 rgba(236, 72, 153, 0.3);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(22,163,74,0.06);
  --shadow-card-hover: 0 8px 24px rgba(22,163,74,0.12), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-card-colored: 0 2px 12px rgba(22,163,74,0.1), 0 1px 3px rgba(0,0,0,0.03);
  --shadow-dropdown: 0 4px 6px -2px rgba(0,0,0,0.04), 0 12px 24px -3px rgba(22,163,74,0.12);
  --shadow-glow-primary: 0 0 20px rgba(22,163,74,0.2);
  --shadow-glow-success: 0 0 20px rgba(16,185,129,0.2);
  --shadow-glow-danger: 0 0 20px rgba(239,68,68,0.2);

  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-bg-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);

  /* ═══════════════════════════════════════
     TRANSITIONS
     ═══════════════════════════════════════ */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;

  /* ═══════════════════════════════════════
     Z-INDEX
     ═══════════════════════════════════════ */
  --z-negative: -1;
  --z-base: 0;
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-header: 200;
  --z-sidebar: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
  --z-max: 9999;

  /* ═══════════════════════════════════════
     COMPONENT SPECIFIC
     ═══════════════════════════════════════ */
  
  /* Inputs */
  --input-height: 42px;
  --input-height-sm: 34px;
  --input-height-lg: 50px;
  --input-padding-x: 14px;
  --input-border-width: 1.5px;

  /* Buttons */
  --btn-height: 42px;
  --btn-height-sm: 34px;
  --btn-height-lg: 50px;
  --btn-padding-x: 20px;
  --btn-font-weight: 600;

  /* Cards */
  --card-padding: 24px;
  --card-border-radius: var(--radius-xl);

  /* Tables */
  --table-cell-padding: 14px 18px;
  --table-header-bg: var(--gradient-table-header);
  --table-row-hover: rgba(22,163,74,0.04);
  --table-border: var(--border-light);
  --table-stripe: rgba(22,163,74,0.02);

  /* Section Colors - Nature-inspired palette for form sections */
  --section-color-1: #16a34a;
  --section-color-2: #0d9488;
  --section-color-3: #65a30d;
  --section-color-4: #ca8a04;
  --section-color-5: #b45309;
  --section-color-6: #059669;
  --section-color-7: #0284c7;
  --section-color-8: #0d9488;
}

/* ═══════════════════════════════════════
   DARK MODE (optional)
   ═══════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-header: #1e293b;
    --bg-input: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-light: #334155;
    --border-color: #475569;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  }
}
