/* src/public/css/style.css */

/* ============================================
   ENHANCED PROFESSIONAL STYLESHEET
   Medical Dashboard & Application Styles
   ============================================ */

/* --- CSS Variables for Theming --- */
/* =================================================================
   FULL THEME DEFINITIONS
   (Each theme contains a complete set of variables)
   ================================================================= */

/* --- 1. DEFAULT THEME (Teal) --- */
:root, [data-theme="default"] {
  /* Primary Colors (Teal) */
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-200: #99f6e4;
  --primary-300: #5eead4;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --primary-800: #115e59;
  --primary-900: #134e4a;

  /* Accent Colors */
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors (Slate) */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(20, 184, 166, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 2. TRUST BLUE THEME --- */
[data-theme="blue"] {
  /* Primary Colors (Blue) */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Accent Colors */
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors (Same as Default) */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry (Same as Default) */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(59, 130, 246, 0.3); /* Blue Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 3. WELLNESS GREEN THEME --- */
[data-theme="green"] {
  /* Primary Colors (Emerald) */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  /* Accent Colors */
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(16, 185, 129, 0.3); /* Green Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 4. ESTHETIC PURPLE THEME --- */
[data-theme="purple"] {
  /* Primary Colors (Violet) */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  /* Accent Colors */
  --accent-500: #d946ef; /* Magenta for purple theme */
  --accent-600: #c026d3;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(139, 92, 246, 0.3); /* Purple Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 5. Red THEME --- */
[data-theme="red"] {
  /* Primary Colors (Rose) */
  --primary-50: #fff1f2;
  --primary-100: #ffe4e6;
  --primary-200: #fecdd3;
  --primary-300: #fda4af;
  --primary-400: #fb7185;
  --primary-500: #f43f5e;
  --primary-600: #e11d48;
  --primary-700: #be123c;
  --primary-800: #9f1239;
  --primary-900: #881337;

  /* Accent Colors */
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors (Standard Light) */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(244, 63, 94, 0.3); /* Rose Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 6. TRUE PINK THEME --- */
[data-theme="pink"] {
  /* Primary Colors (Fuchsia/Pink) */
  --primary-50: #fdf4ff;
  --primary-100: #fae8ff;
  --primary-200: #f5d0fe;
  --primary-300: #f0abfc;
  --primary-400: #e879f9;
  --primary-500: #d946ef; /* Main Pink Color */
  --primary-600: #c026d3; /* Hover Color */
  --primary-700: #a21caf;
  --primary-800: #86198f;
  --primary-900: #701a75;

  /* Accent Colors */
  --accent-500: #6366f1; /* Indigo to contrast with pink */
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors (Standard Light) */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(217, 70, 239, 0.3); /* Pink Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 7. ROSE THEME (Standard Pink) --- */
[data-theme="rose"] {
  /* Primary Colors (Soft Rose) */
  --primary-50: #fdf2f8;
  --primary-100: #fce7f3;
  --primary-200: #fbcfe8;
  --primary-300: #f9a8d4;
  --primary-400: #f472b6;
  --primary-500: #ec4899; /* Classic Rose/Pink */
  --primary-600: #db2777; /* Hover Color */
  --primary-700: #be185d;
  --primary-800: #9d174d;
  --primary-900: #831843;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(236, 72, 153, 0.3); /* Rose Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 8. HOT PINK THEME (Vibrant) --- */
[data-theme="hotpink"] {
  /* Primary Colors (Vibrant Hot Pink) */
  --primary-50: #fff0f5;
  --primary-100: #ffdee9;
  --primary-200: #ffc0d9;
  --primary-300: #ff90c0;
  --primary-400: #ff50a0;
  --primary-500: #ff0080; /* Hot Pink الرئيسية */
  --primary-600: #d6006b;
  --primary-700: #b00058;
  --primary-800: #8a0045;
  --primary-900: #680034;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(255, 0, 128, 0.3); /* Hot Pink Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 9. VIBRANT PINK THEME (#FF1D8D) --- */
[data-theme="vibrant"] {
  /* Primary Colors (Custom #FF1D8D) */
  --primary-50: #fff0f7;
  --primary-100: #ffe3f1;
  --primary-200: #ffc7e3;
  --primary-300: #ff9bd0;
  --primary-400: #ff64b6;
  --primary-500: #ff1d8d; /* اللون الأساسي */
  --primary-600: #e30e73; /* لون التحويم (Hover) */
  --primary-700: #c2065e;
  --primary-800: #9f0850;
  --primary-900: #850b46;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutral Colors */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(255, 29, 141, 0.3); /* Vibrant Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 10. CERULEAN THEME (Deep Sky Blue) --- */
[data-theme="cerulean"] {
  /* Primary Colors (#007BA7) */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #007ba7; /* Base */
  --primary-600: #006185;
  --primary-700: #004d69;
  --primary-800: #003a4f;
  --primary-900: #002533;

  /* Accent Colors */
  --accent-500: #f59e0b; /* Amber to contrast blue */
  --accent-600: #d97706;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(0, 123, 167, 0.3); /* Cerulean Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 11. EMERALD THEME (Vibrant Green) --- */
[data-theme="emerald"] {
  /* Primary Colors (#50C878) */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #50c878; /* Base */
  --primary-600: #3da862;
  --primary-700: #2f854d;
  --primary-800: #236339;
  --primary-900: #164024;

  /* Accent Colors */
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(80, 200, 120, 0.3); /* Emerald Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 12. RUBY THEME (Rich Red/Pink) --- */
[data-theme="ruby"] {
  /* Primary Colors (#E0115F) */
  --primary-50: #fff1f2;
  --primary-100: #ffe4e6;
  --primary-200: #fecdd3;
  --primary-300: #fda4af;
  --primary-400: #fb7185;
  --primary-500: #e0115f; /* Base */
  --primary-600: #be0e4f;
  --primary-700: #9f0b42;
  --primary-800: #800734;
  --primary-900: #630428;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(224, 17, 95, 0.3); /* Ruby Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 13. VIOLET THEME (Strong Purple) --- */
[data-theme="violet"] {
  /* Primary Colors (#7F00FF) */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #7f00ff; /* Base */
  --primary-600: #6b00d9;
  --primary-700: #5800b3;
  --primary-800: #45008c;
  --primary-900: #330066;

  /* Accent Colors */
  --accent-500: #d946ef;
  --accent-600: #c026d3;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(127, 0, 255, 0.3); /* Violet Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 14. CORAL THEME (Warm Orange/Pink) --- */
[data-theme="coral"] {
  /* Primary Colors (#FF8559) */
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-300: #fdba74;
  --primary-400: #fb923c;
  --primary-500: #ff8559; /* Base */
  --primary-600: #e66a40;
  --primary-700: #cc5229;
  --primary-800: #b33d17;
  --primary-900: #7c2d12;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(255, 133, 89, 0.3); /* Coral Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 15. STEEL THEME (Professional Blue-Grey) --- */
[data-theme="steel"] {
  /* Primary Colors (#4682B4) */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #4682b4; /* Base */
  --primary-600: #36648b;
  --primary-700: #294b69;
  --primary-800: #1d354a;
  --primary-900: #122230;

  /* Accent Colors */
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(70, 130, 180, 0.3); /* Steel Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 16. SLATE THEME (Cool Gray) --- */
[data-theme="slate"] {
  /* Primary Colors (#6D8196) */
  --primary-50: #f8fafc;
  --primary-100: #f1f5f9;
  --primary-200: #e2e8f0;
  --primary-300: #cbd5e1;
  --primary-400: #94a3b8;
  --primary-500: #6d8196; /* Base */
  --primary-600: #54667a;
  --primary-700: #404f5e;
  --primary-800: #2d3843;
  --primary-900: #1b2229;

  /* Accent Colors */
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(109, 129, 150, 0.3); /* Slate Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* --- 17. GOLD THEME (Warm Yellow/Gold) --- */
[data-theme="gold"] {
  /* Primary Colors (#EFBF04) */
  --primary-50: #fefce8;
  --primary-100: #fef9c3;
  --primary-200: #fef08a;
  --primary-300: #fde047;
  --primary-400: #facc15;
  --primary-500: #efbf04; /* Base */
  --primary-600: #ca9f00;
  --primary-700: #a17b00;
  --primary-800: #856200;
  --primary-900: #714e00;

  /* Accent Colors - Blue provides best contrast with Gold */
  --accent-500: #2563eb;
  --accent-600: #1d4ed8;
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;

  /* Neutrals */
  --gray-50: #f8f9fa;
  --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;

  /* Semantic Colors */
  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Spacing & Geometry */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(239, 191, 4, 0.3); /* Gold Glow */

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}
/* --- 18. BURGUNDY THEME (Deep Wine Red) --- */
[data-theme="burgundy"] {
  /* Primary Colors (#660033) */
  --primary-50: #fdf2f6;
  --primary-100: #fce7ef;
  --primary-200: #fad0e0;
  --primary-300: #f5aaca;
  --primary-400: #ec74a5;
  --primary-500: #660033; /* Base */
  --primary-600: #57002b;
  --primary-700: #470023;
  --primary-800: #38001c;
  --primary-900: #290014;

  /* Accent & Neutrals */
  --accent-500: #d97706;
  --accent-600: #b45309;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa;
  --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;

  --page-bg: var(--gray-50);
  --card-bg: #ffffff;
  --text-main: var(--gray-800);
  --text-muted: var(--gray-500);

  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(102, 0, 51, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 19. FOREST THEME (Deep Natural Green) --- */
[data-theme="forest"] {
  /* Primary Colors (#2E6F40) */
  --primary-50: #f2fbf5;
  --primary-100: #e1f6e8;
  --primary-200: #c2ead0;
  --primary-300: #93d6ad;
  --primary-400: #5cb884;
  --primary-500: #2e6f40; /* Base */
  --primary-600: #245a33;
  --primary-700: #1d4729;
  --primary-800: #173620;
  --primary-900: #0f2416;

  /* Accent & Neutrals */
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(46, 111, 64, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 20. COBALT THEME (Strong Corporate Blue) --- */
[data-theme="cobalt"] {
  /* Primary Colors (#0047AB) */
  --primary-50: #eff4ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #0047ab; /* Base */
  --primary-600: #003a8c;
  --primary-700: #002e70;
  --primary-800: #002354;
  --primary-900: #001738;

  /* Accent & Neutrals */
  --accent-500: #fbbf24;
  --accent-600: #f59e0b;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(0, 71, 171, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 21. MOCHA THEME (Warm Coffee Brown) --- */
[data-theme="mocha"] {
  /* Primary Colors (#6D3B07) */
  --primary-50: #fdf8f6;
  --primary-100: #f2e8e5;
  --primary-200: #eaddd7;
  --primary-300: #d0b7a8;
  --primary-400: #a98066;
  --primary-500: #6d3b07; /* Base */
  --primary-600: #5a3106;
  --primary-700: #482705;
  --primary-800: #361d04;
  --primary-900: #241302;

  /* Accent & Neutrals */
  --accent-500: #3b82f6;
  --accent-600: #2563eb;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(109, 59, 7, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 22. OLIVE THEME (Earthy Green) --- */
[data-theme="olive"] {
  /* Primary Colors (#636B2F) */
  --primary-50: #f7f9f3;
  --primary-100: #eef2e3;
  --primary-200: #dce5c2;
  --primary-300: #c2d192;
  --primary-400: #a3b85d;
  --primary-500: #636b2f; /* Base */
  --primary-600: #515826;
  --primary-700: #3e441d;
  --primary-800: #2c3015;
  --primary-900: #191c0c;

  /* Accent & Neutrals */
  --accent-500: #d97706;
  --accent-600: #b45309;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(99, 107, 47, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 23. PLUM THEME (Deep Purple) --- */
[data-theme="plum"] {
  /* Primary Colors (#8E4585) */
  --primary-50: #fbf5fa;
  --primary-100: #f6eaf3;
  --primary-200: #ecd5e6;
  --primary-300: #deb5d4;
  --primary-400: #c98abd;
  --primary-500: #8e4585; /* Base */
  --primary-600: #73386b;
  --primary-700: #592b53;
  --primary-800: #3f1e3b;
  --primary-900: #251222;

  /* Accent & Neutrals */
  --accent-500: #f43f5e;
  --accent-600: #e11d48;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(142, 69, 133, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 24. PUMPKIN THEME (Vibrant Orange) --- */
[data-theme="pumpkin"] {
  /* Primary Colors (#FF7518) */
  --primary-50: #fff5eb;
  --primary-100: #ffe8d1;
  --primary-200: #ffcf9e;
  --primary-300: #ffb066;
  --primary-400: #ff8c2e;
  --primary-500: #ff7518; /* Base */
  --primary-600: #cc5e13;
  --primary-700: #99460e;
  --primary-800: #662f0a;
  --primary-900: #331705;

  /* Accent & Neutrals */
  --accent-500: #2563eb;
  --accent-600: #1d4ed8;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(255, 117, 24, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}

/* --- 25. ONYX THEME (Deep Black/Gray) --- */
[data-theme="onyx"] {
  /* Primary Colors (#353839) */
  --primary-50: #f6f6f7;
  --primary-100: #e8e9ea;
  --primary-200: #d1d4d5;
  --primary-300: #b0b4b6;
  --primary-400: #858a8d;
  --primary-500: #353839; /* Base */
  --primary-600: #2b2d2e;
  --primary-700: #212324;
  --primary-800: #17191a;
  --primary-900: #0d0e0f;

  /* Accent & Neutrals */
  --accent-500: #d946ef;
  --accent-600: #c026d3;
  --success-500: #10b981;
  --warning-500: #f59e0b;
  --danger-500: #ef4444;
  --gray-50: #f8f9fa; --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;
  --page-bg: var(--gray-50); --card-bg: #ffffff; --text-main: var(--gray-800); --text-muted: var(--gray-500);
  
  /* Geometry */
  --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(53, 56, 57, 0.3);
  --transition-fast: 150ms ease; --transition-base: 300ms ease; --transition-slow: 500ms ease;
}
/* ============================================
   RESET & BASE STYLES
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-500), var(--primary-700));
  border-radius: 10px;
  border: 2px solid var(--gray-100);
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-600), var(--primary-800));
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-500) var(--gray-100);
}

/* ============================================
   SIDEBAR & LAYOUT
   ============================================ */

#sidebar {
  width: 17rem; /* Slightly wider for better readability */
  transition: 
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #0f172a; /* Slate 900 */
  border-right: 1px solid #1e293b;
}

/* Collapsed State (Desktop) */
#sidebar.sidebar-collapsed {
  width: 5rem;
}

/* Main Content Adjustment */
#main-content {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
  #main-content.sidebar-collapsed {
    margin-left: 5rem; /* Match collapsed width */
  }
}

/* Hide Text in Collapsed Mode */
#sidebar.sidebar-collapsed .sidebar-text {
  opacity: 0;
  width: 0;
  display: none;
}

#sidebar.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* Tooltips for Collapsed Mode */
.nav-tooltip {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background-color: #0f172a;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Show tooltip only when sidebar is collapsed and user hovers */
#sidebar.sidebar-collapsed .group:hover .nav-tooltip {
  display: block;
  opacity: 1;
}

/* Mobile Overlay */
#sidebar-overlay {
  backdrop-filter: blur(2px);
}

/* Active Navigation State refinement */
.nav-item.active {
  background: linear-gradient(90deg, var(--primary-600), var(--primary-700));
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3); /* Teal shadow */
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-700);
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-link {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left var(--transition-base);
}

.nav-link:hover::before {
  left: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 20px rgba(15, 118, 110, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  border: 1px solid rgba(224, 242, 241, 0.8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 32px rgba(15, 118, 110, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-200);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--primary-100);
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  border-radius: 2px;
}

.card-header i {
  font-size: 1.75rem;
  color: var(--primary-700);
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.15);
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-700);
  margin: 0;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ACTION CARDS & BUTTONS
   ============================================ */

.action-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

.action-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 40px -5px rgba(0, 0, 0, 0.15);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.action-btn i {
  font-size: 1.5rem;
  transition: transform var(--transition-base);
}

.action-btn:hover i {
  transform: scale(1.1) rotate(5deg);
}

.action-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-600) 0%, var(--success-500) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, var(--success-600) 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-500) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #6d28d9 0%, var(--accent-600) 100%);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================
   APPOINTMENTS & SCHEDULE
   ============================================ */

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.appointment-item {
  background: linear-gradient(135deg, var(--primary-50) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 2px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.appointment-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-700));
  transform: scaleY(0);
  transition: transform var(--transition-base);
  transform-origin: bottom;
}

.appointment-item:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.appointment-item:hover {
  border-color: var(--primary-500);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.15);
  transform: translateX(8px);
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
}

.appointment-time {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.125rem;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  position: relative;
  overflow: hidden;
}

.appointment-time::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.appointment-details {
  flex: 1;
}

.appointment-patient {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-700);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  position: relative;
}

.appointment-patient::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: width var(--transition-base);
}

.appointment-patient:hover::after {
  width: 100%;
}

.appointment-patient:hover {
  color: var(--primary-500);
  transform: translateX(4px);
}

.appointment-patient i {
  font-size: 1.4rem;
}

.appointment-doctor {
  color: var(--gray-600);
  font-size: 1rem;
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 500;
}

.appointment-doctor i {
  color: var(--primary-600);
  font-size: 1.1rem;
}

/* ============================================
   STATISTICS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: linear-gradient(135deg, white, var(--primary-50));
  border: 2px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
  transition: transform var(--transition-slow);
}

.stat-card:hover::before {
  transform: translate(-25%, -25%);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.2);
  border-color: var(--primary-500);
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--primary-600);
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  transition: transform var(--transition-base);
}

.stat-card:hover .stat-icon {
  transform: scale(1.2) rotate(5deg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-700);
  margin-bottom: var(--spacing-xs);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   FORMS
   ============================================ */

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--gray-700);
  font-size: 0.95rem;
}

.form-label-sm {
  font-size: 0.875rem;
}

.form-input,
.form-input-sm,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-base);
  background: white;
  color: var(--gray-800);
}

.form-input-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.form-input:focus,
.form-input-sm:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  background: var(--primary-50);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 500;
  border-left: 4px solid;
  animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-color: var(--success-500);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: var(--warning-500);
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: var(--danger-500);
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #3b82f6;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateX(400px);
  transition: transform var(--transition-base);
  z-index: 1000;
  border-left: 4px solid var(--primary-500);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
  animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-md);
  color: var(--gray-500);
}

.empty-state i {
  font-size: 5rem;
  color: var(--gray-300);
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-state p {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gray-600);
}

.empty-state a {
  display: inline-block;
  margin-top: var(--spacing-md);
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

.text-primary { color: var(--primary-700); }
.text-success { color: var(--success-600); }
.text-danger { color: var(--danger-500); }
.text-muted { color: var(--gray-500); }

/* ============================================
   BADGES & PILLS
   ============================================ */

.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-up {
  animation: slideUp 0.5s ease;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .dashboard-container {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .quick-actions {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .dashboard-container {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .card-header i {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .quick-actions {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .action-btn {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .appointment-item {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
  }

  .appointment-time {
    width: 100%;
    min-width: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-card {
    padding: var(--spacing-md);
  }

  .stat-icon {
    font-size: 2rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .appointment-patient {
    font-size: 1.125rem;
  }
  
  .action-btn {
    padding: 0.875rem 1rem;
  }
  
  .toast {
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-200) 0%,
    var(--gray-100) 50%,
    var(--gray-200) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
  color: white;
}

th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--primary-50);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   MODALS (if needed in future)
   ============================================ */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 1050;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
}

.modal.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: all;
}

.modal-header {
  padding: var(--spacing-xl);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-700);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: color var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.modal-body {
  padding: var(--spacing-xl);
}

.modal-footer {
  padding: var(--spacing-xl);
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 1000;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  display: block;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  transform: translateX(4px);
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress {
  height: 8px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
  border-radius: 999px;
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--gray-600);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.tab:hover {
  color: var(--primary-600);
  background: var(--primary-50);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-600);
}

/* ============================================
   TOOLTIPS
   ============================================ */

[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 1001;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--gray-900);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  margin-bottom: 8px;
}

[data-tooltip]::after {
  content: '';
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gray-900);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}
/* ... existing code ... */

/* ============================================
   ACTION CARDS & BUTTONS
   ============================================ */

/* ... existing .action-card styles ... */

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

/* ... existing .action-btn::before and .action-btn i styles ... */

/* --- General Button Styles --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Ensure content is centered */
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md); /* Consistent radius */
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent; /* Transparent border for layout consistency */
  text-decoration: none;
  line-height: 1.5; /* Ensure consistent line height */
}

.btn i {
  font-size: 1.25rem;
}

/* --- Primary Button (Teal) --- */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3); /* Teal shadow */
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

/* --- Secondary Button (Gray/Light) --- */
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--gray-900);
  border-color: var(--gray-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* --- Success Button (Green) --- */
.btn-success {
  background: linear-gradient(135deg, var(--success-600) 0%, var(--success-500) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3); /* Green shadow */
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, var(--success-600) 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

.btn-success:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* --- Accent Button (Purple) --- */
.btn-accent {
  background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-500) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); /* Purple shadow */
}

.btn-accent:hover {
  background: linear-gradient(135deg, #6d28d9 0%, var(--accent-600) 100%);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.btn-accent:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* --- Warning Button (Orange/Amber) --- */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); /* Amber shadow */
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.btn-warning:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* --- Danger Button (Red) --- */
.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); /* Red shadow */
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* --- Icon Buttons (Small, square-ish) --- */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  /* Default state for unstyled icon buttons */
  background: transparent; 
  color: var(--gray-500);
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-icon i {
  font-size: 1.25rem;
}

/* Specific Icon Button Variants (using your existing classes) */
.btn-view {
  background: var(--primary-50);
  color: var(--primary-700);
}
.btn-view:hover {
  background: var(--primary-100);
  transform: scale(1.05);
}

.btn-edit {
  background: #fef9c3; /* Yellow-50 */
  color: #854d0e;     /* Yellow-800 */
}
.btn-edit:hover {
  background: #fde68a; /* Yellow-200 */
  transform: scale(1.05);
}

.btn-delete {
  background: #fee2e2; /* Red-50 */
  color: #991b1b;      /* Red-800 */
}
.btn-delete:hover {
  background: #fecaca; /* Red-200 */
  transform: scale(1.05);
}

.btn-consult {
  background: var(--primary-600);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-consult:hover {
  background: var(--primary-700);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ... existing code ... */
/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  body {
    background: white;
  }
  
  .no-print,
  .action-btn,
  button,
  .nav-link {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid var(--gray-300);
    page-break-inside: avoid;
  }
  
  .appointment-item {
    page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 2px;
}
/* Find this existing class in your style section and update it */
.wall-of-text {
    height: 140px;
    overflow-y: scroll;
    padding: var(--space-md);
    font-family: 'Times New Roman', serif;
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.15;
    text-align: justify;
    background: #fff;
    transition: height 0.3s ease;

    /* --- ADD THESE LINES TO PREVENT HIGHLIGHTING --- */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
    cursor: not-allowed;       /* Optional: Shows a 'stop' cursor */
}
/* 🟢 Fix Action Column Cut-off */
td:last-child, th:last-child {
    white-space: nowrap !important; /* Prevents buttons from stacking */
    min-width: 140px;               /* Ensures enough space for buttons */
    width: 1%;                      /* shrink-to-fit logic */
}

/* Ensure Dropdowns in Action column are visible */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible; /* Allows dropdowns to spill out */
    padding-bottom: 100px; /* Extra space for dropdowns at bottom */
}