/* Busy Bins Financial Snapshot — on top of the portal's design system (base.css).
   Chart colours: the validated categorical palette (slots 1–7) for the seven biggest cost centres, one neutral for
   everything else, selected separately for light and dark. Brand green is the takings series. */
.fs { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s-other: #9a9a94;
  --in: #8FA61A; --out: #3D3D3D; --cum: var(--text); }
:root[data-theme="dark"] .fs { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s-other: #6e6e68;
  --in: #C1D82F; --out: #8A8A8A; --cum: #fff; }

/* From the Report Centre's top bar */
.rc-title { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.rc-title::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--green); margin-right: 10px; vertical-align: 1px; }
.fresh { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .15s; }
.fresh:hover { border-color: var(--line-strong); }
.fresh .ico { color: var(--muted); } .fresh.ok .ico { color: var(--ok); } .fresh.warn .ico { color: var(--amber); }
.fresh-pop { padding: 2px 10px 10px; font-size: 13.5px; max-width: 340px; }
.fresh-pop p { margin: 0 0 10px; }

.fs-lede { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.fs-small { font-size: 12.5px; }
.flip { transform: scaleX(-1); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px var(--font); }
.fs-live { background: var(--green); color: #000; }
.fs-head h1 { font-size: 30px; }
.fs-month { display: flex; gap: 8px; align-items: center; }
.fs-month select { height: 36px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 14px; font-weight: 600; }

/* Mood line */
.fs-mood { background: var(--green-wash); border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line)); border-radius: var(--r-lg); padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: center; }
.fs-mood p { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.3; grid-column: 1 / -1; }
.fs-mood-bar { display: flex; gap: 3px; }
.fs-mood-bar span { flex: 1; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text) 14%, transparent); }
.fs-mood-bar span.on { background: var(--green-ink); }
.fs-mood.all .fs-mood-bar span.on { background: var(--green); }
.fs-mood-count { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }

