/* ─────────────────────────────────────────────────────────────
   Inventory Filter Studio — Gilded Atelier
───────────────────────────────────────────────────────────── */
#page-inventory {
  --bg: #efeadf;
  --bg-2: #e6e1d4;
  --surface: #fefcf7;
  --surface-2: #faf7ef;
  --surface-3: #f4efe2;
  --ink: #0a0a0a;
  --ink-2: #26221d;
  --ink-3: #4d463d;
  --muted: #78716a;
  --muted-2: #a39d92;
  --line: #c9c3b4;
  --line-soft: #d6d0c0;
  --line-softer: #e2dcca;
  --hair: rgba(10,10,10,.10);
  --hair-soft: rgba(10,10,10,.06);
  --inv: #8a5a1a;
  --inv-soft: rgba(138,90,26,.10);
  --inv-bg: #f1e6cf;
  --rose: #991b1b;
  --amber: #b45309;
  --forest: #1e6b4f;
  --f-he: 'Assistant', system-ui, sans-serif;
  --f-en: 'Fraunces', Georgia, serif;
  background: var(--bg);
}

#page-inventory .invy-summary {
  display: none;
}

#page-inventory #invy-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-he);
  padding: 0 12px 12px;
}

#page-inventory .inv-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: none;
  flex-shrink: 0;
}

#page-inventory .inv-kpi-strip > div {
  padding: 14px 20px;
  border-left: 1px solid var(--hair-soft);
  text-align: right;
  cursor: default;
}

#page-inventory .inv-kpi-strip > div:first-child {
  border-left: none;
}

#page-inventory .inv-kpi-strip > div[onclick] {
  cursor: pointer;
}

#page-inventory .inv-kpi-strip > div[onclick]:hover {
  background: var(--surface-2);
}

#page-inventory .inv-kpi-strip .lbl {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

#page-inventory .inv-kpi-strip .val {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#page-inventory .inv-kpi-strip .val.warn {
  color: var(--amber);
}

#page-inventory .inv-kpi-strip .val.danger {
  color: var(--rose);
}

#page-inventory .inv-studio-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px rgba(10,10,10,.06);
}

#page-inventory .studio-rail {
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  min-height: 0;
}

#page-inventory .studio-rail-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
}

#page-inventory .studio-rail-head .he {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0;
}

#page-inventory .studio-rail-head .en {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

#page-inventory .studio-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#page-inventory .studio-block-l {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2px;
}

#page-inventory .studio-block-l .he {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: 0;
}

#page-inventory .studio-block-l .en {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .16em;
  text-transform: uppercase;
}

#page-inventory .studio-search-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink-3);
  font-family: var(--f-he);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-align: right;
  outline: none;
  border-radius: 0;
}

#page-inventory .studio-search-input:focus {
  border-color: var(--ink);
  background: #fff;
}

#page-inventory .studio-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--hair-soft);
  max-height: 260px;
  overflow-y: auto;
}

#page-inventory .studio-list .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair-soft);
  font-size: 13px;
  cursor: pointer;
}

#page-inventory .studio-list .item:last-child {
  border-bottom: none;
}

#page-inventory .studio-list .item .nm {
  font-weight: 600;
  color: var(--ink-2);
}

#page-inventory .studio-list .item .cnt {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .06em;
}

#page-inventory .studio-list .item.on {
  font-weight: 800;
}

#page-inventory .studio-list .item.on .nm {
  color: var(--ink);
}

#page-inventory .studio-list .item.on .cnt {
  color: var(--inv);
}

#page-inventory .studio-list .item .check {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  margin-left: 10px;
  background: var(--surface);
  display: inline-block;
  vertical-align: middle;
}

#page-inventory .studio-list .item.on .check {
  background: var(--ink);
  border-color: var(--ink);
  position: relative;
}

#page-inventory .studio-list .item.on .check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 8px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
}

#page-inventory .studio-list .cat-del {
  margin-right: 6px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

#page-inventory .studio-list .cat-del:hover {
  color: var(--rose);
}

#page-inventory .studio-add-cat {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  color: var(--inv);
  border: 1px dashed var(--line);
  border-bottom: 1px dashed var(--ink-3);
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0;
}

#page-inventory .studio-add-cat:hover {
  background: var(--inv-bg);
}

#page-inventory .studio-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#page-inventory .studio-status .seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--line);
}

#page-inventory .studio-status .seg button {
  padding: 9px 8px;
  font-family: var(--f-he);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  background: var(--surface);
  color: var(--muted);
  border: none;
  border-left: 1px solid var(--line);
  cursor: pointer;
  border-radius: 0;
}

#page-inventory .studio-status .seg button:last-child {
  border-left: none;
}

#page-inventory .studio-status .seg button.on {
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
}

#page-inventory .studio-status .seg button.on.danger {
  background: var(--rose);
}

#page-inventory .studio-status .seg button.on.warn {
  background: var(--amber);
}

#page-inventory .studio-rail-clear {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
  margin-top: auto;
}

#page-inventory .studio-rail-clear:hover {
  color: var(--ink-2);
}

#page-inventory .studio-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

#page-inventory .studio-summary {
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
  flex-shrink: 0;
}

#page-inventory .studio-summary .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--inv-bg);
  border: 1px solid var(--inv);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--inv);
  letter-spacing: 0;
}

