.ledger-overview {
  --ov-ink: #162f47;
  --ov-text: #344c5d;
  --ov-muted: #526778;
  --ov-border: #d9e1e7;
  --ov-blue: #225e87;
  --ov-fog: #edf4f8;
  display: grid;
  gap: 20px;
  width: 100%;
  min-width: 0;
  color: var(--ov-ink);
}
.ledger-overview *, .ledger-overview *::before, .ledger-overview *::after { box-sizing: border-box; }
.ledger-overview button { font: inherit; cursor: pointer; }
.ledger-overview :is(button, summary):focus-visible { outline: 3px solid #568ab3; outline-offset: 3px; }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ledger-overview .ov-metric, .ledger-overview .ov-panel {
  min-width: 0; background: #fff; border: 1px solid var(--ov-border); border-radius: 10px;
  box-shadow: 0 2px 5px rgba(19,46,68,.025);
}
.ledger-overview .ov-metric {
  display: grid; align-content: start; align-items: start; text-align: left; padding: 15px 17px;
  transition: border-color .15s ease, background-color .15s ease; color: var(--ov-ink);
}
.ledger-overview .ov-metric:hover { border-color: #a7bdca; background: #fbfdff; }
.ov-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .89rem; font-weight: 600; color: var(--ov-text); min-height: 28px; }
.ledger-overview .ov-metric strong, .ov-chart-summary strong {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -.055em; font-weight: 650; line-height: 1.2;
}
.ledger-overview .ov-metric strong {
  display: block; font-size: clamp(1.52rem, 2.22vw, 2.28rem); margin: 9px 0 6px;
  min-width: 0; overflow-wrap: anywhere;
}
.ov-metric-detail { color: var(--ov-muted); font-size: .82rem; line-height: 1.4; }
.ov-icon, .ov-account-icon, .ov-empty-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 7px;
}
.ov-icon { height: 30px; width: 30px; }
.ov-icon svg { width: 17px; height: 17px; }
.ov-icon-blue,.ov-account-icon { color: #2e6693; background: #eaf2f8; }
.ov-icon-teal { color: #367064; background: #e8f2ee; }
.ov-icon-amber { color: #936a2e; background: #f9f0db; }
.ov-icon-slate { color: #53687a; background: #eff2f5; }
.ov-middle { display: grid; grid-template-columns: minmax(0,1.72fr) minmax(242px,1fr); gap: 16px; align-items: stretch; }
.ov-panel { padding: 20px 22px; }
.ov-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ledger-overview h2 { margin: 0; color: var(--ov-ink); font-size: 1.11rem; font-weight: 650; letter-spacing: -.029em; line-height: 1.35; }
.ov-key { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; white-space: nowrap; color: var(--ov-muted); }
.ov-key i { width: 15px; height: 3px; border-radius: 99px; background: #337ba5; }
.ov-chart { display: flex; flex-direction: column; }
.ov-chart-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 16px 0 5px; }
.ov-chart-summary strong { font-size: 1.65rem; }
.ov-change { display: inline-block; font-size: .81rem; line-height: 1.6; color: var(--ov-muted); }
.ov-increase { color: #30695d; }
.ov-decrease { color: #894939; }
.ov-chart figure { margin: auto 0 0; }
.ov-chart figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.ov-chart figure text { fill: #53677a; font: 13px ui-sans-serif,system-ui,sans-serif; font-variant-numeric: tabular-nums; }
.ov-grid { stroke: #dde6ed; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ov-line { fill: none; stroke: #2b719e; stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ov-chart-detail { font-size: .82rem; padding-top: 8px; min-height: 24px; }
.ov-chart-detail summary { cursor: pointer; color: var(--ov-blue); width: max-content; }
.ov-chart-detail table { border-collapse: collapse; width: 100%; margin-top: 10px; }
.ov-chart-detail :is(td,th) { text-align: left; padding: 5px 3px; border-bottom: 1px solid var(--ov-border); }
.ov-chart-detail :is(td,th):last-child { text-align: right; }
.ov-count { white-space: nowrap; font-size: .78rem; line-height: 1.5; border-radius: 5px; background: var(--ov-fog); color: #345772; padding: 2px 7px; font-weight: 600; }
.ov-progress { display: flex; flex-direction: column; align-items: stretch; }
.ov-progress ol { padding: 0; margin: 19px 0 16px; list-style: none; }
.ov-progress li { display: flex; gap: 10px; position: relative; padding-bottom: 12px; align-items: flex-start; }
.ov-progress li:last-child { padding-bottom: 0; }
.ov-progress li:not(:last-child)::before { content: ''; position: absolute; left: 9px; top: 17px; bottom: 0; border-left: 1px solid #d9e2e8; }
.ov-step-icon { display: inline-flex; flex: 0 0 19px; width: 19px; height: 19px; border-radius: 50%; background: white; border: 1.5px solid #c4d0d9; align-items: center; justify-content: center; }
.ov-step-icon svg { width: 12px; height: 12px; stroke-width: 2.6; }
.ov-current .ov-step-icon { border-color: #35769d; }
.ov-current .ov-step-icon i { display: block; border-radius: 50%; width: 7px; height: 7px; background: #35769d; }
.ov-done .ov-step-icon { background: #2c698d; color: white; border-color: #2c698d; }
.ov-progress strong, .ov-progress small { display: block; }
.ov-progress strong { font-size: .91rem; line-height: 1.35; font-weight: 600; }
.ov-progress small { color: var(--ov-muted); font-size: .8rem; line-height: 1.4; }
.ledger-overview .ov-action { margin-top: auto; border: 1px solid #acbfcd; border-radius: 6px; padding: 8px 12px; color: #234e6f; background: #f3f7f9; font-weight: 600; font-size: .88rem; line-height: 1.45; }
.ledger-overview .ov-action:hover { background: #e8f0f5; border-color: #7e9db1; }
.ov-accounts { padding: 0; overflow: hidden; }
.ov-accounts .ov-panel-heading { padding: 18px 22px 14px; }
.ledger-overview .ov-text-button { background: transparent; border: 0; padding: 2px 0; font-weight: 600; font-size: .85rem; color: #295d84; }
.ledger-overview .ov-text-button:hover,.ov-account-link:hover .ov-account-name { text-decoration: underline; text-underline-offset: 3px; }
.ov-table-scroll { overflow-x: auto; }
.ov-accounts table { width: 100%; color: var(--ov-text); font-size: .9rem; border-collapse: collapse; text-align: left; }
.ov-accounts :is(th,td) { padding: 12px 14px; }
.ov-accounts :is(th,td):first-child { padding-left: 22px; }
.ov-accounts :is(th,td):last-child { padding-right: 22px; }
.ov-accounts thead th { color: #52657a; font-size:.80rem; font-weight: 600; background: #f4f7f9; white-space: nowrap; border-block: 1px solid #e1e8ed; }
.ov-accounts tbody tr+tr { border-top: 1px solid #e3e9ed; }
.ov-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-account { display: inline-flex; align-items: center; gap: 10px; }
.ledger-overview .ov-account-link { border: 0; border-radius: 3px; background: none; color: var(--ov-ink); padding: 0; font-weight: 600; text-align: left; }
.ov-account small { display: block; margin-top: 2px; color: var(--ov-muted); font-size: .79rem; font-weight: 400; }
.ov-account-icon { width: 31px; height: 31px; }
.ov-account-icon svg { width: 16px; height: 16px; }
.ov-state { display: inline-flex; white-space: nowrap; border-radius: 4px; padding: 3px 7px; font-size: .77rem; line-height: 1.45; font-weight: 600; }
.ov-ok { color: #266156; background: #e8f4ed; }
.ov-pending { color: #7d5b28; background: #fbf2de; }
.ov-empty { display: flex; gap: 15px; align-items: flex-start; padding: 26px; }
.ov-empty-icon { width: 46px; height: 46px; background: #edf4f7; color: var(--ov-blue); }
.ov-empty-icon svg { width: 22px; height: 22px; }
.ov-empty p,.ov-empty-copy { color: var(--ov-muted); margin: 8px 0 16px; max-width: 65ch; line-height: 1.55; }
.ov-empty .ov-action { margin-top: 4px; }
@media(max-width:1150px) {
  .ledger-overview .ov-metric { padding: 13px; }
  .ov-kpis { gap: 9px; }
  .ov-middle { grid-template-columns: minmax(0,1.55fr) minmax(225px,1fr); }
  .ov-panel:not(.ov-accounts) { padding: 17px; }
}
@media(max-width:900px) {
  .ov-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ov-middle { grid-template-columns: minmax(0,1.4fr) minmax(185px,1fr); gap: 12px; }
}
@media(max-width:740px) {
  .ov-middle { grid-template-columns: 1fr; }
  .ov-chart figure svg { max-height: 200px; }
  .ov-accounts thead th { white-space: normal; }
  .ov-accounts table { min-width: 600px; }
  .ov-progress li { padding-bottom: 12px; }
  .ov-progress .ov-action { align-self: flex-start; }
}
@media(max-width:470px) {
  .ledger-overview { gap: 14px; }
  .ov-kpis { gap: 8px; }
  .ov-icon { width: 23px; height: 23px; }
  .ov-icon svg { width: 14px; height: 14px; }
  .ov-metric-top { font-size: .81rem; }
  .ledger-overview .ov-metric { padding: 11px 10px; }
  .ledger-overview .ov-metric strong { font-size: clamp(1.12rem,5vw,1.5rem); }
  .ov-chart-summary { margin-top: 11px; }
  .ov-accounts .ov-panel-heading { padding: 15px 13px 12px; flex-wrap: wrap; }
  .ov-empty { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .ledger-overview .ov-metric { transition: none; }
}
