/* ============================================================
   tokens.css  v1.0
   CSS custom properties only. Zero selectors targeting elements.
   Every colour, spacing, font size, shadow, radius, z-index and
   page-width constraint used anywhere in the app is defined here.
   ============================================================ */

:root {
  /* Brand / primary clinical palette — light, high-contrast theme */
  --color-primary:        #1a6b9a;
  --color-primary-dark:   #114a6b;
  --color-primary-light:  #e8f2f8;
  --color-accent:         #0f6e56;

  /* Semantic status colours */
  --color-danger:         #dc2626;
  --color-danger-bg:      #fdecec;
  --color-warning:        #b45309;
  --color-warning-bg:     #fff4e5;
  --color-success:        #15803d;
  --color-success-bg:     #eaf7ee;
  --color-info:           #1d4ed8;
  --color-info-bg:        #eaf1fd;

  /* Text */
  --text-primary:         #1a2027;
  --text-secondary:       #4b5563;
  --text-muted:           #8a929c;
  --text-on-primary:      #ffffff;

  /* Surfaces */
  --surface-page:         #f4f6f8;
  --surface-card:         #ffffff;
  --surface-sidebar:      #0f2d3f;

  /* Borders */
  --border-default:       #dfe3e8;
  --border-strong:        #c3c9d1;

  /* Row states (used by the data table zebra pattern) */
  --color-row-alt:        #f8fafc;
  --color-row-hover:      #eff6ff;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-8:  48px;

  /* Type scale */
  --text-xs:    12px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-md:    16px;
  --text-lg:    19px;
  --text-xl:    23px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-pill: 999px;

  /* Shadows — used sparingly (modals, popovers only) */
  --shadow-modal: 0 8px 24px rgba(15, 45, 63, 0.16);
  --shadow-popover: 0 4px 12px rgba(15, 45, 63, 0.12);

  /* Page width constraints */
  --page-width-narrow:   860px;

  /* App shell layout */
  --sidebar-width:        216px;
  --sidebar-width-collapsed: 64px;
  --topbar-height:        56px;
  --safety-rail-width:    260px;

  /* Z-index scale */
  --z-modal:    1000;
  --z-toast:    1100;
  --z-popover:  900;
  --z-sticky:   500;

  /* Severity colours (contradiction/safety alerts) */
  --severity-info-border:     var(--color-info);
  --severity-warning-border:  var(--color-warning);
  --severity-critical-border: var(--color-danger);
}