#page-inventory .studio-summary .pill.is-muted {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
}

#page-inventory .studio-summary .pill .x {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  cursor: pointer;
  margin-right: 4px;
}

#page-inventory .studio-summary .total {
  margin-right: auto;
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}

#page-inventory .studio-summary .total strong {
  color: var(--ink);
  font-weight: 600;
  font-style: normal;
  font-family: var(--f-he);
  font-size: 14px;
  letter-spacing: 0;
}

#page-inventory .inv-studio-results {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

#page-inventory .inv-studio-results .stn-tbl-wrap {
  margin: 0;
  border: none;
  box-shadow: none;
}

#page-inventory .inv-studio-results .stn-tbl th,
#page-inventory .inv-studio-results .stn-tbl td {
  border-color: var(--line-softer);
}

#page-inventory .results {
  display: flex;
  flex-direction: column;
}

#page-inventory .res-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-softer);
  font-size: 13.5px;
  cursor: pointer;
}

#page-inventory .res-row:hover {
  background: var(--surface-2);
}

#page-inventory .res-row .nm {
  font-weight: 700;
  color: var(--ink);
}

#page-inventory .res-row .nm .sub {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  margin-right: 10px;
  letter-spacing: .08em;
}

#page-inventory .res-row .badge {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--line-soft);
}

#page-inventory .res-row .badge.cat {
  color: var(--ink-3);
  background: var(--surface-2);
}

#page-inventory .res-row .qty {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  min-width: 50px;
  text-align: left;
}

#page-inventory .res-row .qty.zero {
  color: var(--rose);
}

#page-inventory .res-row .qty.low {
  color: var(--amber);
}

#page-inventory .res-row .ctrl {
  display: flex;
  gap: 0;
}

#page-inventory .res-row .ctrl button {
  padding: 6px 9px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--ink-3);
  color: var(--ink-3);
  font-family: var(--f-he);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border-left: none;
  border-radius: 0;
}

#page-inventory .res-row .ctrl button:first-child {
  border-left: 1px solid var(--line-soft);
}

#page-inventory .res-row .ctrl button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.recv-trigger-btn {
  width: 100%;
  padding: 10px 14px;
  background: #f1e6cf;
  border: 1px solid #8a5a1a;
  border-bottom: 1px solid #4d463d;
  color: #8a5a1a;
  font-family: 'Assistant', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0;
  text-align: center;
}

.recv-trigger-btn:hover {
  background: #fefcf7;
  color: #0a0a0a;
}

#recv-modal-overlay {
  --bg: #efeadf;
  --surface: #fefcf7;
  --surface-2: #faf7ef;
  --ink: #0a0a0a;
  --ink-2: #26221d;
  --ink-3: #4d463d;
  --muted: #78716a;
  --line: #c9c3b4;
  --line-soft: #d6d0c0;
  --hair: rgba(10,10,10,.10);
  --inv: #8a5a1a;
  --inv-bg: #f1e6cf;
  --f-he: 'Assistant', sans-serif;
  --f-en: 'Fraunces', Georgia, serif;
  position: fixed;
  inset: 0;
  z-index: 10020;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15,12,8,.56);
  backdrop-filter: blur(2px);
  direction: rtl;
  font-family: var(--f-he);
  color: var(--ink);
}

#recv-modal-overlay .recv-modal-shell {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -18px rgba(28,18,8,.35);
}

#recv-modal-overlay .recv-modal-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--inv);
}

#recv-modal-overlay .recv-eyebrow {
  padding: 22px 24px 0;
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11.5px;
  color: var(--inv);
  letter-spacing: .18em;
  text-transform: uppercase;
}

#recv-modal-overlay .recv-title {
  margin: 6px 24px 4px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.15;
}

#recv-modal-overlay .recv-sub {
  margin: 0 24px 14px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
}

#recv-modal-overlay .recv-sub strong {
  color: var(--ink);
  font-weight: 800;
}

#recv-modal-overlay .recv-body {
  padding: 22px 24px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#recv-modal-overlay .recv-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}

#recv-modal-overlay label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}

#recv-modal-overlay input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink-3);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--f-he);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

#recv-modal-overlay input:focus {
  border-color: var(--ink);
  background: #fff;
}

#recv-modal-overlay .recv-eq-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--inv-bg);
  border: 1px solid var(--inv);
}

#recv-modal-overlay .recv-eq-strip .lbl {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11.5px;
  color: var(--inv);
  letter-spacing: .18em;
  text-transform: uppercase;
}

#recv-modal-overlay .recv-eq-strip .calc {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--inv);
  font-weight: 600;
  letter-spacing: .04em;
  direction: ltr;
}

#recv-modal-overlay .recv-eq-strip .val {
  font-weight: 800;
  font-size: 30px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

#recv-modal-overlay .recv-foot {
  padding: 18px 24px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
}

#recv-modal-overlay .recv-after {
  font-size: 12.5px;
  color: var(--ink-3);
}

#recv-modal-overlay .recv-after strong {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#recv-modal-overlay .recv-actions {
  display: flex;
  gap: 10px;
}

#recv-modal-overlay .btn-quiet,
#recv-modal-overlay .btn-primary {
  padding: 10px 18px;
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink-3);
}

#recv-modal-overlay .btn-quiet {
  background: var(--surface);
  color: var(--ink-2);
}

