:root{font:16px/1.45 system-ui,sans-serif;color:#122c24;background:#edf3ef;color-scheme:light;--green:#13694e;--line:#ccdcd3}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
.wrap{width:min(100% - 28px,1120px);margin:auto}
header{background:#102c25;color:#fff;padding:28px 0 22px}
header p{color:#d5e7df;margin:.5rem 0 0}
.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.11em;color:var(--green)}
header .eyebrow{color:#a3e3c9}
h1,h2,p{overflow-wrap:anywhere}
h1{font-size:clamp(1.55rem,6vw,2.3rem);line-height:1.15;margin:.4rem 0}
h2{font-size:1.25rem;margin:0 0 .45rem}
main{padding:15px 0 28px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:13px}
label{display:block;font-weight:650;margin:0 0 .35rem}
input,select,button,.button{font:inherit;min-height:44px;border-radius:9px}
input:not([type=checkbox]),select{border:1px solid #92a79c;color:inherit;background:#fff;padding:9px 12px;width:100%}
button,.button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--green);color:#fff;border:1px solid transparent;font-weight:700;padding:9px 13px;margin:0;text-align:center}
button.secondary,.button.secondary{background:#f0f7f3;color:#173e30;border-color:var(--line)}
:focus-visible,input[type=file]:focus-visible+label{outline:3px solid #b16800;outline-offset:2px}
button:disabled{opacity:.55;cursor:wait}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin-top:12px}
.filters>div{min-width:0}
.filters select,.review-options select{min-width:0}
.status-options [aria-pressed=true]{background:var(--green);color:#fff;border-color:var(--green)}
#filter-panel,#advanced{margin-top:12px}
summary{cursor:pointer;font-weight:650;padding:6px 0}
#filter-panel>summary{width:fit-content;min-height:44px;padding:10px 12px;background:#f0f7f3;border:1px solid var(--line);border-radius:9px}
#advanced>summary{min-height:44px;padding:10px 0}
.chip{border-radius:24px;font-size:.85rem;padding:6px 12px;min-height:36px}
.review-options{display:flex;align-items:center;gap:8px}
.review-options label{margin:0}
.review-options select{width:auto}
.review-options .mobile-sort,.pager .page-picker{display:none}
.pager,.page-numbers{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pager{margin:8px 0 12px}
.pager-bottom{margin:12px 0 0}
.page-numbers button{min-width:44px}
.pager [aria-current=page]{background:var(--green);border-color:var(--green);color:#fff}
.pager button:disabled{cursor:default}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:.9rem}
th,td{padding:8px;border-bottom:1px solid var(--line)}
th{color:#2e5144;background:#f0f7f3}
th button{background:none;border:0;color:inherit;padding:0;text-align:left;min-height:36px}
th[aria-sort=ascending] button::after{content:" ↑"}
th[aria-sort=descending] button::after{content:" ↓"}
.product-reference,.product-barcode{font-variant-numeric:tabular-nums;white-space:nowrap}
.selected-row{background:#edf8f2}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.progress-label{display:flex;justify-content:space-between;gap:10px;font-size:.9rem;margin:14px 0 4px}
progress{width:100%;accent-color:var(--green);height:12px}
.muted,footer{color:#486158;font-size:.88rem}
#selected-reference{margin:.1rem 0 .8rem}
.scan{width:100%;margin-bottom:12px}
#viewfinder{margin-bottom:8px;background:#102c25;border-radius:10px;overflow:hidden}
video{display:block;width:100%;height:min(52vw,270px);object-fit:contain}
.notice,.preview{border-radius:8px;background:#edf6f0;padding:8px 10px;margin:8px 0}
.notice.error{background:#fff2dc;color:#6f3900}
.preview p{margin:0;white-space:pre-line}
ul{padding:0;margin:0;list-style:none}
li+li{margin-top:6px}
.product{background:transparent;color:inherit;justify-content:flex-start;text-align:left;width:100%;padding:0;overflow-wrap:anywhere}
.product[aria-current=true]{color:var(--green)}
.pill{font-size:.76rem;white-space:nowrap;border-radius:20px;padding:4px 8px;background:#f1f3f2}
.pill.saved{background:#d6f1e3;color:#154a35}
footer{padding:0 5px}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#preview details{margin-top:8px}
#preview-rows{padding:8px 4px;max-height:18rem;overflow:auto;font-size:.875rem;overflow-wrap:anywhere}
#viewfinder video {object-fit:contain}
@media(max-width:740px), (max-width:950px) and (pointer:coarse){
  .wrap{width:calc(100% - 20px)}
  header{padding:20px 0 16px}
  .card{padding:12px}
  .status-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .status-options button{padding-inline:6px}
  .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chip{max-width:100%;min-height:44px;overflow-wrap:anywhere}
  .review-options{display:grid;grid-template-columns:auto minmax(0,1fr)}
  .review-options select{width:100%}
  .review-options .mobile-sort,.pager .page-picker{display:block}
  .pager .page-numbers{display:none}
  .pager{display:grid;grid-template-columns:auto minmax(0,1fr) auto}
  .pager button{padding-inline:6px;font-size:.86rem}
  .pager select{padding-inline:5px}
  .table-wrap{overflow:visible}
  #review-table thead{display:none}
  #review-table,#review-table tbody{display:block}
  #review-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:10px 12px;margin-bottom:8px;border:1px solid var(--line);border-radius:10px}
  #review-table td{padding:0;border:0;overflow-wrap:anywhere}
  #review-table td:first-child{grid-column:1/-1}
  #review-table td:last-child{justify-self:end;align-self:center;grid-column:2;grid-row:2/4}
  #review-table td:only-child{grid-column:1/-1;grid-row:auto;justify-self:start}
  #review-table .product-family,#review-table .product-brand,#review-table .product-model{display:none}
  .product-barcode,.product-reference{white-space:normal;font-size:.83rem;color:#486158}
  .product-barcode::before,.product-reference::before{content:attr(data-label) " "}
}
@media(max-width:360px){
  .filters{grid-template-columns:minmax(0,1fr)}
}
