:root {
  --navy: #052f68;
  --blue: #0b5cb8;
  --teal: #07949a;
  --teal-dark: #00777d;
  --gold: #e1a106;
  --ink: #14213d;
  --muted: #607087;
  --line: #bfd0e3;
  --page: #eef3f8;
  --soft-blue: #eaf4ff;
  --soft-teal: #eafafa;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(7,148,154,.09), transparent 36rem),
    linear-gradient(180deg, #f8fbfe 0%, var(--page) 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a { text-decoration: none; }

.app-navbar {
  background: linear-gradient(90deg, #031d43, #075498);
  box-shadow: 0 4px 18px rgba(6,47,104,.2);
}

.app-navbar .navbar-brand {
  font-weight: 900;
  letter-spacing: .01em;
}

.app-navbar .nav-link {
  border-radius: 8px;
  color: rgba(255,255,255,.82);
  font-weight: 700;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.13);
}

.user-menu {
  min-width: 210px;
}

.user-role-badge {
  color: #fff;
  background: rgba(255,255,255,.14);
}

.firebase-notice {
  border: 1px solid #e1b545;
  background: #fff9df;
}

.page-shell {
  width: min(100%, 1720px);
  margin: 0 auto;
}

.hero-panel {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 22px 28px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(105deg, #032452, #063f7f 70%, #032b5e);
  box-shadow: 0 14px 34px rgba(5,47,104,.18);
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  top: -36px;
  width: 36px;
  height: 190px;
  content: "";
  transform: skewX(-35deg);
}

.hero-panel::before {
  right: 18%;
  background: var(--gold);
}

.hero-panel::after {
  right: 12%;
  background: var(--teal);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #f3b31a;
  border-radius: 50%;
  font-size: 31px;
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  font-weight: 900;
}

.hero-panel p {
  margin: 4px 0 0;
  color: #ffc441;
  font-size: clamp(.95rem, 1.8vw, 1.25rem);
  font-style: italic;
}

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

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

.kpi-card {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(5,47,104,.07);
}

.kpi-card .icon {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
}

.kpi-card.blue { color: var(--navy); }
.kpi-card.blue .icon { background: linear-gradient(135deg, #062e69, #0b5fb8); }
.kpi-card.teal { color: var(--teal-dark); }
.kpi-card.teal .icon { background: linear-gradient(135deg, #047b82, #14afb2); }
.kpi-card.gold { color: #bd8000; }
.kpi-card.gold .icon { background: linear-gradient(135deg, #d79000, #edb61e); }
.kpi-card.purple { color: #4e42a5; }
.kpi-card.purple .icon { background: linear-gradient(135deg, #433789, #6657bc); }

.kpi-label {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .03em;
}

.kpi-value {
  margin-top: 3px;
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
  font-weight: 900;
  line-height: 1.1;
}

.content-card {
  overflow: hidden;
  border: 1px solid #a9bbcf;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 17px rgba(5,47,104,.07);
}

.card-titlebar {
  padding: 9px 15px;
  color: #fff;
  background: linear-gradient(90deg, #073b7c, #063568);
  font-weight: 900;
  letter-spacing: .02em;
}

.card-titlebar.teal {
  background: linear-gradient(90deg, #007b80, #078f95);
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid #d6e0ea;
  background: #f7fbff;
}

.toolbar .search-box {
  min-width: 240px;
  flex: 1 1 300px;
}

.toolbar select {
  min-width: 165px;
}

.data-table {
  min-width: 1500px;
  font-size: .78rem;
}

.data-table.compact {
  min-width: 1050px;
}

.data-table thead th {
  padding: 10px 8px;
  border-color: rgba(255,255,255,.35);
  color: #fff;
  background: #7790b5;
  font-size: .72rem;
  text-align: center;
  vertical-align: middle;
}

.data-table tbody td,
.data-table tbody th {
  padding: 8px;
  border-color: #d5dde7;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #f2f8fd;
}

.data-table tfoot th {
  padding: 10px 8px;
  color: #062f68;
  border-color: #9fb5cd;
  background: #dbe5f1;
}

.program-cell {
  min-width: 270px;
  white-space: normal;
}

.group-cell {
  min-width: 180px;
  white-space: normal;
}

.rate-pill {
  display: inline-flex;
  min-width: 67px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: #07558d;
  background: #e8f1fb;
  font-weight: 900;
}

.rate-pill.after,
.highlight-rate {
  color: #014bc5 !important;
  font-weight: 900;
}

.action-buttons {
  display: inline-flex;
  gap: 5px;
}

.action-buttons .btn {
  width: 31px;
  height: 31px;
  padding: 0;
}

.empty-state {
  padding: 34px 12px !important;
  color: var(--muted);
  text-align: center;
}

.modal-header-brand {
  color: #fff;
  background: linear-gradient(90deg, #052f68, #087c83);
}

.btn-brand {
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, #07508f, #078b8f);
}

.btn-brand:hover {
  color: #fff;
  background: linear-gradient(90deg, #063f74, #06767a);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px 14px;
  padding: 12px;
  border: 1px dashed #9db8cf;
  border-radius: 9px;
  background: #f4f9fd;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(360px,1fr);
  gap: 16px;
}

.chart-box {
  height: 330px;
  padding: 14px;
}

.split-body {
  display: grid;
  min-height: 330px;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.donut-wrap {
  position: relative;
  height: 280px;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 150px;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: .74rem;
  font-weight: 800;
}

.donut-center strong {
  margin-top: 4px;
  font-size: 1rem;
}

.split-item {
  display: flex;
  gap: 12px;
}

.split-dot {
  width: 17px;
  height: 17px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.split-name { font-weight: 900; }
.split-percent { font-size: 1.85rem; font-weight: 900; line-height: 1; }
.split-amount { margin-top: 5px; color: var(--ink); }
.split-separator { height: 1px; margin: 22px 0; background: #a4b1c0; }

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

.source-summary {
  padding: 18px;
}

.source-summary h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
}

.source-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  margin: 0;
}

.source-summary dt { color: var(--muted); }
.source-summary dd { margin: 0; font-weight: 900; }

.insight-list {
  padding: 10px 20px;
  background: linear-gradient(#f2ffff, #f7fdfd);
}

.insight-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid #b5c5cd;
}

.insight-item:last-child { border-bottom: 0; }

.insight-check {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-dark);
  font-size: 12px;
}

.source-badge {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
}

.source-badge.current {
  color: #064c8f;
  background: #e5f1ff;
}

.source-badge.continuing {
  color: #007278;
  background: #e3f8f7;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100%;
  align-items: center;
  overflow: hidden;
  padding: 50px;
  color: #fff;
  background: linear-gradient(135deg, #032452, #064d91 62%, #047f88);
}

.auth-brand::before,
.auth-brand::after {
  position: absolute;
  width: 80px;
  height: 480px;
  content: "";
  transform: rotate(35deg);
}

.auth-brand::before {
  top: -130px;
  right: 60px;
  background: rgba(225,161,6,.9);
}

.auth-brand::after {
  top: -100px;
  right: -30px;
  background: rgba(7,148,154,.75);
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.auth-logo {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  margin-bottom: 24px;
  border: 2px solid #f3b31a;
  border-radius: 50%;
  font-size: 38px;
}

.auth-brand h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
}

.auth-brand p {
  max-width: 500px;
  color: #cfe5ff;
  font-size: 1.08rem;
  line-height: 1.6;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 34px;
  background: #f8fbfe;
}

.auth-card {
  width: min(100%, 540px);
  padding: 34px;
  border: 1px solid #c5d4e4;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(5,47,104,.14);
}

.auth-card h2 {
  color: var(--navy);
  font-weight: 900;
}

.app-footer {
  color: #6b7d90;
  font-size: .75rem;
}

@media (max-width: 1250px) {
  .kpi-grid,
  .kpi-grid.six {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 340px;
    padding: 34px;
  }

  .summary-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .hero-panel {
    padding: 20px;
  }

  .hero-icon {
    width: 54px;
    height: 54px;
    font-size: 23px;
  }

  .kpi-grid,
  .kpi-grid.six {
    grid-template-columns: 1fr;
  }

  .split-body {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    padding: 18px;
  }

  .auth-card {
    padding: 24px;
  }
}

@media print {
  @page { size: landscape; margin: 8mm; }

  body { background: #fff !important; }
  .app-navbar, .no-print, .modal, .toast-container, .firebase-notice { display: none !important; }
  .page-shell { width: 100%; max-width: none; }
  .hero-panel { box-shadow: none; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .chart-grid { grid-template-columns: 1.4fr 1fr; }
  .content-card { box-shadow: none; break-inside: avoid; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* Filter-responsive summary status */
#visibleCount {
  white-space: nowrap;
  font-weight: 700;
}


/* Current financial analytics by group */
.group-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid #b7c9db;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(5,47,104,.07);
  scrollbar-width: thin;
}

.group-subnav .group-link {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #a9bdd3;
  border-radius: 999px;
  color: #073b7c;
  background: #f4f8fc;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.group-subnav .group-link:hover,
.group-subnav .group-link.active {
  color: #fff;
  border-color: #07598e;
  background: linear-gradient(90deg,#07508f,#078b8f);
}

.analytics-header-note {
  color: #6f8196;
  font-size: .8rem;
}

.group-chart-grid {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr);
  gap: 16px;
}

.group-chart-box {
  height: 350px;
  padding: 14px;
}

.group-table {
  min-width: 1150px;
  font-size: .78rem;
}

.group-table thead th {
  padding: 10px 8px;
  color: #fff;
  background: #7790b5;
  border-color: rgba(255,255,255,.32);
  font-size: .71rem;
  text-align: center;
  vertical-align: middle;
}

.group-table tbody td,
.group-table tbody th,
.group-table tfoot th {
  padding: 9px 8px;
  border-color: #d6dee8;
  vertical-align: middle;
}

.group-table tfoot th {
  color: #073b7c;
  background: #e3f1fe;
}

.group-rank {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0b5cb8;
  font-size: .7rem;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .group-chart-grid { grid-template-columns: 1fr; }
}


.data-table thead th.sortable { padding: 0; }
.sort-button {
  display: flex; width: 100%; min-height: 58px; align-items: center;
  justify-content: center; gap: 7px; padding: 10px 8px; border: 0;
  color: inherit; background: transparent; font: inherit; font-weight: inherit;
  line-height: 1.25; text-align: center; cursor: pointer;
}
.sort-button:hover, .sort-button:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.sort-button i { flex: 0 0 auto; opacity: .9; font-size: .78rem; }
.rate-pill.unutilized { color: #8b5b00; background: #fff3d4; }

/* Excel-powered disbursement import and analytics */
.excel-import-status .dataset-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 16px;
  background: #fff;
}

.dataset-meta-grid > div,
.import-preview-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d4e0ec;
  border-radius: 9px;
  background: #f8fbfe;
}

.dataset-meta-grid span,
.import-preview-grid span {
  color: #687a90;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.dataset-meta-grid strong,
.import-preview-grid strong {
  overflow: hidden;
  color: #073b7c;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.import-sample-table {
  min-width: 960px;
  font-size: .78rem;
}

.import-sample-table thead th {
  color: #fff;
  background: #7790b5;
  text-align: center;
  vertical-align: middle;
}

.transaction-table {
  min-width: 2250px;
  font-size: .73rem;
}

.transaction-table .payee-cell {
  min-width: 190px;
  white-space: normal;
}

.transaction-table .nature-cell {
  min-width: 310px;
  max-width: 420px;
  white-space: normal;
}

.transaction-table .pap-cell {
  min-width: 220px;
  white-space: normal;
}

.page-size-select {
  min-width: 120px !important;
  max-width: 135px;
}

.pagination-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-top: 1px solid #d5e0ea;
  background: #f7fbff;
}

.monthly-chart-box {
  height: 320px;
}

.class-legend {
  display: grid;
  gap: 12px;
  align-content: center;
}

.class-legend-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 9px;
  align-items: start;
}

.class-legend-item > div {
  display: grid;
  gap: 2px;
}

.class-legend-item strong {
  color: #17345b;
  font-size: .82rem;
}

.class-legend-item span:not(.class-legend-dot) {
  color: #66798f;
  font-size: .76rem;
}

.class-legend-dot {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
}

.legend-0 { background: #0b5cb8; }
.legend-1 { background: #07949a; }
.legend-2 { background: #e1a106; }
.legend-3 { background: #4e42a5; }
.legend-4 { background: #a64b73; }
.legend-5 { background: #6d7f91; }

.source-badge.unmapped {
  color: #754f00;
  background: #fff1c9;
}

#importProgressWrap .progress {
  height: 20px;
}

@media (max-width: 1100px) {
  .excel-import-status .dataset-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .excel-import-status .dataset-meta-grid,
  .import-preview-grid {
    grid-template-columns: 1fr;
  }

  .pagination-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Utilization Summary */
.utilization-summary-table {
  min-width: 1420px;
  font-size: .82rem;
}

.utilization-summary-table thead th {
  padding: 14px 9px;
  color: #fff;
  background: #8198ba;
  border-color: #aebdd0;
  font-size: .76rem;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}

.utilization-summary-table thead th:first-child,
.utilization-summary-table thead th:nth-child(2) {
  color: #111;
  background: #d8e0eb;
  font-style: italic;
  font-weight: 500;
}

.utilization-summary-table tbody td,
.utilization-summary-table tbody th,
.utilization-summary-table tfoot th {
  padding: 8px 9px;
  border-color: #ccd5e0;
  vertical-align: middle;
}

.utilization-summary-table .fund-source-cell,
.utilization-summary-table .allotment-class-cell {
  background: #f2f4f7;
}

.collapse-marker {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-right: 7px;
  border-radius: 4px;
  color: #fff;
  background: #7891ad;
  font-weight: 900;
}

.utilization-summary-table .source-total-row th {
  color: #13243d;
  background: #d9e1ec;
  border-top: 1px solid #6d7c90;
}

.utilization-summary-table .grand-total-row th {
  color: #07162a;
  background: #d3dce8;
  border-top: 3px double #1d2938;
  font-weight: 900;
}

.utilization-summary-table .after-caf-rate {
  color: #014bc5;
  font-weight: 900;
}

.consolidated-table thead th:first-child {
  color: #fff;
  background: #8198ba;
  font-style: normal;
  font-weight: 800;
}

@media print {
  .utilization-summary-table {
    min-width: 0;
    font-size: .65rem;
  }

  .utilization-summary-card,
  .consolidated-table {
    break-inside: avoid;
  }
}


/* Utilization Summary Add Record */
#summaryRecordModal .modal-dialog {
  max-width: 1140px;
}

#summaryRecordModal .preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 650px) {
  #summaryRecordModal .preview-grid {
    grid-template-columns: 1fr;
  }
}


/* Utilization Summary detailed CRUD table */
.summary-records-table {
  min-width: 1860px;
  font-size: .76rem;
}

.summary-records-table thead th {
  white-space: normal;
}

.summary-records-table .source-badge {
  min-width: 82px;
}

#summaryRecordModal .modal-dialog {
  max-width: 1140px;
}

#summaryRecordModal .preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 650px) {
  #summaryRecordModal .preview-grid {
    grid-template-columns: 1fr;
  }
}


/* Separate Current and Continuing financial analytics */
.source-analytics-block .content-card {
  overflow: visible;
}

.source-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #f7fafe;
}

.source-kpi-card {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #c0d1e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 11px rgba(5, 47, 104, .05);
}

.source-kpi-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
}

.source-kpi-card.blue .source-kpi-icon {
  background: linear-gradient(135deg, #062e69, #0b5fb8);
}

.source-kpi-card.teal .source-kpi-icon {
  background: linear-gradient(135deg, #047b82, #14afb2);
}

.source-kpi-card.gold .source-kpi-icon {
  background: linear-gradient(135deg, #d79000, #edb61e);
}

.source-kpi-card.purple .source-kpi-icon {
  background: linear-gradient(135deg, #433789, #6657bc);
}

.source-kpi-card small {
  display: block;
  margin-bottom: 3px;
  color: #52647b;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .035em;
}

.source-kpi-card strong {
  display: block;
  color: #0a3d7d;
  font-size: clamp(.94rem, 1.3vw, 1.28rem);
  line-height: 1.15;
}

.source-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, .95fr);
  gap: 14px;
  padding: 0 14px 14px;
  background: #f7fafe;
}

.source-chart-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid #c0d1e3;
  border-radius: 10px;
  background: #fff;
}

.source-chart-panel h3 {
  margin: 0 0 8px;
  color: #17345f;
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: .025em;
}

.source-chart-canvas {
  height: 255px;
}

.source-split-layout {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(145px, .95fr);
  align-items: center;
  gap: 10px;
}

.source-donut-wrap {
  position: relative;
  height: 245px;
}

.source-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 130px;
  transform: translate(-50%, -50%);
  color: #52647b;
  font-size: .61rem;
  font-weight: 800;
  text-align: center;
}

.source-donut-center strong {
  margin-top: 4px;
  color: #132d54;
  font-size: .82rem;
  line-height: 1.15;
}

.source-split-values > div {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 22px;
}

.source-split-values small {
  color: #52647b;
  font-size: .66rem;
  font-weight: 900;
}

.source-split-values strong {
  color: #0a4c91;
  font-size: 1.35rem;
  line-height: 1;
}

.source-split-values span:last-child {
  color: #243752;
  font-size: .76rem;
}

.source-split-values hr {
  margin: 17px 0;
  border-color: #aebdcd;
}

.source-split-dot {
  position: absolute;
  top: 3px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.source-split-dot.obligation {
  background: #0b5cb8;
}

.source-split-dot.balance {
  background: #07949a;
}

@media (max-width: 1150px) {
  .source-chart-grid {
    grid-template-columns: 1fr;
  }

  .source-split-layout {
    grid-template-columns: minmax(220px, .8fr) 1fr;
  }
}

@media (max-width: 760px) {
  .source-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .source-kpi-grid {
    grid-template-columns: 1fr;
  }
}

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

  .source-chart-grid {
    grid-template-columns: 1.35fr .95fr;
  }

  .source-chart-panel {
    break-inside: avoid;
  }
}
