:root {
  --bg: #080b10;
  --page: #0d1117;
  --panel: #151b23;
  --panel-2: #111720;
  --panel-3: #0f141b;
  --ink: #f4f7fb;
  --muted: #7f8a99;
  --muted-2: #aeb8c5;
  --line: #2a3441;
  --line-muted: #1e2630;
  --accent: #6ea8ff;
  --accent-strong: #d7e6ff;
  --red: #ff5f6d;
  --amber: #f0b429;
  --green: #7ee787;
  --blue: #6ea8ff;
  --missing: #9aa4af;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  --scrollbar-track: rgba(8, 13, 20, 0.55);
  --scrollbar-thumb: rgba(45, 212, 191, 0.36);
  --scrollbar-thumb-hover: rgba(52, 211, 153, 0.54);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Global scrollbar — Aerius dark theme (page, modals, trace) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 32px;
  border: 1px solid #354254;
  border-radius: 6px;
  background: #222b37;
  color: var(--ink);
  padding: 7px 10px;
  cursor: pointer;
}

button:hover {
  background: #2b3544;
  border-color: #4a5a70;
}

button.secondary,
button.ghost {
  background: var(--panel-2);
  color: var(--muted-2);
}

button.small {
  min-height: 30px;
  padding: 6px 9px;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.demo-nav {
  position: sticky;
  top: 0;
  z-index: 35;
  align-self: flex-end;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  align-items: center;
  width: fit-content;
  max-width: calc(100% - 20px);
  margin: 8px 10px 0 auto;
  padding: 4px;
  background: rgba(8, 11, 16, 0.92);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.demo-nav-button {
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.demo-nav-button:hover,
.demo-nav-button.active {
  color: var(--ink);
  background: var(--panel-2);
  border-color: var(--line);
}

.demo-nav-button.trace {
  color: var(--muted-2);
}

.topbar {
  background: var(--page);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px 24px 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-main {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(360px, 1.7fr) auto;
  gap: 18px;
  align-items: center;
}

.product-lockup {
  min-width: 0;
}

.brand {
  font-weight: 800;
  font-size: 24px;
}

.tagline {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.workspace-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  min-height: 32px;
  padding: 6px 10px;
  font-size: 14px;
}

.workspace-tab:hover,
.workspace-tab.active {
  background: #1a2029;
  border-color: #3a424c;
  color: var(--ink);
}

.trace-action {
  background: #1d232c;
  color: var(--accent-strong);
  white-space: nowrap;
}

.context-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.context-item,
.context-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  background: #151b23;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.context-item strong {
  color: var(--ink);
}

.workspace {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 8px 18px 18px;
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--page);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 23px;
  margin-bottom: 6px;
}

h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

h3 {
  font-size: 13px;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.panel,
.metric,
.patient-status {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  min-height: 32px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.board-layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.3fr);
}

.doctor-review-grid {
  grid-template-columns: minmax(380px, 0.8fr) minmax(580px, 1.2fr);
}

.evidence-workflow-grid {
  grid-template-columns: minmax(680px, 1.45fr) minmax(320px, 0.55fr);
}

.doctor-page-head {
  align-items: center;
  margin-bottom: 12px;
}

.doctor-page-head > div:first-child {
  max-width: 760px;
}

.doctor-page-head h1 {
  font-size: 24px;
}

.doctor-page-head p {
  max-width: 720px;
  margin-bottom: 0;
}

.doctor-quick-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.doctor-quick-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 14px;
}

.three-col,
.lanes,
.queue-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.queue-groups {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.queue-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid #59636f;
  border-radius: 8px;
  padding: 12px;
}

.queue-card span {
  color: var(--muted);
  display: block;
  min-height: 34px;
}

.queue-card strong {
  font-size: 24px;
}

.patient-queue-page {
  display: grid;
  gap: 14px;
}

.queue-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.queue-header p {
  margin-bottom: 0;
}

.queue-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.7fr);
  gap: 10px;
  min-width: min(520px, 100%);
}

.queue-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.queue-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  background: #0f141b;
}

.queue-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
}

.queue-stat-strip span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 12px;
}

.queue-stat-strip strong {
  color: var(--ink);
}

.patient-queue-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.patient-queue-lane {
  display: grid;
  gap: 10px;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.patient-queue-lane.attention {
  border-top: 3px solid var(--red);
}

.patient-queue-lane.progress {
  border-top: 3px solid var(--amber);
}

.patient-queue-lane.ready {
  border-top: 3px solid var(--green);
}

.queue-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-muted);
}

.queue-lane-head h2 {
  margin: 0;
  font-size: 15px;
}

.queue-lane-head span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  color: var(--muted-2);
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.queue-lane-list {
  display: grid;
  gap: 9px;
}

/* ---------- Patient Queue: work dashboard ---------- */
.patient-queue-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 5px solid #59636f;
  border-radius: 9px;
  text-align: left;
  align-items: stretch;
}

.patient-queue-card:hover {
  background: #18202a;
  border-color: #3f4b5c;
  transform: translateY(-1px);
}

.patient-queue-card.tone-red {
  border-left-color: var(--red);
}
.patient-queue-card.tone-yellow {
  border-left-color: var(--amber);
}
.patient-queue-card.tone-blue {
  border-left-color: #58a6ff;
}
.patient-queue-card.tone-green {
  border-left-color: var(--green);
}

.patient-queue-card.top-rank {
  background: #19212b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.queue-rank {
  display: grid;
  place-items: center;
  align-self: start;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--muted-2);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
}

.queue-rank.rank-1 {
  color: #ffd1d6;
  background: rgba(255, 95, 109, 0.16);
  border-color: rgba(255, 95, 109, 0.5);
}
.queue-rank.rank-2 {
  color: #ffe3a3;
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.46);
}
.queue-rank.rank-3 {
  color: #bcd6ff;
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.46);
}

.queue-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.queue-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.queue-number {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.queue-arrival,
.queue-demographics {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 800;
}

.queue-card-head .queue-status-badge {
  margin-left: auto;
}

.queue-card-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.queue-card-cc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.queue-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 2px;
}

.queue-waiting {
  width: fit-content;
  padding: 3px 8px;
  color: var(--accent-strong);
  background: rgba(110, 168, 255, 0.1);
  border: 1px solid rgba(110, 168, 255, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.queue-waiting.warning {
  color: #f7d98b;
  background: rgba(240, 180, 41, 0.1);
  border-color: rgba(240, 180, 41, 0.32);
}

.queue-waiting.long {
  color: #ffe3a3;
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.38);
}

/* NEXT ACTION chip + step color coding */
.queue-next-action {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
}

.step-nurse-intake {
  color: #bff5ff;
  background: rgba(72, 214, 255, 0.12);
  border-color: rgba(72, 214, 255, 0.4);
}
.step-doctor-review {
  color: #ffd1d6;
  background: rgba(255, 95, 109, 0.12);
  border-color: rgba(255, 95, 109, 0.42);
}
.step-lab-review {
  color: #d9c6ff;
  background: rgba(177, 123, 255, 0.14);
  border-color: rgba(177, 123, 255, 0.42);
}
.step-follow-up {
  color: #b7f5bf;
  background: rgba(126, 231, 135, 0.1);
  border-color: rgba(126, 231, 135, 0.34);
}

/* Status badges — 4-color decision system */
.queue-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 9px;
  color: var(--ink);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.queue-status-badge.tone-red {
  color: #ffd1d6;
  border-color: rgba(255, 95, 109, 0.5);
  background: rgba(255, 95, 109, 0.14);
}
.queue-status-badge.tone-yellow {
  color: #f7d98b;
  border-color: rgba(240, 180, 41, 0.48);
  background: rgba(240, 180, 41, 0.13);
}
.queue-status-badge.tone-blue {
  color: #bcd6ff;
  border-color: rgba(88, 166, 255, 0.48);
  background: rgba(88, 166, 255, 0.14);
}
.queue-status-badge.tone-green {
  color: #b7f5bf;
  border-color: rgba(126, 231, 135, 0.4);
  background: rgba(126, 231, 135, 0.1);
}

/* NEXT PATIENT hero */
.queue-next-patient {
  position: relative;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #59636f;
  background: linear-gradient(135deg, rgba(25, 33, 43, 0.98), rgba(15, 20, 27, 0.98));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.queue-next-patient.tone-red {
  border-left-color: var(--red);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), 0 0 26px rgba(255, 95, 109, 0.1);
}
.queue-next-patient.tone-yellow {
  border-left-color: var(--amber);
}
.queue-next-patient.tone-blue {
  border-left-color: #58a6ff;
}
.queue-next-patient.tone-green {
  border-left-color: var(--green);
}

.next-patient-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #ffd1d6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.next-patient-pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 95, 109, 0.6);
  animation: next-pulse 1.6s infinite;
}

@keyframes next-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 95, 109, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 95, 109, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 95, 109, 0);
  }
}

.next-patient-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto;
  gap: 20px;
  align-items: center;
}

.next-patient-id {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.next-patient-name {
  display: block;
  color: var(--ink);
  font-size: 26px;
  font-weight: 850;
  line-height: 1.1;
}

.next-patient-cc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.next-patient-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.next-fact {
  display: grid;
  gap: 4px;
  align-content: start;
}

.next-fact > span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.next-fact > strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.next-fact .risk-high {
  color: #ff9aa3;
}
.next-fact .risk-medium {
  color: #ffd47a;
}
.next-fact .risk-low {
  color: #9fe6ab;
}
.next-fact .step-nurse-intake,
.next-fact .step-doctor-review,
.next-fact .step-lab-review,
.next-fact .step-follow-up {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.next-patient-action {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #07121f;
  background: var(--accent-strong);
  border: none;
  white-space: nowrap;
}

.next-patient-action:hover {
  filter: brightness(1.08);
}

.empty-queue {
  padding: 14px;
  color: var(--muted-2);
  background: var(--panel-2);
  border: 1px dashed var(--line-muted);
  border-radius: 8px;
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1040px;
}

.board-layout table {
  min-width: 0;
  table-layout: fixed;
}

.board-layout th:nth-child(1),
.board-layout td:nth-child(1),
.board-layout th:nth-child(2),
.board-layout td:nth-child(2),
.board-layout th:nth-child(3),
.board-layout td:nth-child(3),
.board-layout th:nth-child(5),
.board-layout td:nth-child(5),
.board-layout th:nth-child(7),
.board-layout td:nth-child(7),
.board-layout th:nth-child(8),
.board-layout td:nth-child(8),
.board-layout th:nth-child(9),
.board-layout td:nth-child(9),
.board-layout th:nth-child(10),
.board-layout td:nth-child(10) {
  white-space: nowrap;
}

.board-layout th:nth-child(1),
.board-layout td:nth-child(1) {
  width: 76px;
}

.board-layout th:nth-child(2),
.board-layout td:nth-child(2) {
  width: 84px;
}

.board-layout th:nth-child(3),
.board-layout td:nth-child(3) {
  width: 94px;
}

.board-layout th:nth-child(4),
.board-layout td:nth-child(4) {
  width: auto;
}

.board-layout th:nth-child(5),
.board-layout td:nth-child(5) {
  width: 78px;
}

.board-layout th:nth-child(6),
.board-layout td:nth-child(6) {
  width: 130px;
}

.board-layout th:nth-child(7),
.board-layout td:nth-child(7) {
  width: 92px;
}

.board-layout th:nth-child(8),
.board-layout td:nth-child(8) {
  width: 112px;
}

.board-layout th:nth-child(9),
.board-layout td:nth-child(9) {
  width: 86px;
}

.board-layout th:nth-child(10),
.board-layout td:nth-child(10) {
  width: 72px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: #111720;
}

tr.selected {
  background: #1b2530;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: #252c36;
  color: var(--muted-2);
}

.badge.high,
.badge.critical {
  background: rgba(248, 81, 73, 0.14);
  color: var(--red);
}

.badge.medium,
.badge.lab-pending,
.badge.imaging-pending,
.badge.awaiting-results,
.badge.pending,
.badge.requested,
.badge.in-progress {
  background: rgba(210, 153, 34, 0.14);
  color: var(--amber);
}

.badge.available {
  background: rgba(110, 168, 255, 0.12);
  color: var(--blue);
}

.badge.low,
.badge.completed,
.badge.doctor-final-review,
.badge.patient-follow-up {
  background: rgba(126, 231, 135, 0.12);
  color: var(--green);
}

.badge.missing,
.badge.needs-verification {
  background: rgba(139, 148, 158, 0.14);
  color: var(--missing);
}

.patient-line,
.button-row,
.segmented,
.follow-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.patient-line {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.insight,
.alert,
.safety-note,
.disclaimer {
  background: #151b23;
  border-left: 4px solid #59636f;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}

.alert {
  background: rgba(210, 153, 34, 0.08);
  border-left-color: var(--amber);
}

.safety-note,
.disclaimer {
  background: #121820;
  border-left-color: #59636f;
  color: var(--muted-2);
}

.lane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.lane-card {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
  background: #121820;
  color: var(--ink);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.lane-card:hover {
  background: #1b2530;
}

.clinical-header {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.clinical-header span,
.evidence-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.doctor-macro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.patient-context-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-left: 4px solid #4a5a70;
}

.sketch-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 48px;
  margin-bottom: 14px;
}

.sketch-patient-strip {
  display: grid;
  align-content: center;
  gap: 7px;
  width: 100%;
  min-height: 70px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid #4a5a70;
  border-radius: 8px;
}

.sketch-patient-strip.high,
.sketch-patient-strip.critical {
  border-left-color: var(--red);
}

.sketch-patient-strip.medium {
  border-left-color: var(--amber);
}

.sketch-patient-strip.low {
  border-left-color: var(--green);
}

.patient-strip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.patient-strip-row.primary {
  min-height: 24px;
}

.patient-strip-row.secondary {
  min-height: 24px;
}

.sketch-patient-strip strong {
  color: var(--ink);
}

.sketch-patient-strip span {
  color: var(--muted-2);
}

.patient-strip-row > span:not(.badge) {
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: var(--panel-2);
  padding: 4px 8px;
  font-size: 12px;
}

.patient-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 5px;
  align-items: center;
  margin-left: auto;
  min-width: min(260px, 100%);
}

.patient-result-actions span {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.patient-result-actions button {
  width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  color: var(--muted-2);
  background: var(--panel-2);
  border-color: var(--line-muted);
  font-size: 11px;
  white-space: nowrap;
}

.clinical-monitor {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid #4a5a70;
  border-radius: 8px;
}

.clinical-monitor.high,
.clinical-monitor.critical {
  border-left-color: var(--red);
}

.clinical-monitor.medium {
  border-left-color: var(--amber);
}

.clinical-monitor.low {
  border-left-color: var(--green);
}

.monitor-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.monitor-grid div {
  min-height: 31px;
  padding: 4px 8px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 7px;
}

.monitor-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 1px;
}

.monitor-grid strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.clinical-monitor.high .monitor-status strong,
.clinical-monitor.critical .monitor-status strong {
  color: var(--red);
}

.monitor-status {
  border-color: rgba(255, 95, 109, 0.3);
  background: rgba(255, 95, 109, 0.09);
}

.doctor-sketchboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  width: 100%;
  min-width: 0;
  gap: 16px;
  align-items: stretch;
}

.nurse-room {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  font-size: 13.5px;
  line-height: 1.4;
}

.nurse-room .situation-title {
  margin-bottom: 9px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #eef5ff;
}

.nurse-room .situation-title-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 15px;
  color: #d8e7ff;
  background: rgba(110, 168, 255, 0.18);
  border: 1px solid rgba(110, 168, 255, 0.35);
}

.nurse-room button {
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
}

.nurse-room button.small {
  font-size: 12px;
  min-height: 28px;
  padding: 5px 10px;
}

.nurse-room .badge {
  font-size: 11.5px;
  min-height: 24px;
  padding: 3px 10px;
}

.nurse-room button[data-run="send-to-doctor"],
.nurse-room button[data-action-decision="Notify Doctor"],
.nurse-room button[data-action-decision="Mark Completed"] {
  border-color: rgba(110, 168, 255, 0.72);
  background: rgba(110, 168, 255, 0.2);
  color: #e7f1ff;
}

.nurse-room button[data-run="send-to-doctor"]:hover,
.nurse-room button[data-action-decision="Notify Doctor"]:hover,
.nurse-room button[data-action-decision="Mark Completed"]:hover {
  border-color: #7ca8e8;
  background: rgba(110, 168, 255, 0.28);
}

.workspace:has(.nurse-room) {
  padding: 12px 16px;
  max-width: none;
}

.nurse-room-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-shrink: 0;
}

.sketch-panel.nurse-top-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 12px 16px;
  border-radius: 14px;
  border-color: #2a3444;
  background: linear-gradient(165deg, rgba(21, 27, 35, 0.98), rgba(14, 19, 27, 0.98));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.nurse-room-top .nurse-top-card:first-child {
  padding-right: 150px;
}

.sketch-panel.nurse-case-header {
  justify-content: center;
  gap: 8px;
  min-height: 0;
  padding: 12px 16px;
  padding-right: 150px;
  background: linear-gradient(155deg, rgba(27, 45, 66, 0.98), rgba(12, 18, 28, 0.98));
  border-color: rgba(72, 214, 255, 0.26);
  border-left-width: 5px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), 0 0 24px rgba(72, 214, 255, 0.08);
}

.nurse-case-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-width: 0;
}

.nurse-case-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  min-width: 0;
}

.nurse-case-identity strong {
  color: #f2f8ff;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 850;
}

.nurse-case-identity span {
  color: #b9c7d8;
  font-size: 13px;
  font-weight: 700;
}

.nurse-case-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nurse-priority-badge,
.nurse-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nurse-priority-badge.high,
.nurse-priority-badge.critical {
  color: #ffd5db;
  background: rgba(255, 95, 109, 0.18);
  border-color: rgba(255, 95, 109, 0.52);
  box-shadow: 0 0 16px rgba(255, 95, 109, 0.1);
}

.nurse-priority-badge.medium {
  color: #ffe0a3;
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.48);
}

.nurse-priority-badge.low {
  color: #c9f9d5;
  background: rgba(126, 231, 135, 0.14);
  border-color: rgba(126, 231, 135, 0.42);
}

.nurse-status-badge.nurse-intake {
  color: #d7e6ff;
  background: rgba(110, 168, 255, 0.18);
  border-color: rgba(110, 168, 255, 0.5);
}

.nurse-status-badge.ready-for-doctor {
  color: #c9f9d5;
  background: rgba(126, 231, 135, 0.14);
  border-color: rgba(126, 231, 135, 0.45);
}

.nurse-status-badge.waiting-lab,
.nurse-status-badge.awaiting-physician-order {
  color: #ffe0a3;
  background: rgba(240, 180, 41, 0.15);
  border-color: rgba(240, 180, 41, 0.44);
}

.nurse-case-cc {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(72, 214, 255, 0.08);
  border: 1px solid rgba(72, 214, 255, 0.18);
}

.nurse-case-cc span {
  color: #9defff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.nurse-case-cc strong {
  color: #eef7ff;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 750;
}

.nurse-safety-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nurse-safety-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #b9c7d8;
  font-size: 12px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.nurse-safety-chips strong {
  color: #f3f8ff;
}

.nurse-top-card.high,
.nurse-top-card.critical {
  border-left: 4px solid var(--red);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 95, 109, 0.12);
}

.nurse-top-card.medium {
  border-left: 4px solid var(--amber);
}

.nurse-top-card.low {
  border-left: 4px solid var(--green);
}

.nurse-queue-back {
  position: absolute;
  top: auto;
  bottom: 12px;
  right: 12px;
}

.nurse-top-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.nurse-top-line strong {
  font-size: 22px;
  font-weight: 700;
}

.nurse-top-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sketch-panel.nurse-status-panel {
  padding: 10px 14px;
  background: linear-gradient(155deg, #141c28 0%, #0e131b 100%);
  border-color: rgba(110, 168, 255, 0.2);
  justify-content: stretch;
}

.nurse-journey-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.nurse-journey-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #97a6b8;
}

.journey-dot {
  width: 18px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
}

.journey-label {
  font-size: 14px;
  font-weight: 700;
}

.nurse-journey-stage.completed {
  color: #c9f9d5;
  border-color: rgba(126, 231, 135, 0.4);
  background: rgba(126, 231, 135, 0.1);
  box-shadow: 0 0 14px rgba(126, 231, 135, 0.08);
}

