/* Reference theme. Shared clinician primitives; inherit the global brand typeface. */
.insight-filters select, .form-section > *, .reference-account dd { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.reference-account { grid-template-columns:100px minmax(0,1fr); }
.provider-card > .avatar, .message-thread > .avatar, .reference-thread > .avatar { background:var(--teal); color:white; }
.workspace-list-row .avatar[style] { color:white; }
.clinician-overview-grid > div, .clinician-dashboard-card { min-width:0; }
@media (max-width:400px) {
  .insight-filters label { flex-basis:100%; }
  .clinician-kpi-meta { flex-wrap:wrap; }
  .clinician-kpi-meta > span:last-child { white-space:normal !important; overflow-wrap:anywhere; }
  .patient-role-header .patient-workspace-brand .brand-wordmark { display:none !important; }
}
@media (max-width:48rem) {
  .reference-shell .clinician-overview-grid, .patient-main .portal-home-care { grid-template-columns:minmax(0,1fr) !important; }
  .clinician-payer-card > div:last-child { flex-wrap:wrap; }
  .patient-main .portal-progress-milestones .timeline { grid-template-columns:minmax(0,1fr); }
  .form-section { grid-template-columns:minmax(0,1fr); }
}
.demo-entry { min-height:100dvh; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); background:var(--bg); }
.demo-entry-story { display:flex; flex-direction:column; gap:2rem; padding:clamp(1.5rem,4vw,3.5rem); color:white; background:var(--surface-strong); }
.demo-entry-story h1 { font-size:clamp(1.75rem,3vw,2.5rem); line-height:1.2; }
.demo-entry-story p { color:#e0edf1; line-height:1.6; }
.demo-entry-story .eyebrow { color:#ffbc72; }
.demo-entry-access { display:flex; align-items:center; justify-content:center; padding:clamp(1.5rem,4vw,3rem); }
.demo-entry-access p { line-height:1.6; }
.demo-entry > *, .field, .form-grid > *, .intake-stepper > *, .portal-card { min-width:0; }
.field input, .field select, .field textarea { min-width:0; max-width:100%; }
.form-error, .toast.is-error { color:var(--tm-color-error); background:#fff2f3; border:1px solid #ddb8bf; }
.form-error { padding:var(--tm-space-3); border-radius:var(--tm-radius-sm); }
.toast.is-info .toast-icon { background:var(--teal-soft); color:var(--teal-deep); }
.toast.is-error .toast-icon { background:var(--tm-color-error); color:white; }
.portal-streak-card progress { width:100%; height:1rem; accent-color:var(--teal); margin:1.5rem 0; }
#app:has([role="dialog"]) .ai-dock, #app:has(.clinician-main form:focus-within) .ai-dock { visibility:hidden; }
.reference-table button { min-height:2rem; }
.reference-table-wrap:focus-visible { outline:3px solid var(--teal); outline-offset:2px; }
@media (max-width:48rem) {
  .demo-entry { grid-template-columns:minmax(0,1fr); }
  .demo-entry-access { order:-1; }
  .reference-table button, .reference-shell .outline-button, .reference-shell .button, .reference-shell .secondary-button { min-height:2.75rem; }
  .portal-home, .reference-shell, .clinician-workspace, .clinician-content-container { min-width:0; max-width:100%; }
  .form-footer, .portal-streak-header, .portal-streak-footer, .portal-appointment-card { flex-wrap:wrap; }
  .intake-field-grid { grid-template-columns:minmax(0,1fr); }
}
.reference-shell, .reference-dialog, .ai-panel, .ai-dock {
  --text: #1a1a1a; --muted: var(--tm-color-muted); --muted-soft: var(--tm-color-muted);
  --bg: #f3f4f6; --surface: #fff; --surface-soft: #f7f7f8;
  --line: #e6e6e9; --line-strong: #d0d0d5;
  --teal: #625bc9; --teal-deep: #5551b9; --teal-soft: #f0edf9; --blue: #6260c5;
  --shadow-soft: none;
  font-family: var(--tm-font-sans); font-size: var(--tm-text-label); color: var(--text);
}
.reference-shell { background: var(--bg); }
/* Selection is a single, dark treatment across navigation and record pickers.
   Status pills and recording indicators deliberately keep their semantic colors. */
#app :is(.patient-workspace-tabs, .workspace-view-tabs, .email-type-tabs, .ai-modes, .role-switcher, .portal-layout-toggle, .owner-view-controls) button.is-active,
#app :is(.select-card, .template-list-item, .chip-button, .nav-button, .portal-provider-option, .hr-summary-card, .message-thread, .reference-thread).is-active,
#app .schedule-day.is-selected, #app .intake-step.is-current,
#app :is(.performance-presets, .ai-dock) button[aria-pressed='true'] {
  background: var(--tm-selected-bg); border-color: var(--tm-selected-bg); color: var(--tm-selected-fg); box-shadow: none;
}
#app .hr-team-row.is-selected { background: var(--tm-selected-bg); border-color: var(--tm-selected-bg); color: var(--tm-selected-fg); }
#app .hr-team-row.is-selected :is(strong, b) { color: var(--tm-selected-fg); }
#app .hr-team-row.is-selected :is(.subtle, .muted, small, .hr-team-workload, .hr-team-renewal) { color: var(--tm-selected-muted); }
#app .hr-summary-card.is-active > span { color: var(--tm-selected-muted); }
#app .intake-step.is-current strong { color: var(--tm-selected-fg); }
#app .intake-step.is-current small { color: var(--tm-selected-muted); }
#app .patient-role-header nav button[aria-current='page'] { background: var(--tm-selected-bg) !important; color: var(--tm-selected-fg) !important; }
#app .patient-role-header nav button { border-radius: var(--tm-radius-sm) !important; }
#app :is(.select-card, .template-list-item, .reference-thread, .message-thread, .portal-provider-option, .hr-summary-card).is-active :is(strong, .mono) { color: var(--tm-selected-fg); }
#app :is(.select-card, .template-list-item, .reference-thread, .message-thread, .portal-provider-option, .hr-summary-card).is-active :is(.subtle, .muted, small, em, .portal-provider-specialty) { color: var(--tm-selected-muted); }
#app .workspace-view-tabs button.is-active .workspace-tab-count { color: var(--tm-selected-fg); background: var(--tm-selected-icon-bg); }
#app .patient-workspace-tab-icon { color: inherit; background: transparent; }
.reference-shell :is(.select-card, .template-list-item, .reference-thread, .message-thread, .hr-team-row) { border-radius: var(--tm-radius-md); }
.reference-shell :is(.patient-next-action, .list-card, .notice-card, .note-card, .hr-summary-card) { border-radius: var(--tm-radius-lg); }
.reference-shell :is(input:not([type='checkbox']):not([type='radio']), select, textarea) { border-radius: var(--tm-radius-sm); }
.schedule-action-dialog, .record-edit-dialog, .team-access-dialog { border-radius: var(--tm-radius-dialog); }
.reference-shell button, .reference-shell input, .reference-shell select, .reference-shell textarea { font-family: inherit; }
.reference-shell .clinician-sidebar { width: 250px !important; padding: 0 !important; position: relative; transform: none; flex: 0 0 250px; }
.reference-shell .clinician-sidebar-brand { flex: 0 0 74px; min-height: 74px; padding: 0 26px !important; }
.reference-shell .clinician-workspace-brand { gap: 8px; }
.reference-shell .workspace-brand-mark { flex-basis: 34px; width: 34px; height: 34px; background: #173f55; }
.reference-shell .brand-wordmark { font-size: 19px; font-weight: var(--tm-weight-bold); color: #1a1a1a; }
.reference-shell .brand-wordmark span { color: inherit; }
.reference-shell .brand-submark { font-size: var(--tm-text-caption); letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); }
.reference-shell .clinician-sidebar-scroll { padding: 0 16px 12px; }
.reference-shell .clinician-sidebar-group { margin: 0 0 4px; }
.reference-shell .clinician-sidebar-group-toggle { min-height: 48px; padding: 0 8px; color: #252629; font-size: var(--tm-text-label); font-weight: var(--tm-weight-semibold); text-transform: none; letter-spacing: 0; }
.reference-group-label { display: flex; align-items: center; gap: 16px; }
.reference-group-label svg { flex: none; color: #666b73; }
.reference-chevron { font-size: var(--tm-text-label); color: #656970; }
.reference-shell .clinician-sidebar-group.is-open .reference-group-label span { transform: none; }
#app .reference-shell .clinician-sidebar > .clinician-sidebar-brand { padding: 0 26px !important; margin: 0 !important; }
#app .reference-shell .clinician-sidebar > .clinician-sidebar-scroll { padding: 0 16px 12px !important; margin: 0 !important; }
#app .reference-shell .reference-assistant-button { border-radius: 24px !important; }
.reference-shell .clinician-sidebar-group nav { margin: 10px 0 14px 17px; padding-left: 10px; border-left: 1px solid #e7e7e9; gap: 0; }
.reference-shell .clinician-sidebar-group nav { width: calc(100% - 17px); }
.reference-shell .clinician-sidebar-group nav a { min-height: 40px; padding: 8px 15px; color: #1a1a1a; font-size: var(--tm-text-label); font-weight: 400; line-height: 21px; border-radius: var(--tm-radius-sm); }
.reference-shell .clinician-sidebar-group nav a:hover { background: var(--tm-selection-hover); }
.reference-shell .clinician-sidebar-group nav a[aria-current='page'] { background: var(--tm-selected-bg); color: var(--tm-selected-fg); font-weight: var(--tm-weight-semibold); }
.reference-sidebar-footer { flex: none; border-top: 1px solid var(--line); padding: 6px 16px 12px; background: white; }
#app .reference-shell .reference-sidebar-footer { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 0; }
.reference-sidebar-footer button { display: flex; align-items: center; gap: 16px; min-height: 40px; width: 100%; padding: 0 8px; border: 0; color: #292a2d; background: none; text-align: left; font: inherit; cursor: pointer; }
.reference-shell .clinician-role-header { min-height: 74px !important; height: 74px !important; padding: 0 24px 0 16px !important; gap: 16px !important; }
.reference-shell .sidebar-toggle { width: 24px; height: 32px; display: grid; padding: 0; place-items: center; border: 0; background: none; color: #222; }
.reference-shell .clinician-page-heading { min-width: 0; max-width: none; }
.reference-shell .clinician-page-heading h1 { font-size: 18px; font-weight: var(--tm-weight-bold); line-height: 26px; color: #1a1a1a; }
.reference-shell .clinician-page-heading p { display: none; }
.reference-shell .clinician-header-search { flex: 0 1 210px; min-width: 38px; height: 36px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; }
.reference-shell .clinician-header-search-input { font-size: var(--tm-text-caption); }
.reference-shell .header-icon-button { border: 0; color: #666b73; }
.reference-shell .header-icon-button.has-alert { display: none; }
.reference-shell .reference-assistant-button { width: auto; flex: none; display: flex; gap: 5px; padding: 0 15px; height: 36px; border: 1px solid #ececf0; border-radius: 24px; font-size: var(--tm-text-label); color: #6561d2; }
.reference-profile-button { display: flex; align-items: center; gap: 13px; border: 0; background: none; color: #1a1a1a; font-size: 16px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.reference-profile-button .header-avatar { background: #f0f0f0; color: #8b8b8b; border: 0; width: 48px; height: 48px; flex-basis: 48px; font-size: 16px; font-weight: 500; }
.reference-shell .header-primary-action { display: none; }
.reference-shell .clinician-main { padding: 16px !important; background: var(--bg); }
.reference-shell .clinician-content-container { max-width: none; width: 100%; }
.reference-shell.is-sidebar-collapsed .clinician-sidebar { display: none; }
.reference-shell .panel, .reference-shell .patient-profile, .reference-shell .patient-detail-card { border-radius: var(--tm-radius-lg); box-shadow: none; }
.reference-shell .panel :is(h2,h3) { color: #262626; font-weight: var(--tm-weight-bold); }
.reference-shell .button, .reference-shell .secondary-button, .reference-shell .outline-button { min-height: var(--tm-control-lg); border-radius: var(--tm-radius-sm); font-size: var(--tm-text-button); font-weight: var(--tm-weight-semibold); }
.reference-shell .button { background: var(--teal); border-color: var(--teal); color: white; }
.reference-shell .pill { align-self: center; min-height: 24px; height: auto; padding: 3px 9px; font-size: var(--tm-text-caption); line-height: 18px; }
.reference-shell :focus-visible, .reference-dialog :focus-visible, .ai-panel :focus-visible { outline: 2px solid #6863d8; outline-offset: 3px; }
.workspace-view-tabs, .email-type-tabs, .ai-modes { display: flex; flex-wrap: wrap; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: var(--tm-radius-tabs); background: var(--surface-soft); }
.workspace-view-tabs button, .email-type-tabs button, .ai-modes button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: var(--tm-radius-md); background: transparent; color: var(--muted); font: inherit; font-size: var(--tm-text-label); font-weight: var(--tm-weight-semibold); cursor: pointer; }
.workspace-view-tabs button:hover, .email-type-tabs button:hover, .ai-modes button:hover { background: var(--tm-selection-hover); }
.workspace-tab-count { display: inline-grid; place-items: center; min-width: 24px; padding: 2px 6px; border-radius: var(--tm-radius-pill); font-size: var(--tm-text-caption); line-height: 20px; background: #e4eaf0; color: var(--tm-selected-bg); }
.workspace-filter-context, .patient-section-context { margin: 0 0 16px; color: var(--muted); font-size: var(--tm-text-label); line-height: 1.6; }
.workspace-queue-picker { display: none; }
@media (max-width: 600px) {
  .reference-workbench .workspace-view-tabs { display: none; }
  .workspace-queue-picker { display: grid; gap: 6px; margin: 16px 0 12px; color: var(--muted); font-size: var(--tm-text-caption); }
  .workspace-queue-picker select { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: var(--tm-text-label); font-weight: var(--tm-weight-semibold); border: 1px solid var(--tm-selected-bg); background: var(--tm-selected-bg); color: var(--tm-selected-fg); }
}
.ai-dock { position: fixed; right: 20px; bottom: 16px; z-index: 125; display: flex; gap: 0; padding: 4px; border: 1px solid #e3e3e8; border-radius: var(--tm-radius-md); background: white; box-shadow: 0 3px 12px #00000014; }
.ai-dock button { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--tm-radius-sm); background: none; color: #6561ca; font: inherit; font-size: var(--tm-text-label); cursor: pointer; }
.ai-dock button:hover { background: var(--tm-selection-hover); }
.ai-panel { right: 24px; bottom: 68px; width: 420px; max-height: min(620px, calc(100dvh - 155px)); border: 1px solid #e6e6e9; border-radius: var(--tm-radius-lg); box-shadow: 0 4px 18px #0003; }
.demo-privacy-badge { right: auto; left: 12px; bottom: 2px; padding: 2px 6px; box-shadow: none; font-size: var(--tm-text-caption); z-index: 99; }
.reference-page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 8px; }
.reference-page-toolbar h2, .reference-dialog h2 { margin: 0; font-size: 20px; font-weight: var(--tm-weight-bold); line-height: 28px; }
.reference-text-button { border: 0; background: none; color: #5551b9; font: inherit; font-size: var(--tm-text-label); cursor: pointer; padding: 4px 8px; }
.performance-period { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.performance-date-range { display: flex; gap: 4px; align-items: center; padding: 0 8px; min-height: 42px; border: 1px solid #e6e6e9; flex: none; border-radius: var(--tm-radius-sm); }
.performance-date-range input { min-width: 0; width: 120px; height: 38px; border: 0; padding: 0; background: transparent; color: #393b41; font-size: var(--tm-text-caption); }
.performance-date-range button { border: 0; padding: 3px; background: none; cursor: pointer; }
.performance-presets { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.performance-presets button { min-height: 40px; padding: 3px 12px; border: 1px solid #777981; border-radius: var(--tm-radius-sm); background: transparent; color: #62646a; font: inherit; font-size: var(--tm-text-caption); line-height: 16px; text-transform: none; cursor: pointer; }
.performance-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 0 0 24px; }
.performance-filters select { width: 238px; min-height: 42px; padding: 0 8px; color: #666b73; background: transparent; border: 1px solid #e6e6e9; border-radius: var(--tm-radius-sm); font-size: var(--tm-text-label); }
.performance-demo-date { margin-left: auto; color: var(--tm-color-muted); font-size: var(--tm-text-caption); }
.performance-kpis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.performance-kpi { padding:var(--tm-space-5) var(--tm-panel-padding); min-height:127px; border-radius:var(--tm-radius-lg); background:#fff; }
.performance-kpi-header { display: flex; gap: 8px; align-items: center; }
.performance-kpi-label { padding: 0; border: 0; background: none; text-align: left; color: #73757d; font-size: var(--tm-text-label); font-weight: 400; cursor: pointer; }
.metric-help { display: inline-grid; place-items: center; width: 13px; height: 13px; font-size: var(--tm-text-caption); border: 1px solid #999; border-radius: 50%; color: var(--muted); cursor: help; }
.performance-download { margin-left: auto; color: var(--tm-color-muted); border: 0; background: none; padding: 0 10px; font-size: 20px; line-height: 18px; cursor: pointer; }
.performance-kpi-value { display: block; padding: 0; margin-top: 14px; border: 0; background: none; color: #181818; font-size: 28px; font-weight: 600; line-height: 34px; cursor: pointer; }
.performance-kpi p { margin: 0; color: var(--tm-color-muted); font-size: var(--tm-text-caption); line-height: 18px; }
.performance-breakdown-title { margin-top: 32px; }
.performance-breakdown { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 16px 0; }
.performance-breakdown > div { background: white; border-radius: var(--tm-radius-lg); padding: 18px; display: grid; gap: 8px; color: #74767c; }
.performance-breakdown strong { font-size: 24px; font-weight: 600; color: #222; }
.reference-table-wrap { overflow-x: auto; max-width:100%; background: white; border-radius: var(--tm-radius-lg); border: 1px solid var(--line); }
.reference-table-wrap:has(.reference-empty) thead { display:none; }
.reference-table-wrap:has(.reference-empty) table { min-width:0; table-layout:fixed; }
.reference-table-wrap:has(.reference-empty) td { white-space:normal; }
.reference-table-scroll-hint { margin:0 0 8px; font-size:var(--tm-text-caption); color:var(--muted); }
.reference-table { width: 100%; border-collapse: collapse; font-size: var(--tm-text-label); }
.reference-table th, .reference-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-weight: 400; }
.reference-table th { background: #fafafa; color: var(--tm-color-muted); font-size: var(--tm-text-caption); }
.reference-table tbody tr:hover { background: #faf9fd; }
.reference-table-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: var(--tm-text-caption); color: var(--tm-color-muted); }
.reference-link { padding: 0; background: none; border: 0; color: #6661c8; text-align: left; font: inherit; cursor: pointer; }
.reference-empty { padding: 32px !important; text-align: center !important; color: var(--tm-color-muted); }
.reference-modal-backdrop { position: fixed; inset: 0; z-index: 300; background: #16162b55; display: flex; align-items: center; justify-content: center; padding: 24px; }
.reference-dialog { width: min(780px,100%); max-height: calc(100dvh - 48px); overflow: auto; padding: 24px; border: 1px solid #e6e6e9; border-radius: var(--tm-radius-dialog); background: white; box-shadow: 0 12px 32px #0002; }
.reference-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reference-dialog header button { background: none; border: 0; color: var(--tm-color-muted); cursor: pointer; }
.reference-dialog p { color: #72757b; line-height: 1.6; }
.reference-dialog-footer { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid #e6e6e9; padding-top: 16px; margin-top: 20px; }
.reference-checkbox-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.reference-checkbox-grid label { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.reference-checkbox-grid input { accent-color: #6964d9; }
.reference-drilldown-summary { display: flex; align-items: center; justify-content: space-between; margin: 20px 0; }
.reference-drilldown-summary strong { font-size: 28px; }
.ai-reviewed-section { width: 100%; box-sizing: border-box; resize: vertical; padding: 12px; border: 1px solid #dedee5; border-radius: var(--tm-radius-sm); font: inherit; line-height: 1.6; }
.note-source-transcript { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--tm-radius-sm); }
.note-source-transcript p { white-space: pre-wrap; }
.reference-workbench { min-width: 0; padding: 24px; background: #fff; border: 1px solid #e9eaed; border-radius: var(--tm-radius-lg); }
.reference-workbench h2, .reference-messages h2 { margin: 0; font-size: 20px; font-weight: var(--tm-weight-bold); }
.reference-table-tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; align-items: flex-end; }
.reference-table-tools label { display: grid; gap: 6px; min-width: 0; max-width: 100%; color: var(--muted); font-size: var(--tm-text-caption); }
.reference-table-tools .reference-search-field { flex: 1 1 210px; }
.reference-table-tools .reference-text-button { min-height: 40px; }
.reference-table-tools label :is(input, select) { min-width: 0; width: 100%; }
.reference-table-tools input, .reference-table-tools select { padding: 10px 12px; height: 40px; border: 1px solid #e4e5e8; border-radius: var(--tm-radius-sm); background: #fff; font: inherit; color: #333; }
.reference-table-tools input { min-width: 210px; flex: 1; }
.reference-table-tools select { min-width: 160px; }
.reference-table th button { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; font: inherit; cursor: pointer; white-space: nowrap; }
.reference-workbench .reference-table td { padding: 16px 12px; font-size: var(--tm-text-label); }
.reference-workbench .reference-table td .pill { white-space: nowrap; }
.reference-table-footer { flex-wrap: wrap; gap: 12px; }
.reference-readiness article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid #e9eaed; }
.reference-readiness article :is(h2,h3) { margin: 0 0 6px; font-size: var(--tm-text-label); }
.reference-readiness article p { margin: 0; max-width: 720px; color: var(--tm-color-muted); line-height: 1.6; font-size: var(--tm-text-label); }
.reference-readiness article .pill { flex-shrink: 0; }
.reference-settings-links { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; }
.reference-integration-state { padding: 64px 24px; text-align: center; max-width: 680px; margin: auto; }
.reference-integration-state > span { color: #7773b9; }
.reference-integration-state :is(h2,h3) { font-size: 16px; margin: 18px 0 12px; }
.reference-integration-state p { color: var(--tm-color-muted); line-height: 1.7; font-size: var(--tm-text-label); }
.reference-account { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 20px 0; font-size: var(--tm-text-label); }
.reference-account dt { color: var(--muted); }.reference-account dd { margin: 0; }
.reference-demo-notice { padding: 12px; background: #faf8ef; border: 1px solid #eee4bf; border-radius: var(--tm-radius-sm); font-size: var(--tm-text-caption); }
.reference-messages { display: grid; grid-template-columns: 300px minmax(0,1fr); min-height: 600px; background: white; border: 1px solid #e9eaed; border-radius: var(--tm-radius-lg); }
.reference-messages > aside { padding: 24px 16px; border-right: 1px solid #e9eaed; }
.reference-messages .muted { font-size: var(--tm-text-caption); margin-bottom: 20px; }
.reference-thread { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 14px 10px; text-align: left; border-radius: var(--tm-radius-sm); font: inherit; cursor: pointer; }
.reference-thread strong, .reference-thread small { display: block; }.reference-thread strong { font-size: var(--tm-text-label); font-weight: 600; }.reference-thread small { margin-top: 6px; font-size: var(--tm-text-caption); color: var(--tm-color-muted); }
.reference-conversation { padding: 24px; display: flex; flex-direction: column; min-width: 0; }
.reference-conversation > header { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.reference-message-history { flex: 1; max-height: 450px; overflow-y: auto; padding: 24px 0; }
.reference-message-history article { background: #f5f4fb; border-radius: var(--tm-radius-md); padding: 16px; margin-bottom: 12px; }
.reference-message-history article div, .reference-message-history article small { font-size: var(--tm-text-caption); color: #7d7d87; }.reference-message-history time { float: right; }
.reference-message-history p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: var(--tm-text-label); }
.reference-conversation form { display: grid; gap: 10px; font-size: var(--tm-text-label); }.reference-conversation textarea { resize: vertical; min-height: 100px; padding: 12px; border: 1px solid #dedee5; border-radius: var(--tm-radius-sm); font: inherit; }
.reference-conversation footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.reference-conversation footer span { font-size: var(--tm-text-caption); color: var(--tm-color-muted); }
@media (max-width: 760px) { .reference-messages { grid-template-columns: 1fr; }.reference-messages > aside { max-height: 230px; overflow-y: auto; border-right: 0; border-bottom: 1px solid #e9eaed; }.reference-workbench,.reference-conversation { padding: 16px; }.reference-readiness article { align-items: flex-start; flex-direction: column; }.reference-dialog-footer { flex-wrap: wrap; }.reference-table-tools > * { min-width: 0; max-width: 100%; }.reference-account { grid-template-columns: 100px 1fr; } }
@media (max-width: 1100px) { .reference-shell .clinician-header-search { flex: 0 0 36px; padding: 0 0 0 12px; } .reference-shell .clinician-header-search-input, .reference-shell .clinician-search-submit { display: none; } .reference-profile-button > span:nth-child(2) { display: none; } }
@media (max-width: 920px) {
  .reference-shell .clinician-sidebar { position: fixed; top: 0; left: 0; z-index: 220; height: 100dvh; transform: translateX(-100%); transition: transform 160ms ease; }
  .reference-shell.is-mobile-menu-open .clinician-sidebar { display: flex !important; transform: translateX(0); }
  .reference-shell .clinician-role-header { min-height: 64px !important; height: 64px !important; padding: 0 14px !important; gap: 12px !important; }
  .reference-shell .clinician-sidebar-scroll { display: block !important; }
  #app .reference-shell .clinician-mobile-bottom-nav { display: none !important; }
  #app .reference-shell .clinician-sidebar > .clinician-sidebar-brand { padding: 0 16px !important; gap: 8px; }
  #app .reference-shell .clinician-sidebar-brand .brand-wordmark { font-size: 16px; color: #1a1a1a; }
  #app .reference-shell .clinician-mobile-menu-close { width: 28px; height: 28px; min-width: 28px; margin-left: auto; }
  #app:has(.reference-shell.is-mobile-menu-open) .ai-dock { visibility: hidden; }
  .reference-shell .clinician-main { padding-bottom: 80px !important; }
  .reference-shell .reference-group-label > span, .reference-shell .clinician-sidebar-group nav a > span { display: inline !important; }
  .reference-shell .reference-group-label { display: flex !important; }
  .reference-shell .reference-chevron, .reference-shell .workspace-brand-copy { display: initial !important; }
  .reference-shell .clinician-sidebar-group-toggle { min-height: 48px !important; }
}
@media (max-width: 600px) {
  .performance-period { flex-direction: column; gap: 12px; }
  .performance-presets { gap: 8px; }
  .performance-filters { gap: 8px; }
  .performance-filters label { flex: 1; min-width: 130px; }
  .performance-filters select { width: 100%; }
  .performance-demo-date { margin-left: 0; }
  .performance-kpis, .performance-breakdown { gap: 8px; }
  .performance-kpi { padding: 16px 12px; }
  .performance-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .performance-kpi-header { flex-wrap: wrap; gap: 6px; }
  .performance-kpi-label { font-size: var(--tm-text-caption); }
  .reference-checkbox-grid { grid-template-columns: 1fr; }
  #app .reference-shell .reference-assistant-button { display:flex !important; width:40px; height:40px; padding:0; justify-content:center; }
  .reference-shell .reference-assistant-button span { display:none; }
  .reference-profile-button .header-avatar { display: grid !important; width: 34px; height: 34px; flex-basis: 34px; font-size: var(--tm-text-caption); }
  .reference-shell .clinician-page-heading h1 { font-size: 16px; }
  .reference-shell .clinician-main { padding: 12px 12px 84px !important; }
  .ai-panel { width: calc(100% - 24px); right: 12px; bottom: 66px; }
  .ai-dock { display:none; }
}
