.overview-page .app-shell { grid-template-rows: auto 1fr auto; background: var(--bg); }
.overview-page .topbar { display: grid; min-height: 96px; grid-template-areas: none; grid-template-columns: minmax(150px, 230px) auto minmax(200px, 300px); justify-content: space-between; }
.overview-page .brand, .overview-page .top-tabs { grid-area: auto; }
.overview-page .brand img { width: 230px; max-width: 100%; }
.overview-page .overview-dashboard { width: 100%; max-width: 1600px; justify-self: center; padding: 28px 40px; overflow: visible; }
.overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.overview-heading h1 { font-size: 28px; font-weight: 600; margin: 0; }
.overview-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.overview-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.overview-import strong { font-weight: 400; color: var(--text); }
.overview-search { position: relative; display: flex; min-width: 0; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--bg); }
.overview-search input { width: 100%; min-width: 0; padding: 10px 12px; background: transparent; color: var(--text); border: 0; border-radius: 5px; font-size: 12px; }
.overview-search .icon-button { align-self: center; flex-shrink: 0; border: 0; background: transparent; }
.overview-search p:not(:empty) { position: absolute; top: 100%; right: 0; z-index: 5; width: 300px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); color: #e7abab; font-size: 12px; line-height: 1.5; }
.overview-page .overview-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.overview-page .overview-kpis article { padding: 20px; border-radius: 6px; box-shadow: none; gap: 8px; }
.overview-page .overview-kpis strong { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.overview-page .overview-kpis small { color: var(--muted); font-weight: 400; }
.overview-page .overview-kpis .is-positive { color: var(--current); }
.overview-page .overview-kpis .is-negative { color: var(--danger); }
.overview-activity-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.overview-panel { min-width: 0; padding: 20px 24px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface); }
.overview-page .overview-panel .panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.overview-page .overview-panel h2 { margin: 0; font-size: 15px; font-weight: 600; }
.overview-page .panel-header span { color: var(--muted); font-size: 11px; }
.overview-page select { font: inherit; font-size: 12px; min-height: 36px; max-width: 100%; padding: 6px 8px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; }
.overview-bars { display: grid; gap: 20px; padding: 4px 0 12px; }
.overview-activity-body { min-height: 103px; }
.overview-bars:empty { display: none; }
.overview-activity-message { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.overview-activity-message:empty { display: none; }
.overview-activity-message.is-error { color: #e7abab; }
.overview-activity-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; align-items: center; gap: 16px; font-size: 11px; }
.overview-activity-label { color: var(--muted); letter-spacing: .025em; font-size: 11px; font-weight: 600; }
.overview-bar-track { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.overview-bar-fill { display: block; height: 100%; background: var(--subtle); border-radius: inherit; }
.overview-activity-row strong { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 35px; text-align: right; }
.overview-activity-row[data-kind="scheduled_transaction"] .overview-bar-fill { background: var(--current); }
.overview-activity-row[data-kind="babel_fee"] .overview-bar-fill { background: var(--peak); }
.overview-panel-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 24px; font-size: 11px; color: var(--muted); }
.overview-panel-foot strong { font-weight: 500; color: var(--text); }
.overview-recent-activity .overview-activity-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.overview-recent-activity .overview-activity-row:first-child { padding-top: 0; }
.overview-recent-foot { flex-direction: column; gap: 8px; margin-top: 16px; }
.overview-monthly { margin-bottom: 20px; }
.overview-chart-wrap { height: 180px; position: relative; }
.overview-chart-wrap canvas { width: 100%; height: 100%; }
.overview-chart-wrap p { position: absolute; inset: 40% 0 auto; margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.overview-chart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.overview-segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--bg); }
.overview-segmented button { min-width: 40px; min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.overview-segmented button:hover { color: var(--text); background: var(--surface-2); }
.overview-segmented button[aria-pressed="true"] { border-color: var(--line); background: var(--surface-3); color: var(--text); }
.overview-chart-notes { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.overview-chart-notes span:empty { display: none; }
.overview-chart-data { color: var(--muted); font-size: 11px; margin-top: 10px; }
.overview-chart-data ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 24px; padding-left: 18px; }
.overview-page summary { cursor: pointer; }
.overview-view-all { color: var(--muted); text-decoration: none; font-size: 12px; }
.overview-view-all:hover { color: var(--text); }
.overview-page .overview-transactions .history-table { min-width: 0; }
.overview-page .overview-transactions .history-table th:first-child { width: 28%; }
.overview-page .overview-transactions .history-table th:last-child { width: 32%; }
.overview-page .overview-transactions .history-table td { padding-top: 14px; padding-bottom: 14px; vertical-align: middle; }
.overview-page .history-badge[data-kind="scheduled_transaction"] { color: var(--current); border-color: #8aa89940; background: #8aa89908; }
.overview-page .history-badge[data-kind="babel_fee"] { color: var(--peak); border-color: #c5a56b40; background: #c5a56b08; }
.overview-page .history-badge[data-kind="unclassified"] { color: var(--muted); }
.overview-status { color: var(--muted); font-size: 12px; margin: -8px 0 18px; }
.overview-status:empty { display: none; }
.overview-status.is-error { color: #e7abab; }
.overview-coverage { margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.overview-coverage li { overflow-wrap: anywhere; }
.overview-page .footer-bar { min-height: 50px; padding: 12px 40px; gap: 20px; font-size: 11px; }
.overview-page.detail-open .overview-dashboard { width: auto; justify-self: stretch; }
.overview-page.detail-open .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-page.detail-open .overview-activity-grid { grid-template-columns: minmax(0, 1fr); }
.overview-page.detail-open .overview-heading { flex-wrap: wrap; }
.overview-page .transaction-details { top: 0; }
.overview-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.overview-page :is(button, a, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
@media (max-width: 1100px) {
  .overview-page .topbar { grid-template-columns: 180px minmax(0, 1fr); padding: 12px 24px; gap: 12px; }
  .overview-page .top-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .overview-search { grid-column: 2; grid-row: 1; width: min(100%, 320px); justify-self: end; }
  .overview-page .overview-dashboard { padding: 24px; }
  .overview-toolbar { gap: 10px; }
  .overview-import { max-width: 210px; line-height: 1.6; }
  .overview-page .overview-kpis article { padding: 16px; }
  .overview-activity-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
  .overview-panel { padding: 18px; }
  .overview-activity-row { grid-template-columns: 100px minmax(0, 1fr) auto; gap: 10px; }
}
@media (max-width: 760px) {
  .overview-segmented button { min-height: 40px; }
  .overview-page .topbar { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .overview-page .brand { justify-content: center; }
  .overview-page .brand img { width: 200px; }
  .overview-page .top-tabs { grid-column: 1; grid-row: 2; width: 100%; gap: 2px; }
  .overview-page .top-tabs a { flex: 1; min-width: 0; padding: 9px 5px; font-size: 11px; }
  /* The activity pages already size their links in activity.css. */
  .overview-page:not(.activity-page) .top-tabs { gap: 6px; }
  .overview-page:not(.activity-page) .top-tabs a { flex: none; padding: 9px 8px; white-space: nowrap; }
  .overview-search { grid-column: 1; grid-row: 3; width: 100%; }
  .overview-search input { font-size: 16px; }
  .overview-search .icon-button { width: 40px; height: 40px; }
  .overview-page .overview-dashboard { padding: 20px 16px; }
  .overview-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .overview-toolbar { width: 100%; gap: 10px; }
  .overview-import { max-width: none; flex: 1; font-size: 11px; }
  .overview-import strong { display: block; }
  .overview-page .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .overview-page .overview-kpis article { padding: 14px; }
  .overview-page .overview-kpis strong { font-size: 25px; }
  .overview-page .overview-kpis span { font-size: 10px; }
  .overview-activity-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-page .overview-transactions .history-table { min-width: 460px; }
  .overview-page .overview-transactions .history-table th:first-child { width: 135px; }
  .overview-page .overview-transactions .history-table th:last-child { width: 145px; }
  .overview-page .overview-transactions .history-table th:nth-child(2) { width: 180px; }
  .overview-page .overview-transactions .history-table td { font-size: 11px; }
  .overview-page .overview-transactions { padding: 16px 12px; }
  .overview-page .footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 16px; }
  .overview-page .footer-bar > span { display: block; width: 100%; }
  .overview-page .transaction-details { inset: 0; }
}
