:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #020617;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0369a1;
  --primary-hover: #075985;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --brand: #0f172a;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --font: 'Noto Sans SC', 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Fira Code', ui-monospace, monospace;
  --container-max: 1280px;
  --focus-ring: #0f172a;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  touch-action: manipulation;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.16s ease;
}
a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.2);
}

/* 工作台壳：顶栏 + 左侧子导航 + 主内容（产品库 / 运费核算 / 用户与权限 全部子页共用） */
html:has(.app-shell) {
  height: 100%;
}

body:has(.app-shell) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.app-shell {
  --app-subnav-width: 220px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.app-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-header-inner {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  gap: 0;
}

/* 与左侧子导航同宽，仅放品牌，块内水平垂直居中 */
.app-header-left {
  width: var(--app-subnav-width);
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-right: 1px solid var(--border);
}

.brand-header {
  display: block;
  margin: 0;
  padding: 2px 4px;
  font-size: 1.05rem;
  text-align: center;
  line-height: 1.35;
}

/* 顶栏右侧主区域：一级模块依次横排 + 用户区靠右 */
.app-header-strip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 6px 20px 10px 16px;
}

.app-header-modules {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  column-gap: 28px;
  row-gap: 8px;
  min-width: 0;
}

.nav-dropdown {
  position: relative;
}

.nav-module-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 10px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-module-trigger:hover {
  background: var(--bg);
  border-color: var(--border);
  text-decoration: none;
}

.nav-module-trigger.is-active {
  color: var(--primary);
  background: rgba(3, 105, 161, 0.08);
  border-color: rgba(3, 105, 161, 0.2);
}

.nav-dropdown-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  min-width: 200px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: block;
}

.nav-dropdown-panel .nav-sublink {
  border-radius: var(--radius-sm);
}

.app-header-user {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  padding: 0;
}

.app-header-username {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  max-width: min(220px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-user .btn.sm {
  min-height: 34px;
}

.app-main {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  /* 仅右侧主内容滚动，左侧子导航始终留在可视区域 */
  overflow: hidden;
}

.app-subnav {
  width: var(--app-subnav-width);
  flex-shrink: 0;
  align-self: stretch;
  position: sticky;
  top: 0;
  z-index: 20;
  max-height: 100%;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 14px 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-subnav-group {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-subnav-head {
  padding: 12px 12px 11px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-bottom: 2px solid rgba(3, 105, 161, 0.22);
}

.app-subnav-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.app-subnav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px 10px;
  background: var(--surface);
}

.nav-sublink {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.nav-sublink:hover {
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
}

.nav-sublink.active {
  color: var(--primary);
  background: rgba(3, 105, 161, 0.1);
  font-weight: 600;
}

.app-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-logout {
  margin: 0;
}

.brand {
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
  color: var(--primary);
}

.link-button {
  background: none;
  border: none;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
}
.link-button:hover {
  color: var(--text);
  background: var(--bg);
}
.link-button.danger {
  color: var(--danger);
}
.link-button.danger:hover {
  color: var(--danger-hover);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.msg-success {
  background: #ecfdf3;
  color: #166534;
}
.msg-error {
  background: #fef2f2;
  color: #991b1b;
}
.msg-warning {
  background: #fffbeb;
  color: #92400e;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.15rem;
  margin: 0 0 12px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.staff-create-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.staff-create-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.staff-create-form {
  padding: 24px;
}

.staff-create-dialog-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
}

.staff-create-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.staff-perm-cell {
  vertical-align: middle;
}

.staff-perm-static {
  color: var(--muted);
}

.staff-perm-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 88px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #2563eb;
  border-radius: var(--radius-sm);
  background: #2563eb;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.staff-perm-trigger:hover {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
  text-decoration: none;
}

.staff-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
}

.staff-role-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 420px;
  width: calc(100% - 32px);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.staff-role-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.staff-role-dialog-form {
  padding: 22px 24px 24px;
}

.staff-role-dialog-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
}

.staff-role-dialog-lead {
  margin: 0 0 14px;
}

.staff-role-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.role-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.role-form-actions .btn.primary {
  min-width: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.role-assign-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.role-assign-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.role-assign-form {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.role-assign-dialog-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
}

.role-assign-dialog-lead {
  margin: 0 0 12px;
}

.role-assign-table-wrap {
  overflow: auto;
  max-height: min(420px, 55vh);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.role-assign-table {
  margin: 0;
}

.role-assign-table th,
.role-assign-table td {
  vertical-align: middle;
}

.role-assign-select {
  min-width: 160px;
  max-width: 100%;
}

.role-assign-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

table.data-table.staff-users-table > tbody > tr > td {
  vertical-align: middle;
  padding-top: 12px;
  padding-bottom: 12px;
}

table.data-table.staff-users-table > tbody > tr {
  min-height: 4.5rem;
}

table.data-table.staff-users-table .cell-actions {
  width: 1%;
  min-width: 118px;
  white-space: nowrap;
}

table.data-table.staff-users-table .staff-actions-v5 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 112px;
}

table.data-table.product-list-table > tbody > tr > td {
  vertical-align: middle;
  padding-top: 12px;
  padding-bottom: 12px;
}

table.data-table.product-list-table .cell-meta-stack {
  min-width: 108px;
  white-space: nowrap;
}

table.data-table.product-list-table .product-list-th-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.35;
  text-align: left;
}

table.data-table.product-list-table .product-list-th-sub {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.product-list-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  line-height: 1.35;
}

table.data-table.product-list-table .cell-actions {
  width: 1%;
  min-width: 118px;
  white-space: nowrap;
}

table.data-table.product-list-table .product-actions-v5 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 112px;
}

.product-actions-v5 a.staff-v5-btn {
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

table.data-table.product-list-table .cell-list-compact {
  width: 1%;
  min-width: 100px;
  max-width: 112px;
}

table.data-table.product-list-table .cell-supplier-1688 {
  white-space: nowrap;
}

.product-supplier-1688-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 112px;
}

.product-supplier-1688-links a.staff-v5-btn {
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
}

.cell-product-notes {
  max-width: 112px;
}

.product-notes-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 112px;
  font-size: 0.8125rem;
  line-height: 1.35;
  cursor: default;
}

