/* Cash-flow workspace. Financial values continue to come from treasury. */
#fluxo { --cf-accent: #5343cf; --cf-in: #087f78; --cf-out: #bc4055; }
#fluxo [hidden] { display: none !important; }
#fluxo .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; }
#fluxo .cf-head { align-items: center; margin-bottom: 24px; }
#fluxo .cf-head h1 { font-size: 28px; letter-spacing: -.8px; }
#fluxo .cf-head p { margin-top: 6px; }
#fluxo .cf-head .actions { flex-wrap: wrap; }
#fluxo .cf-filters { padding: 20px 0; border-block: 1px solid var(--line); }
#fluxo .cf-filter-row { display: grid; grid-template-columns: 1fr 1fr 1.5fr .8fr; gap: 16px; }
#fluxo .field { min-width: 0; }
#fluxo .field label { display: block; margin-bottom: 7px; font-size: 12px; }
#fluxo input, #fluxo select { width: 100%; min-width: 0; }
#fluxo .cf-filter-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
#fluxo .cf-period-buttons { display: flex; gap: 6px; }
#fluxo .cf-scenario-field { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#fluxo .cf-scenario-field label { font-size: 12px; color: var(--muted); white-space: nowrap; }
#fluxo .cf-scenario-field select { width: 225px; }
#fluxo .cf-delay { display: flex; align-items: center; gap: 8px; font-size: 12px; }
#fluxo .cf-delay input { width: 65px; }
#fluxo .cf-state { font-size: 12px; padding: 14px 0 0; min-height: 31px; color: var(--muted); }
#fluxo .cf-state.error { color: var(--cf-out); }
#fluxo .cf-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 26px 0 24px; gap: 24px; }
#fluxo .cf-metric { border-right: 1px solid var(--line); padding-right: 18px; min-width: 0; }
#fluxo .cf-metric:last-child { border: 0; padding-right: 0; }
#fluxo .cf-metric-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
#fluxo .cf-metric strong { display: block; font-size: clamp(19px,2vw,28px); font-weight: 650; letter-spacing: -.65px; font-variant-numeric: tabular-nums; }
#fluxo .cf-metric small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 8px; }
#fluxo .cf-metric:last-child strong { color: var(--cf-accent); }
#fluxo .cf-metric strong.cf-negative { color: var(--cf-out); }
#fluxo .cf-realized { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; font-size: 12px; border-top: 1px solid var(--line); padding: 14px 0 22px; }
#fluxo .cf-realized > span:first-child { color: var(--muted); }
#fluxo .cf-realized b { font-weight: 600; font-variant-numeric: tabular-nums; }
#fluxo .cf-surface { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#fluxo .cf-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 22px 24px 14px; }
#fluxo .cf-section-head h2 { font-size: 16px; margin: 0; font-weight: 650; }
#fluxo .cf-section-head p { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
#fluxo .cf-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
#fluxo .cf-legend span { display: flex; align-items: center; gap: 6px; }
#fluxo .cf-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--cf-accent); }
#fluxo .cf-legend .cf-line-key { height: 2px; width: 16px; }
#fluxo .cf-legend .cf-in-key { background: var(--cf-in); }
#fluxo .cf-legend .cf-out-key { background: var(--cf-out); }
#fluxo #treasuryChart { padding: 0 16px; min-height: 250px; }
#fluxo .cf-chart { display: block; width: 100%; height: 265px; overflow: visible; }
#fluxo .cf-chart text { font-family: inherit; font-size: 11px; fill: var(--muted); }
#fluxo .cf-chart .cf-grid { stroke: #e9edf3; stroke-dasharray: 3 5; }
#fluxo .cf-chart .cf-zero { stroke: #c5ccda; }
#fluxo .cf-chart .cf-balance-line { fill: none; stroke: var(--cf-accent); stroke-width: 2.5; stroke-linejoin: round; }
#fluxo .cf-point { outline: none; }
#fluxo .cf-point circle { fill: white; stroke: var(--cf-accent); stroke-width: 2; transition: r .16s, stroke-width .16s; }
#fluxo .cf-point:hover circle, #fluxo .cf-point:focus circle { r: 6; stroke-width: 3; }
#fluxo .cf-chart-note { margin: 0; padding: 0 24px 18px; color: var(--muted); font-size: 11px; }
#fluxo .cf-attention { margin-top: 20px; border-block: 1px solid var(--line); }
#fluxo .cf-attention summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 17px 0; font-size: 13px; font-weight: 600; }
#fluxo .cf-attention summary::-webkit-details-marker { display: none; }
#fluxo .cf-attention summary:after { content: '⌄'; margin-left: auto; color: var(--muted); transition: transform .18s; }
#fluxo .cf-attention[open] summary:after { transform: rotate(180deg); }
#fluxo .cf-count { font-size: 11px; background: #eeebfc; color: var(--cf-accent); border-radius: 4px; padding: 2px 6px; font-weight: 500; }
#fluxo .cf-alert { display: grid; grid-template-columns: 210px 1fr; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
#fluxo .cf-alert strong { font-weight: 600; }
#fluxo .cf-alert span { color: var(--muted); }
#fluxo .cf-alert.critical strong { color: var(--cf-out); }
#fluxo .cf-alert-note { padding: 10px 0 18px; font-size: 11px; line-height: 1.6; color: var(--muted); }
#fluxo .cf-ledger { margin-top: 28px; }
#fluxo .cf-ledger .cf-section-head { padding: 0 0 18px; }
#fluxo .cf-ledger-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 16px; }
#fluxo .cf-tabs { display: flex; gap: 6px; }
#fluxo .cf-tabs button { border: 0; background: transparent; border-radius: 6px; padding: 9px 13px; cursor: pointer; font-size: 12px; color: var(--muted); transition: background .16s,color .16s; }
#fluxo .cf-tabs button:hover { background: #eae7fa; color: var(--cf-accent); }
#fluxo .cf-tabs button[aria-pressed="true"] { background: #eeebfc; color: var(--cf-accent); font-weight: 650; }
#fluxo .cf-basis-filter { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
#fluxo .cf-basis-filter select { width: 190px; }
#fluxo .cf-table { width: 100%; min-width: 0; table-layout: fixed; }
#fluxo .cf-table th { padding: 12px 14px; font-size: 11px; background: #fafbfe; }
#fluxo .cf-table td { padding: 18px 14px; font-size: 12px; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
#fluxo .cf-table th:nth-child(1) { width: 13%; }
#fluxo .cf-table th:nth-child(2) { width: 30%; }
#fluxo .cf-table th:nth-child(3) { width: 15%; }
#fluxo .cf-table th:nth-child(4) { width: 22%; }
#fluxo .cf-table th:nth-child(5) { width: 20%; }
#fluxo .cf-table td:last-child { white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
#fluxo .cf-table td small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
#fluxo .cf-table tbody tr { transition: background .15s; }
#fluxo .cf-table tbody tr:hover { background: #faf9ff; }
#fluxo .cf-basis { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
#fluxo .cf-basis:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #aaa2d9; }
#fluxo .cf-basis.realized:before { background: var(--cf-in); }
#fluxo .cf-in { color: var(--cf-in); }
#fluxo .cf-out { color: var(--cf-out); }
#fluxo .cf-empty { padding: 45px 20px; text-align: center; color: var(--muted); line-height: 1.8; }
#fluxo .cf-empty strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
#fluxo .cf-table-foot { margin: 12px 0 0; font-size: 11px; color: var(--muted); }
#fluxo .cf-results[aria-busy="true"] { opacity: .5; pointer-events: none; }
#fluxo :focus-visible { outline: 2px solid var(--cf-accent); outline-offset: 3px; }
@media (max-width: 1100px) {
 #fluxo .cf-filter-row { grid-template-columns: 1fr 1fr; }
 #fluxo .cf-scenario-field { margin-left: 0; }
 #fluxo .cf-summary { gap: 14px; }
 #fluxo .cf-metric strong { font-size: 21px; }
}
@media (max-width: 1000px) {
 #fluxo .cf-summary { grid-template-columns: 1fr 1fr; gap: 24px; }
 #fluxo .cf-metric:nth-child(2) { border-right: 0; }
 #fluxo .cf-section-head { padding: 18px 16px 12px; }
 #fluxo .cf-chart-note { padding-inline: 16px; }
 #fluxo .cf-alert { grid-template-columns: 1fr; gap: 3px; }
 #fluxo .cf-table thead { display: none; }
 #fluxo .cf-table, #fluxo .cf-table tbody { display: block; }
 #fluxo .cf-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 14px; gap: 10px; border-bottom: 1px solid var(--line); }
 #fluxo .cf-table td { display: block; border: 0; padding: 0; }
 #fluxo .cf-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
 #fluxo .cf-table td:nth-child(3) { text-align: right; }
 #fluxo .cf-table td[colspan] { grid-column: 1 / -1; }
 #fluxo .cf-basis-filter { margin-left: 0; }
 #fluxo .cf-head h1 { font-size: 25px; }
 #fluxo .cf-scenario-field { width: 100%; }
 #fluxo .cf-scenario-field select { flex: 1; width: auto; }
}
@media (prefers-reduced-motion: reduce) { #fluxo *, #fluxo *:before, #fluxo *:after { transition: none !important; } }

#fluxo .cf-period-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#fluxo #cashFlowMonth{width:180px;min-height:34px}#fluxo .cf-closed-months{margin:20px 0;padding:18px 0;border-bottom:1px solid var(--line)}#fluxo .cf-closed-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#fluxo .cf-closed-heading h2{font-size:18px}#fluxo .cf-closed-months p{font-size:12px;color:#63728b;margin:12px 0}#fluxo .cf-closed-months td{vertical-align:middle}

#fluxo .cf-date-navigation{display:flex;align-items:center;gap:8px}#fluxo .cf-date-navigation input{min-width:0;flex:1;width:100%}#fluxo .cf-date-navigation .btn{flex:0 0 34px;min-height:36px;padding:0;text-align:center}