.nurse-journey-stage.current {
  color: #d7e6ff;
  border-color: rgba(110, 168, 255, 0.6);
  background: linear-gradient(135deg, rgba(110, 168, 255, 0.24), rgba(72, 214, 255, 0.12));
  box-shadow: 0 0 0 0 rgba(110, 168, 255, 0.35);
  animation: journeyPulse 1.6s ease-in-out infinite;
}

.nurse-journey-stage.pending {
  color: #8d98a6;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.journey-connector {
  color: #5f6b78;
  font-size: 16px;
  font-weight: 700;
}

@keyframes journeyPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(110, 168, 255, 0.35);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(110, 168, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(110, 168, 255, 0);
  }
}

.nurse-room-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 0;
}

.nurse-band-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: auto;
  padding: 14px;
  border-radius: 14px;
  overflow: visible;
  border-color: #2a3444;
  background: linear-gradient(170deg, rgba(18, 24, 34, 0.98), rgba(12, 17, 25, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.nurse-intake-panel {
  border-left: 5px solid rgba(72, 214, 255, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 24px rgba(72, 214, 255, 0.08);
}

.nurse-orders-panel {
  border-left: 5px solid rgba(177, 123, 255, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 24px rgba(177, 123, 255, 0.08);
}

.nurse-final-panel {
  border-left: 5px solid rgba(87, 222, 154, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 24px rgba(87, 222, 154, 0.08);
}

.nurse-final-panel.admit {
  border-left-color: rgba(110, 168, 255, 0.78);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 24px rgba(110, 168, 255, 0.08);
}

.nurse-final-panel.transfer {
  border-left-color: rgba(72, 214, 255, 0.78);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 24px rgba(72, 214, 255, 0.08);
}

.nurse-final-panel.procedure-surgery {
  border-left-color: rgba(177, 123, 255, 0.82);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24), 0 0 26px rgba(177, 123, 255, 0.1);
}

.nurse-band-scroll {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 0;
}

.nurse-intake-section {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  background: linear-gradient(170deg, rgba(20, 28, 40, 0.96), rgba(14, 20, 30, 0.96));
  border: 1px solid #314057;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nurse-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.nurse-field-grid .nurse-field.span-2 {
  grid-column: 1 / -1;
}

.nurse-vitals-form {
  display: grid;
  gap: 10px;
}

.nurse-vitals-form:not(.nurse-vitals-form--detailed) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nurse-vitals-form--detailed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.nurse-vital-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(8, 14, 22, 0.55);
  border: 1px solid rgba(72, 214, 255, 0.18);
  border-radius: 10px;
}

.nurse-vitals-form--detailed .nurse-vital-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.nurse-vital-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9fb2c6;
}

.nurse-vital-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.nurse-vital-input,
.nurse-vital-select {
  min-width: 72px;
  width: auto;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(72, 214, 255, 0.28);
  background: #0b121c;
  color: #e8f4ff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.nurse-vital-input--bp {
  min-width: 56px;
  width: 64px;
}

.nurse-vital-input::-webkit-outer-spin-button,
.nurse-vital-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.nurse-vital-select {
  min-width: 140px;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.nurse-vital-sep {
  color: #8fa3b8;
  font-size: 18px;
  font-weight: 600;
}

.nurse-vital-unit {
  font-size: 12px;
  font-weight: 600;
  color: #8fa3b8;
  white-space: nowrap;
}

.nurse-vital-row--bp .nurse-vital-control {
  gap: 6px;
}

@media (max-width: 900px) {
  .nurse-vitals-form:not(.nurse-vitals-form--detailed),
  .nurse-vitals-form--detailed {
    grid-template-columns: 1fr;
  }
}

.nurse-intake-section.complaint-section {
  background: linear-gradient(170deg, rgba(35, 60, 92, 0.42), rgba(13, 21, 32, 0.98));
  border-color: rgba(110, 168, 255, 0.34);
}

.nurse-intake-section.measurements-summary-section,
.nurse-intake-section.detailed-measurements-section {
  background: linear-gradient(170deg, rgba(30, 88, 105, 0.34), rgba(13, 21, 32, 0.98));
  border-color: rgba(72, 214, 255, 0.32);
}

.nurse-intake-section.safety-section {
  background: linear-gradient(170deg, rgba(103, 78, 25, 0.34), rgba(16, 20, 28, 0.98));
  border-color: rgba(240, 180, 41, 0.36);
}

.nurse-intake-section.ask-section {
  background: linear-gradient(170deg, rgba(73, 52, 108, 0.36), rgba(13, 21, 32, 0.98));
  border-color: rgba(177, 123, 255, 0.34);
}

.nurse-intake-section h4 {
  margin: 0;
  color: #dbe8fb;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.nurse-intake-section.complaint-section h4 {
  color: #b9d4ff;
}

.nurse-intake-section.measurements-summary-section h4,
.nurse-intake-section.detailed-measurements-section h4 {
  color: #bff5ff;
}

.nurse-intake-section.safety-section h4 {
  color: #ffe0a3;
}

.nurse-intake-section.ask-section h4 {
  color: #d9c6ff;
}

/* ---------- Nurse page visual refinement (Pharmacy design family) ---------- */
/* Accent borders: top stripe on each workflow panel (echoes existing left accent) */
.nurse-intake-panel {
  border-top: 3px solid rgba(72, 214, 255, 0.72);
}

.nurse-orders-panel {
  border-top: 3px solid rgba(177, 123, 255, 0.72);
}

.nurse-final-panel {
  border-top: 3px solid rgba(87, 222, 154, 0.72);
}

.nurse-final-panel.admit {
  border-top-color: rgba(110, 168, 255, 0.78);
}

.nurse-final-panel.transfer {
  border-top-color: rgba(72, 214, 255, 0.78);
}

.nurse-final-panel.procedure-surgery {
  border-top-color: rgba(177, 123, 255, 0.82);
}

/* Better visual grouping: divider under sub-section titles */
.nurse-room .nurse-intake-section h4,
.nurse-room .nurse-final-subcard h4,
.nurse-room .nurse-task-group h4 {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

/* Differentiated sub-cards: clearer edge + hover lift */
.nurse-room .nurse-final-subcard {
  border-left: 3px solid rgba(126, 231, 135, 0.34);
}

.nurse-room .nurse-final-subcard.required-actions-subcard {
  border-left-color: rgba(72, 214, 255, 0.34);
}

.nurse-room .nurse-final-subcard.prep-status-subcard {
  border-left-color: rgba(240, 180, 41, 0.34);
}

.nurse-room .nurse-task-card,
.nurse-room .nurse-final-subcard {
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nurse-room .nurse-task-card:hover,
.nurse-room .nurse-final-subcard:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.3);
}

/* More visible status badges */
.nurse-room .nurse-task-badge {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 12.5px;
}

.nurse-room-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.nurse-room-fields .span-2 {
  grid-column: 1 / -1;
}

.nurse-room-fields.vitals-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nurse-summary-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nurse-value-row {
  display: grid;
  gap: 3px;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: #0f1722;
  border: 1px solid #2f3f56;
}

.nurse-value-row.wide {
  grid-column: 1 / -1;
}

.nurse-value-row span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.nurse-value-row strong {
  color: #eef5ff;
  font-size: 13.5px;
  line-height: 1.3;
}

.nurse-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nurse-field.inline {
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.nurse-field.inline.textarea-row {
  align-items: start;
  grid-template-columns: minmax(96px, 0.34fr) minmax(0, 1fr);
}

.nurse-field span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nurse-field.inline span {
  justify-self: end;
  text-align: right;
}

.nurse-field input,
.nurse-field select,
.nurse-field textarea {
  width: 100%;
  min-height: 34px;
  padding: 8px 11px;
  color: var(--ink);
  background: #0f1722;
  border: 1px solid #2f3f56;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.4;
}

.nurse-field textarea {
  min-height: 52px;
  resize: vertical;
}

.nurse-room .nurse-note-label {
  margin-top: 0;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 800;
}

.nurse-ask-block {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.nurse-ask-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.nurse-ask-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  background: #0f1722;
  border: 1px solid #2f3f56;
  border-left: 3px solid #59636f;
  border-radius: 9px;
}

.nurse-ask-row.answered {
  border-left-color: var(--green);
}

.nurse-ask-row.unknown {
  border-left-color: var(--amber);
}

.nurse-ask-row p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
}

.nurse-ask-actions {
  display: flex;
  gap: 4px;
}

.nurse-ask-actions button.active {
  border-color: rgba(110, 168, 255, 0.5);
  background: rgba(110, 168, 255, 0.14);
  color: var(--accent-strong);
}

.nurse-vitals-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.nurse-measurement-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nurse-measurement-strip.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nurse-vital-readout {
  display: grid;
  gap: 3px;
  min-height: 0;
  padding: 9px 10px;
  background: #0f1722;
  border: 1px solid #2f3f56;
  border-radius: 10px;
  text-align: center;
}

.nurse-vital-readout.pain {
  background: linear-gradient(160deg, rgba(255, 95, 109, 0.18), rgba(15, 23, 34, 0.98));
  border-color: rgba(255, 95, 109, 0.42);
}

.nurse-vital-readout:has([data-monitor="bp"]) {
  background: linear-gradient(160deg, rgba(240, 180, 41, 0.17), rgba(15, 23, 34, 0.98));
  border-color: rgba(240, 180, 41, 0.34);
}

.nurse-vital-readout:has([data-monitor="spo2"]) {
  background: linear-gradient(160deg, rgba(72, 214, 255, 0.16), rgba(15, 23, 34, 0.98));
  border-color: rgba(72, 214, 255, 0.34);
}

.nurse-vital-readout:has([data-monitor="temp"]) {
  background: linear-gradient(160deg, rgba(240, 180, 41, 0.12), rgba(15, 23, 34, 0.98));
  border-color: rgba(240, 180, 41, 0.24);
}

.nurse-vital-readout span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.nurse-vital-readout strong {
  color: #f3f8ff;
  font-size: 19px;
  line-height: 1.15;
}

.nurse-vital-readout.pain strong {
  color: var(--red);
}

.nurse-vital-readout:has([data-monitor="bp"]) strong {
  color: #ffd47a;
}

.nurse-vital-readout:has([data-monitor="spo2"]) strong {
  color: #9defff;
}

.nurse-pain-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 95, 109, 0.08);
  border: 1px solid rgba(255, 95, 109, 0.24);
  border-radius: 10px;
}

.nurse-pain-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nurse-pain-row input[type="range"] {
  width: 100%;
  accent-color: var(--red);
}

.nurse-handoff-inline {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-muted);
}

.nurse-handoff-inline .handoff-note {
  grid-column: 1 / -1;
}

.nurse-handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nurse-handoff-actions button {
  min-height: 34px;
  flex: 1 1 auto;
}

.nurse-handoff-actions button.urgent {
  border-color: rgba(255, 95, 109, 0.45);
  background: rgba(255, 95, 109, 0.12);
  color: #ffb4bc;
}

.nurse-safety-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nurse-safety-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #2f3f56;
  background: #0f1722;
  color: var(--muted);
  font-size: 12px;
}

.nurse-safety-strip strong {
  color: var(--ink);
  font-size: 12.5px;
}

.handoff-section {
  border-color: rgba(110, 168, 255, 0.42);
  background: linear-gradient(170deg, rgba(25, 43, 65, 0.9), rgba(13, 23, 37, 0.96));
}

.nurse-handoff-summary {
  margin: 0;
  color: #c8d5e6;
  font-size: 12.5px;
  line-height: 1.45;
}

.nurse-orders-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.nurse-orders-panel .nursing-order-head .situation-title {
  margin-bottom: 0;
}

.nurse-orders-panel .nursing-order-list {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow: auto;
}

.nurse-task-group {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.nurse-task-group h4 {
  margin: 0;
  color: #dbe8fb;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.nurse-task-group.critical-procedure h4 {
  color: #ffb8bf;
}

.nurse-task-group.monitoring h4 {
  color: #ffe0a3;
}

.nurse-task-group.routine-coordination h4 {
  color: #b9d4ff;
}

.nurse-task-cards {
  display: grid;
  gap: 10px;
}

.nurse-task-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 10px;
  background: linear-gradient(170deg, rgba(18, 27, 39, 0.98), rgba(12, 19, 29, 0.98));
  border: 1px solid #34465f;
  border-left-width: 4px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.nurse-task-card.critical {
  border-left-color: rgba(255, 95, 109, 0.7);
  background: linear-gradient(170deg, rgba(70, 27, 43, 0.55), rgba(12, 19, 29, 0.98));
  border-color: rgba(255, 95, 109, 0.32);
}

.nurse-task-card.urgent {
  border-left-color: rgba(240, 180, 41, 0.7);
  background: linear-gradient(170deg, rgba(76, 59, 22, 0.48), rgba(12, 19, 29, 0.98));
  border-color: rgba(240, 180, 41, 0.32);
}

.nurse-task-card.routine {
  border-left-color: rgba(110, 168, 255, 0.55);
  background: linear-gradient(170deg, rgba(28, 49, 82, 0.5), rgba(12, 19, 29, 0.98));
  border-color: rgba(110, 168, 255, 0.28);
}

.nurse-task-card.reported-to-doctor {
  border-left-color: rgba(110, 168, 255, 0.85);
  background: rgba(110, 168, 255, 0.1);
}

.nurse-task-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nurse-task-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.nurse-task-head > div {
  min-width: 0;
}

.nurse-task-head strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.nurse-task-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.nurse-task-card p span {
  color: var(--muted);
}

.nurse-task-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nurse-task-details p,
.nurse-task-result p {
  display: grid;
  gap: 3px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #0f1722;
  border: 1px solid #2f3f56;
}

.nurse-task-details strong,
.nurse-task-result strong {
  color: #eef5ff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

.nurse-task-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid #40546e;
  background: #0f1722;
}

.nurse-task-badge.pending {
  color: var(--muted-2);
  border-color: rgba(150, 162, 177, 0.28);
  background: rgba(150, 162, 177, 0.1);
}

.nurse-task-badge.in-progress {
  color: #b9d4ff;
  border-color: rgba(110, 168, 255, 0.55);
  background: rgba(110, 168, 255, 0.14);
}

.nurse-task-badge.completed {
  color: #a6efbd;
  border-color: rgba(126, 231, 135, 0.45);
  background: rgba(126, 231, 135, 0.12);
}

.nurse-task-badge.reported-to-doctor {
  color: #9defff;
  border-color: rgba(72, 214, 255, 0.5);
  background: rgba(72, 214, 255, 0.12);
}

.nurse-task-badge.need-clarification {
  color: #ffe0a3;
  border-color: rgba(240, 180, 41, 0.55);
  background: rgba(240, 180, 41, 0.13);
}

.nurse-task-result {
  display: grid;
  gap: 2px;
}

.nurse-task-result span {
  color: var(--muted);
  font-size: 11.5px;
}

.nurse-task-note-input {
  display: grid;
  gap: 3px;
}

.nurse-task-note-input textarea {
  margin: 0;
  min-height: 48px;
  font-size: 13px;
  border-radius: 9px;
}

.nurse-task-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.nurse-task-actions button {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
}

.nurse-orders-panel .nursing-order-head > span,
.nurse-orders-panel .nursing-status-flow span,
.nurse-orders-panel .nurse-note-label,
.nurse-orders-panel .nurse-orders-empty {
  font-size: 12.5px;
}

.nurse-task-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.nurse-task-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 10px;
  background: #0f1722;
  border: 1px solid #2f3f56;
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 12px;
}

.nurse-task-summary strong {
  color: var(--ink);
}

.nurse-task-reported {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--blue);
  border: 1px solid rgba(110, 168, 255, 0.45);
  background: rgba(110, 168, 255, 0.1);
  font-size: 14px;
  font-weight: 700;
}

.nurse-note-readonly span {
  display: block;
  min-height: 30px;
  padding: 6px 8px;
  color: var(--ink);
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  line-height: 1.35;
}

.nurse-orders-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--muted-2);
  text-align: center;
  background: var(--panel-2);
  border: 1px dashed var(--line-muted);
  border-radius: 8px;
  line-height: 1.35;
}

.nurse-empty-slot {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted-2);
  font-size: 17px;
  text-align: center;
  background: var(--panel-2);
  border: 1px dashed var(--line-muted);
  border-radius: 10px;
}

.nurse-empty-slot.muted {
  min-height: 48px;
  font-size: 16px;
}

.nurse-disposition-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 12.5px;
}

.nurse-final-order-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.nurse-final-subcard {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(170deg, rgba(20, 28, 40, 0.96), rgba(14, 20, 30, 0.96));
  border: 1px solid #314057;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nurse-final-subcard.final-plan-subcard {
  background: linear-gradient(170deg, rgba(39, 88, 69, 0.38), rgba(14, 20, 30, 0.98));
  border-color: rgba(87, 222, 154, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 18px rgba(87, 222, 154, 0.08);
}

.nurse-final-panel.admit .final-plan-subcard {
  background: linear-gradient(170deg, rgba(35, 60, 92, 0.42), rgba(14, 20, 30, 0.98));
  border-color: rgba(110, 168, 255, 0.38);
}

.nurse-final-panel.transfer .final-plan-subcard {
  background: linear-gradient(170deg, rgba(30, 88, 105, 0.4), rgba(14, 20, 30, 0.98));
  border-color: rgba(72, 214, 255, 0.4);
}

.nurse-final-panel.procedure-surgery .final-plan-subcard {
  background: linear-gradient(170deg, rgba(73, 52, 108, 0.46), rgba(14, 20, 30, 0.98));
  border-color: rgba(177, 123, 255, 0.46);
}

.nurse-final-subcard.required-actions-subcard {
  background: linear-gradient(170deg, rgba(41, 55, 79, 0.48), rgba(14, 20, 30, 0.98));
  border-color: rgba(110, 168, 255, 0.25);
}

.nurse-final-subcard.prep-status-subcard {
  background: linear-gradient(170deg, rgba(103, 78, 25, 0.28), rgba(14, 20, 30, 0.98));
  border-color: rgba(240, 180, 41, 0.3);
}

.nurse-final-subcard.nurse-note-subcard {
  background: linear-gradient(170deg, rgba(31, 38, 50, 0.82), rgba(14, 20, 30, 0.98));
}

.nurse-final-subcard.progress-log-subcard {
  background: linear-gradient(170deg, rgba(28, 43, 57, 0.62), rgba(14, 20, 30, 0.98));
  border-color: rgba(72, 214, 255, 0.22);
}

.nurse-final-subcard.action-buttons-subcard {
  background: linear-gradient(170deg, rgba(35, 60, 92, 0.28), rgba(14, 20, 30, 0.98));
  border-color: rgba(110, 168, 255, 0.25);
}

.nurse-final-order-main {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.nurse-final-subcard h4 {
  margin: 0;
  color: #dbe8fb;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.final-plan-subcard h4 {
  color: #bbf7d0;
}

.nurse-final-panel.admit .final-plan-subcard h4 {
  color: #b9d4ff;
}

.nurse-final-panel.transfer .final-plan-subcard h4,
.progress-log-subcard h4 {
  color: #bff5ff;
}

.nurse-final-panel.procedure-surgery .final-plan-subcard h4 {
  color: #d9c6ff;
}

.prep-status-subcard h4 {
  color: #ffe0a3;
}

.nurse-final-order-main strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.final-plan-subcard strong {
  color: #d8ffe5;
}

.nurse-final-panel.admit .final-plan-subcard strong {
  color: #dbe8ff;
}

.nurse-final-panel.transfer .final-plan-subcard strong {
  color: #d9fbff;
}

.nurse-final-panel.procedure-surgery .final-plan-subcard strong {
  color: #eadfff;
}

.nurse-final-order-main span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.nurse-final-actions-section,
.nurse-prep-status-section {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.nurse-final-actions-section h4,
.nurse-prep-status-section h4 {
  margin: 0;
  color: #dbe8fb;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.nurse-final-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.nurse-check-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 10px;
  text-align: left;
  color: var(--muted-2);
  background: var(--panel-3);
  border: 1px solid #2f3f56;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.35;
}

.nurse-check-item span {
  width: 16px;
  text-align: center;
  font-weight: 700;
}

.nurse-check-item.done {
  color: #c9f9d5;
  border-color: rgba(126, 231, 135, 0.34);
  background: rgba(126, 231, 135, 0.08);
}

.nurse-final-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.nurse-final-actions button {
  min-height: 32px;
  padding: 7px 12px;
}

.nurse-prep-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.nurse-prep-status span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid #2f3f56;
  background: #0f1722;
  color: var(--muted-2);
  font-size: 12px;
}

.nurse-prep-status span:has(em) {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.12), rgba(15, 23, 34, 0.98));
}

