/* MindeLine design guide v1.0: one visual language across every role and screen. */
:root {
  color-scheme: light;
  --navy: #192436;
  --navy-800: #192436;
  --navy-600: #33425e;
  --navy-200: #c9d1de;
  --navy-100: #e4e9f1;
  --navy-50: #f1f4f9;
  --teal: #237873;
  --teal-700: #237873;
  --teal-dark: #1b605c;
  --teal-500: #3fa7a0;
  --teal-50: #e9f5f4;
  --ink: #192436;
  --muted: #5b6475;
  --ink-muted: #5b6475;
  --ink-disabled: #9aa3b2;
  --line: #dde2ea;
  --border-input: #7e8798;
  --bg: #f4f6fa;
  --white: #ffffff;
  --font-display: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mint: #e9f5f4;
  --amber: #fdf0e2;
  --amber-ink: #8c4a0e;
  --red: #fcebeb;
  --red-ink: #a12c2c;
  --blue: #eef1f5;
  --risk: #d64545;
  --risk-bg: #fcebeb;
  --risk-fg: #a12c2c;
  --review: #e8913a;
  --review-bg: #fdf0e2;
  --review-fg: #8c4a0e;
  --noshow: #e0b93e;
  --noshow-bg: #fbf4d9;
  --noshow-fg: #6e5410;
  --silent: #8c95a5;
  --silent-bg: #eef1f5;
  --silent-fg: #4a5366;
  --stable: #3e9e6e;
  --stable-bg: #e5f3ec;
  --stable-fg: #1e6443;
  --shadow: none;
  --shadow-sm: 0 1px 2px rgba(25, 36, 54, .06), 0 1px 3px rgba(25, 36, 54, .08);
  --shadow-md: 0 8px 24px -8px rgba(25, 36, 54, .18), 0 2px 6px -2px rgba(25, 36, 54, .1);
  --shadow-lg: 0 24px 48px -16px rgba(25, 36, 54, .22), 0 8px 16px -8px rgba(25, 36, 54, .1);
  --radius-control: 8px;
  --radius-card: 8px;
  --radius-panel: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--navy-800);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .page-heading h1, .care-section-heading h1,
