.dispatch-page {
  min-height: calc(100vh - 24px);
  padding: 18px 28px 28px;
  background: #f6f8fc;
  color: #061333;
}

.dispatch-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.dispatch-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #8490a8;
  font-size: 14px;
  font-weight: 700;
}

.dispatch-breadcrumb strong {
  color: #061333;
}

.dispatch-page-header h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0 0;
  color: #061333;
  font-size: 28px;
  line-height: 1.08;
}

.dispatch-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #12924a;
  font-size: 12px;
  font-weight: 800;
}

.dispatch-online > span,
.dispatch-session-state > span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #18a957;
  box-shadow: inset 0 0 0 3px #e9f8ef;
}

.dispatch-session-bar {
  display: grid;
  grid-template-columns: minmax(260px, 290px) repeat(3, minmax(180px, 1fr)) minmax(170px, .8fr);
  align-items: stretch;
  gap: 0;
  min-height: 146px;
  padding: 18px 28px;
  margin: 0 0 14px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 35, 58, .08);
}

.dispatch-session-command {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  padding-right: 34px;
}

.dispatch-start-button {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #07928d, #04746f);
  box-shadow: 0 8px 18px rgba(4, 116, 111, .25);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.dispatch-play {
  width: 0;
  height: 0;
  margin-right: 8px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
}

.dispatch-session-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  background: #e8f8ee;
  color: #128046;
  font-size: 13px;
  font-weight: 800;
}

.dispatch-session-state.active {
  background: #def8ea;
}

.dispatch-refresh-button {
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
  color: #21324d;
  box-shadow: none;
  font-weight: 800;
}

.dispatch-session-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 20px 34px;
  border-left: 1px solid #dfe6ef;
}

.dispatch-metric-icon {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #1b2d4b;
}

.dispatch-icon-clock {
  border: 2px solid currentColor;
  border-radius: 999px;
}

.dispatch-icon-clock::before,
.dispatch-icon-clock::after {
  position: absolute;
  left: 14px;
  top: 7px;
  width: 2px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.dispatch-icon-clock::after {
  top: 15px;
  width: 8px;
  height: 2px;
}

.dispatch-icon-box::before,
.dispatch-icon-box::after {
  position: absolute;
  border: 2px solid currentColor;
  content: "";
}

.dispatch-icon-box::before {
  left: 6px;
  top: 5px;
  width: 20px;
  height: 20px;
  transform: rotate(30deg) skewY(-30deg);
}

.dispatch-icon-box::after {
  left: 15px;
  top: 12px;
  width: 2px;
  height: 16px;
  border-width: 0 0 0 2px;
}

.dispatch-icon-queue::before,
.dispatch-icon-queue::after {
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
}

.dispatch-icon-queue::before {
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  box-shadow: 15px 0 0 -2px #f6f8fc, 15px 0 0 0 currentColor;
}

.dispatch-icon-queue::after {
  left: 1px;
  top: 20px;
  width: 25px;
  height: 7px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: 0;
}

.dispatch-session-metric small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #061333;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-session-metric b {
  display: block;
  margin-top: 6px;
  color: #061333;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.dispatch-monthly-counter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 5px;
  padding: 14px 0 14px 24px;
  border-left: 1px solid #dfe6ef;
  color: #061333;
}

.dispatch-monthly-counter small {
  display: block;
  color: #54627a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.dispatch-monthly-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.dispatch-monthly-list span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #dce5f1;
  border-radius: 999px;
  background: #f8fafc;
  color: #23364f;
  font-size: 11px;
  line-height: 1;
}

.dispatch-monthly-list b {
  max-width: 82px;
  overflow: hidden;
  color: #061333;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-monthly-list strong {
  color: #057a73;
  font-size: 12px;
  font-weight: 900;
}

