/* ============================================================================
   BARBAROS — products-gallery.css (namespace pgx-*) — the approved "Produits · Galerie"
   model in #panel-products, on the Signature dark tokens (--buld-*, --p-*).
   Class names avoid the legacy painter fragments (card, -chip, -tag, -box, block, badge, status).

   Takeover (reversible): #panel-products.pgx-on hides its legacy children; remove .pgx-on to restore.

   !important collision list (only these):
     - #panel-products.pgx-on > :not(.pgx-root)  display:none — the legacy .panel-header / .yaya-scope
       carry display rules from orders.css / sidebar.css.
     - .pgx-root input / select / textarea, .pgx-sheet .pgx-inp — styles.css + orders.css paint every
       input in a panel (border, background, height, padding) with !important.
     - .pgx-root h1/h3 and .pgx-sheet h4 — orders-theme.css forces panel heading colour/size.
   ============================================================================ */

html[data-buld-theme] .pgx-root,
html[data-buld-theme] .pgx-sheet,
html[data-buld-theme] .pgx-menu,
html[data-buld-theme] .pgx-tipbox {
    --pgx-ok: #3DD598;
    --pgx-warn: #F5B94A;
    --pgx-bad: #FF6B7A;
    --pgx-mute: var(--buld-ink-3);
    --pgx-tile: var(--p-card-bg, var(--buld-elevated));
    --pgx-line: var(--buld-divider);
    --pgx-hair: var(--buld-hairline);
    --pgx-sub: var(--buld-surface-2, var(--buld-page));
    --pgx-r: 14px;
}
html[data-buld-theme="light"] .pgx-root,
html[data-buld-theme="light"] .pgx-sheet,
html[data-buld-theme="light"] .pgx-menu { --pgx-ok: #14AE5C; --pgx-warn: #B45309; --pgx-bad: #D33A2B; }

/* ---------------------------------------------------------------- takeover */
html[data-buld-theme] #panel-products.pgx-on > :not(.pgx-root) { display: none !important; }

/* ---------------------------------------------------------------- shell */
html[data-buld-theme] .pgx-root { color: var(--buld-ink-1); font-size: 13px; line-height: 1.45; padding: 4px 0 40px; min-width: 0; }
html[data-buld-theme] .pgx-root *, html[data-buld-theme] .pgx-sheet .pgx-form * { box-sizing: border-box; }
html[data-buld-theme] .pgx-root i[data-lucide], html[data-buld-theme] .pgx-root svg.lucide { width: 16px; height: 16px; flex: none; }
html[data-buld-theme] .pgx-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin: 0 0 16px; }
html[data-buld-theme] .pgx-root .pgx-head h1 { margin: 0 !important; font-size: 24px !important; font-weight: 700 !important; letter-spacing: -0.02em; color: var(--buld-ink-1) !important; }
html[data-buld-theme] .pgx-head p { margin: 4px 0 0; color: var(--buld-ink-3); }
html[data-buld-theme] .pgx-demo { color: var(--pgx-warn); }
html[data-buld-theme] .pgx-acts { display: flex; gap: 8px; flex-wrap: wrap; }
html[data-buld-theme] .pgx-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; min-width: 0; }
html[data-buld-theme] .pgx-sp { flex: 1; }
html[data-buld-theme] .pgx-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
html[data-buld-theme] .pgx-dim { color: var(--buld-ink-3); }
html[data-buld-theme] .pgx-ink { color: var(--buld-ink-1); }
html[data-buld-theme] .pgx-warn { color: var(--pgx-warn); }
html[data-buld-theme] .pgx-bad { color: var(--pgx-bad); }

