.count-shell{max-width:1180px;margin:0 auto;padding:24px;font-family:system-ui,sans-serif;color:#172b3a}.count-scanner-page{margin:0;background:var(--background,#f8fafc)}.count-shell h1{font-size:clamp(24px,4vw,34px);margin:8px 0 12px}.count-shell h2{font-size:22px;margin:0 0 12px}.count-shell h3{margin:12px 0}.count-eyebrow{font-size:12px;font-weight:800;letter-spacing:.1em;color:var(--orange-dark,#ea580c)}.count-card{padding:22px;border:1px solid var(--line,#e8edf3);border-radius:18px;background:#fff;margin:18px 0}.count-shell p{line-height:1.5}.count-shell label{display:grid;gap:8px;margin:16px 0;font-size:14px;font-weight:650}.count-shell input,.count-shell select,.count-shell textarea{box-sizing:border-box;max-width:100%;width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;background:#fff;color:inherit;min-height:44px}.count-shell input[type=checkbox]{width:22px;min-height:22px;height:22px}.count-shell button{padding:12px 18px;border:1px solid var(--orange-dark,#ea580c);border-radius:10px;background:var(--orange-dark,#ea580c);color:white;font:inherit;font-weight:700;cursor:pointer;min-height:44px}.count-shell button.secondary{background:#fff;color:var(--orange-dark,#ea580c)}.count-shell button:disabled{opacity:.5;cursor:default}.count-actions{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.count-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.count-grid label{margin:0}.count-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.count-stats>div{padding:16px;border-radius:12px;background:var(--orange-soft,#fff7ed)}.count-stats span{display:block;font-size:13px}.count-stats strong{font-size:28px}.count-message{padding:12px 16px;border-radius:10px;background:var(--orange-soft,#fff7ed);white-space:pre-wrap}.count-message:empty{display:none}.count-message.error{background:#fff1ef;color:#912b20}.count-last-scan{padding:14px;border-radius:10px;background:var(--orange-soft,#fff7ed);margin:16px 0;overflow-wrap:anywhere}.count-last-scan:empty{display:none}.count-shell details{margin:20px 0}.count-shell summary{cursor:pointer;padding:8px 0}.count-table-wrap{overflow:auto;margin:16px 0}.count-shell table{border-collapse:collapse;width:100%;font-size:14px}.count-shell th,.count-shell td{padding:12px;text-align:left;border-bottom:1px solid #e4ebe7;vertical-align:top}.count-shell th{font-size:12px;text-transform:uppercase;background:#f8fafc}.count-shell td small{display:block;color:#64748b}.count-shell .box-quantity{min-width:100px;max-width:160px}.count-shell .count-scroll{max-height:560px;overflow:auto}.count-shell .count-pill{display:inline-block;background:var(--orange-soft,#fff7ed);border-radius:15px;padding:5px 10px;white-space:nowrap}.count-camera{position:relative;width:min(100%,420px);margin-inline:auto;aspect-ratio:1;max-height:420px;background:#172b3a;border-radius:12px;overflow:hidden}.count-camera video{width:100%;height:100%;object-fit:cover}.count-camera #countCameraReticle{position:absolute;inset:12%;border:2px solid white;border-radius:12px;pointer-events:none}.count-shell [hidden]{display:none!important}.count-help{border-left:4px solid var(--orange-dark,#ea580c);padding:12px 18px;background:var(--orange-soft,#fff7ed)}.count-shell .count-danger{color:#a52720;font-weight:700}#countInviteQr{margin:16px 0;background:white;padding:16px;display:inline-block;max-width:100%}#countInviteQr svg{width:280px;max-width:100%;height:auto}.count-shell .count-section-tabs{display:flex;gap:10px;flex-wrap:wrap}.count-shell :focus-visible{outline:3px solid #f5a342;outline-offset:2px}@media(max-width:640px){.count-shell{padding:16px}.count-card{padding:16px}.count-grid{grid-template-columns:1fr}.count-stats{gap:6px}.count-stats>div{padding:10px}.count-stats strong{font-size:24px}.count-actions>button{flex:1;min-width:140px}.count-shell th,.count-shell td{padding:10px}.count-shell button{font-size:14px}.count-shell .count-scroll{max-height:450px}}

/* Searchable Count Workspace controls share the application's open-to-search focus. */
#boxCountWorkspace .select2-container{width:100%!important;min-width:0;max-width:100%;font-size:14px;font-weight:500}
#boxCountWorkspace .select2-container .select2-selection--single{min-height:46px;height:auto;border:1px solid #cbd5e1;border-radius:10px;background:#fff;display:flex;align-items:center}
#boxCountWorkspace .select2-container .select2-selection__rendered{padding:10px 34px 10px 12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;color:#172b3a}
#boxCountWorkspace .select2-container .select2-selection__arrow{top:50%;transform:translateY(-50%);right:8px}
#boxCountWorkspace .select2-container--focus .select2-selection{border-color:var(--orange-dark,#ea580c);box-shadow:0 0 0 3px rgba(249,115,22,.12)}

.count-card-totals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}.count-card-totals>div{padding:14px;border:1px solid var(--line,#e8edf3);border-radius:12px;background:var(--orange-soft,#fff7ed);min-width:0}.count-card-totals span{display:block;font-size:12px;line-height:1.35;color:#64748b}.count-card-totals strong{display:block;margin-top:7px;font-size:22px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}@media(max-width:1000px){.count-card-totals{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:560px){.count-card-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.count-card-totals strong{font-size:20px}}

/* Keep the stock-card submit action separate from the last input row. */
#privateStockCardForm{display:grid;gap:18px;margin:0 0 22px}
#privateStockCardForm>.count-grid{row-gap:18px}
#savePrivateCardEntry{justify-self:start;margin:0;min-height:46px}
@media(max-width:640px){#privateStockCardForm{gap:20px}#savePrivateCardEntry{justify-self:stretch;width:100%}}

/* Compact, stable pagination on phones and tablets. */
.count-shell .count-pagination{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin:14px 0 2px;width:100%;max-width:100%;min-width:0}
.count-shell .count-pagination>button{min-width:0;min-height:40px;padding:8px 12px;font-size:12px;line-height:1.25;border-radius:9px;white-space:nowrap;flex:none}
.count-shell .count-pagination>span{text-align:center;font-size:12px;line-height:1.3;color:#64748b;min-width:0}
@media(max-width:640px){.count-shell .count-pagination{gap:6px}.count-shell .count-pagination>button{font-size:11px;padding:8px 10px}.count-shell .count-pagination>span{font-size:11px}}

/* Shared orange identity; standalone scanner uses the same fallback palette. */
.count-shell button:not(:disabled):hover{filter:brightness(.97)}


/* Keep form actions visibly separate without enlarging every field margin. */
.count-shell .count-grid+button,.count-shell label+button{margin-top:14px}
.count-shell .count-card,.count-shell .count-grid>*{min-width:0}
.count-shell .count-card>h2,.count-shell .count-card>h3{line-height:1.3;overflow-wrap:anywhere}
.count-shell .count-help{overflow-wrap:anywhere}
@media(max-width:700px){
 #boxCountWorkspace{padding:0;min-width:0;max-width:100%}
 .count-shell{padding:12px}
 .count-shell h1{font-size:24px;line-height:1.2}
 .count-shell header>p{font-size:13px;line-height:1.5;margin:10px 0 14px}
 .count-shell .count-card{padding:14px;margin:12px 0;border-radius:14px}
 .count-shell .count-grid{gap:14px;grid-template-columns:minmax(0,1fr)}
 .count-shell .count-section-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .count-shell .count-section-tabs>button{min-width:0;white-space:normal;padding:10px 8px}
 .count-shell input,.count-shell select,.count-shell textarea{font-size:16px}
 .count-shell .count-actions{gap:8px;margin:14px 0}
 .count-shell .count-actions>button{min-width:0;white-space:normal;flex:1 1 140px}
 .count-shell .count-pagination>button{flex:none;white-space:nowrap}
 .count-shell .count-stats>div{min-width:0;padding:10px}
 .count-shell .count-stats strong{font-size:22px;overflow-wrap:anywhere}
 .count-shell .count-table-wrap{max-width:100%;overscroll-behavior-x:contain}
}