.nurse-prep-status em {
  color: var(--muted);
  font-style: normal;
}

.nurse-exec-note {
  margin: 0;
}

.nurse-exec-note textarea {
  margin: 0;
  min-height: 72px;
  font-size: 13px;
  line-height: 1.45;
}

.nurse-note-log-section {
  display: grid;
  gap: 9px;
  flex: 1 1 auto;
  min-height: 0;
}

.nurse-comm-log {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #2f3f56;
  background: #0f1722;
}

.nurse-comm-log span {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.nurse-escalation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.nurse-final-checklist--mock li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.nurse-final-checklist--mock li span {
  color: var(--muted);
  flex: 0 0 auto;
}

.nurse-final-panel.awaiting-execution {
  border-color: rgba(240, 180, 41, 0.32);
}

.nurse-final-panel.ready,
.nurse-final-panel.home-follow-up {
  border-color: rgba(56, 189, 148, 0.32);
}

.nurse-final-state-card--waiting {
  border-color: rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.08);
}

.nurse-final-state-card--ready {
  border-color: rgba(56, 189, 148, 0.35);
}

.nurse-final-state-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
}

.nurse-final-state-card > span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.nurse-final-disposition-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.nurse-final-disposition-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.nurse-final-disposition-value {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.nurse-final-ready-status {
  display: block;
  margin-top: 6px;
  color: #38bd94;
  font-size: 11px;
}

.nurse-outstanding-task-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nurse-outstanding-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  font-size: 11px;
}

.nurse-outstanding-task strong {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
}

.nurse-outstanding-task span {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  color: #f0b429;
  font-size: 10px;
  font-weight: 700;
}

.nurse-outstanding-task.status-in-progress span {
  border-color: rgba(56, 189, 148, 0.35);
  color: #38bd94;
}

.nurse-final-transition-hint {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(var(--doctor-card-accent), 0.24);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.execution-results-subcard {
  border-color: rgba(56, 189, 148, 0.28);
}

.nurse-execution-results {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nurse-execution-results li {
  position: relative;
  padding: 7px 8px 7px 22px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 148, 0.22);
  background: rgba(56, 189, 148, 0.08);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.nurse-execution-results li::before {
  content: "✓";
  position: absolute;
  left: 8px;
  color: #38bd94;
  font-weight: 700;
}

.nurse-bottom-actions {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

@media (max-width: 980px) {
  .nurse-room-band {
    grid-template-columns: 1fr;
  }

  .nurse-band-card {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .nurse-room-top {
    grid-template-columns: 1fr;
  }

  .nurse-vitals-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sketch-panel {
  min-width: 0;
  height: 100%;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  overflow: visible;
}

.sketch-panel h2 {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.symptoms-panel {
  grid-area: symptoms;
}

.situation-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--ink);
  text-transform: none;
}

.situation-title-number {
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}

.situation-list {
  display: grid;
  gap: 6px;
}

.situation-row {
  display: grid;
  grid-template-columns: 24px minmax(110px, 0.48fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 7px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 5px;
  line-height: 1.35;
}

.situation-number {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.situation-label {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.situation-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.ai-assessment-list {
  gap: 7px;
}

.ai-assessment-row {
  grid-template-columns: 24px minmax(110px, 0.42fr) minmax(0, 1fr);
}

.ai-assessment-row strong {
  color: var(--muted-2);
  font-weight: 600;
  line-height: 1.45;
}

.evidence-panel {
  grid-area: evidence;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  overflow: hidden;
}

.ai-assessment-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.ai-assessment-current {
  flex: 0 0 48%;
  max-height: 48%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 123, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(139, 123, 255, 0.1), rgba(255, 255, 255, 0) 62%),
    var(--panel-2);
}

.ai-assessment-evolution {
  flex: 1 1 52%;
  min-height: 52%;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(139, 123, 255, 0.14);
  background: rgba(8, 14, 22, 0.42);
  overflow: hidden;
}

.ai-assessment-subhead {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c8bfff;
}

.ai-assessment-subhead--minor {
  color: #8fa3b8;
  margin-bottom: 6px;
  flex: 0 0 auto;
}

.ai-current-hypothesis {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.ai-hypothesis-name {
  font-size: 18px;
  line-height: 1.15;
  color: var(--ink);
}

.ai-hypothesis-confidence {
  font-size: 12px;
  font-weight: 700;
  color: #b7adff;
}

.ai-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ai-current-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ai-block-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9fb2c6;
}

.ai-marker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.ai-marker-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted-2);
}

.ai-marker {
  font-size: 12px;
  line-height: 1.2;
}

.ai-marker--ok {
  color: #7ee78a;
}

.ai-marker--miss {
  color: #f0b429;
}

.ai-current-recommendation p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 600;
}

.ai-evolution-timeline {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0;
  align-content: start;
  padding-right: 2px;
}

.ai-evolution-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-height: 0;
}

.ai-evolution-marker {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 999px;
  border: 2px solid rgba(139, 123, 255, 0.45);
  background: rgba(139, 123, 255, 0.2);
}

.ai-evolution-step.is-current .ai-evolution-marker {
  border-color: #b7adff;
  background: #b7adff;
  box-shadow: 0 0 10px rgba(183, 173, 255, 0.45);
}

.ai-evolution-step.is-past .ai-evolution-content {
  opacity: 0.72;
}

.ai-evolution-version {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9fb2c6;
  line-height: 1.25;
}

.ai-evolution-step.is-current .ai-evolution-version {
  color: #d8ceff;
}

.ai-evolution-summary {
  margin: 1px 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted-2);
}

.ai-evolution-step.is-current .ai-evolution-summary {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.ai-evolution-step.is-past .ai-evolution-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-evolution-connector {
  margin: 0 0 0 3px;
  font-size: 10px;
  line-height: 1;
  color: rgba(139, 123, 255, 0.55);
  padding: 0;
}

.ai-evolution-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted-2);
}

@media (max-width: 900px) {
  .ai-current-grid {
    grid-template-columns: 1fr;
  }
}

.suggested-action-list {
  display: grid;
  gap: 8px;
}

.action-risk-strip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-muted);
  background: var(--panel-3);
}

.action-risk-strip span {
  font-size: 11px;
  font-weight: 700;
}

.action-risk-strip.high {
  color: #ffb8bf;
  border-color: rgba(255, 95, 109, 0.5);
  background: rgba(255, 95, 109, 0.08);
}

.action-risk-strip.medium {
  color: #f7d98b;
  border-color: rgba(240, 180, 41, 0.5);
  background: rgba(240, 180, 41, 0.08);
}

.action-risk-strip.low {
  color: #b7f5bf;
  border-color: rgba(126, 231, 135, 0.45);
  background: rgba(126, 231, 135, 0.08);
}

.suggested-action-card {
  position: relative;
  padding: 12px 34px 12px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.suggested-action-card:hover {
  border-color: #3b4656;
  background: #151d27;
}

.suggested-action-card.safety-critical {
  border-color: rgba(255, 95, 109, 0.45);
  background: rgba(255, 95, 109, 0.06);
}

.suggested-action-card.selected {
  border-color: rgba(110, 168, 255, 0.72);
  background: rgba(110, 168, 255, 0.12);
}

.suggested-action-card.selected.safety-critical {
  border-color: rgba(255, 95, 109, 0.72);
  background: rgba(255, 95, 109, 0.1);
}

.suggested-actions-panel.high {
  border-color: rgba(255, 95, 109, 0.5);
}

.suggested-actions-panel.medium {
  border-color: rgba(240, 180, 41, 0.5);
}

.suggested-actions-panel.low {
  border-color: rgba(126, 231, 135, 0.42);
}

.suggested-actions-panel.high .suggested-action-card {
  border-color: rgba(255, 95, 109, 0.32);
  background: rgba(255, 95, 109, 0.055);
}

.suggested-actions-panel.high .suggested-action-card:hover {
  border-color: rgba(255, 95, 109, 0.58);
  background: rgba(255, 95, 109, 0.085);
}

.suggested-actions-panel.medium .suggested-action-card {
  border-color: rgba(240, 180, 41, 0.32);
  background: rgba(240, 180, 41, 0.055);
}

.suggested-actions-panel.medium .suggested-action-card:hover {
  border-color: rgba(240, 180, 41, 0.58);
  background: rgba(240, 180, 41, 0.085);
}

.suggested-actions-panel.high .suggested-action-card.selected,
.suggested-actions-panel.medium .suggested-action-card.selected {
  border-color: rgba(110, 168, 255, 0.72);
  background: rgba(110, 168, 255, 0.12);
}

.selected-check {
  position: absolute;
  right: 9px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(110, 168, 255, 0.22);
  color: var(--ink);
  font-size: 12px;
  border: 1px solid rgba(110, 168, 255, 0.58);
}

.suggested-action-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.suggested-action-main strong {
  color: var(--ink);
  font-size: 13px;
}

.suggested-action-main span,
.suggested-action-card p span,
.selected-plan span {
  color: var(--muted);
  font-size: 11px;
}

.suggested-action-card p {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.32;
  margin: 5px 0 0;
}

.quick-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.quick-reasons button,
.add-custom-action {
  min-height: 24px;
  padding: 4px 7px;
  font-size: 11px;
}

.add-custom-action {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.critical-reason-panel {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 9px;
  background: rgba(240, 180, 41, 0.09);
  border: 1px solid rgba(240, 180, 41, 0.44);
  border-radius: 8px;
}

.critical-reason-panel strong {
  color: var(--ink);
  font-size: 12px;
}

.critical-reason-panel span,
.selected-plan em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
}

.skip-reason-note {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.skip-reason-note textarea {
  min-height: 58px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--ink);
  padding: 7px;
}

.no-urgent-actions {
  display: grid;
  gap: 7px;
  padding: 10px;
  background: rgba(126, 231, 135, 0.06);
  border: 1px solid rgba(126, 231, 135, 0.28);
  border-radius: 8px;
}

.no-urgent-actions strong {
  color: var(--ink);
  font-size: 13px;
}

.no-urgent-actions span,
.no-urgent-actions em {
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.no-urgent-actions p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.disposition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(68px, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.disposition-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 10px;
  text-align: center;
}

.disposition-card:hover {
  background: #151d27;
  border-color: #3b4656;
}

.disposition-card span {
  font-size: 25px;
  line-height: 1;
}

.disposition-card strong {
  color: var(--ink);
  font-size: 15px;
}

.disposition-card.wide {
  grid-column: 1 / -1;
}

.green-action-example {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  padding: 9px;
  background: rgba(126, 231, 135, 0.055);
  border: 1px dashed rgba(126, 231, 135, 0.38);
  border-radius: 8px;
}

.green-action-example > span {
  color: #b7f5bf;
  font-size: 11px;
  font-weight: 700;
}

.green-action-example strong {
  color: var(--ink);
  font-size: 12px;
}

.green-action-example p,
.green-action-example em {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
}

.selected-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding: 7px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 7px;
}

.selected-plan strong {
  color: var(--ink);
  font-size: 12px;
  padding: 3px 6px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
}

.confirm-plan {
  width: 100%;
  margin-top: 8px;
  border-color: rgba(110, 168, 255, 0.6);
  background: rgba(110, 168, 255, 0.14);
}

.evidence-panel {
  grid-area: evidence;
}

.assessment-panel {
  grid-area: assessment;
}

.exam-panel {
  grid-area: exam;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  overflow: hidden;
}

.doctor-section4-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.doctor-execution-status,
.doctor-final-disposition {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line-muted);
}

.doctor-execution-status {
  flex: 1 1 50%;
  min-height: 280px;
  padding: 14px 16px 16px;
  background:
    linear-gradient(180deg, rgba(72, 214, 190, 0.1), rgba(255, 255, 255, 0) 62%),
    var(--panel-2);
  border-color: rgba(72, 214, 190, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doctor-final-disposition {
  flex: 1 1 50%;
  padding: 12px 14px;
  background: rgba(8, 14, 22, 0.42);
  border-color: rgba(72, 214, 190, 0.14);
}

.doctor-subsection-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(72, 214, 190, 0.16);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.doctor-execution-status .doctor-subsection-head {
  font-size: 14px;
  color: #9ef5e8;
  border-bottom-color: rgba(72, 214, 190, 0.3);
}

.doctor-execution-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 0;
}

.doctor-execution-body--active {
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.doctor-execution-body--active .doctor-execution-task-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.doctor-execution-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.doctor-execution-body--complete .doctor-execution-footer {
  padding-bottom: 10px;
}

.doctor-execution-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.doctor-execution-task {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(72, 214, 190, 0.16);
  background: rgba(8, 14, 22, 0.45);
}

.doctor-execution-task-icon {
  font-size: 16px;
  line-height: 1;
  text-align: center;
  color: #8fa3b8;
}

.doctor-execution-task.status-in_progress .doctor-execution-task-icon {
  color: #7fe8d8;
}

.doctor-execution-task.status-completed .doctor-execution-task-icon {
  color: #7ee78a;
}

.doctor-execution-task-name {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}

.doctor-execution-task-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.doctor-execution-task.status-in_progress .doctor-execution-task-status {
  color: #7fe8d8;
}

.doctor-execution-task.status-completed .doctor-execution-task-status {
  color: #7ee78a;
}

.doctor-execution-complete {
  margin: 0;
  padding: 17px 12px;
  border-radius: 8px;
  border: 1px solid rgba(126, 231, 135, 0.32);
  background: rgba(126, 231, 135, 0.08);
  color: #b7f5bf;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.doctor-execution-progress + .doctor-execution-complete {
  margin-top: 0;
}

.doctor-disposition-lock-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.4;
}

.doctor-final-disposition--locked .doctor-subsection-head {
  color: #6f8194;
}

.disposition-card:disabled,
.disposition-card.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.add-medication:disabled,
.add-medication.disabled,
.sign-med-order:disabled,
.sign-med-order.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.draft-order-card.is-locked {
  cursor: default;
  opacity: 0.72;
}

.draft-order-card.is-locked .adjust-medication:disabled {
  pointer-events: none;
}

.doctor-execution-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.doctor-execution-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.45;
}

.doctor-execution-progress {
  margin: 0;
  padding-top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #7fe8d8;
}

.doctor-final-disposition .disposition-list {
  flex: 1;
  min-height: 0;
  grid-auto-rows: minmax(52px, 1fr);
}

.doctor-sketchboard .exam-panel .doctor-execution-status .doctor-subsection-head {
  color: var(--doctor-card-accent-title);
}

.doctor-sketchboard .exam-panel .doctor-final-disposition .doctor-subsection-head {
  color: #8fa3b8;
  border-bottom-color: rgba(72, 214, 190, 0.12);
}

.doctor-sketchboard .evidence-panel .ai-assessment-subhead {
  color: var(--doctor-card-accent-title);
}

.doctor-sketchboard .evidence-panel .ai-assessment-subhead--minor {
  color: #8fa3b8;
}

.history-panel {
  grid-area: history;
}

.combined-history-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.history-title {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.medical-history-lines {
  display: grid;
  gap: 7px;
}

.medical-history-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 7px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 7px;
}

.medical-history-line span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.medical-history-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medical-history-line button {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
}

.history-panel details {
  margin-top: 9px;
}

.medical-history-section {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-muted);
}

.missing-panel {
  grid-area: missing;
}

.empty-bottom-panel {
  min-height: 220px;
}

.doctor-assessment-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.doctor-owned-note,
.doctor-owned-banner {
  padding: 10px 12px;
  color: var(--muted-2);
  background: linear-gradient(90deg, rgba(var(--doctor-card-accent), 0.14), rgba(8, 14, 22, 0.35) 72%);
  border: 1px solid rgba(var(--doctor-card-accent), 0.28);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.doctor-owned-banner strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
}

.doctor-owned-banner span {
  color: var(--muted-2);
  font-size: 11px;
}

