/* 订单管理系统 — 复用 UI 设计规范（黑白主色 / 12px 基准 / 方块网格感）*/
:root {
  --bg-body: #f2f3f5; --bg-shell: #f7f8fa; --bg-surface: #fff; --bg-subtle: #f8fafc;
  --border-default: #ebebeb; --border-soft: #e5eaf0; --border-input: #dbe4ef; --border-grid: #d6dbe3;
  --text-strong: #0f172a; --text-default: #111; --text-muted: #475569; --text-soft: #64748b; --text-faint: #94a3b8;
  --primary: #111; --primary-tab: #111827; --accent-blue: #2563eb;
  --warn-bg: #fff7ed; --warn-border: #fed7aa; --warn-text: #9a3412; --danger-text: #b91c1c;
  --radius: 6px; --radius-lg: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
[x-cloak] { display: none !important; }
body {
  margin: 0; background: var(--bg-body); color: var(--text-default);
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-size: 12px;
}
button, input, select, textarea { font: inherit; }
h1 { margin: 0 0 4px; font-size: 20px; font-weight: 650; color: #111; }
h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-strong); }
p  { margin: 0; color: #666; font-size: 12px; }

/* ===== 登录 ===== */
.login-page { min-height: 100vh; display: grid; place-items: center; background: #eef4fb; }
.login-card {
  display: grid; width: min(420px, 92vw); gap: 16px; padding: 28px;
  border: 1px solid var(--border-input); border-radius: var(--radius-lg); background: #fff;
  box-shadow: 0 18px 48px rgba(15,23,42,.12);
}
.login-brand { display: grid; gap: 6px; }
.login-brand span { color: var(--accent-blue); font-size: 12px; font-weight: 700; }
.login-brand strong { color: var(--text-strong); font-size: 24px; }
.login-card label { display: grid; gap: 7px; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.login-card input {
  min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-input);
  border-radius: var(--radius); background: #fff; color: var(--text-strong); outline: none;
}
.login-card input:focus { border-color: #64748b; }
.login-submit { justify-content: center; min-height: 38px; }
.login-error { color: var(--danger-text); font-size: 12px; text-align: center; }

/* ===== 主壳 / 左侧导航 ===== */
.shell { display: flex; min-height: 100vh; }
.main-nav {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  flex: 0 0 12.5vw; width: 12.5vw;
  height: 100vh; padding: 18px 0 12px;
  border-right: 1px solid #e8ebf0; background: #fff;
  position: sticky; top: 0; z-index: 50;
  overflow: visible;
  transition: flex-basis .28s ease, width .28s ease, min-width .28s ease, max-width .28s ease, padding .28s ease;
}
.nav-brand { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 20px 14px; font-size: 18px; font-weight: 800; color: #111827; white-space: nowrap; border-bottom: 1px solid #eef1f5; }
.nav-brand .icon-16 { width: 24px; height: 24px; padding: 5px; border-radius: 8px; background: #111827; color: #fff; }
.brand-text,
.nav-text,
.profile-name {
  display: inline-block; max-width: 180px; opacity: 1; overflow: hidden;
  transition: max-width .22s ease, opacity .18s ease, transform .22s ease;
}
.nav { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex: 1; padding-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 20px;
  border: 0; border-radius: 0; background: transparent; color: #20243a; cursor: pointer; font-size: 14px; font-weight: 650; white-space: nowrap; text-align: left;
}
.nav-item .icon { width: 19px; height: 19px; color: #6b7280; }
.nav-item:hover { background: #f7f7fb; color: #111827; }
.nav-item:hover .icon { color: #111827; }
.nav-item.active { background: #eee9ff; color: #5637d9; font-weight: 750; box-shadow: inset 3px 0 0 #6d4aff; }
.nav-item.active .icon { color: #5637d9; }
.sidebar-toggle { margin: 2px 0 8px; color: #334155; font-weight: 700; background: #fafbfc; border-top: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; }
.main-nav-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 12px 0; border-top: 1px solid #eef1f5; }
.top-nav-button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid #d5dce6; border-radius: var(--radius); background: #fff;
  color: var(--text-strong); cursor: pointer; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.top-nav-button:hover { border-color: #b8c2d0; background: #f8fafc; }
.top-icon-box {
  display: grid; place-items: center; width: 24px; height: 24px;
  border: 1px solid #cdd8e8; border-radius: 5px; background: #f4f8ff; color: #475569;
}
.nav-alert-button { padding-left: 10px; justify-content: flex-start; width: 100%; border-color: #edf0f4; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.alert-count {
  display: inline-grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px;
  border: 1px solid #cbd5e1; border-radius: 999px; background: #eef2f7;
  color: #0f172a; font-size: 11px; font-weight: 800; line-height: 1;
}
.pill { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: #111; color: #fff; font-size: 10px; font-weight: 700; text-align: center; }
.profile-menu-wrap { position: relative; z-index: 120; }
.profile-top { display: flex; align-items: center; gap: 9px; width: 100%; height: 42px; padding: 0 12px 0 8px; border: 1px solid #edf0f4; border-radius: 8px; background: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.profile-top:hover { border-color: #b8c2d0; background: #f8fafc; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.profile-name { color: #111; font-size: 14px; font-weight: 700; }
.profile-role { color: #999; font-size: 11px; }
.profile-menu { position: absolute; left: calc(100% + 8px); bottom: 0; min-width: 190px; padding: 6px; border: 1px solid var(--border-default); border-radius: var(--radius); background: #fff; box-shadow: 0 14px 30px rgba(15,23,42,.12); z-index: 160; }
.profile-menu button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); text-align: left; cursor: pointer; }
.profile-menu button:hover { background: var(--bg-subtle); color: #111; }
.profile-menu button.danger { color: #991b1b; }
.profile-menu button.danger:hover { background: #fef2f2; color: #7f1d1d; }
.shell.sidebar-collapsed .main-nav { flex-basis: 64px; width: 64px; min-width: 64px; max-width: 64px; padding: 18px 0 12px; }
.shell.sidebar-collapsed .brand-text,
.shell.sidebar-collapsed .nav-text,
.shell.sidebar-collapsed .profile-name { max-width: 0; opacity: 0; transform: translateX(-4px); }
.shell.sidebar-collapsed .nav-brand,
.shell.sidebar-collapsed .nav-item,
.shell.sidebar-collapsed .top-nav-button,
.shell.sidebar-collapsed .profile-top { justify-content: center; padding-left: 0; padding-right: 0; }
.shell.sidebar-collapsed .nav-brand { padding-left: 0; padding-right: 0; }
.shell.sidebar-collapsed .main-nav-actions { padding-left: 8px; padding-right: 8px; }
.shell.sidebar-collapsed .nav-alert-button { position: relative; }
.shell.sidebar-collapsed .alert-count { position: absolute; top: -4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }

/* ===== 内容 ===== */
.content { padding: 20px 28px 48px; flex: 1; min-width: 0; transition: flex-basis .28s ease, width .28s ease, padding .28s ease; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.actions { display: flex; align-items: center; gap: 8px; }

/* ===== 主页 ===== */
.home-page { display: grid; gap: 18px; max-width: 1180px; }
.home-markdown {
  display: grid; gap: 12px; padding: 22px 24px;
  border: 1px solid var(--border-default); border-radius: 8px; background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.home-markdown h1 { font-size: 22px; line-height: 1.35; }
.home-markdown p { color: #334155; line-height: 1.8; }
.home-md-block {
  display: grid; gap: 4px; padding: 14px 16px;
  border-left: 4px solid #111827; background: #f8fafc; border-radius: 6px;
}
.home-links { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; }
.home-link-card {
  position: relative; display: grid; align-content: center; gap: 10px; min-height: 170px; padding: 26px 160px 26px 26px;
  border: 1px solid #d7dde7; border-radius: 22px; text-align: left; cursor: pointer;
  background: #fff; color: #111827; box-shadow: 0 16px 36px rgba(15,23,42,.08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  overflow: hidden;
}
.home-link-card:hover { transform: translateY(-2px); box-shadow: 0 22px 48px rgba(15,23,42,.12); border-color: #111827; }
.home-link-card span { font-size: 22px; font-weight: 850; letter-spacing: 0; }
.home-link-card small { color: #475569; font-size: 13px; line-height: 1.7; }
.home-link-primary { background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%); }
.home-link-secondary { background: linear-gradient(180deg, #ffffff 0%, #f5fbf7 100%); }
.home-card-art {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 104px; height: 104px; border-radius: 24px;
  border: 1px solid rgba(15,23,42,.10); background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 12px 28px rgba(15,23,42,.10);
}
.home-card-art::before,
.home-card-art::after { content: ""; position: absolute; display: block; }
.account-art::before {
  left: 22px; top: 22px; width: 28px; height: 28px; border-radius: 50%;
  background: #2563eb; box-shadow: 34px 0 0 #8b5cf6, 17px 34px 0 #0f172a;
}
.account-art::after {
  left: 17px; top: 64px; width: 70px; height: 14px; border-radius: 999px;
  background: #dbeafe; box-shadow: 0 -28px 0 -4px #ede9fe;
}
.proxy-art::before {
  left: 22px; top: 20px; width: 60px; height: 60px; border-radius: 18px;
  border: 3px solid #16a34a; box-shadow: 0 0 0 10px #dcfce7;
}
.proxy-art::after {
  left: 21px; top: 70px; width: 62px; height: 8px; border-radius: 999px;
  background: #111827; box-shadow: 0 -24px 0 -2px #22c55e, 0 -46px 0 -3px #86efac;
}
@media (max-width: 760px) {
  .home-links { grid-template-columns: 1fr; }
  .home-link-card { padding-right: 126px; }
  .home-card-art { right: 18px; width: 86px; height: 86px; border-radius: 20px; }
}

/* ===== 按钮 ===== */
.ghost-button, .primary-button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 7px 14px;
  border-radius: var(--radius); cursor: pointer; font-size: 12px;
}
.ghost-button { border: 1px solid var(--border-default); background: #fff; color: #666; }
.ghost-button:hover { border-color: #cbd5e1; color: #333; }
.top-action-button.active { border-color: var(--border-default); color: #111; background: var(--border-default); font-weight: 800; }
.primary-button { border: 0; background: #111; color: #fff; font-weight: 600; }
.primary-button:hover { background: #222; }
.primary-button:disabled { opacity: .5; cursor: not-allowed; }
.danger-button { color: var(--danger-text); border-color: var(--border-default); }
.compact-button { padding: 5px 10px; min-height: 28px; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border-default); border-radius: var(--radius); background: #fff; color: #666; cursor: pointer; }
.icon-button:hover { border-color: #cbd5e1; }
.icon-button:disabled { opacity: .4; cursor: not-allowed; }

/* ===== KPI ===== */
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.metric { text-align: left; padding: 12px 14px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: #fff; cursor: pointer; }
.metric:hover, .metric.active { border-color: #111; box-shadow: 0 0 0 1px #111 inset; }
.metric span { display: block; margin-bottom: 4px; color: #999; font-size: 11px; }
.metric strong { display: block; color: #111; font-size: 22px; font-weight: 650; }
.metric small { color: #999; font-size: 11px; }
.metric-urgent strong { color: #dc2626; }
.metric-urgent small b { color: #dc2626; font-weight: 700; }
.metric-urgent:hover, .metric-urgent.active { border-color: #dc2626; box-shadow: 0 0 0 1px #dc2626 inset; }
.metric-dead strong { color: #7c3aed; }
.metric-dead:hover, .metric-dead.active { border-color: #7c3aed; box-shadow: 0 0 0 1px #7c3aed inset; }

/* ===== SKU 图片：缩略图 / 悬停预览 ===== */
.shot-thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 3px; vertical-align: middle; cursor: pointer; border: 1px solid #e5e7eb; transition: outline .08s; }
.shot-thumb:hover { outline: 2px solid var(--accent-blue); }
.sku-image-button { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sku-preview {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 220; display: grid; gap: 6px; width: min(530px, 72vw);
  padding: 8px; border: 1px solid #d9e2ef; border-radius: var(--radius-lg);
  background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.22);
  opacity: 0; visibility: hidden; pointer-events: none; transition: none;
}
.sku-preview img { width: 100%; max-height: min(530px, 56vh); object-fit: contain; border-radius: 4px; background: #f8fafc; }
.sku-preview small { color: var(--text-soft); font-size: 11px; text-align: center; }
.sku-image-button:hover .sku-preview { opacity: 1; visibility: visible; transition: opacity .12s ease .5s, visibility 0s linear .5s; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.82); display: grid; place-items: center; cursor: zoom-out; }
.lightbox-img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 4px; box-shadow: 0 24px 70px rgba(0,0,0,.55); cursor: default; }
.lightbox-close { position: fixed; top: 16px; right: 22px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #111; font-size: 17px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: #fff; }

/* ===== 发货倒计时（实时） ===== */
/* 与 badge-deadline-* 同一设计语言：浅底 + 同色深字 + 1px 浅色边；绿→琥珀→橙→红 渐变 */
.cd { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; border: 1px solid transparent; }
.cd-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }       /* >48h 充裕·绿 */
.cd-warn { background: #fef3c7; color: #a16207; border-color: #fde68a; }     /* 24-48h·琥珀 */
.cd-danger { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }   /* <24h·橙 */
.cd-overdue { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }  /* 已超时·柔和红 */

/* ===== 表格框 ===== */
.grid-frame { border: 1px solid var(--border-grid); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.grid-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 50px; padding: 8px 10px; border-bottom: 1px solid #eef2f7; background: #fff; }
.toolbar-spacer { flex: 1 1 auto; min-width: 16px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.selection-actions {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 6px 3px 10px;
  border: 1px solid #c7d2fe; border-radius: var(--radius); background: #eef2ff; color: #334155;
}
.selection-actions span { font-size: 12px; color: #334155; white-space: nowrap; }
.selection-actions strong { color: #111; font-weight: 800; }
/* 选中订单后的醒目操作条（独立一行，满宽，蓝色强调，不可错过）*/
.selection-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #eff6ff; border-bottom: 1px solid #bfdbfe; }
.selection-bar .icon { width: 18px; height: 18px; }
.selection-bar-count { font-size: 13px; color: #1e3a8a; font-weight: 600; white-space: nowrap; }
.selection-bar-count strong { color: #1d4ed8; font-size: 16px; font-weight: 800; margin: 0 2px; }
.selection-bar-hint { font-size: 11px; color: #64748b; white-space: nowrap; }
.user-search-box { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--border-input); border-radius: var(--radius); background: #fff; color: var(--text-soft); width: min(300px, 100%); }
.user-search-box input { width: 100%; border: 0; background: transparent; color: #111; outline: none; font-size: 12px; }
.user-search-box input::placeholder { color: var(--text-faint); }
.user-search-box textarea {
  width: 100%; height: 28px; min-height: 28px; max-height: 74px; padding: 5px 0;
  border: 0; background: transparent; color: #111; outline: none; font-size: 12px;
  resize: vertical; line-height: 18px;
}
.user-search-box textarea::placeholder { color: var(--text-faint); }
.keyword-search-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; min-width: 78px; padding: 0 12px;
  border: 1px solid #111827; border-radius: var(--radius); background: #111827;
  color: #fff; cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.keyword-search-button:hover { background: #020617; border-color: #020617; box-shadow: 0 6px 14px rgba(15,23,42,.12); }
.keyword-search-button:disabled { opacity: .72; cursor: wait; box-shadow: none; }
.keyword-search-button.active {
  border-color: #cbd5e1; background: #fff; color: #111827;
}
.keyword-search-button.active:hover { border-color: #94a3b8; background: #f8fafc; box-shadow: 0 4px 10px rgba(15,23,42,.08); }
.keyword-search-button .icon { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.keyword-search-button.loading .search-spin-icon {
  animation: keyword-search-spin .72s linear infinite;
}
@keyframes keyword-search-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.filter-select { height: 36px; padding: 0 10px; border: 1px solid var(--border-input); border-radius: var(--radius); background: #fff; color: #111; font-size: 12px; cursor: pointer; }
.stats-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; }
.stats-tabs button { min-height: 30px; padding: 0 14px; border: 0; border-radius: 5px; background: transparent; color: #475569; cursor: pointer; font-weight: 700; }
.stats-tabs button.active { background: #111827; color: #fff; }

/* ===== 表格 ===== */
.grid { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.grid thead th { height: 34px; padding: 0 8px; border-right: 1px solid var(--border-grid); border-bottom: 1px solid var(--border-grid); background: #fff; color: var(--text-strong); font-size: 12px; font-weight: 700; text-align: center; }
.grid tbody td { height: 40px; padding: 5px 8px; border-right: 1px solid var(--border-grid); border-bottom: 1px solid var(--border-grid); text-align: center; vertical-align: middle; color: #111; font-weight: 500; }
.grid tbody tr:hover td { background: var(--bg-subtle); }
.workbench-scroll { background: #fff; }
.grid-scroll { cursor: default; }
.grid-scroll.grid-panning, .grid-pan-active .grid-scroll { cursor: grabbing; }
.orders-grid thead th[style*="background"] { background: #f8fbff !important; color: #0f172a; }
.orders-grid tbody tr:hover .order-snapshot-cell { background: #eef6ff; }
.order-snapshot-cell {
  background: #f8fbff; color: #334155; font-size: 11px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-snapshot-cell.code-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.order-snapshot-image { padding: 2px 4px !important; }
.snapshot-image-button {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 5px; background: transparent; cursor: zoom-in;
}
.snapshot-thumb { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }
.purchase-grid { border-collapse: separate; border-spacing: 0; background: #fff; }
.purchase-grid thead th { background: #f8fafc; border-bottom-color: #cbd7e6; box-shadow: inset 0 -1px 0 rgba(148,163,184,.18); }
.purchase-grid thead th[style*="background"] { background: #f4f8ff !important; color: #0f172a; }
.purchase-grid tbody td { height: 48px; border-color: #d9e2ef; }
.purchase-grid tbody td[style*="background:#f7fbff"] { background: #f8fbff !important; }
.purchase-grid tbody tr:hover td[style*="background:#f7fbff"] { background: #eef6ff !important; }
.purchase-grid .cell-input {
  min-height: 26px; padding: 4px 7px; border-color: #e2e8f0; background: rgba(255,255,255,.82);
  color: #0f172a; font-size: 11px; line-height: 1.2;
}
.purchase-grid .cell-input:hover { border-color: #bfdbfe; background: #fff; }
.purchase-grid .cell-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 2px rgba(37,99,235,.10); }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.purchase-grid .arrival-input { border-color: transparent; background: transparent; text-align: center; padding-left: 0; padding-right: 0; }
.purchase-grid .arrival-input::placeholder { color: #111; opacity: 1; }
.users-grid tbody td { height: 46px; }
.user-cell { display: flex; align-items: center; gap: 9px; text-align: left; }
.user-cell strong { display: block; color: var(--text-strong); font-size: 12px; }
.user-cell small { display: block; margin-top: 2px; color: var(--text-faint); font-size: 10px; }
.mini-avatar { width: 28px; height: 28px; background: #e8f0ff; color: #1d4ed8; }
.row-actions { display: flex; justify-content: center; gap: 6px; }
.danger-icon { color: var(--danger-text); }
.danger-icon:disabled { color: #cbd5e1; }
.empty-cell { height: 96px !important; color: var(--text-faint) !important; font-weight: 500 !important; }

/* 可拖拽列宽 */
.grid-resizable { table-layout: fixed; }
.grid-resizable thead th, .grid-resizable tbody td { overflow: hidden; text-overflow: ellipsis; }
.grid thead th { position: sticky; top: 0; z-index: 4; }
.grid th.select-col, .grid td.select-col {
  position: sticky; left: 0; z-index: 8; width: 52px; min-width: 52px; max-width: 52px;
  background: #fff; box-shadow: 1px 0 0 rgba(214, 219, 227, .3);
}
.grid thead th.select-col { z-index: 12; }
.grid tbody tr:hover td.select-col { background: var(--bg-subtle); }
.col-resizer { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 5; }
.col-resizer:hover { background: rgba(37, 99, 235, .35); }
.grid thead th.th-filtered, .grid thead th.th-sorted { background: #f8fbff; }
.grid thead th.th-filtered { box-shadow: inset 0 -2px 0 var(--accent-blue); }
.th-shell { display: flex; align-items: center; justify-content: center; gap: 2px; height: 100%; min-width: 0; }
.th-title-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 2px;
  border: 0; background: transparent; color: var(--text-strong);
  font-size: 12px; font-weight: 700; cursor: pointer; overflow: hidden;
}
.th-title-button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-title-button:disabled { cursor: default; }
.module-th-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-mark { flex: 0 0 auto; color: var(--accent-blue); font-size: 12px; font-weight: 800; line-height: 1; }
.th-filter-button {
  display: inline-grid; place-items: center; flex: 0 0 20px; width: 20px; height: 22px;
  border: 1px solid transparent; border-radius: 4px; background: transparent;
  color: #94a3b8; cursor: pointer;
}
.th-filter-button:hover { border-color: #cbd5e1; background: #fff; color: var(--text-strong); }
.th-filter-button.active { border-color: #bfdbfe; background: #eff6ff; color: var(--accent-blue); }
.th-filter-button .icon { width: 12px; height: 12px; }
.header-filter-popover {
  position: fixed; z-index: 180; width: min(340px, calc(100vw - 24px)); max-height: min(430px, calc(100vh - 24px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #d9e2ef; border-radius: var(--radius-lg); background: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.18);
}
.header-filter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 42px; padding: 8px 10px; border-bottom: 1px solid #eef2f7;
}
.header-filter-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-size: 13px; }
.header-filter-sort { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #eef2f7; }
.header-filter-sort button {
  display: grid; place-items: center; gap: 3px; min-height: 50px; padding: 6px 4px;
  border: 0; border-right: 1px solid #eef2f7; background: #fff; color: var(--text-muted); cursor: pointer; font-size: 12px;
}
.header-filter-sort button:last-child { border-right: 0; }
.header-filter-sort button:hover { background: #f8fafc; color: #111; }
.header-filter-sort span { color: var(--accent-blue); font-size: 11px; font-weight: 800; }
.header-filter-duplicates { display: grid; gap: 6px; padding: 9px 10px; border-bottom: 1px solid #eef2f7; background: #fbfcfe; }
.dup-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dup-row span { flex: 0 0 70px; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.dup-row button {
  min-height: 24px; padding: 0 8px; border: 1px solid #dbe4ef; border-radius: 5px;
  background: #fff; color: #475569; cursor: pointer; font-size: 11px; font-weight: 700;
}
.dup-row button:hover, .dup-row button.active { border-color: #94a3b8; background: #f8fafc; color: #111; }
.dup-row .dup-red-action { color: #b91c1c; border-color: #fecaca; }
.dup-row .dup-red-action.active { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.dup-row .dup-yellow-action { color: #a16207; border-color: #fde68a; }
.dup-row .dup-yellow-action.active { background: #fef3c7; border-color: #eab308; color: #854d0e; }
.dup-row b { margin-left: 3px; font-weight: 800; }
.header-filter-search {
  display: flex; align-items: center; gap: 7px; margin: 10px 10px 6px; min-height: 32px; padding: 0 8px;
  border: 1px solid var(--border-input); border-radius: var(--radius); color: var(--text-soft);
}
.header-filter-search input { width: 100%; border: 0; outline: none; color: #111; font-size: 12px; }
.header-filter-tools { display: flex; align-items: center; gap: 8px; padding: 0 10px 8px; color: var(--text-soft); font-size: 11px; }
.header-filter-tools button { border: 0; background: transparent; color: var(--accent-blue); cursor: pointer; padding: 0; font-size: 11px; }
.header-filter-tools span { margin-left: auto; }
.header-filter-list { flex: 1 1 auto; min-height: 120px; overflow: auto; padding: 2px 6px 8px; border-top: 1px solid #f1f5f9; }
.header-filter-option {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  min-height: 28px; padding: 4px 6px; border-radius: 5px; color: #111; cursor: pointer;
}
.header-filter-option:hover { background: #f8fafc; }
.header-filter-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-filter-option small { color: var(--text-faint); font-size: 11px; }
.header-filter-empty { padding: 22px 10px; text-align: center; color: var(--text-faint); }
.header-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #eef2f7; background: #fff; }
body.sheet-selecting { user-select: none; cursor: cell; }
.grid tbody td.sheet-cell-selected {
  position: relative; background: #dbeafe !important; box-shadow: inset 0 0 0 1px #60a5fa;
}
.grid tbody td.sheet-cell-anchor { box-shadow: inset 0 0 0 2px #2563eb; }
.grid tbody td.sheet-dup-red { color: #dc2626 !important; font-weight: 800; }
.grid tbody td.sheet-dup-yellow { color: #ca8a04 !important; font-weight: 800; }
.grid tbody td.sheet-dup-red input,
.grid tbody td.sheet-dup-red select,
.grid tbody td.sheet-dup-red textarea { color: #dc2626 !important; font-weight: 800; }
.grid tbody td.sheet-dup-yellow input,
.grid tbody td.sheet-dup-yellow select,
.grid tbody td.sheet-dup-yellow textarea { color: #ca8a04 !important; font-weight: 800; }
/* 工作台内联可编辑单元格 */
.cell-input { width: 100%; border: 1px solid transparent; background: transparent; padding: 3px 4px; font-size: 11px; border-radius: 4px; color: #111; }
.cell-input:hover { border-color: #cdd9ea; }
.cell-input:focus { border-color: var(--accent-blue); background: #fff; outline: none; }
/* 截图单元格：聚焦后可 Ctrl+V 粘贴，给个明显蓝框提示「就绪」 */
/* 物流工作台「查询状态」下拉三态着色 */
select.qs-waiting { color: #64748b; }
select.qs-shipped { color: #16a34a; font-weight: 600; }
select.qs-dead    { color: #b91c1c; font-weight: 600; }
/* 运营工作台「回传结果」下拉三态着色 */
select.upload-pending { color: #64748b; }
select.upload-done { color: #16a34a; font-weight: 600; }
select.upload-failed { color: #b45309; font-weight: 600; }
.shot-cell { cursor: pointer; outline: none; }
.shot-cell:focus { box-shadow: inset 0 0 0 2px var(--accent-blue); background: #eaf2ff !important; }
.shot-control {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 38px; min-width: 72px; padding: 2px 4px;
  border: 1px solid #d7e2ef; border-radius: 6px; background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.shot-control.is-empty { border-style: dashed; background: #fbfdff; }
.shot-cell:hover .shot-control { border-color: #9fc4f3; box-shadow: 0 2px 8px rgba(37,99,235,.10); }
.shot-preview-button {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 5px; background: #f8fafc; overflow: hidden; cursor: zoom-in;
}
.shot-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-empty-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px dashed #cbd5e1; border-radius: 5px; color: #64748b; background: #f8fafc;
}
.shot-empty-mark .icon { width: 16px; height: 16px; }
.shot-actions { display: grid; gap: 3px; align-content: center; }
.shot-icon-button {
  display: grid; place-items: center; width: 22px; height: 17px; padding: 0;
  border: 1px solid #dbe5f1; border-radius: 4px; background: #f8fafc; color: #475569;
  cursor: pointer;
}
.shot-icon-button:hover { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.shot-icon-button.danger { border-color: #fee2e2; color: #b91c1c; background: #fff7f7; }
.shot-icon-button.danger:hover { border-color: #fca5a5; background: #fee2e2; }
.shot-icon-button .icon { width: 11px; height: 11px; }
.shot-delete-button { margin-left: 2px; min-height: 20px; padding: 1px 5px; border: 1px solid #fecaca; border-radius: 4px; background: #fff7f7; color: #b91c1c; font-size: 10px; line-height: 1; cursor: pointer; vertical-align: middle; }
.shot-delete-button:hover { background: #fee2e2; border-color: #fca5a5; }
/* ===== 采购状态：横向单行状态条（ADR-0004 · 操作区右钉，替代纵向堆叠） ===== */
/* 胶囊·分隔点·计时器·第N次·操作区一行排布，align-items:center 垂直居中，nowrap 永不纵向堆叠 */
.ws-bar { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; white-space: nowrap; min-height: 22px; }
/* 计时器：等宽数字，秒级跳动不抖、同列右缘对齐 */
.ws-timer { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #475569; font-variant-numeric: tabular-nums; line-height: 1; }
/* 胶囊与计时器间的极淡圆点，强化「态｜时长」一体感，仅有计时器时出现 */
.ws-dot { flex: 0 0 auto; width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }
.ws-attempts { color: #94a3b8; font-size: 10px; line-height: 1; }
/* 操作区：margin-left:auto 把按钮钉到单元格右缘——每行按钮右缘对齐成竖线，消除参差 */
.ws-actions { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; margin-left: auto; flex-shrink: 0; }
/* 紧凑按钮：覆盖 .compact-button 的 28px 高度，压到与 .cd 胶囊(20px)同档 */
.ws-btn { padding: 2px 8px; min-height: 22px; height: 22px; font-size: 10px; line-height: 1; white-space: nowrap; }
.ws-btn-danger { color: #b91c1c; }
.grid-paging { display: flex; align-items: center; justify-content: flex-end; gap: 18px; height: 42px; padding: 0 14px; background: #fff; border-top: 1px solid #d7d7d7; color: var(--text-muted); font-size: 12px; }
.grid-paging select { height: 26px; padding: 0 6px; border: 1px solid var(--border-input); border-radius: 5px; background: #fff; color: #111; }
.pager-controls { display: inline-flex; align-items: center; gap: 10px; }
.pager-controls button:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 徽标 ===== */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-success { background: #dbeafe; color: #1d4ed8; }
.badge-success-soft { background: #dcfce7; color: #166534; }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.badge-yellow { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.badge-pending { background: #f1f5f9; color: var(--text-muted); }
.badge-danger { background: #fee2e2; color: var(--danger-text); }
.badge-deadline-overdue { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-deadline-danger { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-deadline-warning { background: #fef3c7; color: #a16207; border: 1px solid #fde68a; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.platform-shein { background: #fce7f3; color: #be185d; min-width: 40px; }
.platform-ali { background: #fff7ed; color: #c2410c; min-width: 40px; }
.type-fbm { border: 1px solid #93c5fd; color: #1d4ed8; background: #eff6ff; min-width: 34px; }
.type-fba { border: 1px solid #6ee7b7; color: #065f46; background: #ecfdf5; min-width: 34px; }

/* ===== 模态 ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,17,17,.28); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal { width: min(820px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 18px 48px rgba(0,0,0,.16); }
.modal-sm { width: min(560px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.modal-section-title { font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #f1f5f9; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid label { display: grid; gap: 5px; color: #666; font-size: 11px; font-weight: 650; }
.form-grid .wide { grid-column: span 2; }
.form-grid .full { grid-column: span 3; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 34px; padding: 7px 10px; border: 1px solid var(--border-input); border-radius: var(--radius); outline: none; color: #111; font-size: 12px; background: #fff; }
.form-grid textarea { resize: vertical; line-height: 1.5; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #64748b; }
.form-grid input:disabled { background: var(--bg-subtle); color: #999; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.ops-specialist-modal { width: min(920px, 96vw); max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; }
.ops-specialist-list { display: grid; gap: 12px; overflow: auto; padding-right: 4px; }
.ops-specialist-picker { padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: #fbfcfe; }
.ops-specialist-picker label { display: grid; grid-template-columns: 82px minmax(0, 280px); gap: 10px; align-items: center; color: var(--text-muted); font-weight: 700; }
.ops-specialist-picker select { min-height: 34px; padding: 0 10px; border: 1px solid var(--border-input); border-radius: var(--radius); background: #fff; color: #111; }
.ops-specialist-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: #fff; }
.ops-specialist-head { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 8px; align-items: center; }
.ops-specialist-head input { min-height: 34px; padding: 7px 10px; border: 1px solid var(--border-input); border-radius: var(--radius); outline: none; }
.ops-shop-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; max-height: 170px; overflow: auto; padding: 8px; border: 1px solid #eef2f7; border-radius: var(--radius); background: #fbfcfe; }
.ops-shop-list label { display: flex; align-items: center; gap: 7px; min-width: 0; color: #334155; }
.ops-shop-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-modal {
  width: min(1080px, 96vw); max-height: 90vh; overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.import-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border-soft); background: #fff;
}
.import-title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.import-title h2 { font-size: 16px; line-height: 1.2; }
.import-title p { margin-top: 4px; color: var(--text-soft); }
.import-icon, .import-drop-icon, .import-result-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid #bfdbfe; border-radius: var(--radius); background: #eff6ff; color: var(--accent-blue);
}
.import-body { padding: 14px 18px 0; overflow-y: auto; background: #fff; }
.import-template-row { margin-bottom: 12px; }
.import-template-row label { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-weight: 700; }
.import-source {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
}
.import-drop {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 58px; padding: 9px 12px; border: 1px dashed #cbd5e1; border-radius: var(--radius-lg);
  background: #fbfcfe; cursor: pointer;
}
.import-drop:hover { border-color: #94a3b8; background: #f8fafc; }
.import-drop input { display: none; }
.import-drop-main { overflow: hidden; color: var(--text-strong); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.import-drop-sub { color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.import-state { display: flex; justify-content: flex-end; min-width: 76px; }
.import-error { margin-top: 10px; text-align: left; }
.import-empty, .import-loading {
  display: grid; place-items: center; gap: 6px; min-height: 210px;
  color: var(--text-faint); border: 1px solid #eef2f7; border-radius: var(--radius-lg);
  background: #fbfcfe; margin-top: 12px;
}
.import-empty strong, .import-loading strong { color: var(--text-muted); font-size: 13px; }
.import-loading span {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: #111;
  animation: import-spin .8s linear infinite;
}
@keyframes import-spin { to { transform: rotate(360deg); } }
.import-preview { margin-top: 12px; }
.import-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; background: #fff;
}
.import-summary div { min-height: 82px; padding: 12px 14px; border-right: 1px solid var(--border-soft); }
.import-summary div:last-child { border-right: 0; }
.import-summary span { display: block; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.import-summary strong {
  display: block; min-width: 0; margin-top: 5px; color: var(--text-strong);
  font-size: 24px; line-height: 1.05; font-weight: 780; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.import-summary small { display: block; margin-top: 6px; color: var(--text-faint); }
.import-summary .warn strong { color: #c2410c; }
.import-summary .ok strong { color: #166534; }
.import-meta {
  display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 10px;
}
.import-meta > div {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  min-height: 38px; padding: 8px 10px; border: 1px solid #eef2f7; border-radius: var(--radius);
  background: #fbfcfe; color: var(--text-muted);
}
.import-meta b { color: var(--text-strong); margin-right: 2px; }
.import-meta span:not(.badge) {
  max-width: 180px; padding: 3px 7px; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.import-warning-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-top: 10px; padding: 9px 10px; border: 1px solid var(--warn-border); border-radius: var(--radius);
  background: var(--warn-bg); color: var(--warn-text);
}
.import-warning-panel strong { margin-right: 2px; color: #7c2d12; }
.import-warning-panel span {
  padding: 3px 7px; border-radius: 999px; background: #fff; border: 1px solid #fed7aa; font-size: 11px;
}
.import-preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; margin-bottom: 8px;
}
.import-preview-head strong { color: var(--text-strong); font-size: 13px; }
.import-preview-head span { color: var(--text-faint); font-size: 11px; }
.import-table-wrap {
  max-height: min(42vh, 420px); overflow: auto; border: 1px solid var(--border-grid);
  border-radius: var(--radius-lg); background: #fff;
}
.import-table { min-width: 1180px; font-size: 11px; }
.import-table tbody td { height: 34px; font-size: 11px; }
.import-table tbody td:nth-child(4) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.import-result {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; padding: 18px;
  border: 1px solid #bbf7d0; border-radius: var(--radius-lg); background: #f0fdf4;
}
.import-result-mark { border-color: #86efac; background: #dcfce7; color: #166534; }
.import-result h2 { color: #14532d; }
.import-result p { margin-top: 5px; color: #166534; }
.import-result-errors { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; color: var(--danger-text); }
.import-result-errors span { font-size: 11px; }
.import-actions { margin: 0; padding: 12px 18px; background: #fbfcfe; flex-shrink: 0; }
.import-action-meta { flex: 1; color: var(--text-faint); font-size: 11px; min-width: 0; }
.batch-submit-modal {
  width: min(720px, 94vw); max-height: 88vh; overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.batch-submit-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border-soft); background: #fff;
}
.batch-submit-title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.batch-submit-title h2 { font-size: 16px; line-height: 1.2; }
.batch-submit-title p { margin-top: 4px; color: var(--text-soft); }
.batch-submit-icon {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid #bfdbfe; border-radius: var(--radius); background: #eff6ff; color: var(--accent-blue);
}
.batch-submit-body { padding: 14px 18px 16px; overflow-y: auto; background: #fff; }
.batch-submit-summary {
  display: grid; grid-template-columns: 1.05fr 1fr 1fr;
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg); overflow: hidden; background: #fff;
}
.batch-summary-cell { min-height: 84px; padding: 12px 14px; border-right: 1px solid var(--border-soft); background: #fff; }
.batch-summary-cell:last-child { border-right: 0; }
.batch-summary-cell span { display: block; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.batch-summary-cell strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 28px; line-height: 1; font-weight: 750; }
.batch-summary-cell small { display: block; margin-top: 6px; color: var(--text-faint); }
.batch-summary-cell.success strong { color: #166534; }
.batch-summary-cell.warn strong { color: #c2410c; }
.batch-summary-cell.danger strong { color: #b91c1c; }
.batch-route {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; padding: 9px 10px; border: 1px solid #e8edf5; border-radius: var(--radius);
  background: var(--bg-subtle); color: var(--text-muted);
}
.batch-route .badge { min-width: auto; height: 19px; padding: 0 7px; }
.batch-detail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; margin-bottom: 8px;
}
.batch-detail-head strong { color: var(--text-strong); font-size: 13px; }
.batch-detail-head span { color: var(--text-faint); font-size: 11px; }
.batch-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.batch-detail-panel {
  border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: #fff; overflow: hidden;
}
.batch-detail-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 34px; padding: 7px 10px; border-bottom: 1px solid #eef2f7; background: #fbfcfe;
}
.batch-detail-title b { color: var(--text-muted); font-size: 11px; }
.batch-order-list {
  min-height: 112px; max-height: 150px; overflow: auto; padding: 9px;
  display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
}
.batch-order-list span:not(.batch-empty) {
  max-width: 100%; padding: 3px 7px; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #f8fafc; color: #334155; font-size: 11px; line-height: 1.4;
}
.batch-empty { color: var(--text-faint); font-size: 11px; }
.batch-submit-actions {
  margin: 0; padding: 12px 18px; border-top: 1px solid var(--border-soft);
  background: #fbfcfe; flex-shrink: 0;
}
.batch-submit-meta { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 11px; min-width: 0; }
@media (max-width: 620px) {
  .import-source, .import-meta, .import-summary { grid-template-columns: 1fr; }
  .import-summary div { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .import-summary div:last-child { border-bottom: 0; }
  .import-drop { grid-template-columns: 34px minmax(0, 1fr); }
  .import-drop-sub { grid-column: 2; }
  .import-actions { align-items: stretch; flex-wrap: wrap; }
  .import-actions button { justify-content: center; }
  .batch-submit-summary, .batch-detail-grid { grid-template-columns: 1fr; }
  .batch-summary-cell { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .batch-summary-cell:last-child { border-bottom: 0; }
  .batch-submit-actions { align-items: stretch; flex-wrap: wrap; }
  .batch-submit-actions button { justify-content: center; }
}
.delete-note { padding: 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--bg-subtle); color: var(--text-muted); }
.delete-choice { display: grid; gap: 6px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.delete-choice label { display: flex; align-items: center; gap: 8px; color: var(--text-strong); font-weight: 650; }
.delete-choice small { color: var(--text-soft); }
.danger-primary { background: #991b1b; }
.danger-primary:hover { background: #7f1d1d; }
.delete-warning { padding: 12px; border: 1px solid #fecaca; border-radius: var(--radius); background: #fef2f2; color: #991b1b; font-weight: 700; }
.delete-confirm-box { margin-top: 12px; padding: 12px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fbfcfe; }
.delete-confirm-box label { display: grid; gap: 8px; color: #334155; font-size: 12px; font-weight: 700; }
.delete-confirm-box b { color: #991b1b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.delete-confirm-box input { min-height: 34px; padding: 7px 10px; border: 1px solid var(--border-input); border-radius: var(--radius); outline: none; color: #111; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.delete-confirm-box input:focus { border-color: #991b1b; box-shadow: 0 0 0 2px rgba(153,27,27,.08); }

/* ===== 系统设置 ===== */
.settings-layout { display: grid; grid-template-columns: minmax(280px, 420px); gap: 14px; align-items: start; }
.settings-card {
  display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); background: #fff;
}
.settings-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-card-head h2 { margin: 0 0 4px; font-size: 15px; color: var(--text-strong); }
.settings-card-head p { margin: 0; color: var(--text-muted); font-size: 12px; }
.settings-panel {
  display: grid; grid-template-columns: minmax(220px, 320px); gap: 14px;
  width: 100%;
}
.settings-panel label { display: grid; gap: 8px; color: var(--text-muted); font-weight: 700; }
.settings-panel select { min-height: 36px; padding: 0 10px; border: 1px solid var(--border-input); border-radius: var(--radius); background: #fff; color: #111; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } }

/* ===== 订单右键菜单 / SKU图片编辑 ===== */
.order-context-menu,
.sheet-context-menu {
  position: fixed; z-index: 260; width: 168px; padding: 6px;
  border: 1px solid #d9e2ef; border-radius: 8px; background: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.18);
}
.sheet-context-menu { width: 190px; }
.order-context-menu button,
.sheet-context-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 7px 9px;
  border: 0; border-radius: 6px; background: transparent; color: #111827; cursor: pointer; text-align: left;
}
.order-context-menu button:hover,
.sheet-context-menu button:hover { background: #f8fafc; }
.order-context-menu button.danger { color: #991b1b; }
.order-context-menu .icon,
.sheet-context-menu .icon { width: 15px; height: 15px; }
.sheet-batch-modal { width: min(620px, 100%); }
.sheet-batch-body { display: grid; gap: 10px; padding-top: 12px; }
.sheet-batch-label { display: grid; gap: 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.sheet-batch-label textarea,
.sheet-batch-label select {
  width: 100%; min-height: 38px; padding: 8px 10px;
  border: 1px solid var(--border-input); border-radius: var(--radius); background: #fff;
  color: #111; outline: none; font-size: 12px;
}
.sheet-batch-label textarea { resize: vertical; line-height: 1.55; font-family: inherit; }
.sheet-batch-label textarea:focus,
.sheet-batch-label select:focus { border-color: #64748b; }
.sheet-batch-hint { padding: 9px 10px; border: 1px solid #dbeafe; border-radius: var(--radius); background: #eff6ff; color: #1e3a8a; font-size: 12px; }
.sku-edit-box {
  display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 12px; align-items: center;
  padding: 10px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fbfcfe; outline: none;
}
.sku-edit-box:focus { border-color: var(--accent-blue); background: #f8fbff; }
.sku-edit-preview {
  display: grid; place-items: center; width: 104px; height: 82px; border: 1px solid #e5e7eb;
  border-radius: 6px; background: #fff; color: #94a3b8; overflow: hidden;
}
.sku-edit-preview img { width: 100%; height: 100%; object-fit: contain; }
.sku-edit-actions { display: grid; gap: 6px; justify-items: start; color: #334155; }
.sku-edit-actions strong { color: #111827; font-size: 13px; }
.sku-edit-actions small { color: #64748b; }

/* ===== Toast ===== */
.toast { position: fixed; top: 70px; right: 20px; min-width: 240px; max-width: 340px; padding: 12px 16px; border-radius: var(--radius-lg); font-size: 12px; font-weight: 600; z-index: 200; box-shadow: 0 16px 34px rgba(15,23,42,.16); }
.toast-info { background: #111; color: #fff; }
.toast-error { background: #fef2f2; color: var(--danger-text); border: 1px solid #fecaca; }

/* ===== 图标 ===== */
.icon { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.icon-16 { width: 16px; height: 16px; }
