/* Rendered inside the health record, so the palette stays quiet and the
   density matches a clinical screen rather than a marketing page. */
:root {
  --ground: #f6f8f9;
  --surface: #ffffff;
  --ink: #16242b;
  --ink-2: #40535c;
  --ink-3: #6e838c;
  --rule: #d8e1e5;
  --accent: #0d6862;
  --accent-soft: #e3efed;
  --ok: #226b46;
  --ok-soft: #e0efe6;
  --error: #9c3226;
  --error-soft: #f7e4e1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: var(--ground);
  color: var(--ink-2);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1 { margin: 0; font-size: 1.05rem; color: var(--ink); }
h2 { margin: 0; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
p { margin: 0; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.patient { border-left: 3px solid var(--accent); }
.patient-details { font-size: 12.5px; color: var(--ink-3); }

form { display: flex; gap: 8px; flex-wrap: wrap; }

input[type="text"] {
  flex: 1 1 150px;
  min-width: 0;
  padding: 9px 11px;
  font: 600 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  padding: 9px 16px;
  font: 600 14px/1 inherit;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }
button.secondary { color: var(--ink-2); background: var(--surface); border-color: var(--rule); }

.status { font-size: 13px; }
.status-ok { color: var(--ok); }
.status-error { color: var(--error); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.session {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.session + .session { margin-top: 8px; }
.session-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.session-time { font-weight: 600; color: var(--ink); font-size: 13.5px; }

.pill {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-live { background: var(--accent-soft); color: var(--accent); }

.stats { display: flex; gap: 22px; }
.stat { display: flex; flex-direction: column; }
.stat-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.stat-value { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--ground);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.fatal { border-left: 3px solid var(--error); }

.stack { display: flex; flex-direction: column; gap: 14px; }