.fs-kpis .kpi-value { font-size: 36px; }
.fs-kpis .kpi-sub { min-height: 1.4em; }
.fs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fs-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fs-card .card-title h2 { font-size: 16px; margin: 0; }
.fs-card .card-body { padding-bottom: 20px; }
.fs-big { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fs-dl { margin: 14px 0 0; display: grid; gap: 6px; }
.fs-dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.fs-dl dt { color: var(--text-2); } .fs-dl dd { margin: 0; font-weight: 600; }
.fs-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.fs-note.warn { color: var(--amber); } .fs-note.ok { color: var(--ok); }
.fs-note .ico { margin-top: 1px; }

/* Bills covered */
.fs-cov { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fs-cov li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 84px; gap: 10px; align-items: center; }
.fs-cov-ico { font-size: 20px; text-align: center; filter: grayscale(.2); }
.fs-cov li:not(.done) .fs-cov-ico { opacity: .55; filter: grayscale(1); }
.fs-cov-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 5px; }
.fs-cov-top strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-cov-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.fs-cov-track { background: color-mix(in srgb, var(--c) 18%, var(--surface-3)); }
.fs-cov-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--c); }
.fs-cov-when { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.fs-cov-when .ico { color: var(--ok); }
.fs-cov-when .muted { font-weight: 500; font-size: 12.5px; }
.fs-est { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 0 6px; }

/* Donut */
.fs-donut { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.fs-donut svg { flex: none; }
.fs-donut path, .fs-donut circle { stroke: var(--surface); stroke-width: 1.5px; }
.fs-donut circle[stroke-width] { stroke-width: 24px; }
.fs-donut-l { font-size: 11px; fill: var(--muted); font-weight: 600; }
.fs-donut-v { font-family: var(--display); font-size: 17px; font-weight: 700; fill: var(--text); }
.fs-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; display: grid; gap: 7px; font-size: 13px; }
.fs-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 38px; gap: 8px; align-items: center; }
.fs-leg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.fs-leg-pct { text-align: right; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

/* Charts */
.fs-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.fs-grid-l { stroke: var(--line); stroke-width: 1; }
.fs-ax { font-size: 11px; fill: var(--muted); }
.fs-ax.strong { fill: var(--text); font-weight: 700; }
.fs-daybar { fill: color-mix(in srgb, var(--in) 55%, transparent); }
.fs-cum { fill: none; stroke: var(--cum); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fs-step { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.fs-target { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; }
.fs-mark { stroke: var(--surface); stroke-width: 2; }
.fs-cross { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fs-hit { fill: transparent; }
.fs-b-in { fill: var(--in); } .fs-b-out { fill: var(--out); }
.fs-tm.partial .fs-b-in, .fs-tm.partial .fs-b-out { opacity: .45; }
.fs-tm.on .fs-b-in, .fs-tm.on .fs-b-out { stroke: var(--text); stroke-width: 1.5px; }
.fs-tm.hover .fs-hit { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.fs-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.fs-key span { display: inline-flex; align-items: center; gap: 6px; }
.fs-key i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.fs-key .k-bar { background: color-mix(in srgb, var(--in) 55%, transparent); }
.fs-key .k-line { height: 3px; background: var(--cum); }
.fs-key .k-step { height: 0; border-top: 2px dashed var(--text-2); border-radius: 0; }
.fs-key .k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s1); }
.fs-key .k-target { height: 0; border-top: 2px dashed var(--amber); border-radius: 0; }
.fs-key .k-in { background: var(--in); } .fs-key .k-out { background: var(--out); }
.fs-tip { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; max-width: 300px; padding: 8px 11px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12.5px; line-height: 1.35; box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .1s; }
.fs-tip.show { opacity: 1; }
.fs-table { margin-top: 10px; font-size: 13px; }
.fs-table summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.fs-table table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.fs-table th, .fs-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

/* Bills to pay, owed */
.fs-buckets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.fs-buckets div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fs-buckets span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.fs-buckets strong { font-family: var(--display); font-size: 19px; }
.fs-buckets small { color: var(--muted); }
.fs-buckets .bad { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: var(--red-wash); }
.fs-buckets .bad span, .fs-buckets .bad strong { color: var(--red); }
.fs-due { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13.5px; }
.fs-due li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.fs-due li.late .fs-due-when { color: var(--red); font-weight: 700; }
.fs-due-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-due-when { color: var(--text-2); }
.fs-age { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.fs-age li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 80px; gap: 10px; align-items: center; }
.fs-age .money { text-align: right; font-weight: 600; }
.fs-age-bar { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.fs-age-bar i { display: block; height: 100%; border-radius: 4px; background: var(--text-2); }
.fs-age-bar i.late { background: var(--amber); }

.fs-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.fs-notes li.warn { color: var(--amber); list-style: none; margin-left: -18px; display: flex; gap: 6px; }
.fs-empty { padding: 36px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.fs-empty h2 { margin: 8px 0 0; }

/* Loading */
.sk { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 8px; }
.sk-line { height: 12px; width: 50%; margin-bottom: 14px; } .sk-big { height: 34px; width: 70%; }
.sk-card { height: 320px; border: none; }
@keyframes sk { to { background-position: -200% 0; } }

/* Setup */
.fs-save { display: flex; align-items: center; gap: 12px; position: sticky; top: 70px; z-index: 5; }
.fs-acc { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 12px 0; }
.fs-acc th, .fs-acc td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.fs-acc select { width: 100%; max-width: 280px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 8px; }
.fs-acc tr.guess select { border-style: dashed; color: var(--text-2); }
.fs-order { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: o; }
.fs-order li { counter-increment: o; display: grid; grid-template-columns: 22px 12px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; }
.fs-order li::before { content: counter(o); color: var(--muted); font-weight: 700; text-align: right; }
.fs-ord-btns { display: flex; gap: 4px; }
.fs-ord-btns .btn { min-width: 32px; padding: 0; }
.fs-targets { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.fs-targets li { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
.fs-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.fs-inline .field { margin: 0; }
.fs-card .field { margin-top: 10px; }

button.nav { background: none; border: none; width: 100%; cursor: pointer; text-align: left; font: inherit; font-weight: 500; font-size: 14px; }
.side .side-out { display: none; }

@media (max-width: 1100px) { .fs-grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .fs-grid, .fs-grid.three { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .fs-head h1 { font-size: 24px; }
  .fs-mood p { font-size: 17px; }
  .fs-kpis .kpi-value { font-size: 28px; }
  .fs-buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-save { top: 60px; }
  .side .side-out { display: flex; }
}
@media (max-width: 640px) {
  .fs-acc thead { display: none; }
  .fs-acc tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .fs-acc td { border: none; padding: 0; }
  .fs-acc td:last-child { grid-column: 1 / -1; }
  .fs-acc select { max-width: none; }
}
@media (max-width: 520px) {
  .fs-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fs-kpis .kpi { padding: 14px; } .fs-kpis .kpi-value { font-size: 22px; }
  .fs-age li { grid-template-columns: 96px minmax(0, 1fr) 64px; }
  .fs-due li { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .fs-cov li { grid-template-columns: 24px minmax(0, 1fr) 70px; }
  .fs-order li { grid-template-columns: 18px 12px minmax(0, 1fr) auto; } .fs-order li > .muted { display: none; }
}
