.staff-ui .staff-warehouse-section { margin-top: 24px; min-width: 0; }
.staff-ui .staff-warehouse-form { max-width: 820px; }
.staff-ui .staff-warehouse-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.staff-ui .staff-warehouse-progress { color: var(--sl-muted, #71717a); font-size: 14px; line-height: 20px; }
.staff-ui .staff-warehouse-pick-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.staff-ui .staff-warehouse-form-layout { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 32px; }
.staff-ui .staff-warehouse-packing-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); gap: 20px; align-items: start; }
.staff-ui .staff-warehouse-status { background: #fff8ed; border-radius: 8px; padding: 16px; font-size: 14px; line-height: 20px; }
.staff-ui .staff-warehouse-attention-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 6px; }
.staff-ui .staff-warehouse-attention-links a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) {
  .staff-ui .staff-warehouse-pick-fields, .staff-ui .staff-warehouse-form-layout, .staff-ui .staff-warehouse-packing-line { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023px) { .staff-ui .staff-warehouse-form-layout { grid-template-columns: minmax(0, 1fr); } }

.staff-ui .staff-warehouse-box-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; font-size: 14px; line-height: 20px; }
.staff-ui .staff-warehouse-box-summary > div { display: grid; gap: 4px; min-width: 0; }
.staff-ui .staff-warehouse-box-summary span { overflow-wrap: anywhere; }
@media (max-width: 767px) { .staff-ui .staff-warehouse-box-summary { grid-template-columns: minmax(0, 1fr); } }
.staff-ui :is(.staff-warehouse-section, .staff-warehouse-form) .staff-section-title { margin-bottom: 12px; }
.staff-ui .staff-warehouse-section > .staff-copy + .sl-button { margin-top: 16px; }
.staff-ui :is(.staff-warehouse-pick-fields, .staff-warehouse-packing-line) > .sl-field { margin: 0; }
@media (max-width: 767px), (pointer: coarse) {
  .staff-ui :is(.staff-warehouse-section, .staff-warehouse-form, .staff-warehouse-form-layout, [id^="staff-warehouse-"]) :is(.sl-button, .sl-select-trigger, input.sl-input) { min-height: 44px; }
}
.staff-ui .staff-warehouse-status + .staff-copy,
.staff-ui .staff-warehouse-box-summary + .staff-copy { margin-top: 12px; }

