:root {
  --green: #13ce66;
  --blue: #409eff;
  --red: #f56c6c;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f7fb;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 44%);
  color: var(--text);
  font-family: Inter, Arial, "Microsoft YaHei", sans-serif;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.page-wrapper {
  margin: 0 auto;
  max-width: 1480px;
  padding: 28px 22px 52px;
}

.hero {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #ffe600, #fff59d);
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(255, 230, 0, 0.22);
  display: flex;
  font-size: 18px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.hero h1 {
  font-size: 34px;
  line-height: 1;
  margin: 3px 0;
}

.hero p,
.status,
.eyebrow {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
}

.back-link {
  background: #eef6ff;
  border: 1px solid #cfe4ff;
  border-radius: 14px;
  color: #0b63ce;
  font-weight: 800;
  margin-left: auto;
  padding: 12px 16px;
  text-decoration: none;
}

.tabs-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-button {
  background: #f4f7fb;
  border: 0;
  border-radius: 13px;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  padding: 13px 18px;
}

.tab-button.active {
  background: #ecfff5;
  color: var(--green);
}

.workspace {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(430px, 0.86fr) minmax(560px, 1.14fr);
}

.control-card,
.preview-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.control-card {
  align-self: stretch;
}

.preview-card {
  align-self: stretch;
}

.card-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title h2 {
  font-size: 22px;
  margin: 0;
}

.switch-grid,
.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
  margin-top: 14px;
}

.quick-batch-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  grid-column: 1 / -1;
  padding: 20px;
}

.compact-batch-title {
  margin-bottom: 10px;
}

.batch-mini-status {
  background: #eef6ff;
  border-radius: 999px;
  color: #0b63ce;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.quick-batch-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  align-self: start;
}

.quick-batch-table-shell {
  overflow: visible;
}

.quick-batch-table {
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
  user-select: none;
  width: 100%;
}

.quick-batch-table th,
.quick-batch-table td {
  border: 1px solid #cfd6e3;
  height: 34px;
  padding: 0 8px;
  text-align: center;
  width: 25%;
}

.product-batch-card {
  grid-column: 1 / -1;
}

