:root{font:1rem/1.5 system-ui,sans-serif;color:#162b32;background:#eef4f3;color-scheme:light}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
header{background:#142f36;color:#fff}
.wrap{width:min(100% - 2rem,66rem);margin-inline:auto}
.header,nav,.product-head,.actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.header{justify-content:space-between;padding:.75rem 0}
.brand{font-size:1.25rem;font-weight:800;color:inherit;text-decoration:none}
.brand span{color:#a3e6ca}
nav a,.link{color:#eef9f6;padding:.5rem .65rem;text-decoration:none}
nav a[aria-current]{background:#2a4c53;border-radius:.45rem}
.link{background:transparent}
main{padding:1.4rem 0 3rem}
h1{font-size:clamp(1.8rem,5vw,2.65rem);margin:0 0 1rem;line-height:1.1}
h2{font-size:1.2rem;line-height:1.25;margin:0 0 .6rem;overflow-wrap:anywhere}
.panel{background:#fff;border:1px solid #cedcda;border-radius:.75rem;padding:clamp(.85rem,3vw,1.3rem)}
.login{max-width:26rem;margin-inline:auto}
.admin-grid,.results,.fields{display:grid;gap:.85rem;align-items:start}
.admin-grid{grid-template-columns:1.3fr 1fr}
.pair,.movement{display:grid;gap:.7rem;grid-template-columns:1fr 1fr}
.search{display:flex;align-items:end;gap:.65rem;margin-bottom:1rem}
.search label{flex:1;min-width:0}
.search a{padding:.6rem 0;color:#075950}
label{display:grid;gap:.25rem;font-weight:600;min-width:0}
input,select,button{font:inherit;min-height:2.75rem;border-radius:.45rem;padding:.5rem .65rem}
input,select{width:100%;color:#162b32;border:1px solid #8ea6a2;background:#fff}
button{background:#066352;color:#fff;border:1px solid transparent;font-weight:700;cursor:pointer}
.secondary{background:#fff;color:#075950;border-color:#49766d}
:focus-visible{outline:3px solid #208f80;outline-offset:3px}
.product-head{justify-content:space-between}
.product-head p{margin:.15rem 0;color:#425b5e;overflow-wrap:anywhere}
.quantity{background:#d7f1e6;color:#124c3e;border-radius:.45rem;padding:.25rem .65rem}
.shelves{list-style:none;padding:0;margin:.8rem 0}
.shelves li{padding:.45rem 0;border-bottom:1px solid #e0ebe9;display:flex;justify-content:space-between;gap:.6rem;overflow-wrap:anywhere}
summary{cursor:pointer;font-weight:700;color:#075950;padding:.35rem 0}
.movement{margin-top:.65rem}
.actions{grid-column:1/-1}
.alert,.notice{padding:.75rem 1rem;border-radius:.45rem;margin:0 0 1rem}
.alert{background:#f9dedb;color:#811e17}
.notice{background:#d7f1e6;color:#124c3e}
@media(max-width:680px){.admin-grid{grid-template-columns:1fr}.search{flex-wrap:wrap}.search label{flex-basis:100%}}
@media(max-width:365px){.pair,.movement{grid-template-columns:1fr}}
.search .camera-toggle{display:flex;flex:0 0 auto;align-items:center;gap:.55rem;min-height:2.75rem;cursor:pointer}
.camera-toggle input{appearance:none;position:relative;width:2.65rem;height:1.5rem;min-height:0;margin:0;padding:0;border:0;border-radius:2rem;background:#546a6e;cursor:pointer}
.camera-toggle input::after{content:"";position:absolute;top:.19rem;left:.2rem;width:1.12rem;height:1.12rem;border-radius:50%;background:#fff;transition:transform .15s ease}
.camera-toggle input:checked{background:#066352}
.camera-toggle input:checked::after{transform:translateX(1.13rem)}
.camera-panel{max-width:32rem;margin:0 0 1rem}
.camera-panel video{display:block;width:100%;max-height:min(34vh,16rem);object-fit:contain;background:#142f36}
#camera-status{margin:0 0 .65rem}
button:disabled{cursor:default;opacity:.55}

#camera-guide{margin:.5rem 0 0}
.history-entry{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.history-entry p{margin:.25rem 0;color:#425b5e;overflow-wrap:anywhere}
.history-issue{background:#f9dedb;color:#811e17}
.pagination{margin-top:1rem}
.pagination a{color:#075950;text-decoration:underline}
#admin-products{margin-top:1rem}
#admin-products a,#product-form a{color:#075950}
