/* PH 应用级布局；颜色和通用控件定义在 ui-components.css */
body{min-width:320px}
body.has-detail-panel{overflow:hidden}
.app-navbar{z-index:1030;background:var(--ph);border-bottom:1px solid var(--ph-dark);color:#fffefa}
.app-navbar-inner{min-height:68px;max-width:1920px;margin:0 auto;padding:0 34px;display:flex;align-items:center;gap:28px}
.app-brand{display:flex;align-items:center;gap:10px;color:#fffefa;text-decoration:none;font-size:14px;font-weight:650;white-space:nowrap}
.app-brand:hover{color:#fff}
.brand-mark{width:31px;height:31px;border-radius:50%;display:inline-grid;place-items:center;background:var(--ph-cream);color:var(--ph-dark);font-size:10px;font-weight:800}
.app-brand .brand-mark{flex:none;font-size:19px;font-weight:700;line-height:1;text-align:center}
@media(max-width:560px){.app-brand .brand-mark{font-size:17px}}
.app-navigation{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:14px}
.app-nav-links{height:68px;display:flex;align-items:center;gap:7px}
.app-nav-link{min-height:37px;padding:0 13px;border-radius:8px;display:flex;align-items:center;color:#e7f1e9;text-decoration:none;font-size:12px;white-space:nowrap;transition:background .15s ease,color .15s ease}
.app-nav-link:hover{background:#ffffff1a;color:white}
.app-nav-link.active{background:var(--ph-paper);color:var(--ph-ink);font-weight:700;box-shadow:0 3px 8px #18553e18}
.app-user{display:flex;align-items:center;gap:9px;white-space:nowrap;font-size:11px;color:#f1f6ef}
.app-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#e8f1e8;color:#287453;font-weight:700}
.app-user form{margin:0}
.app-logout{border:0;background:transparent;color:#f1f6ef;padding:5px 2px;font-size:11px}
.app-logout:hover{text-decoration:underline}
.app-nav-toggle{display:none}
.app-main{max-width:1920px;margin:0 auto;padding:26px 34px 16px;min-height:calc(100vh - 68px)}
.ph-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.ph-page-head h1{margin:0 0 5px;font-size:24px;line-height:1.2;font-weight:600;letter-spacing:-.35px}
.ph-page-head p{margin:0;color:var(--ph-muted);font-size:12px}
.page-actions{display:flex;align-items:center;gap:8px}
.page-updated{font-size:10px;color:#9aa39b;margin-right:4px}

/* 商品工作台 */
.products-toolbar{display:grid;grid-template-columns:auto minmax(400px,1fr);gap:24px;align-items:center;padding:14px 16px;margin-bottom:14px}
.new-competitor-button{justify-self:start;white-space:nowrap;min-height:36px}
.asin-submit-form{min-width:0}
.asin-submit-form .form-label{display:block}
.product-filters{min-width:0;display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,230px) 140px auto;gap:9px;align-items:center}
.filter-search,.profit-range{height:36px;display:flex;align-items:center;border:1px solid #e5e7dd;border-radius:var(--ph-radius-sm);background:#fff;overflow:hidden}
.filter-search:focus-within,.profit-range:focus-within{border-color:#83b79e;box-shadow:0 0 0 3px rgba(46,140,108,.13)}
.filter-search>span{padding-left:10px;color:#909c93;font-size:16px}
.asin-submit-form .form-control,.filter-search input,.profit-range input,.product-filters>.form-select{font-family:var(--ph-font);font-size:12px}
.filter-search input,.profit-range input{min-width:0;height:100%;border:0;outline:0;background:transparent;color:var(--ph-ink)}
.asin-submit-form .form-control::placeholder,.filter-search input::placeholder,.profit-range input::placeholder{color:#a3aaa3;opacity:1;font:inherit}
.filter-search input{width:100%;padding:6px 9px}
.profit-range>span{padding-left:9px;color:#66736b;white-space:nowrap;font-weight:600;font-size:10px}
.profit-range input{width:40%;padding:6px 5px;text-align:center}
.profit-range i{color:#a4ada5;font-style:normal}
.product-filters>.form-select{height:36px;min-height:36px}
.archive-toggle{height:36px;display:flex;align-items:center;justify-content:center;white-space:nowrap}
.product-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 9px}
.product-list-head h2{margin:0;font-size:14px;font-weight:650}
.product-list-head .small{font-size:10px}
.product-table-wrap{overflow:auto;background:var(--ph-paper);border:1px solid var(--ph-line);border-radius:var(--ph-radius-lg);box-shadow:var(--ph-shadow)}
.product-sticky-head{display:none;position:fixed;z-index:1025;overflow:hidden;background:var(--ph-paper);box-shadow:0 5px 12px rgba(34,54,43,.12)}
.product-sticky-head.is-visible{display:block}
.product-table-sticky-clone{margin:0!important}
.product-table-head-placeholder{visibility:hidden}
.product-table{width:max(100%,1430px);min-width:1240px;table-layout:fixed;font-size:13px}
.product-table>:not(caption)>*>*{padding:11px 10px}
.product-table thead th{height:46px;position:relative;overflow:visible!important;text-align:center;vertical-align:middle;font-size:12px;font-weight:750;color:#52645a;border-right:1px solid var(--ph-line)}
.product-table thead th:last-child{border-right:0}
.product-table thead th+th::before{content:"";position:absolute;left:0;top:22%;bottom:22%;border-left:1px solid #dfe3d8;pointer-events:none}
.column-heading{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px}
.product-column-resizer{position:absolute;z-index:3;top:0;right:-4px;width:9px;height:100%;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none;outline:none}
.product-column-resizer::after{content:"";position:absolute;top:24%;bottom:24%;left:4px;width:1px;border-radius:1px;background:#bdc8bf;transition:background .12s ease,width .12s ease}
.product-column-resizer:hover::after,.product-column-resizer:focus-visible::after,.product-column-resizer.is-resizing::after{left:3px;width:3px;background:var(--ph)}
.product-table tbody td{text-align:center;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-table tbody td:first-child{text-align:left}
.product-table tbody td:first-child>.d-flex{width:100%;min-width:0;justify-content:flex-start}
.product-table tbody td:first-child .min-w-0{flex:1 1 0%;min-width:0;overflow:hidden;text-align:left}
.product-table tbody td>small,.product-table tbody td>.text-nowrap{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-table .product-title,.product-table .category-cell{width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-dates{min-width:0}
.product-dates>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.45}
.product-dates .date-label{margin-right:5px;color:#89948c;font-size:10px}
.product-table tbody td>.source-market{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0}
.source-platform-tag{display:inline-flex;align-items:center;justify-content:center;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:650;line-height:1.5;text-decoration:none;white-space:nowrap}
.source-platform-1688{background:#fff0d6;color:#96631e}
.source-platform-pinduoduo{background:#e7f3eb;color:#2d8063}
.source-offer-id{display:inline-block;max-width:100%;overflow:hidden;color:#66736b;font-size:11px;text-decoration:underline;text-underline-offset:2px;text-overflow:ellipsis;white-space:nowrap}
.product-identifiers{display:flex;align-items:center;gap:6px;max-width:100%;min-width:0;overflow:hidden;white-space:nowrap}
.product-identifiers code,.product-identifiers .family-id{display:block;min-width:0;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-identifiers code{flex:0 1 auto}
.product-identifiers .family-id{flex:1 1 auto}
.product-table.is-product-column-compact tbody td:first-child .thumb{display:none}
.product-table .status{display:inline-block;min-width:0;min-height:24px;max-width:100%;padding:5px 10px;border-radius:999px;font-size:10px;font-weight:650;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;vertical-align:middle}
.product-table .status-product-listed{background:var(--ph-success-soft);color:var(--ph-success)}
.product-table .status-product-unlisted{background:transparent;color:#718078}
.product-table .product-action-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-table .product-action-cell form{display:inline-block;max-width:100%;overflow:hidden;vertical-align:middle}
.product-table .product-action-cell .btn{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.is-resizing-product-column,.is-resizing-product-column *{cursor:col-resize!important;user-select:none!important}
.product-row{cursor:pointer;transition:background .12s ease}
.product-row.is-archived{opacity:.58}
.product-row:hover>*{background:#faf8ef!important}
.product-row.is-selected>*{background:#f0f6ef!important}
.product-row.is-selected td:first-child{box-shadow:inset 3px 0 var(--ph)}
.product-row[aria-busy="true"]{opacity:.65}
.product-title{max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;font-weight:650;color:#35443c}
.category-cell{max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spec-cell{min-width:0;white-space:nowrap}
.family-id{color:#9aa39b;font-size:9px;white-space:nowrap}
.thumb{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;background:#f5f3e8;border:1px solid #eeecdf;border-radius:9px;overflow:hidden;color:#a99250;font-size:12px}
.thumb img{width:100%;height:100%;object-fit:contain}
.profit-cell{white-space:nowrap;font-weight:650;color:var(--ph-dark)}
.profit-cell small,.product-table td small{display:block;margin-top:4px;color:#9aa39b;font-size:11px;font-weight:400}
.product-table td.profit-cell .profit-kind{display:inline;margin:0 4px 0 0;vertical-align:baseline}
.product-action-cell{white-space:nowrap}
.product-row[hidden],#product-filter-empty[hidden]{display:none!important}

/* 详情抽屉覆盖页面，不压缩商品表格宽度 */
.product-detail-template{display:none!important}
.product-detail-overlay{position:fixed;inset:0;z-index:1040;visibility:hidden;pointer-events:none}
.product-detail-overlay.is-open{visibility:visible;pointer-events:auto}
.product-detail-scrim{position:absolute;inset:0;border:0;background:rgba(35,51,43,.42);opacity:0;transition:opacity .18s ease}
.product-detail-overlay.is-open .product-detail-scrim{opacity:1}
.product-detail-panel{position:absolute;top:0;right:0;bottom:0;width:min(620px,94vw);background:var(--ph-paper);box-shadow:-14px 0 40px rgba(32,49,38,.2);transform:translateX(102%);transition:transform .2s ease;overflow-y:auto}
.product-detail-overlay.is-open .product-detail-panel{transform:translateX(0)}
.product-detail-panel-head{height:58px;position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--ph-line);background:var(--ph-paper);color:#7d8980;font-size:11px}
.product-detail-close{width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:#7d8980;font-size:21px;line-height:1}
.product-detail-close:hover{background:#f0f1e9;color:var(--ph-ink)}
.product-detail-content{padding:0 22px 26px}
.inspector{background:transparent;border:0;border-radius:0;padding:0;color:var(--ph-ink)}
.inspector>div:first-child{min-height:66px;padding:12px 0!important;border-color:var(--ph-line)!important}
.inspector>div:first-child strong{font-size:12px;color:#35443c}
.inspector .compact-tabs{gap:3px;border-bottom:1px solid var(--ph-line);flex-wrap:nowrap;overflow:auto}
.inspector .compact-tabs .nav-link{border-radius:0;border-bottom:2px solid transparent;color:#89948c;font-size:10px;font-weight:550;padding:12px 10px;background:transparent;white-space:nowrap}
.inspector .compact-tabs .nav-link.active{border-bottom-color:var(--ph);color:var(--ph-dark);font-weight:700}
.inspector .p-2{padding:14px 0!important}
.inspector .form-label{font-size:10px}
.cost-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.field-box{height:100%;background:#fff;border:1px solid #e9e9df;border-radius:var(--ph-radius);padding:9px 10px}
.field-box .form-label{margin:0;font-size:10px;line-height:1.4;color:#7d8980!important}
.field-box .form-control,.field-box .form-select{min-height:34px;margin-top:5px}
.field-label{font-size:10px;line-height:1.3}
.lock-form{display:inline}
.lock-button{width:22px;height:22px;border:0;border-radius:50%;background:#f7f3e7;color:#a28c48;padding:0;font-size:11px;line-height:1}
.lock-button:hover{background:#eee6ca}
.lock-button.is-locked{background:#e8f3e9;color:var(--ph-dark)}
.calc-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px!important}
.calc-strip>div,.calc-strip:not(.row)>*{min-width:0;padding:10px 11px;border:1px solid var(--ph-line);border-radius:var(--ph-radius);background:#fcfbf6}
.calc-strip small{display:block;color:#818d85;font-size:9px;font-weight:600;white-space:normal}
.calc-strip strong{display:block;margin-top:4px;color:#35443c;font-size:11px;white-space:normal}
.cost-formula-help{position:relative;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-left:2px;border:1px solid currentColor;border-radius:50%;font-size:10px;font-weight:700;line-height:1;cursor:help;vertical-align:middle}
.cost-formula-help::after{content:attr(data-formula);position:absolute;top:calc(100% + 5px);left:0;z-index:20;width:max-content;max-width:min(270px,70vw);padding:7px 9px;border-radius:6px;background:#35443c;color:#fff;box-shadow:0 4px 14px #0003;font-size:11px;font-weight:400;line-height:1.5;text-align:left;white-space:pre-line;visibility:hidden;pointer-events:none}
.cost-formula-help--right::after{left:auto;right:0}
.cost-formula-help:hover::after,.cost-formula-help:focus-visible::after{visibility:visible}
.cost-formula-help:focus-visible{outline:2px solid var(--ph);outline-offset:2px}
.calc-strip>div:last-child strong,.calc-strip:not(.row)>*:last-child strong{color:var(--ph-dark)}
.inspector .row{--bs-gutter-x:12px;--bs-gutter-y:12px}
.inspector .row.g-2{--bs-gutter-x:10px;--bs-gutter-y:10px}
.inspector .form-check{font-size:10px;color:#67736b}
.inspector .tab-content{padding-top:13px}
.inspector .tab-pane>form{margin-bottom:12px}
.inspector .tab-pane>p{color:#849087;font-size:10px}
.field-box .form-control,.field-box .form-select{font-size:11px}
.listing-detail{border:1px solid var(--ph-line);border-radius:var(--ph-radius);background:#fcfbf6;padding:12px;margin-top:12px;font-size:11px}
.listing-image-grid{display:flex;flex-wrap:wrap;gap:8px}
.listing-image-card{width:100px;border:1px solid var(--ph-line);border-radius:var(--ph-radius);background:#fff;padding:5px;text-align:center}
.listing-image-card img{display:block;width:100%;height:82px;object-fit:contain}
.listing-image-card a{display:block;font-size:9px;margin-top:4px}
.image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.image-grid img{width:100%;aspect-ratio:1;object-fit:contain;background:#fff;border:1px solid var(--ph-line);border-radius:var(--ph-radius)}
.calc-strip .col{min-width:0}
.inspector .alert{margin-top:10px}
.inspector [data-calc-note]{margin-top:10px!important}

/* 状态与页面细节 */
.metric{height:100%;padding:15px 16px;background:var(--ph-paper);border:1px solid var(--ph-line);border-radius:var(--ph-radius-lg);box-shadow:var(--ph-shadow)}
.metric small{display:block;color:#818d85;font-size:11px;font-weight:600;margin-bottom:7px}
.metric strong{font-size:20px;line-height:1.2;font-weight:650;color:var(--ph-ink)}
.log-json{max-width:620px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;margin:0;color:#66736b}
.dbadmin{background:transparent;min-height:calc(100vh - 130px);color:var(--ph-ink)}
.worker-detail{margin-top:18px;padding:18px 20px}
.worker-detail-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ph-line);padding-bottom:12px;margin-bottom:4px}
.worker-detail-title h2{font-size:14px;font-weight:650;margin:0}
.worker-definition{display:grid;grid-template-columns:minmax(120px,180px) 1fr;margin:0}
.worker-definition dt,.worker-definition dd{padding:11px 8px;margin:0;border-bottom:1px solid #f0f0e9;font-size:11px}
.worker-definition dt{color:#7d8980;font-weight:550}.worker-definition dd{color:#34443b}
.jobs-table{min-width:1050px}.jobs-table .job-target{font-family:ui-monospace,Consolas,monospace;color:#435249}.jobs-table .job-error{max-width:320px;min-width:200px;color:var(--ph-danger);font-size:10px;white-space:normal;overflow-wrap:anywhere}
.logs-table{min-width:1000px}.logs-table .log-json{max-width:620px;min-width:300px;max-height:110px;overflow:auto;border-radius:6px;background:#faf9f3;padding:8px}
.login-body{min-height:100vh;display:grid;place-items:center;background:var(--ph-cream);padding:20px}
.login-panel{width:min(390px,100%);background:var(--ph-paper);border:1px solid var(--ph-line);border-radius:16px;padding:30px;box-shadow:0 18px 50px rgba(33,53,46,.1)}
.login-panel h1{font-size:21px;font-weight:650;color:var(--ph-ink)}
.login-caption{font-size:11px;color:var(--ph-muted)}
.login-panel .brand-mark{width:42px;height:42px;margin:0 0 18px;border-radius:50%;background:var(--ph);color:white}

@media(max-width:1200px){.products-toolbar{grid-template-columns:1fr}.product-filters{grid-template-columns:minmax(220px,1fr) minmax(200px,240px) 150px}.app-main{padding-left:22px;padding-right:22px}}
@media(max-width:900px){.app-navbar-inner{min-height:62px;padding:0 16px;gap:12px;flex-wrap:wrap}.app-nav-toggle{margin-left:auto;width:36px;height:34px;border:1px solid #ffffff60;border-radius:7px;background:transparent;display:grid;place-content:center;gap:4px}.app-nav-toggle span{display:block;width:16px;height:2px;border-radius:2px;background:#fff}.app-navigation{display:none;flex-basis:100%;width:100%;padding:0 0 12px;align-items:flex-start;flex-direction:column;gap:10px}.app-navigation.is-open{display:flex}.app-nav-links{width:100%;height:auto;overflow:auto;gap:4px}.app-nav-link{min-height:36px;padding:0 10px}.app-user{align-self:flex-end}.app-main{padding:20px 15px 30px;min-height:calc(100vh - 62px)}.products-toolbar{padding:12px}.product-filters{grid-template-columns:1fr 1fr}.product-filters>.form-select{grid-column:1/-1}.ph-page-head h1{font-size:21px}}
@media(max-width:560px){.app-brand{font-size:12px}.app-brand .brand-mark{width:28px;height:28px}.app-nav-links{flex-wrap:wrap}.app-nav-link{font-size:10px}.page-actions{flex-wrap:wrap}.page-updated{display:none}.products-toolbar{gap:11px}.product-filters{grid-template-columns:1fr}.product-filters>.form-select{grid-column:auto}.cost-fields-grid,.calc-strip{grid-template-columns:1fr}.product-detail-content{padding:0 14px 20px}.product-detail-panel-head{padding:0 14px}.inspector .compact-tabs .nav-link{padding-left:8px;padding-right:8px}.metric{padding:12px}.metric strong{font-size:17px}.dbadmin{overflow-x:hidden}}

/* 宽屏详情抽屉：用更多横向空间压缩成本表单和利润概览的纵向高度 */
@media(min-width:901px){
  .product-detail-panel{width:min(1120px,calc(100vw - 64px))}
  .product-detail-panel-head{padding-right:30px;padding-left:30px}
  .product-detail-content{padding:0 30px 30px}
  .cost-fields-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .calc-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .inspector .p-2{padding-top:10px!important}
  .inspector .tab-content{padding-top:10px}
}
@media(min-width:1200px){
  .cost-fields-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(min-width:561px) and (max-width:900px){
  .product-detail-panel{width:100vw}
  .product-detail-content{padding:0 18px 24px}
  .cost-fields-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
  .calc-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .field-box{padding:8px}
  .field-box .form-control,.field-box .form-select{min-height:32px;font-size:10px}
}
@media(max-width:900px){
  .product-detail-panel{width:min(760px,100vw)}
}

/* 详情弹窗文字整体轻微放大，保持字段和指标布局不变 */
.product-detail-panel-head{font-size:12px}
.product-detail-panel-head .product-detail-close{font-size:22px}
.inspector>div:first-child strong{font-size:13px}
.inspector>div:first-child .text-secondary{font-size:13px}
.inspector .family-id{font-size:13px}
.inspector-identity{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.inspector-identity .own-asin{font-size:13px;font-weight:700;white-space:nowrap}
.identity-edit{position:relative;display:inline-block}
.identity-edit summary{list-style:none;cursor:pointer;border-radius:3px;padding:2px 4px}
.identity-edit summary::-webkit-details-marker{display:none}
.identity-edit summary:hover,.identity-edit[open] summary{background:#edf5ef}
.identity-edit form{position:absolute;left:0;top:100%;z-index:5;display:flex;gap:5px;align-items:center;width:max-content;max-width:calc(100vw - 40px);padding:6px;background:var(--ph-paper);border:1px solid var(--ph-line);border-radius:5px;box-shadow:0 4px 12px #0002}
.identity-edit form .form-control{width:190px;max-width:calc(100vw - 130px)}
.inspector .compact-tabs .nav-link{font-size:11px}
.inspector .form-label,.field-box .form-label,.field-label{font-size:11px}
.field-box .form-control,.field-box .form-select{font-size:12px}
.inspector .btn{font-size:13px}
.inspector .form-check{font-size:11px}
.inspector .status{font-size:11px}
.calc-strip small{font-size:10px}
.calc-strip strong{font-size:12px}
.shipping-fee-editor{display:flex;align-items:center;gap:3px;margin-top:4px;font-size:12px;font-weight:600}
.shipping-fee-editor .form-control{width:100px;max-width:100%;min-height:28px;padding:3px 6px;font-size:12px}
.shipping-fee-editor .form-control[readonly]{background:#f0f1ec;color:#657168;cursor:default}
.inspector .tab-pane>p,.inspector .alert{font-size:11px}
.listing-detail{font-size:12px}
.listing-image-card a{font-size:10px}

@media(max-width:1200px){.product-filters{grid-template-columns:minmax(220px,1fr) minmax(180px,230px) 140px auto}}
@media(max-width:900px){.product-filters{grid-template-columns:1fr 1fr}.product-filters>.form-select{grid-column:auto}}
@media(max-width:560px){.product-filters{grid-template-columns:1fr}}

/* 商品表缩略图只在点击后加载原图，浮层沿用选品工具的深色遮罩样式。 */
.product-image-trigger{display:block;border:0;padding:0;background:transparent;cursor:zoom-in;border-radius:inherit}
.product-image-trigger:focus-visible{outline:2px solid var(--ph-accent,#278c6c);outline-offset:-2px}
body.has-image-lightbox{overflow:hidden}
@media(min-width:901px){.cost-results-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.product-image-lightbox{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:40px;background:transparent;overflow:hidden;cursor:zoom-out}
.product-image-lightbox[open]{display:flex;align-items:center;justify-content:center}
.product-image-lightbox::backdrop{background:rgba(15,23,42,.72)}
.product-image-lightbox-image{max-width:min(92vw,1200px);max-height:88dvh;object-fit:contain;background:#fff;border-radius:8px;box-shadow:0 18px 60px rgba(0,0,0,.35);cursor:default}
.product-image-lightbox-image[hidden],.product-image-lightbox-status[hidden]{display:none}
.product-image-lightbox-close{position:absolute;top:18px;right:24px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:#fff;color:#334155;font-size:30px;line-height:1;cursor:pointer;z-index:1}
.product-image-lightbox-close:focus-visible{outline:3px solid #80d5b7;outline-offset:3px}
.product-image-lightbox-status{padding:12px 18px;border-radius:8px;background:#fff;color:#334155;cursor:default}
@media(max-width:560px){.product-image-lightbox{padding:16px}.product-image-lightbox-close{top:12px;right:12px}.product-image-lightbox-image{max-width:calc(100vw - 32px);max-height:calc(100dvh - 112px)}}
.inspector { position: relative; }
.product-save-notice { position: absolute; top: 0; right: 12px; z-index: 20; max-width: min(580px, 90%); max-height: 180px; overflow: auto; padding: 10px 36px 10px 12px; border: 1px solid #b5d9c8; border-radius: 8px; background: #eefaf3; color: #225d43; box-shadow: 0 3px 12px #0002; }
.product-save-notice.is-error { background: #fff0f0; color: #9a2525; border-color: #e4b4b4; }
.product-save-notice button { position: absolute; right: 8px; top: 4px; border: 0; background: none; font-size: 24px; color: inherit; }

/* 页面末尾统一留白，避免分页下边距与主容器内边距叠加。 */
.app-main .pa-pager{margin-bottom:0}
@media(max-width:900px){.app-main{padding-bottom:16px}}