.product-batch-layout {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.product-batch-table-shell {
  max-height: none;
  min-height: 454px;
  overflow: auto;
}

.product-batch-table {
  table-layout: fixed;
}

.product-batch-table th,
.product-batch-table td {
  height: 34px;
  line-height: 1;
  padding: 0 6px;
  width: calc(100% / 7);
}

.product-batch-table th:last-child,
.product-batch-table td:last-child {
  width: calc(100% / 7);
}

.product-batch-cell {
  min-height: 34px;
}

.product-batch-table .mini-row-button {
  min-height: 28px;
  padding: 4px 12px;
}

.quick-batch-cell {
  align-items: center;
  display: flex;
  justify-content: center;
  line-height: 1.2;
  min-height: 32px;
  outline: none;
  overflow: hidden;
  padding: 0;
  white-space: nowrap;
}

.quick-batch-cell:focus {
  background: rgba(239, 247, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(64, 156, 255, 0.45), 0 0 0 3px rgba(64, 156, 255, 0.08);
}

.quick-batch-cell.selected {
  background: rgba(64, 156, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(64, 156, 255, 0.28);
}

.quick-batch-cell.selection-anchor {
  background: rgba(64, 156, 255, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(0, 122, 255, 0.62), 0 0 0 3px rgba(0, 122, 255, 0.08);
}

.quick-batch-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.toggle-line,
.field {
  display: grid;
  gap: 7px;
}

.toggle-line span,
.field span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 900;
}

input,
select {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  color: var(--text);
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(19, 206, 102, 0.12);
}

button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
  padding: 10px 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary {
  background: var(--green);
  color: #ffffff;
}

.secondary,
.ghost {
  background: #eef6ff;
  color: #0b63ce;
}

.danger {
  background: #fff2f2;
  color: #c5222a;
}

.shipment-console {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(680px, 1fr) minmax(360px, 430px);
}

.shipment-console-main,
.shipment-console-side .panel {
  align-self: start;
}

.shipment-console-side {
  display: grid;
  gap: 18px;
}

.compact-head {
  align-items: flex-start;
  gap: 12px;
}

.compact-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.shipment-store-panel .button-row.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-panel {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  margin: 14px 0;
  padding: 12px;
}

.status-panel strong {
  color: var(--text);
  display: block;
  margin-bottom: 5px;
}

.status-panel p {
  margin: 0;
}

.one-click-card {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #dfe8f6;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  margin: 14px 0;
  padding: 14px;
}

.one-click-head {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.shipment-s-logo {
  align-items: center;
  background: linear-gradient(135deg, #111827, #334155);
  border: 3px solid #ffe600;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  color: #ffe600;
  display: inline-flex;
  flex: 0 0 48px;
  font-size: 24px;
  font-weight: 950;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.one-click-head strong {
  display: block;
  font-size: 18px;
}

.one-click-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.one-click-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.one-click-options {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.one-click-options label {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.one-click-options input {
  accent-color: var(--blue);
  min-height: auto;
  width: auto;
}

.one-click-snapshot {
  background: rgba(52, 131, 250, 0.08);
  border: 1px solid rgba(52, 131, 250, 0.18);
  border-radius: 14px;
  color: #1e3a5f;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
}

.one-click-logs {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
  padding-top: 10px;
}

.one-click-log {
  background: #ffffff;
  border: 1px solid #e6edf7;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  grid-template-columns: 56px 56px 1fr;
  padding: 8px 10px;
}

.one-click-log span,
.one-click-log strong {
  color: #64748b;
  font-size: 12px;
}

.one-click-log.success strong {
  color: var(--green);
}

.one-click-log.error strong {
  color: var(--red);
}

.one-click-log.warn strong {
  color: #b7791f;
}

.one-click-log p {
  color: #334155;
  margin: 0;
}

.shipment-grid-shell {
  max-height: 680px;
  overflow: auto;
}

.editable-grid {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1080px;
  width: 100%;
}

.editable-grid th,
.editable-grid td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #eef2f7;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.editable-grid th {
  background: #f4f7fb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

.editable-grid td[contenteditable="true"] {
  background: #fff;
  min-width: 110px;
  outline: none;
}

.editable-grid td[contenteditable="true"]:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.editable-grid .feedback-cell {
  min-width: 260px;
  white-space: pre-wrap;
}

.row-success td {
  background: #ecfff5 !important;
}

.row-failed td {
  background: #fff2f2 !important;
  color: #9f1239;
}

.row-blank td {
  background: #f8fafc !important;
  height: 44px;
}

.mini-row-button {
  min-height: 30px;
  padding: 6px 10px;
}

.sku-thumb {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.error-text {
  color: #c5222a;
}

.full {
  grid-column: 1 / -1;
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row.compact button {
  min-height: 36px;
  padding: 8px 11px;
}

.batch-tools {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.search-line {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin: 12px 0;
}

.search-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-height: 420px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 11px 10px;
  text-align: center;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

td:first-child,
th:first-child {
  width: 54px;
}

.status {
  font-size: 14px;
  min-height: 22px;
}

.status.error {
  color: var(--red);
  font-weight: 800;
}

.label-preview {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 14px;
  min-height: 480px;
  padding: 16px;
}

.empty-state {
  align-content: center;
  color: var(--muted);
  font-weight: 800;
  justify-content: center;
  text-align: center;
}

.box-label,
.product-label {
  background: #ffffff;
  border: 2px solid #111827;
  color: #111827;
  overflow: hidden;
  page-break-inside: avoid;
  position: relative;
}

.box-label {
  aspect-ratio: 100 / 150;
  min-height: 0;
}

.new-box-preview {
  container-type: inline-size;
  min-width: 260px;
}

.new-box-preview-square {
  aspect-ratio: 1 / 1;
  min-width: 300px;
}

.new-label-logo {
  left: 5%;
  position: absolute;
  top: 4%;
  width: 18%;
}

.new-label-logo img {
  display: block;
  width: 100%;
}

.new-label-head {
  font-size: 4.3cqw;
  left: 25%;
  line-height: 1.45;
  position: absolute;
  top: 5%;
}

.new-label-full {
  align-items: center;
  color: #00a650;
  display: flex;
  font-size: 6.2cqw;
  font-weight: 900;
  gap: 2%;
  justify-content: flex-end;
  left: 72%;
  position: absolute;
  top: 4.5%;
  width: 23%;
}

.new-label-full img {
  display: block;
  object-fit: contain;
  width: 100%;
}

.new-label-full span {
  background: #00a650;
  clip-path: polygon(35% 0, 100% 0, 60% 48%, 82% 48%, 32% 100%, 44% 56%, 10% 56%);
  display: block;
  height: 12cqw;
  width: 10cqw;
}

.new-label-warning {
  border: 1.8px solid #111827;
  font-size: 2.8cqw;
  font-weight: 900;
  left: 61%;
  padding: 2.2% 0;
  position: absolute;
  text-align: center;
  top: 17%;
  white-space: nowrap;
  width: 37%;
}

.new-label-warning-text {
  font-size: 2.35cqw;
  font-weight: 900;
  left: 61%;
  position: absolute;
  top: 25%;
  white-space: nowrap;
}

.new-label-qr {
  left: 33%;
  position: absolute;
  top: 33%;
  width: 34%;
}

.new-label-code {
  font-size: 4cqw;
  left: 0;
  position: absolute;
  text-align: center;
  top: 57%;
  width: 100%;
}

.new-label-warehouse {
  font-size: 13cqw;
  font-weight: 900;
  left: 0;
  position: absolute;
  text-align: center;
  top: 68%;
  width: 100%;
}

.new-label-footer {
  border-top: 1.6px solid #111827;
  bottom: 0;
  display: grid;
  font-size: 4cqw;
  gap: 2.5%;
  left: 0;
  padding: 8% 5% 3%;
  position: absolute;
  right: 0;
}

.new-label-footer strong {
  font-size: 4.3cqw;
}

.new-box-preview-square .new-label-logo {
  left: 5%;
  top: 4.2%;
  width: 19%;
}

.new-box-preview-square .new-label-head {
  font-size: 4.2cqw;
  left: 27%;
  top: 4.7%;
}

.new-box-preview-square .new-label-full {
  left: 71%;
  top: 1.8%;
  width: 24%;
}

.new-box-preview-square .new-label-warning {
  box-sizing: border-box;
  font-size: 2.85cqw;
  left: 61%;
  padding: 1.55% 0;
  top: 18.8%;
  width: 34.5%;
}

.new-box-preview-square .new-label-warning-text {
  font-size: 2.2cqw;
  left: 56%;
  text-align: right;
  top: 29.8%;
  width: 40%;
}

.new-box-preview-square .new-label-qr {
  left: 33%;
  top: 33.2%;
  width: 34%;
}

.new-box-preview-square .new-label-code {
  font-size: 4.6cqw;
  font-weight: 900;
  top: 70.4%;
}

.new-box-preview-square .new-label-warehouse {
  font-size: 10.4cqw;
  line-height: 1;
  top: 78.2%;
}

.new-box-preview-square .new-label-footer {
  align-items: start;
  border-top-width: 1.4px;
  bottom: 0;
  display: grid;
  font-size: 2.45cqw;
  grid-template-columns: 20% 1fr;
  grid-template-rows: auto auto;
  min-height: 0;
  padding: 2.5% 4.8% 0.7%;
  top: 89.2%;
}

.new-box-preview-square .new-label-footer strong {
  font-size: 3.55cqw;
  grid-row: 1;
  line-height: 1;
}

.new-box-preview-square .new-label-footer span {
  font-size: 2.35cqw;
  line-height: 1.05;
}

.new-box-preview-square .new-label-footer span:first-of-type {
  grid-column: 2;
}

.new-box-preview-square .new-label-footer span:last-of-type {
  grid-column: 1 / -1;
}

.old-box-preview {
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  min-width: 260px;
}

.old-label-title {
  font-size: 5.8cqw;
  font-weight: 900;
  left: 0;
  position: absolute;
  text-align: center;
  top: 7%;
  width: 100%;
}

.old-label-qr {
  left: 25%;
  position: absolute;
  top: 20%;
  width: 50%;
}

.old-label-code {
  font-size: 5.4cqw;
  font-weight: 900;
  left: 0;
  position: absolute;
  text-align: center;
  top: 75%;
  width: 100%;
}

.old-label-shop,
.old-label-id {
  font-size: 4cqw;
  font-weight: 900;
  left: 0;
  position: absolute;
  text-align: center;
  width: 100%;
}

.old-label-shop {
  top: 87%;
}

.old-label-id {
  top: 94%;
}

.product-label {
  aspect-ratio: 50 / 30;
  min-height: 0;
  min-width: 260px;
}

.product-pdf-preview {
  container-type: inline-size;
}

.product-preview-barcode {
  left: 8%;
  position: absolute;
  top: 6%;
  width: 84%;
}

.product-preview-mlcode,
.product-preview-meta {
  position: absolute;
}

.product-preview-mlcode {
  font-size: 5.2cqw;
  font-weight: 900;
  left: 0;
  text-align: center;
  top: 47%;
  width: 100%;
}

.product-preview-meta {
  bottom: 6%;
  display: grid;
  font-size: 3.55cqw;
  font-weight: 780;
  gap: 0.65cqw 2cqw;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  left: 4%;
  line-height: 1.08;
  right: 4%;
}

.product-preview-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-preview-meta .left {
  text-align: left;
}

.product-preview-meta .right {
  text-align: right;
}

.checkbox-group {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
}

.checkbox-group label {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
}

.modal-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
  max-width: 620px;
  padding: 26px;
  position: relative;
  width: calc(100% - 32px);
}

.modal-close {
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 20px;
  height: 40px;
  padding: 0;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
}

.modal-card h2 {
  margin: 0 0 14px;
}

.modal-card li {
  line-height: 1.65;
  margin: 8px 0;
}

.hidden {
  display: none !important;
}

.pill-ok {
  background: #ecfff5;
  border-radius: 999px;
  color: #069650;
  display: inline-block;
  font-weight: 900;
  padding: 4px 9px;
}

.pill-bad {
  background: #fff2f2;
  border-radius: 999px;
  color: #c5222a;
  display: inline-block;
  font-weight: 900;
  padding: 4px 9px;
}

/* Shipment console layout polish: keep dense operational content aligned and stable. */
.shipment-console {
  align-items: start;
  gap: 20px;
  grid-template-columns: minmax(760px, 1fr) minmax(420px, 480px);
}

.shipment-console-side {
  gap: 16px;
  margin-top: -28px;
}

.shipment-console-main.panel,
.shipment-console-side .panel {
  padding: 22px;
}

.shipment-console .panel-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.shipment-console .panel-head h2 {
  line-height: 1.1;
  margin: 6px 0 8px;
}

.shipment-console .panel-head p {
  line-height: 1.45;
}

.shipment-console-side,
.shipment-console-side .panel,
.shipment-console-side .panel-head,
.shipment-console-side .field,
.shipment-console-side label,
.shipment-console-side p,
.shipment-console-side h2,
.shipment-console-side strong,
.shipment-console-side span {
  text-align: center;
}

.shipment-console .row-actions {
  display: grid;
  flex: 0 0 min(100%, 650px);
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  justify-content: stretch;
}

.shipment-console .button-row.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-console button,
.shipment-console input,
.shipment-console select {
  text-align: center;
}

.shipment-store-panel {
  scroll-margin-top: 16px;
}

.shipment-store-panel .compact-head {
  align-items: center;
}

.shipment-store-panel .field {
  margin-top: 14px;
}

.shipment-store-panel .status {
  line-height: 1.45;
  margin-top: 10px;
  text-align: center;
}

.one-click-card {
  margin-top: 0;
}

.one-click-head {
  align-items: center;
}

.shipment-s-logo {
  transform: translateY(-5px);
}

.shipment-grid-shell {
  max-height: 620px;
}

.editable-grid {
  table-layout: fixed;
}

.editable-grid th,
.editable-grid td {
  height: 54px;
  line-height: 20px;
  max-height: 54px;
  overflow: hidden;
  padding: 7px 10px;
  text-align: center;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.editable-grid tbody tr {
  height: 54px;
  max-height: 54px;
}

.editable-grid th:nth-child(1),
.editable-grid td:nth-child(1) {
  width: 46px;
}

.editable-grid th:nth-child(2),
.editable-grid td:nth-child(2),
.editable-grid th:nth-child(3),
.editable-grid td:nth-child(3),
.editable-grid th:nth-child(5),
.editable-grid td:nth-child(5),
.editable-grid th:nth-child(6),
.editable-grid td:nth-child(6),
.editable-grid th:nth-child(7),
.editable-grid td:nth-child(7),
.editable-grid th:nth-child(10),
.editable-grid td:nth-child(10),
.editable-grid th:nth-child(11),
.editable-grid td:nth-child(11) {
  width: 96px;
}

.editable-grid th:nth-child(4),
.editable-grid td:nth-child(4) {
  width: 160px;
}

.editable-grid th:nth-child(8),
.editable-grid td:nth-child(8),
.editable-grid th:nth-child(9),
.editable-grid td:nth-child(9) {
  width: 170px;
}

.editable-grid td[contenteditable="true"] {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.editable-grid .feedback-cell {
  min-width: 0;
  white-space: normal;
}

.row-blank td {
  height: 34px;
}

.mini-row-button {
  min-height: 34px;
  padding: 6px 10px;
}

.app-sidebar-brand,
.app-nav-item {
  transform: translateY(-3px);
}

.app-sidebar-nav {
  gap: 10px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .quick-batch-layout {
    grid-template-columns: 1fr;
  }

  .shipment-console {
    grid-template-columns: 1fr;
  }

  .shipment-console-side {
    margin-top: 0;
  }

  .shipment-console .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-console .row-actions {
    flex-basis: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-card {
    position: static;
  }
}

@media print {
  body {
    background: #fff;
  }

  .hero,
  .tabs-card,
  .control-card,
  .card-title,
  .status,
  .back-link {
    display: none !important;
  }

  .page-wrapper,
  .preview-card,
  .label-preview {
    border: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .workspace,
  .label-preview {
    display: block;
  }

  .box-label,
  .product-label {
    break-after: page;
    margin: 0 auto;
    max-width: 100mm;
  }
}

/* Shipment table row-height fix: keep table layout intact, only constrain row content. */
.shipment-console {
  align-items: start;
}

.shipment-console-side {
  margin-top: -18px;
}

.shipment-console .panel-head {
  align-items: center;
}

.shipment-console .row-actions {
  align-items: center;
}

.shipment-s-logo {
  transform: translateY(-4px);
}

.editable-grid {
  table-layout: fixed;
}

.editable-grid th,
.editable-grid td {
  height: 58px;
  line-height: 20px;
  max-height: 58px;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.editable-grid tbody tr {
  height: 58px;
}

.editable-grid td[contenteditable="true"] {
  min-width: 0;
}

.editable-grid td .editable-cell-content {
  align-items: center;
  display: flex;
  justify-content: center;
  line-height: 20px;
  max-height: 40px;
  min-height: 40px;
  outline: none;
  overflow: hidden;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.editable-grid td .editable-cell-content:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
  border-radius: 8px;
  max-height: none;
  overflow: auto;
}

.editable-grid .feedback-cell {
  min-width: 0;
  white-space: normal;
}

.editable-grid td:first-child input[type="checkbox"] {
  display: block;
  margin: 0 auto;
}

.row-blank td {
  height: 40px;
}

@media (max-width: 1080px) {
  .shipment-console-side {
    margin-top: 0;
  }
}

/* Shipment v2 stacked workflow: store check -> one-click action -> table -> logs. */
.shipment-console-stack {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.shipment-console-stack .panel {
  width: 100%;
}

.shipment-top-panel,
.one-click-wide-card,
.one-click-record-panel,
.shipment-console-stack .shipment-console-main.panel {
  border-radius: 24px;
  padding: 22px 26px;
}

.shipment-top-panel .compact-head,
.one-click-record-panel .compact-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.shipment-top-panel .compact-head h2,
.one-click-record-panel .compact-head h2 {
  margin: 2px 0 4px;
}

.shipment-top-panel .compact-head p,
.one-click-record-panel .compact-head p {
  line-height: 1.45;
  margin: 0;
}

.shipment-store-strip {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 1.25fr) minmax(260px, 0.9fr) minmax(240px, 1fr) auto auto;
}

.shipment-store-strip .field {
  gap: 8px;
}

.shipment-store-strip .button-row.compact {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shipment-store-strip .status {
  align-self: center;
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

.shipment-store-strip button {
  min-width: 132px;
}

.one-click-wide-card {
  display: grid;
  gap: 16px;
}

.one-click-wide-card .one-click-head {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 0;
}

.one-click-wide-card .one-click-head strong {
  font-size: 22px;
}

.one-click-wide-card .one-click-head p {
  font-size: 14px;
  line-height: 1.45;
  margin: 3px 0 0;
}

.one-click-wide-card .shipment-s-logo {
  transform: translateY(-4px);
}

.one-click-wide-card .one-click-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.one-click-wide-card .field span {
  text-align: left;
}

.one-click-wide-card input,
.one-click-wide-card select,
.shipment-top-panel select {
  min-height: 50px;
}

.one-click-wide-card .one-click-options {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.one-click-wide-card .one-click-options label {
  background: #f8fbff;
  border: 1px solid #e6edf7;
  border-radius: 14px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  text-align: center;
}

.one-click-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.one-click-actions button,
.shipment-console-stack .row-actions button {
  min-height: 46px;
  white-space: nowrap;
}

.shipment-console-stack .shipment-console-main.panel {
  display: grid;
  gap: 12px;
}

.shipment-console-stack .shipment-console-main .panel-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 0;
}

.shipment-console-stack .shipment-console-main .panel-head h2 {
  margin: 2px 0 6px;
}

.shipment-console-stack .row-actions {
  display: grid;
  flex: 0 0 min(100%, 760px);
  gap: 12px;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
}

.shipment-console-stack .shipment-grid-shell {
  max-height: 560px;
}

.one-click-record-panel {
  display: grid;
  gap: 12px;
}

.one-click-record-panel .compact-head {
  margin-bottom: 0;
}

.one-click-record-panel #oneClickStatus {
  margin-top: 6px;
  text-align: left;
}

.one-click-record-panel .one-click-snapshot {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.one-click-record-panel .one-click-logs {
  border-top: 0;
  max-height: 260px;
  margin-top: 0;
  padding-top: 0;
}

.one-click-record-panel .one-click-log {
  grid-template-columns: 76px 72px minmax(0, 1fr);
}

.one-click-record-panel .one-click-log p {
  text-align: left;
}

.shipment-history-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.automation-log-card,
.billing-order-card,
.claim-lookup-card,
.claim-resolution-card,
.claims-search-card,
.compensation-lookup-card,
.dispatch-preferences-card,
.export-evidence-card,
.fulfillment-stock-card,
.order-billing-info-card,
.order-compliance-card,
.order-lookup-card,
.post-sale-messages-card,
.shipment-label-download-card,
.shipment-lookup-card {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.automation-log-actions,
.billing-order-actions,
.claim-lookup-actions,
.claim-resolution-actions,
.claims-search-actions,
.compensation-lookup-actions,
.dispatch-preferences-actions,
.export-evidence-actions,
.fulfillment-stock-actions,
.order-billing-info-actions,
.order-compliance-actions,
.order-lookup-actions,
.post-sale-messages-actions,
.shipment-label-download-actions,
.shipment-lookup-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-log-actions input,
.billing-order-actions input,
.billing-order-actions textarea,
.claim-lookup-actions input,
.claim-resolution-actions input,
.claims-search-actions input,
.compensation-lookup-actions input,
.export-evidence-actions input,
.fulfillment-stock-actions input,
.order-billing-info-actions input,
.order-compliance-actions input[type="text"],
.order-compliance-actions input:not([type]),
.order-lookup-actions input,
.post-sale-messages-actions input,
.shipment-label-download-actions input,
.shipment-label-download-actions textarea,
.shipment-lookup-actions input {
  min-height: 36px;
  width: 150px;
}

.billing-order-actions textarea {
  min-height: 38px;
  resize: vertical;
  width: 190px;
}

.billing-order-actions input {
  width: 150px;
}

.claim-lookup-actions input {
  width: 180px;
}

.claim-resolution-actions input {
  width: 160px;
}

.claim-resolution-actions select {
  min-height: 36px;
  width: 112px;
}

.claims-search-actions input {
  width: 150px;
}

.claims-search-actions select {
  min-height: 36px;
  width: 112px;
}

.shipment-label-download-actions textarea {
  min-height: 38px;
  resize: vertical;
  width: 220px;
}

.dispatch-preferences-actions label {
  align-items: center;
  color: #64748b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.dispatch-preferences-actions input[type="checkbox"] {
  accent-color: #2563eb;
}

.export-evidence-actions select {
  min-height: 36px;
  width: 100px;
}

.export-evidence-actions input {
  width: 145px;
}

.fulfillment-stock-actions input {
  width: 150px;
}

.fulfillment-stock-actions input[type="date"] {
  width: 138px;
}

.fulfillment-stock-actions select {
  min-height: 36px;
  width: 132px;
}

.order-compliance-actions input:not([type]),
.order-compliance-actions input[type="text"] {
  width: 170px;
}

.order-billing-info-actions input {
  width: 180px;
}

.post-sale-messages-actions input {
  width: 160px;
}

.post-sale-messages-actions select {
  min-height: 36px;
  width: 118px;
}

.order-compliance-actions label {
  align-items: center;
  color: #64748b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.order-compliance-actions input[type="checkbox"] {
  accent-color: #2563eb;
}

.compensation-lookup-actions select {
  min-height: 36px;
  width: 104px;
}

.compensation-lookup-actions input {
  width: 200px;
}

.order-lookup-actions input {
  width: 170px;
}

.shipment-lookup-actions input {
  width: 220px;
}

.order-lookup-result,
.billing-order-result,
.claim-lookup-result,
.claim-resolution-result,
.claims-search-result,
.compensation-lookup-result,
.dispatch-preferences-result,
.export-evidence-result,
.fulfillment-stock-result,
.order-billing-info-result,
.order-compliance-result,
.post-sale-messages-result,
.shipment-lookup-result {
  display: grid;
  gap: 10px;
}

.billing-order-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-order-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
  text-align: center;
}

.billing-order-summary strong {
  color: #172033;
  font-size: 15px;
}

.billing-order-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.billing-order-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.billing-order-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(210px, 1.25fr) repeat(3, minmax(110px, 0.8fr));
  padding: 10px 12px;
}

.billing-order-item strong,
.billing-order-item span,
.billing-order-item small {
  display: block;
}

.billing-order-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-order-item span,
.billing-order-item small {
  color: #64748b;
  font-size: 12px;
}

.claim-lookup-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 1fr) minmax(95px, 0.7fr) minmax(160px, 1fr) repeat(6, minmax(90px, 0.75fr));
  padding: 10px 12px;
}

.claim-lookup-summary strong,
.claim-lookup-summary small,
.claim-lookup-problem strong,
.claim-lookup-problem small {
  display: block;
}

.claim-lookup-summary strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-lookup-summary small,
.claim-lookup-problem small,
.claim-lookup-metrics small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.claim-lookup-problem {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 10px 12px;
}

.claim-lookup-problem strong {
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
}

.claim-lookup-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.claim-lookup-metrics span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 50px;
  place-items: center;
}

.claim-lookup-metrics strong {
  color: #172033;
  font-size: 15px;
}

.claim-lookup-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.claim-lookup-parts span {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.claim-lookup-parts span.ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.claim-lookup-parts span.failed {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.claim-message-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.claim-message-item {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.claim-message-item strong,
.claim-message-item span {
  display: block;
}

.claim-message-item strong {
  color: #172033;
  font-size: 13px;
}

.claim-message-item span,
.claim-message-item p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.claim-message-item p {
  margin: 0;
}

.claim-resolution-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 0.7fr) minmax(160px, 1fr) repeat(4, minmax(100px, 0.75fr));
  padding: 10px 12px;
}

.claim-resolution-summary strong,
.claim-resolution-summary small,
.claim-resolution-detail strong,
.claim-resolution-detail small {
  display: block;
}

.claim-resolution-summary strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-resolution-summary small,
.claim-resolution-detail small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.claim-resolution-detail {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 10px 12px;
}

.claim-resolution-detail strong {
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
}

.claim-resolution-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.claim-resolution-chips span {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.claim-resolution-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.claim-resolution-list article {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.85fr) minmax(150px, 0.85fr);
  padding: 10px 12px;
}

.claim-resolution-list strong,
.claim-resolution-list span,
.claim-resolution-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-resolution-list strong {
  color: #172033;
  font-size: 13px;
}

.claim-resolution-list span,
.claim-resolution-list small {
  color: #64748b;
  font-size: 12px;
}

.claims-search-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.claims-search-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
  text-align: center;
}

.claims-search-summary strong {
  color: #172033;
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claims-search-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.claims-search-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow: auto;
}

.claims-search-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.9fr) minmax(95px, 0.62fr) minmax(140px, 0.82fr) auto auto;
  padding: 10px 12px;
}

.claims-search-item strong,
.claims-search-item span,
.claims-search-item small {
  display: block;
}

.claims-search-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claims-search-item span,
.claims-search-item small {
  color: #64748b;
  font-size: 12px;
}

.claim-view-button {
  min-height: 32px;
  padding: 0 12px;
}

.fulfillment-stock-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(170px, 1.35fr) repeat(4, minmax(92px, 1fr));
}

.fulfillment-stock-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
  text-align: center;
}

.fulfillment-stock-summary strong {
  color: #172033;
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-stock-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.fulfillment-stock-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fulfillment-stock-pills span {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 999px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.fulfillment-stock-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.fulfillment-stock-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(110px, 0.8fr));
  padding: 10px 12px;
}

.fulfillment-stock-item strong,
.fulfillment-stock-item span,
.fulfillment-stock-item small {
  display: block;
}

.fulfillment-stock-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-stock-item span,
.fulfillment-stock-item small {
  color: #64748b;
  font-size: 12px;
}

.dispatch-preferences-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dispatch-preferences-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
  text-align: center;
}

.dispatch-preferences-summary strong {
  color: #172033;
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-preferences-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.dispatch-preferences-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.dispatch-preferences-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(120px, 0.8fr));
  padding: 10px 12px;
}

.dispatch-preferences-item strong,
.dispatch-preferences-item span,
.dispatch-preferences-item small {
  display: block;
}

.dispatch-preferences-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-preferences-item span,
.dispatch-preferences-item small {
  color: #64748b;
  font-size: 12px;
}

.dispatch-pickup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dispatch-pickup-list span {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.export-evidence-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.export-evidence-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
}

.export-evidence-summary strong {
  color: #172033;
  font-size: 15px;
}

.export-evidence-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.export-evidence-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.export-evidence-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(210px, 1.25fr) repeat(3, minmax(120px, 0.8fr));
  padding: 10px 12px;
}

.export-evidence-item strong,
.export-evidence-item span,
.export-evidence-item small {
  display: block;
}

.export-evidence-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-evidence-item span,
.export-evidence-item small {
  color: #64748b;
  font-size: 12px;
}

.order-compliance-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1.1fr) repeat(4, minmax(110px, 1fr));
  padding: 10px 12px;
}

.order-compliance-summary strong,
.order-compliance-summary small {
  display: block;
}

.order-compliance-summary strong {
  color: #172033;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-compliance-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 2px;
}

.order-billing-info-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.2fr) repeat(6, minmax(95px, 1fr));
  padding: 10px 12px;
}

.order-billing-info-summary strong,
.order-billing-info-summary small,
.order-billing-info-address strong,
.order-billing-info-address small {
  display: block;
}

.order-billing-info-summary strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-billing-info-summary small,
.order-billing-info-address small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 2px;
}

.order-billing-info-address {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 10px 12px;
}

.order-billing-info-address strong {
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
}

.order-compliance-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-compliance-parts span {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.order-compliance-parts span.ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.order-compliance-parts span.failed {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.compensation-lookup-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1.1fr) repeat(4, minmax(110px, 1fr));
  padding: 10px 12px;
}

.compensation-lookup-summary strong,
.compensation-lookup-summary small {
  display: block;
}

.compensation-lookup-summary strong {
  color: #172033;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compensation-lookup-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 2px;
}

.compensation-comment {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 14px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
  padding: 9px 11px;
  text-align: left;
}

.order-lookup-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-lookup-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 10px;
  place-items: center;
}

