input.input-invalid, select.input-invalid, textarea.input-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 1px #b42318;
  background-color: #fff4f2;
}

:root {
  color-scheme: light;
  --teal: #00909a;
  --teal-dark: #006a72;
  --teal-light: #e6f6f5;
  --coral: #ff7d66;
  --ink: #263b40;
  --muted: #637579;
  --border: #e2e7e5;
  --canvas: #f4f1ec;
  --error: #b63224;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--teal-dark); }
button, input, select { font: inherit; }
button, select, input { border: 1px solid #c9d4d2; border-radius: 8px; background: white; color: var(--ink); min-height: 40px; padding: 9px 12px; }
button { cursor: pointer; font-weight: 600; }
button:hover { background: var(--teal-light); border-color: var(--teal); }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.primary { background: var(--teal-dark); border-color: var(--teal-dark); color: white; }
#notes-conflict-draft { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.transcript-status { margin: 0; padding: 10px 20px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.transcript-status[role="alert"] { color: #85421c; }
.primary:hover { background: #00545b; border-color: #00545b; color: white; }
.shell { min-height: 100vh; position: relative; }
.portal-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; min-height: 64px; padding: 8px 20px; background: white; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.brand { display: block; flex-shrink: 0; }
.brand img { display: block; width: 118px; height: 38px; }
.header-navigation { display: flex; align-items: center; min-width: 0; flex-basis: 100%; order: 3; }
.workspace-menu { position: relative; min-width: 0; width: 100%; }
#workspace-toggle { display: none; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; font-size: 12px; }
#workspace-toggle[aria-expanded="true"] { background: var(--teal-light); border-color: var(--teal); }
#workspace-navigation { display: flex; gap: 4px; margin: 0; }
#workspace-navigation .nav-label { display: none; }
#workspace-navigation a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 7px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
#workspace-navigation a span { font-size: 18px; width: 20px; text-align: center; }
#workspace-navigation a[aria-current="page"] { background: var(--teal-light); color: var(--teal-dark); }
#workspace-navigation a:hover { background: #f3f6f5; }
.breadcrumbs { min-width: 0; font-size: 12px; margin-bottom: 12px; }
.breadcrumbs ol { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; min-width: 0; }
.breadcrumbs li { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumbs li:last-child { color: var(--ink); font-weight: 600; }
.breadcrumbs button { border: 0; border-radius: 3px; color: var(--teal-dark); min-height: 32px; padding: 4px; font-size: 12px; }
.header-call { flex-shrink: 0; text-decoration: none; color: var(--teal-dark); background: var(--teal-light); padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.header-call::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--teal-dark); }
#portal-account-slot { flex-shrink: 0; max-width: 220px; }
.my-day { margin-left: auto; }
#my-day-toggle { min-height: 32px; padding: 5px 10px; font-size: 12px; }
#my-day-toggle[aria-expanded="true"] { background: var(--teal-light); border-color: var(--teal); }
.my-day-panel.card { position: absolute; top: 100%; right: 12px; width: min(380px, calc(100vw - 24px)); max-height: min(680px, calc(100dvh - 140px)); overflow-y: auto; overscroll-behavior-y: contain; box-shadow: 0 12px 32px #263b4026; z-index: 40; }
.my-day-panel .card-heading, .my-day-panel .recap-body, .my-day-panel .section-actions { padding: 12px 16px; }
.my-day-panel .recap-body { display: flex; flex-direction: column; gap: 12px; }
.my-day-panel .recap-body > p { margin: 0; }
.my-day-panel #my-day-local { padding: 10px 12px; font-size: 12px; }
.my-day-caption { color: var(--muted); font-size: 12px; }
.my-day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#my-day-activity { display: contents; }
.my-day-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px; border-radius: 8px; background: #f3f6f5; overflow-wrap: anywhere; }
.my-day-stat > span, .my-day-stat small { font-size: 12px; color: var(--muted); }
.my-day-stat > strong { font-size: 21px; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; }
.my-day-stat strong small { display: block; margin-top: 4px; font-weight: 400; }
.my-day-stat strong > span { display: block; }
.my-day-stat strong > span + span { margin-top: 8px; }
.my-day-about { color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.my-day-about summary { cursor: pointer; }
.my-day-about p { margin: 10px 0 0; }
.my-day-panel .card-heading h2 { margin: 0; }
.my-day-panel .card-heading button, .my-day-panel .section-actions button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.my-day-panel .section-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.env { font-size: 10px; color: var(--teal-dark); background: var(--teal-light); padding: 2px 5px; border-radius: 4px; margin-left: auto; }
.nav-label, .eyebrow { font-size: 10px; letter-spacing: 1.7px; font-weight: 700; color: var(--muted); }
.nav-label { margin: 15px 12px 10px; }
.workspace { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--border); padding: 6px 20px; font-size: 11px; }
.access-label { color: var(--muted); font-size: 12px; }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.topbar-tools button { min-height: 32px; padding: 5px 10px; font-size: 11px; }
.greeting-script { padding: 16px; border-left: 3px solid var(--teal); background: var(--teal-light); line-height: 1.8; }
#greeting-preview { width: 100%; max-width: 480px; }
#greeting-upload { max-width: 100%; }
.recording-library { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.patient-pin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#patients-pin-reason { display: block; width: 100%; box-sizing: border-box; }
#patients-pin-form { margin: 0 24px 20px; padding: 16px; border-left: 3px solid var(--teal); background: var(--teal-light); border-radius: 6px; }
#patients-pin-form label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
#patients-directory-panel .patient-pinned-reason { min-width: 180px; max-width: 320px; white-space: pre-wrap; font-weight: 600; color: var(--teal-dark); }
#patients-directory .secondary { white-space: pre-wrap; overflow-wrap: anywhere; }
.patient-pin-actions button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-light); }
#patients-detail { align-self: start; min-width: 0; overflow-wrap: anywhere; }
#patients .patient-layout { grid-template-columns: minmax(0, 1fr); }
#patients-card h3 { margin-top: 0; }
#patients-search label, #patients-query { min-width: 0; max-width: 100%; }
#patients .patient-pin-actions button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); }
#patients-directory-panel td { padding: 12px; overflow-wrap: anywhere; }
#patients-directory-panel th { padding: 12px; }
#patients-directory-panel td:first-child { min-width: 140px; }
#patients-directory-panel td:last-child { min-width: 110px; }
#patients-directory-panel .patient-pin-actions { display: table-cell; }
#patients-directory-panel .patient-pin-actions button { white-space: nowrap; margin: 0 6px 6px 0; }
#patients .card-heading { flex-wrap: wrap; }
.patient-create-panel { margin: 0 16px 16px; padding: 14px; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 8px; background: #fbfdfc; }
#patients-create-toggle { margin-left: auto; }
.us-date-control { display: flex; align-items: stretch; gap: 6px; min-width: 0; width: 100%; }
.team-active-calls { margin-bottom: 20px; }
.team-active-calls > .card-heading { padding: 12px 0; flex-wrap: wrap; gap: 10px; }
.team-active-calls h2 { font-size: 18px; }
.team-active-calls .muted { font-size: 12px; margin: 4px 0 0; }
.team-active-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.team-active-card { padding: 16px; min-width: 0; overflow-wrap: anywhere; border-top: 3px solid var(--teal); }
.team-active-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 12px; }
.team-active-card h3 { font-size: 15px; margin: 0; }
.team-active-card > div:not(.team-active-card-heading) { font-size: 12px; line-height: 1.6; }
.team-active-card [data-support-card] { margin-top: 12px; }
.us-date-control > input { flex: 1 1 0; width: 0; min-width: 0; }
.us-date-control > button { flex: 0 0 auto; font-size: 12px; padding: 7px 9px; white-space: nowrap; }
.us-date-calendar { width: min(350px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: white; }
.us-date-calendar::backdrop { background: rgb(38 59 64 / 35%); }
.us-date-heading, .us-date-month { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 12px; }
.us-date-heading strong { font-size: 13px; }
.us-date-month select { min-width: 0; }
.us-date-week, .us-date-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.us-date-week { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.us-date-days { margin-bottom: 12px; }
.us-date-days button { padding: 6px 0; font-size: 13px; }
.us-date-days button[aria-pressed="true"] { background: var(--teal-dark); color: white; }
.patient-create-heading h3, .patient-create-heading p { margin: 0; }
.patient-create-heading { margin-bottom: 12px; }
.patient-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.patient-create-form label { min-width: 0; }
.patient-create-form input { width: 100%; min-width: 0; }
.patient-create-help { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }
.patient-create-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.patient-create-panel .inline-operation-error, .patient-create-panel .duplicate-profile-match { margin: 0 0 12px; }
#patients #patients-directory-panel .card-heading { padding-bottom: 16px; }
#patients-search { gap: 8px; padding-bottom: 0; }
#patients-card .context-grid { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
#patients-detail .table-scroll { max-width: 100%; }
#patients-detail td { overflow-wrap: anywhere; }
.call-patient-association { margin-bottom: 12px; border-left: 4px solid var(--teal); }
.call-patient-association .card-heading { padding: 12px 16px 8px; }
.call-patient-association > .recap-body { padding: 8px 16px; }
.call-patient-results { display: grid; gap: 8px; }
.call-patient-option { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.call-patient-option strong { min-width: 160px; }
.call-patient-option .secondary { flex: 1; min-width: 180px; }
.call-patient-association .toolbar { padding: 8px 16px 12px; gap: 8px; }
.call-patient-association .toolbar .search { min-width: min(220px, 100%); }
.call-patient-create { margin: 0 16px 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.call-patient-create > summary { cursor: pointer; color: var(--teal-dark); font-size: 12px; font-weight: 650; }
.call-patient-create > .footnote { margin: 8px 0; }
.call-patient-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.call-patient-create-form label { min-width: 0; }
.call-patient-create-form label:has([data-us-date]), #live-patient-create-form label:has([data-us-date]) { grid-column: 1 / -1; }
.call-patient-create-form input { width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px; }
.call-patient-create-form button { min-height: 36px; padding: 7px 10px; }
.call-patient-address { grid-column: span 2; }
.recording-library button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.recording-library button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); }
#greeting-label { width: 100%; max-width: 480px; }
.recording-indicator { margin: 0 24px 20px; padding: 18px; border: 2px solid var(--error); border-radius: 10px; background: #fff3f0; }
.recording-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; color: var(--error); }
.recording-heading .mono { margin-left: auto; }
.recording-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--error); }
.recording-indicator meter { width: 100%; height: 22px; }
.recording-indicator p { margin: 8px 0 0; font-size: 12px; }
.recording-stop { background: var(--error); color: white; border-color: var(--error); }
.recording-stop:hover { background: #92271d; color: white; }
#greeting-playback { flex-wrap: wrap; }
.portal-login { max-width: 480px; margin: 8vh auto; padding: 16px; }
.portal-login .card { padding: 28px; }
.portal-login form { display: grid; gap: 18px; margin: 24px 0; }
.portal-login h1 { font-size: 24px; margin-top: 24px; }
.portal-login .notice { margin: 12px 0; }
.portal-account { display: flex; align-items: center; gap: 10px; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.portal-account > span { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-account button { flex-shrink: 0; }
.portal-account button { min-height: 32px; padding: 5px 12px; font-size: 12px; }
.portal-signout-confirm { width: min(320px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: white; box-shadow: 0 8px 24px #263b4026; color: var(--ink); text-align: left; }
.portal-signout-confirm::backdrop { background: #263b404d; }
.portal-signout-confirm p { margin: 0 0 12px; line-height: 1.5; }
.portal-signout-confirm > div { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-signout-confirm [role="alert"] { margin: 12px 0 0; color: #854117; }
main { padding: 20px 24px 16px; max-width: 1900px; margin: auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-heading .eyebrow { display: none; }
.page-heading p { margin: 5px 0; }
h1 { font-size: 29px; letter-spacing: -.8px; font-weight: 650; margin: 5px 0; }
h2 { font-size: 17px; font-weight: 650; margin: 0; }
.muted, .secondary, .footnote { color: var(--muted); }
.secondary { display: block; font-size: 12px; margin-top: 3px; font-weight: 400; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: white; border: 1px solid var(--border); padding: 12px 16px; border-radius: 10px; }
.stat strong { display: block; font-size: 26px; margin: 3px 0; letter-spacing: -1px; }
.stat span { color: var(--muted); font-size: 12px; }
.stat:first-child { border-top: 3px solid var(--teal); padding-top: 10px; }
.stat:last-child { border-top: 3px solid var(--coral); padding-top: 10px; }
.card { background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 12px; }
.card-heading p { margin: 5px 0 0; font-size: 12px; }
.badge { display: inline-block; background: #f0f4f3; color: #4c6569; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge.ready { background: #e5f4e9; color: #25643c; }
.badge.alert { background: #fff0e8; color: #984421; }
.score { display: inline-block; padding: 1px 7px; border-radius: 5px; font-weight: 700; }
.score-low { background: #fdeaea; color: #9b2c2c; }
.score-mid { background: #fff4e0; color: #8a5300; }
.routing-status-heading { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.routing-status-heading .badge { font-size: 13px; padding: 7px 12px; }
.routing-status-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 0 0 16px; }
.routing-status-facts > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: #f7faf9; }
.routing-status-facts dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.routing-status-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.routing-status-outcome { border-left: 4px solid; border-radius: 6px; padding: 12px 16px; }
.routing-status-outcome p { margin: 6px 0 0; }
.routing-open { background: #e5f4e9; border-color: #25643c; color: #25643c; }
.routing-closed { background: #fff0e8; border-color: #984421; color: #984421; }
.routing-status-caption { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.toolbar { display: flex; gap: 12px; align-items: end; padding: 0 20px 16px; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; }
label input, label select { font-size: 13px; font-weight: 400; }
.search { flex: 1; min-width: 220px; }
.checkbox { flex-direction: row; align-items: center; min-height: 40px; gap: 8px; }
input[type="checkbox"] { min-height: auto; accent-color: var(--teal); width: 16px; height: 16px; margin: 0; }
.data-caption { padding: 13px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; text-align: left; width: 100%; font-size: 12px; }
th { background: #f8faf9; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; padding: 13px 18px; }
td { padding: 17px 18px; border-top: 1px solid #edf0ee; vertical-align: top; }
td:first-child { min-width: 160px; font-weight: 600; }
.timing { min-width: 220px; }
#team-rows td:nth-child(8) { min-width: 160px; }
#team-rows td:nth-child(4), #team-rows td:nth-child(5), #team-rows td:nth-child(6), #team-rows td:nth-child(7) { white-space: nowrap; }
.team-queues summary { cursor: pointer; }
.team-queues summary::marker { color: var(--teal-dark); }
.team-queues .secondary { overflow-wrap: anywhere; }
.timing > div + div { margin-top: 12px; }
.hold-overdue { color: var(--error); font-weight: 700; }
.footnote { font-size: 11px; margin: 12px 24px; }
.data-notes { margin: 16px 24px; color: var(--muted); font-size: 12px; }
.data-notes summary { cursor: pointer; font-weight: 600; }
.destination-picker { position: relative; }
.destination-input { display: flex; gap: 8px; }
.destination-input input { min-width: 0; flex: 1; }
.destination-options { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; max-height: 240px; overflow-y: auto; background: white; border: 1px solid var(--muted); border-radius: 8px; box-shadow: 0 4px 12px #0002; }
.destination-option { padding: 12px 16px; cursor: pointer; overflow-wrap: anywhere; }
.destination-option:hover, .destination-option.active, .destination-option[aria-selected="true"] { background: #edf7f7; }
.notice { padding: 12px 16px; margin: 12px 24px; border: 1px solid #e8c4aa; background: #fff7ee; color: #85421c; border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
#auth-notice { margin: 0 0 20px; }
.empty { text-align: center; padding: 45px 24px; color: var(--muted); }
.detail-empty { padding-top: 100px; }
.review-unavailable { max-width: 600px; margin: auto; }
.review-unavailable .notes-actions { justify-content: center; align-items: center; margin-top: 24px; }
.review-unavailable details { margin: 18px 0; }
.review-unavailable summary { cursor: pointer; }
.empty-symbol { display: block; font-size: 42px; color: var(--teal); margin-bottom: 18px; }
.page-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding: 28px 0 8px; }
.review-toolbar { margin-bottom: 20px; padding-top: 20px; }
.review-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.call-list-panel { max-height: 78vh; overflow-y: auto; }
.call-list-panel .card-heading { position: sticky; top: 0; background: white; border-bottom: 1px solid var(--border); z-index: 1; }
.call-list { list-style: none; padding: 0; margin: 0; }
.call-list li { border-top: 1px solid var(--border); }
.call-item { display: block; border: 0; border-radius: 0; width: 100%; text-align: left; padding: 18px 20px; background: white; font-weight: 400; overflow-wrap: anywhere; }
.call-item[aria-pressed="true"] { background: var(--teal-light); box-shadow: inset 3px 0 var(--teal); }
.call-item strong { display: block; font-size: 13px; margin: 7px 0; }
.call-item .badge { margin: 9px 4px 0 0; }
.review-search-help { padding: 0 24px 18px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-call-date { display: block; color: var(--muted); font-size: 11px; }
.call-item .review-call-title { font-size: 14px; line-height: 1.5; color: var(--teal-dark); margin: 8px 0; }
.review-call-reason { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
.review-call-line { display: block; font-size: 11px; line-height: 1.7; margin-top: 4px; color: var(--muted); }
.review-statuses { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.call-item .review-statuses .badge { margin: 0; white-space: normal; text-align: left; }
.call-item:hover { background: #f3f8f7; }
.call-item:focus-visible { outline: 2px solid var(--teal); outline-offset: -3px; }
.review-detail-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.review-eyebrow { color: var(--teal-dark); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 10px; }
.review-detail-date { color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-summary, .review-recordings { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; min-width: 0; }
.review-summary h3, .review-recordings h3 { font-size: 14px; margin: 0 0 12px; }
.review-summary p { margin: 0; line-height: 1.8; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-reference { color: var(--muted); font-size: 11px; }
.review-reference summary { cursor: pointer; }
#review .detail-meta { padding: 16px; background: #f5f8f7; border-radius: 10px; gap: 18px 14px; }
#review .detail-meta dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
#review .detail-meta dd { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.6; }
#review .detail-header h2 { overflow-wrap: anywhere; line-height: 1.4; }
#review .review-recordings audio { min-width: 0; flex-basis: 180px; }
.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; overflow-wrap: anywhere; }
.call-detail { min-height: 560px; }
.detail-header { padding: 24px; border-bottom: 1px solid var(--border); }
.detail-header h2 { font-size: 21px; margin: 10px 0; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 12px; margin: 20px 0; overflow-wrap: anywhere; }
.summary { background: #f3f8f7; border-left: 3px solid var(--teal); padding: 14px; font-size: 13px; white-space: pre-wrap; margin: 18px 0; }
.player { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: #f8faf9; padding: 12px; margin: 10px 0; border-radius: 8px; font-size: 11px; }
audio { flex: 1; min-width: 150px; width: 100%; height: 34px; }
.tabs { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.tabs button { font-size: 12px; border-color: transparent; }
.tabs button[aria-pressed="true"] { color: var(--teal-dark); background: var(--teal-light); }
.timeline { padding: 20px 24px; }
.event { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 15px; padding-bottom: 18px; }
.event time { color: var(--muted); font-size: 10px; padding-top: 8px; }
.bubble { padding: 12px 15px; border-radius: 8px; background: #f4f7f6; border-left: 2px solid #b3c5c2; }
.event.ai .bubble, .event.agent .bubble { background: #eff9f8; border-color: var(--teal); }
.event.log .bubble { background: #f6f4f0; }
.event.flagged .bubble { border-color: var(--coral); }
.bubble strong { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.bubble p { font-size: 12px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.flag-note { margin-top: 8px; color: var(--error); font-size: 11px; }
mark { background: #ffedb0; color: #493b16; border-radius: 2px; }
.history { padding: 20px; }
.history .call-list { margin-top: 18px; }
.skip-link { position: absolute; top: -60px; background: white; padding: 12px; z-index: 10; }
.skip-link:focus { top: 0; }
.simulator-panel { margin-bottom: 20px; border-color: #e8c4aa; }
.simulator-panel .card-heading { padding-bottom: 8px; }
.simulator-panel .toolbar { padding-top: 12px; }
.workflow-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #e6f6f5; border: 1px solid #b0dcd8; padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.workflow-status strong { margin-left: 8px; }
.workflow-status .secondary { overflow-wrap: anywhere; }
.workflow-status button { white-space: nowrap; }
#workflow-error { position: sticky; top: 8px; z-index: 20; margin: 0 0 20px; scroll-margin-top: 8px; box-shadow: 0 4px 14px rgb(34 48 47 / 12%); }
.inline-operation-error { margin: 14px 0; padding: 12px 14px; border: 1px solid #d8a9a2; border-left: 4px solid #a63225; border-radius: 8px; background: #fff3f1; color: #76251c; }
.inline-operation-error p { margin: 4px 0 0; }
.duplicate-profile-match { margin: 14px 0; padding: 14px; border: 1px solid #dfc98a; border-left: 4px solid #9a7414; border-radius: 8px; background: #fffbeb; }
.duplicate-profile-match h3, .duplicate-profile-match p { margin: 0 0 8px; }
.profile-create-help { grid-column: 1 / -1; display: grid; gap: 4px; color: var(--muted); }
.call-profile-card .card-heading { padding-bottom: 6px; }
.call-profile-name { margin: 0; padding: 0 16px 14px; color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.call-profile-hint { margin: 0; padding: 0 16px 16px; font-size: 12px; line-height: 1.6; }
#call-workspace .card-heading { align-items: flex-start; flex-wrap: wrap; }
#call-workspace .card-heading h2 { min-width: 0; overflow-wrap: anywhere; }
#call-workspace .patient-disclosure { padding: 16px; }
#call-workspace > #live-patient-link { margin-bottom: 16px; }
#call-workspace .patient-disclosure .context-grid { margin-top: 16px; }
#call-workspace .patient-disclosure .section-actions { padding: 12px 0 0; }
#call-workspace .patient-disclosure .profile-create-help { padding-top: 4px; }
#call-workspace .patient-disclosure .patient-results { margin: 12px 0; }
.patient-search-help { margin: 0 16px 12px; font-size: 12px; }
.caller-match-panel { margin-bottom: 16px; border: 2px solid var(--teal); background: #f3faf8; }
.caller-match-panel .card-heading { padding: 16px 20px 8px; }
.caller-match-panel .recap-body { padding: 0 20px 16px; }
.caller-match-panel .patient-results { margin: 0; }
.caller-match-panel .patient-result { flex-wrap: wrap; border-top: 1px solid var(--border); }
.caller-match-panel .patient-result > div { flex: 1; min-width: min(240px, 100%); }
.caller-match-panel .patient-result > div > strong { font-size: 17px; }
.caller-match-panel .patient-result button { flex-shrink: 0; }
.caller-relationship-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 0 16px 14px; }
.caller-relationship-form > label { flex: 1; min-width: min(220px, 100%); }
.caller-relationship-form > p { flex-basis: 100%; margin: 0; font-size: 12px; }
.workflow-notice { background: #e5f4e9; border: 1px solid #bfd8c7; color: #25643c; padding: 14px 18px; border-radius: 8px; margin: 0 0 20px; }
.call-hero { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; border-top: 3px solid var(--teal); }
.call-hero h2 { font-size: 21px; margin: 6px 0 0; }
.call-hero p { margin: 4px 0; }
.call-hero > div:first-child { min-width: 0; flex: 1; }
.call-hero .caller-relationship-form { padding: 14px 0 0; max-width: 600px; }
.call-hero .caller-relationship-form > p { margin: 0; line-height: 1.5; }
.call-hero .call-verification { align-self: flex-start; padding-top: 2px; }
.hero-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-actions { display: flex; gap: 8px; flex-wrap: wrap; max-width: 450px; justify-content: end; }
.call-verification { max-width: 320px; display: grid; gap: 10px; }
#live-auth, #caller-auth-form { margin: 0 0 20px; }
.call-history .table-scroll { max-width: 100%; }
.call-history { margin-top: 16px; }
.patient-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.patient-primary, .patient-secondary { display: grid; gap: 12px; min-width: 0; }
.patient-layout .card-heading { padding: 12px 16px; }
.patient-layout .context-grid { gap: 10px 14px; }
.context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; font-size: 12px; }
.context-grid > div { overflow-wrap: anywhere; min-width: 0; }
.context-grid strong { font-weight: 600; }
.context-grid label, .context-grid input { min-width: 0; width: 100%; }
.context-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.patient-info { padding: 0 16px 14px; }
.section-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.section-actions button { font-size: 12px; }
.auth-form { margin: 0 24px 24px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #f8faf9; }
.auth-form h3 { font-size: 14px; margin: 0; }
.auth-form p { font-size: 12px; }
.auth-form .section-actions { padding: 18px 0 0; }
.patient-disclosure { padding: 18px 24px; }
.patient-disclosure summary { cursor: pointer; font-weight: 650; }
.patient-disclosure .context-grid { margin-top: 20px; }
.patient-results { list-style: none; margin: 12px 0; padding: 0; }
.patient-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; }
.patient-result > div { display: grid; gap: 4px; min-width: 0; }
.patient-result .muted { overflow-wrap: anywhere; }
.previous-notes { font-size: 12px; white-space: pre-wrap; }
.transcript-turns { padding: 0 16px 12px; max-height: 320px; overflow-y: auto; font-size: 12px; }
.transcript-turn { border-left: 2px solid var(--teal); padding: 2px 0 2px 12px; margin-bottom: 16px; }
.transcript-turn strong { color: var(--teal-dark); font-size: 11px; }
.transcript-turn p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.recap-body { padding: 0 16px 16px; font-size: 12px; overflow-wrap: anywhere; }
.recap-body h3 { font-size: 13px; margin-top: 24px; }
.recap-body .footnote { margin: 12px 0 0; }
textarea { font: inherit; border: 1px solid #c9d4d2; border-radius: 8px; width: 100%; padding: 12px; color: var(--ink); resize: vertical; min-height: 100px; }
textarea:disabled { background: #f3f6f5; }
.acw-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.notes-form { padding: 0 24px 24px; }
.notes-form > label { margin-top: 16px; }
.notes-form select { min-width: 0; width: 100%; }
.notes-form .context-grid { margin-bottom: 24px; }
.notes-form .footnote { margin: 16px 0; }
.notes-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.notes-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.local-followups { margin-bottom: 16px; }
.followups-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.mycalls-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.mycalls-tabs [aria-selected="true"] { color: var(--teal-dark); background: var(--teal-light); border-color: var(--teal); }
.mycalls-tabs .badge { margin-left: 6px; }
body:has(#mycalls) #workspace-navigation a { font-size: 12px; padding: 8px 9px; }
#mycalls .table-scroll { width: 100%; }
#mycalls-rows td { overflow-wrap: anywhere; }
#mycalls-rows td:last-child { max-width: 240px; }
.mycalls-controls { padding: 0 20px 16px; }
.mycalls-search-row { display: flex; align-items: end; gap: 12px; }
.mycalls-search-row .search { min-width: 0; }
.mycalls-search-row #mycalls-reload { flex: 0 0 auto; }
.mycalls-filters { margin-top: 12px; }
.mycalls-filters > summary { width: fit-content; color: var(--teal-dark); cursor: pointer; font-size: 12px; font-weight: 650; }
.mycalls-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; padding-top: 12px; }
.mycalls-filter-grid > label { min-width: 0; }
.local-followups > summary, .followup-editor > summary { padding: 12px 20px; cursor: pointer; font-weight: 650; }
.followup-editor { margin-bottom: 16px; }
.followup-editor textarea { width: 100%; }
.followup-item { display: flex; justify-content: space-between; align-items: start; gap: 16px; border-top: 1px solid var(--border); padding: 12px 0; }
.followup-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.followup-item strong { white-space: pre-wrap; }
.followup-reason { white-space: pre-wrap; margin: 6px 0; }
.followup-item .notes-actions { flex-shrink: 0; }
@media (max-width: 600px) { .followup-item { flex-direction: column; } }
@media (max-width: 600px) {
  .mycalls-controls { padding: 0 16px 16px; }
  .mycalls-search-row { align-items: stretch; flex-direction: column; }
  .mycalls-search-row #mycalls-reload { width: 100%; }
}
.embedded main { padding: 16px 16px 12px; }
.embedded .access-label { display: none; }
@media (min-width: 1550px) { .review-layout { grid-template-columns: 375px minmax(0, 1fr); } }
@media (max-width: 1150px) {
  main { padding: 18px 20px; }
  .review-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 14px; }
  .stats { gap: 10px; }
  .acw-layout { grid-template-columns: 1fr; }
  .call-actions { justify-content: start; max-width: none; }
}
@media (max-width: 800px) {
  .patient-create-form, .call-patient-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-header { flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; }
  .header-navigation { order: 3; flex-basis: 100%; }
  .brand img { width: 106px; height: 34px; }
  .portal-account { font-size: 11px; gap: 8px; }
  #portal-account-slot { max-width: calc(100% - 190px); }
  .breadcrumbs li:first-child { flex-shrink: 0; }
  .breadcrumbs li:last-child { flex-shrink: 1; }
  .access-label { font-size: 10px; }
  main { padding: 16px; }
  h1 { font-size: 25px; }
  .page-heading { align-items: start; }
  .page-heading .primary { font-size: 11px; white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-heading, .toolbar { padding-left: 16px; padding-right: 16px; }
  .review-layout { grid-template-columns: 1fr; }
  .call-list-panel { max-height: 360px; }
  .detail-meta { grid-template-columns: 1fr; }
  .page-footer { gap: 12px; font-size: 10px; }
  .event { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; }
  .timeline { padding: 16px; }
  .topbar-tools { gap: 8px; }
  .topbar-tools .access-label { display: none; }
  .context-grid { gap: 14px; }
  .call-hero { padding: 18px; }
  .workflow-status { flex-wrap: wrap; }
  .notes-caption { flex-wrap: wrap; }
  .notes-form, .patient-info, .recap-body, .transcript-turns { padding-left: 16px; padding-right: 16px; }
  .auth-form { margin-left: 16px; margin-right: 16px; }
  .simulator-panel label { width: 100%; }
  .simulator-panel select { width: 100%; }
}
@media (max-width: 899px) {
  .header-navigation { flex-basis: auto; flex: 1; order: 0; }
  .workspace-menu { width: auto; }
  #workspace-toggle { display: flex; }
  #workspace-navigation { position: absolute; top: calc(100% + 8px); left: 0; width: 252px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); overflow-y: auto; display: grid; gap: 4px; padding: 10px; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 36px #263b4026; }
  #workspace-navigation .nav-label { display: block; }
  #workspace-navigation a { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .patient-layout { grid-template-columns: 1fr; }
  .call-hero { flex-direction: column; align-items: stretch; }
  .call-patient-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-patient-address { grid-column: 1 / -1; }
  .header-navigation { flex-basis: 100%; order: 3; }
}
@media (max-width: 460px) {
  .context-grid { grid-template-columns: 1fr; }
  .notes-actions button { width: 100%; white-space: normal; }
  .hero-label .mono { width: 100%; }
}
@media (max-width: 600px) {
  #patients-directory-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #patients-directory-panel table, #patients-directory-panel tbody { display: block; }
  #patients-directory-panel tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); padding: 8px 16px; }
  #patients-directory-panel td { display: block; border: 0; padding: 6px 0; min-width: 0 !important; }
  #patients-directory-panel td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
  #patients-directory-panel td:first-child, #patients-directory-panel td:last-child { grid-column: 1 / -1; }
  #patients-directory-panel td:first-child { font-size: 14px; }
  #patients-directory-panel .patient-pin-actions { display: flex; padding-top: 10px; }
  #patients-directory-panel td:last-child::before { display: none; }
  #patients-search .search { flex-basis: 100%; }
}
.history-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-details { margin-top: .5rem; min-width: 0; }
.history-details summary { cursor: pointer; color: var(--teal, #006b70); }
.patient-history-table { width: 100%; table-layout: fixed; }
.patient-history-table th, .patient-history-table td { overflow-wrap: anywhere; }
.patient-history-table .history-call-row td { vertical-align: top; border-bottom: 0; }
.patient-history-table .history-notes-row > td { padding-top: 0; padding-bottom: 20px; }
.patient-history-table .history-details { margin: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8faf9; }
.history-details summary > .secondary { color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 6px; }
.history-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.history-note-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.history-note-panels > section { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.history-note-panels h4 { margin: 0 0 10px; font-size: 13px; color: var(--teal-dark); }
.history-note-panels p { margin: 8px 0 0; line-height: 1.6; }
.patient-voicemail-notes > article { padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8faf9; }
@media (max-width: 700px) {
  .history-note-panels { grid-template-columns: minmax(0, 1fr); }
  .patient-history-table thead { display: none; }
  .patient-history-table tbody { display: block; }
  .patient-history-table .history-call-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-history-table .history-call-row td { display: block; padding: 12px; min-width: 0; }
  .patient-history-table .history-call-row td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
  .patient-history-table .history-notes-row, .patient-history-table .history-notes-row > td { display: block; }
}
.representative-form { border-top: 1px solid #dce5e7; padding-top: 1rem; }
.representative-form .section-actions { padding: 12px 0 0; }
.representative-form .section-actions .muted { flex: 1 1 220px; line-height: 1.5; }
.patient-disclosure > .toolbar { padding: 16px 0 12px; }
#patients-search > .search { flex: 1 1 240px; }
#patients-search > label:first-child { flex: 0 1 260px; }
#patients-dob-control { flex: 1 1 240px; }
.business-call-filters[open] { align-items: flex-end; }
@media (max-width: 480px) {
  .patient-create-form, .call-patient-create-form { grid-template-columns: minmax(0, 1fr); }
}