.physician-owned-tag {
  margin-left: 6px;
  color: rgba(var(--doctor-card-accent), 1);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.doctor-assessment-fields {
  display: grid;
  gap: 8px;
}

.doctor-assessment-fields--locked {
  opacity: 0.72;
}

.doctor-field-owned > span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.doctor-field-primary textarea {
  min-height: 128px;
  font-size: 13px;
  line-height: 1.45;
  border-color: rgba(var(--doctor-card-accent), 0.35);
  background:
    linear-gradient(180deg, rgba(var(--doctor-card-accent), 0.08), rgba(255, 255, 255, 0) 58%),
    var(--panel-2);
}

.doctor-assist-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.doctor-assist-btn {
  font-size: 11px;
  opacity: 0.9;
}

.doctor-assist-hint {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.doctor-assessment-disposition-context {
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.35;
}

.doctor-assessment-disposition-context strong {
  color: var(--ink);
  font-weight: 700;
}

.assessment-field select {
  min-height: 34px;
  margin: 0;
  padding: 8px;
  font-size: 12px;
}

.assessment-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.assessment-field input,
.assessment-field textarea {
  min-height: 34px;
  margin: 0;
  padding: 8px;
  font-size: 12px;
}

.assessment-field textarea {
  min-height: 72px;
  margin: 0;
  resize: vertical;
}

.assessment-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: auto;
}

.doctor-assessment-waiting {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(var(--doctor-card-accent), 0.28);
  background: rgba(8, 14, 22, 0.35);
}

.doctor-assessment-waiting strong {
  color: var(--ink);
  font-size: 12px;
}

.doctor-assessment-waiting p {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.doctor-assessment-block {
  display: grid;
  gap: 7px;
}

.doctor-assessment-block-title {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.doctor-conclusion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.doctor-conclusion-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: var(--panel-2);
}

.doctor-conclusion-item--wide {
  grid-column: 1 / -1;
}

.doctor-conclusion-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.doctor-conclusion-item strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.doctor-confidence.high {
  color: #38bd94;
}

.doctor-confidence.moderate,
.doctor-confidence.medium {
  color: #f0b429;
}

.doctor-reasoning-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doctor-reasoning-list li {
  position: relative;
  padding: 6px 8px 6px 22px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.doctor-reasoning-list li::before {
  content: "–";
  position: absolute;
  left: 8px;
  color: rgba(var(--doctor-card-accent), 0.9);
  font-weight: 700;
}

.doctor-assessment-narrative {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: var(--panel-2);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.doctor-assessment-patient {
  color: #dbe8fb;
}

.assessment-action-row button.disabled,
.assessment-action-row button:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.risk-insight-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}

.insight-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.insight-tag-row span {
  padding: 3px 7px;
  color: var(--muted-2);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 10px;
}

.longitudinal-findings {
  display: grid;
  gap: 7px;
}

.longitudinal-finding {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.longitudinal-finding strong {
  color: var(--muted);
  font-size: 12px;
}

.longitudinal-finding div {
  display: grid;
  gap: 4px;
}

.longitudinal-finding div span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.longitudinal-finding p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.insight-evidence {
  margin-top: 9px;
}

.insight-evidence summary {
  color: var(--muted-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.insight-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.insight-sources span {
  padding: 3px 6px;
  color: var(--muted-2);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 10px;
}

.risk-insight-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 8px;
  margin-bottom: 8px;
}

.risk-insight-block {
  display: grid;
  gap: 5px;
  padding: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.risk-insight-block span,
.ai-insight-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.risk-insight-block strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.trend-block div {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.trend-block div strong {
  min-width: 34px;
  padding: 4px 6px;
  text-align: center;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 6px;
}

.risk-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.risk-signal-row span {
  padding: 4px 7px;
  color: #f7d98b;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.32);
  border-radius: 999px;
  font-size: 11px;
}

.ai-insight-list {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.ai-insight-list p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.35;
}

.next-panel {
  grid-area: next;
  border-color: rgba(110, 168, 255, 0.34);
}

.nursing-order-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.nursing-order-head .risk-insight-title {
  margin-bottom: 0;
}

.nursing-order-head > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--muted-2);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 11px;
}

.nursing-order-list {
  display: grid;
  gap: 7px;
}

.nursing-order-card {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 9px 34px 9px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-left-width: 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.nursing-order-card.care-tasks {
  border-color: rgba(240, 180, 41, 0.4);
  background: rgba(240, 180, 41, 0.055);
}

.nursing-order-card.procedures {
  border-color: rgba(255, 95, 109, 0.46);
  background: rgba(255, 95, 109, 0.06);
}

.nursing-order-card.coordination {
  border-color: rgba(110, 168, 255, 0.38);
  background: rgba(110, 168, 255, 0.055);
}

.nursing-order-card.critical {
  box-shadow: inset 0 0 0 1px rgba(255, 95, 109, 0.22);
}

.nursing-order-card.urgent {
  box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.18);
}

.nursing-order-card.routine {
  opacity: 0.9;
}

.nursing-order-card.care-tasks div span {
  color: #f7d98b;
}

.nursing-order-card.procedures div span {
  color: #ffb8bf;
}

.nursing-order-card.coordination div span {
  color: #b9d4ff;
}

.nursing-order-card:hover {
  filter: brightness(1.12);
}

.nursing-order-card.selected {
  outline: 2px solid rgba(110, 168, 255, 0.72);
  outline-offset: -2px;
}

.nursing-order-card div {
  display: grid;
  gap: 2px;
}

.nursing-order-card div span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.nursing-order-card strong {
  color: var(--ink);
  font-size: 12px;
}

.nursing-order-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.3;
}

.nursing-order-card p span {
  color: var(--muted);
}

.add-nursing-order,
.send-to-nurse {
  width: 100%;
  margin-top: 8px;
}

.nurse-note-label {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.nurse-note-label input {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--ink);
  padding: 6px 8px;
}

.nursing-status-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.nursing-status-flow span {
  padding: 3px 6px;
  color: var(--muted);
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  font-size: 10px;
}

.nursing-status-flow span.active {
  color: var(--ink);
  border-color: rgba(110, 168, 255, 0.58);
  background: rgba(110, 168, 255, 0.13);
}

.send-to-nurse {
  border-color: rgba(110, 168, 255, 0.6);
  background: rgba(110, 168, 255, 0.14);
}

.orders-panel {
  grid-area: orders;
}

.doctor-sketchboard > .sketch-panel {
  grid-area: auto;
}

.doctor-sketchboard .symptoms-panel {
  order: 1;
}

.doctor-sketchboard .evidence-panel {
  order: 2;
}

.doctor-sketchboard .assessment-panel {
  order: 3;
}

.doctor-sketchboard .exam-panel {
  order: 4;
}

.doctor-sketchboard .history-panel {
  order: 5;
}

.doctor-sketchboard .missing-panel {
  order: 6;
}

.doctor-sketchboard .next-panel {
  order: 7;
}

.doctor-sketchboard .orders-panel {
  order: 8;
}

.doctor-sketchboard .sketch-panel {
  --doctor-card-accent: 110, 168, 255;
  --doctor-card-accent-soft: rgba(var(--doctor-card-accent), 0.1);
  --doctor-card-accent-border: rgba(var(--doctor-card-accent), 0.34);
  --doctor-card-accent-title: rgb(var(--doctor-card-accent));
  background:
    linear-gradient(180deg, rgba(var(--doctor-card-accent), 0.055), rgba(255, 255, 255, 0) 42%),
    var(--panel);
  border-color: var(--doctor-card-accent-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 20px rgba(var(--doctor-card-accent), 0.055);
}

.doctor-sketchboard .symptoms-panel {
  --doctor-card-accent: 110, 168, 255;
}

.doctor-sketchboard .evidence-panel {
  --doctor-card-accent: 139, 123, 255;
}

.doctor-sketchboard .assessment-panel {
  --doctor-card-accent: 255, 95, 109;
}

.doctor-sketchboard .exam-panel {
  --doctor-card-accent: 72, 214, 190;
}

.doctor-sketchboard .history-panel {
  --doctor-card-accent: 72, 214, 255;
}

.doctor-sketchboard .missing-panel {
  --doctor-card-accent: 240, 180, 41;
}

.doctor-sketchboard .next-panel {
  --doctor-card-accent: 255, 138, 76;
}

.doctor-sketchboard .orders-panel {
  --doctor-card-accent: 87, 222, 154;
}

.doctor-sketchboard .sketch-panel .situation-title {
  color: var(--doctor-card-accent-title);
}

.doctor-sketchboard .sketch-panel .situation-title-number {
  color: var(--doctor-card-accent-title);
  text-shadow: 0 0 14px rgba(var(--doctor-card-accent), 0.18);
}

.doctor-sketchboard .sketch-panel .situation-row,
.doctor-sketchboard .sketch-panel .suggested-action-card,
.doctor-sketchboard .sketch-panel .disposition-card,
.doctor-sketchboard .sketch-panel .doctor-execution-status,
.doctor-sketchboard .sketch-panel .doctor-execution-task,
.doctor-sketchboard .sketch-panel .ai-assessment-current,
.doctor-sketchboard .sketch-panel .ai-assessment-evolution,
.doctor-sketchboard .sketch-panel .medical-history-line,
.doctor-sketchboard .sketch-panel .longitudinal-finding,
.doctor-sketchboard .sketch-panel .doctor-owned-note,
.doctor-sketchboard .sketch-panel .doctor-owned-banner,
.doctor-sketchboard .sketch-panel .doctor-assessment-waiting,
.doctor-sketchboard .sketch-panel .doctor-assist-hint,
.doctor-sketchboard .sketch-panel .care-exec-card,
.doctor-sketchboard .sketch-panel .care-exec-zone,
.doctor-sketchboard .sketch-panel .care-exec-summary,
.doctor-sketchboard .sketch-panel .care-exec-timeline li,
.doctor-sketchboard .sketch-panel .draft-order-card,
.doctor-sketchboard .sketch-panel .nursing-order-card,
.doctor-sketchboard .sketch-panel .selected-plan,
.doctor-sketchboard .sketch-panel .med-context-row,
.doctor-sketchboard .sketch-panel .med-safety-strip,
.doctor-sketchboard .sketch-panel .assessment-field input,
.doctor-sketchboard .sketch-panel .assessment-field textarea,
.doctor-sketchboard .sketch-panel .assessment-field select,
.doctor-sketchboard .sketch-panel .nurse-note-label input {
  background:
    linear-gradient(180deg, rgba(var(--doctor-card-accent), 0.06), rgba(255, 255, 255, 0) 58%),
    var(--panel-2);
  border-color: rgba(var(--doctor-card-accent), 0.2);
}

.doctor-sketchboard .sketch-panel .section-label:not(.situation-title),
.doctor-sketchboard .sketch-panel .situation-number,
.doctor-sketchboard .sketch-panel .insight-tag-row span,
.doctor-sketchboard .sketch-panel .action-risk-strip,
.doctor-sketchboard .sketch-panel .nursing-order-head > span,
.doctor-sketchboard .sketch-panel .nursing-order-head-actions > span {
  color: var(--doctor-card-accent-title);
  background: rgba(var(--doctor-card-accent), 0.09);
  border-color: rgba(var(--doctor-card-accent), 0.28);
}

.doctor-sketchboard .sketch-panel .selected,
.doctor-sketchboard .sketch-panel .suggested-action-card.selected,
.doctor-sketchboard .sketch-panel .draft-order-card.selected,
.doctor-sketchboard .sketch-panel .nursing-order-card.selected {
  background: rgba(var(--doctor-card-accent), 0.13);
  border-color: rgba(var(--doctor-card-accent), 0.58);
  outline-color: rgba(var(--doctor-card-accent), 0.72);
}

.doctor-sketchboard .sketch-panel .selected-check,
.doctor-sketchboard .sketch-panel .selected-plan strong {
  background: rgba(var(--doctor-card-accent), 0.18);
  border-color: rgba(var(--doctor-card-accent), 0.5);
}

.doctor-sketchboard .sketch-panel button.secondary:hover,
.doctor-sketchboard .sketch-panel .disposition-card:hover,
.doctor-sketchboard .sketch-panel .suggested-action-card:hover {
  border-color: rgba(var(--doctor-card-accent), 0.48);
  background: rgba(var(--doctor-card-accent), 0.1);
}

.doctor-sketchboard .sketch-panel .confirm-plan,
.doctor-sketchboard .sketch-panel .sign-med-order,
.doctor-sketchboard .sketch-panel .send-to-nurse {
  border-color: rgba(var(--doctor-card-accent), 0.52);
  background: rgba(var(--doctor-card-accent), 0.13);
  box-shadow: 0 0 16px rgba(var(--doctor-card-accent), 0.07);
}

.doctor-sketchboard .history-panel .insight-tag-row span {
  color: #bff5ff;
}

.doctor-sketchboard .missing-panel .med-safety-strip .warn {
  color: #ffe0a3;
  border-color: rgba(240, 180, 41, 0.38);
  background: rgba(240, 180, 41, 0.1);
}

.doctor-sketchboard .orders-panel .doctor-owned-note {
  border-left-color: rgba(var(--doctor-card-accent), 0.72);
}

/* ---------- Doctor page visual refinement (Pharmacy design family) ---------- */
/* Accent borders + stronger card hierarchy */
.doctor-sketchboard .sketch-panel {
  border-width: 1px;
  border-top-width: 3px;
  border-top-color: rgb(var(--doctor-card-accent));
  border-radius: 16px;
  padding: 16px 18px;
}

/* Larger, grouped section titles with accent divider */
.doctor-sketchboard .sketch-panel .situation-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(var(--doctor-card-accent), 0.22);
}

/* Circular numbered badges (matches nurse/pharmacy badge language) */
.doctor-sketchboard .sketch-panel .situation-title-number {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 999px;
  font-size: 15px;
  text-shadow: none;
  background: rgba(var(--doctor-card-accent), 0.16);
  border: 1px solid rgba(var(--doctor-card-accent), 0.42);
}

.doctor-sketchboard .situation-title-with-trace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.doctor-sketchboard .situation-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doctor-sketchboard .nursing-order-head .situation-title-with-trace,
.doctor-sketchboard .med-order-head .situation-title-with-trace {
  flex: 1;
  margin-bottom: 0;
}

.doctor-sketchboard .nursing-order-head,
.doctor-sketchboard .med-order-head {
  align-items: flex-start;
}

.doctor-sketchboard .med-order-head-actions,
.doctor-sketchboard .nursing-order-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

/* More visible status / mode badges */
.doctor-sketchboard .sketch-panel .action-risk-strip,
.doctor-sketchboard .sketch-panel .nursing-order-head > span,
.doctor-sketchboard .sketch-panel .nursing-order-head-actions > span,
.doctor-sketchboard .sketch-panel .section-label:not(.situation-title) {
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 999px;
  padding: 3px 11px;
  border-width: 1px;
  border-style: solid;
}

/* Differentiated sub-cards: clearer separation + accent edge */
.doctor-sketchboard .sketch-panel .situation-row,
.doctor-sketchboard .sketch-panel .suggested-action-card,
.doctor-sketchboard .sketch-panel .medical-history-line,
.doctor-sketchboard .sketch-panel .longitudinal-finding,
.doctor-sketchboard .sketch-panel .draft-order-card,
.doctor-sketchboard .sketch-panel .nursing-order-card {
  border-radius: 10px;
  border-left: 3px solid rgba(var(--doctor-card-accent), 0.4);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.doctor-sketchboard .sketch-panel .suggested-action-card:hover,
.doctor-sketchboard .sketch-panel .draft-order-card:hover,
.doctor-sketchboard .sketch-panel .nursing-order-card:hover {
  transform: translateY(-1px);
  border-left-color: rgb(var(--doctor-card-accent));
}

/* Selected sub-cards get a fuller accent edge */
.doctor-sketchboard .sketch-panel .suggested-action-card.selected,
.doctor-sketchboard .sketch-panel .draft-order-card.selected,
.doctor-sketchboard .sketch-panel .nursing-order-card.selected {
  border-left-color: rgb(var(--doctor-card-accent));
}

.med-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.med-history-button {
  min-height: 23px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
  border-color: var(--line-muted);
}

.med-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.med-history-summary span {
  color: var(--muted);
  font-size: 12px;
}

.med-history-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.med-history-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.med-history-entry-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.med-context-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: stretch;
  margin-bottom: 9px;
  padding: 7px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.med-context-row span {
  min-width: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.med-context-row strong {
  color: var(--ink);
  font-weight: 700;
}

.med-allergy-context {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.allergy-options-button {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
  border-color: var(--line-muted);
}

.draft-orders {
  display: grid;
  gap: 7px;
}

.draft-orders > span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
}

.med-order-placeholder {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px dashed rgba(240, 180, 41, 0.28);
  background: rgba(8, 14, 22, 0.35);
}

.med-order-placeholder strong {
  color: var(--ink);
  font-size: 13px;
}

.med-order-placeholder p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.45;
}

.nursing-coord-progress {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.care-exec-workflow {
  display: grid;
  gap: 12px;
}

.care-exec-summary {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  color: var(--muted);
  font-size: 11px;
}

.care-exec-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.care-exec-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 148, 0.85), rgba(45, 212, 191, 0.95));
  transition: width 0.35s ease;
}

.care-exec-zone {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.28);
}

.care-exec-zone--active {
  border-color: rgba(240, 180, 41, 0.28);
}

.care-exec-zone--results {
  border-color: rgba(56, 189, 148, 0.28);
}

.care-exec-zone--timeline {
  border-color: rgba(var(--doctor-card-accent), 0.24);
}

.care-exec-zone-title {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.care-exec-zone-desc {
  margin: -2px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.35;
}

.care-exec-zone-empty {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(var(--doctor-card-accent), 0.22);
  color: var(--muted);
  font-size: 11px;
}

.care-exec-cards {
  display: grid;
  gap: 8px;
}

.care-exec-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: var(--panel-2);
}

.care-exec-card--pending {
  border-color: rgba(148, 163, 184, 0.35);
}

.care-exec-card--in_progress {
  border-color: rgba(240, 180, 41, 0.38);
}

.care-exec-card--completed {
  border-color: rgba(56, 189, 148, 0.38);
}

.care-exec-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.care-exec-task-name {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.care-exec-status-badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.45);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.care-exec-status-badge.status-pending {
  border-color: rgba(148, 163, 184, 0.35);
}

.care-exec-status-badge.status-in-progress {
  border-color: rgba(240, 180, 41, 0.4);
  color: #f0b429;
}

.care-exec-status-badge.status-completed,
.care-exec-status-badge.status-reported-to-doctor {
  border-color: rgba(56, 189, 148, 0.4);
  color: #38bd94;
}

.care-exec-card-meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.care-exec-card-meta > div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 8px;
  align-items: start;
}

.care-exec-card-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.care-exec-card-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
}

.care-exec-result-row dd {
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 148, 0.22);
  background: rgba(56, 189, 148, 0.08);
}

.care-exec-result-empty {
  color: var(--muted);
}

.care-exec-zone--timeline-compact {
  padding: 6px 8px;
  gap: 4px;
}

.care-exec-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.care-exec-timeline-full {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(var(--doctor-card-accent), 0.95);
  font-size: 10px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.care-exec-timeline-full:hover {
  color: var(--ink);
}

.care-exec-timeline--compact {
  gap: 3px;
}

.care-exec-timeline--compact li {
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1.25;
}

.care-exec-timeline {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.care-exec-timeline li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  font-size: 11px;
}

.care-exec-timeline li span {
  color: rgba(var(--doctor-card-accent), 0.95);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.care-exec-timeline li em {
  color: var(--ink);
  font-style: normal;
  line-height: 1.35;
}

.nursing-coord-progress-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.nursing-coord-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.nursing-coord-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 148, 0.85), rgba(45, 212, 191, 0.95));
  transition: width 0.35s ease;
}

.nursing-coord-task-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nursing-coord-task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
  font-size: 11px;
}

.nursing-coord-task.status-completed {
  border-color: rgba(56, 189, 148, 0.35);
}

.nursing-coord-task.status-in-progress {
  border-color: rgba(240, 180, 41, 0.35);
}

.nursing-coord-task-icon {
  color: var(--muted);
  font-size: 12px;
}

.nursing-coord-task-name {
  color: var(--ink);
  line-height: 1.35;
}

.nursing-coord-task-status {
  color: var(--muted);
  white-space: nowrap;
}

.nursing-task-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.nursing-task-status-badge.in-progress {
  color: #f0b429;
  border-color: rgba(240, 180, 41, 0.35);
}

.nursing-task-status-badge.completed {
  color: #38bd94;
  border-color: rgba(56, 189, 148, 0.35);
}

.nursing-order-card.nursing-order-has-status div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.nursing-order-card.nursing-order-has-status div strong {
  flex: 1;
}

.send-to-nurse.disabled,
.send-to-nurse:disabled,
.add-nursing-order.disabled,
.add-nursing-order:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.nursing-selection-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.draft-order-card {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 10px 34px 10px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.draft-order-card:hover {
  border-color: #3b4656;
  background: #151d27;
}

.draft-order-card.selected {
  border-color: rgba(110, 168, 255, 0.72);
  background: rgba(110, 168, 255, 0.12);
}

.draft-order-card.warning {
  border-color: rgba(240, 180, 41, 0.38);
  background: rgba(240, 180, 41, 0.06);
}

.draft-order-card.warning.selected {
  border-color: rgba(240, 180, 41, 0.72);
  background: rgba(240, 180, 41, 0.1);
}

.draft-order-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.med-order-summary {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-order-card strong {
  color: var(--ink);
  font-size: 13px;
}

.draft-order-card p,
.draft-order-card em {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.35;
  font-style: normal;
}

.draft-order-card p strong {
  font-size: 11px;
  font-weight: 700;
}

.add-medication,
.sign-med-order {
  width: 100%;
  margin-top: 8px;
}

.adjust-medication {
  flex: 0 0 auto;
  width: auto;
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
  margin: 0;
}

.medication-entry-form,
.medication-adjust-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.medication-entry-form label,
.medication-adjust-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.medication-entry-form label.wide,
.medication-entry-form button,
.medication-adjust-form label.wide,
.medication-adjust-form button {
  grid-column: 1 / -1;
}

.medication-entry-form input,
.medication-adjust-form input {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.med-safety-strip {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 2px 1px;
}

.med-safety-strip span {
  font-size: 11px;
  line-height: 1.35;
}

.med-safety-strip .warn {
  color: #f7d98b;
}

.med-safety-strip .pass {
  color: var(--muted-2);
}

.med-safety-strip .status {
  color: var(--accent-strong);
}

.sign-med-order {
  border-color: rgba(110, 168, 255, 0.6);
  background: rgba(110, 168, 255, 0.14);
}

.sketch-facts {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
  margin: 12px 0;
}

.sketch-facts div {
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  padding: 9px;
}

.sketch-facts span,
.workflow-warning {
  color: var(--muted);
  font-size: 13px;
}

.sketch-facts strong {
  display: block;
  color: var(--ink);
  margin-top: 4px;
}

.assessment-text {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.workflow-warning {
  color: #f7d98b;
  line-height: 1.45;
  margin: 10px 0 0;
}

.patient-context-strip.high,
.patient-context-strip.critical {
  border-left-color: var(--red);
}

.patient-context-strip.medium {
  border-left-color: var(--amber);
}

.patient-context-strip.low {
  border-left-color: var(--green);
}

.patient-context-strip > div,
.patient-context-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.patient-context-strip strong {
  color: var(--ink);
}

.patient-context-strip span {
  color: var(--muted-2);
}

.patient-context-meta span:not(.badge) {
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: var(--panel-2);
  padding: 5px 9px;
  font-size: 13px;
}

.doctor-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.05fr) minmax(300px, 0.9fr);
  grid-template-rows: 350px 210px auto;
  grid-template-areas:
    "symptoms assessment action"
    "evidence evidence history"
    "support support support";
  gap: 14px;
  align-items: stretch;
}

.workbench-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-height: 0;
  overflow: auto;
}

.workbench-block h2 {
  font-size: 19px;
  margin-bottom: 10px;
}

.current-symptoms-block h2 {
  font-size: 23px;
  line-height: 1.2;
}

.current-symptoms-block {
  grid-area: symptoms;
}

.aerius-assessment-block {
  grid-area: assessment;
}

.doctor-action-block {
  grid-area: action;
}

.results-evidence-block {
  grid-area: evidence;
}

.history-block {
  grid-area: history;
}

.symptom-grid,
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.history-grid {
  grid-template-columns: 1fr;
}

.symptom-grid div,
.history-grid div,
.assessment-summary div,
.assessment-step,
.clinical-note {
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  padding: 8px;
}

.symptom-grid span,
.history-grid span,
.assessment-summary span,
.assessment-next > span,
.assessment-step span,
.clinical-note span,
.doctor-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.symptom-grid strong,
.history-grid strong,
.assessment-summary strong,
.assessment-step strong {
  color: var(--ink);
}

.clinical-note {
  margin-top: 9px;
}

.clinical-note p {
  color: var(--muted-2);
  margin: 0;
}

.aerius-assessment-block {
  background: #17202b;
  border-color: #3a4656;
}

.assessment-summary {
  display: grid;
  gap: 10px;
}

.assessment-summary p {
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
}

.assessment-next,
.assessment-step,
.assessment-disclosure {
  margin-top: 8px;
}

.assessment-disclosure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}