.order-lookup-summary strong {
  color: #172033;
  font-size: 16px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-lookup-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.order-lookup-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.order-lookup-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(120px, 0.8fr));
  padding: 10px 12px;
}

.order-lookup-item strong,
.order-lookup-item span,
.order-lookup-item small {
  display: block;
}

.order-lookup-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-lookup-item span,
.order-lookup-item small {
  color: #64748b;
  font-size: 12px;
}

.post-sale-messages-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(95px, 1fr));
}

.post-sale-messages-summary span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  min-height: 52px;
  place-items: center;
  text-align: center;
}

.post-sale-messages-summary strong {
  color: #172033;
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-sale-messages-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.post-sale-messages-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.post-sale-message-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.35fr) minmax(160px, 0.8fr);
  padding: 10px 12px;
}

.post-sale-message-item strong,
.post-sale-message-item span,
.post-sale-message-item small {
  display: block;
}

.post-sale-message-item strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-sale-message-item span,
.post-sale-message-item small {
  color: #64748b;
  font-size: 12px;
}

.post-sale-message-text strong {
  white-space: normal;
}

.shipment-lookup-summary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1.2fr) repeat(4, minmax(120px, 1fr));
  padding: 10px 12px;
}

.shipment-lookup-summary strong,
.shipment-lookup-summary small {
  display: block;
}