.staff-v5-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.staff-v5-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  box-sizing: border-box;
}

.staff-v5-btn--danger {
  border-color: #fca5a5;
  color: #b91c1c;
  font-weight: 500;
  background: #fff5f5;
}

.staff-v5-btn--danger:hover {
  background: #fef2f2;
}

.staff-v5-btn--enable {
  border-color: #86efac;
  color: #166534;
  font-weight: 500;
  background: #f0fdf4;
}

.staff-v5-btn--enable:hover {
  background: #dcfce7;
}

.staff-v5-btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 1688 链接：须写在 .staff-v5-btn 基础样式之后，否则会被 background:transparent 覆盖 */
.product-supplier-1688-links a.staff-v5-btn.staff-v5-btn--1688 {
  border-color: #2563eb;
  background-color: #2563eb;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.product-supplier-1688-links a.staff-v5-btn.staff-v5-btn--1688:hover {
  border-color: #1d4ed8;
  background-color: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

.staff-reset-pwd-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 400px;
  width: calc(100% - 32px);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.staff-reset-pwd-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.staff-reset-pwd-form {
  padding: 22px 24px 24px;
}

.staff-reset-pwd-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
}

.staff-reset-pwd-lead {
  margin: 0 0 12px;
}

.staff-reset-pwd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.login-flash {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #dcfce7;
  color: #166534;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}
.lead {
  margin-top: 0;
}
.small {
  font-size: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}
.btn:hover {
  text-decoration: none;
  border-color: #cbd5e1;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}
.btn.secondary {
  background: var(--surface);
}
.btn.link {
  border-color: transparent;
  background: transparent;
  color: var(--primary);
}
.btn.danger {
  color: var(--danger);
  border-color: #fecaca;
}
.btn.sm {
  padding: 4px 10px;
  font-size: 0.875rem;
}
.btn.full {
  width: 100%;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px 20px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
}

.pagination-bar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pagination-pages {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.pagination-btn:hover:not(.pagination-btn--disabled) {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.pagination-btn--disabled {
  color: var(--muted);
  cursor: not-allowed;
  background: #f8fafc;
}

.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.pagination-num:hover {
  border-color: var(--border);
  background: #f8fafc;
  text-decoration: none;
}

.pagination-num--current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.pagination-ellipsis {
  padding: 0 4px;
  color: var(--muted);
  user-select: none;
}

.pagination-bar__jump,
.pagination-bar__per {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.pagination-jump-label,
.pagination-per-label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.pagination-jump-input {
  width: 4.5rem;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  text-align: center;
}

.pagination-per-select {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  background: var(--surface);
  cursor: pointer;
}

.pagination-jump-submit {
  min-height: 32px;
}

.pagination-bar__total {
  margin: 0 0 0 auto;
  font-size: 0.875rem;
  color: var(--muted);
}

.pagination-bar__total strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 720px) {
  .pagination-bar__total {
    margin-left: 0;
    width: 100%;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.data-table thead {
  background: linear-gradient(180deg, #f1f5f9 0%, #e8ecf1 100%);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: transparent;
  font-weight: 600;
  color: #334155;
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.data-table tbody tr {
  transition: background-color 0.16s ease;
}
.data-table tbody tr:hover {
  background: rgba(3, 105, 161, 0.04);
}
.data-table tr:last-child td {
  border-bottom: none;
}

.cell-sku {
  max-width: 150px;
  vertical-align: middle;
}

.sku-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--brand);
}

/* 产品库首页：加宽主区域、SKU 完整展示 */
.container-app.container-app--product-library {
  max-width: min(1680px, 96vw);
}

.product-library-page .table-wrap {
  width: 100%;
}

.product-filter-bar {
  margin: -6px 0 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.product-filter-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(190px, 0.8fr) minmax(260px, 1fr) minmax(260px, 0.95fr) auto;
  gap: 12px;
  align-items: end;
}

.product-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.product-filter-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.product-filter-control {
  display: flex;
  min-width: 0;
  width: 100%;
}

.product-filter-control--keyword,
.product-filter-control--user,
.product-filter-control--date {
  gap: 0;
}

.product-filter-select,
.product-filter-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  background-color: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.product-filter-select {
  appearance: none;
  padding: 8px 34px 8px 11px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.product-filter-input {
  padding: 8px 11px;
}

.product-filter-select:hover,
.product-filter-input:hover {
  border-color: #cbd5e1;
}

.product-filter-select:focus,
.product-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.16);
  position: relative;
  z-index: 1;
}

.product-filter-control--keyword .product-filter-select,
.product-filter-control--user .product-filter-select:first-child,
.product-filter-control--date .product-filter-input:first-of-type {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.product-filter-control--keyword .product-filter-input,
.product-filter-control--user .product-filter-select:last-child,
.product-filter-control--date .product-filter-input:last-child {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.product-filter-control > .product-filter-select:only-child,
.product-filter-control > .product-filter-input:only-child {
  border-radius: 8px;
}

.product-filter-select--field {
  flex: 0 0 116px;
}

.product-filter-select--user-field {
  flex: 0 0 112px;
}

.product-filter-control--keyword .product-filter-input,
.product-filter-control--user .product-filter-select:last-child,
.product-filter-control--date .product-filter-input {
  min-width: 0;
}

.product-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.product-filter-actions .btn {
  min-height: 38px;
  padding-block: 6px;
  min-width: 74px;
}

@media (max-width: 1360px) {
  .product-filter-grid {
    grid-template-columns: minmax(320px, 1.2fr) minmax(190px, 0.8fr) minmax(260px, 1fr) auto;
  }

  .product-filter-group--date {
    grid-column: 1 / span 2;
  }
}

@media (max-width: 980px) {
  .product-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-filter-group--keyword,
  .product-filter-group--date {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .product-filter-grid {
    grid-template-columns: 1fr;
  }

  .product-filter-group--keyword,
  .product-filter-group--date,
  .product-filter-actions {
    grid-column: 1;
  }

  .product-filter-control--keyword,
  .product-filter-control--user,
  .product-filter-control--date {
    flex-direction: column;
    gap: 8px;
  }

  .product-filter-control--keyword .product-filter-select,
  .product-filter-control--keyword .product-filter-input,
  .product-filter-control--user .product-filter-select:first-child,
  .product-filter-control--user .product-filter-select:last-child,
  .product-filter-control--date .product-filter-input:first-of-type,
  .product-filter-control--date .product-filter-input:last-child {
    flex-basis: auto;
    margin-left: 0;
    border-radius: 8px;
  }

  .product-filter-actions .btn {
    flex: 1;
  }
}

.freight-master-filter {
  margin: 0 0 16px;
}

.freight-master-filter-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
}

.freight-master-filter-grid--4 {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
}

.freight-master-filter-grid--logistics {
  grid-template-columns: minmax(360px, 1.35fr) minmax(180px, 0.55fr) auto;
}

@media (max-width: 1100px) {
  .freight-master-filter-grid,
  .freight-master-filter-grid--4,
  .freight-master-filter-grid--logistics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .freight-master-filter-grid .product-filter-actions,
  .freight-master-filter-grid--4 .product-filter-actions,
  .freight-master-filter-grid--logistics .product-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .freight-master-filter-grid,
  .freight-master-filter-grid--4,
  .freight-master-filter-grid--logistics {
    grid-template-columns: 1fr;
  }

  .freight-master-filter-grid .product-filter-actions,
  .freight-master-filter-grid--4 .product-filter-actions,
  .freight-master-filter-grid--logistics .product-filter-actions {
    grid-column: 1;
  }
}

table.data-table.product-list-table {
  width: 100%;
  table-layout: auto;
}

table.data-table.product-list-table .cell-sku {
  max-width: none;
  width: 1%;
  white-space: nowrap;
}

table.data-table.product-list-table .sku-code {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 0.78rem;
}

.cell-name {
  max-width: min(28vw, 260px);
  min-width: 0;
}

.data-table .cell-name a,
.data-table .cell-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-weight {
  white-space: nowrap;
}

.cell-score {
  white-space: nowrap;
  text-align: center;
}

.score-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(3, 105, 161, 0.12);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.search-results-wrap {
  width: 100%;
  max-width: 100%;
}

.search-results-table {
  min-width: 960px;
  table-layout: fixed;
}

.search-results-table .search-col-sku {
  width: 106px;
}

.search-results-table .search-col-thumb {
  width: 86px;
}

.search-results-table .search-col-name {
  width: 24%;
}

.search-results-table .search-col-category {
  width: 112px;
}

.search-results-table .search-col-price {
  width: 94px;
}

.search-results-table .search-col-meta {
  width: 128px;
}

.search-results-table .search-col-extra {
  width: 138px;
}

.search-results-table .search-col-score {
  width: 76px;
}

.search-results-table .search-col-actions {
  width: 78px;
}

.search-results-table th,
.search-results-table td {
  padding: 8px 9px;
}

.search-results-table .cell-sku,
.search-results-table .cell-name,
.search-results-table .search-extra-cell {
  min-width: 0;
}

.search-results-table .sku-code {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results-table .product-thumb-cell {
  width: 86px;
}

.search-results-table .home-gallery-trigger,
.search-results-table .home-gallery-trigger img {
  width: 72px;
  height: 72px;
}

.search-results-table .cell-name {
  max-width: none;
}

.search-results-table .cell-name a,
.search-results-table .cell-name span {
  max-width: 100%;
}

.search-price-cell,
.search-meta-cell,
.search-extra-cell {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.search-price-cell strong,
.search-price-cell span,
.search-meta-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-supplier-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.search-supplier-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.search-supplier-links a:hover {
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

.search-notes-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: #475569;
}

.search-results-table .score-pill {
  padding-inline: 7px;
  font-size: 0.78rem;
}

.search-results-table .cell-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 0;
  width: 78px;
  background: var(--surface);
  box-shadow: -1px 0 0 var(--border);
}

.search-results-table thead .cell-actions {
  z-index: 3;
  background: #e8ecf1;
}

.search-results-table tbody tr:hover .cell-actions {
  background: #f5fbff;
}

.search-results-table .product-actions-v5 {
  max-width: 62px;
}

.search-results-table .staff-v5-btn {
  min-height: 28px;
  padding-inline: 6px;
  font-size: 0.78rem;
}

@media (max-width: 1180px) {
  .search-results-table {
    min-width: 900px;
  }

  .search-results-table .search-col-category {
    width: 96px;
  }

  .search-results-table .search-col-meta {
    width: 116px;
  }

  .search-results-table .search-col-extra {
    width: 120px;
  }
}

.cell-actions {
  vertical-align: middle;
}

.detail-back-row {
  margin: 0 0 10px;
  font-size: 0.875rem;
}

.detail-back-row a {
  color: var(--primary);
  text-decoration: none;
}

.detail-back-row a:hover {
  text-decoration: underline;
}

.action-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.875rem;
}

.action-links > a {
  color: var(--primary);
  text-decoration: underline;
}

.action-delete-form {
  display: block;
  margin: 0;
  padding: 0;
}

.link-submit {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}

.link-submit:hover {
  text-decoration: underline;
}

.link-submit-danger {
  color: var(--danger);
}

.link-submit-danger:hover {
  color: var(--danger-hover);
}

.product-thumb-cell {
  width: 116px;
  vertical-align: middle;
}

.home-gallery-trigger {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
}

.home-gallery-trigger:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.home-gallery-trigger img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f1f5f9;
}

.thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fafafa;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.lightbox-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 52px 20px 24px;
  overflow-y: auto;
  pointer-events: none;
}

.lightbox-panel > * {
  pointer-events: auto;
}

.lightbox-body {
  width: 100%;
  max-width: min(96vw, 920px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-main-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  flex-shrink: 0;
}

.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(82vw, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: min(58vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  background: #0f172a;
}

.lightbox-product-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
  max-width: 100%;
  padding: 0 12px;
}

.lightbox-counter {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  padding: 0 12px;
}

.lightbox-current-wrap {
  width: 100%;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.lightbox-current-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
}

.lightbox-current-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px 2px 8px;
}

.lightbox-thumb-tile {
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
}
.lightbox-thumb-tile:hover {
  background: rgba(255, 255, 255, 0.12);
}
.lightbox-thumb-tile.active {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}
.lightbox-thumb-tile img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.26);
}
.lightbox-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.lightbox-strip-wrap {
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
}

.lightbox-strip-title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

.lightbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-height: 36vh;
  overflow-y: auto;
  padding: 10px 4px 4px;
}

.lightbox-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 6px 4px 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  color: #e2e8f0;
  font: inherit;
}
.lightbox-strip-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.lightbox-strip-item.active {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}
.lightbox-strip-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.lightbox-strip-caption {
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 640px) {
  .lightbox-panel {
    padding: 48px 10px 16px;
  }
  .lightbox-main-row {
    gap: 6px;
  }
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
}

.upload-panel {
  margin: 16px 0;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag {
  border-color: var(--primary);
  background: rgba(3, 105, 161, 0.04);
}
.dropzone-text {
  font-weight: 600;
}
.dropzone-hint {
  font-size: 0.875rem;
  color: var(--muted);
}

.container-workspace {
  max-width: min(1120px, 100%);
}

.workspace-hero {
  margin-bottom: clamp(16px, 3vw, 28px);
}

.workspace-hero__eyebrow {
  margin: 0 0 6px;
  font-size: clamp(0.75rem, 2vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: 700;
}

.workspace-flow-panel {
  width: 100%;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fafc 0%, var(--surface) 48%);
  box-sizing: border-box;
}

.workspace-flow-figure {
  margin: 0;
  width: 100%;
  line-height: 0;
}

.workspace-flow-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}

.workspace-flow {
  margin: 0;
  width: 100%;
}

.workspace-flow__caption {
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
  text-align: center;
}

.workspace-flow__canvas {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 24px);
  width: 100%;
}

