:root {
  --sider: #001529;
  --sider-hover: #000c17;
  --sider-active: #1677ff;
  --header: #001529;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e8e8e8;
  --text: #262626;
  --muted: #8c8c8c;
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --danger: #ff4d4f;
  --ok: #52c41a;
  --table-head: #fafafa;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sider {
  position: relative;
  z-index: 30;
  width: 220px;
  flex-shrink: 0;
  background: var(--sider);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.logo {
  height: auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  border-bottom: none;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--sider-active);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  white-space: normal;
}

.menu {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-group {
  padding: 10px 12px 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.menu-item.active {
  background: var(--sider-active);
  color: #fff;
}

.mi {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.main {
  position: relative;
  z-index: 20;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.topbar {
  position: relative;
  z-index: 40;
  height: 48px;
  flex-shrink: 0;
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar .status-dot {
  color: rgba(255, 255, 255, 0.65);
}

.topbar .status-dot.ok {
  color: #73d13d;
}

.topbar .status-dot.bad {
  color: #ff7875;
}

.page-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
  min-height: 36px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  padding: 0 8px;
}

.page-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 14px;
  border: none;
  border-right: 1px solid #f0f0f0;
  background: transparent;
  color: #262626;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.page-tab:hover {
  background: #fafafa;
}

.page-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.page-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--primary);
}

.page-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #bfbfbf;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.page-tab-close:hover {
  background: #f0f0f0;
  color: #595959;
}

.sider-top {
  padding: 14px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sider-top .logo {
  padding: 0 4px;
}

.shop-picker-wrap {
  position: relative;
  z-index: 50;
}

.shop-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 120px;
  max-width: 220px;
  height: 32px;
  padding: 0 10px 0 12px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.shop-picker-trigger:hover,
.shop-picker-wrap.open .shop-picker-trigger {
  background: rgba(255, 255, 255, 0.18);
}

.shop-picker-trigger-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #fff;
}

.shop-picker-caret {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.15s ease;
}

.shop-picker-wrap.open .shop-picker-caret {
  transform: rotate(180deg);
}

.shop-picker-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(420px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 72px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 60;
  color: #0f172a;
}

.shop-picker-dropdown[hidden] {
  display: none !important;
}

.shop-picker-arrow {
  position: absolute;
  top: -7px;
  left: 28px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(15, 23, 42, 0.06);
}

.shop-picker-body {
  padding: 14px 14px 6px;
  overflow: auto;
  max-height: min(520px, calc(100vh - 140px));
  border-radius: 8px 8px 0 0;
}

.shop-picker-section {
  margin-bottom: 14px;
}

