:root {
  color-scheme: light;
  --classic-blue: #0f4c81;
  --classic-blue-lt: #e8f0f9;
  --classic-blue-md: #d0e2f4;
  --fern: #4a7244;
  --fern-lt: #eff5ec;
  --fern-md: #d5e8d1;
  --cerulean: #2e7bad;
  --cerulean-lt: #ebf4f8;
  --cerulean-md: #c8e3f0;
  --tangerine: #f28a30;
  --tangerine-dk: #c06010;
  --tangerine-lt: #fef0e5;
  --whitecap: #f5f3ee;
  --whitecap-dk: #ddd8cf;
  --whitecap-dkr: #c4bfb5;
  --ink: #1a2530;
  --muted: #5e6875;
  --soft: #8a9097;
  --line: var(--whitecap-dk);
  --page: var(--whitecap);
  --panel: #ffffff;
  --panel-soft: #fbfaf7;
  --nav: var(--classic-blue);
  --nav-2: #1b6096;
  --mint: var(--fern);
  --sage: var(--fern-md);
  --aqua: var(--cerulean);
  --clay: var(--tangerine);
  --amber: #d69a2d;
  --rose: var(--tangerine-dk);
  --shadow: 0 16px 36px rgba(15, 76, 129, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 76, 129, 0.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

button,
select,
input,
a {
  font: inherit;
}

button,
select,
input {
  color: var(--ink);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  background: var(--nav);
  color: #f8faf8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--classic-blue-lt);
  color: var(--classic-blue);
  font-weight: 900;
}

.brand p,
.brand h1,
.hero h2,
.panel h3,
.guardrail h2,
.filters p,
.filter-block label {
  margin: 0;
}

.brand p,
.eyebrow,
.filter-block > span,
.filter-block label,
th {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
}

.brand h1 {
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.nav-list a.active,
.nav-list a:hover {
  background: var(--nav-2);
  color: #ffffff;
}

.guardrail {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.guardrail h2 {
  font-size: 13px;
}

.guardrail p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.logout-button {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dashboard {
  margin-left: 248px;
  padding: 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: stretch;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(15, 76, 129, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 248, 0.94)),
    linear-gradient(90deg, rgba(15, 76, 129, 0.08), rgba(242, 138, 48, 0.08));
  box-shadow: var(--shadow-soft);
}

.hero-main {
  display: grid;
  align-content: center;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-kicker span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 76, 129, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--classic-blue);
  font-size: 11px;
  font-weight: 850;
}

.hero-kicker span:first-child {
  background: var(--classic-blue-lt);
}

.eyebrow {
  margin: 0 0 6px;
  color: #73827f;
  font-size: 11px;
  font-weight: 850;
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.12;
  font-weight: 820;
}

.hero-copy {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tags span {
  border-color: rgba(74, 114, 68, 0.16);
  background: rgba(239, 245, 236, 0.74);
  color: var(--fern);
}

.period-card,
.filters,
.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.period-card {
  display: grid;
  align-content: stretch;
  gap: 12px;
  padding: 16px;
  border-color: rgba(15, 76, 129, 0.16);
  border-top: 0;
  background: rgba(255, 255, 255, 0.86);
}

.period-card span,
.period-card small,
.kpi-card span,
.kpi-card small,
.note,
.filters p {
  color: var(--muted);
}

.period-card span {
  font-size: 12px;
  font-weight: 800;
}

.period-card strong {
  color: var(--classic-blue);
  font-size: 20px;
  line-height: 1.22;
}

.period-card small {
  font-size: 12px;
  line-height: 1.45;
}

.period-meta {
  display: grid;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.period-meta small {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
}

.period-meta b {
  color: var(--ink);
  font-weight: 760;
}

.refresh-button {
  min-height: 36px;
  border: 1px solid var(--classic-blue-md);
  border-radius: 7px;
  background: var(--classic-blue-lt);
  color: var(--classic-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.refresh-button:hover {
  border-color: var(--classic-blue);
  background: #ffffff;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.refresh-status {
  min-height: 17px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.refresh-status.error {
  color: #a14e3b;
}

.filters {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px;
  backdrop-filter: blur(10px);
}

.filter-block {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.filter-block > span,
.filter-block label {
  color: #596b67;
  font-size: 10px;
  font-weight: 850;
}

.preset-row,
.branch-row,
.date-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preset-row button,
.branch-row label,
select,
input[type="date"] {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: none;
}

.preset-row button {
  cursor: pointer;
  padding: 0 11px;
  color: #344340;
  font-size: 13px;
  font-weight: 760;
}

.preset-row button.active,
.preset-row button:hover {
  border-color: var(--classic-blue-md);
  background: var(--classic-blue-lt);
  color: var(--classic-blue);
}

.date-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.date-filter label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

select,
input[type="date"] {
  width: 100%;
  padding: 0 10px;
  color: #344340;
  font-size: 13px;
  font-weight: 700;
}

.branch-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  cursor: pointer;
  color: #344340;
  font-size: 13px;
  font-weight: 760;
}

.branch-row input {
  width: 14px;
  height: 14px;
  accent-color: var(--mint);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 15px;
  position: relative;
  overflow: hidden;
  border-top: 0;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
}

.kpi-card span {
  font-size: 12px;
  font-weight: 820;
}

.kpi-card strong {
  font-size: clamp(22px, 2.3vw, 31px);
  line-height: 1;
  font-weight: 850;
}

.kpi-card small {
  font-size: 12px;
}

.kpi-card:nth-child(1)::before {
  background: var(--fern);
}

.kpi-card:nth-child(2)::before {
  background: var(--cerulean);
}

.kpi-card:nth-child(3)::before {
  background: var(--tangerine);
}

.kpi-card:nth-child(4)::before {
  background: var(--classic-blue);
}

.kpi-card:nth-child(5)::before {
  background: var(--tangerine-dk);
}

.kpi-card:nth-child(1) strong {
  color: var(--mint);
}

.kpi-card:nth-child(2) strong {
  color: var(--aqua);
}

.kpi-card:nth-child(3) strong {
  color: var(--clay);
}

.kpi-card:nth-child(4) strong {
  color: var(--amber);
}

.kpi-card:nth-child(5) strong {
  color: var(--rose);
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  grid-column: span 4;
  padding: 18px;
  overflow: hidden;
}

.panel.wide {
  grid-column: span 8;
}

.panel.full {
  grid-column: span 12;
}

.insight-panel {
  background: var(--panel);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h3 {
  font-size: 18px;
  line-height: 1.22;
  font-weight: 820;
}

.chip {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--classic-blue-lt);
  color: var(--classic-blue);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.clinic-bars {
  display: grid;
  gap: 12px;
}

.clinic-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.clinic-title,
.clinic-metrics,
.payer-card > div,
.stack-row > div,
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clinic-title strong {
  font-size: 17px;
}

.clinic-title span {
  display: inline-grid;
  place-items: center;
  min-height: 29px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--fern-lt);
  color: var(--mint);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.clinic-metrics {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.progress {
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--whitecap);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.clinic-row:nth-child(2) .progress span,
.payer-card:nth-child(2) .progress span {
  background: var(--aqua);
}

.clinic-row:nth-child(3) .progress span,
.payer-card:nth-child(3) .progress span {
  background: var(--clay);
}

.payer-card:nth-child(4) .progress span {
  background: var(--amber);
}

.insight-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344340;
  font-size: 13px;
  line-height: 1.52;
}

.weekly-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.weekly-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.weekly-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.weekly-card-title span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.weekly-card-title strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.weekly-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.weekly-metrics div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.weekly-metrics span,
.weekly-progress-group small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.weekly-metrics strong {
  min-width: 0;
  overflow: hidden;
  color: var(--classic-blue);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.weekly-progress-group {
  display: grid;
  gap: 10px;
}

.weekly-progress-group > div {
  display: grid;
  gap: 6px;
}

.chart {
  min-height: 292px;
}

.chart svg {
  width: 100%;
  height: 330px;
}

.chart .axis {
  stroke: var(--whitecap-dk);
  stroke-width: 1;
}

.chart .grid-line {
  stroke: var(--whitecap-dk);
  stroke-width: 1;
}

.chart .line {
  fill: none;
  stroke: var(--mint);
  stroke-width: 3.5;
}

.chart .clinic-line {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area {
  fill: rgba(24, 169, 153, 0.1);
}

.chart circle {
  fill: #ffffff;
  stroke: var(--mint);
  stroke-width: 3;
}

.chart text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.chart .axis-label {
  fill: var(--soft);
  font-size: 10px;
  font-weight: 720;
}

.chart .series-label {
  font-size: 12px;
  font-weight: 850;
}

.chart-note {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

[aria-busy="true"] {
  opacity: 0.62;
  transition: opacity 0.18s ease;
}

.ops-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-detail-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.package-demand-card {
  grid-column: 1 / -1;
}

.ops-detail-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.ops-detail-title b {
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
}

.ops-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ops-kpi-strip div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.ops-kpi-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-kpi-strip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ops-chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.ops-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.ops-demand-chart {
  width: 100%;
  height: 245px;
}

.ops-demand-chart .axis,
.ops-demand-chart .grid-line {
  stroke: var(--whitecap-dk);
  stroke-width: 1;
}

.ops-demand-chart text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.ops-demand-chart .axis-label {
  fill: var(--soft);
  font-size: 10px;
}

.ops-package-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.ops-matrix-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ops-package-matrix {
  min-width: 680px;
}

.ops-package-matrix th,
.ops-package-matrix td {
  padding: 10px 12px;
}

.ops-package-matrix td:first-child {
  color: var(--ink);
  font-weight: 820;
}

.ops-package-matrix td:not(:first-child) {
  text-align: right;
}

.ops-package-matrix strong,
.ops-package-matrix small {
  display: block;
}

.ops-package-matrix small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.muted-dash {
  color: var(--soft);
  font-weight: 760;
}

.ops-package-trend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ops-detail-disclosure {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.ops-detail-disclosure summary {
  cursor: pointer;
  color: var(--classic-blue);
  font-size: 12px;
  font-weight: 850;
}

.ops-detail-disclosure table {
  margin-top: 10px;
}

.ops-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ops-detail-table {
  min-width: 620px;
}

.ops-detail-table th,
.ops-detail-table td {
  padding: 9px 10px;
  font-size: 12px;
}

.ops-detail-table td:nth-child(n + 3),
.ops-detail-table th:nth-child(n + 3) {
  text-align: right;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.chart-legend b {
  color: var(--ink);
  font-weight: 850;
}

.empty-state {
  margin: 0;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

.stack-list,
.mini-bars,
.rank-list,
.target-cards {
  display: grid;
  gap: 10px;
}

.target-matrix {
  overflow-x: auto;
}

.target-table {
  min-width: 1120px;
}

.target-table th,
.target-table td {
  text-align: center;
}

.target-table th:first-child,
.target-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
  text-align: left;
  font-weight: 850;
}

.target-table .overall-row td {
  background: var(--classic-blue-lt);
  font-weight: 780;
}

.target-table .overall-row td:first-child {
  background: var(--classic-blue-lt);
}

.target-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.target-pill {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef6f4;
  color: #53615d;
  font-size: 12px;
  font-weight: 850;
}

.target-pill.good {
  background: var(--fern-lt);
  color: var(--fern);
}

.target-pill.watch {
  background: #fff6dc;
  color: #997120;
}

.target-pill.behind {
  background: #fff0ee;
  color: #b9554d;
}

.target-pill.future {
  background: #eef7f5;
  color: #8a9692;
}

.target-pill.closed {
  background: var(--whitecap);
  color: var(--soft);
}

.target-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.target-card.primary {
  background: var(--classic-blue-lt);
  border-color: var(--classic-blue-md);
}

.target-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.target-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.target-card strong {
  color: var(--mint);
  font-size: 23px;
}

.target-card small {
  color: var(--muted);
  font-size: 12px;
}

.progress span.good {
  background: var(--mint);
}

.progress span.watch {
  background: var(--amber);
}

.progress span.behind {
  background: var(--rose);
}

.stack-row {
  display: grid;
  gap: 7px;
}

.stack-row span,
.payer-card span,
.rank-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.stack-row strong,
.payer-card strong {
  font-size: 15px;
}

.mini-bars .stack-row strong {
  color: var(--mint);
}

.note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

table.compact-table {
  min-width: 0;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

td {
  color: #344340;
  font-size: 13px;
}

td:nth-child(n + 3),
th:nth-child(n + 3) {
  text-align: right;
}

tr:hover td {
  background: var(--whitecap);
}

.chronic-diagnosis-row td {
  background: var(--fern-lt);
  border-bottom-color: var(--fern-md);
}

.chronic-diagnosis-row:hover td {
  background: var(--fern-md);
}

.chronic-diagnosis-row td:first-child {
  color: var(--fern);
  font-weight: 820;
}

.chronic-tag {
  display: inline-grid;
  place-items: center;
  min-height: 21px;
  margin-left: 9px;
  padding: 0 8px;
  border: 1px solid var(--fern-md);
  border-radius: 999px;
  background: #ffffff;
  color: var(--fern);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.patient-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.patient-metrics div,
.payer-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.patient-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.patient-metrics strong {
  color: var(--mint);
  font-size: 25px;
}

.payer-mix {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.payer-source-mix {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(220px, 0.72fr));
  gap: 14px;
  align-items: stretch;
}

.payer-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-card-list {
  align-content: start;
}

.payer-card small {
  color: var(--muted);
  font-size: 12px;
}

.payer-donut-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.subsidy-donut-card,
.corporate-donut-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 12px;
}

.subsidy-donut-card {
  border: 1px solid var(--fern-md);
  background: var(--fern-lt);
}

.corporate-donut-card {
  border: 1px solid rgba(46, 123, 173, 0.24);
  background: #f3f8fb;
}

.subsidy-donut-card > div:first-child,
.corporate-donut-card > div:first-child,
.payer-donut-card > div:first-child {
  justify-self: stretch;
}

.mini-title {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.payer-donut-card small {
  color: var(--muted);
  font-size: 12px;
}

.payer-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(190px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--payer-gradient));
}

.payer-donut::before {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: var(--panel-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.payer-donut span,
.payer-donut small {
  position: relative;
  z-index: 1;
}

.payer-donut span {
  align-self: end;
  color: var(--classic-blue);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.payer-donut small {
  align-self: start;
  max-width: 110px;
  margin-top: 5px;
  text-align: center;
  line-height: 1.25;
}

.payer-donut-legend {
  display: grid;
  gap: 8px;
  width: 100%;
}

.payer-donut-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.payer-donut-legend i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.payer-donut-legend b {
  margin-left: auto;
  color: var(--ink);
  font-weight: 850;
}

.subsidy-mix {
  display: grid;
  gap: 13px;
}

.corporate-donut,
.subsidy-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(190px, 100%);
  aspect-ratio: 1;
  margin: 2px auto 4px;
  border-radius: 50%;
  background: conic-gradient(var(--subsidy-gradient));
}

.corporate-donut {
  background: conic-gradient(var(--corporate-gradient));
}

.corporate-donut::before,
.subsidy-donut::before {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: var(--fern-lt);
  box-shadow: inset 0 0 0 1px var(--line);
}

.corporate-donut::before {
  background: #f3f8fb;
}

.corporate-donut span,
.corporate-donut small,
.subsidy-donut span,
.subsidy-donut small {
  position: relative;
  z-index: 1;
}

.corporate-donut span,
.subsidy-donut span {
  align-self: end;
  color: var(--fern);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.corporate-donut span {
  color: var(--classic-blue);
}

.corporate-donut small,
.subsidy-donut small {
  align-self: start;
  max-width: 112px;
  margin-top: 5px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.subsidy-total {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--fern-md);
  border-radius: 10px;
  background: var(--fern-lt);
}

.subsidy-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.subsidy-total strong {
  color: var(--fern);
  font-size: 21px;
}

.medication-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.med-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.med-summary div,
.med-table-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.med-summary div {
  display: grid;
  gap: 4px;
  min-height: 94px;
  padding: 12px;
}

.med-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 830;
  text-transform: uppercase;
}

.med-summary strong {
  color: var(--classic-blue);
  font-size: 24px;
  line-height: 1.08;
}

.med-summary small,
.med-table-card small {
  color: var(--muted);
  font-size: 12px;
}

.med-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.med-table-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.med-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.med-card-title > b {
  color: var(--classic-blue);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.med-list {
  display: grid;
  gap: 10px;
}

.med-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.med-row > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--classic-blue-lt);
  color: var(--classic-blue);
  font-size: 11px;
  font-weight: 850;
}

.med-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.med-row b {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--classic-blue);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.med-row b small {
  color: var(--fern);
  font-size: 11px;
  font-weight: 850;
}

.subsidy-list {
  display: grid;
  gap: 10px;
}

.subsidy-row {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.subsidy-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subsidy-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.subsidy-row i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.subsidy-row strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.subsidy-row small {
  color: var(--muted);
  font-size: 12px;
}

.summary-row td {
  background: var(--classic-blue-lt);
  font-weight: 820;
}

.chronic-share-table th,
.chronic-share-table td {
  padding: 10px 7px;
  white-space: nowrap;
}

.chronic-share-table th {
  font-size: 10px;
}

.chronic-share-table td:nth-child(n + 2),
.chronic-share-table th:nth-child(n + 2) {
  text-align: right;
}

.patient-intensity-table th,
.patient-intensity-table td {
  padding: 10px 7px;
  white-space: nowrap;
}

.patient-intensity-table th {
  font-size: 10px;
}

.patient-intensity-table td:nth-child(n + 2),
.patient-intensity-table th:nth-child(n + 2) {
  text-align: right;
}

.metric-explainer {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--fern-md);
  border-radius: 8px;
  background: var(--fern-lt);
}

.metric-explainer p {
  margin: 0;
  color: #3c4c48;
  font-size: 12px;
  line-height: 1.45;
}

.metric-explainer strong {
  color: var(--fern);
  font-weight: 850;
}

.rate-pill {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--fern-lt);
  color: var(--fern);
  font-size: 12px;
  font-weight: 850;
}

.payer-card:nth-child(1) strong {
  color: var(--mint);
}

.payer-card:nth-child(2) strong {
  color: var(--aqua);
}

.payer-card:nth-child(3) strong {
  color: var(--clay);
}

.payer-card:nth-child(4) strong {
  color: var(--amber);
}

.rank-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--classic-blue-lt);
  color: var(--mint);
  font-size: 12px;
  font-weight: 850;
}

.rank-row div {
  min-width: 0;
  flex: 1;
}

.rank-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.rank-row b {
  white-space: nowrap;
  font-size: 13px;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  width: min(100%, 430px);
}

.login-panel {
  display: grid;
  gap: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-brand .brand-mark {
  background: var(--classic-blue-lt);
}

.login-brand p {
  color: var(--muted);
}

.login-brand h1,
.login-copy h2 {
  color: var(--ink);
}

.login-copy h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.login-copy p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #596b67;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.login-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--mint);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
}

.login-form button:hover {
  background: #24796f;
}

.login-error {
  min-height: 18px;
  margin: -3px 0 0;
  color: #a14e3b;
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .dashboard {
    margin-left: 0;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }

  .guardrail {
    margin-top: 0;
  }

  .hero,
  .filters {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payer-source-mix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .medication-grid,
  .med-rank-grid,
  .ops-detail-grid,
  .ops-package-layout,
  .weekly-report-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .panel.wide,
  .panel.full {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .dashboard,
  .sidebar {
    padding: 16px;
  }

  .hero h2 {
    font-size: 27px;
  }

  .filters {
    position: static;
  }

  .kpi-grid,
  .nav-list,
  .payer-mix,
  .payer-source-mix,
  .payer-card-list,
  .med-summary,
  .med-rank-grid,
  .weekly-metrics,
  .ops-kpi-strip,
  .ops-package-layout,
  .patient-metrics,
  .date-filter {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .clinic-title,
  .clinic-metrics,
  .payer-card > div,
  .stack-row > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .chip {
    white-space: normal;
  }

  table {
    min-width: 610px;
  }

  table.compact-table {
    min-width: 0;
  }
}
