/* Google Fonts import: Outfit for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Tokens - Modern Dark Clinical Theme */
    --bg-primary: #0b0f19;        /* Deep midnight slate */
    --bg-secondary: #131b2e;      /* Dark navy card background */
    --bg-tertiary: #1e2942;       /* Slate border/hover background */
    --bg-glass: rgba(19, 27, 46, 0.7);
    --border-glass: rgba(255, 255, 255, 0.06);
    
    --text-primary: #f3f4f6;      /* Off-white */
    --text-secondary: #9ca3af;    /* Cool gray */
    --text-muted: #6b7280;        /* Darker gray */
    
    /* Brand & State Colors */
    --color-brand: #0ea5e9;       /* Clinical Cyan / Electric Blue */
    --color-brand-rgb: 14, 165, 233;
    
    /* CTCAE / Triage Priority Colors */
    --color-red: #ef4444;         /* Diagnostic Crimson (Red Priority) */
    --color-red-rgb: 239, 68, 68;
    
    --color-yellow: #f59e0b;      /* Caution Amber (Yellow Priority) */
    --color-yellow-rgb: 245, 158, 11;
    
    --color-green: #10b981;       /* Healthy Emerald (Green Priority) */
    --color-green-rgb: 16, 185, 129;
    
    --color-purple: #8b5cf6;      /* Chemotherapy / Hardware Purple */
    --color-purple-rgb: 139, 92, 246;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout & UI Parameters */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    
    --glow-red: 0 0 20px rgba(239, 68, 68, 0.3);
    --glow-yellow: 0 0 20px rgba(245, 158, 11, 0.25);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.2);
    --glow-brand: 0 0 20px rgba(14, 165, 233, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides for flexibility/accessibility */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(0, 0, 0, 0.05);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
    
    --glow-red: 0 0 15px rgba(239, 68, 68, 0.15);
    --glow-yellow: 0 0 15px rgba(245, 158, 11, 0.15);
    --glow-green: 0 0 15px rgba(16, 185, 129, 0.12);
    --glow-brand: 0 0 15px rgba(14, 165, 233, 0.15);
}

/* Universal Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow: hidden; /* Lock scroll, dashboard uses inner scrolling */
    height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Modern Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