/* search + category segment + filter pills + sort */
html[data-buld-theme] .pgx-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--pgx-line); border-radius: 10px; background: var(--pgx-sub); color: var(--buld-ink-3); flex: 0 1 300px; min-width: 0; }
html[data-buld-theme] .pgx-search:focus-within { border-color: var(--buld-cta); }
html[data-buld-theme] .pgx-root .pgx-search input { flex: 1; min-width: 0; height: 100% !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; padding: 0 !important; color: var(--buld-ink-1) !important; font: inherit; }
html[data-buld-theme] .pgx-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--pgx-line); border-radius: 10px; background: var(--pgx-sub); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
html[data-buld-theme] .pgx-seg::-webkit-scrollbar { display: none; }
html[data-buld-theme] .pgx-seg button { border: 0; background: transparent; color: var(--buld-ink-3); padding: 5px 11px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 12.5px; white-space: nowrap; cursor: pointer; }
html[data-buld-theme] .pgx-seg button:hover { color: var(--buld-ink-1); }
html[data-buld-theme] .pgx-seg button.on { background: var(--pgx-tile); color: var(--buld-ink-1); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
html[data-buld-theme] .pgx-fps { display: flex; gap: 6px; flex-wrap: wrap; }
html[data-buld-theme] .pgx-fp { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--pgx-line); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)) var(--pgx-tile); color: var(--buld-ink-2); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
html[data-buld-theme] .pgx-fp:hover { background: var(--buld-hover); }
html[data-buld-theme] .pgx-fp > i:not([data-lucide]) { width: 7px; height: 7px; border-radius: 50%; background: var(--pgx-mute); }
html[data-buld-theme] .pgx-fp > i[data-t="ok"] { background: var(--pgx-ok); }
html[data-buld-theme] .pgx-fp > i[data-t="warn"] { background: var(--pgx-warn); }
html[data-buld-theme] .pgx-fp > i[data-t="bad"] { background: var(--pgx-bad); }
html[data-buld-theme] .pgx-fp em { font-style: normal; font-size: 12px; color: var(--buld-ink-3); font-variant-numeric: tabular-nums; }
html[data-buld-theme] .pgx-fp.on { background: var(--buld-ink-1); color: var(--buld-page); border-color: var(--buld-ink-1); }
html[data-buld-theme] .pgx-fp.on em { color: inherit; opacity: .65; }
html[data-buld-theme] .pgx-fp svg { width: 14px; height: 14px; }
html[data-buld-theme] .pgx-sort { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border: 1px solid var(--pgx-line); border-radius: 999px; color: var(--buld-ink-3); background: var(--pgx-sub); }
html[data-buld-theme] .pgx-sort svg { width: 14px; height: 14px; }
html[data-buld-theme] .pgx-root .pgx-sort select { height: 28px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--buld-ink-1) !important; font: inherit; font-weight: 600; padding: 0 6px 0 0 !important; cursor: pointer; outline: 0; }
html[data-buld-theme] .pgx-root .pgx-sort select option { background: var(--buld-elevated-2); color: var(--buld-ink-1); }

/* attention banner */
html[data-buld-theme] .pgx-alert { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--pgx-r); background: var(--pgx-tile); border: 1px solid var(--pgx-hair); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 12px 30px -20px rgba(0, 0, 0, .8); }
html[data-buld-theme] .pgx-alert__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--pgx-warn) 14%, transparent); color: var(--pgx-warn); }
html[data-buld-theme] .pgx-alert--bad > svg { color: var(--pgx-bad); }
html[data-buld-theme] .pgx-alert__tx { flex: 1; min-width: 200px; display: grid; gap: 2px; }
html[data-buld-theme] .pgx-alert__tx span { color: var(--buld-ink-3); }