.dispatch-monthly-empty,
.dispatch-monthly-counter em {
  color: #63728a;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.dispatch-workstation {
  display: grid;
  grid-template-columns: 1.08fr .95fr .95fr 1.28fr;
  gap: 0;
  padding: 18px 22px;
  margin-bottom: 14px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 35, 58, .07);
}

.dispatch-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 154px;
  gap: 16px;
  padding: 6px 28px 6px 18px;
  border-right: 1px solid #dfe6ef;
}

.dispatch-step-product {
  padding-left: 0;
}

.dispatch-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid #04928d;
  border-radius: 999px;
  background: #fff;
  color: #061333;
  font-size: 18px;
  font-weight: 900;
}

.dispatch-step h3,
.dispatch-flow h3 {
  margin: 5px 0 8px;
  color: #061333;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.dispatch-step p,
.dispatch-flow p {
  margin: 0 0 14px;
  color: #52607a;
  font-size: 14px;
  line-height: 1.42;
}

.dispatch-scan-input,
.dispatch-confirm-box input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #07928d;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #061333;
  font-size: 14px;
  font-weight: 700;
}

.dispatch-scan-input::placeholder,
.dispatch-confirm-box input::placeholder {
  color: #07928d;
}

.dispatch-scan-input:focus,
.dispatch-confirm-box input:focus {
  border-color: #04746f;
  box-shadow: 0 0 0 4px rgba(7, 146, 141, .14);
}

.dispatch-scan-input:disabled {
  background: #f7fbfc;
  color: #7b879b;
  cursor: not-allowed;
}

.dispatch-printer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f1dcff, #e8d6ff);
}

.dispatch-printer::before {
  position: absolute;
  top: 12px;
  width: 28px;
  height: 15px;
  border: 2px solid #101828;
  border-bottom: 0;
  background: #fff;
  content: "";
}

.dispatch-printer span {
  position: relative;
  width: 34px;
  height: 24px;
  margin-top: 10px;
  border: 3px solid #101828;
  border-radius: 4px;
  background: #fff;
}

.dispatch-printer span::before {
  position: absolute;
  left: 7px;
  bottom: -11px;
  width: 17px;
  height: 12px;
  border: 2px solid #101828;
  background: #fff;
  content: "";
}

.dispatch-flow {
  min-width: 0;
  margin-left: 18px;
  padding: 12px 18px;
  border: 1px solid #c8dbf4;
  border-radius: 8px;
  background: #f8fbff;
}

.dispatch-flow p {
  position: relative;
  margin: 0 0 10px;
  padding-left: 20px;
  color: #0c5eef;
  font-size: 13px;
  font-weight: 800;
}

.dispatch-flow p::before {
  position: absolute;
  left: 0;
  top: 0;
  color: #0c5eef;
  content: "✓";
}

.dispatch-alert {
  padding: 11px 14px;
  margin: 0 0 14px;
  border-radius: 8px;
  font-weight: 800;
}

.dispatch-alert.info {
  border: 1px solid #c8dbf4;
  background: #eff6ff;
  color: #1d4ed8;
}

.dispatch-alert.success {
  border: 1px solid #a8e7bd;
  background: #edf9f1;
  color: #0f7a40;
}

.dispatch-alert.error {
  border: 1px solid #f6b8b8;
  background: #fff2f2;
  color: #b42318;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.22fr) minmax(420px, .84fr);
  gap: 16px;
  align-items: stretch;
}

.dispatch-panel {
  overflow: hidden;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 35, 58, .07);
}

.dispatch-panel-head,
.dispatch-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid #dfe6ef;
}

.dispatch-panel h2,
.dispatch-selected h2 {
  margin: 0;
  color: #061333;
  font-size: 18px;
  line-height: 1.25;
}

.link-button,
.dispatch-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #061333;
  cursor: pointer;
  font-weight: 900;
}

.link-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 19px;
}

.link-button:hover,
.dispatch-close:hover {
  background: #f0f5fb;
}

.dispatch-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
}

.dispatch-queue {
  display: flex;
  flex-direction: column;
  max-height: 590px;
  overflow: auto;
}