.shop-picker-section-title {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.shop-picker-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.shop-picker-section-head .shop-picker-section-title {
  margin-bottom: 0;
}

.shop-picker-count {
  font-size: 12px;
  color: #64748b;
}

.shop-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-plat-chip,
.shop-site-chip {
  min-width: 88px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: default;
}

.shop-plat-chip.active,
.shop-site-chip.active {
  border-color: #1677ff;
  background: #e6f4ff;
  color: #1677ff;
  font-weight: 600;
}

.shop-picker-search {
  width: 100%;
  height: 34px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}

.shop-picker-search:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.shop-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shop-store-chip {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-store-chip:hover {
  border-color: #91caff;
}

.shop-store-chip.active {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
  font-weight: 600;
}

.shop-store-chip.select-all {
  font-weight: 600;
}

.shop-picker-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.status-dot {
  font-size: 12px;
  color: var(--muted);
}

.status-dot.ok {
  color: var(--ok);
}

.status-dot.bad {
  color: var(--danger);
}

.user-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel.hidden {
  display: none;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-table select.cluster-select {
  min-width: 220px;
  max-width: 320px;
  height: 28px;
  font-size: 12px;
}

.plan-table th.chk,
.plan-table td.chk {
  width: 36px;
  min-width: 36px;
  text-align: center;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 8px;
}

.plan-table td.chk input,
.plan-table th.chk input {
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
}

.plan-table select.mode-select,
.plan-table select.sku-select,
.plan-table select.plan-select,
.plan-table select.warehouse-select,
.plan-table select.timeslot-select,
.plan-table select.cargo-mode-select {
  min-width: 100px;
  height: 28px;
  font-size: 12px;
}

.plan-table select.warehouse-select {
  min-width: 180px;
  max-width: 280px;
}

.plan-table th.plan-wh-th {
  min-width: 12em;
  text-align: center;
  vertical-align: middle;
}

.plan-table .plan-th-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  margin: 0 auto;
  vertical-align: middle;
}

.plan-table .plan-th-inner > span {
  display: block;
  text-align: center;
}

.plan-table .plan-th-search-btn {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  margin: 0 0 0 4px;
  padding: 0 6px;
  height: 20px;
  font-size: 11px;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.plan-table .plan-th-search-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.plan-table .plan-th-search-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wh-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 24px;
  background: rgba(0, 0, 0, 0.38);
}

.wh-picker-overlay[hidden] {
  display: none;
}

.wh-picker-dialog {
  width: min(560px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.wh-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
  font-weight: 600;
  font-size: 15px;
}

.wh-picker-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8c8c8c;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.wh-picker-close:hover {
  background: #f5f5f5;
  color: #262626;
}

.wh-picker-input {
  margin: 0 14px 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
}

.wh-picker-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.wh-picker-hint {
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 12px;
}

.wh-picker-list {
  flex: 1;
  min-height: 180px;
  max-height: 52vh;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.wh-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.wh-picker-item:hover,
.wh-picker-item.active {
  background: #e6f4ff;
}

.wh-picker-item-name {
  font-size: 13px;
  color: var(--text);
}

.wh-picker-item-name mark {
  background: #fff1b8;
  color: inherit;
  padding: 0;
}

.wh-picker-item-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.wh-picker-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.pallet-split-popover {
  position: fixed;
  z-index: 1200;
  width: min(420px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  background: var(--panel, #fff);
  border: 1px solid var(--border, #d8dee4);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.pallet-split-popover[hidden] {
  display: none !important;
}

.pallet-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: var(--panel-2, #f8fafc);
}

.pallet-split-title {
  font-size: 14px;
  font-weight: 600;
}

.pallet-split-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
}

.pallet-split-close:hover {
  color: var(--text, #111);
}

.pallet-split-summary {
  padding: 8px 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.pallet-split-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.pallet-split-count-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.pallet-split-count {
  width: 56px;
  padding: 4px 6px;
  font-size: 13px;
}

.pallet-split-body {
  flex: 1;
  overflow: auto;
  padding: 0 12px 8px;
}

.pallet-split-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pallet-split-table th,
.pallet-split-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border, #eef2f7);
  text-align: left;
  vertical-align: middle;
}

.pallet-split-table th {
  color: var(--muted);
  font-weight: 500;
  position: sticky;
  top: 0;
  background: var(--panel, #fff);
}

.pallet-split-table--by-pallet .pallet-split-pno {
  width: 52px;
  white-space: nowrap;
  font-weight: 600;
}

.pallet-split-table--by-pallet .pallet-split-pcs {
  width: 64px;
  white-space: nowrap;
}

.pallet-split-boxes {
  width: 100%;
  min-width: 140px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text, #111);
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  box-sizing: border-box;
}

.pallet-split-boxes:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.pallet-split-row.is-empty .pallet-split-boxes {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pallet-split-msg {
  min-height: 18px;
  padding: 0 12px 4px;
  font-size: 12px;
  color: var(--danger, #c0392b);
}

.supply-cargo-places--pallet-edit {
  cursor: pointer;
  background: #f8fbff;
}

.supply-cargo-places--pallet-edit:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 0;
}

.pallet-split-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--panel-2, #f8fafc);
}

.plan-table select.timeslot-select {
  min-width: 200px;
  max-width: 320px;
}

.plan-table select.cargo-mode-select {
  min-width: 72px;
  max-width: 96px;
}

.plan-table .cargo-mode-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.supply-table select.cargo-mode-select,
.supply-table select.supply-cargo-mode {
  min-width: 72px;
  max-width: 96px;
  height: 28px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  text-align-last: center;
}

.supply-table .supply-cargo-mode-cell {
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.plan-table select.plan-select {
  min-width: 88px;
}

.plan-table td[rowspan] {
  vertical-align: middle;
  border-right: 1px solid var(--line);
}

.plan-table input.qty-input {
  width: 72px;
  height: 28px;
  text-align: center;
  font-size: 13px;
}

.plan-table .btn-del {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--danger);
  border-color: #ffccc7;
  background: #fff;
}

.plan-table .btn-del:hover {
  border-color: var(--danger);
  color: #cf1322;
}

.plan-table .order-no-link {
  color: #1677ff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}

.plan-table .order-no-link:hover {
  text-decoration: underline;
}

.plan-table .order-no-plain {
  color: #0f172a;
  font-weight: 600;
  cursor: default;
  user-select: text;
}

.plan-table .order-no-pending {
  color: #94a3b8;
}

.plan-table .app-no-text {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  max-width: 120px;
  word-break: break-all;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.records-batch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  background: var(--card);
}

.records-batch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.records-batch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.records-table th.chk,
.records-table td.chk {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}

.records-table td.records-box-nos {
  white-space: normal;
  word-break: break-all;
  max-width: 280px;
  line-height: 1.35;
}

.records-table td.chk input,
.records-table th.chk input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.records-batch-meta {
  font-size: 12px;
  color: var(--muted);
}

.records-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.prefs-wh-table {
  width: 100%;
  margin-top: 4px;
}

.prefs-wh-table.data-table {
  min-width: 640px;
}

.prefs-wh-table th,
.prefs-wh-table td {
  font-size: 12px;
  vertical-align: top;
  white-space: normal;
  text-align: left;
}

.prefs-wh-table th:first-child,
.prefs-wh-table td:first-child,
.prefs-wh-table .prefs-mode-tag {
  white-space: nowrap;
  vertical-align: middle;
}

.prefs-wh-table input[type="text"] {
  flex: 1 1 auto;
  min-width: 6em;
  width: auto;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  box-sizing: border-box;
}

.prefs-wh-table .prefs-mode-tag {
  color: var(--muted);
  white-space: nowrap;
}

.prefs-kw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prefs-kw-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prefs-kw-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.prefs-kw-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.prefs-kw-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.prefs-section-title {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.prefs-section-title:first-of-type {
  margin-top: 4px;
}

.prefs-row {
  align-items: end;
}

.prefs-provider-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.prefs-provider-item {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.prefs-provider-item:hover {
  color: var(--text);
}

.prefs-provider-item.is-active {
  color: var(--text);
  font-weight: 600;
}

.prefs-avoid-row {
  align-items: center;
  margin-top: 4px;
}

.prefs-timeslot-row {
  flex-wrap: wrap;
  align-items: end;
}

.prefs-avoid-field {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin-left: 0;
}

.prefs-weekday-checks {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px 12px;
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}

.prefs-weekday-checks label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.prefs-weekday-checks input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.prefs-row .field select,
.prefs-row .field input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}

.prefs-readonly {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.prefs-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.prefs-blacklist {
  margin-top: 8px;
  max-width: none;
  width: min(100%, 1100px);
}

.prefs-blacklist .prefs-kw-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 28em;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  box-sizing: border-box;
}

.prefs-actions {
  margin-top: 20px;
  align-items: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

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

.card-head .card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.records-datebar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.records-datebar select {
  min-width: 102px;
  height: 32px;
  cursor: pointer;
}

.records-daterange {
  display: flex;
  align-items: center;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 10px 0 8px;
  background: #fff;
  gap: 6px;
  cursor: pointer;
}

.records-daterange:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.records-cal-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: center / 15px 15px no-repeat
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238c8c8c' stroke-width='1.3'><rect x='2.2' y='3.4' width='11.6' height='10.4' rx='1.4'/><path d='M2.2 6.4h11.6M5.2 2.4v2.4M10.8 2.4v2.4'/></svg>");
}

.records-daterange input[type="date"] {
  border: none;
  height: 30px;
  padding: 0;
  width: 118px;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.records-daterange input[type="date"]:focus {
  border: none;
  box-shadow: none;
}

.records-daterange input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 100%;
  cursor: pointer;
}

.records-date-sep {
  color: var(--muted);
  font-size: 13px;
  flex: 0 0 auto;
}

.ai-analysis-body {
  min-height: 48px;
}

.demand-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.demand-split-main,
.demand-split-side {
  min-width: 0;
}

.booking-plan-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
}

.booking-plan-side-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.booking-plan-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.booking-plan-logistics {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-align: right;
  min-width: 0;
}

.booking-plan-logistics.unmatched {
  color: #d48806;
}

.booking-plan-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.booking-plan-table th,
.booking-plan-table td {
  white-space: nowrap;
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-plan-table th:nth-child(1),
.booking-plan-table td:nth-child(1) {
  width: 12%;
}
.booking-plan-table th:nth-child(2),
.booking-plan-table td:nth-child(2) {
  width: 14%;
}
.booking-plan-table th:nth-child(3),
.booking-plan-table td:nth-child(3) {
  width: 10%;
}
.booking-plan-table th:nth-child(4),
.booking-plan-table td:nth-child(4) {
  width: 18%;
}
.booking-plan-table th:nth-child(5),
.booking-plan-table td:nth-child(5),
.booking-plan-table th:nth-child(6),
.booking-plan-table td:nth-child(6) {
  width: 12%;
}
.booking-plan-table th:nth-child(7),
.booking-plan-table td:nth-child(7) {
  width: 22%;
}

.booking-plan-table th:nth-child(5),
.booking-plan-table th:nth-child(6),
.booking-plan-table td.num {
  text-align: center;
}

.booking-plan-table td.plan-order-cell,
.booking-plan-table td.plan-cluster-cell,
.booking-plan-table td.plan-mode-cell {
  color: var(--text);
  font-weight: 600;
  vertical-align: middle;
  text-align: center;
}

.booking-plan-table tr.booking-plan-order-start td.plan-order-cell,
.booking-plan-table tr.booking-plan-order-start td.plan-cluster-cell,
.booking-plan-table tr.booking-plan-order-start td.plan-mode-cell {
  color: var(--text);
  font-weight: 600;
}

.demand-table-wrap {
  position: relative;
}

.demand-table {
  width: 100%;
  border-collapse: collapse;
}

.demand-table th,
.demand-table td {
  white-space: nowrap;
  border: 1px solid var(--line);
}

.demand-table thead th {
  border-bottom: 1px solid var(--line);
}

.demand-table td.sku-cell {
  font-family: inherit;
}

.demand-table th:nth-child(6),
.demand-table th:nth-child(7),
.demand-table th:nth-child(8),
.demand-table th:nth-child(9),
.demand-table th:nth-child(10) {
  text-align: center;
}

.demand-table td.cluster-name-cell,
.demand-table td.bookable-cell,
.demand-table td.plan-qty-cell,
.demand-table td.plan-box-count-cell,
.demand-table td.plan-box-nos-cell {
  white-space: normal;
  vertical-align: middle;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 5.5em;
}

.demand-table td.plan-box-nos-cell {
  min-width: 7em;
}

.demand-table .cluster-qty-list {
  display: grid;
  gap: 2px 0;
  font-size: 12px;
  line-height: 1.45;
  justify-items: center;
}

.demand-table .cluster-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45em;
  width: 100%;
  text-align: center;
}

.demand-table .cluster-name-cell .cluster-qty-row {
  color: #000;
  font-weight: 400;
}

.demand-table .bookable-cell .cluster-qty-row {
  font-weight: 400;
  color: var(--text);
}

.demand-table td.bookable-cell {
  min-width: 8.5em;
}

.demand-table th.bookable-th {
  min-width: 8.5em;
  vertical-align: middle;
}

.demand-table .bookable-th-inner,
.demand-table .bookable-cell-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.demand-table .bookable-th-inner > span,
.demand-table .bookable-cell-inner > .cluster-qty-list,
.demand-table .bookable-cell-inner > .bookable-loading,
.demand-table .bookable-cell-inner > .muted {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.demand-table .bookable-th-inner .bookable-refresh-btn,
.demand-table .bookable-th-inner .bookable-stop-btn,
.demand-table .bookable-cell-inner .bookable-refresh-btn,
.demand-table .bookable-cell-inner .bookable-stop-btn {
  flex: 0 0 auto;
  margin-left: 4px;
}

.demand-table .bookable-cell-inner .cluster-qty-list {
  flex: 1 1 auto;
}

.demand-table .bookable-refresh-btn,
.demand-table .bookable-stop-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 1px 6px;
  height: 22px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.demand-table .bookable-refresh-btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.demand-table th .bookable-refresh-btn,
.demand-table th .bookable-stop-btn {
  font-weight: 400;
}

.demand-table .bookable-refresh-btn:hover:not(:disabled) {
  border-color: #0958d9;
  background: #0958d9;
  color: #fff;
}

.demand-table .bookable-stop-btn {
  border: 1px solid #ff4d4f;
  background: #fff;
  color: #ff4d4f;
}

.demand-table .bookable-stop-btn:hover:not(:disabled) {
  background: #fff1f0;
  border-color: #cf1322;
  color: #cf1322;
}

.demand-table .bookable-refresh-btn:disabled,
.demand-table .bookable-stop-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.demand-table .plan-qty-cell .cluster-qty-row,
.demand-table .plan-box-count-cell .cluster-qty-row,
.demand-table .plan-box-nos-cell .cluster-qty-row {
  font-weight: 600;
  color: var(--text);
}

.demand-table .plan-edit-row,
.demand-table .bookable-edit-row {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 4px;
  min-width: 1.5em;
  user-select: none;
}

.demand-table .plan-edit-row:hover,
.demand-table .bookable-edit-row:hover {
  background: color-mix(in srgb, var(--accent, #3b82f6) 12%, transparent);
}

.demand-table .bookable-edit-row {
  cursor: text;
}

.demand-table .bookable-edit-row.is-manual {
  font-weight: 600;
  color: var(--text);
}

.demand-table .plan-edit-input {
  width: 100%;
  max-width: 7.5em;
  box-sizing: border-box;
  font: inherit;
  font-size: 12px;
  text-align: center;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg, #fff);
  color: var(--text);
}

.demand-table .bookable-loading,
.demand-table .plan-qty-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(1.45em * 6);
  text-align: center;
  color: var(--muted);
}

.demand-table .muted {
  color: var(--muted);
}

.demand-table .ozon-stock-loading {
  color: var(--muted);
}

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

.rule {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  padding: 10px 12px;
}

.rule-k {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.rule-v {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.45;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.legend span {
  font-size: 11px;
  color: var(--muted);
  background: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.field > span em {
  color: var(--danger);
  font-style: normal;
  margin-left: 2px;
}

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

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-label {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 32px;
}

.search-bar-compact .search-input {
  flex: 0 0 auto;
  width: 240px;
  max-width: 40vw;
}

/* 运单号搜索：单行 + 批量面板（参照常见后台搜索） */
.track-search {
  position: relative;
  width: 100%;
  max-width: none;
}

.track-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.track-search-bar .track-input-group {
  position: relative;
  flex: 0 1 420px;
  max-width: 420px;
  min-width: 0;
}

.track-search-bar .track-input-wrap {
  width: 100%;
}

.track-search-meta {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding-left: 2px;
  overflow: visible;
}

.track-meta-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.track-meta-line:empty {
  display: none;
}

.track-meta-line:not(:empty) + .track-meta-line:not(:empty)::before {
  content: " · ";
  color: var(--muted);
}

.track-meta-line.error {
  color: var(--danger);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  flex: 1 1 100%;
  max-width: none;
  line-height: 1.45;
}

.track-type-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  min-width: 88px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px 0 0 6px;
  background: #fafafa;
  font: inherit;
  font-size: 14px;
  color: #1f2937;
  margin-right: -1px;
  z-index: 1;
  user-select: none;
  white-space: nowrap;
}

.track-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 0 6px 6px 0;
  background: #fff;
  overflow: hidden;
}

.track-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.track-single-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 8px 0 12px;
  font: inherit;
  font-size: 14px;
  background: transparent;
}

.track-icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.track-icon-btn:hover {
  color: var(--primary);
  background: #f5f8ff;
}

.track-sync-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.track-sync-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #1f2937;
}

.track-sync-btn:hover:not(:disabled) {
  background: #fafafa;
  border-color: #bfbfbf;
  color: #1f2937;
}

.track-search-bar .track-search-meta {
  flex: 1;
  margin-right: 0;
}

.track-batch-btn.active {
  color: var(--primary);
  background: #e6f4ff;
}

.track-batch-panel {
  position: absolute;
  /* 与上方输入框（含搜索/批量图标）同宽同左对齐 */
  left: 0;
  right: 0;
  width: 100%;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.track-batch-panel[hidden] {
  display: none !important;
}

.track-batch-textarea {
  width: 100%;
  height: 96px;
  min-height: 72px;
  max-height: 160px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2937;
}

.track-batch-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.track-batch-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.track-batch-foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-batch-search-btn {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: #fff !important;
}

.track-batch-search-btn:hover {
  background: #e6f4ff !important;
}

/* 申请号等：复用精确搜索样式 */
.exact-search {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.exact-search.cargo-search {
  max-width: none;
}

.exact-search.cargo-search .exact-search-bar {
  flex-wrap: nowrap;
  align-items: center;
}

.exact-search.cargo-search .exact-input-wrap {
  flex: 0 1 320px;
  max-width: 320px;
}

.exact-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.cargo-tip,
.form-status.cargo-tip {
  flex: 1 1 auto;
  min-width: 8em;
  max-width: 100%;
  margin: 0 !important;
  min-height: 0;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cargo-tip:not([hidden]),
.form-status.cargo-tip:not([hidden]) {
  display: block;
}

.exact-search-label {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.exact-input-wrap {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.exact-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.exact-single-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 8px 0 12px;
  font: inherit;
  font-size: 14px;
  background: transparent;
}

.exact-icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  color: #8c8c8c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.exact-icon-btn:hover {
  color: var(--primary);
  background: #f5f8ff;
}

.exact-batch-btn.active {
  color: var(--primary);
  background: #e6f4ff;
}

.exact-batch-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-width: 420px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exact-batch-panel[hidden] {
  display: none !important;
}

.exact-batch-textarea {
  width: 100%;
  min-height: 160px;
  max-height: 320px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: #1f2937;
}

.exact-batch-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.exact-batch-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exact-batch-foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exact-batch-search-btn {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: #fff !important;
}

.exact-batch-search-btn:hover {
  background: #e6f4ff !important;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.field > span {
  font-size: 12px;
  color: var(--muted);
}

.field.grow {
  flex: 1;
  min-width: 220px;
}

.field.narrow {
  width: 140px;
  min-width: 140px;
}

.field.actions {
  min-width: auto;
}

input,
select {
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 11px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
}

/* 仅文本类控件保留浅蓝焦点；勾选框/按钮点选后不留隐藏框 */
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="image"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

input[type="checkbox"],
input[type="radio"],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="file"],
button,
.btn,
.menu-item,
.col-filter-btn,
.supply-batch-btn,
.plan-step-btn {
  outline: none;
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible,
input[type="checkbox"]:active,
input[type="radio"]:focus,
input[type="radio"]:focus-visible,
input[type="radio"]:active,
input[type="button"]:focus,
input[type="button"]:focus-visible,
input[type="submit"]:focus,
input[type="submit"]:focus-visible,
input[type="reset"]:focus,
input[type="reset"]:focus-visible,
input[type="file"]:focus,
input[type="file"]:focus-visible,
button:focus,
button:focus-visible,
.btn:focus,
.btn:focus-visible,
.menu-item:focus,
.menu-item:focus-visible,
.col-filter-btn:focus,
.col-filter-btn:focus-visible,
.supply-batch-btn:focus,
.supply-batch-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.btn-group {
  display: flex;
  gap: 8px;
}

.btn {
  height: 32px;
  padding: 0 15px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn.danger {
  background: #fff;
  border-color: #ffa39e;
  color: #cf1322;
}

.btn.danger:hover:not(:disabled) {
  background: #fff1f0;
  border-color: #ff7875;
  color: #a8071a;
}

.btn.soft {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.soft:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn.track-search-btn {
  flex: 0 0 auto;
  height: 36px;
  min-width: 72px;
  padding: 0 16px;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.track-search-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn.track-sync-btn {
  flex: 0 0 auto;
  height: 36px;
  margin-left: 0;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #1f2937;
}

.btn.track-sync-btn:hover:not(:disabled) {
  background: #fafafa;
  border-color: #bfbfbf;
  color: #1f2937;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.form-status {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
}

.form-status.error {
  color: var(--danger);
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  background: var(--table-head);
  color: rgba(0, 0, 0, 0.88);
  font-weight: 600;
}

.data-table th.num,
.data-table td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover td {
  background: #fafafa;
}

.packing-scroll {
  --packing-row-h: 36px;
  --pack-col: 96px; /* SKU / 店铺 / 总箱数 / 总数量 / 箱三列 同宽 */
  --pack-boxno: var(--pack-col);
  --pack-size: var(--pack-col);
  --pack-perbox: var(--pack-col);
  --pack-sb: 12px; /* 与箱明细滚动条占位对齐 */
  overflow: auto;
}

.packing-tracks {
  display: block;
}

.packing-table {
  min-width: 980px;
  width: 100%;
  table-layout: fixed;
}

.packing-head-only {
  border-bottom: none;
}

.packing-table .col-chk { width: 36px; }
.packing-table .col-track,
.packing-table .col-name { width: 160px; }
.packing-table .col-logistics { width: 128px; }
.packing-table .col-pic { width: 56px; }
.packing-table .col-sku,
.packing-table .col-store,
.packing-table .col-boxes,
.packing-table .col-qty,
.packing-table .col-boxno,
.packing-table .col-size {
  width: var(--pack-col);
}
/* 表头末列含滚动条槽，保证与下方三列竖线对齐 */
.packing-table .col-perbox { width: calc(var(--pack-col) + var(--pack-sb)); }

.packing-table th,
.packing-table td {
  padding: 4px 8px;
  height: var(--packing-row-h);
  box-sizing: border-box;
  vertical-align: middle;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  border-right: 1px solid var(--line);
}

.packing-table thead th {
  background: var(--table-head);
  box-shadow: inset 0 -1px 0 var(--line);
}

.packing-head-only thead th:last-child {
  border-right: none;
}

.packing-table th.chk,
.packing-table td.chk {
  padding-left: 8px;
  padding-right: 8px;
}

.packing-table td.pic img,
.packing-table .pic-ph {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  background: #f5f5f5;
  border: 1px solid var(--line);
}

.packing-table td.pic img.pic-thumb {
  cursor: zoom-in;
}

.pic-preview {
  position: fixed;
  z-index: 1200;
  min-width: 96px;
  min-height: 72px;
  max-width: min(340px, calc(100vw - 24px));
  max-height: min(340px, calc(100vh - 24px));
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
}

.pic-preview img {
  display: block;
  max-width: min(320px, calc(100vw - 40px));
  max-height: min(320px, calc(100vh - 40px));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: auto;
  -webkit-user-drag: auto;
  cursor: default;
}

.pic-preview-loading {
  min-width: 120px;
  padding: 28px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.packing-table td.track {
  font-weight: 600;
}

.packing-table td.track .cell-main,
.packing-table td.track .cell-sub {
  text-align: center;
}

.packing-table td.track .cell-main {
  font-weight: 600;
}

.packing-table td.track .cell-sub {
  font-weight: 400;
  margin-top: 2px;
  word-break: break-all;
}

.packing-table td.logistics {
  text-align: center;
  white-space: nowrap;
}

.packing-table td.logistics .logistics-unmatched {
  color: var(--muted);
}

.packing-table td.pack-edit-cell {
  padding: 4px 6px;
}

.packing-table input.pack-edit {
  width: 100%;
  height: 28px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 6px;
  font: inherit;
  font-size: 0.82rem;
  text-align: center;
  background: #fff;
}

.packing-table input.pack-edit:focus {
  outline: none;
  border-color: var(--primary);
}

.packing-table td.name {
  text-align: center;
  word-break: break-word;
}

.cell-main {
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}

.cell-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.packing-table .cell-main,
.packing-table .cell-sub {
  text-align: center;
}

.packing-table td.packed,
.packing-table td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.packing-table td.packed {
  color: #389e0d;
  font-weight: 600;
}

.packing-table td[rowspan] {
  vertical-align: middle;
  text-align: center;
  height: auto;
}

/* 仅箱号 / 尺寸 / 单箱数量 三列滚动，每运单最多显示 5 行 */
.packing-table td.box-scroll-cell {
  padding: 0 !important;
  height: auto;
  vertical-align: top;
  /* 左侧竖线由上一列 border-right 承担，避免嵌套表横线错位 */
  border-left: none;
  border-right: none;
}

.packing-box-scroll {
  max-height: calc(var(--packing-row-h) * 5);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.packing-box-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.packing-box-table .col-boxno { width: var(--pack-col); }
.packing-box-table .col-size { width: var(--pack-col); }
.packing-box-table .col-perbox { width: var(--pack-col); }

.packing-box-table td {
  padding: 4px 8px;
  height: var(--packing-row-h);
  max-height: var(--packing-row-h);
  box-sizing: border-box;
  vertical-align: middle;
  text-align: center;
  line-height: 1.25;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 13px;
}

.packing-box-table td:last-child {
  border-right: none;
}

.packing-box-table tr:last-child td {
  border-bottom: none;
}

.packing-box-table td.num {
  font-variant-numeric: tabular-nums;
}

.packing-table .box-tag,
.packing-box-table .box-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto;
  color: var(--text);
}

.box-tag::before {
  content: "";
  width: 12px;
  height: 10px;
  border-radius: 2px;
  background: #ffd591;
  border: 1px solid #ffa940;
  flex-shrink: 0;
}

.meta {
  margin: 0;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(0, 0, 0, 0.75);
}

.supply-table {
  min-width: 1280px;
}

.supply-filter-hint {
  margin-left: 0.5rem;
  font-size: 0.85rem;
}

.th-with-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 100%;
}

.col-filter-btn {
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.col-filter-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.col-filter-btn.active {
  color: #1677ff;
  background: #e6f4ff;
  font-weight: 700;
}

.col-filter-btn.col-filter-text {
  font-size: 12px;
  padding: 0;
  line-height: 1.2;
  color: #64748b;
  background: transparent;
}

.col-filter-btn.col-filter-text:hover {
  color: #1677ff;
  background: transparent;
}

.col-filter-btn.col-filter-text.active {
  color: #1677ff;
  background: transparent;
  font-weight: 600;
}

.supply-vehicle-th {
  position: relative;
  overflow: visible !important;
  z-index: 5;
  text-align: center;
  vertical-align: middle;
}

.supply-vehicle-head {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.2;
  vertical-align: middle;
}

.supply-vehicle-head .th-with-filter {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  padding-right: 0;
}

.supply-vehicle-head .th-with-filter > span {
  display: block;
  text-align: center;
}

.supply-vehicle-head .col-filter-btn {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 1px;
}

.supply-vehicle-head .supply-vehicle-dd {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
}

.supply-col-filter-panel {
  position: fixed;
  width: 280px;
  max-height: min(420px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  text-align: left;
}

.supply-col-filter-panel[hidden] {
  display: none !important;
}

.supply-col-filter-search {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
}

.supply-col-filter-tools {
  display: flex;
  gap: 6px;
}

.supply-col-filter-tools .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.supply-col-filter-list {
  overflow: auto;
  max-height: 260px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px;
}

.supply-col-filter-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
}

.supply-col-filter-item:hover {
  background: #f8fafc;
}

.supply-col-filter-item input {
  margin-top: 2px;
  flex-shrink: 0;
}

.supply-col-filter-item span {
  overflow: hidden;
  word-break: break-word;
}

.supply-col-filter-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.supply-col-filter-foot .btn {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.supply-table th,
.supply-table td {
  text-align: center;
  vertical-align: middle;
}

.supply-table .cell-main,
.supply-table .cell-sub {
  text-align: center;
}

.supply-table td .cell-main,
.supply-table td .cell-sub {
  display: block;
  width: 100%;
}

.supply-table .empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.supply-batch-bar {
  display: none;
}

.supply-table th.chk,
.supply-table td.chk {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}

.supply-table th.supply-track-th,
.supply-table td.supply-track-cell {
  min-width: 132px;
  max-width: 200px;
  vertical-align: middle;
}

.supply-table .supply-track-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.supply-table .supply-track-line {
  font-size: 12px;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-all;
  text-align: center;
}

.supply-table td.chk input,
.supply-table th.chk input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.supply-vehicle-dd {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.supply-vehicle-dd-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1.2;
  border-radius: 0;
}

.supply-vehicle-dd-btn:hover,
.supply-vehicle-dd.open .supply-vehicle-dd-btn {
  color: #1677ff;
  background: transparent;
}

.supply-batch-btn {
  border: none;
  background: #1677ff;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.supply-batch-btn:hover,
.supply-vehicle-dd.open .supply-batch-btn {
  background: #0958d9;
  color: #fff;
}

.supply-vehicle-dd-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  text-align: left;
  z-index: 30;
}

.supply-vehicle-dd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.supply-vehicle-dd-grid input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  box-sizing: border-box;
}

.supply-vehicle-dd-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.supply-condition-cell {
  min-width: 180px;
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  vertical-align: middle;
}

.supply-condition-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 260px;
  margin: 0 auto;
}

.supply-condition-cell .supply-address {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
}

.supply-table td {
  white-space: normal;
  vertical-align: middle;
  overflow: hidden;
}

.supply-table .supply-slot-cell,
.supply-table .supply-delivery-cell,
.supply-table .supply-deadline-cell,
.supply-table .supply-vehicle-td {
  text-align: center;
  vertical-align: middle;
}

.supply-table .supply-dl-cell,
.supply-table .supply-actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  padding: 8px 8px;
}

.supply-dl-btns,
.supply-actions-btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.supply-table .supply-dl-cell .btn,
.supply-table .supply-actions-btns .btn {
  height: 32px;
  min-width: 64px;
  padding: 0 12px;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 30px;
  white-space: nowrap;
}

.supply-table .supply-detail-xlsx-row:disabled,
.supply-table .supply-labels-row:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: #fff;
  border-color: #d9d9d9;
  color: #1f2937;
}

.supply-actions-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.supply-table .supply-slot-select {
  min-width: 190px;
  max-width: 240px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  font: inherit;
  background: #fff;
  text-align: center;
  text-align-last: center;
  margin: 0 auto;
  display: inline-block;
  vertical-align: middle;
}

.supply-table .supply-slot-select option {
  text-align: left;
}

.supply-table .supply-slot-readonly {
  display: inline-block;
  min-width: 190px;
  max-width: 240px;
  padding: 0.35rem 0.45rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  text-align: center;
  line-height: 1.35;
  margin: 0 auto;
  vertical-align: middle;
}

.state-tag.state-ready {
  background: #f6ffed;
  border-color: #b7eb8f;
  color: #389e0d;
}

.supply-vehicle-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 220px;
  box-sizing: border-box;
  margin: 0 auto;
  align-content: center;
}

.supply-vehicle-cell input {
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 6px;
  font: inherit;
  font-size: 12px;
  background: #fff;
  text-align: center;
}

.supply-sku-cell,
.supply-qty-cell,
.supply-places-cell,
.supply-expiry-cell {
  text-align: center;
  vertical-align: middle;
}

.supply-sku-cell {
  min-width: 120px;
  max-width: 200px;
}

.supply-qty-cell,
.supply-places-cell,
.supply-expiry-cell {
  min-width: 88px;
  width: 96px;
}

.supply-expiry-cell {
  min-width: 118px;
  width: 128px;
}

.supply-expiry-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  margin: 0 auto;
  width: 100%;
}

.supply-product-expiry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  font-size: 0.82rem;
  color: var(--text);
}

.supply-expiry-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.supply-expiry-list .supply-sku-expiry,
.supply-product-expiry {
  width: 108px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 6px;
  font: inherit;
  font-size: 0.82rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #fff;
}

.supply-expiry-wrap {
  position: relative;
  width: 138px;
  height: 34px;
  display: inline-block;
}

.supply-expiry-list .supply-sku-expiry {
  display: inline-block;
  width: 138px;
  padding: 0 4px;
}

.supply-expiry-wrap .supply-sku-expiry {
  width: 100%;
  height: 100%;
}

.supply-expiry-ph {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.82rem;
  pointer-events: none;
}

.supply-expiry-wrap.is-placeholder .supply-expiry-ph {
  display: flex;
}

.supply-expiry-wrap.is-placeholder .supply-sku-expiry {
  opacity: 0;
}

.supply-expiry-list .supply-product-expiry {
  border-color: transparent;
  background: transparent;
}

.supply-places-cell .supply-cargo-places {
  width: 76px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 6px;
  font: inherit;
  text-align: center;
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
}

.supply-places-cell .supply-cargo-places::-webkit-outer-spin-button,
.supply-places-cell .supply-cargo-places::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.supply-sku-list,
.supply-qty-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  margin: 0 auto;
  width: 100%;
}

.supply-product-sku {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 100%;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supply-product-qty,
.supply-qty-list .supply-sku-qty {
  width: 76px;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 6px;
  font: inherit;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #fff;
}

/* 去掉 number 上下箭头，避免误触改数量 */
.supply-qty-list .supply-sku-qty {
  -moz-appearance: textfield;
  appearance: textfield;
}
.supply-qty-list .supply-sku-qty::-webkit-outer-spin-button,
.supply-qty-list .supply-sku-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cargo-count-input {
  width: 4.2rem;
  text-align: center;
  padding: 0.2rem 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.cargo-count-input::-webkit-outer-spin-button,
.cargo-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cargo-track-input {
  width: 100%;
  min-width: 9rem;
  max-width: 12rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}

.cargo-track-text {
  font-size: 13px;
  color: #334155;
  word-break: break-all;
}

.cargo-track-line + .cargo-track-line {
  margin-top: 0.15rem;
}

.cargo-table th,
.cargo-table td {
  text-align: center;
  vertical-align: middle;
}

.cargo-table .cell-main,
.cargo-table .cell-sub {
  text-align: center;
}

.cargo-table th.chk,
.cargo-table td.chk {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}

.cargo-table td.chk input,
.cargo-table th.chk input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.cargo-table .cargo-detail-xlsx-row,
.cargo-table .cargo-labels-row {
  white-space: nowrap;
  height: 28px;
  padding: 0 10px;
}

.cargo-table th.cargo-dl-group,
.cargo-table td.cargo-dl-cell {
  width: 1%;
  white-space: nowrap;
  padding-left: 8px;
  padding-right: 8px;
}

.cargo-table .cargo-dl-btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.cargo-table .cargo-track-input {
  display: inline-block;
  width: auto;
  min-width: 10rem;
  max-width: 14rem;
  margin: 0 auto;
  text-align: center;
}

.cargo-table .cargo-track-text {
  display: inline-block;
  text-align: center;
  max-width: 14rem;
}

.cargo-table .cargo-actions {
  min-width: 8rem;
  text-align: center;
}

.cargo-table .cargo-actions .btn {
  margin: 0 0.2rem 0.2rem 0;
}

.cargo-actions {
  min-width: 12rem;
}
.cargo-actions .btn {
  margin: 0 0.2rem 0.2rem 0;
}

.supply-qty-list .supply-product-qty {
  border: none;
  background: transparent;
}

.supply-row-msg {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

.supply-row-msg:empty {
  display: none;
}

.supply-row-msg.error {
  color: #cf1322;
}

.supply-row-msg.ok {
  color: #389e0d;
}

.supply-table tbody tr.supply-row-flash {
  background: #fff7e6;
  transition: background 0.3s ease;
}

.state-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d46b08;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .sider {
    display: none;
  }
}

.origin-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1.2;
  color: #6b7280;
}
.origin-badge.system {
  color: #1d4ed8;
}
.origin-badge.shop {
  color: #9a3412;
}
.origin-badge.shop-name {
  color: #1677ff;
  font-weight: 600;
}

.hidden-file-input {
  display: none;
}

.wh-limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.wh-limit-card {
  position: relative;
  min-height: 180px;
  border: 1px dashed #d9d9d9;
  border-radius: 12px;
  background: #fafafa;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.wh-limit-card:hover {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.08);
}

.wh-limit-card.filled {
  border-style: solid;
  border-color: #e8e8e8;
  background: #fff;
  align-items: stretch;
  justify-content: flex-start;
  cursor: default;
}

.wh-limit-plus {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px dashed #bfbfbf;
  color: #8c8c8c;
  font-size: 42px;
  line-height: 56px;
  text-align: center;
  font-weight: 300;
}

.wh-limit-card:hover .wh-limit-plus {
  border-color: var(--primary);
  color: var(--primary);
}

.wh-limit-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.wh-limit-card.filled .wh-limit-name {
  text-align: left;
}

.wh-limit-meta,
.wh-limit-file {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-all;
}

.wh-limit-card.filled.pending .wh-limit-meta {
  color: var(--primary);
}

.wh-limit-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
