:root {
  --ink: #172a2a;
  --muted: #6e7f7c;
  --faint: #95a39f;
  --line: #e3eae7;
  --surface: #ffffff;
  --canvas: #f5f8f6;
  --primary: #0d6b5f;
  --primary-dark: #09584e;
  --primary-soft: #e3f2ed;
  --teal-soft: #edf8f5;
  --red: #bb423e;
  --red-soft: #fbeae8;
  --amber: #a56517;
  --amber-soft: #fff3dc;
  --blue: #38689b;
  --blue-soft: #eaf2fb;
  --shadow: 0 10px 34px rgba(28, 57, 52, .08);
  --sidebar: 252px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  background: #fbfdfc;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 0 6px 24px;
  border: 0; background: transparent; text-align: left; cursor: pointer;
}
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: white; background: var(--primary); box-shadow: 0 7px 18px rgba(13, 107, 95, .25); }
.brand-mark svg { display: block; width: 22px; height: 22px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.35px; line-height: 1.1; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 11px; background: transparent; color: #526662; cursor: pointer; text-align: left;
  transition: background .16s ease, color .16s ease, transform .16s ease; font-size: 14px;
}
.nav-item:hover { background: #eef4f1; color: var(--ink); }
.nav-item:active { transform: scale(.985); }
.nav-item.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 650; }
.nav-icon, [data-icon] { display: inline-grid; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-badge { margin-left: auto; min-width: 23px; padding: 3px 6px; border-radius: 99px; background: #edf1ef; color: var(--muted); font-size: 11px; text-align: center; }
.nav-badge--alert { color: var(--red); background: var(--red-soft); }
.nav-divider { height: 1px; margin: 12px 8px; background: var(--line); }
.pilot-status { margin: auto 6px 18px; padding: 15px; border: 1px solid #d9e7e2; border-radius: 14px; background: linear-gradient(145deg, #f5fbf8, #edf6f2); }
.pilot-status__top { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .45px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2e9a76; box-shadow: 0 0 0 3px rgba(46,154,118,.12); }
.pilot-status strong { font-size: 14px; }
.pilot-status small { color: var(--muted); font-size: 11px; }
.progress-track { height: 5px; margin: 9px 0 7px; overflow: hidden; border-radius: 5px; background: #d9e5e1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.profile-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.profile-card:hover { background: #f0f5f3; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: #d7e9e3; color: var(--primary-dark); font-size: 12px; font-weight: 750; line-height: 1; text-align: center; }
.avatar img, .avatar svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-card__text { min-width: 0; flex: 1; }
.profile-card__text strong, .profile-card__text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__text strong { font-size: 13px; }
.profile-card__text small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.profile-card__text .profile-card__clinic { margin-top: 2px; color: var(--faint); font-size: 10px; }
.more-dots { color: var(--faint); font-size: 11px; letter-spacing: 1px; }
.menu-backdrop { display: none; }

.workspace { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 72px; display: flex; align-items: center; gap: 20px; padding: 0 clamp(20px, 3vw, 42px);
  background: rgba(251,253,252,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.mobile-menu { display: none; width: 38px; height: 38px; padding: 10px; border: 0; border-radius: 10px; background: transparent; }
.mobile-menu span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--ink); }
.global-search { display: flex; align-items: center; gap: 10px; width: min(360px, 42vw); height: 40px; padding: 0 11px; border: 1px solid transparent; border-radius: 10px; background: #f0f4f2; transition: .18s ease; }
.global-search[hidden] { display: none; }
.global-search:focus-within { border-color: #9bc6ba; background: white; box-shadow: 0 0 0 3px rgba(13,107,95,.08); }
.global-search svg { width: 17px; height: 17px; color: var(--muted); }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.global-search input::placeholder { color: #869591; }
kbd { padding: 3px 6px; border: 1px solid #d8e0dd; border-radius: 5px; background: white; color: var(--faint); font-family: inherit; font-size: 10px; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.integration-pill { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 11px; border: 1px solid #dce7e3; border-radius: 9px; background: white; color: var(--muted); font-size: 11px; }
.icon-button { position: relative; display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.icon-button:hover { background: #f5f8f6; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button i { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 1.5px solid white; border-radius: 50%; background: #cc4d49; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 12px; font-weight: 650; cursor: pointer; transition: .16s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(26,55,50,.08); }
.button:active { transform: translateY(0); }
.button svg { width: 16px; height: 16px; }
.button--primary { border-color: var(--primary); background: var(--primary); color: white; }
.button--primary:hover { background: var(--primary-dark); }
.button--secondary { border-color: #bbd7cf; color: var(--primary-dark); background: var(--teal-soft); }
.button--danger { border-color: #efc8c4; color: var(--red); background: var(--red-soft); }
.button--ghost { border-color: transparent; background: transparent; color: var(--primary); }
.button--small { min-height: 36px; padding: 0 13px; font-size: 12px; }
.button--wide { width: 100%; }

.content { max-width: 1510px; margin: 0 auto; padding: 34px clamp(20px, 3vw, 42px) 48px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 7px; color: var(--primary); font-size: 11px; font-weight: 700; }
.page-title { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -1.1px; }
.page-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.page-head__actions { display: flex; align-items: center; gap: 9px; }
.date-card { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); font-size: 11px; }
.date-card svg { width: 16px; height: 16px; color: var(--primary); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric-card { min-width: 0; padding: 18px 19px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 2px 0 rgba(26,55,50,.015); }
.metric-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon--alert { background: var(--red-soft); color: var(--red); }
.metric-icon--amber { background: var(--amber-soft); color: var(--amber); }
.metric-icon--blue { background: var(--blue-soft); color: var(--blue); }
.metric-value { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.metric-value strong { font-size: 28px; line-height: 1; letter-spacing: -.7px; }
.metric-value span { color: var(--muted); font-size: 10px; }
.metric-value .trend-up { color: var(--primary); }
.metric-value .trend-alert { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 20px; }
.nurse-dashboard { display: grid; gap: 20px; }
.attention-panel { border-color: #d7e2de; box-shadow: 0 8px 30px rgba(25,55,49,.045); }
.attention-list { display: grid; }
.attention-row { position: relative; display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.45fr) minmax(130px, .55fr) auto; align-items: center; gap: 24px; min-height: 88px; padding: 16px 20px 16px 24px; border-bottom: 1px solid var(--line); }
.attention-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--amber); }
.attention-row--high::before { background: var(--red); }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: #fbfdfc; }
.attention-reason { min-width: 0; }
.attention-reason > span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 8px; font-weight: 750; letter-spacing: .45px; text-transform: uppercase; }
.attention-reason strong { display: block; overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.attention-reason small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.attention-status { display: grid; justify-items: start; gap: 7px; }
.attention-status small { color: var(--muted); font-size: 9px; }
.attention-actions { display: flex; justify-content: flex-end; }
.attention-empty { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 150px; color: var(--primary); }
.attention-empty > svg { width: 24px; height: 24px; }
.attention-empty strong, .attention-empty span { display: block; }
.attention-empty strong { font-size: 12px; }
.attention-empty span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.contact-overview { display: grid; gap: 13px; }
.contact-overview__head h2 { margin: 0; font-size: 16px; letter-spacing: -.15px; }
.contact-overview__head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.contact-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-group { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 96px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.contact-group:hover { border-color: #a9c8be; background: #fbfdfc; }
.contact-group:focus-visible { outline: 3px solid rgba(13,107,95,.15); outline-offset: 2px; }
.contact-group--pending:hover { border-color: #d8b877; }
.contact-group__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.contact-group--pending .contact-group__icon { background: var(--amber-soft); color: var(--amber); }
.contact-group__icon svg { width: 20px; height: 20px; }
.contact-group__content { min-width: 0; }
.contact-group__content strong, .contact-group__content span, .contact-group__content small { display: block; }
.contact-group__content strong { font-size: 28px; line-height: 1; letter-spacing: -.6px; }
.contact-group__content span { margin-top: 6px; font-size: 14px; font-weight: 700; }
.contact-group__content small { overflow: hidden; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.contact-group__link { display: flex; align-items: center; color: var(--primary); }
.contact-group--pending .contact-group__link { color: #966411; }
.contact-group__link svg { width: 14px; height: 14px; }
.active-contact-filter { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 8px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 700; }
.active-contact-filter button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(13, 107, 95, .08); color: inherit; font: inherit; cursor: pointer; }
.stack { display: grid; align-content: start; gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.panel--padded { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.panel-head--plain { padding: 0 0 15px; border: 0; }
.panel-title-wrap { min-width: 0; }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.15px; }
.panel-description { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.count-pill { flex: 0 0 auto; min-width: 28px; padding: 5px 9px; border-radius: 20px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 700; text-align: center; }
.text-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 11px; font-weight: 650; cursor: pointer; }
.text-link svg { width: 14px; height: 14px; }
.text-link:hover { text-decoration: underline; }

.priority-list { display: grid; }
.priority-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(160px, .9fr) minmax(150px, 1.15fr) auto; align-items: center; gap: 18px; min-height: 74px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.priority-row:last-child { border-bottom: 0; }
.priority-row:hover { background: #fbfdfc; }
.patient-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.patient-cell .avatar { width: 38px; height: 38px; }
.patient-cell__text { min-width: 0; }
.patient-cell strong, .patient-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-cell strong { font-size: 14px; }
.patient-cell small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.priority-reason strong, .protocol-cell strong { display: block; font-size: 11px; }
.priority-reason small, .protocol-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.risk-badge, .status-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; min-height: 26px; padding: 5px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.risk-badge::before, .status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.risk-badge--high { color: var(--red); background: var(--red-soft); }
.risk-badge--medium { color: var(--amber); background: var(--amber-soft); }
.risk-badge--low { color: var(--primary); background: var(--primary-soft); }
.status-badge--waiting { color: var(--amber); background: var(--amber-soft); }
.status-badge--active { color: var(--primary); background: var(--primary-soft); }
.status-badge--done { color: #5d716c; background: #edf1ef; }

.timeline { display: grid; padding: 5px 20px 16px; }
.timeline-item { display: grid; grid-template-columns: 47px 12px minmax(0, 1fr) auto; gap: 9px; min-height: 62px; padding-top: 15px; }
.timeline-time { padding-top: 1px; color: var(--muted); font-size: 10px; }
.timeline-marker { position: relative; width: 8px; height: 8px; margin-top: 3px; border: 2px solid var(--primary); border-radius: 50%; background: white; }
.timeline-marker::after { content: ""; position: absolute; top: 9px; left: 1px; width: 1px; height: 48px; background: var(--line); }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-content strong { display: block; font-size: 11px; }
.timeline-content small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.timeline-count { color: var(--primary); font-size: 10px; font-weight: 650; }

.channel-card { position: relative; padding: 20px; overflow: hidden; background: linear-gradient(145deg, #0c665b, #0a524a); color: white; }
.channel-card::after { content: ""; position: absolute; width: 160px; height: 160px; top: -85px; right: -55px; border: 30px solid rgba(255,255,255,.05); border-radius: 50%; }
.channel-card__head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; }
.channel-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.13); }
.channel-card__icon svg { width: 20px; height: 20px; }
.channel-card h3 { margin: 15px 0 4px; font-size: 15px; }
.channel-card p { margin: 0; color: rgba(255,255,255,.65); font-size: 10px; }
.channel-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.channel-stats strong, .channel-stats small { display: block; }
.channel-stats strong { font-size: 16px; }
.channel-stats small { margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 20px; background: rgba(255,255,255,.3); }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); }

.quality-list { display: grid; gap: 13px; }
.quality-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.quality-row__label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.quality-row .progress-track { width: 100%; margin: 0; }
.quality-score { min-width: 34px; color: var(--primary); font-size: 11px; font-weight: 700; text-align: right; }

.filters { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.filter-input, .select-control { height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: white; color: var(--ink); font-size: 11px; }
.filter-input { min-width: 250px; }
.filter-input:focus, .select-control:focus { border-color: #8fbeaf; box-shadow: 0 0 0 3px rgba(13,107,95,.07); }
.filter-count { margin-left: auto; color: var(--muted); font-size: 11px; }

.registry-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.registry-search { display: flex; align-items: center; gap: 10px; width: min(560px, 100%); height: 44px; padding: 0 9px 0 14px; border: 1px solid transparent; border-radius: 12px; background: #f3f7f5; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.registry-search:hover { background: #edf4f1; }
.registry-search:focus-within { border-color: #8fbeaf; box-shadow: 0 0 0 3px rgba(13,107,95,.07); }
.registry-search:focus-within { background: white; }
.registry-search svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted); }
.registry-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.registry-search button { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(13,107,95,.08); color: var(--primary); font-size: 15px; cursor: pointer; }
.registry-search button:focus-visible, .registry-reset:focus-visible { outline: 2px solid #8fbeaf; outline-offset: 2px; }
.registry-toolbar .active-contact-filter { margin: 0; }
.registry-sync { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 9px; white-space: nowrap; }
.registry-sync svg { width: 13px; height: 13px; color: var(--primary); }
.registry-panel { margin-bottom: 14px; }
.registry-panel-actions { display: flex; align-items: center; gap: 9px; }
.registry-count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 750; }
.registry-reset { padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 9px; font-weight: 700; cursor: pointer; }
.patient-registry-scroll { overflow-x: auto; }
.patient-registry-table { width: 100%; border-collapse: collapse; }
.patient-registry-table th { padding: 11px 14px; color: var(--muted); background: #fbfdfc; font-size: 11px; font-weight: 650; text-align: left; white-space: nowrap; }
.patient-registry-table .registry-filter-row th { padding: 0 6px 9px; border-top: 1px solid #eef3f1; background: #fbfdfc; text-transform: none; }
.table-filter, .table-name-filter { width: 100%; min-width: 92px; height: 36px; padding: 0 26px 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: white; color: var(--muted); font-size: 11px; }
.table-name-filter { min-width: 170px; padding-right: 10px; color: var(--ink); font-size: 12px; }
.table-filter:focus, .table-name-filter:focus { border-color: #8fbeaf; box-shadow: 0 0 0 2px rgba(13,107,95,.06); }
.patient-registry-table td { min-width: 95px; padding: 15px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.patient-registry-table tbody tr:hover { background: #fbfdfc; }
.registry-row { cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.registry-row:hover { background: #f5faf8 !important; }
.registry-row:focus-visible { position: relative; z-index: 1; outline: 2px solid #8fc4b6; outline-offset: -2px; }
.registry-patient { display: flex; align-items: center; min-width: 170px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.registry-patient .avatar { flex: 0 0 auto; width: 36px; height: 36px; }
.registry-patient strong, .registry-patient small { display: block; }
.registry-patient strong { font-size: 13px; }
.registry-patient small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.registry-primary, .registry-secondary { display: block; max-width: 220px; }
.registry-primary { font-size: 13px; line-height: 1.35; }
.registry-secondary { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.protocol-assignment { display: flex; align-items: center; gap: 8px; min-width: 170px; padding: 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; text-align: left; }
.protocol-assignment:hover strong { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.protocol-assignment:focus-visible { outline: 2px solid #8fc4b6; outline-offset: 4px; border-radius: 4px; }
.protocol-assignment > svg { flex: 0 0 auto; width: 15px; height: 15px; }
.protocol-assignment strong { display: block; }
.protocol-assignment strong { max-width: 190px; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.contact-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.contact-state svg { width: 12px; height: 12px; }
.contact-state--reached { color: var(--primary); }
.contact-state--pending { color: var(--amber); }
.registry-open { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--primary); cursor: pointer; }
.registry-open:hover { border-color: #9fc6ba; background: var(--primary-soft); }
.registry-open svg { width: 14px; height: 14px; }
.registry-empty { padding: 40px 20px; color: var(--muted); font-size: 10px; text-align: center; }
.archive-section { display: grid; gap: 10px; }
.archive-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 15px 18px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf9; color: var(--ink); cursor: pointer; text-align: left; }
.archive-toggle:hover { border-color: #c5d6d1; background: white; }
.archive-toggle > span { display: flex; align-items: center; gap: 10px; }
.archive-toggle > span > svg { width: 17px; height: 17px; color: var(--muted); }
.archive-toggle strong, .archive-toggle small { display: block; }
.archive-toggle strong { font-size: 11px; }
.archive-toggle small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.archive-toggle > span:last-child { color: var(--muted); font-size: 10px; }
.archive-toggle > span:last-child svg { width: 14px; height: 14px; transition: transform .18s ease; }
.archive-toggle[aria-expanded="true"] > span:last-child svg { transform: rotate(90deg); }
.archive-panel { border-radius: 13px; }
.patient-detail-shell { border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }

.patients-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 650px; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.patient-list { border-right: 1px solid var(--line); background: #fbfdfc; }
.patient-list__head { padding: 17px; border-bottom: 1px solid var(--line); }
.patient-list__head .filter-input { width: 100%; min-width: 0; }
.patient-list__items { max-height: 710px; overflow: auto; }
.patient-list-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.patient-list-item:hover { background: white; }
.patient-list-item.is-active { background: var(--primary-soft); box-shadow: inset 3px 0 var(--primary); }
.patient-list-item__content { min-width: 0; flex: 1; }
.patient-list-item__line { display: flex; justify-content: space-between; gap: 8px; }
.patient-list-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.patient-list-item time { color: var(--faint); font-size: 9px; }
.patient-list-item p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.risk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.risk-dot--high { background: var(--red); }
.risk-dot--medium { background: var(--amber); }

.patient-detail { min-width: 0; }
.patient-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.patient-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.patient-identity .avatar { width: 46px; height: 46px; font-size: 14px; }
.patient-identity h2 { margin: 0; font-size: 16px; }
.patient-identity p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.patient-actions { display: flex; gap: 8px; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.5fr) 270px; min-height: 585px; }
.checkin-pane { min-width: 0; padding: 22px; border-right: 1px solid var(--line); background: #f8faf9; }
.checkin-pane__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.checkin-pane__head h2 { margin: 2px 0 0; font-size: 16px; }
.checkin-summary { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 4px 18px rgba(28,57,52,.035); }
.checkin-summary__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 19px; border-bottom: 1px solid var(--line); }
.checkin-summary__head h3 { margin: 11px 0 4px; font-size: 13px; }
.checkin-summary__head p { margin: 0; color: var(--muted); font-size: 9px; }
.checkin-attempt { color: var(--muted); font-size: 9px; white-space: nowrap; }
.checkin-attempt--incomplete { color: var(--amber); font-weight: 750; }
.missing-questions { border-bottom: 1px solid var(--line); background: #fcfdfd; }
.missing-questions summary { display: flex; align-items: center; gap: 8px; padding: 10px 19px; color: #8a6625; cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; }
.missing-questions summary::-webkit-details-marker { display: none; }
.missing-questions summary svg { width: 13px; height: 13px; }
.missing-questions summary svg:last-child { margin-left: auto; color: var(--faint); transition: transform .18s ease; }
.missing-questions[open] summary svg:last-child { transform: rotate(90deg); }
.missing-questions__list { display: grid; gap: 0; padding: 0 19px 9px 40px; }
.missing-questions__list span { padding: 7px 0; border-top: 1px solid #edf1ef; color: var(--muted); font-size: 9px; line-height: 1.4; }
.checkin-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.checkin-status svg { width: 12px; height: 12px; }
.checkin-status--completed { color: var(--primary); background: var(--primary-soft); }
.checkin-status--incomplete { color: #9a651c; background: #fff3dd; }
.checkin-status--declined { color: var(--red); background: #fff0ed; }
.parameter-table { display: grid; }
.parameter-row { display: grid; grid-template-columns: minmax(160px, .75fr) minmax(0, 1.25fr); gap: 22px; padding: 13px 19px; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.45; }
.parameter-row--head { padding-top: 10px; padding-bottom: 10px; color: var(--muted); background: #fbfdfc; font-size: 8px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; }
.parameter-row strong { font-weight: 650; }
.parameter-row span:last-child { color: #536762; }
.parameter-empty { padding: 22px 19px; color: var(--muted); font-size: 10px; text-align: center; }
.checkin-conclusion { margin: 16px 19px; padding: 13px; border: 1px solid #cce4dc; border-radius: 11px; background: var(--teal-soft); }
.checkin-conclusion--medium { border-color: #efd8b4; background: #fff9ed; }
.checkin-conclusion--high { border-color: #efd0ca; background: #fff3f0; }
.checkin-conclusion strong { display: flex; align-items: center; gap: 7px; color: var(--primary); font-size: 10px; }
.checkin-conclusion--medium strong { color: var(--amber); }
.checkin-conclusion--high strong { color: var(--red); }
.checkin-conclusion svg { width: 14px; height: 14px; }
.checkin-conclusion p { margin: 7px 0 0; color: #536762; font-size: 9px; line-height: 1.5; }
.next-contact { display: flex; align-items: center; gap: 6px; padding: 12px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.next-contact svg { width: 13px; height: 13px; color: var(--primary); }
.checkin-empty { display: grid; place-items: center; min-height: 350px; padding: 34px; border: 1px dashed #ccd9d5; border-radius: 15px; background: rgba(255,255,255,.65); text-align: center; }
.checkin-empty h3 { margin: 13px 0 6px; font-size: 13px; }
.checkin-empty p { max-width: 390px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.conversation--embedded { min-height: 420px; margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.conversation { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: #f8faf9; }
.conversation-date { align-self: center; margin: 16px 0 4px; padding: 5px 9px; border-radius: 8px; background: #e8eeeb; color: var(--muted); font-size: 9px; }
.messages { display: grid; gap: 12px; padding: 13px 22px 20px; }
.message { max-width: 75%; }
.message--out { justify-self: end; }
.message__author { margin: 0 0 5px 8px; color: var(--muted); font-size: 9px; }
.message__bubble { padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: white; font-size: 11px; line-height: 1.48; box-shadow: 0 2px 7px rgba(28,57,52,.035); }
.message--out .message__bubble { border-color: #cce2db; border-radius: 14px 14px 4px 14px; background: #e5f2ed; }
.message__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--faint); font-size: 8px; }
.message__meta span { display: inline-flex; align-items: center; gap: 5px; }
.message__meta svg { width: 12px; height: 12px; color: var(--primary); }
.audio-message { display: flex; align-items: center; gap: 9px; min-width: 230px; }
.audio-play { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--primary); color: white; cursor: pointer; }
.audio-play svg { width: 13px; height: 13px; }
.audio-wave { display: flex; align-items: center; gap: 2px; flex: 1; height: 25px; }
.audio-wave i { width: 2px; border-radius: 3px; background: #78aa9e; }
.audio-duration { color: var(--muted); font-size: 9px; }
.transcription { margin-top: 9px; padding-top: 9px; border-top: 1px solid #e6ece9; color: #536762; font-size: 10px; }
.transcription strong { color: var(--primary); font-size: 8px; text-transform: uppercase; letter-spacing: .45px; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin: auto 18px 18px; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.composer textarea { flex: 1; min-height: 34px; max-height: 86px; padding: 8px 7px; resize: none; border: 0; outline: 0; font-size: 11px; }
.composer .icon-button { flex: 0 0 auto; width: 34px; height: 34px; border: 0; background: #f0f5f3; }
.composer .send-button { background: var(--primary); color: white; }
.composer .send-button:hover { background: var(--primary-dark); }
.patient-side { padding: 18px; background: white; }
.side-section { padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.side-section:last-child { border: 0; margin: 0; padding: 0; }
.side-section h3 { margin: 0 0 11px; font-size: 10px; color: var(--muted); letter-spacing: .45px; text-transform: uppercase; }
.info-pair { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: 10px; }
.info-pair span { color: var(--muted); }
.info-pair strong { font-weight: 650; text-align: right; }
.protocol-select { width: 100%; margin-bottom: 9px; }
.risk-summary { padding: 12px; border: 1px solid #efd8b4; border-radius: 11px; background: #fff9ed; }
.risk-summary__head { display: flex; align-items: center; gap: 7px; color: var(--amber); font-size: 10px; font-weight: 700; }
.risk-summary__head svg { width: 15px; height: 15px; }
.risk-summary p { margin: 8px 0 0; color: #6f604b; font-size: 9px; line-height: 1.45; }

.protocol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.protocol-card { display: flex; flex-direction: column; min-height: 190px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; transition: border-color .18s ease, background .18s ease; }
.protocol-card:hover { border-color: #a9c8be; background: #fbfdfc; }
.protocol-card--simple { cursor: pointer; }
.protocol-card--simple:focus-visible { outline: 3px solid rgba(13,107,95,.16); outline-offset: 2px; }
.protocol-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.protocol-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.protocol-icon svg { width: 19px; height: 19px; }
.protocol-card h3 { margin: 0; font-size: 16px; }
.protocol-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.protocol-operation-main { min-height: 38px; margin-top: 16px !important; }
.protocol-operations { display: flex; flex-wrap: wrap; gap: 5px; min-height: 25px; margin-top: 12px; }
.protocol-operations span, .protocol-operations small { padding: 4px 7px; border-radius: 7px; background: #f1f5f3; color: var(--muted); font-size: 8px; }
.protocol-meta { display: flex; gap: 17px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.protocol-meta span { display: inline-flex; align-items: center; gap: 5px; }
.protocol-meta svg { width: 13px; height: 13px; }
.protocol-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: auto; border-top: 1px solid var(--line); }
.protocol-card__footer strong { font-size: 12px; }
.protocol-card__footer > svg { width: 16px; color: var(--primary); }

.protocol-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .75fr); gap: 20px; }
.question-list { display: grid; }
.question-row { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.question-row:last-child { border: 0; }
.question-number { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; }
.question-row strong { display: block; font-size: 13px; line-height: 1.45; }
.question-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.rule-list { display: grid; gap: 9px; }
.rule { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; }
.rule__head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.rule p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rule--stable summary { color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; }

.action-filters { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #edf2f0; }
.action-filter { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.action-filter span { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px; background: rgba(255,255,255,.7); font-size: 8px; }
.action-filter.is-active { background: white; color: var(--primary-dark); box-shadow: 0 2px 7px rgba(28,57,52,.07); font-weight: 700; }
.action-queue { margin-bottom: 14px; }
.action-list { display: grid; }
.action-row { position: relative; display: grid; grid-template-columns: minmax(190px, 1.15fr) minmax(250px, 1.6fr) minmax(125px, .75fr) auto auto; align-items: center; gap: 20px; min-height: 92px; padding: 16px 18px 16px 21px; border-bottom: 1px solid var(--line); }
.action-row:last-child { border-bottom: 0; }
.action-row::before { content: ""; position: absolute; inset: 17px auto 17px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--amber); }
.action-row--urgent::before { background: var(--red); }
.action-row:hover { background: #fbfdfc; }
.action-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.action-person .avatar { width: 36px; height: 36px; font-size: 10px; }
.action-person strong, .action-person small, .action-reason strong, .action-reason small, .action-owner strong, .action-owner small { display: block; }
.action-person strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.action-person small, .action-reason small, .action-owner small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.action-label { display: block; margin-bottom: 5px; color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; }
.action-reason strong { font-size: 13px; line-height: 1.45; }
.action-owner strong { font-size: 12px; line-height: 1.4; }
.action-state { width: max-content; padding: 7px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.action-state--new { color: var(--amber); background: var(--amber-soft); }
.action-state--active { color: var(--primary); background: var(--primary-soft); }
.action-state--doctor { color: var(--blue); background: var(--blue-soft); }
.action-state--done { color: var(--muted); background: #edf1ef; }
.action-buttons { display: flex; justify-content: flex-end; gap: 6px; }
.action-empty { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 150px; color: var(--primary); }
.action-empty > svg { width: 23px; height: 23px; }
.action-empty strong, .action-empty span { display: block; }
.action-empty strong { font-size: 11px; }
.action-empty span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.completed-actions { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.completed-actions summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 17px; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.completed-actions summary::-webkit-details-marker { display: none; }
.completed-actions summary span:last-child { display: flex; align-items: center; gap: 8px; }
.completed-actions summary svg { width: 13px; height: 13px; transition: transform .18s ease; }
.completed-actions[open] summary svg { transform: rotate(90deg); }
.completed-actions .panel { border-width: 1px 0 0; border-radius: 0; }

.pilot-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 28px; padding: 27px; margin-bottom: 20px; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, #0d675c, #0a4d46); color: white; }
.pilot-hero::before { content: ""; position: absolute; inset: auto -80px -170px auto; width: 330px; height: 330px; border: 55px solid rgba(255,255,255,.045); border-radius: 50%; }
.pilot-hero__content { position: relative; z-index: 1; }
.pilot-hero .eyebrow { color: #94dfc9; }
.pilot-hero h2 { margin: 0; max-width: 650px; font-size: 25px; line-height: 1.2; letter-spacing: -.6px; }
.pilot-hero p { max-width: 650px; margin: 11px 0 20px; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.6; }
.pilot-hero .button { border-color: white; }
.pilot-checks { position: relative; z-index: 1; display: grid; gap: 8px; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
.pilot-check { display: flex; align-items: center; gap: 9px; min-height: 29px; font-size: 10px; }
.pilot-check span:first-child { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: rgba(113,220,185,.18); color: #8ce1c5; }
.pilot-check svg { width: 12px; height: 12px; }
.pilot-check em { margin-left: auto; color: rgba(255,255,255,.58); font-size: 9px; font-style: normal; }
.pilot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.test-scenario { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.test-patient { display: flex; align-items: center; gap: 10px; padding: 11px; margin: 13px 0; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; }
.test-patient__content { flex: 1; }
.test-patient strong { display: block; font-size: 10px; }
.test-patient small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.step-list { display: grid; gap: 8px; margin: 15px 0; }
.step-item { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border-radius: 9px; background: #f6f9f7; }
.step-item__number { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: white; color: var(--primary); font-size: 9px; font-weight: 700; }
.step-item strong { display: block; font-size: 10px; }
.step-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.test-result { display: none; margin-top: 13px; padding: 12px; border: 1px solid #cce4dc; border-radius: 10px; background: var(--teal-soft); color: var(--primary-dark); font-size: 10px; line-height: 1.5; }
.test-result.is-visible { display: block; animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.empty-state { display: grid; place-items: center; min-height: 350px; padding: 30px; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 13px; border-radius: 17px; background: var(--primary-soft); color: var(--primary); }
.empty-state__icon svg { width: 25px; height: 25px; }
.empty-state h3 { margin: 0 0 7px; font-size: 14px; }
.empty-state p { max-width: 350px; margin: 0 0 16px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(20,38,36,.42); backdrop-filter: blur(4px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(530px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 18px; background: white; box-shadow: 0 30px 90px rgba(15,38,34,.22); animation: pop .2s ease; }
.modal--wide { width: min(860px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 22px 23px 17px; border-bottom: 1px solid var(--line); }
.modal__head h2 { margin: 0; font-size: 17px; }
.modal__head p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.modal__body { padding: 20px 23px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 23px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { color: var(--muted); font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--ink); background: white; font-size: 11px; }
.form-field textarea { min-height: 76px; resize: vertical; }
.form-hint { display: block; margin-top: -2px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.protocol-questions-input { min-height: 190px !important; }
.operation-list { display: grid; gap: 8px; margin-top: 13px; }
.operation-list span { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.operation-list svg { flex: 0 0 auto; width: 13px; color: var(--primary); }
.threshold-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 13px 0; }
.threshold-grid span { padding: 8px; border-radius: 8px; background: #f5f8f6; color: var(--muted); font-size: 8px; text-align: center; }
.threshold-grid strong { display: block; margin-top: 3px; color: var(--ink); font-size: 9px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #8fbeaf; box-shadow: 0 0 0 3px rgba(13,107,95,.07); }
.form-note { display: flex; gap: 8px; padding: 11px; margin-top: 15px; border: 1px solid #d6e7e2; border-radius: 10px; background: var(--teal-soft); color: #48635d; font-size: 9px; line-height: 1.45; }
.form-note--danger { border-color: #efc8c4; color: #8f3933; background: var(--red-soft); }
.form-note--danger svg { color: var(--red); }
.form-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--primary); }
.toast-root { position: fixed; z-index: 110; right: 24px; bottom: 24px; display: grid; gap: 9px; }
.toast { display: flex; align-items: center; gap: 10px; width: min(360px, calc(100vw - 40px)); padding: 13px 14px; border: 1px solid #cfe1dc; border-radius: 12px; background: white; box-shadow: var(--shadow); animation: toast-in .23s ease; font-size: 10px; line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast__icon { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.toast__icon svg { width: 15px; height: 15px; }

.auth-required .app-shell { display: block; }
.auth-required .sidebar, .auth-required .topbar { display: none; }
.auth-required .workspace { width: 100%; }
.auth-required .content { max-width: none; min-height: 100vh; padding: 0; }
.auth-loading { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 14px; }
.login-screen { display: grid; place-items: center; min-height: 100vh; padding: 28px; background: radial-gradient(circle at 70% 15%, #e0f0ea 0, transparent 32%), var(--canvas); }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 22px 70px rgba(27,55,50,.12); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark { flex: 0 0 auto; }
.login-brand .brand-mark svg { width: 21px; height: 21px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 18px; }
.login-brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.login-heading { margin: 34px 0 24px; }
.login-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.6px; }
.login-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 16px; }
.login-form label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 650; }
.login-form input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fbfdfc; font-size: 14px; }
.login-form input:focus { border-color: #8fbeaf; box-shadow: 0 0 0 3px rgba(13,107,95,.08); background: white; }
.login-form .button { min-height: 44px; margin-top: 2px; }
.login-error { min-height: 18px; margin: -3px 0 0; color: var(--red); font-size: 12px; }
.profile-identity { display: flex; align-items: center; gap: 13px; padding: 4px 0 18px; }
.profile-identity .avatar { width: 48px; height: 48px; font-size: 14px; }
.profile-identity strong, .profile-identity span { display: block; }
.profile-identity strong { font-size: 16px; }
.profile-identity span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.profile-details { display: grid; gap: 16px; padding: 15px 0 0; border-top: 1px solid var(--line); }
.profile-details span, .profile-details strong { display: block; }
.profile-details span { color: var(--muted); font-size: 11px; }
.profile-details strong { margin-top: 6px; font-size: 13px; }

.medical-card { min-width: 0; overflow: hidden; background: #f7faf9; }
.medical-card__identity { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: white; }
.medical-card__identity .avatar { width: 46px; height: 46px; font-size: 13px; }
.medical-card__identity h2 { margin: 3px 0 4px; font-size: 20px; }
.medical-card__identity p { margin: 0; color: var(--muted); font-size: 13px; }
.medical-record { color: var(--faint); font-size: 10px; font-weight: 700; }
.medical-card__status { display: flex; align-items: center; gap: 8px; }
.care-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.medical-card__body { display: grid; gap: 14px; padding: 16px; }
.medical-section { border: 1px solid var(--line); border-radius: 13px; background: white; overflow: hidden; }
.medical-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.medical-section__head h3 { margin: 0; font-size: 16px; }
.medical-section__head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.medical-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.medical-field { min-height: 82px; padding: 15px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.medical-field:nth-child(4n) { border-right: 0; }
.medical-field--wide { grid-column: span 2; }
.medical-field > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.medical-field strong { display: block; color: var(--ink); font-size: 13px; line-height: 1.4; }
.medical-field strong small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.medical-empty { color: #9ba8a4; font-weight: 500; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.contact-tile { display: flex; align-items: flex-start; gap: 10px; min-height: 72px; padding: 14px 15px; border-right: 1px solid var(--line); }
.contact-tile:last-child { border-right: 0; }
.contact-tile > svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--primary); }
.contact-tile span { min-width: 0; }
.contact-tile small, .contact-tile strong, .contact-tile em { display: block; }
.contact-tile small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.contact-tile strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.contact-tile em { margin-top: 3px; color: var(--muted); font-size: 11px; font-style: normal; }
.contact-grid--primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-grid--primary .contact-tile:nth-child(2) { border-right: 0; }
.medical-more { border-top: 1px solid var(--line); }
.medical-more summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; }
.medical-more summary span { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 20px; background: var(--primary-soft); font-size: 10px; }
.medical-more[open] summary { border-bottom: 1px solid var(--line); }
.consent-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
.consent-state svg { width: 15px; height: 15px; }
.consent-state--ok { color: var(--primary); }
.consent-state--missing { color: var(--amber); }
.current-status { border-left: 4px solid var(--amber); }
.current-status--high { border-left-color: var(--red); }
.current-status--low { border-left-color: var(--primary); }
.current-status__actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.current-status__body { padding: 18px 20px; }
.current-status__body p { max-width: 900px; margin: 0; font-size: 16px; font-weight: 650; line-height: 1.45; }
.current-status__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 18px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.current-status__meta strong { color: var(--ink); font-size: 13px; }
.current-status__done { display: inline-flex; align-items: center; gap: 6px; color: var(--primary) !important; }
.current-status__done svg { width: 15px; height: 15px; }
.contact-foot { display: flex; justify-content: space-between; gap: 20px; padding: 10px 15px; border-top: 1px solid var(--line); background: #fbfdfc; color: var(--muted); font-size: 9px; }
.contact-foot span { display: flex; align-items: center; gap: 5px; }
.contact-foot svg { width: 13px; height: 13px; color: var(--primary); }
.contact-foot strong { color: var(--ink); }
.ai-count { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 7px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 750; }
.ai-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.ai-metrics > div { padding: 13px 15px; border-right: 1px solid var(--line); }
.ai-metrics > div:last-child { border-right: 0; }
.ai-metrics span, .ai-metrics strong { display: block; }
.ai-metrics span { margin-bottom: 6px; color: var(--faint); font-size: 8px; text-transform: uppercase; }
.ai-metrics strong { font-size: 10px; }
.verdict-text--high { color: var(--red); }
.verdict-text--medium { color: var(--amber); }
.verdict-text--low { color: var(--primary); }
.ai-history { display: grid; }
.ai-history-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px 15px; border: 0; border-bottom: 1px solid var(--line); background: white; cursor: pointer; text-align: left; }
.ai-history-item:last-child { border-bottom: 0; }
.ai-history-item:hover { background: #fbfdfc; }
.ai-history-item strong, .ai-history-item small { display: block; }
.ai-history-item strong { font-size: 10px; }
.ai-history-item small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-item > svg { width: 14px; color: var(--muted); }
.current-contact-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: calc(100% - 28px); margin: 0 14px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; cursor: pointer; text-align: left; }
.current-contact-card strong, .current-contact-card small { display: block; }
.current-contact-card strong { font-size: 10px; }
.current-contact-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.current-contact-card > svg { width: 14px; color: var(--muted); }
.journey-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.journey-dot--high { background: var(--red); }
.journey-dot--medium { background: var(--amber); }
.protocol-link-card { display: flex; align-items: center; gap: 9px; max-width: 260px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; color: var(--ink); cursor: pointer; text-align: left; }
.protocol-link-card:hover { border-color: #a8cbbf; background: var(--primary-soft); }
.protocol-link-card > svg { flex: 0 0 auto; width: 15px; color: var(--primary); }
.protocol-link-card span { min-width: 0; flex: 1; }
.protocol-link-card strong, .protocol-link-card small { display: block; }
.protocol-link-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.protocol-link-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.rehab-progress { position: relative; margin: 0 16px; padding: 21px 0 14px; overflow-x: auto; }
.rehab-progress__track, .rehab-progress__fill { position: absolute; top: 35px; left: 18px; height: 3px; border-radius: 4px; }
.rehab-progress__track { right: 18px; background: #e5ece9; }
.rehab-progress__fill { width: calc((100% - 36px) * var(--rehab-progress) / 100); background: var(--primary); }
.rehab-points { position: relative; display: grid; grid-template-columns: repeat(var(--rehab-points), minmax(38px, 1fr)); min-width: calc(var(--rehab-points) * 40px); }
.rehab-point { display: grid; justify-items: center; gap: 5px; min-width: 38px; padding: 0; border: 0; background: transparent; color: var(--faint); cursor: pointer; }
.rehab-point > span { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #dce6e2; border-radius: 50%; background: white; font-size: 11px; font-weight: 750; }
.rehab-point > span svg { width: 12px; }
.rehab-point small { font-size: 10px; }
.rehab-point small em { display: block; margin-top: 2px; color: var(--amber); font-size: 9px; font-style: normal; font-weight: 700; }
.rehab-point.is-complete > span { border-color: var(--primary); background: var(--primary); color: white; }
.rehab-point.is-missed > span { border-color: #efb4aa; background: #fff4f1; color: var(--red); }
.rehab-point.is-current > span { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.rehab-point.is-selected > span { outline: 2px solid #91baae; outline-offset: 3px; }
.contact-detail { margin: 0 15px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; overflow: hidden; }
.contact-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: white; }
.contact-detail__head h4 { margin: 4px 0 0; font-size: 14px; }
.contact-day { color: var(--primary); font-size: 11px; font-weight: 700; }
.contact-detail__summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-detail__summary > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.contact-detail__summary > div:last-child { border-right: 0; }
.contact-detail__summary span, .contact-detail__summary strong { display: block; }
.contact-detail__summary span { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.contact-detail__summary strong { font-size: 13px; line-height: 1.4; }
.contact-detail__summary strong svg { width: 13px; color: var(--primary); vertical-align: middle; }
.contact-detail__report { border-top: 1px solid var(--line); background: white; }
.contact-report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.contact-report-head h4 { margin: 0; font-size: 14px; }
.contact-detail__report .checkin-summary, .contact-detail__report .checkin-empty { margin: 12px; }
.clinical-workflow { position: fixed; z-index: 25; right: clamp(20px, 3vw, 42px); bottom: 16px; left: calc(var(--sidebar) + clamp(20px, 3vw, 42px)); display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 1426px; margin: 0 auto; padding: 10px 11px; border: 1px solid #efd7ad; border-radius: 11px; background: rgba(255,250,240,.96); box-shadow: 0 12px 36px rgba(35,54,50,.16); backdrop-filter: blur(12px); }
.clinical-workflow--resolved { border-color: #cfe2dc; background: #f4faf7; }
.clinical-workflow__state { display: flex; align-items: center; gap: 8px; min-width: 0; }
.clinical-workflow__state > svg { flex: 0 0 auto; width: 15px; color: var(--amber); }
.clinical-workflow--resolved .clinical-workflow__state > svg { color: var(--primary); }
.clinical-workflow__state strong, .clinical-workflow__state small { display: block; }
.clinical-workflow__state strong { font-size: 13px; }
.clinical-workflow__state small { max-width: 520px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.clinical-workflow time { color: var(--muted); font-size: 11px; }
.clinical-workflow__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.medical-card__body:has(.clinical-workflow) { padding-bottom: 110px; }
.contact-resolution { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 13px 14px; border: 1px solid #cfe2dc; border-radius: 10px; background: #f4faf7; color: var(--primary); }
.contact-resolution > svg { flex: 0 0 auto; width: 18px; height: 18px; }
.contact-resolution span { min-width: 0; flex: 1; }
.contact-resolution strong, .contact-resolution small { display: block; }
.contact-resolution strong { font-size: 13px; }
.contact-resolution small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.contact-resolution time { color: var(--muted); font-size: 11px; }
.call-state { display: flex; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid #cfe2dc; border-radius: 10px; background: #f4faf7; }
.call-state > svg { flex: 0 0 auto; width: 18px; color: var(--primary); }
.call-state strong, .call-state small { display: block; }
.call-state strong { font-size: 10px; }
.call-state small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.contact-detail__report .conversation--embedded { margin: 12px; border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .protocol-grid { grid-template-columns: 1fr 1fr; }
  .patients-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .checkin-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation { border-right: 0; border-bottom: 1px solid var(--line); }
  .patient-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .side-section { margin: 0; padding: 0; border: 0; }
  .integration-pill { display: none; }
  .medical-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .medical-field:nth-child(4n) { border-right: 1px solid var(--line); }
  .medical-field:nth-child(2n) { border-right: 0; }
}

@media (max-width: 860px) {
  :root { --sidebar: 240px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(20,42,38,.13); }
  body.menu-open .sidebar { transform: translateX(0); }
  .menu-backdrop { position: fixed; inset: 0 0 0 var(--sidebar); z-index: 35; display: block; visibility: hidden; padding: 0; border: 0; background: rgba(20,38,36,.3); opacity: 0; pointer-events: none; transition: opacity .22s ease, visibility .22s ease; }
  body.menu-open .menu-backdrop { visibility: visible; opacity: 1; pointer-events: auto; }
  .workspace { width: 100%; }
  .mobile-menu { display: block; }
  .global-search { width: min(340px, 48vw); }
  .topbar { padding: 0 18px; }
  .content { padding: 26px 18px 40px; }
  .priority-row { grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) auto; }
  .attention-row { grid-template-columns: minmax(190px, .9fr) minmax(240px, 1.3fr) auto; }
  .attention-status { display: none; }
  .protocol-cell { display: none; }
  .contact-group { grid-template-columns: auto minmax(0, 1fr); }
  .contact-group__link { grid-column: 2; }
  .registry-sync { display: none; }
  .registry-search { width: min(320px, 42vw); }
  .patient-registry-table { min-width: 940px; }
  .patients-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .patient-detail__head { align-items: flex-start; }
  .patient-actions { flex-direction: column; }
  .patient-side { grid-template-columns: 1fr 1fr; }
  .medical-card__identity { grid-template-columns: minmax(220px, 1fr) auto; }
  .medical-card__identity .patient-actions { grid-column: 1 / -1; flex-direction: row; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-tile:nth-child(2) { border-right: 0; }
  .contact-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pilot-grid, .pilot-hero { grid-template-columns: 1fr; }
  .action-row { grid-template-columns: minmax(170px, 1fr) minmax(210px, 1.4fr) auto; }
  .action-owner { display: none; }
  .action-buttons { grid-column: 2 / -1; justify-content: flex-start; }
  .clinical-workflow { right: 18px; left: 18px; }
}

@media (max-width: 650px) {
  .global-search, .icon-button[data-action="notifications"] { display: none; }
  .topbar-actions { margin-left: auto; }
  .topbar .button--primary { padding: 0 12px; }
  .topbar .button--primary span:last-child { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head__actions { width: 100%; }
  .date-card { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .metric-card__top { align-items: flex-start; }
  .metric-value strong { font-size: 23px; }
  .priority-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .attention-row { grid-template-columns: 1fr; gap: 12px; padding: 17px 16px 17px 20px; }
  .attention-reason strong { white-space: normal; }
  .attention-status { display: grid; }
  .attention-actions { justify-content: stretch; }
  .attention-actions .button { width: 100%; }
  .priority-reason { display: none; }
  .contact-groups { grid-template-columns: 1fr; }
  .contact-group { min-height: 112px; }
  .contact-group__link { justify-self: start; }
  .registry-toolbar { align-items: stretch; flex-direction: column; }
  .registry-search, .registry-toolbar .select-control { width: 100%; }
  .registry-toolbar .active-contact-filter { justify-content: space-between; }
  .archive-toggle { align-items: flex-start; }
  .action-filters { width: 100%; overflow-x: auto; }
  .action-filter { flex: 1; justify-content: center; white-space: nowrap; }
  .action-row { grid-template-columns: 1fr auto; gap: 12px; padding: 16px 15px 16px 18px; }
  .action-person, .action-reason, .action-buttons { grid-column: 1 / -1; }
  .action-owner { display: block; }
  .action-state { grid-column: 2; grid-row: 1; }
  .action-buttons { justify-content: stretch; }
  .action-buttons .button { flex: 1; }
  .filters { flex-wrap: wrap; }
  .filter-input { min-width: 100%; width: 100%; }
  .filter-count { width: 100%; margin: 0; }
  .protocol-grid, .protocol-detail { grid-template-columns: 1fr; }
  .patients-layout { display: block; }
  .patient-list { border-right: 0; }
  .patient-list__items { display: flex; max-height: none; overflow-x: auto; }
  .patient-list-item { flex: 0 0 235px; border-right: 1px solid var(--line); }
  .patient-detail__head { flex-direction: column; }
  .patient-actions { width: 100%; flex-direction: row; }
  .patient-actions .button { flex: 1; }
  .checkin-pane { padding: 15px; }
  .checkin-pane__head { align-items: flex-start; flex-direction: column; }
  .patient-side { grid-template-columns: 1fr; }
  .medical-card__identity { grid-template-columns: 1fr; }
  .medical-card__status { flex-wrap: wrap; }
  .medical-grid, .contact-grid, .ai-metrics, .contact-detail__summary { grid-template-columns: 1fr; }
  .medical-field, .medical-field:nth-child(2n), .medical-field:nth-child(4n), .contact-tile, .contact-tile:nth-child(2), .ai-metrics > div, .contact-detail__summary > div { grid-column: auto; border-right: 0; }
  .contact-foot { align-items: flex-start; flex-direction: column; }
  .medical-section__head { align-items: flex-start; flex-direction: column; }
  .protocol-link-card { width: 100%; max-width: none; }
  .message { max-width: 88%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field--full { grid-column: auto; }
  .clinical-workflow { align-items: stretch; flex-direction: column; gap: 9px; bottom: 10px; }
  .clinical-workflow__actions { display: grid; grid-template-columns: 1.2fr .8fr .9fr; }
  .clinical-workflow__actions .button { min-width: 0; padding: 0 9px; }
}

@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .metric-card .metric-value { justify-self: end; margin: 0; }
  .metric-value span { display: none; }
  .patient-actions { flex-direction: column; }
  .channel-stats { gap: 5px; }
  .modal__footer { flex-direction: column-reverse; }
  .modal__footer .button { width: 100%; }
}
