.account-ledger-table {
  min-width: 1120px;
}
.account-ledger-table th {
  white-space: nowrap;
}
.account-ledger-table td {
  font-size: 13px;
  line-height: 1.7;
}
.account-ledger-table td:nth-child(1),
.account-ledger-table td:nth-child(3),
.account-ledger-table td:nth-child(4) {
  white-space: nowrap;
}
.account-ledger-table td:nth-child(2) {
  min-width: 165px;
}
.account-ledger-table td:last-child {
  min-width: 230px;
}
dialog.cashflow-dialog {
  width: min(1100px, 96vw);
}
.cashflow-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.cashflow-dialog fieldset:disabled {
  opacity: 1;
}
.cashflow-dialog input,
.cashflow-dialog select,
.cashflow-dialog textarea {
  font-size: 15px;
}
.cash-order-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  background: #eff6fb;
  border: 1px solid #d9e6f1;
  padding: 18px;
  margin-bottom: 22px;
  border-radius: 10px;
  font-size: 14px;
}
.cash-order-summary strong {
  font-size: 18px;
  width: 100%;
}
.cash-order-summary span:last-child {
  width: 100%;
}
.cash-workflow {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 16px;
}
.cash-workflow h3 {
  font-size: 18px;
}
.cash-workflow ol {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 24px;
}
.cash-workflow li {
  position: relative;
  flex: 1;
  border: 1px solid #dce4df;
  background: #f5f7f6;
  border-radius: 9px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cash-workflow li + li:before {
  content: "→";
  position: absolute;
  left: -22px;
  top: 26px;
  color: #6d7d74;
}
.cash-workflow .complete {
  background: #edf8f1;
  border-color: #a3d5b5;
}
.cash-workflow .current {
  background: #fff6cb;
  border-color: #e9bf37;
}
.cash-workflow small {
  color: #6d7d74;
  overflow-wrap: anywhere;
}
.waiting-review {
  display: inline-block;
  color: #795500;
  background: #fff0ae;
  border: 1px solid #deb12c;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 13px;
  cursor: pointer;
  margin: 4px 0 10px;
}
.waiting-review:hover {
  background: #ffe58b;
}
.cashflow-table td {
  font-size: 14px;
}
.cashflow-table td:last-child {
  min-width: 185px;
}
.cashflow-table td:last-child button {
  display: block;
}
.cashflow-table strong {
  font-size: 15px;
}
.cash-vouchers {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.cash-vouchers a {
  background: #eff6fb;
  padding: 8px;
  border-radius: 6px;
}
.cash-converted {
  font-size: 15px;
  font-weight: 650;
  background: #f4f8f5;
  padding: 15px;
  margin-top: 18px;
}
.cash-submitted {
  margin: 18px 0;
}
.cash-submitted dl {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  gap: 8px;
}
.cash-submitted dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.cashflow-header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.cashflow-header h2 {
  font-size: 20px;
  margin: 0;
}
.cashflow-section {
  margin-bottom: 24px;
  overflow: hidden;
}
@media (max-width: 700px) {
  .cash-workflow ol {
    flex-direction: column;
  }
  .cash-workflow li + li:before {
    content: "↓";
    left: 50%;
    top: -24px;
  }
  .cash-order-summary {
    gap: 8px;
  }
  .cashflow-dialog .form-grid {
    grid-template-columns: 1fr;
  }
}

/* The three financial families keep separate rows at every viewport width. */
.financial-metric-groups {
  display: grid;
  gap: 22px;
  margin: 18px 0;
}
.financial-metric-group {
  padding: 18px;
  border: 1px solid #dce6e0;
  border-radius: 11px;
  background: #f8faf9;
}
.financial-metric-group > h3 {
  margin: 0 0 15px;
  color: #34584a;
  font-size: 19px;
  line-height: 1.5;
}
.financial-metric-expenses > h3 {
  color: #795146;
}
.financial-metric-other > h3 {
  color: #71517e;
}
.financial-metric-group > .financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 13px;
}
.financial-metric-group .stat {
  min-width: 0;
  margin: 0;
  padding: 16px;
}
.financial-metric-group .stat-label {
  font-size: 14px;
  line-height: 1.55;
}
.financial-metric-group .stat-value {
  font-size: 25px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .financial-metric-group {
    padding: 14px;
  }
  .financial-metric-group > .financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .financial-metric-group .stat {
    padding: 12px;
  }
  .financial-metric-group .stat-value {
    font-size: 21px;
  }
}
@media (max-width: 380px) {
  .financial-metric-group > .financial-grid {
    grid-template-columns: 1fr;
  }
}