.dispatch-queue-row {
  display: grid;
  grid-template-columns: 34px minmax(68px, 74px) minmax(260px, 1fr) minmax(88px, auto) minmax(128px, auto) minmax(104px, auto);
  align-items: center;
  width: 100%;
  min-height: 112px;
  gap: 14px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  background: #fff;
  cursor: default;
  text-align: left;
}

.dispatch-queue-row.active {
  outline: 2px solid #07928d;
  outline-offset: -2px;
  background: #f8fffe;
}

.dispatch-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #efe4ff;
  color: #6c28d9;
  font-size: 14px;
  font-weight: 900;
}

.dispatch-product-cell {
  display: contents;
}

.dispatch-product-cell > span:last-child {
  display: block;
  min-width: 0;
}

.dispatch-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.dispatch-thumb.placeholder {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.dispatch-attribute-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.dispatch-attribute-chips.compact {
  gap: 5px;
  margin-top: 7px;
}

.dispatch-attribute-chip {
  display: inline-grid;
  grid-template-columns: auto;
  min-width: 0;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f8fbff;
  color: #061333;
  line-height: 1.05;
}

.dispatch-attribute-chip small {
  display: block;
  margin-bottom: 3px;
  color: #66758f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dispatch-attribute-chip b {
  display: block;
  max-width: 210px;
  overflow: hidden;
  color: #061333;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-attribute-chips.compact .dispatch-attribute-chip {
  padding: 5px 7px;
}

.dispatch-attribute-chips.compact .dispatch-attribute-chip small {
  display: none;
}

.dispatch-attribute-chips.compact .dispatch-attribute-chip b {
  max-width: 112px;
  font-size: 11px;
}

.dispatch-attribute-chip.voltage {
  border-color: #f9c36d;
  background: #fff7e8;
}

.dispatch-attribute-chip.color {
  border-color: #9bd4ce;
  background: #edfdfa;
}

.dispatch-attribute-chip.model {
  border-color: #b8c7f4;
  background: #f1f5ff;
}

.dispatch-product-cell strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #061333;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-product-meta {
  display: block;
  margin-top: 7px;
  color: #061333;
  font-size: 13px;
  font-weight: 800;
}

.dispatch-product-cell small,
.dispatch-client small,
.dispatch-product-cell em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #52607a;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-client strong {
  display: block;
  overflow: hidden;
  color: #061333;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-status {
  justify-self: start;
  max-width: 118px;
  overflow: hidden;
  padding: 8px 13px;
  border-radius: 999px;
  background: #dbe9ff;
  color: #0c5eef;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dispatch-doc-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dispatch-doc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-doc-pill.ok {
  border: 1px solid #98e1b0;
  background: #def8e7;
  color: #0f7a40;
}

.dispatch-doc-pill.pending {
  border: 1px solid #fac7a4;
  background: #fff5eb;
  color: #b54708;
}

.dispatch-action {
  display: flex;
  flex-direction: column;
  justify-self: end;
  gap: 7px;
  width: 108px;
  padding: 9px 8px;
  border: 1px solid #d5c0ff;
  border-radius: 8px;
  background: #f1e7ff;
  color: #6c28d9;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.dispatch-action small {
  display: block;
  font-size: 11px;
  line-height: 1.25;
}

.dispatch-regress-button {
  min-height: 32px;
  border: 1px solid #8a52e7;
  border-radius: 8px;
  background: #fff;
  color: #6c28d9;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  padding: 6px 8px;
  white-space: normal;
}

.dispatch-regress-button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.dispatch-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 330px;
  padding: 34px;
  color: #52607a;
  text-align: center;
}

.dispatch-empty h2 {
  margin-top: 16px;
}

.dispatch-empty p {
  max-width: 410px;
  margin: 10px 0 0;
  color: #52607a;
  line-height: 1.45;
}

.dispatch-empty-illustration {
  position: relative;
  width: 128px;
  height: 88px;
}

