/* fin-vendor-invoices.css: Vendor Invoices page ONLY (sheet mode, read-only).
   Every layout piece comes from fin-kit.css (page head, toolbar, summary,
   metrics, table, pills, modal, key-value wells); this file holds the
   vendor-specific bits, all scoped under the fin-vinv prefix.
   COMMENT RULE: never type an asterisk inside a CSS comment. */

.fin-vinv-nw { white-space: nowrap; }
.fin-vinv-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fin-s-2); }

/* A group of actions inside a kit empty state sits where the kit puts a
   single button: its own column on wide screens, under the text below. */
.fin-panel .fin-empty:not(.is-center) > .fin-vinv-acts { grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; flex-wrap: nowrap; margin-left: var(--fin-s-1); }
@media (max-width: 1100px) {
  .fin-panel .fin-empty:not(.is-center) > .fin-vinv-acts { grid-column: 2; grid-row: auto; justify-self: start; flex-wrap: wrap; margin: var(--fin-s-2) 0 0; }
}

/* Summary hint: the all-months payable figure on the same line, wrapping
   as one unit. */
.fin-vinv-pay { white-space: normal; }
.fin-vinv-pay b { font-weight: var(--fin-fw-semi); color: var(--fin-text-1); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-vinv-asof { font-size: var(--fin-fs-meta); color: var(--fin-text-3); white-space: nowrap; }

/* ── Table: fixed-width columns, so filtering never re-flows. ─────────── */
/* table-layout fixed: the header row sets every width (padding included),
   the vendor column takes what is left. */
.fin-vinv-table { table-layout: fixed; }
.fin-vinv-table .fin-cell2 > span code { line-height: 1; }
.fin-vinv-table th.fin-c-main { width: auto; }
.fin-vinv-table .fin-vinv-c-date { width: 104px; white-space: nowrap; }
.fin-vinv-table .fin-vinv-c-desc { width: 26%; max-width: 0; }
.fin-vinv-table .fin-vinv-c-desc .fin-cell2 > b { font-weight: var(--fin-fw-medium); color: var(--fin-text-2); }
.fin-vinv-table .fin-vinv-c-dpp { width: 168px; }
.fin-vinv-table .fin-vinv-c-dpp .fin-cell2 > b { font-weight: var(--fin-fw-medium); }
.fin-vinv-table .fin-vinv-c-pph { width: 156px; }
.fin-vinv-table .fin-vinv-c-pph .fin-cell2 > b { font-weight: var(--fin-fw-medium); color: var(--fin-text-2); }
.fin-vinv-table .fin-vinv-c-amt { width: 164px; }
.fin-vinv-table .fin-vinv-c-st { width: 148px; white-space: nowrap; }
.fin-vinv-table tfoot td.fin-vinv-foot-l { white-space: nowrap; }
.fin-vinv-table .fin-vinv-alt { display: none; }
.fin-vinv-date { color: var(--fin-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-vinv-noinv { color: var(--fin-text-3); }
.fin-vinv-hid { color: var(--fin-warn-ink); }

/* The Description column needs room: under 1200px of table it folds into
   the sub line of the vendor cell. */
@container fintable (max-width: 1199px) {
  .fin-vinv-table .fin-vinv-c-desc { display: none; }
  .fin-vinv-table .fin-vinv-alt { display: inline; }
}

/* Status cell: the pill on the main line, the open-days line under it. */
.fin-vinv-st { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 2.6em; line-height: 1.3; }
.fin-vinv-st > .fin-pill { margin: -1px 0; }
.fin-vinv-st-sub { font-size: var(--fin-fs-meta); line-height: 1.3; color: var(--fin-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-vinv-st-sub.is-ok { color: var(--fin-ok-ink); }
.fin-vinv-st-sub.is-crit { color: var(--fin-crit-ink); font-weight: var(--fin-fw-semi); }

/* Phone cards: the date column hides, the card's bottom-right says
   "Dated 28 Jan" (and how long an unpaid bill has been open). */
@container fintable (max-width: 599px) {
  .fin-vinv-table > tbody > tr { min-height: 72px; }
  .fin-vinv-st { min-height: 0; }
  .fin-vinv-st > .fin-pill { margin: 0; }
}

/* ── Detail modal ─────────────────────────────────────────────────────── */
.fin-vinv-num { font-family: var(--fin-font-mono); font-size: var(--fin-fs-micro); color: var(--fin-text-2); letter-spacing: -.01em; }
.fin-vinv-dt-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fin-s-2) var(--fin-s-3); min-height: 32px; }
.fin-vinv-dt-head .fin-vinv-st-sub { white-space: normal; }
.fin-vinv-notes { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: var(--fin-s-1); }
.fin-vinv-detail .fin-modal-f-r { min-width: 0; }

/* ── Sheet notes (data checks of this tab) ─────────────────────────────── */
.fin-vinv-chk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fin-vinv-chk > li {
  display: flex; align-items: center; gap: var(--fin-s-3); min-height: 48px; box-sizing: border-box;
  padding: var(--fin-s-1) var(--fin-s-3) var(--fin-s-1) var(--fin-panel-pad); border-bottom: 1px solid var(--fin-border);
}
.fin-vinv-chk > li:last-child { border-bottom: 0; }
.fin-vinv-chk > li > .fin-chip-dot { flex: none; }
.fin-vinv-chk-t { flex: 1 1 auto; min-width: 0; font-size: var(--fin-fs-meta); line-height: 1.45; color: var(--fin-text-2); overflow-wrap: anywhere; }
.fin-vinv-chk-t code { font-family: var(--fin-font-mono); font-size: var(--fin-fs-micro); color: var(--fin-text-3); }
.fin-vinv-chk > li > .fin-btn { flex: none; }

/* Two-row notes (a bill in two year tabs): headline, text, both rows. */
.fin-vinv-chk-t > b { font-weight: var(--fin-fw-semi); color: var(--fin-text-1); }
.fin-vinv-chk > li.has-locs { align-items: flex-start; padding-top: var(--fin-s-2); padding-bottom: var(--fin-s-2); }
.fin-vinv-chk > li.has-locs > .fin-chip-dot { margin-top: 6px; }
.fin-vinv-chk-l { margin-top: var(--fin-s-2); }