.workspace-flow__lane {
  padding: clamp(14px, 2.5vw, 20px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.workspace-flow__lane--products {
  border-top: 3px solid #0369a1;
}

.workspace-flow__lane--freight {
  border-top: 3px solid #059669;
}

.workspace-flow__lane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: clamp(12px, 2vw, 16px);
}

.workspace-flow__lane-badge {
  font-size: clamp(0.9375rem, 2.2vw, 1.0625rem);
  font-weight: 700;
  color: var(--text);
}

.workspace-flow__lane-hint {
  font-size: 0.8125rem;
}

.workspace-flow__track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workspace-flow__step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 9.5rem;
  min-width: min(9.5rem, 100%);
  max-width: 14rem;
  padding: clamp(10px, 2vw, 14px);
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

.workspace-flow__step--out {
  background: #eff6ff;
  border-color: rgba(3, 105, 161, 0.2);
}

.workspace-flow__lane--freight .workspace-flow__step--out {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.25);
}

.workspace-flow__step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.workspace-flow__step-title {
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.3;
}

.workspace-flow__step-desc {
  font-size: clamp(0.75rem, 1.6vw, 0.8125rem);
  line-height: 1.4;
}

.workspace-flow__arrow {
  flex: 0 0 auto;
  align-self: center;
  width: clamp(20px, 4vw, 32px);
  height: 2px;
  margin: 0 clamp(4px, 1vw, 8px);
  background: linear-gradient(90deg, #cbd5e1, #94a3b8);
  position: relative;
}

.workspace-flow__arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #94a3b8;
}