/* bulk bar */
html[data-buld-theme] .pgx-bulk { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin: 0 0 12px; border-radius: 12px; background: var(--buld-elevated-2); border: 1px solid color-mix(in srgb, var(--buld-cta) 55%, transparent); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .8); }
html[data-buld-theme] .pgx-bulk > b { margin-right: 4px; }
html[data-buld-theme] .pgx-bulk__pct { display: inline-flex; gap: 6px; align-items: center; }
html[data-buld-theme] .pgx-root .pgx-bulk__pct input { width: 74px; height: 28px !important; padding: 0 8px !important; border: 1px solid var(--pgx-line) !important; border-radius: 8px !important; background: var(--pgx-sub) !important; color: var(--buld-ink-1) !important; font: inherit; box-shadow: none !important; }
html[data-buld-theme] .pgx-ib { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--pgx-line); background: transparent; color: var(--buld-ink-2); cursor: pointer; flex: none; padding: 0; }
html[data-buld-theme] .pgx-ib:hover { background: var(--buld-hover); color: var(--buld-ink-1); }
html[data-buld-theme] .pgx-ib svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- tiles */
html[data-buld-theme] .pgx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
html[data-buld-theme] .pgx-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--pgx-r); background: var(--pgx-tile); border: 1px solid var(--pgx-hair); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 12px 30px -20px rgba(0, 0, 0, .8); color: var(--buld-ink-1); min-width: 0; transition: border-color .15s, transform .15s; }
html[data-buld-theme] .pgx-tile:hover { border-color: var(--pgx-line); }
html[data-buld-theme] .pgx-tile.is-sel { border-color: var(--buld-cta); box-shadow: 0 0 0 1px var(--buld-cta), 0 12px 30px -20px rgba(0, 0, 0, .8); }
html[data-buld-theme] .pgx-img { --h: 220; position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, hsl(var(--h) 62% 64%), color-mix(in srgb, hsl(var(--h) 62% 64%) 35%, #111)); color: rgba(255, 255, 255, .9); }
html[data-buld-theme] .pgx-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
html[data-buld-theme] .pgx-img > img + .pgx-ini { display: none; }
html[data-buld-theme] .pgx-img::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .38), transparent 34%, transparent 62%, rgba(0, 0, 0, .42)); }
html[data-buld-theme] .pgx-ini { font-size: 28px; font-weight: 800; letter-spacing: .02em; }
html[data-buld-theme] .pgx-tl { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; }
html[data-buld-theme] .pgx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: rgba(0, 0, 0, .5); color: #fff; backdrop-filter: blur(6px); }
html[data-buld-theme] .pgx-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pgx-ok); }
html[data-buld-theme] .pgx-pill[data-t="warn"]::before { background: var(--pgx-warn); }
html[data-buld-theme] .pgx-pill[data-t="bad"]::before { background: var(--pgx-bad); }
html[data-buld-theme] .pgx-sel { position: relative; width: 22px; height: 22px; display: inline-block; cursor: pointer; }
html[data-buld-theme] .pgx-root .pgx-sel input { position: absolute; inset: 0; z-index: 1; opacity: 0; margin: 0; cursor: pointer; width: 100% !important; height: 100% !important; }
html[data-buld-theme] .pgx-sel span { position: absolute; inset: 0; pointer-events: none; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .35); }
html[data-buld-theme] .pgx-sel input:checked + span { background: var(--buld-cta); border-color: var(--buld-cta); }
html[data-buld-theme] .pgx-sel input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
html[data-buld-theme] .pgx-sel input:focus-visible + span { outline: 2px solid var(--buld-cta); outline-offset: 2px; }
html[data-buld-theme] .pgx-ag { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: rgba(20, 18, 24, .7); backdrop-filter: blur(6px); }
html[data-buld-theme] .pgx-ia { width: 32px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: #E6E2EC; cursor: pointer; padding: 0; }
html[data-buld-theme] .pgx-ia + .pgx-ia { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .1); }
html[data-buld-theme] .pgx-ia:first-child { border-radius: 8px 0 0 8px; } html[data-buld-theme] .pgx-ia:last-child { border-radius: 0 8px 8px 0; }
html[data-buld-theme] .pgx-ia:hover { background: rgba(255, 255, 255, .12); color: #fff; }
html[data-buld-theme] .pgx-ia--dl:hover { color: var(--pgx-bad); }
html[data-buld-theme] .pgx-ia svg { width: 15px; height: 15px; }
html[data-buld-theme] .pgx-flags { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; display: flex; flex-wrap: wrap; gap: 5px; }
html[data-buld-theme] .pgx-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); white-space: nowrap; }
html[data-buld-theme] .pgx-flag svg { width: 12px; height: 12px; }
html[data-buld-theme] .pgx-flag[data-t="ok"] { color: color-mix(in srgb, var(--pgx-ok) 75%, #fff); }
html[data-buld-theme] .pgx-flag[data-t="bad"] { color: color-mix(in srgb, var(--pgx-bad) 70%, #fff); }

html[data-buld-theme] .pgx-bd { flex: 1; padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
html[data-buld-theme] .pgx-bd > .pgx-row--ft { margin-top: auto; }
html[data-buld-theme] .pgx-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-width: 0; }
html[data-buld-theme] .pgx-row--ft { align-items: center; }
html[data-buld-theme] .pgx-root .pgx-bd h3 { margin: 0 !important; font-size: 14px !important; font-weight: 650 !important; color: var(--buld-ink-1) !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-buld-theme] .pgx-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--buld-ink-3); min-width: 0; }
html[data-buld-theme] .pgx-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-buld-theme] .pgx-meta > span:last-child { flex: none; }
html[data-buld-theme] .pgx-vbars { display: grid; gap: 6px; }
html[data-buld-theme] .pgx-vb { display: grid; grid-template-columns: 72px 1fr 34px; gap: 8px; align-items: center; font-size: 12px; color: var(--buld-ink-2); }
html[data-buld-theme] .pgx-vb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-buld-theme] .pgx-vb .pgx-num { text-align: right; }
html[data-buld-theme] .pgx-bar { height: 6px; border-radius: 99px; background: var(--pgx-hair); overflow: hidden; }
html[data-buld-theme] .pgx-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pgx-ok); }
html[data-buld-theme] .pgx-bar i[data-t="warn"] { background: var(--pgx-warn); }
html[data-buld-theme] .pgx-bar i[data-t="bad"] { background: var(--pgx-bad); }
html[data-buld-theme] .pgx-fc { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 8px; color: var(--pgx-warn); background: color-mix(in srgb, var(--pgx-warn) 12%, transparent); cursor: help; }
html[data-buld-theme] .pgx-fc[data-t="bad"] { color: var(--pgx-bad); background: color-mix(in srgb, var(--pgx-bad) 12%, transparent); }
html[data-buld-theme] .pgx-fc svg { width: 13px; height: 13px; }
html[data-buld-theme] .pgx-kvs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--pgx-hair); border-radius: 10px; background: var(--pgx-sub); }
html[data-buld-theme] .pgx-kv { padding: 6px 8px; display: grid; gap: 1px; min-width: 0; cursor: help; }
html[data-buld-theme] .pgx-kv + .pgx-kv { box-shadow: inset 1px 0 0 var(--pgx-hair); }
html[data-buld-theme] .pgx-kv small { font-size: 10.5px; color: var(--buld-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-buld-theme] .pgx-kv b { font-size: 13px; font-variant-numeric: tabular-nums; }
html[data-buld-theme] .pgx-kv b[data-t="warn"], html[data-buld-theme] .pgx-net b[data-t="warn"] { color: var(--pgx-warn); }
html[data-buld-theme] .pgx-kv b[data-t="bad"], html[data-buld-theme] .pgx-net b[data-t="bad"] { color: var(--pgx-bad); }
html[data-buld-theme] .pgx-net b[data-t="ok"] { color: var(--pgx-ok); }
html[data-buld-theme] .pgx-net { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--buld-ink-3); cursor: help; }
html[data-buld-theme] .pgx-net span { display: inline-flex; align-items: center; gap: 5px; }
html[data-buld-theme] .pgx-net svg { width: 12px; height: 12px; opacity: .7; }
html[data-buld-theme] .pgx-net b { font-size: 13px; color: var(--buld-ink-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
html[data-buld-theme] .pgx-row--ft .pgx-dim { font-size: 12.5px; }

html[data-buld-theme] .pgx-tile--sk .pgx-img { background: var(--pgx-sub); }
html[data-buld-theme] .pgx-tile--sk .pgx-img::after { display: none; }
html[data-buld-theme] .pgx-tile--sk .pgx-bd i { display: block; height: 10px; border-radius: 6px; background: var(--pgx-hair); animation: pgx-pulse 1.2s ease-in-out infinite; }
html[data-buld-theme] .pgx-tile--sk .pgx-bd i:nth-child(2) { width: 70%; } html[data-buld-theme] .pgx-tile--sk .pgx-bd i:nth-child(3) { width: 45%; }
@keyframes pgx-pulse { 50% { opacity: .45; } }

html[data-buld-theme] .pgx-empty { display: grid; justify-items: center; gap: 6px; padding: 44px 16px; text-align: center; color: var(--buld-ink-3); border-radius: var(--pgx-r); background: var(--pgx-tile); border: 1px solid var(--pgx-hair); }
html[data-buld-theme] .pgx-empty > svg { width: 26px; height: 26px; color: var(--buld-ink-4); }
html[data-buld-theme] .pgx-empty b { color: var(--buld-ink-1); font-size: 14px; }
html[data-buld-theme] .pgx-empty span { max-width: 440px; }
html[data-buld-theme] .pgx-empty .bx-btn { margin-top: 8px; }
html[data-buld-theme] .pgx-foot { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; font-size: 11.5px; color: var(--buld-ink-4); }
html[data-buld-theme] .pgx-foot svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- floating: tooltip + menu */
html[data-buld-theme] .pgx-tipbox { position: fixed; z-index: 160; display: none; max-width: min(320px, calc(100vw - 16px)); padding: 7px 9px; border-radius: 8px; background: #0E0D10; color: #fff; font-size: 12px; line-height: 1.4; font-weight: 500; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); pointer-events: none; white-space: normal; }
html[data-buld-theme] .pgx-menu { position: fixed; z-index: 125; min-width: 250px; max-width: calc(100vw - 16px); padding: 5px; border-radius: 12px; background: var(--buld-elevated-2); border: 1px solid var(--pgx-line); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75); color: var(--buld-ink-1); }
html[data-buld-theme] .pgx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--buld-ink-1); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
html[data-buld-theme] .pgx-menu button:hover:not([disabled]), html[data-buld-theme] .pgx-menu button:focus-visible { background: var(--buld-hover); outline: 0; }
html[data-buld-theme] .pgx-menu button[disabled] { opacity: .5; cursor: not-allowed; }
html[data-buld-theme] .pgx-menu button span { display: grid; }
html[data-buld-theme] .pgx-menu small { font-size: 11px; color: var(--buld-ink-3); }
html[data-buld-theme] .pgx-menu svg { width: 15px; height: 15px; color: var(--buld-ink-3); flex: none; }

/* ---------------------------------------------------------------- sheet form (inside BuldUX.sheet) */
html[data-buld-theme] .pgx-sheet .pgx-form { color: var(--buld-ink-1); font-size: 13px; }
html[data-buld-theme] .pgx-sheet .pgx-form svg { width: 15px; height: 15px; flex: none; }
html[data-buld-theme] .pgx-fs { margin: 0 0 22px; }
html[data-buld-theme] .pgx-sheet .pgx-fs h4 { margin: 0 0 10px !important; font-size: 13px !important; font-weight: 650 !important; color: var(--buld-ink-1) !important; }
html[data-buld-theme] .pgx-fg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html[data-buld-theme] .pgx-f { display: grid; align-content: start; gap: 5px; font-size: 12px; font-weight: 600; color: var(--buld-ink-2); min-width: 0; }
html[data-buld-theme] .pgx-f--full { grid-column: 1 / -1; }
html[data-buld-theme] .pgx-f em { font-style: normal; color: var(--buld-ink-4); font-weight: 500; }
html[data-buld-theme] .pgx-sheet .pgx-inp { width: 100% !important; min-width: 0; height: auto !important; padding: 9px 10px !important; border: 1px solid var(--pgx-line) !important; border-radius: 10px !important; background: var(--pgx-sub) !important; color: var(--buld-ink-1) !important; font: inherit; font-weight: 400; box-shadow: none !important; outline: 0; }
html[data-buld-theme] .pgx-sheet textarea.pgx-inp { resize: vertical; min-height: 64px; }
html[data-buld-theme] .pgx-sheet .pgx-inp:focus { border-color: var(--buld-cta) !important; }
html[data-buld-theme] .pgx-sheet .pgx-inp.is-bad { border-color: var(--pgx-bad) !important; }
html[data-buld-theme] .pgx-sheet select.pgx-inp option { background: var(--buld-elevated-2); }
html[data-buld-theme] .pgx-hint { font-size: 11.5px; font-weight: 400; color: var(--buld-ink-4); }
html[data-buld-theme] .pgx-err { font-size: 11.5px; font-weight: 550; color: var(--pgx-bad); }
html[data-buld-theme] .pgx-err:empty { display: none; }
html[data-buld-theme] .pgx-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 9px 11px; border-radius: 10px; background: var(--buld-cta-soft); color: var(--buld-ink-2); font-size: 12.5px; }
html[data-buld-theme] .pgx-imgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
html[data-buld-theme] .pgx-slot { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px dashed var(--pgx-line); display: grid; place-items: center; background: transparent; color: var(--buld-ink-4); padding: 0; cursor: pointer; overflow: hidden; }
html[data-buld-theme] .pgx-slot:hover { border-color: var(--buld-cta); color: var(--buld-cta); }
html[data-buld-theme] .pgx-slot.has { border-style: solid; border-color: var(--pgx-hair); cursor: default; }
html[data-buld-theme] .pgx-slot.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html[data-buld-theme] .pgx-slot small { position: absolute; left: 6px; bottom: 5px; font-size: 10px; background: rgba(0, 0, 0, .55); color: #fff; padding: 1px 5px; border-radius: 5px; }
html[data-buld-theme] .pgx-slot__rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; padding: 0; }
html[data-buld-theme] .pgx-slot__rm svg { width: 12px !important; height: 12px !important; }
html[data-buld-theme] .pgx-mbox { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--pgx-sub); border: 1px solid var(--pgx-hair); }
html[data-buld-theme] .pgx-mbox div { display: grid; }
html[data-buld-theme] .pgx-mbox small { font-size: 11px; color: var(--buld-ink-3); }
html[data-buld-theme] .pgx-mbox b { font-variant-numeric: tabular-nums; }
html[data-buld-theme] .pgx-mbox b[data-t="ok"] { color: var(--pgx-ok); } html[data-buld-theme] .pgx-mbox b[data-t="warn"] { color: var(--pgx-warn); } html[data-buld-theme] .pgx-mbox b[data-t="bad"] { color: var(--pgx-bad); }
html[data-buld-theme] .pgx-vhead, html[data-buld-theme] .pgx-vrow { display: grid; grid-template-columns: minmax(0, 1fr) 100px 32px; gap: 8px; align-items: center; }
html[data-buld-theme] .pgx-vhead { font-size: 11px; color: var(--buld-ink-3); margin: 0 0 4px; }
html[data-buld-theme] .pgx-vrow { margin: 0 0 8px; }
html[data-buld-theme] .pgx-vfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
html[data-buld-theme] .pgx-inl { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--buld-ink-2); }
html[data-buld-theme] .pgx-sheet .pgx-inl .pgx-inp { width: 70px !important; }
html[data-buld-theme] .pgx-radios { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-buld-theme] .pgx-radios label { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--pgx-line); border-radius: 9px; cursor: pointer; font-weight: 550; color: var(--buld-ink-2); }
html[data-buld-theme] .pgx-radios label:has(input:checked) { border-color: var(--buld-cta); color: var(--buld-ink-1); background: var(--buld-cta-soft); }
html[data-buld-theme] .pgx-radios input { accent-color: var(--buld-cta); margin: 0; }
html[data-buld-theme] .pgx-sheet .pgx-ib { width: 32px; height: 36px; }
html[data-buld-theme] .pgx-rsum { display: flex; gap: 12px; align-items: center; margin: 0 0 16px; padding: 12px; border-radius: 12px; background: var(--pgx-sub); border: 1px solid var(--pgx-hair); }
html[data-buld-theme] .pgx-rsum > div:last-child { display: grid; } html[data-buld-theme] .pgx-rsum span { color: var(--buld-ink-3); font-size: 12px; }
html[data-buld-theme] .pgx-rthumb { --h: 220; width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(140deg, hsl(var(--h) 62% 64%), color-mix(in srgb, hsl(var(--h) 62% 64%) 35%, #111)); }
html[data-buld-theme] .pgx-rthumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- responsive + motion */
@media (max-width: 640px) {
    html[data-buld-theme] .pgx-head { align-items: stretch; }
    html[data-buld-theme] .pgx-acts { width: 100%; }
    html[data-buld-theme] .pgx-acts .bx-btn { flex: 1; justify-content: center; }
    html[data-buld-theme] .pgx-search { flex: 1 1 100%; }
    html[data-buld-theme] .pgx-fps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    html[data-buld-theme] .pgx-fps::-webkit-scrollbar { display: none; }
    html[data-buld-theme] .pgx-tools .pgx-sp { display: none; }
    html[data-buld-theme] .pgx-grid { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] .pgx-fg { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] .pgx-bulk { top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-buld-theme] .pgx-tile, html[data-buld-theme] .pgx-tile--sk .pgx-bd i { transition: none; animation: none; }
}

/* The assistant FAB (#agentFab, bottom-right) sits over the sheet footer's primary button: hide it
   while one of our sheets is open (collision list: display:none !important). */
html[data-buld-theme] body:has(.pgx-sheet) #agentFab { display: none !important; }
