:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#17212b;background:#edf0f2;font-synthesis:none;letter-spacing:0;--ink: #17212b;--muted: #65717d;--line: #d4dadd;--panel: #ffffff;--green: #1d6f50;--green-soft: #e5f3ec;--red: #a83a3a;--amber: #8c620f}*{box-sizing:border-box}body{margin:0;min-width:320px;background:#edf0f2}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}.app-shell{min-height:100vh}.topbar{position:sticky;top:0;z-index:20;min-height:62px;display:flex;align-items:center;gap:12px;padding:9px max(16px,calc((100vw - 1320px)/2));background:#fff;border-bottom:1px solid var(--line)}.brand-mark{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;background:#1d6f50;color:#fff;font-weight:800;border-radius:6px}.brand-copy{display:grid;min-width:0;line-height:1.2}.brand-copy span{color:var(--green);font-size:12px;font-weight:750;text-transform:uppercase}.brand-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.back-button{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--ink)}.back-button:hover{border-color:#92a39c;background:#f2f7f4;color:var(--green)}.admin-page,.store-page{width:min(1320px,100%);margin:0 auto;padding:18px 16px 36px}.view-tabs{display:flex;gap:2px;margin:-6px 0 14px;border-bottom:1px solid var(--line)}.view-tabs button{min-height:38px;display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-weight:700}.view-tabs button:hover{color:var(--ink);background:#f5f7f8}.view-tabs button.active{border-bottom-color:var(--green);color:var(--green)}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}h1,h2,p{margin:0}.page-heading h1{font-size:24px}.page-heading p{margin-top:3px;color:var(--muted);font-size:13px}.metric-strip{display:flex;align-items:baseline;gap:8px}.metric-strip span{color:var(--muted);font-size:12px}.metric-strip strong{font-size:19px}.expired-metric strong{color:var(--red)}.toolbar{min-height:42px;display:grid;grid-template-columns:18px minmax(220px,420px) 1fr;align-items:center;gap:8px;padding:5px 8px;margin-bottom:10px;background:#fff;border:1px solid var(--line);border-radius:6px}.toolbar input{border:0;outline:0;min-width:0;padding:7px 4px}.toolbar>span{justify-self:end;color:var(--muted);font-size:12px}.summary-toolbar{grid-template-columns:18px minmax(220px,420px) 1fr}.summary-filter{justify-self:end;display:inline-flex;align-items:center;gap:7px;color:#394651;font-size:12px;font-weight:650}.summary-filter input{width:16px;height:16px;margin:0;accent-color:var(--green)}.table-shell{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:6px}table{width:100%;min-width:760px;border-collapse:collapse}th,td{padding:9px 10px;border-bottom:1px solid #e6e9eb;text-align:left;vertical-align:middle;font-size:13px}th{position:sticky;top:0;background:#f5f7f8;color:#58636e;font-size:11px;text-transform:uppercase}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#f8faf9}.store-name{min-width:380px;font-weight:650}.store-link{display:flex;align-items:center;gap:7px;color:#155f41;text-decoration:none}.store-link svg{flex:0 0 auto}.store-link span{text-decoration:underline;text-decoration-color:#9bbcaf;text-underline-offset:2px}.store-link:hover{color:var(--green)}.actions{text-align:right;white-space:nowrap}.actions-content{display:flex;justify-content:flex-end;gap:5px}.icon-button{width:34px;height:34px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:5px;background:#fff;color:#34414d}.icon-button:hover{border-color:#92a39c;background:#f2f7f4}.status{display:inline-flex;padding:3px 7px;border-radius:4px;font-size:11px;font-weight:700}.status.completed{background:var(--green-soft);color:var(--green)}.status.in_progress{background:#fff0cb;color:var(--amber)}.status.empty{background:#eceff1;color:#65717d}.summary-product{min-width:360px}.summary-product strong,.summary-product small,.summary-stores strong,.summary-stores small,.summary-amount strong,.summary-amount small{display:block}.summary-product strong{line-height:1.3}.summary-product small,.summary-stores small,.summary-amount small{margin-top:3px;color:var(--muted);font-size:10px}.summary-stores{min-width:115px}.summary-amount{min-width:120px}.summary-amount strong{font-size:14px}.summary-amount.expired.has-value strong{color:var(--red)}.summary-amount.valid strong{color:var(--green)}.summary-amount.pending strong{color:var(--amber)}.sticky-controls{position:sticky;top:70px;z-index:15;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;min-height:48px;margin-bottom:10px;padding:6px 8px;background:#fffffff7;border:1px solid var(--line);border-radius:6px;box-shadow:0 2px 7px #18222a12}.completion{display:flex;align-items:center;gap:7px;font-size:12px}.completion svg{color:var(--green)}.completion strong{font-size:15px}.save-state{justify-self:end;color:var(--muted);font-size:12px}.save-state.dirty{color:var(--amber);font-weight:650}.primary-button,.secondary-button{min-height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:5px;font-weight:700}.primary-button{padding:7px 13px;border:1px solid var(--green);background:var(--green);color:#fff}.secondary-button{padding:6px 9px;border:1px solid var(--line);background:#fff;color:#33414c;font-size:12px}.product-list{display:grid;gap:8px}.product-card{padding:10px;background:var(--panel);border:1px solid var(--line);border-left:4px solid #aab3b8;border-radius:6px}.product-card.complete{border-left-color:var(--green)}.product-card.invalid{border-left-color:var(--red)}.product-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:9px}.product-heading h2{font-size:14px;line-height:1.3}.product-meta{display:flex;flex-wrap:wrap;gap:5px 12px;margin-top:4px;color:var(--muted);font-size:11px}.stock-box{flex:0 0 118px;display:grid;text-align:right}.stock-box span,.stock-box small{color:var(--muted);font-size:10px}.stock-box strong{font-size:16px}.stock-box small{color:var(--green);font-weight:700}.lot-head,.lot-row{display:grid;grid-template-columns:minmax(160px,1.2fr) minmax(110px,.8fr) minmax(130px,.8fr) 34px;gap:6px;align-items:center}.lot-head.weighted,.lot-row.weighted{grid-template-columns:52px minmax(160px,1.2fr) minmax(110px,.8fr) minmax(130px,.8fr) 34px}.lot-head{padding:0 0 4px;color:var(--muted);font-size:10px}.lot-row{margin-bottom:5px}.lot-row label>span,.expiry>span{display:none}.lot-row input{width:100%;height:34px;min-width:0;padding:5px 7px;border:1px solid var(--line);border-radius:5px;background:#fff}.lot-row input[type=date]{cursor:pointer}.expiry{min-height:34px;display:flex;align-items:center;padding:0 8px;background:#f2f5f6;border-radius:5px}.expiry strong{font-size:12px;color:#314452}.bag-index{display:grid;place-items:center;height:34px;background:#eef3f0;color:var(--green);border-radius:5px;font-size:12px}.row-check{width:34px;height:34px;display:grid;place-items:center;color:var(--green)}.product-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px}.lot-actions{display:flex;flex-wrap:wrap;gap:6px}.balance{color:var(--muted);font-size:12px;font-weight:650;white-space:nowrap}.balance.done{color:var(--green)}.balance.over{color:var(--red)}.alert,.empty-state{margin:10px 0;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:13px}.alert.error{border-color:#e2b6b6;background:#fff1f1;color:#8b2c2c}.alert.success{border-color:#b9ddca;background:#eaf6ef;color:#155f41}@media(max-width:720px){.topbar{min-height:58px;padding:8px 10px}.brand-mark{width:38px;height:38px;flex-basis:38px}.brand-copy strong{font-size:13px}.admin-page,.store-page{padding:10px 8px 28px}.view-tabs{margin-top:-2px}.view-tabs button{flex:1 1 50%;justify-content:center;padding-inline:6px}.page-heading{align-items:flex-start}.summary-heading{display:grid;grid-template-columns:1fr;gap:7px}.summary-heading .expired-metric{justify-self:start}.toolbar{grid-template-columns:18px 1fr}.toolbar>span{grid-column:1 / -1;justify-self:start;padding-left:26px}.summary-toolbar{grid-template-columns:18px 1fr}.summary-filter{grid-column:1 / -1;justify-self:start;padding:3px 0 3px 26px}.table-shell{overflow:visible;border:0;background:transparent}table{min-width:0}thead{display:none}tbody{display:grid;gap:6px}tbody tr{display:grid;grid-template-columns:auto auto 1fr 36px;align-items:center;gap:7px 12px;padding:9px 10px;border:1px solid var(--line);border-radius:6px;background:#fff}tbody tr:hover{background:#fff}tbody tr:last-child td,tbody td{display:block;padding:0;border-bottom:0}.store-name{grid-column:1 / 4;min-width:0}.store-link{align-items:flex-start;line-height:1.3}.sku-cell,.filled-cell{color:var(--muted);font-size:11px}.sku-cell:before,.filled-cell:before{content:attr(data-label) ": "}.status-cell{min-width:0}.actions{grid-column:4;grid-row:1 / 3;align-self:stretch}.actions-content{height:100%;align-items:center}.summary-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-table .summary-product,.summary-table .summary-stores{grid-column:1 / -1;min-width:0}.summary-table .summary-amount{min-width:0;padding:7px;border:1px solid #e1e6e8;border-radius:5px;background:#f8faf9}.summary-table .summary-amount.pending{grid-column:1 / -1}.summary-table td[data-label]:before{display:block;margin-bottom:3px;color:var(--muted);font-size:9px;font-weight:650;content:attr(data-label)}.sticky-controls{top:64px;grid-template-columns:1fr auto;gap:5px 8px}.completion{gap:4px;min-width:0}.completion span{font-size:10px;white-space:nowrap}.completion strong{font-size:14px;white-space:nowrap}.save-state{grid-column:1 / -1;grid-row:2;justify-self:start;line-height:1.2}.primary-button{grid-column:2;grid-row:1}.product-heading{gap:8px}.product-heading h2{font-size:13px}.stock-box{flex-basis:96px}.lot-head{display:none}.lot-row{grid-template-columns:minmax(0,1fr) 34px;gap:7px;padding-top:7px;border-top:1px solid #edf0f2}.lot-row label{min-width:0}.lot-row .date-field{grid-column:1;grid-row:1}.lot-row .quantity-field{grid-column:1 / -1;grid-row:2}.lot-row .expiry{grid-column:1 / -1;grid-row:3}.lot-row.weighted{grid-template-columns:38px minmax(0,1fr)}.lot-row.weighted .bag-index{grid-column:1;grid-row:1;align-self:end}.lot-row.weighted .date-field{grid-column:2;grid-row:1}.lot-row.weighted .quantity-field{grid-column:2;grid-row:2}.lot-row.weighted .expiry{grid-column:2;grid-row:3}.lot-row.weighted .row-check{display:none}.lot-row label>span,.expiry>span{display:block;margin-bottom:3px;color:var(--muted);font-size:9px}.expiry{display:grid;align-content:center}.lot-row>.icon-button{grid-column:2;grid-row:1;align-self:end}.product-footer{align-items:flex-end;flex-direction:column}.lot-actions{width:100%}.secondary-button{flex:1 1 140px}}