.workspace-flow__bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 16px);
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 20px);
}

.workspace-flow__bridge-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.workspace-flow__bridge-label {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: clamp(0.75rem, 1.8vw, 0.8125rem);
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px dashed #94a3b8;
  border-radius: 999px;
  text-align: center;
}

/* 窄屏：步骤纵向排列，箭头向下 */
@media (max-width: 720px) {
  .workspace-flow__track {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .workspace-flow__step {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  .workspace-flow__arrow {
    width: 2px;
    height: clamp(16px, 4vw, 24px);
    margin: 6px auto;
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  }

  .workspace-flow__arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #94a3b8;
    border-left-color: transparent;
  }

  .workspace-flow__bridge {
    flex-direction: column;
    gap: 8px;
  }

  .workspace-flow__bridge-line {
    width: 1px;
    max-width: none;
    height: 20px;
    background: linear-gradient(180deg, transparent, #cbd5e1, transparent);
  }
}

/* 宽屏：两泳道并排，中间桥接 */
@media (min-width: 1024px) {
  .workspace-flow__canvas {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto;
    align-items: stretch;
    gap: 12px 16px;
  }

  .workspace-flow__bridge {
    flex-direction: column;
    justify-content: center;
    padding: 12px 8px;
  }

  .workspace-flow__bridge-line {
    width: 1px;
    max-width: none;
    height: 48px;
    flex: none;
    background: linear-gradient(180deg, transparent, #cbd5e1, transparent);
  }

  .workspace-flow__bridge-label {
    writing-mode: horizontal-tb;
    max-width: 10rem;
    line-height: 1.35;
  }
}

.error {
  color: var(--danger);
}
.banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.banner--warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.55;
}

.banner--warn code {
  font-size: 0.8em;
  word-break: break-all;
}

.email-2fa-dev-banner {
  text-align: left;
  margin-bottom: 12px;
}

.password-change-hint {
  margin: -4px 0 10px;
}

.section-title {
  margin-top: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.product-card:hover {
  text-decoration: none;
  border-color: #cbd5e1;
}
.product-card .thumb {
  aspect-ratio: 1;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 12px;
}
.card-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.meta {
  font-size: 0.875rem;
  color: var(--muted);
}
.price-line {
  margin-top: 8px;
  font-weight: 600;
}
.score {
  margin-left: 8px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.form-section.tight {
  padding: 16px;
}

.category-tree-wrap {
  margin-bottom: 20px;
}

.category-tree-table tr.row-l1 td.cell-name {
  font-weight: 600;
}

.category-tree-table .cell-priority {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.inline-form .input-priority {
  width: 5.5rem;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.category-l2-panel-row {
  display: none;
}

.category-l2-panel-row.is-expanded {
  display: table-row;
}

.category-l2-panel-row > td {
  padding: 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.category-l2-panel-inner {
  padding: 14px 16px 16px;
}

.category-l2-add {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.category-l2-add-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.category-l2-empty {
  margin: 0;
}

.category-l2-table-wrap {
  margin-top: 4px;
}

.category-l2-table tr.row-l2 {
  background: #fff;
}

.category-l2-table tr.row-l2 td.cell-name {
  padding-left: 28px;
  position: relative;
}

.category-l2-table tr.row-l2 td.cell-name::before {
  content: '└';
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-weight: 400;
}

.btn.linkish {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 5px 8px;
  box-shadow: none;
}

.btn.linkish:hover {
  background: #f0f9ff;
  text-decoration: underline;
}

.category-edit-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: min(420px, 92vw);
}

.category-edit-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.category-edit-form {
  padding: 20px 22px 18px;
}

.category-edit-dialog-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.category-edit-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.cell-actions .inline {
  display: inline;
}

.cell-actions .btn + .inline,
.cell-actions .inline + .btn,
.cell-actions .btn + .btn {
  margin-left: 6px;
}

.field abbr[title='必填'] {
  color: #c62828;
  text-decoration: none;
  margin-left: 2px;
  font-weight: 700;
}

.field-inline-error,
.field-form-error {
  display: block;
  color: #c62828;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 4px 0 0;
  font-weight: 500;
}

.grid-supplier-4 .supplier-field-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.grid-supplier-4 .supplier-field-cell input {
  width: 100%;
  box-sizing: border-box;
}

.field-form-error[hidden],
.field-inline-error[hidden] {
  display: none !important;
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.15);
}

.grid-supplier-4 input.is-invalid {
  grid-column: span 1;
}

.form-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.form-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.form-section__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.form-section h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.field.full {
  grid-column: 1 / -1;
}
.field span {
  color: var(--muted);
  font-weight: 500;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='file'],
select,
textarea {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
textarea {
  resize: vertical;
  min-height: 80px;
}

.image-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.image-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fafafa;
}

.grid-supplier {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.grid-supplier-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.readonly-input {
  background: #f1f5f9;
  color: var(--muted);
  cursor: default;
}

.image-upload-zone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 22px 16px 20px;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.image-upload-zone:hover {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.12);
}

.image-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(3, 105, 161, 0.1);
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.image-upload-hint {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  max-width: 320px;
}

.image-upload-sub {
  margin: 0;
  max-width: 360px;
}

.empty-images-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.logic-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  line-height: 1.5;
}

.logic-note strong {
  font-weight: 700;
}

.edit-three-blocks {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 12px;
}

.edit-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  overflow: hidden;
}

.edit-block__head {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  background: #e2e8f0;
  border-bottom: 1px solid var(--border);
}

.edit-block__body {
  padding: 14px;
}

.edit-block__body > .image-card-grid {
  margin-top: 0;
}

.edit-block__empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
  padding: 16px 8px;
}

.image-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.image-preview-list.image-card-grid {
  margin-top: 14px;
}

.image-upload-card.image-preview-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafafa;
  gap: 10px;
}

.image-upload-card__thumb.image-preview-thumb {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.image-upload-card__thumb.image-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-upload-card__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.image-type-select {
  max-width: 200px;
}

.image-upload-card .image-type-radios,
.image-upload-card .image-upload-card__types {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  width: 100%;
}

.image-upload-card .image-type-radio-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  max-width: 9.5em;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.image-upload-card .image-type-radio-label input[type='radio'] {
  width: auto;
  min-width: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.image-upload-card .image-upload-card__remove {
  margin-top: 2px;
  width: 100%;
}

.image-set-cover-btn {
  width: 100%;
}

.image-set-cover-btn.is-list-cover,
.image-set-cover-btn.is-list-cover:disabled {
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
  opacity: 1;
  cursor: default;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.detail-info .detail-side-panel {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.detail-side-panel__section {
  padding: 14px 16px 16px;
}

.detail-side-panel__section + .detail-side-panel__section {
  border-top: 1px solid var(--border);
}

.detail-side-panel__section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
}

.detail-empty-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.supplier-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.supplier-rows-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.supplier-rows--extra-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.supplier-extra-panel[hidden] {
  display: none !important;
}

.supplier-extra-panel:not([hidden]) {
  display: block;
}

.supplier-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.supplier-expand-toggle:hover {
  background: rgba(3, 105, 161, 0.06);
  border-color: rgba(3, 105, 161, 0.35);
}

.supplier-expand-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.supplier-expand-text {
  text-align: center;
  line-height: 1.35;
}

.supplier-expand-icon {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.supplier-expand-toggle[aria-expanded='true'] .supplier-expand-icon {
  transform: rotate(180deg);
}

.supplier-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.supplier-chip-row__name {
  font-weight: 600;
  font-size: 0.9375rem;
  min-width: 0;
}

.supplier-chip-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.link-pill:hover {
  background: var(--primary-hover);
  color: #fff;
  text-decoration: none;
}

.link-pill--ghost {
  color: var(--primary);
  background: rgba(3, 105, 161, 0.1);
  cursor: default;
}

.link-pill--ghost:hover {
  color: var(--primary);
  background: rgba(3, 105, 161, 0.16);
  text-decoration: none;
}

a.link-pill:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.supplier-inline-note {
  width: 100%;
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.notes-panel {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}

.detail-side-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  border-top: 1px solid var(--border);
}

.detail-gallery .main-photo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-photo img {
  max-width: 100%;
  display: block;
}
.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
}
.thumb-btn img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}
.thumb-btn.active {
  border-color: var(--primary);
}

.facts {
  margin: 0;
  display: grid;
  gap: 8px;
}
.facts div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
}
.facts dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.facts dd {
  margin: 0;
}

.facts dd .sku-code {
  max-width: 100%;
}

.supplier-list {
  padding-left: 1.1rem;
}

.carousel-section {
  margin-top: 28px;
}
.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.carousel-img {
  height: 200px;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: contain;
  background: var(--surface);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.inline-form input {
  min-width: 160px;
}
form.inline {
  display: inline;
}
.actions {
  text-align: right;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #e0f2fe, var(--bg));
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.login-card h1 {
  margin-bottom: 16px;
  text-align: center;
}
.login-card .field {
  margin-bottom: 12px;
}

.login-card--wide {
  max-width: 440px;
}

.login-card .muted.small {
  text-align: left;
  line-height: 1.55;
  margin-bottom: 12px;
}

.email-2fa-target {
  text-align: center;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.messages-compact {
  margin: 0 0 12px;
  padding-left: 1.2em;
  text-align: left;
}

.email-2fa-cooldown {
  margin: 0 0 12px;
  text-align: center;
}

.email-2fa-resend {
  margin-top: 12px;
}

.email-2fa-logout {
  margin-top: 20px;
  text-align: center;
}

.data-table .cell-email {
  font-size: 0.85rem;
  word-break: break-all;
  max-width: 220px;
}

@media (max-width: 640px) {
  .app-header-inner {
    flex-wrap: wrap;
  }

  .app-header-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
  }

  .app-header-strip {
    width: 100%;
    flex-wrap: wrap;
    padding: 8px 16px 12px;
  }

  .app-header-user {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    padding: 0;
  }

  .app-main {
    flex-direction: column;
    overflow: hidden;
  }

  .app-subnav {
    width: 100%;
    flex: 0 0 auto;
    align-self: stretch;
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 8px;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    overflow-y: visible;
    max-height: none;
  }

  .app-subnav-group {
    width: 100%;
    flex-direction: column;
  }

  .app-subnav-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 10px 8px 12px;
  }

  .app-subnav-head {
    width: 100%;
  }

  .app-subnav-title {
    font-size: 0.875rem;
  }

  .app-subnav .nav-sublink {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }

  .app-header-username {
    max-width: 40vw;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-supplier {
    grid-template-columns: 1fr;
  }
  .grid-supplier-4 {
    grid-template-columns: 1fr;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 用户管理（超级管理员） */
.badge-ok {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
}

.badge-off {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}

.staff-password-hint {
  margin: 4px 0 12px;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(3, 105, 161, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
}

.staff-password-hint--compact {
  margin: 4px 0 10px;
  padding: 8px 10px;
  font-size: 0.8125rem;
}

.role-menu-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0 0;
}

.role-menu-fieldset legend {
  font-weight: 600;
  padding: 0 6px;
}

.role-menu-hint {
  margin: 0 0 12px;
}

.role-menu-modules {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.role-menu-module {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.role-menu-module-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.role-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 14px;
}

.role-menu-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  cursor: pointer;
}

.role-menu-check input {
  margin-top: 3px;
}

.cell-actions form.inline {
  display: inline;
}

/* 国家列表：图标列（国旗图或 Emoji） */
.cell-flag {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}
.freight-country-flag-thumb {
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: auto;
  max-height: 1.35rem;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

/* —— 运费：国家/公司/渠道表单 · 启用开关（版本 A） —— */
.freight-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 20px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.freight-status-copy {
  flex: 1;
  min-width: 0;
}
.freight-status-copy strong {
  display: block;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 4px;
}
.freight-status-copy .small {
  display: block;
  line-height: 1.45;
}
.freight-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-block;
}
.freight-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.freight-switch-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
  pointer-events: none;
}
.freight-switch-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}
.freight-switch-input:checked + .freight-switch-slider {
  background: var(--primary);
}
.freight-switch-input:checked + .freight-switch-slider::before {
  transform: translateX(20px);
}
.freight-switch-input:focus-visible + .freight-switch-slider {
  outline: 2px solid var(--focus-ring, #0f172a);
  outline-offset: 2px;
}

/* —— 运费：货物属性表单 · 启用（版本 B · 卡片勾选） —— */
.freight-attr-form .freight-status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.freight-attr-form .freight-status-card:hover {
  border-color: #94a3b8;
  background: #fafafa;
}
.freight-attr-form .freight-status-card:focus-within {
  border-color: rgba(3, 105, 161, 0.45);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}
.freight-attr-form .freight-status-card-check {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.freight-attr-form .freight-status-card-txt {
  flex: 1;
  min-width: 0;
}
.freight-attr-form .freight-status-card-txt strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}
.freight-attr-form .freight-status-card-txt small {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
}

/* —— 运费：货物属性列表 · 操作按钮 —— */
.cell-actions .action-group,
.page-head-actions .action-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cell-actions .action-inline-form,
.page-head-actions .action-inline-form {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  min-height: 32px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
  vertical-align: middle;
}
.btn-action svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.9;
}
.btn-action:focus-visible {
  outline: 2px solid var(--focus-ring, #0f172a);
  outline-offset: 2px;
}
.btn-action--edit {
  color: var(--primary);
  background: var(--surface);
  border-color: #bae6fd;
}
.btn-action--edit:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: var(--primary-hover, #075985);
  text-decoration: none;
}
.btn-action--mute {
  color: #b91c1c;
  background: var(--surface);
  border-color: #fecaca;
}
.btn-action--mute:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.btn-action--enable {
  color: #166534;
  background: var(--surface);
  border-color: #bbf7d0;
}
.btn-action--enable:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d;
}
.btn-action--delete {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}
.btn-action--delete:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.freight-attr-list .cell-priority {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.freight-attr-list tr.freight-attr-row--inactive td {
  color: var(--muted);
  background: #f8fafc;
}

/* —— 运费：全局配置页 —— */
.freight-global-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.freight-global-page-head .freight-global-lead {
  max-width: 52rem;
  margin-top: 6px;
}
.freight-global-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .freight-global-layout {
    grid-template-columns: 1fr;
  }
}
.freight-global-aside {
  padding: 18px 18px 20px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.freight-global-aside-title {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}
.freight-global-aside-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.55;
}
.freight-global-aside-list li + li {
  margin-top: 6px;
}
.freight-global-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: #334155;
}
.freight-global-meta-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.freight-global-meta-by {
  color: var(--muted);
}
.freight-global-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.freight-global-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
@media (max-width: 640px) {
  .freight-global-grid {
    grid-template-columns: 1fr;
  }
}
.freight-global-field {
  min-width: 0;
}
.freight-global-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.freight-global-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  background: #fff;
}
.freight-global-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.18);
}
.freight-global-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
}
.freight-global-error {
  margin: 6px 0 0;
  font-size: 0.8125rem;
}
.freight-global-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* —— 运费：渠道上传页说明块 —— */
.freight-channel-info {
  margin: 12px 0 20px;
  padding: 14px 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #0c4a6e;
  line-height: 1.5;
}
.freight-channel-info strong {
  font-size: 0.875rem;
  color: #075985;
}
.freight-channel-info code {
  font-size: 0.75rem;
  padding: 1px 5px;
  background: #e0f2fe;
  border-radius: 4px;
}

