/* portal-money — page-area styles for the 2026-10 UX round. Shell + shared components: portal.css.
   Admin partners, payouts, run detail, 1099 summary, reports, settings, content. Everything is prefixed .wfm-
   so it can't collide with other page areas. Money is tabular, "$" always shown (AdminMoneyCopy.Money). */

/* ── Page furniture ─────────────────────────────────────────────── */
/* Back link sits above the layout's page heading: the content column is a grid, so order it first. */
.wf-portal-grid > .wfm-back { order: -1; margin-bottom: -14px; justify-self: start; }
.wfm-p { margin: 0 0 12px; }
.wfm-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.wfm-sec-head h2 { margin: 0 !important; }
.wfm-sec-total { font-weight: 700; color: var(--wf-ink); font-variant-numeric: tabular-nums; font-size: 17px; }
.wfm-empty-sm { padding: 22px 18px; }
.wfm-empty-sm p { margin: 0 auto; }
.wfm-stats { margin: 0; }
.wfm-li-link { color: inherit; text-decoration: none; }
.wfm-li-link:hover { text-decoration: underline; color: var(--wf-ink); }
.wfm-go { flex: none; color: var(--wf-faint); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; text-decoration: none; }
.wfm-go:hover { background: var(--wf-tile); color: var(--wf-ink); }
.wfm-inline-btn { padding: 0 6px !important; vertical-align: baseline; font-size: 13px !important; }
.wfm-inline-help { display: inline !important; margin: 0 0 0 6px !important; }
.wfm-dim { opacity: .62; }
.wfm-dim:hover { opacity: 1; }
.wfm-date { max-width: 12rem; }
.wfm-year { max-width: 7rem; }
.wfm-filter { gap: 8px; }
.wfm-mono { font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: 13px !important; }
.wfm-code { font-family: var(--wf-font-display); font-weight: 800; letter-spacing: .06em; color: var(--wf-ink); }

/* ── Partners list ──────────────────────────────────────────────── */
.wfm-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wfm-search .form-control { flex: 1 1 14rem; max-width: 28rem; border-radius: var(--wf-r-ctrl); border: 1px solid var(--wf-line); padding: .55rem .8rem; font-size: 15px; }
.wfm-search .form-control:focus { border-color: var(--wf-accent); box-shadow: 0 0 0 3px var(--wf-accent-weak); }
.wfm-chips { margin: 0; }
.wfm-prow { align-items: flex-start; }
.wfm-prow .wf-initials { margin-top: 2px; }
.wfm-prow .wf-li-title { display: block; }
.wfm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.wfm-tags:empty { display: none; }
.wfm-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.wfm-approve .form-control { width: 10.5rem; max-width: 100%; font-family: var(--wf-font-display); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 16px; border-radius: var(--wf-r-ctrl); border: 1px solid var(--wf-line); }
.wfm-approve .form-control:focus { border-color: var(--wf-accent); box-shadow: 0 0 0 3px var(--wf-accent-weak); }
.wfm-check { flex-basis: 100%; margin: 0; min-height: 0; }
.wfm-check:empty { display: none; }

