/* ==========================================================================
   DESIGN SYSTEM — TOKENS
   Hospital Management Admin Template
   All colors/spacing/type flow from these variables. Never hardcode a hex
   value or a raw px spacing/radius outside this file.
   ========================================================================== */

:root {
  /* ---- Brand & semantic colors (light theme, default) ---- */
  --color-primary-h: 193;              /* base hue for tints/shades if needed */
  --color-primary: #0E7C86;            /* deep clinical teal — trust, calm */
  --color-primary-rgb: 14, 124, 134;
  --color-primary-hover: #0B6871;
  --color-primary-active: #095760;
  --color-primary-soft: #E4F2F3;       /* tinted backgrounds, active nav item */
  --color-primary-soft-text: #0B5C64;
  /* Richer two-tone version of the primary, used only on a few high-visibility
     surfaces (primary buttons, sidebar mark) so the flat teal doesn't read
     as generic corporate blue — plain --color-primary still covers text,
     icons, borders, everywhere gradients don't make sense. */
  --color-primary-gradient: linear-gradient(135deg, #129099 0%, #0A5A63 100%);

  --color-secondary: #3E5C76;          /* slate navy — secondary actions */
  --color-secondary-rgb: 62, 92, 118;
  --color-secondary-hover: #33495E;
  --color-secondary-soft: #EAEEF2;

  --color-success: #2E9D6F;
  --color-success-rgb: 46, 157, 111;
  --color-success-soft: #E6F5EF;

  --color-warning: #C9821A;
  --color-warning-rgb: 201, 130, 26;
  --color-warning-soft: #FBF0DE;

  --color-danger: #C1443C;
  --color-danger-rgb: 193, 68, 60;
  --color-danger-soft: #FAE7E5;

  --color-info: #3B82A6;
  --color-info-rgb: 59, 130, 166;
  --color-info-soft: #E7F1F6;

  /* ---- Neutral / surface colors (light theme) ---- */
  --color-bg: #F5F7F8;                 /* app background */
  --color-surface: #FFFFFF;            /* topbar, sidebar */
  --color-card: #FFFFFF;               /* cards, panels */
  --color-card-alt: #F9FAFB;           /* subtle alt row / nested surface */
  --color-border: #E3E8EA;
  --color-border-strong: #CBD3D7;

  --color-text-primary: #1B2530;
  --color-text-secondary: #55636E;
  --color-text-muted: #8A97A0;
  --color-text-on-primary: #FFFFFF;

  /* ---- Typography ---- */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-h1: 1.75rem;    /* 28px */
  --fs-h2: 1.375rem;   /* 22px */
  --fs-h3: 1.125rem;   /* 18px */
  --fs-h4: 1rem;       /* 16px */
  --fs-body: 0.9375rem;/* 15px */
  --fs-small: 0.8125rem;/* 13px */
  --fs-label: 0.75rem; /* 12px */
  --fs-button: 0.875rem;/* 14px */
  --fs-table: 0.875rem;/* 14px */

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-heading: 1.25;
  --lh-body: 1.55;
  --lh-tight: 1.3;

  /* ---- Spacing scale (base 4px) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- Radius ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* ---- Shadows (used sparingly — elevation, not decoration) ---- */
  --shadow-card: 0 1px 2px rgba(20, 30, 35, 0.06), 0 1px 1px rgba(20, 30, 35, 0.04);
  --shadow-dropdown: 0 10px 28px rgba(20, 30, 35, 0.14), 0 3px 8px rgba(20, 30, 35, 0.07);
  --shadow-modal: 0 24px 56px rgba(20, 30, 35, 0.22), 0 6px 16px rgba(20, 30, 35, 0.09);
  --shadow-popover: 0 6px 16px rgba(20, 30, 35, 0.10);

  /* ---- Layout ---- */
  --sidebar-width: 264px;
  --sidebar-width-collapsed: 76px;
  --topbar-height: 64px;
  --container-max: 1440px;

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.2, 0.6, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
}

/* ==========================================================================
   DARK THEME
   Applied via [data-theme="dark"] on <html>. Not an afterthought: surfaces
   step up in elevation (bg darkest, card lighter) rather than everything
   sharing one flat charcoal.
   ========================================================================== */
[data-theme='dark'] {
  --color-primary: #35B0B8;
  --color-primary-hover: #4FC2C9;
  --color-primary-active: #2C979E;
  --color-primary-soft: #113238;
  --color-primary-soft-text: #7FD4DA;
  --color-primary-gradient: linear-gradient(135deg, #3DBCC4 0%, #1D7A82 100%);

  --color-secondary: #93A6BA;
  --color-secondary-hover: #A9BACB;
  --color-secondary-soft: #202B36;

  --color-success: #4FBE8E;
  --color-success-soft: #123227;

  --color-warning: #E0A23E;
  --color-warning-soft: #34270F;

  --color-danger: #E0665C;
  --color-danger-soft: #391A18;

  --color-info: #6BAAC9;
  --color-info-soft: #12262E;

  --color-bg: #0E1416;
  --color-surface: #141C1F;
  --color-card: #182226;
  --color-card-alt: #1D282C;
  --color-border: #263238;
  --color-border-strong: #33424A;

  --color-text-primary: #E7EDEF;
  --color-text-secondary: #A6B3B8;
  --color-text-muted: #71818A;
  --color-text-on-primary: #08191B;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.5);
  --shadow-popover: 0 6px 16px rgba(0, 0, 0, 0.35);
}
