/* Cashflow forecast (wave168-cashflow): the Dashboard's Cashflow view.
 * House shapes only — cards, pills and buttons come from styles.css;
 * this file carries the KPI strip, the month bars and the table. */

.cf-head { margin-bottom: 10px; }
.cf-h { margin: 0 0 4px; }

.cf-openbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.cf-openedit { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cf-openedit label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.cf-openedit input { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line-soft, #e0e5ee); border-radius: 8px; background: #fff; color: inherit; }
.cf-openhint { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--muted, #66707f); }

.cf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cf-kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.cf-kpi-l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #66707f; font-weight: 700; }
.cf-kpi-v { font-size: 22px; font-weight: 700; }
.cf-kpi-s { font-size: 12.5px; color: var(--muted, #66707f); }
.cf-kpi.cf-neg .cf-kpi-v { color: var(--danger); }

.cf-bars { display: flex; gap: 6px; align-items: flex-end; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 10px; margin-bottom: 14px; }
.cf-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.cf-bar-track { height: 72px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cf-bar { width: min(26px, 70%); border-radius: 4px 4px 0 0; }
.cf-bar-pos { background: var(--accent); }
.cf-bar-neg { background: var(--danger); }
.cf-bar-l { font-size: 11px; color: #66707f; font-weight: 600; }

.cf-tablewrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.cf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cf-table th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #66707f; padding: 10px 12px; border-bottom: 1px solid var(--line-soft, #e0e5ee); white-space: nowrap; }
.cf-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft, #e0e5ee); vertical-align: middle; }
.cf-table tbody tr:last-child td { border-bottom: none; }
.cf-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.cf-num { text-align: right; }
.cf-neg-t { color: var(--danger); font-weight: 700; }
.cf-detail td { background: #fbfcfe; }
.cf-items { margin: 4px 0 10px; }
.cf-items-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #66707f; font-weight: 700; margin: 8px 0 4px; }
.cf-item { display: flex; gap: 14px; align-items: baseline; margin: 3px 0; font-size: 13.5px; }
.cf-item-l { flex: 1; min-width: 0; }
.cf-item-p { color: var(--muted, #66707f); }
.cf-item-d { color: var(--muted, #66707f); white-space: nowrap; }
.cf-item-a { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cf-over { color: var(--danger); }

.cf-undated { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-top: 14px; }
.cf-subh { margin: 0 0 4px; font-size: 15px; }
.cf-beyond { margin-top: 12px; }
.cf-foot { margin-top: 12px; font-size: 13px; }

/* wave564: the QBO blocks above the forecast — accounts (stand-in),
 * the actual-to-projected flow chart, this month's outlook, and
 * what's coming up. Cards wear the surface's own card shape. */
.cf-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; }
.cf-card .cf-subh { margin-top: 0; }
.cf-kpis-in { margin-bottom: 0; }
.cf-flow { display: flex; gap: 6px; align-items: flex-end; margin-top: 10px; }
.cf-flow-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.cf-flow-track { height: 84px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.cf-flow-bar { width: min(11px, 34%); border-radius: 3px 3px 0 0; }
.cf-flow-in { background: var(--accent); }
.cf-flow-out { background: var(--navy, #44506a); }
.cf-flow-tag { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: #98a1af; font-weight: 600; text-align: center; }
.cf-flow-ghost .cf-flow-track { border-bottom: 1px dashed var(--line-soft, #e0e5ee); }
.cf-legend { font-size: 12px; color: var(--muted, #66707f); margin: 8px 0 0; display: flex; align-items: center; gap: 6px; }
.cf-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.cf-swatch:first-child { margin-left: 0; }
.cf-kind { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.cf-kind-in { background: #f3ead2; color: #7a5c14; }
.cf-kind-out { background: #e8edf3; color: #33475e; }

/* wave565: the current month stacks actual (solid) under projected
 * (lighter); stacks grow upward from the track's base line. */
.cf-flow-stack { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; width: min(11px, 34%); }
.cf-flow-stack .cf-flow-bar { width: 100%; }
.cf-flow-proj { opacity: .45; }
.cf-legend .cf-swatch.cf-flow-proj { opacity: .45; }

/* wave566: the forecast rows were renamed .cf-trow — .cf-row is the
 * comms feed's row class (comms-view.css paints it display:grid),
 * and the shared name stacked this table's cells into a narrow
 * strip (measured live 2026-11-10: each cell on its own line inside
 * a full-width card). The display here is belt-and-braces so no
 * future namesake can bend the row again. */
.cf-table tr.cf-trow { display: table-row; }

/* wave574: the accounts card's balance totals */
.cf-bal-total { border-top: 1px solid var(--ds-line, #e2e2ea); margin-top: 4px; padding-top: 6px; }
