/* Brighter palette from goodcase-style-guide; component layout stays in styles.css. */
:root{--brand-ink:#12365a;--cta:#ffd43b;--cta-hover:#f3c623;--border:#e3e7e9;--muted:#607184;--green:#126447;color:var(--brand-ink)}
button.primary,.topbar .top-right .primary{background:var(--cta);border-color:var(--cta);color:var(--brand-ink);font-weight:600}
button.primary:hover,.topbar .top-right .primary:hover{background:var(--cta-hover);border-color:var(--cta-hover)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:var(--brand-ink)}
:is(.page-head h1,.workspace-heading h1,.case-heading h1,.task-row-body strong,.metric-value,.section-title h2,.record-heading h1,.record-heading h2,.topbar,.modal-head h2){color:var(--brand-ink)}
.queue-tabs button.active{color:var(--brand-ink);border-color:var(--cta)}
.nav-icon.cases,.topbar .nav-icon.cases{background:#dcefff;color:#23547d}
.nav-icon.overview,.topbar .nav-icon.overview{background:#fff1bd;color:#77560c}
.sidebar .nav-icon.tasks,.nav-icon.tasks,.topbar .nav-icon.tasks{background:#daf5e9;color:#126447}
.sidebar .nav-link.active .nav-icon.overview{background:#607184;color:#fff}
.sidebar .nav-link.active .nav-icon.cases{background:#23547d;color:#fff}
.sidebar .nav-link.active .nav-icon.tasks{background:#126447;color:#fff}
.pill.neutral,.type.medical,.case-claim-label.medical{background:#eee4ff;color:#613498;border-color:#d9c7f1}
.pill.working{background:#dcefff;color:#23547d}
.pill.warn{background:#fff1bd;color:#77560c}
.pill.good,.type.dental,.case-claim-label.dental,.task-due-lockup.is-complete .due-label{background:#daf5e9;color:#126447;border-color:#bde3d3}
.pill.bad,.due-label.is-overdue{background:#ffe2e5;color:#a12e40}
.patient-color-0{background:#dcefff;color:#23547d;border-color:#bcdcf2}
.patient-color-1{background:#ffe6ce;color:#8b4314;border-color:#f1d2b3}
.patient-color-2{background:#ffe4ee;color:#863c60;border-color:#f1c8d9}
.patient-color-3{background:#daf5e9;color:#126447;border-color:#bde3d3}
.patient-color-4{background:#eee4ff;color:#613498;border-color:#d9c7f1}
.patient-color-5{background:#dff3f4;color:#236268;border-color:#bcdddf}
.owner .avatar{background:#fff1bd;color:#77560c}
.owner .avatar.claudia{background:#ffe4ee;color:#863c60}
.case-task-label{background:#fff1bd;color:#77560c;border-color:#efdf9e}
.case-task-label b{border-color:#e6d58f}
.prepared-icon{background:#eee4ff;color:#613498}
.sync-badge.verified{background:#daf5e9;color:#126447}
.sync-badge.difference{background:#ffe2e5;color:#a12e40}
.sync-badge.pending{background:#fff1bd;color:#77560c}
.sync-badge.draft{background:#e8edf2;color:#435568}
.appointment-date,.record-kind{background:#dcefff;color:#23547d}
.subtle,.case-description,.task-case-context small{color:var(--muted)}
.record-content .tabs button.active{color:var(--brand-ink);border-color:var(--cta)}
.segment-complete,.mini-progress i{background:#40a77f}
.segment-overdue{background:#ef6094}
.late-legend,.overdue-text{color:#a12e40!important}
.work-types input{accent-color:#126447}
.form-error{color:#a12e40}
.metric:hover{background:#f5f7fa}

/* Navigation: inactive = light tile/dark lines; active and header = dark tile/light lines. */
.sidebar .nav-link .nav-icon.overview {
  background: #fff1bd;
  color: #8a620c;
}
.sidebar .nav-link.active .nav-icon.overview,
.topbar .nav-icon.overview {
  background: #ffd43b;
  color: #12365a;
}
.sidebar .nav-link .nav-icon.cases {
  background: #dcefff;
  color: #23547d;
}
.sidebar .nav-link.active .nav-icon.cases,
.topbar .nav-icon.cases {
  background: #23547d;
  color: #dcefff;
}
.sidebar .nav-link .nav-icon.tasks {
  background: #daf5e9;
  color: #126447;
}
.sidebar .nav-link.active .nav-icon.tasks,
.topbar .nav-icon.tasks {
  background: #126447;
  color: #daf5e9;
}

/* Claim labels identify medical/dental scope instead of a status dot. */
.pill.claim-status::before {
  display: none;
}
.claim-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.pill.claim-status {
  gap: 6px;
}

.claim-status .claim-category {
  padding-right: 6px;
  border-right: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 30%, transparent);
  line-height: 16px;
}

/* Extend the divider without shifting the status text. */
.claim-status .claim-category {
  position: relative;
  border-right: 0;
}
.claim-status .claim-category::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: color-mix(in srgb, currentColor 30%, transparent);
}

.case-unit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--case-border);
  border-radius: 7px;
  background: var(--case-tint);
  color: var(--case-ink);
  text-align: left;
}
.case-unit-sky {
  --case-tint: #dcefff;
  --case-border: #bcdcf2;
  --case-ink: #23547d;
}
.case-unit-pink {
  --case-tint: #ffe4ee;
  --case-border: #f1c8d9;
  --case-ink: #863c60;
}
.case-unit > svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.case-unit-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.case-unit strong {
  font-size: 14px;
  font-weight: 600;
}
.case-unit-title {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.case-unit-outlined {
  background: white;
  border-left: 4px solid var(--case-border);
  color: #12365a;
}
.case-unit-outlined > svg {
  color: var(--case-ink);
}
.case-unit-outlined .case-unit-title {
  color: #607184;
}
.case-unit-inline .case-unit-content {
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
}
.case-unit-inline .case-unit-title {
  border-left: 1px solid var(--case-border);
  padding-left: 8px;
}


/* Case lockups preserve patient identity colors while sharing a single frame. */
.case-unit.case-unit-outlined{background:white;border:1px solid;border-left-width:4px;border-color:var(--identity-border,#bcdcf2);color:var(--brand-ink)}
.case-unit.patient-color-0{--identity-border:#bcdcf2}.case-unit.patient-color-1{--identity-border:#f1d2b3}.case-unit.patient-color-2{--identity-border:#f1c8d9}.case-unit.patient-color-3{--identity-border:#bde3d3}.case-unit.patient-color-4{--identity-border:#d9c7f1}.case-unit.patient-color-5{--identity-border:#bcdddf}
.case-unit>svg{color:inherit}.case-unit .case-unit-title{color:var(--muted)}.case-unit .case-unit-content strong{color:var(--brand-ink);font-size:14px;font-weight:600}.case-unit .case-unit-content{white-space:normal}
.case-task-labels{gap:10px 14px}.task-owner-count{gap:7px;white-space:nowrap}.task-owner-count .avatar{width:26px;height:26px;font-size:13px}.case-claim-labels .claim-status{font-size:14px;line-height:16px;padding:4px 7px;white-space:nowrap;font-weight:550}.claim-status .claim-category{font-size:13px;font-weight:700}
.records-grid .col-name{min-width:250px}.cases-grid th:nth-child(3){min-width:230px}.cases-grid th:nth-child(4){min-width:200px}.cases-grid table{table-layout:auto}
.shared-task-list.with-case>.task-item>.task-summary>.task-case-context{justify-content:center}.task-case-context .case-unit{padding:8px 10px;max-width:100%}.task-case-context .case-unit-content{display:flex;flex-direction:column;gap:3px}.task-case-context .case-unit-title{font-size:14px}
.case-checklist .task-summary,.case-checklist .task-column-labels{grid-template-columns:125px minmax(0,1fr) 130px 18px;gap:16px}.case-checklist .task-summary{padding:14px 0}.case-checklist .task-column-labels,.case-checklist .task-item{border-bottom:1px solid #d5dbe5}.case-checklist .task-action-panel{padding-left:141px}.case-checklist .task-item.is-open{background:#f8fafc}
@media(max-width:760px){.case-checklist .task-column-labels{display:none}.case-checklist .task-summary{grid-template-columns:minmax(0,1fr) auto 18px;gap:10px;padding:14px 8px}.case-checklist .task-summary>.task-row-body{grid-column:1;grid-row:1}.case-checklist .task-summary>.task-due{grid-column:2;grid-row:1}.case-checklist .task-summary>.task-assignee{grid-column:1/3;grid-row:2}.case-checklist .task-summary>svg{grid-column:3;grid-row:1/3}.case-checklist .task-action-panel{padding-left:8px}.case-unit{white-space:normal}}

@font-face{font-family:"DM Sans";font-style:normal;font-weight:100 1000;font-display:swap;src:url("fonts/dm-sans-latin.woff2") format("woff2")}

/* Cases table separates patient identity from the case title. */
.cases-grid .col-name{min-width:200px}.cases-grid .col-episode{min-width:220px}.cases-grid th:nth-child(3){min-width:220px}.cases-grid th:nth-child(4){min-width:200px}

/* Consistent list headers. */
.cases-grid th{background:#f3f5f7}.cases-grid th:first-child,.cases-grid td:first-child{position:relative;left:auto;width:auto;min-width:200px}.cases-grid th,.cases-grid td{border-right:1px solid #d5dbe5}.cases-grid th:last-child,.cases-grid td:last-child{border-right:0}.cases-grid th:nth-child(2)::after,.cases-grid td:nth-child(2)::after{display:none}
.task-column-labels>button{gap:7px}.task-column-labels>button>svg{width:14px;height:14px;flex-shrink:0}.task-column-labels>button>span:not(.sort-indicator){margin-right:auto}.task-column-labels .sort-indicator{display:inline-flex;margin-left:auto}.task-column-labels .sort-indicator svg{width:12px;height:12px}.shared-task-list.with-case>.task-column-labels{background:#f3f5f7}

/* Task tables have four columns; disclosure belongs only to in-case tasks. */
@media(min-width:761px){.shared-task-list.with-case>.task-column-labels,.shared-task-list.with-case>.task-item>.task-summary{grid-template-columns:124px minmax(200px,1fr) minmax(210px,.8fr) 140px}.shared-task-list.with-case>.task-column-labels>button:last-child,.shared-task-list.with-case>.task-item>.task-summary>.task-assignee{border-right:0}}
@media(max-width:760px){.shared-task-list.with-case>.task-item>.task-summary{grid-template-columns:100px minmax(0,1fr)}}

/* Active sorting uses a filled directional caret and a stronger label. */
[data-sort] .sort-indicator{color:#8c98a7;opacity:.65}.task-column-labels>button.sort-active,.records-grid [data-sort].sort-active{color:var(--brand-ink);font-weight:650;background:#e7edf3}.sort-indicator.is-active{color:var(--brand-ink);opacity:1}.sort-indicator.is-active svg{display:none}.sort-indicator.is-active::after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid currentColor}.sort-active[aria-label$="ascending"] .sort-indicator.is-active::after{border-top:0;border-bottom:6px solid currentColor}
/* Override the legacy second-column treatment after removing row numbers. */
.records-grid.cases-grid th:nth-child(2){background:#f3f5f7;border-right:1px solid #d5dbe5}
.records-grid.cases-grid td:nth-child(2){border-right:1px solid #d5dbe5}
.records-grid.cases-grid th>button{background:transparent}
.records-grid.cases-grid th>button.sort-active{background:#e7edf3}

/* Patient identity is neutral; color is reserved for workflow meaning. */
.patient-label[class]{background:#f4f5f6;color:#435568;border-color:#dce1e6}
/* The final row closes the table; unused space is a quiet gray surface. */
.records-grid.cases-grid{background:#f7f8fa}.records-grid.cases-grid table{background:#fff}.records-grid.cases-grid tbody tr:last-child td{border-bottom:1px solid #cfd6e1}
.shared-task-list.with-case{background:#f7f8fa}.shared-task-list.with-case>.task-item{background:#fff}.shared-task-list.with-case>.task-item:last-child{border-bottom:1px solid #cfd6e1}
/* Universal compact table header. */
:root{--table-header-height:38px}
.records-grid thead th{height:var(--table-header-height);padding-top:0;padding-bottom:0}.records-grid thead th>button{height:37px;min-height:0;padding-top:8px;padding-bottom:8px;line-height:20px;white-space:nowrap}
@media(min-width:761px){.shared-task-list.with-case>.task-column-labels{height:var(--table-header-height);min-height:0;padding:0}.shared-task-list.with-case>.task-column-labels>button{height:37px;min-height:0;padding:8px 14px;line-height:20px;white-space:nowrap}.shared-task-list.with-case>.task-column-labels,.shared-task-list.with-case>.task-item>.task-summary{grid-template-columns:140px minmax(200px,1fr) minmax(210px,.8fr) 140px}}

/* Case detail: title and description first; identity and live snapshot context at right. */
.case-overview-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,auto);gap:24px;align-items:start;margin-bottom:24px;padding-bottom:22px;border-bottom:1px solid #d5dbe5}.case-overview-title .eyebrow{font-size:13px;margin:0 0 7px}.case-overview-title h1{font-size:26px;line-height:1.25;margin:0;color:var(--brand-ink);letter-spacing:-.7px}.case-description-inline{display:flex;align-items:flex-start;gap:8px;margin-top:12px}.case-description-inline p{margin:0;font-size:14px;line-height:1.65;color:var(--muted)}.case-description-inline button{flex-shrink:0}.case-overview-meta{display:flex;flex-direction:column;align-items:flex-end;gap:10px;text-align:right}.case-overview-statuses{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:320px}.case-overview-meta .sync-widget{margin:0;font-size:13px}.case-top-notes{margin-bottom:28px}.case-top-notes .note-form{margin:0}.case-note-text{font-size:14px;line-height:1.6;padding:10px 0;margin:0;border-bottom:1px solid #e3e7e9;white-space:pre-wrap}.case-checklist .section-title h2,.case-claims-section .section-title h2,.case-top-notes .section-title h2,.case-notes .section-title h2{font-size:16px;font-weight:600}.completed-tasks{margin-top:14px;border:1px solid #d5dbe5;border-radius:7px;overflow:hidden}.completed-tasks>summary{display:list-item;padding:13px 16px;font-size:14px;font-weight:600;color:var(--brand-ink);background:#f3f5f7;cursor:pointer}.completed-count{display:inline-flex;align-items:center;justify-content:center;margin-left:9px;background:#e3e8ed;min-width:22px;padding:1px 6px;border-radius:4px}.completed-tasks>.task-item{padding:0 12px}.case-claim-cards{display:flex;flex-wrap:wrap;gap:14px}.case-claim-card{display:block;flex:0 1 260px;min-width:210px;max-width:100%;border:1px solid #d5dbe5;border-radius:8px;padding:16px;background:white}.case-claim-card:hover{background:#f8fafb;border-color:#aabaca}.case-claim-card dl{margin:16px 0 0;display:grid;gap:13px}.case-claim-card dl>div{display:grid;gap:5px}.case-claim-card dt{font-size:13px;color:var(--muted)}.case-claim-card dd{margin:0;font-size:14px;color:var(--brand-ink);font-weight:550}.case-claim-card .claim-status{line-height:16px;padding:4px 7px}.case-claims-section{margin:0 0 28px}.case-checklist .section-title{margin-bottom:12px}
@media(max-width:760px){.case-overview-header{grid-template-columns:1fr;gap:16px}.case-overview-meta{align-items:flex-start;text-align:left}.case-overview-statuses{justify-content:flex-start;max-width:none}.case-claim-card{flex:1 1 220px}}
/* Keep workspace identity in scale with the navigation toggle. */
.topbar .crumb{font-size:18px;gap:9px}.topbar .crumb>.nav-icon{width:23px;height:23px;border-radius:6px}.topbar .crumb>.nav-icon svg{width:16px;height:16px}.topbar .mobile-toggle svg{width:20px;height:20px}

.case-overview-title{position:relative;padding-right:30px}.case-header-edit{position:absolute;right:0;top:0}.case-top-notes .section-title>button{font-size:13px;min-height:30px;padding:5px 9px;line-height:18px;border:1px solid #dfe4eb;border-radius:6px;background:#fff;color:#526173}.case-note-entry{padding:12px 0;border-bottom:1px solid #e3e7e9}.case-note-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px}.case-note-meta time{white-space:nowrap}.case-note-entry .case-note-text{border:0;padding:8px 0 0}.case-notes-empty{margin:0}.case-claims-section .sync-widget{margin:0;font-size:13px}.case-claims-section .section-title{gap:12px;flex-wrap:wrap}
.case-claim-card{position:relative;flex-basis:245px;min-width:205px;padding:18px 16px 14px;overflow:hidden}.case-claim-card.claim-medical{background:#fbf8ff;border-color:#d9c7f1}.case-claim-card.claim-dental{background:#f5fcf8;border-color:#bde3d3}.case-claim-card.claim-medical:hover{background:#f4edff}.case-claim-card.claim-dental:hover{background:#eaf8f1}.claim-corner-tag{position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;width:30px;height:28px;border-bottom-left-radius:8px;font-size:13px;font-weight:700;background:#eee4ff;color:#613498}.claim-dental .claim-corner-tag{background:#daf5e9;color:#126447}.claim-insurer{display:flex;align-items:center;gap:7px;padding-right:22px;min-height:24px}.claim-insurer>svg{width:16px;height:16px;color:var(--muted)}.claim-insurer strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere}.claim-card-amount{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:16px 0 12px;font-size:14px}.claim-card-amount>span{font-size:13px;color:var(--muted)}.claim-card-status.pill:before{display:none}.claim-card-status{font-size:14px}

/* Quiet claim surfaces with balanced, repeatable spacing. */
.case-claim-card.claim-medical,.case-claim-card.claim-dental{background:#fff;padding:20px 16px 16px;display:flex;flex-direction:column;gap:16px}.case-claim-card.claim-medical:hover,.case-claim-card.claim-dental:hover{background:#fafbfc}.case-claim-card.claim-medical{border-color:#c5afe5}.case-claim-card.claim-dental{border-color:#9dcfb8}.claim-insurer{min-height:24px}.claim-card-amount{margin:0;line-height:24px}.claim-card-status{align-self:flex-start;margin:0}
/* Note text leads; attribution is a secondary right-aligned group. */
.case-note-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;padding:16px 0;border-bottom:1px solid #e3e7e9}.case-note-entry .case-note-text{grid-column:1;grid-row:1;padding:0;margin:0;font-size:14px;line-height:1.6}.case-note-meta{grid-column:2;grid-row:1;justify-content:flex-end;gap:10px;font-size:13px;line-height:1.7;color:var(--muted)}.case-note-entry:last-child{border-bottom:0}
/* Uniform spacing around the boundaries of case sections. */
.record-content .case-overview-header{margin-bottom:0;padding-bottom:24px;border-bottom:1px solid #d5dbe5}.record-content .case-top-notes,.record-content .case-checklist,.record-content .case-claims-section{margin:0;padding:24px 0;border-bottom:1px solid #d5dbe5}.record-content .case-top-notes>.section-title,.record-content .case-checklist>.section-title,.record-content .case-claims-section>.section-title{margin-bottom:16px}.case-top-notes .case-note-entry:first-of-type{padding-top:0}.case-top-notes .case-note-entry:last-child{padding-bottom:0}.case-audit-log{margin:0;padding:24px 0;border-bottom:1px solid #d5dbe5}.case-audit-log>summary{font-size:16px;font-weight:600;color:var(--brand-ink);cursor:pointer}.case-audit-log[open]>summary{margin-bottom:16px}.case-footer{border-top:0;padding-top:24px}
@media(max-width:600px){.case-note-entry{grid-template-columns:1fr;gap:7px}.case-note-meta{grid-column:1;grid-row:2;justify-content:flex-end}}
/* Read-only PMS claim overview. */
.claim-overview-header{padding:0 0 24px;border-bottom:1px solid #d5dbe5}.claim-associated-case{display:inline-flex;gap:9px;align-items:center;color:var(--brand-ink);margin-bottom:20px}.claim-associated-case>svg{width:20px;height:20px}.claim-associated-case strong{font-size:15px}.claim-associated-case small{display:block;margin-top:4px;font-size:13px;color:var(--muted)}.claim-overview-identity h1{font-size:26px;line-height:1.3;margin:0 0 12px;letter-spacing:-.7px}.claim-overview-labels{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.claim-coverage{font-size:13px;color:var(--muted)}.claim-sync-line{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:13px;margin-top:16px}.claim-facts-section,.claim-breakdown-section{padding:24px 0;border-bottom:1px solid #d5dbe5}.claim-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 28px;margin:0}.claim-facts dt,.claim-payment-totals dt{font-size:13px;color:var(--muted);margin-bottom:6px}.claim-facts dd,.claim-payment-totals dd{margin:0;font-size:14px;color:var(--brand-ink)}.claim-breakdown-table{overflow:auto;border:1px solid #d5dbe5;border-radius:6px}.claim-breakdown-table th{background:#f3f5f7;height:38px}.claim-breakdown-table th,.claim-breakdown-table td{padding:10px 12px;border-right:1px solid #d5dbe5;white-space:normal}.claim-breakdown-table th:last-child,.claim-breakdown-table td:last-child{text-align:right;border-right:0;white-space:nowrap}.claim-payment-totals{display:flex;gap:32px;flex-wrap:wrap;margin:20px 0 0}.claim-payment-totals dd{font-size:18px;font-weight:600}.claim-breakdown-section .section-title h2{font-size:16px}.claim-overview-header~.case-audit-log .activity-item{grid-template-columns:100px minmax(0,1fr) 105px}.claim-notes .case-note-meta{font-size:13px}@media(max-width:600px){.claim-facts{grid-template-columns:1fr}.claim-overview-header~.case-audit-log .activity-item{grid-template-columns:1fr}.claim-overview-header~.case-audit-log .activity-actor{justify-self:start}}

/* A single claim summary answers who, where it stands, and what it covers. */
.claim-overview-header .claim-associated-case{margin-bottom:20px}.claim-associated-case strong{font-size:15px}.claim-associated-case small{font-size:14px}.claim-summary-top{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:10px}.claim-summary-top h1{font-size:25px;line-height:1.3;margin:0;letter-spacing:-.6px}.claim-summary-top>.pill{flex-shrink:0;font-size:14px}.claim-summary-facts{margin-top:22px;gap:18px 24px}.claim-overview-header .claim-sync-line{margin-top:20px}.claim-history-section{padding:24px 0;border-bottom:1px solid #d5dbe5}.claim-history-section h2{font-size:16px}.claim-history-timeline{display:grid;gap:0}.claim-history-event{display:grid;grid-template-columns:105px minmax(0,1fr);gap:16px;padding:14px 0;border-bottom:1px solid #e3e7e9;font-size:14px}.claim-history-event:last-child{border-bottom:0}.claim-history-event time{font-size:13px;color:var(--muted);line-height:1.6}.claim-history-event p{margin:0;line-height:1.6;color:var(--brand-ink)}@media(max-width:600px){.claim-history-event{grid-template-columns:1fr;gap:5px}.claim-summary-top h1{font-size:22px}}

.claim-breakdown-table tfoot th{background:#f8f9fb;font-size:14px;font-weight:500;text-align:right;height:auto;border-bottom:1px solid #e3e7e9}.claim-breakdown-table tfoot td{background:#f8f9fb;font-weight:600;border-bottom:1px solid #e3e7e9}.claim-breakdown-table tfoot tr:first-child th,.claim-breakdown-table tfoot tr:first-child td{border-top:2px solid #cfd6e1;font-weight:650}.claim-breakdown-table tfoot tr:last-child th,.claim-breakdown-table tfoot tr:last-child td{border-bottom:0}.claim-amount-explanation{font-size:13px;color:var(--muted);line-height:1.6;margin:12px 0 0}

.claim-summary-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0}.claim-summary-status .type,.claim-summary-status .pill{font-size:14px;line-height:20px}.claim-summary-status .claim-coverage{margin-left:4px}.claim-overview-header .claim-summary-facts{margin-top:22px}

.claim-total-row .amount-info{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0;padding:0;margin-left:7px;border:1px solid #8c98a7;border-radius:50%;background:transparent;color:#607184;font-size:13px;font-weight:650;font-family:inherit;vertical-align:middle;line-height:1}.claim-total-row .amount-info:hover{background:#e7edf3;color:#12365a}.amount-info-content{padding:16px;font-size:14px;line-height:1.6}.amount-info-content p{margin:8px 0 0;color:#607184}

.claim-facts dd.placeholder-value,.claim-breakdown-table td.placeholder-value{color:#8b929b;font-weight:400}.claim-overview-header{position:relative}.claim-overview-header .claim-associated-case{padding-right:155px}.claim-sync-widget{position:absolute;right:0;top:0;margin:0;font-size:13px}.claim-history-content{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}.claim-history-content p{flex:1 1 240px}.claim-history-content .history-status{flex-shrink:0;font-size:13px;line-height:18px;padding:2px 6px}.history-status:before{display:none}@media(max-width:600px){.claim-overview-header .claim-associated-case{padding-right:0}.claim-sync-widget{position:static;float:right;margin-bottom:12px}.claim-overview-header .claim-associated-case{display:flex;clear:both}}

#close-form button.primary{background:#b93848;border-color:#b93848;color:#fff}#close-form button.primary:hover{background:#9f2c3b;border-color:#9f2c3b}#close-form textarea::placeholder{color:#9ba2aa;opacity:1}#close-form>.subtle strong{font-weight:700;color:var(--brand-ink)}#close-form>.source-note{margin:0 0 18px;line-height:1.6}

.claim-summary-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:22px}.claim-summary-columns .claim-summary-facts{grid-template-columns:1fr;margin:0;gap:18px}@media(max-width:600px){.claim-summary-columns{grid-template-columns:1fr;gap:24px}}
@media(min-width:761px){.case-overview-header{grid-template-columns:minmax(0,1fr) max-content}.case-overview-meta .case-overview-statuses{flex-direction:column;align-items:flex-end;gap:7px;max-width:none}.case-overview-meta{max-width:190px}.case-overview-meta>.patient-label{white-space:normal;text-align:left}}

.case-checklist .task-summary,.case-checklist .task-column-labels{grid-template-columns:minmax(0,1fr) 110px 130px 18px}.case-checklist .task-action-panel{padding:0 12px 18px}.case-checklist .task-action-copy{max-width:none}@media(max-width:760px){.case-checklist .task-summary{grid-template-columns:minmax(0,1fr) auto 18px}.case-checklist .task-action-panel{padding:0 8px 16px}}
@media(max-width:760px){.case-checklist .task-summary>svg{grid-column:3;grid-row:1;align-self:center}.case-checklist .task-summary>.task-due{align-self:center}}
/* Shared inset keeps task titles and expanded content aligned. */
.case-checklist .task-column-labels{padding-left:12px;padding-right:12px}.case-checklist .task-summary{padding-left:12px;padding-right:12px}.case-checklist .task-action-panel{padding-left:12px;padding-right:12px}
@media(max-width:760px){.case-checklist .task-summary{padding-left:12px;padding-right:12px}.case-checklist .task-action-panel{padding-left:12px;padding-right:12px}}

/* Task case references are plain, single-line text rather than case cards. */
.task-case-text{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:14px;font-weight:400}
.task-case-text strong{color:var(--brand-ink);font-weight:600}
.task-case-separator{color:var(--muted)}

/* Overview cards share one perimeter; hover changes the fill only. */
.metrics>.metric:hover{box-shadow:none;outline:none;background:#f5f7fa}
.metrics>.metric:focus-visible{box-shadow:inset 0 0 0 2px var(--brand-ink);outline:none}
.metrics>.metric:first-child{border-top-left-radius:7px;border-bottom-left-radius:7px}
.metrics>.metric:last-child{border-top-right-radius:7px;border-bottom-right-radius:7px}
.my-tasks-panel.panel{border-color:#d5dbe5}
.my-tasks-panel>.shared-task-list.with-case{border:0;border-top:1px solid #d5dbe5}
@media(max-width:760px){.metrics>.metric:first-child{border-bottom-left-radius:0}.metrics>.metric:nth-child(2){border-top-right-radius:7px}.metrics>.metric:nth-child(3){border-bottom-left-radius:7px}.metrics>.metric:last-child{border-top-right-radius:0}}

.patient-overview-header .eyebrow{margin-bottom:8px}.patient-fact-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.patient-facts{margin:0}.patient-facts>div{padding:8px 0}.patient-facts dd{overflow-wrap:anywhere}.patient-insurance-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.patient-insurance-card{border:1px solid #d5dbe5;border-radius:8px;padding:20px;min-width:0}.patient-insurance-card h3{font-size:16px;margin:0}.patient-insurance-card h4{font-size:15px;margin:20px 0 10px}.patient-insurance-card .section-title{margin-bottom:16px}.patient-case-row>span:first-child{flex:1}.claim-status-track{flex-basis:100%;font-weight:600;margin-top:12px}@media(max-width:1000px){.patient-insurance-grid{grid-template-columns:1fr}}@media(max-width:600px){.patient-fact-columns{grid-template-columns:1fr;gap:0}}
.patient-facts{display:block}.patient-facts>div{display:block;margin:0;padding:8px 0}.patient-facts dt{margin:0 0 5px}.patient-facts dd{margin:0;min-height:20px}.patient-basics{margin-bottom:28px}
.pill.claim-status.neutral{background:#e8edf2;color:#455b73}

/* Patient summary: linked cases and compact insurance cards. */
.patient-overview-header{align-items:center}.patient-name{display:flex;align-items:center;gap:12px}.patient-name>svg{width:26px;height:26px}.patient-cases{margin:0 0 28px}.patient-case-row{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #bcdcf2;border-left:4px solid #77b8e3;border-radius:7px;margin-bottom:10px;background:#fff}.patient-case-row:hover{background:#f4f8fc}.patient-case-row .case-unit-icon{color:#23547d;display:flex}.patient-case-text{flex:1;min-width:0}.patient-case-text strong{display:block;color:#12365a;font-size:15px}.patient-case-text small{display:block;color:#607184;margin-top:5px;font-size:13px}.patient-insurance-card{padding:16px}.patient-insurance-card .section-title{margin-bottom:12px}.patient-insurance-card h4{margin:12px 0;font-size:18px}.patient-insurance-card .patient-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px}.patient-insurance-card .patient-facts>div{padding:0}.patient-insurance-card .patient-facts dt{font-size:13px;margin-bottom:3px}.patient-insurance-card .patient-facts dd{font-size:14px;min-height:0}.insurance-more{margin-top:14px;border-top:1px solid #e3e7e9;padding-top:12px}.insurance-more summary{cursor:pointer;color:#607184;font-size:13px}.insurance-more[open] summary{margin-bottom:12px}.patient-insurance-card .section-footnote{font-size:13px;line-height:1.5;margin:12px 0 0}.patient-insurance-grid{align-items:start}@media(max-width:600px){.patient-overview-header{display:flex;flex-wrap:wrap;gap:14px}.patient-case-row{gap:8px}.patient-case-row .pill{font-size:13px}}
.patient-case-row>span.case-unit-icon:first-child{flex:0 0 auto}

/* Patient section rhythm and card disclosure. */
.record-content .patient-overview-header{margin-bottom:24px;padding-bottom:24px}.record-content .patient-name{font-size:30px;line-height:1.2}.patient-cases,.patient-basics{margin-bottom:32px}.patient-insurance-section{margin-top:0}.record-content :is(.patient-cases,.patient-basics,.patient-insurance-section)>.section-title{margin-bottom:18px}.record-content :is(.patient-cases,.patient-basics,.patient-insurance-section)>.section-title h2{font-size:20px;line-height:1.3;font-weight:650}.insurance-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.insurance-card-heading h3{font-size:18px;margin:0;color:#12365a}.insurance-more{margin:16px -16px -16px;padding:0;border-top:1px solid #e3e7e9}.insurance-more summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;font-size:14px;font-weight:550;color:#12365a;list-style:none;border-radius:0 0 8px 8px}.insurance-more summary::-webkit-details-marker{display:none}.insurance-more summary:hover{background:#f4f7fa}.insurance-more summary:focus-visible{outline:2px solid #12365a;outline-offset:-3px}.insurance-more .disclosure-hide{display:none}.insurance-more[open] .disclosure-show{display:none}.insurance-more[open] .disclosure-hide{display:inline}.insurance-more[open] summary{margin-bottom:0;border-radius:0}.insurance-more[open] summary>svg{transform:rotate(180deg)}.insurance-more-content{padding:8px 16px 16px}.insurance-more summary>svg{width:16px;height:16px}

/* Shared typography and status semantics for the app and reference guide. */
:root { font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font-family: inherit; }
.shared-task-list.with-case > .task-column-labels > span {
  padding: 8px 14px;
  border-right: 1px solid #d5dbe5;
  min-width: 0;
}
.shared-task-list.with-case > .task-column-labels > span:last-child { border-right: 0; }
.task-case-context .patient-label { font-size: 14px; font-weight: 500; }
.task-case-context .patient-label strong { font-size: inherit; font-weight: inherit; }
.pill.claim-status { background: #e8edf2; color: #455b73; }
.pill.claim-status.neutral { background: #e8edf2; color: #455b73; }
.pill.claim-status.working { background: #dcefff; color: #23547d; }
.pill.claim-status.warn { background: #fff1bd; color: #77560c; }
.pill.claim-status.bad { background: #ffe2e5; color: #a12e40; }
.pill.claim-status.good { background: #daf5e9; color: #126447; }

/* Overview sections use compact lists with whitespace instead of outer cards. */
.coordination-overview { align-items: start; gap: 32px; }
.overview-grid.coordination-overview > .panel { border: 0; border-radius: 0; box-shadow: none; padding: 0; background: transparent; }
.coordination-overview .section-title { margin-bottom: 10px; }
.upcoming-task-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 5px 10px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.upcoming-task-row:hover { background: #f8fafc; }
.upcoming-task-row strong { font-size: 14px; line-height: 1.5; font-weight: 600; }
.upcoming-task-row .todo-indicator { grid-column: 1; grid-row: 1 / 3; display: flex; padding-top: 2px; color: #8c98a7; }
.todo-indicator svg { width: 17px; height: 17px; }
.upcoming-task-row .upcoming-task-context { grid-column: 2 / 4; font-size: 13px; color: var(--muted); line-height: 1.6; }
.upcoming-task-row .task-due-lockup { grid-column: 3; grid-row: 1; }
.upcoming-task-row .due-label { font-size: 13px; padding: 2px 5px; white-space: nowrap; }
.coordination-overview .activity-empty { margin: 0; padding: 15px 0; }

/* Align case tasks with their section title and use one rule per table edge. */
.case-checklist > .shared-task-list { padding: 0; }
.case-checklist .task-column-labels,
.case-checklist .task-summary,
.case-checklist .task-action-panel { padding-left: 12px; padding-right: 12px; }
.case-overview-meta .case-claim-labels { justify-content: flex-end; flex-wrap: wrap; }
.claim-breakdown-table table { border-collapse: collapse; border: 0; }
.claim-breakdown-table thead th { border-top: 0; }
.claim-breakdown-table tfoot tr:first-child th,
.claim-breakdown-table tfoot tr:first-child td { border-top: 1px solid #d5dbe5; }
