@media (min-width: 761px) {
  #products-table .product-code-column { display: none !important; }
}
/* Product editor field groups on desktop; keep phone layout single-column. */
@media(min-width:761px){
 #editor-form[data-type="products"] #editor-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px 16px!important}
 #editor-form[data-type="products"] #editor-fields>label.field:has(input[name="name"]),#editor-form[data-type="products"] #editor-fields>label.field:has(select[name="category_id"]){grid-column:auto!important}
 #editor-form[data-type="products"] .product-source-row{display:grid!important;grid-template-columns:minmax(110px,.65fr) minmax(0,1fr) minmax(0,1.25fr)!important;grid-column:1/-1!important;gap:16px!important;align-items:start!important}
 #editor-form[data-type="products"] .product-source-row>label{min-width:0!important}
 #editor-form[data-type="products"] .color-row{min-height:66px!important;align-items:stretch!important}
 #editor-form[data-type="products"] .color-row>.color-name,#editor-form[data-type="products"] .color-row>.color-quantity,#editor-form[data-type="products"] .color-row>.color-remove{height:66px!important;min-height:66px!important}
 #editor-form[data-type="products"] .color-row>.variant-image-field{height:66px!important;min-height:66px!important}
}

/* Product code is one compact, high-contrast label in the product summary. */
#products-table .admin-product-copy .product-sku-summary{display:inline-flex!important;align-items:center!important;gap:7px!important;width:max-content!important;max-width:100%!important;margin-top:6px!important;padding:4px 8px!important;border-radius:2px!important;background:#e4e0d3!important;color:#1a251c!important;font-weight:700!important;line-height:1.2!important}
#products-table .admin-product-copy .product-sku-summary span{margin:0!important;color:#5d665e!important;font-weight:700!important}
#products-table .admin-product-copy .product-sku-summary .product-code-value{display:inline!important;margin:0!important;color:#176c5d!important;font-size:1.05em!important;font-weight:900!important}
#editor-form[data-type="products"] .color-editor>.field:has(input[name="mixed_color_min_qty"]){display:block!important;max-width:320px!important;margin:12px 0 16px!important}
#editor-form[data-type="products"].mix-product-editor .color-editor>.field:has(input[name="mixed_color_min_qty"]){display:none!important}
@media(max-width:760px){#editor-form[data-type="products"] .product-source-row{grid-template-columns:minmax(0,1fr)!important}#editor-form[data-type="products"] .color-editor>.field:has(input[name="mixed_color_min_qty"]){max-width:100%!important}}
/* Product editor title category and aligned source fields. */
#editor-form[data-type="products"]>header{display:flex!important;align-items:center!important;gap:18px!important}
#editor-form[data-type="products"]>header .editor-category-header{width:230px!important;min-width:0!important;margin-left:auto!important;margin-right:24px!important;font-size:13px!important}
#editor-form[data-type="products"]>header .editor-category-header select{width:100%!important;margin:4px 0 0!important}
#editor-form[data-type="products"] #editor-fields>label.field:has(input[name="name"]){width:100%!important}
#editor-form[data-type="products"] .product-code-hint{display:inline!important;margin-left:4px!important;color:var(--muted)!important;font-size:11px!important;font-weight:400!important}
#editor-form[data-type="products"] .product-source-row>label>input,#editor-form[data-type="products"] .product-source-row>label>textarea{box-sizing:border-box!important;width:100%!important;height:52px!important;margin-top:8px!important;min-height:52px!important}
#editor-form[data-type="products"] .color-editor-footer{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:16px!important;margin-top:14px!important}
#editor-form[data-type="products"] .color-editor-footer>strong{flex:1 1 auto!important}
#editor-form[data-type="products"] .color-editor-footer>.field:has(input[name="mixed_color_min_qty"]){flex:0 0 220px!important;width:220px!important;max-width:220px!important;margin:0!important}
@media(min-width:761px){#editor-form[data-type="products"] .product-source-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr)!important}}
@media(max-width:760px){#editor-form[data-type="products"]>header{flex-wrap:wrap!important}#editor-form[data-type="products"]>header .editor-category-header{order:3!important;flex:1 1 100%!important;width:100%!important;margin:0!important}#editor-form[data-type="products"] .color-editor-footer{flex-wrap:wrap!important}#editor-form[data-type="products"] .color-editor-footer>.field:has(input[name="mixed_color_min_qty"]){flex:1 1 100%!important;width:100%!important;max-width:100%!important}}
/* Subsequent editor and dashboard refinements. */
#editor-form[data-type="products"] .product-source-row textarea[name="manufacturer_info"]{font-size:14px!important;font-weight:400!important;line-height:1.3!important}
#editor-form[data-type="products"] .product-source-row textarea[name="manufacturer_info"]::placeholder{color:var(--muted)!important;font-size:13px!important;font-weight:400!important;opacity:.8!important}
#editor-form[data-type="products"] .color-editor-footer{align-items:center!important;margin-top:10px!important;min-height:44px!important}
#editor-form[data-type="products"] .color-editor-footer>.field:has(input[name="mixed_color_min_qty"]){display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex:0 0 300px!important;width:300px!important;max-width:300px!important;min-height:44px!important;font-size:12px!important;white-space:nowrap!important}
#editor-form[data-type="products"] .color-editor-footer>.field:has(input[name="mixed_color_min_qty"]) input{box-sizing:border-box!important;flex:0 0 92px!important;width:92px!important;height:40px!important;margin:0!important;padding:6px 10px!important}
#editor-form[data-type="products"].mix-product-editor .color-editor{display:none!important}
@media(min-width:761px){.velocity-panel #velocity-body{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}.velocity-panel .velocity-table-scroll{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}.velocity-panel .velocity-orders-table{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;table-layout:auto!important}.velocity-panel .velocity-orders-table th,.velocity-panel .velocity-orders-table td{width:auto!important;white-space:normal!important;overflow-wrap:anywhere!important}}
/* Balanced product-list columns; the three tier-price columns are identical. */
@media(min-width:761px){
 #products-table>table{box-sizing:border-box!important;width:1200px!important;min-width:1200px!important;max-width:none!important;table-layout:fixed!important}
 #products-table>table>thead th,#products-table>table>tbody tr.expandable-product>td{box-sizing:border-box!important;min-width:0!important;overflow-wrap:anywhere!important}
 #products-table>table tr>*:nth-child(1){width:48px!important}
 #products-table>table tr>*:nth-child(2){width:280px!important}
 #products-table>table tr>*:nth-child(3){width:100px!important}
 #products-table>table tr>*:nth-child(5),#products-table>table tr>*:nth-child(6),#products-table>table tr>*:nth-child(7){width:130px!important}
 #products-table>table tr>*:nth-child(8){width:65px!important}
 #products-table>table tr>*:nth-child(9){width:85px!important}
 #products-table>table tr>*:nth-child(10){width:75px!important}
 #products-table>table tr>*:nth-child(11){width:152px!important}
 #products-table .admin-product-cell{min-width:0!important;max-width:100%!important}
 #products-table>table tr.expandable-product>td:nth-child(5){white-space:normal!important}
}
#products-table .product-sku-summary .product-code-value{display:inline!important;margin-left:4px!important;color:#2f7667!important;font-weight:900!important;font-size:1.05em!important}
.orders-panel tbody td.order-color{white-space:nowrap!important;overflow-x:auto!important;scrollbar-width:thin!important}
.orders-panel .order-color-item{display:inline-block!important;white-space:nowrap!important;margin-right:12px!important}
.orders-panel .order-product-name{position:relative!important;padding-right:52px!important;white-space:normal!important}
.orders-panel .order-product-copy{display:block!important;min-width:0!important}
.orders-panel .order-product-copy b{display:block!important;font-size:15px!important;line-height:1.25!important}
.orders-panel .order-product-copy small{display:block!important;margin-top:3px!important;color:var(--muted)!important;font-size:11px!important;line-height:1.25!important}
.orders-panel .order-product-thumb{position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-50%)!important;box-sizing:border-box!important;width:36px!important;height:36px!important;object-fit:cover!important;border:1px solid var(--line)!important;background:#f0ede4!important}
.orders-panel .order-product-thumb-empty{display:grid!important;place-items:center!important;color:var(--muted)!important;font-size:7px!important;text-align:center!important}
@media(min-width:761px){.orders-panel table{width:max-content!important;min-width:1600px!important}.orders-panel thead th{box-sizing:border-box!important;height:48px!important;min-height:48px!important;padding:10px 12px!important;white-space:nowrap!important;line-height:1.2!important;vertical-align:middle!important}}
.orders-panel thead th.order-product-heading{position:relative!important;padding-right:80px!important}
.orders-panel thead th.order-product-heading>span:last-child{position:absolute!important;right:18px!important;top:50%!important;transform:translateY(-50%)!important;color:var(--muted)!important;font-size:11px!important;font-weight:600!important}
.orders-panel .order-product-name{padding-right:76px!important}
.orders-panel .order-product-copy b{font-size:13px!important;font-weight:700!important}
.orders-panel .order-product-thumb{width:56px!important;height:56px!important;font-size:9px!important}
@media(max-width:760px){.orders-panel .order-product-name{padding-right:54px!important}.orders-panel .order-product-thumb{width:40px!important;height:40px!important;font-size:8px!important}}
.expandable-product td:nth-child(3) b,.expandable-product td:nth-child(3) .sku-letter-accent,.expandable-product td:nth-child(3) .sku-number-accent{color:#2f7667!important;font-weight:900!important}

/* Phone editor: keep every control inside the dialog and use one readable column. */
@media(max-width:760px){
 #editor{box-sizing:border-box!important;width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;margin:auto!important;overflow:hidden!important}
 #editor>form{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
 #editor form>header,#editor footer{box-sizing:border-box!important;width:100%!important;padding-left:18px!important;padding-right:18px!important}
 #editor #editor-fields{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:18px!important;gap:0!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important}
 #editor #editor-fields>*:not(input[type="hidden"]),#editor .field,#editor .structured-block,#editor .color-editor,#editor .media-uploader,#editor .product-source-row{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-column:1!important}
 #editor .product-source-row,#editor .tier-editor,#editor .dimension-editor,#editor .mix-carton-editor>div{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 #editor label,#editor input:not([type="hidden"]),#editor select,#editor textarea{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
 #editor input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),#editor select,#editor textarea{width:100%!important}
 #editor .structured-block,#editor .color-editor,#editor .media-uploader{padding:14px!important}
 #editor .color-editor-head{align-items:flex-start!important;gap:10px!important;flex-wrap:wrap!important}
 #editor .color-row{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr) 76px 38px!important;width:100%!important;min-width:0!important;gap:8px!important}
 #editor .color-row>.variant-image-field{grid-column:1/-1!important;width:100%!important;min-width:0!important}
 #editor .color-row>.color-remove{grid-column:3!important;grid-row:1!important}
 #editor footer{position:relative!important;inset:auto!important;flex-wrap:wrap!important;background:#fff!important}
 #editor footer button{flex:1 1 100px!important;min-width:0!important}
}

/* Prevent the pre-enhancement product table from flashing on phones. */
@media(max-width:760px){
 #products-table:has(>table[data-admin-products-ready="0"]){position:relative!important;min-height:240px!important}
 #products-table>table[data-admin-products-ready="0"]{visibility:hidden!important;pointer-events:none!important}
 #products-table:has(>table[data-admin-products-ready="0"])::after{content:'加载中…';position:absolute;inset:84px 0 auto;text-align:center;color:var(--muted);font-size:13px;letter-spacing:.06em}
}

/* The primary color-image uploader is the single image action in product editors. */
#editor-form .mix-editor-color-image{display:none!important}

@media(min-width:761px){
 #products-table tr.variant-detail .variant-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(240px,280px))!important;justify-content:start!important;gap:10px!important;width:100%!important;overflow:visible!important}
 #products-table tr.variant-detail .variant-grid>article{box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:280px!important;flex:none!important}
 #products-table tr.variant-detail .variant-detail-copy>i:nth-of-type(2){text-align:right!important;line-height:1.5!important;white-space:nowrap!important}
}

/* Final mobile navigation and complete style-code accent. */
@media(max-width:760px){main>header{padding-left:56px!important}#admin-menu-toggle{position:fixed!important;left:14px!important;top:12px!important;z-index:10020!important;width:44px!important;height:44px!important;margin:0!important;background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 4px 14px #1720181a!important}}
.orders-panel .order-style-code b,.orders-panel .order-style-code .sku-letter-accent,.orders-panel .order-style-code .sku-number-accent{color:#2f7667!important;font-weight:900!important}

/* Dashboard pager stays on one compact line at phone width. */
@media(max-width:760px){
 .velocity-panel .admin-table-pagination{box-sizing:border-box!important;display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:center!important;width:100%!important;gap:4px!important;padding:10px 0!important;overflow:hidden!important;font-size:9px!important;white-space:nowrap!important}
 .velocity-panel .admin-table-pagination label{flex:0 0 auto!important;gap:3px!important}
 .velocity-panel .admin-table-pagination select{box-sizing:border-box!important;width:82px!important;height:34px!important;padding:3px 18px 3px 5px!important;font-size:10px!important}
 .velocity-panel .admin-table-pagination .pagination-summary{flex:1 1 auto!important;min-width:0!important;font-size:9px!important;text-align:center!important}
 .velocity-panel .admin-table-pagination button{flex:0 0 28px!important;width:28px!important;height:32px!important;padding:0!important;font-size:14px!important}
}

/* Keep the mobile navigation trigger reachable while long admin pages scroll. */
@media(max-width:760px){
 main>header{padding-left:56px!important}
 #admin-menu-toggle{position:fixed!important;left:14px!important;top:12px!important;z-index:10020!important;width:44px!important;height:44px!important;margin:0!important;background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 4px 14px #1720181a!important}
}
.orders-panel .order-style-code b,.orders-panel .order-style-code .sku-letter-accent,.orders-panel .order-style-code .sku-number-accent{color:#2f7667!important;font-weight:900!important}

/* Product name uses a compact, read-only English preview; category fills column two. */
#editor-form[data-type="products"] .product-name-english-field{display:none!important}
#editor-form[data-type="products"] .field>input[name="name"]{margin-bottom:0!important}
#editor-form[data-type="products"] .product-name-english-preview{display:block;margin-top:2px;padding-bottom:16px;color:var(--muted);font-size:12px;font-weight:500;line-height:1.35}
#editor-form[data-type="products"] .product-source-row>label{font-size:16px!important;font-weight:600!important}
#editor-form[data-type="products"] .product-code-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem!important;align-items:start!important;margin:0 0 18px!important}
#editor-form[data-type="products"] .product-code-row>.field{min-width:0!important;margin:0!important}
#editor-form[data-type="products"] .product-code-row input{margin-bottom:0!important}
@media(max-width:760px){#editor-form[data-type="products"] .product-code-row{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}}

/* Keep every editor section in normal flow, even with older responsive rules. */
#editor-form[data-type="products"] .product-source-row,#editor-form[data-type="products"] .product-code-row,#editor-form[data-type="products"] .color-editor,#editor-form[data-type="products"] .structured-block{position:relative!important;inset:auto!important;float:none!important;clear:both!important;box-sizing:border-box!important;height:auto!important;min-height:0!important;transform:none!important}
#editor-form[data-type="products"] .product-code-row{z-index:2!important;margin-bottom:20px!important}
#editor-form[data-type="products"] .color-editor{z-index:1!important;margin-top:0!important;overflow:visible!important}
#editor-form[data-type="products"] #color-rows{position:relative!important;display:grid!important;height:auto!important;min-height:0!important}
#editor-form[data-type="products"] .color-row{position:relative!important;inset:auto!important;transform:none!important}

.orders-panel .order-product-name>b{display:block;font-size:15px;line-height:1.25}
.orders-panel .order-product-name>small{display:block;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.25}
.orders-panel .order-style-code .sku-number-accent{color:#2f7667!important;font-weight:900!important}
@media(max-width:760px){
 .orders-panel tbody .order-product-name{grid-column:1/-1!important}
 .orders-panel tbody .order-product-name::before{content:'商品'!important}
 .orders-panel tbody .order-color::before{content:'颜色'!important}
 .orders-panel tbody .order-product-code::before{content:'商品编码'!important}
 .orders-panel tbody .order-style-code::before{content:'款号'!important}
}

/* Product editor uses a single block flow so content height can never collapse into adjacent sections. */
#editor-form[data-type="products"] #editor-fields{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:16px!important}
#editor-form[data-type="products"] #editor-fields>*:not(input[type="hidden"]){box-sizing:border-box!important;position:relative!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:min-content!important;margin-top:0!important;margin-bottom:0!important;grid-column:auto!important;grid-row:auto!important}
#editor-form[data-type="products"] .product-source-row,#editor-form[data-type="products"] .product-code-row{min-height:68px!important}
#editor-form[data-type="products"] .color-editor,#editor-form[data-type="products"] .structured-block,#editor-form[data-type="products"] .media-uploader{min-height:max-content!important;overflow:visible!important}

/* High-contrast code color shared with storefront product codes. */
.style-code-list .sku-number-accent{color:#2f7667!important;font-weight:900!important}

/* Compact single-image color editor and content-sized product dialog. */
#editor{height:auto!important;max-height:90vh!important}
#editor>form{display:flex!important;max-height:90vh!important;flex-direction:column!important}
#editor #editor-fields{flex:0 1 auto!important;min-height:0!important;max-height:calc(90vh - 158px)!important;overflow:auto!important}
#editor footer{flex:0 0 auto!important}
.color-editor{height:auto!important;min-height:0!important}
.color-editor #color-rows{display:grid!important;gap:8px!important}
.color-editor .color-row{min-height:66px!important;height:auto!important}
.variant-image-field{display:grid!important;grid-template-columns:minmax(120px,1fr) 58px!important;height:62px!important;min-height:62px!important;overflow:hidden!important}
.variant-image-field input{min-width:0!important}
.variant-image-field img{display:block;width:58px!important;height:58px!important;object-fit:contain!important}
.variant-image-field img[hidden]{display:none!important}
.variant-image-field .atlas-image-previews{display:none!important}
.stock-price-fields{grid-template-columns:repeat(4,minmax(130px,1fr))!important}
.stock-color-minimum-field small{display:block;margin-top:6px;color:var(--muted);font-size:10px;font-weight:400;line-height:1.35}
@media(max-width:900px){.stock-price-fields{grid-template-columns:repeat(2,minmax(180px,1fr))!important;min-width:0!important}}

/* Product controls stay on one desktop row; destructive bulk action appears only after selection. */
@media(min-width:761px){
 .product-toolbar{grid-template-columns:minmax(160px,1fr) minmax(150px,240px) repeat(4,max-content)!important;overflow-x:auto}
 .product-toolbar>div{display:contents!important}
 .product-toolbar button{white-space:nowrap!important}
}
.product-toolbar,#products-table{box-sizing:border-box!important;width:100%!important;margin-left:0!important;margin-right:0!important}
@media(min-width:761px) and (max-width:1100px){
 .product-toolbar{grid-template-columns:minmax(160px,1fr) minmax(150px,200px) repeat(4,max-content)!important}
 .product-toolbar>div{display:contents!important}
}

/* Mobile account management: present navigation and forms as readable cards. */
@media(max-width:560px){
 #account-dialog.account-dialog{width:calc(100vw - 20px)!important;max-width:none!important;max-height:calc(100dvh - 20px)!important;margin:auto!important;padding:0!important;overflow-y:auto!important;background:var(--paper)!important}
 #account-dialog>header{position:sticky!important;top:0!important;z-index:3!important;padding:14px 16px!important;background:var(--paper)!important;border-bottom:1px solid var(--line)!important}
 #account-dialog>header h2{font-size:1.55rem!important;line-height:1.15!important}
 #account-dialog .account-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:12px!important;overflow:visible!important;background:var(--paper)!important}
 #account-dialog .account-tabs button{width:100%!important;min-width:0!important;min-height:50px!important;padding:10px 8px!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important;background:#fff!important}
 #account-dialog .account-tabs button.active{background:var(--ink)!important;color:#fff!important}
 #account-dialog .account-tabs .account-add{grid-column:1/-1!important;margin:0!important;border-style:dashed!important}
 #account-dialog .account-dialog-body{display:block!important;padding:0 12px 14px!important}
 #account-dialog .account-dialog-body>p{margin:0 0 12px!important;padding:11px 12px!important;border:1px solid var(--line)!important;background:#fff!important;overflow-wrap:anywhere!important}
 #account-dialog .account-dialog-body section{margin:0 0 12px!important;padding:14px!important;border:1px solid var(--line)!important;background:#fff!important}
 #account-dialog .account-dialog-body section h3{margin:0 0 14px!important;font-size:1.25rem!important}
 #account-dialog .account-dialog-body label{display:grid!important;gap:7px!important;margin-bottom:12px!important}
 #account-dialog .account-dialog-body input{box-sizing:border-box!important;width:100%!important;min-width:0!important}
 #account-dialog .account-dialog-body section>button.secondary{width:100%!important;min-height:46px!important;white-space:normal!important}
 #account-dialog .account-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
 #account-dialog .account-actions button{width:100%!important;min-height:46px!important;white-space:normal!important}
}
#batch-delete[hidden]{display:none!important}
/* Keep the video upload guidance visible in the product media card. */
.stock-video-group>h4::after{content:'MP4 or MOV, up to 100MB; ideally keep the video within 15 seconds for faster loading.';display:block;max-width:520px;margin-top:7px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.5}
html[lang="zh-CN"] .stock-video-group>h4::after{content:'支持 MP4、MOV，最大 100MB；建议视频尽量控制在 15 秒以内，以保证加载速度。'}
.stock-video-group>.video-duration-hint{display:none!important}
@media(max-width:760px){#batch-delete:not([hidden]){display:inline-flex!important}}

/* 2026-09-14: single-image variant uploader and true phone card layouts. */
.variant-image-field{position:relative!important;display:grid!important;width:100%!important;height:92px!important;min-height:92px!important;place-items:center!important;overflow:hidden!important;border:1px dashed var(--line)!important;background:#fff!important;cursor:pointer!important}
.variant-image-field input[type="file"]{position:absolute!important;z-index:3!important;inset:0!important;width:100%!important;height:100%!important;opacity:0!important;cursor:pointer!important}
.variant-image-placeholder{display:grid!important;place-items:center!important;gap:3px!important;color:var(--muted)!important;text-align:center!important;pointer-events:none!important}
.variant-image-placeholder b{font-size:24px!important;font-weight:400!important;line-height:1!important}
.variant-image-placeholder small{font-size:11px!important}
.variant-image-field img{position:absolute!important;z-index:1!important;inset:0!important;width:100%!important;height:100%!important;object-fit:contain!important;border:0!important;background:#fff!important}
.variant-image-field.has-image .variant-image-placeholder{display:none!important}

@media(max-width:760px){
 .stock-price-panel{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
 .stock-price-panel .stock-price-head{box-sizing:border-box!important;align-items:center!important;padding:14px!important}
 .stock-price-panel .stock-price-fields,.stock-price-panel .mix-stock-carton-fields{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;max-width:100%!important;gap:12px!important;padding:0 14px 14px!important;overflow:hidden!important}
 .stock-price-panel .stock-price-fields>label{box-sizing:border-box!important;display:grid!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:12px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 .stock-price-panel .stock-price-fields input{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important}
 #stock-form.multi-stock-form{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:14px!important;overflow:visible!important}
 #stock-form .multi-stock-head{display:none!important}
 #stock-form .multi-stock-row{box-sizing:border-box!important;display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-areas:"select image" "color color" "current adjustment" "actions actions"!important;width:100%!important;min-width:0!important;max-width:100%!important;gap:10px 12px!important;margin:0 0 12px!important;padding:14px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 #stock-form .multi-stock-row>input[name="selected"]{grid-area:select!important;align-self:center!important;justify-self:center!important}
 #stock-form .stock-color-image{grid-area:image!important;justify-self:start!important;width:72px!important;height:72px!important}
 #stock-form .multi-stock-row>b,#stock-form .stock-color-name-edit{grid-area:color!important;display:block!important;width:100%!important;min-width:0!important;font-size:18px!important}
 #stock-form .stock-color-english{display:none!important}
 #stock-form .multi-stock-row>span:not(.stock-color-image):not(.stock-color-english),#stock-form .stock-color-stock-edit{grid-area:current!important;width:100%!important;min-width:0!important}
 #stock-form .multi-stock-row>span:not(.stock-color-image):not(.stock-color-english)::before,#stock-form .stock-color-stock-edit::before{content:'当前库存';display:block;margin-bottom:4px;color:var(--muted);font-size:10px;font-weight:700}
 #stock-form .multi-stock-row .stock-adjustment{grid-area:adjustment!important;box-sizing:border-box!important;width:100%!important;min-width:0!important}
 #stock-form .stock-color-actions{grid-area:actions!important;display:flex!important;justify-content:flex-end!important;width:100%!important;min-width:0!important}
 #stock-form .stock-add-color{box-sizing:border-box!important;width:100%!important;min-width:0!important;margin:12px 0 0!important}
 .orders-panel tbody tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-auto-flow:row!important}
 .orders-panel tbody tr>td{grid-column:auto!important;grid-row:auto!important}
 .orders-panel tbody tr>td:nth-child(1){grid-column:1!important;grid-row:1!important}.orders-panel tbody tr>.order-product-name{grid-column:2!important;grid-row:1!important}.orders-panel tbody tr>.order-product-code{grid-column:1!important;grid-row:2!important}.orders-panel tbody tr>.order-style-code{grid-column:2!important;grid-row:2!important}.orders-panel tbody tr>.order-color{grid-column:1/-1!important;grid-row:3!important}.orders-panel tbody tr>td:nth-child(8){grid-column:1!important;grid-row:4!important}.orders-panel tbody tr>td:nth-child(7){grid-column:2!important;grid-row:4!important}.orders-panel tbody tr>td:nth-child(6){grid-column:1!important;grid-row:5!important}.orders-panel tbody tr>td:nth-child(9){grid-column:2!important;grid-row:5!important}.orders-panel tbody tr>td:nth-child(10){grid-column:1!important;grid-row:6!important}.orders-panel tbody tr>td:nth-child(11){grid-column:2!important;grid-row:6!important}.orders-panel tbody tr>td:nth-child(12){grid-column:1!important;grid-row:7!important}.orders-panel tbody tr>td:nth-child(13){grid-column:2!important;grid-row:7!important}
 .orders-panel tbody td:nth-child(1)::before{content:'订单号'!important}.orders-panel tbody .order-product-name::before{content:'商品'!important}.orders-panel tbody .order-product-code::before{content:'商品编码'!important}.orders-panel tbody .order-style-code::before{content:'款号'!important}.orders-panel tbody .order-color::before{content:'颜色'!important}.orders-panel tbody td:nth-child(6)::before{content:'数量'!important}.orders-panel tbody td:nth-child(7)::before{content:'价格'!important}.orders-panel tbody td:nth-child(8)::before{content:'支付方式'!important}.orders-panel tbody td:nth-child(9)::before{content:'国家'!important}.orders-panel tbody td:nth-child(10)::before{content:'创建时间'!important}.orders-panel tbody td:nth-child(11)::before{content:'锁定时间'!important}.orders-panel tbody td:nth-child(12)::before{content:'状态'!important}.orders-panel tbody td:nth-child(13)::before{content:'操作'!important}
}

/* Product deletion history is a reversible audit drawer. */
.product-deletion-backdrop{position:fixed!important;inset:0!important;z-index:10030!important;width:auto!important;height:auto!important;border:0!important;background:#17201880!important}
.product-deletion-drawer{position:fixed!important;z-index:10031!important;top:0!important;right:0!important;bottom:auto!important;left:auto!important;transform:none!important;box-sizing:border-box!important;width:min(620px,calc(100vw - 18px))!important;max-width:none!important;height:100dvh!important;margin:0!important;overflow:auto!important;border:0!important;border-left:1px solid var(--line)!important;background:var(--paper)!important;box-shadow:-18px 0 45px #0002!important}
.product-deletion-drawer[hidden],.product-deletion-backdrop[hidden]{display:none!important}
.product-deletion-drawer-open{overflow:hidden!important}
.product-deletion-drawer>.panel-head{position:sticky!important;top:0!important;z-index:2!important;display:flex!important;align-items:center!important;justify-content:space-between!important;background:var(--paper)!important}
.product-deletion-close{width:38px!important;height:38px!important;border:0!important;border-radius:50%!important;background:var(--ink)!important;color:#fff!important;font-size:20px!important}
.product-deletion-drawer .deletion-log-scroll{overflow:auto!important;padding:0 18px 24px!important}
.product-deletion-drawer table{min-width:560px!important}
.product-deletion-drawer .restore-one-product{white-space:nowrap!important}

/* Uploaded media remains in normal flow so thumbnails cannot cover actions or status. */
.stock-product-media{display:block!important;overflow:visible!important}
.stock-product-media[hidden],.stock-price-panel[hidden]{display:none!important}
.stock-product-media .stock-media-groups{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important}
.stock-product-media .stock-media-group{position:relative!important;display:flex!important;min-width:0!important;height:auto!important;min-height:300px!important;overflow:hidden!important;flex-direction:column!important}
.stock-product-media .stock-media-actions{position:relative!important;z-index:3!important;flex:0 0 auto!important}
.stock-product-media .stock-media-status{position:relative!important;z-index:2!important;flex:0 0 auto!important}
.stock-product-media .stock-media-grid{position:relative!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(112px,140px))!important;align-content:start!important;align-items:start!important;width:100%!important;min-width:0!important;overflow:visible!important}
.stock-product-media .stock-media-grid figure{position:relative!important;width:100%!important;max-width:140px!important;height:auto!important;margin:0!important;overflow:hidden!important}
.stock-product-media .stock-media-grid figure>img,.stock-product-media .stock-media-grid figure>video{display:block!important;width:100%!important;height:140px!important;aspect-ratio:auto!important;object-fit:contain!important}
.stock-product-media .stock-media-grid figcaption{position:relative!important;min-height:46px!important;background:#faf8f2!important}
@media(max-width:800px){.stock-product-media .stock-media-groups{grid-template-columns:1fr!important}.stock-product-media .stock-media-group{min-height:0!important}}

/* Inventory has one auditable write path: current stock is read-only, changes use the adjustment field. */
.stock-mobile-list-head,.stock-adjustment-label{display:none}
.order-date-filter{display:flex;align-items:center;gap:8px;margin-left:auto;color:var(--muted);font-size:13px;font-weight:700;white-space:nowrap}
.order-date-select{min-width:128px;height:42px;padding:0 34px 0 12px;border:1px solid var(--line);background:var(--paper);color:var(--ink)}
.velocity-product-cell{display:flex;align-items:center;gap:10px;min-width:0}
.velocity-product-thumb{display:block;flex:0 0 46px;width:46px;height:46px;object-fit:contain;border:1px solid var(--line);background:#fff}
.velocity-product-thumb-empty{display:grid;place-items:center;color:var(--muted);font-size:9px;font-style:normal;text-align:center}
.velocity-product-copy{display:grid;min-width:0;gap:5px}.velocity-product-copy>small{display:flex;flex-wrap:wrap;gap:3px 12px;color:var(--muted);font-size:11px}.velocity-sales-amount{color:#719900!important;font-weight:900!important;text-align:right!important}

@media(max-width:760px){
 #stock-form .stock-mobile-list-head{display:block!important;margin:0 0 10px!important;padding:10px 12px!important;border:1px solid var(--line)!important;background:var(--head)!important}
 #stock-form .multi-stock-row{grid-template-columns:34px 82px minmax(0,1fr)!important;grid-template-areas:"select image color" "select image current" "label label label" "adjustment adjustment adjustment" "actions actions actions"!important;align-items:center!important}
 #stock-form .stock-color-image{width:82px!important;height:88px!important}
 #stock-form .multi-stock-row>b,#stock-form .stock-color-name-edit{grid-area:color!important;align-self:end!important;margin:0!important}
 #stock-form .multi-stock-row>.stock-current{grid-area:current!important;align-self:start!important;font-size:17px!important}
 #stock-form .multi-stock-row>.stock-current::before{content:attr(data-label)!important;margin:0 0 2px!important;color:var(--muted)!important;font-size:11px!important;font-weight:700!important}
 #stock-form .stock-adjustment-label{display:block!important;grid-area:label!important;margin-top:4px!important;color:var(--muted)!important;font-size:12px!important;font-weight:700!important}
 #stock-form .multi-stock-row .stock-adjustment{grid-area:adjustment!important;height:50px!important}
 #stock-form .stock-color-actions{grid-area:actions!important}
 .order-record-bar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
 .order-record-bar h2,.order-record-bar .order-record-select,.order-record-bar .order-date-filter{grid-column:1!important;width:100%!important;margin:0!important}
 .order-date-filter{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important}
 .order-date-select{width:100%!important;min-width:0!important}
 .velocity-panel{box-sizing:border-box!important;width:100%!important;min-width:0!important;overflow:hidden!important}
 .velocity-panel #velocity-body,.velocity-table-scroll{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important;padding-left:0!important;padding-right:0!important}
 .velocity-orders-table{display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important}
 .velocity-orders-table thead{display:none!important}
 .velocity-orders-table tbody{display:grid!important;width:100%!important;min-width:0!important;gap:12px!important}
 .velocity-orders-table tr{display:grid!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;padding:16px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 .velocity-orders-table td{display:block!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;border:0!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important;word-break:break-word!important}
 .velocity-orders-table td::before{display:block!important;margin-bottom:3px!important;color:var(--muted)!important;font-size:11px!important;font-weight:700!important}
 .velocity-orders-table td:nth-child(1){grid-column:1/-1!important}.velocity-orders-table td:nth-child(1)::before{content:'商品'}
 .velocity-orders-table td:nth-child(2)::before{content:'SKU'}.velocity-orders-table td:nth-child(3)::before{content:'订单号'}
 .velocity-orders-table td:nth-child(4){grid-column:1/-1!important}.velocity-orders-table td:nth-child(4)::before{content:'创建时间'}
 .velocity-orders-table td:nth-child(5)::before{content:'销售数量'}.velocity-orders-table td:nth-child(6)::before{content:'销售金额'}.velocity-orders-table td:nth-child(7)::before{content:'当前库存'}
 .velocity-panel .admin-table-pagination{display:flex!important;flex-wrap:wrap!important;width:100%!important;min-width:0!important;overflow:visible!important}
 .velocity-product-cell{align-items:flex-start!important}.velocity-product-thumb{flex-basis:58px!important;width:58px!important;height:58px!important}
 .velocity-orders-table td:nth-child(2){display:none!important}
 .velocity-orders-table td:nth-child(3){grid-column:1/-1!important}
 .velocity-orders-table td:nth-child(6){grid-column:2!important;text-align:right!important}.velocity-orders-table td:nth-child(6)::before{text-align:right!important}
 .velocity-product-copy>small{display:grid!important;gap:2px!important}.velocity-product-copy>small span:first-child{color:#2f7667!important;font-weight:800!important}
}

/* Order rows become compact, content-sized cards on phones. */
@media(max-width:760px){
 .orders-panel{overflow:visible!important;border:0!important;background:transparent!important}
 .orders-panel table{display:block!important;min-width:0!important;width:100%!important}
 .orders-panel thead{display:none!important}
 .orders-panel tbody{display:grid!important;gap:12px!important}
 .orders-panel tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 12px!important;padding:14px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 .orders-panel tbody td{display:block!important;min-width:0!important;padding:0!important;border:0!important;white-space:normal!important}
 .orders-panel tbody td::before{display:block!important;margin-bottom:3px!important;color:var(--muted)!important;font-size:9px!important;font-weight:700!important}
 .orders-panel tbody td:nth-child(1)::before{content:'订单号'}.orders-panel tbody td:nth-child(2)::before{content:'商品 / 颜色'}.orders-panel tbody td:nth-child(3)::before{content:'款号'}.orders-panel tbody td:nth-child(4)::before{content:'数量'}.orders-panel tbody td:nth-child(5)::before{content:'金额'}.orders-panel tbody td:nth-child(6)::before{content:'支付方式'}.orders-panel tbody td:nth-child(7)::before{content:'国家'}.orders-panel tbody td:nth-child(8)::before{content:'创建时间'}.orders-panel tbody td:nth-child(9)::before{content:'锁定时间'}.orders-panel tbody td:nth-child(10)::before{content:'状态'}.orders-panel tbody td:nth-child(11)::before{content:'操作'}
 .orders-panel tbody td:nth-child(2),.orders-panel tbody td:nth-child(9),.orders-panel tbody td:nth-child(11){grid-column:1/-1!important}
 .orders-panel .empty{display:grid!important;min-height:112px!important;place-items:center!important;border:1px solid var(--line)!important;background:#faf8f2!important}
}

/* 2026-09-14: keep the order number and product name in separate mobile columns. */
@media(max-width:760px){
 .orders-panel tbody tr{position:relative!important;grid-auto-flow:row!important}
 .orders-panel tbody tr>td:nth-child(1){display:block!important;grid-column:1!important;grid-row:1!important;position:relative!important;z-index:1!important;color:var(--ink)!important;overflow-wrap:anywhere!important}
 .orders-panel tbody tr>.order-product-name{display:block!important;grid-column:2!important;grid-row:1!important;position:relative!important;z-index:1!important}
}

/* Order decisions are direct actions on every viewport; no select/apply step. */
.orders-panel .order-actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important}
.orders-panel .order-actions button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;white-space:nowrap!important;font-size:12px!important}
@media(max-width:760px){
 .orders-panel .order-actions{width:100%!important;gap:5px!important}
 .orders-panel .order-actions button{flex:1 1 0!important;min-width:0!important;min-height:34px!important;padding:6px 5px!important;font-size:10px!important}
}

@media (max-width: 760px) {
  main > header {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    grid-template-areas: "menu language account" "heading heading heading" !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 0 !important;
    margin-bottom: 14px !important;
    background: var(--paper) !important;
  }
  #admin-menu-toggle { display: grid !important; position: static !important; grid-area: menu !important; width: 44px !important; height: 44px !important; margin: 0 !important; place-items: center !important; }
  #admin-language { grid-area: language !important; justify-self: stretch !important; width: 100% !important; max-width: none !important; height: 44px !important; margin: 0 !important; }
  #user-account-trigger { grid-area: account !important; display: grid !important; place-items: center !important; justify-self: end !important; flex: 0 0 44px !important; width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 44px !important; margin: 0 !important; padding: 0 !important; border-radius: 50% !important; }
  main > header > div { grid-area: heading !important; display: block !important; width: 100% !important; min-width: 0 !important; padding-top: 2px !important; }
  main > header > div .kicker { display: inline !important; margin: 0 8px 0 0 !important; font-size: .62rem !important; }
  main > header #view-title { display: inline !important; margin: 0 !important; font-size: 1.35rem !important; line-height: 1.2 !important; }

  #products-table tr.expandable-product > td:nth-child(2) { order: 1 !important; display: grid !important; grid-template-columns: 112px minmax(0, 1fr) !important; grid-template-rows: auto auto !important; align-items: start !important; gap: 6px 10px !important; }
  #products-table tr.expandable-product > td:nth-child(4) { order: 2 !important; }
  #products-table tr.expandable-product > td:nth-child(3) { order: 3 !important; }
  #products-table tr.expandable-product > td:nth-child(5) { order: 4 !important; }
  #products-table tr.expandable-product > td:nth-child(6) { order: 5 !important; }
  #products-table tr.expandable-product > td:nth-child(7) { order: 6 !important; }
  #products-table tr.expandable-product > td:nth-child(8) { order: 7 !important; }
  #products-table tr.expandable-product > td:nth-child(9) { order: 8 !important; }
  #products-table tr.expandable-product > td:nth-child(10) { order: 9 !important; }
  #products-table tr.expandable-product > td:nth-child(11) { order: 10 !important; }
  #products-table .admin-product-thumb { grid-column: 1 !important; grid-row: 1 / 3 !important; width: 112px !important; height: 112px !important; object-fit: contain !important; }
  #products-table .admin-product-copy { grid-column: 2 !important; grid-row: 1 !important; align-self: start !important; }
  #products-table .product-sku-summary { display: none !important; }
  #products-table .admin-product-cell > .variant-toggle { grid-column: 2 !important; grid-row: 2 !important; align-self: start !important; margin: 2px 0 0 !important; }
  #products-table .variant-detail-inline { grid-column: 2 !important; width: 100% !important; }
}

/* Style-code navigation uses the exact six operational columns requested. */
.style-code-list{table-layout:fixed!important;width:100%!important}
.style-code-list th,.style-code-list td{writing-mode:horizontal-tb!important;word-break:normal!important;overflow-wrap:break-word!important}
.style-code-list th:nth-child(1),.style-code-list td:nth-child(1){width:90px!important}
.style-code-list th:nth-child(2),.style-code-list td:nth-child(2){width:120px!important}
.style-code-list th:nth-child(3),.style-code-list td:nth-child(3){width:22%!important}
.style-code-list th:nth-child(4),.style-code-list td:nth-child(4){width:72px!important}
.style-code-list th:nth-child(5),.style-code-list td:nth-child(5){width:34%!important}
.style-code-list th:nth-child(6),.style-code-list td:nth-child(6){width:100px!important}
.style-code-list .style-product-thumb{width:52px!important;height:52px!important}
.style-code-list td:last-child button{white-space:nowrap!important;width:auto!important;min-width:78px!important;padding:8px 10px!important}

@media(max-width:760px){
 .style-code-list{min-width:0!important;table-layout:auto!important}.style-code-list thead{display:none!important}.style-code-list tbody{display:grid!important;gap:12px!important}
 .style-code-list tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:0!important;padding:12px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 .style-code-list tbody td{display:block!important;width:auto!important;padding:7px 8px!important;border:0!important;white-space:normal!important}
 .style-code-list tbody td::before{display:block;margin-bottom:3px;color:var(--muted);font-size:9px;font-weight:700}
 .style-code-list tbody td:nth-child(1)::before{content:'商品编码'}.style-code-list tbody td:nth-child(2)::before{content:'款号信息'}.style-code-list tbody td:nth-child(3)::before{content:'厂家信息'}.style-code-list tbody td:nth-child(4)::before{content:'商品图片'}.style-code-list tbody td:nth-child(5)::before{content:'商品信息'}.style-code-list tbody td:nth-child(6)::before{content:'操作'}
 .style-code-list tbody td:nth-child(3),.style-code-list tbody td:nth-child(5){grid-column:1/-1!important}.style-code-list tbody td:nth-child(4){grid-column:1!important}.style-code-list tbody td:nth-child(6){grid-column:2!important;align-self:end!important}
 .style-code-list .style-product-thumb{width:56px!important;height:56px!important}.style-code-list td:last-child button{width:100%!important}
}

/* Mobile category rows become compact content-sized cards. */
@media(max-width:760px){
 .category-admin-table{min-width:0!important}.category-admin-table thead{display:none!important}.category-admin-table tbody{display:grid!important;gap:8px!important}
 .category-admin-table tbody tr{display:grid!important;grid-template-columns:28px minmax(0,1fr) minmax(70px,.8fr)!important;gap:5px 8px!important;padding:10px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 .category-admin-table tbody td{display:block!important;width:auto!important;padding:2px!important;white-space:normal!important;word-break:normal!important}
 .category-admin-table tbody td:nth-child(1){grid-column:1!important;grid-row:1/3!important}.category-admin-table tbody td:nth-child(2){grid-column:2!important;grid-row:1!important}.category-admin-table tbody td:nth-child(3){grid-column:3!important;grid-row:1!important}.category-admin-table tbody td:nth-child(4){grid-column:2/4!important;grid-row:2!important;color:var(--muted)!important}.category-admin-table tbody td:nth-child(5){grid-column:2!important;grid-row:3!important}.category-admin-table tbody td:nth-child(6){grid-column:3!important;grid-row:3!important}
 .category-admin-table .row-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important}.category-admin-table .row-actions button{padding:4px!important}
}

/* Style mapping: one-to-one code, SKU and manufacturer across the top. */
@media(max-width:760px){
 .style-code-list tbody tr{position:relative!important;grid-template-columns:52px 92px minmax(55px,1fr) 48px!important}
 .style-code-list tbody td:nth-child(1){grid-column:1!important;grid-row:1!important}.style-code-list tbody td:nth-child(2){grid-column:2!important;grid-row:1!important}.style-code-list tbody td:nth-child(3){grid-column:3!important;grid-row:1!important;padding-top:5px!important}.style-code-list tbody td:nth-child(4){grid-column:1!important;grid-row:2!important}.style-code-list tbody td:nth-child(5){grid-column:2/5!important;grid-row:2!important}.style-code-list tbody td:nth-child(6){grid-column:4!important;grid-row:1!important;align-self:start!important;padding:3px 0!important}
 .style-code-list tbody td:nth-child(6)::before{display:none!important}.style-code-list td:last-child button{padding:5px 7px!important;font-size:11px!important}
}

/* Compact phone product cards and align expanded variants with the image edge. */
@media(max-width:760px){
 #products-table tr.expandable-product>td.admin-product-cell{grid-template-columns:82px minmax(0,1fr)!important;gap:6px 10px!important}
 #products-table .admin-product-thumb{width:82px!important;height:82px!important}
 #products-table .admin-product-cell>.variant-detail-inline{grid-column:1/-1!important;grid-row:3!important;width:100%!important;margin:4px 0 0!important;justify-self:stretch!important}
 #products-table .variant-detail-inline .variant-grid{width:100%!important;margin:0!important;padding:0!important}

 .style-code-list tbody tr{grid-template-columns:70px minmax(0,1fr)!important;padding:8px!important;row-gap:2px!important}
 .style-code-list tbody td,.style-code-list tbody td:nth-child(n){width:auto!important;padding:5px 6px!important;min-height:0!important}
 .style-code-list tbody td::before{margin-bottom:2px!important}
 .style-code-list tbody td:nth-child(1){grid-column:1!important}.style-code-list tbody td:nth-child(2){grid-column:2!important}
 .style-code-list tbody td:nth-child(3){grid-column:1/-1!important;padding-top:3px!important;padding-bottom:3px!important}
 .style-code-list tbody td:nth-child(4){grid-column:1!important;grid-row:3/5!important;align-self:start!important}
 .style-code-list tbody td:nth-child(5){grid-column:2!important;grid-row:3!important;min-width:0!important}
 .style-code-list tbody td:nth-child(6){grid-column:2!important;grid-row:4!important;align-self:start!important}
 .style-code-list .style-product-thumb{width:58px!important;height:58px!important}
 .style-code-list tbody td:nth-child(5) b,.style-code-list tbody td:nth-child(5) small{white-space:normal!important;line-height:1.25!important}
 .style-code-list td:last-child button{width:auto!important;min-width:0!important;padding:6px 10px!important}
}

/* Final phone layout for one-to-one style mappings. */
@media(max-width:760px){
 .style-code-list tbody tr{grid-template-columns:52px 92px minmax(55px,1fr) 48px!important;padding:8px!important;row-gap:3px!important}
 .style-code-list tbody td,.style-code-list tbody td:nth-child(n){width:auto!important;padding:4px 5px!important}
 .style-code-list tbody td:nth-child(1){grid-column:1!important;grid-row:1!important}.style-code-list tbody td:nth-child(2){grid-column:2!important;grid-row:1!important}.style-code-list tbody td:nth-child(3){grid-column:3!important;grid-row:1!important}.style-code-list tbody td:nth-child(4){grid-column:1!important;grid-row:2!important}.style-code-list tbody td:nth-child(5){grid-column:2/5!important;grid-row:2!important}.style-code-list tbody td:nth-child(6){grid-column:4!important;grid-row:1!important;padding:2px 0!important;align-self:start!important}
 .style-code-list tbody td:nth-child(6)::before{display:none!important}.style-code-list td:last-child button{width:auto!important;padding:5px 7px!important;font-size:11px!important}
}

/* Final compact phone card: metadata first, then thumbnail, two-line name and edit action. */
@media(max-width:760px){
 .style-code-list tbody tr{grid-template-columns:44px 78px minmax(0,1fr) 42px!important;grid-template-rows:auto auto!important;column-gap:5px!important;row-gap:4px!important;padding:8px!important}
 .style-code-list tbody td,.style-code-list tbody td:nth-child(n){padding:3px 4px!important;min-width:0!important}
 .style-code-list tbody td:nth-child(1){grid-column:1!important;grid-row:1!important}.style-code-list tbody td:nth-child(2){grid-column:2!important;grid-row:1!important}.style-code-list tbody td:nth-child(3){grid-column:3/5!important;grid-row:1!important;padding-top:3px!important}
 .style-code-list tbody td:nth-child(4){grid-column:1!important;grid-row:2!important;align-self:start!important}.style-code-list tbody td:nth-child(5){grid-column:2/4!important;grid-row:2!important;align-self:start!important}.style-code-list tbody td:nth-child(6){grid-column:4!important;grid-row:2!important;align-self:start!important;padding-top:17px!important}
 .style-code-list .style-product-thumb{width:42px!important;height:42px!important;font-size:8px!important}
 .style-code-list tbody td:nth-child(5) b{display:block!important;font-size:11px!important;font-weight:700!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 .style-code-list tbody td:nth-child(5) small{display:-webkit-box!important;margin-top:2px!important;color:var(--muted)!important;font-size:9px!important;font-weight:400!important;line-height:1.2!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}
 .style-code-list td:last-child button{padding:5px 6px!important;font-size:10px!important;line-height:1.2!important}
}

/* Phone style cards use the same three-column rhythm on both information rows. */
@media(max-width:760px){
 .style-code-list{width:100%!important}
 .style-code-list tbody tr{box-sizing:border-box!important;width:100%!important;grid-template-columns:62px minmax(0,1fr) 68px!important;grid-template-rows:auto auto!important;column-gap:10px!important;row-gap:10px!important;padding:12px!important}
 .style-code-list tbody td,.style-code-list tbody td:nth-child(n){box-sizing:border-box!important;padding:0!important;min-width:0!important}
 .style-code-list tbody td::before{margin-bottom:5px!important;font-size:10px!important;line-height:1.15!important}
 .style-code-list tbody td:nth-child(1){grid-column:1!important;grid-row:1!important}
 .style-code-list tbody td:nth-child(2){grid-column:2!important;grid-row:1!important}
 .style-code-list tbody td:nth-child(3){grid-column:3!important;grid-row:1!important}
 .style-code-list tbody td:nth-child(4){grid-column:1!important;grid-row:2!important}
 .style-code-list tbody td:nth-child(5){grid-column:2!important;grid-row:2!important}
 .style-code-list tbody td:nth-child(6){grid-column:3!important;grid-row:2!important;align-self:start!important;padding:0!important}
 .style-code-list tbody td:nth-child(6)::before{display:block!important}
 .style-code-list .style-product-thumb{box-sizing:border-box!important;width:62px!important;height:62px!important;font-size:9px!important}
 .style-code-list tbody td:nth-child(5) b{font-size:12px!important;line-height:1.25!important}
 .style-code-list tbody td:nth-child(5) small{font-size:10px!important;line-height:1.25!important}
 .style-code-list td:last-child button{width:100%!important;min-width:0!important;padding:7px 4px!important;font-size:11px!important}
}

/* Final phone editor guard: later rules must not restore horizontal scrolling. */
@media(max-width:760px){
 #editor{box-sizing:border-box!important;width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;margin:auto!important;overflow:hidden!important}
 #editor>form{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important}
 #editor form>header,#editor footer{box-sizing:border-box!important;width:100%!important;padding-left:18px!important;padding-right:18px!important}
 #editor #editor-fields{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;min-width:0!important;max-width:100%!important;padding:18px!important;gap:0!important;overflow-x:hidden!important;overflow-y:auto!important}
 #editor #editor-fields>*:not(input[type="hidden"]),#editor .field,#editor .structured-block,#editor .color-editor,#editor .media-uploader,#editor .product-source-row{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-column:1!important}
 #editor .product-source-row,#editor .tier-editor,#editor .dimension-editor,#editor .mix-carton-editor>div{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 #editor label,#editor input:not([type="hidden"]),#editor select,#editor textarea{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
 #editor input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),#editor select,#editor textarea{width:100%!important}
 #editor .structured-block,#editor .color-editor,#editor .media-uploader{padding:14px!important}
 #editor .color-editor-head{align-items:flex-start!important;gap:10px!important;flex-wrap:wrap!important}
 #editor .color-row{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr) 76px 38px!important;width:100%!important;min-width:0!important;gap:8px!important}
 #editor .color-row>.variant-image-field{grid-column:1/-1!important;width:100%!important;min-width:0!important}
 #editor .color-row>.color-remove{grid-column:3!important;grid-row:1!important}
 #editor footer{position:relative!important;inset:auto!important;flex-wrap:wrap!important;background:#fff!important}
 #editor footer button{flex:1 1 100px!important;min-width:0!important}
}

/* Absolute final mobile navigation and complete style-code accent. */
@media(max-width:760px){main>header{padding-left:56px!important}#admin-menu-toggle{position:fixed!important;left:14px!important;top:12px!important;z-index:10020!important;width:44px!important;height:44px!important;margin:0!important;background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 4px 14px #1720181a!important}}
.orders-panel .order-style-code b,.orders-panel .order-style-code .sku-letter-accent,.orders-panel .order-style-code .sku-number-accent{color:#2f7667!important;font-weight:900!important}
@media(max-width:760px){.velocity-panel .admin-table-pagination{box-sizing:border-box!important;display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:center!important;width:100%!important;gap:4px!important;padding:10px 0!important;overflow:hidden!important;font-size:9px!important;white-space:nowrap!important}.velocity-panel .admin-table-pagination label{flex:0 0 auto!important;gap:3px!important}.velocity-panel .admin-table-pagination select{box-sizing:border-box!important;width:82px!important;height:34px!important;padding:3px 18px 3px 5px!important;font-size:10px!important}.velocity-panel .admin-table-pagination .pagination-summary{flex:1 1 auto!important;min-width:0!important;font-size:9px!important;text-align:center!important}.velocity-panel .admin-table-pagination button{flex:0 0 28px!important;width:28px!important;height:32px!important;padding:0!important;font-size:14px!important}}

/* Compact stock controls and stable two-line editing area on phones. */
@media(max-width:760px){
 #stock-form .multi-stock-row{grid-template-columns:34px 82px minmax(0,1fr)!important;grid-template-areas:"select image color" "select image current" "label label label" "adjustment adjustment actions"!important}
 #stock-form .stock-adjustment{grid-area:adjustment!important;width:100%!important;min-width:0!important}
 #stock-form .stock-color-actions{grid-area:actions!important;justify-content:flex-end!important;gap:4px!important;white-space:nowrap!important}
 #stock-form .stock-color-actions button{min-width:0!important;padding:5px 6px!important;font-size:12px!important}
 .stock-detail-toolbar .stock-detail-heading-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;width:100%!important;min-height:82px!important;gap:7px!important}
 .stock-detail-heading-row h3,.stock-detail-heading-row .stock-name-inline-input{grid-column:1!important;min-width:0!important}
 .stock-detail-heading-row h3{font-size:17px!important;line-height:1.25!important;overflow-wrap:anywhere!important}
 .stock-detail-heading-row .stock-name-edit,.stock-detail-heading-row .stock-name-cancel{grid-row:1!important;min-width:68px!important;width:68px!important;height:42px!important;min-height:42px!important;padding:4px!important;font-size:12px!important}
 .stock-detail-heading-row .stock-name-edit{grid-column:2!important}.stock-detail-heading-row .stock-name-cancel{grid-column:3!important}
 .stock-detail-heading-row:not(:has(.stock-name-cancel)) h3{grid-column:1/3!important}
 .stock-detail-sku-editor{box-sizing:border-box!important;display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto auto!important;align-items:center!important;gap:5px!important;width:100%!important;height:62px!important;min-height:62px!important;overflow:hidden!important}
 .stock-detail-sku-editor input{box-sizing:border-box!important;width:100%!important;min-width:0!important;height:40px!important;grid-column:3!important}
 .stock-detail-sku-editor button{width:54px!important;min-width:54px!important;height:40px!important;min-height:40px!important;padding:3px!important;font-size:12px!important}
 .stock-detail-sku-editor .stock-sku-cancel{width:50px!important;min-width:50px!important}
}
.style-code-list .sku-letter-accent,.style-code-list .sku-number-accent,.style-code-list tbody td:nth-child(2) b{color:#2f7667!important;font-weight:900!important}
@media(max-width:760px){
 .stock-detail-toolbar .stock-detail-heading-row{grid-template-columns:minmax(0,1fr) 72px 72px!important;grid-template-rows:auto 42px!important;min-height:108px!important;align-content:center!important}
 .stock-detail-heading-row h3,.stock-detail-heading-row .stock-name-inline-input{grid-column:1/-1!important;grid-row:1!important;max-height:52px!important;overflow:hidden!important}
 .stock-detail-heading-row:not(:has(.stock-name-cancel)) h3{grid-column:1/-1!important}
 .stock-detail-heading-row .stock-name-edit{grid-column:2!important;grid-row:2!important}.stock-detail-heading-row .stock-name-cancel{grid-column:3!important;grid-row:2!important}
 .stock-detail-sku-editor{grid-template-columns:auto auto auto minmax(0,1fr) 54px 50px!important;grid-template-rows:40px 40px!important;height:90px!important;min-height:90px!important}
 .stock-detail-sku-editor>span:nth-child(1){grid-column:1!important;grid-row:1!important}.stock-detail-sku-editor>.stock-product-code{grid-column:2!important;grid-row:1!important}.stock-detail-sku-editor>span:nth-child(3){grid-column:3!important;grid-row:1!important}
 .stock-detail-sku-editor>strong:nth-child(4){grid-column:4/7!important;grid-row:1!important;min-width:0!important}
 .stock-detail-sku-editor>input:not([hidden]){grid-column:1/5!important;grid-row:2!important;min-width:0!important}
 .stock-detail-sku-editor>.stock-sku-edit{grid-column:5!important;grid-row:2!important}.stock-detail-sku-editor>.stock-sku-cancel:not([hidden]){grid-column:6!important;grid-row:2!important}
}

/* Keep the order date filter outside the records table, next to Refresh. */
.orders-filter-toolbar{display:flex!important;align-items:center!important;gap:12px!important}
.orders-filter-toolbar>p{flex:1 1 auto!important;min-width:0!important}
.orders-filter-toolbar .order-date-filter{flex:0 0 auto!important;margin-left:auto!important}
.orders-filter-toolbar #refresh-orders{flex:0 0 auto!important}
@media(max-width:760px){
 .orders-filter-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important}
 .orders-filter-toolbar>p{grid-column:1/-1!important}
 .orders-filter-toolbar .order-date-filter{grid-column:1!important;display:flex!important;width:100%!important;margin:0!important;min-width:0!important}
 .orders-filter-toolbar .order-date-select{flex:1 1 auto!important;width:100%!important;min-width:0!important}
 .orders-filter-toolbar #refresh-orders{grid-column:2!important;white-space:nowrap!important}
}
#editor-form>footer .editor-inline-feedback{flex:1 1 auto;min-width:0;margin:0 auto 0 0;color:#a13c32;font-size:14px;line-height:1.35}
#editor-form>footer .editor-inline-feedback:empty{display:none}
#view .product-toolbar .product-deletion-open{display:inline-flex!important;align-items:center!important;gap:5px!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;padding:8px 0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#496b31!important;font-size:14px!important;font-weight:600!important;white-space:nowrap!important}
#view .product-toolbar .product-deletion-open::after{content:"↗";font-size:17px;line-height:1}
#view .product-toolbar .product-deletion-open:hover{color:#294d23!important;text-decoration:underline}
#view .product-toolbar .product-deletion-open:focus-visible{outline:2px solid #496b31;outline-offset:3px}
#editor-form[data-type="products"] .product-sku-field input::placeholder{font-size:14px!important;font-weight:400!important;color:#858982!important}
.style-code-parts.style-code-freeform{display:block!important}
.style-code-parts.style-code-freeform .field{display:block!important;width:100%!important}

/* Product management fills wide screens and remains horizontally reachable on narrower laptops. */
@media(min-width:761px){
 #products-table{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
 }
 #products-table>table{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
 }
 #products-table>table th,#products-table>table td{padding-left:6px!important;padding-right:6px!important}
 #products-table>table tr>*:nth-child(1){width:38px!important}
 #products-table>table tr>*:nth-child(2){width:22%!important}
 #products-table>table tr>*:nth-child(3){width:9%!important}
 #products-table>table tr>*:nth-child(4){width:58px!important}
 #products-table>table tr>*:nth-child(5),#products-table>table tr>*:nth-child(6){width:9%!important}
 #products-table>table tr>*:nth-child(7){width:64px!important}
 #products-table>table tr>*:nth-child(8){width:72px!important}
 #products-table>table tr>*:nth-child(9){width:60px!important}
 #products-table>table tr>*:nth-child(10){width:112px!important}
 #products-table .product-color-summary{max-width:260px!important;line-height:1.35!important}
 #products-table .row-actions{gap:4px!important}
 #products-table .row-actions button{padding-left:5px!important;padding-right:5px!important}
}
.order-action-confirm{width:min(420px,calc(100vw - 32px));max-width:420px;padding:0;border:1px solid var(--line);background:#faf8f2;color:var(--ink)}
.order-action-confirm::backdrop{background:rgba(23,32,24,.45)}
.order-action-confirm-body{padding:24px}
.order-action-confirm-body h3{margin:0 0 12px;font-size:20px}
.order-action-confirm-body p{margin:0 0 24px;line-height:1.5}
.order-action-confirm-buttons{display:flex;justify-content:flex-end;gap:10px}
.order-action-confirm-buttons button{padding:11px 16px;border:1px solid var(--line);cursor:pointer}
.order-action-confirm-buttons button.danger{border-color:#9b3b32;background:#9b3b32;color:#fff}
.order-action-error{flex:1 1 100%;margin:8px 0 0;color:#9b3b32}

/* Product management uses readable cards instead of compressed table columns on phones. */
@media(max-width:760px){
 #products-table>table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important}
 #products-table thead{display:none!important}
 #products-table tbody{display:grid!important;gap:12px!important;width:100%!important}
 #products-table tbody>tr:not(.variant-detail){position:relative!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important;width:100%!important;min-width:0!important;padding:16px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 #products-table tbody>tr:not(.variant-detail)>td{display:flex!important;align-items:center!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0!important;white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;writing-mode:horizontal-tb!important}
 #products-table tbody>tr:not(.variant-detail)>td:nth-child(1){position:absolute!important;top:16px!important;left:16px!important;z-index:2!important}
 #products-table tbody>tr:not(.variant-detail)>td:nth-child(2){grid-column:1/-1!important;display:grid!important;padding-left:28px!important}
 #products-table tbody>tr:not(.variant-detail)>td:nth-child(4){display:none!important}
 #products-table tbody>tr:not(.variant-detail)>td:nth-child(10){grid-column:1/-1!important}
 #products-table tbody>tr:not(.variant-detail) .row-actions{display:flex!important;flex-wrap:wrap!important;width:100%!important;gap:8px!important}
 #products-table tbody>tr:not(.variant-detail) .row-actions button{flex:1 1 0!important;min-width:0!important;white-space:nowrap!important}
 #products-table .admin-product-cell{grid-template-columns:96px minmax(0,1fr)!important;gap:10px!important}
 #products-table .admin-product-thumb{width:96px!important;height:96px!important}
 #products-table .admin-product-copy{min-width:0!important}
 #products-table .admin-product-copy>*{max-width:100%!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
 #products-table .product-sku-summary{display:inline-flex!important}
}

/* Product list: two visible wholesale-price columns with no ghost cells. */
@media(min-width:761px){
 #products-table>table{width:100%!important;min-width:1050px!important;table-layout:fixed!important}
 #products-table>table tr>*{background:inherit!important}
 #products-table>table tr>*:nth-child(1){width:48px!important}
 #products-table>table tr>*:nth-child(2){width:360px!important}
 #products-table>table tr>*:nth-child(3){width:160px!important}
 #products-table>table tr>*:nth-child(4){display:none!important}
 #products-table>table tr>*:nth-child(5),#products-table>table tr>*:nth-child(6){width:145px!important}
 #products-table>table tr>*:nth-child(7),#products-table>table tr>*:nth-child(8){width:105px!important}
 #products-table>table tr>*:nth-child(9){width:90px!important}
 #products-table>table tr>*:nth-child(10){width:155px!important}
}

/* Phone product-card header: reserve separate tracks for media, copy, and details. */
@media(max-width:760px){
 #products-table tbody>tr:not(.variant-detail)>td:nth-child(2){display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;align-items:start!important;column-gap:10px!important;row-gap:8px!important;padding:0!important;overflow:hidden!important}
 #products-table .admin-product-thumb{grid-column:1!important;grid-row:1!important;width:82px!important;height:82px!important;max-width:82px!important;margin:0!important;object-fit:contain!important}
 #products-table .admin-product-copy{grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;overflow:hidden!important}
 #products-table .admin-product-copy>*{display:block!important;width:100%!important;max-width:100%!important;margin-left:0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
 #products-table .admin-product-copy .product-chinese-name{font-size:15px!important;line-height:1.25!important}
 #products-table .admin-product-copy .product-english-name,#products-table .admin-product-copy .product-color-summary{font-size:11px!important;line-height:1.35!important}
 #products-table .admin-product-cell>.variant-toggle{grid-column:1/-1!important;grid-row:2!important;justify-self:start!important;width:auto!important;margin:0!important;padding:3px 0!important}
 #products-table .variant-detail-inline{grid-column:1/-1!important;grid-row:3!important;width:100%!important}
}

.product-mobile-identifiers{display:none}
#products-table td.product-price-5,#products-table td.product-price-20,#products-table td.product-price-20>b{font-weight:700!important}
#products-table .admin-price-currency{font-size:11px!important;font-weight:600!important;color:var(--muted)!important}#products-table .admin-price-number{font-size:inherit!important;font-weight:700!important}
#products-table .admin-product-copy>.product-english-name{display:none!important}
@media(max-width:760px){
 #products-table .admin-product-copy>.product-english-colors{display:none!important}
 #products-table .admin-product-copy>.product-sku-summary{display:none!important}
 #products-table .admin-product-cell>.product-mobile-identifiers{grid-column:1/-1!important;grid-row:2!important;display:flex!important;align-items:center!important;gap:6px 14px!important;flex-wrap:wrap!important;width:100%!important;margin:2px 0 0!important;padding:7px 0!important;border-top:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;font-size:10px!important;line-height:1.3!important}
 #products-table .admin-product-cell>.variant-toggle{grid-column:1/-1!important;grid-row:3!important}
 #products-table .admin-product-cell>.variant-detail-inline{grid-column:1/-1!important;grid-row:4!important}
 #products-table .product-mobile-identifiers>span{display:inline-flex!important;width:auto!important;align-items:center!important;gap:4px!important;white-space:nowrap!important}
 #products-table .product-mobile-identifiers b{display:inline!important;color:#176c5d!important;font-size:11px!important}
 #products-table tr.expandable-product>td:nth-child(3),#products-table tr.expandable-product>.product-code-column{display:none!important}
 #products-table tr.expandable-product>.product-price-5,#products-table tr.expandable-product>.product-price-20{display:flex!important;grid-column:auto!important}
 #products-table tr.expandable-product>.product-price-5,#products-table tr.expandable-product>.product-price-20{justify-content:flex-start!important;gap:4px!important;overflow:hidden!important;white-space:nowrap!important}
 #products-table .admin-price-currency{flex:0 0 auto!important;align-self:baseline!important;font-size:8px!important}
 #products-table .admin-price-number{min-width:0!important;align-self:baseline!important;font-size:13px!important;letter-spacing:-.02em!important}
 #products-table tr.expandable-product>td.product-price-5:before{content:'5件起售价'!important}
 #products-table tr.expandable-product>td.product-price-20:before{content:'混色起订单价'!important}
 #products-table tr.expandable-product>td:nth-child(7):before{content:'库存'!important}
 #products-table tr.expandable-product>td:nth-child(8):before{content:'库存记录'!important}
 #products-table tr.expandable-product>td:nth-child(9):before{content:'状态'!important}
 #products-table tr.expandable-product>td:nth-child(10):before{content:'操作'!important}
 #products-table tr.expandable-product>td:nth-child(10){grid-column:1/-1!important}
 #products-table tr.mix-product-row>td.product-price-5:before{content:'整箱一口价'!important}
 #products-table tr.mix-product-row>.product-price-20{display:none!important}
}

@media(max-width:760px){
 #products-table tr.expandable-product>td:nth-child(9){position:absolute!important;top:14px!important;right:14px!important;z-index:4!important;display:block!important;width:auto!important;min-width:0!important;padding:0!important}
 #products-table tr.expandable-product>td:nth-child(9):before{content:none!important;display:none!important}
 #products-table tr.expandable-product>td:nth-child(9) .badge{display:inline-flex!important;width:auto!important;margin:0!important;padding:5px 9px!important;font-size:10px!important;line-height:1.2!important;white-space:nowrap!important}
}

/* Final desktop variant width: wrap compact cards instead of stretching tracks. */
@media(min-width:761px){
 #products-table tr.variant-detail .variant-grid{display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:10px!important;overflow:visible!important}
 #products-table tr.variant-detail .variant-grid>article{box-sizing:border-box!important;flex:0 0 250px!important;width:250px!important;min-width:250px!important;max-width:250px!important}
}

/* Show the translated product name directly below the primary name. */
#products-table .admin-product-copy>.product-english-name{display:block!important;width:100%!important;margin:3px 0 0!important;color:var(--muted)!important;font-size:11px!important;font-weight:400!important;line-height:1.3!important;letter-spacing:0!important}

/* Variant cards: color and inventory share the first row; prices sit below. */
#products-table .variant-grid .variant-detail-copy{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:baseline!important;column-gap:12px!important;row-gap:4px!important;min-width:0!important}
#products-table .variant-grid .variant-detail-copy>b{grid-column:1!important;grid-row:1!important;margin:0!important}
#products-table .variant-grid .variant-detail-copy>i:nth-of-type(1){grid-column:2!important;grid-row:1!important;margin:0!important;text-align:right!important;white-space:nowrap!important}
#products-table .variant-grid .variant-detail-copy>i:nth-of-type(2),#products-table .variant-grid .variant-detail-copy>i:nth-of-type(3){grid-column:1/-1!important;margin:0!important}

@media(max-width:760px){
 #products-table .admin-product-cell>.variant-toggle{grid-row:2!important;margin-top:2px!important}
 #products-table .admin-product-cell>.product-mobile-identifiers{grid-row:3!important}
 #products-table .admin-product-cell>.variant-detail-inline{grid-row:4!important}
 #products-table .variant-grid .variant-detail-copy>i:nth-of-type(2){display:block!important;line-height:1.45!important;white-space:normal!important}
}

/* Keep the stock actions reachable without horizontally scrolling the inventory grid. */
@media(max-width:760px){
 #stock-form .stock-form-actions{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:stretch!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  margin:10px 0 12px!important;
  padding:0!important;
 }
 #stock-form .stock-form-actions .primary,
 #stock-form .stock-form-actions .stock-movement-open{
  grid-column:auto!important;
  justify-self:stretch!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:10px 8px!important;
  font-size:12px!important;
  line-height:1.25!important;
  text-align:center!important;
  white-space:nowrap!important;
 }
 #stock-form .stock-form-actions .stock-movement-open{border:1px solid var(--line)!important}
}

/* Final desktop product table: every column stays inside the available content width. */
@media(min-width:761px){
 #products-table{overflow-x:hidden!important}
 #products-table>table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
 }
 #products-table>table th,#products-table>table td{
  box-sizing:border-box!important;
  min-width:0!important;
  padding-left:4px!important;
  padding-right:4px!important;
 }
 #products-table>table tr>*:nth-child(1){width:3%!important}
 #products-table>table tr>*:nth-child(2){width:26%!important}
 #products-table>table tr>*:nth-child(3){width:11%!important}
 #products-table>table tr>*:nth-child(4){display:none!important}
 #products-table>table tr>*:nth-child(5),#products-table>table tr>*:nth-child(6){width:9.5%!important}
 #products-table>table tr>*:nth-child(7){width:7%!important}
 #products-table>table tr>*:nth-child(8){width:8%!important}
 #products-table>table tr>*:nth-child(9){width:7%!important}
 #products-table>table tr>*:nth-child(10){width:19%!important}
 #products-table .admin-product-cell,#products-table .admin-product-copy{min-width:0!important;max-width:100%!important}
 #products-table .product-color-summary{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.35!important;
 }
 #products-table .row-actions{display:flex!important;flex-wrap:wrap!important;gap:3px!important}
 #products-table .row-actions button{min-width:0!important;padding-left:4px!important;padding-right:4px!important}
}

/* At compact desktop widths, switch the product table to readable cards instead of squeezing columns. */
@media(min-width:761px) and (max-width:1100px){
 #products-table{overflow-x:hidden!important}
 #products-table>table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important}
 #products-table thead{display:none!important}
 #products-table tbody{display:grid!important;gap:12px!important;width:100%!important}
 #products-table tbody>tr.expandable-product{position:relative!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px 12px!important;width:100%!important;min-width:0!important;padding:16px!important;border:1px solid var(--line)!important;background:#faf8f2!important}
 #products-table tbody>tr.expandable-product>td{display:flex!important;align-items:center!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0!important;white-space:nowrap!important}
 #products-table tbody>tr.expandable-product>td:nth-child(1){position:absolute!important;top:16px!important;left:16px!important;z-index:2!important}
 #products-table tbody>tr.expandable-product>td.admin-product-cell{grid-column:1/-1!important;display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;align-items:start!important;column-gap:12px!important;row-gap:8px!important;padding-left:28px!important;overflow:hidden!important}
 #products-table .admin-product-thumb{grid-column:1!important;grid-row:1!important;width:96px!important;height:96px!important;max-width:96px!important;margin:0!important;object-fit:contain!important}
 #products-table .admin-product-copy{grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;overflow:hidden!important}
 #products-table .admin-product-copy>*{display:block!important;width:100%!important;max-width:100%!important;margin-left:0!important;white-space:normal!important;overflow-wrap:anywhere!important}
 #products-table .admin-product-cell>.variant-toggle{grid-column:1/-1!important;grid-row:2!important;justify-self:start!important;width:auto!important;margin:0!important;padding:3px 0!important}
 #products-table .admin-product-cell>.product-mobile-identifiers{grid-column:1/-1!important;grid-row:3!important;display:flex!important;align-items:center!important;gap:6px 14px!important;flex-wrap:wrap!important;width:100%!important;margin:2px 0 0!important;padding:7px 0!important;border-top:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;font-size:10px!important}
 #products-table tr.expandable-product>td:nth-child(3),#products-table tr.expandable-product>td:nth-child(4){display:none!important}
 #products-table tr.expandable-product>td.product-price-5,#products-table tr.expandable-product>td.product-price-20{display:flex!important;justify-content:flex-start!important;gap:4px!important;overflow:hidden!important}
 #products-table tr.expandable-product>td.product-price-5:before{content:'5件起售价'!important}
 #products-table tr.expandable-product>td.product-price-20:before{content:'混色起订单价'!important}
 #products-table tr.expandable-product>td:nth-child(7):before{content:'库存'!important}
 #products-table tr.expandable-product>td:nth-child(8):before{content:'库存记录'!important}
 #products-table tr.expandable-product>td:nth-child(9){position:absolute!important;top:14px!important;right:14px!important;z-index:4!important;display:block!important;width:auto!important;padding:0!important}
 #products-table tr.expandable-product>td:nth-child(9):before{content:none!important}
 #products-table tr.expandable-product>td:nth-child(10){grid-column:1/-1!important}
 #products-table tr.expandable-product>td:nth-child(10):before{content:'操作'!important}
 #products-table tbody>tr.expandable-product .row-actions{display:flex!important;flex-wrap:wrap!important;width:100%!important;gap:8px!important}
 #products-table tbody>tr.expandable-product .row-actions button{flex:1 1 0!important;min-width:0!important;white-space:nowrap!important}
 #products-table tr.variant-detail{display:block!important;width:100%!important}
 #products-table tr.variant-detail>td{display:block!important;width:100%!important;padding:0!important}
}

/* Variant rows obey the details toggle at every responsive breakpoint. */
#products-table tr.variant-detail[hidden]{display:none!important}

/* Product media thumbnails can be dragged to set their storefront order. */
.stock-image-group .stock-media-grid figure[draggable="true"]{cursor:grab!important;user-select:none!important}
.stock-image-group .stock-media-grid figure.dragging{opacity:.45!important;cursor:grabbing!important}
.stock-image-group .stock-media-grid figure.drag-target{outline:2px solid var(--green)!important;outline-offset:3px!important}
.random-allocation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0;padding:14px;border:1px solid var(--line)}
.random-allocation legend{padding:0 6px;font-weight:700}.random-allocation label{display:grid;grid-template-columns:1fr auto;gap:4px 8px}.random-allocation label small{color:var(--muted)}.random-allocation input{grid-column:1/-1;width:100%;box-sizing:border-box}.random-allocation>p{grid-column:1/-1;margin:0;color:var(--muted)}
@media(max-width:560px){.random-allocation{grid-template-columns:1fr}}

/* Phone product media: keep image thumbnails in a compact two-column grid. */
@media(max-width:560px){
 .stock-product-media .stock-image-group .stock-media-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
 }
 .stock-product-media .stock-image-group .stock-media-grid figure{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
 }
 .stock-product-media .stock-image-group .stock-media-grid figure>img{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  object-fit:contain!important;
 }
 .stock-product-media .stock-image-group .stock-media-grid figcaption{
  box-sizing:border-box!important;
  min-height:58px!important;
  padding:6px!important;
  font-size:9px!important;
  line-height:1.35!important;
 }
 .stock-product-media .stock-image-group .stock-media-grid figcaption strong{
  display:block!important;
  width:100%!important;
 }
 .stock-product-media .stock-image-group .stock-media-grid figcaption button{
  padding:2px 3px!important;
  font-size:9px!important;
 }
 .stock-product-media .stock-video-group .stock-media-grid{
  grid-template-columns:minmax(0,1fr)!important;
 }
}
.mixed-minimum-badge{display:block;width:fit-content;margin-top:6px;padding:3px 6px;background:#e5ebd4;color:#455a25;font-size:10px;font-weight:500;line-height:1.4;white-space:nowrap}
@media(max-width:1100px){#products-table tr.expandable-product>td.product-price-20{flex-wrap:wrap!important}#products-table .mixed-minimum-badge{flex:0 0 auto;margin-top:2px}}
@media(min-width:1101px){
 #products-table td.product-price-20{position:relative!important;vertical-align:middle!important}
 #products-table td.product-price-20 .mixed-minimum-badge{position:absolute;top:calc(50% + 10px);left:4px;margin-top:0}
}
/* Compact price cards: heading and minimum badge above a single currency row. */
.admin-price-line{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap}
@media(max-width:760px){
 html #products-table tr.expandable-product:not(.mix-product-row)>td.product-price-5,
 html #products-table tr.expandable-product:not(.mix-product-row)>td.product-price-20{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:7px 5px!important;align-content:start!important;align-items:center!important;white-space:normal!important;overflow:visible!important}
 html #products-table tr.expandable-product:not(.mix-product-row)>td.product-price-5:before{content:'5件起售单价'!important;grid-column:1/-1!important;grid-row:1!important;font-size:11px!important;white-space:normal!important}
 html #products-table tr.expandable-product:not(.mix-product-row)>td.product-price-20:before{content:'混色起订单价'!important;grid-column:1!important;grid-row:1!important;font-size:11px!important;white-space:normal!important}
 html #products-table td.product-price-20 .mixed-minimum-badge{position:static!important;grid-column:2!important;grid-row:1!important;justify-self:start!important;margin:0!important;padding:2px 4px!important;font-size:9px!important;white-space:nowrap!important}
 html #products-table .admin-price-line{grid-column:1/-1!important;grid-row:2!important;display:flex!important;align-items:baseline!important;gap:4px!important;white-space:nowrap!important}
}
@media(max-width:1100px){
 html #products-table .admin-product-cell>.variant-toggle{grid-row:2!important}
 html #products-table .admin-product-cell>.variant-detail-inline{grid-column:1/-1!important;grid-row:3!important;width:100%!important;min-width:0!important}
 html #products-table .admin-product-cell>.product-mobile-identifiers{grid-row:4!important}
 html #products-table .variant-detail-inline[hidden]{display:none!important}
}
@media(max-width:1100px){
 html #products-table .variant-detail-inline .variant-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
 html #products-table .variant-detail-inline .variant-grid>article{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;padding:8px!important;gap:6px!important;grid-template-columns:42px minmax(0,1fr)!important}
 html #products-table .variant-detail-inline .variant-detail-image,html #products-table .variant-detail-inline .variant-detail-image-empty{width:42px!important;height:42px!important}
 html #products-table .variant-detail-inline .variant-detail-copy{column-gap:4px!important;font-size:10px!important}
 html #products-table .variant-detail-inline .variant-detail-copy>b{font-size:11px!important}
 html #products-table .variant-detail-inline .variant-detail-copy>i{font-size:9px!important;white-space:normal!important;overflow-wrap:anywhere!important}
}
#extra-color-picker{margin:8px 0;padding:10px;max-width:100%;border:1px solid var(--line);background:var(--paper);font:inherit}
.color-name-pair{display:grid;gap:6px;min-width:0}.color-name-pair input{width:100%;box-sizing:border-box}.color-name-pair .color-name-en{font-size:13px}
#editor-form[data-type="products"]:not(.mix-product-editor) #color-rows{gap:18px!important}
#editor-form[data-type="products"]:not(.mix-product-editor) .color-row{align-items:stretch!important;padding-bottom:18px;border-bottom:1px solid var(--line)}
#editor-form[data-type="products"]:not(.mix-product-editor) .color-name-pair{grid-template-rows:48px 48px;gap:8px;height:104px}
#editor-form[data-type="products"]:not(.mix-product-editor) .color-name-pair input{height:48px!important;min-height:48px!important;margin:0!important}
#editor-form[data-type="products"]:not(.mix-product-editor) .color-row>.color-quantity,
#editor-form[data-type="products"]:not(.mix-product-editor) .color-row>.variant-image-field,
#editor-form[data-type="products"]:not(.mix-product-editor) .color-row>.color-remove{box-sizing:border-box;height:104px!important;min-height:104px!important;margin:0!important}
#editor-form .color-editor-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px}
#editor-form .color-editor-head>b{grid-column:1;grid-row:1;white-space:nowrap;min-width:max-content}
#editor-form .color-editor-head>#add-color{grid-column:3;grid-row:1;width:auto!important;margin:0!important;white-space:nowrap;flex-shrink:0}
#editor-form .color-editor-head>#extra-color-picker{grid-column:2;grid-row:1;width:180px!important;max-width:180px!important;min-width:0!important;margin:0!important}
#editor-form .color-editor-head>#extra-color-picker[hidden]{display:none!important}
@media(max-width:560px){#editor-form .color-editor-head{grid-template-columns:minmax(0,1fr) auto}#editor-form .color-editor-head>#add-color{grid-column:2}#editor-form .color-editor-head>#extra-color-picker{grid-column:1/-1;grid-row:2;justify-self:end;width:min(220px,100%)!important;max-width:100%!important}}
#cart-receipt-dialog,#payment-receipt-dialog{max-height:calc(100dvh - 32px);overflow:auto}
#cart-receipt-dialog .order-action-confirm-body>label{display:grid;gap:6px;margin:12px 0}
#cart-receipt-dialog textarea,#payment-receipt-dialog textarea{box-sizing:border-box;width:100%;min-height:88px;resize:vertical}
/* Filtered orders must stay hidden even when mobile cards force grid display. */
html #app .orders-panel table tbody>tr[hidden],
html #app .orders-panel table tbody>tr[data-table-filter-hidden="1"]{display:none!important}
@media(min-width:761px){
 html #app .orders-panel{overflow-x:auto!important;position:relative}
 html #app .orders-panel table{table-layout:fixed!important;width:1500px!important;min-width:1500px!important;border-collapse:separate!important;border-spacing:0}
 html #app .orders-panel table th,html #app .orders-panel table td{box-sizing:border-box;width:130px;overflow-wrap:anywhere}
 html #app .orders-panel table th:first-child,html #app .orders-panel table td:first-child{position:sticky!important;left:0!important;width:150px!important;min-width:150px!important;z-index:3;background:var(--paper,#faf8f2)!important;box-shadow:2px 0 4px #0001}
 html #app .orders-panel table th:last-child,html #app .orders-panel table td:last-child{position:sticky!important;right:0!important;width:190px!important;min-width:190px!important;z-index:3;background:var(--paper,#faf8f2)!important;box-shadow:-2px 0 4px #0001}
 html #app .orders-panel table th:first-child,html #app .orders-panel table th:last-child{z-index:4;background:#e7e3d8!important}
 html #app .orders-panel table th:nth-child(2),html #app .orders-panel table td:nth-child(2){width:340px!important;min-width:340px!important;max-width:340px!important;white-space:normal!important}
 html #app .orders-panel .cart-order-details{width:100%;max-width:100%;min-width:0}
 html #app .orders-panel .cart-order-details article>div,html #app .orders-panel .cart-order-details article>span{min-width:0;flex:1}
 html #app .orders-panel .cart-order-details p,html #app .orders-panel .cart-order-details small{white-space:normal!important;overflow-wrap:anywhere!important}
 html #app .orders-panel .order-actions{flex-wrap:wrap!important;white-space:normal!important}
}

/* Compact product detail identity; actions share the heading instead of extra rows. */
html #view[data-products-loading]{position:relative;min-height:240px}
html #view[data-products-loading]>*{visibility:hidden!important}
html #view[data-products-loading]::after{content:attr(data-products-loading)!important;display:block!important;position:absolute;inset:80px 0 auto;text-align:center;color:var(--muted);font-size:13px}
html #view[data-products-loading] #products-table::after{display:none!important}
html #view .stock-detail-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) repeat(3,max-content)!important;gap:8px!important;align-items:center!important;min-height:0!important;padding:0!important;margin-bottom:16px!important}
html #view .stock-detail-toolbar .stock-detail-heading-row{display:contents!important}
html #view .stock-detail-toolbar .stock-detail-heading-row h3,
html #view .stock-detail-toolbar .stock-detail-heading-row:not(:has(.stock-name-cancel)) h3,
html #view .stock-detail-toolbar .stock-name-inline-input{grid-column:1!important;grid-row:1!important;min-height:0!important;max-height:none!important;margin:0!important}
html #view .stock-detail-toolbar .stock-detail-name{display:inline!important;font-size:18px;line-height:1.4}
html #view .stock-detail-toolbar .stock-detail-inventory{display:inline-block!important;margin:0 0 0 12px!important;font-size:12px;line-height:1.4}
html #view .stock-detail-toolbar .stock-detail-heading-row .stock-name-edit{grid-column:2!important;grid-row:1!important}
html #view .stock-detail-toolbar .stock-name-cancel{grid-column:3!important;grid-row:1!important}
html #view .stock-detail-toolbar>.category-transfer-button{grid-column:4!important;grid-row:1!important}
html #view .stock-detail-toolbar .stock-detail-sku-editor{grid-column:1/-1!important;grid-row:2!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;min-height:32px!important;margin:0!important;padding:0!important}
html #view .stock-detail-toolbar button{min-height:32px!important;padding:6px 10px!important;font-size:12px!important;white-space:nowrap!important}
html #view .stock-detail-toolbar .stock-detail-sku-editor strong{padding:4px 8px!important}
@media(max-width:600px){
 html #view .stock-detail-toolbar{grid-template-columns:minmax(0,1fr) auto auto!important}
 html #view .stock-detail-toolbar .stock-detail-heading-row h3,
 html #view .stock-detail-toolbar .stock-detail-heading-row:not(:has(.stock-name-cancel)) h3{grid-column:1/-1!important;grid-row:1!important}
 html #view .stock-detail-toolbar .stock-detail-heading-row .stock-name-edit{grid-column:1!important;grid-row:2!important;justify-self:start}
 html #view .stock-detail-toolbar .stock-name-cancel{grid-column:2!important;grid-row:2!important}
 html #view .stock-detail-toolbar>.category-transfer-button{grid-column:3!important;grid-row:2!important}
 html #view .stock-detail-toolbar .stock-detail-sku-editor{grid-row:3!important}
}