.dispatch-empty-box {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 56px;
  height: 42px;
  border: 3px solid #cfd4dc;
  background: #f5f7fa;
  transform: skewY(18deg);
}

.dispatch-empty-box::before {
  position: absolute;
  left: 18px;
  top: -16px;
  width: 56px;
  height: 18px;
  border: 3px solid #cfd4dc;
  border-bottom: 0;
  background: #f8fafc;
  content: "";
  transform: skewX(-38deg);
}

.dispatch-empty-scanner {
  position: absolute;
  left: 8px;
  top: 5px;
  width: 56px;
  height: 24px;
  border: 3px solid #cfd4dc;
  border-radius: 9px 9px 6px 6px;
  background: #f8fafc;
  transform: rotate(28deg);
}

.dispatch-empty-scanner::before {
  position: absolute;
  left: 8px;
  top: 20px;
  width: 20px;
  height: 40px;
  border: 3px solid #cfd4dc;
  border-radius: 4px;
  background: #f2f4f7;
  content: "";
}

.dispatch-selected {
  padding-bottom: 16px;
}

.dispatch-selected > .dispatch-alert {
  margin: 14px 16px;
}

.dispatch-product-focus {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  margin: 0 16px 14px;
  border: 1px solid #cfe0f4;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.dispatch-focus-image {
  width: 100%;
  min-height: 170px;
  height: 100%;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.dispatch-focus-image.placeholder {
  display: block;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.dispatch-product-focus-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dispatch-focus-label {
  color: #0a8b82;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dispatch-product-focus h3 {
  margin: 6px 0 2px;
  color: #061333;
  font-size: 17px;
  line-height: 1.3;
}

.dispatch-focus-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.dispatch-focus-meta span {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef4fb;
  color: #21324d;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-focus-meta b {
  display: block;
  margin-bottom: 3px;
  color: #66758f;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dispatch-packaging-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 14px 16px 0;
  border: 1px solid #fac7a4;
  border-radius: 8px;
  background: #fff5eb;
  color: #b54708;
  font-weight: 900;
}

.dispatch-packaging-notice button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #ffead5;
  color: #b54708;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.dispatch-pill {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #f1e7ff;
  color: #6c28d9;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-selected-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 0 16px 14px;
}

.dispatch-info-card,
.dispatch-doc-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fff;
}

.dispatch-info-card h3,
.dispatch-doc-card h3 {
  margin: 0 0 10px;
  color: #061333;
  font-size: 13px;
}

.dispatch-info-card p {
  margin: 7px 0;
  overflow-wrap: anywhere;
  color: #35435c;
  font-size: 13px;
  line-height: 1.35;
}

.dispatch-doc-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dispatch-doc-buttons .button {
  justify-content: center;
  min-height: 36px;
  text-align: center;
}

.dispatch-label-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 110px;
  gap: 8px;
  padding: 14px;
  margin-top: 12px;
  border: 1px dashed #cfd8e3;
  border-radius: 8px;
  background: #fafcff;
  text-align: center;
}

.dispatch-label-preview strong {
  color: #061333;
  font-size: 20px;
}

.dispatch-label-preview span {
  font-family: monospace;
  font-size: 17px;
}

.dispatch-label-preview small {
  max-width: 260px;
  color: #52607a;
  line-height: 1.35;
}

.dispatch-confirm-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  margin: 0 16px;
  border: 1px solid #a8e7bd;
  border-radius: 8px;
  background: #edf9f1;
}

.dispatch-confirm-box label {
  min-width: 0;
  color: #0f7a40;
  font-weight: 900;
}

.button.success {
  border: none;
  background: #10b981;
  color: #fff;
}

.dispatch-muted {
  padding: 24px;
  color: #52607a;
  text-align: center;
}

.dispatch-shortcuts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 22px;
  margin-top: 16px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 35, 58, .06);
  color: #52607a;
}