/* —— 运费：物流公司与渠道 · 折叠列表 —— */
.logistics-tree-table tr.row-company td.cell-name {
  font-weight: 600;
}

.logistics-tree-table tr.row-company--inactive td {
  color: var(--muted);
}

.logistics-ch-table tr.row-channel--inactive td {
  color: var(--muted);
  background: #fafbfc;
}

.logistics-tree-table .cell-actions {
  white-space: normal;
}

.logistics-company-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 560px;
}

.logistics-tree-table .logistics-ch-panel-toggle {
  width: 150px;
  min-width: 150px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.logistics-company-action-row > .btn.secondary.sm:not(.logistics-ch-panel-toggle) {
  width: 84px;
  min-width: 84px;
  justify-content: center;
}

.logistics-company-actions {
  align-items: center;
  vertical-align: middle;
}

.logistics-tree-table .logistics-ch-panel-toggle,
.logistics-company-action-row > .btn.secondary.sm:not(.logistics-ch-panel-toggle) {
  min-height: 36px;
  white-space: nowrap;
}

.logistics-ch-panel-row {
  display: none;
}

.logistics-ch-panel-row.is-expanded {
  display: table-row;
}

.logistics-ch-panel-row > td {
  padding: 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.logistics-ch-panel-inner {
  padding: 14px 16px 16px;
}

.logistics-ch-empty {
  margin: 0;
}

.logistics-ch-table-wrap {
  margin-top: 4px;
}

.logistics-ch-table tr.row-channel {
  background: #fff;
}

.logistics-ch-table tr.row-channel td.cell-name {
  padding-left: 28px;
  position: relative;
}

.logistics-ch-table tr.row-channel td.cell-name::before {
  content: '└';
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* —— 运费：物流公司与渠道 · 列表检索 —— */
.freight-logistics-filter {
  margin-bottom: 1.25rem;
  max-width: 56rem;
}
.freight-logistics-filter-hint {
  margin: 0.35rem 0 0;
  max-width: 52rem;
}
.freight-logistics-scope-select {
  min-width: 8.5rem;
}

/* —— 运费：渠道阶梯 · 批次明细浏览 —— */
.freight-rate-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.freight-rate-browse-toolbar .field {
  margin-bottom: 0;
}
.freight-rate-browse-select {
  min-width: min(420px, 100%);
}
.freight-rate-browse-q {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.freight-rate-browse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.freight-rate-browse-table-wrap {
  max-height: min(70vh, 720px);
}
.freight-rate-browse-table {
  font-size: 0.75rem;
}
.freight-rate-browse-table th,
.freight-rate-browse-table td {
  white-space: nowrap;
}
.freight-rate-browse-table td:nth-child(3) {
  white-space: normal;
  max-width: 14rem;
}

/* —— 运费：渠道阶梯 · 上传失败弹窗 —— */
.freight-upload-errors-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(85vh, 640px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}
.freight-upload-errors-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.freight-upload-errors-dialog-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}
.freight-upload-errors-dialog-hd h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #b91c1c;
}
.freight-upload-errors-dialog-hd p {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
}
.freight-upload-errors-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.freight-upload-errors-dialog-bd {
  padding: 10px 14px 16px;
  overflow: auto;
  max-height: calc(85vh - 200px);
}
.freight-upload-errors-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.freight-upload-errors-list li {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  word-break: break-word;
}
.freight-upload-errors-list li:nth-child(odd) {
  background: #fafafa;
}
.freight-upload-errors-more {
  margin: 10px 0 0;
}

/* —— 运费：全局配置 · 历史记录弹窗 —— */
.freight-global-history-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}
.freight-global-history-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.freight-global-history-dialog-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.freight-global-history-dialog-hd h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}
.freight-global-history-dialog-hd p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.freight-global-history-dialog-bd {
  padding: 12px 16px 18px;
  overflow: auto;
  max-height: calc(80vh - 120px);
}
.freight-global-history-table-wrap {
  overflow-x: auto;
}
.freight-global-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.freight-global-history-table th,
.freight-global-history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.freight-global-history-table th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 1;
}
.freight-global-history-table td.num {
  font-family: var(--font-mono, ui-monospace, monospace);
  white-space: nowrap;
}
.freight-global-history-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* —— 站内公告 —— */
.announcement-panel {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.announcement-panel--active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 48%);
}
.announcement-panel__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}
.announcement-meta {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.announcement-active-heading {
  margin: 0 0 10px;
  font-size: 1.0625rem;
}
.announcement-active-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
.announcement-publish-form .announcement-field {
  margin-bottom: 14px;
}
.announcement-publish-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}
.announcement-publish-form input[type="text"],
.announcement-publish-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.announcement-publish-dialog .announcement-field {
  margin-bottom: 14px;
}
.announcement-publish-dialog .announcement-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}
.announcement-publish-hint {
  margin: -8px 0 14px;
}
.announcement-actions {
  margin-top: 8px;
}
.announcement-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.announcement-badge--active {
  background: #dcfce7;
  color: #166534;
}
.announcement-badge:not(.announcement-badge--active) {
  background: #f1f5f9;
  color: #64748b;
}
.announcement-panel__actions {
  margin: 14px 0 0;
}
.announcement-history-head {
  margin-bottom: 12px;
}
.announcement-history-head .announcement-panel__title {
  margin-bottom: 4px;
}
.announcement-history-lead {
  margin: 0;
}
.announcement-history-table .cell-title {
  min-width: 200px;
  max-width: 360px;
}
.announcement-history-title {
  display: block;
  font-weight: 500;
}
.announcement-history-preview {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}
.announcement-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.announcement-history-empty {
  margin: 0;
  padding: 12px 0;
}
.announcement-history-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(85vh, 720px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
}
.announcement-history-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.announcement-history-dialog__hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.announcement-history-dialog__hd h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.announcement-history-dialog-meta {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.announcement-history-dialog__bd {
  padding: 16px 20px 20px;
  overflow: auto;
  max-height: calc(85vh - 120px);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.announcement-detail-back {
  margin: 0 0 8px;
  font-size: 0.875rem;
}
.announcement-detail-back a {
  color: var(--muted);
  text-decoration: none;
}
.announcement-detail-back a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.announcement-detail-article .announcement-detail-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
.site-announcement-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(85vh, 640px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.site-announcement-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
}
.site-announcement-dialog__inner {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 640px);
}
.site-announcement-dialog__hd {
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.site-announcement-dialog__hd h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}
.site-announcement-dialog__bd {
  padding: 16px 20px;
  overflow: auto;
  font-size: 0.9375rem;
  line-height: 1.65;
  flex: 1;
}
.site-announcement-dialog__ft {
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border);
  text-align: right;
  background: #fafafa;
}

