:root {
  --ink: #01295a;
  --teal: #0065d7;
  --teal-dark: #004ead;
  --cyan: #03abb6;
  --mist: #e8f2fb;
  --fog: #f3f7fb;
  --line: #d4e0ec;
  --danger: #b91c1c;
  --warn: #b45309;
  --ok: #047857;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--fog);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .18s ease;
}
.brand {
  padding: .9rem 1rem .85rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand .sidebar-toggle {
  width: 100%;
  margin-top: .55rem;
}
.brand-lockup { text-align: center; }
.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 118px;
  margin: 0 auto;
  object-fit: contain;
}
.brand-tagline {
  margin: .2rem 0 0;
  font-size: .72rem;
  letter-spacing: .01em;
  color: #64748b;
  font-weight: 600;
}
.nav { padding: .75rem; flex: 1; overflow: auto; }
.nav a,
.nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255,255,255,.78);
  padding: .5rem .65rem;
  border-radius: 6px;
  font-size: .9rem;
  margin-bottom: 2px;
}
.nav a:hover, .nav a.active, .nav-link:hover, .nav-link.active { background: var(--teal); color: #fff; }
.nav-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .5; padding: .75rem .75rem .25rem; }
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: .4rem .55rem;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  font-weight: 650;
}
.sidebar-toggle svg { width: 18px; height: 18px; display: block; }
.sidebar-toggle:hover { border-color: var(--teal); color: var(--teal); }
.topbar-left {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}
.topbar-toggle { flex-shrink: 0; }
body.sidebar-collapsed .sidebar { width: 76px; }
body.sidebar-collapsed .brand { padding: .65rem .45rem; }
body.sidebar-collapsed .brand-logo { max-height: 44px; }
body.sidebar-collapsed .brand-tagline,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav .section { display: none; }
body.sidebar-collapsed .nav a,
body.sidebar-collapsed .nav-link,
body.sidebar-collapsed .brand .sidebar-toggle {
  justify-content: center;
  padding-left: .5rem;
  padding-right: .5rem;
}
body.sidebar-collapsed .brand .sidebar-toggle svg { transform: rotate(180deg); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.content { padding: 1.5rem; }
h1.page { margin: 0 0 .35rem; font-size: 1.6rem; }
.sub { color: #64748b; font-size: .9rem; margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.stat, .panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat { padding: 1rem; }
.stat .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.stat .value { font-size: 1.6rem; font-weight: 650; margin-top: .25rem; }
.panel { padding: 0; overflow: hidden; }
.panel h2 { margin: 0; padding: 1rem 1.1rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-right: 1.1rem;
}
.panel-head h2 { border-bottom: 0; flex: 1; }
.denial-date-search {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.denial-date-search[hidden] { display: none !important; }
.denial-cases-note { margin: .75rem 1.1rem 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.table input.inline {
  width: 100%;
  min-width: 4.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .4rem .5rem;
  font: inherit;
  background: #fff;
}
.table th { color: #64748b; font-weight: 600; font-size: .8rem; }
.table th a.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.table th a.sort-link:hover, .table th a.sort-link.is-active { color: var(--teal); }
.table th .sort-ind { font-size: .65rem; margin-left: .2rem; }
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: .5rem .9rem;
  font-size: .875rem;
  cursor: pointer;
}
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #991b1b; color: #fff; }
.btn.ghost { background: transparent; color: var(--teal); }
.topbar .btn.ghost.is-current {
  background: #dbeafe;
  color: var(--teal-dark);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  margin: 1rem 0;
}
.filters .field { margin: 0; }
.filters .field input[type="date"] { min-width: 150px; }
.filters .search-field { flex: 1 1 240px; min-width: 220px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.queue-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 1rem;
}
.queue-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1rem;
  color: #475569;
  font-weight: 650;
  font-size: .9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.queue-tab:hover { color: var(--teal); }
.queue-tab.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.queue-tab-count {
  min-width: 1.35rem;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: var(--mist);
  color: #334155;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}
.queue-tab.is-active .queue-tab-count {
  background: #dbeafe;
  color: var(--teal-dark);
}
.queue-tabs button.queue-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font: inherit;
}
.queue-tabs button.queue-tab.is-active {
  border-bottom-color: var(--teal);
}
.claim-visit-tabs {
  padding-bottom: .35rem;
}
.claim-visit-chips {
  margin: 0;
}
.claim-visit-chips .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.claim-chip-count {
  min-width: 1.25rem;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: var(--mist);
  color: #334155;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}
.claim-visit-chips .btn.secondary .claim-chip-count {
  background: #dbeafe;
  color: var(--teal-dark);
}
.billing-cpt-usage {
  margin: .15rem 0 .5rem;
}
.claim-cpt-chip {
  cursor: default;
  pointer-events: none;
  font-weight: 600;
}
tr:target {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
  background: #eff6ff;
}
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .85rem; color: #475569; margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .5rem .7rem;
  font: inherit;
  background: #fff;
}
.field input[type="checkbox"], .field input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
}
.grid-span { grid-column: 1 / -1; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .45rem .85rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.checkbox-grid .check,
.field label.check {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  color: var(--ink);
  margin: 0;
  cursor: pointer;
}
.cpt-rows { display: flex; flex-direction: column; gap: .6rem; }
.cpt-row {
  display: grid;
  grid-template-columns: 1.2fr 80px 100px 80px 140px auto;
  gap: .5rem;
  align-items: end;
}
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; }
.badge.ok { background: #d1fae5; color: var(--ok); }
.badge.hold { background: #fee2e2; color: var(--danger); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.muted { background: var(--mist); color: #475569; }
.badge.stay { background: #e0e7ff; color: #3730a3; font-weight: 650; }
.badge.copay { font-weight: 650; }
.schedule-note-preview {
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.schedule-note-text {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: .88rem;
  color: #334155;
  max-height: 10rem;
  overflow: auto;
}
.badge.due { background: #ffedd5; color: #c2410c; font-weight: 650; }
.table tr.due-soon { background: #fff7ed; }
.table tr.due-soon td { box-shadow: inset 3px 0 0 #ea580c; }
.table tr.denial-row td { background: #fff7ed; }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.flash.error { background: #fee2e2; color: var(--danger); }
.flash.success { background: #d1fae5; color: var(--ok); }
.hold-banner { background: #fee2e2; color: var(--danger); padding: .9rem 1rem; border-radius: 8px; margin: 1rem 0; }
.mismatch { background: #fef3c7; }
.readonly { background: var(--mist) !important; }
.elig-record {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.elig-record input,
.elig-record select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .4rem .5rem;
  font: inherit;
  background: #fff;
}
.elig-record input[name="member_id"] { width: 9rem; }
.elig-record input[name="copay_amount"],
.elig-record input[name="deductible_remaining"],
.elig-record input[name="coinsurance_percent"] { width: 6.5rem; }
.elig-record select[name="patient_stay_type"] { width: 8.5rem; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 400px; max-width: calc(100vw - 2rem); background: #fff; padding: 2rem; border-radius: 16px; border: 1px solid var(--line); }
.login-card.wide { width: 440px; }
.login-card .brand-lockup { margin-bottom: 1.15rem; }
.login-card .brand-logo { max-height: 220px; }
.login-card h1 { margin: 0; }
.login-card .btn { width: 100%; text-align: center; box-sizing: border-box; }
.login-card .btn.secondary { margin-top: 0; }
.login-split {
  margin: 1.1rem 0 .65rem;
  text-align: center;
  color: #64748b;
  font-size: .8rem;
}
.login-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.security-page { max-width: 920px; }
.security-page .action-hero { margin-top: .35rem; }
.security-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.security-setup-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.security-page .appt-page-head .badge {
  font-weight: 700;
  padding: .3rem .7rem;
}
.security-setup-side .step-cards li > div span {
  display: block;
  color: #64748b;
  font-size: .85rem;
  margin-top: .15rem;
}
.security-apps {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.security-app {
  display: inline-flex;
  align-items: center;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--teal-dark);
  font-size: .8rem;
  font-weight: 650;
}
.security-confirm .mfa-code { max-width: 16rem; }
.mfa-code {
  letter-spacing: .18em;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.mfa-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 .85rem;
  padding: 1rem;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 70%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}
.mfa-qr {
  display: block;
  width: 196px;
  height: 196px;
  border-radius: 8px;
  background: #fff;
}
.mfa-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  font-size: .95rem;
  background: var(--fog);
  border: 1px dashed var(--line);
  padding: .7rem .85rem;
  border-radius: 8px;
  word-break: break-all;
  text-align: center;
  color: var(--ink);
  margin: .4rem 0 0;
}
.backup-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}
.backup-codes li {
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .8rem;
  text-align: center;
  font-weight: 650;
  color: var(--ink);
}
.row-actions a, .row-actions button { margin-right: .5rem; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; }
.row-actions .btn.ghost { padding: 0; }
.table tr.is-inactive td { color: #64748b; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
.rights-group { margin-bottom: 1rem; }
.rights-group h3 {
  margin: 0 0 .4rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
}
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hint, .field .hint {
  color: #64748b;
  font-size: .8rem;
  margin: .35rem 0 0;
}
.field-error { color: var(--danger); font-size: .8rem; margin: .35rem 0 0; }
h2.form-section, .form-section {
  margin: 0 0 .85rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.appt-page { max-width: 980px; }
.appt-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.appt-page-head .sub { margin-bottom: 0; }
.appt-form { display: flex; flex-direction: column; gap: 1rem; }
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem 1.2rem;
}
.form-card .sub { margin: 0 0 1rem; }
.clearance-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem 1.2rem;
  margin: 0 0 1.15rem;
  box-shadow: inset 4px 0 0 #94a3b8;
}
.clearance-card.warn { background: #fffbeb; border-color: #f6d38b; box-shadow: inset 4px 0 0 var(--warn); }
.clearance-card.ok { background: #f0fdf8; border-color: #a7f3d0; box-shadow: inset 4px 0 0 var(--ok); }
.clearance-card.hold { background: #fef2f2; border-color: #fecaca; box-shadow: inset 4px 0 0 var(--danger); }
.clearance-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.clearance-kicker {
  margin: 0 0 .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 700;
}
.clearance-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-weight: 650;
}
.clearance-label {
  margin: 0 0 .4rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 700;
}
.clearance-reasons { margin-top: 1rem; }
.clearance-reasons ul {
  margin: 0;
  padding-left: 1.15rem;
}
.clearance-reasons li { margin: .25rem 0; }
.clearance-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .85rem 1rem;
  margin: 1rem 0 0;
}
.clearance-facts div { margin: 0; }
.clearance-facts dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  font-weight: 700;
}
.clearance-facts dd { margin: .2rem 0 0; font-weight: 600; }
.clearance-units { margin-top: 1rem; background: #fff; border-radius: 8px; overflow: hidden; }
.clearance-units th, .clearance-units td { padding: .55rem .75rem; }
.ai-progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 42, 61, .58);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.ai-progress-overlay.is-open { display: flex; }
body.ai-busy { overflow: hidden; }
body.ai-busy .layout { pointer-events: none; }
.ai-progress-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.35rem;
  box-shadow: 0 22px 50px rgba(15, 42, 61, .28);
  pointer-events: none;
}
.ai-progress-card h2 { margin: 0 0 .35rem; font-size: 1.1rem; }
.ai-progress-card p { margin: 0 0 1rem; color: #64748b; font-size: .9rem; }
.ai-progress-track {
  height: 10px;
  background: var(--mist);
  border-radius: 999px;
  overflow: hidden;
}
.ai-progress-bar {
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--cyan) 100%);
  animation: ai-progress-fill 18s ease-out forwards;
}
@keyframes ai-progress-fill {
  0% { width: 8%; }
  70% { width: 78%; }
  100% { width: 92%; }
}
.readonly-value {
  margin: 0;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  min-height: 2.35rem;
}
.readonly-value.muted { color: #64748b; }
.coverage-alert { margin-bottom: 1rem; }
.coverage-alert p { margin: .35rem 0 0; }
.resolve-page {
  --resolve-pad: 1.25rem;
  text-align: left;
}
.resolve-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.resolve-top .sub { margin-bottom: 0; }
.resolve-page .panel > h2,
.resolve-page .panel-head {
  padding-left: var(--resolve-pad);
  padding-right: var(--resolve-pad);
}
.resolve-page .panel-head h2 {
  padding-left: 0;
  padding-right: 0;
}
.resolve-page .panel-body,
.resolve-page .stepper,
.resolve-page .timeline-rail {
  padding: 1rem var(--resolve-pad) 1.15rem;
}
.resolve-page .table th,
.resolve-page .table td {
  padding: .7rem var(--resolve-pad);
  text-align: left;
  vertical-align: middle;
}
.resolve-page .table.kv th {
  width: 12.5rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}
.resolve-page .hint,
.resolve-page .reason-note,
.resolve-page .callout,
.resolve-page .reason-box,
.resolve-page .card-kicker { text-align: left; }
.panel-body { padding: 1rem 1.25rem 1.15rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { border-bottom: 0; padding-right: 0; }
.table.kv th { width: 12.5rem; color: #64748b; font-weight: 600; }
.ai-copy p { margin: 0 0 .7rem; }
.ai-copy p:last-child { margin-bottom: 0; }
.ai-copy ul.sub {
  margin: 0 0 .85rem;
  padding-left: 1.15rem;
  color: var(--ink);
}
.ai-copy ul.sub li { margin: 0 0 .4rem; }
.ai-copy ul.sub li:last-child { margin-bottom: 0; }
.ai-copy .sub { color: #64748b; }
.card-kicker {
  margin: 0 0 .45rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  font-weight: 650;
  text-align: left;
}
.hint { color: #64748b; font-size: .85rem; margin: .45rem 0 0; text-align: left; }
.resolve-page .hint { margin: .45rem 0 0; }
.chip-row, .card-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip-row { margin-top: .9rem; }
.card-actions { margin-top: 1rem; }
.chip {
  display: inline-flex;
  align-items: center;
  background: var(--mist);
  color: var(--ink);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 600;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.metric-grid.compact { gap: .55rem; }
.metric {
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .85rem .9rem;
  text-align: left;
}
.metric .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.metric .value { font-size: 1.25rem; font-weight: 700; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.metric.is-denied { background: #fff7ed; border-color: #fed7aa; }
.metric.is-denied .value { color: var(--warn); }
.metric.is-balance { background: #eff6ff; border-color: #bfdbfe; }
.metric.is-balance .value { color: var(--teal-dark); }
.claim-totals {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--line);
}
.reason-block {
  background: #f8fafc;
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: .9rem 1rem;
}
.denial-reason { font-size: 1.08rem; font-weight: 650; margin: 0; line-height: 1.45; }
.reason-note { margin: .5rem 0 0; color: #475569; }
.callout {
  margin-top: .85rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: .8rem .95rem;
  color: #7c4a03;
}
.meta-grid, .source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .9rem;
}
.meta-item, .source-item {
  background: var(--fog);
  border-radius: 10px;
  padding: .75rem .85rem;
  text-align: left;
}
.meta-item .label, .source-item .label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  margin-bottom: .35rem;
}
.meta-item .value, .source-item .value { font-weight: 650; }
.reason-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .95rem;
}
.analysis-details { margin-top: .85rem; }
.analysis-details summary { cursor: pointer; color: var(--teal); font-weight: 600; }
.action-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  text-align: left;
}
.action-hero.is-alert { background: #fffbeb; border-color: #fde68a; }
.action-hero h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.action-hero p { margin: 0; color: #334155; }
.hero-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-width: 10rem; }
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.step-cards li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem .8rem;
  text-align: left;
}
.step-cards .num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.recommend-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}
.recommend-value { margin: 0; font-size: 1.15rem; font-weight: 700; }
.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1rem;
}
.decision-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .9rem;
  cursor: pointer;
  background: #fff;
  text-align: left;
}
.decision-card input { position: absolute; opacity: 0; pointer-events: none; }
.decision-card strong { display: block; margin-bottom: .2rem; }
.decision-card span { color: #64748b; font-size: .85rem; }
.decision-card:has(input:checked) {
  border-color: var(--teal);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px var(--teal);
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.plan-grid .field { margin-bottom: 0; }
.ledger { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.ledger-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row.total { background: #eff6ff; font-size: 1.02rem; }
.stepper {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stepper li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  align-items: center;
  column-gap: .7rem;
  position: relative;
  min-width: 0;
  text-align: left;
  font-size: .9rem;
  color: #64748b;
  padding: .45rem 0;
}
.stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: .5rem;
  top: 1.55rem;
  bottom: -.1rem;
  width: 2px;
  background: var(--line);
}
.stepper .mark {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  display: inline-block;
  margin: 0;
  position: relative;
  z-index: 1;
}
.stepper .label { line-height: 1.35; }
.stepper li.done .mark { background: var(--ok); border-color: var(--ok); }
.stepper li.current .mark { background: var(--teal); border-color: var(--teal); }
.stepper li.done, .stepper li.current { color: var(--ink); font-weight: 650; }
.timeline-rail {
  list-style: none;
  margin: 0;
}
.timeline-rail li {
  display: grid;
  grid-template-columns: 14px 3.4rem minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  position: relative;
  padding-bottom: 1rem;
  text-align: left;
}
.timeline-rail li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline-rail .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--teal);
  margin-top: .2rem;
  position: relative;
  z-index: 1;
}
.timeline-rail .when { color: #64748b; font-size: .8rem; padding-top: .15rem; text-align: left; }
.timeline-rail .event { background: var(--fog); border-radius: 10px; padding: .7rem .8rem; }
.timeline-rail .event p { margin: .25rem 0 0; }
.timeline-rail .event-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.resolve-page .field { margin-bottom: .9rem; }
.resolve-page .field:last-child { margin-bottom: 0; }
.resolve-page .field label { text-align: left; }
.priority-high { color: var(--danger); }
.priority-medium { color: var(--warn); }
.priority-low { color: var(--ok); }
.dash { max-width: none; }
.dash-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.dash-topline .page { margin-bottom: .15rem; }
.dash-topline .sub { margin: 0; }
.dash-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
}
.dash-period {
  display: inline-flex;
  flex-wrap: wrap;
  padding: .2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  justify-content: flex-end;
  max-width: min(100%, 42rem);
}
.dash-period-btn {
  display: inline-block;
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
}
.dash-period-btn:hover { background: var(--fog); color: var(--ink); }
.dash-period-btn.is-active {
  background: var(--teal);
  color: #fff;
}
.dash-clinic-table tfoot th {
  background: var(--fog);
  font-weight: 700;
}
.dash-clinic-table tr.is-selected td {
  background: #eff6ff;
}
.dash-stat-row,
.dash-chart-row,
.dash-widget-row {
  display: grid;
  gap: .9rem;
  margin-bottom: .9rem;
}
.dash-stat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dash-chart-row,
.dash-widget-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-stat,
.dash-card,
.dash-feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  min-width: 0;
}
.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  padding: .85rem .9rem .9rem;
  color: var(--ink);
  overflow: hidden;
}
a.dash-stat { color: var(--ink); }
a.dash-stat:hover {
  border-color: #93c5fd;
  color: var(--ink);
}
.dash-stat-icon {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  overflow: hidden;
}
.dash-stat-icon svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  display: block;
}
.dash-stat strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.dash-pill {
  display: inline-block;
  margin-top: auto;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.dash-stat.teal .dash-stat-icon,
.dash-stat.teal .dash-pill { background: #dbeafe; color: var(--teal-dark); }
.dash-stat.orange .dash-stat-icon,
.dash-stat.orange .dash-pill { background: #ffedd5; color: #c2410c; }
.dash-stat.cyan .dash-stat-icon,
.dash-stat.cyan .dash-pill { background: #cffafe; color: #0e7490; }
.dash-stat.blue .dash-stat-icon,
.dash-stat.blue .dash-pill { background: #dbeafe; color: var(--teal-dark); }
.dash-stat.pink .dash-stat-icon,
.dash-stat.pink .dash-pill { background: #fce7f3; color: #be185d; }
.dash-stat.indigo .dash-stat-icon,
.dash-stat.indigo .dash-pill { background: #e0e7ff; color: #3730a3; }
.dash-stat.slate .dash-stat-icon,
.dash-stat.slate .dash-pill { background: #e2e8f0; color: #1e3a5f; }
.dash-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.05rem .95rem;
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .7rem;
}
.dash-card-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1rem;
  color: var(--ink);
}
.dash-card-head p { margin: .2rem 0 0; font-size: .75rem; color: #64748b; }
.dash-delta {
  flex-shrink: 0;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.dash-delta.up { background: #d1fae5; color: #047857; }
.dash-delta.down { background: #fee2e2; color: #b91c1c; }
.dash-chart-wrap,
.dash-donut-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.dash-chart-wrap { height: 140px; max-height: 140px; overflow: hidden; }
.dash-donut-wrap { height: 180px; max-height: 180px; margin: 0 auto; max-width: 200px; overflow: hidden; }
.dash-chart-wrap canvas,
.dash-donut-wrap canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.dash-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dash-donut-center strong { font-size: 1.35rem; line-height: 1; }
.dash-donut-center span { font-size: .7rem; color: #64748b; margin-top: .2rem; }
.dash-chart-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.dash-chart-foot span { display: block; font-size: .7rem; color: #64748b; }
.dash-chart-foot strong { display: block; margin-top: .15rem; font-size: 1rem; color: var(--ink); }
.dash-vitals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.dash-vital {
  padding: .65rem .7rem;
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
a.dash-vital {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.dash-vital:hover { border-color: var(--teal); }
.dash-vital.has-items { border-color: #fca5a5; background: #fff7f7; }
.dash-vital span { display: block; font-size: .7rem; color: #64748b; }
.dash-vital strong { display: block; margin-top: .15rem; font-size: 1.15rem; color: var(--ink); }
.dash-card-link {
  font-size: .78rem;
  font-weight: 650;
  color: var(--teal);
  text-decoration: none;
}
.dash-card-link:hover { text-decoration: underline; }
.dash-alert-bar {
  margin-top: .85rem;
  padding: .65rem .75rem;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: .8rem;
  font-weight: 650;
}
a.dash-alert-bar {
  display: block;
  text-decoration: none;
}
a.dash-alert-bar:hover { filter: brightness(.97); }
.dash-alert-bar.is-ok { background: #d1fae5; color: #047857; }
.dash-feature {
  background: var(--ink);
  color: #fff;
  padding: 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
}
.dash-kicker {
  margin: 0 0 .3rem;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  font-weight: 650;
}
.dash-feature h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.3rem;
  color: #fff;
}
.dash-feature > p { margin: .35rem 0 0; color: rgba(255,255,255,.78); }
.dash-feature-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin: 1.2rem 0 1rem;
}
.dash-feature-meta strong { display: block; font-size: 1.3rem; }
.dash-feature-meta span { font-size: .72rem; color: rgba(255,255,255,.65); }
.dash-feature .btn {
  margin-top: auto;
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
}
.dash-feature .btn:hover { background: #e2e8f0; color: var(--ink); }
.dash-mix-card { align-items: stretch; }
.dash-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem .85rem;
  margin-top: .75rem;
  font-size: .75rem;
  color: #475569;
}
.dash-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: .35rem;
}
.dash-legend .denial::before { background: #ef4444; }
.dash-legend .pa::before { background: var(--teal); }
.dash-legend .elig::before { background: var(--cyan); }
.dash-table-panel { margin-top: .15rem; }
.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: .8rem;
}
.table-pager nav {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.table-pager a,
.table-pager .is-current {
  display: inline-flex;
  min-width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 .5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.table-pager .is-current {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.audit-table td { vertical-align: top; }
.audit-when { white-space: nowrap; }
.audit-details { max-width: 28rem; }
.audit-changes {
  margin: .45rem 0 0;
  padding: 0;
  list-style: none;
}
.audit-changes li {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .4rem;
  align-items: baseline;
  margin-top: .3rem;
  font-size: .8rem;
}
.audit-field {
  color: #64748b;
  font-weight: 650;
  min-width: 5.5rem;
}
.audit-old {
  color: #9f1239;
  text-decoration: line-through;
  background: #fff1f2;
  border-radius: 4px;
  padding: .05rem .35rem;
}
.audit-arrow { color: #94a3b8; }
.audit-new {
  color: var(--teal-dark);
  background: #eff6ff;
  border-radius: 4px;
  padding: .05rem .35rem;
  font-weight: 650;
}
.work-queue-table td { vertical-align: top; }
.work-queue-table .work-item-title {
  font-weight: 650;
  line-height: 1.35;
}
.work-queue-table .work-due {
  white-space: nowrap;
  width: 8.5rem;
}
.work-queue-table th:last-child,
.work-queue-table td:last-child {
  width: 8.5rem;
  white-space: nowrap;
}
.ar-queue-table td { vertical-align: top; }
.ar-followup-cell { min-width: 18rem; max-width: 26rem; }
.ar-history-list {
  margin: 0 0 .65rem;
  padding: 0;
  list-style: none;
}
.ar-history-list li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}
.ar-history-list li:last-child { border-bottom: 0; }
.ar-history-head {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  align-items: baseline;
}
.ar-followup-add { margin: .35rem 0 .55rem; }
.ar-followup-add summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 650;
  font-size: .85rem;
}
.ar-followup-form {
  display: grid;
  gap: .45rem;
  margin-top: .55rem;
}
.ar-followup-form .field { margin: 0; }
.ar-paid-form { margin-top: .35rem; }
@media (max-width: 1100px) {
  .dash-stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar,
  body.sidebar-collapsed .sidebar { width: 100%; }
  body.sidebar-collapsed .brand-tagline { display: block; }
  body.sidebar-collapsed .nav-label { display: inline; }
  body.sidebar-collapsed .nav .section { display: block; }
  body.sidebar-collapsed .nav a,
  body.sidebar-collapsed .nav-link,
  body.sidebar-collapsed .brand .sidebar-toggle { justify-content: flex-start; }
  body.sidebar-collapsed .brand .sidebar-toggle svg { transform: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid, .plan-grid, .decision-grid, .metric-grid, .meta-grid, .source-grid { grid-template-columns: 1fr 1fr; }
  .cpt-row { grid-template-columns: 1fr; }
  .action-hero, .recommend-bar, .panel-head { flex-direction: column; align-items: flex-start; }
  .hero-meta { align-items: flex-start; }
  .security-grid { grid-template-columns: 1fr; }
  .dash-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-chart-row,
  .dash-widget-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .metric-grid, .meta-grid, .source-grid, .decision-grid, .plan-grid { grid-template-columns: 1fr; }
  .dash-stat-row { grid-template-columns: 1fr; }
  .backup-codes { grid-template-columns: 1fr; }
  .security-confirm .mfa-code { max-width: none; }
}