.assessment-disclosure button {
  grid-column: 1 / -1;
}

.evidence-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.evidence-preview summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.evidence-preview summary .badge {
  margin-left: 5px;
}

.evidence-preview p {
  color: var(--muted-2);
  margin-bottom: 8px;
}

.evidence-preview summary span {
  color: var(--ink);
}

.history-block details,
.assessment-disclosure details,
.evidence-preview {
  border-color: var(--line-muted);
}

.doctor-action-block {
  display: grid;
  gap: 8px;
  background: #19212b;
  border-color: #415169;
}

.doctor-action-block p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.45;
}

.doctor-note textarea {
  min-height: 44px;
  margin: 6px 0 0;
}

.supporting-details {
  grid-area: support;
  grid-column: 1 / -1;
  padding: 14px 16px;
}

.macro-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.doctor-snapshot {
  display: grid;
  gap: 18px;
  border-left: 5px solid #4a5a70;
  min-height: 260px;
  border-color: #3a4656;
}

.doctor-snapshot.high,
.doctor-snapshot.critical {
  border-left-color: var(--red);
}

.doctor-snapshot.medium {
  border-left-color: var(--amber);
}

.doctor-snapshot.low {
  border-left-color: var(--green);
}

.snapshot-kicker {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.snapshot-main {
  display: block;
}

.snapshot-main h2 {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.snapshot-main p {
  font-size: 17px;
  margin-bottom: 0;
}

.snapshot-complaint {
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.snapshot-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.snapshot-context span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.snapshot-context strong {
  color: var(--ink);
}

.doctor-section {
  margin-bottom: 16px;
}

.doctor-section > p {
  max-width: 840px;
  font-size: 15px;
  line-height: 1.55;
}

.section-label {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.section-label.situation-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.section-label.history-title {
  text-transform: none;
}

.doctor-decision-block {
  margin-bottom: 22px;
  padding: 22px;
}

.doctor-decision-block h2 {
  font-size: 21px;
  margin-bottom: 0;
}

.decision-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.decision-count {
  color: var(--muted-2);
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.decision-card,
.why-primary {
  min-height: 150px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  padding: 16px;
}

.why-primary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid var(--red);
}

.why-primary h3,
.decision-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.why-primary p {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
}

.decision-card.signal {
  border-left: 3px solid #4a5a70;
  background: var(--panel-2);
}

.why-now .decision-card.signal:first-of-type {
  border-left-color: var(--red);
}

.missing-now .decision-card.signal {
  border-left-color: var(--amber);
}

.decision-card.compact .list,
.decision-card.signal .list {
  margin-bottom: 0;
  line-height: 1.55;
}

.decision-card.wide {
  grid-column: span 2;
}

.main-focus-block {
  display: grid;
  gap: 18px;
  min-height: 260px;
  border-color: #3a4656;
}

.main-focus-block h2 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.main-focus-block p,
.why-flagged-block p,
.next-action-block p {
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1.55;
}

.focus-actions {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.focus-actions button:nth-child(3),
.focus-actions button:nth-child(4) {
  border-color: rgba(110, 168, 255, 0.45);
  background: rgba(110, 168, 255, 0.14);
  color: var(--accent-strong);
}

.why-flagged-block {
  background: rgba(255, 95, 109, 0.09);
  border-color: rgba(255, 95, 109, 0.34);
  border-left: 5px solid var(--red);
}

.why-flagged-block h2,
.signal-summary-block h2,
.missing-block h2,
.pending-block h2,
.questions-block h2,
.next-action-block h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.why-flagged-block p {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.45;
}

.signal-summary {
  display: grid;
  gap: 14px;
}

.signal-summary h3,
.pending-columns h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.signal-line {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  word-spacing: 2px;
}

.concern-note {
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-left: 3px solid #4a5a70;
  border-radius: 8px;
  padding: 13px;
}

.concern-note p {
  color: var(--muted-2);
  margin: 0;
}

.missing-block {
  background: rgba(240, 180, 41, 0.07);
  border-color: rgba(240, 180, 41, 0.28);
  border-left: 5px solid var(--amber);
}

.pending-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.questions-block {
  border-left: 4px solid #4a5a70;
}

.next-action-block {
  display: grid;
  gap: 14px;
  background: #19212b;
  border-color: #415169;
}

.supporting-details {
  grid-column: 1 / -1;
}

.lead {
  font-size: 18px;
  color: var(--ink);
}

.list {
  margin: 0 0 14px;
  padding-left: 19px;
  color: var(--muted-2);
}

.list li {
  margin-bottom: 6px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 54px 80px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  color: var(--muted);
  font-size: 12px;
}

.timeline p {
  margin: 0;
}

.timeline.clinical {
  display: grid;
  gap: 0;
  max-width: 980px;
  margin-top: 8px;
}

.timeline.clinical li {
  grid-template-columns: 76px 110px 1fr;
  padding: 12px 0;
}

.timeline.clinical span,
.timeline.clinical strong,
.timeline.clinical p {
  font-size: 15px;
}

.timeline.clinical strong {
  color: var(--ink);
}

.timeline.compact {
  max-width: none;
}

.timeline.compact li {
  grid-template-columns: 68px 96px 1fr;
  padding: 10px 0;
}

.clinical-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brief-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #121820;
}

.brief-block.wide {
  grid-column: 1 / -1;
  background: #151b23;
}

.brief-block.priority {
  border-left: 4px solid #59636f;
  background: #151b23;
}

.brief-block h3 {
  font-size: 15px;
  margin-bottom: 9px;
}

.brief-block .list {
  margin-bottom: 0;
  line-height: 1.5;
}

.evidence-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doctor-evidence-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evidence-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.evidence-item p {
  grid-column: 1 / -1;
  margin-bottom: 0;
  line-height: 1.45;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-group span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid var(--line-muted);
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted-2);
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.2;
}

.chip-group.risk-chip span {
  background: rgba(255, 95, 109, 0.11);
  border-color: rgba(255, 95, 109, 0.25);
  color: #ffd1d6;
}

.chip-group.warning-chip span {
  background: rgba(240, 180, 41, 0.1);
  border-color: rgba(240, 180, 41, 0.24);
  color: #f7d98b;
}

.status-row-list {
  display: grid;
  gap: 8px;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  background: var(--panel-3);
  border: 1px solid var(--line-muted);
  border-radius: 7px;
  padding: 7px 9px;
}

.status-row span {
  color: var(--muted-2);
  min-width: 0;
}

.status-row strong {
  color: var(--amber);
  font-size: 12px;
  white-space: nowrap;
}

.question-list {
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.question-list li {
  padding: 5px 0;
}

.doctor-action-groups {
  display: grid;
  gap: 6px;
}

.primary-actions,
.secondary-actions,
.admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.primary-actions button {
  min-height: 36px;
  border-color: rgba(110, 168, 255, 0.5);
  background: rgba(110, 168, 255, 0.16);
  color: var(--accent-strong);
  font-weight: 700;
}

.secondary-actions button {
  background: #222b37;
  min-height: 34px;
}

.admin-actions button {
  background: var(--panel-2);
  color: var(--muted-2);
  min-height: 34px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

details {
  border: 1px solid var(--line-muted);
  border-radius: 8px;
  background: var(--panel-3);
  padding: 0;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  padding: 12px 14px;
  list-style-position: inside;
}

details[open] summary {
  border-bottom: 1px solid var(--line-muted);
}

details > :not(summary) {
  margin: 14px 16px 16px;
}

.doctor-evidence-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-grid label,
.note-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  color: var(--ink);
  background: #0f141b;
}

textarea {
  min-height: 90px;
  margin: 12px 0;
}

.patient-status {
  margin-bottom: 16px;
  border-left: 5px solid #59636f;
}

.patient-status h2 {
  font-size: 26px;
}

.status-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
}

.status-steps .done,
.status-steps .active {
  border-color: #59636f;
  color: var(--ink);
  background: #1b2530;
}

.workspace:has(.patient-ai-page) {
  background: radial-gradient(circle at 50% -8%, #0a1019, #060a11 60%);
}

.patient-ai-page {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  color: #f1f7ff;
}

.patient-ai-hero,
.patient-ai-card,
.patient-ai-bottom-actions {
  border: 1px solid rgba(150, 178, 208, 0.2);
  border-radius: 18px;
  background: linear-gradient(160deg, #1a2230, #131a25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

/* High-priority "Today with Aerius" summary card */
.patient-today-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-top: 3px solid rgba(125, 211, 252, 0.6);
  border-radius: 18px;
  background: linear-gradient(160deg, #1b2636, #131a25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

.patient-today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.patient-today-kicker {
  display: block;
  margin-bottom: 4px;
  color: #9fe6ff;
  font-size: 12.5px;
  font-weight: 850;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.patient-today-titles h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
}

.patient-today-stamp {
  color: #9fb0c2;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.patient-today-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.patient-today-tile {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--pt-line, rgba(255, 255, 255, 0.12));
  border-left: 4px solid var(--pt-accent, #60a5fa);
  background: var(--pt-bg, rgba(255, 255, 255, 0.03));
}

.patient-today-tile.tone-green {
  --pt-accent: #34d399;
  --pt-line: rgba(52, 211, 153, 0.26);
  --pt-bg: rgba(52, 211, 153, 0.08);
}
.patient-today-tile.tone-blue {
  --pt-accent: #38bdf8;
  --pt-line: rgba(56, 189, 248, 0.26);
  --pt-bg: rgba(56, 189, 248, 0.08);
}
.patient-today-tile.tone-purple {
  --pt-accent: #a78bfa;
  --pt-line: rgba(167, 139, 250, 0.28);
  --pt-bg: rgba(167, 139, 250, 0.08);
}
.patient-today-tile.tone-amber {
  --pt-accent: #fbbf24;
  --pt-line: rgba(251, 191, 36, 0.3);
  --pt-bg: rgba(251, 191, 36, 0.08);
}

.patient-tile-label {
  color: #c2d2e4;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.patient-today-tile strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.patient-tile-sub {
  color: #aebccd;
  font-size: 13px;
  line-height: 1.4;
}

.patient-care-deliverables {
  border-color: rgba(56, 189, 248, 0.28);
}

.patient-result-summary {
  border-color: rgba(56, 189, 248, 0.28);
}

.patient-result-summary__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.patient-result-summary__head span {
  color: var(--muted-2);
  font-size: 11px;
}

.patient-result-summary__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.patient-result-summary__badge.is-complete {
  color: #86efac;
  border-color: rgba(56, 189, 148, 0.35);
  background: rgba(56, 189, 148, 0.08);
}

.patient-result-summary__badge.is-pending {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.patient-result-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.patient-result-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
}

.patient-result-section.ready {
  border-color: rgba(56, 189, 148, 0.28);
}

.patient-result-section.waiting {
  opacity: 0.82;
}

.patient-result-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.patient-result-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.patient-result-sync-label {
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.patient-result-section__pending {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  font-style: italic;
}

.patient-result-section__list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.patient-result-timeline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-muted);
}

.patient-result-timeline__list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.patient-result-timeline__list li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
}

.patient-result-timeline__list li span {
  color: var(--muted-2);
}

.patient-result-timeline__list li em {
  font-style: normal;
  color: var(--ink);
}

.patient-result-timeline__list li small {
  color: var(--muted-2);
  font-size: 10px;
}

@media (max-width: 720px) {
  .patient-result-summary__grid {
    grid-template-columns: 1fr;
  }
}

.patient-care-deliverables__head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.patient-care-deliverables__head span {
  color: var(--muted-2);
  font-size: 11px;
}

.patient-care-deliverables__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.patient-care-deliverable {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line-muted);
  background: rgba(8, 14, 22, 0.35);
}

.patient-care-deliverable.ready {
  border-color: rgba(56, 189, 148, 0.28);
}

.patient-care-deliverable.waiting {
  opacity: 0.82;
}

.patient-care-deliverable h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.patient-care-deliverable p {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.4;
}

.patient-care-deliverable__pending {
  color: var(--muted);
  font-style: italic;
}

.patient-care-status-feed {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-muted);
}

.patient-care-status-feed h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.patient-care-status-feed__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.patient-care-status-feed__list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(8, 14, 22, 0.28);
  font-size: 10px;
}

.patient-care-status-feed__list li span {
  color: rgba(var(--doctor-card-accent), 0.95);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.patient-care-status-feed__list li em {
  color: var(--ink);
  font-style: normal;
}

@media (max-width: 900px) {
  .patient-care-deliverables__grid {
    grid-template-columns: 1fr;
  }
}

.patient-today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.patient-ai-page .patient-today-cta {
  color: #07121f;
  background: linear-gradient(135deg, #7dd3fc, #5eead4);
  border-color: transparent;
}

.patient-ai-page .patient-today-cta:hover {
  background: linear-gradient(135deg, #93dbfd, #6ff0dc);
}

.patient-ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 18px;
  padding: 18px 22px;
  overflow: hidden;
  border-color: rgba(125, 211, 252, 0.3);
  border-top: 2px solid rgba(125, 211, 252, 0.4);
  background: linear-gradient(160deg, #1a2533, #131a25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

.patient-ai-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 54px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.patient-ai-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.patient-ai-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.patient-ai-kicker {
  color: #9fe6ff;
  font-size: 12.5px;
  font-weight: 850;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.patient-ai-hero h1 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.4px;
}

.patient-ai-hero p {
  max-width: 720px;
  margin: 2px 0 0;
  color: #d7e3f1;
  font-size: 15px;
  line-height: 1.5;
}

.patient-ai-chatbox {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 14px;
  background: rgba(6, 11, 19, 0.6);
}

.patient-ai-chatbox span {
  color: #eaf9ff;
  font-size: 15px;
  font-weight: 800;
}

.patient-ai-chatbox textarea {
  min-height: 70px;
  margin: 0;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 12px;
  color: #f1f7ff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.patient-ai-quick-actions,
.patient-ai-card-actions,
.patient-ai-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.patient-ai-quick-actions {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  gap: 12px;
}

.patient-ai-hero-actions-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.patient-ai-hero-actions-row .patient-ai-quick-actions {
  flex: 1 1 auto;
}

.patient-ai-hero-actions-row .patient-today-cta {
  flex: 0 0 auto;
  margin-left: auto;
}

.patient-ai-hero-span {
  grid-column: 1 / -1;
  justify-self: end;
}

.patient-aerius-chat-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.patient-aerius-chat-log {
  display: grid;
  gap: 10px;
}

.patient-aerius-chat-bubble {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(150, 178, 208, 0.22);
}

.patient-aerius-chat-bubble.patient {
  background: rgba(72, 214, 255, 0.1);
  border-color: rgba(125, 211, 252, 0.28);
}

.patient-aerius-chat-bubble.aerius {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.28);
}

.patient-aerius-chat-label {
  color: #9fe6ff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.patient-aerius-chat-bubble.aerius .patient-aerius-chat-label {
  color: #d8c4ff;
}

.patient-aerius-chat-bubble p {
  margin: 0;
  color: #eef6ff;
  font-size: 14px;
  line-height: 1.55;
}

.patient-aerius-next-panel {
  padding: 14px 18px;
  border-color: rgba(125, 211, 252, 0.34);
}

.patient-aerius-next-label {
  margin: 0;
  color: #dff6ff;
  font-size: 14px;
  line-height: 1.5;
}

.patient-guided-intake-panel,
.patient-handoff-summary-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.patient-guided-questions {
  margin: 0;
  padding-left: 18px;
  color: #d7e8f8;
  font-size: 14px;
  line-height: 1.55;
}

.patient-guided-questions li + li {
  margin-top: 6px;
}

.patient-guided-answers {
  margin-top: 4px;
}

.patient-aerius-handoff-cta-panel {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-color: rgba(52, 211, 153, 0.38);
}

.patient-aerius-handoff-cta-panel .patient-today-cta {
  justify-self: start;
}

/* ── Patient Case Milestone (primary journey focal card) ─────────────────── */
.patient-case-milestone {
  position: relative;
  margin: 4px 0 8px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-top: 4px solid rgba(52, 211, 153, 0.85);
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(52, 211, 153, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(56, 189, 248, 0.08), transparent 50%),
    linear-gradient(155deg, #0f2218 0%, #101a24 45%, #0d141d 100%);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.08),
    0 0 40px rgba(52, 211, 153, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.patient-case-milestone__layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
}

.patient-case-milestone__progress {
  padding: 22px 16px 22px 20px;
  border-right: 1px solid rgba(52, 211, 153, 0.14);
  background: rgba(4, 10, 8, 0.45);
}

.patient-case-milestone__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.patient-case-milestone__step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 0 18px 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #6a8096;
}

.patient-case-milestone__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.18);
}

.patient-case-milestone__step--done:not(:last-child)::after {
  background: rgba(52, 211, 153, 0.35);
}

.patient-case-milestone__step-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.patient-case-milestone__step--done {
  color: #b8f0dc;
}

.patient-case-milestone__step--done .patient-case-milestone__step-icon {
  color: #34d399;
}

.patient-case-milestone__step--current {
  color: #e8f8ff;
  font-weight: 600;
}

.patient-case-milestone__step--current .patient-case-milestone__step-icon {
  color: #7ec8e8;
}

.patient-case-milestone__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px 20px;
  min-width: 0;
}

.patient-case-milestone__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.patient-case-milestone__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #d1fae5;
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.2);
}

.patient-case-milestone--completed {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.55) 0%, rgba(4, 47, 46, 0.72) 100%);
}

.patient-case-milestone__badge--complete {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}

.patient-case-milestone--completed .patient-case-milestone__metric--status .patient-case-milestone__metric-value {
  color: #6ee7b7;
}

.patient-case-milestone--completed .patient-case-milestone__metric--next .patient-case-milestone__metric-value {
  color: #a7f3d0;
}

.patient-case-milestone__title {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #f0fdf9;
}

.patient-case-milestone__subtitle {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.55;
  color: #a8c4d4;
}

.patient-case-milestone__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.patient-case-milestone__metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(4, 8, 13, 0.5);
}

.patient-case-milestone__metric--queue {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  box-shadow: inset 0 0 24px rgba(52, 211, 153, 0.06);
}

.patient-case-milestone__metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a94a8;
}

.patient-case-milestone__metric-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f0fdf9;
}

.patient-case-milestone__metric--queue .patient-case-milestone__metric-value {
  font-size: 28px;
  color: #6ee7b7;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
}

.patient-case-milestone__metric-hint {
  font-size: 11px;
  color: #7a94a8;
  line-height: 1.35;
}

.patient-case-milestone__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #6a8096;
}

.patient-case-milestone__meta span::before {
  content: "·";
  margin-right: 12px;
  color: rgba(148, 163, 184, 0.3);
}

.patient-case-milestone__meta span:first-child::before {
  content: none;
  margin: 0;
}

.patient-case-milestone__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.patient-case-milestone__btn {
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.patient-case-milestone__btn--primary {
  border: 1px solid rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.92);
  color: #033020;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.25);
}

.patient-case-milestone__btn--primary:hover {
  background: #34d399;
}

.patient-case-milestone__btn--secondary {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.1);
  color: #b8f0dc;
}

.patient-case-milestone__btn--secondary:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.6);
}

.patient-case-milestone__btn--secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.patient-case-milestone__btn--ghost {
  border: 1px solid transparent;
  background: transparent;
  color: #8fa3b8;
  font-weight: 500;
}

