:root{font-family:Inter,system-ui,'Microsoft Yahei',Arial,sans-serif;color:#253146;background:#f5f7fb;font-synthesis:none;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:#2563eb}.shell{display:flex;min-height:100vh}.sidebar{width:238px;flex:none;background:#101e36;color:#e7eef8;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{height:103px;padding:25px 17px;display:flex;align-items:center;gap:12px;border-bottom:1px solid #263751}.brand-icon{height:40px;width:40px;display:grid;place-items:center;border-radius:12px;background:#2563eb;color:#fff;font-weight:900;font-size:20px}.brand strong{display:block;font-size:16px;letter-spacing:.2px}.brand small{display:block;color:#9fb0c8;font-size:10px;margin-top:3px}.sidebar nav{padding:19px 10px;display:grid;gap:3px;overflow-y:auto}.sidebar nav button{display:flex;align-items:center;gap:13px;border:none;text-align:left;border-radius:9px;color:#bdc9dc;background:transparent;padding:11px 15px;font-size:14px}.sidebar nav button:hover{background:#22344c;color:#fff}.sidebar nav button.active{background:#1d3b69;color:#fff;font-weight:700}.sidebar-foot{margin-top:auto;border-top:1px solid #263751;padding:17px;color:#b4c7dc;line-height:1.9;font-size:12px}.sidebar-foot small{color:#7e93ae}.status-dot{display:inline-block;background:#34d399;height:7px;width:7px;border-radius:100%;margin-right:8px}.main{flex:1;min-width:0;max-width:100%}.topbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:24px 35px 20px;border-bottom:1px solid #e5eaf1;background:#fff;position:sticky;top:0;z-index:5}.eyebrow{color:#8290a4;font-size:11px;letter-spacing:1.1px;text-transform:uppercase}h1{font-size:23px;font-weight:750;letter-spacing:-.5px;margin:4px 0 0}.top-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.env-pill{color:#86631a;background:#fff4db;border:1px solid #f5dfb1;border-radius:18px;padding:7px 10px;font-size:12px}.btn{border-radius:8px;border:1px solid #d6dfec;background:#fff;color:#30425e;padding:9px 13px;line-height:1.4;font-weight:550}.btn:hover{filter:brightness(.97)}.btn.primary{background:#2563eb;border-color:#2563eb;color:#fff}.btn.light{background:#eef4ff;color:#1556b8;border-color:#dfeafa}.btn.red{background:#fff1f2;border-color:#fecdd3;color:#be123c}.btn.green{background:#07835f;border-color:#07835f;color:white}.btn.tiny{padding:5px 9px;font-size:12px}.btn + .btn{margin-left:3px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}.toolbar .cluster{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.toolbar select,.toolbar input{background:#fff;min-height:37px}.section-title{font-size:17px;font-weight:750;color:#1e2c46;margin:0 0 6px}.subtext{color:#6a7a91;margin:0 0 18px;font-size:13px;line-height:1.6}.page{padding:27px 35px 45px;max-width:1500px;margin:0 auto}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.metric{background:#fff;border:1px solid #e2e9f2;border-radius:13px;padding:18px 19px;box-shadow:0 1px 1px rgba(20,40,70,.02)}.metric label{font-size:12px;color:#7c889b}.metric strong{font-size:28px;display:block;letter-spacing:-1px;margin-top:9px;color:#1d2c44}.metric span{font-size:11px;color:#93a2b6;display:block;margin-top:7px}.cols{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr);gap:16px}.panel{background:#fff;border:1px solid #e1e7f0;border-radius:13px;margin-bottom:17px;padding:18px 20px;box-shadow:0 1px 2px rgba(20,35,59,.025)}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 13px}.panel h3{font-size:15px;margin:0;color:#1d2a40}.panel p{line-height:1.6}.muted{color:#8692a4}.tiny{font-size:12px}.empty{padding:34px 14px;text-align:center;color:#8291a7}.empty strong{display:block;color:#43536d;margin-bottom:8px}.table-wrap{width:100%;overflow:auto;border-radius:9px;border:1px solid #e6ebf3}table{border-collapse:collapse;width:100%;white-space:nowrap;min-width:650px}th{text-align:left;font-size:12px;color:#74839a;font-weight:650;background:#f8fafd}td{color:#3a4b64;font-size:13px}td,th{padding:12px 12px;border-bottom:1px solid #edf0f6;vertical-align:top}tr:last-child td{border-bottom:0}tr:hover td{background:#fbfcff}.mono,code{font-family:ui-monospace,Consolas,monospace;font-size:12px}.money{font-variant-numeric:tabular-nums;font-weight:700;color:#263959}.badge{display:inline-block;border-radius:5px;font-size:11px;padding:3px 7px;line-height:1.5;font-weight:650;white-space:nowrap}.badge.good{background:#e6f7ef;color:#147a4e}.badge.warn{background:#fff1d6;color:#a4610c}.badge.bad{background:#ffe5e8;color:#b42339}.badge.neutral{background:#edf2f8;color:#607189}.trow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #edf1f6}.trow:last-child{border-bottom:0}.shopname{font-weight:650;color:#263b59}.progress{height:8px;background:#eaf0f7;border-radius:100px;overflow:hidden;margin-top:9px}.progress>div{height:100%;background:#397bea}.note{border-radius:10px;padding:12px 14px;background:#eef5ff;border:1px solid #dbe9ff;color:#3a5c90;line-height:1.6;font-size:13px;margin-bottom:15px}.note.warning{background:#fff6e6;border-color:#fde7bc;color:#936523}.note.danger{background:#fff0f0;border-color:#ffd2d2;color:#a03136}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:12px;color:#566783;font-weight:650}.field input,.field select,.field textarea,.toolbar input,.toolbar select{border:1px solid #d7e0ec;border-radius:8px;padding:9px 10px;min-width:0;outline:none;color:#243650}.field textarea{min-height:100px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#4b8ef2;box-shadow:0 0 0 3px #e4efff}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.modal-layer{position:fixed;inset:0;background:rgba(15,29,50,.57);z-index:20;display:flex;align-items:center;justify-content:center;padding:22px}.modal-layer[hidden]{display:none}.modal{width:min(660px,100%);max-height:92vh;overflow-y:auto;background:#fff;border-radius:15px;padding:23px;box-shadow:0 22px 65px rgba(5,15,30,.25)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px}.modal h2{font-size:18px;margin:0}.icon-btn{border:0;background:#f1f4f9;border-radius:9px;width:33px;height:33px;font-size:23px;color:#62738b}.order-lines{white-space:normal;min-width:180px;max-width:310px;font-size:12px;line-height:1.6}.order-lines div{border-bottom:1px dashed #dbe3ed;padding:2px 0}.order-lines div:last-child{border:0}#notice{position:fixed;right:26px;top:94px;max-width:460px;z-index:12;pointer-events:none}#notice:not(:empty){background:#183e70;color:#fff;box-shadow:0 8px 25px #12284433;padding:13px 17px;border-radius:9px}.scan-box{background:#f8fbff;border:1px solid #cbdff8;border-radius:12px;padding:26px;margin-bottom:17px;max-width:770px}.scan-control{font-size:18px;padding:15px 16px!important;width:100%;height:58px;border:2px solid #a8c7f4!important;letter-spacing:.8px}.scan-result{margin-top:20px}.scan-result h3{margin-top:0}.list-tags{display:flex;flex-wrap:wrap;gap:6px}.tag{font-size:12px;color:#4a6488;background:#eef4fa;border-radius:6px;padding:6px 8px}.footnote{font-size:11px;color:#a3adbb;border-top:1px solid #e9eef5;padding:15px 35px;background:#fff}.over{white-space:normal}.right{text-align:right}.hr{border:0;border-top:1px solid #edf0f5;margin:18px 0}.cards3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.inline-help{font-size:11px;color:#91a1b3}.danger-text{color:#bd3343}.good-text{color:#078255}.caption{color:#93a0b1;font-size:11px;margin-top:8px}@media(max-width:1000px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.cols{grid-template-columns:1fr}.sidebar{width:200px}.page{padding:20px}.topbar{padding:18px 20px}.cards3{grid-template-columns:1fr 1fr}}@media(max-width:680px){.shell{display:block}.sidebar{height:auto;width:100%;position:static}.brand{height:auto;padding:12px}.sidebar nav{display:flex;overflow-x:auto;padding:6px}.sidebar nav button{white-space:nowrap}.sidebar-foot{display:none}.topbar{position:static;display:block}.top-actions{margin-top:14px}.page{padding:15px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}.metric strong{font-size:22px}.cards3{grid-template-columns:1fr}}
/* V2.0 design overrides */
:root{color:#182c46;background:#f3f6fb}.page{max-width:none;padding:22px 28px}.sidebar{width:228px;background:#10213e}.sidebar nav button.active{background:#2254a0}.metrics{grid-template-columns:repeat(5,minmax(160px,1fr));gap:12px}.metric strong{font-size:26px}.metric{min-height:108px}.pill-status{display:inline-block;padding:7px 11px;border:1px solid #dce5f2;border-radius:16px;color:#647c9d;background:#f5f8fd;font-size:11px}.timebox{white-space:normal;line-height:1.75;min-width:154px;font-size:11px}.timebox b{color:#59708c;font-weight:600}.img-mini{width:46px;height:46px;border-radius:6px;object-fit:cover;border:1px solid #e5eaf4;background:#eef2f7}.line-item{display:flex;align-items:center;gap:8px;margin:4px 0;min-width:210px}.line-item small{display:block;color:#7789a0;white-space:normal}.order-links{display:flex;gap:6px;align-items:center}.mono{font-size:11px}.copybtn{border:1px solid #bdd7ff;border-radius:6px;background:#edf5ff;color:#0d65b3;font-size:11px;padding:4px 7px}.days{display:inline-grid;place-items:center;min-width:62px;border-radius:8px;font-size:12px;font-weight:800;padding:9px 5px}.days.ok{background:#e7f7ec;color:#159357}.days.warning{background:#fff1d7;color:#ae6200}.days.critical{background:#ffe4e8;color:#ce2941}.small-select{padding:7px 6px;border:1px solid #d8e3f2;border-radius:7px;background:#fff;font-size:12px;max-width:135px;min-width:95px}.choice-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px}.choice-bar input,.choice-bar select{padding:10px;border:1px solid #dce4ee;border-radius:7px;background:#fff}.choice-bar input{min-width:310px;flex:1}.table-wrap table{min-width:1250px}.check-center{width:28px;text-align:center}.one-line{white-space:nowrap}.small-light{color:#8a9ab1;font-size:11px}.primary-link{color:#135dc7;font-weight:650}.split-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.donut-wrap{display:flex;align-items:center;justify-content:center;gap:24px}.donut{width:178px;height:178px;flex:none;border-radius:50%;position:relative;box-shadow:inset 0 0 1px rgba(0,0,0,.1)}.donut:after{content:'';position:absolute;inset:42px;background:#fff;border-radius:50%}.donut-center{z-index:1;position:absolute;inset:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;font-size:22px}.donut-center small{font-size:10px;color:#8393a7;font-weight:400}.legend{display:flex;flex-direction:column;gap:9px;min-width:140px}.legend button{border:0;background:transparent;display:flex;align-items:center;gap:7px;text-align:left;color:#394b66;font-size:12px;cursor:pointer}.legend button:hover{text-decoration:underline}.swatch{display:inline-block;width:10px;height:10px;border-radius:4px;flex:none}.date-tabs{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.date-tabs button{border:1px solid #e2e9f3;background:#fff;color:#61738e;padding:8px 12px;border-radius:7px}.date-tabs button.active{background:#2563eb;color:white;border-color:#2563eb}.stat-pills{display:flex;gap:8px;flex-wrap:wrap}.stat-pills .tag{display:flex;align-items:center;gap:4px}.order-amount{font-size:15px;font-weight:800;color:#162b46}.negative{color:#c92e40;font-weight:800}.image-upload{border:1px dashed #aabfdc;background:#f9fbff;border-radius:9px;min-height:100px;display:flex;align-items:center;justify-content:center;cursor:pointer;gap:8px}.image-upload img{width:88px;height:88px;object-fit:cover;border-radius:8px}.form-help{color:#8a9aaf;font-size:11px;line-height:1.6}.scan-highlight{background:#f0f8ff;border:1px solid #c6ddfa;padding:16px;border-radius:13px;max-width:780px}.scan-control{width:100%;font-size:22px;font-family:Consolas,monospace;font-weight:650;padding:17px;border:2px solid #72acfc;border-radius:12px}.scan-feedback{font-size:15px;font-weight:700;border-radius:9px;padding:14px;margin-top:12px}.scan-feedback.good{background:#e6faf1;color:#08714f}.scan-feedback.bad{background:#fff0f0;color:#b42b34}.table-mono{font-family:Consolas,monospace;font-size:11px}.toolbar-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 12px;flex-wrap:wrap}.toolbar-actions .btn{padding:7px 11px}.table-select{max-width:120px;min-width:95px}.visual-note{font-size:11px;color:#7d8da5;line-height:1.7;margin-top:12px}.modal{width:min(800px,calc(100vw - 36px))}.controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.controls input[type=number]{max-width:95px}.scan-card{background:#fff;border:1px solid #dbe5f3;padding:15px;border-radius:10px;margin-top:12px}.soft-muted{color:#7d8fa7}@media(max-width:1220px){.metrics{grid-template-columns:repeat(3,1fr)}.split-two{grid-template-columns:1fr}.sidebar{width:208px}}@media(max-width:720px){.sidebar{width:100%}.metrics{grid-template-columns:repeat(2,1fr)}.page{padding:14px}.donut-wrap{flex-wrap:wrap}}

/* V3 SKU photo hover; show image without clicks */
.line-item .img-mini.hover-photo:hover,.img-mini.hover-photo:hover{position:relative;z-index:14;cursor:zoom-in}
.line-item{position:relative}.line-item .hover-photo:hover{box-shadow:0 0 0 2px #2563eb}
.photo-zoom{position:fixed;pointer-events:none;z-index:99999;width:360px;max-height:440px;object-fit:contain;background:white;border:1px solid #cdd9ea;border-radius:10px;box-shadow:0 12px 44px #172d4a44;padding:6px;display:none}
.line-item button{margin-top:3px;font-size:11px}

/* V3.1 shop scope and incomplete record filters */
.overview-shop-control{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:650;color:#405878;margin-right:7px;padding:2px 0}
.overview-shop-control select{min-width:175px;max-width:270px;background:#fff;border:1px solid #cddcf1;color:#17365f;border-radius:8px;padding:8px 9px;font-weight:650;outline:none}
.overview-shop-control select:focus{border-color:#3974e6;box-shadow:0 0 0 2px #dce8ff}

/* V3.2 three-stage order panels */
.three-stage-table .sku-aggregate{padding:5px 2px;display:flex;flex-direction:column;gap:2px;border-bottom:1px dashed #e0e9f5;min-width:100px}
.sku-aggregate b{font-size:16px;color:#b5213a}.sku-aggregate small{font-size:10px;color:#8190a5}
.three-stage-table th{white-space:nowrap}.three-stage-table td{vertical-align:top;padding-top:14px;padding-bottom:14px}
.photo-missing{display:grid;place-items:center;color:#9eafc5;background:#edf2f8;border-radius:6px}
.sidebar nav button[data-page="purchased"],.sidebar nav button[data-page="shipped"]{padding-left:31px}
@media(max-width:1300px){.three-stage-table{min-width:1450px}}
/* V3.3: purchase grouping and compact product/photo ledgers */
.buy-group{background:#fff;border:1px solid #dfe8f5;border-radius:12px;margin:0 0 14px;overflow:hidden}
.buy-group-head{display:flex;align-items:center;gap:18px;justify-content:space-between;background:#f7faff;padding:13px 16px;border-bottom:1px solid #e6ecf5}
.buy-group-head input[type="checkbox"]{height:17px;width:17px;flex:none}
.buy-group-spu{display:flex;align-items:center;gap:11px;flex:1}
.buy-group-spu small{display:block;color:#70839c;font-size:11px;margin-top:3px}
.buy-group-total{font-weight:800;color:#b31f39;background:#ffecef;padding:8px 11px;border-radius:7px;white-space:nowrap}
.buy-group .table-wrap{border:0;border-radius:0}.buy-group table{min-width:600px}.buy-group table td,.buy-group table th{padding:9px 16px}
.sku-compact{display:flex;align-items:center;gap:10px;min-width:155px}.sku-compact .img-mini{flex:none}.sku-compact b{font-size:12px;color:#24406a}
.need-count{font-size:16px;color:#b42342}.purchase-type-controls{background:#fff;padding:10px 12px;border:1px solid #e1eafa;border-radius:9px}
.purchase-type-controls label{display:flex;align-items:center;gap:8px;font-size:12px;color:#4d6280}
.group-sku-header{display:flex;align-items:center;justify-content:space-between;margin-top:17px;margin-bottom:10px}
.group-sku-header h3{margin:0}.group-sku-row{border:1px solid #dbe5f5;border-radius:10px;margin:10px 0;padding:13px;background:#f9fbff}
.group-sku-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}
.sku-select-wrap{display:flex;gap:12px;align-items:center}.sku-select-wrap select{min-width:0;flex:1}.sku-select-wrap .sku-compact{min-width:0}
.three-stage-table .line-item{min-height:100px;align-items:flex-start;padding:4px 0}
.three-stage-table .sku-aggregate{height:100px;justify-content:center;box-sizing:border-box;margin:4px 0}
.empty-state{padding:24px;color:#6d7e96;text-align:center}
@media(max-width:800px){.buy-group-head{flex-wrap:wrap}.buy-group-spu{flex:1 1 80%}.sku-compact{min-width:120px}}

/* V3.4 unified SPU/SKU selectors and procurement filters */
.sku-search-bar input{flex:1;min-width:280px;max-width:690px}.qty-button-strip{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.qty-button-strip strong{font-size:12px;color:#344767}.qty-button-strip .btn{padding:7px 9px;white-space:nowrap}
.buy-group-selected{border:2px solid #3169e8;background:#fafcff}.buy-group-hint{padding:11px 18px;color:#6c7890;font-size:12px;background:#f7f9fd}.buy-group-head{cursor:default}
.visual-sku-picker{display:flex;flex-direction:column;gap:8px}.visual-sku-query{width:100%;box-sizing:border-box}.visual-sku-options{max-height:310px;overflow-y:auto;border:1px solid #d9e1ee;border-radius:10px;background:white}.sku-picker-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;border:0;border-bottom:1px solid #eef1f7;background:white;text-align:left;padding:7px 10px;cursor:pointer}.sku-picker-option:hover,.sku-picker-option.chosen{background:#eaf1ff}.sku-picker-option .img-mini{width:40px;height:40px}.sku-picker-option small{font-size:11px;color:#72839d}.sku-picker-selected{padding:8px 10px;background:#f4f7fd;border-radius:7px;min-height:37px}

/* V3.4.2 procurement overview: 100-SPU paging and accurate cross-page selection */
.buy-summary-toolbar{align-items:center;gap:12px}
.buy-toolbar-right{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:13px;flex-wrap:wrap}
.buy-page-stats{white-space:nowrap;color:#64748b;font-size:12px}
.buy-page-stats b{color:#1e3656;font-size:13px;font-variant-numeric:tabular-nums}
.buy-pager{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.buy-pager b{font-size:12px;white-space:nowrap;color:#233a5e;font-variant-numeric:tabular-nums}
#buyPageJump{width:56px;height:31px;border:1px solid #d5dff0;border-radius:7px;padding:4px 6px;font-size:12px;text-align:center}
.buy-pager-bottom{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap;margin:18px 0 4px}
@media(max-width:1100px){.buy-toolbar-right{width:100%;justify-content:flex-start}}

/* V3.5 SPU-first purchasing and stock */
.spu-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px;padding:8px 0 10px}
.spu-catalog-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fafcff;border:1px solid #dfE7f5;border-radius:10px;padding:12px}
.spu-catalog-info{display:flex;gap:12px;align-items:center;min-width:0}.spu-catalog-info strong{display:block;color:#21416d;font-size:12px;overflow-wrap:anywhere}
.spu-catalog-info small,.spu-selector-label small{display:block;font-size:11px;color:#73839a;margin-top:5px}
.spu-selector-list{max-height:55vh;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:8px 1px}
.spu-modal-search{width:100%;margin-top:12px;padding:11px;border:1px solid #c7d6ea;border-radius:9px}
.spu-selector-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border:1px solid #dce6f4;border-radius:9px;background:#fff;color:#253b60;text-align:left;cursor:pointer}
.spu-selector-item:hover{background:#f2f7ff;border-color:#6698e8}.spu-selector-pic{flex:none}.spu-selector-label{flex:1;min-width:0;overflow-wrap:anywhere}
.spu-batch-top{display:flex;align-items:center;gap:12px;padding:11px;background:#f3f7ff;border-radius:9px}.spu-batch-top b{display:block}.spu-batch-top small{display:block;margin-top:6px;color:#64768e}
.spu-batch-rows{max-height:46vh;overflow-y:auto;margin-top:12px}.spu-batch-sku{display:flex;align-items:center;gap:12px;border-bottom:1px solid #e3eaf5;padding:10px 0}
.spu-batch-sku-image{flex:none}.spu-batch-desc{flex:1;min-width:0}.spu-batch-desc b{display:block}.spu-batch-desc small{display:block;color:#6c7890;font-size:11px;margin-top:3px}
.spu-batch-fields{display:flex;gap:8px;align-items:center}.spu-batch-fields label{font-size:11px;color:#526886}.spu-batch-fields input{display:block;width:110px;margin-top:4px;padding:8px;border:1px solid #cedbf0;border-radius:7px}
@media(max-width:700px){.spu-catalog{grid-template-columns:1fr}.spu-batch-sku{flex-wrap:wrap}.spu-batch-fields{width:100%;margin-left:57px}}

/* V3.5.2 SPU-consistent procurement/inventory accordion display */
.spu-ledger-group{background:#fff;border:1px solid #dfe8f5;border-radius:11px;margin:11px 0;overflow:hidden}
.spu-ledger-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px;background:#f7faff}
.spu-ledger-bar .spu-catalog-info{flex:1}
.spu-ledger-expand{border-top:1px solid #e5ecf5}
.spu-ledger-expand>summary{cursor:pointer;padding:10px 16px;color:#345780;font-size:12px;font-weight:650;list-style-position:inside}
.spu-ledger-expand[open]>summary{background:#f8faff;border-bottom:1px solid #e6ecf5}
.spu-ledger-expand .table-wrap{border:0;border-radius:0}
.spu-ledger-expand table{min-width:650px}
.spu-ledger-expand td,.spu-ledger-expand th{padding:9px 13px}
.spu-ledger-expand td>.img-mini{vertical-align:middle;margin-right:6px}
@media(max-width:650px){.spu-ledger-bar{flex-wrap:wrap}.spu-ledger-bar .btn{margin-left:auto}}

/* V3.5.4: compact SPU > style > SKU folding, matching procurement/inventory/catalog. */
.sku-style-container{padding:9px 12px;background:#fafcff}
.sku-style-group{border:1px solid #dce6f4;background:#fff;border-radius:9px;margin:8px 0;overflow:hidden}
.sku-style-group>summary{list-style:none;cursor:pointer;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#1c487d;background:#f3f7ff;font-size:13px}
.sku-style-group>summary::-webkit-details-marker{display:none}
.sku-style-group>summary:before{content:'▸';color:#537cad;margin-right:6px}
.sku-style-group[open]>summary:before{content:'▾'}
.sku-style-group[open]>summary{border-bottom:1px solid #e2eaf5}
.sku-style-title{font-weight:750;flex:1}.sku-style-count{font-weight:450;font-size:11px;color:#7185a2}
.sku-style-group .table-wrap{border:0;border-radius:0}
.sku-style-group table{min-width:650px}
.sku-style-group table th,.sku-style-group table td{padding:9px 12px}
.sku-style-editor-body{padding:9px 13px}
.sku-photo-box{display:flex;align-items:center;gap:12px;background:#fff;padding:10px;border:1px solid #e3eaf4;border-radius:9px;margin:9px 0 12px}
.sku-photo-preview{flex:none;width:72px;height:72px;display:grid;place-items:center;background:#edf2f8;color:#8290a3;font-size:12px;border-radius:8px;overflow:hidden}
.sku-photo-preview img{width:100%;height:100%;object-fit:cover}
.sku-photo-label{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.sku-photo-label small{color:#71829b}
.sku-photo-label .btn{align-self:flex-start}
@media(max-width:700px){.sku-style-container{padding:5px}.sku-photo-box{align-items:flex-start}.sku-style-group>summary{flex-wrap:wrap}}

/* V3.5.5 — thumbnail-first SPU tiles, unified across four business screens. */
.spu-tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:13px 0}
.spu-tile{display:flex;align-items:center;gap:8px;min-width:0;height:88px;box-sizing:border-box;border:1px solid #d7e4f7;border-radius:11px;padding:9px 10px;background:#fff;box-shadow:0 1px 2px #122e5707;transition:border-color .15s,background .15s}
.spu-tile:hover{border-color:#76a0eb;background:#f8fbff}.spu-tile.tile-checked{border:2px solid #3271ed;background:#f3f8ff}
.spu-tile-main{display:flex;align-items:center;gap:9px;flex:1;min-width:0;cursor:pointer;border:0;padding:0;background:transparent;color:inherit;text-align:left}
.spu-tile .tile-img{width:48px;height:48px;flex:none;object-fit:cover;border-radius:7px;background:#eef3fa;border:1px solid #edf0f7}
.spu-tile .tile-no-img{display:grid;place-items:center;font-size:10px;color:#8b9ab2}
.spu-tile .tile-text{display:flex;flex-direction:column;min-width:0;gap:6px}.spu-tile .tile-text strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#17396b;font-weight:760}
.spu-tile .tile-text small{font-size:11px;color:#71839e;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.spu-tile .tile-demand{color:#ca304f;font-size:12px}
.spu-tile .tile-open{flex:none;white-space:nowrap;font-size:11px;padding:8px 10px;border-radius:7px}
.spu-tile .tile-check{flex:none;margin:0 2px 0 0;width:16px;height:16px}
.tile-page-controls{margin:14px 0 8px;display:flex;align-items:center;justify-content:flex-end;gap:9px;color:#60718a;font-size:12px}
.tile-dialog-head{display:flex;align-items:center;gap:12px;padding:11px;background:#f5f8ff;border:1px solid #e2eaf6;border-radius:9px}
.tile-dialog-head b{display:block;font-size:14px}.tile-dialog-head small{display:block;margin-top:6px;color:#72859e;font-size:12px}
.tile-dialog-scroll{max-height:55vh;overflow-y:auto;margin-top:8px}.tile-dialog-scroll .sku-style-group{margin:6px 0}
#modal:has(.tile-dialog-head) .modal{width:min(1050px,calc(100vw - 40px))}
@media(max-width:1350px){.spu-tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1120px){.spu-tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:710px){.spu-tile-grid{grid-template-columns:1fr}.spu-tile{height:78px}.tile-page-controls{justify-content:flex-start}}

/* V3.5.6: Editable SKU rows in the FIRST SPU dialog; no extra Edit/Adjust modal. */
.inline-sku-scroll{max-height:58vh;overflow:auto;overscroll-behavior:contain}
.inline-sku-table{width:100%;min-width:900px;table-layout:auto}
.inline-sku-table.stock-sku-table{min-width:680px}
.inline-sku-table td,.inline-sku-table th{vertical-align:middle;padding:8px 10px}
.inline-sku-table input{border:1px solid #cbd8ee;border-radius:7px;background:#fff;padding:9px 8px;color:#1c3456;min-height:37px;width:100%;min-width:0;outline:none}
.inline-sku-table input:focus{border-color:#3378e9;box-shadow:0 0 0 2px #e6efff}
.inline-sku-table .inline-sku-num{width:110px;min-width:95px}
.inline-sku-table .inline-sku-text{width:150px;min-width:120px}
.inline-sku-identity{display:flex;gap:9px;align-items:center;min-width:152px}
.inline-sku-identity>div:last-child{display:flex;flex-direction:column;gap:5px;min-width:0}
.inline-photo-pick{color:#2462bc;cursor:pointer;font-size:11px;text-decoration:underline;text-underline-offset:2px}
.inline-photo-origin,.inline-stock-hint{display:block;color:#899ab0;font-size:10px;white-space:normal}
.inline-stock-toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.inline-stock-toolbar label{font-size:12px;color:#536887;display:flex;align-items:center;gap:7px}
.inline-stock-toolbar input,.inline-stock-toolbar select{background:#fff;border:1px solid #ccd9ed;border-radius:7px;padding:8px 10px;min-height:37px}
.inline-save-bar{position:sticky;bottom:-22px;background:#fff;padding:11px 0 0;border-top:1px solid #e9eff7;align-items:center;z-index:2;flex-wrap:wrap}
.inline-save-bar .small-light{margin-right:auto;max-width:310px}
.purchase-history-fold{margin:20px 0 0;background:#fff;border:1px solid #d9e4f4;border-radius:10px;overflow:hidden}
.purchase-history-fold>summary{padding:15px 18px;background:#eff5fe;color:#24446f;font-weight:700;cursor:pointer}
.purchase-history-fold .table-wrap{max-height:360px;overflow:auto}
#modal:has(.inline-sku-table) .modal{width:min(1170px,calc(100vw - 36px));max-height:94vh}
@media(max-width:760px){.inline-stock-toolbar{display:grid}.inline-sku-scroll{max-height:55vh}.inline-save-bar{bottom:-10px}}

/* V3.6.0 quality-of-life additions */
.tile-text .tile-cost{font-size:12px;font-weight:750;color:#134f95;line-height:1.35}.tile-text .tile-progress{font-size:10px;color:#617990}.tile-negative{font-style:normal;color:#cb243c;font-weight:800}
.bulk-style-editor{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;padding:10px 13px;background:#f0f6ff;border-bottom:1px solid #d5e4ff}.bulk-style-editor label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:650}.bulk-style-editor input,.bulk-style-editor select{width:133px;box-sizing:border-box;border:1px solid #d4dff0;border-radius:6px;padding:7px 9px;background:#fff}.bulk-style-editor small{color:#74859b;font-size:10px}.diag-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.diag-card{border:1px solid #dce6f5;background:#fff;border-radius:9px;overflow:hidden}.diag-card summary{padding:12px;cursor:pointer}.diag-card summary b,.diag-card summary small{display:block}.diag-card summary small{font-weight:400;font-size:11px;margin-top:4px;color:#7c8ea8}.diag-items{max-height:210px;overflow:auto;padding:10px;border-top:1px solid #e5ebf3;font-size:11px;display:flex;gap:5px;flex-wrap:wrap}.diag-items span{padding:5px 7px;border:1px solid #e1e7f1;background:#f4f7fb;border-radius:5px}.scan-feedback{font-size:17px}.scan-feedback.good{border:2px solid #18a26b}.scan-feedback.bad{border:2px solid #e44c56}@media(max-width:1050px){.diag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.diag-grid{grid-template-columns:1fr}}
.spu-tile .tile-text{flex:1;min-width:0;gap:3px}.spu-tile .tile-text .tile-cost,.spu-tile .tile-text .tile-progress{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spu-tile .tile-text .tile-cost{font-size:11px;color:#1556a1}.spu-tile .tile-text .tile-progress{font-size:10px;color:#7689a3}

/* V3.6.0 - Daily folding of purchased and shipped orders */
.daily-orders-group{border:1px solid #dbe5f2;background:#fff;border-radius:11px;overflow:hidden;margin:0 0 12px}.daily-orders-head{display:flex;align-items:stretch;justify-content:space-between;background:#f6f9ff;gap:8px;min-height:58px}.daily-day-toggle{flex:1;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:12px;border:0;background:transparent;color:#1b365b;text-align:left;font:inherit;cursor:pointer;padding:13px 16px}.daily-day-toggle:hover{background:#eef4ff}.daily-day-toggle strong{font-size:15px}.daily-arrow{font-size:20px;color:#3169bc}.daily-stat{font-size:12px;color:#57708f;background:#e8effa;padding:5px 8px;border-radius:8px}.daily-day-check{display:flex;align-items:center;gap:7px;padding:10px 15px;border-left:1px solid #e1e9f6;font-size:12px;white-space:nowrap;color:#4e6685;cursor:pointer}.daily-day-check input{width:17px;height:17px}.daily-orders-group .table-wrap{margin:0}.daily-orders-group .three-stage-table{margin:0}.daily-more{display:flex;align-items:center;justify-content:center;gap:15px;padding:12px;border-top:1px solid #e3eaf4;font-size:12px;color:#60738e}@media(max-width:820px){.daily-orders-head{flex-wrap:wrap}.daily-day-check{border-left:0;border-top:1px solid #e1e9f6;width:100%;padding:8px 16px}}
/* V4 additions, existing V3.6 layouts intentionally retained. */
.zyy-bill{background:#f4f8ff;border:1px solid #dde8fc;padding:8px;margin:6px 0;border-radius:9px;min-width:260px}
.zyy-bill-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:5px;font-size:11px}
.zyy-bill-row{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-bottom:4px}
.zyy-bill-input{width:175px;min-height:30px;border:1px solid #bdd0ec;border-radius:6px;padding:5px}
.zyy-bill-courier{width:100px;min-height:30px;border:1px solid #bdd0ec;border-radius:6px;padding:5px}
.zyy-bill-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.zyy-bill-toolbar input{max-width:220px;padding:7px;border:1px solid #ccd5e5;border-radius:7px}
.zyy-shipment-widget{border-top:1px solid #d3dcea;margin-top:7px;padding-top:7px;min-width:240px}
.zyy-shipment-widget>b{font-size:12px}.zyy-ship-item{padding:7px 0;border-bottom:1px dotted #c8d5e8;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.zyy-ship-item>div{display:flex;gap:4px;flex-wrap:wrap;align-items:center;width:100%}.zyy-actual-input{width:75px;border:1px solid #baccdd;padding:5px;border-radius:6px}
.zyy-unweighed{background:#fff3cf;color:#845400;border:1px solid #f1d491}
.zyy-import-preview{background:#fff;padding:18px;border:1px solid #9dbbf2;border-radius:10px;margin:12px 0;max-height:420px;overflow:auto}
.zyy-import-preview pre,.zyy-tracking-result{white-space:pre-wrap;word-break:break-all;font-size:12px;max-height:350px;overflow:auto}
.zyy-unfilled{display:inline-block;border-radius:6px;background:#ffefc1;color:#9c4f00;padding:2px 5px;font-weight:600}
.zyy-scope-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(195px,1fr));gap:8px;padding:12px;background:#f6f9ff;border-radius:8px}.zyy-grant-form>label{display:block;margin:8px 0}.zyy-grant-form input[name=username]{margin-left:8px;padding:7px;border:1px solid #cbd5e1;border-radius:6px}
