/* =============================================================================================
   AdvDeli.Inventory.UI - the purchasing and stock-document screens, shared by the Back Office and
   HQ (v9.17). Linked by both hosts as _content/AdvDeli.Inventory.UI/inventory.css.

   The .pu / .ds rules are the Back Office's own, moved here from its app.css unchanged, so the
   Back Office looks exactly as it did.

   The block after them restates the handful of Back Office form and button rules these pages
   lean on (.rf-*, .mg-err, .rp-print-hide), SCOPED UNDER .pu / .ds-screen so that in HQ - which
   has no such rules - they style these screens and nothing else. In the Back Office they repeat
   its global rules value for value and change nothing.
   ============================================================================================= */

/* ===================== Purchasing & inventory documents (v7.2, 2026-09-22) =====================
   Purchase orders, receiving, bills, returns, adjustment batches and the skipped-items list.
   Documents are opened, not edited in a dialog, so they get a list + document layout of their own
   rather than EntityGrid. Same palette as the rf- screens around them. */
.pu { max-width: 1240px; }
.pu-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pu-err { margin: 0 6px 14px; padding: 11px 14px; border-radius: 10px; background: #fdecec; border: 1px solid #f5c2c2; color: #a61e1e; font-size: .92rem; }
.pu-ok { margin: 0 6px 14px; padding: 11px 14px; border-radius: 10px; background: #e9f7ef; border: 1px solid #bfe3cc; color: #1e6b3a; font-size: .92rem; }
.pu-warn { margin: 0 6px 14px; padding: 11px 14px; border-radius: 10px; background: #fffaf0; border: 1px solid #f0dcb4; color: #7a5b1e; font-size: .9rem; line-height: 1.5; }

.pu-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 6px 12px; }
.pu-bar .rf-in { min-width: 240px; }
.pu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pu-chip { border: 1px solid #d6dce6; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; color: #4a5566; cursor: pointer; }
.pu-chip.on { background: #4f5bd5; border-color: #4f5bd5; color: #fff; }

.pu-card { background: #fff; border: 1px solid #e3e8ef; border-radius: 14px; margin: 0 6px 16px; overflow: hidden; }
.pu-card > h2 { font-size: 1rem; margin: 0; padding: 12px 16px; border-bottom: 1px solid #eef1f5; color: #1f2733; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pu-card > .pu-body { padding: 14px 16px; }
.pu-scroll { overflow-x: auto; }

.pu-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pu-table th { text-align: left; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: #6b7686; font-weight: 700; padding: 9px 10px; background: #f7f9fc; border-bottom: 1px solid #e3e8ef; white-space: nowrap; }
.pu-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.pu-table tr:last-child td { border-bottom: 0; }
.pu-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pu-table tbody tr.click { cursor: pointer; }
.pu-table tbody tr.click:hover td { background: #f7f8ff; }
.pu-table tfoot td { font-weight: 700; background: #fafbfd; border-top: 1px solid #e3e8ef; }
.pu-table input.pu-in, .pu-table select.pu-in { width: 100%; min-width: 70px; border: 1px solid #d6dce6; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .88rem; }
.pu-table input.pu-in.num { text-align: right; }
.pu-table input.pu-in:focus, .pu-table select.pu-in:focus { outline: 2px solid #c6ccf7; border-color: #4f5bd5; }
.pu-table .pu-sub { display: block; color: #8a94a3; font-size: .78rem; }
.pu-table .pu-x { border: 0; background: transparent; color: #a61e1e; font-weight: 700; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.pu-table .pu-x:hover { background: #fdecec; }
.pu-empty { padding: 26px 16px; text-align: center; color: #8a94a3; }

.pu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; }
.pu-field { display: flex; flex-direction: column; gap: 5px; }
.pu-field > label { font-size: .78rem; font-weight: 700; color: #5c6674; letter-spacing: .02em; }
.pu-field .rf-in { width: 100%; box-sizing: border-box; }
.pu-field.wide { grid-column: 1 / -1; }
.pu-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.pu-kv div span { display: block; font-size: .74rem; font-weight: 700; color: #8a94a3; text-transform: uppercase; letter-spacing: .04em; }
.pu-kv div strong { font-size: .98rem; color: #1f2733; font-weight: 600; }

.pu-totals { margin-left: auto; min-width: 260px; max-width: 360px; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; font-size: .92rem; padding: 12px 16px; }
.pu-totals .grand { font-size: 1.1rem; font-weight: 800; border-top: 1px solid #e3e8ef; padding-top: 8px; }
.pu-totals input.pu-in { width: 110px; text-align: right; border: 1px solid #d6dce6; border-radius: 8px; padding: 5px 8px; font: inherit; }

.pu-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .03em; }
.pu-st.DRAFT { background: #f1f3f5; color: #5c6674; }
.pu-st.ORDERED { background: #e7f0fb; color: #1f6fd6; }
.pu-st.PARTIAL { background: #fff3e0; color: #b35c00; }
.pu-st.RECEIVED { background: #e6f4ea; color: #2f9e44; }
.pu-st.CLOSED { background: #ede7ff; color: #6741d9; }
.pu-st.CANCELLED { background: #fdecec; color: #a61e1e; }
/* Lot expiry (v9.11): Lots & expiry screen */
.pu-st.EXPIRED { background: #fdecec; color: #a61e1e; }
.pu-st.NEAR_EXPIRY { background: #fff3e0; color: #b35c00; }
.pu-st.OK { background: #e6f4ea; color: #2f9e44; }
.pu-st.BLOCKED { background: #ede7ff; color: #6741d9; margin-left: 6px; }
.pu-st.IN { background: #e6f4ea; color: #2f9e44; }
.pu-st.OUT { background: #fdecec; color: #a61e1e; }
.pu-st.BOTH { background: #e7f0fb; color: #1f6fd6; }
/* Incoming transfers (v9.52): on the way, and a receipt that differed from what was sent */
.pu-st.SENT { background: #e7f0fb; color: #1f6fd6; }
.pu-st.SHORT { background: #fff3e0; color: #b35c00; margin-left: 6px; }
.pu-table input.pu-in.changed { background: #fff8e6; border-color: #e7b45a; }
.pu-table td.low { color: #a61e1e; font-weight: 700; }

.pu-progress { height: 6px; border-radius: 999px; background: #eef1f5; overflow: hidden; min-width: 80px; display: flex; }
.pu-progress i { display: block; height: 100%; background: #2f9e44; }
.pu-progress i.skip { background: #b8a6f0; }

/* Item picker: a search box that also takes a barcode scan. */
.pu-pick { position: relative; }
.pu-pick .rf-in, .pu-pick > input { width: 100%; box-sizing: border-box; }
.pu-pick ul { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #d6dce6; border-radius: 10px; box-shadow: 0 12px 28px rgba(20, 30, 50, .14); max-height: 320px; overflow-y: auto; }
.pu-pick li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.pu-pick li.on, .pu-pick li:hover { background: #eef0fd; }
.pu-pick li small { color: #8a94a3; white-space: nowrap; }

.pu-mode { display: inline-flex; border: 1px solid #d6dce6; border-radius: 10px; overflow: hidden; }
.pu-mode button { border: 0; background: #fff; padding: 8px 16px; font-weight: 700; color: #4a5566; cursor: pointer; }
.pu-mode button + button { border-left: 1px solid #d6dce6; }
.pu-mode button.on { background: #4f5bd5; color: #fff; }
.pu-dir { border: 1px solid #d6dce6; border-radius: 8px; padding: 5px 10px; font-weight: 800; cursor: pointer; background: #fff; }
.pu-dir.IN { color: #2f9e44; border-color: #bfe3cc; background: #f1faf4; }
.pu-dir.OUT { color: #a61e1e; border-color: #f5c2c2; background: #fdf3f3; }
.pu-dir:disabled { cursor: default; }

.pu-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 0 6px 30px; }

/* ===================== Printed purchasing documents (A4) =====================
   The page around DocSheet: a grey desk with the sheet on it and a toolbar above. In print the
   toolbar goes (rp-print-hide, above) and so does the desk. */
.ds-screen { padding: 8px 6px 30px; }
.ds-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 210mm; margin: 0 auto 16px; padding: 10px 12px; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; box-shadow: 0 4px 14px rgba(20, 30, 50, .06); }
.ds-toolbar .pu-sub { margin-right: auto; color: #6b7686; font-size: .85rem; }
.ds-opt { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: #4a5566; }
@media print {
    .ds-screen { padding: 0 !important; background: #fff !important; }
}

/* ===================== Host-neutral basics (v9.17) ===================== */
.pu .rf-head, .ds-screen .rf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 6px 18px; }
.pu .rf-head h1 { font-size: 1.7rem; margin: 0 0 .3rem; color: #1f2733; }
.pu .rf-lead { color: #5c6674; font-size: .86rem; line-height: 1.45; margin: 0; max-width: 90ch; }
.pu.rf-page { margin: 0 auto; padding: 8px 4px; }
.pu .rf-in, .ds-screen .rf-in { border: 1px solid #d6dce6; border-radius: 10px; padding: 9px 12px; font-size: .94rem;
    background: #fff; color: #1f2733; width: 100%; box-sizing: border-box; }
.pu .rf-in:focus, .ds-screen .rf-in:focus { outline: 2px solid #c6ccf7; border-color: #4f5bd5; }
.pu .rf-hint { color: #8a94a2; font-size: .78rem; line-height: 1.45; }
.pu .rf-row { display: flex; flex-direction: column; gap: 6px; }
.pu .rf-row > label { font-size: .82rem; font-weight: 700; color: #3d4756; }
.pu .rf-btn, .ds-screen .rf-btn { border: 1px solid #d6dce6; background: #fff; color: #1f2733; border-radius: 10px;
    padding: 9px 16px; font-weight: 700; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.pu .rf-btn:hover:not(:disabled), .ds-screen .rf-btn:hover:not(:disabled) { background: #f1f4f9; }
.pu .rf-btn:disabled, .ds-screen .rf-btn:disabled { opacity: .5; cursor: default; }
.pu .rf-btn.primary, .ds-screen .rf-btn.primary { background: #4f5bd5; border-color: #4f5bd5; color: #fff; }
.pu .rf-btn.primary:hover:not(:disabled), .ds-screen .rf-btn.primary:hover:not(:disabled) { background: #4450c4; }
.pu .rf-btn.ghost, .ds-screen .rf-btn.ghost { background: transparent; }
.pu .rf-btn.sm { padding: 6px 12px; font-size: .82rem; }
.pu .rf-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; color: #3d4756; }
.pu .rf-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.pu .rf-swt { width: 42px; height: 24px; border-radius: 999px; background: #cfd6e0; position: relative; transition: background .15s; }
.pu .rf-swt::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; transition: transform .15s; }
.pu .rf-sw input:checked + .rf-swt { background: #2e9e63; }
.pu .rf-sw input:checked + .rf-swt::after { transform: translateX(18px); }
.pu .mg-err { background: #fbe4e2; border: 1px solid #e6a9a3; color: #8a1f18; padding: 9px 12px;
    border-radius: 8px; font-size: .85rem; font-weight: 600; margin: 0 6px 14px; }
.pu .req::after { content: " *"; color: #d33; }
@media print {
    .rp-print-hide { display: none !important; }
}

/* ===================== Save, then Commit (v9.17) ===================== */
.pu-st.POSTED { background: #e6f4ea; color: #2f9e44; }
.pu-draftbar { margin: 0 6px 14px; padding: 12px 14px; border-radius: 10px; background: #f4f5fb; border: 1px dashed #b9c0ea;
    color: #3d4756; font-size: .9rem; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.pu-draftbar strong { color: #1f2733; }
.pu table tr.draft td { background: #fbfbff; }
.pu table tr.draft td:first-child { box-shadow: inset 3px 0 0 #b9c0ea; }

/* The location picker HQ shows above each list (the Back Office never does). */
.pu-storebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 6px 14px; }
.pu-storebar label { font-size: .78rem; font-weight: 700; color: #5c6674; letter-spacing: .02em; text-transform: uppercase; }
.pu-storebar select.rf-in { width: auto; min-width: 260px; }
.pu-storebar .pu-sub { color: #8a94a3; font-size: .82rem; }

/* Commit dialog: the cost check before stock moves. */
.pu-modal-back { position: fixed; inset: 0; background: rgba(20, 30, 50, .35); z-index: 60; display: grid; place-items: center; padding: 20px; }
.pu-modal { background: #fff; border-radius: 14px; max-width: 920px; width: 100%; max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 24px 60px rgba(20, 30, 50, .25); }
.pu-modal > h2 { margin: 0; padding: 14px 18px; border-bottom: 1px solid #eef1f5; font-size: 1.05rem; color: #1f2733; }
.pu-modal > .pu-body { padding: 14px 18px; overflow: auto; }
.pu-modal > .pu-foot { margin: 0; padding: 12px 18px; border-top: 1px solid #eef1f5; }
.pu-table tr.over td { background: #fdf3f3; }

/* New lot's item rows (v9.17): a fixed-layout table whose inputs fill their columns, with a
   floor under the table so a narrow window scrolls it sideways instead of squashing the inputs. */
.pu-lotrows { border: 1px solid #e3e8ef; border-radius: 10px; }
.pu-lotrows .pu-table { table-layout: fixed; min-width: 760px; }
.pu-lotrows .pu-table td { vertical-align: middle; }
.pu-lotrows .rf-in { width: 100%; min-width: 0; box-sizing: border-box; }
.pu-lotrows td.num .rf-in { text-align: right; }

/* A button with an icon before its label (Lots & Expiry's New lot, v9.17). */
.pu-btn-ico { display: inline-flex; align-items: center; gap: 6px; }
.pu-btn-ico svg { flex: none; }

/* ONLY THE GRID SCROLLS (Lots & Expiry, v9.17; the Purchase Orders, Bills, Returns and
   Adjustments lists since 2026-11-19). The page is exactly the window below the host's
   top bar: the heading, store bar, notices and filters keep their place, and the grid card
   (.pu-grow) takes whatever height is left and scrolls inside it, its column headings and value
   total pinned. The height is the window less each host's top bar and content padding - the
   Back Office's .bo-top (--bo-top-h) and .bo-content, HQ's 56px bar and .hq-main - plus the
   page's own 8px top and bottom. On a phone-width Back Office the page scrolls as before: a
   fixed frame there leaves the grid a sliver. */
/* ONE MORE ROW (2026-11-19), the same trim as the Back Office's rf-fill list pages in its
   app.css: in the Back Office, .bo-content's padding 1.5rem → 1rem top and bottom and no page
   padding top and bottom, so its height sum is the window less the bar and 2rem. In every host
   the heading is tighter. */
.bo-content .pu.pu-fill { height: calc(100dvh - var(--bo-top-h, 61px) - 2rem); }
@media (min-width: 861px) {
    .bo-content:has(> .pu.pu-fill) { padding-top: 1rem; padding-bottom: 1rem; }
    .bo-content .pu.pu-fill { padding-top: 0; padding-bottom: 0; }
}
.hq-main .pu.pu-fill { height: calc(100dvh - 56px - 62px - 16px); }
.pu.pu-fill { display: flex; flex-direction: column; box-sizing: border-box; }
.pu.pu-fill > * { flex: none; }
.pu.pu-fill > .rf-head { padding: 4px 6px 10px; }
.pu.pu-fill > .rf-head h1 { font-size: 1.5rem; margin-bottom: .15rem; }
.pu.pu-fill > .pu-card.pu-grow { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
.pu-card.pu-grow > .pu-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pu-card.pu-grow .pu-table thead th { position: sticky; top: 0; z-index: 1; }
.pu-card.pu-grow .pu-table tfoot td { position: sticky; bottom: 0; background: #f7f9fc; border-top: 1px solid #e3e8ef; }
@media (max-width: 860px) {
    .bo-content .pu.pu-fill, .hq-main .pu.pu-fill { height: auto; }
    .pu.pu-fill > .pu-card.pu-grow { flex: none; }
}

/* =================================================================================================
   PURCHASE ORDER ENTRY - redesigned 2026-12-01 from the user's mock-up (po-entry-form.html).
   Shared by the Back Office and HQ. Buttons stay the host's own .rf-btn; the green accent is local.
   ================================================================================================= */
.po2 { --po-accent: #22a06b; --po-accent-d: #168457; --po-accent-soft: #e7f6ef; --po-blue: #2f6fdd; --po-blue-soft: #eaf1fd;
    --po-ink: #1b1f24; --po-muted: #6b7280; --po-faint: #9aa1ab; --po-border: #e6e8ec; --po-line: #f0f1f3; --po-danger: #d64545;
    color: var(--po-ink); max-width: 1400px; }

.po2-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: -4px 0 14px; padding: 12px 4px 14px; background: rgba(246, 247, 249, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--po-border); }
.po2-crumbs { font-size: .78rem; color: var(--po-muted); }
.po2-crumbs a { color: var(--po-muted); text-decoration: none; }
.po2-crumbs a:hover { text-decoration: underline; }
.po2-crumbs b { color: var(--po-ink); font-weight: 500; }
.po2-title-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.po2-title-row h1 { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px; }
.po2-status { font-size: .66rem; font-weight: 700; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; background: #eef0f3; color: #555; }
.po2-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.po2-danger { color: var(--po-danger) !important; }

.po2-content { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.po2-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.po2-card { background: #fff; border: 1px solid var(--po-border); border-radius: 14px; min-width: 0; }
.po2-card-h { padding: 14px 20px; border-bottom: 1px solid var(--po-line); display: flex; align-items: center; gap: 10px; }
.po2-card-h h2 { margin: 0; font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.po2-card-h p { margin: 2px 0 0; font-size: .8rem; color: var(--po-muted); }
.po2-card-b { padding: 18px 20px; }
.po2-count { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #f1f2f4; color: #555; }

.po2-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.po2-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.po2-f { min-width: 0; }
.po2-f label { display: block; font-size: .72rem; font-weight: 600; color: var(--po-muted); margin-bottom: 6px; letter-spacing: .02em; }
.po2-req { color: var(--po-danger); }
.po2-lblhint { font-weight: 400; color: var(--po-faint); margin-left: 4px; }
.po2-fhint { display: block; font-size: .74rem; color: var(--po-muted); margin-top: 6px; }
.po2-inp { width: 100%; box-sizing: border-box; border: 1px solid var(--po-border); border-radius: 9px; padding: 9px 11px; background: #fff;
    font: inherit; font-size: .88rem; color: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.po2-inp:focus { border-color: var(--po-accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .15); }
.po2-inp.sm { padding: 6px 8px; width: auto; min-width: 84px; font-size: .8rem; }
textarea.po2-inp { resize: vertical; min-height: 74px; }
.po2-inp:disabled { background: #f6f7f9; color: var(--po-faint); }
.po2-vendor { display: flex; align-items: center; gap: 10px; }
.po2-av { width: 34px; height: 34px; flex: none; border-radius: 8px; background: #e9e3fb; color: #6b46c1; display: grid; place-items: center;
    font-weight: 700; font-size: .72rem; }
.po2-fixed { padding: 9px 11px; border: 1px dashed var(--po-border); border-radius: 9px; background: #f8f9fa; font-size: .88rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.po2-kbd { margin-left: auto; font-size: .7rem; color: var(--po-faint); white-space: nowrap; }
.po2-kbd kbd { font: 600 .66rem inherit; border: 1px solid var(--po-border); border-radius: 5px; padding: 1px 5px; background: #fff; }

/* Lines */
.po2-scroll { overflow-x: auto; }
.po2-lines { width: 100%; border-collapse: collapse; }
.po2-lines th { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--po-faint); text-align: left;
    padding: 10px 8px; border-bottom: 1px solid var(--po-border); white-space: nowrap; }
.po2-lines th.r, .po2-lines td.r { text-align: right; }
.po2-lines td { padding: 12px 8px; border-bottom: 1px solid var(--po-line); vertical-align: top; }
.po2-lines tr:hover td { background: #fbfcfc; }
.po2-lines td:first-child, .po2-lines th:first-child { padding-left: 20px; }
.po2-lines td:last-child, .po2-lines th:last-child { padding-right: 16px; }
.po2-empty { padding: 36px !important; text-align: center !important; color: var(--po-muted); }
.po2-name { font-weight: 600; }
.po2-meta { font-size: .72rem; color: var(--po-muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.po2-chip { font-size: .66rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: #f1f2f4; color: #555; }
.po2-chip.pack { background: var(--po-blue-soft); color: var(--po-blue); }
.po2-onhand { color: var(--po-faint); }

.po2-uom { display: inline-flex; border: 1px solid var(--po-border); border-radius: 8px; overflow: hidden; background: #fff; }
.po2-uom button { border: 0; background: none; padding: 6px 10px; font-size: .75rem; font-weight: 600; color: var(--po-muted); cursor: pointer;
    display: flex; align-items: center; gap: 5px; font-family: inherit; }
.po2-uom button + button { border-left: 1px solid var(--po-border); }
.po2-uom button.on { background: var(--po-accent-soft); color: var(--po-accent-d); }
.po2-uom svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

.po2-num { width: 92px; box-sizing: border-box; text-align: right; padding: 7px 9px; border: 1px solid var(--po-border); border-radius: 8px;
    outline: none; font: inherit; font-size: .88rem; }
.po2-num:focus { border-color: var(--po-accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .15); }
.po2-money { display: inline-block; }
.po2-money .po2-num { width: 104px; }
.po2-hint { font-size: .72rem; color: var(--po-muted); margin-top: 5px; white-space: nowrap; }
.po2-hint b { color: var(--po-ink); font-weight: 600; }
.po2-hint.green b { color: var(--po-accent-d); }
.po2-total { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 7px; white-space: nowrap; }
.po2-del { border: 0; background: none; color: var(--po-faint); cursor: pointer; padding: 6px; border-radius: 6px; margin-top: 2px; }
.po2-del:hover { color: var(--po-danger); background: #fdeeee; }
.po2-del svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.po2-add { padding: 14px 20px 16px; border-top: 1px solid var(--po-line); }
.po2-add .pu-pick input { border-radius: 9px; }
.po2-fill { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; color: var(--po-muted); }
.po2-right { margin-left: auto; }

/* Summary */
.po2-summary { position: sticky; top: 92px; }
.po2-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.po2-tile { border: 1px solid var(--po-border); border-radius: 11px; padding: 11px 12px; }
.po2-tile small { font-size: .68rem; color: var(--po-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.po2-tile b { display: block; font-size: 1.25rem; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.po2-tile span { font-size: .68rem; color: var(--po-muted); }
.po2-tile.cs b { color: var(--po-blue); }
.po2-tile.ea b { color: var(--po-accent-d); }
.po2-sum { display: flex; justify-content: space-between; padding: 7px 0; color: var(--po-muted); font-variant-numeric: tabular-nums; font-size: .88rem; }
.po2-sum b { color: var(--po-ink); font-weight: 600; }
.po2-sum.grand { border-top: 1px dashed var(--po-border); margin-top: 8px; padding-top: 14px; color: var(--po-ink); font-size: 1rem; }
.po2-sum.grand b { font-size: 1.25rem; font-weight: 700; }
.po2-tip { background: #fdf3dd; color: #7a5413; border-radius: 10px; padding: 10px 12px; font-size: .78rem; line-height: 1.45; margin-top: 14px; }

@media (max-width: 1100px) {
    .po2-content { grid-template-columns: minmax(0, 1fr); }
    .po2-summary { position: static; }
}
@media (max-width: 700px) {
    .po2-grid, .po2-grid.two { grid-template-columns: minmax(0, 1fr); }
    .po2-actions { margin-left: 0; width: 100%; }
    .po2-kbd { display: none; }
}

/* =================================================================================================
   PURCHASING SCREENS - redesigned 2026-12-01 from the user's mock-up (purchasing-screens.html):
   the purchase order list, bill entry, bill review & commit, and purchase return. Shared by the
   Back Office and HQ. Buttons stay the host's .rf-btn; colours and shapes are local to .px.
   ================================================================================================= */
.px { --px-accent: #22a06b; --px-accent-d: #168457; --px-accent-soft: #e7f6ef; --px-amber: #b7791f; --px-amber-soft: #fdf3dd;
    --px-blue: #2f6fdd; --px-blue-soft: #eaf1fd; --px-violet: #6b46c1; --px-violet-soft: #f1ecfc; --px-red: #d64545; --px-red-soft: #fdeeee;
    --px-ink: #1b1f24; --px-muted: #6b7280; --px-faint: #9aa1ab; --px-border: #e6e8ec; --px-line: #f0f1f3;
    color: var(--px-ink); max-width: 1440px; }
.px .tnum, .px-t td.r { font-variant-numeric: tabular-nums; }
/* Buttons inside .px (2026-12-02). The Back Office styles .rf-btn globally in its app.css, but HQ
   does not, so on HQ the redesigned screens showed bare browser buttons. Same look as the Back Office. */
:is(.px, .po2) .rf-btn { border: 1px solid #d6dce6; background: #fff; color: #1f2733; border-radius: 10px;
    padding: 9px 16px; font-weight: 700; font-size: .88rem; cursor: pointer; white-space: nowrap; font-family: inherit; }
:is(.px, .po2) .rf-btn:hover:not(:disabled) { background: #f1f4f9; }
:is(.px, .po2) .rf-btn:disabled { opacity: .5; cursor: default; }
:is(.px, .po2) .rf-btn.primary { background: #4f5bd5; border-color: #4f5bd5; color: #fff; }
:is(.px, .po2) .rf-btn.primary:hover:not(:disabled) { background: #4450c4; }
:is(.px, .po2) .rf-btn.ghost { background: transparent; }
:is(.px, .po2) .rf-btn.sm { padding: 6px 12px; font-size: .82rem; }
:is(.px, .po2) a.rf-btn { display: inline-block; text-decoration: none; }
:is(.px, .po2) .px-ibtn:disabled { opacity: .4; cursor: default; }

/* top bar */
.px-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: -4px 0 16px; padding: 12px 4px 14px; background: rgba(246, 247, 249, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--px-border); }
.px-crumbs { font-size: .78rem; color: var(--px-muted); }
.px-crumbs a { color: var(--px-muted); text-decoration: none; }
.px-crumbs a:hover { text-decoration: underline; }
.px-crumbs b { color: var(--px-ink); font-weight: 500; }
.px-title { display: flex; align-items: center; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.px-title h1 { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px; }
.px-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.px-danger { color: var(--px-red) !important; }
.px-lead { margin: 4px 0 0; font-size: .82rem; color: var(--px-muted); }

/* status pills */
.px-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
    background: #eef0f3; color: #5b6270; }
.px-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.px-pill.ORDERED { background: var(--px-blue-soft); color: var(--px-blue); }
.px-pill.PARTIAL { background: var(--px-amber-soft); color: var(--px-amber); }
.px-pill.RECEIVED, .px-pill.POSTED { background: var(--px-accent-soft); color: var(--px-accent-d); }
.px-pill.CLOSED, .px-pill.BILLED { background: var(--px-violet-soft); color: var(--px-violet); }
.px-pill.CANCELLED { background: var(--px-red-soft); color: var(--px-red); }
.px-pill.SENT { background: var(--px-blue-soft); color: var(--px-blue); }

/* layout */
.px-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.px-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.px-card { background: #fff; border: 1px solid var(--px-border); border-radius: 14px; min-width: 0; }
.px-card-h { padding: 14px 20px; border-bottom: 1px solid var(--px-line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.px-card-h h2 { margin: 0; font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.px-card-h p { margin: 2px 0 0; font-size: .8rem; color: var(--px-muted); }
.px-card-b { padding: 18px 20px; }
.px-sticky { position: sticky; top: 92px; }
.px-count { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #f1f2f4; color: #555; }

/* fields */
.px-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.px-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.px-f { min-width: 0; }
.px-f > label, .px-f > .px-lbl { display: block; font-size: .72rem; font-weight: 600; color: var(--px-muted); margin-bottom: 6px; letter-spacing: .02em; }
.px-f.wide { grid-column: 1 / -1; }
.px-req { color: var(--px-red); }
.px-inp { width: 100%; box-sizing: border-box; border: 1px solid var(--px-border); border-radius: 9px; padding: 9px 11px; background: #fff;
    font: inherit; font-size: .88rem; color: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.px-inp:focus, .px-num:focus { border-color: var(--px-accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .15); }
.px-inp:disabled { background: #f6f7f9; color: var(--px-ink); }
.px-inp.ok { border-color: #9ad7bb; background: #f6fcf9; }
.px-inp.bad { border-color: #f1a9a9; background: #fff8f8; }
textarea.px-inp { resize: vertical; min-height: 70px; }
.px-hint { display: block; font-size: .72rem; color: var(--px-muted); margin-top: 5px; }
.px-hint.ok { color: var(--px-accent-d); }
.px-hint.warn { color: var(--px-amber); font-weight: 600; }
.px-hint.bad { color: var(--px-red); font-weight: 600; }
.px-vendor { display: flex; gap: 10px; align-items: center; }
.px-av { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--px-violet-soft); color: var(--px-violet); display: grid; place-items: center;
    font-weight: 700; font-size: .7rem; }
.px-fixed { padding: 9px 11px; border: 1px dashed var(--px-border); border-radius: 9px; background: #f8f9fa; font-size: .88rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-f .pu-field { margin: 0; }
.px-f .pu-field > label { display: none; }

/* chips */
.px-chip { font-size: .66rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: #f1f2f4; color: #555; white-space: nowrap; }
.px-chip.pack, .px-chip.cs { background: var(--px-blue-soft); color: var(--px-blue); }
.px-chip.ea { background: var(--px-accent-soft); color: var(--px-accent-d); }
.px-chip.place { background: var(--px-violet-soft); color: var(--px-violet); }
.px-chip.warn { background: var(--px-amber-soft); color: var(--px-amber); }

/* tables */
.px-scroll { overflow-x: auto; }
.px-t { width: 100%; border-collapse: collapse; }
.px-t th { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--px-faint); text-align: left;
    padding: 10px 8px; border-bottom: 1px solid var(--px-border); white-space: nowrap; background: #fff; }
.px-t td { padding: 12px 8px; border-bottom: 1px solid var(--px-line); vertical-align: middle; }
.px-t.top td { vertical-align: top; }
.px-t th.r, .px-t td.r { text-align: right; }
.px-t td:first-child, .px-t th:first-child { padding-left: 20px; }
.px-t td:last-child, .px-t th:last-child { padding-right: 18px; }
.px-t tbody tr:hover td { background: #fbfcfc; }
.px-t tr.click { cursor: pointer; }
.px-t tr.sel td { background: #f3faf6 !important; }
.px-t tr.warnrow td { color: var(--px-red); font-size: .8rem; padding-top: 0; border-bottom-color: var(--px-line); }
.px-t tfoot td { font-weight: 700; border-top: 1px solid var(--px-border); border-bottom: 0; }
.px-empty { padding: 36px !important; text-align: center !important; color: var(--px-muted); }
.px-name { font-weight: 600; }
.px-meta { font-size: .72rem; color: var(--px-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.px-sub { font-size: .72rem; color: var(--px-muted); margin-top: 4px; white-space: nowrap; }
.px-sub.warn { color: var(--px-amber); font-weight: 600; }
.px-sub.bad { color: var(--px-red); font-weight: 600; }
.px-sub b { color: var(--px-ink); font-weight: 600; }
.px-dim { color: var(--px-faint); }
.px-num { width: 84px; box-sizing: border-box; text-align: right; padding: 7px 9px; border: 1px solid var(--px-border); border-radius: 8px; outline: none;
    font: inherit; font-size: .86rem; background: #fff; }
.px-num.wide { width: 104px; }
.px-num.bad { border-color: #f1a9a9; background: #fff8f8; color: var(--px-red); }
.px-num:disabled { background: #f6f7f9; }
.px-in { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--px-border); border-radius: 8px; font: inherit; font-size: .84rem; background: #fff; outline: none; }
.px-in:focus { border-color: var(--px-accent); }
.px-x { border: 0; background: none; color: var(--px-faint); cursor: pointer; padding: 5px 7px; border-radius: 6px; font-size: .9rem; }
.px-x:hover { color: var(--px-red); background: var(--px-red-soft); }
.px-x.add:hover { color: var(--px-accent-d); background: var(--px-accent-soft); }
.px-t input[type=checkbox], .px input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--px-accent); cursor: pointer; }

/* PO list */
.px-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.px-kpi { background: #fff; border: 1px solid var(--px-border); border-radius: 14px; padding: 14px 16px; position: relative; overflow: hidden; cursor: pointer;
    transition: border-color .15s, transform .15s; text-align: left; font: inherit; color: inherit; }
.px-kpi:hover { border-color: #cfd3da; transform: translateY(-1px); }
.px-kpi small { font-size: .72rem; color: var(--px-muted); font-weight: 600; }
.px-kpi b { display: block; font-size: 1.5rem; font-weight: 700; margin-top: 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.px-kpi span { display: block; font-size: .72rem; color: var(--px-muted); margin-top: 2px; }
.px-kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, #ccc); }
.px-kpi.on { border-color: var(--c, #ccc); box-shadow: 0 0 0 3px rgba(0, 0, 0, .04); }
.px-toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--px-line); flex-wrap: wrap; }
.px-toolbar.slim { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
.px-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.px-fchip { border: 1px solid var(--px-border); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .78rem; font-weight: 500;
    color: var(--px-muted); cursor: pointer; display: flex; gap: 6px; align-items: center; }
.px-fchip em { font-style: normal; font-size: .68rem; background: #f1f2f4; border-radius: 999px; padding: 0 6px; color: var(--px-muted); }
.px-fchip.on { background: var(--px-ink); color: #fff; border-color: var(--px-ink); }
.px-fchip.on em { background: rgba(255, 255, 255, .2); color: #fff; }
.px-search { position: relative; margin-left: auto; }
.px-search .px-inp { width: 260px; padding-left: 32px; }
.px-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--px-faint); fill: none; stroke: currentColor; stroke-width: 2; }
.px-search .px-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--px-faint); cursor: pointer; }
.px-sel { width: auto; padding: 7px 10px; font-size: .78rem; }
.px-prog { width: 120px; }
.px-bar { height: 6px; border-radius: 6px; background: #eef0f3; overflow: hidden; display: flex; }
.px-bar i { display: block; height: 100%; background: var(--px-accent); }
.px-bar i.skip { background: #c7ccd4; }
.px-prog small { font-size: .68rem; color: var(--px-muted); display: block; margin-top: 4px; white-space: nowrap; }
.px-no { font-weight: 700; color: var(--px-ink); }
.px-late { color: var(--px-red); font-weight: 600; }
.px-rowact { display: flex; gap: 4px; justify-content: flex-end; opacity: .25; transition: opacity .15s; }
.px-t tbody tr:hover .px-rowact { opacity: 1; }
.px-ibtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--px-border); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--px-muted); }
.px-ibtn:hover { color: var(--px-ink); border-color: #cfd3da; }
.px-ibtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.px-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; color: var(--px-muted); font-size: .78rem; }
.px-note { margin: -6px 2px 14px; font-size: .8rem; color: var(--px-muted); }

/* bill entry */
.px-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.px-mode { border: 1.5px solid var(--px-border); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start;
    transition: all .15s; background: #fff; text-align: left; font: inherit; color: inherit; }
.px-mode:hover { border-color: #cfd3da; }
.px-mode.on { border-color: var(--px-accent); background: #f6fcf9; box-shadow: 0 0 0 3px rgba(34, 160, 107, .12); }
.px-mode:disabled { cursor: default; opacity: .6; }
.px-mi { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #f1f2f4; color: var(--px-muted); }
.px-mode.on .px-mi { background: var(--px-accent); color: #fff; }
.px-mi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.px-mode b { display: block; font-size: .9rem; }
.px-mode span { font-size: .78rem; color: var(--px-muted); }
.px-pocards { display: flex; gap: 10px; flex-wrap: wrap; }
.px-pocard { border: 1px solid var(--px-border); border-radius: 11px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 240px;
    transition: all .15s; background: #fff; font: inherit; color: inherit; text-align: left; }
.px-pocard:hover { border-color: #cfd3da; }
.px-pocard.on { border-color: var(--px-accent); background: #f6fcf9; }
.px-pocard b { font-size: .82rem; }
.px-pocard small { display: block; font-size: .72rem; color: var(--px-muted); }
.px-pocard .r { margin-left: auto; text-align: right; font-weight: 600; font-size: .82rem; }

/* summary */
.px-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; color: var(--px-muted); font-variant-numeric: tabular-nums; font-size: .88rem; }
.px-sum b { color: var(--px-ink); font-weight: 600; }
.px-sum.grand { border-top: 1px dashed var(--px-border); margin-top: 8px; padding-top: 14px; color: var(--px-ink); font-size: .95rem; }
.px-sum.grand b { font-size: 1.25rem; font-weight: 700; }
.px-match { margin-top: 14px; border-radius: 11px; padding: 12px 14px; font-size: .8rem; display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.px-match.ok { background: var(--px-accent-soft); color: #0f5c3c; }
.px-match.bad { background: var(--px-red-soft); color: #8f2424; }
.px-match.idle { background: #f6f7f9; color: var(--px-muted); }
.px-match svg, .px-ci svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.px-tip { background: var(--px-amber-soft); color: #7a5413; border-radius: 10px; padding: 10px 12px; font-size: .78rem; line-height: 1.45; margin-top: 14px; }
.px-vcard { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.px-vcard small { display: block; font-size: .72rem; color: var(--px-muted); }

/* review & commit */
.px-stepper { display: flex; align-items: center; margin-bottom: 20px; background: #fff; border: 1px solid var(--px-border); border-radius: 14px; padding: 14px 20px; }
.px-step { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .82rem; color: var(--px-faint); white-space: nowrap; }
.px-step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .75rem; border: 1.5px solid #d5d9df; background: #fff; }
.px-step.done { color: var(--px-accent-d); }
.px-step.done i { background: var(--px-accent); border-color: var(--px-accent); color: #fff; }
.px-step.cur { color: var(--px-ink); }
.px-step.cur i { border-color: var(--px-accent); color: var(--px-accent-d); box-shadow: 0 0 0 4px rgba(34, 160, 107, .15); }
.px-step-line { flex: 1; height: 2px; background: #e6e8ec; margin: 0 14px; border-radius: 2px; min-width: 20px; }
.px-step-line.done { background: var(--px-accent); }
.px-checks { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 4px; }
.px-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--px-line); }
.px-check:last-child { border-bottom: 0; }
.px-ci { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.px-ci svg { width: 14px; height: 14px; }
.px-ci.ok { background: var(--px-accent-soft); color: var(--px-accent-d); }
.px-ci.warn { background: var(--px-amber-soft); color: var(--px-amber); }
.px-ci.bad { background: var(--px-red-soft); color: var(--px-red); }
.px-check b { font-size: .86rem; display: block; }
.px-check span { font-size: .78rem; color: var(--px-muted); }
.px-check .rf-btn { margin-left: auto; }
.px-seg { display: inline-flex; background: #f1f2f4; border-radius: 10px; padding: 3px; gap: 2px; }
.px-seg button { border: 0; background: none; border-radius: 8px; padding: 7px 14px; font: inherit; font-size: .8rem; font-weight: 500; color: var(--px-muted);
    cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.px-seg button.on { background: #fff; color: var(--px-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }
.px-seg button:disabled { opacity: .4; cursor: not-allowed; }
.px-seg.sm button { padding: 5px 10px; font-size: .74rem; }
.px-facs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.px-fac { border: 1.5px solid var(--px-border); border-radius: 12px; padding: 13px 14px; cursor: pointer; transition: all .15s; position: relative; background: #fff;
    text-align: left; font: inherit; color: inherit; }
.px-fac:hover { border-color: #cfd3da; }
.px-fac.on { border-color: var(--px-accent); background: #f6fcf9; box-shadow: 0 0 0 3px rgba(34, 160, 107, .12); }
.px-fac:disabled { cursor: default; }
.px-fac .top { display: flex; gap: 10px; align-items: center; }
.px-fi { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: #f1f2f4; color: var(--px-muted); }
.px-fac.on .px-fi, .px-single .px-fi { background: var(--px-accent); color: #fff; }
.px-fi svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.px-fac b { font-size: .86rem; display: block; }
.px-fac small { font-size: .72rem; color: var(--px-muted); }
.px-fac .tag { position: absolute; top: 10px; right: 10px; font-size: .62rem; font-weight: 700; color: var(--px-blue); background: var(--px-blue-soft); padding: 2px 6px; border-radius: 5px; }
.px-fac .oh { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--px-border); font-size: .72rem; color: var(--px-muted); display: grid;
    grid-template-columns: 1fr auto; gap: 3px 10px; }
.px-fac .oh b { font-size: .72rem; display: inline; font-weight: 600; color: var(--px-ink); text-align: right; }
.px-single { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #f6fcf9; border: 1px solid #cdebdc; }
.px-single b { display: block; font-size: .86rem; }
.px-single small { font-size: .76rem; color: var(--px-muted); }
.px-splittools { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--px-line); font-size: .78rem; color: var(--px-muted); flex-wrap: wrap; }
.px-splittools span { margin-right: auto; }
.px-left { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.px-left.ok { background: var(--px-accent-soft); color: var(--px-accent-d); }
.px-left.warn { background: var(--px-amber-soft); color: var(--px-amber); }
.px-left.bad { background: var(--px-red-soft); color: var(--px-red); }
.px-fhead { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.px-fhead small { font-size: .62rem; letter-spacing: 0; text-transform: none; color: var(--px-faint); font-weight: 500; }
.px-delta { color: var(--px-accent-d); font-weight: 700; }
.px-delta.neg { color: var(--px-red); }
.px-arrow { color: var(--px-faint); margin: 0 4px; }
.px-placedot { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.px-placedot i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--px-blue); }
.px-lockbar { display: flex; background: linear-gradient(90deg, #0f5c3c, #168457); color: #fff; border-radius: 14px; padding: 16px 20px; margin-bottom: 20px;
    align-items: center; gap: 14px; flex-wrap: wrap; }
.px-lockbar .big { width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; }
.px-lockbar .big svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; }
.px-lockbar b { font-size: .95rem; display: block; }
.px-lockbar span { font-size: .8rem; opacity: .85; }
.px-lockbar .px-actions .rf-btn { background: rgba(255, 255, 255, .15); border-color: transparent; color: #fff; }
.px-lockbar .px-actions .rf-btn.light { background: #fff; color: #0f5c3c; }
.px-draftbar { display: flex; gap: 12px; align-items: center; background: var(--px-amber-soft); color: #7a5413; border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; font-size: .84rem; flex-wrap: wrap; }
.px-confirm { margin-top: 14px; padding: 12px; border: 1px solid var(--px-border); border-radius: 11px; background: #fafbfc; }
.px-confirm label { display: flex; gap: 9px; font-size: .78rem; color: var(--px-muted); line-height: 1.45; cursor: pointer; }
.px-commit { width: 100%; justify-content: center; margin-top: 12px; padding: 12px !important; }

/* return */
.px-billref { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--px-border); border-radius: 12px; background: #fafbfc; flex-wrap: wrap; }
.px-billref .ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--px-violet-soft); color: var(--px-violet); display: grid; place-items: center; }
.px-billref .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.px-billref b { display: block; }
.px-billref small { color: var(--px-muted); font-size: .76rem; }
.px-billref .r { margin-left: auto; text-align: right; }
.px-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.px-tile { border: 1px solid var(--px-border); border-radius: 11px; padding: 10px 12px; }
.px-tile small { font-size: .66rem; color: var(--px-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.px-tile b { display: block; font-size: 1.2rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.px-tile.red b { color: var(--px-red); }
.px-tile.blue b { color: var(--px-blue); }
.px-tile.green b { color: var(--px-accent-d); }

@media (max-width: 1200px) { .px-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
    .px-cols { grid-template-columns: minmax(0, 1fr); }
    .px-sticky { position: static; }
}
@media (max-width: 700px) {
    .px-grid, .px-grid.two, .px-modes { grid-template-columns: minmax(0, 1fr); }
    .px-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .px-actions { margin-left: 0; width: 100%; }
    .px-search { margin-left: 0; width: 100%; }
    .px-search .px-inp { width: 100%; }
}

/* ---- the vendor form (2026-12-02), shared by the Back Office and HQ ----
   Inside InvDialog, which sits outside the page: the form carries .px itself for the colours. The
   dialog is widened for it (its own width suits one column of fields; this has two). */
.rd:has(.px-vform) { width: min(700px, 96vw); }
.px-vform { display: flex; flex-direction: column; gap: 18px; max-width: none; }
.px-vsec { display: flex; flex-direction: column; gap: 12px; }
.px-vsec + .px-vsec { border-top: 1px solid var(--px-line); padding-top: 16px; }
.px-vsec h3 { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--px-muted); }
.px-f > label em { font-style: normal; color: var(--px-red); }
.px-help { display: block; font-size: .72rem; color: var(--px-faint); margin-top: 5px; line-height: 1.4; }
.px-sw { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.px-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.px-swt { flex: none; width: 40px; height: 22px; border-radius: 999px; background: #cfd6e0; position: relative; transition: background .15s; margin-top: 1px; }
.px-swt::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.px-sw input:checked + .px-swt { background: var(--px-accent); }
.px-sw input:checked + .px-swt::after { transform: translateX(18px); }
.px-sw input:focus-visible + .px-swt { box-shadow: 0 0 0 3px rgba(34, 160, 107, .25); }
.px-sw b { display: block; font-size: .86rem; font-weight: 600; }
.px-sw small { display: block; font-size: .76rem; color: var(--px-muted); margin-top: 2px; line-height: 1.45; }
@media (max-width: 640px) { .px-vform .px-grid.two { grid-template-columns: 1fr; } }

/* ---- the location bar on the redesigned pages (2026-12-02) ----
   InventoryStoreBar (HQ only) styles its select with .rf-in, which is only styled inside .pu; on a
   .px page it fell back to the browser's small default box. Here it is a proper picker: a white
   strip with an icon, a full-height select and the current location's name readable at a glance. */
:is(.px, .po2) .pu-storebar { margin: 0 0 18px; padding: 10px 14px; background: #fff; border: 1px solid var(--px-border);
    border-radius: 12px; gap: 12px; }
:is(.px, .po2) .pu-storebar label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--px-muted);
    display: inline-flex; align-items: center; gap: 7px; }
:is(.px, .po2) .pu-storebar label::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--px-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9M3 9v11h18V9M3 9h18M9 20v-6h6v6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9M3 9v11h18V9M3 9h18M9 20v-6h6v6'/%3E%3C/svg%3E") center / contain no-repeat; }
:is(.px, .po2) .pu-storebar select.rf-in { min-width: 340px; max-width: 100%; height: 40px; box-sizing: border-box; padding: 0 36px 0 12px;
    border: 1px solid var(--px-border); border-radius: 9px; background-color: #f8f9fb; color: var(--px-ink);
    font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
:is(.px, .po2) .pu-storebar select.rf-in:hover:not(:disabled) { border-color: #cfd3da; background-color: #fff; }
:is(.px, .po2) .pu-storebar select.rf-in:focus { border-color: var(--px-accent); box-shadow: 0 0 0 3px rgba(34, 160, 107, .15); background-color: #fff; }
:is(.px, .po2) .pu-storebar select.rf-in:disabled { opacity: .75; cursor: default; }
:is(.px, .po2) .pu-storebar .pu-sub { color: var(--px-muted); font-size: .8rem; }
@media (max-width: 640px) { :is(.px, .po2) .pu-storebar select.rf-in { min-width: 0; width: 100%; } }

/* ---- shared additions for the HQ Transfers redesign (2026-12-02) ---- */
:is(.px, .po2) .rf-btn.danger { background: #fff; border-color: #f1b5b5; color: var(--px-red); }
:is(.px, .po2) .rf-btn.danger:hover:not(:disabled) { background: var(--px-red-soft); }
.px-num.chg { border-color: #f0c674; background: #fffaf0; }
.px-t tr.sel td { background: var(--px-accent-soft); }
/* A label beside its field, for filters in a toolbar. */
.px-f.px-inl { display: inline-flex; align-items: center; gap: 8px; }
.px-f.px-inl > label { margin: 0; white-space: nowrap; }
.px-f.px-inl .px-inp { width: auto; min-width: 200px; }
/* Tabs: underlined, with a count bubble. */
.px-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--px-border); margin: 0 0 18px; overflow-x: auto; }
.px-tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--px-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.px-tabs button:hover { color: var(--px-ink); }
.px-tabs button.on { color: var(--px-accent-d); border-bottom-color: var(--px-accent); }
.px-tabs em { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--px-amber-soft); color: var(--px-amber); }
/* One request: a header strip over its lines. */
.px-req + .px-req { border-top: 1px solid var(--px-line); }
.px-req-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px 10px; font-size: .82rem; }
/* Side panels (the HQ sheet) drawn in the .px look. */
.px-sheet { background: #f6f7f9 !important; }
.px-sheet-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--px-border); }
.px-sheet-b { flex: 1; overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.px-sheet-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px; background: #fff; border-top: 1px solid var(--px-border); }
/* From -> To. */
.px-route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: start; }
.px-route-arrow { margin-top: 30px; width: 34px; height: 34px; border-radius: 50%; background: var(--px-accent-soft); color: var(--px-accent-d);
    display: grid; place-items: center; }
.px-route-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Centred confirmations. */
.px-confirmbox { background: #fff !important; border-color: var(--px-border) !important; border-radius: 16px !important; display: flex; flex-direction: column; gap: 12px; }
.px-confirmbox h2 { margin: 0 !important; }
.px-confirmbox p { margin: 0 !important; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.px-confirmbox-f { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 4px; }
@media (max-width: 640px) {
    .px-route { grid-template-columns: 1fr; }
    .px-route-arrow { display: none; }
    .px-f.px-inl { display: flex; flex-direction: column; align-items: stretch; }
    .px-f.px-inl .px-inp { min-width: 0; width: 100%; }
}

/* ---- HQ Stock across stores (2026-12-02): the matrix ---- */
.px-mx { max-height: calc(100vh - 260px); overflow: auto; }
.px-mx thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; }
.px-mx .stick { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 220px; box-shadow: 1px 0 0 var(--px-line); }
.px-mx thead th.stick { z-index: 3; background: #fafbfc; }
.px-mx td.tot { background: #f7f8fa; }
.px-mx thead th.tot { background: #f1f3f6; }
.px-cell { display: inline-block; min-width: 38px; padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; font-weight: 600; }
.px-cell.low { background: var(--px-amber-soft); color: var(--px-amber); }
.px-cell.neg { background: var(--px-red-soft); color: var(--px-red); }
.px-cell.nc { background: #f1f2f4; color: var(--px-faint); font-weight: 400; }
i.px-cell { min-width: 14px; height: 14px; padding: 0; vertical-align: -2px; margin-right: 6px; }
i.px-cell.low { background: #f6d58e; }
i.px-cell.neg { background: #f1a9a9; }
i.px-cell.nc { background: #dfe2e6; }
.px-legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 20px; font-size: .76rem; color: var(--px-muted); border-bottom: 1px solid var(--px-line); }
.px-legend > span { display: inline-flex; align-items: center; gap: 4px; }

/* The backdrop behind a side panel on the redesigned HQ pages (2026-12-02). HQ's own scrim is a pale
   wash with an 11px blur, which over these pages made the whole screen - sidebar included - look
   smeared and broken. A plain dim, no blur: the page stays recognisable behind the panel. */
.px .tr-sheet-bd { background: rgba(15, 23, 42, .32); backdrop-filter: none; -webkit-backdrop-filter: none; }
.px .px-sheet { box-shadow: -12px 0 40px rgba(15, 23, 42, .18); }

/* ---- the older form classes, wherever they now sit (2026-12-02) ----
   .rf-in / .rf-row / .rf-hint / .rf-sw were styled only inside .pu (the older page wrapper). Two
   places use them outside it: InvDialog bodies, which render after the page's own div, and the
   shared ItemPicker, whose box is .rf-in by default. The Back Office never showed it because its
   app.css styles those classes globally; HQ does not, so on HQ they were bare browser controls -
   the location box, the item search box and every dialog's fields. The same look, now also under
   .px (the redesigned pages) and .rd (any dialog). */
:is(.px, .po2, .rd) .rf-in { border: 1px solid #d6dce6; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .94rem;
    background: #fff; color: #1f2733; width: 100%; box-sizing: border-box; }
:is(.px, .po2, .rd) .rf-in:focus { outline: none; border-color: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, .15); }
:is(.px, .po2, .rd) .rf-in:disabled { background: #f6f7f9; }
:is(.px, .po2, .rd) .rf-hint { color: #8a94a2; font-size: .78rem; line-height: 1.45; }
:is(.px, .po2, .rd) .rf-row { display: flex; flex-direction: column; gap: 6px; }
:is(.px, .po2, .rd) .rf-row > label { font-size: .82rem; font-weight: 700; color: #3d4756; }
:is(.px, .po2, .rd) .rf-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; color: #3d4756; }
:is(.px, .po2, .rd) .rf-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
:is(.px, .po2, .rd) .rf-swt { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #cfd6e0; position: relative; transition: background .15s; }
:is(.px, .po2, .rd) .rf-swt::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
:is(.px, .po2, .rd) .rf-sw input:checked + .rf-swt { background: #2e9e63; }
:is(.px, .po2, .rd) .rf-sw input:checked + .rf-swt::after { transform: translateX(18px); }
.rd .rf-btn { border: 1px solid #d6dce6; background: #fff; color: #1f2733; border-radius: 10px;
    padding: 6px 12px; font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rd .rf-btn:hover:not(:disabled) { background: #f1f4f9; }
.rd .rf-btn:disabled { opacity: .5; cursor: default; }
.rd .rf-btn.primary { background: #4f5bd5; border-color: #4f5bd5; color: #fff; }
/* Fields inside dialogs laid out as a grid (Lots' new lot, adjustments). */
.rd .pu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
/* Banners on the redesigned pages: the same colours, the page's spacing. */
:is(.px, .po2) :is(.pu-warn, .pu-err, .pu-ok) { margin: 0 0 16px; border-radius: 11px; }

/* ---- the scan box above the lines (2026-12-02) ---- */
.po2-add.top { border-top: 0; border-bottom: 1px solid var(--po-line); padding: 12px 20px 14px; background: #fbfcfd; }
.px-addtop { padding: 12px 20px; border-bottom: 1px solid var(--px-line); background: #fbfcfd; }
.px-addtop .rf-in, .po2-add.top .rf-in { font-size: .95rem; padding: 10px 12px 10px 36px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ab' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7V5a1 1 0 011-1h2M17 4h2a1 1 0 011 1v2M20 17v2a1 1 0 01-1 1h-2M7 20H5a1 1 0 01-1-1v-2M8 8v8M11 8v8M14 8v8M17 8v8'/%3E%3C/svg%3E") no-repeat 11px center / 17px; }
/* The line the last scan added or added to: a green wash that fades. */
@keyframes px-just { from { background: #d7f3e5; } to { background: #f3fbf7; } }
tr.px-just > td { animation: px-just 1.6s ease-out forwards; }

/* The purchase order editor (.po2) was redesigned with its own class names before the shared .px
   ones existed, so the button, location bar and field rules written for .px never reached it:
   bare browser buttons and a small location box on HQ (2026-12-02). Those rules now name .po2
   too, and it carries the colours they read. */
.po2 { --px-accent: #22a06b; --px-accent-d: #168457; --px-accent-soft: #e7f6ef; --px-amber: #b7791f; --px-amber-soft: #fdf3dd; --px-blue: #2f6fdd; --px-blue-soft: #eaf1fd; --px-violet: #6b46c1; --px-violet-soft: #f1ecfc; --px-red: #d64545; --px-red-soft: #fdeeee; --px-ink: #1b1f24; --px-muted: #6b7280; --px-faint: #9aa1ab; --px-border: #e6e8ec; --px-line: #f0f1f3; }
/* A breadcrumb step that is an action rather than a link (the new transfer's way back). */
.px-crumb-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--px-muted); cursor: pointer; }
.px-crumb-btn:hover { text-decoration: underline; }

/* ---- entry screens: Browse items beside the scan box, and both kept in view (2026-12-02) ---- */
.px-addrow { display: flex; gap: 8px; align-items: center; }
.px-addrow > .pu-pick { flex: 1; min-width: 0; }
.px-addrow > .rf-btn { flex: none; padding-top: 10px; padding-bottom: 10px; }
/* THE LINES IN A BOX OF THEIR OWN (2026-12-02, the user's call): on a wide screen the lines scroll
   inside a box as tall as the window allows, with the column headings fixed at its top and the
   scan box right above it - so scanning and reading the lines never needs the page scrolled. A
   narrow screen keeps the plain page scroll (and the sideways scroll of a wide table). */
@media (min-width: 1000px) {
    .px-addtop ~ .px-scroll, .po2-add.top ~ .po2-scroll, .px-card .px-scroll:has(> .px-t.top) {
        max-height: max(320px, calc(100vh - var(--px-top-h, 90px) - var(--px-add-h, 64px) - 150px));
        overflow: auto; scrollbar-gutter: stable; }
    .px-addtop ~ .px-scroll thead th, .po2-add.top ~ .po2-scroll thead th, .px-card .px-scroll:has(> .px-t.top) thead th {
        position: sticky; top: 0; z-index: 2; background: #fafbfc; box-shadow: 0 1px 0 var(--px-border, #e6e8ec); }
    .px-addtop ~ .px-scroll tfoot td, .po2-add.top ~ .po2-scroll tfoot td, .px-card .px-scroll:has(> .px-t.top) tfoot td {
        position: sticky; bottom: 0; z-index: 2; background: #f7f8fa; }
}
/* A scrollbar that can be seen. */
.px-addtop ~ .px-scroll::-webkit-scrollbar, .po2-add.top ~ .po2-scroll::-webkit-scrollbar, .px-scroll:has(> .px-t.top)::-webkit-scrollbar { width: 10px; height: 10px; }
.px-addtop ~ .px-scroll::-webkit-scrollbar-thumb, .po2-add.top ~ .po2-scroll::-webkit-scrollbar-thumb, .px-scroll:has(> .px-t.top)::-webkit-scrollbar-thumb { background: #c9ced6; border-radius: 999px; border: 2px solid #fff; }
.px-addtop ~ .px-scroll::-webkit-scrollbar-track, .po2-add.top ~ .po2-scroll::-webkit-scrollbar-track, .px-scroll:has(> .px-t.top)::-webkit-scrollbar-track { background: #f3f4f6; }
/* Browse items */
.px-browse { display: flex; flex-direction: column; gap: 12px; max-width: none; }
.px-browse-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.px-browse-list { max-height: min(58vh, 560px); overflow: auto; border: 1px solid var(--px-border); border-radius: 12px; }
.px-browse-list thead th { position: sticky; top: 0; z-index: 1; background: #fafbfc; }
.px-browse-list tr.sel td { background: var(--px-accent-soft); }
