/* Clinical theme. Loads after dashboard.css and only restyles; light-mode rules are scoped so the dark theme is untouched. */
:root{font-family:"Segoe UI Variable Text","Segoe UI","Noto Sans Arabic","Geeza Pro",Tahoma,"Helvetica Neue",Arial,sans-serif}
td,.mono,.stat-value,.report-stat strong,.pie-total{font-variant-numeric:tabular-nums}

html:not([data-theme=dark]){
  --canvas:#f2f7f9;--surface:#fff;--ink:#0f2a33;--muted:#5b7480;--line:#d3e2e8;
  --teal:#0f7c8a;--teal-dark:#0b616c;--teal-soft:#e3f2f4;
  --radius:10px;--shadow:none;
  --nav:#0b3c49;--nav-raised:#0f4a59;--nav-line:#1a5d6e;--nav-ink:#b9d3da;--nav-bright:#7be0ea;
}

/* ECG paper: faint minor grid with a stronger line every fifth cell. */
html:not([data-theme=dark]) .main-content{
  background-color:var(--canvas);
  background-image:linear-gradient(to right,#0f7c8a14 1px,transparent 1px),linear-gradient(to bottom,#0f7c8a14 1px,transparent 1px),linear-gradient(to right,#0f7c8a0b 1px,transparent 1px),linear-gradient(to bottom,#0f7c8a0b 1px,transparent 1px);
  background-size:80px 80px,80px 80px,16px 16px,16px 16px;
  background-position:center top;
}
html:not([data-theme=dark]) .login-body{background:var(--canvas)}

/* Wayfinding sidebar, like hospital signage. */
html:not([data-theme=dark]) .sidebar{background:var(--nav);border-inline-end:0}
html:not([data-theme=dark]) .brand strong{color:#fff}
html:not([data-theme=dark]) .brand strong span{color:var(--nav-bright)}
html:not([data-theme=dark]) .sidebar .brand small{color:#8fb3bd}
html:not([data-theme=dark]) .sidebar .workspace-label{background:var(--nav-raised);border-color:var(--nav-line);color:#cfe6ec}
html:not([data-theme=dark]) .sidebar .workspace-version{color:#8fb3bd}
html:not([data-theme=dark]) .sidebar .nav-section{color:#7fa6b1}
html:not([data-theme=dark]) .sidebar .nav-link{color:var(--nav-ink)}
html:not([data-theme=dark]) .sidebar .nav-link:hover{background:var(--nav-raised);color:#fff}
html:not([data-theme=dark]) .sidebar .nav-link.is-active{background:#14596a;color:#fff}
html:not([data-theme=dark]) .sidebar .nav-link.is-active:before{background:var(--nav-bright)}
html:not([data-theme=dark]) .sidebar .nav-counter{background:var(--nav-raised);color:#cfe6ec}
html:not([data-theme=dark]) .sidebar-bottom{background:transparent;border-top-color:var(--nav-line);color:#d6e9ee}
html:not([data-theme=dark]) .sidebar-bottom strong{color:#fff}
html:not([data-theme=dark]) .sidebar-bottom small{color:#8fb3bd}
html:not([data-theme=dark]) .sidebar .avatar{background:#14596a;color:#bfeef3}
html:not([data-theme=dark]) .sidebar .logout-button{color:#9cc2cb}
html:not([data-theme=dark]) .sidebar .logout-button:hover{color:#fff}

/* Chart-sheet headings and flat bordered panels (no soft shadows). */
.page-heading--hero{border-inline-start:4px solid var(--teal)}
.button,input,select,textarea{border-radius:6px}
.badge{border-radius:3px}

/* Vitals strip: the four headline numbers read as one monitor row. */
html:not([data-theme=dark]) .stats-grid{gap:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
html:not([data-theme=dark]) .stat-card{background:transparent;border:0;border-radius:0;border-inline-start:1px solid var(--line);transition:background .15s}
html:not([data-theme=dark]) .stat-card:first-child{border-inline-start:0}
html:not([data-theme=dark]) .stat-card:hover{background:#f6fbfc;transform:none;box-shadow:none;border-color:var(--line)}
html:not([data-theme=dark]) .stat-card:before{inset-inline:0;inset-block:0 auto;width:auto;height:3px;border-radius:0}
html:not([data-theme=dark]) .stat-card--teal{--stat-accent:#0f7c8a}
html:not([data-theme=dark]) .stat-card--blue{--stat-accent:#2f6fa8}
html:not([data-theme=dark]) .stat-card--orange{--stat-accent:#c98a12}
html:not([data-theme=dark]) .stat-card--purple{--stat-accent:#7a63a8}
@media(max-width:980px){html:not([data-theme=dark]) .stat-card{border-block-end:1px solid var(--line)}html:not([data-theme=dark]) .stat-card:nth-child(odd){border-inline-start:0}}
@media(max-width:760px){html:not([data-theme=dark]) .stat-card{border-inline-start:0}}

/* Tables read like a lab sheet. */
html:not([data-theme=dark]) th{background:#eaf3f6;color:#46606b;font-size:11px;font-weight:600;border-block-color:var(--line)}
html:not([data-theme=dark]) tbody tr:hover td{background:#f6fbfc}

/* Outcome flags, as on a lab result: green met, amber partial, red not met. */
html:not([data-theme=dark]) .badge{font-size:10px;font-weight:600;padding:3px 7px;border:1px solid #dbe5ea;background:#eef3f6;color:#4d636d}
html:not([data-theme=dark]) .badge-active,html:not([data-theme=dark]) .badge-verified,html:not([data-theme=dark]) .badge-completed,html:not([data-theme=dark]) .badge-passed,html:not([data-theme=dark]) .badge-met{background:#e6f5ee;color:#126a41;border-color:#b7dfc9}
html:not([data-theme=dark]) .badge-pending,html:not([data-theme=dark]) .badge-in_progress,html:not([data-theme=dark]) .badge-partially_met,html:not([data-theme=dark]) .badge-incomplete{background:#fff4dc;color:#8a5a00;border-color:#efd699}
html:not([data-theme=dark]) .badge-banned,html:not([data-theme=dark]) .badge-failed,html:not([data-theme=dark]) .badge-not_met{background:#fdebea;color:#a12a2a;border-color:#f0b9b4}

/* Sign-in: signage panel with a pulse trace. */
.login-story{background-color:#0b3c49;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='90' viewBox='0 0 420 90'%3E%3Cpath d='M0 45H120l10-4 8 4h37l8 6 8-44 10 74 8-36h42l10-8 16 8h143' fill='none' stroke='%237be0ea' stroke-opacity='.35' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:repeat-x;background-position:0 78%;background-size:420px 90px}