.patient-case-milestone__btn--ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #d7e8f8;
}

@media (max-width: 720px) {
  .patient-case-milestone__layout {
    grid-template-columns: 1fr;
  }

  .patient-case-milestone__progress {
    border-right: none;
    border-bottom: 1px solid rgba(52, 211, 153, 0.14);
    padding: 16px 20px 12px;
  }

  .patient-case-milestone__steps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .patient-case-milestone__step {
    padding: 0;
    flex: 0 0 auto;
  }

  .patient-case-milestone__step:not(:last-child)::after {
    display: none;
  }

  .patient-case-milestone__metrics {
    grid-template-columns: 1fr;
  }

  .patient-case-milestone__metric--queue .patient-case-milestone__metric-value {
    font-size: 24px;
  }
}
/* ── end patient-case-milestone ───────────────────────────────────────────── */

.patient-queue-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 13, 0.62);
  z-index: 55;
}

.patient-queue-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 94vw);
  max-height: min(88vh, 680px);
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: #0d141d;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-top: 3px solid rgba(52, 211, 153, 0.5);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 56;
  overflow: hidden;
}

.patient-queue-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.patient-queue-modal-head h2 {
  margin: 0;
  font-size: 18px;
  color: #e8f8ff;
}

.patient-queue-modal-head p {
  margin: 4px 0 0;
  color: #9fb8cc;
  font-size: 13px;
}

.reg-pre-fill-banner {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: #d7e8f8;
  margin-bottom: 12px;
}

.reg-pre-fill-banner strong {
  color: #e8f8ff;
  font-size: 14px;
}

.reg-pre-fill-banner span {
  color: #9fb8cc;
  font-size: 12px;
}

.patient-queue-modal-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 2px;
}

.patient-queue-modal-note {
  margin: 0;
  color: #d7e8f8;
  font-size: 14px;
  line-height: 1.55;
}

.patient-queue-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.patient-queue-modal-actions button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
  color: #dff6ff;
  cursor: pointer;
}

.patient-queue-modal-btn-secondary {
  border-color: rgba(148, 163, 184, 0.35) !important;
  background: rgba(148, 163, 184, 0.1) !important;
  color: #d7e8f8 !important;
}

.patient-queue-modal-actions button:hover {
  background: rgba(52, 211, 153, 0.2);
}

.patient-selfreg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 13, 0.62);
  z-index: 55;
}

/* ── Visit Check-in Modal (vcm) ─────────────────────────────────────────── */
.vcm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0d141d;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-top: 3px solid rgba(52, 211, 153, 0.55);
  border-radius: 16px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
  z-index: 56;
  overflow: hidden;
}

/* Header */
.vcm__header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.vcm__title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #e8f8ff;
}

.vcm__title p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8fa3b8;
}

.vcm__close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.07);
  color: #b8c9d9;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* Body */
.vcm__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

/* Patient summary card */
.vcm__patient-card {
  background: rgba(6, 11, 18, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vcm__patient-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

.vcm__kv {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.vcm__kv span {
  font-size: 10px;
  color: #7a94a8;
  line-height: 1.3;
}

.vcm__kv strong {
  font-size: 12px;
  font-weight: 600;
  color: #e8f4ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vcm__symptom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.vcm__symptom span {
  font-size: 10px;
  color: #7a94a8;
}

.vcm__symptom p {
  margin: 0;
  font-size: 12px;
  color: #d7e8f8;
  line-height: 1.4;
}

.vcm__hospital-record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.vcm__record-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(6, 11, 18, 0.5);
  color: #c5d8e8;
}

.vcm__record-chip--warn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.vcm__record-note {
  font-size: 10px;
  color: #6a8096;
  padding: 3px 6px;
  border: none !important;
  background: none !important;
}

/* Visit options */
.vcm__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(6, 11, 18, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
}

.vcm__option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vcm__option-group--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.vcm__option-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7ec8e8;
  white-space: nowrap;
}

.vcm__req {
  color: #f87171;
}

.vcm__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vcm__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(6, 11, 18, 0.4);
  color: #c5d8e8;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.vcm__chip input[type="radio"],
.vcm__chip input[type="checkbox"] {
  margin: 0;
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}

.vcm__chip--on,
.vcm__chip:has(input:checked) {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.14);
  color: #dff6ff;
}

.vcm__emg-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(6, 11, 18, 0.4);
  color: #e8f4ff;
  font-size: 12px;
  outline: none;
}

.vcm__emg-input:focus {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.1);
}

.vcm__emg-input::placeholder {
  color: #4e6070;
}

/* Status confirmation card */
.vcm__status-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vcm__status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c5d8e8;
}

.vcm__check {
  flex-shrink: 0;
  color: #34d399;
  font-weight: 700;
  font-size: 13px;
}

.vcm__next {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(52, 211, 153, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vcm__next span {
  font-size: 10px;
  color: #7a94a8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vcm__next p {
  margin: 0;
  font-size: 12px;
  color: #b8f0dc;
  font-weight: 500;
}

/* Confirm checkbox row */
.vcm__confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(6, 11, 18, 0.35);
  color: #c5d8e8;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.vcm__confirm-row input {
  flex-shrink: 0;
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: #34d399;
}

/* Footer */
.vcm__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(4, 8, 13, 0.82);
}

.vcm__footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.vcm__btn {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.vcm__btn--primary {
  min-width: 208px;
  font-weight: 650;
  border: 1px solid rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.92);
  color: #033020;
}

.vcm__btn--primary:hover:not(:disabled) {
  background: #34d399;
  border-color: #34d399;
}

.vcm__btn--primary:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.vcm__btn--secondary {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: transparent;
  color: #b8f0dc;
}

.vcm__btn--secondary:hover {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.55);
}

.vcm__btn--ghost {
  border: 1px solid transparent;
  background: transparent;
  color: #8fa3b8;
}

.vcm__btn--ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #d7e8f8;
}

@media (max-width: 600px) {
  .vcm__patient-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vcm__btn--primary {
    min-width: auto;
  }
  .vcm__footer {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* ── end vcm ──────────────────────────────────────────────────────────────── */

.patient-ai-page button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.patient-ai-page button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(150, 200, 240, 0.45);
  color: #eef9ff;
  background: rgba(72, 214, 255, 0.12);
  font-size: 14px;
  font-weight: 800;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.patient-ai-quick-actions button {
  min-height: 44px;
  padding: 10px 16px;
  background: rgba(72, 214, 255, 0.14);
  border-color: rgba(150, 200, 240, 0.45);
  box-shadow: none;
}

.patient-ai-page button:hover {
  border-color: rgba(160, 214, 255, 0.7);
  background: rgba(72, 214, 255, 0.22);
  transform: translateY(-1px);
}

.patient-ai-page button:active {
  transform: translateY(0);
  background: rgba(72, 214, 255, 0.3);
}

.patient-ai-safety {
  grid-column: 1 / -1;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(126, 231, 135, 0.3);
  color: #d6fbe0;
  background: rgba(126, 231, 135, 0.1);
  font-size: 13px !important;
}

.patient-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.patient-ai-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, #1a2230, #131a25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.patient-ai-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.2;
}

.patient-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.patient-card-head h2 {
  margin: 0;
}

.patient-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #d4ecff;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.patient-ai-card p {
  margin: 0;
  color: #d4e1f0;
  font-size: 15px;
  line-height: 1.55;
}

.daily-checkin-card {
  gap: 13px;
  padding: 18px 20px;
  border-color: rgba(45, 212, 191, 0.42);
  border-top: 3px solid rgba(45, 212, 191, 0.6);
  background: linear-gradient(160deg, #16303a, #121a25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

.daily-checkin-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.daily-checkin-head h2 {
  margin: 0 0 5px;
  color: #f4feff;
  font-size: 22px;
  font-weight: 850;
}

.daily-checkin-head p {
  max-width: 820px;
  color: #d4e1f0;
  font-size: 14.5px;
}

.daily-checkin-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-checkin-pills button {
  min-height: 42px;
  padding: 9px 15px;
  border-color: rgba(45, 212, 191, 0.26);
  background: rgba(45, 212, 191, 0.09);
  color: #dff8ff;
  font-size: 15px;
  box-shadow: none;
}

.daily-checkin-pills button.attention {
  border-color: rgba(240, 180, 41, 0.5);
  background: rgba(240, 180, 41, 0.16);
  color: #ffe2a6;
}

.daily-checkin-pills button.active {
  border-color: rgba(72, 214, 255, 0.6);
  background: linear-gradient(135deg, rgba(72, 214, 255, 0.22), rgba(45, 212, 191, 0.16));
  color: #f0fdff;
}

.daily-checkin-insight {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 18px;
  background: rgba(45, 212, 191, 0.07);
  color: #d7e3f1;
  font-size: 15px;
}

.daily-checkin-insight strong {
  color: #7fe9d6;
}

.daily-checkin-note {
  color: #aebccd !important;
  font-size: 14px !important;
}

/* Consumer health engagement layer */
.patient-engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.engagement-score-card {
  border-color: rgba(45, 212, 191, 0.38);
  border-top: 3px solid rgba(45, 212, 191, 0.55);
  background: linear-gradient(160deg, #15322e, #121a25);
}

.engagement-score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.engagement-score-value {
  color: #5eead4;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.engagement-score-max {
  color: #9fb0c2;
  font-size: 18px;
  font-weight: 700;
}

.engagement-status {
  color: #d4e1f0 !important;
  font-size: 14px !important;
}

.engagement-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.engagement-factors span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #c9f7ec;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.26);
  font-size: 12.5px;
  font-weight: 700;
}

.engagement-food-card {
  border-color: rgba(251, 146, 60, 0.36);
  border-top: 3px solid rgba(251, 146, 60, 0.55);
  background: linear-gradient(160deg, #2a2218, #121a25);
}

.engagement-food-result {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  background: rgba(251, 146, 60, 0.08);
}

.engagement-food-label {
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.engagement-food-result strong {
  color: #ffe8c7;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
}

.engagement-food-note {
  color: #d4c4a8 !important;
  font-size: 13.5px !important;
}

.engagement-activity-card {
  border-color: rgba(167, 139, 250, 0.36);
  border-top: 3px solid rgba(96, 165, 250, 0.5);
  background: linear-gradient(160deg, #1e1f38, #121a25);
}

.engagement-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.engagement-metric {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.06);
}

.engagement-metric span {
  color: #9fb0c2;
  font-size: 11px;
  font-weight: 700;
}

.engagement-metric strong {
  color: #e0e7ff;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
}

.engagement-insight {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  background: rgba(167, 139, 250, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.engagement-insight strong {
  color: #c4b5fd;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.engagement-insight span {
  color: #d4d0e8;
}

.patient-engagement-grid .patient-ai-card > button {
  justify-self: start;
}

@media (max-width: 980px) {
  .patient-engagement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .patient-engagement-grid {
    grid-template-columns: 1fr;
  }
}

/* Secondary card — Health Information: cyan / blue */
.health-context-card {
  border-color: rgba(56, 189, 248, 0.26);
}

.patient-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.patient-context-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbf0ff;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 14px;
  font-weight: 750;
}

.patient-simple-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffe2a6;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 14px;
  font-weight: 750;
}

.health-context-card > p {
  color: #aebccd;
  font-size: 14px;
}

/* Primary card — Aerius guidance / Recommended Next Steps: purple */
.next-step-card {
  border-color: rgba(167, 139, 250, 0.42);
  border-top: 3px solid rgba(167, 139, 250, 0.6);
  background: linear-gradient(160deg, #211f38, #131a25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

.next-step-card > p {
  color: #e7e0f7;
}

.next-step-card strong {
  padding: 12px 14px;
  border-radius: 18px;
  color: #ffe2a6;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.34);
  font-size: 15px;
  line-height: 1.45;
}

.journey-card {
  grid-column: 1 / -1;
  border-color: rgba(96, 165, 250, 0.26);
}

.patient-journey-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.patient-journey-list span {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #b3c2d4;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 800;
}

.patient-journey-list b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.patient-journey-list .done {
  color: #c9f9d5;
  border-color: rgba(126, 231, 135, 0.28);
  background: rgba(126, 231, 135, 0.08);
}

.patient-journey-list .current {
  color: #dff8ff;
  border-color: rgba(72, 214, 255, 0.42);
  background: rgba(72, 214, 255, 0.12);
  box-shadow: 0 0 20px rgba(72, 214, 255, 0.12);
}

.patient-current-step {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #d4e1f0;
  font-size: 14.5px;
}

.patient-current-step strong {
  color: #9fe6ff;
}

/* Secondary card — Care Team Message: neutral blue */
.care-message-card {
  border-color: rgba(96, 165, 250, 0.26);
}

/* Secondary card — Medication & Follow-up: amber */
.medication-followup-card {
  border-color: rgba(251, 191, 36, 0.32);
}

.patient-simple-list {
  display: grid;
  gap: 10px;
}

.patient-ai-bottom-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  justify-content: stretch;
  padding: 12px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(72, 214, 255, 0.08), rgba(255, 255, 255, 0) 48%),
    rgba(11, 17, 28, 0.92);
  border-color: rgba(125, 211, 252, 0.2);
  position: sticky;
  bottom: 12px;
  z-index: 3;
}

.patient-ai-bottom-actions button {
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 18px;
  color: #c0cedd;
  background: transparent;
  border-color: transparent;
  font-size: 14px;
  box-shadow: none;
}

.patient-ai-bottom-actions button.active {
  color: #f0fdff;
  background: linear-gradient(135deg, rgba(72, 214, 255, 0.22), rgba(45, 212, 191, 0.16));
  border-color: rgba(125, 211, 252, 0.42);
}

@media (max-width: 980px) {
  .patient-ai-hero,
  .patient-ai-grid {
    grid-template-columns: 1fr;
  }

  .patient-today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-card {
    grid-column: auto;
  }

  .patient-journey-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-ai-bottom-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }
}

@media (max-width: 560px) {
  .patient-today-grid {
    grid-template-columns: 1fr;
  }
}

.segmented {
  margin-bottom: 14px;
}

.segmented button {
  background: #1d232c;
  color: var(--ink);
}

.segmented button.active {
  background: #303846;
  color: var(--ink);
}

.evidence-binding p {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--ink);
}

/* ---------- Pharmacy Queue Board ---------- */
.pharmacy-head {
  align-items: flex-start;
  gap: 16px;
}

.ph-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.ph-filter {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.ph-filter:hover {
  color: var(--ink);
}

.ph-filter.active {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.5);
  color: #5eead4;
}

.ph-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ph-metric {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-left-width: 4px;
}

.ph-metric span {
  color: var(--muted);
  font-size: 13px;
}

.ph-metric strong {
  font-size: 26px;
}

.ph-metric.review {
  border-left-color: #38bdf8;
}
.ph-metric.review strong {
  color: #7dd3fc;
}
.ph-metric.ask {
  border-left-color: #fbbf24;
}
.ph-metric.ask strong {
  color: #fcd34d;
}
.ph-metric.ready {
  border-left-color: #34d399;
}
.ph-metric.ready strong {
  color: #6ee7b7;
}
.ph-metric.done {
  border-left-color: #2dd4bf;
}
.ph-metric.done strong {
  color: #5eead4;
}

.ph-aerius-note {
  font-size: 13px;
  color: var(--muted);
  background: rgba(45, 212, 191, 0.07);
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 16px;
}

.ph-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.ph-column {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  border-top-width: 3px;
}

.ph-column-review {
  border-top-color: #38bdf8;
}
.ph-column-ask {
  border-top-color: #fb923c;
}
.ph-column-prep {
  border-top-color: #fbbf24;
}
.ph-column-ready {
  border-top-color: #34d399;
}
.ph-column-done {
  border-top-color: #2dd4bf;
}

.ph-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ph-column-head h2 {
  font-size: 15px;
  margin: 0;
}

.ph-column-head span {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px 9px;
}

.ph-column-list {
  display: grid;
  gap: 10px;
}

.ph-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 14px 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.ph-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #0f1620;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.ph-card:hover {
  border-color: rgba(94, 234, 212, 0.45);
  transform: translateY(-1px);
}

.ph-card.warning {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.06);
}

.ph-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ph-card-id {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ph-card-name {
  font-size: 15px;
  font-weight: 600;
}

.ph-card-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.ph-card-line {
  font-size: 12.5px;
  margin-bottom: 4px;
}

.ph-card-line span {
  color: var(--muted);
}

.ph-card-line.danger {
  color: #fca5a5;
}

.ph-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.ph-card-btn {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(94, 234, 212, 0.4);
  background: rgba(45, 212, 191, 0.12);
  color: #5eead4;
  cursor: pointer;
}

.ph-card-btn:hover {
  background: rgba(45, 212, 191, 0.2);
}

/* Pharmacy badges */
.ph-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.ph-badge-green {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
.ph-badge-amber {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}
.ph-badge-red {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}
.ph-badge-orange {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
}
.ph-badge-teal {
  background: rgba(45, 212, 191, 0.16);
  color: #5eead4;
}

.ph-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
}

.ph-status-review {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}
.ph-status-ask {
  background: rgba(251, 146, 60, 0.18);
  color: #fdba74;
}
.ph-status-prep {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}
.ph-status-ready {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
.ph-status-done {
  background: rgba(45, 212, 191, 0.14);
  color: #5eead4;
}

/* Pharmacy detail drawer */
.ph-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 13, 0.55);
  z-index: 55;
}

.ph-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 94vh;
  width: min(1100px, 96vw);
  background: #0d141d;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  overflow: hidden;
  z-index: 56;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-top: 3px solid #2dd4bf;
  border-radius: 16px;
  animation: ph-modal-in 0.18s ease;
}

@keyframes ph-modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.ph-drawer-body {
  flex: 1;
  overflow: hidden;
  column-count: 3;
  column-gap: 22px;
}

.ph-drawer-body section {
  margin-bottom: 14px;
  break-inside: avoid;
}

.ph-drawer-body h3 {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.ph-drawer-patient {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ph-drawer-patient strong {
  font-size: 18px;
}

.ph-drawer-patient span {
  font-size: 13px;
  color: var(--muted);
}

.ph-context-grid {
  display: grid;
  gap: 8px;
}

.ph-context-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.ph-context-grid span {
  color: var(--muted);
}

.ph-context-grid .danger strong {
  color: #fca5a5;
}

.ph-med-list {
  display: grid;
  gap: 10px;
}

.ph-med-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.ph-med-item.warning {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.06);
}

.ph-med-top {
  margin-bottom: 6px;
}

.ph-med-row {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 3px;
}

.ph-med-row span {
  color: var(--muted);
  min-width: 48px;
}

.ph-med-row p {
  margin: 0;
}

.ph-med-status {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
}

.ph-med-status.ok {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}

.ph-med-status.danger {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

.ph-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.ph-check-list li {
  font-size: 12.5px;
  padding-left: 22px;
  position: relative;
  color: var(--ink);
}

.ph-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #5eead4;
  font-weight: 700;
}

.ph-flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ph-flag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fcd34d;
}

