:root{--bg:#f6f6f1;--paper:#fff;--ink:#23372f;--muted:#77817b;--line:#e4e8e1;--brand:#215b47;--pale:#edf4ed;--amber:#95632a;--danger:#b44938;--radius:18px;--shadow:0 8px 26px #20382908}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:none;min-height:44px}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.3;letter-spacing:-.8px;margin-bottom:10px}h2{font-size:21px;line-height:1.4;margin-bottom:10px}h3{font-size:17px;line-height:1.5;margin-bottom:6px}.muted{color:var(--muted)}.tiny{font-size:12px;color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:1.8px;font-size:11px;font-weight:650;color:var(--brand);margin-bottom:14px}.brand-mark{display:grid;place-items:center;background:var(--brand);color:#f7f4dc;border-radius:15px;width:46px;height:46px;font:700 26px/1 Georgia,serif;flex-shrink:0}.brand{display:flex;gap:12px;align-items:center;font-size:21px;font-weight:700}.brand small{display:block;font-size:11px;letter-spacing:1px;color:var(--muted);font-weight:400;margin-top:2px}.shell{display:flex;min-height:100vh}.sidebar{width:235px;position:fixed;inset:0 auto 0 0;background:var(--paper);border-right:1px solid var(--line);padding:32px 23px;display:flex;flex-direction:column}.sidebar nav{display:grid;gap:10px;margin-top:52px}.sidebar nav a{display:flex;align-items:center;gap:13px;padding:12px 15px;border-radius:12px;color:#79827d;font-size:14px}.sidebar nav a span{font-size:23px;line-height:1}.sidebar nav a.active{background:var(--pale);color:var(--brand);font-weight:650}.sidebar-note{margin-top:auto;padding-top:28px;border-top:1px solid var(--line);font-size:13px}.sidebar-note p{font-size:12px;line-height:1.9;color:var(--muted);margin:7px 0 0}.workspace{margin-left:235px;width:calc(100% - 235px)}.topbar{height:77px;display:flex;align-items:center;justify-content:space-between;padding:0 38px;border-bottom:1px solid var(--line);background:#fafaf7;position:sticky;top:0;z-index:5;font-size:12px;color:var(--muted)}.sync-box{display:flex;align-items:center;gap:10px}.icon-btn{background:transparent;color:var(--muted);font-size:25px;width:42px;padding:0}.mobile-brand{display:none}main{padding:36px 38px 55px;max-width:1370px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:27px}.page-heading p{margin:8px 0 0;font-size:13px;color:var(--muted)}.primary,.secondary,.danger,.pill-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 19px;border-radius:11px;font-size:14px;font-weight:600;line-height:1.5;white-space:nowrap}.primary{color:white;background:var(--brand)}.secondary{color:var(--brand);background:white;border:1px solid var(--line)}.danger{background:#fff0eb;color:var(--danger)}.text-btn{background:transparent;color:var(--brand);padding:6px 2px;min-height:38px;font-size:13px}.full{width:100%}.stats{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:17px;margin-bottom:20px}.stat{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px 23px;box-shadow:var(--shadow)}.stat:first-child{background:var(--brand);color:white;border-color:var(--brand)}.stat .label{font-size:12px;opacity:.75;margin-bottom:12px}.stat strong{font-size:33px;line-height:1.1;font-weight:650;letter-spacing:-1px}.stat .unit{font-size:13px;opacity:.7;margin-left:6px}.stat .sub{font-size:11px;opacity:.65;margin-top:10px}.notice{padding:13px 17px;background:#f0f1e9;border:1px solid #e5e8dc;border-radius:12px;font-size:12px;line-height:1.8;margin:18px 0;color:#67715d}.notice.warn{color:#8a632f;background:#fff7e8;border-color:#f2e5c9}.toolbar{display:flex;flex-wrap:wrap;gap:11px;align-items:center;margin:25px 0 20px}.toolbar input{flex:1;min-width:200px}.toolbar select{width:auto;max-width:100%}input,select,textarea{border:1px solid #dce3db;border-radius:10px;background:white;color:var(--ink);width:100%;padding:11px 12px;min-height:46px;outline:none;font-size:14px}input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px #215b4710}textarea{resize:vertical;min-height:86px}label{display:block;font-size:13px;font-weight:600;margin-bottom:16px}label input,label select,label textarea{display:block;margin-top:7px;font-weight:400}label .help{font-weight:400;color:var(--muted);font-size:11px;margin:5px 0 0;display:block}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.bag-card{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:21px 21px 17px;box-shadow:var(--shadow);display:block;transition:transform .12s,border-color .12s}.bag-card:hover{transform:translateY(-2px);border-color:#98b49f}.bag-card .row{display:flex;justify-content:space-between;align-items:center;gap:6px}.bag-number{font-size:27px;font-weight:680;letter-spacing:-.8px}.tag{display:inline-flex;align-items:center;border-radius:6px;padding:3px 8px;font-size:11px;background:#f0f2ec;color:#6e776c;white-space:nowrap}.tag.done{background:#eaf4ed;color:#387c4e}.tag.working{background:#fff3dd;color:#9d6b27}.tag.floor{background:#f0f3f0;color:#52685c}.bag-card .location{font-size:12px;color:var(--muted);margin:13px 0 17px;min-height:20px;overflow-wrap:anywhere}.bag-card .bottom{border-top:1px solid #eff1ec;padding-top:14px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px}.bag-card .bottom strong{font-size:18px}.card-note{margin-top:10px;font-size:11px;color:#a07743}.empty{padding:52px 25px;text-align:center;border:1px dashed #cad5c7;border-radius:var(--radius);background:#fcfcf8}.empty p{font-size:13px;color:var(--muted);margin:10px auto 20px;max-width:430px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:29px 0 14px}.section-title h2{font-size:18px;margin:0}.section-title span{font-size:12px;color:var(--muted)}.product-card{background:white;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.product-photo{aspect-ratio:1.6;display:flex;align-items:center;justify-content:center;background:#e9eee5;color:#a9b5a2;font-size:38px;font-weight:600;overflow:hidden}.product-photo img{width:100%;height:100%;object-fit:contain}.product-body{padding:19px}.product-body .colors{display:flex;gap:5px;flex-wrap:wrap;margin-top:12px}.product-body p{font-size:12px;margin:7px 0;color:var(--muted)}.inline-actions{display:flex;gap:13px;flex-wrap:wrap;align-items:center}.inline-actions button{font-size:12px}.stock-list{display:grid;gap:12px}.stock-card{background:white;border:1px solid var(--line);border-radius:15px;overflow:hidden}.stock-head{padding:17px 19px;display:flex;align-items:center;gap:15px}.thumb{width:56px;height:62px;background:#edf1e8;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#83917e;font-size:12px;flex-shrink:0;overflow:hidden}.thumb img{width:100%;height:100%;object-fit:contain}.stock-title{flex:1;min-width:0}.stock-title strong{display:block;font-size:15px}.stock-title span{font-size:12px;color:var(--muted)}.stock-qty{text-align:right;font-size:12px;white-space:nowrap}.stock-qty strong{display:block;font-size:25px;line-height:1.4}.placement{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 19px;background:#fafbf7;border-top:1px solid var(--line);font-size:12px}.placement .left{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.placement b{color:var(--brand);font-size:14px}.placement small{color:var(--muted)}.crumb{color:var(--muted);font-size:12px;display:inline-block;margin-bottom:18px}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:22px}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px}.panel h3{font-size:15px;margin-bottom:15px}.panel dl{font-size:12px;margin:0}.panel dt{color:var(--muted);margin:15px 0 5px}.panel dd{margin:0;overflow-wrap:anywhere}.position-photo{width:100%;max-height:250px;object-fit:contain;border-radius:10px;margin-top:12px}.detail-actions{display:flex;gap:9px;flex-wrap:wrap;margin:20px 0}.detail-actions .primary,.detail-actions .secondary{padding:10px 15px;font-size:13px}.details-count{font-size:36px;letter-spacing:-1px;line-height:1.2;margin-top:12px}.details-count small{font-size:12px;color:var(--muted);margin-left:5px;letter-spacing:0}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.check-label{display:flex;align-items:flex-start;gap:9px;font-weight:400;font-size:13px}.check-label input{width:18px;height:18px;min-height:18px;margin:3px 0 0}.form-error{color:var(--danger);font-size:13px;margin:10px 0;white-space:pre-line}.login-screen{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(ellipse at top,#edf2e7,transparent 60%),var(--bg)}.login-card{width:100%;max-width:410px;background:white;border:1px solid var(--line);border-radius:26px;padding:37px;box-shadow:0 20px 70px #1438230b}.login-card .brand-mark{margin-bottom:28px}.login-card h1{font-size:35px}.login-card .eyebrow{letter-spacing:.5px;font-size:11px}.login-card .muted{font-size:14px;line-height:1.9;margin:17px 0 25px}.login-card .tiny{margin:23px 0 0;font-size:11px;text-align:center}.login-card label{font-size:12px}.login-card button{justify-content:space-between}.bottom-nav{display:none}dialog{border:none;border-radius:21px;padding:25px;width:calc(100% - 30px);max-width:500px;color:var(--ink);box-shadow:0 20px 100px #0b251b30;max-height:90dvh;overflow:auto}dialog::backdrop{background:#17332570;backdrop-filter:blur(2px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.dialog-head h2{margin:0;font-size:20px}.dialog-foot{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.dialog-foot button{font-size:13px}.quantity-hint{border-radius:10px;background:var(--pale);padding:13px;font-size:12px;margin-bottom:18px}.network-warning{padding:12px 38px;background:#fff0df;color:#925e26;font-size:12px;position:sticky;top:77px;z-index:6}.log-row{border-bottom:1px solid var(--line);padding:16px 0;font-size:13px}.log-row:last-child{border:0}.log-row .line{display:flex;justify-content:space-between;gap:12px}.log-row small{color:var(--muted);font-size:11px}.log-row p{font-size:12px;overflow-wrap:anywhere;margin:5px 0 0;color:#68766b}.backup-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.backup-grid p{font-size:13px;color:var(--muted)}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:12px}td,th{padding:11px 9px;border-bottom:1px solid var(--line);text-align:left}th{color:var(--muted);font-weight:500}.print-sheet{background:white;border:2px solid var(--ink);padding:25px;max-width:700px;margin:25px auto}.print-header{display:flex;align-items:center;justify-content:space-between;gap:15px}.print-header h1{font-size:65px}.print-header img{width:150px;height:150px}.print-sheet p{font-size:13px;margin:8px 0}.print-sheet footer{font-size:11px;margin-top:20px;color:#777}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#173e2f;color:white;border-radius:12px;padding:12px 20px;box-shadow:0 8px 30px #0002;font-size:13px;z-index:100;max-width:90vw;text-align:center}[hidden]{display:none!important}.file-input{display:none!important}.split-note{color:var(--muted);font-size:12px;margin:0 0 17px}.counter{display:flex;align-items:center;gap:9px}.counter input{text-align:center;font-size:23px;font-weight:650;min-width:70px}.counter button{min-width:49px;background:var(--pale);border-radius:10px;color:var(--brand);font-size:25px}
@media(min-width:1450px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1150px){.sidebar{width:205px;padding:26px 18px}.workspace{margin-left:205px;width:calc(100% - 205px)}main{padding:30px 25px}.topbar{padding:0 25px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-layout{grid-template-columns:minmax(0,1fr) 220px}}
@media(max-width:760px){body{font-size:14px}.sidebar{display:none}.workspace{margin:0;width:100%}.topbar{height:62px;padding:0 20px}.desktop-label{display:none}.mobile-brand{display:block;font-size:17px;font-weight:700;color:var(--brand)}.sync-box{gap:1px;font-size:10px}main{padding:25px 18px 105px}h1{font-size:25px}.eyebrow{font-size:10px;margin-bottom:11px}.page-heading{gap:10px;margin-bottom:20px;align-items:flex-start}.page-heading p{font-size:11px}.page-heading>.primary{font-size:12px;min-height:40px;padding:10px 12px;margin-top:3px}.stats{gap:9px;grid-template-columns:1.2fr 1fr 1fr;margin-bottom:17px}.stat{border-radius:14px;padding:17px 12px}.stat .label{font-size:10px;white-space:nowrap}.stat strong{font-size:25px}.stat .unit{font-size:10px;margin-left:3px}.stat .sub{font-size:9px;line-height:1.4;min-height:26px;margin-top:10px}.toolbar{gap:8px;margin:21px 0 15px}.toolbar input{flex-basis:100%;min-width:0}.toolbar select{flex:1;font-size:12px;min-height:42px}.grid{gap:10px}.bag-card{padding:16px 13px 13px;border-radius:14px}.bag-number{font-size:24px}.tag{font-size:9px;padding:3px 6px}.bag-card .location{font-size:11px;min-height:34px;margin:12px 0}.bag-card .bottom{font-size:10px;align-items:flex-start;gap:5px}.bag-card .bottom strong{font-size:17px}.card-note{font-size:9px}.notice{font-size:11px;padding:12px 13px;margin:16px 0}.bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;bottom:0;left:0;right:0;background:#fffffff5;border-top:1px solid var(--line);padding:8px 10px calc(8px + env(safe-area-inset-bottom));backdrop-filter:blur(10px);z-index:10}.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#8a958c;font-size:24px;line-height:1.2;padding:4px}.bottom-nav span{font-size:10px}.bottom-nav a.active{color:var(--brand);font-weight:650}.detail-layout{grid-template-columns:1fr}.detail-layout>aside{order:2}.stock-head{padding:15px 13px;gap:10px}.stock-title strong{font-size:13px}.stock-title span{font-size:11px}.thumb{width:46px;height:52px;font-size:10px}.stock-qty{font-size:10px}.stock-qty strong{font-size:22px}.placement{padding:12px 13px;align-items:flex-start;gap:8px}.placement .left{gap:4px 9px}.placement small{flex-basis:100%;font-size:10px}.placement b{font-size:13px}.product-photo{aspect-ratio:1.2;font-size:31px}.product-body{padding:13px}.product-body h3{font-size:14px}.product-body p{font-size:10px}.product-body .colors{gap:4px}.inline-actions{gap:7px}.inline-actions button{font-size:11px}.backup-grid{grid-template-columns:1fr}.panel{padding:18px}.network-warning{top:62px;padding:10px 20px}.details-count{font-size:32px}.detail-actions{gap:7px}.detail-actions .primary,.detail-actions .secondary{font-size:12px;padding:9px 11px}dialog{padding:21px;max-height:88dvh}.dialog-head h2{font-size:19px}.dialog-foot button{font-size:12px;padding:10px 14px}#toast{bottom:90px;width:max-content}.print-header h1{font-size:46px}.print-header img{width:100px;height:100px}.print-sheet{padding:17px}.login-card{padding:28px}.login-screen{padding:20px}.form-row{gap:12px}}
@media print{body{background:white}.sidebar,.topbar,.bottom-nav,.no-print,.page-heading,.crumb,.network-warning,#toast{display:none!important}.workspace{margin:0;width:100%}main{padding:0}.print-sheet{margin:0;max-width:none;border:2px solid black;break-inside:avoid}.print-header h1{font-size:70px}.print-header img{width:160px;height:160px}@page{margin:12mm}}
/* v0.2 — continuous counting, explicit SKU catalog and review-first voice. */
:root { --red-pale:#fff2ed; }
input, select, textarea { font-size:16px; }
button:disabled { cursor:not-allowed; }
button:focus-visible, a:focus-visible { outline:3px solid #90b99e; outline-offset:3px; }
.panel + .panel { margin-top:20px; }
.help { color:var(--muted); font-size:12px; line-height:1.8; font-weight:400; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin-bottom:22px; }
.stats-grid .stat > span { display:block; font-size:12px; margin-bottom:18px; opacity:.8; }
.stats-grid .stat strong { display:block; font-variant-numeric:tabular-nums; }
.stats-grid .stat small { font-size:13px; margin-left:6px; opacity:.7; }
.bag-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.bag-grid .empty { grid-column:1 / -1; }
.bag-top, .bag-bottom { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.bag-code { font-size:29px; font-weight:700; letter-spacing:-1px; }
.bag-bottom { border-top:1px solid var(--line); padding-top:15px; font-size:12px; }
.bag-bottom > span { color:var(--muted); }
.bag-bottom strong { font-size:19px; white-space:nowrap; }
.bag-bottom small { display:block; text-align:right; font-size:10px; font-weight:400; color:var(--muted); }
.tag.progress { background:#fff3dd; color:#916023; }
.resume-card { border:1px solid #c8daca; background:#edf4ed; border-radius:14px; padding:18px 22px; display:flex; align-items:center; justify-content:space-between; gap:15px; }
.resume-card small { display:block; color:var(--muted); font-size:11px; margin-bottom:4px; }
.resume-card strong { font-size:19px; }
.resume-card strong span { font-size:12px; font-weight:400; margin-left:12px; }
.resume-card > span { font-size:13px; white-space:nowrap; color:var(--brand); }
.product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.product-grid .empty { grid-column:1 / -1; }
.product-card { display:block; }
.product-card:hover { border-color:#98b49f; }
.product-info { padding:21px; }
.product-info .eyebrow { margin-bottom:6px; }
.product-info h3 { font-size:20px; }
.product-info p { font-size:12px; color:var(--muted); }
.product-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:11px; color:var(--muted); border-top:1px solid var(--line); padding-top:12px; }
img.product-photo, img.thumb { object-fit:contain; }
.product-photo { width:100%; }
.placeholder { color:#6f8a73; font-size:25px; }
.product-detail-grid { display:grid; grid-template-columns:260px minmax(0,1fr); gap:22px; align-items:start; }
.catalog-photo { width:100%; aspect-ratio:1; background:var(--pale); border-radius:14px; display:grid; place-items:center; object-fit:contain; margin-bottom:18px; font-size:65px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.section-head h3 { margin:0; font-size:16px; }
.section-head a, .section-head > span { font-size:12px; color:var(--muted); }
.sku-chip-list { display:flex; flex-wrap:wrap; gap:9px; }
.sku-chip { background:#f4f6ef; padding:6px 8px 6px 12px; border-radius:8px; font-size:13px; display:inline-flex; align-items:center; gap:7px; }
.sku-delete { min-height:24px; width:24px; padding:0; border-radius:50%; background:#fff; color:var(--danger); font-size:18px; line-height:1; }
.sku-delete:hover { background:#fff0eb; }
.alias-row { display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--line); padding:9px 0; }
.alias-row small { font-size:10px; color:var(--muted); padding-right:12px; }
.stock-card { margin-bottom:17px; }
.stock-card-header { display:flex; gap:16px; align-items:center; padding:20px; }
.stock-card-header h3 { font-size:16px; margin-bottom:5px; }
.stock-card-header p { font-size:12px; color:var(--muted); margin:0; }
.stock-locations > p { margin:0; padding:16px 20px; font-size:12px; }
.stock-location { display:flex; gap:15px; align-items:center; justify-content:space-between; border-top:1px solid var(--line); padding:15px 20px; background:#fafbf7; font-size:12px; }
.stock-location > span:last-child { white-space:nowrap; }
.bag-summary { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; }
.bag-summary > div { min-width:0; }
.bag-summary p:not(.details-count) { color:var(--muted); font-size:12px; margin:0; }
.bag-summary .detail-actions { max-width:420px; }
.inventory-row { display:flex; gap:13px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); }
.inventory-row:last-child { border:0; }
.inventory-row > div:not(.thumb) { flex:1; min-width:0; }
.inventory-row strong { font-size:14px; }
.inventory-row > strong { white-space:nowrap; }
.inventory-row small { display:block; color:var(--muted); margin-top:4px; font-size:11px; }
.location-photo { width:100%; max-height:400px; object-fit:contain; margin-top:15px; }
.pending-label { margin:10px 0 0; font-size:11px; color:var(--amber); }
.pending-panel { border-color:#e9d8b5; background:#fffcf4; }
.pending-item { display:flex; align-items:flex-start; gap:14px; padding:15px 0; border-top:1px solid #ece3d0; }
.pending-item > div:last-child { flex:1; min-width:0; }
.pending-item p { margin:3px 0 8px; font-size:12px; }
.pending-item strong { font-size:13px; }
.button-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.work-heading { display:flex; justify-content:space-between; align-items:center; padding:0 2px 23px; }
.work-heading h1 { font-size:44px; letter-spacing:-1.5px; margin-bottom:7px; }
.work-heading p { font-size:13px; color:var(--muted); margin-bottom:0; }
.work-heading .eyebrow { color:var(--brand); font-size:11px; margin-bottom:6px; }
.work-grid { display:grid; grid-template-columns:minmax(320px,1fr) minmax(300px,.85fr); gap:22px; align-items:start; }
.work-grid > div { display:contents; }
.work-grid > .work-panel { grid-column:1; grid-row:1; }
.work-grid > div > .voice-panel { grid-column:2; grid-row:1; }
.work-grid > div > .panel:not(.voice-panel) { grid-column:2; grid-row:2; }
.work-panel { padding:25px; }
.mode-tabs { display:flex; gap:4px; background:#f1f4ed; border-radius:12px; padding:5px; }
.mode-tabs button { flex:1; color:var(--muted); background:transparent; border-radius:9px; padding:9px 6px; font-size:13px; font-weight:600; min-width:0; }
.mode-tabs .active { background:white; color:var(--brand); box-shadow:0 2px 7px #19352510; }
.mode-tabs .out-mode.active { color:var(--danger); background:var(--red-pale); }
.mode-help { font-size:12px; color:var(--muted); margin:14px 0 22px; min-height:22px; }
.selected-sku { width:100%; display:flex; align-items:center; text-align:left; gap:14px; padding:14px; border:1px solid var(--line); border-radius:13px; background:#fcfdf9; color:var(--ink); }
.selected-sku > span:nth-child(2) { flex:1; min-width:0; }
.selected-sku strong { font-size:16px; line-height:1.5; display:block; }
.selected-sku small { font-size:11px; color:var(--muted); display:block; margin-bottom:4px; }
.qty-block { margin:22px 0 20px; }
.qty-block > label { font-size:12px; color:var(--muted); margin-bottom:8px; }
.quantity-input { display:flex; align-items:center; gap:10px; }
.quantity-input input { padding:8px 12px; font-size:44px; font-weight:650; height:76px; text-align:center; font-variant-numeric:tabular-nums; }
.quantity-input > span { font-size:14px; color:var(--muted); }
.quick-qty { display:flex; gap:9px; margin-top:12px; }
.quick-qty .secondary { flex:1; }
.quick-qty .text-btn { padding:5px 8px; }
.work-panel .primary.full { min-height:50px; font-size:16px; }
.danger-fill { background:var(--danger); color:white; }
.work-notice { margin-top:16px; font-size:12px; color:var(--brand); line-height:1.8; }
.work-notice:empty { display:none; }
.voice-panel textarea { margin:0 0 12px; font-size:16px; }
.voice-panel .button-row > button { flex:1; }
.parse-result { border-top:1px solid var(--line); margin-top:18px; padding-top:14px; }
.candidate-card { display:flex; align-items:center; gap:10px; text-align:left; background:#f4f7ef; border:1px solid #dfe8d8; border-radius:12px; padding:11px; width:100%; color:var(--ink); margin:9px 0; }
.candidate-card strong { display:block; font-size:15px; }
.candidate-card small { display:block; color:var(--muted); font-size:11px; }
.parse-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0 18px!important; }
.parse-fields > div { background:#fafbf7; border-radius:8px; padding:8px 12px; }
.parse-fields dt { margin:0 0 3px!important; font-size:11px; }
.parse-fields dd { font-size:14px; }
.confirm-bag { background:var(--brand); color:white; padding:14px 17px; border-radius:12px; font-size:24px; font-weight:650; }
.confirm-bag span { display:block; font-size:12px; font-weight:400; opacity:.8; }
.confirm-sku { display:flex; align-items:center; gap:12px; margin:20px 0; }
.confirm-sku strong { font-size:16px; }
.confirm-math { background:var(--pale); border-radius:14px; padding:20px; text-align:center; }
.confirm-math > span { font-size:12px; display:block; }
.confirm-math > strong { font-size:36px; line-height:1.4; display:block; margin:6px 0; }
.confirm-math > p { font-size:13px; margin:0; }
.confirm-math.out-math { background:var(--red-pale); color:var(--danger); }
.matrix-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; max-height:260px; overflow:auto; padding:3px; }
.matrix-grid label { margin:0; padding:9px; background:#f7f9f3; border-radius:8px; }
#sku-matrix { margin:12px 0 18px; }
.picker-products { display:grid; grid-template-columns:1fr 1fr; gap:9px; max-height:320px; overflow:auto; margin:16px 0; }
.picker-product { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:11px; background:white; color:var(--ink); text-align:left; }
.picker-product.selected { border-color:var(--brand); background:var(--pale); }
.picker-product strong { display:block; font-size:14px; }
.picker-product small { display:block; font-size:10px; color:var(--muted); }
.event-row { display:flex; justify-content:space-between; gap:18px; padding:18px 0; border-bottom:1px solid var(--line); }
.event-row:last-child { border:0; }
.event-row > div:first-child { min-width:0; }
.event-title { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:13px; }
.event-title > span { color:var(--muted); }
.event-row p { margin:5px 0 2px; font-size:12px; overflow-wrap:anywhere; }
.event-row small { font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.event-quantity { text-align:right; white-space:nowrap; flex-shrink:0; }
.event-quantity strong { font-size:21px; display:block; color:var(--brand); line-height:1.4; }
.event-quantity small { display:block; }
.event-quantity button { min-height:34px; }
.history-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.history-filters .wide { grid-column:1 / -1; }
.history-summary { display:flex; align-items:center; gap:12px; justify-content:space-between; font-size:13px; margin:22px 0 16px; }
.pending-warning { padding:15px 30px; background:#fff4df; border-bottom:1px solid #e8d4ab; color:var(--amber); }
.pending-warning strong,.pending-warning > span { display:block; font-size:13px; }
.pending-warning .button-row { margin-top:10px; }
.print-label { background:white; border:2px solid var(--ink); padding:30px; max-width:430px; margin:30px auto; text-align:center; }
.print-label h1 { font-size:80px; margin:12px 0; }
.print-label img { width:180px; height:180px; }
.print-label p { font-size:13px; margin:8px 0; }
@media(max-width:1150px) {
  .product-grid,.bag-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .work-grid { grid-template-columns:minmax(0,1fr); }
  .work-grid > .work-panel { grid-column:1; grid-row:2; }
  .work-grid > div > .voice-panel { grid-column:1; grid-row:1; }
  /* Taking stock out starts with the selected item and deduction controls. */
  .work-grid[data-mode="out"] > .work-panel { grid-row:1; }
  .work-grid[data-mode="out"] > div > .voice-panel { grid-row:2; }
  .work-grid > div > .panel:not(.voice-panel) { grid-column:1; grid-row:3; }
  .work-panel { max-width:760px; }
}
@media(max-width:760px) {
  .stats-grid { gap:10px; }
  .stats-grid .stat { padding:17px; }
  .stats-grid .stat > span { font-size:11px; margin-bottom:12px; }
  .stats-grid .stat strong { font-size:28px; }
  .bag-grid { gap:10px; }
  .bag-code { font-size:25px; }
  .bag-top { align-items:center; gap:5px; }
  .bag-bottom { align-items:flex-start; font-size:10px; }
  .bag-bottom strong { font-size:16px; }
  .resume-card { padding:15px; }
  .resume-card strong span { display:block; margin:3px 0 0; font-size:11px; }
  .product-grid { gap:11px; }
  .product-info { padding:14px; }
  .product-info h3 { font-size:17px; }
  .product-meta { font-size:10px; gap:4px; }
  .product-detail-grid { grid-template-columns:minmax(0,1fr); }
  .catalog-photo { max-height:220px; aspect-ratio:auto; height:200px; font-size:55px; }
  .bag-summary { display:block; }
  .bag-summary .detail-actions { margin-bottom:0; }
  .bag-summary .primary { font-size:14px; }
  .inventory-row { gap:9px; flex-wrap:wrap; }
  .inventory-row .secondary { padding:8px 10px; font-size:12px; }
  .inventory-row strong { font-size:12px; }
  .inventory-row > div:not(.thumb) { min-width:120px; }
  .stock-card-header { padding:15px; gap:11px; }
  .stock-card-header h3 { font-size:14px; }
  .stock-location { flex-wrap:wrap; padding:13px 15px; gap:7px; }
  .stock-location > span:first-child { width:100%; }
  .stock-location > span:last-child { display:flex; width:100%; justify-content:space-between; }
  .work-heading h1 { font-size:37px; }
  .work-heading { padding-bottom:19px; }
  .work-heading .eyebrow { font-size:10px; }
  .work-grid { gap:17px; }
  .work-panel { padding:18px; }
  .selected-sku { padding:12px; gap:10px; }
  .selected-sku strong { font-size:14px; }
  .qty-block { margin:20px 0 16px; }
  .quantity-input input { height:72px; font-size:40px; }
  .quick-qty { gap:7px; }
  .quick-qty .secondary { padding:9px 10px; font-size:14px; }
  .mode-help { margin-bottom:16px; }
  .history-filters { grid-template-columns:1fr 1fr; gap:10px; }
  .history-summary { flex-wrap:wrap; }
  .picker-products { max-height:245px; gap:7px; }
  .picker-product { padding:9px; gap:8px; }
  .picker-product .thumb { width:35px; height:42px; }
  .picker-product strong { font-size:12px; }
  .pending-warning { padding:13px 18px; }
  .form-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .matrix-grid { font-size:12px; }
  .dialog-foot { position:sticky; bottom:-21px; background:white; margin-bottom:-3px; padding-bottom:8px; }
}
@media print {
  .print-label { break-inside:avoid; margin:0; max-width:100%; }
  .pending-warning,#network-warning { display:none!important; }
}

/* Bag locations: fixed C / B / A columns on every screen. */
.bag-floor-switch{display:flex;gap:8px;margin:0 0 22px;padding:5px;background:var(--pale);border-radius:13px;max-width:420px}
.bag-floor-switch button{flex:1;background:transparent;color:var(--brand);border-radius:9px;font-weight:600}
.bag-floor-switch button.active{background:var(--brand);color:white}
.bag-zone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.bag-column{min-width:0}.bag-column h2{display:flex;align-items:center;justify-content:space-between;background:var(--pale);color:var(--brand);border-radius:10px;padding:10px 14px;margin:0 0 12px;font-size:24px}
.bag-column h2 small{font-size:12px;font-weight:400}.bag-column-cards{display:grid;gap:12px}.bag-column-empty{padding:18px 5px;text-align:center;color:var(--muted);font-size:12px}
.bag-board .bag-code{overflow-wrap:anywhere;min-width:0}.bag-other{margin-top:24px}.bag-other h2{font-size:17px}.bag-other-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.bag-board>.empty{margin-top:16px}
@media(max-width:760px){
 .bag-floor-switch{max-width:none;margin-bottom:18px}.bag-zone-grid,.bag-other-grid{gap:8px}
 .bag-column h2{font-size:22px;padding:8px;margin-bottom:9px}.bag-column h2 small{font-size:10px}.bag-column-cards{gap:8px}
 .bag-board .bag-card{padding:10px 8px;border-radius:11px}.bag-board .bag-top{flex-direction:column;align-items:flex-start;gap:4px}.bag-board .bag-code{font-size:20px;letter-spacing:-.5px;line-height:1.3}.bag-board .tag{font-size:9px;padding:2px 5px}
 .bag-board .bag-bottom{flex-direction:column;align-items:flex-start;gap:5px;padding-top:8px}.bag-board .bag-bottom strong{font-size:15px;white-space:normal;overflow-wrap:anywhere}.bag-board .bag-bottom small{text-align:left}.bag-board .location{font-size:10px;margin:9px 0;min-height:0}.bag-board .pending-label{font-size:10px}
}

/* Persistent receipts keep successful split rows in place; they cannot be tapped twice. */
.count-receipt{background:#edf7ed;border:1px solid #8eae94;border-left:4px solid #215b47;border-radius:9px;padding:12px;margin:10px 0;color:#215137}.count-receipt>strong{font-size:19px}.count-receipt p{margin:5px 0;font-size:13px;line-height:1.5}.count-receipt small{font-size:10px;color:#5e7966}.count-progress{background:#fff7df;border:1px solid #ddc689;border-radius:10px;padding:13px;margin-bottom:12px;display:grid;gap:7px}.count-progress>strong{font-size:18px}.count-progress span{font-size:13px}.count-progress button{justify-self:start;font-size:12px;min-height:35px}.row-stock-math{font-size:13px;background:#f4f5ed;padding:9px;border-radius:7px;line-height:1.6}.quantity-hint:has(.count-receipt){border-color:#9ebba4}#toast{pointer-events:none}

/* Read-only, all-bag stock totals. Mobile shows every positive size without side scrolling. */
.inventory-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:14px}.inventory-filters label{flex:1;min-width:130px;margin:0}.inventory-filters button{min-height:46px}.inventory-summary{background:#edf4eb;border:1px solid #c5d8c4;padding:22px;border-radius:14px;margin:16px 0 22px}.inventory-summary>div{display:flex;justify-content:space-between;gap:15px;align-items:center}.inventory-summary span{font-size:14px;color:#42614b}.inventory-summary strong{font-size:38px;white-space:nowrap;color:#215b47}.inventory-summary small{font-size:14px;margin-left:7px}.inventory-summary p{font-size:12px;margin:8px 0 0;color:#5a705e}.inventory-product h2{font-size:20px;margin:0}.inventory-product-total{color:#215b47;white-space:nowrap}.inventory-table-wrap{overflow-x:auto}.inventory-table{width:100%;border-collapse:collapse;font-size:14px}.inventory-table th,.inventory-table td{text-align:center;border-bottom:1px solid #e3e9df;padding:12px 10px;min-width:55px}.inventory-table thead th{background:#f3f6ef;white-space:nowrap}.inventory-table tbody th{text-align:left;min-width:100px}.inventory-table tbody th small{display:none}.inventory-table td a{display:block;color:#215b47;font-weight:700;text-decoration:underline;text-decoration-color:#a8c7aa;text-underline-offset:4px}.inventory-table tfoot{background:#f1f5ed;font-weight:700}.inventory-zero{color:#9eac9e}
@media(max-width:650px){.inventory-filters{gap:9px}.inventory-filters label{min-width:calc(50% - 9px)}.inventory-filters button{flex:1}.inventory-summary{padding:16px}.inventory-summary>div{align-items:flex-start}.inventory-summary strong{font-size:30px}.inventory-summary span{font-size:12px}.inventory-product{padding:16px}.inventory-product h2{font-size:18px}.inventory-table,.inventory-table tbody{display:block;width:100%}.inventory-table thead,.inventory-table tfoot{display:none}.inventory-table tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:13px 0;border-bottom:1px solid #d8e2d5}.inventory-table tbody th{grid-column:1/-1;border:0;padding:0 0 5px;display:flex;justify-content:space-between;gap:8px}.inventory-table tbody th small{display:inline;font-size:12px;color:#647c68;font-weight:400}.inventory-table tbody td{border:1px solid #dfe8da;border-radius:8px;padding:9px 4px;min-width:0;background:#f7faf4}.inventory-table tbody td::before{content:attr(data-size);display:block;font-size:12px;color:#667d6b;margin-bottom:5px}.inventory-table tbody td a{font-size:18px}.inventory-table tbody .inventory-zero,.inventory-table tbody .inventory-color-total{display:none}.inventory-table-wrap{overflow:visible}}

html:has(.inventory-summary){scroll-padding-top:90px;scroll-padding-bottom:110px}.inventory-table a{scroll-margin-top:90px;scroll-margin-bottom:110px}@media(max-width:650px){.inventory-summary{padding:12px;margin:12px 0 14px}.inventory-summary p{font-size:11px;margin-top:6px}.inventory-summary strong{font-size:28px}.inventory-filters+ .help{font-size:11px;line-height:1.6}}

.loose-entry{display:flex;justify-content:space-between;gap:15px;align-items:center;background:#fff4dc;border:1px solid #d8bc75;border-radius:12px;padding:17px 19px;margin:0 0 20px;color:#66501d}.loose-entry small{display:block;margin-top:5px;font-size:12px;font-weight:400}.loose-entry>span:last-child{text-align:right;white-space:nowrap}.loose-tag{background:#fff0cb;color:#765418}.loose-total{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#fff6e1;border:1px solid #dfc585;border-radius:12px;padding:18px;margin:15px 0 20px}.loose-total>strong{font-size:25px;color:#6a5221}.loose-total>span{font-size:12px;color:#806f47}.loose-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.loose-grid .panel+.panel{margin-top:0}.loose-card h2{font-size:20px;margin:0;overflow-wrap:anywhere}.loose-card p{font-size:13px;color:#667568}.loose-qty{font-size:34px;color:#215b47}.loose-qty small{font-size:12px;margin-left:8px;font-weight:400}.loose-card .button-row{margin-top:18px}.loose-card .button-row>a,.loose-card .button-row>button{font-size:12px;padding:10px 12px}.loose-card .section-head{align-items:center}@media(max-width:650px){.loose-grid{grid-template-columns:1fr}.loose-entry{padding:13px;gap:10px}.loose-entry strong{font-size:13px}.loose-entry small{font-size:10px}.loose-total{padding:14px}.loose-total>strong{font-size:23px}}

.draft-duplicate-note{background:#fff2d8;border:2px solid #d0aa5e;border-radius:10px;padding:13px;margin:12px 0;color:#71511a}.draft-duplicate-note>strong{font-size:15px}.draft-duplicate-note p{font-size:12px;line-height:1.6;margin:7px 0 0}

/* Bag contents estimate is distinct from warehouse map/location. */
.bag-depth{display:block;margin:7px 0;line-height:1.55;white-space:normal;overflow-wrap:anywhere;color:var(--brand)}
.bag-depth strong{display:block;font-size:14px!important;color:var(--brand)}
.bag-depth span{display:block;font-size:11px;font-weight:400;color:var(--muted);white-space:normal}
.bag-depth-unknown strong{color:#916a32}
.work-panel>.bag-depth{padding:10px 12px;background:var(--pale);border-radius:9px;margin:8px 0 14px}

.archived-bag{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.archived-bag small{display:block;font-size:11px;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.loose-card .button-row{flex-wrap:wrap}

.bag-created{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin:6px 0;overflow-wrap:normal}
.bag-created time{white-space:nowrap;font-variant-numeric:tabular-nums}
.bag-summary .bag-created,.work-heading .bag-created{font-size:12px}
.print-label .bag-created{color:var(--ink);font-size:14px}
@media(max-width:650px){.bag-column .bag-created{font-size:10px}.bag-column .bag-created>span{display:block}}

.review-marker{display:block;padding:3px 6px;margin:6px 0;border:1px solid #dec293;border-radius:6px;background:#fff2d6;color:#835916;font-size:11px;font-weight:600}.review-explanation{font-size:12px;color:#805a25}.bag-backup-preview{margin-top:18px}.bag-backup-preview td small{display:block;color:var(--muted);font-size:11px}.backup-bag-photo{max-width:180px;max-height:180px;object-fit:contain}.bag-column .review-marker{font-size:10px}
@media(max-width:760px){.page-heading:has([data-action="review-filter"]),.page-heading:has([data-action="backup-all-bags"]){flex-direction:column;align-items:stretch}.page-heading:has([data-action="review-filter"])>.button-row,.page-heading:has([data-action="backup-all-bags"])>.button-row{width:100%}.page-heading:has([data-action="review-filter"]) h1{max-width:none}}
.pickup-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#edf4ed;border:1px solid #b8cebe;border-radius:12px;padding:12px 14px;margin:14px 0}
.pickup-summary strong{font-size:16px;color:#215b47}.pickup-summary small{display:block;font-size:11px;color:#647668;margin-top:3px}
.pickup-summary button,.pickup-toggle{min-height:40px;font-size:12px;padding:7px 10px}
.pickup-location-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 12px;border-top:1px solid #edf0e9}
.pickup-location-actions .location-map-link{padding:5px 0}
.pickup-priority{border-left:4px solid #b4862d;background:#fffbef}
.pickup-badge{display:inline-block;padding:2px 6px;border-radius:5px;background:#fff0c4;color:#7d5719;font-size:11px;font-weight:650;white-space:nowrap}
.pickup-match-note{font-size:12px;padding:8px 10px;background:#f5f3df;border-radius:7px;color:#746020}
.pickup-list-row{padding:12px 0;border-bottom:1px solid var(--line)}.pickup-list-row strong{font-size:16px}.pickup-list-row small{display:block;font-size:11px;color:var(--muted);margin:3px 0}.pickup-list-row .button-row{margin-top:8px}
@media(max-width:760px){.pickup-summary{padding:10px}.pickup-summary strong{font-size:14px}.pickup-summary small{font-size:10px;max-width:210px}.pickup-summary button,.pickup-toggle{font-size:11px;padding:6px 8px;min-height:40px}.pickup-location-actions{padding:4px 9px}.pickup-badge{font-size:10px}.map-selected-title>.pickup-toggle{font-size:10px;min-height:40px;padding:5px 6px}}
.pickup-items-heading{font-size:13px;margin:12px 0 7px;color:#215b47}
.pickup-item{padding:9px 10px;margin:6px 0;border:1px solid #e2e6dc;border-radius:8px;background:#fafbf7}
.pickup-item-saved{border-color:#bbcebc;background:#edf5e9}
.pickup-item>div>strong{font-size:13px;line-height:1.5;display:block}
.pickup-item .button-row{margin-top:5px;gap:6px}.pickup-item .button-row>a{font-size:12px;min-height:40px;padding:6px 9px}
.pickup-unspecified{font-size:12px;color:#885c21;background:#fff4df;border-radius:7px;padding:9px;margin:10px 0}
.pickup-available{margin:9px 0}.pickup-available>summary{font-size:12px;color:#657866;cursor:pointer;padding:7px 0}
@media(max-width:760px){.pickup-list-row>div>strong{font-size:15px}.pickup-item{padding:8px}.pickup-item>div>strong{font-size:12px}.pickup-item .button-row>a{font-size:11px}.pickup-summary>button{white-space:normal;min-width:90px}}
