/* Ubuzima+ Balance Sheet canonical UI R1 */

.aq-bs-canonical {
  box-sizing: border-box;
  width: 100%;
  padding: 18px 18px 32px;
  color: #13233d;
  font: inherit;
}

.aq-bs-canonical *,
.aq-bs-canonical *::before,
.aq-bs-canonical *::after {
  box-sizing: border-box;
}

.aq-bs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.aq-bs-back {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2456d6;
  font-weight: 700;
  cursor: pointer;
}

.aq-bs-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.aq-bs-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  color: #0f1f3a;
}

.aq-bs-subtitle {
  margin: 8px 0 0;
  color: #51627b;
  font-size: 14px;
}

.aq-bs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.aq-bs-actions button,
.aq-bs-error button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  background: #fff;
  color: #14233d;
  font-weight: 700;
  cursor: pointer;
}

.aq-bs-actions button:hover,
.aq-bs-error button:hover {
  border-color: #9fb2cd;
  background: #f8fafc;
}

.aq-bs-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.aq-bs-filters label {
  display: grid;
  gap: 7px;
}

.aq-bs-filters span {
  color: #52627a;
  font-size: 12px;
  font-weight: 700;
}

.aq-bs-filters input,
.aq-bs-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #fff;
  color: #13233d;
  font: inherit;
}

.aq-bs-filters input:disabled {
  background: #f6f8fb;
  color: #98a4b7;
}

.aq-bs-inline-warning,
.aq-bs-error,
.aq-bs-loading {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #f4d1a1;
  border-radius: 10px;
  background: #fffaf2;
  color: #7c4b08;
}

.aq-bs-error {
  display: grid;
  gap: 9px;
}

.aq-bs-loading {
  color: #42546d;
  border-color: #dce3ec;
  background: #f8fafc;
}

.aq-bs-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.aq-bs-metric {
  min-width: 0;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 31, 58, .04);
}

.aq-bs-metric-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}

.aq-bs-blue {
  color: #2563eb;
  background: #e8f0ff;
}

.aq-bs-orange {
  color: #ea6b0c;
  background: #fff0e3;
}

.aq-bs-green {
  color: #059669;
  background: #e3f7ee;
}

.aq-bs-purple {
  color: #7c3aed;
  background: #f0e9ff;
}

.aq-bs-metric > div:last-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.aq-bs-metric span {
  color: #22324d;
  font-size: 13px;
  font-weight: 750;
}

.aq-bs-metric strong {
  overflow-wrap: anywhere;
  color: #10203a;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.05;
}

.aq-bs-metric small {
  color: #697991;
  font-size: 12px;
}

.aq-bs-metric .aq-bs-balanced {
  color: #0d9b4d;
}

.aq-bs-metric .aq-bs-review {
  color: #b45309;
}

.aq-bs-position-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(250px, .95fr);
  gap: 14px;
  align-items: stretch;
}

.aq-bs-ledger,
.aq-bs-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 31, 58, .035);
}

.aq-bs-ledger > header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid #edf1f6;
  font-size: 13px;
}

.aq-bs-ledger-assets > header {
  color: #155bd7;
}

.aq-bs-ledger-liabilities > header {
  color: #dc5b0c;
}

.aq-bs-ledger-equity > header {
  color: #078a4f;
}

.aq-bs-ledger table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.aq-bs-ledger th,
.aq-bs-ledger td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f6;
  vertical-align: top;
  text-align: left;
  font-size: 11px;
}

.aq-bs-ledger th {
  background: #fafbfd;
  color: #4e5f78;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.aq-bs-ledger th:last-child,
.aq-bs-ledger td:last-child {
  width: 38%;
  text-align: right;
  white-space: nowrap;
}

.aq-bs-ledger td:first-child {
  display: grid;
  gap: 2px;
}

.aq-bs-code {
  color: #74849c;
  font-size: 10px;
}

.aq-bs-ledger td strong {
  color: #23344f;
  font-size: 11px;
  font-weight: 700;
}

.aq-bs-empty {
  color: #7b8799;
  text-align: center !important;
}

.aq-bs-more {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
  color: #1757d3;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.aq-bs-ledger > footer {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background: #fafbfd;
  color: #1c2c46;
  font-size: 11px;
  text-transform: uppercase;
}

.aq-bs-rail {
  display: grid;
  align-content: start;
  gap: 12px;
}

.aq-bs-panel {
  padding: 15px;
}

.aq-bs-panel h2 {
  margin: 0 0 13px;
  color: #13233d;
  font-size: 13px;
}

.aq-bs-summary-chart {
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  gap: 15px;
}

.aq-bs-donut {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(
      #f59e0b 0 var(--aq-bs-liability-deg),
      #12a875 var(--aq-bs-liability-deg) 360deg
    );
  position: relative;
}

.aq-bs-donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
}

.aq-bs-summary-legend {
  display: grid;
  gap: 10px;
}

.aq-bs-summary-legend > div {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  column-gap: 7px;
  align-items: center;
  font-size: 10px;
}

