@font-face{font-family:Vazir;src:url('/assets/Vazirmatn.woff2') format('woff2');font-display:swap}*{box-sizing:border-box}body{font-family:Vazir,Tahoma,sans-serif;background:#f5f7fb;color:#182433;margin:0;font-size:16px;padding-bottom:calc(86px + env(safe-area-inset-bottom))}button,input,select,textarea{font:inherit}.topbar{background:#fff;border-bottom:1px solid #e6e9ef;padding:16px max(16px,calc((100vw - 1000px)/2));display:flex;align-items:center;justify-content:space-between}.topbar h1{font-size:20px;margin:3px 0}.topbar small,.muted{color:#586779}main{max-width:1000px!important;padding:18px 14px}.btn{min-height:48px}.btn-primary{background:#206bc4}.form-control,.form-select{min-height:48px;font-size:16px}.form-label{margin:14px 0 6px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.toolbar select{flex:1}.toolbar h2{font-size:21px;margin:0}.card{margin-bottom:14px;border-radius:8px}.card-body{padding:18px}#nav{position:fixed;bottom:0;inset-inline:0;display:flex;justify-content:center;background:white;border-top:1px solid #dce2eb;padding:8px 8px calc(8px + env(safe-area-inset-bottom));gap:4px;z-index:5}#nav[hidden]{display:none}#nav button{flex:1;max-width:170px;background:none;border:0;border-radius:6px;min-height:54px;color:#526176;font-size:14px}#nav button.active{background:#eaf2fc;color:#206bc4;font-weight:700}table{width:100%;border-collapse:collapse;table-layout:fixed}th,td{text-align:right;padding:13px 8px;border-bottom:1px solid #e5eaf0;vertical-align:top;overflow-wrap:anywhere}th{font-size:13px;color:#56667c;background:#f8fafc}td{font-size:14px}.date-row td{background:#eaf0f8;font-weight:700}.table-wrap{overflow:hidden}.model{direction:ltr;unicode-bidi:isolate;display:inline-block}.link{background:none;border:0;color:#206bc4;min-height:44px;text-align:right;padding:0;cursor:pointer}tr[data-detail]{cursor:pointer}tr[data-detail]:hover{background:#f2f6fc}.badge{font-size:12px;white-space:normal}.taskhead{display:flex;gap:12px;justify-content:space-between;margin-bottom:12px}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.actions .btn{flex:1}dialog{width:min(720px,96vw);max-height:90dvh;border:0;border-radius:12px;padding:0;box-shadow:0 20px 80px #152b4f30}dialog::backdrop{background:#14213e70}dialog>header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #e5eaf0;position:sticky;top:0;background:#fff;z-index:1}dialog h2{font-size:18px;margin:0}#modal-body{padding:16px}.line{border:1px solid #dbe3ee;background:#f8fafc;border-radius:8px;padding:14px;margin:12px 0}.line label{display:block;margin:10px 0 5px}.line textarea{min-height:90px;direction:ltr;text-align:left}.line .traits{direction:rtl;text-align:right;min-height:48px}.error{color:#b42318;margin:12px 0;white-space:pre-wrap}.success{color:#24733c}.empty{text-align:center;padding:35px 20px;color:#586779}#toast{position:fixed;bottom:100px;left:16px;right:16px;max-width:600px;margin:auto;background:#173657;color:#fff;padding:16px;border-radius:8px;z-index:20}#connection{background:#fff0d1;color:#784600;text-align:center;padding:10px}.summary{display:flex;gap:10px;margin-bottom:18px}.summary>div{flex:1;background:#fff;border:1px solid #e4e9f0;border-radius:8px;padding:12px}.summary strong{display:block;color:#206bc4;font-size:22px}.login{max-width:430px;margin:30px auto}.login h2{font-size:22px}.login input{direction:ltr;text-align:center;letter-spacing:2px}.login .btn{width:100%;margin-top:16px}.pill{display:inline-block;background:#eaf2fc;color:#175ba9;padding:3px 8px;border-radius:5px;margin:3px}.wide{width:100%}[hidden]{display:none!important}button:focus-visible,a:focus-visible,tr:focus-visible{outline:3px solid #206bc4;outline-offset:3px}@media(max-width:600px){dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.table-wrap td{font-size:13px}th,td{padding:12px 6px}.stock th:first-child{width:40%}.actions{position:sticky;bottom:0;background:#fff;padding:12px 0}main{padding:14px 10px}.summary{gap:6px}.summary>div{padding:10px;font-size:13px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

body{background:#f7f9fc;color:#172b45}main{max-width:760px!important;padding:24px 20px}.topbar{padding:14px max(20px,calc((100vw - 720px)/2));background:white}.topbar h1{font-size:18px}.toolbar{margin:6px 0 26px;gap:12px}.toolbar h2{font-size:26px;font-weight:800;flex:1}.toolbar select{max-width:160px;font-size:13px;flex:0 1 160px}.toolbar #refresh{font-size:12px;padding:6px 12px}.btn{border-radius:10px;gap:8px;font-weight:600;min-height:48px;display:inline-flex;align-items:center;justify-content:center}.btn svg,svg.aw-icon{width:22px;height:22px;flex-shrink:0}.btn-primary{background:#1376db;border-color:#1376db}.aw-tabs{display:flex;background:#edf1f7;border:1px solid #e1e7f0;border-radius:12px;padding:4px;gap:4px;margin-bottom:24px}.aw-tabs button{flex:1;min-height:52px;background:transparent;color:#5d6a7e;border:0;border-radius:9px;font-weight:600}.aw-tabs button.active{background:#1376db;color:white;box-shadow:0 3px 8px #1376db20}.aw-print-entry{width:100%;border:1px solid #1376db;color:#1376db;background:white;margin-bottom:24px;min-height:56px}.aw-card{background:white;border:1px solid #e0e7f0;border-radius:16px;padding:22px;margin:0 0 20px;box-shadow:0 3px 8px #1b395106}.aw-card h3{font-size:18px;font-weight:750;margin:0}.aw-card-title{display:flex;align-items:center;gap:12px}.aw-card-title svg{width:27px;height:27px;color:#1376db}.aw-recipient{display:flex;align-items:center;gap:9px;color:#607086;margin:14px 0 0}.aw-recipient svg{width:21px;height:21px}.aw-items{display:flex;flex-direction:column;gap:10px;margin:16px 0}.aw-item{display:flex;gap:8px;align-items:center;justify-content:space-between;font-size:16px}.aw-parcel{border-top:1px solid #e8edf4;margin-top:18px;padding-top:4px}.aw-package-title{font-size:13px;color:#657489;margin-top:12px}.aw-actions{display:flex;gap:10px;flex-wrap:wrap}.aw-actions>.btn{flex:1}.aw-send{border:1px solid #d4e1ed;color:#237145;background:#f6fbf8;width:100%;margin-top:10px}.aw-text-button{margin-inline-start:auto;border:0;background:none;color:#206bc4;font-size:12px;min-height:44px}.aw-empty{padding:44px 18px;text-align:center;color:#738298}.aw-empty>svg{width:42px;height:42px;color:#2779ce;margin-bottom:18px}.aw-empty h3{font-size:18px;color:#33465d}.aw-intro,.aw-help{font-size:14px;color:#6e7d91;line-height:1.9}.aw-description{white-space:pre-wrap;line-height:1.9;margin:16px 0}.aw-group,.aw-original{background:#f7f9fc;border:1px solid #e1e7f0;border-radius:12px;padding:16px;margin:14px 0}.aw-group h3{font-size:16px}.aw-quantity,.aw-weight-row{display:flex;align-items:center;gap:16px;justify-content:space-between;margin:12px 0}.aw-quantity input,.aw-weight-row input{max-width:130px;text-align:center;direction:ltr}.aw-print-card{padding:18px}.aw-select-all,.aw-package-select{display:flex;align-items:center;gap:12px;min-height:48px}.aw-select-all{margin-bottom:12px}.aw-package-select{justify-content:flex-start}.aw-select-all input,.aw-package-select input{width:23px;height:23px;accent-color:#1376db;flex-shrink:0}.aw-weight-error{font-size:13px;color:#c42d3c;margin:8px 0}.aw-code-line{background:white;border-radius:14px}.aw-history{margin-bottom:28px}.aw-history>h3{font-size:18px;margin:4px 0 20px}#nav{gap:0;padding-top:4px}#nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:0;min-height:65px;background:white}#nav button svg{width:25px;height:25px}#nav button.active{background:white;color:#1376db;box-shadow:inset 0 3px #1376db}dialog{border:1px solid #e0e7f0;box-shadow:0 30px 90px #16294135}dialog>header{padding:20px}#modal-body{padding:22px}.line label{font-size:14px}.form-control,.form-select{border-radius:9px;border-color:#dce3ed}#content>.table-wrap{border-radius:14px}#toast{font-size:14px;z-index:50}.btn:disabled{opacity:.45}@media(max-width:600px){main{padding:20px 16px}.toolbar h2{font-size:23px}.toolbar select{max-width:120px}.topbar{padding:12px 16px}.aw-card{padding:18px}.toolbar{margin-bottom:22px}.aw-card h3{font-size:17px}#modal-body{padding:18px}dialog{border:0}.aw-recipient{font-size:15px}.aw-actions{gap:8px}.aw-actions .btn{font-size:14px;padding-inline:10px}.aw-quantity input{max-width:105px}}

.serial-dialog{width:min(540px,100vw);background:#fff;color:#18263d}.serial-dialog>header{justify-content:center;border-bottom:0;padding:24px 60px 20px;background:#fff}.serial-dialog>header h2{font-size:19px;font-weight:750}.serial-dialog #close{position:absolute;right:12px;top:12px;width:48px;height:48px;padding:10px;border:0;background:transparent;box-shadow:none}.serial-dialog #close svg{width:25px;height:25px}.serial-dialog #modal-body{padding:0 16px}.se-form{--se-blue:#0879e9;--se-border:#dce4ef;--se-muted:#64748b;min-height:100%;display:flex;flex-direction:column;gap:16px}.se-card{border:1px solid #e2e8f1;background:#f7f9fc;border-radius:13px;padding:16px}.se-card h3{font-size:16px;line-height:1.7;margin:0 0 16px;font-weight:750}.se-card .form-select{background-color:white;min-height:48px;border-radius:9px;border-color:var(--se-border);font-size:16px}.se-types{display:flex;margin:16px 0 18px;background:#edf1f6;border-radius:10px;overflow:hidden}.se-types button{flex:1;min-height:50px;border:0;border-radius:9px;background:transparent;color:#334155;font-size:16px}.se-types button.active{background:linear-gradient(110deg,#087bed,#1474d0);color:#fff}.se-methods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.se-methods button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:76px;background:#fbfcfe;border:1px solid var(--se-border);border-radius:10px;color:#42516a;padding:8px 2px;font-size:14px}.se-methods button.active{border-color:var(--se-blue);background:#edf6ff;color:#006de0}.se-methods svg{width:26px;height:26px}.se-stage{position:relative;border:1px dashed #c8d3e3;border-radius:10px;min-height:160px;overflow:hidden;background:linear-gradient(140deg,#fff9,#f8fafd)}.se-start,.se-photo-help{border:0;background:none;width:100%;min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:18px 8px;color:var(--se-muted);font-size:14px}.se-start svg{width:83px;height:83px;color:#58677d}.se-photo-help svg{width:36px;height:36px}.se-stage video{width:100%;max-height:260px;object-fit:contain;display:block;background:#152332}.se-manual{padding:12px}.se-manual label{font-size:14px;display:block;margin-bottom:8px}.se-manual textarea{font-size:16px;margin-bottom:10px}.se-manual .btn{width:100%}.se-camera-tools{display:flex;gap:8px;margin-top:8px}.se-camera-tools button{flex:1}.se-ocr{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--se-muted);margin:12px 0;min-height:44px}.se-ocr input{width:22px;height:22px;accent-color:var(--se-blue)}.se-status{font-size:13px;line-height:1.8;color:var(--se-muted);margin:10px 0}.se-status:empty{display:none}.se-list{margin-top:16px;display:flex;flex-direction:column;gap:10px}.se-row{direction:ltr;display:grid;grid-template-columns:34px minmax(0,1fr) 40px;align-items:center;gap:8px;min-height:48px}.se-row input[type=checkbox]{width:24px;height:24px;margin:0;accent-color:var(--se-blue);cursor:pointer;justify-self:start}.se-row .form-control{min-width:0;min-height:49px;padding:8px 12px;border:1px solid var(--se-border);border-radius:9px;font-size:17px;background:white;color:#111c30}.se-row button{display:flex;align-items:center;justify-content:center;width:40px;height:48px;border:0;background:none;color:#52627a}.se-row button svg{width:24px;height:24px}.se-row button:hover{color:#be263d}.se-count{text-align:center;color:var(--se-muted);font-size:14px;margin:14px 0 0}.se-footer{position:sticky;bottom:0;margin-top:auto;background:#fff;padding:4px 0 calc(16px + env(safe-area-inset-bottom));z-index:2}.se-optional{display:flex;align-items:center;gap:8px;justify-content:flex-start;color:#5d6d85;font-size:14px;min-height:40px;margin:4px 0 8px}.se-optional svg{width:20px;height:20px}.se-save{width:100%;min-height:56px;border-radius:10px;background:linear-gradient(110deg,#087bed,#1474d0);border:0;font-size:17px;font-weight:700}.se-footer .error{font-size:14px;margin:0 0 8px}.se-footer .error:empty{display:none}.se-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.se-methods button:active,.se-types button:active{filter:brightness(.96)}.serial-dialog [hidden]{display:none!important}@media(max-width:600px){.serial-dialog{height:100dvh;max-height:100dvh;width:100vw;max-width:100vw;margin:0;border-radius:0}.serial-dialog #modal-body{min-height:calc(100dvh - 78px);display:flex;flex-direction:column}.serial-dialog #serial-editor{flex:1;display:flex;flex-direction:column}.serial-dialog .se-form{flex:1}.serial-dialog>header{padding-top:22px;padding-bottom:22px}.se-card{padding:14px}.se-row{grid-template-columns:30px minmax(0,1fr) 36px}.se-row button{width:36px}.se-methods{gap:8px}}


/* Incoming receipt camera: keep count and controls visible over the live view. */
.se-live-head{display:none}
.serial-dialog.se-camera-live{position:fixed;inset:0;width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#07131f;color:#fff}
.serial-dialog.se-camera-live #serial-editor,.serial-dialog.se-camera-live .se-form,.serial-dialog.se-camera-live .se-card{position:static;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.serial-dialog.se-camera-live .se-card>*:not(.se-stage):not(.se-live-head):not(.se-camera-tools):not(.se-status),.serial-dialog.se-camera-live .se-footer{display:none!important}
.serial-dialog.se-camera-live .se-stage{position:absolute;inset:0;min-height:0;margin:0;border:0;border-radius:0;background:#07131f}
.serial-dialog.se-camera-live .se-stage video{width:100%;height:100%;max-height:none;object-fit:cover}
.serial-dialog.se-camera-live .se-live-head{position:absolute;z-index:5;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(12px + env(safe-area-inset-top)) 76px 14px 16px;background:linear-gradient(#07131ff2,#07131fc9,transparent);pointer-events:none}
.se-live-total{display:flex;flex-direction:column;gap:2px;flex-shrink:0;font-size:14px;font-weight:600;line-height:1.5}
.se-live-total strong{font-size:28px;line-height:1.35;font-weight:800;font-variant-numeric:tabular-nums}
.se-live-model{max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:ltr;text-align:left;font-size:14px}
.serial-dialog.se-camera-live #close{position:absolute;z-index:7;top:calc(12px + env(safe-area-inset-top));right:12px;min-width:48px;min-height:48px;border:1px solid #ffffff75;border-radius:12px;background:#142c43e8;color:#fff}
.serial-dialog.se-camera-live .se-camera-tools{position:absolute;z-index:5;bottom:calc(14px + env(safe-area-inset-bottom));left:16px;right:16px;display:flex;gap:12px;margin:0}
.serial-dialog.se-camera-live .se-camera-tools button{min-height:50px;border:1px solid #ffffff8c;background:#122b42ee;color:#fff;font-size:16px;border-radius:12px}
.serial-dialog.se-camera-live #se-stop{background:#0879e9;border-color:#78b9ff;font-weight:700}
.serial-dialog.se-camera-live .se-status{position:absolute;z-index:5;bottom:calc(78px + env(safe-area-inset-bottom));left:16px;right:16px;margin:0;padding:10px 14px;border-radius:10px;background:#07131fdf;color:#fff;font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.se-status[data-state=duplicate],.se-status[data-state=error]{color:#9b1c2c;background:#fff0f2;border:1px solid #f2a6b0;border-radius:8px;padding:10px}
.serial-dialog.se-camera-live .se-status[data-state=duplicate],.serial-dialog.se-camera-live .se-status[data-state=error]{background:#a2152a;color:#fff;border-color:#ffb2c0}
.serial-dialog.se-camera-live.se-duplicate::after{content:"";position:absolute;inset:0;border:5px solid #ff516c;z-index:6;pointer-events:none}
.serial-dialog.se-camera-live button:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media(orientation:landscape) and (max-height:500px){.serial-dialog.se-camera-live .se-live-head{padding-bottom:8px}.se-live-total strong{font-size:23px}.serial-dialog.se-camera-live .se-status{left:24%;right:24%;bottom:calc(74px + env(safe-area-inset-bottom));font-size:14px;padding:6px 10px}.serial-dialog.se-camera-live .se-camera-tools{left:24%;right:24%}}


/* Searchable product selection in incoming receipts. */
.incoming-product{position:relative;min-width:0}
.incoming-product input{width:100%;text-align:start}
.incoming-product input:focus{border-color:#206bc4;box-shadow:0 0 0 3px #206bc425;outline:0}
.incoming-product-menu{position:absolute;inset-inline:0;top:calc(100% + 4px);z-index:4;background:#fff;border:1px solid #cbd8e8;border-radius:8px;box-shadow:0 8px 24px #17365724;overflow:hidden}
.incoming-product-list{max-height:min(260px,38dvh);overflow-y:auto;overscroll-behavior:contain}
.incoming-product-list button{display:block;width:100%;min-height:48px;border:0;border-bottom:1px solid #edf1f7;background:#fff;color:#182433;padding:10px 12px;text-align:start;cursor:pointer;overflow-wrap:anywhere}
.incoming-product-list button.active,.incoming-product-list button:hover{background:#eaf2fc;color:#175ba9}
.incoming-product-status{padding:8px 12px;font-size:13px;color:#586779;border-top:1px solid #e6e9ef}

/* Current inventory and historical serials use distinct, labelled states. */
.se-review-summary{font-size:13px;line-height:1.8;color:#53647a;margin-top:12px}
.se-review-summary button{margin-top:8px}
.se-row.se-reviewed{grid-template-columns:28px minmax(0,1fr) 38px 38px;padding:8px;border:1px solid transparent;border-radius:10px;gap:5px}
.se-row.se-reviewed small{grid-column:2/-1;direction:rtl;text-align:right;font-size:12px;line-height:1.7}
.se-row[data-review-state=stock],.incoming-code-stock{background:#fff0f1;border-color:#dc3545;color:#a61b2b}
.se-row[data-review-state=stock] .form-control{border-color:#dc3545;background:#fff8f8}
.se-row[data-review-state=history],.incoming-code-history{background:#fff6e8;border-color:#dd8a14;color:#965600}
.se-row[data-review-state=history] .form-control{border-color:#dd8a14;background:#fffaf2}
.se-row[data-review-state=pending],.incoming-code-pending{background:#f3f6fa;border-color:#c9d3e1;color:#56667c}
.se-row button[data-history],.incoming-code button[data-code-history]{color:#965600;border:1px solid #dd8a14;border-radius:50%;background:#ffebc4;font-weight:800;font-size:21px;min-height:36px;height:36px;width:36px}
.incoming-serial-review{display:grid;gap:8px;margin-top:10px}
.incoming-code{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;border:1px solid #d8e1ee;border-radius:9px;padding:8px 10px}
.incoming-code bdi{overflow-wrap:anywhere;text-align:start}
.incoming-code small{grid-column:1/-1;font-size:12px}
.incoming-code button{border:0;background:transparent;min-width:40px;min-height:44px;color:inherit;font-size:24px}
.incoming-code-stock{border-color:#dc3545}.incoming-code-history{border-color:#dd8a14}
.incoming-history-body{padding:18px}.incoming-history-code{display:block;overflow-wrap:anywhere;margin-bottom:16px;font-weight:700}
.incoming-history-event{border:1px solid #d8e1ee;border-radius:10px;background:#f8fafc;padding:12px;margin:10px 0;line-height:1.9;font-size:14px}
.incoming-history-event time{display:block;color:#596b82}.incoming-serial-history h2{font-size:18px}
@media(max-width:600px){.se-row.se-reviewed{grid-template-columns:24px minmax(0,1fr) 34px 34px;padding:6px;gap:4px}.se-row.se-reviewed .form-control{font-size:15px;padding:8px}.se-row.se-reviewed button{width:34px}}

/* Compact inventory view. Quantities read right-to-left: total / reserved / remaining. */
#app.inventory-screen{padding:20px 16px}
.inventory-screen>.toolbar{flex-wrap:nowrap;gap:10px;margin:2px 0 18px}
.inventory-screen>.toolbar h2{min-width:0;font-size:25px}
.inventory-screen>.toolbar select{flex:0 1 150px;max-width:150px;min-width:0;font-size:14px;background-color:#fff}
.inventory-screen>.toolbar #refresh{flex:0 0 46px;width:46px;height:48px;padding:10px;color:#1376db;background:#fff;border-color:#d8e2ef}
.inventory-screen>.toolbar #refresh svg{width:24px;height:24px}
.inventory-screen .inventory-actions{gap:8px;margin-bottom:14px}
.inventory-screen .inventory-actions #aw-incoming{width:100%;min-height:50px;font-size:16px;border-radius:12px;background:#0875da;border-color:#0875da;color:#fff}
.inventory-screen .inventory-actions #aw-weight-settings{flex:0 0 auto;min-height:44px;font-size:12px;background:#fff}
.inventory-screen .inventory-search{position:relative;margin-bottom:16px}
.inventory-screen .inventory-search input{height:50px;padding-inline:44px 12px;background:#fff;border:1px solid #d7e1ee;border-radius:12px;font-size:15px;box-shadow:none}
.inventory-screen .inventory-search>svg{position:absolute;inset-inline-start:14px;top:14px;width:22px;height:22px;color:#66778c;pointer-events:none}
.inventory-screen .inventory-search input:focus{border-color:#1376db;box-shadow:0 0 0 3px #1376db1c;outline:0}
.inventory-screen #content>.inventory-card{border:1px solid #dce4ef;border-radius:14px;box-shadow:0 2px 5px #17365705}
.inventory-screen .inventory-table th:first-child{width:52%}
.inventory-screen .inventory-table th{padding:12px 10px;background:#f6f8fc;color:#536176;font-size:13px;font-weight:700;vertical-align:middle}
.inventory-screen .inventory-table td{padding:8px 10px;vertical-align:middle;border-color:#e5eaf2}
.inventory-screen .inventory-table tbody tr:last-child td{border-bottom:0}
.inventory-screen .inventory-model{width:100%;min-height:44px;padding:2px 0;text-align:start;font-size:15px;font-weight:650;line-height:1.65;color:#185b9f}
.inventory-screen .inventory-model bdi{direction:ltr;unicode-bidi:isolate;overflow-wrap:anywhere}
.inventory-screen .inventory-metric-labels,.inventory-screen .inventory-quantities{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,.62fr) auto minmax(0,1fr);align-items:center;gap:4px;direction:rtl;text-align:center;max-width:260px;margin-inline-start:auto}
.inventory-screen .inventory-metric-labels{font-size:12px;line-height:1.6;font-weight:700}
.inventory-screen .inventory-quantities{padding:8px 7px;border-radius:10px;background:#e8f2ff;color:#115b9f;font-size:17px;font-weight:750;line-height:1.5;font-variant-numeric:tabular-nums}
.inventory-screen .inventory-quantities bdi{direction:ltr;unicode-bidi:isolate;white-space:nowrap}
.inventory-screen .inventory-divider{color:#7b8ba0;font-weight:400}
.inventory-screen .inventory-reserved{color:#596e85;font-weight:550}
.inventory-screen .inventory-zero .inventory-model{color:#66758a;font-weight:500}
.inventory-screen .inventory-zero .inventory-quantities{background:#f0f3f7;color:#66758a}
.inventory-screen .inventory-table .empty{padding:30px 12px}
@media(max-width:600px){
 #app.inventory-screen{padding:18px 10px}
 .inventory-screen>.toolbar{gap:8px;margin-bottom:16px}
 .inventory-screen>.toolbar h2{font-size:24px}
 .inventory-screen>.toolbar select{flex-basis:124px;max-width:124px;font-size:13px}
 .inventory-screen .inventory-table th,.inventory-screen .inventory-table td{padding-inline:8px}
 .inventory-screen .inventory-model{font-size:13px;line-height:1.65}
 .inventory-screen .inventory-metric-labels{font-size:10.5px;gap:2px}
 .inventory-screen .inventory-quantities{font-size:15px;gap:3px;padding:8px 5px}
}
@media(max-width:380px){
 .inventory-screen .inventory-table th:first-child{width:49%}
 .inventory-screen .inventory-table th,.inventory-screen .inventory-table td{padding-inline:6px}
 .inventory-screen .inventory-model{font-size:12.5px}
 .inventory-screen .inventory-quantities{font-size:14px;gap:2px;padding-inline:4px}
 .inventory-screen .inventory-metric-labels{font-size:10px}
}

/* Keep the final row above the actual fixed navigation, including device safe areas. */
body{padding-bottom:0}
#app{padding-bottom:calc(var(--anbar-nav-height,86px) + 24px)!important}
html{scroll-padding-bottom:calc(var(--anbar-nav-height,86px) + 16px)}
#toast,.serial-copy-feedback{bottom:calc(var(--anbar-nav-height,86px) + 12px)}
.serial-copy-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;min-height:40px;border:1px solid #d8e4f2;border-radius:8px;background:#edf5ff;color:#1769b1;cursor:pointer;padding:6px}
.serial-copy-button svg{width:21px;height:21px;pointer-events:none}
.serial-copy-button:hover,.se-row .serial-copy-button:hover{color:#07569a;background:#deedff}
.serial-copy-button:focus-visible{outline:2px solid #1376db;outline-offset:2px}
.serial-copy-button.is-copied{color:#187a45;background:#e9f7ef;border-color:#81ba98}
.serial-copy-list{display:flex;flex-direction:column;gap:8px;margin:12px 0}
.serial-copy-row{display:flex;align-items:center;justify-content:space-between;gap:10px;direction:ltr;border:1px solid #e1e7f0;border-radius:9px;padding:5px 8px;background:#fff}
.serial-copy-row bdi{min-width:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.se-row{grid-template-columns:28px minmax(0,1fr) 36px 36px;gap:5px}
.se-row.se-reviewed{grid-template-columns:24px minmax(0,1fr) 34px 34px 34px;gap:4px}
.se-row .serial-copy-button{width:100%;height:40px;min-height:40px;padding:5px;color:#1769b1;background:#edf5ff;border:1px solid #d8e4f2;border-radius:8px}
.incoming-code{grid-template-columns:minmax(0,1fr) auto auto auto}
.incoming-code>small{grid-column:1/-1}
.serial-copy-feedback{position:fixed;z-index:10000;left:16px;right:16px;max-width:440px;margin:auto;border-radius:10px;padding:10px 16px;text-align:center;background:#172b45;color:#fff;pointer-events:none;font-size:14px}
.serial-copy-feedback[hidden]{display:none}
@media(max-width:380px){.se-row{grid-template-columns:22px minmax(0,1fr) 32px 32px;gap:3px}.se-row.se-reviewed{grid-template-columns:22px minmax(0,1fr) 30px 30px 30px;gap:3px;padding:4px}.se-row .form-control{font-size:14px;padding-inline:6px}.se-row button{width:100%}.se-row button svg{width:20px;height:20px}}

/* Copy the whole receipt or package, one serial per line. */
.serial-copy-toolbar{display:flex;justify-content:flex-start;margin:12px 0}
.serial-copy-all{width:auto;min-height:44px;flex:0 1 auto;gap:8px;padding:8px 12px;font:inherit;font-size:14px}
.serial-copy-all span{white-space:normal}
.se-row{grid-template-columns:28px minmax(0,1fr) 36px}
.se-row.se-reviewed{grid-template-columns:24px minmax(0,1fr) 34px 34px}
.incoming-code{grid-template-columns:minmax(0,1fr) auto auto}
@media(max-width:380px){.se-row{grid-template-columns:22px minmax(0,1fr) 32px}.se-row.se-reviewed{grid-template-columns:22px minmax(0,1fr) 30px 30px}}

.wh-tools{display:flex;align-items:center;gap:12px;margin-bottom:12px}.wh-tools svg,.wh-copy svg{width:22px;height:22px}.wh-filter-toggle{display:flex;gap:6px;align-items:center}.wh-filter-count{border-radius:20px;background:#246dbb;color:white;padding:1px 7px}.wh-filters:not([hidden]){display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;background:white;border:1px solid #dce3ec;border-radius:12px;padding:14px;margin-bottom:14px}.wh-filters label{display:grid;gap:6px;font-size:13px}.wh-filters input,.wh-filters select{width:100%;min-width:0;padding:9px;border:1px solid #ccd5e0;border-radius:8px;font:inherit;background:white}.wh-filter-error{grid-column:1/-1;color:#b42318;margin:0}.wh-table-wrap{border:1px solid #dce3ec;border-radius:14px;overflow:hidden;background:white}.wh-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px}.wh-table th,.wh-table td{text-align:right;padding:12px 8px;border-bottom:1px solid #e2e7ee;overflow-wrap:anywhere;vertical-align:middle}.wh-table th{background:#edf2f8;color:#536174;font-size:13px}.wh-table th:nth-child(1){width:20%}.wh-table th:nth-child(2){width:25%}.wh-table th:nth-child(3){width:24%}.wh-table th:nth-child(4){width:31%}.wh-row{cursor:pointer}.wh-row:hover,.wh-selected{background:#f0f7ff}.wh-row-toggle{display:flex;align-items:center;gap:4px;background:none;border:0;padding:6px 0;min-height:44px;color:#246dbb;font:inherit;cursor:pointer}.wh-row-toggle svg{width:12px;height:12px;flex-shrink:0}.wh-row-toggle[aria-expanded=true] svg{transform:rotate(90deg)}.wh-kind{padding:4px 7px;border-radius:7px;font-weight:bold}.wh-in{color:#187044;background:#e0f4e8}.wh-out{color:#1962a5;background:#deecff}.wh-item{display:flex;flex-wrap:wrap;gap:4px;margin:3px 0;align-items:center}.wh-date{font-size:12px;font-variant-numeric:tabular-nums}.wh-detail td{padding:0}.wh-detail-box{background:#f1f7ff;padding:16px}.wh-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0;overflow-wrap:anywhere}.wh-copy{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;color:#246dbb;background:white;border:1px solid #cadced;border-radius:9px;cursor:pointer}.wh-serial-group{margin-top:12px}.wh-serials{background:white;padding:10px;border:1px solid #dce3ec;border-radius:8px;margin-top:6px;max-height:220px;overflow:auto;text-align:left;font-family:monospace;line-height:1.8;overflow-wrap:anywhere}.wh-empty{text-align:center!important;padding:30px!important}.wh-history{padding-bottom:20px}.wh-row-toggle:focus-visible,.wh-copy:focus-visible{outline:3px solid #246dbb;outline-offset:2px}@media(max-width:420px){.wh-table{font-size:12px}.wh-table th,.wh-table td{padding:10px 5px}.wh-table th{font-size:11px}.wh-kind{padding:4px}.wh-date{font-size:10px}.wh-detail td{padding:0}.wh-detail-box{padding:12px}.wh-table th:nth-child(1){width:19%}.wh-table th:nth-child(2){width:24%}.wh-table th:nth-child(3){width:25%}.wh-table th:nth-child(4){width:32%}}

/* History table column sizing and content direction */
.wh-table th:nth-child(1){width:18%}.wh-table th:nth-child(2){width:20%}.wh-table th:nth-child(3){width:20%}.wh-table th:nth-child(4){width:42%;direction:ltr;text-align:left}.wh-table td.wh-content{direction:ltr;text-align:left}.wh-content .wh-item{direction:ltr;justify-content:flex-start;text-align:left}.wh-content .wh-item bdi{direction:ltr;unicode-bidi:isolate}
@media(max-width:420px){.wh-table th:nth-child(1){width:17%}.wh-table th:nth-child(2){width:19%}.wh-table th:nth-child(3){width:21%}.wh-table th:nth-child(4){width:43%}}
