@charset "UTF-8";
:root {
  --ink: color-mix(in srgb, var(--nav) 76%, #161d22);
  --text: color-mix(in srgb, var(--nav) 36%, #283034);
  --muted: color-mix(in srgb, var(--nav) 22%, #627073);
  --faint: #75847d;
  --line: color-mix(in srgb, var(--accent) 22%, white);
  --line-soft: color-mix(in srgb, var(--accent) 11%, white);
  --paper: #fff;
  --surface: color-mix(in srgb, var(--accent) 6%, white);
  --nav: #11392f;
  --nav-active: #275445;
  --accent: #14654f;
  --tint: color-mix(in srgb, var(--accent) 10%, white);
  --highlight: color-mix(in srgb, var(--accent) 18%, white);
  --nav-light: color-mix(in srgb, var(--accent) 25%, white);
  accent-color: var(--accent);
  --green: #246b4a;
  --gold: #85621d;
  --radius: 14px;
  --shadow: 0 2px 4px #23372f05;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
}

:root[data-workspace-role="patient"] { --nav: #183e5b; --nav-active: #275877; --accent: #22678f; }
:root[data-workspace-role="physician"] { --nav: #41305e; --nav-active: #594279; --accent: #684a8d; }
:root[data-workspace-role="operations"] { --nav: #20474c; --nav-active: #305e65; --accent: #286a70; }
:root[data-workspace-role="administrator"] { --nav: #363d53; --nav-active: #49546e; --accent: #4b5982; }
:root[data-workspace-role="evaluator"] { --nav: #543d2b; --nav-active: #694f35; --accent: #785630; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select,
input[type="checkbox"] {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #6689db;
  outline-offset: 2px;
}
svg {
  flex: none;
}
button svg {
  pointer-events: none;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1 {
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.07;
  letter-spacing: -0.054em;
  font-weight: 600;
  color: var(--ink);
}
h2 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  font-weight: 635;
}
h3 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
h4 {
  font-size: 14px;
}
.mono,
time,
.eyebrow,
.kicker,
.nav-label,
.roomcode {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.skip {
  position: absolute;
  top: -80px;
  background: white;
  z-index: 100;
  padding: 12px;
}
.skip:focus {
  top: 0;
}
.loading {
  padding: 4rem;
}
.loading-retry { color: #185c43; animation: show-reload 4s step-end; }
@keyframes show-reload { from { visibility: hidden; } to { visibility: visible; } }
.app {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--nav);
  color: white;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 27px 22px 25px;
  border-bottom: 1px solid #ffffff1b;
}
.brand img {
  width: 40px;
  height: 40px;
  background: #c5eacb;
  border-radius: 11px;
}
.brand strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -1.2px;
  display: block;
  line-height: 1.08;
}
.brand small {
  color: var(--nav-light);
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.nav {
  overflow-y: auto;
  padding: 15px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: #668274 transparent;
}
.nav-label,
.eyebrow,
.kicker {
  font-weight: 650;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1.35;
}
.nav-label {
  color: var(--nav-light);
  margin: 14px 11px 7px;
}
.nav a, .nav-tutorial {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--nav-light);
  padding: 8px 11px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 13px;
  min-height: 34px;
  font-weight: 500;
  transition: background 0.12s;
}
.nav-tutorial {
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
}
.nav-utilities {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #ffffff30;
}
.nav a:hover, .nav-tutorial:hover {
  background: #ffffff12;
}
.nav a.active {
  background: var(--nav-active);
  color: white;
  box-shadow: inset 3px 0 0 var(--nav-light);
}
.nav a svg {
  opacity: 0.88;
}
.nav-task-count { margin-left: auto; border-radius: 10px; background: var(--nav-light); color: var(--nav); padding: 1px 7px; font-size: 11px; }
.nav-more {
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px solid #ffffff30;
}
.nav-more > summary {
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--nav-light);
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
}
.nav-more > summary:hover { background: #ffffff12; }
.nav-more[open] .nav-label { margin-top: 10px; }
.extra-tool { margin-top: 16px; }
.extra-tool > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; }
.extra-tool[open] > summary { border-bottom: 1px solid var(--line); }
.nav-footer {
  border-top: 1px solid #ffffff29;
  margin-top: auto;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #c5d9cd;
}
.nav-footer i,
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #83c693;
  border-radius: 100%;
  flex: none;
}
.workspace {
  min-width: 0;
}
.field-error { display: block; color: #922f29; font-size: 12px; line-height: 1.4; }
[aria-invalid="true"] { border-color: #a84037; }
#main:focus { outline: none; }
.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  padding: 0 clamp(18px, 3vw, 48px);
}
.actions,
.row,
.inline,
.filters,
.legend,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag,
.pill,
.timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}
.tag {
  color: #405b49;
  background: #edf2e9;
  border: 1px solid #dce5d7;
  border-radius: 5px;
  padding: 6px 8px;
}
.tag svg {
  width: 12px;
  height: 12px;
}
.department-title {
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.role-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-inline-start: auto;
}
.role-caption {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.role-select select {
  appearance: none;
  field-sizing: content;
  min-width: 108px;
  height: 44px;
  padding: 0 36px 0 15px;
  border: 1px solid var(--nav);
  border-radius: 9px;
  background: var(--nav);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.role-select select:hover {
  background: var(--nav-active);
}
.role-select option {
  color: var(--ink);
  background: white;
}
.role-select::after {
  content: "";
  position: absolute;
  pointer-events: none;
  right: 15px;
  top: calc(50% - 5px);
  width: 7px;
  height: 7px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
}
.mobile-menu {
  display: none;
}
.main {
  padding: clamp(22px, 2.6vw, 40px) clamp(18px, 3vw, 48px) 48px;
  max-width: 1750px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--accent);
}
.heading p,
.subtle,
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.heading p {
  margin-top: 8px;
  font-size: 14px;
}
.btn,
.icon-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1.25;
  transition:
    background 0.14s,
    border-color 0.14s;
}
.btn {
  padding: 9px 13px;
  min-height: 37px;
  font-size: 13px;
}
.icon-btn {
  width: 34px;
  height: 34px;
}
.btn:hover,
.icon-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: var(--nav);
}
.btn.small {
  padding: 6px 9px;
  min-height: 30px;
  font-size: 12px;
}
.btn.flat,
.link-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
}
.btn.flat:hover,
.link-btn:hover {
  text-decoration: underline;
}
.btn.warn {
  color: #944421;
  border-color: #e2baa1;
  background: #fffcf8;
}
.btn.ghost {
  background: transparent;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 21px 16px;
}
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.panel-body {
  padding: 20px;
}
.panel-head + .panel-body {
  padding-top: 0;
}
.stack {
  display: grid;
  gap: 16px;
  align-content: start;
}
.stack.tight {
  gap: 9px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  display: block;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 17px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.metric:hover {
  border-color: #8ba598;
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #496057;
}
.metric-label svg {
  color: #677c70;
}
.metric .number {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.06em;
  font-weight: 585;
  display: block;
  margin: 9px 0 5px;
}
.metric small {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.metric.featured {
  background: var(--nav);
  border-color: var(--nav);
  color: #fff;
}
.metric.featured .metric-label,
.metric.featured small {
  color: var(--nav-light);
}
.metric.featured .metric-label svg {
  color: var(--nav-light);
}
.metric .tiny-line {
  height: 3px;
  width: 18px;
  background: #76a98b;
}
.dash-visual {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.preview-body {
  background-color: #f3f6ed;
  background-image: radial-gradient(#bac9bb 0.7px, transparent 0.7px);
  background-size: 11px 11px;
  border-block: 1px solid var(--line-soft);
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.plan-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.plan-svg text {
  font-family: "Segoe UI", Arial, sans-serif;
}
.plan-ft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  font-size: 11px;
  color: var(--muted);
  gap: 6px;
}
.legend {
  flex-wrap: wrap;
  gap: 12px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.band {
  padding: 12px 16px;
  background: #eff5ef;
  border: 1px solid #c9dbcf;
  border-radius: 9px;
  line-height: 1.5;
  font-size: 13px;
  color: #355640;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.band.amber {
  background: #faf3e6;
  color: #795717;
  border-color: #e9d8b5;
}
.band.red,
.err {
  background: #fff0eb;
  color: #833a28;
  border-color: #edc5b8;
}
.band svg {
  margin-top: 1px;
}
.tasks {
  padding: 0 19px;
}
.task {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.task:first-child {
  border-top: 0;
}
.task .task-icon {
  background: #f9f1dd;
  color: #977220;
  display: grid;
  place-items: center;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  flex: none;
}
.task .task-text {
  flex: 1;
  min-width: 0;
}
.task-text strong {
  font-size: 13px;
  line-height: 1.35;
  display: block;
  font-weight: 600;
}
.task-text small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.counter {
  font-size: 11px;
  padding: 3px 7px;
  background: #eff3ed;
  border: 1px solid #dbe4dc;
  border-radius: 20px;
  vertical-align: middle;
  color: #55705d;
  margin-left: 5px;
  letter-spacing: 0;
}
.queue-wrap {
  overflow: auto;
  scrollbar-width: thin;
}
.queue-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.queue-table thead {
  background: #f7f9f5;
}
.queue-table th {
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #56675f;
  border-block: 1px solid var(--line);
  font-weight: 650;
}
.queue-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.queue-table thead th:first-child,
.queue-table td:first-child {
  padding-left: 21px;
}
.queue-table tbody tr:last-child td {
  border-bottom: 0;
}
.queue-table tbody tr:hover {
  background: #f8faf7;
}
.person-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
  padding: 0;
}
.person-btn strong {
  font-size: 13px;
  display: block;
  font-weight: 630;
}
.person-btn small,
.minor {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.person-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #edf0e9;
  color: #476052;
  border: 1px solid #dce3db;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 650;
  flex: none;
}
.person-icon.c1 {
  background: #e6edf3;
  color: #405a75;
}
.person-icon.c2 {
  background: #eee9f4;
  color: #715d82;
}
.person-icon.c3 {
  background: #f4ede1;
  color: #7d6644;
}
.pill {
  border-radius: 5px;
  padding: 5px 7px;
  background: #edf0ee;
  color: #4c5e56;
}
.pill:before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.pill.blue {
  background: #e6eff8;
  color: #315f83;
}
.pill.gold {
  background: #f9f0d9;
  color: #785c19;
}
.pill.green {
  background: #e5f1e7;
  color: #34694b;
}
.pill.purple {
  background: #efe9f7;
  color: #6b4e8e;
}
.pill.red {
  background: #fae9e5;
  color: #954b40;
}
.pill.orange {
  background: #faecdf;
  color: #8a542a;
}
.priority {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7dfd7;
  background: #f7f9f5;
  border-radius: 5px;
  padding: 3px 6px;
  color: #526254;
}
.tool-row,
.table-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.tool-row {
  border-top: 0;
  padding-top: 0;
  flex-wrap: wrap;
}
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  padding-left: 32px;
  max-width: 240px;
}
.search-wrap input,
.controls select,
.role-panel select,
.select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  height: 34px;
  color: var(--ink);
  font-size: 12px;
}
.controls select,
.select {
  padding: 5px 8px;
}
.empty {
  padding: 24px 18px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.personal-settings { max-width: 740px; }
.personal-settings [name="limit"] { max-width: 12rem; }
.two-col,
.clinical {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.clinical {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}
.span-full {
  grid-column: 1/-1;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title svg {
  color: var(--accent);
}
.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  align-content: start;
}
.field input,
.field select,
.field textarea,
.chat-compose textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--text);
  width: 100%;
  min-height: 38px;
  font-weight: 400;
}
.field textarea {
  min-height: 68px;
  resize: vertical;
}
.field small {
  font-size: 11px;
  font-weight: 450;
  color: var(--muted);
  line-height: 1.45;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fields.vitals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-actions {
  flex-wrap: wrap;
}
.field.full {
  grid-column: 1/-1;
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: start;
  line-height: 1.5;
  font-size: 13px;
  margin: 0;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
}
.rule {
  height: 1px;
  border: 0;
  background: var(--line-soft);
  margin: 2px 0;
}
.record-strip {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: white;
  padding: 13px 16px;
  margin-bottom: 16px;
}
.record-strip > div,
.record-strip label {
  min-width: 0;
}
.record-strip .select {
  min-width: min(100%, 250px);
  max-width: 100%;
  height: 39px;
  font-size: 13px;
}
.right {
  margin-left: auto;
}
.chat-log {
  display: grid;
  gap: 10px;
  max-height: 350px;
  overflow: auto;
  padding: 2px 1px;
  scrollbar-width: thin;
}
.bubble {
  padding: 11px 13px;
  border-radius: 13px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
  max-width: 88%;
  justify-self: start;
}
.bubble.user {
  background: var(--highlight);
  justify-self: end;
}
.bubble small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
  font-weight: 650;
}
.chat-compose {
  display: flex;
  gap: 8px;
  align-items: end;
}
.chat-compose textarea {
  resize: vertical;
  min-height: 55px;
}
.message-source {
  border-left: 3px solid var(--line);
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.45;
  background: var(--surface);
}
.message-source small {
  display: block;
  color: var(--muted);
  margin-bottom: 3px;
  font-size: 11px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  margin-left: 5px;
  padding: 0 0 15px 15px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}
.timeline li:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73a184;
  position: absolute;
  left: -4px;
  top: 5px;
}
.timeline li:last-child {
  border-color: transparent;
  padding-bottom: 0;
}
.timeline small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 11px;
}
.flow-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.section-group + .section-group {
  margin-top: 17px;
  border-top: 1px solid var(--line-soft);
  padding-top: 17px;
}
.section-group h3 {
  margin-bottom: 8px;
}
.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tokens span {
  background: #f2f5f1;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 11px;
}
.map-viewport {
  background-color: #f2f5ec;
  background-image: radial-gradient(#b9c8b7 0.8px, transparent 0.8px);
  background-size: 13px 13px;
  overflow: auto;
  max-height: 660px;
  padding: 16px;
  scrollbar-width: thin;
}
.map-viewport .plan-svg {
  min-width: 740px;
  height: auto;
}
.map-viewport .room-cell {
  cursor: pointer;
}
.room-cell:focus rect,
.room-cell:hover rect {
  stroke: #123e30;
  stroke-width: 2.5;
}
.map-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 8px;
  padding: 16px;
}
.room-button {
  display: grid;
  text-align: left;
  gap: 6px;
  padding: 10px;
  background: #f7faf5;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.room-button strong {
  font-size: 13px;
}
.room-button .pill {
  justify-self: start;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  background: #f2f5f1;
}
.seg button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  padding: 5px 8px;
}
.seg button.selected {
  background: white;
  box-shadow: 0 1px 3px #22372c17;
  color: var(--ink);
  font-weight: 650;
}
.fine {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}
.muted {
  color: var(--muted);
}
.margin-b {
  margin-bottom: 16px;
}
.volume {
  width: 100%;
  height: 7px;
  appearance: none;
  border: 0;
  background: #edf2eb;
  border-radius: 8px;
  overflow: hidden;
}
.volume::-webkit-progress-bar {
  background: #edf2eb;
}
.volume::-webkit-progress-value {
  background: #7ba68a;
}
.list-button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: white;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  padding: 12px 0;
  color: var(--text);
}
.list-button:last-child {
  border-bottom: 0;
}
.list-button strong {
  display: block;
}
.list-button small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.line-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.45;
}
.line-list li:last-child {
  border: 0;
}
.mode-chip {
  font-size: 11px;
  font-weight: 650;
  color: #47634e;
}
.guide details {
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
}
.guide summary {
  cursor: pointer;
  font-weight: 600;
}
.guide details p {
  line-height: 1.6;
  margin-top: 8px;
  color: var(--muted);
}
.small-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.small-table td,
.small-table th {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.small-table th {
  color: var(--muted);
  font-size: 11px;
}
.small-table tr:last-child td {
  border-bottom: 0;
}
#detail-view { max-width: 860px; margin-inline: auto; }
.detail-back { border: 0; background: none; color: var(--accent); padding: 6px 0; cursor: pointer; font-weight: 600; }
.detail-back span { margin-right: 4px; }
.detail-back:hover { text-decoration: underline; }
.detail-head { margin: 12px 0 18px; }
.detail-head small { display: block; color: var(--muted); margin-bottom: 3px; }
.detail-head h1 { margin: 0; font-size: clamp(26px,4vw,36px); }
.detail-body { display: grid; gap: 13px; }
.detail-body > form { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.inline-confirmation { margin: 12px 0; padding: 13px 16px; border: 1px solid #c9d7c8; border-radius: 9px; background: #f6f9f4; }
.inline-confirmation h3 { margin: 0 0 5px; }
.inline-confirmation p { margin: 0 0 9px; }
.inline-status { margin-block: 8px; color: #285740; font-size: 13px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.chart-current { display:flex; gap:13px; align-items:center; }
.chart-current .patient-portrait { width:48px; height:48px; }
.chart-current h3 { font-size:22px; margin:2px 0; }
.chart-current small,.chart-current p { color:var(--muted); }
.chart-current p,.chart-concern,.chart-instruction { margin:0; }
.chart-current p { font-size:13px; }
.chart-identity { display:flex; flex-wrap:wrap; align-items:center; gap:14px 36px; }
.chart-identity .chart-concern { flex:1 1 190px; }
.chart-concern { line-height:1.5; }
.chart-concern strong { display:block; font-size:12px; }
.chart-instruction { color:var(--muted); }
.chart-record-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.chart-record-actions [data-act="delete-patient"] { color: #8a3436; }
.chart-sections { display:grid; gap:6px; }
#chart-summary { background: var(--tint); color:var(--ink); padding:16px 20px; border:1px solid var(--line); border-radius:12px; }
#tab-content > #chart-summary { margin-bottom:16px; }
#chart-summary header { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 12px; }
#chart-summary h2 { font-size:17px; margin:0; }
#chart-summary header small { color:var(--muted); }
#chart-summary > p { margin:9px 0; white-space:pre-line; line-height:1.55; overflow-wrap:anywhere; }
#chart-summary details { margin-top:9px; font-size:13px; }
#chart-summary summary { cursor:pointer; color:var(--accent); }
#chart-summary ul { margin:8px 0 0; padding-left:18px; }
#chart-summary li p { margin:2px 0 8px; overflow-wrap:anywhere; }
.chart-section { border:1px solid var(--line); border-radius:9px; overflow-wrap:anywhere; background:white; }
.chart-section > summary { padding:12px 15px; cursor:pointer; font-weight:600; }
.chart-section > summary:hover { background:#f3f7f2; }
.chart-section-body { padding:0 15px 15px; }
.mono {
  font-size: 0.92em;
}
.net-error {
  max-width: 520px;
  margin: 15vh auto;
  padding: 25px;
}
.status-note {
  margin-top: 16px;
}
.scenario {
  display: flex;
  align-items: center;
  gap: 7px;
}
.help-step {
  padding: 12px 0;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
}
.help-step:first-child {
  border: 0;
}
.help-step b {
  background: var(--highlight);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
}
.help-step p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.help-step strong {
  color: var(--ink);
}
.action-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1ec;
  border: 1px solid #eab7a2;
  color: #883b24;
  font-size: 13px;
  line-height: 1.5;
}
.nav-section-title {
  margin-top: 8px;
}
.count-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 19px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}
.count-strip b {
  margin-right: 3px;
}
.count-strip span {
  font-size: 11px;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .main {
    padding-top: 36px;
  }
  .preview-body {
    height: 210px;
  }
  .metric {
    padding: 18px 21px;
  }
  .nav a {
    min-height: 38px;
  }
  .queue-table td {
    padding-block: 14px;
  }
}
@media (max-width: 1170px) {
  .app {
    grid-template-columns: 197px minmax(0, 1fr);
  }
  .brand {
    padding: 23px 15px;
  }
  .nav {
    padding-inline: 8px;
  }
  .nav a {
    font-size: 12px;
  }
  .topbar {
    padding-inline: 20px;
  }
  .main {
    padding-inline: 20px;
  }
  .dash-visual {
    grid-template-columns: minmax(0, 1.35fr) minmax(245px, 1fr);
  }
  .metric {
    padding: 14px;
  }
  .queue-table th,
  .queue-table td {
    padding-inline: 10px;
  }
  .queue-table td:first-child,
  .queue-table th:first-child {
    padding-left: 14px;
  }
}
@media (max-width: 950px) {
  .app {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .brand {
    gap: 8px;
  }
  .brand strong {
    font-size: 20px;
  }
  .nav a {
    gap: 8px;
    padding: 7px;
  }
  .metrics {
    gap: 8px;
  }
  .metric .number {
    font-size: 29px;
  }
  .metric {
    padding: 12px;
  }
  .dash-visual {
    grid-template-columns: minmax(0, 1.2fr) minmax(210px, 1fr);
  }
  .panel-head {
    padding: 15px;
  }
  .tasks {
    padding-inline: 12px;
  }
  .plan-ft {
    padding-inline: 10px;
  }
  .clinical {
    grid-template-columns: 1fr;
  }
  .preview-body {
    height: 160px;
  }
  .heading {
    align-items: center;
  }
  .heading p {
    font-size: 13px;
  }
  .task-text strong {
    font-size: 12px;
  }
  .form-actions .btn {
    flex-grow: 0;
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
  }
  .workspace { display: contents; }
  .topbar { grid-row: 1; }
  .main { grid-row: 3; width: 100%; min-width: 0; margin: 0; }
  .sidebar {
    display: none;
    grid-row: 2;
    position: static;
    height: auto;
  }
  .nav-open .sidebar {
    display: block;
  }
  .sidebar .brand, .sidebar .nav-footer { display: none; }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    padding-inline: 14px;
    padding-block: 6px;
    height: auto;
    min-height: 55px;
  }
  .main {
    padding: 22px 14px 35px;
  }
  .heading {
    margin-bottom: 16px;
  }
  .heading .eyebrow {
    font-size: 9px;
    margin-bottom: 6px;
  }
  .heading p {
    max-width: 42ch;
  }
  .heading .actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
  }
  .metric {
    padding: 12px 14px;
  }
  .metric .number {
    margin: 6px 0 2px;
  }
  .dash-visual {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  .preview-body {
    height: 170px;
  }
  .tasks {
    padding: 0 16px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .nav {
    padding: 7px 12px;
  }
  .nav a {
    font-size: 13px;
  }
  .panel-body {
    padding: 15px;
  }
  .record-strip {
    align-items: start;
    flex-wrap: wrap;
  }
  .heading .btn svg {
    width: 15px;
    height: 15px;
  }
  .row.responsive,
  .filters {
    flex-wrap: wrap;
  }
  .heading .btn {
    white-space: nowrap;
  }
  .tool-row {
    padding: 0 12px 10px;
  }
  .search-wrap input {
    max-width: 166px;
  }
  .controls {
    gap: 5px;
  }
  .small-table {
    font-size: 11px;
  }
  .map-viewport .plan-svg {
    min-width: 650px;
  }
  .map-viewport {
    padding: 5px;
  }
  .table-foot {
    padding: 10px 13px;
  }
  .fields.vitals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .queue-table {
    font-size: 11px;
  }
  .person-btn strong {
    font-size: 12px;
  }
}
@media (max-width: 420px) {
  .heading {
    align-items: start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .heading .actions {
    justify-content: start;
  }
  .topbar {
    gap: 5px;
  }
  .main {
    padding-inline: 11px;
  }
  .panel-head h2 {
    font-size: 17px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .fields.vitals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-ft {
    flex-wrap: wrap;
  }
  .person-icon {
    width: 26px;
    height: 26px;
  }
  .tag svg {
    display: none;
  }
  .nav-footer {
    padding: 13px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 480px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    height: auto;
    padding-block: 9px;
  }
  .department-title {
    grid-area: 1 / 1 / 2 / -1;
    margin: 0;
    font-size: 19px;
  }
  .topbar .mobile-menu {
    grid-area: 2 / 1;
    justify-self: start;
  }
  .role-select {
    grid-area: 2 / 2;
    margin: 0;
  }
}
@media (min-width: 761px) {
  .icon-btn.mobile-menu {
    display: none;
  }
  .preview-body {
    height: clamp(165px, 14vw, 214px);
  }
}
.source-disclosure {
  font-size: 12px;
  line-height: 1.5;
}
.source-disclosure summary,
details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 5px 0;
}
.source-disclosure[open] > summary {
  margin-bottom: 7px;
}
.source-disclosure .field {
  margin-top: 8px;
}
@media (max-width: 760px) {
  .preview-body {
    height: 150px;
  }
}
.shift-details {
  border-top: 1px solid var(--line);
  background: #fafbf9;
}
.departed-patients { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
.departed-patients ul { list-style: none; margin: 0; padding: 0 14px 12px; }
.departed-patients li + li { border-top: 1px solid var(--line); }
.departed-patients button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; color: var(--ink); background: transparent; border: 0; border-radius: 6px; text-align: left; cursor: pointer; }
.departed-patients button:hover { background: #edf4ee; }
.departed-patients small { display: block; font-size: 11px; color: #53665f; }
.departure-meta { margin-left: auto; text-align: right; }
.shift-details > summary {
  padding: 12px 20px;
  font-size: 12px;
}
.shift-details .count-strip {
  border: 0;
  padding-top: 0;
}
.finding {
  padding: 13px;
  background: #f7f9f5;
  border-radius: 8px;
}

.patient-checkin {
  width: min(100%, 710px);
  margin: 0 auto;
}
.patient-checkin h1 { margin: 0 0 22px; }
.checkin-card {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.checkin-head, .checkin-footer, .checkin-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.checkin-head { margin-bottom: 18px; }
.checkin-head h2 { font-size: clamp(21px, 2.5vw, 26px); margin: 0; }
.checkin-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--tint);
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.checkin-step, .checkin-footer small, .checkin-estimate small {
  font-size: 12px;
  color: var(--muted);
}
.checkin-step { margin-bottom: 3px; font-weight: 600; }
.checkin-footer { justify-content: space-between; padding-top: 12px; }
.checkin-footer .btn { min-width: 90px; }
.checkin-card .fields { gap: 18px; }
.checkin-card .field > input, .checkin-card .field > select { min-height: 44px; }
.checkin-card .btn { min-height: 42px; }
.checkin-intro { margin: -3px 0 18px; color: var(--muted); }
.checkin-card .chat-log { max-height: 340px; margin-bottom: 18px; overflow-wrap: anywhere; }
.checkin-card .bubble { font-size: 15px; line-height: 1.5; }
.checkin-card .bubble small { font-size: 11px; }
.checkin-links { justify-content: flex-start; gap: 4px 12px; margin-top: 16px; }
.checkin-links .flat { color: var(--accent); }
.checkin-confirm { font-size: 16px; line-height: 1.5; }
.checkin-estimate {
  padding: 16px 18px;
  display: grid;
  gap: 2px;
  margin: 18px 0;
  border-radius: 10px;
  background: var(--tint);
}
.checkin-estimate strong { color: var(--ink); font-size: 20px; }
.checkin-followup { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.checkin-followup p { margin: 5px 0 14px; color: var(--muted); }
@media (max-width: 540px) {
  .checkin-card .chat-compose { display: grid; }
  .checkin-card .chat-compose > button { justify-self: end; }
  .patient-checkin h1 { margin-bottom: 14px; }
  .checkin-links { justify-content: space-between; }
}
