/* =========================================================================
   Overview tab in the shared PersonaFi look (pf-ui.css). Overrides the tab's
   inline styles; markup and data-role hooks are unchanged.
   ========================================================================= */
.pf-ui.finance-overview { margin-top: 0 !important; }

/* page title + period */
.pf-ui.finance-overview .period-controls-panel { margin-bottom: 1rem !important; }
.pf-ui.finance-overview .period-controls-inner { padding: 0 !important; align-items: flex-end !important; }
.pf-ui.finance-overview [data-role="period-controls"] .period-controls-inputs .form-select { min-width: 12rem; color: var(--pf-ink); border-color: var(--pf-line-strong); }

/* white panels on the canvas */
.pf-ui.finance-overview .card { background: #fff !important; border: 0 !important; border-radius: .75rem !important; box-shadow: 0 1px 2px rgba(16, 40, 30, .06) !important; }
.pf-ui.finance-overview .card-body { padding: 1.25rem 1.5rem; }
.pf-ui.finance-overview .section-heading {
  font-family: Manrope, Inter, sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--pf-ink);
  border-bottom: 0; padding-bottom: 0; margin-bottom: .25rem;
}
.pf-ui.finance-overview .pf-section-title { font-family: Manrope, Inter, sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--pf-ink); margin: 0; }

