/* PRTY OS — Company Finance › Reviews / Receivables / Reports / Event Financials.
   Screen layout only; components.css owns the kit. Prefix: fc- */

/* ---------- Shared bits ---------- */
.fc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; padding: var(--s-6) 0 var(--s-3); }
.fc-head__main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fc-head__title { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.fc-head__title .page-title { font-size: 26px; letter-spacing: -0.02em; }
.fc-head__summary { color: var(--text-2); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.fc-figs { display: grid; grid-template-columns: repeat(4, auto); gap: var(--s-2) var(--s-6); }
.fc-fig { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-fig span { font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; }
.fc-fig b { font-size: var(--fs-16); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color var(--dur-3) var(--ease); }
.fc-fig b small { font-size: var(--fs-12); color: var(--text-3); font-weight: 500; }
.fc-fig b.c-green { color: var(--green); } .fc-fig b.c-red { color: var(--red); } .fc-fig b.c-amber { color: var(--amber); }

.fc-two { display: flex; flex-direction: column; gap: 1px; font-size: var(--fs-12); color: var(--text-2); min-width: 0; }
.fc-two--inline { display: inline-flex; flex-direction: row; flex-wrap: wrap; gap: 2px 6px; }
.fc-two__k { color: var(--text-3); }

.fc-amt { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.fc-amt--in { color: var(--green); }
.fc-amt__tag { font: 600 var(--fs-10)/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 5px; border-radius: 3px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 40%, transparent); }

.fc-callout, .fc-explain { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--bg-2); font-size: var(--fs-13); color: var(--text-2); }
.fc-callout > .icon, .fc-explain > .icon { color: var(--text-3); margin-top: 2px; flex-shrink: 0; }
.fc-callout b { color: var(--text); font-weight: 500; }
.fc-explain { padding: var(--s-4); gap: 12px; border-color: var(--line-strong); }
.fc-explain .t-strong { font-size: var(--fs-14); line-height: 1.45; margin-bottom: 4px; }

/* ---------- Stepper ---------- */
.fc-steps { list-style: none; margin: 0; padding: var(--s-4); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(124px, 1fr); gap: 0; overflow-x: auto; scrollbar-width: thin; }
.fc-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding-right: var(--s-3); min-width: 0; }
.fc-step::before { content: ""; position: absolute; top: 10px; left: 26px; right: 4px; height: 1px; background: var(--line-strong); }
.fc-step:last-child::before { display: none; }
.fc-step.is-done::before { background: color-mix(in srgb, var(--green) 45%, var(--line)); }
.fc-step__mark { position: relative; z-index: 1; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.fc-step.is-pending .fc-step__mark { background: var(--surface); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.fc-step__mark .icon { stroke-width: 2.5; }
.fc-step__n { font: 600 var(--fs-10)/1 var(--font); font-variant-numeric: tabular-nums; }
.fc-step__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-step__label { font-size: var(--fs-12); font-weight: 500; color: var(--text); }
.fc-step.is-pending .fc-step__label { color: var(--text-2); }
.fc-step__status { font: 600 var(--fs-10)/1.4 var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); }
.fc-step.is-pending .fc-step__status { color: var(--text-4); }
.fc-step__detail { font-size: var(--fs-11); color: var(--text-3); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* vertical variant (narrow containers + mobile) */
.fc-reports__cadence .fc-steps { grid-auto-flow: row; grid-auto-columns: auto; padding: 0; gap: 0; overflow: visible; }
.fc-reports__cadence .fc-step { flex-direction: row; gap: 10px; padding: 0 0 var(--s-3); }
.fc-reports__cadence .fc-step::before { top: 22px; bottom: 0; left: 10px; right: auto; width: 1px; height: auto; }

/* ---------- Pipeline + account filter ---------- */
.fc-pipeline { overflow: hidden; }
.fc-accounts { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.fc-accounts__row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-3); align-items: baseline; font-size: var(--fs-12); }
.fc-accounts__k { font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; }
.fc-accounts__list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fc-acct { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: var(--fs-12); color: var(--text); }
.fc-acct--out { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-4); }
.fc-acct--out .icon { color: var(--red); }

/* ---------- Lock panel ---------- */
.fc-lock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s-6); align-items: center; padding: var(--s-4) var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); transition: border-color var(--dur-3) var(--ease); }
.fc-lock.is-final { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.fc-lock__progress { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fc-lock__count b { font-size: var(--fs-24); font-weight: 600; letter-spacing: -0.02em; }
.fc-lock__action { min-width: 0; }
.fc-lockbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fc-lockbtn .btn { --btn-h: 38px; padding: 0 16px; font-size: var(--fs-14); }
.fc-lockbtn .icon { vertical-align: -2px; }
.fc-confirm { display: flex; flex-direction: column; gap: 8px; padding: var(--s-3); border-radius: var(--r-2); border: 1px solid var(--line-strong); background: var(--bg-2); }
.fc-locked { display: flex; flex-direction: column; gap: 6px; }
.fc-locked__title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-16); font-weight: 600; }
.fc-locked__title .icon { color: var(--green); }
.fc-locked__btns { margin-top: 4px; flex-wrap: wrap; }