.ph-note {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.ph-channel-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ph-channel {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.ph-channel span {
  font-size: 18px;
}

.ph-channel.active {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}

.ph-drawer-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.ph-act {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ph-act.green {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}
.ph-act.amber {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}
.ph-act.muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}
.ph-act.red {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.ph-act.teal {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.45);
  color: #5eead4;
}
.ph-act.blue {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.ph-act:hover {
  filter: brightness(1.15);
}

.trace-page-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.trace-page-main section {
  margin-bottom: 14px;
}

.trace-case-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.trace-case-button {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.trace-case-button.active {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

.trace-case-button span {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Hospital Operations Dashboard ---------- */
.ops-dashboard {
  display: grid;
  gap: 16px;
  font-size: 13.5px;
}

.ops-head {
  align-items: flex-start;
  gap: 16px;
}

.ops-head h1 {
  font-size: 24px;
}

.ops-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.ops-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ops-chip:hover {
  color: var(--ink);
  border-color: #3f4b5c;
}

.ops-chip.active {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.ops-chip.refresh {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.4);
}

/* KPI cards */
.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ops-kpi {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.ops-kpi-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.ops-kpi-value {
  font-size: 30px;
  font-weight: 850;
  line-height: 1.05;
}

.ops-kpi-note {
  color: var(--muted-2);
  font-size: 11.5px;
}

.ops-kpi.tone-blue {
  border-left-color: #38bdf8;
}
.ops-kpi.tone-blue .ops-kpi-value {
  color: #7dd3fc;
}
.ops-kpi.tone-amber {
  border-left-color: #fbbf24;
}
.ops-kpi.tone-amber .ops-kpi-value {
  color: #fcd34d;
}
.ops-kpi.tone-violet {
  border-left-color: #a78bfa;
}
.ops-kpi.tone-violet .ops-kpi-value {
  color: #c4b5fd;
}
.ops-kpi.tone-teal {
  border-left-color: #2dd4bf;
}
.ops-kpi.tone-teal .ops-kpi-value {
  color: #5eead4;
}
.ops-kpi.tone-red {
  border-left-color: #f87171;
}
.ops-kpi.tone-red .ops-kpi-value {
  color: #fca5a5;
}

/* Main grid: insight + resources */
.ops-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ops-insight,
.ops-resource,
.ops-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #19222e, #131a24);
}

.ops-insight {
  border-color: rgba(45, 212, 191, 0.28);
  border-top: 3px solid rgba(45, 212, 191, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.ops-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ops-insight-head h2 {
  margin: 0;
  font-size: 17px;
}

.ops-live {
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.ops-insight-lead {
  margin: 0 0 12px;
  color: #e6f1ff;
  font-size: 14px;
  line-height: 1.5;
}

.ops-alert-list {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.ops-alert-list li {
  position: relative;
  padding: 8px 12px 8px 28px;
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: #f3dadb;
  font-size: 12.5px;
  line-height: 1.4;
}

.ops-alert-list li::before {
  content: "▲";
  position: absolute;
  left: 11px;
  top: 8px;
  color: #fca5a5;
  font-size: 10px;
}

.ops-insight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ops-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: italic;
}

/* Ops buttons */
.ops-btn {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ops-btn:hover {
  border-color: #3f4b5c;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.ops-btn.primary {
  color: #07121f;
  background: var(--accent-strong);
  border-color: transparent;
}

.ops-btn.small {
  min-height: 28px;
  padding: 5px 11px;
  font-size: 12px;
}

.ops-btn.tiny {
  min-height: 26px;
  padding: 4px 10px;
  font-size: 11.5px;
}

.ops-btn.ghost {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

/* Resources */
.ops-resource h2,
.ops-section-head h2 {
  margin: 0;
  font-size: 17px;
}

.ops-resource h2 {
  margin-bottom: 12px;
}

.ops-bed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ops-bed {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.ops-bed-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-bed strong {
  font-size: 20px;
  font-weight: 850;
}

.ops-bed strong em {
  color: var(--muted-2);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.ops-bed-sub {
  color: var(--muted-2);
  font-size: 11px;
}

.ops-bed.tone-green {
  border-left-color: #34d399;
}
.ops-bed.tone-amber {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.06);
}
.ops-bed.tone-red {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

.ops-staff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-staff {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--line-muted);
  background: rgba(255, 255, 255, 0.02);
}

.ops-staff span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ops-staff strong {
  font-size: 17px;
}

/* Section heads */
.ops-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-muted);
}

.ops-section-head span {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Department load board */
.ops-dept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ops-dept {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-top-width: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.ops-dept.tone-green {
  border-top-color: #34d399;
}
.ops-dept.tone-amber {
  border-top-color: #fbbf24;
}
.ops-dept.tone-orange {
  border-top-color: #fb923c;
  background: rgba(251, 146, 60, 0.05);
}
.ops-dept.tone-red {
  border-top-color: #f87171;
  background: rgba(248, 113, 113, 0.06);
}

.ops-dept-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.ops-dept-top strong {
  font-size: 14.5px;
}

.ops-dept-status {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ops-dept-status.tone-green {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.16);
}
.ops-dept-status.tone-amber {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.16);
}
.ops-dept-status.tone-orange {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.18);
}
.ops-dept-status.tone-red {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.18);
}

.ops-dept-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-dept-stats > div {
  display: grid;
  gap: 3px;
}

.ops-dept-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ops-dept-stats strong {
  font-size: 16px;
}

/* Lower grid: watchlist + actions */
.ops-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ops-watch-list {
  display: grid;
  gap: 8px;
}

.ops-watch-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.6fr) auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid #59636f;
  background: rgba(255, 255, 255, 0.02);
}

.ops-watch-row.risk-high {
  border-left-color: #f87171;
}
.ops-watch-row.risk-medium {
  border-left-color: #fbbf24;
}
.ops-watch-row.risk-low {
  border-left-color: #34d399;
}

.ops-watch-id {
  color: var(--accent-strong);
  font-size: 12.5px;
  font-weight: 800;
}

.ops-watch-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ops-watch-main strong {
  font-size: 13.5px;
}

.ops-watch-main span {
  color: var(--muted);
  font-size: 12px;
}

.ops-risk-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ops-risk-badge.risk-high {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.16);
}
.ops-risk-badge.risk-medium {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.16);
}
.ops-risk-badge.risk-low {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.16);
}

.ops-watch-step {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.ops-watch-wait {
  color: #fcd34d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Suggested actions */
.ops-action-list {
  display: grid;
  gap: 9px;
}

.ops-action-card {
  display: grid;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.ops-action-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.ops-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Flow pipeline */
.ops-flow-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
}

.ops-flow-stage {
  flex: 1 1 0;
  min-width: 110px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 13px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.ops-flow-stage.tone-green {
  border-bottom-color: #34d399;
}
.ops-flow-stage.tone-amber {
  border-bottom-color: #fbbf24;
  background: rgba(251, 191, 36, 0.05);
}
.ops-flow-stage.tone-red {
  border-bottom-color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

.ops-flow-count {
  font-size: 24px;
  font-weight: 850;
}

.ops-flow-stage.tone-red .ops-flow-count {
  color: #fca5a5;
}
.ops-flow-stage.tone-amber .ops-flow-count {
  color: #fcd34d;
}

.ops-flow-name {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.ops-flow-flag {
  font-size: 10px;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.ops-flow-arrow {
  align-self: center;
  color: var(--muted-2);
  font-size: 16px;
}

@media (max-width: 1100px) {
  .ops-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ops-main-grid,
  .ops-lower-grid {
    grid-template-columns: 1fr;
  }
  .ops-dept-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-dept-grid {
    grid-template-columns: 1fr;
  }
  .ops-watch-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    row-gap: 6px;
  }
  .ops-watch-step,
  .ops-watch-wait {
    grid-column: 2 / -1;
  }
}

/* ---------- Registration Workspace ---------- */
.reg-workspace {
  display: grid;
  gap: 16px;
  font-size: 13.5px;
}

.reg-head h1 {
  font-size: 24px;
}

.reg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.reg-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.reg-chip.active {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.reg-device-status {
  color: #5eead4;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.registration-summary-grid,
.reg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.reg-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.reg-kpi-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.reg-kpi-value {
  font-size: 28px;
  font-weight: 850;
  line-height: 1.05;
}

.reg-kpi-note {
  color: var(--muted-2);
  font-size: 11.5px;
}

.reg-kpi.tone-blue {
  border-left-color: #38bdf8;
}
.reg-kpi.tone-blue .reg-kpi-value {
  color: #7dd3fc;
}
.reg-kpi.tone-amber {
  border-left-color: #fbbf24;
}
.reg-kpi.tone-amber .reg-kpi-value {
  color: #fcd34d;
}
.reg-kpi.tone-teal {
  border-left-color: #2dd4bf;
}
.reg-kpi.tone-teal .reg-kpi-value {
  color: #5eead4;
}
.reg-kpi.tone-orange {
  border-left-color: #fb923c;
}
.reg-kpi.tone-orange .reg-kpi-value {
  color: #fdba74;
}

.registration-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  align-items: stretch;
  min-height: calc(100vh - 220px);
}

.registration-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 100%;
}

.reg-column-title {
  flex-shrink: 0;
  margin: 0;
  padding: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line-muted);
}

.reg-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #19222e, #131a24);
  font-size: 13px;
}

.reg-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Card min-heights — rhythm lock */
.reg-card-scan {
  flex-shrink: 0;
  min-height: 110px;
}
.reg-card-search {
  flex-shrink: 0;
  min-height: 90px;
}
.reg-card-profile,
.patient-profile-card {
  flex: 1;
  min-height: 340px;
}
.reg-card-visit {
  flex-shrink: 0;
  min-height: 140px;
}
.reg-card-reason {
  flex-shrink: 0;
  min-height: 150px;
}
.reg-card-notes {
  flex-shrink: 0;
  min-height: 150px;
}
.reg-card-insight,
.aerius-intake-card {
  flex: 1;
  min-height: 260px;
}
.reg-card-station,
.station-select-card {
  flex: 1;
  min-height: 320px;
}
.reg-card-preview {
  flex-shrink: 0;
  min-height: 190px;
}
.reg-card-action {
  flex-shrink: 0;
  min-height: 170px;
  gap: 8px;
}

.reg-card.tone-cyan {
  border-left: 3px solid rgba(56, 189, 248, 0.5);
}
.reg-card.tone-cyan h3 {
  color: #7dd3fc;
}
.reg-card.tone-violet {
  border-left: 3px solid rgba(167, 139, 250, 0.5);
}
.reg-card.tone-violet h3 {
  color: #c4b5fd;
}
.reg-card.tone-teal {
  border-left: 3px solid rgba(45, 212, 191, 0.5);
}
.reg-card.tone-teal h3 {
  color: #5eead4;
}
.reg-card.tone-insight {
  border-color: rgba(45, 212, 191, 0.28);
  border-top: 3px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.reg-scan-btn {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(45, 212, 191, 0.12));
  color: #eaf6ff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.reg-device-sub {
  color: var(--muted-2);
  font-size: 12px;
}

.reg-search,
.reg-reason,
.reg-notes,
.reg-field select {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 22, 0.55);
  color: #f1f7ff;
  font-size: 13.5px;
}

.reg-profile-main {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.reg-profile-main strong {
  font-size: 18px;
  color: #fff;
}

.reg-profile-main span {
  color: #aebccd;
  font-size: 13px;
}

.reg-profile-rows {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #cdd9e8;
}

.reg-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.reg-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.reg-field {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

.reg-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reg-profile-sections {
  display: grid;
  gap: 10px;
  flex: 1;
  min-height: 0;
  margin-top: 4px;
}

.reg-profile-section {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.reg-profile-section h4 {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7dd3fc;
}

.reg-mini-rows {
  display: grid;
  gap: 5px;
}

.reg-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
}

.reg-mini-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.reg-mini-val {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: #d4ecff;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  text-align: right;
  white-space: nowrap;
}

.reg-mini-val.tone-ok {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.28);
}

.reg-mini-val.tone-warn {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
}

.reg-note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.reg-note-chips span {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #cdd9e8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.reg-card-profile .reg-clinical-chips {
  margin-top: auto;
}

.reg-clinical-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reg-clinical-chips span {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  color: #d4ecff;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.reg-visit-toggle,
.reg-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reg-visit-btn,
.reg-cat-btn {
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #cdd9e8;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.reg-visit-btn.active,
.reg-cat-btn.active {
  color: #e7e0f7;
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(167, 139, 250, 0.14);
}

.reg-appointment {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(167, 139, 250, 0.08);
  font-size: 13px;
}

.reg-appointment-label {
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.reg-appt-status {
  color: #fcd34d;
  font-weight: 700;
}

.reg-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
}

.reg-insight-head h3 {
  margin: 0;
  color: #9fe6ff;
  flex-shrink: 0;
}

.reg-insight-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Shared Reasoning Trace link — low emphasis */
.aerius-trace-btn {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.15;
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.75;
}

.aerius-trace-btn:hover {
  color: var(--muted);
  opacity: 1;
}

.doctor-sketchboard .situation-title-with-trace .aerius-trace-btn {
  font-size: 9px;
}

.reg-live {
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* Aerius Intake Reasoning Trace modal */
.reg-trace-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 13, 0.6);
  z-index: 55;
}

.reg-trace-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 94vw);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: #0d141d;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-top: 3px solid rgba(167, 139, 250, 0.55);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 56;
  overflow: hidden;
}

.reg-trace-head h2 {
  margin: 0;
  font-size: 17px;
}

.reg-trace-head p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}

.reg-trace-body {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.reg-trace-section {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line-muted);
  background: rgba(255, 255, 255, 0.02);
}

.reg-trace-section h3 {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7dd3fc;
}

.reg-trace-kv {
  display: grid;
  gap: 5px;
}

.reg-trace-kv > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.reg-trace-kv span {
  color: var(--muted-2);
  font-weight: 600;
}

.reg-trace-kv strong {
  color: #eaf6ff;
  font-weight: 700;
  text-align: right;
}

.reg-trace-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.reg-trace-pills span {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #d4ecff;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.reg-trace-pills.tone-amber span {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.28);
}

.reg-trace-pills.tone-muted span {
  color: #cdd9e8;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.reg-trace-pills.tone-teal span {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.28);
}

.reg-trace-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
}

.reg-trace-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line-muted);
}

.reg-trace-btn-secondary,
.reg-trace-btn-primary {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.reg-trace-btn-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #cdd9e8;
}

.reg-trace-btn-secondary:hover {
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.reg-trace-btn-primary {
  border: 1px solid rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.14);
  color: #5eead4;
}

.reg-trace-btn-primary:hover {
  background: rgba(45, 212, 191, 0.22);
}

/* Doctor Workspace — Reasoning Trace modal */
.reasoning-trace-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 96px);
  z-index: 56;
  background: #0d141d;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-top: 3px solid rgba(167, 139, 250, 0.55);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.reasoning-trace-modal__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 18px 20px;
}

.reasoning-trace-modal__body {
  display: grid;
  gap: 8px;
  overflow-y: visible;
  max-height: none;
}

.reasoning-trace-modal .reg-trace-section {
  padding: 10px 12px;
  border-radius: 10px;
}

.reasoning-trace-modal .reg-trace-section h3 {
  margin: 0 0 5px;
  font-size: 11px;
}

.reasoning-trace-modal .reg-trace-kv {
  gap: 4px;
}

.reasoning-trace-modal .reg-trace-kv > div {
  font-size: 10.5px;
}

.reasoning-trace-modal .reg-trace-pills {
  gap: 4px;
}

.reasoning-trace-modal .reg-trace-pills span {
  font-size: 10.5px;
  padding: 2px 7px;
}

.reasoning-trace-modal .reg-trace-note {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.4;
}

.reasoning-trace-modal .reg-trace-actions {
  padding-top: 2px;
  margin-top: 0;
}

.reg-card-insight .reg-insight-grid {
  flex-shrink: 0;
}

.reg-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reg-insight-block {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.reg-insight-block h4 {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.reg-insight-block.tone-cyan h4 {
  color: #7dd3fc;
}
.reg-insight-block.tone-amber h4 {
  color: #fcd34d;
}
.reg-insight-block.tone-teal h4 {
  color: #5eead4;
}

.reg-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reg-chip-list span {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  color: #d4e1f0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.reg-insight-note {
  margin: 0;
  margin-top: auto;
  padding-top: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-station-list {
  display: grid;
  gap: 8px;
  flex: 1;
}

.reg-station {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.reg-station strong {
  font-size: 13.5px;
  color: #eaf6ff;
}

.reg-station span {
  font-size: 12px;
  color: var(--muted);
}

.reg-station.active {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.1);
}

.reg-station.closed {
  opacity: 0.55;
}

.reg-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
}

.reg-preview-grid > div {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line-muted);
  background: rgba(255, 255, 255, 0.02);
}

.reg-preview-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.reg-preview-grid strong {
  font-size: 14px;
  color: #eef6ff;
}

.reg-preview-full {
  grid-column: 1 / -1;
}

.reg-priority.tone-red {
  color: #fca5a5;
}
.reg-priority.tone-amber {
  color: #fcd34d;
}
.reg-priority.tone-green {
  color: #6ee7b7;
}

.reg-register-btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #34d399, #2dd4bf);
  color: #07121f;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.25);
}

.reg-register-btn:hover {
  filter: brightness(1.06);
}

.reg-register-sub {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
}

.reg-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.reg-card-action .reg-register-btn {
  min-height: 44px;
  font-size: 14px;
}

.reg-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.reg-card-action .reg-btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
  text-align: center;
}

.reg-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #cdd9e8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.reg-btn.secondary:hover {
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

@media (max-width: 1200px) {
  .registration-main-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .registration-column {
    min-height: auto;
  }

  .reg-card-profile,
  .patient-profile-card,
  .reg-card-insight,
  .aerius-intake-card,
  .reg-card-station,
  .station-select-card {
    flex: initial;
  }

  .reg-insight-note {
    white-space: normal;
  }
}

@media (max-width: 1100px) {
  .registration-summary-grid,
  .reg-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .registration-summary-grid,
  .reg-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Evidence & Governance Console ---------- */
.ev-console {
  display: grid;
  gap: 16px;
  font-size: 13.5px;
}

.ev-head h1 {
  font-size: 24px;
}

.ev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.ev-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

/* shared accent tones for badges/chips */
.tone-cyan {
  --ev-accent: 56, 189, 248;
}
.tone-blue {
  --ev-accent: 96, 165, 250;
}
.tone-green,
.tone-teal {
  --ev-accent: 45, 212, 191;
}
.tone-amber {
  --ev-accent: 251, 191, 36;
}
.tone-orange {
  --ev-accent: 251, 146, 60;
}
.tone-violet {
  --ev-accent: 167, 139, 250;
}
.tone-red {
  --ev-accent: 248, 113, 113;
}

/* Summary card */
.ev-summary {
  border: 1px solid var(--line);
  border-top: 3px solid rgb(var(--ev-accent, 248, 113, 113));
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #1b2430, #131a24);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.ev-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ev-summary-head h2 {
  margin: 0;
  font-size: 18px;
}

.ev-live {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.ev-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ev-summary-item {
  display: grid;
  gap: 5px;
  align-content: start;
}

.ev-summary-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.ev-summary-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* generic badge */
.ev-badge {
  justify-self: start;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  color: rgb(var(--ev-accent));
  background: rgba(var(--ev-accent), 0.16);
  border: 1px solid rgba(var(--ev-accent), 0.32);
}

/* mini metrics */
.ev-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ev-metric {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid rgb(var(--ev-accent));
  background: rgba(255, 255, 255, 0.02);
}

.ev-metric strong {
  font-size: 26px;
  font-weight: 850;
  color: rgb(var(--ev-accent));
}

.ev-metric span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

/* evidence chip blocks */
.ev-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ev-evidence-grid .ev-block:last-child {
  grid-column: 1 / -1;
}

.ev-block {
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid rgb(var(--ev-accent));
  background: linear-gradient(160deg, rgba(var(--ev-accent), 0.05), rgba(255, 255, 255, 0));
}

.ev-block h3 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: rgb(var(--ev-accent));
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ev-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ev-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  color: rgb(var(--ev-accent));
  background: rgba(var(--ev-accent), 0.12);
  border: 1px solid rgba(var(--ev-accent), 0.28);
}

/* section heads (reuse ops styling) */
.ev-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-muted);
}

.ev-section-head h2 {
  margin: 0;
  font-size: 17px;
}

.ev-section-head span {
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Decision boundary */
.ev-boundary,
.ev-roles,
.ev-audit {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #19222e, #131a24);
}

.ev-boundary {
  border-color: rgba(167, 139, 250, 0.28);
  border-top: 3px solid rgba(167, 139, 250, 0.5);
}

.ev-boundary-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ev-boundary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid rgb(var(--ev-accent, 96, 165, 250));
  background: rgba(255, 255, 255, 0.02);
}

.ev-boundary-item.verdict-allowed {
  --ev-accent: 45, 212, 191;
}
.ev-boundary-item.verdict-review {
  --ev-accent: 251, 191, 36;
}
.ev-boundary-item.verdict-blocked {
  --ev-accent: 248, 113, 113;
  background: rgba(248, 113, 113, 0.05);
}

.ev-verdict {
  flex: 0 0 auto;
  min-width: 116px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgb(var(--ev-accent));
  background: rgba(var(--ev-accent), 0.16);
  border: 1px solid rgba(var(--ev-accent), 0.34);
}

.ev-boundary-text {
  font-size: 13px;
  line-height: 1.4;
}

.ev-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: italic;
}

