/**
 * Lab Flow Pro — design system (single source of truth for UI)
 *
 * ─── Frontend module map (aligns with sidebar / URLs) ───
 * 1. Core / Dashboard     → core app, /app/
 * 2. Patients             → /patients/
 * 3. Tests & parameters   → /tests/
 * 4. Reports              → /reports/
 * 5. Payments             → /payments/
 * 6. Billing              → /billing/
 * 7. Doctors              → /doctors/
 * 8. Panels               → /panels/
 * 9. Lab configuration    → /labs/
 * 10. Accounts / users    → /accounts/
 * 11. Operations          → /ops/
 * 12. Superuser console   → /system/
 * 13. Auth (login/signup) → unauthenticated shell
 *
 * Sections below are labeled with these numbers where relevant.
 */

:root {
    /* ── 0. Global tokens — light clinical LIS (paper-white + lab blue + calm teal) ── */
    --color-primary-rgb: 20, 93, 160;
    /* Canvas — soft cool gray page (reduces glare vs pure white) */
    --color-bg-base: #e8eef5;
    --color-bg-elevated: #ffffff;
    --color-bg-surface: #ffffff;
    --color-bg-surface-hover: #f1f5f9;
    --mesh-1: rgba(var(--color-primary-rgb), 0.12);
    --mesh-2: rgba(14, 165, 233, 0.1);
    --mesh-3: rgba(13, 148, 136, 0.06);

    /* Text — WCAG-friendly on light surfaces */
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-tertiary: #64748b;

    /*
     * Project brand (global) — primary buttons, links, default focus rings.
     * Do not override on body.module-* ; use --module-accent for module chrome.
     */
    --color-primary: #145da0;
    --color-primary-dark: #0f487f;
    --color-primary-hover: #1a6fb8;
    /* Secondary brand accent (rare); module UI uses --module-accent in 37-module-themes.css */
    --color-accent: #0d8a9a;
    --color-success: #15803d;
    --color-warning: #b45309;
    --color-danger: #c2410c;
    --color-info: #0369a1;

    /* Lines */
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;

    /* Radius & space (8px grid) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;

    /* Type */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.9375rem;
    --text-lg: 1.0625rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.75rem;
    --leading-tight: 1.25;
    --leading-normal: 1.5;

    /* Elevation — soft slate (readable, not heavy) */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.09);
    --shadow-glow: 0 0 0 1px rgba(var(--color-primary-rgb), 0.12), 0 12px 32px rgba(var(--color-primary-rgb), 0.08);

    /* Layout */
    --sidebar-width: 268px;
    --sidebar-width-collapsed: 72px;
    --topbar-height: auto;
    --content-max: 1280px;
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg-base);
    background-image:
        radial-gradient(ellipse 120% 80% at 0% -20%, var(--mesh-1), transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 0%, var(--mesh-2), transparent 45%),
        radial-gradient(ellipse 60% 40% at 50% 100%, var(--mesh-3), transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

