:root{font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;color:#282635;background:#f5f6fa;font-size:14px;--purple:#6757d9;--line:#e8e8f0;--muted:#777688}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #dcdde9;background:white;color:inherit;border-radius:7px;padding:9px 13px;line-height:1.4}button:hover{border-color:#a69be7;background:#f8f7ff}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--purple);color:white;border-color:var(--purple)}button.danger{color:#bd3e3e}button.text{color:var(--purple);border:0;background:transparent;padding:6px}button.small{padding:6px 9px;font-size:13px}.wide{width:100%}input,select,textarea{border:1px solid #dcdde9;border-radius:7px;padding:10px;background:white;min-width:0;color:inherit}input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid #afa4ef;outline-offset:2px}label{display:flex;flex-direction:column;gap:7px;line-height:1.5}input[type=checkbox]{width:18px;height:18px}label.check{flex-direction:row;align-items:center}h1,h2,h3,p{margin-top:0}h1{font-size:26px;margin-bottom:7px}h2{font-size:18px}h3{font-size:16px}p{line-height:1.7}small,.muted{color:var(--muted);font-size:12px}small{line-height:1.6}strong{font-weight:600}[hidden]{display:none!important}.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 80% 20%,#e4e0ff,transparent 55%),#f7f7fb;padding:24px}.login-card{background:white;width:min(420px,100%);padding:34px;border:1px solid var(--line);border-radius:18px;box-shadow:0 25px 90px #33256912}.login-card label{margin:17px 0}.login-card>small{display:block;margin-top:16px}.login-card>p{color:var(--muted)}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:12px;letter-spacing:.06em;white-space:nowrap}.brand i{display:grid;place-items:center;width:36px;height:36px;background:var(--purple);color:white;border-radius:10px;font-size:23px;font-style:normal}.brand small{display:block;letter-spacing:0;font-weight:400}.login-card .brand{margin-bottom:35px}.shell{display:flex;min-height:100vh}aside{width:224px;flex:none;background:white;border-right:1px solid var(--line);padding:28px 15px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;z-index:4}aside .brand{padding:0 8px}.warehouse-label{margin:26px 8px 22px;background:#f6f5fc;padding:12px;border-radius:9px;font-size:12px;color:var(--muted)}.warehouse-label strong{display:block;font-size:14px;margin-top:5px;color:#474453}nav{display:flex;flex-direction:column;gap:4px;overflow:auto}nav button{display:flex;align-items:center;gap:12px;padding:11px 14px;background:transparent;border:0;text-align:left;color:#6d6a7a}nav button i{font-size:18px;width:20px;font-style:normal}nav button.active{background:#efecff;color:var(--purple);font-weight:600}nav .nav-caption{font-size:12px;color:#9996a8;margin:14px 12px 5px}.nav-count{margin-left:auto;background:#fbe7d8;color:#ad6431;border-radius:5px;padding:1px 6px;font-size:12px}.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding:18px 8px 0;display:flex;align-items:center;justify-content:space-between;font-size:13px}.sidebar-footer small{display:block}main{margin-left:224px;flex:1;min-width:0}.topbar{height:66px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line);padding:0 30px;gap:12px}.topright{display:flex;align-items:center;gap:18px;font-size:12px;color:var(--muted)}#connection{color:#198565}.page{padding:28px 30px 50px;max-width:1700px;margin:auto}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.heading p{margin:0;color:var(--muted)}.actions{display:flex;flex-wrap:wrap;gap:8px}.eyebrow{font-size:12px;letter-spacing:.13em;color:var(--purple);margin-bottom:8px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.metric{padding:20px;border-radius:12px;border:1px solid #dfdeed;background:#fff}.metric:nth-child(2){background:#efecff}.metric:nth-child(3){background:#eaf6f0}.metric:nth-child(4){background:#fff4df}.metric>span{color:#666174;display:block}.metric strong{display:block;font-size:28px;margin:14px 0 7px}.metric strong small{font-size:14px;font-weight:400;margin-left:5px}.metric p{font-size:12px;margin-bottom:0;color:var(--muted)}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;margin-bottom:20px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 21px;border-bottom:1px solid var(--line)}.panel-head h2,.panel-head h3{margin:0}.panel-body{padding:20px}.grid2{display:grid;grid-template-columns:1.55fr 1fr;gap:20px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:16px 20px;border-bottom:1px solid var(--line)}.toolbar input[type=search]{width:320px;max-width:100%}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-weight:500;font-size:12px;color:#838091;background:#f9f9fc;padding:12px 18px;border-bottom:1px solid var(--line)}td{padding:15px 18px;border-bottom:1px solid #eeedf3;font-size:14px}td small{display:block}tr:last-child td{border-bottom:0}tbody tr:hover{background:#fdfcff}.num{font-variant-numeric:tabular-nums;font-weight:600}.sku-code{font-family:Consolas,monospace;color:#757085;font-size:12px}.badge{display:inline-block;font-size:12px;padding:4px 8px;border-radius:5px;background:#f0edff;color:#6757bf}.badge.good{background:#e9f6ee;color:#278358}.badge.warn{background:#fff2d4;color:#a77712}.badge.bad{background:#fdeaea;color:#b84949}.badge.gray{background:#f0f0f4;color:#7e7a89}.empty{padding:40px!important;text-align:center;color:var(--muted);white-space:normal}.tabs{display:flex;flex-wrap:wrap;gap:4px;padding:10px 16px;border-bottom:1px solid var(--line)}.tabs button{border:0;color:#777281;background:transparent}.tabs button.active{background:#ede9ff;color:var(--purple)}.tabs b{font-weight:400;margin-left:6px;font-size:12px}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}.quick{padding:19px;text-align:left;background:#fff;border-color:var(--line);border-radius:10px}.quick i{display:block;color:var(--purple);font-style:normal;font-size:24px;margin-bottom:12px}.quick strong{display:block;font-size:15px}.quick small{display:block;margin-top:5px}.activity{display:flex;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.activity:last-child{border:0}.activity .delta{font-size:18px;width:50px;flex:none;color:#218862}.activity .delta.neg{color:#c56843}.activity p{margin:3px 0;font-size:13px}.activity time{color:var(--muted);font-size:12px}.notice{background:#f6f3ff;padding:13px 16px;border-radius:8px;margin:14px 0;color:#665d85;line-height:1.7;font-size:13px}.notice.warn{background:#fff7e4;color:#926819}.notice.good{background:#edf8f1;color:#27744c}.product-title{display:flex;align-items:center;gap:12px}.product-thumb{width:38px;height:38px;background:#ece8ff;border-radius:9px;display:grid;place-items:center;color:var(--purple);overflow:hidden;font-size:16px;flex:none}.product-thumb img{width:100%;height:100%;object-fit:cover}.product-title small{display:block}.group-row td{background:#f6f5fc;font-size:13px;font-weight:600}.group-row span{font-weight:400;margin-left:12px;color:var(--muted)}.scan-strip{display:flex;gap:10px;align-items:center;background:#f4f2ff;padding:15px;border-radius:9px;margin-bottom:18px}.scan-strip input{flex:1;min-width:80px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.form-grid .full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.line-tools{display:flex;gap:10px;align-items:flex-end;margin:18px 0}.line-tools label{flex:1}.line-tools .qty-field{max-width:100px}.line-editor input{width:95px}.line-editor .note-input{width:160px}.line-editor td{padding:10px}.editor-title{display:flex;justify-content:space-between;align-items:center;margin:20px 0 12px}.editor-title h3{margin:0}.error{color:#b54040;font-size:14px;white-space:pre-line}.steps{display:flex;gap:6px;flex-wrap:wrap;padding:18px;border-bottom:1px solid var(--line)}.step{font-size:13px;color:#9a96a5;padding:7px 10px;border-radius:6px;background:#f5f4f8}.step.current{background:#eee9ff;color:#6550cc;font-weight:600}.detail-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:18px 0}.detail-meta dt{color:var(--muted);font-size:12px;margin-bottom:5px}.detail-meta dd{margin:0;word-break:break-word}dialog{width:min(840px,calc(100vw - 32px));max-height:90vh;border:1px solid var(--line);border-radius:14px;padding:0;box-shadow:0 25px 80px #24203535;color:inherit}dialog::backdrop{background:#211c394f;backdrop-filter:blur(3px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:2}.dialog-top h2{margin:0}.dialog-top button{border:0;font-size:24px;padding:0 8px}#modal-body{padding:22px}#camera{padding-bottom:18px;width:500px}#camera video{display:block;max-height:300px;width:100%;background:#242031}#camera>p,#camera>button{margin:15px 20px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:20;background:#2d293d;color:white;padding:14px 22px;border-radius:10px;box-shadow:0 10px 30px #0002;transition:.2s;max-width:90vw;white-space:pre-line;line-height:1.6}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error-toast{background:#a13d3d}.mobile{display:none}.pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}.highlight{animation:flash 2.5s ease-out}@keyframes flash{from{background:#e5dcff}to{background:transparent}}.code-label{padding:20px;border:1px solid var(--line);background:white;text-align:center;margin-top:12px}.code-label svg{max-width:100%;height:80px}#print-area{display:none}.settings-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.permissions{line-height:1.8}.audit-note{white-space:normal;max-width:500px}.mono{font-family:Consolas,monospace}.detail-note{white-space:pre-wrap;word-break:break-word}.help-list{padding-left:20px;line-height:2}.live-error{color:#b54848!important}#page .status-note{font-size:13px;color:var(--muted);margin-bottom:18px}
@media(max-width:1100px){aside{width:196px}main{margin-left:196px}.page{padding:22px 20px}.metrics{gap:10px}.metric{padding:16px}.grid2{grid-template-columns:1fr}.topbar{padding:0 20px}.quick-grid{gap:8px}.brand{font-size:10px}.settings-grid{grid-template-columns:1fr}}
@media(max-width:760px){aside{left:-224px;width:224px;transition:.2s}aside.open{left:0;box-shadow:20px 0 60px #20203822}main{margin-left:0}.mobile{display:block}.topbar{padding:0 15px;height:58px}.topright{gap:8px}#today{display:none}.page{padding:22px 14px}.heading{align-items:flex-start;flex-direction:column;gap:15px}.heading h1{font-size:24px}.metrics,.quick-grid{grid-template-columns:repeat(2,1fr)}.metric strong{font-size:23px}.quick{padding:15px}.toolbar{padding:14px}.toolbar input[type=search]{width:100%;flex-basis:100%}td,th{padding:12px}.form-grid{grid-template-columns:1fr}.line-tools{flex-wrap:wrap}.line-tools>label:first-child{flex-basis:70%}.scan-strip{flex-wrap:wrap}.scan-strip input{flex-basis:65%}.detail-meta{grid-template-columns:1fr 1fr}.form-actions{flex-wrap:wrap}.topright button{font-size:12px}#modal-body{padding:16px}.pagination{padding:12px;gap:10px}.dialog-top{padding:15px}.panel-head{padding:16px}}
@media print{body>*{display:none!important}#print-area{display:block!important}.code-label{width:80mm;break-inside:avoid}button{display:none!important}}
.metric p{min-height:18px}.grid2{align-items:start}
.product-photo{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:64px;height:64px;border:1px solid #e5e2f0;border-radius:9px;background:#faf9fd;padding:0;overflow:hidden;vertical-align:middle}
button.product-photo{cursor:zoom-in}.product-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:white}.photo-empty{font-size:11px;color:#9690a9;text-align:center;white-space:normal;line-height:1.5}.photo-source{position:absolute;bottom:0;left:0;right:0;background:#343042c9;color:white;font-size:10px;line-height:18px;text-align:center}.is-empty{border-style:dashed}
.catalog-product{display:flex;align-items:center;gap:14px}.catalog-product .product-photo{width:56px;height:56px}.catalog-sku{display:flex;align-items:center;gap:14px}.catalog-sku strong{display:block}.catalog-sku .product-photo{width:76px;height:76px}.catalog-sku small{white-space:normal}.photo-missing{color:#ad7618}
.photo-editor{margin:12px 0 0;border:1px solid var(--line);border-radius:10px;padding:18px;min-width:0}.photo-editor legend{padding:0 6px;font-weight:600}.photo-editor-layout{display:flex;gap:20px;align-items:flex-start}.photo-editor-preview{width:148px;height:148px;flex:none;border:1px dashed #d5cfee;border-radius:10px;background:#faf9fe;display:grid;place-items:center;overflow:hidden;color:#9590a5;font-size:13px}.photo-preview-button{position:relative;width:100%;height:100%;padding:0;border:0;cursor:zoom-in}.photo-preview-button img{position:absolute;inset:0;background:white;width:100%;height:100%;object-fit:contain}.photo-editor-controls{flex:1;min-width:0}.photo-editor-controls p{font-size:13px;margin:0 0 12px}.photo-editor-controls small{display:block;margin-top:12px}.photo-editor-controls .photo-editor-status{margin:8px 0 0;color:#766e8e;overflow-wrap:anywhere}.photo-editor-status.error{color:#b54040}.photo-link{margin-top:16px;color:#777085;font-size:13px}.photo-link summary{cursor:pointer}.photo-link-row{display:flex;gap:8px;margin-top:12px}.photo-link-row input{flex:1;min-width:0}
#image-preview{width:min(760px,calc(100vw - 32px))}#image-preview-body{padding:18px}.image-lightbox{position:relative;display:grid;place-items:center;min-height:220px;background:#f8f7fb;border-radius:10px;overflow:hidden}.image-lightbox>p{display:none;padding:20px;color:#8d7983}.image-lightbox img{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain}.image-lightbox.image-failed>p{display:block}.sku-detail-photo .product-photo{width:140px;height:140px}.sku-detail-photo .product-title{align-items:center;font-size:17px}.sku-detail-photo .product-title small{font-size:14px}.line-editor .product-title{min-width:210px;white-space:normal}.photo-inline-note{color:#878096;font-size:12px;margin-top:5px}
.product-photo:not(.is-empty):not(.image-failed)>.photo-empty,.photo-preview-button:not(.image-failed)>span{display:none}
.visual-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px;font-size:14px}.visual-summary>span{background:#ebe7ff;color:#5948bb;border-radius:6px;padding:9px 13px}.visual-summary>b{margin-left:auto;font-weight:500;color:#766e85}.visual-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px;align-items:start}.visual-layout .panel{min-width:0}.visual-file-name{font-size:13px;color:#817991;overflow-wrap:anywhere;margin:13px 0}#visual-canvas{display:block;max-width:100%;width:100%;height:auto;background:#faf9fc;border-radius:8px;touch-action:none;cursor:crosshair}.visual-placeholder{min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;border:2px dashed #ddd5f4;border-radius:10px;background:#faf9ff;padding:25px}.visual-placeholder strong{font-size:17px}.visual-placeholder p{color:#878096;max-width:330px;margin:15px 0 0}.visual-crop-tools{margin:14px 0}.visual-crop-inputs{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;font-size:14px}.visual-crop-inputs input{width:100%;padding:8px}.visual-progress{font-size:14px;color:#756b90;margin:10px 0 0}.visual-empty{min-height:260px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.visual-empty>p{color:#80768f}.visual-candidate{padding:18px 0;border-bottom:1px solid var(--line)}.visual-candidate:last-child{border-bottom:0}.visual-candidate .product-photo{width:95px;height:95px}.visual-candidate .product-title{align-items:center;white-space:normal;font-size:16px}.visual-candidate .product-title small{font-size:14px}.visual-candidate-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:10px 0 15px;font-size:14px}.visual-candidate .sku-code{margin:10px 0}.visual-confirm{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.visual-confirm>div{padding:16px;background:#f8f7fc;border-radius:10px}.visual-confirm img{width:100%;max-height:230px;object-fit:contain}.visual-confirm .product-title{flex-direction:column;align-items:flex-start;white-space:normal}.visual-confirm .product-photo{width:150px;height:150px}.visual-confirm .product-photo img{height:100%;width:100%}.visual-confirm-check{margin-top:20px;font-size:14px}
@media(max-width:1000px){.visual-layout{grid-template-columns:1fr}.visual-layout #visual-canvas{max-width:520px;margin:auto}.visual-empty{min-height:180px}.visual-summary>b{margin-left:0}}
@media(max-width:500px){.visual-summary{gap:6px}.visual-summary>span{font-size:13px;padding:8px}.visual-crop-inputs{grid-template-columns:1fr 1fr}.visual-confirm{grid-template-columns:1fr}.visual-candidate .product-photo{width:80px;height:80px}}
@media(max-width:760px){.photo-editor{padding:12px}.photo-editor-layout{flex-direction:column;gap:14px}.photo-editor-preview{width:130px;height:130px}.photo-link-row{flex-wrap:wrap}.photo-link-row input{flex-basis:100%}.catalog-product{gap:10px}.catalog-product .product-photo{width:48px;height:48px}.sku-detail-photo .product-photo{width:100px;height:100px}.sku-detail-photo .product-title{font-size:15px}}
