/* Purchase Orders board (PO-BOARD.md). Theme tokens only, so Warm Paper and Midnight both work.
   Column tints are the theme's --col-1..3 (Draft: panel, Issued: blue, Confirmed: yellow, Received: green); pills are its --tone-*-ink. */
#poBoardView, #poLayer, .po-menu, .po-toast {
  --po-draft: var(--tone-neutral-ink, var(--ink-muted));
  --po-issued: var(--tone-info-ink, #2F5C8F);
  --po-confirmed: var(--tone-warn-ink, #8a5a0b);
  --po-received: var(--tone-good-ink, #3d6b40);
  --po-thumb-bg: color-mix(in srgb, var(--ink, #222) 7%, var(--surface, #fff));
}
#poBoardView { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg); color: var(--ink); }
#poBoardView .board-members-bar { gap: 8px; flex-wrap: wrap; }
.po-seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius, 6px); overflow: hidden; background: var(--surface); }
.po-seg button { border: 0; background: none; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.po-seg button.on { background: var(--accent-tint); color: var(--accent); }

.po-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.po-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.po-pill.s-draft { color: var(--po-draft); } .po-pill.s-issued { color: var(--po-issued); } .po-pill.s-confirmed { color: var(--po-confirmed); } .po-pill.s-received { color: var(--po-received); }

/* the product thumbnail: follows the product everywhere */
.po-sw { width: 28px; height: 28px; border-radius: 5px; flex: none; display: inline-grid; place-items: center; background: var(--po-thumb-bg); border: 1px solid var(--hairline); overflow: hidden; font-weight: 700; font-size: 12px; color: var(--ink-muted); }
.po-sw img { width: 100%; height: 100%; object-fit: cover; display: block; }
.po-sw.md { width: 40px; height: 40px; font-size: 15px; }
.po-sw.lg { width: 64px; height: 64px; border-radius: var(--radius, 6px); }
.po-thumbs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.po-more { font-size: 11px; color: var(--ink-muted); font-weight: 700; padding: 0 4px; }

/* the board: the invoice board's canvas and cards (index.html's .canvas/.column/.card); only the order bits live here */
.po-canvas .column-body { gap: 10px; }
.po-col-empty { color: var(--ink-muted); font-size: 12.5px; padding: 10px 6px; opacity: .8; }
.po-ocard { cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 10px !important; }
.po-ocard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.po-oc-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.po-oc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; font-weight: 600; font-size: 13.5px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.po-oc-tot { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; } .po-oc-tot.is-due { color: var(--accent); }
.po-oc-no { font-size: 11.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.po-oc-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; min-width: 0; }
.po-oc-bot .po-thumbs { flex-wrap: nowrap; min-width: 0; }
.po-oc-bot .po-badge { flex: none; max-width: 62%; overflow: hidden; text-overflow: ellipsis; }
.po-ocard.po-attn { box-shadow: 0 0 0 2px var(--accent), var(--shadow-card); }
.po-yours { margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.po-ocard.flash { animation: po-flash 1.6s ease-out; }
@keyframes po-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent-tint-border); } 100% { box-shadow: var(--shadow-card); } }
@media (prefers-reduced-motion: reduce) { .po-ocard.flash, .po-line.hl { animation: none; } }
.po-vendor-card .card-desc { font-variant-numeric: tabular-nums; }

/* status badges: n neutral · i in progress · w waiting / due · d declined / late · g agreed / paid */
.po-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.5; }
.po-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.po-badge.b-n { color: var(--po-draft); } .po-badge.b-i { color: var(--po-issued); } .po-badge.b-w { color: var(--po-confirmed); }
.po-badge.b-d { color: var(--danger); } .po-badge.b-g { color: var(--po-received); }

/* the order window (design: purchase-order.md "PO window"): white header, stage band, panel body, band footer.
   Theme tokens with the Warm Paper values as fallbacks, so Midnight works too. Above the product window (2900). */