.shipment-lookup-summary strong {
  color: #172033;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-lookup-summary small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.shipment-lookup-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shipment-lookup-parts span {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.shipment-lookup-parts span.ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.shipment-lookup-parts span.failed {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.shipment-lookup-json {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
  max-height: 240px;
  overflow: auto;
  padding: 12px;
  text-align: left;
  white-space: pre-wrap;
}

.automation-log-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.automation-log-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.25fr) minmax(250px, 1fr) minmax(145px, 0.55fr) minmax(92px, auto);
  padding: 10px 12px;
}

.automation-log-item.success,
.automation-log-item.ok,
.automation-log-item.completed {
  border-color: rgba(34, 197, 94, 0.24);
}

.automation-log-item.error,
.automation-log-item.failed {
  border-color: rgba(239, 68, 68, 0.24);
}

.automation-log-item.running,
.automation-log-item.started {
  border-color: rgba(59, 130, 246, 0.24);
}

.automation-log-main strong,
.automation-log-main span {
  display: block;
}

.automation-log-main strong {
  color: #172033;
  font-size: 13px;
}

.automation-log-main span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.automation-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.automation-log-meta span {
  background: rgba(15, 23, 42, 0.05);
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 7px;
}

.automation-log-time {
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.automation-log-link {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 999px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  text-align: center;
  text-decoration: none;
}

.automation-log-artifact {
  color: #94a3b8;
  display: block;
  font-size: 11px;
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-history-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.shipment-history-head strong {
  color: #172033;
  font-size: 15px;
}

.shipment-history-head .status {
  margin: 0;
  text-align: right;
}

.shipment-history-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.shipment-history-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.25fr) minmax(160px, 0.85fr) minmax(150px, 0.7fr) minmax(130px, auto);
  padding: 10px 12px;
}