.panel-head h3, .auth-card h1, .modal-head h2, .stat-card strong {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-weight: 600;
}
h1, .page-heading h1, .care-section-heading h1 { font-size: 24px; line-height: 32px; letter-spacing: 0; }
h2 { font-size: 20px; line-height: 28px; }
h3, .panel-head h3 { font-size: 16px; line-height: 24px; }
p { color: inherit; }
.eyebrow, .workspace-label { color: var(--teal-700); font-size: 12px; line-height: 16px; letter-spacing: .08em; }
.page-heading p, .care-section-heading p, .panel-head p, .quiet-note,
.app-footer, .breadcrumbs, .secure-label { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.page-heading { margin-bottom: var(--space-6); }
.page-content { background: transparent; }

.demo-banner {
  min-height: 32px;
  height: auto;
  padding: 6px 16px;
  background: var(--navy-800);
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
}
.demo-banner .pulse { background: var(--teal-500); }
.topbar { background: #fff; border-bottom-color: var(--line); }
.brand, .brand-mark { color: var(--navy-800); }
.brand small { color: var(--ink-muted); }
.brand>span:last-child>span { color: var(--teal-700); }
.brand-mark { background: transparent; }
.app-footer { border-top-color: var(--line); color: var(--ink-muted); padding-block: 16px; }
.app-footer a, .text-link { color: var(--teal-700); }

.panel, .auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: none;
}
.panel { padding: 20px; }
.auth-screen { background: var(--bg); }
.auth-card { border-radius: var(--radius-panel); box-shadow: var(--shadow-md); }
.auth-tab { min-height: 40px; color: var(--muted); font: 500 14px/20px Inter, Arial, sans-serif; }
.auth-tab.active { color: var(--teal-700); }
.invite-instructions { margin: 12px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--navy-50); }
.invite-instructions h2 { margin: 0 0 8px; color: var(--navy-800); font: 600 16px/24px Montserrat, Inter, Arial, sans-serif; }
.invite-instructions p { margin: 0 0 8px; color: var(--muted); font: 400 14px/20px Inter, Arial, sans-serif; }
.invite-instructions p:last-child { margin-bottom: 0; }
.auth-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 5vh, 48px) 18px 16px;
  background: radial-gradient(ellipse at 84% 8%, #e8f3f1 0, transparent 34%), #f4f6f9;
}
#authScreen[hidden] { display: none !important; }
.auth-wrap { width: min(470px, 100%); margin: auto 0; }
.auth-brand { width: max-content; margin: 0 auto 22px; }
.auth-brand .brand-logo { display: block; width: 184px; height: auto; }
.auth-card {
  padding: clamp(25px, 5vw, 36px);
  border: 1px solid #e0e7eb;
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(25, 36, 54, .10);
}
.auth-card .eyebrow { margin-bottom: 8px; color: var(--teal-700); }
.auth-card h1 { margin: 0 0 7px; font: 600 27px/35px Montserrat, Inter, Arial, sans-serif; letter-spacing: -.04em; color: var(--navy-800); }
.auth-card > p { margin: 0 0 22px; color: var(--ink-muted); font: 400 14px/21px Inter, Arial, sans-serif; }
.auth-card .field-label { margin: 17px 0 7px; color: #47566a; font: 600 13px/18px Inter, Arial, sans-serif; }
.auth-card .field { min-height: 46px; padding: 11px 13px; border-color: #d5dde3; border-radius: 8px; font: 400 14px/20px Inter, Arial, sans-serif; }
.auth-card .auth-code-field { min-height: 56px; text-align: center; letter-spacing: .28em; font-size: 20px; font-weight: 600; }
.auth-card .auth-submit { min-height: 47px; margin-top: 20px; border-radius: 8px; font: 600 14px/20px Inter, Arial, sans-serif; }
.auth-tabs { gap: 6px; margin: 0 0 19px; padding: 4px; border: 1px solid #e5e9ed; border-radius: 10px; background: #f5f7f8; }
.auth-tab { min-height: 38px; border-radius: 7px; font-size: 13px; }
.auth-tab.active { background: #fff; box-shadow: 0 1px 4px rgba(25, 36, 54, .12); }
.auth-link { display: block; margin: 13px auto 0; font: 500 13px/19px Inter, Arial, sans-serif; }
.auth-secondary-link { color: var(--muted); }
.auth-message { padding: 11px 13px; border: 1px solid #f0dfbd; border-radius: 8px; font: 400 13px/19px Inter, Arial, sans-serif; }
.auth-separator { margin: 23px 0 15px; font: 500 11px/16px Inter, Arial, sans-serif; }
.demo-account-grid { gap: 8px; }
.demo-account { min-height: 74px; border-color: #e1e6ea; border-radius: 9px; }
.demo-account strong { font-size: 11px; }
.auth-footnote { margin-top: 16px; font: 400 11px/17px Inter, Arial, sans-serif; }
.auth-bottom { position: static; margin: 18px 0 0; padding: 8px 12px 0; color: #738093; font: 400 11px/16px Inter, Arial, sans-serif; }
.auth-bottom span { padding: 0 5px; }
@media (max-width: 700px) {
  .auth-screen { padding: 20px 14px 14px; }
  .auth-wrap { width: min(440px, 100%); }
  .auth-brand { margin-bottom: 16px; }
  .auth-brand .brand-logo { width: 158px; }
  .auth-card h1 { font-size: 24px; line-height: 31px; }
  .auth-card > p { margin-bottom: 18px; }
  .auth-bottom { margin-top: 14px; font-size: 10px; }
}
.modal { border-radius: var(--radius-panel); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(25, 36, 54, .5); backdrop-filter: blur(2px); }
.toast { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-md); }
.hero-panel, .workload-banner {
  background: var(--navy-800);
  border-radius: var(--radius-panel);
  box-shadow: none;
}
.hero-panel { border-bottom: 0; }
.hero-panel:before { background: var(--teal-500); }
.hero-panel .eyebrow, .workload-copy .eyebrow { color: #8ed1c8; }

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--navy-800);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--navy-800);
  font: 600 14px/20px Inter, Arial, sans-serif;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover {
  transform: none;
  background: var(--navy-50);
  border-color: var(--navy-600);
  box-shadow: var(--shadow-sm);
}
.button:active { transform: none; background: var(--navy-100); }
.button-primary, .button-primary:hover, .button-primary:active {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: #fff;
}
.button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.button-primary:active { background: #154b48; border-color: #154b48; }
.button-soft { background: var(--teal-50); border-color: var(--teal-50); color: var(--teal-700); }
.button-danger { border-color: var(--risk); color: var(--risk-fg); }
.button-small { min-height: 32px; padding: 0 12px; font-size: 14px; line-height: 20px; }
.button-wide { justify-content: center; }
.button:disabled, .button[aria-disabled="true"] {
  background: #eef1f5;
  border-color: #eef1f5;
  color: var(--ink-disabled);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}
.button:focus-visible, .text-link:focus-visible, .icon-button:focus-visible,
a:focus-visible, summary:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

.field, .select, .textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea {
  min-height: 40px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--navy-800);
  font: 400 14px/20px Inter, Arial, sans-serif;
}
.textarea, textarea { min-height: 96px; padding: 10px 12px; }
.field::placeholder, .textarea::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.field:focus, .textarea:focus, .select:focus, input:focus, select:focus, textarea:focus {
  border: 2px solid var(--teal-700);
  outline: 0;
  box-shadow: none;
}
.field:disabled, .select:disabled, .textarea:disabled, input:disabled, select:disabled, textarea:disabled {
  background: #eef1f5;
  border-color: #eef1f5;
  color: var(--ink-disabled);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal-700); }
input[aria-invalid="true"], .field.error, .select.error, .textarea.error {
  border-color: var(--risk);
  color: var(--navy-800);
}
.error, [role="alert"], .auth-message.error { color: var(--risk-fg); }

.status {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font: 600 12px/16px Inter, Arial, sans-serif;
  white-space: normal;
}
.status:before { width: 6px; height: 6px; flex: 0 0 6px; }
.status.red, .tag.red, .clinical-state-risk, [data-clinical-state="risk"] {
  background: var(--risk-bg); color: var(--risk-fg);
}
.status.red:before, .clinical-state-risk:before, [data-clinical-state="risk"]:before { background: var(--risk); }
.status.amber, .status.review, .tag.amber, .tag.review, .clinical-state-review, [data-clinical-state="review"] {
  background: var(--review-bg); color: var(--review-fg);
}
.status.amber:before, .status.review:before, .clinical-state-review:before, [data-clinical-state="review"]:before { background: var(--review); }
.status.noshow, .tag.noshow, .clinical-state-noshow, [data-clinical-state="noshow"] {
  background: var(--noshow-bg); color: var(--noshow-fg);
}
.status.noshow:before, .clinical-state-noshow:before, [data-clinical-state="noshow"]:before { background: var(--noshow); }
.status.blue, .tag.blue, .clinical-state-silent, [data-clinical-state="silent"] {
  background: var(--silent-bg); color: var(--silent-fg);
}
.status.blue:before, .clinical-state-silent:before, [data-clinical-state="silent"]:before { background: var(--silent); }
.status.teal, .tag.teal, .clinical-state-stable, [data-clinical-state="stable"] {
  background: var(--stable-bg); color: var(--stable-fg);
}
.status.teal:before, .clinical-state-stable:before, [data-clinical-state="stable"]:before { background: var(--stable); }
.status:not(.red):not(.amber):not(.review):not(.noshow):not(.blue):not(.teal):not(.demo):not(.recorded) { background: var(--navy-100); color: var(--navy-600); }
.status.review:before { background: var(--review); }
.status.demo { background: var(--navy-100); color: var(--navy-600); }
.status.demo:before { background: var(--navy-200); }
.status.recorded { background: var(--stable-bg); color: var(--stable-fg); }
.status.recorded:before { background: var(--stable); }
.tag { padding: 4px 8px; border-radius: 999px; font: 500 12px/16px Inter, Arial, sans-serif; }
.clinical-state-risk, .clinical-state-review, .clinical-state-noshow,
.clinical-state-silent, .clinical-state-stable, [data-clinical-state] {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font: 600 12px/16px Inter, Arial, sans-serif;
}
.clinical-state-risk:before, .clinical-state-review:before, .clinical-state-noshow:before,
.clinical-state-silent:before, .clinical-state-stable:before, [data-clinical-state]:before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
}

.data-table { color: var(--navy-800); }
.data-table th { color: var(--ink-muted); font: 600 12px/16px Inter, Arial, sans-serif; }
.data-table td { font: 400 14px/20px Inter, Arial, sans-serif; }
.data-table tr:hover td, .queue-table tr:hover td { background: var(--navy-50); }
.data-table, .data-table td, .data-table th { border-color: var(--line); }
.detail-row, .history-row, .schedule-item, .guided-review-steps { border-color: var(--line); }
.icon-button { border-radius: 8px; color: var(--navy-800); background: var(--navy-100); }

.care-workspace-open .care-sidebar {
  background: #fff;
  border-right-color: var(--line);
}
.care-sidebar nav button {
  min-height: 40px;
  border-radius: 8px;
  color: var(--navy-600);
  font: 500 14px/20px Inter, Arial, sans-serif;
}
.care-sidebar nav button:hover { background: var(--navy-50); }
.care-sidebar nav button.active { background: var(--teal-50); color: var(--teal-700); font-weight: 600; }
.care-nav-icon { display: grid; place-items: center; color: currentColor; }
.care-nav-icon svg { display: block; width: 20px; height: 20px; }
.care-sidebar-title small, .care-sidebar-foot { color: var(--ink-muted); }
.care-section-heading h1 { margin: 8px 0 4px; }
.care-overview-grid { gap: var(--space-4); }
.care-start { background: #fff; border-color: var(--line); }
.care-start h2 { color: var(--navy-800); }
.care-start p { color: var(--ink-muted); }
.care-checklist button { color: var(--navy-800); }
.care-checklist button span { background: var(--teal-50); color: var(--teal-700); }
.participant-person { color: var(--navy-800); }
.participant-person:hover, .participant-person.active { background: var(--teal-50); }
.participant-person small, .participant-task small, .participant-message small { color: var(--ink-muted); }
.participant-thread { background: var(--bg); border-color: var(--line); }
.participant-message { border-color: var(--line); border-radius: 8px 8px 8px 2px; color: var(--navy-800); }
.participant-message.from-team { background: var(--teal-50); border-color: #b8d9d5; border-radius: 8px 8px 2px 8px; }
.participant-message p { font: 400 14px/20px Inter, Arial, sans-serif; color: var(--navy-800); }
.care-participant-tabs .button.active { background: var(--teal-50); border-color: var(--teal-700); color: var(--teal-700); }
.care-workspace .indicator-outcome, .care-workspace .indicator-task { border-color: var(--line); }
.care-workspace .outcome-chart text { fill: var(--ink-muted); font: 12px Inter, Arial, sans-serif; }
.care-workspace .outcome-chart path { stroke: var(--line); }
.care-workspace .outcome-chart circle { fill: var(--teal-700); }
.participant-simulate summary, .participant-record-entry summary { color: var(--teal-700); }
.participant-unread { color: var(--risk-fg); }

/* Patient check-in and consent controls follow the same readable component scale. */
.patient-bot-panel, .chat-consent-panel { border-color: var(--line); }
.patient-bot-panel .panel-head p, .chat-consent-panel .panel-head p { font-size: 14px; line-height: 20px; }
.consent-copy { background: var(--navy-50); border-color: var(--line); border-radius: 8px; color: var(--navy-800); font: 400 16px/24px Inter, Arial, sans-serif; }
.consent-check { color: var(--navy-800); font-size: 14px; line-height: 20px; }
.consent-save-status { font-size: 12px; line-height: 16px; }
.question { border-color: var(--line); padding-block: 16px; }
.question label { color: var(--navy-800); font-size: 14px; line-height: 20px; }
.choice {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--navy-800);
  border-radius: 8px;
  background: #fff;
  color: var(--navy-800);
  font: 500 14px/20px Inter, Arial, sans-serif;
}
.choice:hover { background: var(--navy-50); }
.choice.selected { background: var(--teal-50); border-color: var(--teal-700); color: var(--teal-700); }
.choice:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.notice { background: var(--navy-50); border: 1px solid var(--line); border-radius: 8px; color: var(--navy-800); font-size: 14px; line-height: 20px; }
.notice-icon { color: var(--teal-700); font-size: 16px; }
.detail-row { border-color: var(--line); font-size: 14px; line-height: 20px; }
.detail-row span { color: var(--ink-muted); }
.detail-row strong { color: var(--navy-800); }
.progress-track { background: var(--navy-100); }
.progress-track span { background: var(--teal-700); }
.message { border: 1px solid var(--line); border-radius: 8px; background: var(--navy-50); color: var(--navy-800); font-size: 14px; line-height: 20px; }
.message.mine { background: var(--teal-50); border-color: #b8d9d5; color: var(--navy-800); }
.message-meta { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.timeline-copy { font-size: 14px; line-height: 20px; }
.timeline-copy small { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.bot-question { color: var(--navy-800); font-size: 16px; line-height: 24px; }
.bot-transcript { background: var(--bg); border-color: var(--line); }
.chat-consent-panel .quiet-note, .patient-bot-panel .quiet-note { font-size: 14px; line-height: 20px; }
.chat-consent-panel .button, .patient-bot-panel .button { min-height: 40px; }
.chat-consent-panel .button-small, .patient-bot-panel .button-small { min-height: 32px; }
.patient-bot-panel .text-link { font-size: 14px; line-height: 20px; }
.hero-panel h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.hero-panel p { font-size: 14px; line-height: 20px; }

.priority-dot-red { background: var(--risk-bg); color: var(--risk-fg); }
.priority-dot-amber { background: var(--review-bg); color: var(--review-fg); }
.priority-dot-teal { background: var(--teal-50); color: var(--teal-700); }
.priority-total { background: var(--review-bg); color: var(--review-fg); }
.queue-search, .queue-filter, .channel-thread, .channel-flow-status, .guided-step-heading { border-color: var(--line); }
.queue-search:focus-within { border-color: var(--teal-700); box-shadow: 0 0 0 2px rgba(35,120,115,.18); }
.queue-filter { background: var(--navy-100); color: var(--navy-600); }
.queue-filter:hover, .queue-filter.active { background: var(--teal-50); color: var(--teal-700); }
.channel-patient { background: var(--teal-50); color: var(--teal-700); }
.channel-response-options [data-channel-reply="call"] { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-700); }
.guided-review-panel { border-top-color: var(--review); }
.guided-review-steps { background: #fff; }
.guided-step-heading { background: var(--navy-50); }
.alert-banner, .protocol-pending { border-color: var(--review); background: var(--review-bg); color: var(--review-fg); }
.alert-banner { border-left-color: var(--review); }
.flag { background: var(--noshow-bg); color: var(--noshow-fg); }
.risk-meter, .meter-ring { border-color: var(--risk); }
.chart-legend i, .chart-bar { background: var(--teal-700); }
.chart-bar { box-shadow: none; }
.chart-gridlines i { border-color: var(--line); }
.bar-tooltip { background: var(--navy-800); }

@media (max-width: 760px) {
  .care-sidebar nav button { min-height: 40px; }
  .care-nav-icon svg { width: 16px; height: 16px; }
  .button-small { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep legacy role views within the same type scale and neutral navigation palette. */
.sidebar { background: #fff; border-right-color: var(--line); }
.role-button { color: var(--navy-600); border-radius: 8px; }
.role-button:hover { background: var(--navy-50); }
.role-button.active { background: var(--teal-50); color: var(--teal-700); }
.role-icon { color: var(--navy-600); background: var(--navy-100); border-radius: 8px; }
.role-button.active .role-icon { color: var(--teal-700); background: #fff; }
.field-label, .contact-record-form label, .medication-event-form label,
.channel-select-label, .coordinator-scenario, .participant-plan-form label { font-size: 14px; line-height: 20px; }
.priority-item strong { font-size: 14px; line-height: 20px; }
.priority-item small, .queue-footer, .queue-footer .text-link,
.chart-legend, .chart-y-labels, .bar-column>small, .chart-footnote,
.schedule-copy small, .contact-record-wrap>p, .contact-record-status,
.medication-event-status, .care-workspace .stat-card small { font-size: 12px; line-height: 16px; }
.queue-table th { font-size: 12px; line-height: 16px; }
.queue-table td { font-size: 14px; line-height: 20px; }
.queue-table .status { font-size: 12px; }
.care-workspace .stat-card>span, .ops-stats .stat-card span { font-size: 14px; line-height: 20px; }
.ops-stats .stat-card strong { font-size: 32px; line-height: 40px; }
.ops-stats .stat-card small { font-size: 12px; line-height: 16px; }
.participant-person strong, .participant-task strong { font-size: 14px; line-height: 20px; }
.participant-person small, .participant-task small, .participant-message small { font-size: 12px; line-height: 16px; }
.contact-record-wrap h4 { font-size: 14px; line-height: 20px; }
.contact-record-form, .medication-event-form { gap: 16px; }
.contact-record-form .field, .contact-record-form .select,
.medication-event-form .field, .medication-event-form .select,
.contact-record-form .textarea, .medication-event-form .textarea { font-size: 14px; }
/* Shared role shell: patient, care team, and clinic administration. */
.page-content:has(.portal-workspace){width:100%;max-width:none;padding:0}
.portal-workspace{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:calc(100vh - 115px);background:#F4F6FA}
.portal-sidebar{position:sticky;top:0;align-self:start;height:calc(100vh - 32px);min-height:600px;padding:28px 16px 20px;background:#fff;border-right:1px solid #DDE2EA;display:flex;flex-direction:column;z-index:2}
.portal-brand{display:flex;align-items:center;gap:12px;padding:4px 9px 26px;color:#192436;text-decoration:none;font:600 16px Montserrat,Inter,sans-serif}
.portal-brand img{width:36px;height:36px;object-fit:contain;padding:6px;background:#E9F5F4;border-radius:8px}
.portal-brand small{display:block;margin-top:4px;color:#5B6475;font:400 12px/16px Inter,sans-serif}
.portal-nav-label{padding:8px 10px 12px;color:#5B6475}
.portal-sidebar nav{display:grid;gap:4px}
.portal-nav-item{min-height:44px;display:flex;align-items:center;gap:12px;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:#33425E;text-align:left;font:500 14px/20px Inter,sans-serif;cursor:pointer}
.portal-nav-item:hover{background:#F1F4F9}
.portal-nav-item.active{background:#E9F5F4;color:#237873;font-weight:600}
.portal-nav-dot{width:8px;height:8px;flex:0 0 8px;border:1.5px solid currentColor;border-radius:50%}
.portal-nav-item.active .portal-nav-dot{background:#237873;border-color:#237873}
.portal-sidebar-note{margin-top:auto;padding:16px 10px 0;border-top:1px solid #DDE2EA;color:#5B6475;font:400 12px/18px Inter,sans-serif}
.portal-main{min-width:0;width:min(1260px,100%);margin:0 auto;padding:32px clamp(20px,3vw,44px) 48px}
.portal-main>.page-heading,.portal-main>.panel,.portal-main>.hero-panel,.portal-main>.grid-2,.portal-main>.grid-equal{scroll-margin-top:24px}
.portal-main .page-heading h1{font:600 24px/32px Montserrat,Inter,sans-serif;color:#192436}
.portal-main .page-heading p,.portal-main .quiet-note{color:#5B6475;font-size:14px;line-height:20px}
.portal-main .panel{border:1px solid #DDE2EA;border-radius:8px;box-shadow:none}
.portal-main .panel-head h3{font:600 16px/24px Montserrat,Inter,sans-serif;color:#192436}
.portal-main .field,.portal-main .select{min-height:40px;border-color:#7E8798;border-radius:8px;font:400 14px/20px Inter,sans-serif}
.portal-main .button{min-height:40px;border-radius:8px;font:600 14px/20px Inter,sans-serif}
.portal-main .button-small{min-height:32px;font-size:12px;line-height:16px}
.portal-main .choice{min-height:40px;border-radius:8px;font:500 14px/20px Inter,sans-serif}
.admin-role-chart{margin:20px 0 12px}
.admin-role-bar{height:18px;display:flex;overflow:hidden;border-radius:999px;background:#E4E9F1}
.admin-role-bar span{height:100%;min-width:2px}
.admin-role-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px 18px}
.admin-role-item{display:grid;grid-template-columns:10px minmax(0,1fr) auto auto;align-items:center;gap:8px;color:#33425E;font:400 12px/16px Inter,sans-serif}
.admin-role-item>span:first-child{width:8px;height:8px;border-radius:50%;background:var(--role-color)}
.admin-role-item strong{font-size:14px;color:#192436}
.admin-role-item small{color:#5B6475}
.portal-main :focus-visible{outline:2px solid #237873;outline-offset:2px}
@media(max-width:760px){.page-content:has(.portal-workspace){padding:0}.portal-workspace{display:block;min-height:auto}.portal-sidebar{position:sticky;top:0;z-index:5;height:auto;min-height:0;padding:8px 12px 10px;border-right:0;border-bottom:1px solid #DDE2EA}.portal-brand,.portal-nav-label,.portal-sidebar-note{display:none}.portal-sidebar nav{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin}.portal-nav-item{flex:0 0 auto;min-height:40px;padding:9px 11px;font-size:13px}.portal-nav-dot{display:none}.portal-main{padding:24px 15px 34px}.admin-role-legend{grid-template-columns:1fr 1fr}.portal-main .page-heading h1{font-size:23px;line-height:30px}}

/* Shared shell rules also cover nurse and clinician workspaces. */
.portal-workspace.care-workspace{grid-template-columns:236px minmax(0,1fr);min-height:calc(100vh - 115px);background:var(--bg)}
.portal-workspace.care-workspace .care-sidebar{position:sticky;top:0;align-self:start;height:calc(100vh - 32px);min-height:600px;padding:28px 16px 20px;background:#fff;border-right:1px solid var(--line)}
.portal-workspace.care-workspace .care-sidebar nav{display:grid;gap:4px}
.portal-workspace.care-workspace .care-sidebar nav button{min-height:44px;gap:12px;padding:10px 12px;border-radius:8px;font:500 14px/20px Inter,Arial,sans-serif;color:var(--navy-600)}
.portal-workspace.care-workspace .care-sidebar nav button:hover{background:var(--navy-50)}
.portal-workspace.care-workspace .care-sidebar nav button.active{background:var(--teal-50);color:var(--teal-700);font-weight:600}
.portal-workspace.care-workspace .care-nav-icon{width:20px;flex:0 0 20px}
.portal-workspace.care-workspace .care-sidebar-foot{margin-top:auto;padding:16px 10px 0;border-top:1px solid var(--line);color:var(--ink-muted);font:400 12px/18px Inter,Arial,sans-serif}
.portal-workspace.care-workspace .care-content{width:min(1260px,100%);min-width:0;margin:0 auto;padding:32px clamp(20px,3vw,44px) 48px}
.portal-workspace.care-workspace .care-section-heading{margin:0 0 24px}
.portal-workspace.care-workspace .care-section-heading h1{font:600 24px/32px Montserrat,Inter,sans-serif;letter-spacing:0;color:var(--navy-800)}
.portal-workspace.care-workspace .care-section-heading p{font:400 14px/20px Inter,Arial,sans-serif;color:var(--ink-muted)}
.portal-workspace.care-workspace .care-section-heading .eyebrow{font:600 12px/16px Inter,Arial,sans-serif}
.patient-dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.patient-dashboard-grid>div{display:grid;align-content:start;gap:16px;min-width:0}
.patient-dashboard-grid .panel{margin:0}
.patient-bot-panel .bot-transcript{max-height:360px;overflow:auto}
.patient-dashboard-grid .participant-thread,.patient-dashboard-grid .message-list{gap:12px}
@media(max-width:1200px){.portal-workspace.care-workspace{grid-template-columns:236px minmax(0,1fr)}}
@media(max-width:760px){
 .portal-workspace.care-workspace{display:block;min-height:auto}
 .portal-workspace.care-workspace .care-sidebar{position:sticky;top:0;z-index:5;height:auto;min-height:0;padding:8px 12px 10px;border-right:0;border-bottom:1px solid var(--line)}
 .portal-workspace.care-workspace .portal-brand,.portal-workspace.care-workspace .portal-nav-label,.portal-workspace.care-workspace .care-sidebar-foot{display:none}
 .portal-workspace.care-workspace .care-sidebar nav{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin}
 .portal-workspace.care-workspace .care-sidebar nav button{flex:0 0 auto;min-height:40px;white-space:nowrap;padding:9px 11px;font-size:13px}
 .portal-workspace.care-workspace .care-nav-icon{width:18px;flex-basis:18px}
 .portal-workspace.care-workspace .care-content{padding:24px 15px 34px}
 .patient-dashboard-grid{grid-template-columns:minmax(0,1fr)}
}