/* 1688 / TMAPI 导入弹窗（仅 TMAPI_1688_ENABLED 时显示） */
.tmapi-1688-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 920px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}
.tmapi-1688-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.tmapi-1688-dialog__inner {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: inherit;
  overflow: auto;
}
.tmapi-1688-dialog__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
}
.tmapi-1688-dialog__url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.tmapi-1688-dialog__url-field {
  flex: 1 1 240px;
  min-width: 0;
  margin: 0;
}
.tmapi-1688-dialog__url-field input {
  width: 100%;
  box-sizing: border-box;
}
.tmapi-1688-dialog__url-row .btn {
  flex: 0 0 auto;
  align-self: stretch;
}
.tmapi-1688-dialog__status {
  margin: 0;
}
.tmapi-1688-dialog__preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border, #d0d7de);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}
.tmapi-1688-dialog__meta-item {
  flex: 1 1 160px;
  min-width: 0;
}
.tmapi-1688-dialog__meta-item--thumbs {
  flex: 2 1 280px;
}
.tmapi-1688-dialog__meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  margin-bottom: 6px;
}
.tmapi-1688-dialog__meta-value {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.45;
  word-break: break-word;
}
.tmapi-1688-dialog__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tmapi-1688-dialog__thumb {
  position: relative;
  display: block;
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  border: 2px solid var(--border, #d0d7de);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}
.tmapi-1688-dialog__thumb:has(input:checked) {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 1px var(--primary, #2563eb);
}
.tmapi-1688-dialog__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tmapi-1688-dialog__thumb input[type='checkbox'] {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  width: 16px;
  height: 16px;
  margin: 0;
}
.tmapi-1688-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

/* 1688 主图导入加载遮罩（首页跳转新增产品页） */
body.import-images-loading-active {
  overflow: hidden;
}
.import-images-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
}
.import-images-loading-overlay[hidden] {
  display: none !important;
}
.import-images-loading-overlay__inner {
  text-align: center;
  padding: 28px 36px;
  min-width: 200px;
  background: var(--surface, #fff);
  border-radius: var(--radius, 8px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}
.import-images-loading-overlay__spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary, #2563eb);
  border-radius: 50%;
  animation: import-images-spin 0.7s linear infinite;
}
.import-images-loading-overlay__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text, #334155);
}
@keyframes import-images-spin {
  to {
    transform: rotate(360deg);
  }
}

.text-danger {
  color: #c62828;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