.shipment-history-item strong,
.shipment-history-item span {
  display: block;
}

.shipment-history-item strong {
  color: #172033;
  font-size: 13px;
}

.shipment-history-item span,
.shipment-history-time {
  color: #64748b;
  font-size: 12px;
}

.shipment-history-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.shipment-history-metrics span {
  background: rgba(59, 130, 246, 0.08);
  border-radius: 999px;
  color: #2563eb;
  font-weight: 900;
  padding: 4px 8px;
}

.shipment-history-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.shipment-history-actions .small {
  min-height: 30px;
  padding: 5px 10px;
}

.shipment-history-item.success {
  border-color: rgba(34, 197, 94, 0.24);
}

.shipment-history-item.failed {
  border-color: rgba(239, 68, 68, 0.24);
}

.shipment-history-item.pending,
.shipment-history-item.running {
  border-color: rgba(59, 130, 246, 0.24);
}

.shipment-history-item p {
  grid-column: 1 / -1;
  margin: 0;
  text-align: left;
}

@media (max-width: 1280px) {
  .shipment-store-strip {
    grid-template-columns: minmax(280px, 1fr) minmax(240px, 0.8fr);
  }

  .shipment-store-strip .status,
  .shipment-store-strip button {
    grid-column: auto;
  }

  .one-click-wide-card .one-click-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .one-click-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .shipment-top-panel .compact-head,
  .one-click-record-panel .compact-head,
  .one-click-wide-card .one-click-head,
  .shipment-console-stack .shipment-console-main .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-store-strip,
  .one-click-wide-card .one-click-grid,
  .one-click-wide-card .one-click-options,
  .one-click-actions,
  .shipment-console-stack .row-actions,
  .one-click-record-panel .one-click-snapshot {
    grid-template-columns: 1fr;
  }

  .shipment-history-item {
    grid-template-columns: 1fr;
  }

  .preflight-lists,
  .preflight-scoreboard {
    grid-template-columns: 1fr;
  }

  .automation-log-actions,
  .billing-order-actions,
  .claim-lookup-actions,
  .claims-search-actions,
  .dispatch-preferences-actions,
  .export-evidence-actions,
  .fulfillment-stock-actions,
  .order-billing-info-actions,
  .order-compliance-actions,
  .post-sale-messages-actions,
  .shipment-label-download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .automation-log-actions input,
  .billing-order-actions input,
  .billing-order-actions textarea,
  .claim-lookup-actions input,
  .claims-search-actions input,
  .claims-search-actions select,
  .export-evidence-actions input,
  .export-evidence-actions select,
  .fulfillment-stock-actions input,
  .fulfillment-stock-actions select,
  .order-billing-info-actions input,
  .order-compliance-actions input:not([type]),
  .order-compliance-actions input[type="text"],
  .post-sale-messages-actions input,
  .post-sale-messages-actions select,
  .shipment-label-download-actions input,
  .shipment-label-download-actions textarea {
    width: 100%;
  }

  .export-evidence-item,
  .export-evidence-summary,
  .claim-lookup-metrics,
  .claim-lookup-summary,
  .claims-search-item,
  .claims-search-summary,
  .fulfillment-stock-item,
  .fulfillment-stock-summary,
  .order-billing-info-summary,
  .post-sale-message-item,
  .post-sale-messages-summary,
  .billing-order-item,
  .billing-order-summary,
  .dispatch-preferences-item,
  .dispatch-preferences-summary {
    grid-template-columns: 1fr;
  }

  .automation-log-item {
    grid-template-columns: 1fr;
  }

  .shipment-history-actions,
  .shipment-history-metrics {
    justify-content: flex-start;
  }
}