/* headline figures: the deep-green band */
.pf-ui.finance-overview [data-role="headline-row"] {
  margin: 1.25rem 0 0 !important; padding: .35rem .75rem; border-radius: .75rem;
  background: linear-gradient(120deg, var(--pf-band), var(--pf-band-2));
}
.pf-ui.finance-overview [data-role="headline-row"] > [class*="col-"] { flex: 1 1 10rem; max-width: none; padding: 0 .5rem; }
.pf-ui.finance-overview [data-role="headline-row"] > [class*="col-"] + [class*="col-"] .metric-card { border-left: 1px solid rgba(255, 255, 255, .16); }
.pf-ui.finance-overview .metric-card {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 1rem .75rem 1rem 1rem !important; color: #fff;
}
.pf-ui.finance-overview .metric-label { font-family: Inter, sans-serif; font-size: .8rem; font-weight: 500; color: rgba(255, 255, 255, .72); margin-bottom: .2rem; }
.pf-ui.finance-overview .metric-value { font-family: Manrope, Inter, sans-serif; font-weight: 700 !important; font-size: 1.6rem; color: #fff !important; }
.pf-ui.finance-overview .metric-value.text-danger { color: #FCA5A5 !important; }
.pf-ui.finance-overview .metric-value.text-success { color: #86EFAC !important; }
.pf-ui.finance-overview .metric-delta { font-size: .78rem; font-weight: 500; color: rgba(255, 255, 255, .7) !important; }
.pf-ui.finance-overview .metric-delta.text-success { color: #86EFAC !important; }
.pf-ui.finance-overview .metric-delta.text-danger { color: #FCA5A5 !important; }
@media (max-width: 767.98px) {
  .pf-ui.finance-overview [data-role="headline-row"] > [class*="col-"] { flex-basis: 45%; }
  .pf-ui.finance-overview [data-role="headline-row"] > [class*="col-"] + [class*="col-"] .metric-card { border-left: 0; }
}

/* AI summary: a white panel with a green rule, not a gradient wash */
.pf-ui.finance-overview .ai-hero-card { background: #fff !important; box-shadow: inset 4px 0 0 var(--pf-brand), 0 1px 2px rgba(16, 40, 30, .06) !important; }
.pf-ui.finance-overview .ai-hero-chip { background: var(--pf-wash); border: 0; }
.pf-ui.finance-overview .ai-hero-chip small { text-transform: none; letter-spacing: 0; color: var(--pf-muted); font-size: .75rem; }
.pf-ui.finance-overview .ai-greeting { background: var(--pf-wash); color: var(--pf-band); border: 0; }
.pf-ui.finance-overview .ai-narrative { color: var(--pf-text); }
.pf-ui.finance-overview .ai-insights-list .ai-insight-item { background: #F6FEF9; border: 1px solid var(--pf-line-green); box-shadow: none; }
.pf-ui.finance-overview .ai-insights-list .ai-insight-item .ai-insight-icon { background: #fff; color: var(--pf-brand-dark); }
.pf-ui.finance-overview .ai-insights-list .ai-insight-item p { color: var(--pf-text); }

/* switches (actuals / projected finish, $ / %) look like the shared segmented control */
.pf-ui.finance-overview .mix-card .dataset-toggle, .pf-ui.finance-overview .mix-table th .delta-toggle, .pf-ui.finance-overview .mix-card .delta-toggle { background: var(--pf-canvas); }
.pf-ui.finance-overview .mix-card .dataset-toggle button, .pf-ui.finance-overview .mix-table th .delta-toggle button, .pf-ui.finance-overview .mix-card .delta-toggle button { color: var(--pf-muted); font-weight: 500; }
.pf-ui.finance-overview .mix-card .dataset-toggle button.active, .pf-ui.finance-overview .mix-table th .delta-toggle button.active, .pf-ui.finance-overview .mix-card .delta-toggle button.active {
  background: #fff; color: var(--pf-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}

/* tables */
.pf-ui.finance-overview .mix-table thead th, .pf-ui.finance-overview .recent-transactions-card thead th {
  text-transform: none !important; letter-spacing: 0 !important; background: var(--pf-head) !important; color: var(--pf-head-text) !important; font-size: .78rem !important;
}
.pf-ui.finance-overview .mix-table .delta-chip--positive { background: var(--pf-wash); color: var(--pf-brand-dark); }
.pf-ui.finance-overview .mix-table .delta-chip--negative { background: #fef3f2; color: var(--pf-neg); }

/* top movers */
.pf-ui.finance-overview .top-movers-item { background: #F6FEF9 !important; border: 1px solid var(--pf-line-green) !important; box-shadow: none !important; }
.pf-ui.finance-overview .top-movers-label { color: var(--pf-ink); }
.pf-ui.finance-overview .top-mover-badge { text-transform: none; letter-spacing: 0; background: #fff; color: var(--pf-brand-dark); border: 1px solid var(--pf-line-green); }
.pf-ui.finance-overview .top-mover-badge.top-mover-flag { background: #fffaeb; color: #93370d; border-color: #fedf89; }
.pf-ui.finance-overview .top-movers-subheading, .pf-ui.finance-overview .top-movers-filter label, .pf-ui.finance-overview .cashflow-controls label {
  text-transform: none !important; letter-spacing: 0 !important; color: var(--pf-muted) !important; font-weight: 500;
}
.pf-ui.finance-overview .metric-card, .pf-ui.finance-overview .metric-card * { text-align: left !important; }

/* headline band: same treatment as .pf-figures */
.pf-ui.finance-overview [data-role="headline-row"] {
  background: linear-gradient(135deg, #064E3B, #047857); position: relative; overflow: hidden;
  box-shadow: 0 10px 24px rgba(4, 120, 87, .18); padding: .5rem 1rem;
}
.pf-ui.finance-overview [data-role="headline-row"]::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: #34D399;
}
.pf-ui.finance-overview .metric-label { font-size: .78rem; font-weight: 600; color: rgba(236, 253, 243, .78); margin-bottom: .35rem; }
.pf-ui.finance-overview .metric-value {
  font-size: clamp(1.75rem, 1.15rem + 1.3vw, 2.35rem) !important; font-weight: 800 !important; letter-spacing: -.02em; line-height: 1.05;
  text-shadow: 0 1px 0 rgba(6, 78, 59, .25);
}
.pf-ui.finance-overview .metric-delta { margin-top: .35rem; }