/* A work page follows its current physical step; quantities remain a compact reference. */
.staff-ui .staff-warehouse-work { display: grid; gap: 28px; min-width: 0; }
.staff-ui .staff-warehouse-next { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; background: #fafafa; border-radius: 8px; }
.staff-ui .staff-warehouse-next-copy { min-width: 0; }
.staff-ui .staff-warehouse-next h2 { margin: 0; font-size: 17px; font-weight: 500; line-height: 24px; }
.staff-ui .staff-warehouse-next p { margin: 5px 0 0; color: var(--sl-muted); font-size: 13px; line-height: 20px; }
.staff-ui .staff-warehouse-next-action { flex-shrink: 0; }
.staff-ui .staff-warehouse-next-action .staff-warehouse-actions { margin: 0; }
.staff-ui .staff-warehouse-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.staff-ui .staff-warehouse-section-heading > span { color: var(--sl-muted); font-size: 12px; line-height: 18px; }
.staff-ui .staff-warehouse-order-location { width: 100px; }
.staff-ui .staff-warehouse-order-number { width: 84px; }
.staff-ui .staff-warehouse-order-identity > strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.staff-ui .staff-warehouse-order-identity > span { display: block; color: var(--sl-muted); font-size: 12px; line-height: 18px; margin-top: 3px; }
.staff-ui .staff-warehouse-book-code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-ui .staff-warehouse-order-table > thead > tr > th { white-space: normal; }
.staff-ui .staff-warehouse-menu-link { display: flex; align-items: center; padding: 9px 8px; min-height: 36px; border-radius: 4px; }
.staff-ui .staff-warehouse-menu-link:hover { background: var(--sl-faint); }
.staff-ui .staff-warehouse-pick-step > .staff-record-metadata { margin-bottom: 16px; }
@media (max-width: 767px) {
  .staff-ui .staff-warehouse-next { align-items: stretch; flex-direction: column; gap: 16px; padding: 16px; }
  .staff-ui .staff-warehouse-next-action .sl-button { width: 100%; min-height: 44px; justify-content: center; }
  .staff-ui .staff-warehouse-menu-link { min-height: 44px; }
}
@media (max-width: 767px) {
  .staff-ui .staff-page-topline:has(.staff-warehouse-work-menu) { position: relative; padding-right: 48px; }
  .staff-ui .staff-page-topline:has(.staff-warehouse-work-menu) > .staff-header-actions { position: absolute; top: 42px; right: 0; }
  .staff-ui .staff-warehouse-work-menu > .sl-button { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .staff-ui .staff-warehouse-work-menu > .sl-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
.staff-ui .staff-warehouse-receipt-code { max-width: 440px; margin-bottom: 24px; }
.staff-ui .staff-warehouse-receipt-grid { display: grid; grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(120px, 0.7fr) minmax(180px, 1fr); gap: 16px; }
.staff-ui .staff-warehouse-receipt-grid > .sl-field { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 7px; margin: 0; }
.staff-ui .staff-warehouse-receipt-grid > .sl-field > label { margin: 0; }
.staff-ui .staff-warehouse-receipt-grid > .sl-field > :is(.sl-field-hint, .sl-field-error) { margin: 0; }
.staff-ui :is(.staff-warehouse-pick-fields, .staff-warehouse-intake-quantities) > :is(.sl-field, .staff-date-field, .staff-date-window) { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 7px; margin: 0; }
.staff-ui :is(.staff-warehouse-pick-fields, .staff-warehouse-intake-quantities) > :is(.sl-field, .staff-date-field, .staff-date-window) > :is(label, .staff-label, .sl-field-hint, .sl-field-error) { margin: 0; }
@media (max-width: 900px) { .staff-ui .staff-warehouse-receipt-grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); } }
.staff-ui .staff-warehouse-history-table :is(th, td) { white-space: normal; overflow-wrap: anywhere; }
.staff-ui .staff-warehouse-mobile-records { display: none; }
@media (max-width: 767px) {
  .staff-ui .staff-warehouse-desktop-records { display: none; }
  .staff-ui .staff-warehouse-mobile-records { display: grid; gap: 24px; margin: 16px 0; padding: 0; list-style: none; }
  .staff-ui .staff-warehouse-mobile-records li { min-width: 0; font-size: 13px; line-height: 20px; }
  .staff-ui .staff-warehouse-mobile-records li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .staff-ui .staff-warehouse-mobile-records strong { font-weight: 500; }
  .staff-ui .staff-warehouse-mobile-records li > div > span { flex: none; font-variant-numeric: tabular-nums; }
  .staff-ui .staff-warehouse-mobile-records p { margin: 4px 0 0; overflow-wrap: anywhere; }
}
.staff-ui .staff-warehouse-movements-table .staff-table-col--date { width: 104px; }
.staff-ui .staff-warehouse-history-date { display: grid; gap: 3px; }
.staff-ui .staff-warehouse-history-date > span:last-child { color: var(--sl-muted); font-size: 11px; }
.staff-ui .staff-warehouse-receipt-totals { display: none; }
@media (max-width: 767px) {
  .staff-ui .staff-warehouse-receipt-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .staff-ui .staff-warehouse-receipt-totals > div { display: grid; gap: 6px; }
  .staff-ui .staff-warehouse-receipt-totals span { color: var(--sl-muted); font-size: 12px; }
  .staff-ui .staff-warehouse-receipt-totals strong { font-size: 20px; font-weight: 500; }
}

.staff-warehouse-scanner { max-width: 720px; }
.staff-warehouse-scanner .staff-warehouse-actions { margin: 20px 0 16px; }
.staff-warehouse-scanner-video { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; background: #111; }
.staff-warehouse-scanner-manual { display: grid; gap: 16px; max-width: 460px; margin-top: 20px; }
.staff-warehouse-scanner-manual > .sl-button { justify-self: start; }
.staff-warehouse-scan-matches { padding: 0; list-style: none; max-width: 720px; }
.staff-warehouse-scan-matches > li { padding: 16px 0; border-bottom: 1px solid var(--staff-border, #e5e7eb); }
.staff-warehouse-scan-match { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
.staff-warehouse-scan-book { display: flex; align-items: flex-start; gap: 16px; max-width: 720px; }
.staff-warehouse-scan-cover { flex: none; width: 72px; height: 108px; object-fit: contain; }
.staff-warehouse-scan-book-details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.staff-ui .staff-warehouse-scan-book-details .staff-copy { margin: 4px 0 0; }
.staff-ui .staff-warehouse-scan-book-details .staff-copy:first-child { margin-top: 0; }
@media (max-width: 599px) { .staff-warehouse-scan-cover { width: 60px; height: 90px; } }

.staff-warehouse-held-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 640px; margin: 16px 0; }
.staff-warehouse-held-counts span { display: block; color: #77777e; margin-bottom: 6px; }
.staff-warehouse-held-counts strong { display: block; font-size: 18px; }
.staff-warehouse-intake-action { max-width: 720px; }
.staff-warehouse-intake-action > .sl-field { margin-bottom: 20px; }
.staff-warehouse-intake-quantities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 599px) {
  .staff-warehouse-held-counts { gap: 12px; font-size: 12px; }
  .staff-warehouse-intake-quantities { grid-template-columns: 1fr; gap: 16px; }
}
.staff-ui .staff-warehouse-move-form { max-width: 640px; }
.staff-ui .staff-warehouse-move-origin { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; margin-bottom: 12px; }
.staff-ui .staff-warehouse-move-origin > span { color: var(--sl-muted); }
.staff-ui .staff-warehouse-move-sources { display: grid; gap: 16px; max-width: 640px; margin-top: 24px; }
.staff-ui .staff-warehouse-move-source { display: flex; flex-direction: column; gap: 6px; }
.staff-ui :is(.staff-warehouse-move-origin, .staff-warehouse-move-source) > strong { font-weight: 500; }
.staff-warehouse-section .sl-button:disabled {
  cursor: not-allowed;
  color: #737378;
  background: #f4f4f5;
  border-color: #e6e6e8;
  box-shadow: none;
}
.staff-ui .staff-warehouse-section button.staff-photo-capture { display: none !important; }
@media (max-width: 639px) {
  .staff-ui .staff-warehouse-section button.staff-photo-capture { display: inline-flex !important; }
}
.staff-ui .staff-warehouse-settings-facts .sl-details > div {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  max-width: 640px;
}


/* Separate selectable orders, with aligned facts and actions across each row. */
.staff-ui .staff-warehouse-handoff-form { margin-top: 24px; min-width: 0; }
.staff-ui .staff-warehouse-handoff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.staff-ui .staff-warehouse-handoff-item { display: flex; flex-direction: column; min-width: 0; padding: 16px; background: var(--sl-faint); border-radius: 8px; outline: 1px solid transparent; }
.staff-ui .staff-warehouse-handoff-item:has(input:checked) { outline-color: var(--sl-red); }
.staff-ui .staff-warehouse-handoff-heading { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 8px; cursor: pointer; font-size: 16px; font-weight: 500; line-height: 22px; }
.staff-ui .staff-warehouse-handoff-heading input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--sl-red); }
.staff-ui .staff-warehouse-handoff-heading span { overflow-wrap: anywhere; }
.staff-ui .staff-warehouse-handoff-item .sl-details > div { grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 6px 0; align-items: start; }
.staff-ui .staff-warehouse-handoff-item .staff-copy { font-size: 12px; line-height: 18px; }
.staff-ui .staff-warehouse-handoff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }
.staff-ui .staff-warehouse-handoff-actions .sl-button { min-height: 40px; padding-inline: 10px; font-size: 12px; }
.staff-ui .staff-warehouse-handoff-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; padding-block: 16px; background: #fff; border-top: 1px solid var(--sl-border); }
@media (max-width: 1279px) {
  .staff-ui .staff-warehouse-handoff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .staff-ui .staff-warehouse-handoff-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .staff-ui .staff-warehouse-handoff-actions .sl-button { min-height: 44px; }
  .staff-ui .staff-warehouse-handoff-footer > input { width: 100%; }
}

.staff-ui .staff-warehouse-handoff-intro { display: grid; gap: 16px; }

.staff-ui .staff-warehouse-shortage { display: grid; gap: 28px; min-width: 0; }
.staff-ui .staff-warehouse-shortage h2 { margin: 0; font-size: 16px; font-weight: 500; line-height: 24px; }
.staff-ui .staff-warehouse-shortage p { margin: 0; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.staff-ui .staff-warehouse-shortage .staff-warehouse-shortage-meta { color: var(--sl-muted); font-size: 12px; line-height: 18px; }
.staff-ui .staff-warehouse-shortage-summary { display: grid; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--sl-border); }
.staff-ui .staff-warehouse-shortage-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.staff-ui .staff-warehouse-shortage-heading > div { display: grid; gap: 6px; }
.staff-ui .staff-warehouse-shortage-heading > .sl-status { flex: none; }
.staff-ui .staff-warehouse-shortage-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 680px; gap: 24px; }
.staff-ui .staff-warehouse-shortage-counts .sl-metric { padding: 0; border: 0; }
.staff-ui .staff-warehouse-shortage-counts .sl-metric strong { font-size: 28px; line-height: 34px; }
.staff-ui .staff-warehouse-shortage-summary > p { max-width: 92ch; }
.staff-ui .staff-warehouse-shortage-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); align-items: start; gap: 40px; }
.staff-ui .staff-warehouse-shortage-main { display: grid; gap: 28px; min-width: 0; }
.staff-ui .staff-warehouse-shortage-action { display: grid; gap: 12px; padding: 20px; border-radius: 8px; background: var(--sl-faint); }
.staff-ui .staff-warehouse-shortage-action > .sl-button { justify-self: start; margin-top: 4px; }
.staff-ui .staff-warehouse-shortage-completion { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--sl-border); }
.staff-ui .staff-warehouse-shortage-completion summary { width: fit-content; cursor: pointer; font-size: 13px; font-weight: 500; line-height: 24px; }
.staff-ui .staff-warehouse-shortage-completion p { margin-top: 10px; color: var(--sl-muted); }
.staff-ui .staff-warehouse-shortage-completion .sl-button { margin-top: 12px; }
.staff-ui .staff-warehouse-shortage-records { display: grid; gap: 10px; min-width: 0; }
.staff-ui .staff-warehouse-shortage-rows { list-style: none; padding: 0; margin: 0; }
.staff-ui .staff-warehouse-shortage-rows > li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--sl-border); font-size: 13px; line-height: 20px; }
.staff-ui .staff-warehouse-shortage-rows strong { font-weight: 500; }
.staff-ui .staff-warehouse-shortage-rows > li > div { display: grid; gap: 4px; min-width: 0; }
.staff-ui .staff-warehouse-shortage-quantity { display: grid; gap: 2px; font-size: 20px; line-height: 24px; }
.staff-ui .staff-warehouse-shortage-quantity span { font-size: 11px; line-height: 16px; color: var(--sl-muted); font-weight: 400; }
.staff-ui .staff-warehouse-shortage-rows .sl-text-link { max-width: 160px; text-align: right; line-height: 20px; }
.staff-ui .staff-warehouse-shortage-history { min-width: 0; padding-left: 24px; border-left: 1px solid var(--sl-border); }
.staff-ui .staff-warehouse-shortage-history ol { display: grid; gap: 24px; list-style: none; padding: 0; margin: 20px 0 0; }
.staff-ui .staff-warehouse-shortage-history li { display: grid; gap: 5px; font-size: 13px; line-height: 20px; }
.staff-ui .staff-warehouse-shortage-history strong { font-weight: 500; }
.staff-ui .staff-warehouse-shortage-history .staff-warehouse-shortage-meta { margin-top: 3px; font-size: 11px; line-height: 17px; }
@media (max-width: 1099px) {
  .staff-ui .staff-warehouse-shortage-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .staff-ui .staff-warehouse-shortage-history { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--sl-border); }
  .staff-ui .staff-warehouse-shortage-history ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .staff-ui .staff-warehouse-shortage-heading { flex-direction: column; gap: 12px; }
  .staff-ui .staff-warehouse-shortage-counts { gap: 12px; }
  .staff-ui .staff-warehouse-shortage-counts .sl-metric p { min-height: 36px; font-size: 12px; line-height: 18px; }
  .staff-ui .staff-warehouse-shortage-counts .sl-metric strong { font-size: 24px; line-height: 30px; }
  .staff-ui .staff-warehouse-shortage-counts .sl-metric span { font-size: 11px; }
  .staff-ui .staff-warehouse-shortage-action { padding: 16px; }
  .staff-ui .staff-warehouse-shortage-rows > li { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .staff-ui .staff-warehouse-shortage-rows > li > :last-child:not(div) { grid-column: 2; justify-self: start; }
  .staff-ui .staff-warehouse-shortage-rows .sl-text-link { max-width: none; text-align: left; min-height: 44px; display: inline-flex; align-items: center; }
  .staff-ui .staff-warehouse-shortage-history ol { grid-template-columns: minmax(0, 1fr); }
  .staff-ui .staff-warehouse-shortage-completion summary { min-height: 44px; align-content: center; }
}