#recv-modal-overlay .btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  border-bottom-color: #000;
}

#recv-modal-overlay .btn-quiet:hover {
  background: #fff;
}

#recv-modal-overlay .btn-primary:hover {
  background: #000;
}

#page-inventory .recv-global-btn {
  margin-top: 8px;
  padding: 7px 12px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-bottom: 1px solid #000;
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0;
}

#page-inventory .recv-global-btn:hover {
  background: #000;
}

#page-inventory .inv-recv-strip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--surface);
}

#page-inventory .strip-bar {
  background: var(--ink);
  color: var(--bg);
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--ink);
}

#page-inventory .strip-bar .label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#page-inventory .strip-bar .label .he {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0;
}

#page-inventory .strip-bar .label .en {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11px;
  color: rgba(239,234,223,.6);
  letter-spacing: .16em;
  text-transform: uppercase;
}

#page-inventory .strip-bar .scan {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding: 9px 14px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  color: #fff;
  letter-spacing: .06em;
  outline: none;
  width: 100%;
  font-weight: 500;
  border-radius: 0;
}

#page-inventory .strip-bar .scan::placeholder {
  color: rgba(239,234,223,.4);
}

#page-inventory .strip-bar .meta {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 12px;
  color: rgba(239,234,223,.7);
  letter-spacing: .1em;
}

#page-inventory .strip-bar .strip-btn {
  padding: 9px 16px;
  background: transparent;
  color: var(--bg);
  border: 1px solid rgba(255,255,255,.4);
  border-bottom: 1px solid var(--bg);
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  letter-spacing: 0;
  border-radius: 0;
}

#page-inventory .strip-bar .strip-btn.solid {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}

#page-inventory .strip-summary {
  padding: 14px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600;
  flex-wrap: wrap;
}

#page-inventory .strip-summary .num {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#page-inventory .strip-summary .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--inv);
  box-shadow: 0 0 0 0 rgba(138,90,26,.5);
  animation: inv-recv-pulse 1.6s ease-out infinite;
}

@keyframes inv-recv-pulse {
  0% { box-shadow: 0 0 0 0 rgba(138,90,26,.5); }
  100% { box-shadow: 0 0 0 12px rgba(138,90,26,0); }
}

#page-inventory .stn-tbl tr.scanned {
  background: rgba(138,90,26,.05);
  box-shadow: inset 3px 0 0 var(--inv);
}

#page-inventory .recv-row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  padding: 2px 7px;
  background: var(--inv-bg);
  border: 1px solid var(--inv);
  color: var(--inv);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

#page-inventory .recv-qty-flow {
  display: block;
  margin-top: 3px;
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  font-size: 11px;
  color: var(--inv);
  letter-spacing: .06em;
}

.recv-session-pop-overlay {
  --bg: #efeadf;
  --surface: #fefcf7;
  --surface-2: #faf7ef;
  --ink: #0a0a0a;
  --ink-2: #26221d;
  --ink-3: #4d463d;
  --muted: #78716a;
  --line: #c9c3b4;
  --hair: rgba(10,10,10,.10);
  --inv: #8a5a1a;
  --inv-bg: #f1e6cf;
  --f-he: 'Assistant', sans-serif;
  --f-en: 'Fraunces', Georgia, serif;
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15,12,8,.46);
  backdrop-filter: blur(2px);
  direction: rtl;
  font-family: var(--f-he);
  color: var(--ink);
}

.recv-session-pop {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -18px rgba(28,18,8,.35);
  padding: 22px 24px 0;
}

.recv-session-pop .recv-modal-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--inv);
}

.recv-session-pop .recv-eyebrow,
.recv-session-pop .recv-eq-strip .lbl {
  font-family: var(--f-en);
  font-weight: 300;
  font-style: italic;
  color: var(--inv);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.recv-session-pop .recv-eyebrow {
  font-size: 11.5px;
  margin-bottom: 6px;
}

.recv-session-pop .recv-title {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.15;
}

.recv-session-pop .recv-sub {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 16px;
}

.recv-session-pop .recv-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.recv-session-pop label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}

.recv-session-pop input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink-3);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--f-he);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.recv-session-pop .recv-eq-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  background: var(--inv-bg);
  border: 1px solid var(--inv);
}

.recv-session-pop .recv-eq-strip .lbl {
  font-size: 11.5px;
}

.recv-session-pop .recv-eq-strip .calc {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--inv);
  font-weight: 600;
  direction: ltr;
}

.recv-session-pop .recv-eq-strip .val {
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.recv-session-pop .recv-foot {
  margin: 18px -24px 0;
  padding: 16px 24px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
}

.recv-session-pop .recv-after {
  font-size: 12.5px;
  color: var(--ink-3);
}

.recv-session-pop .recv-actions {
  display: flex;
  gap: 10px;
}

.recv-session-pop .btn-quiet,
.recv-session-pop .btn-primary {
  padding: 10px 18px;
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--ink-3);
}

.recv-session-pop .btn-quiet {
  background: var(--surface);
  color: var(--ink-2);
}

.recv-session-pop .btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  border-bottom-color: #000;
}

