:root{--ink:#152a24;--muted:#65756f;--line:#dce5e0;--paper:#f4f7f5;--white:#fff;--green:#1e6d55;--green2:#2d8a69;--mint:#e5f3ed;--amber:#a5660b;--amber-bg:#fff1d6;--red:#a8443c;--red-bg:#fde9e6;--shadow:0 12px 32px rgba(23,54,44,.07)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Microsoft YaHei UI","PingFang SC",system-ui,sans-serif}.shell{display:grid;grid-template-columns:236px 1fr;min-height:100vh}.sidebar{background:#102d25;color:#eaf6f1;padding:28px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;padding:0 10px 30px}.brand-mark{display:grid;place-items:center;width:39px;height:39px;border:1px solid #89b6a6;color:#bde5d7;font-family:Georgia,serif;font-size:24px}.brand strong{display:block;letter-spacing:.16em}.brand small,.sidebar-foot small{display:block;color:#91afa5;margin-top:4px;font-size:11px}.sidebar nav{display:grid;gap:7px}.nav{border:0;background:transparent;color:#a8c2b9;text-align:left;padding:13px 14px;border-radius:9px;font-size:14px;cursor:pointer}.nav span{display:inline-block;width:28px}.nav:hover,.nav.active{background:#1a463a;color:#fff}.sidebar-foot{margin-top:auto;border-top:1px solid #2e5046;padding:20px 10px 0;display:flex;gap:10px;align-items:center;font-size:12px}.dot{width:8px;height:8px;border-radius:50%}.dot.ok{background:#49c08f;box-shadow:0 0 0 5px rgba(73,192,143,.12)}main{padding:34px 42px 60px;max-width:1580px;width:100%;margin:auto}header{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:28px}h1{font-family:Georgia,"Songti SC",serif;font-size:32px;margin:5px 0 0}h2{font-family:Georgia,"Songti SC",serif;font-size:20px;margin:4px 0}.eyebrow{font-size:10px;letter-spacing:.2em;color:#7b8e87;margin:0;text-transform:uppercase;font-weight:700}.header-actions,.action-row,.modal-actions{display:flex;gap:10px}.btn{border:1px solid var(--line);border-radius:8px;padding:10px 15px;font-weight:700;cursor:pointer;background:#fff;color:var(--ink)}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--green);border-color:var(--green);color:white}.btn.secondary{background:#dcefe7;border-color:#bad9cc;color:#185a47}.btn.ghost{background:transparent}.btn.compact{padding:5px 9px}.btn.disabled{opacity:.5;cursor:not-allowed}.link{border:0;background:transparent;color:var(--green);cursor:pointer}.view{display:none}.view.active{display:block}.notice{display:flex;gap:15px;background:#e8f2ee;border:1px solid #c9ddd5;border-left:4px solid var(--green);padding:17px 19px;margin-bottom:20px}.notice>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--green);color:#fff;font-family:Georgia}.notice p{margin:4px 0 0;color:var(--muted);font-size:13px}.metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:18px}.metric{background:var(--white);border:1px solid var(--line);padding:20px;border-radius:10px;box-shadow:var(--shadow)}.metric b{font-size:27px;font-family:Georgia,serif;display:block;margin:10px 0 3px}.metric small{color:var(--muted)}.metric.warn{border-top:3px solid #d49a40}.metric.danger{border-top:3px solid #c55e55}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.panel{background:var(--white);border:1px solid var(--line);border-radius:10px;padding:21px;box-shadow:var(--shadow);margin-bottom:18px}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.platform-list{display:grid;gap:12px}.platform-row{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center;border:1px solid var(--line);padding:12px;border-radius:8px}.platform-row .pi,.platform-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:9px;background:#f58b48;color:#fff;font-weight:900}.platform-row small{display:block;color:var(--muted);margin-top:3px}.badge{padding:5px 8px;border-radius:99px;font-size:11px;font-weight:800}.badge.good{background:var(--mint);color:var(--green)}.badge.wait{background:var(--amber-bg);color:var(--amber)}.badge.risk{background:var(--red-bg);color:var(--red)}.attention{display:grid;gap:10px}.attention-item{display:flex;align-items:center;justify-content:space-between;padding:13px 3px;border-bottom:1px solid #edf1ef}.attention-item:last-child{border-bottom:0}.attention-item b{font-family:Georgia,serif;font-size:22px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;color:#667b73;background:#f3f7f5;font-size:11px;letter-spacing:.06em;padding:10px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:11px 10px;border-bottom:1px solid #edf1ef;vertical-align:middle}tr:hover td{background:#fbfdfc}.sku-code{font-family:Consolas,monospace;font-weight:800;color:#1c644f}.stock{font-family:Georgia,serif;font-size:18px}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px}.status-dot.good{background:#38a276}.status-dot.wait{background:#d99331}.status-dot.bad{background:#c5574e}.filters{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr));gap:10px}.input{width:100%;border:1px solid #ccd9d3;background:#fff;border-radius:7px;padding:10px 11px;color:var(--ink);outline:none}.input:focus{border-color:#438c72;box-shadow:0 0 0 3px rgba(67,140,114,.12)}.search{padding-left:14px}.pager{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px}.count{font-family:system-ui;font-size:12px;color:var(--muted);font-weight:400}.sync-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.sync-card{min-height:240px}.sync-card.taobao{border-top:3px solid #eb7b34}.platform-title{display:flex;align-items:center;gap:12px;margin-bottom:16px}.platform-title .badge{margin-left:auto}.platform-icon.xhs{background:#ce3e3b}.platform-icon.pdd{background:#d55343}.platform-icon.xy{background:#e29b27}.muted{color:var(--muted);font-size:13px;line-height:1.65}.check{display:flex!important;flex-direction:row!important;align-items:center;gap:9px;margin:19px 0;font-size:13px}.result-box{background:#f1f7f4;border:1px solid #cfe0d9;padding:13px;border-radius:8px;margin-top:15px;font-size:13px}.hidden{display:none}.import-panel{display:flex;align-items:center;justify-content:space-between}.form-panel label{display:grid;gap:7px;margin-top:18px;font-size:13px;font-weight:700}.hint{font-size:12px;color:var(--muted);line-height:1.6}.status-awaiting_upload{color:var(--amber)}.status-succeeded{color:var(--green)}.status-failed{color:var(--red)}dialog{border:0;padding:0;border-radius:12px;width:min(470px,92vw);box-shadow:0 25px 80px rgba(0,0,0,.25)}dialog::backdrop{background:rgba(9,29,23,.55);backdrop-filter:blur(2px)}dialog form{padding:24px;display:grid;gap:16px}.modal-head{display:flex;justify-content:space-between}.icon-btn{border:0;background:#eef3f1;width:31px;height:31px;border-radius:50%;font-size:20px;cursor:pointer}.adjust-row{display:grid;grid-template-columns:44px 1fr 44px;gap:8px}.step{border:1px solid var(--line);background:#f1f5f3;border-radius:8px;font-size:22px;cursor:pointer}.qty{text-align:center;font-size:18px;font-weight:800}.modal-actions{justify-content:flex-end;margin-top:4px}#toast{position:fixed;right:28px;bottom:28px;background:#153a30;color:white;border-radius:9px;padding:13px 17px;box-shadow:0 12px 35px rgba(0,0,0,.2);transform:translateY(30px);opacity:0;pointer-events:none;transition:.2s;max-width:420px}#toast.show{transform:translateY(0);opacity:1}#toast.error{background:#8f3934}.empty{padding:35px;text-align:center;color:var(--muted)}@media(max-width:1000px){.shell{grid-template-columns:76px 1fr}.sidebar{padding:25px 11px}.brand div,.nav:not(.active){font-size:0}.nav span{font-size:18px}.brand{padding-left:6px}.sidebar-foot div{display:none}main{padding:28px 24px}.metrics{grid-template-columns:repeat(3,1fr)}.grid-2,.sync-grid{grid-template-columns:1fr}.filters{grid-template-columns:1fr 1fr}}@media(max-width:680px){.shell{display:block}.sidebar{position:static;height:auto;flex-direction:row;align-items:center;padding:10px;overflow:auto}.brand,.sidebar-foot{display:none}.sidebar nav{display:flex}.nav{white-space:nowrap}main{padding:20px 14px}header{align-items:center}.header-actions .ghost{display:none}h1{font-size:25px}.metrics{grid-template-columns:1fr 1fr}.filters{grid-template-columns:1fr}.import-panel{display:block}.import-panel .btn{margin-top:12px}}

/* SKU master-data lifecycle */
.filters{grid-template-columns:minmax(240px,2fr) repeat(4,minmax(135px,1fr))}
.form-panel label,dialog label{display:grid;gap:7px;margin-top:8px;font-size:13px;font-weight:700}
dialog{max-height:92vh}dialog.wide-dialog{width:min(920px,94vw)}dialog form{max-height:92vh;overflow:auto}
.sales-resolution-line{display:grid;grid-template-columns:minmax(260px,1fr) 100px 120px 130px auto;gap:10px;align-items:end;padding:10px 0;border-bottom:1px solid var(--line)}.sales-resolution-line label{margin:0}.sales-resolution-line .btn{margin-bottom:1px}@media(max-width:800px){.sales-resolution-line{grid-template-columns:1fr 1fr}.sales-resolution-line label:first-child{grid-column:1/-1}}
.btn.danger{background:#973f37;border-color:#973f37;color:#fff}
.sku-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}.sku-form-grid .span-2{grid-column:1/-1}
.sku-primary-fields{padding:2px 0 4px}.sku-advanced-settings{border-top:1px solid var(--line);padding-top:16px}.sku-advanced-settings>summary{cursor:pointer;color:var(--green);font-weight:800;font-size:13px;list-style-position:inside}.sku-advanced-settings[open]>summary{margin-bottom:15px}.sku-advanced-settings .advanced-fields{padding:2px 0 14px}.consignment-only.hidden{display:none}
.attention-item b small{font:600 11px system-ui;color:var(--muted);margin-left:5px}.attention-action{width:100%;border:1px solid transparent;background:transparent;border-radius:8px;cursor:pointer;text-align:left}.attention-action:hover{background:#f5faf7;border-color:#d4e5dd}.attention-action.risk b{color:var(--red)}.attention-action.wait b{color:var(--amber)}
.rule-box{background:#fff6e8;border:1px solid #efd5a8;border-left:4px solid #d49230;border-radius:7px;padding:13px;color:#785019;font-size:12px;line-height:1.65}
.sku-history,.danger-zone{border-top:1px solid var(--line);padding-top:16px}.sku-history h3,.danger-zone h3{margin:4px 0 8px;font:700 17px Georgia,"Songti SC",serif}
.name-history-list{display:grid;gap:7px}.name-history-item{display:grid;grid-template-columns:minmax(120px,1fr) auto;gap:10px;padding:9px 11px;border-radius:7px;background:#f3f7f5;font-size:12px}.name-history-item span:last-child{color:var(--muted)}
.danger-zone{display:flex;justify-content:space-between;align-items:center;gap:16px}.archived-row{opacity:.62}.archived-tag{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:99px;background:#ecefee;color:#69746f;font-size:10px}
@media(max-width:1100px){.filters{grid-template-columns:1fr 1fr 1fr}}@media(max-width:1000px){.danger-zone{align-items:flex-start;flex-direction:column}}@media(max-width:680px){.sku-form-grid{grid-template-columns:1fr}.sku-form-grid .span-2{grid-column:auto}}
.inventory-rule-section{border-top:1px solid var(--line);padding-top:16px;display:grid;gap:12px}.inventory-rule-section h3{margin:4px 0 5px;font:700 17px Georgia,"Songti SC",serif}.rule-toolbar{display:grid;grid-template-columns:minmax(180px,.65fr) 1.35fr;gap:14px;align-items:end}.stock-preview{min-height:58px;border-radius:8px;background:#eef6f2;border:1px solid #d2e4dc;padding:10px 13px}.stock-preview b,.stock-preview span{display:block}.stock-preview span{color:var(--muted);font-size:11px;margin-top:5px}.component-lines{display:grid;gap:8px;margin-bottom:9px}.component-line{display:grid;grid-template-columns:1fr 20px 100px 38px;align-items:center;gap:7px}.component-line>span{text-align:center;font-weight:800}.component-remove{background:var(--red-bg);color:var(--red)}.import-errors{margin-top:9px;padding:9px;background:var(--red-bg);color:var(--red);border-radius:6px;line-height:1.6}@media(max-width:680px){.rule-toolbar{grid-template-columns:1fr}.component-line{grid-template-columns:1fr 16px 70px 36px}}

/* Product grouping and product/SKU imagery */
.product-groups{display:grid;gap:16px}.product-group{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.product-group-head{display:flex;align-items:center;gap:14px;padding:14px 16px;margin:0;background:linear-gradient(90deg,#f0f7f4,#fbfdfc);border-bottom:1px solid var(--line)}.product-group-title{min-width:0;flex:1}.product-group-title h3{margin:3px 0 5px;font:700 17px Georgia,"Songti SC",serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-group-title p{margin:0;color:var(--muted);font-size:12px}.product-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.product-toggle{display:flex;align-items:center;gap:8px;flex:0 0 auto;border:1px solid #c9dcd4;border-radius:99px;padding:9px 13px;background:#fff;color:var(--accent);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.product-toggle:hover{background:#eaf4ef}.product-toggle i{font-style:normal;font-size:16px;transition:transform .18s ease}.product-toggle[aria-expanded="true"] i{transform:rotate(180deg)}.product-sku-details[hidden]{display:none}.product-photo,.sku-photo{display:grid;place-items:center;overflow:hidden;flex:0 0 auto;background:#e8efec;color:#7b8c85;border:1px solid #d7e2dd}.product-photo{width:68px;height:68px;border-radius:10px}.sku-photo{width:46px;height:46px;border-radius:8px}.product-photo img,.sku-photo img{width:100%;height:100%;object-fit:cover}.image-empty span{padding:4px;text-align:center;font-size:10px;line-height:1.2}.grouped-sku-table th{background:#f8faf9}.sku-with-image{display:flex;align-items:center;gap:9px;min-width:175px}.sku-with-image small{display:block;color:var(--muted);margin-top:4px;max-width:150px;overflow:hidden;text-overflow:ellipsis}.media-editor{display:grid;grid-template-columns:1fr 1fr;gap:12px}.media-edit-card{display:grid;grid-template-columns:105px 1fr;gap:13px;align-items:center;background:#f3f7f5;border:1px solid var(--line);border-radius:9px;padding:12px}.media-edit-card b{font-size:13px}.media-edit-card p{font-size:11px;line-height:1.55;color:var(--muted);margin:5px 0 9px}.media-edit-preview{width:105px;height:105px;border-radius:9px;background:#dfe9e4;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:12px}.media-edit-preview img{width:100%;height:100%;object-fit:cover}.media-edit-card .action-row{gap:6px}.media-edit-card .btn{font-size:11px}.ownership-badge{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:99px;background:#e6f0ff;color:#315d91;font-size:10px}@media(max-width:900px){.product-group-head{align-items:flex-start;flex-wrap:wrap}.product-group-title{flex:1 1 calc(100% - 90px)}.product-head-actions{width:100%;margin-left:82px}}@media(max-width:760px){.media-editor{grid-template-columns:1fr}.media-edit-card{grid-template-columns:80px 1fr}.media-edit-preview{width:80px;height:80px}.product-head-actions{margin-left:72px;flex-wrap:wrap}.product-photo{width:58px;height:58px}}
.inventory-head-actions{display:flex;align-items:center;gap:12px}.bulk-stock-bar{display:grid;grid-template-columns:minmax(240px,1fr) minmax(220px,360px) auto;gap:14px;align-items:end;margin:-2px 0 16px;padding:14px 16px;background:#eaf4ef;border:1px solid #c5ddd3;border-left:4px solid var(--green);border-radius:8px}.bulk-stock-bar>div:first-child{display:grid;gap:4px}.bulk-stock-bar span{font-size:12px;color:var(--muted)}.bulk-stock-bar label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--muted)}.bulk-stock-input{width:84px;min-width:84px;padding:7px 8px;text-align:center;font:800 16px Georgia,serif}.bulk-stock-input.changed{border-color:var(--amber);background:#fff8e8;box-shadow:0 0 0 2px rgba(217,147,49,.12)}.bulk-stock-active .product-group{border-color:#b9d6ca}.bulk-stock-active .product-toggle:disabled{opacity:.65;cursor:default}.bulk-stock-active .row-manage{visibility:hidden}@media(max-width:900px){.bulk-stock-bar{grid-template-columns:1fr}.inventory-head-actions{align-items:flex-end;flex-direction:column}}

/* Selective Taobao inventory export */
.taobao-export-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:12px;align-items:center}.taobao-export-toolbar .action-row{flex-wrap:wrap}.taobao-product-options{display:grid;gap:8px;max-height:420px;overflow:auto;padding:2px}.taobao-product-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer}.taobao-product-option:has(input:checked){border-color:#69a78f;background:#edf7f2;box-shadow:0 0 0 2px rgba(67,140,114,.1)}.taobao-product-option input{width:17px;height:17px}.taobao-product-copy{min-width:0}.taobao-product-copy b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taobao-product-copy small{display:block;margin-top:5px;color:var(--muted);font-weight:400}.taobao-product-counts{text-align:right;white-space:nowrap}.taobao-product-counts b,.taobao-product-counts small{display:block}.taobao-product-counts small{margin-top:4px;color:var(--muted)}.taobao-export-footer{position:sticky;bottom:-24px;display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 -24px -24px;padding:14px 24px;background:#fff;border-top:1px solid var(--line)}.taobao-export-footer p{margin:0}.taobao-export-footer .modal-actions{flex:0 0 auto}@media(max-width:760px){.taobao-export-toolbar{grid-template-columns:1fr}.taobao-product-option{grid-template-columns:auto minmax(0,1fr)}.taobao-product-counts{grid-column:2;text-align:left}.taobao-export-footer{align-items:stretch;flex-direction:column}.taobao-export-footer .modal-actions{justify-content:stretch}.taobao-export-footer .btn{flex:1}}
.taobao-product-option.unavailable{background:#f6f7f7;opacity:.68;cursor:not-allowed}.taobao-product-counts .baseline-missing{color:var(--red);font-weight:700}

/* Qianniu sales-detail export reminder */
.sales-export-guide{border-top:3px solid #d49230}.sales-export-guide-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.sales-export-guide-head .badge{flex:0 0 auto}.sales-export-steps{counter-reset:sales-export-step;display:grid;gap:12px;margin:0;padding:0;list-style:none}.sales-export-steps li{counter-increment:sales-export-step;display:grid;grid-template-columns:34px minmax(0,1fr);gap:2px 11px;align-items:start;padding-bottom:12px;border-bottom:1px solid #edf1ef}.sales-export-steps li::before{content:counter(sales-export-step);grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e5f3ed;color:var(--green);font:800 14px Georgia,serif}.sales-export-steps li b{font-size:13px;line-height:1.55}.sales-export-steps li span{color:var(--muted);font-size:12px;line-height:1.65}.sales-export-guide-note{margin-top:14px;padding:11px 13px;border:1px solid #efd5a8;border-radius:8px;background:#fff6e8;color:#785019;font-size:12px;line-height:1.65}@media(max-width:680px){.sales-export-guide-head{align-items:flex-start;flex-direction:column}.sales-export-guide-head .badge{align-self:flex-start}}
