/* ==================================================================
   电商中控台 · 公共样式（照抄设计稿，禁止自行发挥）
   来源：C:\Users\Administrator\Desktop\电商中控台\ 下 9 份设计稿
         各自 head 内第 0 块自定义 <style> 合并去重
   ================================================================== */

/* ==================================================================
   设计 Token · 统一视觉基准（2026-09-17 UI/UX 升级）
   方向：现代 AI 创作工作台（Linear / Vercel / Stripe 那一类）
   规则：新代码一律引用变量；旧规则按批次逐步迁移，不做一次性重写。
   ================================================================== */
:root {
  /* 背景层 */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;

  /* 边框（层级靠微边框，不靠阴影） */
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* 文字层级 */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  /* 主色（沿用原有 Indigo 体系） */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;

  /* 语义色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* 阴影：只保留两级，克制使用 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .06);

  /* 动效：统一 120~220ms，不要夸张动画 */
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 220ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg-page); }

/* ---------- 滚动条 ---------- */
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.product-scroll::-webkit-scrollbar { width: 4px; }
.product-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }

/* ---------- 侧边栏折叠菜单 ---------- */
.sub-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s, margin 0.2s; opacity: 0; margin-top: 0; }
.sub-menu.open { max-height: 600px; opacity: 1; margin-top: 4px; }
.menu-item { transition: all 0.15s; cursor: pointer; border-right: 3px solid transparent; }
.menu-item.active { background-color: #eff6ff; color: #2563eb; border-right-color: #2563eb; }
.menu-item.active i { color: #2563eb; }
.menu-item:hover:not(.active) { background-color: #f8fafc; }
.chevron { transition: transform 0.3s ease; }
.chevron.rotated { transform: rotate(180deg); }

/* ---------- 通用下拉 ---------- */
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; margin-top: 8px; background: white; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); min-width: 200px; border: 1px solid #e2e8f0; z-index: 50; }
.dropdown-menu.open { display: block; }
.dropdown-item { transition: all 0.15s; cursor: pointer; }
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item.active { background: linear-gradient(90deg, #eff6ff, #f8fafc); }
.dropdown-panel { display: none; position: absolute; top: 100%; margin-top: 8px; background: white; border-radius: 14px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; z-index: 60; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
/* 注意：基础态是 display:none，这里必须显式恢复 display，
   否则 .open 只改 opacity/visibility 而元素仍是 none —— 下拉框点不开。
   （设计稿的 JS 就是切 .open class，display 必须由 CSS 负责还原。） */
.dropdown-panel.open { display: block; opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- 日期筛选器 ---------- */
.date-range-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid #e2e8f0; background: white;
  border-radius: 8px; font-size: 12px; font-weight: 500;
  color: #334155; transition: all 0.15s; cursor: pointer;
}
.date-range-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.date-range-btn.active { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

.date-panel {
  position: absolute; top: 100%; right: 0; margin-top: 10px;
  background: white; border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0; width: 480px; z-index: 60; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.date-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }

/* 日期面板内的胶囊式 mode-tab（与 AI 工作台的横杠式区分，作用域隔离） */
.date-panel .mode-tab { padding: 6px 14px; font-size: 12px; font-weight: 500; color: #64748b; border-radius: 8px; transition: all 0.15s; cursor: pointer; }
.date-panel .mode-tab:hover:not(.active) { background: #f1f5f9; color: #334155; }
.date-panel .mode-tab.active { background: #4f46e5; color: white; font-weight: 600; box-shadow: 0 2px 6px rgba(79,70,229,0.25); }

.quick-item {
  padding: 8px 14px; border-radius: 8px; font-size: 12px; color: #334155;
  cursor: pointer; transition: all 0.12s; border: 1px solid #e2e8f0;
  background: white; font-weight: 500;
}
.quick-item:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.quick-item.active { background: linear-gradient(135deg, #4f46e5, #6366f1); color: white; border-color: #4f46e5; box-shadow: 0 4px 10px rgba(79,70,229,0.25); font-weight: 600; }

.cal-day {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 12px; color: #334155; transition: all 0.12s;
  cursor: pointer; position: relative; user-select: none;
}
.cal-day:hover:not(.disabled):not(.empty) { background: #eff6ff; color: #2563eb; transform: scale(1.08); }
.cal-day.selected { background: #4f46e5; color: white; font-weight: 600; }
.cal-day.in-range { background: #e0e7ff; color: #4f46e5; border-radius: 0; }
.cal-day.range-start { border-radius: 8px 0 0 8px; }
.cal-day.range-end { border-radius: 0 8px 8px 0; }
.cal-day.pending { background: #fef3c7; color: #b45309; font-weight: 600; box-shadow: 0 0 0 2px #fbbf24; }
.cal-day.today::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: #4f46e5; }
.cal-day.today.selected::after { background: white; }
.cal-day.empty { cursor: default; }

.month-cell {
  padding: 14px 8px; border-radius: 10px; text-align: center; font-size: 13px;
  font-weight: 500; color: #334155; cursor: pointer; transition: all 0.15s;
  border: 1px solid #e2e8f0; background: white; user-select: none; position: relative;
}
.month-cell:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; transform: translateY(-2px); }
.month-cell.selected { background: linear-gradient(135deg, #4f46e5, #6366f1); color: white; border-color: #4f46e5; box-shadow: 0 4px 10px rgba(79,70,229,0.25); font-weight: 600; }
.month-cell.selected::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 4px; right: 6px; font-size: 9px; }

.year-cell {
  padding: 16px 8px; border-radius: 10px; text-align: center; font-size: 13px;
  font-weight: 500; color: #334155; cursor: pointer; transition: all 0.15s;
  border: 1px solid #e2e8f0; background: white; user-select: none; position: relative;
}
.year-cell:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; transform: translateY(-2px); }
.year-cell.selected { background: linear-gradient(135deg, #4f46e5, #6366f1); color: white; border-color: #4f46e5; box-shadow: 0 4px 10px rgba(79,70,229,0.25); font-weight: 600; }
.year-cell.selected::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 4px; right: 6px; font-size: 9px; }

/* ---------- 动效 ---------- */
.data-refreshing { animation: dataPulse 0.6s ease; }
@keyframes dataPulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.page-enter { animation: pageIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .page-enter { animation: none; } }

.progress-bar { height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1);} 50% { opacity:.5; transform:scale(.85);} }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.status-dot.online { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }

/* ---------- 主内容滚动区 ---------- */
.main-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.main-scroll::-webkit-scrollbar-track { background: transparent; }
.main-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.main-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- 数据源徽标 ---------- */
.src-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.src-product { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.src-traffic { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.src-sales { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

/* ---------- 商品雷达：类目卡 ---------- */
.category-card { transition: all 0.2s; cursor: pointer; }
.category-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.category-card.active { box-shadow: 0 0 0 2px #4f46e5; }
.cat-star { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #6ee7b7; }
.cat-potential { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; }
.cat-problem { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fcd34d; }
.cat-zero { background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-color: #cbd5e1; }
.badge-star { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.badge-potential { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.badge-problem { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.badge-zero { background: linear-gradient(135deg, #94a3b8, #64748b); color: white; }
.product-row { transition: background 0.15s; cursor: pointer; }
.product-row:hover { background: linear-gradient(90deg, #f8fafc, #eff6ff); }
.bounce-low { color: #10b981; font-weight: 600; }
.bounce-mid { color: #f59e0b; font-weight: 600; }
.bounce-high { color: #ef4444; font-weight: 600; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: #4f46e5; }
.filter-pill { transition: all 0.15s; }
.filter-pill.active { background: #4f46e5; color: white; }
/* 图表容器：各页设计稿高度不同，此处按页覆盖以保证「完全照抄」——
   雷达 420 / 矩阵 460 / 流量全景 320 / 渠道对标 340（取值见各 raw-*.html 的 .chart-container） */
.chart-container { position: relative; height: 420px; width: 100%; }
.chart-container-sm { position: relative; height: 240px; width: 100%; }
.chart-container-lg { position: relative; height: 380px; width: 100%; }
#page-matrix .chart-container { height: 460px; }
#page-flow .chart-container { height: 320px; }
#page-channel .chart-container { height: 340px; }

/* ---------- 抽屉 ---------- */
.drawer { transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.drawer.open { transform: translateX(0); }
.drawer-overlay { opacity: 0; visibility: hidden; transition: all 0.3s; }
.drawer-overlay.open { opacity: 1; visibility: visible; }

/* ---------- 全网价格监控 ---------- */
.price-bar-wrap { position: relative; height: 22px; background: #f8fafc; border-radius: 999px; overflow: hidden; }
.price-bar-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.price-bar-fill.ours { background: linear-gradient(90deg, #60a5fa, #3b82f6, #1d4ed8); }
.price-bar-fill.competitor { background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706); }
.price-bar-fill.danger { background: linear-gradient(90deg, #f87171, #ef4444, #b91c1c); }
.alert-item { transition: all 0.2s; }
.alert-item:hover { transform: translateX(3px); }
.price-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.price-up { background: #fef2f2; color: #dc2626; }
.price-down { background: #f0fdf4; color: #16a34a; }
.price-flat { background: #f1f5f9; color: #64748b; }
.tag-ours { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.tag-competitor { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.tag-distributor { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.tag-unauthorized { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

/* ---------- 多店铺战力榜 ---------- */
.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706); color: white; }
.rank-2 { background: linear-gradient(135deg, #e2e8f0, #cbd5e1, #94a3b8); color: white; }
.rank-3 { background: linear-gradient(135deg, #f59e0b, #d97706, #b45309); color: white; }
.podium-1 { background: linear-gradient(180deg, #fffbeb, #fef3c7); border: 2px solid #fbbf24; box-shadow: 0 12px 32px rgba(251,191,36,0.25); }
.podium-empty { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px); border: 2px dashed #cbd5e1; }
.rank-row { transition: all 0.2s; }
.rank-row:hover { transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.leaderboard-tab { transition: all 0.15s; cursor: pointer; border-bottom: 2px solid transparent; }
.leaderboard-tab.active { border-bottom-color: #4f46e5; color: #4f46e5; font-weight: 600; }
.leaderboard-tab:hover:not(.active) { color: #475569; }
.medal-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.move-up { color: #10b981; }
.move-down { color: #ef4444; }
.move-stay { color: #94a3b8; }

/* ---------- 待办决策事项 ---------- */
.prio-high { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.prio-mid { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.prio-low { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.todo-card { transition: all 0.2s; position: relative; overflow: hidden; }
.todo-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.todo-high::before { background: linear-gradient(180deg, #ef4444, #dc2626); }
.todo-mid::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.todo-low::before { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.todo-card:hover { transform: translateX(4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.todo-card.done { opacity: 0.45; text-decoration: line-through; }
/* 待办页优先级/数据源筛选 pill（app.js renderTodoFilters 生成） */
.todo-pill { font-size: 11px; padding: 6px 12px; border-radius: 8px; font-weight: 500; transition: all 0.15s; cursor: pointer; line-height: 1.2; display: inline-flex; align-items: center; }
.todo-pill:hover { filter: brightness(0.96); }
.todo-pill.active { background: #4f46e5 !important; color: #fff !important; box-shadow: 0 2px 8px rgba(79,70,229,0.28); }
.todo-pill.active span { color: #fff !important; }

/* ---------- 流量-转化矩阵：象限卡 ---------- */
.quadrant-card { transition: all 0.2s; cursor: pointer; }
.quadrant-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.q-star { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #6ee7b7; }
.q-star:hover { border-color: #10b981; }
.q-star.active { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.q-potential { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; }
.q-potential:hover { border-color: #3b82f6; }
.q-potential.active { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.q-problem { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fcd34d; }
.q-problem:hover { border-color: #f59e0b; }
.q-problem.active { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }

.view-toggle { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; }
.view-toggle button { padding: 5px 14px; font-size: 12px; font-weight: 500; color: #64748b; border-radius: 7px; transition: all 0.15s; }
.view-toggle button.active { background: white; color: #4f46e5; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ---------- 流量全景图 ---------- */
.strategy-card { transition: all 0.2s; }
.strategy-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.ch-advantage { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ch-revisit { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.ch-paid { background: linear-gradient(135deg, #f59e0b, #d97706); }
.channel-card { transition: all 0.2s; cursor: pointer; }
.channel-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.channel-card.active { box-shadow: 0 0 0 2px #4f46e5; }
.funnel-row { transition: all 0.2s; cursor: pointer; }
.funnel-row:hover { transform: translateX(4px); }
.tree-node { transition: all 0.15s; }
.tree-node:hover { background: #f8fafc; }
.tree-toggle { transition: transform 0.2s; }
.tree-toggle.rotated { transform: rotate(90deg); }
.efficiency-card { transition: all 0.2s; cursor: pointer; }
.efficiency-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }

/* ---------- AI 创作工作台（横杠式 mode-tab，独立作用域） ---------- */
.ai-workbench .mode-tab { padding: 10px 18px; font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; transition: all 0.15s; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ai-workbench .mode-tab:hover:not(.active) { color: #334155; background: #f8fafc; }
.ai-workbench .mode-tab.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 600; }
.ai-workbench .mode-tab.active i { color: #4f46e5; }
.chat-msg { animation: msgIn 0.3s ease forwards; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* 2026-09-17 老板：「目前用户气泡使用明显的 Indigo 渐变 + 阴影」——
   改成纯色 #4f46e5 + 极轻阴影；AI 消息 = 纯白 + 1px 边框 + 极轻阴影。
   不再用渐变（老板 23 条原则里的「少一点渐变 / 阴影」）。 */
.bubble-user { background: var(--primary); color: #fff; border-radius: 16px 4px 16px 16px; box-shadow: var(--shadow-sm); }
.bubble-ai { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow-sm); }
.chat-input { background: white; border: 2px solid #e2e8f0; border-radius: 20px; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.chat-input:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79,70,229,0.08), 0 4px 16px rgba(0,0,0,0.06); }
.typing-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: typingBounce 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-6px); opacity: 1; } }
.model-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: white; flex-shrink: 0; }
.icon-deepseek { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.icon-gpt { background: linear-gradient(135deg, #10b981, #059669); }
.icon-claude { background: linear-gradient(135deg, #f97316, #ea580c); }
.icon-gemini { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.icon-qwen { background: linear-gradient(135deg, #ec4899, #db2777); }
.icon-doubao { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.icon-kimi { background: linear-gradient(135deg, #1e293b, #334155); }
.icon-jimeng { background: linear-gradient(135deg, #ec4899, #be185d); }
.icon-kling { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.icon-sense { background: linear-gradient(135deg, #059669, #10b981); }
.icon-wanxiang { background: linear-gradient(135deg, #f97316, #ea580c); }
.icon-mj { background: linear-gradient(135deg, #6366f1, #4338ca); }
.icon-sd { background: linear-gradient(135deg, #6b7280, #4b5563); }
.icon-runway { background: linear-gradient(135deg, #ef4444, #dc2626); }
.icon-veo { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-custom { background: linear-gradient(135deg, #6b7280, #4b5563); }
.session-item { transition: all 0.15s; cursor: pointer; }
.session-item:hover { background: #f8fafc; }
.session-item.active { background: linear-gradient(90deg, #eff6ff, #f8fafc); }
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all 0.2s; backdrop-filter: blur(4px); }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content { background: white; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: all 0.2s; }
.modal-overlay.open .modal-content { transform: scale(1); }
.form-input { width: 100%; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 13px; color: #334155; transition: all 0.15s; background: white; outline: none; }
.form-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
input[type="range"].slider { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 999px; background: #e2e8f0; outline: none; }
input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #6366f1); cursor: pointer; box-shadow: 0 2px 6px rgba(79,70,229,0.3); border: 2px solid white; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 999px; font-size: 11px; font-weight: 500; }
.scene-card { transition: all 0.15s; cursor: pointer; border: 2px solid #e2e8f0; background: white; }
.scene-card:hover { border-color: #c7d2fe; }
.scene-card.selected { border-color: #4f46e5; background: #f5f3ff; }
.img-placeholder { aspect-ratio: 1/1; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; position: relative; overflow: hidden; }
.img-placeholder::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(148,163,184,0.05) 20px, rgba(148,163,184,0.05) 40px); }
.video-placeholder { aspect-ratio: 9/16; background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #64748b; position: relative; overflow: hidden; }
.copied-feedback { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 10px 20px; border-radius: 10px; font-size: 13px; z-index: 999; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.copied-feedback.show { opacity: 1; }
.prompt-type-card { transition: all 0.15s; cursor: pointer; border: 2px solid #e2e8f0; background: white; border-radius: 10px; padding: 14px; text-align: center; }
.prompt-type-card:hover { border-color: #c7d2fe; }
.prompt-type-card.selected { border-color: #4f46e5; background: #f5f3ff; }
.prompt-output { background: linear-gradient(135deg, #f8fafc, #ffffff); border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.8; color: #334155; position: relative; }
.prompt-output code { background: #eff6ff; color: #4f46e5; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 12px; }

/* ---------- toast（业务组件，非设计稿） ---------- */
.ec-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); animation: toastIn 0.25s ease; }
.ec-toast.success { background: #16a34a; color: #fff; }
.ec-toast.error { background: #dc2626; color: #fff; }
.ec-toast.warning { background: #d97706; color: #fff; }
.ec-toast.info { background: #2563eb; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==================================================================
   AI 模型库（Model Hub）· 2026-09-17 新增
   原则（照抄老板 23 条设计原则）：
     · 白底 Card + #e5e7eb 细边框，**不做每模型一个渐变背景**
     · 品牌色只出现在 Logo 与极小标签上，不铺满卡片
     · 不加发光 / 玻璃拟态 / 超大标题；动画统一 120~220ms
   ================================================================== */

/* ---------- 页头：搜索 / 主按钮 ---------- */
.mh-search { width: 220px; padding: 7px 12px 7px 30px; font-size: 12px; color: var(--text-primary);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  outline: none; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.mh-search::placeholder { color: var(--text-muted); }
.mh-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .08); }
.mh-btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 12px;
  font-weight: 500; color: #fff; background: var(--primary); border: 1px solid var(--primary);
  border-radius: var(--radius-md); cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.mh-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* ---------- 类型 Tab ---------- */
.mh-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.mh-tab { padding: 8px 12px 9px; font-size: 12px; font-weight: 500; color: var(--text-secondary);
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.mh-tab:hover { color: var(--text-primary); }
.mh-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 筛选（轻量 Dropdown，非大弹窗） ---------- */
.mh-filter { position: relative; }
.mh-filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 11.5px;
  color: var(--text-secondary); background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; white-space: nowrap;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.mh-filter-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.mh-filter-btn i { font-size: 8px; color: var(--text-muted); }
.mh-filter.on .mh-filter-btn { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.mh-filter.on .mh-filter-btn i { color: var(--primary); }
.mh-filter-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 176px;
  max-height: 288px; overflow-y: auto; padding: 5px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); display: none; }
.mh-filter.open .mh-filter-panel { display: block; }
.mh-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 6px 9px; font-size: 11.5px; color: var(--text-secondary); background: none; border: 0;
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.mh-opt:hover { background: var(--bg-subtle); color: var(--text-primary); }
.mh-opt.sel { color: var(--primary); background: var(--primary-soft); font-weight: 500; }
.mh-opt .n { font-size: 10px; color: var(--text-muted); }
.mh-filter-reset { padding: 6px 10px; font-size: 11.5px; color: var(--text-muted); background: none;
  border: 0; cursor: pointer; transition: color var(--t-fast) var(--ease); }
.mh-filter-reset:hover { color: var(--danger); }

/* ---------- 卡片网格 ---------- */
.mh-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mh-card { display: flex; flex-direction: column; padding: 16px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.mh-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mh-card.joined { border-color: #c7d2fe; }
.mh-card-head { display: flex; align-items: flex-start; gap: 10px; }
/* Logo 统一 32×32 / 圆角 8px；品牌色只允许出现在这里 */
.mh-logo { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: -.2px; color: #fff; background: #64748b; }
.mh-card-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.mh-card-prov { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mh-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.mh-cap { padding: 2px 7px; font-size: 10px; font-weight: 500; color: var(--text-secondary);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 5px; }
.mh-card-note { margin-top: 10px; font-size: 11px; line-height: 1.6; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.mh-api { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-muted); }
.mh-api .dot { width: 5px; height: 5px; border-radius: 9999px; background: #cbd5e1; flex-shrink: 0; }
.mh-api.ready { color: var(--success); }
.mh-api.ready .dot { background: var(--success); }
.mh-api.manual { color: var(--warning); }
.mh-api.manual .dot { background: var(--warning); }
/* API 可用性七态的配色档位（2026-09-17「按实际情况显示是否可用」）——
   ok = 可用；warn = 待测试 / 需手动配置；bad = 不可用 / 缺密钥；
   其余（未接入 / 暂无公开 API）走 .mh-api 的默认中性灰，不加档位类。 */
.mh-api.ok { color: var(--success); }
.mh-api.ok .dot { background: var(--success); }
.mh-api.warn { color: var(--warning); }
.mh-api.warn .dot { background: var(--warning); }
.mh-api.bad { color: var(--danger); }
.mh-api.bad .dot { background: var(--danger); }
/* 抽屉里的「去官网申请 API」外链 —— 每个模型都能跳到它自己的 API 生成/申请页 */
.mh-use-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 11px;
  color: var(--primary); text-decoration: none; background: var(--primary-soft);
  border: 1px solid #c7d2fe; padding: 5px 9px; border-radius: var(--radius-md);
  transition: background var(--t-fast) var(--ease); }
.mh-use-link:hover { background: #e0e7ff; }
.mh-btn-ghost { padding: 5px 11px; font-size: 11.5px; font-weight: 500; color: var(--text-secondary);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.mh-btn-ghost:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.mh-btn-ghost.solid { color: #fff; background: var(--primary); border-color: var(--primary); }
.mh-btn-ghost.solid:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

/* ---------- 空态 ---------- */
.mh-empty { padding: 56px 0; text-align: center; }
.mh-empty > i { font-size: 26px; color: #cbd5e1; display: block; margin-bottom: 12px; }

/* ---------- 详情 Drawer（从右侧滑出，比 Modal 更适合模型库） ---------- */
.mh-drawer-mask { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .28);
  opacity: 0; visibility: hidden; transition: opacity var(--t-slow) var(--ease), visibility var(--t-slow) var(--ease); }
.mh-drawer-mask.open { opacity: 1; visibility: visible; }
.mh-drawer { position: fixed; top: 0; right: 0; z-index: 301; width: 400px; max-width: 92vw; height: 100vh;
  display: flex; flex-direction: column; background: var(--bg-surface); border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(15, 23, 42, .06); transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease); }
.mh-drawer.open { transform: translateX(0); }
.mh-drawer-head { position: relative; padding: 20px; border-bottom: 1px solid var(--border); }
.mh-drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.mh-drawer-foot { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.mh-drawer-foot > * { flex: 1; justify-content: center; }
.mh-sec { margin-bottom: 20px; }
.mh-sec-title { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px; }
.mh-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.mh-kv:last-child { border-bottom: 0; }
.mh-kv .k { color: var(--text-muted); flex-shrink: 0; }
.mh-kv .v { color: var(--text-primary); text-align: right; }
.mh-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; display: flex;
  align-items: center; justify-content: center; color: var(--text-muted); background: none; border: 0;
  border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.mh-close:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* ==================================================================
   AI 工作台 · 第二轮 UI/UX 升级（2026-09-17）
   老板口径：§十五 作图 30% 控制 / 70% 结果；§十六 视频结果按比例；
             §十七 提示词「目标模型」；§十八「模型与 API」两个 Tab。
   全部引用设计 Token，动效 120~220ms。
   ================================================================== */

/* ---------- 控制区 30% / 结果区 70%（§十五 / §十六）
   DOM 上的 grid-cols-12 / col-span-4 / col-span-8 一个都不改 ——
   ai-workbench.src.js 的 collectChoiceGroups() 靠
   `#page-ai .mode-panel > .grid > .col-span-4` 定位左侧设置栏，
   改动类名会把场景卡 / 单选组的整条绑定链打断。这里只覆盖轨道宽度。 */
#page-ai .ai-split { display: grid; grid-template-columns: 30% 70%; }
#page-ai .ai-split > .col-span-4,
#page-ai .ai-split > .col-span-8 { grid-column: auto; min-width: 0; }

/* ---------- 结果区：低调的区块头（结果优先，标题不抢戏） ---------- */
#page-ai .mode-panel .result-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; }
#page-ai .mode-panel .result-head h3 { font-size: 13px; font-weight: 600; color: var(--text-primary); }
#page-ai .mode-panel .result-head .ratio-tag { font-size: 10px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }

/* ---------- 结果卡：Hover 才出操作按钮（§十五） ---------- */
#page-ai .res-actions { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 8px; background: rgba(15, 23, 42, .42); opacity: 0;
  transition: opacity var(--t-base) var(--ease); }
#page-ai .res-card:hover .res-actions { opacity: 1; }
#page-ai .res-card { transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
#page-ai .res-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }

/* ---------- 占位块去渐变（§二 减少不必要的渐变 / §二十三 少装饰） ---------- */
#page-ai .img-placeholder { background: var(--bg-subtle); border: 1px solid var(--border); }
#page-ai .img-placeholder::before { content: none; }
#page-ai .video-placeholder { background: #111827; }
#page-ai .video-placeholder:hover { background: #1f2937; }
#page-ai .video-placeholder { transition: background var(--t-base) var(--ease); }

/* ---------- 提示词结果：参数建议 / Negative Prompt ---------- */
#page-ai .pg-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
#page-ai .pg-tag { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); }
#page-ai .pg-tag.neutral { background: var(--bg-subtle); color: var(--text-secondary); }
#page-ai .pg-params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#page-ai .pg-param { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: var(--bg-subtle); border-radius: var(--radius-md); padding: 7px 10px; font-size: 11px; }
#page-ai .pg-param .k { color: var(--text-muted); }
#page-ai .pg-param .v { color: var(--text-primary); font-weight: 600; }
#page-ai .pg-apply-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 弹窗「模型与 API」两个 Tab（§十八） ---------- */
.mm-tabs { display: flex; gap: 2px; }
.mm-tab { position: relative; display: inline-flex; align-items: center; padding: 9px 14px 10px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary); background: none; border: 0; cursor: pointer;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.mm-tab:hover { color: var(--text-primary); background: var(--bg-subtle); }
.mm-tab.active { color: var(--primary); }
.mm-tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--primary); }

/* ---------- 聊天输入区工具栏（§十四） ---------- */
#page-ai .chat-tool-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; background: none; cursor: pointer; color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
#page-ai .chat-tool-btn:hover { color: var(--primary); background: var(--primary-soft); }
#page-ai .chat-tool-btn.active { color: var(--primary); background: var(--primary-soft); }

#page-ai .chat-model-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 168px;
  padding: 4px 9px; font-size: 11px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
#page-ai .chat-model-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
#page-ai .chat-model-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 60;
  min-width: 220px; max-height: 280px; overflow-y: auto; padding: 4px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); display: none; }
#page-ai .chat-model-menu.open { display: block; }
#page-ai .chat-model-item { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; font-size: 12px; color: var(--text-primary); border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--t-fast) var(--ease); }
#page-ai .chat-model-item:hover { background: var(--bg-subtle); }
#page-ai .chat-model-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
#page-ai .chat-model-empty { padding: 14px 10px; text-align: center; font-size: 11px; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   供应商选择器（带图标）—— 2026-09-17
   老板 BUG：「供应商列表 没有对应的 AI 供应商的图标」。
   原生 <select> 的 option **无法**放图标，所以它退居「值源」被视觉隐藏，
   真正给用户看的是 #cfgBrandBtn（当前项）+ #cfgBrandPanel（图标列表）。
   绑定链一个字没动：选中后写 select.value 再派发 change，bindModelSettings /
   el.onchange / saveModel / 探针的 cfg_brand 判据全部照旧。

   ⚠️ 这几条规则**故意不带 `#page-ai` 前缀**：弹窗会被 portal 到
   `document.body`（为了在 AI 模型库页面也能弹），带前缀就套不上了。
   ============================================================ */
.cfg-brand-select { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; pointer-events: none; }
.cfg-brand-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px;
  font-size: 12px; color: var(--text-primary); background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.cfg-brand-btn:hover { border-color: var(--primary); }
.cfg-brand-btn.open { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cfg-brand-btn .model-icon { width: 20px; height: 20px; border-radius: 6px; font-size: 8px; }
.cfg-brand-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  max-height: 272px; overflow-y: auto; padding: 4px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.cfg-brand-opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 12px;
  color: var(--text-primary); border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--t-fast) var(--ease); }
.cfg-brand-opt:hover { background: var(--bg-subtle); }
.cfg-brand-opt.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cfg-brand-opt .model-icon { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.cfg-brand-opt-sub { font-size: 10px; color: var(--text-muted); font-weight: 400; }

/* ============================================================
   AI 任务中心（#page-tasks）—— 2026-09-17 老板新模块
   ------------------------------------------------------------
   版式照老板给的原样：
     进行中 ──── ● 任务标题 + 右侧一句状态（预计还需 2 分钟 / 已完成 3 / 5 /
                        已完成 78% / 等待审核）+ 进度条
     已完成 ──── ✓ 任务标题
   全部用 Token 配色，跟随双主题；零渐变、圆角与卡片规则与模型库一致。
   ============================================================ */
.tk-cmd { display: flex; align-items: center; gap: 0; width: 420px; max-width: 100%;
  padding: 4px 4px 4px 12px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.tk-cmd:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tk-cmd-ico { font-size: 11px; color: var(--primary); flex-shrink: 0; }
.tk-cmd input { flex: 1; min-width: 0; margin: 0 8px; border: 0; outline: none; background: transparent;
  font-size: 12px; color: var(--text-primary); }
.tk-cmd input::placeholder { color: var(--text-muted); }
.tk-cmd-btn { flex-shrink: 0; padding: 7px 14px; font-size: 12px; font-weight: 600; color: #fff;
  background: var(--primary); border: 0; border-radius: var(--radius-md); cursor: pointer;
  transition: background var(--t-fast) var(--ease); }
.tk-cmd-btn:hover { background: var(--primary-hover); }

.tk-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-stat { display: flex; flex-direction: column; gap: 2px; min-width: 96px; padding: 10px 14px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.tk-stat.grow { flex: 1; min-width: 180px; }
.tk-stat .k { font-size: 10px; color: var(--text-muted); }
.tk-stat .v { font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text-primary); }
.tk-stat .v.sm { font-size: 13px; font-weight: 600; }
.tk-stat .v.warn { color: var(--warning); }
.tk-stat .v.ok { color: var(--success); }
.tk-stats-hint { flex-basis: 100%; font-size: 11px; color: var(--text-muted); }

.tk-board { margin-bottom: 20px; }
.tk-sec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.tk-sec-title i { font-size: 11px; color: var(--text-muted); }
.tk-sec-count { font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.tk-sec-line { flex: 1; height: 1px; background: var(--border); }
.tk-clear { font-size: 11px; color: var(--text-muted); background: transparent; border: 0;
  cursor: pointer; transition: color var(--t-fast) var(--ease); }
.tk-clear:hover { color: var(--danger); }

.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.tk-item:hover { border-color: var(--primary); }
.tk-dot { flex-shrink: 0; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px;
  background: var(--primary); }
.tk-item.s-waiting .tk-dot { background: var(--warning); }
.tk-item.s-failed .tk-dot { background: var(--danger); }
@keyframes tkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tk-item.s-running .tk-dot { animation: tkPulse 1.6s var(--ease) infinite; }
.tk-item-main { flex: 1; min-width: 0; }
.tk-item-title { font-size: 13px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-item-note { margin-top: 3px; font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-item-sub { flex-shrink: 0; font-size: 11px; color: var(--text-secondary); text-align: right;
  min-width: 96px; font-variant-numeric: tabular-nums; }
.tk-item.s-waiting .tk-item-sub { color: var(--warning); font-weight: 600; }
.tk-item.s-failed .tk-item-sub { color: var(--danger); font-weight: 600; }
.tk-bar { margin-top: 9px; height: 4px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.tk-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px;
  transition: width var(--t-mid) var(--ease); }
.tk-item.s-waiting .tk-bar > i { background: var(--warning); }
.tk-item.s-failed .tk-bar > i { background: var(--danger); }

.tk-done-list { display: flex; flex-direction: column; }
.tk-done-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px dashed var(--border); cursor: pointer;
  transition: background var(--t-fast) var(--ease); }
.tk-done-item:last-child { border-bottom: 0; }
.tk-done-item:hover { background: var(--bg-subtle); }
.tk-done-item > i { font-size: 11px; color: var(--success); flex-shrink: 0; }
.tk-done-title { flex: 1; min-width: 0; font-size: 12px; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-done-meta { flex-shrink: 0; font-size: 11px; color: var(--text-muted); }

.tk-empty { padding: 34px 16px; text-align: center; background: var(--bg-surface);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.tk-empty i { font-size: 20px; color: var(--text-muted); }

.tk-drawer-mask { position: fixed; inset: 0; z-index: 120; background: rgba(15, 23, 42, .32);
  opacity: 0; pointer-events: none; transition: opacity var(--t-mid) var(--ease); }
.tk-drawer-mask.open { opacity: 1; pointer-events: auto; }
.tk-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 121; width: 520px; max-width: 94vw;
  display: flex; flex-direction: column; background: var(--bg-surface);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-md);
  transform: translateX(100%); transition: transform var(--t-mid) var(--ease); }
.tk-drawer.open { transform: translateX(0); }
.tk-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border); }
.tk-drawer-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.tk-drawer-sub { margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.tk-drawer-x { flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-surface); color: var(--text-secondary);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.tk-drawer-x:hover { border-color: var(--primary); color: var(--primary); }
.tk-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.tk-step { margin-bottom: 14px; padding: 12px 14px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-lg); }
.tk-step-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  color: var(--text-primary); }
.tk-step-head .st { margin-left: auto; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.tk-step.s-waiting .st { color: var(--warning); }
.tk-step.s-running .st { color: var(--primary); }
.tk-step.s-done .st { color: var(--success); }
.tk-step-body { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 11px; line-height: 1.75; color: var(--text-secondary); white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tk-drawer-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.tk-btn { padding: 6px 12px; font-size: 11px; font-weight: 600; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.tk-btn:hover { border-color: var(--primary); color: var(--primary); }
.tk-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.tk-btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.tk-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* 对话里回的那张「任务卡」——老板要的「每一个对话以任务组的形式」 */
.chat-task-card { margin: 10px 0; padding: 12px 14px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg); }
.chat-task-card .ct-head { display: flex; align-items: center; gap: 7px; font-size: 12px;
  font-weight: 600; color: var(--text-primary); }
.chat-task-card .ct-head i { font-size: 11px; color: var(--primary); }
.chat-task-card .ct-sub { margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.chat-task-card .ct-foot { margin-top: 9px; display: flex; align-items: center; gap: 8px; }
.chat-task-card .ct-link { font-size: 11px; font-weight: 600; color: var(--primary); cursor: pointer; }


/* ==================================================================
   AI 增长闭环（2026-09-18）· 老板九节需求里的界面部分
   ------------------------------------------------------------
   新增块：对话页右栏 AI 上下文 / 左栏商品数据依据 / 结果卡五动作 /
           效果反馈页（素材资产 + 优化实验）/ 任务中心「监控中」。
   规则与上一轮一致：全部引用 :root 的 Token，动效 120~220ms，零渐变。
   ================================================================== */

/* ---------- 对话页：左 8 栏对话 / 右 4 栏上下文（§一.B）
   .ai-split 默认是 30% 70%（左设置右结果），对话页左右正好相反，
   所以加一个 .chat-split 只改轨道宽度 —— DOM 类名一个不动。 */
#page-ai .ai-split.chat-split { grid-template-columns: 68% 32%; }

/* ==================================================================
   ★★ 效果反馈页 · 窄屏版式（老板 2026-09-19 本轮 §五）★★
   ----------------------------------------------------------------
   老板原话：「修复反馈页窄屏布局。**收起不必要的对话栏**；
             素材列表与详情**支持切换**。在 1440、1180、960px 下截图验收，
             不只检查元素是否重叠。」

   两个毛病：
     ① 左侧 260px「会话列表」和反馈流程毫无关系，窄屏下白占四分之一宽度；
     ② 素材资产（4 栏）与优化实验（8 栏）并排，960px 下两块都装不下自己的表单
        —— 实测左右栏都出现容器级横向溢出（表单/按钮被裁掉，点不到）。

   修法（**宽屏一字不动**，只在 ≤1180px 生效）：
     · 会话栏 → 默认收起，右上「会话栏」按钮可展开（展开时以浮层覆盖，不挤压内容）；
     · 4/8 并排 → 单栏 + 切换条，一次只显示一块。
   ⚠ DOM 类名（grid-cols-12 / col-span-4 / col-span-8 / ai-split）**一个都没改**，
     这里只新增轨道与显隐规则 —— 与设计稿的对应关系保持不变。
   ================================================================== */
#page-ai .ai-workbench { position: relative; }
/* ★ 2026-10-13：原写法特异性 (2 id+1 class) 压过 Tailwind `.hidden`(1 class)，
   ⇒ 本面板**永远 display:flex**、始终占着文档流，把当前模式面板挤成半高。
   加 :not(.hidden)：带 .hidden 时本规则不匹配，`.hidden` 正常生效；
   显示时的版式与原来**逐字一致**（不加 !important）。 */
#page-ai #mode-feedback.fb-wrap:not(.hidden) { display: flex; flex-direction: column; }
#page-ai .fb-switch { display: none; }

@media (max-width: 1180px) {
  /* 切换条：只在窄屏出现 */
  #page-ai .fb-switch { display: flex; align-items: center; gap: 6px; flex-shrink: 0;
    padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--bg-surface); }
  #page-ai .fb-switch-b, #page-ai .fb-switch-side {
    display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
    padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
  #page-ai .fb-switch-b i, #page-ai .fb-switch-side i { font-size: 10px; }
  #page-ai .fb-switch-b.is-on { color: var(--primary); border-color: var(--primary);
    background: var(--primary-soft); }
  #page-ai .fb-switch-side { margin-left: auto; }
  #page-ai .fb-switch-side.is-on { color: var(--primary); border-color: var(--primary); }

  /* 单栏 + 切换：4/8 两块不再并排 */
  #page-ai #mode-feedback .fb-body { display: block; height: auto; flex: 1; min-height: 0; }
  #page-ai #mode-feedback .fb-pane-assets,
  #page-ai #mode-feedback .fb-pane-exps { display: none; width: 100%; height: 100%;
    border-right: 0; }
  #page-ai #mode-feedback[data-fbview="assets"] .fb-pane-assets { display: block; }
  #page-ai #mode-feedback[data-fbview="exps"] .fb-pane-exps { display: block; }

  /* 会话栏：窄屏默认收起；手动展开时走浮层，不压缩右侧内容宽度 */
  #page-ai .ai-workbench.is-feedback:not(.fb-side-open) > aside { display: none; }
  #page-ai .ai-workbench.is-feedback.fb-side-open > aside {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 46;
    box-shadow: var(--shadow-md); }
}

/* ---------- 通用小卡片：AI 上下文 / 商品数据依据 ---------- */
#page-ai .ctx-card { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 11px 13px; margin-bottom: 10px; }
#page-ai .ctx-card:last-child { margin-bottom: 0; }
#page-ai .ctx-c-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 7px; }
#page-ai .ctx-c-h i { font-size: 10px; color: var(--primary); }
#page-ai .ctx-b-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px; }
#page-ai .ctx-b-title i { font-size: 10px; color: var(--primary); }
#page-ai .ctx-b-title2 { margin: 9px 0 5px; font-size: 11px; font-weight: 700; color: var(--text-secondary); }
#page-ai .ctx-b-sub { font-size: 10px; color: var(--text-muted); margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-ai .ctx-b-l { font-size: 11px; line-height: 1.65; color: var(--text-secondary); }
#page-ai .ctx-b-warn { font-size: 11px; line-height: 1.65; color: var(--warning); }
#page-ai .ctx-b-note { font-size: 10px; line-height: 1.6; color: var(--text-muted); margin-top: 4px; }
/* 商品数据依据挂在「选择商品」下面：上边框做分隔，不抢视觉 */
#page-ai .ctx-basis { margin: -6px 0 16px; padding: 10px 12px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* 图片方向 chip（点了就改下次生成的意图） */
#page-ai .ctx-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
#page-ai .ctx-chip { font-size: 10px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
  background var(--t-fast) var(--ease); }
#page-ai .ctx-chip:hover { border-color: var(--primary); color: var(--primary); }
#page-ai .ctx-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------- 结果卡五动作（§一.E）----------
   注意：这五个按钮**默认可见**（不是 hover 才出）—— 它们是有副作用的动作，
   藏在 hover 里既不好用，也会让自动化普查判不到可见性。 */
#page-ai .vg-act { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px;
  padding-top: 9px; border-top: 1px dashed var(--border); }
#page-ai .vg-btn { font-size: 10px; font-weight: 600; padding: 5px 9px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
  background var(--t-fast) var(--ease); }
#page-ai .vg-btn i { font-size: 9px; }
#page-ai .vg-btn:hover { border-color: var(--primary); color: var(--primary); }
#page-ai .vg-btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
#page-ai .vg-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
#page-ai .vg-btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
#page-ai .vg-basis { margin-top: 8px; padding: 10px 12px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-md); }
#page-ai .vg-basis-h { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 5px; }
#page-ai .vg-basis-l { font-size: 10px; line-height: 1.6; color: var(--text-secondary); }
#page-ai .vg-basis-n { margin-top: 6px; font-size: 10px; line-height: 1.6; color: var(--text-muted); }

/* ---------- 效果反馈页（#mode-feedback） ---------- */
#page-ai .fb-asset, #page-ai .fb-exp { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 11px 13px; margin-bottom: 9px; }
#page-ai .fb-exp { border-left: 3px solid var(--success); }
#page-ai .fb-asset-h { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
#page-ai .fb-asset-t { font-size: 12px; font-weight: 600; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-ai .fb-tag { flex-shrink: 0; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-secondary); }
#page-ai .fb-tag.on { background: #ecfdf5; border-color: #a7f3d0; color: var(--success); }
#page-ai .fb-asset-a { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#page-ai #fbAssetFilter [data-status].on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------- 任务中心「监控中」（§一.2）---------- */
.tk-item.s-monitoring .tk-dot { background: var(--success); }
.tk-item.s-monitoring { border-left: 3px solid rgba(16, 185, 129, .35); }
.tk-mon-delta { margin-left: 8px; font-weight: 700; color: var(--success); }
/* 「待上线」不是「监控中」—— 用中性色，别让人以为已经在跑了（2026-09-18 阶段 4） */
.tk-item.s-pending_online { border-left: 3px solid rgba(148, 163, 184, .45); }
.tk-item.s-pending_online .tk-dot { background: #94a3b8; }
.tk-item.s-pending_online .tk-item-sub { color: var(--text-secondary); }

/* ---------- 效果反馈页：确认上线 / 按类型回填（2026-09-18 阶段 4）---------- */
#page-ai .fb-launch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
#page-ai .fb-sel { font-size: 11px; padding: 5px 8px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); min-width: 130px;
  transition: border-color 140ms var(--ease); }
#page-ai .fb-sel:focus { outline: none; border-color: var(--primary); }
#page-ai .fb-fill { margin-top: 9px; padding: 9px 10px; border-radius: 9px;
  background: var(--bg-subtle); border: 1px dashed var(--border); }
#page-ai .fb-fill.hidden { display: none; }
#page-ai .fb-f-l { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#page-ai .fb-f-l > span { flex-shrink: 0; width: 78px; font-size: 11px; color: var(--text-secondary); }
#page-ai .fb-f-l > input { flex: 1; min-width: 0; font-size: 11px; padding: 5px 8px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); }
#page-ai .fb-f-l > input:focus { outline: none; border-color: var(--primary); }
#page-ai .fb-warn { font-size: 11px; color: var(--warning); }

/* ---------- 商品雷达 / 流量-转化矩阵 行末 AI 入口（2026-09-18 阶段 5）----------
   ★ 老板要求「增加 AI 诊断 / 优化图片 / 生成种草入口，跳转时携带商品与问题」。
   放在**原有的最后一列里**（不新增列、不改设计稿列数），默认只占 0 宽，
   鼠标悬停在行上才展开 —— 不打扰阅读，需要时就在手边。 */
.row-ai { display: inline-flex; align-items: center; gap: 3px; width: 0; overflow: hidden;
  vertical-align: middle; opacity: 0; transition: width 160ms var(--ease), opacity 160ms var(--ease); }
.product-row:hover .row-ai { width: 66px; opacity: 1; }
.row-ai-btn { width: 19px; height: 19px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-secondary); font-size: 9px; cursor: pointer; padding: 0;
  transition: color 140ms var(--ease), border-color 140ms var(--ease), background 140ms var(--ease); }
.row-ai-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
/* 触屏 / 窄屏：没有 hover，直接常显 */
@media (hover: none) {
  .row-ai { width: 66px; opacity: 1; }
}

/* ============================================================
   任务验证台（2026-09-19 §四）—— 「AI 生成 → 你确认上线 → 数据说话」
   ------------------------------------------------------------
   设计口径与全站一致：白底卡片 + #e5e7eb 描边 + 零渐变；
   状态色只用设计 token（success / warning / danger），不自己造色。
   ============================================================ */
.vf-head-right { display: flex; align-items: center; gap: 10px; }
.vf-base { font-size: 11px; color: var(--text-muted); }
.vf-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500;
  padding: 5px 11px; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease); }
.vf-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.vf-btn:disabled { opacity: .45; cursor: not-allowed; }
.vf-btn.is-on { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.tk-stat .v.bad { color: var(--danger); }

/* ---------- 按产出类型分栏 ---------- */
.vf-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.vf-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease); }
.vf-tab:hover { color: var(--primary); border-color: var(--primary); }
.vf-tab.is-on { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.vf-tab em { font-style: normal; font-size: 11px; color: var(--text-muted); }
.vf-tab.is-on em { color: var(--primary); }
.vf-tab-dot { position: absolute; top: 3px; right: 5px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warning); }

/* ---------- 列表 ---------- */
.vf-board { margin-bottom: 20px; }
.vf-list { display: flex; flex-direction: column; gap: 8px; }
.vf-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-surface);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.vf-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.vf-ico { flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: var(--radius-md); background: var(--bg-subtle);
  border: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; }
.vf-main { flex: 1; min-width: 0; }
.vf-t { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.vf-sub { margin-top: 3px; font-size: 11px; color: var(--text-muted); }
.vf-preview { margin-top: 5px; font-size: 11px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
  max-width: 190px; }
.vf-src { font-size: 10px; color: var(--text-muted); text-align: right; }
.vf-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; }
/* ★ 2026-09-19（老板本轮 §一）：徽标状态**必须覆盖实验引擎的全部六态** ——
   旧版只写了 pending/better/worse/insufficient，
   而引擎真有 flat / undecidable / no_data 三态（`insufficient` 反而是自造的），
   于是这三态在界面上全落到默认灰、还带着一个不存在的状态类。 */
.vf-badge.is-pending { color: var(--warning); background: #fffbeb; border-color: #fde68a; }
.vf-badge.is-better { color: var(--success); background: #ecfdf5; border-color: #a7f3d0; }
.vf-badge.is-worse { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.vf-badge.is-flat { color: var(--text-secondary); background: var(--bg-subtle); border-color: var(--border); }
.vf-badge.is-undecidable { color: #b45309; background: #fff7ed; border-color: #fed7aa; }
.vf-badge.is-no_data { color: var(--text-muted); background: var(--bg-subtle); border-color: var(--border); }
/* 证据已修订 → 结论只能当历史记录，徽标上加一道斜纹以示「不可作为依据」 */
.vf-badge.is-stale { position: relative; }
.vf-badge.is-stale::after { content: ''; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px dashed currentColor; opacity: .55; }
/* 历史记录行（修订前的旧结论）：灰底 + 明确写「只作历史记录」 */
.vf-hist { font-size: 10px; color: var(--text-muted); line-height: 1.5; text-align: right; }
.vf-hist b { font-weight: 600; }
.vf-stale { font-size: 10px; color: #b45309; }
.vf-empty { padding: 48px 16px; text-align: center; border: 1px dashed var(--border);
  border-radius: var(--radius-lg); background: var(--bg-surface); }
.vf-empty.hidden { display: none; }
.vf-empty i { font-size: 26px; color: var(--text-muted); }

/* ---------- 抽屉 ---------- */
.vf-drawer-mask { position: fixed; inset: 0; z-index: 130; background: rgba(15, 23, 42, .32);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease); }
.vf-drawer-mask.open { opacity: 1; pointer-events: auto; }
.vf-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 131; width: 620px; max-width: 94vw;
  background: var(--bg-surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-md);
  transform: translateX(100%); transition: transform var(--t-slow) var(--ease);
  display: flex; flex-direction: column; }
.vf-drawer.open { transform: translateX(0); }
.vf-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.vf-drawer-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.vf-drawer-sub { margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.vf-drawer-x { flex-shrink: 0; width: 26px; height: 26px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary);
  cursor: pointer; font-size: 11px; }
.vf-drawer-x:hover { color: var(--danger); border-color: var(--danger); }
.vf-drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; }

/* ---------- 抽屉内的分区 ---------- */
.vf-sec { margin-bottom: 18px; }
.vf-sec-h { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 9px; }
.vf-verdict { display: flex; align-items: baseline; gap: 10px; padding: 11px 13px;
  border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-subtle); }
.vf-verdict.is-better { border-color: #a7f3d0; background: #ecfdf5; }
.vf-verdict.is-worse { border-color: #fecaca; background: #fef2f2; }
.vf-verdict.is-pending { border-color: #fde68a; background: #fffbeb; }
/* ★ 引擎六态的另三态（flat / undecidable / no_data）+ 证据已修订 */
.vf-verdict.is-flat { border-color: var(--border); background: var(--bg-subtle); }
.vf-verdict.is-undecidable { border-color: #fed7aa; background: #fff7ed; }
.vf-verdict.is-no_data { border-color: var(--border); background: var(--bg-subtle); }
.vf-verdict.is-stale { border-color: #fed7aa; background: #fff7ed; }
.vf-vstale { margin-top: 7px; padding: 7px 9px; border-radius: var(--radius-sm);
  border: 1px solid #fed7aa; background: #fff7ed; font-size: 10.5px; line-height: 1.6; color: #92400e; }
.vf-vmain { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.vf-vsrc { font-size: 11px; color: var(--text-muted); }
.vf-note { margin-top: 6px; font-size: 11px; line-height: 1.65; color: var(--text-secondary); }
.vf-chain { display: flex; flex-direction: column; gap: 6px; }
.vf-chain-row { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px;
  border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius-md);
  background: var(--bg-surface); }
.vf-chain-row.is-ok { border-left-color: var(--success); }
.vf-chain-row.is-gap { border-left-color: var(--warning); }
.vf-chain-i { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-subtle);
  border: 1px solid var(--border); font-size: 10px; font-weight: 600; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center; }
.vf-chain-b { flex: 1; min-width: 0; }
.vf-chain-t { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.vf-chain-d { margin-top: 2px; font-size: 11px; line-height: 1.6; color: var(--text-secondary); }
.vf-chain-s { flex-shrink: 0; font-size: 10px; font-weight: 600; }
.vf-chain-row.is-ok .vf-chain-s { color: var(--success); }
.vf-chain-row.is-gap .vf-chain-s { color: var(--warning); }
.vf-prompt { margin-bottom: 9px; padding: 9px 11px; border-radius: var(--radius-md);
  background: var(--primary-soft); border: 1px solid #c7d2fe; }
.vf-prompt .k { display: block; font-size: 10px; font-weight: 600; color: var(--primary);
  margin-bottom: 4px; }
.vf-prompt code { font-size: 11px; line-height: 1.65; color: var(--text-primary); word-break: break-all; }
.vf-pre { font-size: 11px; line-height: 1.8; color: var(--text-primary); white-space: pre-wrap;
  word-break: break-word; padding: 11px 13px; border-radius: var(--radius-md);
  background: var(--bg-subtle); border: 1px solid var(--border); max-height: 360px; overflow-y: auto; }
.vf-kv { display: flex; align-items: baseline; gap: 10px; padding: 5px 0;
  border-bottom: 1px dashed var(--border); font-size: 11px; }
.vf-kv .k { flex-shrink: 0; width: 92px; color: var(--text-muted); }
.vf-kv .v { flex: 1; min-width: 0; color: var(--text-primary); word-break: break-all; }
.vf-exp { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 6px; }
.vf-exp-t { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.vf-exp-d { margin-top: 3px; font-size: 11px; line-height: 1.6; color: var(--text-secondary); }
.vf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