@media (max-width: 900px) {
  #page-inventory #invy-table-wrap {
    padding: 0 8px 8px;
  }

  #page-inventory .inv-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  #page-inventory .inv-studio-shell {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  #page-inventory .studio-rail {
    border-left: none;
    border-bottom: 1px solid var(--line);
    max-height: 360px;
  }

  #page-inventory .studio-summary .total {
    margin-right: 0;
    width: 100%;
  }

  #page-inventory .strip-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #page-inventory .strip-summary {
    gap: 12px;
  }

  .recv-session-pop .recv-grid-3,
  #recv-modal-overlay .recv-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────
   Global Receive Modal — search + new item flow
───────────────────────────────────────────────────────────── */
#recv-global-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, .56);
  backdrop-filter: blur(2px);
  z-index: 11000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
#recv-global-overlay .recv-global-shell {
  position: relative; background: #fefcf7; border: 1px solid #c9c3b4;
  width: 100%; max-width: 720px;
  font-family: 'Assistant', system-ui, sans-serif; color: #0a0a0a; direction: rtl;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -18px rgba(28,18,8,.45);
}
#recv-global-overlay .recv-global-bar {
  position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #8a5a1a;
}
#recv-global-overlay .recv-global-head {
  padding: 24px 28px 16px; border-bottom: 1px solid rgba(10,10,10,.10);
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: flex-start;
}
#recv-global-overlay .recv-global-eyebrow {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11.5px;
  color: #8a5a1a; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px;
}
#recv-global-overlay .recv-global-title { font-weight: 800; font-size: 22px; letter-spacing: -.015em; margin: 0; }
#recv-global-overlay .recv-global-close {
  background: transparent; border: none; font-size: 22px; color: #78716a; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
#recv-global-overlay .recv-global-close:hover { color: #0a0a0a; }
#recv-global-overlay .recv-global-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
  padding: 16px 28px; border-bottom: 1px solid rgba(10,10,10,.10); background: #faf7ef;
}
#recv-global-overlay .recv-global-meta-cell { display: flex; flex-direction: column; gap: 2px; }
#recv-global-overlay .recv-global-meta-cell .lbl {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px;
}
#recv-global-overlay .recv-global-meta-cell input {
  padding: 8px 10px; background: transparent; border: none; border-bottom: 1px solid #d6d0c0;
  font-weight: 700; font-size: 13px; color: #0a0a0a; font-family: inherit; text-align: right; outline: none;
}
#recv-global-overlay .recv-global-meta-cell input:focus { border-bottom-color: #0a0a0a; }
#recv-global-overlay .recv-global-meta-cell.mono input {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 600; font-size: 12.5px;
  letter-spacing: .04em; direction: ltr; text-align: left;
}
#recv-global-overlay .recv-global-add { padding: 18px 28px; border-bottom: 1px solid rgba(10,10,10,.10); background: #fff; }
#recv-global-overlay .recv-global-add-l { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
#recv-global-overlay .recv-global-add-l .he { font-weight: 800; font-size: 13px; color: #26221d; letter-spacing: 0; }
#recv-global-overlay .recv-global-add-l .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}
#recv-global-overlay .recv-global-add-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
#recv-global-overlay .recv-global-search-wrap { position: relative; }
#recv-global-overlay #recv-global-search {
  width: 100%; padding: 13px 44px 13px 16px;
  background: #fefcf7; border: 1px solid #c9c3b4; border-bottom: 1px solid #4d463d;
  font-family: inherit; font-weight: 600; font-size: 15px; color: #0a0a0a; text-align: right; outline: none;
}
#recv-global-overlay #recv-global-search:focus { background: #fff; border-color: #0a0a0a; }
#recv-global-overlay .recv-global-search-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 14px;
  color: #8a5a1a; pointer-events: none;
}
#recv-global-overlay .recv-global-search-results {
  position: absolute; top: calc(100% - 1px); right: 0; left: 0;
  background: #fff; border: 1px solid #c9c3b4;
  max-height: 280px; overflow-y: auto; z-index: 5;
  box-shadow: 0 8px 24px rgba(10,10,10,.10);
}
#recv-global-overlay .recv-global-result {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid #e2dcca; cursor: pointer;
}
#recv-global-overlay .recv-global-result:hover { background: #faf7ef; }
#recv-global-overlay .recv-global-result:last-child { border-bottom: none; }
#recv-global-overlay .recv-global-result.is-added { opacity: .55; }
#recv-global-overlay .recv-global-result .nm {
  font-weight: 700; font-size: 13.5px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#recv-global-overlay .recv-global-result .nm .sub {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .04em; margin-right: 6px;
}
#recv-global-overlay .recv-global-result .cat {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #78716a; letter-spacing: .12em; text-transform: uppercase;
}
#recv-global-overlay .recv-global-result .qty {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600; font-size: 13px; color: #4d463d; min-width: 40px; text-align: left;
}
#recv-global-overlay .recv-global-result .added-badge {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #8a5a1a; letter-spacing: .12em; text-transform: uppercase;
}
#recv-global-overlay .recv-global-empty { padding: 16px; font-size: 13px; color: #78716a; text-align: center; }
#recv-global-overlay .recv-global-new-btn {
  padding: 13px 18px; background: #fff; border: 1px dashed #8a5a1a; color: #8a5a1a;
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; letter-spacing: 0;
  white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
