/* 采集 ERP v2.7 — 参考现代后台布局 */
:root {
  --sidebar-w: 220px;
  --sidebar-w-collapsed: 64px;
  --sidebar-bg: #1a1d21;
  --sidebar-text: #9ca3af;
  --header-h: 56px;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.04);
}

body.theme-dark {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: #334155;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 16px rgba(0,0,0,.35);
}
body.theme-dark .header-bar,
body.theme-dark .panel,
body.theme-dark .table-panel,
body.theme-dark .modal-box,
body.theme-dark .xy-cascader-panel,
body.theme-dark .xy-cascader-trigger,
body.theme-dark .data-table th,
body.theme-dark .data-table td,
body.theme-dark .user-menu-dropdown,
body.theme-dark .notify-link,
body.theme-dark .theme-toggle,
body.theme-dark .btn,
body.theme-dark .btn-ghost,
body.theme-dark .btn-primary,
body.theme-dark .btn-danger-outline,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #111827;
  color: #e5e7eb;
  border-color: #334155;
}
body.theme-dark .data-table thead th { background: #0b1220; color: #cbd5e1; }
body.theme-dark .xy-cascader-item:hover,
body.theme-dark .user-menu-item:hover { background: #1f2937; color: #93c5fd; }
body.theme-dark .xy-cascader-item.active,
body.theme-dark .user-menu-item.active { background: #1e3a8a; color: #dbeafe; }
body.theme-dark .btn-ghost { background: #1f2937; border-color: #475569; color: #cbd5e1; }
body.theme-dark .btn-ghost:hover { background: #334155; color: #fff; }
body.theme-dark .btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
body.theme-dark .btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
body.theme-dark .btn-danger-outline { background: #1f2937; border-color: #7f1d1d; color: #fca5a5; }
body.theme-dark .btn-danger-outline:hover { background: #7f1d1d; color: #fff; }
body.theme-dark .panel-hint,
body.theme-dark .cell-sub,
body.theme-dark .xy-cascader-result-path { color: #94a3b8; }
body.theme-dark .header-bar { border-bottom-color: #334155; }
body.theme-dark .notify-link { background: #1f2937; color: #e5e7eb; }
body.theme-dark .notify-link:hover { background: #334155; }
body.theme-dark .xy-cat-panel-title,
body.theme-dark .xy-cat-selected-footer { background: #0f172a; border-color: #334155; }
body.theme-dark .xy-cascader-display::placeholder { color: #64748b; }
body.theme-dark .xy-cascader-result-item { background: #111827; border-bottom-color: #1f2937; }
body.theme-dark .xy-cascader-result-item:hover { background: #1f2937; }
body.theme-dark .xy-cascader-result-item.active { background: #1e3a8a; color: #dbeafe; }
body.theme-dark .xy-ai-suggest-bar {
  background: #172554;
  border-color: #1d4ed8;
  color: #dbeafe;
}
body.theme-dark .xy-shop-card,
body.theme-dark .xy-map-pending-row { background: #111827; border-color: #334155; }
body.theme-dark .xy-shop-state.ok { background: #14532d; color: #bbf7d0; }
body.theme-dark .xy-shop-state.warn { background: #78350f; color: #fde68a; }
body.theme-dark .xy-status-chip { background: #1f2937; color: #e5e7eb; border-color: #334155; }

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

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

/* —— 侧栏 —— */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 200;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.sidebar-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}
.sidebar-brand-text { min-width: 0; flex: 1; }
.sidebar-brand .name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-brand .ver { font-size: 11px; color: #6b7280; font-weight: 400; }
.sidebar-brand-link:hover .name { color: #60a5fa; }
.sidebar-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.14); color: #e5e7eb; }
.app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .sidebar-brand-text,
.app.sidebar-collapsed .sidebar-nav a span:not(.ico),
.app.sidebar-collapsed .nav-group-title span:not(.ico),
.app.sidebar-collapsed .nav-badge { display: none; }
.app.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 16px 8px; flex-wrap: wrap; gap: 8px; }
.app.sidebar-collapsed .sidebar-brand-link { justify-content: center; flex: 0 0 auto; min-width: auto; }
.app.sidebar-collapsed .sidebar-toggle { order: 3; width: 100%; transform: rotate(180deg); }
.app.sidebar-collapsed .sidebar-nav a,
.app.sidebar-collapsed .nav-group-title { justify-content: center; padding-left: 0; padding-right: 0; }
.app.sidebar-collapsed .nav-group .nav-sub { padding-left: 0; text-align: center; }
.app.sidebar-collapsed .workspace { margin-left: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .header-bar { left: var(--sidebar-w-collapsed); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.sidebar-nav a .ico { width: 18px; text-align: center; opacity: .85; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #e5e7eb; }
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 600;
}
.nav-group { margin: 4px 0 8px; }
.nav-group-title {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; font-size: 13px; font-weight: 600; color: #d1d5db;
}
.nav-group .nav-sub {
  display: block;
  padding: 8px 14px 8px 38px;
  font-size: 13px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 6px;
  margin: 2px 8px;
}
.nav-group .nav-sub:hover { background: rgba(255,255,255,.06); color: #e5e7eb; }
.nav-group .nav-sub.active {
  background: rgba(59,130,246,.18);
  color: #93c5fd;
  font-weight: 600;
}
.nav-group.is-open .nav-group-title { color: #e5e7eb; }
.nav-badge {
  display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; align-items: center; justify-content: center;
}
.sync-error-tag {
  display: inline-block; margin: 4px 0 2px; padding: 2px 8px; border-radius: 4px;
  background: #fee2e2; color: #b91c1c; font-size: 11px; font-weight: 600;
}
.sold-out-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  flex-shrink: 0;
}
.title-with-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}
.plugin-sync-offshelf-tag {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 4px;
  background: #fee2e2; color: #dc2626; font-size: 11px; font-weight: 700;
}
.xy-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.field-offshelf-only { display: none; }
.td-xy-status { vertical-align: top; min-width: 72px; }
.order-table-panel .table-scroll-x { overflow-x: visible; }
.order-table-v3 { width: 100%; table-layout: fixed; font-size: 13px; }
.order-table-v3 th, .order-table-v3 td { vertical-align: top; padding: 10px 12px; white-space: normal; word-break: break-word; }
.order-table { font-size: 13px; }
.order-table th, .order-table td { vertical-align: top; padding: 10px 12px; }
.order-table .order-addr { max-width: 180px; white-space: normal; word-break: break-all; }
.order-table .order-goods { min-width: 160px; white-space: normal; }
.order-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; margin-right: 6px; vertical-align: top; }
.order-st { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.order-st-12 { background: #fef3c7; color: #92400e; }
.order-refund-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  background: #fee2e2;
  color: #b91c1c;
  white-space: nowrap;
}
.mono { font-family: ui-monospace, monospace; font-size: 11px; }
#confirmOverlay .modal-box { margin: auto; }

.abnormal-modal { max-width: 560px; }
.abnormal-modal h3 { margin: 0 0 12px; font-size: 18px; color: #b91c1c; }
.abnormal-alert-body { max-height: 50vh; overflow-y: auto; }
.abnormal-alert-item + .abnormal-alert-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.abnormal-alert-title { font-weight: 600; margin-bottom: 6px; }
.abnormal-alert-msg { color: #334155; line-height: 1.55; white-space: pre-wrap; }
.abnormal-alert-meta { margin-top: 6px; font-size: 12px; color: #64748b; }
.abnormal-alert-link { margin-top: 6px; font-size: 13px; }

.sidebar-nav a.logout {
  margin-top: 20px;
  color: #f87171;
}
.sidebar-nav a.logout:hover { background: rgba(248,113,113,.1); }

/* —— 主工作区 —— */
.workspace {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header-bar {
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.header-bar .page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.notify-link {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #374151;
}
.notify-link:hover { background: #e5e7eb; }
.notify-ico { font-size: 16px; line-height: 1; }
.notify-badge {
  position: absolute;
  right: -2px;
  top: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
}
.header-search {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 0 12px;
  height: 36px;
  min-width: 200px;
}
.header-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 160px;
}
.header-icon {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.page-body {
  padding: 20px 24px 32px;
  flex: 1;
}

/* KPI */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-card .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.kpi-card .value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }

.rate-line {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  padding-left: 2px;
}

/* 筛选卡片 */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
}
.filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
}
.filter-grid .field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.field-w-keyword {
  flex: 1 1 220px;
  max-width: 300px;
}
.field-w-seller {
  flex: 0 0 132px;
  width: 132px;
}
.field-w-status {
  flex: 0 0 120px;
  width: 120px;
}
.field-w-upload {
  flex: 0 0 108px;
  width: 108px;
}
.field-w-date-range {
  flex: 0 0 auto;
}
.date-range-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.date-range-inline input[type="date"] {
  width: 142px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.date-sep {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.field input:focus,
.field select:focus,
.form-row-h .field-body input:not(.xy-cascader-display):focus,
.form-row-h .field-body textarea:focus,
.form-row-h .field-body select:focus,
.custom-price-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.notify-mark-all-form { margin: 0; }
.price-sub-hkd { color: #9ca3af; }
.filter-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { background: #f9fafb; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { background: #fff; }
.btn-danger-outline {
  color: var(--danger);
  border-color: #fecaca;
}
.btn-danger-outline:hover { background: #fef2f2; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 50;
  padding: 6px 0;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
}
.dropdown-menu button:hover { background: #f3f4f6; }
.dropdown-menu button.danger { color: var(--danger); }

/* 标签 */
.view-tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}
.view-tabs button {
  height: 36px;
  padding: 0 18px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.view-tabs button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.view-tabs .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
}
.view-tabs .tab-badge.hidden { display: none; }
.view-tabs .tab-count {
  margin-left: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.view-tabs button:not(.active) .tab-count { opacity: 0.75; }
.char-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.char-hint.over { color: #dc2626; font-weight: 600; }

.field-count-wrap {
  position: relative;
}
.field-count-wrap input,
.field-count-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  padding-right: 52px;
  padding-bottom: 22px;
}
.field-count-wrap textarea {
  min-height: 180px;
  padding-bottom: 26px;
  resize: vertical;
}
.field-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
  line-height: 1;
  background: linear-gradient(90deg, transparent, var(--card) 12px);
  padding-left: 8px;
}
.field-count.over { color: #dc2626; font-weight: 600; }
.field-count-wrap input.over-limit { border-color: #dc2626; }
.history-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.history-progress {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.history-progress .hp-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.history-progress .hp-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.history-progress .hp-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  color: #9ca3af;
  font-size: 12px;
}
.history-progress .hp-body { flex: 1; min-width: 0; }
.history-progress .hp-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.history-progress .hp-title-link {
  color: var(--text);
  text-decoration: none;
}
.history-progress .hp-title-link:hover { color: var(--primary); text-decoration: underline; }
.history-progress .hp-file { font-size: 12px; color: #2563eb; margin-bottom: 6px; word-break: break-all; }
.history-progress .hp-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.history-progress .hp-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width .2s;
}
.history-progress .hp-meta { font-size: 11px; color: #6b7280; margin-top: 4px; }

/* 表格 */
.table-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.thumb-wrap {
  position: relative;
  display: inline-block;
}
.thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  display: block;
}
.thumb-url-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: max-content;
  max-width: 320px;
  padding: 8px 10px;
  background: #1f2937;
  color: #f9fafb;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 6px;
  word-break: break-all;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  pointer-events: none;
}
.thumb-wrap:hover .thumb-url-tip { display: block; }
.thumb-cell-layout {
  display: flex;
  align-items: center;
  gap: 4px;
}
.thumb-schedule-slot {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}
.thumb-schedule-alarm {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}
.xy-schedule-dt { margin-top: 8px; max-width: 280px; }
.xy-schedule-dt.hidden { display: none; }
.schedule-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 20px;
}
.schedule-detail-grid .muted { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.schedule-options-title { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.schedule-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 24px;
}
.schedule-option-item .muted { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.schedule-option-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}
.schedule-item-thumb {
  width: 64px;
  height: 64px;
}
.schedule-item-thumb .thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-ok { background: #d1fae5; color: #047857; }
.badge-muted { background: #f3f4f6; color: #6b7280; }
.data-table tbody td:has(.thumb-wrap) { overflow: visible; position: relative; }
.td-product .title {
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}
.td-product .link { font-size: 12px; color: var(--primary); }
.td-seller .name { font-weight: 500; display: block; }
.td-seller .reviews { font-size: 12px; color: var(--muted); margin-top: 2px; }
.td-seller .reviews strong { color: var(--primary); font-weight: 700; }
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-warn { background: #ecfdf5; color: #047857; }
.badge-hot { background: #fee2e2; color: #991b1b; }

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
}
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.btn-success:hover { filter: brightness(1.05); }
.op-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  font-size: 13px;
  color: var(--muted);
}
.pager { display: flex; gap: 4px; align-items: center; }
.pager button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pager button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 编辑页 */
.edit-page { padding-bottom: 80px; width: 100%; max-width: none; }
.edit-page .section-card { width: 100%; max-width: none; box-sizing: border-box; }
.form-row-h {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  width: 100%;
}
.form-row-h > label {
  flex: 0 0 148px;
  margin: 0;
  padding-right: 12px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.edit-page .form-row-h > label { white-space: nowrap; }
.edit-page .form-row-h.form-row-h-top > label { white-space: normal; }
.form-row-h > label .req { color: #dc2626; margin-right: 2px; }
.form-row-h > .field-body {
  flex: 0 0 auto;
  min-width: 0;
  text-align: left;
}
.form-row-h-top { align-items: flex-start; }
.form-row-h-top > label { padding-top: 10px; }
.form-stack-h {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: none;
}
.form-stack-h .form-row-h:last-child { margin-bottom: 0; }
.form-grid-h {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
.form-rows .form-row-h:last-child { margin-bottom: 0; }
.edit-page .form-stack-h .form-row-h > .field-body {
  flex: 1;
  width: auto;
  max-width: none;
}
.edit-page .field-w-title,
.edit-page .field-w-title .field-count-wrap,
.edit-page .field-w-title input { max-width: 200ch; width: 200ch; }
.edit-page .field-w-title .field-count-wrap { display: block; }
.edit-page .field-w-title .field-count-wrap input {
  padding-right: 58px;
  padding-bottom: 0;
}
.edit-page .field-w-title .field-count {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  background: linear-gradient(90deg, transparent, #fff 14px);
  padding-left: 10px;
  z-index: 1;
}
.edit-page .field-w-link,
.edit-page .field-w-link input,
.edit-page .field-w-link .field-link-text {
  max-width: 200ch; width: 200ch; display: block;
}
.edit-page .field-w-num .field-plain { min-width: 10ch; }
.edit-page .field-w-num-input .field-unit-wrap input { max-width: 10ch; width: 10ch; }
.edit-page .field-w-custom,
.edit-page .field-w-custom .field-unit-wrap input { max-width: 30ch; width: 30ch; }
.field-unit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.field-unit-suffix {
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.edit-page .form-row-h .field-body.xy-select-field-wrap,
.edit-page .form-row-h .field-body.xy-select-field-wrap .xy-search-select-wrap,
.edit-page .form-row-h .field-body.xy-select-field-wrap .xy-cascader,
.edit-page .form-row-h .field-body.xy-select-field-wrap .xy-cascader-trigger {
  width: auto;
  min-width: 168px;
  max-width: 400px;
}
.field-plain { font-size: 14px; color: var(--text); line-height: 36px; }
.xy-results-fit { max-height: none; overflow: visible; }
.xy-results-scroll { max-height: 380px; overflow-y: auto; }
.xy-cascader-more-hint {
  padding: 8px 12px; font-size: 12px; color: #64748b; line-height: 1.45;
  white-space: normal; word-break: break-word;
}
.xy-cascader-col-auto { height: auto; max-height: 320px; overflow-y: auto; }
.xy-cascader-columns { align-items: flex-start; min-height: unset; }
.xy-cat-field-wrap .xy-cascader-panel,
.xy-map-pending-cascader .xy-cascader-panel {
  min-width: 520px;
  max-width: min(96vw, 920px);
  width: max-content;
}
.xy-price-mode-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.xy-price-mode-row-h { flex-direction: row; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 0; align-items: center; }
.xy-radio { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.xy-rmb-hint { margin: 4px 0 0; font-size: 12px; color: #94a3b8; }
.xy-rmb-hint-inline { font-size: 12px; color: #94a3b8; white-space: nowrap; margin-left: 10px; }
.xy-custom-price-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.xy-custom-price-inline .xy-form-input { width: 120px; min-width: 0; }
.xy-price-formula-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xy-price-preview-label { font-size: 13px; color: var(--text); white-space: nowrap; }
.xy-upload-cat-plain { font-size: 14px; line-height: 36px; color: var(--text); }
.xy-upload-cat-missing { color: #dc2626; }
#xyUploadOverlay .xy-ship-row-h > label {
  flex: 0 0 88px;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  color: var(--text);
}
#xyUploadOverlay .xy-ship-row-h { margin-bottom: 14px; align-items: center; }
#xyUploadOverlay .xy-ship-row-h:last-child { margin-bottom: 0; }
#xyUploadOverlay .form-row-h > .field-body {
  flex: 1;
  width: auto;
  max-width: none;
}
#xyUploadOverlay .form-row-h > .field-body select,
#xyUploadOverlay .form-row-h > .field-body .xy-region-cascader-host,
#xyUploadOverlay .form-row-h > .field-body .xy-region-cascader,
#xyUploadOverlay .form-row-h > .field-body .xy-cascader {
  width: 100%;
  max-width: 100%;
}
#xyUploadOverlay .xy-upload-section-v2 {
  margin-bottom: 28px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
#xyUploadOverlay .xy-upload-section-v2:last-child { margin-bottom: 0; }
#xyUploadOverlay .xy-upload-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
#xyUploadOverlay .xy-upload-section-head span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
#xyUploadOverlay .xy-upload-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
#xyUploadOverlay .xy-upload-pair-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-bottom: 14px;
}
#xyUploadOverlay .xy-upload-pair-row .form-row-h { margin-bottom: 0; min-width: 0; align-items: center; }
#xyUploadOverlay .xy-upload-pair-row .form-row-h > label {
  flex: 0 0 88px;
  font-size: 14px;
}
#xyUploadOverlay .xy-upload-cat-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f4f5f7;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
#xyUploadOverlay .form-row-h.xy-ship-row-h { align-items: center; }
#xyUploadOverlay .xy-price-option-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f5f7;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.15s ease;
}
#xyUploadOverlay .xy-price-option-row.is-active { background: #f0fdf4; }
#xyUploadOverlay .xy-price-option-row input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
#xyUploadOverlay .xy-price-custom-input {
  width: 140px;
  min-width: 0;
  flex: 0 0 auto;
}
#xyUploadOverlay .xy-price-option-row .xy-price-formula-row {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
}
#xyUploadOverlay .xy-price-option-row .xy-price-formula-row input {
  width: 56px;
  padding: 6px 8px;
  flex: 0 0 auto;
}
#xyUploadOverlay .xy-price-option-row input:not([type="radio"]):disabled {
  background: #f9fafb;
  color: #94a3b8;
  cursor: not-allowed;
}
#xyUploadOverlay .xy-price-option-hint,
#xyUploadOverlay .xy-price-option-result {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}
#xyUploadOverlay .xy-price-option-row.is-active .xy-price-option-hint,
#xyUploadOverlay .xy-price-option-row.is-active .xy-price-option-result {
  color: #166534;
}
#xyUploadOverlay .xy-price-option-hint strong,
#xyUploadOverlay .xy-price-option-result strong {
  font-weight: 600;
}
#xyUploadOverlay .xy-publish-mode-row,
#xyUploadOverlay .xy-batch-price-mode-row {
  min-height: 40px;
  align-items: center;
}
#xyUploadOverlay .xy-batch-banner {
  margin: 0 0 20px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
#xyUploadOverlay .xy-batch-banner strong { color: var(--text); font-weight: 600; }
#xyUploadOverlay .xy-batch-formula-box {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f5f7;
  box-sizing: border-box;
}
#xyUploadOverlay .xy-batch-formula-box.is-disabled {
  background: #f9fafb;
}
#xyUploadOverlay .xy-batch-formula-box .xy-price-formula-row {
  flex-wrap: nowrap;
  gap: 6px;
}
#xyUploadOverlay .xy-batch-formula-box .xy-price-formula-row input {
  width: 56px;
  padding: 6px 8px;
}
#xyUploadOverlay .xy-batch-formula-box input:disabled {
  background: #f3f4f6;
  color: #94a3b8;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  #xyUploadOverlay .xy-upload-pair-row { grid-template-columns: 1fr; }
  #xyUploadOverlay .xy-price-option-row { flex-wrap: wrap; }
  #xyUploadOverlay .xy-price-option-hint,
  #xyUploadOverlay .xy-price-option-result { margin-left: 0; width: 100%; }
}
.custom-price-input { width: 88px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.td-custom-price { vertical-align: middle; }
.xy-map-pending-cascader { min-width: 0; }
.edit-page .form-row-h .field-body input:not(.xy-cascader-display),
.edit-page .form-row-h .field-body select,
.edit-page .form-row-h .field-body textarea,
.edit-page .form-row-h .field-body .xy-search-select-wrap,
.edit-page .form-row-h .field-body .xy-search-select-wrap .xy-cascader {
  width: 100%;
  box-sizing: border-box;
}
.form-row-h .field-body input:not(.xy-cascader-display),
.form-row-h .field-body textarea {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  height: 36px;
}
.form-row-h .field-body textarea {
  height: auto;
  min-height: 160px;
  line-height: 1.5;
}
.form-row-h .field-body input:read-only {
  background: #f9fafb;
  color: var(--muted);
}
.edit-page .form-row-h .field-body .xy-cascader-trigger,
.edit-page .form-row-h .field-body .xy-search-select-wrap .xy-cascader-trigger {
  height: 36px;
  font-size: 14px;
}
.edit-page .form-row-h .field-body .xy-cascader-display,
.edit-page .form-row-h .field-body .xy-search-select-wrap .xy-cascader-display {
  font-size: 14px;
}
.xy-field-inline { margin-bottom: 0; }
.xy-field-inline > label { flex: 0 0 72px; font-size: 12px; }
.xy-ship-row-h > label { flex: 0 0 72px; }
.xy-ship-settings-row { max-width: 640px; }
.xy-ship-settings-row > label { flex: 0 0 88px; }
.xy-native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.xy-search-select-wrap { width: 100%; min-width: 0; }
.xy-search-select.is-disabled .xy-cascader-trigger {
  background: #f3f4f6;
  cursor: not-allowed;
}
.xy-search-select.is-disabled .xy-cascader-display { cursor: not-allowed; }
.xy-region-cascader-host,
.xy-region-cascader { width: 100%; min-width: 0; }
.product-link-out {
  display: inline-block; font-size: 13px; margin-top: 8px; color: var(--primary);
}
.xy-cat-field-wrap {
  display: inline-block;
  width: fit-content;
  max-width: 400px;
  vertical-align: top;
}
.xy-cat-field-wrap .xy-cascader {
  width: auto;
  min-width: 168px;
  max-width: 400px;
}
.xy-cat-field-wrap .xy-cascader-trigger {
  width: auto;
  min-width: 168px;
  max-width: 400px;
}
.edit-page .form-row-h .field-body .xy-cat-field-wrap {
  width: fit-content;
}
.edit-page .form-row-h .field-body .xy-cat-field-wrap .xy-cascader,
.edit-page .form-row-h .field-body .xy-cat-field-wrap .xy-cascader-trigger {
  width: auto;
}
.section-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.section-card h3 {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.img-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.img-cell {
  position: relative;
  width: 88px;
  height: 88px;
}
.img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.img-cell .img-idx {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}
.img-cell .rm {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.img-add {
  width: 88px;
  height: 88px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.form-1col { margin-bottom: 16px; }
.form-1col label,
.form-2col > div label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-1col input:not(.xy-cascader-display),
.form-1col textarea,
.form-2col input:not(.xy-cascader-display),
.form-2col select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.xy-cascader .xy-cascader-display {
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  height: auto;
}
.form-1col input:read-only,
.form-2col input:read-only { background: #f9fafb; color: var(--muted); }
.form-2col select.edit-field-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.edit-xy-cat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.form-compare { align-items: start; }
.seller-panel {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.seller-panel .sn { font-size: 16px; font-weight: 600; }
.seller-panel .sr { margin-top: 6px; font-size: 13px; color: var(--muted); }
.seller-panel .sr em { font-style: normal; font-weight: 700; color: var(--primary); font-size: 15px; }

.sticky-foot {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--sidebar-w);
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  z-index: 90;
  box-shadow: 0 -4px 12px rgba(0,0,0,.06);
}

/* 历史 */
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
}
.tag-ok { background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag-warn { background: #fef9c3; color: #854d0e; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag-fail { background: #fee2e2; color: #991b1b; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.hidden { display: none !important; }
.modal-box {
  background: var(--card);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.modal-box p { margin: 0 0 22px; font-size: 15px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.modal-img-wrap {
  position: relative;
  padding: 8px;
  max-width: 90vw;
}
.modal-img-wrap img {
  max-width: 85vw;
  max-height: 80vh;
  border-radius: 8px;
  display: block;
}
.modal-img-wrap .close {
  position: absolute;
  top: 0; right: 0;
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* 登录 */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1e3a5f, #111827);
}
.login-panel {
  width: 400px;
  background: var(--card);
  border-radius: 14px;
  padding: 40px 36px;
  box-shadow: 0 24px 48px rgba(0,0,0,.2);
}
.login-panel .brand { text-align: center; margin-bottom: 28px; }
.login-panel .brand img { width: 56px; border-radius: 12px; }
.login-panel .brand h1 { margin: 14px 0 4px; font-size: 20px; }
.login-panel .brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-panel label { font-size: 12px; font-weight: 500; color: var(--muted); }
.login-panel input {
  width: 100%;
  height: 42px;
  margin: 6px 0 16px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login-panel .btn-primary { width: 100%; height: 42px; }
.err-box { background: #fef2f2; color: #991b1b; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }

.xy-settings-form .field { margin-bottom: 16px; }
.xy-settings-form .field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.xy-settings-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.xy-settings-form input,
.xy-settings-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}
.xy-shop-manager { max-width: 640px; }
.xy-shop-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.xy-shop-add input { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.xy-shop-list { list-style: none; margin: 0; padding: 0; }
.xy-shop-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.xy-shop-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.xy-shop-card-main { min-width: 0; }
.xy-shop-name { font-size: 14px; font-weight: 600; color: #0f172a; line-height: 1.3; }
.xy-shop-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xy-shop-actions { display: flex; align-items: center; gap: 6px; }
.xy-shop-state {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.xy-shop-state.ok { background: #dcfce7; color: #166534; }
.xy-shop-state.warn { background: #fef3c7; color: #92400e; }
.xy-shop-empty {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 12px;
  color: #94a3b8;
  text-align: center;
}

.xy-wizard-box,
.xy-upload-panel {
  max-width: 640px; width: 100%; text-align: left; padding: 0; overflow: visible;
}
#xyUploadOverlay.overlay {
  align-items: flex-start;
  overflow-y: auto;
}
#xyUploadOverlay .xy-upload-panel {
  margin: 24px auto;
  flex-shrink: 0;
}
.xy-upload-body {
  padding: 16px 22px; overflow: visible;
}
.xy-upload-section {
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.xy-upload-section h4 { margin: 0 0 10px; font-size: 14px; color: var(--text); }
.xy-wizard-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 12px; border-bottom: 1px solid var(--line);
}
.xy-wizard-head h3 { margin: 0; font-size: 17px; }
.xy-wizard-close {
  border: none; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted);
}
.xy-wizard-steps {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 22px; background: #f9fafb;
}
.xy-wizard-steps .xy-step {
  font-size: 11px; padding: 4px 8px; border-radius: 999px; background: #e5e7eb; color: #6b7280;
}
.xy-wizard-steps .xy-step.active { background: #dbeafe; color: #1d4ed8; }
.xy-wizard-steps .xy-step.done { background: #dcfce7; color: #166534; }
.xy-wizard-body { padding: 18px 22px; min-height: 200px; max-height: 55vh; overflow-y: auto; }
.xy-wizard-foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 22px 18px; border-top: 1px solid var(--line);
}
.xy-field { margin-bottom: 14px; }
.xy-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.xy-field label .req { color: #dc2626; }
.xy-field select,
.xy-field input[type="text"],
.xy-field input[type="number"],
.xy-field input[type="password"],
.xy-field textarea,
.xy-form-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; box-sizing: border-box; background: #fff;
}
.xy-field textarea.xy-form-input { resize: vertical; min-height: 96px; line-height: 1.45; }
.xy-field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.xy-defaults { display: flex; gap: 20px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.xy-loading, .xy-hint { color: var(--muted); font-size: 13px; padding: 12px 0; }
.xy-summary { display: grid; gap: 10px; font-size: 14px; }
.xy-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.xy-summary span { color: var(--muted); }
.xy-info-cell { font-size: 11px; line-height: 1.55; color: #6b7280; min-width: 0; }
.xy-info-line {
  display: flex; gap: 4px; align-items: baseline; min-width: 0;
  white-space: normal; word-break: break-all; line-height: 1.4; margin-bottom: 2px;
}
.xy-info-k { flex: 0 0 auto; color: #9ca3af; font-size: 10px; }
.xy-sale-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.xy-sale-onsale { background: #dcfce7; color: #166534; }
.xy-sale-offshelf { background: #fef3c7; color: #92400e; }
.xy-sale-pending { background: #e0e7ff; color: #3730a3; }
.xy-sale-soldout { background: #f3e8ff; color: #6b21a8; }
.xy-sale-abnormal { background: #fee2e2; color: #b91c1c; }
.xy-sale-deleted { background: #fee2e2; color: #991b1b; }
.xy-sale-unknown { background: #f3f4f6; color: #6b7280; }
.xy-shop-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412; border: 1px solid #fdba74; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.xy-shop-dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 0 0 2px rgba(251, 146, 60, .25);
}
.link-xy-id {
  display: inline-block; margin-top: 4px; font-size: 12px;
}

.cell-main { font-size: 13px; line-height: 1.4; }
.cell-sub { margin-top: 3px; font-size: 11px; line-height: 1.35; color: #6b7280; word-break: break-all; }
.text-link {
  color: #2563eb;
  text-decoration: none;
  margin-left: 6px;
  font-size: 11px;
}
.text-link:hover { text-decoration: underline; }
.td-account { min-width: 90px; max-width: 120px; vertical-align: top; }
.td-xy-ids { font-size: 11px; vertical-align: top; min-width: 120px; }
.op-cell-compact { flex-wrap: wrap; gap: 4px; }
.home-hint { color: var(--muted); font-size: 14px; margin: 0; }
.home-panel { margin-top: 8px; }
.dashboard-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.dash-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.dash-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.dash-card .t { font-size: 14px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.dash-card .d { font-size: 12px; color: #64748b; line-height: 1.5; }
.cell-suggest {
  margin-top: 4px; font-size: 11px; line-height: 1.35; color: #1d4ed8;
  background: #eff6ff; border-radius: 4px; padding: 3px 6px;
  word-break: break-word; max-width: 100%;
}
.xy-stuff-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  background: #ffe600;
  color: #1a1a1a;
  word-break: break-word;
  max-width: 100%;
}
.td-status, .td-category { min-width: 120px; max-width: 360px; vertical-align: top; }
.td-category { word-break: break-word; line-height: 1.45; }

.xy-upload-compact.xy-upload-panel { max-width: 672px; }
.xy-batch-panel.xy-upload-panel {
  max-width: 672px;
  min-height: unset;
}
.xy-upload-compact .xy-upload-body { padding: 20px 24px; }
.xy-batch-panel .xy-upload-body { padding: 20px 24px; min-height: unset; }
.xy-compact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; margin-bottom: 10px; width: 100%; }
.xy-compact-grid > *, .xy-manual-row > * { min-width: 0; }
.xy-ship-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xy-price-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 100%;
}
.xy-price-row-settings {
  max-width: 360px;
}
.xy-price-row .xy-field { margin-bottom: 0; min-width: 0; }
.xy-price-row .xy-field input { width: 100%; box-sizing: border-box; min-width: 0; }
.xy-batch-panel .xy-field select,
.xy-batch-panel .xy-field input,
.xy-upload-compact .xy-field select,
.xy-upload-compact .xy-field input { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.xy-field select:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.xy-compact-block { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.xy-compact-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.xy-compact-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.xy-hint-tight { margin: 0 0 8px; font-size: 11px; }
.xy-suggest-row { margin-bottom: 6px; }
.xy-toggle { font-size: 12px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.xy-suggest-view {
  font-size: 13px; padding: 8px 10px; background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 6px; color: #0c4a6e; margin-bottom: 8px; line-height: 1.4;
}
.xy-pv-compact .xy-field { margin-bottom: 8px; }
.xy-pv-compact .xy-field label { margin-bottom: 4px; }
.xy-price-preview-sm { margin-top: 8px; padding: 8px 10px; font-size: 13px; }
.xy-batch-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.xy-upload-compact .xy-field { margin-bottom: 0; }
.xy-upload-compact .xy-field select,
.xy-upload-compact .xy-field input { padding: 6px 10px; font-size: 13px; }
.xy-upload-compact .xy-field-row-3 { margin-bottom: 0; gap: 8px; }
.title-readonly { color: var(--text); font-weight: 600; }
.xy-price-preview { margin-top: 12px; padding: 12px; background: #f0fdf4; border-radius: 8px; color: #166534; font-weight: 600; }
.xy-map-row-h { max-width: 640px; margin-bottom: 10px; }
.xy-map-row-h > label {
  flex: 0 0 160px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.xy-map-pending-list { display: flex; flex-direction: column; gap: 10px; }
.xy-map-pending-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}
.xy-map-pending-row.xy-map-pending-highlight {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.xy-map-pending-source {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.xy-map-pending-cascader { min-width: 0; }
.xy-map-pending-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.xy-map-ai-status {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xy-api-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}
.secret-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.secret-input-wrap .xy-form-input {
  padding-right: 40px;
}
.secret-toggle {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.65;
  border-radius: 6px;
}
.secret-toggle:hover { opacity: 1; background: #f1f5f9; }
.xy-cat-cache-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
}
.xy-cat-cache-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.xy-cat-map-field {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
}
.xy-cat-map-filter {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  box-sizing: border-box;
  background: #fff;
  color: var(--text);
}
.xy-cat-map-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.manual-create-modal { max-width: 520px; }
.manual-create-modal h3 { margin: 0 0 8px; font-size: 18px; }
.manual-create-form .xy-field { margin-bottom: 12px; }
.manual-create-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.manual-create-previews img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.xy-cat-map-add {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.xy-cat-map-add .xy-field { margin-bottom: 0; min-width: 0; }
.xy-cat-map-add select.xy-form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}
.panel .xy-field { margin-bottom: 0; }
.hidden { display: none !important; }
.td-product .title { font-weight: 600; color: var(--text); text-decoration: none; }
.td-product .title:hover { color: #2563eb; text-decoration: underline; }

/* 用户菜单 */
.user-menu { position: relative; }
.user-menu .user-pill {
  border: none; background: transparent; cursor: pointer; display: inline-flex;
  align-items: center; gap: 10px; padding: 6px 10px; border-radius: 999px;
}
.user-menu .user-pill:hover { background: #f1f5f9; }
.user-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; z-index: 120;
}
.user-menu-label {
  padding: 8px 14px 4px; font-size: 11px; font-weight: 600; color: #94a3b8;
  text-transform: none; letter-spacing: 0;
}
.user-menu-divider {
  height: 1px; background: var(--line); margin: 6px 8px;
}
.user-menu-item {
  display: block; padding: 9px 14px; border-radius: 8px; color: var(--text);
  text-decoration: none; font-size: 13px;
}
.user-menu-btn {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { background: #e5e7eb; }
.theme-ico { font-size: 16px; line-height: 1; }
.user-menu-item:hover { background: #f8fafc; color: var(--primary); }
.user-menu-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.user-menu-logout:hover { color: #dc2626; }

/* 闲鱼类目级联选择器 */
.xy-cascader { position: relative; width: 100%; }
.xy-cascader-trigger {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
}
.xy-cascader-trigger:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.xy-cascader-display {
  flex: 1; border: none; background: transparent; font-size: 14px; color: var(--text);
  outline: none; cursor: text; min-width: 0;
}
.xy-cascader-results { max-height: 260px; overflow: auto; }
.xy-cascader-result-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: #fff;
  font-size: 13px; cursor: pointer; color: var(--text); border-bottom: 1px solid #f8fafc;
}
.xy-cascader-result-item:hover { background: #f8fafc; }
.xy-cascader-result-item.active { background: #eff6ff; color: #1d4ed8; }
.xy-cascader-result-path { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.xy-upload-section {
  margin-bottom: 10px; padding: 10px 12px; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 8px;
}
.xy-upload-section-title {
  font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 8px;
}
.xy-upload-block {
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7;
}
.xy-upload-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.xy-inline-suggest {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 6px;
}
.xy-suggest-inline {
  flex: 1; min-width: 0; font-size: 12px; color: #0369a1; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xy-suggest-inline.hidden { display: none; }
.xy-price-formula-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  font-size: 12px; color: #475569;
}
.xy-price-formula-row input {
  width: 64px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; box-sizing: border-box;
}
.xy-price-formula-row .xy-formula-op { color: #94a3b8; font-weight: 600; }
.xy-pv-subdued {
  margin-top: 6px; padding: 8px 10px; border-radius: 6px;
  background: #fafbfc; border: 1px dashed #e5e7eb;
}
.xy-pv-subdued .xy-pv-row { margin-bottom: 10px; }
.xy-pv-subdued .xy-pv-row:last-child { margin-bottom: 0; }
.xy-pv-subdued .xy-pv-row > label { font-size: 14px; color: var(--text); flex: 0 0 148px; padding-right: 12px; }
.xy-pv-subdued .xy-hint { font-size: 14px; padding: 4px 0; color: #94a3b8; }
.edit-page .xy-pv-subdued {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.edit-page .xy-pv-subdued .xy-pv-row {
  width: 100%;
}
.edit-page .xy-pv-subdued .xy-pv-row > .field-body {
  flex: 1;
  width: auto;
  max-width: 360px;
}
.edit-page .xy-pv-subdued .xy-pv-row > label { font-size: 14px; color: var(--text); }
.xy-field-tight { margin-bottom: 0; }
.xy-field-tight label { font-size: 12px; margin-bottom: 4px; }
.xy-cascader-loading { padding: 16px 12px; font-size: 13px; color: var(--muted); }
.xy-desc-preview {
  max-width: 360px; white-space: pre-wrap; word-break: break-word;
  font-size: 12px; color: #64748b; line-height: 1.45;
}
.xy-desc-form-grid { display: grid; gap: 12px; max-width: 560px; }
.xy-imgcfg-form { display: grid; gap: 12px; max-width: 420px; }
.xy-imgcfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}
.xy-imgcfg-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.xy-imgcfg-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.xy-imgcfg-card-meta { min-width: 0; }
.xy-imgcfg-card-id {
  font-size: 12px;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.xy-imgcfg-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  word-break: break-word;
}
.xy-imgcfg-card-img {
  width: 350px;
  height: 350px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  align-self: center;
}
.xy-desc-position { display: flex; gap: 16px; font-size: 13px; }
.xy-desc-position label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.xy-cascader-display::placeholder { color: #9ca3af; }
.xy-cascader-arrow { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.xy-cascader-clear {
  border: none; background: transparent; color: var(--muted); font-size: 18px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.xy-cascader-panel {
  position: absolute; left: 0; right: auto; min-width: 100%; top: calc(100% + 4px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden;
}
#xyUploadOverlay .xy-cascader-panel { z-index: 620; }
.xy-cascader-search {
  width: 100%; box-sizing: border-box; border: none; border-bottom: 1px solid var(--line);
  padding: 10px 12px; font-size: 13px; outline: none;
}
.xy-cascader-columns { display: flex; min-height: 200px; max-height: 260px; overflow-x: auto; }
.xy-cascader-col {
  flex: 0 0 160px; width: 160px; min-width: 160px; overflow: auto; border-right: 1px solid #f1f5f9;
}
.xy-cascader-col-industry { flex: 0 0 120px; width: 120px; min-width: 120px; }
.xy-cascader-col:last-child { border-right: none; }
.xy-cascader-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 9px 12px; border: none; background: #fff;
  font-size: 13px; cursor: pointer; color: var(--text); white-space: nowrap;
}
.xy-cascader-item > span:first-child {
  overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.xy-cascader-item:hover { background: #f8fafc; }
.xy-cascader-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 500; }
.xy-cascader-item .arrow { color: #94a3b8; font-size: 12px; }
.xy-cascader-item .check { color: #2563eb; font-size: 12px; }
.xy-cascader-col:nth-child(1) .xy-cascader-item { font-weight: 500; }
.xy-cascader-col:nth-child(2) .xy-cascader-item { padding-left: 16px; }
.xy-cascader-col:nth-child(3) .xy-cascader-item { padding-left: 20px; }

/* 闲鱼类目选择器 v2 */
.xy-cascader-v2 .xy-cascader-panel { min-width: 520px; }
.xy-cascader-columns-v2 {
  display: flex;
  min-height: 220px;
  max-height: 300px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #f8fafc;
}
.xy-cascader-v2 .xy-cascader-col {
  flex: 0 0 148px;
  width: 148px;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: #fff;
}
.xy-cascader-v2 .xy-cascader-col:last-child { border-right: none; }
.xy-cascader-v2 .xy-cascader-col-industry {
  flex: 0 0 112px;
  width: 112px;
  min-width: 112px;
  background: #f1f5f9;
}
.xy-cascader-col-hd {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: inherit;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  letter-spacing: 0.02em;
}
.xy-cascader-col-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.xy-cascader-v2 .xy-cascader-item {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-all;
}
.xy-cascader-v2 .xy-cascader-col-industry .xy-cascader-item { font-weight: 600; }
.xy-cascader-item-leaf.active { font-weight: 600; }
.xy-cascader-empty {
  padding: 20px 12px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}
.xy-cascader-result-name { font-weight: 500; color: var(--text); }

/* 通知已读/未读状态 */
.td-notify-read { text-align: center; vertical-align: middle; }
.notify-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.notify-status-unread {
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.notify-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
}
.notify-status-read {
  background: #f3f4f6;
  color: #9ca3af;
}
.notify-row-unread td { background: #fafcff; }
.notify-title-unread { font-weight: 600; color: #1e3a8a; }
.notify-row-read .notify-title-unread { font-weight: 400; }

/* 闲鱼类目选择器 v4：输入框搜索 + 两级联动 */
.xy-cascader-v4 .xy-cascader-panel {
  min-width: 520px;
  width: 520px;
  max-width: min(96vw, 520px);
  padding: 0;
  overflow: hidden;
}
.xy-cat-panel-title {
  padding: 10px 12px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.xy-cat-breadcrumb-placeholder { color: #94a3b8; }
.xy-cascader-columns-v4 {
  display: flex;
  min-height: 220px;
  max-height: 260px;
  overflow-x: hidden;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.xy-cascader-v4 .xy-cascader-col-level,
.xy-cascader-v4 .xy-cascader-col-industry {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: #fff;
}
.xy-cascader-v4 .xy-cascader-col-industry {
  width: 160px;
  min-width: 160px;
}
.xy-cascader-v4 .xy-cascader-col-level {
  width: 360px;
  min-width: 360px;
}
.xy-cascader-v4 .xy-cascader-col-level:last-child { border-right: none; }
.xy-cat-tree-body { padding: 0; }
.xy-cat-tree-group { border-bottom: 1px solid #f1f5f9; }
.xy-cat-tree-group:last-child { border-bottom: none; }
.xy-cat-tree-root {
  width: 100%;
  font-weight: 600;
  gap: 4px;
}
.xy-cat-tree-toggle {
  display: inline-flex;
  width: 14px;
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 11px;
}
.xy-cat-tree-name { flex: 1; text-align: left; }
.xy-cat-tree-children { background: #fafbfc; }
.xy-cat-tree-children .xy-cat-tree-child {
  padding-left: 28px !important;
  font-weight: 400;
  border-top: 1px solid #f1f5f9;
}
.xy-cat-tree-children .xy-cat-tree-child:first-child { border-top: none; }
.xy-cat-tree-child.active,
.xy-cat-tree-root.active { background: #eff6ff; color: #1d4ed8; }
.xy-cascader-v4 .xy-cascader-col-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.xy-cascader-v4 .xy-cascader-item {
  padding: 8px 10px;
  font-size: 13px;
}
.xy-cascader-v4 .xy-cascader-col-level .xy-cascader-item { padding-left: 12px; }
.xy-cascader-col-empty .xy-cascader-empty {
  padding: 24px 8px;
  font-size: 12px;
  color: #94a3b8;
}
.xy-cat-selected-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  padding: 10px 12px;
  font-size: 12px;
  background: #f8fafc;
  line-height: 1.5;
}
.xy-cat-selected-label { color: #64748b; flex-shrink: 0; }
.xy-cat-selected-path { color: #334155; font-weight: 500; word-break: break-all; }
.xy-cascader-results-v4 { max-height: 260px; }
.xy-ai-suggest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px dashed #bfdbfe;
  background: #eff6ff;
  border-radius: 8px;
  color: #1e40af;
  font-size: 12px;
}
.xy-ai-suggest-bar .btn { flex-shrink: 0; }

.xy-source-cat-list {
  display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; max-height: 220px;
  overflow: auto; padding: 4px 0;
}
.xy-source-cat-item {
  display: inline-flex; align-items: center; padding: 6px 12px; border: none;
  border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; color: var(--text);
}
.xy-source-cat-item:hover { background: #f8fafc; }
.xy-source-cat-item.active {
  background: #eff6ff; color: #1d4ed8; font-weight: 500;
}
.xy-cat-map-layout {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;
}
.xy-cat-map-layout-tight { gap: 10px; }
.xy-cat-map-col { flex: 1 1 280px; min-width: 0; }
.xy-cat-map-col-narrow { flex: 0 0 280px; max-width: 280px; }
.xy-cat-map-col-action { flex: 0 0 auto; padding-top: 28px; }
.xy-cat-map-label {
  display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 8px;
}
.xy-cat-map-search { max-width: 320px; margin-bottom: 14px; }

.order-table-v2 .order-thumb,
.order-table-v3 .order-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.order-td-product .order-product-row { min-height: 48px; }
.order-td-product .order-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0; line-height: 1.45; }
.order-td-product .title { font-weight: 600; }
.order-mercari-inline { margin-left: 0.5em; font-size: 12px; white-space: nowrap; }
.order-repurchase-tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 4px;
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.order-nowrap { white-space: nowrap; }
.order-line-nowrap { white-space: nowrap; line-height: 1.5; }
.order-timer-col { min-width: 220px; }
.order-time-col { min-width: 220px; }
.order-actions-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.order-actions-stack .link-btn,
.order-actions-stack .btn { margin: 0; }
.order-remark-sub { color: #6b7280; margin-top: 2px; }
.order-remark-red { color: #dc2626 !important; font-weight: 600; }
.order-refund-inline { margin-right: 6px; vertical-align: middle; }
.order-timer-col .order-duration { font-weight: 500; color: #111827; }
.order-price-col .order-price-pay { line-height: 1.5; }
.order-price-col .order-price-total { color: #6b7280; font-size: 12px; margin-top: 2px; }
.order-free-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px;
  background: #dcfce7; color: #166534; font-size: 11px; font-weight: 500;
}
.order-fee-tag { display: inline-block; margin-left: 4px; font-size: 11px; color: #6b7280; }
.order-view-tabs { margin-bottom: 12px; }
.order-title-cell { min-width: 180px; }
.order-title-cell .title-line { font-weight: 500; line-height: 1.4; }
.order-title-cell .link-btn {
  display: inline-block; margin-top: 4px; font-size: 12px; color: #2563eb; text-decoration: none;
}
.order-title-cell .link-btn:hover { text-decoration: underline; }
.order-time-col { font-size: 12px; line-height: 1.5; color: var(--muted); }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.order-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.purchase-modal { max-width: 420px; text-align: left; }
.purchase-modal h3 { margin: 0 0 8px; text-align: left; }
.purchase-modal .modal-actions { justify-content: flex-end; margin-top: 16px; }
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
.od-panel { margin-bottom: 0; padding: 14px 16px; }
.od-panel h3 { margin: 0 0 10px; font-size: 14px; }
.od-kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.od-kv:last-child { border-bottom: none; }
.od-kv .k { color: #64748b; font-size: 12px; }
.od-kv .v { color: #111827; font-size: 13px; word-break: break-all; }
.order-detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.xy-cat-edit-modal {
  max-width: 720px;
  text-align: left;
}
.xy-cat-edit-modal h3 {
  margin: 0 0 14px;
}
.xy-cat-edit-modal .xy-cat-edit-row {
  margin-bottom: 12px;
}
.xy-cat-edit-modal .xy-cat-edit-row > label {
  flex: 0 0 100px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.xy-cat-edit-plain {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}
.xy-cat-edit-ai {
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  background: linear-gradient(90deg, #1d4ed8, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}
.xy-ai-label {
  background: linear-gradient(90deg, #1d4ed8, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.field-w-stuff { max-width: 280px; }
.field-w-stuff select,
.field-w-stuff .xy-search-select-wrap {
  width: 100%;
  max-width: 280px;
}
.title-input-ai-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.title-input-inner {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.title-input-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.title-input-inner input {
  flex: 1;
  min-width: 0;
  border: none;
  box-shadow: none;
  height: 36px;
  padding: 8px 12px 8px 4px;
}
.title-input-inner input:focus { outline: none; }
.btn-ai-inline {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 0 8px 0 10px;
  height: 36px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(90deg, #1d4ed8, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-ai-inline:disabled { opacity: 0.5; cursor: not-allowed; }
.notify-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 10px;
}
.notify-detail-content {
  background: #0b1020;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.od-log-table th.od-log-action-col,
.od-log-table td.od-log-action-col {
  width: 200px;
  min-width: 200px;
  white-space: nowrap;
}
.order-logistics-cell { display: flex; flex-direction: column; gap: 4px; }
.order-waybill-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.order-express-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.order-express-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}
.order-logistics-col { min-width: 140px; }

.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.dash-kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.dash-kpi-card .label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dash-kpi-card .value { font-size: 22px; font-weight: 700; color: var(--text); }
.dash-kpi-card.dash-kpi-warn .value { color: #d97706; }
.dash-kpi-card.dash-kpi-profit .value { color: #059669; }
.dash-profit-panel { margin-bottom: 12px; }
.dash-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dash-panel-head .panel-title { margin: 0; }
.dash-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.dash-rate { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dash-profit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dash-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-quick-btns .btn.active { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.dash-date-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-profit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.dash-sum-item .k { display: block; font-size: 11px; color: var(--muted); }
.dash-sum-item .v { font-size: 16px; }
.dash-sum-item .v.profit { color: #059669; }
.dash-chart { min-height: 180px; }
.dash-chart-empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.dash-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 160px;
  padding: 8px 4px 0;
}
.dash-bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.dash-bar-val { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dash-bar-track {
  width: 100%;
  max-width: 42px;
  height: 110px;
  background: #f1f5f9;
  border-radius: 6px 6px 2px 2px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.dash-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #34d399, #059669);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
}
.dash-bar-col.neg .dash-bar-fill { background: linear-gradient(180deg, #fca5a5, #dc2626); }
.dash-bar-label { font-size: 11px; color: var(--muted); }
.nav-item-with-badge { position: relative; }
.nav-dot-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.order-mercari-jp { margin-left: 6px; }

@media (max-width: 1280px) {
  .field-w-keyword { flex: 1 1 100%; max-width: none; }
  .field-w-seller { flex: 1 1 140px; width: auto; }
  .field-w-status { flex: 1 1 120px; width: auto; }
  .field-w-upload { flex: 1 1 108px; width: auto; }
  .kpi-row { grid-template-columns: 1fr; }
}