/* ---------- Review rows ---------- */
.fc-rv {
  display: grid; align-items: center; column-gap: var(--s-3);
  grid-template-columns: 56px minmax(150px, 1.1fr) minmax(96px, 0.8fr) 118px minmax(150px, 0.9fr) minmax(180px, 1.6fr) 96px;
  min-height: 56px; padding: 8px var(--s-4);
}
.fc-rv--head { min-height: 34px; padding-top: 0; padding-bottom: 0; border-bottom: 1px solid var(--line); font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; }
.fc-rv .r, .fc-dc .r { text-align: right; justify-self: end; }
.fc-rvwrap { border-bottom: 1px solid var(--line-soft); transition: background var(--dur-1); }
.fc-rvwrap:last-child { border-bottom: 0; }
.fc-rvwrap:hover { background: var(--hover); }
.fc-rvwrap.is-open { background: var(--bg-2); }
.fc-rvwrap.is-open:hover { background: var(--bg-2); }
.fc-rv__cp { font-size: var(--fs-12); color: var(--text); }
.fc-rv__note { line-height: 1.4; }
.fc-nr { font: 600 var(--fs-10)/1 var(--font); letter-spacing: 0.08em; color: var(--amber); }

/* ---------- Decision panel (inline) ---------- */
.fc-decide { margin: 0 var(--s-4) var(--s-4); padding: var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); display: flex; flex-direction: column; gap: var(--s-3); animation: rise-in var(--dur-2) var(--ease); }
.fc-decide__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.fc-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.fc-preset { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-2); cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1); min-width: 0; }
.fc-preset:hover { border-color: var(--line-strong); background: var(--hover); }
.fc-preset.is-on { border-color: var(--text-3); background: var(--press); }
.fc-preset__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-preset__label { font-weight: 500; color: var(--text); }
.fc-radio { appearance: none; flex-shrink: 0; width: 15px; height: 15px; margin: 2px 0 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.fc-radio:checked { border-color: var(--inverse); }
.fc-radio:checked::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--inverse); }
.fc-radio:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fc-decide__person { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-3); align-items: end; padding: var(--s-3); border-radius: var(--r-2); background: var(--bg-2); }
.fc-decide__result { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-12); color: var(--text-3); }
.fc-decide__result .icon { margin-top: 2px; flex-shrink: 0; }
.fc-decide__result b { color: var(--text); font-weight: 500; }
.fc-decide__result .fc-two { display: inline-flex; }
.fc-decide__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding-top: var(--s-3); border-top: 1px solid var(--line-soft); }
.fc-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: var(--fs-13); }
.fc-check .checkbox { margin-top: 2px; }
.fc-check__hint { display: block; }
.fc-decide__btns { display: flex; gap: var(--s-2); margin-left: auto; }

/* ---------- Decided rows ---------- */
.fc-dc {
  display: grid; align-items: center; column-gap: var(--s-3);
  grid-template-columns: 56px minmax(150px, 1fr) 118px minmax(240px, 2fr) 140px 84px;
  min-height: 56px; padding: 8px var(--s-4); border-bottom: 1px solid var(--line-soft);
  animation: fade-in var(--dur-2) var(--ease);
}
.fc-dc:last-child { border-bottom: 0; }
.fc-dc__cp { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-12); }
.fc-dc__decision { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-dc__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.fc-dc__tags a.tag:hover { color: var(--text); border-color: var(--text-3); }
.fc-dc__by { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- Receivables ---------- */
.fc-rc__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-4); align-items: start; }
.fc-rc__side { display: flex; flex-direction: column; gap: var(--s-4); }
.fc-rc__desc { min-width: 220px; max-width: 360px; line-height: 1.4; padding-top: 8px !important; padding-bottom: 8px !important; }
.fc-rc__acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
.fc-age { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.2; }
.fc-aging { display: flex; flex-direction: column; gap: 10px; }
.fc-aging__row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 64px 16px; gap: 8px; align-items: center; }
.fc-aging__row .r { text-align: right; }
.fc-byperson { display: flex; flex-direction: column; }
.fc-byperson__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-13); }
.fc-byperson__row:last-child { border-bottom: 0; }

