/* Pacsivo semantic chrome tokens. Clinical colours stay in --clinical-* and must not follow accent. */

html{
  --font-size:15px;
  --space-unit:1;
  --density-row:56px;
  --density-pad:12px;
  --bg-app:#071423;
  --bg-sidebar:#071522;
  --bg-surface:#10243a;
  --bg-elevated:#0c2033;
  --bg-input:#0b1c2d;
  --border:#203a53;
  --text:#eaf3fb;
  --text-secondary:#bbccda;
  --text-muted:#8fa6ba;
  --hover:#0e253a;
  --selected:rgba(47,140,255,.2);
  --focus-ring:rgba(47,140,255,.12);
  --accent:#2f8cff;
  --accent-fg:#ffffff;
  --accent-rgb:47,140,255;
  --table-header:#0b1c2d;
  --table-row:transparent;
  --table-row-alt:rgba(39,111,166,.08);
  --chart-grid:rgba(60,102,135,.13);
  --chart-series:#2f8cff;
  --dialog-bg:#0b1b2b;
  --dialog-backdrop:rgba(1,8,15,.78);
  --shadow-elevated:0 24px 60px rgba(0,0,0,.26);
  --navy:#071423;
  --navy2:#0b1d31;
  --panel:#10243a;
  --line:#203a53;
  --blue:#2f8cff;
  --cyan:#22c6df;
  --muted:#8fa6ba;
  --success:#37d29b;
  --danger:#ff7180;
  --shadow:var(--shadow-elevated);
  --clinical-danger:#ff7180;
  --clinical-warning:#ffb44a;
  --clinical-success:#37d29b;
  --clinical-stat:#ff6575;
  --clinical-proposed:#e3c15a;
  --clinical-completed:#70e3b5;
  --clinical-abnormal:#ff9ca6;
  color-scheme:dark;
  font-size:var(--font-size);
}

html[data-theme="light"]{
  --bg-app:#eef3f8;
  --bg-sidebar:#f7fafc;
  --bg-surface:#ffffff;
  --bg-elevated:#ffffff;
  --bg-input:#f4f7fb;
  --border:#c5d4e2;
  --text:#132433;
  --text-secondary:#3d5568;
  --text-muted:#5d7386;
  --hover:#e7eef6;
  --selected:rgba(47,140,255,.14);
  --focus-ring:rgba(47,140,255,.18);
  --table-header:#eef4fa;
  --table-row:transparent;
  --table-row-alt:rgba(20,70,120,.04);
  --chart-grid:rgba(80,110,140,.16);
  --dialog-bg:#ffffff;
  --dialog-backdrop:rgba(18,32,48,.45);
  --shadow-elevated:0 18px 40px rgba(18,40,64,.12);
  --navy:#eef3f8;
  --navy2:#f4f7fb;
  --panel:#ffffff;
  --line:#c5d4e2;
  --muted:#5d7386;
  --clinical-danger:#c43d4c;
  --clinical-warning:#b86a12;
  --clinical-success:#1a8a62;
  --clinical-stat:#c43d4c;
  --clinical-proposed:#b08920;
  --clinical-completed:#1a8a62;
  --clinical-abnormal:#c43d4c;
  color-scheme:light;
}

html[data-accent="pacsivo_blue"]{--accent:#2f8cff;--accent-fg:#ffffff;--accent-rgb:47,140,255;--blue:#2f8cff;--chart-series:#2f8cff}
html[data-accent="cyan"]{--accent:#1aa7bc;--accent-fg:#ffffff;--accent-rgb:26,167,188;--blue:#1aa7bc;--chart-series:#1aa7bc}
html[data-accent="teal"]{--accent:#1a9b8a;--accent-fg:#ffffff;--accent-rgb:26,155,138;--blue:#1a9b8a;--chart-series:#1a9b8a}
html[data-accent="violet"]{--accent:#7b6ad8;--accent-fg:#ffffff;--accent-rgb:123,106,216;--blue:#7b6ad8;--chart-series:#7b6ad8}
html[data-accent="slate"]{--accent:#5b7388;--accent-fg:#ffffff;--accent-rgb:91,115,136;--blue:#5b7388;--chart-series:#5b7388}

html[data-scale="small"]{--font-size:13px}
html[data-scale="standard"]{--font-size:15px}
html[data-scale="large"]{--font-size:17px}
html[data-scale="extra_large"]{--font-size:19px}

html[data-density="compact"]{--density-row:46px;--density-pad:8px}
html[data-density="comfortable"]{--density-row:56px;--density-pad:12px}
html[data-density="spacious"]{--density-row:68px;--density-pad:16px}

html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after{
  animation-duration:.01ms!important;
  animation-iteration-count:1!important;
  transition-duration:.01ms!important;
  scroll-behavior:auto!important;
}

@media (prefers-reduced-motion:reduce){
  html:not([data-reduced-motion="false"]) *,
  html:not([data-reduced-motion="false"]) *::before,
  html:not([data-reduced-motion="false"]) *::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

:is(a,button,input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:2px solid var(--accent)!important;
  outline-offset:2px;
  box-shadow:0 0 0 3px var(--focus-ring)!important;
}