#poLayer { --po-band: var(--panel-band, color-mix(in srgb, var(--panel, hsl(34 19% 95.5%)) 88%, var(--ink, #1a1714))); --po-field-soft: color-mix(in srgb, var(--panel, #f5f2ee) 70%, var(--surface, #fff)); --po-label: var(--ink-label, var(--ink-secondary, hsl(24 8% 38%))); }
.po-scrim { position: fixed; inset: 0; background: hsl(24 10% 6% / 0.42); z-index: 2950; }
.po-win { position: fixed; z-index: 2951; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(900px, calc(100vw - 48px)); height: min(780px, 92vh);
  display: flex; flex-direction: column; background: var(--panel); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 4px hsl(24 10% 10% / 0.06), 0 12px 30px hsl(24 10% 10% / 0.08), 0 30px 70px hsl(24 10% 10% / 0.10); font-family: var(--font-body); font-size: 13.5px; }
.po-win .micro, .po-pays .micro { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--po-label); }
.po-head { flex: none; display: flex; align-items: center; gap: 16px; padding: 18px 24px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.po-head__id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.po-head__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.po-head__num { font-family: 'Times New Roman', Times, serif; font-size: 26px; line-height: 1.15; font-weight: 400; color: var(--ink); }
.po-num-in { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 0 4px; margin-left: -5px; width: 10ch; }
.po-num-in:hover { border-color: var(--rule); } .po-num-in:focus-visible { outline: none; border-color: hsl(215 40% 60%); box-shadow: 0 0 0 3px hsl(215 40% 60% / 0.18); background: var(--surface); }
.po-saved { font-size: 12px; color: var(--ink-muted); }
.po-head__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn-quiet { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-secondary, hsl(24 8% 28%)); cursor: pointer; }
.btn-quiet:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn-quiet--danger { color: var(--danger); } .btn-quiet--danger:hover { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.po-x { width: 30px; height: 30px; border-radius: 6px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: 15px; }
.po-x:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.po-stages { flex: none; background: var(--po-band); border-bottom: 1px solid var(--rule); padding: 14px 24px; }
.po-stages__strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 12px 6px; list-style: none; background: var(--surface); border: 1px solid var(--hairline-strong, var(--rule)); border-radius: 6px; box-shadow: 0 1px 2px hsl(24 10% 10% / 0.04); }
.po-stages li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.po-stages li::before, .po-stages li::after { content: ""; position: absolute; top: 11px; width: 50%; height: 1px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.po-stages li::before { left: 0; } .po-stages li::after { right: 0; }
.po-stages li:first-child::before, .po-stages li:last-child::after { display: none; }
.po-stages .dot { position: relative; z-index: 1; width: 23px; height: 23px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--ink-muted); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.po-stages .lbl { font-size: 12px; font-weight: 500; color: var(--po-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.po-stages li.is-done .dot, .po-stages li.is-current .dot { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); }
.po-stages li.is-current .dot { box-shadow: 0 0 0 4px hsl(215 40% 60% / 0.18); }
.po-stages li.is-current .lbl { color: var(--accent); font-weight: 600; }
.po-stages li.is-done::after, .po-stages li.is-done::before, .po-stages li.is-current::before { background: var(--accent); }
.po-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.sheet { background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px; box-shadow: 0 1px 2px hsl(24 10% 10% / 0.04); }
.sheet__head { display: flex; align-items: baseline; gap: 8px; padding: 13px 18px 11px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.sheet__sub { font-size: 12px; color: var(--ink-muted); }
.po-win .field { width: 100%; box-sizing: border-box; background: var(--surface); color: var(--ink); border: 1px solid var(--hairline-strong, var(--rule)); border-radius: 6px; padding: 9px 12px; font: inherit; font-size: 13.5px; }
.po-win textarea.field { resize: vertical; line-height: 1.45; }
.po-win .field:focus-visible, .po-win .qty:focus-visible, .po-cost:focus-visible { outline: none; border-color: hsl(215 40% 60%); box-shadow: 0 0 0 3px hsl(215 40% 60% / 0.18); }
.po-terms { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr) minmax(0,1.5fr) minmax(0,1.1fr); gap: 16px; align-items: start; }
.po-tcell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.po-vendor { display: flex; align-items: flex-start; gap: 9px; padding: 4px 0; font-size: 14px; }
.po-vendor b { font-weight: 600; }
.po-vendor .mono { flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--accent-tint); color: var(--accent); font-size: 10.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.po-vendor__lines { font-size: 12px; line-height: 1.5; color: var(--ink-muted); margin-top: 2px; overflow-wrap: anywhere; }
.po-link { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 12px; font-weight: 500; color: var(--accent); cursor: pointer; text-align: left; }
.po-link:hover { text-decoration: underline; }
.po-ro { padding: 9px 0; font-size: 13.5px; } .po-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.po-termsel { display: flex; gap: 6px; align-items: center; } .po-termsel select { flex: 1; min-width: 0; } .po-termsel input { width: 58px !important; flex: none; } .po-termsel span { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.po-line { box-shadow: 0 1px 2px hsl(24 10% 10% / 0.05), 0 8px 24px hsl(24 10% 10% / 0.06); }
.po-line.hl { border-color: var(--accent); }
.po-prod { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.po-prod .po-sw.po-prod__thumb { width: 40px; height: 40px; border-radius: 6px; background: #fff; }
.po-prod .po-sw.po-prod__thumb img { object-fit: contain; }
.po-prod__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .po-prod__t b { font-size: 15px; font-weight: 600; } .po-prod__t span { font-size: 12px; color: var(--ink-muted); }
.po-prod__tot { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 2px; } .po-prod__tot b { font-size: 16px; font-weight: 400; font-variant-numeric: tabular-nums; }
.po-grid-wrap { padding: 0 18px; overflow-x: auto; }
.po-grid { display: grid; gap: 0 8px; align-items: center; min-width: max-content; }
.po-grid--head { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--po-label); padding: 10px 0 8px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.po-grid--row { padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.po-grid .c { text-align: center; } .po-grid .num { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.po-grid .qty { width: 100%; box-sizing: border-box; background: var(--po-field-soft); color: var(--ink); border: 1px solid var(--hairline-strong, var(--rule)); border-radius: 6px; padding: 8px 4px; text-align: center; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.po-grid .qty-ro { display: block; text-align: center; font-variant-numeric: tabular-nums; }
.po-grid .cost { position: relative; display: block; } .po-grid .cost i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-muted); font-size: 13px; }
.po-grid .cost input { width: 100%; box-sizing: border-box; padding: 8px 8px 8px 20px; text-align: right; border: 1px solid var(--hairline-strong, var(--rule)); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.po-grid .po-color { padding: 8px 10px; }
.po-row-x { width: 24px; height: 24px; border-radius: 6px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: 15px; }
.po-row-x:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.po-line-foot { display: flex; align-items: center; gap: 6px; padding: 10px 18px 12px; flex-wrap: wrap; }
.po-line-count { margin-left: auto; }
.po-add { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500; color: var(--accent); background: none; border: 0; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.po-add:first-child { margin-left: -8px; } .po-add:hover { background: var(--accent-tint); }
.po-pays .po-pay { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); }
.po-pays .sheet__head + .po-pay { border-top: 0; }
.po-pay__l { display: flex; align-items: baseline; gap: 10px; } .po-pay__l b { font-size: 14px; font-weight: 500; } .po-pay__l .po-muted { font-size: 12.5px; }
.po-pay-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .po-pay-r .num { font-size: 14px; font-variant-numeric: tabular-nums; } .po-pay-r .po-badge { min-width: 104px; justify-content: center; }
.po-prodnotes__b { padding: 12px 18px 14px; } .po-prodnotes__b .po-pre { font-size: 13.5px; line-height: 1.6; }
.po-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: stretch; }
.po-split > .sheet { display: flex; flex-direction: column; min-width: 0; }
.po-notes { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px 4px; }
.po-note { display: flex; gap: 11px; align-items: flex-start; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; }
.avatar--me { background: var(--accent-tint); color: var(--accent); } .avatar--vendor { background: hsl(24 30% 90%); color: hsl(24 30% 28%); }
.po-note__who { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; } .po-note__name { font-size: 13px; font-weight: 600; } .po-note__meta { font-size: 11.5px; color: var(--ink-muted); }
.po-note__text { font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.po-compose { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 18px 16px; }
.po-compose .field { flex: 1; min-width: 0; background: var(--po-field-soft); }
.po-post { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 13px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--accent); cursor: pointer; }
.po-post[disabled] { opacity: .45; cursor: default; }
.po-hist__b { padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.po-rev-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; line-height: 1.6; color: var(--ink-muted); border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 6px; padding: 16px; min-height: 120px; }
.po-rev { font-size: 12.5px; } .po-rev + .po-rev { border-top: 1px solid var(--hairline); padding-top: 8px; } .po-rev ul, .po-banner ul { margin: 4px 0 0; padding-left: 18px; } .po-rev li, .po-banner li { margin: 2px 0; }
.po-note-q { font-style: italic; margin-top: 3px; }
.po-ev { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 2px 0; flex-wrap: wrap; }
.po-muted { color: var(--ink-muted); font-size: 12px; }
.po-banner { font-size: 13px; border-radius: 6px; padding: 11px 14px; border: 1px solid var(--hairline-strong, var(--rule)); }
.po-changes { background: color-mix(in srgb, var(--po-confirmed) 12%, var(--surface)); }
.po-declined { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.po-editing { background: var(--accent-tint); }
.po-chg, .po-grid .po-chg { background: color-mix(in srgb, var(--po-confirmed) 16%, transparent) !important; border-radius: 6px; }
.po-tcell.po-chg { padding: 6px; margin: -6px; }
.po-empty { color: var(--ink-muted); font-size: 13px; padding: 16px 18px; }
.po-foot { flex: none; display: flex; align-items: center; gap: 20px; padding: 15px 24px 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--po-band); border-top: 1px solid var(--rule); }
.po-foot__total { display: flex; flex-direction: column; gap: 1px; } .po-foot__total .figure { font-size: 24px; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 400; }
.po-foot__note { font-size: 12.5px; color: var(--po-label); min-width: 0; }
.po-foot__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-cancel { background: var(--surface); border: 1px solid var(--hairline-strong, var(--rule)); border-radius: 6px; padding: 8px 14px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-secondary, hsl(24 8% 32%)); cursor: pointer; }
.btn-send { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-ink, #fff); border: 0; border-radius: 6px; padding: 9px 16px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px hsl(215 52% 24% / 0.18), 0 5px 16px hsl(215 52% 24% / 0.16); }
.btn-send:hover { background: var(--accent-hover, var(--accent)); } .btn-send[disabled], .btn-cancel[disabled] { opacity: .45; cursor: not-allowed; }
.po-danger { color: var(--danger); }
.po-sendon { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--po-label); } .po-sendon .field { width: auto; padding: 7px 8px; font-size: 12.5px; }

/* the Add to PO menu */
.po-menu-scrim { position: fixed; inset: 0; z-index: 2955; }
.po-menu { position: fixed !important; z-index: 2956 !important; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-popup); padding: 6px; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-body); font-size: 13px; box-sizing: border-box; max-height: calc(100vh - 24px); overflow-y: auto; }
.po-menu .mhd { display: flex; gap: 10px; align-items: center; padding: 8px 8px 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.po-menu .mhd b { display: block; font-size: 13px; }
.po-menu-body { display: flex; flex-direction: column; gap: 2px; }
.po-menu .mi { font: inherit; color: inherit; display: flex; gap: 10px; align-items: center; background: none; border: 0; border-radius: var(--radius, 6px); padding: 8px; text-align: left; width: 100%; cursor: pointer; }
.po-menu .mi:hover, .po-menu .mi:focus-visible { background: var(--accent-tint); outline: none; }
.po-menu .mi .t { display: flex; flex-direction: column; gap: 1px; } .po-menu .mi .t span { font-size: 11.5px; color: var(--ink-muted); } .po-menu .mi small { font-weight: 500; color: var(--ink-muted); }
.po-menu .mi.new { color: var(--accent); font-weight: 700; border-top: 1px solid var(--hairline); border-radius: 0 0 var(--radius, 6px) var(--radius, 6px); margin-top: 4px; padding-top: 10px; }

.po-toast { position: fixed; z-index: 3100; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-popup); max-width: calc(100% - 32px); font-family: var(--font-body); }

@media (max-width: 760px) {
  .po-win { width: 100%; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); }
  .po-head, .po-stages, .po-body, .po-foot { padding-left: 16px; padding-right: 16px; }
  .po-head { flex-wrap: wrap; } .po-head__num { font-size: 22px; }
  .po-stages__strip { grid-template-columns: repeat(6, minmax(44px, 1fr)); overflow-x: auto; } .po-stages .lbl { font-size: 10.5px; }
  .po-terms { grid-template-columns: 1fr 1fr; } .po-split { grid-template-columns: 1fr; }
  .po-foot { flex-wrap: wrap; gap: 10px; } .po-foot__note { flex-basis: 100%; order: 3; }
  #poBoardView .topbar { flex-wrap: wrap; height: auto; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  #poBoardView .board-members-bar { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: nowrap; }
  #poBoardView .board-members-bar #poNewBtn { margin-left: auto; }
}
  .po-steps { grid-template-columns: repeat(3, 1fr); row-gap: 8px; }
  .po-facts .f.wide { grid-column: auto; }
}

/* Add to PO: the note over other vendors' drafts */
.po-menu .po-more-n { margin-left: auto; font-weight: 600; color: var(--ink-muted); }
.po-menu .mi.po-back { font-size: 12.5px; color: var(--ink-muted); padding: 6px 8px; }
.po-lbl { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.po-menu .po-other-h { padding: 10px 8px 4px; border-top: 1px solid var(--hairline); margin-top: 4px; }
.po-menu .po-other-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.po-menu .po-warn-note { padding: 2px 8px 6px; font-size: 11.5px; color: var(--po-confirmed); }

/* the warning dialog */
.po-confirm-layer .po-scrim { z-index: 2990; }
.po-confirm { position: fixed; z-index: 2991; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-popup); padding: 18px 20px 16px; font-family: var(--font-body); }
.po-confirm__t { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.po-confirm p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--ink-secondary, var(--ink)); }
.po-confirm__b { display: flex; justify-content: flex-end; gap: 8px; }
.po-confirm .btn-cancel, .po-confirm .btn-send { font-family: var(--font-body); }

