/* Quick outbound keeps the live work area in view; setup retains its own scroll. */
#appView.app-shell .workspace[data-view="quickOutbound"] {
  --qo-line: #e2e7ee;
  --qo-muted: #667085;
  --qo-ink: #243247;
  padding: 12px 16px;
  background: #f4f6f9;
}

#appView.app-shell .workspace[data-view="quickOutbound"] > .topbar {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 0 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--qo-line);
  box-shadow: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] > #content {
  min-width: 0;
  margin: 0;
  padding: 0;
  max-width: none;
  background: transparent;
}

#appView.app-shell .workspace[data-view="quickOutbound"] > .topbar {
  max-width: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
  display: grid;
  grid-template-columns: 126px 70px minmax(140px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 0;
  margin: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-metric > span,
#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field > span {
  margin-bottom: 3px;
  color: var(--qo-muted);
  font-size: 12px;
  line-height: 16px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-metric strong,
#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoWeight {
  height: 36px;
  font-size: 23px;
  line-height: 1.2;
  color: var(--qo-ink);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-count {
  padding-left: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field {
  grid-column: auto;
  grid-row: auto;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field input {
  height: 36px;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons {
  grid-column: auto;
  grid-row: auto;
  gap: 6px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons button,
#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions > .page-refresh-button {
  width: auto;
  min-width: 74px;
  height: 36px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 36px;
  margin-bottom: 8px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-tabs {
  flex: 0 0 auto;
  align-self: stretch;
  align-items: center;
  gap: 18px;
  margin: 0;
  border: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-tabs button {
  height: 36px;
  min-height: 36px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  line-height: 22px;
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-tabs button[aria-selected="true"] {
  border-bottom-color: #2563eb;
  color: #2457bb;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-operator-controls {
  justify-content: flex-end;
  gap: 5px 8px;
  min-width: 0;
  font-size: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoCurrentOperator {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorPicker {
  display: flex;
  align-items: center;
  gap: 6px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorSelect {
  width: 180px;
  max-width: 21vw;
  min-height: 30px;
  height: 30px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorConfirm {
  min-height: 30px;
  height: 30px;
  min-width: 48px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorHint {
  color: var(--qo-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

#appView.app-shell .workspace[data-view="quickOutbound"]:has(#qoPanel-settings:not([hidden])) .qo-operator-controls {
  display: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-station-row {
  flex: 0 0 auto;
  margin: 0 0 8px;
  gap: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr);
  flex: 1;
  width: 100%;
  gap: 8px;
  margin: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--qo-line);
  border-radius: 6px;
  background: #fff;
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts span {
  font-size: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts strong {
  margin-left: auto;
  font-size: 17px;
  line-height: 24px;
  color: var(--qo-ink);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts small {
  font-size: 12px;
  line-height: 20px;
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > .qo-amount-card {
  border-left: 3px solid #e6b875;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > .qo-amount-card strong {
  color: #9a591c;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > .qo-carrier-card {
  border-left: 3px solid #7ca7ed;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > .qo-carrier-card strong {
  color: #2457a5;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  min-width: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback .qo-statebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-basis: auto;
  gap: 4px 12px;
  min-height: 24px;
  margin: 0;
  padding: 0 2px;
  border: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoStatus {
  min-width: 0;
  padding: 0;
  color: #3d5979;
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoStatus[data-tone="error"] {
  color: #b42318;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoUploadStatus {
  margin-left: auto;
  max-width: 100%;
  color: #667085;
  font-size: 12px;
  line-height: 20px;
  text-align: left;
  overflow-wrap: anywhere;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoUploadStatus:empty,
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback:has(#qoProgress:not([hidden])) #qoStatus[data-presentation="stage"]:not([data-tone="error"]),
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback:has(#qoProgress:not([hidden])) .qo-statebar:has(#qoStatus[data-presentation="stage"]:not([data-tone="error"])):has(#qoUploadStatus:empty),
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback:has(#qoProgress:not([hidden])) #qoResult {
  display: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress {
  display: grid;
  grid-template-columns: minmax(170px, .7fr) minmax(0, 2fr);
  align-items: center;
  gap: 8px 20px;
  min-height: 46px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #d9e4f6;
  border-radius: 6px;
  background: #f1f6ff;
  color: #285391;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-heading > strong {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-heading > span {
  font-size: 12px;
  line-height: 18px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step {
  align-items: center;
  gap: 6px;
  border-top-width: 2px;
  padding-top: 5px;
  color: #6b778a;
  font-size: 12px;
  line-height: 20px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step > span {
  flex-basis: 18px;
  height: 18px;
  font-size: 10px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step > small {
  display: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-active {
  color: #2457a5;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-done {
  color: #18734e;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-error {
  color: #b42318;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress.qo-progress-complete {
  border-color: #c0dfcc;
  background: #f0f9f3;
  color: #18734e;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress.qo-progress-error {
  border-color: #f1c5c0;
  background: #fff5f4;
  color: #b42318;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoResult {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #c0dfcc;
  border-radius: 6px;
  background: #f0f9f3;
  color: #18734e;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoScanNotice:not(:empty) {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #f1c5c0;
  border-radius: 6px;
  background: #fff5f4;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-panel {
  padding: 14px;
  border: 1px solid var(--qo-line);
  border-radius: 8px;
  box-shadow: 0 2px 6px #24324704;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera {
  position: static;
  padding: 0;
  background: #101b2a;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-footer {
  min-height: 34px;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid var(--qo-line);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-footer > span {
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder {
  scrollbar-width: thin;
  scrollbar-color: #c9d1dd transparent;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-title {
  align-items: center;
  gap: 8px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-title > strong {
  font-size: 20px;
  line-height: 25px;
  color: var(--qo-ink);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-title > span {
  font-size: 11px;
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder > p {
  margin: 6px 0 8px;
  color: var(--qo-muted);
  font-size: 12px;
  line-height: 19px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-total {
  font-size: 17px;
  color: var(--qo-ink);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-actions {
  align-items: center;
  gap: 6px 10px;
  padding: 7px 0;
  margin: 8px 0;
  border: 0;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-actions > div:first-child > small {
  display: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-buttons {
  flex-wrap: nowrap;
  gap: 6px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-buttons button {
  min-height: 32px;
  height: 32px;
  padding: 4px 10px;
  border-color: #d0dae9;
  border-radius: 5px;
  color: #365779;
  font-size: 12px;
  font-weight: 600;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder #qoPrintStatus {
  font-size: 12px;
  line-height: 18px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 1px;
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid #d9e4f6;
  border-radius: 6px;
  background: #f4f7fc;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > span {
  grid-column: 2;
  font-size: 11px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > strong {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  float: none;
  margin: 0;
  font-size: 48px !important;
  line-height: 1.1;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > strong:only-child,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > span + strong:last-child {
  grid-column: 1 / -1;
  grid-row: auto;
  font-size: 14px !important;
  line-height: 20px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > b {
  grid-column: 2;
  padding: 0;
  font-size: 12px;
  line-height: 18px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting > div {
  grid-column: 2;
  margin: 0;
  font-size: 11px;
  line-height: 16px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting::after {
  display: none;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product {
  display: grid;
  grid-template-columns: minmax(130px, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom-color: #edf0f4;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product > img,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product > .qo-no-image {
  width: 100%;
  height: clamp(170px, 22vh, 210px);
  min-width: 0;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #f8fafc;
  object-fit: contain;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product > .qo-product-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product-copy > strong {
  font-size: 14px;
  line-height: 22px;
  color: var(--qo-ink);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product-copy > p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--qo-muted);
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product .qo-quantity {
  min-width: 96px;
  padding: 8px 12px;
  gap: 6px;
  border-width: 1px;
  border-radius: 6px;
  background: #f1f6fd;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-quantity > strong {
  font-size: 52px;
  line-height: 1;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-quantity > span {
  font-size: 25px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product .qo-quantity-multiple {
  background: #fff4df;
  border-color: #e8c386;
  color: #9c4600;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin-top: 6px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar > details {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar > details > summary {
  padding: 5px 0;
  font-size: 12px;
  line-height: 20px;
  color: var(--qo-muted);
  cursor: pointer;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoHistory,
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoTiming {
  position: absolute;
  bottom: calc(100% + 7px);
  z-index: 20;
  width: min(620px, calc(100vw - 270px));
  max-height: min(420px, 48dvh);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #d5dde8;
  border-radius: 8px;
  box-shadow: 0 8px 28px #24324720;
  background: #fff;
  text-align: left;
  color: #475467;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoHistory {
  left: 0;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoTiming {
  right: 0;
  font-size: 12px;
  line-height: 20px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] .qo-history-row {
  gap: 10px;
  padding: 9px 0;
  font-size: 12px;
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-settings {
  padding: 12px 2px 20px;
}

@media (min-width: 1001px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] > #content {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera video {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    object-fit: contain;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-footer {
    flex: 0 0 auto;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-empty {
    height: 100%;
    min-height: 0;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-settings {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

}

@media (min-width: 1001px) and (max-height: 720px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] {
    padding-block: 8px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] > .topbar {
    padding-bottom: 8px;
    margin-bottom: 4px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar,
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-station-row,
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback {
    margin-bottom: 6px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product > img,
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product > .qo-no-image {
    height: 170px;
  }
}

@media (max-width: 1000px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 12px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
    grid-template-columns: 126px 70px minmax(0, 1fr);
    gap: 8px 12px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar {
    flex-wrap: wrap;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera {
    height: auto;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera video {
    height: clamp(250px, 42vh, 460px);
    min-height: 0;
    flex: none;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-empty {
    height: auto;
    min-height: 260px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoHistory,
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-bottom-bar #qoTiming {
    width: min(620px, calc(100vw - 48px));
  }
}

@media (max-width: 600px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons button {
    flex: 1;
    min-width: 0;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-operator-controls {
    justify-content: flex-start;
    width: 100%;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorSelect {
    max-width: 52vw;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts {
    grid-template-columns: 1fr;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product {
    grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr);
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-buttons {
    width: auto;
    margin-left: auto;
  }

  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-buttons button {
    padding-inline: 7px;
  }
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-timing { display:none; }

/* Keep secondary order context beside the tabs, not above the camera. */
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar {
  justify-content: flex-start;
  gap: 8px 16px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar #qoOrderFacts {
  flex: 1 1 350px;
  width: auto;
  min-width: 300px;
  max-width: 680px;
  grid-template-columns: minmax(130px, .7fr) minmax(160px, 1.3fr);
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar #qoOrderFacts > div {
  min-height: 32px;
  padding: 3px 8px;
  gap: 3px 8px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar #qoOrderFacts strong {
  font-size: 15px;
  line-height: 22px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-operator-controls {
  margin-left: auto;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-operator-controls[data-confirmed="true"]:has(#qoOperatorPicker:not([hidden])) #qoCurrentOperator {
  display: block;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress:not(.qo-progress-error):not(.qo-progress-complete) .qo-progress-heading > span {
  display: none;
}
#appView.app-shell .workspace[data-view="quickOutbound"]:has(#qoPanel-settings:not([hidden])) #qoOrderFacts {
  display: none;
}
@media (max-width: 1100px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar {
    flex-wrap: wrap;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar #qoOrderFacts {
    flex: 1 1 300px;
  }
}
@media (max-width: 600px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-viewbar #qoOrderFacts {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }
}

/* Parcel identity, bin and reprint stay visible while its products scroll. */
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-summary,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-tools {
  flex: 0 0 auto;
  min-width: 0;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  margin: 6px 0 8px;
  color: var(--qo-muted);
  font-size: 12px;
  line-height: 19px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting {
  margin: 0 0 8px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProducts {
  flex: 1 1 0;
  min-height: 96px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9d1dd transparent;
  scrollbar-gutter: stable;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProducts:focus-visible {
  outline: 2px solid #7ca7ed;
  outline-offset: -2px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProducts.qo-products-multiple .qo-product > img,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProducts.qo-products-multiple .qo-product > .qo-no-image {
  height: clamp(110px, 16vh, 170px);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-tools {
  margin-top: 8px;
  border-top: 1px solid #edf0f4;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-weight-rule {
  margin: 6px 0;
  color: var(--qo-muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-actions {
  margin: 0;
  padding: 6px 0 0;
  border: 0;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-empty {
  flex: 1;
}
@media (max-width: 1000px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder {
    order: -1;
    overflow: visible;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoProducts {
    flex: none;
    min-height: 0;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
    gap: 10px;
  }
}
@media (min-width: 1001px) and (max-height: 540px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
    flex: none;
    height: 350px;
  }
}

/* Compact command area and one calm palette for the whole station. */
#appView.app-shell .workspace[data-view="quickOutbound"] {
  --qo-accent: #365e7c;
  --qo-success: #246b55;
  --qo-error: #9a3d3d;
  --qo-line: #dfe5eb;
  --qo-ink: #26394a;
  --qo-muted: #697986;
  background: #f3f5f7;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
  grid-template-columns: 126px 70px minmax(150px, 300px) minmax(180px, 1fr) auto;
  gap: 10px 16px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-operator-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoCurrentOperator {
  display: block;
  max-width: 100%;
  color: var(--qo-ink);
  font-size: 21px;
  line-height: 28px;
  font-weight: 700;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorSelect {
  width: 150px;
  max-width: none;
  height: 27px;
  min-height: 27px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOperatorConfirm {
  height: 27px;
  min-height: 27px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoStart.primary {
  border-color: var(--qo-accent);
  background: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-tabs button[aria-selected="true"] {
  color: var(--qo-accent);
  border-bottom-color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts > div {
  background: #fff;
  border-left-color: #bdcbd7;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrderFacts strong,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-order-total {
  color: var(--qo-ink);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-sorting {
  border-color: #d7e1e9;
  background: #f1f5f8;
  color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product .qo-quantity {
  border-color: #d2dde6;
  background: #f1f5f8;
  color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-product .qo-quantity-multiple {
  border-color: #e2d4bf;
  background: #f8f3eb;
  color: #825c30;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoOrder .qo-label-buttons button {
  border-color: #cbd7e0;
  color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-stack .qo-camera {
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
  max-height: calc(100% - 150px);
  overflow: hidden;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-stack .qo-camera video {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  object-fit: contain;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack .qo-feedback {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  gap: 8px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoStatus {
  color: var(--qo-ink);
  font-size: 21px;
  line-height: 29px;
  font-weight: 700;
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoStatus[data-tone="error"] {
  color: var(--qo-error);
}
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback #qoUploadStatus {
  font-size: 17px;
  line-height: 26px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress {
  grid-template-columns: 1fr;
  flex: 0 0 auto;
  padding: 12px 14px;
  gap: 10px;
  border-color: #d7e1e9;
  background: #eef3f7;
  color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-heading > strong {
  font-size: 25px;
  line-height: 32px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-heading > span {
  font-size: 17px;
  line-height: 25px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step {
  font-size: 14px;
  line-height: 22px;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-active {
  color: var(--qo-accent);
  border-color: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-active > span {
  background: var(--qo-accent);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress.qo-progress-complete {
  background: #f0f6f2;
  border-color: #cbded2;
  color: var(--qo-success);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-done {
  color: var(--qo-success);
  border-color: #80ae96;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-done > span {
  background: #e1eee5;
  color: var(--qo-success);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress.qo-progress-error,
#appView.app-shell .workspace[data-view="quickOutbound"] #qoScanNotice:not(:empty) {
  border-color: #e6cdca;
  background: #fbf3f2;
  color: var(--qo-error);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-error {
  color: var(--qo-error);
  border-color: #c48f89;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-step.is-error > span {
  background: #f3dfdc;
  color: var(--qo-error);
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoScanNotice:not(:empty) {
  font-size: 19px;
  line-height: 28px;
  font-weight: 600;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoResult {
  color: var(--qo-success);
  background: #f0f6f2;
  border-color: #cbded2;
  font-size: 25px;
  line-height: 32px;
}
@media (min-width: 1001px) and (max-width: 1200px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
    grid-template-columns: 120px 70px minmax(150px, 300px) auto;
    gap: 8px 12px;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field {
    grid-column: 3;
    grid-row: 1;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons {
    grid-column: 4;
    grid-row: 1;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-operator-controls {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 8px 16px;
  }
}
@media (max-width: 1000px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
    grid-template-columns: 126px 70px minmax(0, 1fr);
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-operator-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-scan-field {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack {
    height: auto;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-stack .qo-camera {
    max-height: none;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack .qo-feedback {
    flex: none;
    overflow: visible;
  }
}
@media (max-width: 600px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoCommandbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions #qoHeaderButtons {
    grid-row: 4;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoProgress .qo-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#appView.app-shell .workspace[data-view="quickOutbound"] #qoScanInput:focus {
  outline: 2px solid #a4b6c4;
  border-color: #6e8a9f;
  box-shadow: none;
}
#appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-camera-footer {
  font-size: 14px;
  line-height: 22px;
}
/* The stage card already explains a current failure; keep the parcel code nearby. */
#appView.app-shell .workspace[data-view="quickOutbound"] .qo-feedback:has(#qoProgress.qo-progress-error:not([hidden])) #qoStatus[data-tone="error"] {
  display: none;
}
@media (max-width: 1000px) {
  #appView.app-shell .workspace[data-view="quickOutbound"] #qoPanel-work .qo-layout {
    display: flex;
    flex-direction: column;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack {
    display: contents;
  }
  #appView.app-shell .workspace[data-view="quickOutbound"] .qo-camera-stack .qo-feedback {
    order: -2;
  }
}

#appView.app-shell .workspace[data-view="quickOutbound"] #pageHeaderActions .qo-metric > span {
  white-space: nowrap;
}
