@charset "UTF-8";
/* ==========================================================================
   MediCore HMIS - Design Tokens (Clinical Precision)
   Ported from dashboard_designs/.../clinical_precision/DESIGN.md
   Material 3 token system mapped to CSS custom properties.
   ========================================================================== */

/* ---------- Local UI font: Manrope (Inter substitute, local-first) ---------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-800.woff2') format('woff2');
}

/* ---------- Root tokens ---------- */
:root {
  /* Brand / primary */
  --primary: #0037b0;
  --on-primary: #ffffff;
  --primary-container: #1d4ed8;
  --on-primary-container: #cad3ff;
  --primary-fixed: #dce1ff;
  --primary-fixed-dim: #b7c4ff;
  --on-primary-fixed: #001551;
  --on-primary-fixed-variant: #0039b5;
  --surface-tint: #2151da;
  --inverse-primary: #b7c4ff;

  /* Secondary (teal) */
  --secondary: #006a63;
  --on-secondary: #ffffff;
  --secondary-container: #99efe5;
  --on-secondary-container: #006f67;
  --secondary-fixed: #9cf2e8;
  --secondary-fixed-dim: #80d5cb;
  --on-secondary-fixed: #00201d;
  --on-secondary-fixed-variant: #00504a;

  /* Tertiary (slate) */
  --tertiary: #414546;
  --on-tertiary: #ffffff;
  --tertiary-container: #595c5e;
  --on-tertiary-container: #d2d4d6;
  --tertiary-fixed: #e0e3e5;
  --tertiary-fixed-dim: #c4c7c9;
  --on-tertiary-fixed: #191c1e;
  --on-tertiary-fixed-variant: #444749;

  /* Error */
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;

  /* Surfaces */
  --background: #f8f9ff;
  --on-background: #0b1c30;
  --surface: #f8f9ff;
  --surface-bright: #f8f9ff;
  --surface-dim: #cbdbf5;
  --surface-variant: #d3e4fe;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #eff4ff;
  --surface-container: #e5eeff;
  --surface-container-high: #dce9ff;
  --surface-container-highest: #d3e4fe;
  --on-surface: #0b1c30;
  --on-surface-variant: #434655;

  /* Inverse */
  --inverse-surface: #213145;
  --inverse-on-surface: #eaf1ff;

  /* Outline */
  --outline: #747686;
  --outline-variant: #c4c5d7;

  /* Spacing rhythm (4px baseline) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-gutter: 24px;
  --space-margin: 32px;
  --space-base: 4px;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-default: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Elevation (ambient shadows) */
  --shadow-1: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 8px 16px rgba(0, 55, 176, 0.2);

  /* Layout */
  --sidebar-w: 280px;
  --topbar-h: 64px;
  --rightpanel-w: 320px;

  /* Type scale */
  --font-sans: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-display-lg: 48px;
  --lh-display-lg: 56px;
  --fs-headline-lg: 32px;
  --lh-headline-lg: 40px;
  --fs-headline-md: 24px;
  --lh-headline-md: 32px;
  --fs-headline-lg-mobile: 24px;
  --lh-headline-lg-mobile: 32px;
  --fs-title-lg: 20px;
  --lh-title-lg: 28px;
  --fs-title-md: 16px;
  --lh-title-md: 24px;
  --fs-body-lg: 16px;
  --lh-body-lg: 24px;
  --fs-body-md: 14px;
  --lh-body-md: 20px;
  --fs-label-md: 12px;
  --lh-label-md: 16px;
  --fs-label-sm: 11px;
  --lh-label-sm: 14px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { font-size: var(--fs-body-md); line-height: var(--lh-body-md); }

/* Tabular numerals for clinical data alignment */
.tnum, .num, table td, .kpi-value { font-variant-numeric: tabular-nums; }

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

/* ---------- Typography helpers ---------- */
.t-display-lg   { font-size: var(--fs-display-lg); line-height: var(--lh-display-lg); font-weight: 700; letter-spacing: -0.02em; }
.t-headline-lg  { font-size: var(--fs-headline-lg); line-height: var(--lh-headline-lg); font-weight: 600; letter-spacing: -0.01em; }
.t-headline-md  { font-size: var(--fs-headline-md); line-height: var(--lh-headline-md); font-weight: 600; }
.t-headline-mobile { font-size: var(--fs-headline-lg-mobile); line-height: var(--lh-headline-lg-mobile); font-weight: 600; }
.t-title-lg     { font-size: var(--fs-title-lg); line-height: var(--lh-title-lg); font-weight: 600; }
.t-title-md     { font-size: var(--fs-title-md); line-height: var(--lh-title-md); font-weight: 600; }
.t-body-lg      { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); font-weight: 400; }
.t-body-md      { font-size: var(--fs-body-md); line-height: var(--lh-body-md); font-weight: 400; }
.t-label-md     { font-size: var(--fs-label-md); line-height: var(--lh-label-md); font-weight: 500; letter-spacing: 0.05em; }
.t-label-sm     { font-size: var(--fs-label-sm); line-height: var(--lh-label-sm); font-weight: 600; letter-spacing: 0.05em; }

