/* Cash flow previsionale: pagina /cashflow, Studio → Cassa prevista, riquadro delle dashboard. */

.cf-chart text.cf-below { fill: var(--danger); font-weight: 700; }

.cf-weeks td, .cf-weeks th { white-space: nowrap; }
.cf-weeks tbody tr.click { cursor: pointer; }
.cf-weeks tr.cf-open td { background: var(--surface-hover); }
.cf-caret { display: inline-block; width: 12px; color: var(--muted); font-size: 11px; }
.cf-prob { color: #0ea5e9; }
.cf-detail td { white-space: normal; }
.cf-cat { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; font-size: 13px; }
.cf-cat:first-child { margin-top: 0; }
.cf-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.cf-item:last-child { border-bottom: 0; }
.cf-date { padding-top: 1px; font-variant-numeric: tabular-nums; }
.cf-what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.cf-tags { display: inline-flex; gap: 6px; align-items: center; }
.cf-sub { flex-basis: 100%; line-height: 1.45; }

.cf-origin { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; }
.cf-origin.document { color: #047857; background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .3); }
.cf-origin.plan { color: #0369a1; background: rgba(14, 165, 233, .12); border-color: rgba(14, 165, 233, .3); }
.cf-origin.estimate { color: #b45309; background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .35); }
.cf-code { display: inline-block; padding: 1px 6px; border-radius: 6px; font: 600 10.5px 'Space Grotesk', Inter, sans-serif; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
:root[data-theme="dark"] .cf-origin.document { color: #6ee7b7; }
:root[data-theme="dark"] .cf-origin.plan { color: #7dd3fc; }
:root[data-theme="dark"] .cf-origin.estimate { color: #fcd34d; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .cf-origin.document { color: #6ee7b7; }
    :root:not([data-theme="light"]) .cf-origin.plan { color: #7dd3fc; }
    :root:not([data-theme="light"]) .cf-origin.estimate { color: #fcd34d; }
}

.cf-warnings ul, .cf-st-note ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.cf-st-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; }
.cf-leader { padding: 8px 4px; }
.cf-leader .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

.cf-how summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.cf-how summary::-webkit-details-marker { display: none; }
.cf-how[open] summary { margin-bottom: 12px; }
.cf-assumptions { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: 13px; }
.cf-assumptions dt { font-weight: 600; color: var(--text); }
.cf-assumptions dd { margin: 0; color: var(--text-2); line-height: 1.55; }

.cf-h { font-size: 14px; margin: 0 0 10px; }
.cf-people { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; max-height: 180px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.cf-people .check.muted { opacity: .55; }
.cf-pcts { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cf-tile .card-header a { font-weight: 600; }
.cf-tile-alarm { box-shadow: inset 0 0 0 1px rgba(244, 63, 94, .45); }
.cf-spark { width: 100%; height: 92px; display: block; margin: 2px 0 10px; }
.cf-tile-next { display: grid; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }

@media (max-width: 760px) {
    .cf-assumptions { grid-template-columns: 1fr; gap: 2px; }
    .cf-assumptions dd { margin-bottom: 10px; }
    .cf-pcts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cf-item { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; }
}

/* Studio: con «Cassa prevista» la barra ha otto voci; su schermi medi niente icone e meno spazio, mai a capo. */
.st-link { white-space: nowrap; }
@media (max-width: 1600px) and (min-width: 761px) {
    .st-nav .st-link { padding: 8px 10px; gap: 6px; }
    .st-nav .st-link .ic { display: none; }
}
.cf-st-table td.num, .cf-st-table th { white-space: nowrap; }