.dispatch-shortcuts b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #061333;
  font-weight: 900;
}

@media (max-width: 1320px) {
  .dispatch-session-bar {
    grid-template-columns: minmax(230px, 270px) repeat(3, minmax(150px, 1fr));
    padding: 16px 20px;
  }

  .dispatch-session-metric {
    padding: 18px 20px;
  }

  .dispatch-layout {
    grid-template-columns: minmax(520px, 1fr) minmax(380px, .82fr);
  }

  .dispatch-queue-row {
    grid-template-columns: 30px minmax(56px, 62px) minmax(210px, 1fr) minmax(78px, auto) minmax(120px, auto) minmax(98px, auto);
    gap: 10px;
  }
}

@media (max-width: 1120px) {
  .dispatch-session-bar,
  .dispatch-workstation,
  .dispatch-layout {
    grid-template-columns: 1fr;
  }

  .dispatch-session-command {
    padding: 0 0 16px;
    border-bottom: 1px solid #dfe6ef;
  }

  .dispatch-session-metric {
    padding: 16px 0;
    border-left: 0;
    border-bottom: 1px solid #dfe6ef;
  }

  .dispatch-session-metric:last-child {
    border-bottom: 0;
  }

  .dispatch-step {
    min-height: 0;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid #dfe6ef;
  }

  .dispatch-flow {
    margin: 14px 0 0;
  }
}

@media (max-width: 760px) {
  .dispatch-page {
    padding: 14px;
  }

  .dispatch-page-header h1 {
    font-size: 24px;
  }

  .dispatch-session-bar,
  .dispatch-workstation,
  .dispatch-panel,
  .dispatch-shortcuts {
    border-radius: 10px;
  }

  .dispatch-queue-row {
    grid-template-columns: 28px 54px minmax(0, 1fr);
    min-height: 0;
    gap: 10px;
  }

  .dispatch-status,
  .dispatch-doc-status,
  .dispatch-action {
    grid-column: 3;
    justify-self: start;
  }

  .dispatch-action {
    width: min(150px, 100%);
  }

  .dispatch-selected-grid,
  .dispatch-confirm-box,
  .dispatch-doc-buttons {
    grid-template-columns: 1fr;
  }

  .dispatch-product-focus {
    grid-template-columns: 1fr;
  }

  .dispatch-focus-image {
    min-height: 220px;
    max-height: 280px;
  }

  .dispatch-focus-meta {
    grid-template-columns: 1fr;
  }

  .dispatch-confirm-box .button {
    width: 100%;
  }
}

/* Loaded after the legacy order-flow stylesheet in production. These rules only neutralize the old compact hotfix. */
.dispatch-page.dispatch-page {
  padding: 18px 28px 28px !important;
}