#recv-global-overlay .recv-global-new-btn:hover { background: #f1e6cf; }
#recv-global-overlay .recv-global-new-btn .plus {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 18px; line-height: 1;
}
#recv-global-overlay .recv-global-list {
  padding: 16px 28px 0; display: flex; flex-direction: column; gap: 8px;
  min-height: 140px; max-height: 360px; overflow-y: auto;
}
#recv-global-overlay .recv-global-list-l { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
#recv-global-overlay .recv-global-list-l .he { font-weight: 800; font-size: 13px; color: #26221d; }
#recv-global-overlay .recv-global-list-l .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}
#recv-global-overlay .recv-global-list-empty {
  padding: 36px 16px; text-align: center; border: 1px dashed #c9c3b4; background: transparent;
}
#recv-global-overlay .recv-global-list-empty .he { font-weight: 700; font-size: 13px; color: #4d463d; margin-bottom: 4px; }
#recv-global-overlay .recv-global-list-empty .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11.5px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}
#recv-global-overlay .recv-global-line {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: #fefcf7; border: 1px solid #d6d0c0;
}
#recv-global-overlay .recv-global-line .nm {
  font-weight: 700; font-size: 13.5px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}
#recv-global-overlay .recv-global-line .nm .calc {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .04em; margin-right: 8px;
}
#recv-global-overlay .recv-global-line .nm .badge-new {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #8a5a1a; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid #8a5a1a; padding: 2px 8px; margin-right: 6px;
}
#recv-global-overlay .recv-global-line .qty {
  font-weight: 800; font-size: 18px; color: #8a5a1a;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
#recv-global-overlay .recv-global-line .ctrl { display: flex; gap: 0; }
#recv-global-overlay .recv-global-line .ctrl button {
  padding: 5px 10px; background: transparent; border: 1px solid #d6d0c0;
  color: #78716a; font-family: inherit; font-weight: 700; font-size: 11.5px;
  cursor: pointer; border-left: none;
}
#recv-global-overlay .recv-global-line .ctrl button:first-child { border-left: 1px solid #d6d0c0; }
#recv-global-overlay .recv-global-line .ctrl button:hover { color: #0a0a0a; background: #faf7ef; }
#recv-global-overlay .recv-global-line-edit {
  background: #f1e6cf; border: 1px solid #8a5a1a;
  display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px;
}
#recv-global-overlay .recv-global-line-edit .lbl-row {
  display: flex; align-items: baseline; justify-content: space-between;
}
#recv-global-overlay .recv-global-line-edit .lbl-row .he { font-weight: 800; font-size: 14px; color: #8a5a1a; }
#recv-global-overlay .recv-global-line-edit .lbl-row .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #8a5a1a; letter-spacing: .16em; text-transform: uppercase;
}
#recv-global-overlay .recv-le-grid {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 8px; align-items: end;
}
#recv-global-overlay .recv-le-grid .eq {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 14px;
  color: #8a5a1a; padding-bottom: 11px; text-align: center;
}
#recv-global-overlay .recv-le-grid .fld-l {
  display: block; font-weight: 700; font-size: 11px;
  color: #4d463d; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px;
}
#recv-global-overlay .recv-le-grid .fld-i {
  width: 100%; padding: 10px 12px;
  background: #fff; border: 1px solid #8a5a1a; border-bottom: 1px solid #4d463d;
  font-family: inherit; font-weight: 700; font-size: 14px; color: #0a0a0a;
  text-align: right; outline: none;
}
#recv-global-overlay .recv-le-grid .fld-i:focus { border-color: #0a0a0a; background: #fff; }
#recv-global-overlay .recv-le-total-strip {
  background: #fff; border: 1px solid #8a5a1a;
  display: flex; align-items: center; justify-content: space-between; padding: 11px 14px;
}
#recv-global-overlay .recv-le-total-strip .lbl {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #8a5a1a; letter-spacing: .18em; text-transform: uppercase;
}
#recv-global-overlay .recv-le-total-strip .calc {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; color: #8a5a1a; font-weight: 600; letter-spacing: .04em;
}
#recv-global-overlay .recv-le-total-strip .val {
  font-weight: 800; font-size: 24px; color: #0a0a0a;
  font-variant-numeric: tabular-nums; line-height: 1;
}
#recv-global-overlay .recv-le-actions { display: flex; gap: 8px; justify-content: flex-end; }
#recv-global-overlay .recv-global-foot {
  padding: 18px 28px; border-top: 1px solid rgba(10,10,10,.10); background: #faf7ef;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; flex-wrap: wrap; gap: 12px;
}
#recv-global-overlay .recv-global-foot-totals {
  display: flex; align-items: baseline; gap: 4px; font-size: 13px; color: #4d463d; flex-wrap: wrap;
}
#recv-global-overlay .recv-global-foot-totals strong {
  color: #0a0a0a; font-weight: 800; font-size: 15px;
  font-variant-numeric: tabular-nums; letter-spacing: 0; margin: 0 4px;
}
#recv-global-overlay .recv-global-foot-totals .dot {
  display: inline-block; width: 3px; height: 3px;
  background: #78716a; border-radius: 50%; margin: 0 8px; vertical-align: middle;
}
#recv-global-overlay .recv-global-foot-actions { display: flex; gap: 10px; }
#recv-global-overlay .btn-quiet,
#recv-global-overlay .btn-primary {
  padding: 10px 18px; font-family: inherit; font-weight: 800; font-size: 13px;
  cursor: pointer; letter-spacing: 0;
}
#recv-global-overlay .btn-quiet {
  background: transparent; border: 1px solid transparent; color: #78716a;
}
#recv-global-overlay .btn-quiet:hover { color: #0a0a0a; background: #fefcf7; }
#recv-global-overlay .btn-primary {
  background: #0a0a0a; color: #efeadf;
  border: 1px solid #0a0a0a; border-bottom: 1px solid #000;
}
#recv-global-overlay .btn-primary:hover { background: #000; }