/* ---------- Reports ---------- */
.fc-reports__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: var(--s-4); align-items: start; }
.fc-months td { height: 44px; }
.fc-feed__intro { margin: 0 0 var(--s-3); font-size: var(--fs-13); max-width: 80ch; }
.fc-feed__schema { display: flex; flex-direction: column; gap: 8px; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-soft); }
.fc-cols { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-cols code { font: 500 var(--fs-11)/1 var(--mono); color: var(--text-2); padding: 4px 6px; border-radius: 3px; background: var(--surface-3); }
.fc-feed__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 40px; padding: 4px var(--s-4); }
.fc-feed__sel { width: 180px; height: 28px; font-size: var(--fs-12); }
.fc-data th { font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.fc-data td { font-family: var(--mono); font-size: var(--fs-12); color: var(--text-2); }

/* ---------- Event financials ---------- */
.fc-ev__filters { gap: var(--s-3); }
.fc-flowlegend { display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-12); color: var(--text-3); }
.fc-flowlegend > span { display: inline-flex; align-items: center; gap: 5px; }
.fc-flowlegend i { width: 10px; height: 6px; border-radius: 2px; display: inline-block; }
.fc-evtbl__groups th { height: 26px; font-size: var(--fs-10); color: var(--text-4); border-bottom-color: var(--line-soft); }
.fc-evtbl th.c { text-align: center; }
.fc-evtbl .fc-evtbl__sep { box-shadow: inset 1px 0 0 var(--line-soft); }
.fc-evtbl td { height: 54px; }
.fc-evtbl__flow { width: 132px; min-width: 110px; }
.fc-evname { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 280px; }
.fc-pl { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.2; }
.fc-flow { position: relative; height: 6px; border-radius: 3px; background: var(--surface-4); overflow: hidden; }
.fc-flow__seg { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; transition: width var(--dur-3) var(--ease); }
.fc-flow__seg--c { background: var(--text-4); }
.fc-flow__seg--i { background: var(--text-3); }
.fc-flow__seg--p { background: var(--text); }
.fc-ev__foot { align-items: flex-start; line-height: 1.45; }
.fc-ev__foot .icon { margin-top: 2px; flex-shrink: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .fc-figs { grid-template-columns: repeat(2, auto); }
  .fc-lock { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .fc-rv { grid-template-columns: 56px minmax(0, 1fr) auto auto; grid-template-areas: "date cp amt act" ". acct class class" ". note note note"; row-gap: 4px; }
  .fc-rv--head { display: none; }
  .fc-rv__date { grid-area: date; } .fc-rv__cp { grid-area: cp; } .fc-rv__amt { grid-area: amt; } .fc-rv__act { grid-area: act; }
  .fc-rv__acct { grid-area: acct; } .fc-rv__class { grid-area: class; justify-self: end; } .fc-rv__note { grid-area: note; }
  .fc-dc { grid-template-columns: 56px minmax(0, 1fr) auto auto; grid-template-areas: "date cp amt act" ". dec dec dec" ". by by by"; row-gap: 4px; }
  .fc-dc__date { grid-area: date; } .fc-dc__cp { grid-area: cp; } .fc-dc__amt { grid-area: amt; } .fc-dc__act { grid-area: act; }
  .fc-dc__decision { grid-area: dec; } .fc-dc__by { grid-area: by; }
  .fc-rc__grid, .fc-reports__grid { grid-template-columns: minmax(0, 1fr); }
  .fc-rc__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .fc-head { padding-top: var(--s-5); }
  .fc-head__title .page-title { font-size: 22px; }
  .fc-figs { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .fc-lock { padding: var(--s-4); }
  .fc-lockbtn, .fc-lockbtn .btn { width: 100%; }
  .fc-lockbtn .btn { --btn-h: 44px; }
  .fc-confirm .btn, .fc-locked__btns .btn { --btn-h: 40px; flex: 1; }
  .fc-steps { grid-auto-flow: row; grid-auto-columns: auto; padding: var(--s-4); overflow: visible; }
  .fc-step { flex-direction: row; gap: 10px; padding: 0 0 var(--s-3); }
  .fc-step::before { top: 22px; bottom: 0; left: 10px; right: auto; width: 1px; height: auto; }
  .fc-accounts__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fc-rv { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cp amt" "date class" "note note" "acct act"; padding: var(--s-3) var(--s-4); }
  .fc-rv__class { justify-self: end; }
  .fc-rv__act .btn { --btn-h: 38px; }
  .fc-decide { margin: 0 var(--s-2) var(--s-3); padding: var(--s-3); }
  .fc-presets { grid-template-columns: minmax(0, 1fr); }
  .fc-preset { padding: 11px 10px; }
  .fc-decide__person { grid-template-columns: minmax(0, 1fr); }
  .fc-decide__btns { width: 100%; }
  .fc-decide__btns .btn { flex: 1; --btn-h: 42px; }
  .fc-dc { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cp amt" "dec dec" "by act"; padding: var(--s-3) var(--s-4); }
  .fc-dc__date { display: none; }
  .fc-rc__side { grid-template-columns: minmax(0, 1fr); }
  .fc-rc__acts .btn { --btn-h: 38px; }
  .fc-feed__sel { width: 150px; }
  .fc-ev__filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .fc-ev__filters .chips .chip { flex-shrink: 0; height: 32px; }
}