/* Role output cards */
.ev-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ev-role-card {
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-top: 3px solid rgb(var(--ev-accent));
  background: linear-gradient(160deg, rgba(var(--ev-accent), 0.06), rgba(255, 255, 255, 0));
}

.ev-role-name {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: rgb(var(--ev-accent));
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ev-role-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}

/* Audit trail timeline */
.ev-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ev-event {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 16px 16px;
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.ev-event:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.ev-event-dot {
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgb(var(--ev-accent));
  box-shadow: 0 0 0 3px rgba(var(--ev-accent), 0.2);
}

.ev-event-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding-top: 1px;
}

.ev-event-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ev-actor-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgb(var(--ev-accent));
  background: rgba(var(--ev-accent), 0.16);
  border: 1px solid rgba(var(--ev-accent), 0.3);
}

.ev-event-text {
  font-size: 12.5px;
  line-height: 1.4;
}

/* Case selector side */
.ev-side {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(160deg, #19222e, #131a24);
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 16px;
}

.ev-case-list {
  display: grid;
  gap: 8px;
}

.ev-case-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid #59636f;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ev-case-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
}

.ev-case-card.risk-high {
  border-left-color: #f87171;
}
.ev-case-card.risk-medium {
  border-left-color: #fbbf24;
}
.ev-case-card.risk-low {
  border-left-color: #34d399;
}

.ev-case-card.active {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.ev-case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ev-case-top strong {
  font-size: 13px;
}

.ev-case-name {
  font-size: 13px;
  font-weight: 700;
}

.ev-case-step {
  color: var(--muted);
  font-size: 11.5px;
}

.ev-case-evidence {
  justify-self: start;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  color: rgb(var(--ev-accent));
  background: rgba(var(--ev-accent), 0.14);
}

.ev-packet {
  border-top: 1px solid var(--line-muted);
  padding-top: 12px;
}

.ev-packet h3 {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 800;
}

.ev-packet h3:nth-of-type(2) {
  margin-top: 12px;
}

.ev-packet p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ev-packet-items {
  display: grid;
  gap: 6px;
}

.ev-packet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-muted);
}

.ev-packet-item span {
  font-size: 12px;
}

.ev-packet-item em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ev-side-note {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

@media (max-width: 1100px) {
  .ev-layout {
    grid-template-columns: 1fr;
  }
  .ev-side {
    position: static;
  }
  .ev-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ev-evidence-grid,
  .ev-role-grid {
    grid-template-columns: 1fr;
  }
}

.trace-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(460px, 94vw);
  background: #10161f;
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: auto;
  z-index: 50;
  transform: translateX(105%);
  transition: transform 0.2s ease;
}

.trace-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
}

.chip-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip-list span {
  background: #252c36;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
}

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 45;
}

.scrim.show {
  display: block;
}

.result-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
}

.result-modal {
  width: min(720px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: #10161f;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.result-detail-list {
  display: grid;
  gap: 10px;
}

.result-detail-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.result-detail-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.result-detail-card strong {
  color: var(--ink);
}

.result-detail-card span {
  color: var(--muted);
  font-size: 12px;
}

.result-detail-card p {
  margin: 0;
  color: var(--muted-2);
}

.allergy-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.allergy-options-grid article {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-muted);
  border-radius: 8px;
}

.allergy-options-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.allergy-options-grid strong,
.allergy-options-grid p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.allergy-safety-note {
  margin-top: 10px;
  padding: 10px;
  color: var(--muted-2);
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.28);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.allergy-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

/* ---------- Aerius Copilot (universal floating assistant) ---------- */
.copilot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
}

.copilot-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.4);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(45, 212, 191, 0.16)), #111a25;
  color: #eaf6ff;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.copilot-launcher:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.7);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}

.copilot-launcher-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 15px;
  color: #07121f;
  background: linear-gradient(135deg, #7dd3fc, #5eead4);
}

.copilot-launcher-text {
  display: grid;
  gap: 1px;
  text-align: left;
}

.copilot-launcher-text strong {
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.copilot-launcher-text span {
  font-size: 11px;
  color: #aecbe4;
}

.copilot-panel {
  display: none;
  flex-direction: column;
  width: min(380px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 60px));
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 16px;
  background: linear-gradient(165deg, #18222f, #121922);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.copilot.open .copilot-launcher {
  display: none;
}

.copilot.open .copilot-panel {
  display: flex;
}

.copilot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(56, 189, 248, 0.06));
  border-bottom: 1px solid rgba(125, 211, 252, 0.22);
}

.copilot-head-titles {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copilot-head-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 15px;
  color: #07121f;
  background: linear-gradient(135deg, #7dd3fc, #5eead4);
}

.copilot-head-titles strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
  color: #f3fbff;
  line-height: 1.2;
}

.copilot-head-titles div span {
  font-size: 11.5px;
  color: #aecbe4;
}

.copilot-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copilot-status {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  color: #9fe6ff;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.34);
  white-space: nowrap;
}

.copilot-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cdd9e8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.copilot-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Context intelligence card (glass-dark) */
.copilot-context-card {
  display: grid;
  gap: 6px;
  margin: 12px 14px 0;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.06), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.copilot-context-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copilot-context-status {
  color: #9fb0c2;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.copilot-context-patient {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.copilot-context-patient strong {
  color: #f1f7ff;
  font-size: 14.5px;
  font-weight: 800;
}

.copilot-context-patient span {
  color: #aebccd;
  font-size: 12px;
  font-weight: 600;
}

.copilot-context-concern {
  color: #cdd9e8;
  font-size: 12.5px;
  line-height: 1.4;
}

.copilot-risk {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.copilot-risk.tone-red {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.18);
}
.copilot-risk.tone-amber {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.18);
}
.copilot-risk.tone-green {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.18);
}

/* Chat messages */
.copilot-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.copilot-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}

.copilot-msg.from-aerius {
  align-self: flex-start;
}

.copilot-msg.from-user {
  align-self: flex-end;
  justify-content: flex-end;
}

.copilot-msg-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  color: #07121f;
  background: linear-gradient(135deg, #7dd3fc, #5eead4);
}

.copilot-bubble {
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
}

.copilot-msg.from-aerius .copilot-bubble {
  color: #eaf2fb;
  background: linear-gradient(160deg, #16243a, #121c2c);
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-bottom-left-radius: 5px;
  box-shadow: 0 6px 18px rgba(8, 18, 34, 0.5), 0 2px 14px rgba(56, 189, 248, 0.08);
}

.copilot-msg.from-user .copilot-bubble {
  color: #e9fbf6;
  background: linear-gradient(135deg, #18424a, #143036);
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-bottom-right-radius: 5px;
  box-shadow: 0 6px 18px rgba(8, 18, 34, 0.45), 0 2px 14px rgba(45, 212, 191, 0.1);
}

/* Suggestion chips */
.copilot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 16px 12px;
  overflow: hidden;
  border-top: 1px solid var(--line-muted);
  flex-shrink: 0;
}

.copilot-chip {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(56, 189, 248, 0.06);
  color: #bfe3f7;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.copilot-chip:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(56, 189, 248, 0.14);
  color: #eaf6ff;
}

/* Composer */
.copilot-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-muted);
  background: rgba(255, 255, 255, 0.012);
}

.copilot-compose textarea {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 120px;
  margin: 0;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  background: rgba(8, 14, 22, 0.6);
  color: #f1f7ff;
  font-size: 13.5px;
  line-height: 1.45;
  resize: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.copilot-compose textarea::placeholder {
  color: #6f7f90;
}

.copilot-compose textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.copilot-send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(45, 212, 191, 0.2));
  color: #9ff4e4;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.copilot-send:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.34), rgba(45, 212, 191, 0.3));
  box-shadow: 0 8px 18px rgba(45, 212, 191, 0.22);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #d0d7de;
  color: #0d1117;
  border-radius: 8px;
  padding: 10px 14px;
  z-index: 80;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .sketch-top-row {
    grid-template-columns: 1fr;
  }

  .queue-header {
    align-items: stretch;
    flex-direction: column;
  }

  .queue-controls {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .patient-queue-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next-patient-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .next-patient-cta {
    grid-column: 1 / -1;
  }

  .next-patient-action {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .ph-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ph-filters {
    justify-content: flex-start;
  }

  .ph-drawer-body {
    column-count: 2;
  }
}

@media (max-width: 700px) {
  .ph-drawer-body {
    column-count: 1;
    overflow: auto;
  }

  .ph-drawer-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: flex;
  }

  .topbar {
    position: static;
  }

  .topbar-main {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workspace-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .workspace-tab {
    white-space: nowrap;
  }

  .summary-grid,
  .two-col,
  .three-col,
  .lanes,
  .queue-groups,
  .doctor-macro-grid,
  .doctor-workbench,
  .doctor-sketchboard,
  .sketch-facts,
  .symptom-grid,
  .history-grid,
  .assessment-disclosure,
  .pending-columns,
  .focus-actions,
  .primary-actions,
  .secondary-actions,
  .admin-actions,
  .clinical-header,
  .evidence-list,
  .clinical-brief-grid,
  .doctor-evidence-list,
  .snapshot-main {
    grid-template-columns: 1fr;
  }

  .doctor-workbench {
    grid-template-areas:
      "symptoms"
      "assessment"
      "action"
      "evidence"
      "history"
      "support";
  }

  .sketch-patient-strip {
    flex: 1 1 auto;
  }

  .sketch-top-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .clinical-monitor {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .decision-card.wide {
    grid-column: auto;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .doctor-sketchboard {
    grid-template-columns: 1fr;
  }

  .patient-queue-board {
    grid-template-columns: 1fr;
  }

  .next-patient-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .next-patient-action {
    width: 100%;
  }

  .allergy-options-grid,
  .allergy-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* ---------- Aerius Medical Overview ---------- */
.overview-page {
  display: grid;
  gap: 32px;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 1280px;
  margin: 0 auto;
}

.overview-hero {
  padding: 18px 24px 16px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-top: 3px solid rgba(45, 212, 191, 0.65);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.07), rgba(167, 139, 250, 0.05) 48%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(160deg, #141c28, #0f151f);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.overview-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-eyebrow {
  display: inline-block;
  margin-bottom: 0;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.1);
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overview-hero h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: #f4f9ff;
}

.overview-subtitle {
  margin: 0;
  max-width: 920px;
  color: #c4d4e8;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.overview-desc {
  margin: 0;
  max-width: 980px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.overview-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
}

.overview-btn {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.overview-btn.primary {
  color: #07121f;
  background: linear-gradient(135deg, #34d399, #2dd4bf);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.18);
}

.overview-btn.primary:hover {
  filter: brightness(1.06);
}

.overview-btn.secondary {
  color: #d4ecff;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.overview-btn.secondary:hover {
  background: rgba(56, 189, 248, 0.2);
}

.overview-btn.ghost {
  color: #cdd9e8;
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.overview-btn.ghost:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.1);
}

.overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.overview-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-muted);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.overview-section h2 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
  color: #eef6ff;
}

.overview-card-grid {
  display: grid;
  gap: 16px;
}

.overview-card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-card,
.overview-start-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.overview-card h3,
.overview-start-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
}

.overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.overview-card-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.overview-card.tone-cyan {
  border-left: 3px solid rgba(56, 189, 248, 0.55);
}
.overview-card.tone-cyan h3 {
  color: #7dd3fc;
}
.overview-card.tone-cyan .overview-card-tag {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.overview-card.tone-violet {
  border-left: 3px solid rgba(167, 139, 250, 0.55);
}
.overview-card.tone-violet h3 {
  color: #c4b5fd;
}
.overview-card.tone-violet .overview-card-tag {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.overview-card.tone-teal {
  border-left: 3px solid rgba(45, 212, 191, 0.55);
}
.overview-card.tone-teal h3 {
  color: #5eead4;
}
.overview-card.tone-teal .overview-card-tag {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.22);
}

.overview-card.tone-amber {
  border-left: 3px solid rgba(251, 191, 36, 0.55);
}
.overview-card.tone-amber .overview-card-tag {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.overview-flow-section {
  position: relative;
}

.overview-flow-head {
  margin-bottom: 14px;
}

.overview-flow-head h2 {
  margin: 0 0 6px;
}

.overview-flow-lead {
  margin: 0;
  max-width: 720px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}

.overview-flow-journey {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.overview-flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: rgba(125, 211, 252, 0.28);
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

.overview-flow-connector svg {
  display: block;
}

.overview-flow-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  min-height: 16px;
  margin: 0 0 2px;
}

.overview-flow-bridge .overview-flow-connector.down {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  color: rgba(125, 211, 252, 0.32);
}

.overview-flow-step {
  --flow-accent: 125, 211, 252;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  min-height: 122px;
  width: 100%;
  padding: 14px 14px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-top: 2px solid rgba(var(--flow-accent), 0.42);
  background:
    linear-gradient(165deg, rgba(var(--flow-accent), 0.06) 0%, rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(var(--flow-accent), 0.06);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.overview-flow-step:hover {
  background:
    linear-gradient(165deg, rgba(var(--flow-accent), 0.1) 0%, rgba(255, 255, 255, 0.02) 48%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(var(--flow-accent), 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 18px rgba(var(--flow-accent), 0.07);
}

.overview-flow-step.flow-cyan { --flow-accent: 56, 189, 248; }
.overview-flow-step.flow-blue { --flow-accent: 96, 165, 250; }
.overview-flow-step.flow-indigo { --flow-accent: 129, 140, 248; }
.overview-flow-step.flow-violet { --flow-accent: 167, 139, 250; }
.overview-flow-step.flow-teal { --flow-accent: 45, 212, 191; }
.overview-flow-step.flow-amber { --flow-accent: 251, 191, 36; }
.overview-flow-step.flow-green { --flow-accent: 52, 211, 153; }
.overview-flow-step.flow-magenta { --flow-accent: 192, 132, 252; }

.overview-flow-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(8, 14, 22, 0.72);
  border: 1.5px solid rgba(var(--flow-accent), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--flow-accent), 0.1);
  color: rgb(var(--flow-accent));
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.overview-flow-step strong {
  font-size: 13.5px;
  color: #eef6ff;
  line-height: 1.3;
}

.overview-flow-step p {
  margin: 0;
  flex: 1;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.overview-safety-panel {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-left: 4px solid rgba(251, 191, 36, 0.6);
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.06), rgba(255, 255, 255, 0.01));
}

.overview-safety-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.overview-safety-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #d4e1f0;
}

.overview-safety-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: currentColor;
}

.overview-safety-list li.tone-red {
  color: #fca5a5;
}
.overview-safety-list li.tone-amber {
  color: #fcd34d;
}
.overview-safety-list li.tone-cyan {
  color: #7dd3fc;
}
.overview-safety-list li.tone-violet {
  color: #c4b5fd;
}
.overview-safety-list li.tone-green {
  color: #6ee7b7;
}

.overview-safety-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: italic;
}

.overview-start-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.overview-start-card.tone-cyan {
  border-left: 3px solid rgba(56, 189, 248, 0.55);
}
.overview-start-card.tone-cyan h3 {
  color: #7dd3fc;
}
.overview-start-card.tone-violet {
  border-left: 3px solid rgba(167, 139, 250, 0.55);
}
.overview-start-card.tone-violet h3 {
  color: #c4b5fd;
}
.overview-start-card.tone-teal {
  border-left: 3px solid rgba(45, 212, 191, 0.55);
}
.overview-start-card.tone-teal h3 {
  color: #5eead4;
}

@media (max-width: 1100px) {
  .overview-card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-card-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-flow-connector,
  .overview-flow-bridge {
    display: none;
  }
  .overview-flow-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .overview-flow-journey {
    gap: 14px;
  }
  .overview-safety-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .overview-hero h1 {
    font-size: 26px;
  }
  .overview-card-grid.three,
  .overview-card-grid.four {
    grid-template-columns: 1fr;
  }
  .overview-flow-row {
    grid-template-columns: 1fr;
  }
  .overview-flow-step {
    min-height: 0;
  }
}

/* ---------- Deck screenshot mode (?shot=deck) ---------- */
#app.deck-shot-mode,
.deck-shot-mode {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--page);
}

.deck-shot-mode,
.deck-shot-mode * {
  scrollbar-width: none;
}

.deck-shot-mode *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.deck-shot-mode .demo-nav,
.deck-shot-mode .copilot,
.deck-shot-mode .toast,
.deck-shot-mode .trace-drawer,
.deck-shot-mode .reg-trace-backdrop,
.deck-shot-mode .reg-trace-modal,
.deck-shot-mode .reasoning-trace-modal,
.deck-shot-mode .aerius-trace-btn {
  display: none !important;
}

.deck-shot-mode .workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 12px 10px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 1.45;
}

.deck-shot-mode .page-head {
  margin-bottom: 10px;
}

.deck-shot-mode .page-head p {
  font-size: 12.5px;
}

.deck-shot-mode h1 {
  font-size: 24px;
}

.deck-shot-mode h2,
.deck-shot-mode .situation-title {
  font-size: 15px;
}

.deck-shot-mode h3 {
  font-size: 13.5px;
}

/* Doctor Workspace */
.deck-shot-mode .sketch-top-row {
  margin-bottom: 8px;
  gap: 10px;
}

.deck-shot-mode .patient-result-actions {
  display: none !important;
}

.deck-shot-mode .doctor-sketchboard .exam-panel,
.deck-shot-mode .doctor-sketchboard .history-panel,
.deck-shot-mode .doctor-sketchboard .next-panel,
.deck-shot-mode .doctor-sketchboard .missing-panel {
  display: none !important;
}

.deck-shot-mode .doctor-sketchboard {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.deck-shot-mode .doctor-sketchboard .sketch-panel {
  max-height: calc((100vh - 168px) / 2);
  overflow: hidden;
}

.deck-shot-mode .doctor-page-head,
.deck-shot-mode .doctor-quick-actions {
  display: none !important;
}

/* Nurse Intake */
.deck-shot-mode .nurse-room-top,
.deck-shot-mode .nurse-queue-back {
  display: none !important;
}

.deck-shot-mode .nurse-room {
  gap: 8px;
  font-size: 14px;
  height: calc(100vh - 20px);
  overflow: hidden;
}

.deck-shot-mode .nurse-room-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.deck-shot-mode .nurse-band-card {
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

.deck-shot-mode .nurse-intake-section:not(.complaint-section):not(.measurements-summary-section),
.deck-shot-mode .nurse-intake-panel .handoff-section {
  display: none !important;
}

.deck-shot-mode .nurse-band-scroll {
  overflow: hidden;
}

/* Registration */
.deck-shot-mode .registration-summary-grid,
.deck-shot-mode .reg-kpi-grid,
.deck-shot-mode .reg-head .reg-controls,
.deck-shot-mode .reg-device-status {
  display: none !important;
}

.deck-shot-mode .reg-workspace {
  gap: 10px;
  font-size: 14px;
}

.deck-shot-mode .reg-head {
  margin-bottom: 0;
}

.deck-shot-mode .reg-head p {
  display: none;
}

.deck-shot-mode .registration-main-grid {
  min-height: auto;
  max-height: calc(100vh - 108px);
  overflow: hidden;
}

.deck-shot-mode .registration-column {
  max-height: calc(100vh - 108px);
  overflow: hidden;
}

/* Trace / Evidence */
.deck-shot-mode .ev-console {
  gap: 10px;
  font-size: 14px;
  height: calc(100vh - 20px);
  overflow: hidden;
}

.deck-shot-mode .ev-head p {
  display: none;
}

.deck-shot-mode .ev-summary,
.deck-shot-mode .ev-metric-row,
.deck-shot-mode .ev-side,
.deck-shot-mode .ev-audit {
  display: none !important;
}

.deck-shot-mode .ev-layout {
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: calc(100vh - 72px);
  overflow: hidden;
}

.deck-shot-mode .ev-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.deck-shot-mode .ev-evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.deck-shot-mode .ev-evidence-grid .ev-block.tone-blue {
  display: none !important;
}

.deck-shot-mode .ev-boundary,
.deck-shot-mode .ev-roles {
  flex-shrink: 0;
}

.deck-shot-mode .ev-boundary-list,
.deck-shot-mode .ev-role-grid {
  gap: 6px;
}

@media (max-aspect-ratio: 4/3) {
  .deck-shot-mode .workspace {
    padding: 6px 10px;
  }
}