.aq-bs-summary-legend strong {
  grid-column: 2 / 3;
  color: #24344f;
  font-size: 10px;
  font-weight: 650;
}

.aq-bs-summary-legend small {
  grid-column: 3;
  grid-row: 1 / 3;
  color: #6d7d95;
  font-size: 10px;
}

.aq-bs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.aq-bs-dot-blue {
  background: #2563eb;
}

.aq-bs-dot-orange {
  background: #f59e0b;
}

.aq-bs-dot-green {
  background: #12a875;
}

.aq-bs-panel dl {
  margin: 0;
  display: grid;
}

.aq-bs-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 10px;
}

.aq-bs-panel dl div:last-child {
  border-bottom: 0;
}

.aq-bs-panel dt {
  color: #50617a;
}

.aq-bs-panel dd {
  margin: 0;
  color: #24344f;
  text-align: right;
  font-weight: 650;
}

.aq-bs-health {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.aq-bs-health li {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #34455f;
  font-size: 10px;
}

.aq-bs-health li span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff7e9;
  color: #07964d;
  font-weight: 800;
}

.aq-bs-monthly-support {
  margin-top: 14px;
}

@media (max-width: 1440px) {
  .aq-bs-position-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .aq-bs-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .aq-bs-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .aq-bs-position-grid {
    grid-template-columns: 1fr 1fr;
  }

  .aq-bs-ledger-equity {
    grid-column: 1 / -1;
  }

  .aq-bs-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .aq-bs-canonical {
    padding: 14px 12px 28px;
  }

  .aq-bs-header {
    display: grid;
  }

  .aq-bs-actions {
    width: 100%;
  }

  .aq-bs-actions button {
    flex: 1;
  }

  .aq-bs-filters,
  .aq-bs-metrics,
  .aq-bs-position-grid {
    grid-template-columns: 1fr;
  }

  .aq-bs-ledger-equity,
  .aq-bs-rail {
    grid-column: auto;
  }

  .aq-bs-summary-chart {
    grid-template-columns: 92px 1fr;
  }

  .aq-bs-donut {
    width: 92px;
  }
}

@media (max-width: 430px) {
  .aq-bs-header h1 {
    font-size: 28px;
  }

  .aq-bs-metric {
    min-height: 96px;
    padding: 14px;
  }

  .aq-bs-metric-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .aq-bs-ledger th,
  .aq-bs-ledger td {
    padding: 8px;
  }

  .aq-bs-ledger th:last-child,
  .aq-bs-ledger td:last-child {
    width: 42%;
  }
}

/* ==========================================================
   AQUILA_BALANCE_MONTHLY_POSITION_R1_BEGIN
   Supporting styles only — canonical Balance UI remains owner
   ========================================================== */

[data-aquila-balance-monthly-support="1"].aq-bs-monthly-position-host {
    display: block;
    width: 100%;
    margin-top: 18px;
}

.aq-bs-monthly-position {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.aq-bs-monthly-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.aq-bs-monthly-header h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    color: #173a75;
}

.aq-bs-monthly-header p {
    margin: 5px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.aq-bs-monthly-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.aq-bs-monthly-year,
.aq-bs-monthly-trend-button {
    min-height: 34px;
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: 9px;
    background: #ffffff;
    color: #1e3a8a;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.aq-bs-monthly-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 0 12px;
}

.aq-bs-monthly-trend-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 13px;
    cursor: pointer;
}

.aq-bs-monthly-trend-button:hover {
    background: #f8fafc;
}

.aq-bs-monthly-table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.aq-bs-monthly-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 11px;
}

.aq-bs-monthly-table thead th {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #fbfcfe;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-align: right;
    white-space: nowrap;
    text-transform: uppercase;
}

.aq-bs-monthly-table thead th:first-child {
    min-width: 230px;
    text-align: left;
}

.aq-bs-monthly-table tbody th,
.aq-bs-monthly-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    color: #24324a;
    text-align: right;
    white-space: nowrap;
}

.aq-bs-monthly-table tbody th {
    text-align: left;
    font-weight: 650;
}

.aq-bs-monthly-table tbody tr:last-child th,
.aq-bs-monthly-table tbody tr:last-child td {
    border-bottom: 0;
}

.aq-bs-monthly-code {
    display: inline-block;
    min-width: 42px;
    margin-right: 9px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.aq-bs-monthly-na {
    color: #94a3b8 !important;
}

.aq-bs-monthly-total th,
.aq-bs-monthly-total td {
    background: #fbfcff;
    color: #111f3d !important;
    font-weight: 800 !important;
}

.aq-bs-monthly-trend-panel {
    padding: 16px 20px 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fcfdff;
}

.aq-bs-monthly-trend-panel[hidden] {
    display: none !important;
}

.aq-bs-monthly-chart-wrap {
    width: 100%;
}

.aq-bs-monthly-chart-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.aq-bs-monthly-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aq-bs-monthly-chart-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 99px;
}

.aq-bs-monthly-chart-legend .assets i {
    background: #2563eb;
}

.aq-bs-monthly-chart-legend .liabilities i {
    background: #f59e0b;
}