/* Shipment v3: store selector lives in the fixed hero slot, no separate store-check card. */
.hero {
  position: relative;
}

.shipment-store-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 4px;
  margin-left: auto;
  min-width: 285px;
  padding: 9px 12px;
}

.shipment-store-badge span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.shipment-store-badge select {
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  min-height: 28px;
  padding: 0 24px 0 8px;
  text-align: center;
  text-align-last: center;
}

.shipment-store-badge select:focus {
  box-shadow: none;
}

.shipment-store-badge.hidden {
  display: none;
}

.hero .shipment-store-badge + .back-link {
  margin-left: 18px;
}

.shipment-console-stack {
  gap: 18px;
}

.one-click-wide-card {
  margin-top: 0;
}

.one-click-wide-card .one-click-options,
.one-click-wide-card input[type="hidden"] {
  display: none !important;
}

.one-click-actions {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.one-click-actions #oneClickRun {
  background: #1687f7;
  color: #fff;
}

.one-click-actions button {
  min-height: 54px;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .shipment-store-badge {
    order: 3;
    width: 100%;
  }

  .hero .shipment-store-badge + .back-link {
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  .one-click-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shipment table compact header + glass copy icon. */
.shipment-console-stack .shipment-console-main.panel {
  gap: 8px;
  padding: 16px 22px 18px;
}

.shipment-console-stack .shipment-console-main .panel-head {
  align-items: center;
  gap: 14px;
  min-height: 0;
}

.shipment-console-stack .shipment-console-main .panel-head > div:first-child {
  min-width: 360px;
}

.shipment-console-stack .shipment-console-main .eyebrow {
  font-size: 12px;
  line-height: 1;
  margin-bottom: 4px;
}

.shipment-title-line {
  align-items: center;
  display: flex;
  gap: 10px;
}

.shipment-title-line h2 {
  line-height: 1;
  margin: 0;
}

.shipment-console-stack .shipment-console-main .panel-head p:not(.eyebrow) {
  font-size: 15px;
  line-height: 1.25;
  margin: 8px 0 0;
}

.ios-icon-button {
  align-items: center;
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(232, 244, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #0b63ce;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  width: 38px;
}

.ios-icon-button:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.shipment-console-stack .row-actions {
  flex: 0 0 min(100%, 700px);
  gap: 10px;
  grid-template-columns: repeat(5, minmax(108px, 1fr));
}

.shipment-console-stack .row-actions button {
  min-height: 42px;
  padding: 8px 12px;
}

.shipment-console-stack #shipmentJobStatus:empty {
  display: none;
}

.shipment-console-stack #shipmentJobStatus {
  margin: 0;
  min-height: 0;
}

.shipment-console-stack .shipment-grid-shell {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .shipment-console-stack .shipment-console-main .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-console-stack .shipment-console-main .panel-head > div:first-child {
    min-width: 0;
  }
}

/* Shipment sticky table header: tabs scroll away, table header owns the top slot. */
.tabs-card {
  position: static;
  top: auto;
  z-index: auto;
}

.shipment-console-stack .shipment-grid-shell {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.shipment-console-stack .editable-grid th {
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  background: rgba(244, 247, 251, 0.92);
  position: sticky;
  top: 0;
  z-index: 30;
}

.shipment-console-stack .editable-grid thead {
  position: relative;
  z-index: 30;
}

.shipment-console-stack .table-shell {
  overflow: visible;
}

.shipment-console-stack .shipment-console-main.panel {
  overflow: visible;
}

/* Shipment table v4: new column order, merged shipment fields, and box-label settings. */
.shipment-label-settings-panel {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
}

.shipment-label-settings-panel .compact-head {
  margin-bottom: 0;
}

.shipment-label-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.shipment-label-settings-grid input,
.shipment-label-settings-grid select {
  min-height: 46px;
  text-align: center;
  text-align-last: center;
}

.shipment-console-stack .editable-grid {
  min-width: 1480px;
}

.shipment-console-stack .editable-grid th:nth-child(1),
.shipment-console-stack .editable-grid td:nth-child(1) {
  width: 52px;
}

.shipment-console-stack .editable-grid th:nth-child(2),
.shipment-console-stack .editable-grid td:nth-child(2) {
  width: 130px;
}

.shipment-console-stack .editable-grid th:nth-child(3),
.shipment-console-stack .editable-grid td:nth-child(3),
.shipment-console-stack .editable-grid th:nth-child(4),
.shipment-console-stack .editable-grid td:nth-child(4),
.shipment-console-stack .editable-grid th:nth-child(5),
.shipment-console-stack .editable-grid td:nth-child(5) {
  width: 90px;
}

.shipment-console-stack .editable-grid th:nth-child(6),
.shipment-console-stack .editable-grid td:nth-child(6),
.shipment-console-stack .editable-grid th:nth-child(7),
.shipment-console-stack .editable-grid td:nth-child(7),
.shipment-console-stack .editable-grid th:nth-child(10),
.shipment-console-stack .editable-grid td:nth-child(10) {
  width: 120px;
}

.shipment-console-stack .editable-grid th:nth-child(8),
.shipment-console-stack .editable-grid td:nth-child(8),
.shipment-console-stack .editable-grid th:nth-child(9),
.shipment-console-stack .editable-grid td:nth-child(9) {
  width: 190px;
}

.shipment-console-stack .editable-grid th:nth-child(11),
.shipment-console-stack .editable-grid td:nth-child(11),
.shipment-console-stack .editable-grid th:nth-child(12),
.shipment-console-stack .editable-grid td:nth-child(12) {
  width: 110px;
}

.box-label-cell {
  cursor: pointer;
}

.box-label-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-width: 78px;
  padding: 8px 12px;
}

.box-label-chip.ready {
  background: #e8f3ff;
  border-color: #bfdbfe;
  color: #0b63ce;
}

/* Shipment table responsive fit: keep the 操作 column visible and never clip feedback text. */
.shipment-console-stack .shipment-grid-shell {
  max-width: 100%;
  overflow-x: hidden;
}

.shipment-console-stack .editable-grid {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.shipment-console-stack .editable-grid th,
.shipment-console-stack .editable-grid td {
  box-sizing: border-box;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: clamp(8px, 0.55vw, 12px) clamp(5px, 0.5vw, 10px);
  text-align: center;
  text-overflow: clip;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.shipment-console-stack .editable-grid tbody tr {
  height: auto;
  min-height: 54px;
}

.shipment-console-stack .editable-grid td .editable-cell-content {
  -webkit-line-clamp: initial;
  align-items: center;
  display: flex;
  justify-content: center;
  line-height: 1.35;
  max-height: none;
  min-height: 34px;
  overflow: visible;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.shipment-console-stack .editable-grid .feedback-cell .editable-cell-content {
  font-size: clamp(12px, 0.82vw, 14px);
  line-height: 1.35;
  min-height: 58px;
  padding: 2px 0;
}

.shipment-console-stack .editable-grid th:nth-child(1),
.shipment-console-stack .editable-grid td:nth-child(1) {
  width: 3%;
}

.shipment-console-stack .editable-grid .row-number-cell {
  color: #64748b;
  font-size: clamp(12px, 0.82vw, 14px);
  font-weight: 900;
}

.shipment-console-stack .editable-grid th:nth-child(2),
.shipment-console-stack .editable-grid td:nth-child(2) {
  width: 7.4%;
}

.shipment-console-stack .editable-grid th:nth-child(3),
.shipment-console-stack .editable-grid td:nth-child(3),
.shipment-console-stack .editable-grid th:nth-child(4),
.shipment-console-stack .editable-grid td:nth-child(4),
.shipment-console-stack .editable-grid th:nth-child(5),
.shipment-console-stack .editable-grid td:nth-child(5) {
  width: 5.1%;
}

.shipment-console-stack .editable-grid th:nth-child(6),
.shipment-console-stack .editable-grid td:nth-child(6),
.shipment-console-stack .editable-grid th:nth-child(7),
.shipment-console-stack .editable-grid td:nth-child(7) {
  width: 7.1%;
}

.shipment-console-stack .editable-grid th:nth-child(8),
.shipment-console-stack .editable-grid td:nth-child(8) {
  width: 6.3%;
}

.shipment-console-stack .editable-grid th:nth-child(9),
.shipment-console-stack .editable-grid td:nth-child(9) {
  width: 6.4%;
}

.shipment-console-stack .editable-grid th:nth-child(10),
.shipment-console-stack .editable-grid td:nth-child(10) {
  width: 7.1%;
}

.shipment-console-stack .editable-grid th:nth-child(11),
.shipment-console-stack .editable-grid td:nth-child(11) {
  width: 14.2%;
}

.shipment-console-stack .editable-grid th:nth-child(12),
.shipment-console-stack .editable-grid td:nth-child(12) {
  width: 6.7%;
}

.shipment-console-stack .editable-grid th:nth-child(13),
.shipment-console-stack .editable-grid td:nth-child(13) {
  width: 6.7%;
}

.shipment-console-stack .editable-grid th:nth-child(14),
.shipment-console-stack .editable-grid td:nth-child(14) {
  width: 6.5%;
}

.shipment-console-stack .editable-grid .box-label-chip {
  min-width: 0;
  padding: 8px clamp(8px, 0.7vw, 12px);
  width: min(100%, 92px);
}

.shipment-console-stack .editable-grid .danger.small {
  min-width: 0;
  padding-left: clamp(8px, 0.7vw, 14px);
  padding-right: clamp(8px, 0.7vw, 14px);
  width: min(100%, 74px);
}

@media (max-width: 1200px) {
  .shipment-console-stack .editable-grid {
    font-size: 12px;
  }

  .shipment-console-stack .editable-grid th,
  .shipment-console-stack .editable-grid td {
    padding-left: 4px;
    padding-right: 4px;
  }

  .shipment-console-stack .editable-grid .feedback-cell .editable-cell-content {
    font-size: 11px;
  }
}

@media (max-width: 1180px) {
  .shipment-label-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shipment-label-settings-grid {
    grid-template-columns: 1fr;
  }
}

.shipment-preflight-panel {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  padding: 11px;
}

.shipment-preflight-panel.blocked {
  border-color: rgba(239, 68, 68, 0.22);
}

.shipment-preflight-panel.warning {
  border-color: rgba(245, 158, 11, 0.24);
}

.shipment-preflight-panel.ready {
  border-color: rgba(34, 197, 94, 0.22);
}

.preflight-scoreboard {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preflight-scoreboard span {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  display: grid;
  min-height: 48px;
  place-items: center;
}

.preflight-scoreboard strong {
  color: #172033;
  font-size: 17px;
}

.preflight-scoreboard small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.preflight-lists {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preflight-list {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
  padding: 9px;
}

.preflight-list.blocker {
  border-color: rgba(239, 68, 68, 0.18);
}

.preflight-list.warning {
  border-color: rgba(245, 158, 11, 0.18);
}

.preflight-list.suggestion {
  border-color: rgba(59, 130, 246, 0.16);
}

.preflight-list strong {
  color: #172033;
  font-size: 13px;
}

.preflight-list p,
.preflight-list small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

.preflight-list p span {
  color: #172033;
  font-weight: 900;
  margin-right: 6px;
}

.sku-mapping-shell {
  max-height: 300px;
  overflow: auto;
}

.sku-mapping-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}

.sku-mapping-table th,
.sku-mapping-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  height: 38px;
  overflow: hidden;
  padding: 6px 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-mapping-table th {
  background: rgba(244, 247, 251, 0.92);
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sku-mapping-table th:nth-child(1),
.sku-mapping-table td:nth-child(1) {
  width: 64px;
}

.sku-mapping-table th:nth-child(5),
.sku-mapping-table td:nth-child(5) {
  width: 92px;
}

.sku-mapping-table th:nth-child(6),
.sku-mapping-table td:nth-child(6) {
  width: 132px;
}

.sku-mapping-table .sku-thumb {
  height: 30px;
  width: 30px;
}

.sku-full-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: center;
  min-width: 58px;
  padding: 4px 8px;
}

.sku-full-pill.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.sku-full-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.sku-row-action {
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
  padding: 4px 8px;
}

.sku-row-action + .sku-row-action {
  margin-left: 4px;
}

.sku-row-action.danger-text {
  color: #dc2626;
}

.shipment-inventory-panel {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.shipment-inventory-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.shipment-inventory-head strong,
.shipment-inventory-head small {
  display: block;
}

.shipment-inventory-head strong {
  color: #172033;
  font-size: 15px;
}

.shipment-inventory-head small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.shipment-inventory-head .status {
  margin: 0;
  text-align: right;
}

.shipment-inventory-shell {
  max-height: 240px;
  overflow: auto;
}

.shipment-inventory-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}

.shipment-inventory-table th,
.shipment-inventory-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12px;
  height: 34px;
  overflow: hidden;
  padding: 5px 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-inventory-table th {
  background: rgba(244, 247, 251, 0.94);
  color: #64748b;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 2;
}

.shipment-inventory-table th:nth-child(3),
.shipment-inventory-table td:nth-child(3),
.shipment-inventory-table th:nth-child(4),
.shipment-inventory-table td:nth-child(4) {
  width: 82px;
}

.shipment-inventory-table th:nth-child(5),
.shipment-inventory-table td:nth-child(5) {
  text-align: left;
  width: 42%;
}

.inventory-qty {
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
}

.inventory-qty.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.inventory-qty.warn {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.muted-cell {
  color: #94a3b8;
  font-weight: 800;
  text-align: center !important;
}

@media (max-width: 980px) {

  .shipment-inventory-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-inventory-head .status {
    text-align: left;
  }
}
