/* ============================================================
   电商数据中枢 · 2026 Calm Admin
   参考：Linear / Stripe / Vercel 的克制后台语言
   原则：信息优先 · 边框代替重阴影 · 排版承担层级 · 装饰归零
   结构：左侧导航 + 右侧内容（需求文档第 5 节）
   ============================================================ */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --sidebar: #f4f4f5;
  --sidebar-hover: #e4e4e7;
  --sidebar-active: #e4e4e7;

  --text: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;

  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --accent: #142b52;
  --accent-hover: #1f3f72;
  --accent-fg: #fafafa;
  --focus: #1f3f72;
  --focus-ring: 0 0 0 2px #fff, 0 0 0 4px rgba(31, 63, 114, 0.45);

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #ca8a04;
  --warning-bg: #fefce8;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #2563eb;
  --info-bg: #eff6ff;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "HarmonyOS Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "Menlo", "Consolas", "PingFang SC", monospace;

  --sidebar-w: 220px;
  --header-h: 52px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "tnum";
}

/* ---------- 商品主档：款 → 款色 → 款色码 SKU ---------- */
.catalog-level-switch { display: flex; gap: 8px; }
.catalog-grain-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  color: var(--text-2);
  background: #f4f7fb;
  border: 1px solid #dce5f0;
  border-radius: var(--radius);
}
.catalog-grain-note strong { color: var(--accent); white-space: nowrap; }
.catalog-source-note {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 5px;
  color: var(--warning);
  font-size: 10px;
  font-weight: 600;
  background: var(--warning-bg);
  border-radius: 3px;
}
.catalog-product-group {
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
  max-width: 240px;
  vertical-align: middle;
}
.catalog-product-group .tag { font-weight: 700; letter-spacing: 0.01em; }
.catalog-product-group .group-mgm { color: #17345f; background: #eef4fb; border-color: #c9d8eb; }
.catalog-product-group .group-naqu { color: #5b2485; background: #f8f0ff; border-color: #e8d2f7; }
.catalog-product-group .group-jianchi { color: #8a4b08; background: #fff8e8; border-color: #f3dfad; }
.catalog-product-group .group-conflict { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.catalog-product-group small {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-source-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.catalog-source-strip > strong { color: var(--text-2); font-size: 12px; }
.catalog-source-strip .catalog-product-group { align-items: center; flex-direction: row; max-width: none; }
.catalog-source-strip .catalog-product-group small { max-width: none; }
.catalog-decision-toolbar { flex-wrap: wrap; }
.catalog-decision-toolbar .catalog-supplier { display: flex; align-items: center; gap: 10px; }
.catalog-decision-toolbar .catalog-supplier > strong { color: var(--text-2); font-size: 12px; }
.catalog-decision-toolbar > small { flex: 1 1 340px; display: grid; gap: 2px; color: var(--text-3); font-size: 10px; text-align: right; }
.catalog-decision-toolbar > small b { color: var(--text-2); }
.catalog-scope-switch { display: inline-flex; gap: 3px; margin-left: auto; padding: 2px; background: #f4f4f5; border-radius: var(--radius-sm); }
.catalog-scope-switch .btn { color: var(--text-2); background: transparent; border-color: transparent; }
.catalog-scope-switch .btn.active { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.catalog-recommendation {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(250px, 1fr) minmax(190px, .7fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #f3f7fb;
  border: 1px solid #d6e2ef;
  border-radius: var(--radius);
}
.catalog-recommendation > div:first-child > span { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.catalog-recommendation h2 { margin-top: 2px; font-size: 18px; }
.catalog-recommendation p { margin-top: 2px; color: var(--text-2); font-size: 11px; }
.catalog-recommendation-proof { display: flex; flex-wrap: wrap; gap: 5px; }
.catalog-recommendation-proof span { padding: 3px 7px; color: #24456f; font-size: 10px; background: rgba(255,255,255,.78); border: 1px solid #d6e2ef; border-radius: 999px; }
.catalog-reconcile { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 1px solid #c8d6e6; }
.catalog-reconcile strong { color: var(--accent); font-size: 12px; }
.catalog-reconcile span { color: var(--text-3); font-size: 10px; }
.catalog-reconcile.reconcile_required strong { color: var(--danger); }
.catalog-decision-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.catalog-decision-card { display: flex; min-width: 0; min-height: 226px; flex-direction: column; padding: 13px 14px 11px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.catalog-decision-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.catalog-decision-card > header span { color: var(--text-3); font-size: 10px; }
.catalog-decision-card > header h2 { margin-top: 2px; font-size: 16px; }
.catalog-decision-card > header h2 small { color: var(--text-3); font-size: 9px; font-weight: 500; }
.catalog-decision-card > header > small { flex: 0 0 auto; color: var(--text-3); font-size: 9px; }
.catalog-decision-card > footer { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: auto; padding-top: 9px; color: var(--text-3); font-size: 9px; border-top: 1px solid var(--border); }
.catalog-decision-card > footer strong { color: var(--text-2); }
.catalog-window-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 14px 0; background: var(--border); border: 1px solid var(--border); border-radius: 5px; }
.catalog-window-metrics > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 3px; text-align: center; background: #fafafa; }
.catalog-window-metrics span { color: var(--text-3); font-size: 8px; }
.catalog-window-metrics strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.catalog-decision-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; margin: 14px 0; }
.catalog-decision-pairs > span { display: flex; min-width: 0; flex-direction: column; color: var(--text-3); font-size: 9px; }
.catalog-decision-pairs strong { overflow: hidden; margin-top: 2px; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-sell-through { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 13px 0; }
.catalog-sell-through > div { display: flex; min-width: 0; flex-direction: column; padding: 9px; background: #f6f8fb; border-radius: var(--radius-sm); }
.catalog-sell-through span { color: var(--text-2); font-size: 9px; }
.catalog-sell-through strong { margin: 4px 0; color: var(--accent); font-size: 16px; }
.catalog-sell-through small { color: var(--text-3); font-size: 8px; line-height: 1.35; }
.catalog-decision-constraints { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; color: #713f12; background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius); }
.catalog-decision-constraints > strong { flex: 0 0 auto; font-size: 10px; }
.catalog-decision-constraints > div { display: flex; flex-wrap: wrap; gap: 4px 13px; }
.catalog-decision-constraints span { font-size: 9px; }
.launch-window-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.launch-window-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.launch-window-item span { color: var(--text-3); font-size: 9px; }
.launch-window-item strong { font-size: 12px; }
.launch-window-warn strong { color: #b45309; }
.pl-close-cell { min-width: 120px; vertical-align: top; }
.pl-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pl-chip.pl-draft { color: #52525b; background: rgba(113, 113, 122, 0.14); }
.pl-chip.pl-submitted { color: #1d4ed8; background: rgba(59, 130, 246, 0.12); }
.pl-chip.pl-confirmed { color: #15803d; background: rgba(22, 163, 74, 0.12); }
.pl-meta { margin-top: 4px; font-size: 10px; line-height: 1.5; }
.pl-actions { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }
/* 角色视角切换器（杭州负责人默认；老板专属视图隐藏） */
/* 左下角账号卡片（RBAC）：头像+角色+邮箱，浅色主题；点击弹账号信息浮层，admin 有管理入口。 */
.account-pop-wrap { position: relative; }
.account-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; font: inherit; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s ease; }
.account-chip:hover { border-color: var(--border-strong); }
.account-chip[aria-expanded="true"] { border-color: var(--accent); }
.account-avatar { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.account-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.account-copy b { font-size: 12px; color: var(--text); font-weight: 600; line-height: 1.3; }
.account-copy small { font-size: 10.5px; color: var(--text-3); word-break: break-all; line-height: 1.35; }
.account-pop { position: absolute; left: 0; bottom: calc(100% + 8px); width: 236px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(24, 24, 27, .14); z-index: 70; font-size: 12px; }
.account-pop dt { font-size: 10.5px; color: var(--text-3); letter-spacing: .03em; margin-top: 8px; }
.account-pop dt:first-child { margin-top: 0; }
.account-pop dd { margin: 2px 0 0; color: var(--text); word-break: break-all; line-height: 1.45; }
.account-pop .account-pop-admin { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--accent); font-weight: 550; text-decoration: none; }
.account-pop .account-pop-admin:hover { text-decoration: underline; }
body[data-view="boss"] .account-pop-wrap { display: none; }
.today-row-active td { background: rgba(37, 99, 235, .06); }
.today-shop-columns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 12px; }
@media (max-width: 900px) { .today-shop-columns { grid-template-columns: 1fr; } }
.today-sub-title { margin: 0 0 8px; font-size: 13px; }
.today-shares { display: flex; flex-wrap: wrap; gap: 4px; }
.today-share-chip { padding: 1px 7px; border-radius: 999px; background: rgba(20, 43, 82, .07); font-size: 11px; white-space: nowrap; }

.pl-redline-badge { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; color: #b91c1c; background: rgba(220, 38, 38, 0.10); border: 1px solid rgba(220, 38, 38, 0.35); }
.launch-window-delay-note { margin-top: 7px; padding: 6px 10px; color: #713f12; font-size: 10px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-sm); }
@media (max-width: 900px) { .launch-window-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.catalog-procurement-body { display: flex; flex-direction: column; gap: 9px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.catalog-procurement-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.catalog-procurement-tier { color: var(--text-3); font-size: 10px; }
.procurement-badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.procurement-badge.reorder { color: #15803d; background: rgba(22, 163, 74, 0.12); }
.procurement-badge.hold { color: #1d4ed8; background: rgba(59, 130, 246, 0.12); }
.procurement-badge.warn { color: #c2410c; background: rgba(234, 88, 12, 0.12); }
.procurement-badge.muted { color: #52525b; background: rgba(113, 113, 122, 0.14); }
.catalog-procurement-reason { color: var(--text-2); font-size: 11px; }
.catalog-procurement-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.catalog-procurement-metrics .procurement-metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; background: #f6f8fb; border-radius: var(--radius-sm); }
.catalog-procurement-metrics span { color: var(--text-3); font-size: 9px; }
.catalog-procurement-metrics strong { font-size: 13px; }
.catalog-procurement-metrics small { color: var(--text-3); font-size: 8px; }
.catalog-procurement-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); font-size: 10px; }
.catalog-procurement-sizes b { padding: 2px 8px; color: var(--text-2); font-weight: 500; background: #f6f8fb; border-radius: 4px; }
.catalog-procurement-notes { display: flex; flex-direction: column; gap: 3px; margin: 0; padding-left: 16px; }
.catalog-procurement-notes li { color: #b45309; font-size: 10px; }
.catalog-procurement-assumptions { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.catalog-procurement-assumptions span { color: var(--text-3); font-size: 9px; }
@media (max-width: 900px) { .catalog-procurement-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.catalog-followups .section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-followup-list { display: grid; gap: 7px; }
.catalog-followup { display: grid; grid-template-columns: minmax(240px, 1.2fr) minmax(360px, 1.6fr) auto; gap: 14px; align-items: center; padding: 10px 12px; background: #fafafa; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.catalog-followup.overdue { border-color: var(--warning-border); background: var(--warning-bg); }
.catalog-followup-main > div { display: flex; align-items: center; gap: 7px; }
.catalog-followup-main h3 { margin-top: 4px; font-size: 12px; }
.catalog-followup-main p { margin-top: 2px; color: var(--text-3); font-size: 9px; }
.catalog-followup-type { color: var(--text-2); font-size: 10px; }
.catalog-overdue { color: var(--danger); font-size: 9px; font-weight: 700; }
.tag.followup-done { color: #166534; background: #ecfdf3; border-color: #bbf7d0; }
.tag.followup-blocked { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.catalog-followup-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.catalog-followup-facts span { display: flex; min-width: 0; flex-direction: column; color: var(--text-3); font-size: 8px; }
.catalog-followup-facts strong { overflow: hidden; margin-top: 2px; color: var(--text-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-followup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.catalog-style-table tbody tr { cursor: pointer; }
.catalog-style-table tbody tr:hover { background: #f6f8fb; }
.tag.catalog-safe { color: #166534; background: #ecfdf3; border-color: #bbf7d0; }
.tag.catalog-review { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.catalog-detail { display: grid; gap: 14px; }
.catalog-back-links { display: flex; align-items: center; gap: 12px; }
.catalog-back-links .secondary { color: var(--text-3); }
.catalog-style-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.catalog-style-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 16px;
  background: var(--surface);
}
.catalog-style-summary span { color: var(--text-3); font-size: 11px; }
.catalog-style-summary strong { color: var(--text); font-size: 17px; line-height: 1.2; }
.catalog-style-summary small { color: var(--text-3); font-size: 10px; line-height: 1.35; }
.catalog-style-summary .text-warning { color: #b45309; }
.catalog-section { padding: 16px; }
.catalog-section .section-title { margin-bottom: 14px; }
.catalog-section .section-title h2 { font-size: 15px; }
.catalog-section .section-title p { margin-top: 3px; color: var(--text-3); font-size: 12px; }
.catalog-style-image-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.catalog-style-image {
  display: grid;
  place-items: center;
  height: 210px;
  overflow: hidden;
  color: var(--text-3);
  background: #f6f6f6;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.catalog-style-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-style-image-copy { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.catalog-style-image-copy h2 { font-size: 17px; }
.catalog-style-image-copy p { color: var(--text-2); font-size: 13px; }
.catalog-style-image-copy small { max-width: 680px; color: var(--text-3); }
.catalog-style-image-copy .btn { margin-top: 5px; }
.catalog-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.catalog-operating-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: var(--text-2);
  background: #f4f7fb;
  border: 1px solid #dce5f0;
  border-radius: var(--radius);
}
.catalog-operating-note div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.catalog-operating-note strong { flex: 0 0 auto; color: var(--accent); font-size: 11px; }
.catalog-operating-note span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-operating-note p { grid-column: 1 / -1; color: var(--text-3); font-size: 10px; }
.catalog-color-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.catalog-color-card.needs-review { border-color: #f3cf83; }
.catalog-color-image {
  color: var(--text-3);
  background: #f6f6f6;
  border-bottom: 1px solid var(--border);
}
.catalog-color-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  height: 210px;
  overflow: hidden;
}
.catalog-color-image-frame img { width: 100%; height: 210px; max-height: 210px; object-fit: contain; }
.catalog-color-image em {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  color: #166534;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  background: rgba(240, 253, 244, 0.94);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
}
.needs-review .catalog-color-image em { color: #92400e; background: rgba(255, 251, 235, 0.95); border-color: #fde68a; }
.catalog-color-image-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
  border-top: 1px solid var(--border);
}
.catalog-color-image-caption strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-color-image-caption span { flex: 0 0 auto; color: var(--text-3); font-family: var(--mono); font-size: 10px; }
.catalog-color-body { padding: 10px 12px 12px; }
.catalog-color-body h3 { font-size: 13px; }
.catalog-color-body h3 small { color: var(--text-3); font-family: var(--mono); font-size: 10px; font-weight: 500; }
.catalog-color-body p { margin-top: 3px; color: var(--text-3); font-size: 11px; }
.catalog-color-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 10px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.catalog-color-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  background: #fafafa;
}
.catalog-color-metrics > div.inventory { background: #f0f7f4; }
.catalog-color-metrics span { color: var(--text-3); font-size: 9px; }
.catalog-color-metrics strong { overflow: hidden; color: var(--text); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.catalog-color-metrics small { color: var(--text-3); font-size: 9px; line-height: 1.25; }
.catalog-color-metrics .text-warning { color: #b45309; }
.catalog-color-shops { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.catalog-color-shops > span { padding: 3px 6px; color: var(--text-2); font-size: 9px; background: #f4f4f5; border-radius: 999px; }
.catalog-color-shops b { margin-right: 4px; color: var(--text); }
.catalog-color-body .catalog-image-reason { min-height: 30px; margin-top: 7px; color: var(--text-2); }
.catalog-item-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.catalog-item-links a { padding: 2px 5px; font-family: var(--mono); font-size: 10px; background: #f4f4f5; border-radius: 3px; }
.catalog-color-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.catalog-image-policy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #1e3a5f;
  background: #f3f7fb;
  border: 1px solid #d6e2ef;
  border-radius: var(--radius);
}
.catalog-image-policy span { color: var(--text-2); font-size: 11px; }
.catalog-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  max-height: 330px;
  margin-bottom: 14px;
  overflow-y: auto;
}
.catalog-candidate {
  display: grid;
  gap: 5px;
  padding: 6px;
  color: var(--text-2);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.catalog-candidate:hover,
.catalog-candidate.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31, 70, 111, 0.12); }
.catalog-candidate img { width: 100%; height: 108px; object-fit: contain; background: #f7f7f7; }
.catalog-candidate span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-image-form { margin-top: 2px; }
.catalog-confirm { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 12px; }
.catalog-confirm input { width: auto; }
.catalog-sku-details { padding: 0; }
.catalog-sku-details summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.catalog-sku-details summary span { color: var(--text-3); font-size: 11px; font-weight: 400; }
.catalog-sku-details[open] summary { border-bottom: 1px solid var(--border); }
.catalog-size-facts { min-width: 1320px; }
.catalog-review-page { display: grid; gap: 12px; }
.catalog-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.catalog-review-summary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  color: var(--text-2);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.catalog-review-summary button:hover,
.catalog-review-summary button.active { color: var(--accent); border-color: #9eb1cd; background: #f4f7fb; }
.catalog-review-summary button span { font-size: 11px; }
.catalog-review-summary button strong { font-size: 18px; }
.catalog-data-warning {
  display: flex;
  gap: 10px;
  padding: 9px 13px;
  color: #7c4a03;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
}
.catalog-data-warning strong { white-space: nowrap; }
.catalog-review-table tbody tr { cursor: pointer; }
.catalog-review-table tbody tr:hover { background: #f7f8fa; }
.catalog-review-table td:nth-child(2) small { display: block; max-width: 250px; margin-top: 3px; color: var(--text-3); }
.catalog-priority { display: inline-grid; place-items: center; width: 30px; height: 22px; font-size: 10px; font-weight: 800; border-radius: 4px; }
.catalog-priority.p0 { color: #991b1b; background: #fef2f2; }
.catalog-priority.p1 { color: #92400e; background: #fffbeb; }
.catalog-priority.p2 { color: #3f3f46; background: #f4f4f5; }
.catalog-issue { display: inline-block; margin: 2px 3px 2px 0; padding: 2px 5px; color: #7c2d12; font-size: 10px; background: #fff7ed; border-radius: 3px; }
.btn.btn-sm { min-height: 28px; padding: 4px 8px; font-size: 11px; }

@media (max-width: 900px) {
  .catalog-style-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grain-note { align-items: flex-start; flex-direction: column; gap: 2px; }
  .catalog-color-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-operating-note { grid-template-columns: 1fr; }
  .catalog-operating-note p { grid-column: 1; }
  .catalog-operating-note div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .catalog-operating-note span { white-space: normal; }
  .catalog-review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-style-image-card { grid-template-columns: 150px minmax(0, 1fr); }
  .catalog-style-image { height: 150px; }
  .catalog-decision-toolbar > small { text-align: left; }
  .catalog-decision-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-recommendation { grid-template-columns: 1fr; }
  .catalog-reconcile { padding-top: 8px; padding-left: 0; border-top: 1px solid #c8d6e6; border-left: 0; }
  .catalog-followup { grid-template-columns: 1fr; }
  .catalog-followup-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .catalog-decision-grid { grid-template-columns: 1fr; }
  .catalog-scope-switch { margin-left: 0; }
  .catalog-followup-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

::selection { background: #dbeafe; color: var(--text); }

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mobile-only { display: none !important; }

/* ---------- Shell ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ---------- Sidebar · light, calm (Linear-like) ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  padding: 0 10px 12px;
}

.sidebar .logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin: 0 -10px 12px;
  padding-left: 18px;
  padding-right: 18px;
}

.sidebar .logo-mark-shell {
  width: 32px;
  height: 32px;
  padding: 5px 7px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #0a1f3f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.sidebar .logo-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.1;
}

.brand-wordmark {
  width: 132px;
  height: auto;
  display: block;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ---------- 五店经营简报 ---------- */
.boss-layout {
  min-height: 100vh;
  background: var(--bg);
}

.boss-brandbar {
  min-height: 64px;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #0a1f3f;
  background: #f5f6f7;
  border-bottom: 1px solid #dfe3e8;
}

.boss-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.boss-brand-wordmark {
  width: 190px;
  height: auto;
  display: block;
}

.boss-brand small {
  color: #687386;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.boss-brand-flag {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.boss-brand-flag .boss-signal-flags {
  width: 214px;
  height: auto;
  display: block;
}

.boss-signal-flags text {
  fill: #a8b4c0;
  font: 10px Arial, sans-serif;
  letter-spacing: 1px;
}

.boss-view .content {
  width: 100%;
  min-height: calc(100vh - 64px);
}

.boss-view .page-header {
  top: 0;
}

.boss-view .page-body {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.boss-wechat-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid #cbd7e8;
  border-radius: 12px;
  background: #f4f7fb;
}

.boss-wechat-share > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.boss-wechat-share strong {
  color: var(--accent);
  font-size: 13px;
}

.boss-wechat-share span {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.boss-copy-wechat {
  flex: 0 0 auto;
  min-width: 148px;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.boss-wechat-fallback {
  margin: -8px 0 18px;
  padding: 14px 16px;
  border: 1px solid #e4bd6b;
  border-radius: 12px;
  background: #fffaf0;
}

.boss-wechat-fallback label {
  display: block;
  margin-bottom: 8px;
  color: #8a5b00;
  font-size: 12px;
  font-weight: 600;
}

.boss-wechat-fallback textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 13px;
}

.sidebar .nav-label {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 0 2px 8px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-group-label {
  padding: 5px 8px 4px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: none;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.sidebar nav a svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}

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

.sidebar nav a:hover svg { opacity: 1; }

.sidebar nav a.active {
  background: var(--sidebar-active);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.sidebar nav a.active svg { opacity: 1; }

.sidebar nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--border-strong);
}

.sidebar .side-foot {
  margin-top: auto;
  padding: 12px 6px 4px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar .side-foot-meta strong {
  display: block;
  color: var(--text-2);
  font-weight: 550;
  margin-bottom: 2px;
}

/* A/B 主题切换（仅 UI，无业务逻辑） */
.ab-panel { display: flex; flex-direction: column; gap: 6px; }

.ab-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  padding: 0 4px;
  letter-spacing: 0.02em;
}

.ab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ab-switch button {
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.ab-switch button:hover { color: var(--text-2); }

.ab-switch button.active {
  background: var(--text);
  color: #fff;
}

/* ---------- Main content ---------- */
.content {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Page header bar — title / meta / primary action */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-header h1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.page-meta {
  min-width: 0;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Body under sticky header */
.page-body {
  padding: 20px 28px 48px;
  flex: 1;
}

/* Legacy page-title (detail etc.) */
.page-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

/* ---------- Surfaces ---------- */
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.card.card-flush {
  padding: 0;
  overflow: hidden;
}

.card.card-flush .toolbar {
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: #fcfcfc;
}

.card.card-flush .table-wrap { margin: 0; }

.card-hint {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 10px;
}
.section-head > * { min-width: 0; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------- Empty / loading ---------- */
.loading,
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-3);
  font-size: 13px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text);
  animation: spin 0.65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: #fcfcfc;
  margin: 8px 0;
}

/* ---------- Toolbar / filters ---------- */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.toolbar label {
  color: var(--text-2);
  font-weight: 500;
  font-size: 12.5px;
}

.toolbar > span { color: var(--text-3); font-size: 12.5px; }

.toolbar-spacer { flex: 1; min-width: 8px; }

/* ---------- Controls ---------- */
input:not([type]),
input[type="text"],
input[type="email"],
input[type="date"],
input[type="week"],
input[type="month"],
input[type="datetime-local"],
input[type="number"],
input[type="file"],
select,
textarea {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
  font-family: inherit;
  line-height: 1.4;
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 8px 10px;
  line-height: 1.55;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #a1a1aa;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder { color: var(--text-3); }

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.search-box { position: relative; }

.search-box svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-3);
  pointer-events: none;
}

.search-box input {
  padding-left: 30px;
  width: 260px;
  background: var(--surface);
}

/* ---------- Buttons · flat, decisive ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), color 0.12s var(--ease);
  font-family: inherit;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
}

.btn:active { background: #e4e4e7; }

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

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

.btn-danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--surface);
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: #fca5a5;
  color: var(--danger);
}

.btn-sm {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 5px;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: #f4f4f5;
  border-color: transparent;
  color: var(--text);
}

/* ---------- Data table · dense, scannable ---------- */
.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

table.grid {
  /* 不拉伸：窄表紧凑左对齐（消除大空白），宽表超出时由 .table-wrap 横向滚动 */
  width: max-content;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}

table.grid th,
table.grid td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

table.grid th {
  background: #fafafa;
  font-weight: 500;
  color: var(--text-3);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.grid tbody tr {
  transition: background 0.08s var(--ease);
}

table.grid tbody tr[data-sku] { cursor: pointer; }

table.grid tbody tr:hover { background: #fafafa; }

table.grid tbody tr:last-child td { border-bottom: none; }

table.grid td.num,
table.grid th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

table.grid td.num { font-weight: 500; }

table.grid .sku-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

table.grid .name-cell {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;      /* 长品名单行省略，不再撑宽列；悬停由 JS 补 title 显全名 */
  max-width: 240px;
}

/* Thumbnails — compact */
.thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #f4f4f5;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid var(--border);
}

.thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  vertical-align: middle;
  border: 1px solid var(--border);
}
.thumb-placeholder.thumb-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-border);
  font-size: 8px;
  text-align: center;
  line-height: 1.15;
}
.tag.catalog-missing { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }

/* ---------- Tags — quiet status chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  background: #f4f4f5;
  color: var(--text-2);
  border: 1px solid var(--border);
  line-height: 1;
}

/* no decorative dots */
.tag::before { display: none; }

.tag.status-新品 {
  background: var(--info-bg);
  color: var(--info);
  border-color: #bfdbfe;
}

.tag.status-主推 {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.tag.status-清仓 {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.tag.status-下架 {
  background: #f4f4f5;
  color: var(--text-3);
  border-color: var(--border);
}

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.12s var(--ease);
}

@keyframes fadeIn { from { opacity: 0; } }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 640px;
  max-width: 100%;
  max-height: 88vh;
  overflow: auto;
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  animation: rise 0.16s var(--ease);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.modal h3 {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-mask > img {
  max-width: 88vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
  background: #09090b;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.form-grid .full { grid-column: 1 / -1; }

.form-item label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 5px;
  font-weight: 500;
}

.form-item input,
.form-item select,
.form-item textarea { width: 100%; }

.form-item input:disabled {
  background: #fafafa;
  color: var(--text-3);
  cursor: not-allowed;
}

.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  z-index: 200;
  background: #18181b;
  border: 1px solid #27272a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-weight: 500;
  font-size: 13px;
  animation: toastIn 0.18s var(--ease);
  max-width: min(90vw, 400px);
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.toast.error {
  background: var(--danger);
  border-color: #b91c1c;
}

/* ---------- Product detail ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 8px;
  margin-left: -8px;
  border-radius: var(--radius-sm);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.back-link:hover {
  background: #f4f4f5;
  color: var(--text);
  text-decoration: none;
}

.detail-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 18px 20px !important;
}

.detail-img,
.detail-img-placeholder {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #f4f4f5;
}

.detail-img-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
}

.detail-meta { min-width: 0; flex: 1; }

.detail-meta h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.detail-sub {
  color: var(--text-2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
}

.detail-sub .sku-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

.detail-nums {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-nums > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
}

.detail-nums b {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Tabs — underline style (calm, not pill chrome) */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: -4px 0 18px;
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-3);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
  user-select: none;
  white-space: nowrap;
}

.tab:hover { color: var(--text-2); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab[role="tab"]:focus-visible {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* Channel pricing */
.cell-input {
  width: 96px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}

.cell-input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

tr.price-warn td {
  background: var(--danger-bg);
}

tr.price-warn:hover td {
  background: #fee2e2;
}

.warn-text {
  color: var(--danger);
  font-weight: 600;
  font-size: 12px;
}

/* Sales / charts */
.chart-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.trend-chart {
  width: 100%;
  max-width: 820px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  color: var(--accent);
}

/* 缺数 ≠ 0：无数据时的占位符 */
.no-data { color: var(--text-3); }

/* 表单字段提示 */
.field-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

tr.subtotal td {
  background: #fafafa;
  font-weight: 600;
  color: var(--text-2);
  font-size: 12.5px;
}

tr.subtotal.grand td {
  background: #f4f4f5;
  color: var(--text);
  font-weight: 650;
}

/* Assets */
.asset-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.asset-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.12s var(--ease);
}

.asset-item:hover { border-color: var(--border-strong); }

.asset-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  background: #f4f4f5;
}

.asset-video {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  background: #f4f4f5;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 550;
  font-size: 13px;
}

.asset-video:hover { color: var(--text); text-decoration: none; }

.asset-broken {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  color: var(--text-3);
  background: #f4f4f5;
  font-size: 12px;
}

.asset-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

/* Calculator */
.calc-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
}

.calc-result:empty { display: none; }

.calc-row {
  margin: 4px 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}

.calc-row b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--text);
}

.calc-form-grid { max-width: 960px; }
.calc-row.calc-note { margin-top: 8px; color: var(--text-3); font-size: 11px; }

.calc-row .pos { color: var(--success); }
.calc-row .neg { color: var(--danger); }

/* ---------- Report KPI · Stripe-like number first ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 8px;
}

.stat-card {
  min-width: 0;
  padding: 18px 20px;
  position: relative;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.stat-card:last-child { border-right: none; }

/* kill decorative accents from previous design */
.stat-card::before,
.stat-card::after { display: none !important; }
.stat-card:hover { transform: none; box-shadow: none; }

.stat-label {
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

/* ---------- 经营看板 ---------- */
.stat-cards.five { grid-template-columns: repeat(5, 1fr); }
.stat-cards.five .stat-card { border-right: 1px solid var(--border); }
.stat-cards.five .stat-card:last-child { border-right: none; }

.stat-cards.ad-compare-cards {
  grid-template-columns: repeat(2, minmax(0, 260px));
  margin-bottom: 0;
}

.stat-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.stat-compare {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.stat-compare > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
}

.stat-compare b {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.dash-legend {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.dash-legend span { display: inline-flex; align-items: center; gap: 6px; }

.dash-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.hbar-track {
  width: 100%;
  height: 6px;
  background: #f4f4f5;
  border-radius: 3px;
  overflow: hidden;
}

.hbar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  min-width: 2px;
}

/* ---------- Import ---------- */
.import-hint {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.import-desc {
  color: var(--text-2);
  font-size: 12.5px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.import-cols {
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.55;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.import-cols b {
  color: var(--text-2);
  font-weight: 600;
}

.import-status {
  color: var(--text-3);
  font-size: 12.5px;
}

.import-result { margin-top: 10px; }

.import-freshness-note {
  color: var(--text-2);
  font-size: 12px;
  margin-bottom: 8px;
}
.import-controls {
  align-items: flex-end;
  gap: 10px;
  padding: 8px 0 2px;
  flex-wrap: wrap;
}
.import-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
}
.import-control select,
.import-control input {
  height: 30px;
  min-width: 120px;
  font-size: 12px;
}
.import-control select.import-need-attention {
  border: 1.5px solid var(--danger);
  background: var(--danger-bg);
}

/* 按店铺分区的导入布局 */
.import-section {
  padding: 14px 16px 16px;
}
.import-sec-head {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.import-sec-tag {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-3);
}
.import-sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.import-slot {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--card);
}
.import-slot-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.import-slot-title {
  font-size: 13px;
  font-weight: 600;
}
.import-slot-desc {
  font-size: 11.5px;
  color: var(--text-3);
}
.import-source-guide {
  display: grid;
  gap: 4px;
  margin: 7px 0 9px;
  padding: 9px 10px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.import-source-warning {
  color: #9a3412;
}
.import-source-note {
  color: var(--text-3);
}
.import-slot .toolbar {
  margin-top: 4px;
}
.import-slot .import-controls {
  padding: 0;
  margin: 0 0 2px;
}
.import-detect {
  margin-top: 8px;
}
.import-detect-box {
  font-size: 12.5px;
  line-height: 1.7;
  padding: 10px 12px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
}

.muted {
  color: var(--text-3);
  font-size: 12.5px;
}

/* Report date inline in header */
.header-date {
  height: 32px;
}

/* 日期 / 周 / 月 / 日期时间统一沿用同一套浏览器原生选择器外壳。 */
input[type="date"],
input[type="week"],
input[type="month"],
input[type="datetime-local"] {
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  margin-left: 6px;
  opacity: 0.72;
  cursor: pointer;
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="week"]:hover::-webkit-calendar-picker-indicator,
input[type="month"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}
input.time-control-compact {
  height: 28px;
  font-size: 12px;
}

/* 月度财务关账：结果优先、证据下钻；所有宽表只在自身容器内横滑。 */
.finance-pnl-section { margin: 0 0 16px; }
.finance-pnl-head { margin-bottom: 8px; }
.finance-pnl-tabs { margin: 0 0 8px; flex-wrap: wrap; }
.finance-pnl-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.finance-pnl-grid { min-width: 980px; width: max-content; }
.finance-pnl-grid th,
.finance-pnl-grid td { font-variant-numeric: tabular-nums; }
.finance-pnl-grid th:first-child,
.finance-pnl-grid td:first-child,
.finance-pnl-grid tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
  min-width: 148px;
  text-align: left;
  font-weight: 600;
}
.finance-pnl-grid thead th:first-child { z-index: 3; background: #fafafa; }
.finance-close-section { margin-top: 0; }
.finance-close-head { align-items: flex-end; }
.finance-close-head > div:first-child { max-width: 760px; }
.finance-close-toolbar { margin: 0; flex-shrink: 0; }
.finance-close-toolbar label { font-size: 12px; color: var(--text-3); }
.finance-close-toolbar input[type="month"] { width: 150px; }
.finance-close-guide {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
}
.finance-close-guide-head {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 10px;
}
.finance-close-guide-head strong { font-size: 14px; }
.finance-close-guide-head span { font-size: 12px; color: var(--text-3); }
.finance-close-guide-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.finance-close-guide-steps li {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--border);
}
.finance-close-guide-steps li.is-done { opacity: 0.72; }
.finance-close-guide-steps li.is-current { border-color: #1d4ed8; box-shadow: 0 0 0 1px #1d4ed8; }
.finance-close-guide-n {
  flex: 0 0 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: #e4e4e7; color: #3f3f46;
}
.finance-close-guide-steps li.is-done .finance-close-guide-n { background: #dcfce7; color: #166534; }
.finance-close-guide-steps li.is-current .finance-close-guide-n { background: #1d4ed8; color: #fff; }
.finance-close-guide-steps small { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; line-height: 1.4; }
.finance-close-guide-note { margin-top: 8px; font-size: 11px; color: var(--text-3); }
@media (max-width: 800px) {
  .finance-close-guide-steps { grid-template-columns: 1fr; }
}
.finance-close-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 12px;
}
.finance-close-shop {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.finance-close-shop:last-child { border-right: 0; }
.finance-close-shop-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.finance-close-shop-value {
  margin: 8px 0 3px;
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.finance-close-shop-value span { font-size: 12px; color: var(--text-3); font-weight: 400; }
.finance-close-shop .muted { font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.finance-close-note,
.finance-evidence-note {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.finance-close-note { margin-bottom: 12px; }
.finance-close-detail,
.finance-checks,
.finance-evidence {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-bottom: 10px;
}
.finance-close-detail > summary,
.finance-checks > summary,
.finance-evidence > summary {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.finance-close-detail:not([open]) > summary,
.finance-checks:not([open]) > summary,
.finance-evidence:not([open]) > summary { border-bottom: 0; }
.finance-close-grid { min-width: 760px; width: 100%; }
.finance-close-grid th:first-child,
.finance-close-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.finance-close-grid thead th:first-child { z-index: 3; background: #fafafa; }
.finance-evidence-note { margin: 10px 12px; }
.finance-check-grid { min-width: 1120px; width: 100%; }
.finance-check-grid th:first-child,
.finance-check-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.finance-check-grid thead th:first-child { z-index: 3; background: #fafafa; }
.finance-check-note { min-width: 320px; max-width: 520px; white-space: normal; line-height: 1.5; }
.finance-evidence-grid { min-width: 980px; width: 100%; }
.finance-source-file { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.finance-operating-section { margin-top: 32px; }

@media (max-width: 1200px) {
  .finance-close-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-close-shop { border-bottom: 1px solid var(--border); }
  .finance-close-shop:nth-child(2n) { border-right: 0; }
  .finance-close-shop:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 720px) {
  .finance-close-head { align-items: flex-start; }
  .finance-close-toolbar { width: 100%; }
  .finance-close-toolbar input[type="month"] { flex: 1; min-width: 135px; }
  .finance-close-cards { grid-template-columns: 1fr; }
  .finance-close-shop,
  .finance-close-shop:nth-child(2n),
  .finance-close-shop:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .finance-close-shop:last-child { border-bottom: 0; }
}

/* ---------- 统一周期选择器（多模式=紧凑下拉浮层，单模式=内联 picker） ---------- */
.period-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.period-dd {
  position: relative;
  display: inline-block;
}
.period-btn {
  white-space: nowrap;
}
.period-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 300;
  width: 272px;
  padding: 8px;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  display: flex;
}
.period-modes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 8px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.period-mode {
  padding: 5px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  text-align: left;
}
.period-mode:hover {
  background: var(--sidebar-hover);
}
.period-mode.active {
  background: var(--accent);
  color: #fff;
}
.period-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.period-picker {
  width: 100%;
}
.period-custom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.period-custom .header-date {
  width: 100%;
}
.period-custom-sep {
  font-size: 11px;
}
.period-apply {
  align-self: flex-end;
}
.period-label {
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- 本月目标进度（看板顶部，实际 vs 应达竖线 vs 目标终点） ---------- */
.tgt-cell {
  min-width: 110px;
}
.tgt-bar {
  position: relative;
  height: 12px;
  background: var(--sidebar);
  border-radius: 4px;
}
.tgt-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--text-3);
}
.tgt-fill.ok { background: var(--success); }
.tgt-fill.warn { background: var(--warning); }
.tgt-fill.bad { background: var(--danger); }
.tgt-due {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--text);
  border-radius: 1px;
}
.tgt-bar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-3);
}
.tgt-edit {
  height: 26px;
  padding: 2px 10px;
  font-size: 12px;
}

/* ---------- 目标达成 · 链路条 + 杠杆卡 ---------- */
.chain-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 8px;
  overflow-x: auto;
}
.chain-node {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.chain-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.chain-val {
  font-size: 12px;
  line-height: 1.5;
}
.chain-rate {
  margin-top: 4px;
}
.chain-arrow {
  text-align: center;
  color: var(--text-3);
  font-size: 16px;
  line-height: 1.2;
  padding: 0 6px;
  flex-shrink: 0;
}
.chain-lever {
  font-size: 10px;
  color: var(--text-3);
}
.lever-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.lever-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--card);
}
.lever-card.lever-ok { border-color: var(--success-border); background: var(--success-bg); }
.lever-card.lever-bad { border-color: var(--danger-border); background: var(--danger-bg); }
.lever-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.lever-vals {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.lever-tgt { color: var(--text-3); }
.lever-act { font-weight: 600; }
.fin-neg { color: var(--danger); font-weight: 600; }
.dash-mobile-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.dash-mobile-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--border);
}
.dash-mobile-summary-head strong { font-size: 13px; }
.dash-mobile-summary-head span { color: var(--text-3); font-size: 11px; }
.dash-mobile-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.dash-mobile-kpi {
  min-width: 0;
  padding: 12px 13px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dash-mobile-kpi:nth-child(2n) { border-right: none; }
.dash-mobile-kpi-label { color: var(--text-3); font-size: 11px; margin-bottom: 3px; }
.dash-mobile-kpi-value { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.dash-mobile-kpi-note { margin-top: 3px; color: var(--text-2); font-size: 10.5px; }
.dash-mobile-alerts { padding: 11px 13px 4px; }
.dash-mobile-alerts-title { font-size: 11px; font-weight: 650; color: var(--text-2); margin-bottom: 7px; }
.dash-mobile-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
}
.dash-mobile-alert:first-of-type { border-top: 0; }
.dash-mobile-stores { padding: 4px 13px 11px; }
.dash-mobile-store {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
}
.dash-mobile-store-name { display: block; font-weight: 600; font-size: 12px; }
.dash-mobile-store-meta { display: block; color: var(--text-3); font-size: 10.5px; margin-top: 2px; }
.dash-mobile-store-action { color: var(--accent); font-size: 11px; font-weight: 650; }
.mobile-desktop-hint {
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  background: #fcfcfc;
  font-size: 11.5px;
}
.chain-link { text-align: center; color: var(--text-3); font-size: 16px; line-height: 1.2; }
.layer-fix { margin-top: 8px; font-size: 11px; color: var(--text-3); }
.funnel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.funnel-rates { display: flex; gap: 18px; font-size: 12.5px; padding: 8px 4px 2px; flex-wrap: wrap; }
.diag-blocked {
  margin-bottom: 10px; padding: 8px 12px; font-size: 12px;
  color: var(--danger); background: var(--danger-bg, #fef2f2);
  border: 1px solid var(--danger-border, #fecaca); border-radius: 8px;
}

@media (max-width: 800px) {
  #dash-targets > .chain-bar,
  #dash-targets > .lever-row,
  #dash-targets > .field-hint,
  #dash-targets > .dash-target-store-table,
  #dash-targets > .dash-target-categories { display: none; }
  #dash-targets .tag { font-size: 10px; }
  .stat-cards.five { grid-template-columns: 1fr 1fr; }
  .stat-cards.five .stat-card:last-child { grid-column: 1 / -1; }
  .stat-cards.five .stat-card { min-height: 96px; }
  .stat-cards.five .stat-value { font-size: 18px; }
  .trend-chart { min-width: 620px; }
  .card:has(.trend-chart) { overflow-x: auto; }
}

/* ---------- 商品经营诊断（量-率-速，详情页 tab） ---------- */
.stat-cards.diag-cards { grid-template-columns: repeat(3, 1fr); }
.stat-cards.diag-cards .stat-card { border-right: 1px solid var(--border); }
.stat-cards.diag-cards .stat-card:last-child { border-right: none; }
.pct-bar {
  position: relative;
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--danger-bg) 0%, var(--danger-bg) 30%,
    var(--sidebar) 30%, var(--sidebar) 70%,
    var(--success-bg) 70%, var(--success-bg) 100%);
  border: 1px solid var(--border);
}
.pct-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--text);
  border-radius: 1px;
}
.diag-conclusion {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.diag-line { font-size: 13px; line-height: 1.9; }

/* ---------- 种草引流（漏斗 + 级间转化率侧栏） ---------- */
.seed-funnel-wrap {
  display: flex;
  gap: 16px;
  align-items: stretch;
  padding: 12px 16px;
}
.seed-funnel-rates {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  font-size: 12.5px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #a1a1aa; background-clip: padding-box; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-cards.five { grid-template-columns: repeat(2, 1fr); }
  .stat-cards.five .stat-card { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) { border-bottom: 1px solid var(--border); }
  .page-body { padding: 16px 18px 40px; }
  .page-header { padding: 0 18px; }
}

@media (max-width: 800px) {
  body { overflow-x: hidden; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 7px 10px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(24, 24, 27, 0.06);
  }
  .sidebar .logo {
    height: auto;
    border: none;
    margin: 0;
    padding: 6px 8px;
    flex: 1;
    min-width: 0;
  }
  .sidebar .logo-mark-shell { width: 28px; height: 28px; padding: 4px 6px; }
  .brand-wordmark { width: 116px; }
  .brand-copy small { display: none; }
  .boss-brandbar { min-height: 56px; padding: 7px 14px; }
  .boss-brand-wordmark { width: 142px; }
  .boss-brand small { font-size: 9px; }
  .boss-brand-flag .boss-signal-flags { width: 148px; }
  .boss-view .content { min-height: calc(100vh - 56px); }
  .boss-wechat-share { align-items: stretch; flex-direction: column; gap: 12px; }
  .boss-copy-wechat { width: 100%; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    background: var(--surface);
    font: 600 12px/1 var(--font);
  }
  .nav-toggle-label {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-toggle svg { width: 16px; height: 16px; flex: 0 0 auto; }
  .sidebar .nav-label,
  .sidebar .side-foot-meta { display: none; }
  .sidebar .side-foot {
    margin: 0;
    padding: 0;
    border: none;
    width: 100%;
    order: 3;
  }
  .ab-switch { max-width: 220px; }
  .sidebar nav {
    display: none;
    order: 3;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 8px 2px 6px;
    gap: 8px;
  }
  .sidebar.nav-open nav { display: grid; }
  .nav-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding-top: 7px;
    border-top: 1px solid var(--border);
  }
  .nav-group:first-child { border-top: none; padding-top: 0; }
  .nav-group-label {
    grid-column: 1 / -1;
    padding: 2px 8px 3px;
  }
  .sidebar nav a { min-height: 38px; padding: 8px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; align-items: flex-start; }
  .search-box input { width: 100%; min-width: 180px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 20px; }
  .page-header { position: relative; top: auto; flex-wrap: wrap; min-height: auto; padding: 12px 14px; }
  .page-header-left:has(> .page-meta),
  .page-header-left:has(> h1 + .page-meta) { width: 100%; align-items: flex-start; flex-direction: column; gap: 4px; }
  .page-header-left > .page-meta { width: 100%; }
  /* 手机阅读增强（老板微信/企微/邮箱打开场景） */
  .sidebar .side-foot { display: none; }
  .page-header-right { flex-wrap: wrap; width: 100%; gap: 8px; }
  .page-header-right select { max-width: 100%; }
  .section-head { flex-wrap: wrap; }
  .section-head .section-title, .section-head .section-sub { max-width: 100%; flex: 1 1 auto; min-width: 0; }
  .section-title .muted { display: none; }
  .page-body { padding: 14px 14px 36px; }
  .section { margin-top: 22px; }
  .mobile-only { display: block !important; }
}

/* 商品列表分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--border, #e5e7eb); }
.pager .btn:disabled { opacity: .45; cursor: not-allowed; }

/* 五店日报（老板版） */
.boss-grid .rank-input { width: 130px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; }
.boss-grid .rank-input:hover, .boss-grid .rank-input:focus { border-color: var(--border, #d7dce3); background: #fff; outline: none; }
.rank-display, .rank-fallback { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 128px; }
.rank-display strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-period { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 6px; border-radius: 999px; background: #eef2f7; color: var(--text-3); font-size: 11px; white-space: nowrap; }
.rank-status { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.rank-permission { color: var(--warning); }
.rank-fallback .rank-input { flex: 1 1 116px; border-color: var(--border, #d7dce3); background: #fff; }
.rank-history-block { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rank-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.rank-history-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.rank-history-head span, .rank-policy-note, .rank-history-note { color: var(--text-3); font-size: 12px; }
.rank-history-note { max-width: 440px; text-align: right; }
.rank-chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.rank-chart-card { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.rank-chart-card-head, .rank-chart-card-head > div, .rank-chart-kpis, .rank-chart-foot {
  display: flex; align-items: center;
}
.rank-chart-card-head { justify-content: space-between; gap: 10px; }
.rank-chart-card-head > div { min-width: 0; flex-wrap: wrap; gap: 7px; }
.rank-chart-card-head strong { font-size: 13px; }
.rank-chart-direction { color: var(--success) !important; font-size: 10px !important; white-space: nowrap; }
.rank-chart-kpis { align-items: flex-end; gap: 18px; margin-top: 14px; }
.rank-chart-kpis > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.rank-chart-kpis span { color: var(--text-3); font-size: 10px; }
.rank-chart-kpis strong, .rank-chart-kpis .rank-up, .rank-chart-kpis .rank-down, .rank-chart-kpis .rank-flat {
  min-height: 20px; color: var(--text); font-size: 13px; line-height: 20px;
}
.rank-chart-kpis .rank-up { color: var(--success); }
.rank-chart-kpis .rank-down { color: var(--danger); }
.rank-chart-current strong { color: var(--accent); font-size: 20px; font-variant-numeric: tabular-nums; }
.rank-trend-chart { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.rank-chart-gridline { stroke: #e7eaf0; stroke-width: 1; vector-effect: non-scaling-stroke; }
.rank-chart-line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rank-chart-point { fill: #fff; stroke: var(--accent); stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.rank-chart-point.is-latest { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.rank-chart-axis { fill: var(--text-3); font-size: 9px; font-variant-numeric: tabular-nums; }
.rank-chart-axis-better { fill: var(--success); font-weight: 650; }
.rank-chart-sample-note { margin: -7px 0 8px; color: var(--text-3); font-size: 10px; text-align: center; }
.rank-chart-empty { display: flex; min-height: 132px; margin-top: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border-radius: 8px; background: #f7f8fa; color: var(--text-2); font-size: 13px; text-align: center; }
.rank-chart-empty span { color: var(--text-3); font-size: 10px; }
.rank-chart-foot { justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid #eef0f3; color: var(--text-3); font-size: 10px; }
.rank-up { color: var(--success); font-weight: 600; white-space: nowrap; }
.rank-down { color: var(--danger); font-weight: 600; white-space: nowrap; }
.rank-flat { color: var(--text-3); white-space: nowrap; }
.boss-grid .total-row td { font-weight: 600; border-top: 2px solid var(--border, #d7dce3); }
/* 手机端横滑时店铺列钉住，老板扫读不迷路 */
.boss-grid th:first-child, .boss-grid td:first-child {
  position: sticky; left: 0; z-index: 2; background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.boss-grid thead th:first-child { z-index: 3; background: #fafafa; }
.src-tag { display: inline-block; font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 4px; background: #eef2f7; color: #5a6b85; vertical-align: middle; }

@media (max-width: 800px) {
  .rank-history-head { flex-direction: column; }
  .rank-history-note { max-width: none; text-align: left; }
  .rank-chart-grid { grid-template-columns: 1fr; padding: 10px; }
  .rank-chart-card { padding: 12px; }
  .rank-chart-kpis { justify-content: space-between; gap: 8px; }
}

@media (min-width: 801px) and (max-width: 1220px) {
  .rank-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 内容素材看板：诊断标签徽章 + 可排序表头 */
.tag.diag-可放量 { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.tag.diag-缺曝光 { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.tag.diag-缺停留 { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.tag.diag-缺点击 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tag.diag-缺成交 { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.tag.diag-需重拍 { background: var(--danger); color: #fff; border-color: var(--danger); }
.tag.diag-数据不足 { background: #f4f4f5; color: var(--text-3); border-color: var(--border); }

table.grid th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.grid th.sortable:hover { color: var(--text); }
table.grid th.sorted { color: var(--accent); }

/* 全站表头排序（app.js 事件委托版）：可排表头指示 + 方向箭头 */
table.grid thead th { cursor: pointer; user-select: none; }
table.grid thead th:hover { color: var(--text); }
table.grid.no-sort thead th { cursor: default; }
table.grid.grid-narrow { max-width: 760px; }

/* 桌面端：表格填满卡片宽度（消除右侧大空白）；窄表等分列避免单个大空白。手机保持紧凑横滑 */
@media (min-width: 801px) {
  table.grid { min-width: 100%; }
  table.grid.grid-narrow { max-width: none; table-layout: fixed; }
}
table.grid th.sorted.sort-asc::after { content: ' ▲'; font-size: 9px; }
table.grid th.sorted.sort-desc::after { content: ' ▼'; font-size: 9px; }

/* 店铺分析：数据完整度徽章 + 六宫格指标卡 */
.stat-cards.six { grid-template-columns: repeat(6, 1fr); }
.stat-cards.six .stat-card { border-right: 1px solid var(--border); }
.stat-cards.six .stat-card:last-child { border-right: none; }
.tag.comp-good { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.tag.comp-warn { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.tag.comp-bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
@media (max-width: 1100px) { .stat-cards.six { grid-template-columns: repeat(2, 1fr); } }

/* 全年目标视角：宽弹窗 + 可点击单元格 */
.modal.modal-wide { width: min(1160px, 96vw); }
.yt-cell { cursor: pointer; }
.yt-cell:hover { background: var(--hover, rgba(0, 0, 0, 0.04)); }
.yt-empty { color: var(--text-muted, #999); }

/* 全年目标拆分页 */
.pl-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pl-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius, 8px); padding: 10px 12px; cursor: pointer; background: var(--surface); }
.pl-card:hover { border-color: var(--border-strong); }
.pl-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pl-card-t { min-width: 0; font-size: 12px; font-weight: 600; margin-bottom: 6px; overflow-wrap: anywhere; }
.pl-card-v { min-width: 0; font-size: 12px; color: var(--text-2); line-height: 1.8; overflow-wrap: anywhere; }
.pl-rate-bar { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
table.grid.pl-table { width: 1110px; min-width: 100%; table-layout: fixed; font-size: 12px; }
.pl-table th,
.pl-table td { padding-left: 8px; padding-right: 8px; }
.pl-table th:first-child,
.pl-table td:first-child { width: 116px; }
.pl-table td.pl-strong { font-weight: 600; }
.pl-table tr.pl-subrow td { color: var(--text-2); }
.pl-badge { display: inline-block; font-size: 10px; line-height: 14px; padding: 0 4px; border-radius: 3px; background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); margin-left: 4px; vertical-align: 1px; }
@media (max-width: 1200px) { .pl-cards { grid-template-columns: repeat(3, 1fr); } }

/* 五店经营节奏 */
.pace-section { margin-bottom: 24px; }
.pace-toolbar,
.pace-calendar-head,
.pace-summary,
.pace-actions,
.pace-checks { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pace-toolbar,
.pace-calendar-head { justify-content: space-between; }
.pace-actions label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.pace-actions input,
.pace-actions select { height: 30px; font-size: 12px; }
.pace-actions #pace-actor { width: 190px; }
.pace-summary { padding: 10px 12px; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius, 8px); font-size: 12px; color: var(--text-2); }
.pace-summary > div:first-child { display: flex; align-items: center; gap: 8px; color: var(--text); }
.pace-summary code { font-size: 11px; }
.pace-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 11px; background: var(--surface); color: var(--text-2); }
.pace-badge.ok { color: var(--success); border-color: var(--success); }
.pace-badge.warn { color: var(--warning); border-color: var(--warning); }
.pace-badge.bad,
.pace-blocked { color: var(--danger); border-color: var(--danger); }
.pace-fallback { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius, 8px); font-size: 12px; color: var(--text-2); }
.pace-validation { display: flex; gap: 8px 14px; flex-wrap: wrap; margin-top: 10px; padding: 9px 12px; border-radius: 6px; font-size: 12px; }
.pace-validation.ok { color: var(--success); background: var(--success-bg); }
.pace-validation.bad { color: var(--danger); background: var(--danger-bg); }
.pace-store-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.pace-store-card { min-width: 0; padding: 10px; text-align: left; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); cursor: pointer; }
.pace-store-card:hover,
.pace-store-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pace-store-card strong,
.pace-store-card span { display: block; }
.pace-store-card span { margin-top: 4px; color: var(--text-2); font-size: 11px; line-height: 1.4; }
.pace-calendar { border: 1px solid var(--border); border-radius: var(--radius, 8px); overflow: hidden; }
.pace-calendar-head { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--sidebar); }
.pace-calendar-head > div:first-child span { display: block; margin-top: 3px; color: var(--text-2); font-size: 11px; }
.pace-table select,
.pace-table input { height: 26px; min-width: 90px; font-size: 11px; }
.pace-table .pace-weight { width: 96px; text-align: right; }
.pace-checks { justify-content: flex-end; padding: 9px 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-2); }
.pace-performance { margin-top: 12px; }
.pace-performance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.pace-performance-head > div { min-width: 0; }
.pace-performance-head strong,
.pace-performance-head span { display: block; }
.pace-performance-head strong { font-size: 13px; }
.pace-performance-head span { margin-top: 3px; color: var(--text-3); font-size: 10px; line-height: 1.45; }
.pace-performance-head > span { flex: 0 0 auto; margin-top: 0; padding: 3px 7px; border-radius: 999px; background: var(--bg); }
.pace-performance-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pace-performance-card { min-width: 0; padding: 10px; border: 1px solid var(--border); border-top: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.pace-performance-card.ok { border-top-color: var(--success); }
.pace-performance-card.warn { border-top-color: var(--warning); }
.pace-performance-card.bad { border-top-color: var(--danger); }
.pace-performance-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pace-performance-card > div:first-child strong { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.pace-performance-card dl { display: grid; gap: 6px; margin: 10px 0 0; }
.pace-performance-card dl > div { min-width: 0; }
.pace-performance-card dt { color: var(--text-3); font-size: 9px; }
.pace-performance-card dd { margin: 2px 0 0; color: var(--text-2); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.pace-performance-card dd.bad { color: var(--danger); }
.pace-performance-card p { margin: 7px 0 0; color: var(--danger); font-size: 9px; line-height: 1.4; }
@media (max-width: 1000px) {
  .pace-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pace-performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pace-toolbar { align-items: flex-start; }
}
@media (max-width: 800px) {
  .pace-section { margin: 0 12px 20px; }
  .pace-actions { width: 100%; }
  .pace-actions label { width: 100%; justify-content: space-between; }
  .pace-actions input,
  .pace-actions select,
  .pace-actions #pace-actor { flex: 1; width: auto; }
  .pace-store-grid { grid-template-columns: 1fr; }
  .pace-performance-head { flex-direction: column; }
  .pace-performance-grid { grid-template-columns: 1fr; }
}

/* 经营复盘：图表在窄屏保留图例和坐标空间，分类标签完整呈现 */
.weekly-chart { width: 100%; min-width: 0; }
.weekly-quad-chart { height: 440px; }
.weekly-trend-chart { height: 260px; }
.weekly-page-body .section-sub { max-width: 100%; }
.weekly-page-body,
.report-page-body { container: decision-body / inline-size; }

/* 五张老板卡按内容区宽度重排，避免侧栏存在时只按浏览器宽度误判。 */
.stat-cards.five.adaptive-five {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}
.stat-cards.five.adaptive-five > .stat-card {
  grid-column: span 2;
  border: 0 !important;
}
.report-profit-summary.refund-rate-summary {
  grid-template-columns: repeat(16, minmax(0, 1fr));
}
.report-profit-summary.refund-rate-summary > .stat-card { grid-column: span 2; }
.weekly-summary .stat-value,
.report-profit-summary .stat-value { white-space: nowrap; }
.weekly-summary > .stat-card:last-child .stat-value { white-space: normal; }
.weekly-product-table .weekly-image-col { width: 76px; }
.weekly-product-table .weekly-style-col { min-width: 118px; }
.weekly-product-table .name-cell { max-width: 240px; }

@container decision-body (max-width: 980px) {
  .stat-cards.five.adaptive-five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat-cards.five.adaptive-five > .stat-card:nth-child(-n + 3) { grid-column: span 2; }
  .stat-cards.five.adaptive-five > .stat-card:nth-child(n + 4) { grid-column: span 3; }
  .report-profit-summary.refund-rate-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .report-profit-summary.refund-rate-summary > .stat-card:nth-child(n) { grid-column: span 2; }
  .report-profit-summary.refund-rate-summary > .stat-card:nth-last-child(2) { grid-column: 2 / span 2; }
}

@container decision-body (max-width: 640px) {
  .stat-cards.five.adaptive-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards.five.adaptive-five > .stat-card:nth-child(n) { grid-column: span 1; }
  .stat-cards.five.adaptive-five > .stat-card:last-child { grid-column: 1 / -1; }
  .report-profit-summary.refund-rate-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-profit-summary.refund-rate-summary > .stat-card:nth-child(n) { grid-column: span 1; }
}

/* 标题说明和周选择器在中等窗口主动换行，不等到手机断点才处理。 */
@media (max-width: 1320px) {
  .weekly-page-header {
    min-height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .weekly-page-header .page-header-left {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .weekly-page-header .page-header-right { width: 100%; justify-content: flex-start; }
}

@media (max-width: 800px) {
  .weekly-quad-chart { height: 420px; }
  .weekly-trend-chart { height: 240px; }
  .weekly-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    margin-bottom: 12px;
  }
  .weekly-tabs .tab {
    min-width: 0;
    justify-content: center;
    padding: 9px 5px;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
}

/* 经营总览 · 盈利周报 */
.report-profit-head > div:first-child { min-width: 0; }
.report-profit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.report-profit-actions label { color: var(--text-3); font-size: 11.5px; }
.report-period-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
}
.report-period-option {
  min-width: 66px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.report-period-option.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
  font-weight: 650;
}
.report-period-field { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.report-data-health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--surface);
}
.report-data-health.is-complete { border-left-color: var(--success); }
.report-data-health.is-missing { border-left-color: var(--danger); }
.report-health-copy { min-width: 0; display: grid; gap: 2px; line-height: 1.4; }
.report-health-copy strong { font-size: 12px; }
.report-health-copy span { color: var(--text-3); font-size: 10.5px; overflow-wrap: anywhere; }
.report-health-items { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.report-health-item {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-3);
  font-size: 10.5px;
  white-space: nowrap;
}
.report-health-item.is-complete { color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent); }
.report-health-item.is-missing { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.report-store-cell { min-width: 160px; line-height: 1.35; }
.report-row-gaps { margin-top: 4px; color: var(--danger); font-size: 10.5px; line-height: 1.45; overflow-wrap: anywhere; }
.report-row-latest { margin-top: 2px; color: var(--text-3); font-size: 9.5px; line-height: 1.4; overflow-wrap: anywhere; }
.report-row-ready { margin-top: 3px; color: var(--success); font-size: 10.5px; }
.report-profit-table-card { margin-top: 10px; }
.report-profit-grid .report-profit-rate { margin-top: 2px; font-size: 10.5px; }
.report-profit-grid .report-profit-primary {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  font-weight: 650;
}
.report-profit-grid th:first-child,
.report-profit-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-sizing: border-box;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  white-space: normal;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.report-profit-grid thead th:first-child { z-index: 4; background: #fafafa; }
@media (min-width: 900px) {
  .report-profit-grid th:nth-child(2),
  .report-profit-grid td:nth-child(2) {
    position: sticky;
    left: 180px;
    z-index: 2;
    box-sizing: border-box;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
  }
  .report-profit-grid th:nth-child(3),
  .report-profit-grid td:nth-child(3) {
    position: sticky;
    left: 312px;
    z-index: 2;
    box-sizing: border-box;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    box-shadow: 1px 0 0 var(--border);
  }
  .report-profit-grid thead th:nth-child(2),
  .report-profit-grid thead th:nth-child(3) { z-index: 4; }
}
.report-profit-foot {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@container decision-body (max-width: 720px) {
  .report-profit-head { align-items: stretch; flex-wrap: wrap; }
  .report-profit-head > div:first-child,
  .report-profit-actions { width: 100%; }
  .report-profit-actions { justify-content: flex-start; }
  .report-data-health { align-items: flex-start; flex-direction: column; }
  .report-health-items { justify-content: flex-start; }
}

@media (max-width: 800px) {
  .report-profit-head { align-items: stretch; }
  .report-profit-head > div:first-child,
  .report-profit-actions { width: 100%; }
  .report-profit-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .report-period-toggle { width: 100%; }
  .report-period-field { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .report-profit-actions input { width: 100%; min-width: 0; }
  .report-profit-actions .btn { width: 100%; }
}

/* 目标拆分：统一内容边界、横向数据表提示与窄屏排版 */
.target-page-header .page-meta,
.target-pace-section,
.target-pl-body,
.target-ops-section,
.target-monthly-section,
.target-section-head,
.target-controls,
.target-view-controls,
.target-table-shell,
.data-table-shell { min-width: 0; }
.target-page-header .page-meta,
.target-pace-section .section-sub,
.target-ops-section .section-sub { line-height: 1.5; overflow-wrap: anywhere; }
.target-pace-section { margin: 28px 28px 24px; }
.target-ops-section { margin: 30px 28px 48px; }
.target-monthly-section { margin-top: 26px; }
.target-controls,
.target-view-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.target-view-controls { gap: 6px; margin-bottom: 12px; }
.ops-target-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.target-table-card,
.target-table-shell,
.data-table-shell { position: relative; max-width: 100%; }
.target-table-wrap,
.data-table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}
.target-table-hint,
.data-table-hint {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.4;
}
.target-table-shell.has-scroll > .target-table-hint,
.data-table-shell.has-scroll > .target-table-hint,
.data-table-shell.has-scroll > .data-table-hint { display: flex; }
.target-table-shell.has-scroll:not(.at-scroll-end)::after,
.data-table-shell.has-scroll:not(.at-scroll-end)::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 30px;
  right: 0;
  bottom: 8px;
  width: 18px;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 92%));
}
.data-table-wrap:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.target-table-wrap table.grid th:first-child,
.target-table-wrap table.grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.target-table-wrap table.grid thead th:first-child { z-index: 3; background: #fafafa; }
.pace-toolbar > div:first-child,
.pace-calendar-head > div:first-child,
.pace-summary > div,
.pace-checks > span { min-width: 0; overflow-wrap: anywhere; }
.pace-summary strong,
.pace-summary code { overflow-wrap: anywhere; word-break: break-word; }
.pace-calendar { min-width: 0; }

@media (max-width: 1100px) {
  .target-pace-section { margin-left: 18px; margin-right: 18px; }
  .target-ops-section { margin-left: 18px; margin-right: 18px; }
  .ops-target-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .target-page-header .page-header-left { width: 100%; align-items: flex-start; flex-direction: column; gap: 4px; }
  .target-page-header .page-meta { width: 100%; }
  .target-pace-section { margin: 20px 14px; }
  .target-ops-section { margin: 24px 14px 36px; }
  .target-section-head { align-items: stretch; gap: 10px; }
  .target-controls { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .target-controls select,
  .target-controls input,
  .target-controls .btn { width: 100%; min-width: 0; }
  .target-controls #ops-autosplit { grid-column: 1 / -1; min-height: 34px; height: auto !important; white-space: normal; }
  .target-view-controls .field-hint { flex: 1 0 100%; margin-left: 0 !important; line-height: 1.5; }
  .target-summary-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-target-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-card { padding: 10px; }
  .pl-card-v { line-height: 1.65; }
  .pl-rate-bar { line-height: 1.55; }
  .pace-toolbar,
  .pace-calendar-head { align-items: stretch; }
  .pace-toolbar > div:first-child,
  .pace-calendar-head > div:first-child { width: 100%; }
  .pace-checks { justify-content: flex-start; }
  .target-table-hint { justify-content: space-between; }
}

/* 行动工作台 */
.store-method-pack { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #cbdaf5; border-radius: var(--radius-lg); background: linear-gradient(135deg, #f8fbff 0%, #fff 72%); }
.method-pack-head,
.method-pack-row,
.method-pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.method-pack-head > div { display: flex; align-items: center; gap: 9px; }
.method-pack-head strong { font-size: 14px; }
.method-platform { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: #142b52; color: #fff; font-size: 10px; }
.method-pack-row { margin-top: 10px; align-items: flex-start; }
.method-pack-row > span { flex: 0 0 106px; padding-top: 3px; color: var(--text-3); font-size: 11px; }
.method-pack-row > div { display: flex; flex: 1; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.method-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 8px; border: 1px solid #cbdaf5; border-radius: 999px; background: #fff; color: #31558e; font-size: 11px; }
.method-chip.common { border-color: var(--border); color: var(--text-2); background: var(--bg); }
.method-pack-foot { margin-top: 11px; padding-top: 10px; border-top: 1px solid #e3eaf5; align-items: flex-start; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.method-pack-foot span:first-child { flex: 0 0 auto; font-weight: 600; color: var(--text); }
.ops-scope-note { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg); color: var(--text-2); font-size: 11px; line-height: 1.55; }
.ops-scope-note a { color: var(--accent); text-decoration: none; }
.ops-scope-note a:hover { text-decoration: underline; }
.ops-command-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 18px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.ops-command-fields { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 10px; min-width: 0; }
.ops-command-fields label { display: grid; min-width: 0; gap: 5px; color: var(--text-2); font-size: 11px; }
.ops-command-fields label > span { line-height: 1.2; }
.ops-command-fields input,
.ops-command-fields select { width: 100%; min-width: 0; height: 34px; font-size: 12px; }
.ops-command-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.ops-command-actions .btn { max-width: 100%; min-height: 34px; white-space: normal; text-align: center; overflow-wrap: anywhere; }
.ops-scope-note,
.ops-zone,
.ops-metric,
.ops-source,
.ops-alert,
.ops-task { min-width: 0; overflow-wrap: anywhere; }
.ops-workbench { display: grid; gap: 14px; }
.ops-zone { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.ops-zone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ops-zone-head > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ops-zone-head h2 { margin: 0; font-size: 15px; }
.ops-zone-head > span { min-width: 0; color: var(--text-3); font-size: 11px; text-align: right; overflow-wrap: anywhere; }
.ops-zone-no { color: var(--text-3); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.ops-verdict-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ops-verdict-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.ops-assistant-card { padding: 16px; border: 1px solid #cbdaf5; border-left: 4px solid #31558e; border-radius: var(--radius-lg); background: linear-gradient(135deg, #f7faff 0%, #fff 76%); }
.ops-assistant-card.ai { border-color: #a7d8ca; border-left-color: var(--success); background: linear-gradient(135deg, #f3fbf8 0%, #fff 76%); }
.ops-assistant-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-assistant-top small { color: var(--text-3); font-size: 10px; }
.ops-assistant-card h3 { margin: 12px 0 6px; font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.ops-assistant-card > p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.ops-assistant-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ops-assistant-notes span { padding: 8px 10px; border-radius: var(--radius); background: rgb(255 255 255 / 72%); color: var(--text-2); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.ops-ai-fallback { margin-top: 9px; color: var(--warning); font-size: 10px; overflow-wrap: anywhere; }
.ops-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.ops-subhead:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ops-subhead strong { font-size: 12px; }
.ops-subhead span { color: var(--text-3); font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.ops-priority-list { display: grid; gap: 8px; }
.ops-priority { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ops-priority-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #142b52; color: #fff; font-size: 11px; font-weight: 700; }
.ops-priority > div { min-width: 0; }
.ops-priority > div > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ops-priority strong { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.ops-priority > div > div > span { flex: 0 0 auto; color: var(--text-3); font-size: 10px; }
.ops-priority p { margin: 5px 0 3px; color: var(--text-2); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.ops-priority small { color: var(--text-3); font-size: 9px; }
.ops-system-details { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.ops-system-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; cursor: pointer; list-style-position: inside; }
.ops-system-details > summary span { font-size: 12px; font-weight: 600; }
.ops-system-details > summary small { color: var(--text-3); font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.ops-system-body { display: grid; gap: 8px; padding: 0 14px 14px; }
.ops-metric { min-width: 0; min-height: 94px; padding: 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ops-metric > span,
.ops-metric > strong,
.ops-metric > small { display: block; }
.ops-metric > span { color: var(--text-3); font-size: 11px; }
.ops-metric > strong { margin: 8px 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ops-metric > small { color: var(--text-2); font-size: 11px; }
.ops-integrity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ops-source { display: grid; gap: 5px; padding: 10px 11px; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); font-size: 11px; color: var(--text-2); }
.ops-source > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; color: var(--text); }
.ops-source > div strong { min-width: 0; overflow-wrap: anywhere; }
.ops-source.ok { border-left-color: var(--success); }
.ops-source.warn { border-left-color: var(--warning); }
.ops-source.bad { border-left-color: var(--danger); }
.ops-pill { display: inline-flex; align-items: center; max-width: 100%; min-height: 20px; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-2); background: var(--surface); font-size: 10px; line-height: 1.2; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.ops-pill.ok { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.ops-pill.warn { color: var(--warning); border-color: var(--warning-border); background: var(--warning-bg); }
.ops-pill.bad { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }
.ops-alert-list,
.ops-task-list { display: grid; gap: 8px; }
.ops-alert { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.ops-alert-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-alert-top strong { min-width: 0; overflow-wrap: anywhere; }
.ops-alert-top > span:last-child { margin-left: auto; color: var(--text-3); font-size: 11px; }
.ops-alert p { margin: 8px 0; font-size: 12px; line-height: 1.55; }
.ops-alert > div:last-child { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.ops-task { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.ops-task.overdue { border-color: var(--danger-border); background: var(--danger-bg); }
.ops-task-main { min-width: 0; }
.ops-task-main > div { display: flex; align-items: flex-start; gap: 8px; min-width: 0; flex-wrap: wrap; }
.ops-task-main > div strong,
.ops-task-main p,
.ops-task-main small { overflow-wrap: anywhere; word-break: break-word; }
.ops-task-main p { margin: 6px 0 4px; color: var(--text-2); font-size: 11px; }
.ops-task-main small { color: var(--text-3); font-size: 10px; }
.ops-task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.ops-review-table { font-size: 11px; }
.ops-evidence { margin-bottom: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ops-evidence p { margin: 6px 0; font-size: 12px; }
.ops-evidence pre { max-height: 160px; margin: 6px 0 0; padding: 8px; overflow: auto; font-size: 10px; white-space: pre-wrap; }
.ops-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ops-detail-grid > div { padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.ops-detail-grid span,
.ops-detail-grid strong { display: block; }
.ops-detail-grid span { color: var(--text-3); font-size: 10px; }
.ops-detail-grid strong { margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.modal-ai-config { width: min(780px, 96vw); }
.ops-ai-config-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ops-ai-config-summary > div { display: grid; min-width: 0; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.ops-ai-config-summary span { color: var(--text-3); font-size: 10px; }
.ops-ai-config-summary strong { font-size: 12px; overflow-wrap: anywhere; }
.ops-ai-config-summary small { color: var(--text-2); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.ops-ai-boundary { margin-bottom: 14px; padding: 10px 11px; border: 1px solid #cbdaf5; border-left: 3px solid #31558e; border-radius: var(--radius); background: #f7faff; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.ops-ai-config-form select,
.ops-ai-config-form input,
.ops-ai-config-form textarea { max-width: 100%; }
.ops-ai-switch label { display: flex; align-items: center; gap: 7px; width: fit-content; color: var(--text); }
.ops-ai-switch input { width: auto; margin: 0; }
.ops-ai-test-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ops-ai-test-row span { min-width: 0; color: var(--text-3); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.ops-ai-test-row span.ok { color: var(--success); }
.ops-ai-test-row span.bad { color: var(--danger); }
@media (max-width: 1400px) {
  .ops-command-bar { grid-template-columns: 1fr; align-items: stretch; }
  .ops-command-actions { justify-content: flex-start; }
}
@media (max-width: 1200px) {
  .ops-verdict-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-integrity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .method-pack-head,
  .method-pack-row,
  .method-pack-foot { align-items: stretch; flex-direction: column; }
  .method-pack-row > span { flex-basis: auto; }
  .method-pack-row > div { justify-content: flex-start; }
  .method-pack-foot span:first-child { flex-basis: auto; }
  .ops-zone-head,
  .ops-task { align-items: stretch; flex-direction: column; }
  .ops-ai-config-summary { grid-template-columns: 1fr; }
  .ops-ai-test-row { align-items: stretch; flex-direction: column; }
  .ops-command-fields { grid-template-columns: 1fr; }
  .ops-command-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .ops-command-actions .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; }
  .ops-zone-head > span { text-align: left; }
  .ops-verdict-grid,
  .ops-integrity-grid,
  .ops-detail-grid { grid-template-columns: 1fr; }
  .ops-assistant-notes { grid-template-columns: 1fr; }
  .ops-subhead,
  .ops-system-details > summary { align-items: flex-start; flex-direction: column; }
  .ops-subhead span,
  .ops-system-details > summary small { text-align: left; }
  .ops-zone-3 .ops-alert:nth-child(n+6) { display: none; }
  .ops-task-actions { justify-content: flex-start; }
}

/* 五店商品经营与供应链 */
.merch-page,
#merchandise-body,
.merch-table-shell,
.merch-table-shell .table-wrap { min-width: 0; max-width: 100%; }
.merch-page { display: grid; grid-auto-rows: max-content; align-content: start; gap: 14px; overflow: hidden; }
.merch-tabs { display: flex; align-items: center; align-self: start; min-height: 44px; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-tabs button { flex: 0 0 auto; min-height: 34px; padding: 6px 13px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-2); font: inherit; font-size: 11px; cursor: pointer; }
.merch-tabs button.active { background: var(--accent); color: #fff; font-weight: 650; }
.merch-subtabs { display: flex; align-items: center; gap: 4px; margin-top: 6px; overflow-x: auto; }
.merch-subtabs button { flex: 0 0 auto; min-height: 28px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 11px; cursor: pointer; }
.merch-subtabs button.active { border-color: var(--accent); color: var(--accent); font-weight: 600; background: var(--sidebar-active); }
.merch-subtabs a { flex: 0 0 auto; min-height: 28px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 11px; text-decoration: none; display: inline-flex; align-items: center; }
.merch-subtabs a.active { border-color: var(--accent); color: var(--accent); font-weight: 600; background: var(--sidebar-active); }
.import-sop { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 8px 12px; }
.import-sop summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2); }
.import-sop-body { display: grid; gap: 6px; padding-top: 8px; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.import-sop-body p { margin: 0; }
#merchandise-body { display: grid; gap: 12px; overflow: hidden; }
.merch-style-detail { display: inline-block; font-weight: 700; }
.merch-style-detail + small { display: block; margin-top: 3px; color: var(--text-3); font-family: var(--font); font-size: 9px; }
.merch-table-shell { width: 100%; overflow: hidden; }
.merch-table-shell .table-wrap { width: 100%; overflow-x: auto; }
.merch-toolbar { display: grid; grid-template-columns: 150px 170px 150px 150px minmax(220px, 1fr) auto; align-items: end; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-toolbar label { display: grid; min-width: 0; gap: 5px; color: var(--text-2); font-size: 10px; }
.merch-toolbar input,
.merch-toolbar select { width: 100%; min-width: 0; height: 34px; }
.merch-toolbar .btn { height: 34px; }
.merch-summary-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.merch-summary-card { display: grid; min-width: 0; gap: 6px; padding: 11px 12px; border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.merch-summary-card.warn { border-left-color: var(--warning); }
.merch-summary-card.bad { border-left-color: var(--danger); }
.merch-summary-card > span { color: var(--text-3); font-size: 10px; }
.merch-summary-card > strong { font-size: 20px; line-height: 1; }
.merch-summary-card > small { min-width: 0; color: var(--text-2); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.merch-data-note { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--success); border-radius: var(--radius); background: var(--surface); }
.merch-data-note.bad { border-left-color: var(--danger); background: var(--danger-bg); }
.merch-data-note.merch-image-note { border-left-color: var(--warning); background: var(--warning-bg); }
.merch-data-note strong { flex: 0 0 auto; font-size: 11px; }
.merch-data-note span { min-width: 0; color: var(--text-2); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.merch-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-3); font-size: 10px; }
.merch-table { min-width: 1480px; }
.merch-table th:first-child,
.merch-table td:first-child { width: 64px; }
.merch-table td { vertical-align: middle; }
.merch-image-cell { text-align: center; }
.merch-image-cell > small { margin-top: 3px; white-space: normal; }
.merch-image-cell .thumb-placeholder[hidden] { display: none !important; }
.merch-no-image { border-style: dashed; background: var(--bg); }
.merch-table td.num small { display: block; margin-top: 3px; color: var(--text-3); font-size: 8px; white-space: nowrap; }
.merch-risk,
.merch-plan-missing { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 9px; white-space: nowrap; }
.merch-risk.ok { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.merch-risk.warn { color: var(--warning); border-color: var(--warning-border); background: var(--warning-bg); }
.merch-risk.bad { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }
.merch-risk.info { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.merch-plan-missing { margin-left: 4px; color: var(--text-3); }
.merch-channel-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 160px; }
.merch-channel-list span { display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border-radius: 4px; background: var(--bg); color: var(--text-2); font-size: 8px; white-space: nowrap; }
.merch-channel-list b { color: var(--text); font-weight: 600; }
.merch-replenish { font-weight: 700; color: var(--accent); }
.merch-reason { min-width: 180px; max-width: 240px; color: var(--text-2); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.merch-table td small { display: block; margin-top: 4px; color: var(--text-3); font-size: 8px; line-height: 1.35; white-space: nowrap; }
.merch-planning-table { min-width: 1740px; }
.merch-forecast { min-width: 130px; }
.merch-forecast b { font-size: 12px; }
.merch-tab-panel { min-width: 0; display: grid; gap: 12px; overflow: hidden; }
.merch-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 2px 0; }
.merch-section-head.compact { margin-top: 12px; }
.merch-section-head h2 { margin: 0 0 4px; font-size: 14px; }
.merch-section-head p { margin: 0; color: var(--text-2); font-size: 10px; line-height: 1.5; }
.merch-quality-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.merch-quality-grid article { display: grid; min-width: 0; gap: 7px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-quality-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.merch-quality-grid b { min-width: 0; font-size: 10px; overflow-wrap: anywhere; }
.merch-quality-grid strong { font-size: 13px; }
.merch-quality-grid small { color: var(--text-3); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.merch-priority-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.merch-priority-list article { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 11px; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.merch-priority-index { display: grid; place-items: center; align-self: start; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); color: var(--accent); font-size: 11px; font-weight: 750; }
.merch-priority-list article > div { min-width: 0; }
.merch-priority-list article > div > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.merch-priority-list b { min-width: 0; font-size: 10px; overflow-wrap: anywhere; }
.merch-priority-list p { margin: 8px 0 5px; font-size: 10px; line-height: 1.45; }
.merch-priority-list small { color: var(--text-3); font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.merch-brief-toolbar { grid-template-columns: minmax(330px, .8fr) minmax(360px, 1.2fr) auto; }
.merch-brief-toolbar-note { display: grid; align-content: center; min-width: 0; gap: 3px; padding: 0 14px; border-left: 1px solid var(--border); }
.merch-brief-toolbar-note strong { font-size: 10px; }
.merch-brief-toolbar-note span { color: var(--text-3); font-size: 8px; }
.merch-brief-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 58%); }
.merch-brief-hero > div:first-child { min-width: 0; max-width: 800px; }
.merch-brief-hero h2 { margin: 7px 0 7px; font-size: 24px; letter-spacing: -.025em; }
.merch-brief-hero p { margin: 0; color: var(--text-2); font-size: 11px; line-height: 1.65; }
.merch-brief-hero-side { display: grid; flex: 0 0 auto; min-width: 300px; justify-items: end; gap: 5px; padding-left: 20px; border-left: 1px solid var(--border); }
.merch-brief-hero-side > span { font-size: 13px; font-weight: 700; }
.merch-brief-hero-side > small { color: var(--text-3); font-size: 8px; }
.merch-brief-hero-side > div { display: flex; gap: 7px; margin-top: 8px; }
.merch-brief-summary { margin-top: 1px; }
.merch-brief-active { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--border)); border-left: 4px solid var(--warning); border-radius: var(--radius); background: color-mix(in srgb, var(--warning) 5%, var(--surface)); }
.merch-brief-active > div { display: grid; min-width: 0; gap: 3px; }
.merch-brief-active span { color: var(--warning); font-size: 8px; font-weight: 700; }
.merch-brief-active strong { font-size: 11px; }
.merch-brief-active small { color: var(--text-3); font-size: 8px; }
.merch-brief-block { display: grid; gap: 9px; min-width: 0; }
.merch-brief-block .merch-section-head.compact { align-items: center; margin-top: 4px; }
.merch-brief-block .merch-section-head > span { color: var(--text-3); font-size: 8px; }
.merch-brief-readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.merch-brief-readiness-card { display: grid; min-width: 0; gap: 8px; padding: 13px 14px; border: 1px solid var(--border); border-top: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.merch-brief-readiness-card.ok { border-top-color: var(--success); }
.merch-brief-readiness-card.warn { border-top-color: var(--warning); }
.merch-brief-readiness-card.bad { border-top-color: var(--danger); }
.merch-brief-readiness-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.merch-brief-readiness-card > div:first-child > span { color: var(--text-2); font-size: 9px; }
.merch-brief-readiness-card > strong { font-size: 20px; }
.merch-brief-readiness-card > strong small { color: var(--text-3); font-size: 9px; font-weight: 500; }
.merch-brief-readiness-card > p { margin: 0; color: var(--text-3); font-size: 8px; line-height: 1.45; }
.merch-brief-progress { height: 3px; overflow: hidden; border-radius: 999px; background: var(--bg); }
.merch-brief-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.merch-brief-readiness-card.ok .merch-brief-progress i { background: var(--success); }
.merch-brief-readiness-card.warn .merch-brief-progress i { background: var(--warning); }
.merch-brief-readiness-card.bad .merch-brief-progress i { background: var(--danger); }
.merch-brief-agenda { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.merch-brief-agenda article { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); min-width: 0; gap: 9px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-brief-agenda article:not(:last-child)::after { position: absolute; z-index: 2; top: 50%; right: -9px; width: 9px; border-top: 1px solid var(--border-strong); content: ''; }
.merch-brief-agenda article > b { display: grid; place-items: center; align-self: start; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent); font-size: 9px; }
.merch-brief-agenda article > div { display: grid; min-width: 0; gap: 5px; }
.merch-brief-agenda span { color: var(--text-2); font-size: 9px; font-weight: 650; }
.merch-brief-agenda strong { font-size: 18px; }
.merch-brief-agenda strong small { color: var(--text-3); font-size: 8px; font-weight: 500; }
.merch-brief-agenda p { margin: 0; color: var(--text-3); font-size: 8px; line-height: 1.45; }
.merch-brief-agenda .followup > b { background: var(--danger-bg); color: var(--danger); }
.merch-brief-agenda .supply > b { background: color-mix(in srgb, var(--warning) 10%, var(--surface)); color: var(--warning); }
.merch-brief-styles { display: grid; gap: 7px; }
.merch-brief-style { display: grid; grid-template-columns: 28px minmax(220px, .75fr) minmax(280px, 1fr) minmax(290px, .95fr) auto; align-items: center; min-width: 0; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.merch-brief-style.p0 { border-left-color: var(--danger); }
.merch-brief-style.p1 { border-left-color: var(--warning); }
.merch-brief-style.p2 { border-left-color: var(--accent); }
.merch-brief-rank { color: var(--text-3); font-size: 9px; font-weight: 700; }
.merch-brief-style-product { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; }
.merch-brief-style-product .merch-weekly-image-wrap,
.merch-brief-style-product .merch-weekly-image-placeholder { width: 50px; height: 61px; }
.merch-brief-style-product > div { min-width: 0; }
.merch-brief-style-product h3 { margin: 5px 0 3px; font-size: 12px; }
.merch-brief-style-product h3 a { color: var(--link); }
.merch-brief-style-product p { margin: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.merch-brief-style-reason { display: grid; min-width: 0; gap: 4px; padding-left: 12px; border-left: 1px solid var(--border); }
.merch-brief-style-reason strong { font-size: 9px; line-height: 1.45; }
.merch-brief-style-reason p { margin: 0; color: var(--text-2); font-size: 8px; line-height: 1.45; }
.merch-brief-style-reason small { color: var(--warning); font-size: 7px; }
.merch-brief-style-metrics { display: grid; grid-template-columns: repeat(4, minmax(60px, 1fr)); min-width: 0; }
.merch-brief-style-metrics > div { display: grid; min-width: 0; gap: 4px; padding: 5px 7px; border-left: 1px solid var(--border); }
.merch-brief-style-metrics span { color: var(--text-3); font-size: 7px; white-space: nowrap; }
.merch-brief-style-metrics strong { font-size: 9px; white-space: nowrap; }
.merch-brief-style > .btn { justify-content: center; white-space: nowrap; }
.merch-brief-carryovers { display: grid; gap: 7px; }
.merch-brief-carryovers > article { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, .8fr); align-items: center; gap: 14px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-brief-carryovers article > div { display: grid; min-width: 0; gap: 6px; }
.merch-brief-carryovers article > div > div { display: flex; gap: 4px; }
.merch-brief-carryovers h3 { margin: 0; font-size: 10px; line-height: 1.45; }
.merch-brief-carryovers h3 a { color: var(--link); }
.merch-brief-carryovers article > p { display: grid; gap: 3px; margin: 0; padding-left: 13px; border-left: 1px solid var(--border); }
.merch-brief-carryovers p b { font-size: 9px; }
.merch-brief-carryovers p span { color: var(--text-2); font-size: 8px; }
.merch-brief-carryovers p small { color: var(--danger); font-size: 8px; }
.merch-brief-last { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-brief-last > div { display: grid; gap: 3px; }
.merch-brief-last span { color: var(--text-3); font-size: 8px; }
.merch-brief-last strong { font-size: 11px; }
.merch-brief-last small { color: var(--text-2); font-size: 8px; }
.merch-weekly-toolbar { grid-template-columns: 330px 220px minmax(260px, 1fr) auto; }
.merch-toolbar-group { display: grid; min-width: 0; gap: 5px; color: var(--text-2); font-size: 10px; }
.merch-scope-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 34px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-scope-switch button { min-width: 0; border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--text-2); font: inherit; font-size: 10px; cursor: pointer; }
.merch-scope-switch button.active { background: var(--surface); color: var(--accent); font-weight: 700; box-shadow: 0 1px 4px rgba(20, 43, 82, .09); }
.merch-weekly-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.merch-weekly-hero > div:first-child { min-width: 0; max-width: 760px; }
.merch-weekly-kicker { color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.merch-weekly-hero h2 { margin: 7px 0 6px; font-size: 22px; letter-spacing: -.02em; }
.merch-weekly-hero p { margin: 0; color: var(--text-2); font-size: 11px; line-height: 1.6; }
.merch-weekly-cutoff { display: grid; flex: 0 0 auto; min-width: 240px; gap: 5px; padding-left: 18px; border-left: 1px solid var(--border); }
.merch-weekly-cutoff span { color: var(--text-3); font-size: 9px; }
.merch-weekly-cutoff strong { font-size: 17px; }
.merch-weekly-cutoff small { color: var(--text-2); font-size: 9px; }
.merch-weekly-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.merch-weekly-method { border-left-color: var(--accent); }
.merch-scope-note { border-left-color: var(--accent); }
.merch-weekly-head { padding-top: 6px; }
.merch-weekly-head > span { flex: 0 0 auto; color: var(--text-3); font-size: 9px; }
.merch-weekly-bulkbar { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-weekly-bulkbar label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 9px; cursor: pointer; }
.merch-weekly-bulkbar input,
.merch-weekly-select input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.merch-weekly-bulkbar > span { margin-left: auto; color: var(--text-2); font-size: 9px; }
.merch-weekly-bulkbar .btn { flex: 0 0 auto; }
.merch-weekly-list { display: grid; gap: 9px; }
.merch-weekly-item { position: relative; display: grid; grid-template-columns: minmax(245px, 1.05fr) minmax(390px, 1.35fr) minmax(300px, 1.25fr) minmax(190px, .75fr); gap: 16px; align-items: center; min-width: 0; padding: 38px 16px 14px 18px; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.merch-weekly-select { position: absolute; z-index: 2; top: 9px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 5px; background: var(--surface); color: var(--text-3); font-size: 8px; cursor: pointer; }
.merch-weekly-item.p0 { border-left-color: var(--danger); }
.merch-weekly-item.p1 { border-left-color: var(--warning); }
.merch-weekly-item.p2 { border-left-color: var(--accent); }
.merch-weekly-product { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 11px; min-width: 0; }
.merch-weekly-image-wrap,
.merch-weekly-image-placeholder { position: relative; display: grid; place-items: center; width: 76px; height: 92px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-weekly-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.merch-weekly-image-placeholder { border-style: dashed; color: var(--text-3); font-size: 9px; line-height: 1.45; text-align: center; }
.merch-image-review { position: absolute; right: 3px; bottom: 3px; padding: 2px 4px; border-radius: 3px; background: rgba(20, 43, 82, .86); color: #fff; font-size: 7px; line-height: 1; }
.merch-weekly-identity { min-width: 0; }
.merch-weekly-identity > div { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.merch-weekly-identity h3 { margin: 0 0 4px; font-size: 14px; }
.merch-weekly-identity h3 a { color: var(--link); }
.merch-weekly-identity p { display: -webkit-box; margin: 0 0 5px; overflow: hidden; color: var(--text); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.merch-weekly-identity small { display: block; overflow: hidden; color: var(--text-3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.merch-weekly-facts { display: grid; grid-template-columns: repeat(5, minmax(66px, 1fr)); gap: 6px; min-width: 0; }
.merch-weekly-facts > div { display: grid; min-width: 0; gap: 5px; padding: 8px 7px; border-left: 1px solid var(--border); }
.merch-weekly-facts span { color: var(--text-3); font-size: 8px; white-space: nowrap; }
.merch-weekly-flags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.merch-weekly-facts > .merch-weekly-flags { border-left: 0; padding: 2px 7px; }
.merch-daily-recent { color: var(--text-3); font-size: 9px; }
.merch-weekly-facts > .merch-daily-recent { border-left: 0; padding: 2px 7px; }
.merch-brief-style .merch-weekly-flags { margin-top: 6px; }
.merch-daily-wrap { overflow-x: auto; margin-top: 10px; }
.merch-daily-strip { min-width: 760px; }
.merch-daily-strip th, .merch-daily-strip td { white-space: nowrap; font-size: 10px; padding: 4px 6px; }
.merch-daily-note { display: block; margin-top: 6px; color: var(--text-3); font-size: 10px; }
.merch-weekreport-table { min-width: 980px; }
.merch-weekreport-total td { background: color-mix(in srgb, var(--accent) 6%, transparent); font-weight: 600; }
.merch-tier-tabs { display: flex; gap: 6px; margin: 12px 0 10px; flex-wrap: wrap; }
.merch-tier-tabs button { padding: 6px 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); cursor: pointer; font-size: 12px; }
.merch-tier-tabs button.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.merch-portfolio-table { min-width: 1120px; }
.merch-portfolio-style { display: flex; gap: 8px; align-items: center; min-width: 230px; }
.merch-portfolio-style small { display: block; color: var(--text-3); font-size: 10px; }
.merch-tier-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.merch-tier-confirm { padding: 2px 8px; font-size: 11px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); cursor: pointer; }
.merch-tier-confirm.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.merch-tier-confirmed-by { display: block; color: var(--text-3); font-size: 10px; }
.merch-weekly-facts strong { min-width: 0; color: var(--text); font-size: 11px; line-height: 1.25; white-space: nowrap; }
.merch-weekly-decision { display: grid; min-width: 0; gap: 6px; }
.merch-weekly-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.merch-weekly-decision h4 { margin: 0; font-size: 10px; line-height: 1.45; }
.merch-weekly-decision p { margin: 0; color: var(--text-2); font-size: 9px; line-height: 1.5; }
.merch-weekly-decision > small { color: var(--warning); font-size: 8px; line-height: 1.4; }
.merch-weekly-followup { display: grid; min-width: 0; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border); }
.merch-weekly-followup > div { display: grid; min-width: 0; gap: 4px; }
.merch-weekly-followup b { font-size: 9px; }
.merch-weekly-followup span { color: var(--text-2); font-size: 9px; line-height: 1.4; }
.merch-weekly-followup small { color: var(--text-3); font-size: 8px; }
.merch-weekly-followup .btn { justify-self: start; font-size: 9px; }
.merch-weekly-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-2); font-size: 9px; }
.merch-weekly-more .btn { flex: 0 0 auto; }
.merch-bulk-preview { display: grid; gap: 8px; max-height: 220px; margin: 12px 0; padding: 10px 12px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-bulk-preview > strong { font-size: 10px; }
.merch-bulk-preview ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.merch-bulk-preview li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; color: var(--text-2); font-size: 9px; line-height: 1.4; }
.merch-bulk-preview li b { color: var(--text); }
.merch-meeting-toolbar-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-toolbar-note > div { display: grid; gap: 3px; }
.merch-meeting-toolbar-note strong { font-size: 11px; }
.merch-meeting-toolbar-note span { color: var(--text-2); font-size: 9px; }
.merch-meeting-hero { border-left-color: var(--accent); }
.merch-meeting-complete-hero { border-left-color: var(--success); background: color-mix(in srgb, var(--success) 4%, var(--surface)); }
.merch-meeting-progress { display: grid; flex: 0 0 auto; min-width: 250px; gap: 4px; padding-left: 18px; border-left: 1px solid var(--border); }
.merch-meeting-progress > span { color: var(--text-3); font-size: 8px; }
.merch-meeting-progress > strong { font-size: 20px; }
.merch-meeting-progress > small { margin-bottom: 4px; color: var(--text-2); font-size: 8px; }
.merch-meeting-progress .btn { justify-self: start; }
.merch-meeting-hero-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.merch-meeting-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
.merch-meeting-queue { position: sticky; top: 10px; display: grid; max-height: calc(100vh - 110px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-queue > div { display: flex; justify-content: space-between; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.merch-meeting-queue > div strong { font-size: 10px; }
.merch-meeting-queue > div span { color: var(--text-3); font-size: 8px; }
.merch-meeting-queue button { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 7px; align-items: center; min-width: 0; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.merch-meeting-queue button:last-child { border-bottom: 0; }
.merch-meeting-queue button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); color: var(--text-3); font-size: 8px; }
.merch-meeting-queue button b { min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.merch-meeting-queue button small { color: var(--text-3); font-size: 7px; }
.merch-meeting-queue button.active { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 3px 0 var(--accent); }
.merch-meeting-queue button.decided > span { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); }
.merch-meeting-queue button.skipped > span { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); color: var(--warning); }
.merch-meeting-focus { display: grid; min-width: 0; gap: 10px; }
.merch-meeting-product { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 20px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-product > div:first-child { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.merch-meeting-product h2 { margin: 6px 0 4px; font-size: 18px; }
.merch-meeting-product h2 a { color: var(--link); }
.merch-meeting-product p { margin: 0 0 5px; font-size: 10px; line-height: 1.45; }
.merch-meeting-product small { color: var(--text-3); font-size: 8px; }
.merch-meeting-reason { display: grid; align-content: center; gap: 5px; padding-left: 18px; border-left: 1px solid var(--border); }
.merch-meeting-reason span { color: var(--text-3); font-size: 8px; }
.merch-meeting-reason strong { font-size: 11px; line-height: 1.5; }
.merch-meeting-reason p { color: var(--text-2); font-size: 9px; line-height: 1.5; }
.merch-meeting-evidence { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-evidence > div { display: grid; min-width: 0; gap: 6px; padding: 12px; border-right: 1px solid var(--border); }
.merch-meeting-evidence > div:last-child { border-right: 0; }
.merch-meeting-evidence span { color: var(--text-3); font-size: 8px; }
.merch-meeting-evidence strong { font-size: 12px; white-space: nowrap; }
.merch-meeting-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-form .full { grid-column: 1 / -1; }
.merch-meeting-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.merch-meeting-decided { display: grid; gap: 8px; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-decided > div { display: flex; align-items: center; gap: 8px; }
.merch-meeting-decided > div span:last-child { color: var(--text-3); font-size: 8px; }
.merch-meeting-decided h2 { margin: 0; font-size: 15px; }
.merch-meeting-decided p { margin: 0; color: var(--text-2); font-size: 9px; }
.merch-meeting-decided .btn { justify-self: start; }
.merch-meeting-empty { display: grid; justify-items: start; gap: 8px; padding: 34px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-meeting-empty h2 { margin: 0; font-size: 18px; }
.merch-meeting-empty p { margin: 0 0 8px; color: var(--text-2); font-size: 10px; }
.merch-meeting-minutes-list { display: grid; gap: 8px; }
.merch-meeting-minutes-list article { display: grid; grid-template-columns: minmax(170px, .5fr) minmax(280px, 1.2fr) minmax(260px, .9fr) auto; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-meeting-minutes-list article > div { display: flex; align-items: center; gap: 6px; }
.merch-meeting-minutes-list h3 { margin: 0; font-size: 10px; line-height: 1.45; }
.merch-meeting-minutes-list p { margin: 0; color: var(--text-2); font-size: 8px; line-height: 1.4; }
.merch-meeting-minutes-list a { color: var(--link); font-size: 8px; white-space: nowrap; }
.merch-report-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 21px 23px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-left: 4px solid var(--accent); border-radius: var(--radius-lg); background: linear-gradient(125deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 62%); }
.merch-report-hero > div:first-child { min-width: 0; max-width: 760px; }
.merch-report-hero h2 { margin: 7px 0 6px; font-size: 22px; letter-spacing: -.02em; }
.merch-report-hero p { margin: 0; color: var(--text-2); font-size: 10px; line-height: 1.55; }
.merch-report-boundary { border-left-color: var(--accent); }
.merch-report-block { display: grid; min-width: 0; gap: 9px; }
.merch-report-block .merch-section-head.compact { align-items: center; margin-top: 5px; }
.merch-report-block .merch-section-head > span { flex: 0 0 auto; color: var(--text-3); font-size: 8px; }
.merch-report-task-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.merch-report-task-cards article { display: grid; min-width: 0; gap: 6px; padding: 12px 13px; border: 1px solid var(--border); border-top: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.merch-report-task-cards article.bad { border-top-color: var(--danger); }
.merch-report-task-cards article.warn { border-top-color: var(--warning); }
.merch-report-task-cards article.ok { border-top-color: var(--success); }
.merch-report-task-cards span { color: var(--text-3); font-size: 8px; }
.merch-report-task-cards strong { font-size: 19px; }
.merch-report-task-cards small { color: var(--text-2); font-size: 8px; line-height: 1.4; }
.merch-report-task-prefix { justify-self: end; color: var(--text-3); font-size: 7px; }
.merch-report-previous-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-report-previous-head > div { display: grid; gap: 3px; }
.merch-report-previous-head span { color: var(--text-3); font-size: 8px; }
.merch-report-previous-head strong { font-size: 10px; }
.merch-report-decisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.merch-report-decisions article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-report-decisions span { color: var(--text-2); font-size: 9px; }
.merch-report-decisions strong { font-size: 17px; }
.merch-report-owners { display: grid; gap: 7px; }
.merch-report-owners > article { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(70px, .55fr)) minmax(120px, .75fr); align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-report-owners article > div { display: grid; min-width: 0; gap: 3px; }
.merch-report-owners span { color: var(--text-3); font-size: 7px; }
.merch-report-owners strong { font-size: 9px; overflow-wrap: anywhere; }
.merch-report-items { display: grid; gap: 7px; }
.merch-report-items > article { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.25fr) minmax(215px, .75fr) auto; align-items: center; min-width: 0; gap: 14px; padding: 11px 13px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.merch-report-items > article.blocked,
.merch-report-items > article.overdue { border-left-color: var(--danger); }
.merch-report-items > article.review_due,
.merch-report-items > article.due_this_week,
.merch-report-items > article.skipped { border-left-color: var(--warning); }
.merch-report-items > article.done { border-left-color: var(--success); }
.merch-report-product { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; }
.merch-report-product .merch-weekly-image-wrap,
.merch-report-product .merch-weekly-image-placeholder { width: 50px; height: 61px; }
.merch-report-product > div { min-width: 0; }
.merch-report-product h3 { margin: 5px 0 3px; font-size: 12px; }
.merch-report-product h3 a { color: var(--link); }
.merch-report-product p { margin: 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.merch-report-conclusion { display: grid; min-width: 0; gap: 5px; padding-left: 13px; border-left: 1px solid var(--border); }
.merch-report-conclusion strong { font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.merch-report-conclusion span { color: var(--text-2); font-size: 8px; }
.merch-report-conclusion small { color: var(--warning); font-size: 7px; line-height: 1.4; }
.merch-report-accountability { display: grid; min-width: 0; gap: 5px; padding-left: 13px; border-left: 1px solid var(--border); }
.merch-report-accountability > div { display: flex; flex-wrap: wrap; gap: 4px; }
.merch-report-accountability > strong { font-size: 9px; }
.merch-report-accountability > span { color: var(--text-2); font-size: 8px; line-height: 1.4; }
.merch-report-items > article > .btn { justify-content: center; white-space: nowrap; }
.merch-report-gaps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.merch-report-gaps article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-report-gaps span { color: var(--text-2); font-size: 8px; }
.merch-report-gaps strong { font-size: 15px; }
.merch-report-gaps strong small { color: var(--text-3); font-size: 7px; font-weight: 500; }
.merch-history-hero { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.merch-history-toolbar { grid-template-columns: minmax(330px, 1.25fr) minmax(260px, 1fr) auto; }
.merch-history-toolbar > .btn { width: auto; min-width: 96px; }
.merch-history-method { align-items: flex-start; }
.merch-history-list { display: grid; gap: 9px; }
.merch-history-list > article { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 0; padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-history-list-main { display: grid; min-width: 0; gap: 4px; }
.merch-history-list-main > span { color: var(--text-3); font-size: 8px; }
.merch-history-list-main h3 { margin: 0; font-size: 13px; }
.merch-history-list-main p { margin: 0; color: var(--text-2); font-size: 9px; }
.merch-history-list-result { display: flex; flex: 0 0 auto; align-items: center; gap: 18px; }
.merch-history-list-result > div { display: grid; justify-items: end; gap: 2px; }
.merch-history-list-result span { color: var(--text-3); font-size: 8px; }
.merch-history-list-result strong { font-size: 17px; }
.merch-history-detail-list { display: grid; gap: 12px; }
.merch-history-item { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.merch-history-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.merch-history-item-head > div { display: flex; align-items: center; gap: 7px; }
.merch-history-item-head b { font-size: 13px; }
.merch-history-item-head a { color: var(--link); font-size: 8px; white-space: nowrap; }
.merch-history-item > h3 { margin: 0; font-size: 11px; line-height: 1.5; }
.merch-history-item > p { margin: 0; color: var(--text-2); font-size: 9px; }
.merch-history-first { display: grid; gap: 4px; padding: 12px; border-radius: var(--radius); background: var(--bg); }
.merch-history-first strong { font-size: 9px; }
.merch-history-first span { color: var(--text-2); font-size: 8px; line-height: 1.5; }
.merch-history-comparison { display: grid; gap: 10px; margin-top: 3px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.merch-history-comparison-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.merch-history-comparison-head > div { display: grid; gap: 3px; }
.merch-history-comparison-head span { color: var(--text-3); font-size: 8px; }
.merch-history-comparison-head strong { font-size: 10px; }
.merch-history-date-line { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-3); font-size: 8px; }
.merch-history-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.merch-history-metrics article { display: grid; min-width: 0; gap: 5px; padding: 10px; border-right: 1px solid var(--border); }
.merch-history-metrics article:last-child { border-right: 0; }
.merch-history-metrics article > span:first-child { color: var(--text-3); font-size: 8px; }
.merch-history-metrics strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 9px; }
.merch-history-metrics strong i,
.merch-history-decision strong i { color: var(--text-3); font-style: normal; }
.merch-history-delta { justify-self: start; padding: 2px 5px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--text-2); font-size: 7px; font-weight: 650; }
.merch-history-delta.missing { background: var(--surface); color: var(--text-3); }
.merch-history-delta.flat { background: color-mix(in srgb, var(--text-3) 8%, var(--surface)); }
.merch-history-decision { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; }
.merch-history-decision > span { color: var(--text-3); font-size: 8px; }
.merch-history-decision strong { display: flex; align-items: center; gap: 7px; font-size: 9px; }
.merch-history-decision small { color: var(--text-3); font-size: 7px; }
.merch-review-hero { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 4%, var(--surface)); }
.merch-review-list { display: grid; gap: 9px; }
.merch-review-item { display: grid; grid-template-columns: minmax(245px, .95fr) minmax(330px, 1.35fr) minmax(260px, .9fr) minmax(145px, .55fr); gap: 16px; align-items: center; min-width: 0; padding: 15px 16px; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.merch-review-item.blocked,
.merch-review-item.overdue { border-left-color: var(--danger); }
.merch-review-item.review_due,
.merch-review-item.due_this_week { border-left-color: var(--warning); }
.merch-review-item.tracking { border-left-color: var(--accent); }
.merch-review-item.done { border-left-color: var(--success); }
.merch-review-product { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 11px; min-width: 0; }
.merch-review-product > div { min-width: 0; }
.merch-review-product h3 { margin: 6px 0 3px; font-size: 14px; }
.merch-review-product h3 a { color: var(--link); }
.merch-review-product p { display: -webkit-box; margin: 0 0 4px; overflow: hidden; font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.merch-review-product small { display: block; overflow: hidden; color: var(--text-3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.merch-review-decision { display: grid; min-width: 0; gap: 6px; padding-left: 15px; border-left: 1px solid var(--border); }
.merch-review-decision > div { display: flex; flex-wrap: wrap; gap: 4px; }
.merch-review-decision h4 { margin: 0; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.merch-review-decision p { margin: 0; color: var(--text-2); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.merch-review-decision small { color: var(--text-3); font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.merch-review-accountability { display: grid; min-width: 0; gap: 8px; padding-left: 15px; border-left: 1px solid var(--border); }
.merch-review-accountability > div { display: grid; gap: 3px; }
.merch-review-accountability span { color: var(--text-3); font-size: 8px; }
.merch-review-accountability strong { font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.merch-review-accountability .merch-review-blocker strong { color: var(--danger); }
.merch-review-actions { display: grid; gap: 7px; padding-left: 12px; border-left: 1px solid var(--border); }
.merch-review-actions .btn { justify-content: center; width: 100%; font-size: 9px; text-align: center; }
.bad-text { color: var(--danger); font-weight: 700; }

@media (max-width: 1500px) {
  .merch-brief-style { grid-template-columns: 28px minmax(210px, .72fr) minmax(250px, 1fr) minmax(260px, .95fr) auto; }
  .merch-weekly-item { grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.35fr) minmax(280px, 1fr); }
  .merch-weekly-followup { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-review-item { grid-template-columns: minmax(235px, .9fr) minmax(330px, 1.3fr) minmax(250px, .9fr); }
  .merch-review-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-review-actions .btn { width: auto; }
}
@media (max-width: 1180px) {
  .merch-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merch-weekly-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-brief-toolbar-note { padding: 0; border-left: 0; }
  .merch-brief-readiness,
  .merch-brief-agenda { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-brief-agenda article:not(:last-child)::after { display: none; }
  .merch-brief-style { grid-template-columns: 28px minmax(220px, .8fr) minmax(0, 1.2fr); align-items: start; }
  .merch-brief-style-metrics,
  .merch-brief-style > .btn { grid-column: 2 / -1; }
  .merch-brief-style > .btn { justify-self: end; }
  .merch-search { grid-column: span 2; }
  .merch-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .merch-weekly-item { grid-template-columns: minmax(230px, .85fr) minmax(0, 1.4fr); align-items: start; }
  .merch-weekly-decision { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); }
  .merch-weekly-followup { grid-column: 1 / -1; }
  .merch-review-item { grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); align-items: start; }
  .merch-review-accountability { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-meeting-layout { grid-template-columns: 1fr; }
  .merch-meeting-queue { position: static; grid-template-columns: repeat(4, minmax(160px, 1fr)); max-height: none; overflow-x: auto; }
  .merch-meeting-queue > div { grid-column: 1 / -1; }
  .merch-meeting-queue button { border-right: 1px solid var(--border); border-bottom: 0; }
  .merch-meeting-minutes-list article { grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr); }
  .merch-meeting-minutes-list p,
  .merch-meeting-minutes-list a { grid-column: 2; }
  .merch-report-task-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-report-owners > article { grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(80px, .55fr)); }
  .merch-report-items > article { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); align-items: start; }
  .merch-report-accountability { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-report-items > article > .btn { grid-column: 1 / -1; justify-self: end; }
  .merch-history-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .merch-history-metrics article { border-bottom: 1px solid var(--border); }
  .merch-history-metrics article:nth-child(3n) { border-right: 0; }
  .merch-quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-priority-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .merch-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-search { grid-column: 1 / -1; }
  .merch-toolbar .btn { width: 100%; }
  .merch-weekly-toolbar { grid-template-columns: 1fr; }
  .merch-weekly-toolbar .merch-search { grid-column: auto; }
  .merch-brief-hero { align-items: flex-start; flex-direction: column; padding: 17px; }
  .merch-brief-hero-side { width: 100%; min-width: 0; justify-items: start; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-brief-hero-side > div { width: 100%; }
  .merch-brief-hero-side .btn { flex: 1; }
  .merch-brief-active,
  .merch-brief-last { align-items: stretch; flex-direction: column; }
  .merch-brief-active .btn,
  .merch-brief-last .btn { width: 100%; }
  .merch-brief-readiness,
  .merch-brief-agenda { grid-template-columns: 1fr; }
  .merch-brief-style { grid-template-columns: 1fr; padding: 12px; }
  .merch-brief-rank { display: none; }
  .merch-brief-style-reason,
  .merch-brief-style-metrics,
  .merch-brief-style > .btn { grid-column: auto; padding-top: 10px; padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-brief-style > .btn { justify-self: stretch; }
  .merch-brief-style-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-brief-carryovers > article { grid-template-columns: 1fr; }
  .merch-brief-carryovers article > p { padding: 9px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-weekly-hero { align-items: flex-start; flex-direction: column; padding: 16px; }
  .merch-weekly-cutoff { width: 100%; min-width: 0; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-weekly-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-weekly-item { grid-template-columns: 1fr; padding: 38px 12px 12px; }
  .merch-weekly-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-weekly-decision,
  .merch-weekly-followup { grid-column: auto; }
  .merch-weekly-followup { display: grid; align-items: start; }
  .merch-review-item { grid-template-columns: 1fr; padding: 12px; }
  .merch-review-decision,
  .merch-review-accountability,
  .merch-review-actions { grid-column: auto; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-review-accountability { grid-template-columns: 1fr; }
  .merch-review-actions { align-items: stretch; flex-direction: column; }
  .merch-review-actions .btn { width: 100%; }
  .merch-meeting-toolbar-note,
  .merch-meeting-hero-actions { align-items: stretch; flex-direction: column; }
  .merch-meeting-toolbar-note .btn,
  .merch-meeting-hero-actions .btn { width: 100%; }
  .merch-meeting-progress { width: 100%; min-width: 0; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-meeting-queue { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .merch-meeting-product { grid-template-columns: 1fr; }
  .merch-meeting-reason { padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-meeting-evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-meeting-evidence > div { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .merch-meeting-form { grid-template-columns: 1fr; padding: 12px; }
  .merch-meeting-form .full,
  .merch-meeting-form-actions { grid-column: auto; }
  .merch-meeting-form-actions { align-items: stretch; flex-direction: column; }
  .merch-meeting-form-actions .btn { width: 100%; }
  .merch-meeting-minutes-list article { grid-template-columns: 1fr; }
  .merch-meeting-minutes-list p,
  .merch-meeting-minutes-list a { grid-column: auto; }
  .merch-report-hero,
  .merch-report-previous-head { align-items: stretch; flex-direction: column; }
  .merch-report-hero .merch-meeting-hero-actions,
  .merch-report-previous-head .btn { width: 100%; }
  .merch-report-task-cards { grid-template-columns: 1fr; }
  .merch-report-owners > article { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-report-owners article > div:first-child { grid-column: 1 / -1; }
  .merch-report-items > article { grid-template-columns: 1fr; }
  .merch-report-conclusion,
  .merch-report-accountability,
  .merch-report-items > article > .btn { grid-column: auto; padding-top: 10px; padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
  .merch-report-items > article > .btn { justify-self: stretch; }
  .merch-history-list > article,
  .merch-history-list-result { align-items: stretch; flex-direction: column; }
  .merch-history-list-result > div { justify-items: start; }
  .merch-history-list-result .btn { width: 100%; }
  .merch-history-item-head,
  .merch-history-comparison-head { align-items: flex-start; flex-direction: column; }
  .merch-history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-history-metrics article:nth-child(3n) { border-right: 1px solid var(--border); }
  .merch-history-metrics article:nth-child(2n) { border-right: 0; }
  .merch-history-decision { grid-template-columns: 1fr; }
  .merch-weekly-more { align-items: stretch; flex-direction: column; }
  .merch-weekly-bulkbar { align-items: stretch; flex-wrap: wrap; }
  .merch-weekly-bulkbar > span { align-self: center; margin-left: auto; }
  .merch-weekly-bulkbar .btn { width: 100%; }
  .merch-bulk-preview li { grid-template-columns: 82px minmax(0, 1fr); }
  .merch-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merch-quality-grid { grid-template-columns: 1fr; }
  .merch-priority-list { grid-template-columns: 1fr; }
  .merch-data-note,
  .merch-legend { align-items: flex-start; flex-direction: column; }
}

/* 设置与主数据页 */
.config-threshold-grid { max-width: 980px; }
.config-actions { margin-top: 10px; }
.config-mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.config-mode-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.config-mode-card b { display: block; }
.config-mode-card span { color: var(--accent); font-size: 12px; }
.config-mode-card p { margin: 6px 0 0; color: var(--text-2); font-size: 12px; }
.config-curve-toolbar, .config-supplier-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.config-segment-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; color: var(--text-2); }
.config-curve-table { min-width: 640px; }
.config-supplier-table { min-width: 1080px; }
.config-curve-table input, .config-supplier-table input, .config-supplier-table select { width: 100%; max-width: 110px; }

/* 内容制作（#/studio）：按款选图、建任务。不改经营页样式。 */
.studio-search-card { margin-bottom: 14px; }
.studio-search-box { flex: 1; min-width: 220px; }
.studio-hits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}
.studio-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.studio-hit b { display: block; font-family: var(--mono); }
.studio-hit small { color: var(--text-2); }
.studio-style-card { padding: 14px; margin-bottom: 14px; }
.studio-style-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.studio-hero {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f4f4f5;
}
.studio-assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.studio-asset { margin: 0; }
.studio-asset figcaption {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 12px;
}
.studio-asset-pick {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.studio-asset.is-selected .studio-asset-pick { border-color: var(--accent); }
.studio-asset-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f4f4f5;
}
.studio-asset.is-missing { opacity: 0.7; }
.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}
.studio-readonly, .studio-missing { color: var(--text-2); margin: 0 0 12px; }
.studio-status-ok { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.studio-status-warn { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.studio-status-bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.studio-status-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.studio-job-table { min-width: 720px; }
@media (max-width: 800px) {
  .studio-style-head { flex-direction: column; }
  .studio-hero { width: 100%; height: auto; max-height: 220px; }
  .studio-actions .btn { flex: 1 1 calc(50% - 8px); min-height: 40px; }
  .studio-search-card .toolbar { flex-direction: column; align-items: stretch; }
}

/* 自建登录页与首登改密（藏青工作台） */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: #f4f6f9;
}
.login-card {
  width: min(420px, 100%);
  padding: 28px 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 43, 82, 0.08);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand small { display: block; color: var(--text-3); font-size: 12px; }
.login-card h1 { font-size: 18px; margin-bottom: 6px; color: var(--accent); }
.login-lead { color: var(--text-2); margin-bottom: 18px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 12px; color: var(--text-2); }
.login-card input { height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; color: var(--text); }
.login-card .btn { width: 100%; height: 40px; margin-top: 6px; }
.login-error { color: var(--danger); font-size: 12px; margin: 0 0 8px; }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.site-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 40px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-topbar-name { font-size: 13px; font-weight: 600; color: var(--accent); }
body[data-view="boss"] .site-topbar { display: none; }
.account-pop-logout {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.account-pop-logout:hover { color: var(--danger); }
.password-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 43, 82, 0.45);
}
.password-gate .login-card { box-shadow: 0 16px 40px rgba(20, 43, 82, 0.2); }