@media (max-width: 720px) {
  #recv-global-overlay .recv-global-meta { grid-template-columns: 1fr; }
  #recv-global-overlay .recv-global-add-row { grid-template-columns: 1fr; }
  #recv-global-overlay .recv-le-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  #recv-global-overlay .recv-le-grid .eq { display: none; }
}

/* New item inline form (inside global recv modal) */
#recv-global-overlay #recv-global-newitem-box {
  padding: 16px 28px;
  background: #faf7ef;
  border-bottom: 1px solid rgba(10,10,10,.10);
}
#recv-global-overlay .recv-newitem-card {
  background: #f1e6cf; border: 1px solid #8a5a1a;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
#recv-global-overlay .recv-newitem-card .lbl-row {
  display: flex; align-items: baseline; justify-content: space-between;
}
#recv-global-overlay .recv-newitem-card .lbl-row .he { font-weight: 800; font-size: 14px; color: #8a5a1a; }
#recv-global-overlay .recv-newitem-card .lbl-row .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #8a5a1a; letter-spacing: .16em; text-transform: uppercase;
}
#recv-global-overlay .recv-newitem-row {
  display: grid; grid-template-columns: 2fr 1fr; gap: 12px;
}
#recv-global-overlay .recv-newitem-row .fld-l {
  display: block; font-weight: 700; font-size: 11px;
  color: #4d463d; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px;
}
#recv-global-overlay .recv-newitem-row input,
#recv-global-overlay .recv-newitem-row select {
  width: 100%; padding: 10px 12px;
  background: #fff; border: 1px solid #8a5a1a; border-bottom: 1px solid #4d463d;
  font-family: inherit; font-weight: 700; font-size: 14px; color: #0a0a0a;
  text-align: right; outline: none;
}
#recv-global-overlay .recv-newitem-row input:focus,
#recv-global-overlay .recv-newitem-row select:focus {
  border-color: #0a0a0a;
}
#recv-global-overlay .recv-newitem-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
@media (max-width: 720px) {
  #recv-global-overlay .recv-newitem-row { grid-template-columns: 1fr; }
}

/* Receive button group in KPI strip */
#page-inventory .recv-kpi-btns {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
#page-inventory .recv-kpi-btns .recv-global-btn,
#page-inventory .recv-kpi-btns .recv-history-btn {
  margin-top: 0;
  padding: 8px 16px;
  font-family: var(--f-he);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0;
  border-radius: 0;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 130px;
  text-align: center;
  white-space: nowrap;
}
#page-inventory .recv-history-btn {
  background: transparent; border: 1px solid #c9c3b4; border-bottom: 1px solid #4d463d;
  color: #4d463d;
}
#page-inventory .recv-history-btn:hover { background: #faf7ef; color: #0a0a0a; }

/* Delivery history modal */
#delivery-history-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, .56);
  backdrop-filter: blur(2px);
  z-index: 11050;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
#delivery-history-overlay .dh-shell {
  position: relative; background: #fefcf7; border: 1px solid #c9c3b4;
  width: 100%; max-width: 820px;
  font-family: 'Assistant', system-ui, sans-serif; color: #0a0a0a; direction: rtl;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -18px rgba(28,18,8,.45);
}
#delivery-history-overlay .dh-bar { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #8a5a1a; }
#delivery-history-overlay .dh-head {
  padding: 24px 28px 16px; border-bottom: 1px solid rgba(10,10,10,.10);
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: flex-start;
}
#delivery-history-overlay .dh-eyebrow {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11.5px;
  color: #8a5a1a; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px;
}
#delivery-history-overlay .dh-title { font-weight: 800; font-size: 22px; letter-spacing: -.015em; margin: 0; }
#delivery-history-overlay .dh-close {
  background: transparent; border: none; font-size: 22px; color: #78716a; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
#delivery-history-overlay .dh-close:hover { color: #0a0a0a; }
#delivery-history-overlay .dh-meta {
  padding: 12px 28px; background: #faf7ef; border-bottom: 1px solid rgba(10,10,10,.10);
  display: flex; align-items: baseline; gap: 14px;
}
#delivery-history-overlay .dh-meta-l {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}
#delivery-history-overlay .dh-meta-c { font-weight: 700; font-size: 13px; color: #0a0a0a; font-family: 'IBM Plex Mono', monospace; letter-spacing: .04em; }

#delivery-history-overlay .dh-body { padding: 18px 28px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
#delivery-history-overlay .dh-empty { padding: 36px; text-align: center; border: 1px dashed #c9c3b4; }
#delivery-history-overlay .dh-empty .he { font-weight: 700; font-size: 13px; color: #4d463d; margin-bottom: 4px; }
#delivery-history-overlay .dh-empty .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11.5px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}