/* ── Partner detail ─────────────────────────────────────────────── */
.wfm-codechip { font-family: var(--wf-font-display); font-weight: 800; font-size: 17px; letter-spacing: .06em; color: var(--wf-ink); background: var(--wf-surface); border: 1px dashed #C9CFD6; border-radius: 8px; padding: 3px 10px; line-height: 1.3; cursor: copy; }
.wfm-codechip:hover { border-color: var(--wf-ink-2); }
.wfm-codechip.is-copied { border-style: solid; border-color: var(--wf-good); color: var(--wf-good); }
.wfm-contact { margin: -6px 0 0; font-size: 14px; color: var(--wf-muted); line-height: 1.6; }
.wfm-contact a { color: var(--wf-ink-2); }
.wfm-owed { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--wf-good-weak); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.wfm-owed .wf-help { margin: 2px 0 0; }
.wfm-owed-amount { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--wf-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.wfm-hold { background: var(--wf-warn-weak); color: var(--wf-warn); border: 1px solid #F1DDB8; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.wfm-dl { margin-top: 4px; }
.wfm-w9-actions { margin-top: 8px; }
.wfm-card-warn { box-shadow: inset 3px 0 0 var(--wf-warn), var(--wf-shadow-sm); }
.wfm-events { list-style: none; margin: 0; padding: 0; }
.wfm-events li { padding: 11px 0; border-bottom: 1px solid var(--wf-line-2); }
.wfm-events li:last-child { border-bottom: 0; }
.wfm-ev-main { font-size: 14.5px; font-weight: 500; color: var(--wf-ink); }
.wfm-ev-note { font-size: 14px; color: var(--wf-ink-2); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.wfm-events li.is-note .wfm-ev-note { background: var(--wf-tile); border-radius: 8px; padding: 8px 10px; }
.wfm-ev-meta { font-size: 12.5px; color: var(--wf-muted); margin-top: 3px; }

/* Collapsible card: <details class="wf-card wfm-collapse"><summary><h2>…</h2><span>…</span></summary> */
.wfm-collapse > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-right: 26px; position: relative; }
.wfm-collapse > summary::-webkit-details-marker { display: none; }
.wfm-collapse > summary h2 { margin: 0 !important; }
.wfm-collapse > summary .wf-help { margin: 0; }
.wfm-collapse > summary::after { content: ""; position: absolute; right: 4px; top: 6px; width: 9px; height: 9px; border-right: 2px solid var(--wf-muted); border-bottom: 2px solid var(--wf-muted); transform: rotate(45deg); transition: transform .15s ease; }
.wfm-collapse[open] > summary::after { transform: rotate(-135deg); top: 10px; }
.wfm-collapse[open] > summary { margin-bottom: 14px; }
.wfm-rel-stats { margin-top: 0; }
.wfm-rel-cols { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 16px; }
@media (min-width: 768px) { .wfm-rel-cols { grid-template-columns: 1fr 1fr; } }
.wfm-outbound { margin-top: 12px; }

/* ── Pay sheet + ready rows ─────────────────────────────────────── */
.wfm-pay-amount { font-size: 32px; font-weight: 700; letter-spacing: -.03em; color: var(--wf-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.wfm-pay-to { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; font-size: 15px; color: var(--wf-ink-2); word-break: break-all; }
.wfm-memo { margin: 0 0 4px; }
.wfm-pay-items { list-style: none; margin: 10px 0 14px; padding: 0; border-top: 1px solid var(--wf-line-2); font-size: 14px; }
.wfm-pay-items li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--wf-line-2); }
.wfm-pay-items li .wf-money { font-weight: 600; color: var(--wf-ink); }
.wfm-pay-row .wf-li-title .wf-money { color: var(--wf-ink); }
.wfm-refs { font-size: 12.5px; color: var(--wf-faint); }
.wfm-pay-actions { gap: 8px; }

/* ── Run detail ─────────────────────────────────────────────────── */
.wfm-run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wfm-run-who { min-width: 0; }
.wfm-run-who .wf-help { margin: 2px 0 0; word-break: break-word; }
.wfm-run-name { font-weight: 600; font-size: 16px; color: var(--wf-ink); }
.wfm-run-sub { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.wfm-run-sub .wf-help { margin: 0; }
.wfm-run-sub strong { font-size: 18px; color: var(--wf-ink); }
/* The "⋯" pop-ups must not be clipped by the table's scroll box or the row list's rounded box. */
.wfm-run-group .wf-table-wrap { overflow: visible; }
.wfm-run-rows { overflow: visible; box-shadow: none; }
.wfm-cell-menu { text-align: right !important; width: 1%; white-space: nowrap; }
.wfm-line-note { margin: 4px 0 0; font-size: 12.5px; max-width: 30ch; }
.wfm-row-status { margin-top: 6px; }
.wfm-row-status .wfm-line-note { max-width: none; }

/* ── Settings + content ─────────────────────────────────────────── */
.wfm-errors { margin-bottom: 4px; }
.wfm-errors strong { display: block; margin-bottom: 4px; }
.wfm-settings > .wf-card + .wf-card { margin-top: 20px; }
.wfm-settings-grid { display: grid; grid-template-columns: 1fr; gap: 4px 28px; }
@media (min-width: 768px) { .wfm-settings-grid { grid-template-columns: 1fr 1fr; } }
.wfm-wide { grid-column: 1 / -1; }
.wfm-input-row { display: flex; align-items: center; gap: 10px; }
.wfm-input-row .form-control { flex: 1 1 auto; }
.wfm-input-row .wfm-num { flex: 0 1 12rem; max-width: 12rem; font-variant-numeric: tabular-nums; }
.wfm-input-hint { font-weight: 600; color: var(--wf-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wfm-audit { display: block; margin-top: 2px; font-size: 12px; color: var(--wf-faint); }
.wfm-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; padding: 14px 0 6px; margin-top: 16px; background: linear-gradient(to bottom, rgba(246,246,244,0), var(--wf-ground) 40%); }
.wfm-terms { margin-top: 4px; }
.wfm-terms-form { margin-top: 8px; }
.wfm-content-cols { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.wfm-content-cols > .wf-card + .wf-card { margin-top: 0; }
@media (min-width: 992px) { .wfm-content-cols { grid-template-columns: 1fr 1fr; } }
.wfm-merge { margin-right: 6px; }
.wfm-reset { margin-top: 12px; }
.wfm-seed { margin-top: .5rem; }
.wfm-clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Phones (375px and up) ──────────────────────────────────────── */
@media (max-width: 991.98px) {
    .wfm-savebar { bottom: calc(var(--wf-tabbar-h) + env(safe-area-inset-bottom)); }
}
@media (max-width: 575.98px) {
    .wf-portal-grid > .wfm-back { margin-bottom: -10px; }
    .wfm-hide-xs { display: none !important; }
    .wfm-search .btn { flex: none; }
    .wfm-approve .form-control { flex: 1 1 8rem; }
    .wfm-approve .btn { flex: 1 1 auto; }
    .wfm-owed .btn { width: 100%; }
    .wfm-pay-actions { flex-direction: row !important; flex-wrap: wrap; justify-content: flex-end; }
    .wfm-pay-row { flex-wrap: wrap; }
    .wfm-pay-row .wf-li-side { width: 100%; padding-left: 52px; }
    .wfm-pay-row .wf-li-side .btn-dark { flex: 1; }
    .wfm-run-sub { align-items: flex-start; text-align: left; }
    .wfm-savebar .btn { width: 100%; }
    .wf-dl.wfm-dl { grid-template-columns: 1fr; gap: 2px; }
    .wf-dl.wfm-dl dd { margin-bottom: 10px; }
    /* "⋯" menus become a bottom action sheet above the tab bar (no clipping, thumb-reachable). */
    .wfm-menu .wf-menu-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(var(--wf-tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 130; min-width: 0; }
    .wfm-menu .wf-menu-pop a, .wfm-menu .wf-menu-pop button { padding: 13px 14px; font-size: 15.5px; }
}
.wfm-group-h { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.wfm-company { padding: .75rem 0; border-top: 1px solid var(--wf-line-2); } .wfm-company h3 { font-size: 1rem; margin: 0 0 .5rem; }
