/* QuickBooks bills owed back (Payments -> Payables, 2026-10-22). New UI standard: .inv-kind-switch tabs, wf-kpi-thin cards, Invoices-style rows,
   44px targets. Scoped to #ap-qbvendors-wrap. Theme tokens only (day + night). */
#ap-qbvendors-wrap { --qbv-amber: #b7791f; --qbv-green: #1f8a4c; --qbv-grey: #7a8494; margin: 0 0 24px; }
html[data-remodel-mode="night"] #ap-qbvendors-wrap { --qbv-amber: #e0a33a; --qbv-green: #4cc282; --qbv-grey: #9aa3b2; }
#ap-qbvendors-wrap[hidden] { display: none !important; }

.qbv-head { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 10px; margin: 0 0 10px; } /* the button sits under the title: the page's fixed eye / bell icons never cover it */
.qbv-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.qbv-title { margin: 2px 0 0; font-size: 20px; line-height: 26px; font-weight: 700; color: var(--white); }
.qbv-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.qbv-acts { display: flex; }
.qbv-acts .btn { min-height: 44px; }
.qbv-acts .btn[disabled] { opacity: .5; }
.qbv-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); font-size: 13px; line-height: 1.45; color: var(--muted); }
.qbv-err { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--qbv-amber); border: 1px solid var(--qbv-amber); }
.qbv-look { margin: 0 0 14px; }
.qbv-look .inv-kind-tab, .qbv-tabs .inv-kind-tab { min-height: 44px; }
.qbv-n { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: .7; }

.qbv-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.qbv-chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); color: var(--white); font: inherit; text-align: left; cursor: pointer; max-width: 100%; }
.qbv-chip.is-on { border-color: var(--gold); }
.qbv-chip-n { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.qbv-chip-s { font-size: 12px; color: var(--muted); }

.qbv-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.qbv-link-t { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.qbv-link-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.qbv-act { min-height: 44px; padding: 0 16px; white-space: nowrap; }
.qbv-dash { color: var(--muted); }

.qbv-kpis { margin: 0 0 16px; }
html body #ap-qbvendors-wrap .wf-kpi-rail.qbv-kpis { display: flex; margin: 0 0 16px; }
@media (min-width: 601px) {
  html body #ap-qbvendors-wrap .wf-kpi-rail.qbv-kpis { --wf-kpi-cap: none; --wf-kpi-basis: 0px; }
  html body #ap-qbvendors-wrap .wf-kpi-rail.qbv-kpis > .pay-kpi { flex: 1 1 0 !important; max-width: none !important; min-width: 0; }
  html body #ap-qbvendors-wrap .wf-kpi-railwrap:has(> .qbv-kpis) .wf-kpi-progress { display: none; }
}
html body #ap-qbvendors-wrap .qbv-kpis .pay-kpi { cursor: pointer; }
html body #ap-qbvendors-wrap .qbv-kpis .pay-kpi.is-on { border-color: var(--gold); }
html body #ap-qbvendors-wrap .wf-kpi-rail.qbv-kpis .pay-kpi-sub, html body #ap-qbvendors-wrap .wf-kpi-rail.qbv-kpis .pay-kpi-footer { white-space: normal !important; overflow-wrap: anywhere; text-overflow: clip; display: block !important; }

.qbv-tabs { margin: 0 0 14px; }
.qbv-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.qbv-search { flex: 1 1 280px; min-width: 0; max-width: 520px; }
.qbv-search .search-input { width: 100%; min-height: 44px; }

.qbv-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.qbv-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(150px, .7fr); column-gap: 18px; align-items: center; padding: 12px 18px; min-height: 64px; border-top: 1px solid var(--border); }
.qbv-row:first-child { border-top: 0; }
.qbv-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qbv-c-amt { align-items: flex-end; gap: 6px; }
.qbv-name { font-size: 15px; font-weight: 600; color: var(--white); overflow-wrap: anywhere; }
.qbv-name-qb { font-weight: 500; }
.qbv-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.qbv-lbl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.qbv-amt { font-size: 15px; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qbv-amt.is-credit { color: var(--qbv-green); }
.qbv-pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; color: var(--qbv-tone, var(--qbv-grey)); background: color-mix(in srgb, var(--qbv-tone, var(--qbv-grey)) 12%, transparent); }
.qbv-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--qbv-tone, var(--qbv-grey)); }
.qbv-pill[data-tone="green"] { --qbv-tone: var(--qbv-green); }
.qbv-pill[data-tone="amber"] { --qbv-tone: var(--qbv-amber); }
.qbv-pill[data-tone="grey"] { --qbv-tone: var(--qbv-grey); }
.qbv-total { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.qbv-total-v { font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.qbv-empty { padding: 28px 18px; text-align: center; }
.qbv-empty-t { font-size: 15px; font-weight: 600; color: var(--white); }
.qbv-empty-s { margin-top: 4px; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .qbv-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .qbv-row .qbv-c-qb { grid-column: 1 / 2; grid-row: 2; }
  .qbv-row .qbv-c-amt { grid-column: 2; grid-row: 1 / span 2; justify-content: center; }
}
@media (max-width: 640px) {
  .qbv-acts .btn { width: 100%; }
  .qbv-look { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 4px; padding: 4px; border-radius: 22px; overflow: visible; }
  .qbv-look .inv-kind-tab { justify-content: center; padding: 10px 6px; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }
  /* the four charge tabs stay ONE row that slides sideways */
  .qbv-tabs { width: 100%; display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .qbv-tabs::-webkit-scrollbar { display: none; }
  .qbv-tabs .inv-kind-tab { flex: 0 0 auto; white-space: nowrap; }
  .qbv-search { max-width: none; }
}

/* the "QuickBooks says" line under the person chips, and the chip's second line */
.qbv-says { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); font-size: 14px; color: var(--white); }
.qbv-says b { font-weight: 700; font-variant-numeric: tabular-nums; }
.qbv-says-q { color: var(--white); }
.qbv-says-w { color: var(--muted); }
.qbv-cardtag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, currentColor 10%, transparent); vertical-align: middle; }

@media (max-width: 640px) { .qbv-people { flex-direction: column; } .qbv-chip { width: 100%; } }
.qbv-total:empty { display: none; }
