/* New order slide-over panel */
.npanel{width:660px}
#npanel .no-page{max-width:none;margin:0}
.no-ic{width:34px;height:34px;border-radius:11px;background:var(--brand-orange-ui);color:#fff;display:grid;place-items:center;flex:none}
.no-head .op-top{gap:12px}
.no-head .op-id{font-size:18px;line-height:22px}
.no-head .no-sub{font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.last-created{cursor:pointer;height:30px;gap:4px}
#npanel .src-pills{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
#npanel .src-pills::-webkit-scrollbar{display:none}
#npanel .src-pill{flex:none;padding:0 13px;height:38px}
/* While a panel is open, confirmations appear beside it instead of over its header */
#npanel.show ~ .toasts{right:684px}
#npanel .op-foot .bt-m{display:none}
#npanel .op-foot .bar-hint{white-space:nowrap;font-size:12px}
#npanel .op-foot .btn:disabled{opacity:.45;cursor:not-allowed}
@media (max-width:760px){
  #npanel .op-foot .bt-d,#npanel .op-foot .bar-pending .bt,#npanel .op-foot .bar-hint{display:none}
  #npanel .op-foot .bt-m{display:inline}
  #npanel .op-foot .bar-pending{width:44px;height:44px;padding:0}
  #npanel.show ~ .toasts{right:12px;left:12px;top:12px}
  #npanel.show ~ .toasts .toast{width:auto}
  .no-head .no-ic{width:30px;height:30px}
  .no-head .op-id{font-size:16px}
}
/* New order action bar — desktop: sticky at the bottom of the page content (phones: fixed bar, see mobile block) */
@media (min-width:761px){
.no-mbar{position:sticky;bottom:12px;z-index:6;display:flex;align-items:center;gap:10px;margin-top:16px;padding:10px 12px 10px 8px;
  background:var(--bg-sidebar);border:1px solid var(--border);border-radius:18px;box-shadow:0 10px 30px rgba(19,6,0,.10)}
.no-mbar .sum{margin-left:auto;text-align:right;line-height:1.15}
.no-mbar .sum span{display:block;font-size:12px;color:var(--text-secondary)}
.no-mbar .sum b{font-size:20px;line-height:26px;font-weight:600}
.no-mbar .bar-hint{padding:0 6px;white-space:nowrap}
.no-mbar .btn:disabled{opacity:.45}
.no-mbar .bt-m{display:none}
.bar-discard{color:var(--text-secondary)}
.bar-discard:hover{color:var(--negative)}
.head-discard{display:none}
.no-page{max-width:1560px}
.no-grid{grid-template-columns:minmax(0,1fr) 400px}
}
@media (max-width:760px){
  .bar-discard,.bar-hint,.no-mbar .bt,.no-mbar .bt-d{display:none}
  .no-mbar .bt-m{display:inline}
  .scan-btn .bt{display:none}
  .scan-btn{width:40px;height:40px;padding:0}
  /* full-screen scanner on phones (body prefix beats the base scanner rules defined later) */
  body .scan-wrap{padding:0;place-items:stretch}
  body .scan{width:100%;border-radius:0;height:100%}
  body .scan-view{flex:1;aspect-ratio:auto}
  body .scan-frame{left:8%;right:8%;top:38%;bottom:38%}
}
.prod-search{display:flex;gap:8px;align-items:flex-start}
.prod-search .addsearch{flex:1;min-width:0}
.scan-btn{flex:none}
/* Barcode scanner */
.scan-wrap{position:fixed;inset:0;z-index:90;background:rgba(19,6,0,.55);display:grid;place-items:center;padding:16px;opacity:0;pointer-events:none;transition:opacity .2s}
.scan-wrap.show{opacity:1;pointer-events:auto}
.scan{width:min(440px,100%);background:var(--bg-sidebar);border-radius:24px;overflow:hidden;display:flex;flex-direction:column;animation:modalIn var(--t-slow) var(--ease)}
.scan header{display:flex;align-items:center;gap:10px;padding:14px 16px}
.scan header .h3{flex:1}
.scan-view{position:relative;aspect-ratio:4/3;background:#0d0705;overflow:hidden}
.scan-view video{width:100%;height:100%;object-fit:cover;display:block}
.scan-frame{position:absolute;left:12%;right:12%;top:30%;bottom:30%;border-radius:16px;box-shadow:0 0 0 999px rgba(0,0,0,.38);border:2px solid rgba(255,255,255,.85);transition:border-color .15s,box-shadow .15s}
.scan-frame .laser{position:absolute;left:8px;right:8px;top:50%;height:2px;background:var(--brand-orange);box-shadow:0 0 12px var(--brand-orange);animation:laser 1.6s ease-in-out infinite}
@keyframes laser{0%,100%{transform:translateY(-28px)}50%{transform:translateY(28px)}}
.scan-frame.ok{border-color:#2ecc71}
.scan-frame.bad{border-color:var(--negative)}
.scan-status{position:absolute;left:0;right:0;bottom:12px;text-align:center;color:#fff;font-size:13px;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.scan-last{margin:12px 16px 0;padding:10px 12px;border-radius:14px;background:var(--bg-chip);display:flex;align-items:center;gap:10px;min-height:56px;font-size:13px}
.scan-last.ok{background:color-mix(in srgb,var(--success) 12%,var(--bg-sidebar));animation:popIn var(--t) var(--ease)}
.scan-last.bad{background:color-mix(in srgb,var(--negative) 10%,var(--bg-sidebar));color:var(--negative);animation:popIn var(--t) var(--ease)}
.scan-manual{display:flex;gap:8px;padding:12px 16px}
.scan-manual .input{flex:1}
.scan footer{display:flex;align-items:center;gap:10px;padding:12px 16px 16px;border-top:1px solid var(--border)}
.scan footer .caption{flex:1}
.confirm-box{padding:4px 20px 8px}

/* Respect users who turn off animations */