.aq-bs-monthly-chart-legend .equity i {
    background: #10b981;
}

.aq-bs-monthly-chart {
    display: block;
    width: 100%;
    min-width: 720px;
    height: auto;
}

.aq-bs-monthly-chart text {
    fill: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.aq-bs-monthly-grid {
    stroke: rgba(100, 116, 139, 0.22);
    stroke-width: 1;
}

.aq-bs-monthly-line-assets,
.aq-bs-monthly-line-liabilities,
.aq-bs-monthly-line-equity {
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.aq-bs-monthly-line-assets {
    stroke: #2563eb;
}

.aq-bs-monthly-line-liabilities {
    stroke: #f59e0b;
}

.aq-bs-monthly-line-equity {
    stroke: #10b981;
}

.aq-bs-monthly-source-note {
    margin: 0;
    padding: 10px 20px 14px;
    color: #7c879b;
    font-size: 10px;
    line-height: 1.5;
}

.aq-bs-monthly-loading,
.aq-bs-monthly-empty {
    padding: 26px 20px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

@media (max-width: 768px) {
    .aq-bs-monthly-header {
        flex-direction: column;
        align-items: stretch;
    }

    .aq-bs-monthly-actions {
        justify-content: space-between;
    }

    .aq-bs-monthly-position {
        border-radius: 13px;
    }
}

@media (max-width: 430px) {
    .aq-bs-monthly-header {
        padding: 15px;
    }

    .aq-bs-monthly-actions {
        gap: 8px;
    }

    .aq-bs-monthly-year,
    .aq-bs-monthly-trend-button {
        font-size: 11px;
    }

    .aq-bs-monthly-source-note {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* AQUILA_BALANCE_MONTHLY_POSITION_R1_END */

/* ============================================================
   AQUILA_BALANCE_CASHFLOW_TABLE_STANDARD_R1_BEGIN

   Supporting style only.
   No rendering.
   No routing.
   No event interception.
   ============================================================ */

.aq-bs-monthly-position {
    border-radius: 12px;
    box-shadow: none;
}

.aq-bs-monthly-header {
    padding: 14px 16px;
}

.aq-bs-monthly-header h2 {
    color: #172033;
    font-size: 15px;
}

.aq-bs-monthly-header p {
    color: #64748b;
    font-size: 11px;
}

.aq-bs-monthly-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aq-bs-monthly-table {
    min-width: 1240px;
    font-size: 12px;
}

.aq-bs-monthly-table thead th {
    padding: 10px 12px;
    border-right: 1px solid #dfe6ec;
    border-bottom: 1px solid #dfe6ec;
    background: #f8fafc;
    color: #53667e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
}

.aq-bs-monthly-table tbody th,
.aq-bs-monthly-table tbody td {
    padding: 10px 12px;
    border-right: 1px solid #dfe6ec;
    border-bottom: 1px solid #dfe6ec;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.aq-bs-monthly-table thead th:first-child,
.aq-bs-monthly-table tbody th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 260px;
    width: 260px;
    text-align: left;
}

.aq-bs-monthly-table thead th:first-child {
    z-index: 4;
    background: #f8fafc;
}

.aq-bs-monthly-table tbody th:first-child {
    background: #ffffff;
}

.aq-bs-monthly-table .aq-bs-cf-current {
    background: #eef8f3 !important;
}

.aq-bs-monthly-table thead .aq-bs-cf-current {
    border-top: 2px solid #82bea4;
}

.aq-bs-monthly-table .aq-bs-cf-previous {
    background: #eef4fb !important;
}

.aq-bs-monthly-table thead .aq-bs-cf-previous {
    border-top: 2px solid #9eb8d8;
}

.aq-bs-monthly-table .aq-bs-cf-change,
.aq-bs-monthly-table .aq-bs-cf-change-pct {
    background: #f7f2ea !important;
}

.aq-bs-monthly-table thead .aq-bs-cf-change,
.aq-bs-monthly-table thead .aq-bs-cf-change-pct {
    border-top: 2px solid #d8b98d;
}

.aq-bs-monthly-table .aq-bs-cf-historical {
    background: #ffffff;
}

.aq-bs-monthly-table tbody td,
.aq-bs-monthly-table thead th:not(:first-child) {
    text-align: right;
    white-space: nowrap;
}

.aq-bs-monthly-total th,
.aq-bs-monthly-total td {
    font-weight: 800 !important;
}

@media (max-width: 768px) {

    .aq-bs-monthly-table {
        min-width: 1120px;
    }

    .aq-bs-monthly-table thead th:first-child,
    .aq-bs-monthly-table tbody th:first-child {
        min-width: 220px;
        width: 220px;
    }

}

@media (max-width: 430px) {

    .aq-bs-monthly-table {
        min-width: 1080px;
    }

    .aq-bs-monthly-table thead th:first-child,
    .aq-bs-monthly-table tbody th:first-child {
        min-width: 190px;
        width: 190px;
    }

}

/* AQUILA_BALANCE_CASHFLOW_TABLE_STANDARD_R1_END */