.fw-medium  { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold    { font-weight: 700; }
.fw-extrabold { font-weight: 800; }

.text-primary      { color: var(--primary) !important; }
.text-on-primary   { color: var(--on-primary) !important; }
.text-secondary    { color: var(--secondary) !important; }
.text-tertiary     { color: var(--tertiary) !important; }
.text-error        { color: var(--error) !important; }
.text-outline      { color: var(--outline) !important; }
.text-on-surface   { color: var(--on-surface) !important; }
.text-on-surface-variant { color: var(--on-surface-variant) !important; }
.text-inverse      { color: var(--inverse-on-surface) !important; }

/* Surfaces (text/bg helpers) */
.bg-surface                    { background-color: var(--surface) !important; }
.bg-surface-bright             { background-color: var(--surface-bright) !important; }
.bg-surface-dim                { background-color: var(--surface-dim) !important; }
.bg-surface-container          { background-color: var(--surface-container) !important; }
.bg-surface-container-low      { background-color: var(--surface-container-low) !important; }
.bg-surface-container-lowest   { background-color: var(--surface-container-lowest) !important; }
.bg-surface-container-high     { background-color: var(--surface-container-high) !important; }
.bg-surface-container-highest  { background-color: var(--surface-container-highest) !important; }
.bg-surface-variant            { background-color: var(--surface-variant) !important; }
.bg-primary                    { background-color: var(--primary) !important; }
.bg-primary-container          { background-color: var(--primary-container) !important; }
.bg-primary-fixed              { background-color: var(--primary-fixed) !important; }
.bg-primary-fixed-dim          { background-color: var(--primary-fixed-dim) !important; }
.bg-secondary                  { background-color: var(--secondary) !important; }
.bg-secondary-container        { background-color: var(--secondary-container) !important; }
.bg-tertiary                   { background-color: var(--tertiary) !important; }
.bg-tertiary-container         { background-color: var(--tertiary-container) !important; }
.bg-error                      { background-color: var(--error) !important; }
.bg-error-container            { background-color: var(--error-container) !important; }
.bg-inverse-surface            { background-color: var(--inverse-surface) !important; }
.bg-background                 { background-color: var(--background) !important; }

.border-outline           { border-color: var(--outline) !important; }
.border-outline-variant   { border-color: var(--outline-variant) !important; }
.border-primary           { border-color: var(--primary) !important; }
.border-primary-container { border-color: var(--primary-container) !important; }
.border-secondary         { border-color: var(--secondary) !important; }
.border-error             { border-color: var(--error) !important; }

/* Tinted alpha backgrounds */
.bg-primary-tint-10   { background-color: rgba(0, 55, 176, 0.10) !important; }
.bg-primary-tint-05   { background-color: rgba(0, 55, 176, 0.05) !important; }
.bg-error-tint-20     { background-color: rgba(186, 26, 26, 0.12) !important; }
.bg-secondary-tint-10 { background-color: rgba(0, 106, 99, 0.10) !important; }