.dispatch-page .dispatch-session-bar {
  grid-template-columns: minmax(260px, 290px) repeat(3, minmax(180px, 1fr)) minmax(170px, .8fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 18px 28px !important;
  margin: 0 0 14px !important;
}

.dispatch-page .dispatch-session-bar div {
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
}

.dispatch-page .dispatch-session-command {
  padding-right: 34px !important;
}

.dispatch-page .dispatch-session-metric {
  padding: 20px 34px !important;
  border-left: 1px solid #dfe6ef !important;
  font-size: inherit !important;
}

.dispatch-page .dispatch-session-bar .dispatch-monthly-counter {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  padding: 14px 0 14px 24px !important;
  border-left: 1px solid #dfe6ef !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #061333 !important;
  font-size: inherit !important;
}

.dispatch-page .dispatch-session-bar .dispatch-start-button {
  min-height: 48px !important;
  height: auto !important;
  padding: 0 16px !important;
}

.dispatch-page .dispatch-session-bar .dispatch-refresh-button {
  min-height: 38px !important;
  height: auto !important;
  padding: 0 16px !important;
}

.dispatch-page .dispatch-workstation {
  padding: 18px 22px !important;
}

.dispatch-page .dispatch-step {
  min-height: 154px !important;
}

.dispatch-page .dispatch-scan-input,
.dispatch-page .dispatch-confirm-box input {
  height: 44px !important;
}

.dispatch-page .dispatch-printer {
  width: 56px !important;
  height: 56px !important;
  font-size: inherit !important;
}

.dispatch-page .dispatch-layout {
  grid-template-columns: 820px minmax(420px, 1fr) !important;
}

  .dispatch-page .dispatch-queue-row {
    grid-template-columns: 30px minmax(56px, 64px) minmax(190px, 1fr) minmax(78px, auto) minmax(112px, auto) minmax(92px, auto) !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

.dispatch-page .dispatch-action {
  justify-self: end !important;
  width: 96px !important;
  padding: 8px 6px !important;
}

.dispatch-page .dispatch-doc-pill {
  padding: 6px 10px !important;
}

.dispatch-page .dispatch-status {
  max-width: 96px !important;
  padding: 7px 11px !important;
}

.dispatch-page .dispatch-product-cell {
  display: contents !important;
}

  .dispatch-page .dispatch-product-cell > span:last-child {
    display: block !important;
    min-width: 0 !important;
  }

  .dispatch-page .dispatch-attribute-chips {
    display: flex !important;
  }

.dispatch-page .dispatch-session-bar .dispatch-refresh-button {
  border: 1px solid #d7e0ec !important;
  background: #fff !important;
  color: #21324d !important;
}

@media (max-width: 1320px) {
  .dispatch-page .dispatch-layout {
    grid-template-columns: minmax(640px, 1fr) minmax(360px, .72fr) !important;
  }

  .dispatch-page .dispatch-queue-row {
    grid-template-columns: 28px minmax(52px, 58px) minmax(170px, 1fr) minmax(72px, auto) minmax(108px, auto) minmax(90px, auto) !important;
    gap: 9px !important;
  }
}

@media (max-width: 1120px) {
  .dispatch-page .dispatch-session-bar,
  .dispatch-page .dispatch-workstation,
  .dispatch-page .dispatch-layout {
    grid-template-columns: 1fr !important;
  }

  .dispatch-page .dispatch-session-bar {
    display: block !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .dispatch-page .dispatch-session-command {
    padding: 0 0 16px !important;
  }

  .dispatch-page .dispatch-session-metric {
    display: flex !important;
    min-height: 70px !important;
    padding: 16px 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid #dfe6ef !important;
  }

  .dispatch-page .dispatch-session-bar .dispatch-monthly-counter {
    min-height: 58px !important;
    padding: 14px 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid #dfe6ef !important;
  }

  .dispatch-page .dispatch-step {
    min-height: 0 !important;
    padding: 14px 0 !important;
  }

  .dispatch-page .dispatch-queue-row {
    grid-template-columns: 28px 54px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .dispatch-page .dispatch-status,
  .dispatch-page .dispatch-doc-status,
  .dispatch-page .dispatch-action {
    grid-column: 3 !important;
    justify-self: start !important;
  }

  .dispatch-page .dispatch-action {
    width: min(150px, 100%) !important;
  }
}

@media (max-width: 760px) {
  .dispatch-page .dispatch-session-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 184px !important;
    padding: 18px !important;
  }

  .dispatch-page .dispatch-session-command {
    min-height: 148px !important;
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .dispatch-page .dispatch-session-metric {
    display: none !important;
  }
}

/* Compact header requested for dispatch: session controls live on the title line. */
.dispatch-page.dispatch-page {
  padding-top: 12px !important;
  gap: 8px !important;
  row-gap: 8px !important;
}

.dispatch-page .dispatch-page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-height: 56px !important;
  margin: 0 !important;
}

.dispatch-page .dispatch-page-header > div:first-child {
  flex: 0 0 auto !important;
  min-width: 220px !important;
}

.dispatch-page .dispatch-page-header h1 {
  margin: 2px 0 0 !important;
  gap: 10px !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-breadcrumb {
  gap: 7px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

.dispatch-page .dispatch-session-bar {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: minmax(330px, 1.35fr) repeat(3, minmax(108px, .5fr)) minmax(160px, .72fr) !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 52px !important;
  height: auto !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 18px rgba(19, 35, 58, .06) !important;
}

.dispatch-page .dispatch-session-command {
  display: grid !important;
  grid-template-columns: minmax(142px, auto) minmax(132px, auto) minmax(90px, auto) !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.dispatch-page .dispatch-session-bar .dispatch-start-button,
.dispatch-page .dispatch-session-bar .dispatch-refresh-button,
.dispatch-page .dispatch-session-state {
  width: auto !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 11px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-session-state {
  justify-content: center !important;
  gap: 6px !important;
}

.dispatch-page .dispatch-play {
  margin-right: 6px !important;
  border-top-width: 6px !important;
  border-bottom-width: 6px !important;
  border-left-width: 9px !important;
}

.dispatch-page .dispatch-session-metric {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  padding: 0 0 0 12px !important;
  border-left: 1px solid #dfe6ef !important;
  border-bottom: 0 !important;
}

.dispatch-page .dispatch-metric-icon {
  width: 22px !important;
  height: 22px !important;
}

.dispatch-page .dispatch-icon-clock::before,
.dispatch-page .dispatch-icon-clock::after {
  left: 9px !important;
  top: 4px !important;
  height: 7px !important;
}

.dispatch-page .dispatch-icon-clock::after {
  top: 10px !important;
}

.dispatch-page .dispatch-session-metric small {
  margin: 0 0 2px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-session-metric b {
  font-size: 20px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-session-metric:not(:first-of-type) b {
  font-size: 18px !important;
}

.dispatch-page .dispatch-session-bar .dispatch-monthly-counter {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 38px !important;
  min-width: 0 !important;
  padding: 0 0 0 12px !important;
  border-left: 1px solid #dfe6ef !important;
  background: transparent !important;
  color: #061333 !important;
}

.dispatch-page .dispatch-monthly-counter small {
  margin: 0 !important;
  color: #54627a !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-monthly-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  min-width: 0 !important;
}

.dispatch-page .dispatch-monthly-list span {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  gap: 4px !important;
  padding: 3px 6px !important;
  border: 1px solid #dce5f1 !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  color: #23364f !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.dispatch-page .dispatch-monthly-list b {
  max-width: 70px !important;
  overflow: hidden !important;
  color: #061333 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-monthly-list strong {
  color: #057a73 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.dispatch-page .dispatch-monthly-empty,
.dispatch-page .dispatch-monthly-counter em {
  color: #63728a !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.dispatch-page .dispatch-workstation {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  padding: 12px 18px !important;
}

@media (max-width: 1280px) {
  .dispatch-page .dispatch-page-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .dispatch-page .dispatch-page-header > div:first-child,
  .dispatch-page .dispatch-session-bar {
    width: 100% !important;
  }
}

@media (max-width: 900px) {
  .dispatch-page .dispatch-session-bar {
    grid-template-columns: 1fr 1fr !important;
  }

  .dispatch-page .dispatch-session-command {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .dispatch-page.dispatch-page {
    padding-top: 10px !important;
  }

  .dispatch-page .dispatch-page-header h1 {
    font-size: 22px !important;
  }

  .dispatch-page .dispatch-session-bar {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    padding: 8px !important;
  }

  .dispatch-page .dispatch-session-command {
    grid-template-columns: 1fr !important;
  }

  .dispatch-page .dispatch-session-metric {
    min-height: 32px !important;
    padding: 0 !important;
    border-left: 0 !important;
  }

  .dispatch-page .dispatch-session-bar .dispatch-monthly-counter {
    min-height: 32px !important;
    padding: 8px 0 0 !important;
    border-left: 0 !important;
    border-top: 1px solid #dfe6ef !important;
  }
}