/* the sandbox banner (?sandbox): View as + Reset */
#demoBanner .sbx-as { margin-left: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
#demoBanner .sbx-as select { font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; }
#demoBanner .sbx-as select option { color: #1a1714; }
#demoBanner .sbx-reset { margin-left: 10px; font: inherit; font-size: 12px; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 5px; padding: 3px 8px; cursor: pointer; }
@media (max-width: 760px) { #demoBanner { flex-wrap: wrap; row-gap: 4px; height: auto !important; padding: 6px 10px; } #demoBanner > span { display: none; } }

/* vendor groups: the painted panels need a positioned list (as #invClientList) */
#poVendorList { position: relative; }

/* How to pay (the factory's payment details on its invoice; beta: paid outside FokusFlo) */
.po-howpay__b { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.po-howpay__wire { display: flex; flex-direction: column; gap: 3px; }
.po-howpay__wire b { font-size: 13px; margin-bottom: 2px; }
.po-howpay__wire .po-muted { display: inline-block; min-width: 110px; }
.po-paylink { align-self: flex-start; text-decoration: none; }

/* ── Bills on Purchases (shared/bills.js, Nam 2026-11-12) ── */
.bill-card .bill-kind { font-size: 11px; color: var(--text-muted, #7a7368); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-card-acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.bill-card-acts .wp-btn { padding: 4px 10px; font-size: 12px; }
.bill-dialog { width: min(440px, calc(100vw - 32px)); }
.bill-dialog .bill-dlg-title { font-family: 'Times New Roman', Times, serif; font-size: 22px; font-weight: 400; }
.bill-dialog .bill-dl { display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.bill-dialog .bill-dl dt { color: var(--text-muted, #7a7368); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.bill-dialog .bill-dl dd { margin: 0; overflow-wrap: anywhere; }
.bill-dialog .bill-pre { white-space: pre-wrap; }
.bill-dialog .bill-muted { color: var(--text-muted, #7a7368); font-weight: 400; }
.bill-dialog .bill-note { font-size: 13px; }
.bill-dialog .bill-links a { color: var(--accent, #203c60); font-weight: 600; }
.bill-dialog .bill-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bill-dialog label { display: grid; gap: 6px; font-size: 13px; }
.bill-dialog .bill-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.bill-dialog .bill-check input { width: auto; }
.bill-dialog button.primary { background: var(--accent, #203c60); color: #fff; border-color: transparent; }
.bill-dialog input[type="file"] { padding: 6px; }
