:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --white: #fff;
  --ink: #172925;
  --muted: #51625c;
  --line: #d8e3de;
  --teal: #124c43;
  --elo-green: #008938;
  --elo-green-dark: #007831;
  --sage: #e7f1eb;
  --active: #e5f4e9;
  --nav-green: #154b37;
  --nav-green-hover: #103d2d;
  --surface-shadow: 0 1px 3px #173b3010;
  --radius: 10px;
  --sidebar-width: 94px;
  font: 14px/1.5 "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--elo-green); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 3; background: var(--white); padding: 8px; transform: translateY(-150%); }
.skip:focus { transform: none; }
.icon { display: inline-block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 18px 6px 12px; overflow-y: auto; color: var(--ink); background: #f9fcf9; border-right: 1px solid var(--line); z-index: 1; }
.brand { display: block; align-self: center; margin-bottom: 22px; border-radius: 50%; }
.brand img { display: block; width: 44px; height: auto; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 59px; padding: 3px; border-radius: 9px; color: var(--muted); font-size: 11px; font-weight: 620; line-height: 1.2; text-align: center; text-decoration: none; }
.sidebar nav [data-icon] { display: grid; place-items: center; width: 40px; height: 30px; border-radius: 9px; color: #426353; }
.sidebar nav .icon { width: 21px; height: 21px; stroke-width: 1.65; }
.sidebar nav a:hover { background: #edf4ee; color: var(--nav-green); }
.sidebar nav a[aria-current="page"] { color: var(--nav-green); font-weight: 740; }
.sidebar nav a[aria-current="page"] [data-icon] { background: #d9efdf; color: var(--nav-green); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); display: grid; justify-items: center; gap: 5px; padding: 11px 2px 1px; text-align: center; font-size: 11px; }
.sidebar-footer small { display: block; color: var(--muted); font-size: 10px; }
.profile-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--sage); color: var(--nav-green); }
.profile-icon .icon { width: 16px; height: 16px; }
.workspace { margin-left: var(--sidebar-width); }
.topbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 26px; font-size: 13px; border-bottom: 1px solid var(--line); color: var(--muted); }
.topbar > div:first-child > span[aria-hidden] { margin: 0 5px; color: #698079; }
.topbar strong { color: var(--nav-green); }
.header-date { display: flex; align-items: center; gap: 6px; font-size: 12px; text-align: right; }
.header-date .icon { width: 15px; height: 15px; color: var(--nav-green); }
main { padding: 22px 26px; max-width: 1440px; margin: 0 auto; }
h1, h2, h3, p { margin: 0; }
h1, h2 { color: var(--teal); letter-spacing: -.03em; line-height: 1.13; }
h1 { font-size: clamp(24px, 2.2vw, 30px); }
h2 { font-size: 19px; }
h3 { font-size: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-heading p, .muted { color: var(--muted); }
.page-heading p { margin-top: 5px; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--teal); background: var(--white); font-weight: 690; text-decoration: none; }
.button:hover { background: var(--sage); }
.button.quiet { border-color: transparent; background: transparent; color: var(--muted); font-size: 13px; }
.button.quiet:hover { background: var(--sage); color: var(--teal); }
.button.primary { background: var(--nav-green); color: white; border-color: var(--nav-green); }
.button.primary:hover { background: var(--nav-green-hover); border-color: var(--nav-green-hover); }
.button .icon { width: 17px; height: 17px; }
.button.danger { color: #8c302c; }
.text-button { color: var(--teal); font-weight: 680; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--elo-green-dark); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.metric { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--surface-shadow); }
.metric dt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: #384c44; }
.metric .icon { box-sizing: content-box; width: 17px; height: 17px; padding: 6px; border-radius: 7px; background: var(--status-bg); color: var(--status-ink); }
.metric dd { margin: 0; font-size: 32px; line-height: 1; font-weight: 730; letter-spacing: -.05em; color: var(--teal); }
.finance-heading input { width: auto; }
.finance-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.finance-metrics .metric dd { font-size: clamp(22px, 3vw, 32px); font-variant-numeric: tabular-nums; }
.finance-metrics .metric small, .finance-period, .finance-demo { color: var(--muted); font-size: 12px; }
.finance-demo { margin-top: 10px; }
.finance-authorization { display: inline-block; padding: 3px 7px; border-radius: 5px; background: var(--sage); color: var(--nav-green); white-space: nowrap; }
.finance-patient-profile th { white-space: normal; }
.finance-guide-procedure + .finance-guide-procedure { margin-top: 6px; }
.finance-request-filters > .field { flex: 0 1 220px; }
.finance-request-heading { margin-top: 12px; }
.finance-request-heading a { font-weight: 650; }
.finance-request-item { display: grid; grid-template-columns: minmax(155px, 2fr) minmax(64px, .7fr) minmax(120px, 1fr) minmax(95px, .85fr) auto; gap: 8px; align-items: end; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.finance-request-item .icon-button { min-height: 38px; }
.finance-request-subtotal { font-size: 13px; color: var(--muted); }
.finance-request-subtotal output { display: block; font-weight: 700; color: var(--teal); padding: 9px 0; overflow-wrap: anywhere; }
.finance-request-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--active); color: var(--nav-green); font-weight: 700; }
.finance-request-timeline { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.finance-request-timeline li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.finance-catalog-form { display: grid; gap: 12px; }
.checks.finance-module-checks { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; max-height: none; margin-bottom: 16px; }
.admin-module-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.admin-module-list li { padding: 2px 7px; border-radius: 5px; background: var(--sage); color: var(--nav-green); font-size: 12px; }
.admin-access tbody th { background: none; color: var(--ink); white-space: normal; border-bottom: 1px solid #e6ede9; }
.admin-access tbody tr:last-child th { border-bottom: 0; }
.sidebar #finance-menu:not(:first-of-type) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.finance-request-item [data-finance-procedure-code] { overflow-wrap: anywhere; }
.finance-billing-tabs a span { display: inline-block; min-width: 21px; margin-left: 3px; padding: 0 5px; border-radius: 5px; background: var(--sage); color: var(--nav-green); text-align: center; font-size: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--surface-shadow); min-width: 0; padding: 14px; }
.panel + .panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { font-weight: 700; background: var(--sage); color: #29433b; padding: 8px 10px; white-space: nowrap; }
th:first-child { border-radius: 6px 0 0 6px; }
th:last-child { border-radius: 0 6px 6px 0; }
td { padding: 10px; border-bottom: 1px solid #e6ede9; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.cell-main { display: block; font-weight: 650; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.slot { white-space: nowrap; font-variant-numeric: tabular-nums; }
.scheduled { --status-bg: #e6effa; --status-ink: #2c507d; --status-accent: #648cbb; }
.arrived { --status-bg: #dcefe1; --status-ink: #1e5637; --status-accent: #439763; }
.absent { --status-bg: #fbefd6; --status-ink: #6b4d13; --status-accent: #b78a38; }
.cancelled { --status-bg: #f8e8e9; --status-ink: #833c35; --status-accent: #c97b7d; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; background: var(--status-bg); color: var(--status-ink); font-size: 11px; font-weight: 670; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.row-action { color: var(--teal); background: transparent; border: 1px solid var(--line); padding: 5px 8px; border-radius: 6px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.row-action:hover { background: var(--sage); }
a.row-action { display: inline-block; text-decoration: none; }
.empty { color: var(--muted); padding: 22px 10px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
.filters > .field { flex: 1 1 155px; }
.filters > .agenda-date-field { flex: 0 1 auto; padding-right: 12px; border-right: 1px solid var(--line); }
.filters select { font-size: 13px; }
.date-control { display: flex; align-items: center; gap: 5px; }
.date-control input { width: auto; min-height: 38px; }
.agenda-board { display: flex; align-items: stretch; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; }
.room-column { flex: 1 0 210px; min-width: 0; min-height: 280px; border: 1px solid #dce8df; border-radius: var(--radius); background: #eaf1eb; }
.room-column header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; min-height: 43px; padding: 8px 10px; background: #dce9df; border-radius: 9px 9px 0 0; overflow-wrap: anywhere; }
.room-column h3 { display: flex; align-items: center; gap: 5px; color: var(--teal); }
.room-column h3 .icon { width: 16px; height: 16px; color: var(--elo-green-dark); }
.room-column header span, .agenda-specialty, .room-empty { color: var(--muted); font-size: 12px; }
.room-column header span { padding: 2px 7px; border-radius: 999px; background: #f6faf7; color: #345347; font-size: 11px; }
.room-slots { display: grid; align-content: start; gap: 8px; padding: 8px; }
.room-empty { display: grid; justify-items: center; gap: 8px; padding: 30px 6px; text-align: center; }
.room-empty .icon { width: 24px; height: 24px; color: #638071; }
.agenda-card { display: grid; justify-items: start; gap: 2px; min-width: 0; padding: 8px 9px; text-align: left; border: 1px solid #e0e9e2; border-radius: 8px; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.agenda-card:hover { border-color: var(--status-accent); box-shadow: 0 2px 8px #17292512; }
.agenda-card strong { font-size: 14px; }
.agenda-card-top { display: flex; width: 100%; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 2px; }
.agenda-card .slot { padding: 2px 6px; border-radius: 5px; background: var(--status-bg); color: var(--status-ink); font-size: 12px; font-weight: 720; }
.therapist-picker select { min-height: 36px; width: 176px; font-size: 13px; font-weight: 650; color: var(--nav-green); }
.therapist-dashboard { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.therapist .metrics { margin-bottom: 14px; }
.therapist-dashboard .panel + .panel { margin-top: 14px; }
.therapist-next { background: #e8f3ec; border-color: #d4e7d9; }
.therapist-next h2 { display: flex; align-items: center; gap: 7px; }
.therapist-next h2 .icon { width: 17px; height: 17px; }
.therapist-appointments, .therapist-pending { margin: 0; padding: 0; list-style: none; }
.therapist-appointments li + li, .therapist-pending li + li { border-top: 1px solid var(--line); }
.therapist-appointment { display: grid; width: 100%; grid-template-columns: 68px minmax(0, 1fr) auto 17px; align-items: center; gap: 12px; padding: 11px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; }
.therapist-appointment:hover { background: var(--sage); }
.therapist-appointment > .icon { width: 16px; height: 16px; color: var(--muted); }
.therapist-slot, .therapist-patient { display: grid; gap: 2px; min-width: 0; }
.therapist-slot strong { color: var(--nav-green); font-size: 16px; }
.therapist-slot small, .therapist-patient small { color: var(--muted); font-size: 12px; }
.therapist-patient strong { overflow-wrap: anywhere; }
.therapist-patient small { display: flex; align-items: center; gap: 4px; }
.therapist-patient .icon { width: 13px; height: 13px; }
.therapist-appointment .badge { justify-self: start; }
.therapist-appointments.compact .therapist-appointment { grid-template-columns: 57px minmax(0, 1fr) auto; gap: 8px; padding: 8px 4px; }
.therapist-pending li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 8px 0; }
.therapist-pending { margin-bottom: 9px; }
.therapist-dashboard .empty { padding: 9px 0 12px; }
.therapist-agenda-controls { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.therapist-view-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.therapist-view-switch button { min-height: 30px; padding: 3px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-weight: 650; }
.therapist-view-switch button[aria-pressed="true"] { background: var(--nav-green); color: var(--white); }
.week-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--surface-shadow); }
.week-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 13px 14px; }
.week-legend { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.therapist-week { --week-hour-height: 72px; --week-header-height: 46px; display: grid; grid-template-columns: 64px repeat(7, minmax(132px, 1fr)); overflow-x: auto; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.week-axis { position: sticky; left: 0; z-index: 1; background: #f7faf7; }
.week-heading { display: flex; align-items: center; justify-content: center; height: var(--week-header-height); border-bottom: 1px solid var(--line); background: #f7faf7; color: var(--muted); font-size: 12px; }
.therapist-day { min-width: 0; border-left: 1px solid var(--line); }
.therapist-day.weekend { background: #f9fbf9; }
.therapist-day.current-day, .current-day .week-heading { background: #edf7ef; }
.therapist-day-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 8px); height: calc(100% - 8px); padding: 0 4px; border: 0; border-radius: 5px; background: transparent; color: var(--nav-green); text-transform: capitalize; }
.therapist-day-link:hover { background: var(--sage); }
.current-day .therapist-day-link strong { padding: 2px 7px; border-radius: 5px; background: var(--nav-green); color: var(--white); }
.week-hours span { display: block; height: var(--week-hour-height); padding-top: 4px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.week-track { position: relative; height: calc(var(--hour-count) * var(--week-hour-height)); background-image: linear-gradient(to bottom, transparent calc(50% - 1px), #e8eee9 calc(50% - 1px) 50%, transparent 50% calc(100% - 1px), var(--line) calc(100% - 1px)); background-size: 100% var(--week-hour-height); }
.week-appointment { position: absolute; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 0; top: calc(var(--event-start) + 1px); height: max(6px, calc(var(--event-length) - 2px)); left: calc(var(--event-lane) * 100% / var(--event-lanes) + 3px); width: calc(100% / var(--event-lanes) - 6px); padding: 1px 5px; border-left: 3px solid var(--status-accent); border-radius: 4px; background: var(--status-bg); color: var(--status-ink); line-height: 1.2; overflow: hidden; }
.week-appointment strong, .week-appointment small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-appointment strong { font-size: 12px; }
.week-appointment small { font-size: 10px; }
.week-appointment.short small { display: none; }
.week-appointment:hover { background: var(--status-bg); box-shadow: inset 0 0 0 1px var(--status-accent); }
.week-appointment:focus-visible { outline-offset: -2px; }
.week-empty { padding: 10px 14px; color: var(--muted); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .agenda-card { transition: border-color 150ms ease, box-shadow 150ms ease; }
}
.icon-button { display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--teal); }
.icon-button:hover { background: var(--sage); }
.icon-button .icon { width: 17px; height: 17px; }
dialog { width: min(535px, calc(100% - 28px)); max-height: min(90vh, 850px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--white); box-shadow: 0 24px 80px #0e302938; }
dialog.wide { width: min(680px, calc(100% - 28px)); }
dialog::backdrop { background: #122f2a62; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 20px; }
.dialog-body { padding: 15px 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 10px; }
.field { display: grid; align-content: start; gap: 5px; font-weight: 640; font-size: 13px; min-width: 0; }
.field.full, .form-grid fieldset, .form-grid details { grid-column: 1 / -1; }
.field small { font-weight: 450; color: var(--muted); }
input, select, textarea { background: var(--white); color: var(--ink); width: 100%; min-width: 0; min-height: 38px; border-radius: 7px; border: 1px solid #bdcdc5; padding: 6px 9px; font-size: 14px; font-weight: 480; }
select:disabled, input:disabled { color: #5c6d65; background: #f0f4f1; opacity: 1; }
input[type="file"] { font-size: 13px; }
textarea { min-height: 74px; resize: vertical; }
.checks { display: grid; gap: 8px; max-height: 165px; overflow: auto; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checks input { width: 16px; height: 16px; min-height: 0; accent-color: var(--elo-green); }
.attachments { margin: 2px 0 0; padding-left: 16px; overflow-wrap: anywhere; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; min-width: 0; }
legend { padding: 0 5px; font-weight: 670; color: var(--teal); }
details { border-top: 1px solid var(--line); padding-top: 9px; }
details summary { cursor: pointer; font-weight: 670; color: var(--teal); }
details[open] summary { margin-bottom: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--line); }
.dialog-error { color: #8c302c; font-weight: 620; margin: 0 0 10px; }
.record-info { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 0; }
.record-info dt { color: var(--muted); font-size: 13px; }
.record-info dd { font-weight: 630; margin: 1px 0 0; }
.finance-coverage { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-wrap: anywhere; }
.record-history { padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--line); }
.record-history ul { margin: 7px 0 0; padding-left: 20px; }
.patient-filters { max-width: 580px; }
.coordination-metrics a { text-decoration: none; }
.coordination-metrics a:hover { text-decoration: underline; }
.coordination-filters { max-width: 890px; }
.coordination-filters > .field:first-child { flex: 2 1 240px; }
.coordination-statuses { display: flex; flex-wrap: wrap; gap: 4px; }
.coordination-pti-timing { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: center; }
.coordination-pti-timing .record-info { margin: 0; }
.coordination-pti-deadline { display: flex; align-items: start; gap: 10px; padding: 12px; border-radius: 8px; background: var(--active); color: var(--nav-green); }
.coordination-pti-deadline .icon { width: 18px; height: 18px; }
.coordination-pti-deadline strong { display: block; font-size: 18px; line-height: 1.4; }
.coordination-pti-deadline span, .coordination-pti-deadline p { font-size: 12px; }
.coordination-pti-goals { list-style: none; margin: 8px 0 0; padding: 0; }
.coordination-pti-goal { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(125px, 1fr) minmax(104px, auto); align-items: center; gap: 8px 16px; padding: 12px 10px; border-top: 1px solid var(--line); }
.coordination-pti-skill small { display: block; margin-top: 2px; }
.coordination-pti-progress-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.coordination-pti-progress-label strong, .coordination-pti-remaining strong { color: var(--nav-green); }
.coordination-pti-remaining { display: grid; justify-items: end; text-align: right; font-size: 12px; color: var(--muted); }
.coordination-pti-remaining strong { font-size: 18px; line-height: 1.2; }
.coordination-pti-remaining.reached { color: var(--nav-green); }
.support-back { display: inline-flex; align-items: center; gap: 3px; margin-bottom: 14px; }
.support-back .icon { width: 16px; height: 16px; }
.support-thread { max-width: 840px; }
.support-messages { display: grid; gap: 12px; padding: 0; margin: 14px 0 0; list-style: none; }
.support-message { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf8; }
.support-message.staff { background: var(--active); border-color: #d1e5d6; }
.support-message > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.support-message > div span { font-size: 12px; }
.support-message p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-actions { justify-content: flex-start; margin-top: 14px; }
.chat-layout { display: grid; grid-template-columns: minmax(235px, 30%) minmax(0, 1fr); min-height: 490px; height: min(620px, 72vh); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--surface-shadow); overflow: hidden; }
.chat-inbox, .chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-inbox { border-right: 1px solid var(--line); }
.chat-inbox-heading { display: grid; gap: 12px; padding: 16px; }
.chat-inbox-heading h2, .chat-thread-heading h2 { font-size: 16px; }
.chat-inbox-heading input { background: #f8faf8; }
.chat-contacts { display: grid; align-content: start; gap: 3px; padding: 0 8px 8px; overflow: auto; }
.chat-contact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 61px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.chat-contact:hover { background: var(--bg); }
.chat-contact[aria-pressed="true"] { background: var(--active); }
.chat-contact:focus-visible { outline-offset: -3px; }
.chat-avatar { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border-radius: 50%; background: #dcebe0; color: var(--nav-green); font-size: 12px; font-weight: 750; }
.chat-contact-copy { display: grid; gap: 2px; min-width: 0; }
.chat-contact-copy > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact-copy small, .chat-contact time { color: var(--muted); font-size: 11px; }
.chat-contact time { align-self: start; padding-top: 4px; }
.chat-thread-heading { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-thread-heading p { margin-top: 2px; font-size: 12px; }
.chat-history { display: flex; flex: 1; flex-direction: column; align-items: start; gap: 10px; min-height: 0; overflow: auto; padding: 16px; background: #f4f8f4; }
.chat-history:focus-visible { outline-offset: -3px; }
.chat-day { align-self: center; color: var(--muted); font-size: 11px; }
.chat-message { display: grid; gap: 3px; max-width: min(76%, 500px); padding: 9px 11px 6px; border: 1px solid var(--line); border-radius: 3px 10px 10px; background: var(--white); }
.chat-message.outgoing { align-self: end; border-color: #cde5d3; border-radius: 10px 3px 10px 10px; background: #e0f1e4; }
.chat-message p { overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message time { justify-self: end; color: var(--muted); font-size: 11px; }
.chat-empty { margin: auto; padding: 20px; text-align: center; }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-composer textarea { min-height: 38px; max-height: 110px; }
.patient-filters .field:first-child { flex: 2 1 240px; }
.patient-profile > .text-button { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.patient-profile > .text-button .icon { width: 16px; height: 16px; }
.patient-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin: 12px 0 16px; }
.patient-banner > div { flex: 1 1 150px; overflow-wrap: anywhere; }
.patient-avatar { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--active); color: var(--nav-green); font-size: 16px; font-weight: 720; }
.patient-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.patient-tabs a { padding: 9px 13px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 650; text-decoration: none; }
.patient-tabs a:hover { background: var(--sage); }
.patient-tabs a[aria-current="page"] { border-color: var(--elo-green); color: var(--nav-green); }
.patient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.patient-grid .panel { margin: 0; }
.patient-info { margin-top: 10px; overflow-wrap: anywhere; }
.patient-info dd, .pti-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.clinical-evolutions { margin-top: 14px; }
.clinical-note + .clinical-note { margin-top: 12px; }
.clinical-note { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.clinical-note h3 { color: var(--nav-green); }
.clinical-note-body h4 { margin: 0 0 3px; font-size: 13px; }
.clinical-note-body p { white-space: pre-wrap; overflow-wrap: anywhere; }
.clinical-note-body p + h4 { margin-top: 9px; }
.clinical-note-form textarea { min-height: 105px; }
.evolution-pti-plan + .evolution-pti-plan { margin-top: 12px; }
.evolution-pti-choice { display: flex; align-items: start; gap: 8px; width: 100%; cursor: pointer; }
.evolution-pti-choice input { flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; accent-color: var(--elo-green); }
.evolution-pti small { display: block; color: var(--muted); }
.clinical-evolutions .row-action { white-space: normal; }
.patient-team, .pti-goals-list { display: grid; gap: 7px; padding: 0; margin: 10px 0 0; list-style: none; }
.patient-team li, .pti-goals-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; padding: 7px 9px; background: #f4f8f5; border-radius: 6px; overflow-wrap: anywhere; }
.patient-team span, .pti-goals-list span { color: var(--muted); font-size: 12px; }
.patient-actions { flex-wrap: wrap; }
.pti-plan { padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.pti-plan h4 { margin: 12px 0 0; }
.pti-text { margin-top: 9px; }
.report-body textarea { min-height: 220px; }
.report-body p { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.validity-hint { margin-top: 12px; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notifications { position: relative; padding: 0; border: 0; }
.notifications summary { position: relative; margin: 0; list-style: none; }
.notifications summary::-webkit-details-marker { display: none; }
.notifications[open] summary { margin: 0; }
.notification-count { position: absolute; top: -4px; right: -4px; min-width: 17px; padding: 0 4px; border-radius: 12px; background: var(--nav-green); color: #fff; font-size: 10px; line-height: 17px; text-align: center; }
.notifications-list { position: absolute; z-index: 2; top: calc(100% + 8px); right: 0; width: min(345px, calc(100vw - 32px)); max-height: min(65vh, 420px); overflow: auto; box-shadow: 0 8px 24px #173b301c; }
.notifications-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.notifications-heading h2 { font-size: 16px; }
.notifications-heading .button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.notifications-list section + section { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.notifications-list h3 { margin-bottom: 5px; font-size: 13px; }
.notifications-list ul { list-style: none; margin: 0; padding: 0; }
.notifications-list li + li { border-top: 1px solid var(--line); }
.notifications-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 8px 6px; border-radius: 6px; text-decoration: none; }
.notifications-list a:hover { background: var(--sage); }
.notifications-list a > strong, .notifications-list a > .muted { overflow-wrap: anywhere; }
.notifications-list a .muted { grid-column: 1; font-size: 12px; }
.notifications-list .badge { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.notification-message { padding: 7px 6px; overflow-wrap: anywhere; }
.notification-message small { display: block; }
.notification-message p { margin: 4px 0; white-space: pre-wrap; }
.notifications-list .notification-record { display: block; margin: -2px -3px 4px; padding: 5px 3px; }
.notification-link-label { display: inline-flex; align-items: center; gap: 3px; color: var(--nav-green); font-size: 12px; font-weight: 700; }
.notification-link-label .icon { width: 14px; height: 14px; }
.notification-guide-balances { display: grid; gap: 4px; margin: 6px 0; }
.notification-guide-balances > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.notifications-list .notification-center-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--nav-green); font-weight: 700; }
.notification-center { max-width: 1050px; }
.notification-filters .field:first-child { flex: 2 1 250px; }
.notification-filters .field:not(:first-child) { flex: 0 1 185px; }
.notification-feed ul, .notification-expiries ul { list-style: none; padding: 0; margin: 0; }
.notification-feed li + li, .notification-expiries li + li { border-top: 1px solid var(--line); }
.notification-feed .notification-message { padding: 12px; }
.notification-feed .notification-record { display: block; text-decoration: none; border-radius: 6px; }
.notification-feed .notification-record:hover, .notification-expiries a:hover { background: var(--sage); }
#dashboard-guide-balances .notification-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; }
#dashboard-guide-balances .notification-record > :not(.notification-link-label) { grid-column: 1; }
#dashboard-guide-balances .notification-link-label { grid-column: 2; grid-row: 1 / 4; align-self: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); white-space: nowrap; }
.notification-expiries a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 8px; border-radius: 6px; text-decoration: none; }
.notification-expiries .badge { margin-left: auto; }
#dashboard-guide-expiries .notification-expiries a > strong { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.link-choice { padding: 7px 0; border-bottom: 1px solid var(--line); }
.link-choice:last-child { border-bottom: 0; }
.checks .link-report { margin: 6px 0 0 24px; font-size: 12px; color: var(--nav-green); }
.pti-goals-list p { flex-basis: 100%; color: var(--muted); }
.pti-progress { display: grid; grid-template-columns: minmax(80px, 260px) 1fr; align-items: center; gap: 4px 12px; width: 100%; }
.pti-progress progress, .coordination-pti-progress progress { width: 100%; height: 8px; border: 0; border-radius: 20px; background: #dfe9e1; accent-color: var(--elo-green); }
.pti-progress progress::-webkit-progress-bar, .coordination-pti-progress progress::-webkit-progress-bar { border-radius: 20px; background: #dfe9e1; }
.pti-progress progress::-webkit-progress-value, .coordination-pti-progress progress::-webkit-progress-value { border-radius: 20px; background: var(--elo-green); }
.pti-progress-text strong { color: var(--nav-green); }
.pti-actions { justify-content: flex-start; margin-top: 11px; }
.pti-status { padding: 3px 8px; border-radius: 6px; background: #edf1f0; color: #465950; font-size: 12px; font-weight: 650; }
.pti-status.active { background: #dcefe1; color: #1e5637; }
.pti-status.completed { background: #e6effa; color: #2c507d; }
dialog[open]:has(> form:is([data-form="pti"], [data-form="finance-request"], [data-form="finance-guide"])) { display: flex; flex-direction: column; width: min(820px, calc(100% - 28px)); max-height: min(92dvh, 850px); overflow: hidden; }
:is([data-form="pti"], [data-form="finance-request"], [data-form="finance-guide"]) { display: flex; flex-direction: column; min-height: 0; }
:is([data-form="pti"], [data-form="finance-request"], [data-form="finance-guide"]) .dialog-body { overflow-y: auto; }
:is([data-form="pti"], [data-form="finance-request"], [data-form="finance-guide"]) .dialog-actions { flex-shrink: 0; }
[data-form="pti"] [data-add-goal] { margin-right: auto; }
.pti-plan-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(124px, .55fr); }
.pti-plan-fields > .field.full { grid-column: auto; }
.pti-plan-dates { margin-top: 12px; background: var(--bg); }
.pti-plan-dates .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pti-goal-fields { display: grid; gap: 9px; margin: 8px 0 10px; }
.pti-goal-grid { grid-template-columns: minmax(0, 1fr) minmax(134px, .35fr); }
.pti-context { margin-top: 14px; }
#staff-arrivals h3 { margin-bottom: 7px; }
#staff-arrivals .empty { padding: 0; font-size: 13px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 2; max-width: min(410px, calc(100% - 36px)); padding: 12px 16px; background: var(--teal); color: white; border-radius: 8px; box-shadow: 0 8px 24px #0e302930; pointer-events: none; }
.toast:empty { display: none; }
@media (max-width: 950px) {
  .topbar, main { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 720px) {
  .finance-request-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .finance-request-item .field:first-child { grid-column: 1 / -1; }
  .finance-request-subtotal { grid-column: 1 / 3; }
  .finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pti-plan-fields, .pti-plan-dates .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coordination-pti-timing { grid-template-columns: 1fr; }
  .coordination-pti-goal { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .coordination-pti-skill { grid-column: 1 / -1; }
  .patient-grid { grid-template-columns: 1fr; }
  .therapist-dashboard { grid-template-columns: 1fr; }
  .therapist .header-date { display: none; }
  .therapist-picker select { width: min(39vw, 176px); }
  .chat-layout { height: auto; grid-template-columns: 1fr; }
  .chat-inbox { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-contacts { grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); }
  .chat-thread { min-height: 420px; }
  .chat-history { flex-basis: 290px; }
  .sidebar { position: static; width: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .brand { align-self: flex-start; margin: 0 4px 4px; }
  .brand img { width: 30px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .sidebar nav a { flex: 1 0 auto; min-height: 44px; padding-inline: 2px; }
  .sidebar nav [data-icon] { width: 34px; height: 24px; }
  .sidebar nav .icon { width: 18px; height: 18px; }
  .sidebar-footer { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 44px; padding: 8px 16px; font-size: 12px; }
  main { padding: 21px 14px; }
  .page-heading { flex-wrap: wrap; margin-bottom: 17px; }
  .metrics { gap: 6px; }
  .metric { padding: 7px; }
  .metric dt { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 12px; }
  .metric dd { font-size: 27px; }
  .panel { padding: 12px; }
  .panel-heading h2 { font-size: 17px; }
  .button, .icon-button, .date-control input, input, select { min-height: 42px; }
  .agenda-board { gap: 9px; }
  .room-column { flex-basis: min(78vw, 245px); }
  .filters > .agenda-date-field { flex-basis: 100%; padding-right: 0; border-right: 0; }
  .date-control { flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .admin-access td, .admin-access th { padding-inline: 6px; }
  .admin-access .row-action { white-space: normal; }
  .finance-coverage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .pti-plan-dates .form-grid { grid-template-columns: 1fr; }
  .therapist-appointment { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 7px; }
  .therapist-appointment > .icon { display: none; }
  .therapist-week { grid-template-columns: 50px repeat(7, minmax(132px, 1fr)); }
  .dialog-heading, .dialog-body, .dialog-actions { padding-left: 15px; padding-right: 15px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.occurrence-actions { margin-top: 9px; justify-content: flex-start; }
.dialog-intro { margin-bottom: 13px; }
.form-grid > .full { grid-column: 1 / -1; }

body.elo-loading { visibility: hidden; }
.elo-login { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.elo-login .panel { width: min(100%, 420px); padding: 32px; }
.elo-login h1 { margin: 14px 0 24px; }
.elo-login form { display: grid; gap: 14px; }
.elo-logout { margin-left: 8px; }