#delivery-history-overlay .dh-row { background: #fefcf7; border: 1px solid #d6d0c0; cursor: pointer; }
#delivery-history-overlay .dh-row:hover { border-color: #8a5a1a; }
#delivery-history-overlay .dh-row-head {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px;
}
#delivery-history-overlay .dh-id { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 12.5px; color: #0a0a0a; letter-spacing: .04em; direction: ltr; }
#delivery-history-overlay .dh-date { font-weight: 700; font-size: 12.5px; color: #4d463d; }
#delivery-history-overlay .dh-counts { display: flex; gap: 14px; font-size: 12px; color: #4d463d; }
#delivery-history-overlay .dh-counts strong { font-weight: 800; color: #0a0a0a; font-variant-numeric: tabular-nums; margin: 0 4px; }
#delivery-history-overlay .dh-user {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .04em;
}
#delivery-history-overlay .dh-row-preview {
  padding: 0 14px 12px; font-size: 12px; color: #78716a;
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 300; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#delivery-history-overlay .dh-row-detail { background: #faf7ef; border-top: 1px solid #d6d0c0; padding: 14px; }
#delivery-history-overlay .dh-detail-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
#delivery-history-overlay .dh-line {
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: center;
  padding: 8px 12px; background: #fff; border: 1px solid #e2dcca; font-size: 12.5px;
}
#delivery-history-overlay .dh-line .nm { font-weight: 700; color: #0a0a0a; }
#delivery-history-overlay .dh-line .nm .badge-new {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10px;
  color: #8a5a1a; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid #8a5a1a; padding: 1px 6px; margin-right: 6px;
}
#delivery-history-overlay .dh-line .cat {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #78716a; letter-spacing: .12em; text-transform: uppercase;
}
#delivery-history-overlay .dh-line .calc {
  font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 11.5px; color: #4d463d;
}
#delivery-history-overlay .dh-line .qty {
  font-weight: 800; font-size: 14px; color: #8a5a1a;
  font-variant-numeric: tabular-nums; font-family: 'IBM Plex Mono', monospace;
}
#delivery-history-overlay .dh-note {
  padding: 8px 12px; background: #fff; border: 1px solid #e2dcca; font-size: 12px; color: #4d463d; margin-bottom: 14px;
}
#delivery-history-overlay .dh-actions { display: flex; gap: 10px; justify-content: flex-end; }
#delivery-history-overlay .btn-quiet {
  padding: 8px 14px; background: transparent; border: 1px solid transparent; color: #78716a;
  font-family: inherit; font-weight: 700; font-size: 12px; cursor: pointer;
}
#delivery-history-overlay .btn-quiet:hover { color: #0a0a0a; background: #fefcf7; }
#delivery-history-overlay .btn-danger {
  padding: 8px 14px; background: #fff; border: 1px solid #991b1b; border-bottom: 1px solid #6b1313; color: #991b1b;
  font-family: inherit; font-weight: 800; font-size: 12px; cursor: pointer;
}
#delivery-history-overlay .btn-danger:hover { background: #f6d9d4; }

@media (max-width: 720px) {
  #delivery-history-overlay .dh-row-head { grid-template-columns: 1fr; gap: 6px; }
  #delivery-history-overlay .dh-line { grid-template-columns: 1fr auto; }
  #delivery-history-overlay .dh-line .cat,
  #delivery-history-overlay .dh-line .calc { display: none; }
}

/* Bump z-index of edit modal so it appears above drawer (9990) */
#invy-modal-overlay { z-index: 11200 !important; }

/* ─────────────────────────────────────────────────────────────
   Edit Modal — Atelier redesign (uses existing #invy-modal-overlay)
───────────────────────────────────────────────────────────── */
#invy-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, .56) !important;
  backdrop-filter: blur(2px);
  z-index: 11200 !important;
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
#invy-modal-overlay[style*="flex"] { display: flex !important; }
#invy-modal-overlay .invy-shell-v2 {
  position: relative; background: #fefcf7; border: 1px solid #c9c3b4;
  width: 100%; max-width: 640px;
  font-family: 'Assistant', system-ui, sans-serif; color: #0a0a0a; direction: rtl;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -18px rgba(28,18,8,.45);
  border-radius: 0;
}
#invy-modal-overlay .invy-bar-v2 {
  position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #8a5a1a;
}
#invy-modal-overlay .invy-head-v2 {
  padding: 24px 28px 16px; border-bottom: 1px solid rgba(10,10,10,.10);
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: flex-start;
}
#invy-modal-overlay .invy-eyebrow-v2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11.5px;
  color: #8a5a1a; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 6px;
}
#invy-modal-overlay .invy-title-v2 {
  font-weight: 800; font-size: 22px; letter-spacing: -.015em; margin: 0; color: #0a0a0a;
}
#invy-modal-overlay .invy-close-v2 {
  background: transparent; border: none; font-size: 22px; color: #78716a;
  cursor: pointer; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
#invy-modal-overlay .invy-close-v2:hover { color: #0a0a0a; }

#invy-modal-overlay .invy-body-v2 {
  padding: 22px 28px;
  display: flex; flex-direction: column; gap: 22px;
  max-height: 70vh; overflow-y: auto;
}

#invy-modal-overlay .invy-section-v2 {
  display: flex; flex-direction: column; gap: 12px;
}
#invy-modal-overlay .invy-section-l-v2 {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid rgba(10,10,10,.10);
  padding-bottom: 8px; margin-bottom: 4px;
}
#invy-modal-overlay .invy-section-l-v2 .he {
  font-weight: 800; font-size: 13px; letter-spacing: 0; color: #0a0a0a;
}
#invy-modal-overlay .invy-section-l-v2 .en {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 11px;
  color: #78716a; letter-spacing: .16em; text-transform: uppercase;
}
#invy-modal-overlay .invy-admin-tag-v2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #8a5a1a; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid #8a5a1a; padding: 1px 7px; margin-right: 8px;
}

#invy-modal-overlay .invy-row-2-v2 {
  display: grid; grid-template-columns: 2fr 1fr; gap: 14px;
}
#invy-modal-overlay .invy-row-3-v2 {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
}
#invy-modal-overlay .invy-row-gap-v2 { margin-top: 4px; }

#invy-modal-overlay .invy-fld-l-v2 {
  display: block; font-weight: 700; font-size: 11px;
  color: #4d463d; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 4px;
}
#invy-modal-overlay .invy-fld-note-v2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-style: italic; font-size: 10.5px;
  color: #78716a; letter-spacing: .04em; margin-right: 6px; text-transform: none;
}
#invy-modal-overlay .invy-fld-i-v2 {
  width: 100%; padding: 10px 12px;
  background: #fefcf7; border: 1px solid #c9c3b4; border-bottom: 1px solid #4d463d;
  font-family: inherit; font-weight: 700; font-size: 13.5px; color: #0a0a0a;
  text-align: right; outline: none; border-radius: 0;
}
#invy-modal-overlay .invy-fld-i-v2:focus { border-color: #0a0a0a; background: #fff; }
#invy-modal-overlay .invy-fld-i-v2.lg { padding: 13px 14px; font-size: 16px; }
#invy-modal-overlay .invy-fld-i-v2.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 600; font-size: 12.5px; letter-spacing: .04em;
  direction: ltr; text-align: left;
}

#invy-modal-overlay .invy-subtype-btn-v2 {
  flex: 1; padding: 9px 12px;
  background: #fefcf7; color: #4d463d;
  border: 1px solid #c9c3b4; border-bottom: 1px solid #4d463d;
  font-family: inherit; font-weight: 700; font-size: 12.5px;
  cursor: pointer; letter-spacing: 0;
}
#invy-modal-overlay .invy-subtype-btn-v2:hover { background: #fff; color: #0a0a0a; }
#invy-modal-overlay .invy-subtype-btn-v2.is-active { background: #0a0a0a; color: #efeadf; border-color: #0a0a0a; }

#invy-modal-overlay .invy-file-drop-v2 {
  padding: 14px 16px;
  background: #fefcf7;
  border: 1px dashed #c9c3b4;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: #78716a;
}
#invy-modal-overlay .invy-file-drop-v2:hover { border-color: #8a5a1a; color: #8a5a1a; }
#invy-modal-overlay .invy-file-label-v2 { font-family: inherit; font-weight: 700; }
#invy-modal-overlay .invy-file-remove-v2 {
  font-size: 14px; padding: 2px 8px; cursor: pointer; color: #991b1b;
}

#invy-modal-overlay .invy-foot-v2 {
  padding: 16px 28px; border-top: 1px solid rgba(10,10,10,.10);
  background: #faf7ef;
  display: flex; justify-content: flex-end; gap: 10px; align-items: center;
}
#invy-modal-overlay .invy-btn-quiet-v2 {
  padding: 10px 18px;
  background: transparent; border: 1px solid transparent; color: #78716a;
  font-family: inherit; font-weight: 800; font-size: 13px;
  cursor: pointer; letter-spacing: 0;
}
#invy-modal-overlay .invy-btn-quiet-v2:hover { color: #0a0a0a; background: #fefcf7; }
#invy-modal-overlay .invy-btn-primary-v2 {
  padding: 10px 22px;
  background: #0a0a0a; color: #efeadf;
  border: 1px solid #0a0a0a; border-bottom: 1px solid #000;
  font-family: inherit; font-weight: 800; font-size: 13px;
  cursor: pointer; letter-spacing: 0;
}
#invy-modal-overlay .invy-btn-primary-v2:hover { background: #000; }

@media (max-width: 720px) {
  #invy-modal-overlay .invy-row-2-v2,
  #invy-modal-overlay .invy-row-3-v2 { grid-template-columns: 1fr; }
}

/* Drawer unit toggle (יחידה / קרטון) */
.invy-unit-toggle {
  display: inline-flex; gap: 0; border: 1px solid #c9c3b4; background: #fff;
}
.invy-unit-toggle .iut-btn {
  padding: 4px 10px;
  background: transparent; border: none; border-left: 1px solid #c9c3b4;
  font-family: 'Heebo', system-ui, sans-serif; font-weight: 700; font-size: 11px;
  color: #78716a; cursor: pointer; letter-spacing: 0;
}
.invy-unit-toggle .iut-btn:last-child { border-left: none; }
.invy-unit-toggle .iut-btn:hover { color: #0a0a0a; background: #faf7ef; }
.invy-unit-toggle .iut-btn.iut-on {
  background: #0a0a0a; color: #efeadf; font-weight: 800;
}
.invy-unit-toggle .iut-btn[disabled] {
  opacity: .45 !important; cursor: not-allowed !important;
}
