/* 魔图 motu · 产品数据库大表格样式（独立项目，自带 base token，不依赖外部）
 * 品牌：品红→紫（与 AI魔手 内魔图预览一致）。配置/设置不进表格。
 */

:root {
  --text-primary: #1D2129; --text-secondary: #4B5563; --text-tertiary: #8C8C8C;
  --bg-primary: #F5F7FA; --bg-secondary: #FFFFFF; --bg-tertiary: #EEF1F5;
  --border-subtle: #E8E8E8; --border-lighter: #F0F0F0;
  --color-success: #00B67A; --color-warning: #FFA940; --color-danger: #FF4D4F;

  --mt-accent: #EC4899; --mt-accent-2: #7C3AED;
  --mt-gradient: linear-gradient(135deg, #EC4899 0%, #7C3AED 100%);
  --mt-accent-soft: rgba(236, 72, 153, .12);
  --mt-accent-soft-2: rgba(124, 58, 237, .10);
  --mt-focus-ring: 0 0 0 3px rgba(236, 72, 153, .15);
  --mt-radius-md: 10px; --mt-radius-lg: 14px; --mt-radius-full: 9999px;
  --mt-shadow-card: 0 2px 12px rgba(0, 0, 0, .06);
  --mt-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --mt-success-bg: rgba(0, 182, 122, .1); --mt-warning-bg: rgba(255, 169, 64, .12); --mt-danger-bg: rgba(255, 77, 79, .1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100vh; background: var(--bg-primary); color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}
.mt-app { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }

/* —— 页头 —— */
.mt-head h1 { font-size: 20px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.mt-head .mt-badge-gradient { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 9px; border-radius: var(--mt-radius-full); background: var(--mt-gradient); }
.mt-head .mt-sub { color: var(--text-secondary); font-size: 13px; margin-top: 5px; }
.mt-head .mt-sub b { color: var(--mt-accent-2); }

/* —— 工具条 —— */
.mt-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--mt-radius-md); padding: 10px 14px; box-shadow: var(--mt-shadow-sm);
}
.mt-toolbar .mt-tb-label { font-size: 12px; color: var(--text-tertiary); }
.mt-search {
  display: flex; align-items: center; gap: 6px; background: var(--bg-tertiary);
  border-radius: 8px; padding: 7px 11px; min-width: 200px;
}
.mt-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; color: var(--text-primary); }
.mt-spacer { margin-left: auto; }

.mt-grpchips { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-grpchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: var(--mt-radius-full);
  font-size: 12px; cursor: pointer; user-select: none; border: 1px solid var(--border-subtle);
  background: var(--bg-secondary); color: var(--text-secondary);
}
.mt-grpchip .mt-caret { font-size: 9px; opacity: .7; }
.mt-grpchip.collapsed { background: var(--bg-tertiary); color: var(--text-tertiary); }
.mt-grpchip.on { border-color: var(--mt-accent); color: var(--mt-accent-2); background: var(--mt-accent-soft); }

/* —— 按钮 —— */
.mt-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: .15s;
  background: transparent; color: inherit; white-space: nowrap;
}
.mt-btn-primary { background: var(--mt-gradient); color: #fff; box-shadow: 0 2px 8px rgba(124, 58, 237, .25); }
.mt-btn-primary:hover { filter: brightness(1.06); }
.mt-btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-subtle); }
.mt-btn-secondary:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-mini {
  padding: 5px 10px; font-size: 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border-subtle); background: var(--bg-secondary); color: var(--text-secondary);
}
.mt-mini:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-mini-go { border-color: transparent; background: var(--mt-gradient); color: #fff; }
.mt-mini-go:hover { color: #fff; filter: brightness(1.06); }

/* —— 表格容器（横向滚动 + 冻结列）—— */
.mt-grid-wrap {
  position: relative; overflow: auto; max-height: calc(100vh - 220px);
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--mt-radius-lg); box-shadow: var(--mt-shadow-card);
}
table.mt-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }

/* 表头（两行：列组 + 子列），sticky 顶 */
.mt-grid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle); border-right: 1px solid var(--border-lighter);
  font-weight: 600; font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
.mt-grid thead tr.mt-grouprow th { top: 0; z-index: 4; padding: 8px 10px; text-align: center; }
.mt-grid thead tr.mt-colrow th { top: 35px; z-index: 3; padding: 8px 10px; text-align: left; color: var(--text-tertiary); font-weight: 600; }
.mt-grp-h { display: inline-flex; align-items: center; gap: 7px; }
.mt-grp-h .mt-grp-name { font-weight: 700; color: var(--text-primary); }
.mt-grp-toggle {
  cursor: pointer; user-select: none; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center;
  font-size: 10px; background: var(--bg-secondary); border: 1px solid var(--border-subtle); color: var(--text-secondary);
}
.mt-grp-toggle:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-grp-img .mt-grp-name, .mt-grp-flywheel .mt-grp-name { color: var(--mt-accent-2); }

/* 单元格 */
.mt-grid tbody td {
  position: relative; padding: 8px 10px; vertical-align: middle;
  border-bottom: 1px solid var(--border-lighter); border-right: 1px solid var(--border-lighter);
  background: var(--bg-secondary); white-space: nowrap;
}
.mt-grid tbody tr:hover td { background: #FCFBFD; }

/* 冻结左首列 + 冻结右末列（提高特异性，压过 .mt-grid tbody td 的 position:relative）*/
.mt-grid td.mt-col-fixL, .mt-grid th.mt-col-fixL { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--border-subtle); }
.mt-grid td.mt-col-fixR, .mt-grid th.mt-col-fixR { position: sticky; right: 0; z-index: 2; box-shadow: -1px 0 0 var(--border-subtle); }
.mt-grid thead th.mt-col-fixL, .mt-grid thead th.mt-col-fixR { z-index: 5; }
.mt-grid tbody tr:hover td.mt-col-fixL, .mt-grid tbody tr:hover td.mt-col-fixR { background: #FCFBFD; }

/* —— 基础组：产品/版本 复合单元 —— */
.mt-prodcell { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 280px; }
.mt-prodcell input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--mt-accent); flex: none; }
.mt-prodthumb { width: 44px; height: 44px; border-radius: 8px; flex: none; background: var(--bg-tertiary) center/cover; border: 1px solid var(--border-subtle); }
.mt-prodinfo { min-width: 0; }
.mt-prodname { font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.mt-prodmeta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* 谱系缩进（A+ / A++ 行）*/
.mt-lineage { display: inline-flex; align-items: center; color: var(--text-tertiary); font-size: 12px; }
.mt-fam-sep td { background: var(--bg-tertiary) !important; padding: 5px 12px; font-weight: 700; color: var(--text-secondary); font-size: 12px; position: sticky; left: 0; }

/* 版本徽章 */
.mt-ver { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: var(--mt-radius-full); letter-spacing: .02em; }
.mt-ver-A { background: var(--bg-tertiary); color: var(--text-secondary); }
.mt-ver-Ap { background: var(--mt-accent-soft); color: var(--mt-accent); }
.mt-ver-App { background: var(--mt-accent-2); color: #fff; }

/* 状态徽章 */
.mt-st { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: var(--mt-radius-full); }
.mt-st-origin { background: var(--bg-tertiary); color: var(--text-secondary); }
.mt-st-optimizing { background: var(--mt-accent-soft); color: var(--mt-accent-2); }
.mt-st-review { background: var(--mt-warning-bg); color: #B26A00; }
.mt-st-adopted { background: var(--mt-success-bg); color: var(--color-success); }
.mt-st-listed { background: rgba(24, 144, 255, .12); color: #1769C2; }
.mt-st-failed { background: var(--mt-danger-bg); color: var(--color-danger); }

/* —— 文本/卖点/关键词 —— */
.mt-titlecell { white-space: normal; min-width: 220px; max-width: 300px; line-height: 1.45; }
.mt-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; white-space: normal; }
.mt-tag { font-size: 11px; padding: 1px 7px; border-radius: var(--mt-radius-full); background: var(--bg-tertiary); color: var(--text-secondary); }
.mt-tag-kw { background: var(--mt-accent-soft-2); color: var(--mt-accent-2); }

/* —— 图片格 —— */
.mt-thumb-cell { width: 46px; height: 46px; border-radius: 7px; background: var(--bg-tertiary) center/cover; border: 1px solid var(--border-subtle); cursor: pointer; transition: .12s; }
.mt-thumb-cell:hover { border-color: var(--mt-accent); transform: scale(1.06); box-shadow: var(--mt-shadow-sm); }
.mt-slot-empty {
  width: 46px; height: 46px; border-radius: 7px; border: 1px dashed var(--border-subtle);
  display: grid; place-items: center; color: var(--text-tertiary); font-size: 16px; cursor: pointer; background: #FCFCFD;
}
.mt-slot-empty:hover { border-color: var(--mt-accent); color: var(--mt-accent); }

/* —— 优化结果 —— */
.mt-score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 8px; border-radius: var(--mt-radius-full); font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-score.hi { background: var(--mt-success-bg); color: var(--color-success); }
.mt-score.mid { background: var(--mt-accent-soft); color: var(--mt-accent); }
.mt-score.lo { background: var(--mt-warning-bg); color: #B26A00; }
.mt-dim { color: var(--text-tertiary); }
.mt-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

/* —— 飞轮数据 —— */
.mt-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.mt-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 800; margin-left: 5px; padding: 0 5px; border-radius: var(--mt-radius-full); background: var(--mt-success-bg); color: var(--color-success); }
.mt-flywheel-empty { color: var(--text-tertiary); font-size: 12px; }

/* —— 跑马灯：优化中行的逐组状态（左→右）—— */
@keyframes mt-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.mt-row-optimizing td { background: #FFFCFE; }
.mt-cg-done { background: var(--mt-accent-soft) !important; }
.mt-cg-doing { box-shadow: inset 0 0 0 2px var(--mt-accent); }
.mt-cg-doing::after, .mt-cg-pending::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background-size: 200% 100%;
}
.mt-cg-doing::after { background-image: linear-gradient(90deg, transparent, rgba(236, 72, 153, .25), transparent); animation: mt-shimmer .85s linear infinite; }
.mt-cg-pending::after { background-image: linear-gradient(90deg, transparent, rgba(236, 72, 153, .10), transparent); animation: mt-shimmer 1.3s linear infinite; opacity: .9; }
.mt-cg-pending { color: var(--text-tertiary); }

/* 操作列 */
.mt-ops { display: flex; gap: 6px; }

/* —— 图例 —— */
.mt-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-tertiary); padding: 2px 4px; }
.mt-legend b { color: var(--text-secondary); font-weight: 600; }

/* —— 简易弹层（替换图/详情，mock）—— */
.mt-pop-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: grid; place-items: center; z-index: 999; }
.mt-pop { background: var(--bg-secondary); border-radius: var(--mt-radius-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, .22); padding: 18px; max-width: 360px; }
.mt-pop h3 { margin: 0 0 10px; font-size: 15px; }
.mt-pop .mt-pop-img { width: 100%; aspect-ratio: 1/1; border-radius: 10px; background: var(--bg-tertiary) center/cover; border: 1px solid var(--border-subtle); }
.mt-pop .mt-pop-act { display: flex; gap: 8px; margin-top: 12px; }

/* toast */
#mt-toast { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }

/* ============ AI 模块（新增，表格框架不变）============ */
/* 顶部视图切换 */
.mt-views { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-view-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--mt-radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; transition: .15s;
  background: var(--bg-secondary); border: 1.5px solid var(--border-subtle); color: var(--text-secondary);
}
.mt-view-tab:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-view-tab.active { background: var(--mt-gradient); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(124, 58, 237, .25); }

/* 通用面板 */
.mt-panel { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--mt-radius-lg); box-shadow: var(--mt-shadow-card); padding: 16px 18px; }
.mt-section-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.mt-section-sub { font-size: 12px; color: var(--text-tertiary); margin-bottom: 14px; }
.mt-section-title .mt-num { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; color: #fff; background: var(--mt-gradient); }

/* AI 工具箱：模型卡 */
.mt-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mt-model { border: 1px solid var(--border-subtle); border-radius: var(--mt-radius-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; transition: .15s; }
.mt-model.off { opacity: .55; }
.mt-model-hd { display: flex; align-items: center; gap: 8px; }
.mt-model-name { font-weight: 700; font-size: 13px; }
.mt-model-vendor { font-size: 11px; color: var(--text-tertiary); }
.mt-mtype { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--mt-radius-full); }
.mt-mtype-text { background: rgba(24, 144, 255, .12); color: #1769C2; }
.mt-mtype-vision { background: var(--mt-accent-soft-2); color: var(--mt-accent-2); }
.mt-mtype-image { background: var(--mt-accent-soft); color: var(--mt-accent); }
.mt-caps { display: flex; flex-wrap: wrap; gap: 4px; }

/* 环节配置行 */
.mt-stagecfg { border: 1px solid var(--border-subtle); border-radius: var(--mt-radius-md); padding: 12px 14px; margin-bottom: 10px; }
.mt-stagecfg.off { opacity: .6; background: #FCFCFD; }
.mt-stagecfg-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.mt-stagecfg-name { font-weight: 700; font-size: 14px; }
.mt-stagecfg-desc { font-size: 12px; color: var(--text-tertiary); }
.mt-stagecfg-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; }
@media (max-width: 920px) { .mt-stagecfg-grid { grid-template-columns: 1fr; } }
.mt-fld label { display: block; font-size: 11px; color: var(--text-tertiary); margin-bottom: 5px; }
.mt-select, .mt-input, .mt-textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13px; color: var(--text-primary);
  border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-secondary);
}
.mt-select:focus, .mt-input:focus, .mt-textarea:focus { outline: none; border-color: var(--mt-accent); box-shadow: var(--mt-focus-ring); }
.mt-textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.mt-intents { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-intent { font-size: 12px; padding: 5px 11px; border-radius: var(--mt-radius-full); cursor: pointer; border: 1px solid var(--border-subtle); background: var(--bg-secondary); color: var(--text-secondary); }
.mt-intent.on { border-color: var(--mt-accent); color: var(--mt-accent-2); background: var(--mt-accent-soft); font-weight: 600; }

/* 开关复用 */
.mt-toggle { width: 42px; height: 24px; border-radius: var(--mt-radius-full); background: var(--bg-tertiary); position: relative; cursor: pointer; flex: none; transition: .2s; border: 1px solid var(--border-subtle); }
.mt-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--mt-shadow-sm); transition: .2s; }
.mt-toggle.on { background: var(--mt-gradient); border-color: transparent; }
.mt-toggle.on::after { transform: translateX(18px); }

/* 策略模板卡 */
.mt-tpl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mt-tplcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mt-tplcard { border: 1px solid var(--border-subtle); border-radius: var(--mt-radius-md); padding: 13px 15px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-secondary); }
.mt-tplcard.off { opacity: .55; }
.mt-tplcard-hd { display: flex; align-items: center; gap: 8px; }
.mt-tplcard-name { font-weight: 700; font-size: 13px; }
.mt-stagebadge { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--mt-radius-full); background: var(--bg-tertiary); color: var(--text-secondary); }
.mt-src { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: var(--mt-radius-full); }
.mt-src-人工 { background: rgba(24, 144, 255, .12); color: #1769C2; }
.mt-src-AI生成 { background: var(--mt-accent-soft); color: var(--mt-accent-2); }
.mt-req { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.mt-params { display: flex; flex-wrap: wrap; gap: 5px; }
.mt-param { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--bg-tertiary); color: var(--text-secondary); font-family: ui-monospace, Menlo, Consolas, monospace; }
.mt-tplcard-foot { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.mt-scorebar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-tertiary); overflow: hidden; }
.mt-scorebar i { display: block; height: 100%; background: var(--mt-gradient); }
.mt-tplcard-score { font-size: 12px; font-weight: 800; color: var(--mt-accent-2); font-variant-numeric: tabular-nums; }
.mt-calls { font-size: 11px; color: var(--text-tertiary); }

/* 飞轮说明条 */
.mt-flow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(236, 72, 153, .06), rgba(124, 58, 237, .06));
  border: 1px solid rgba(124, 58, 237, .18); border-radius: var(--mt-radius-md); padding: 10px 14px; margin-bottom: 14px;
}
.mt-flow b { color: var(--mt-accent-2); }
.mt-flow .mt-flow-arrow { color: var(--text-tertiary); }

/* 优化中行的 AI 注解芯片（在产品/版本冻结列内显示，不改表头）*/
.mt-aichip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 1px 6px; border-radius: var(--mt-radius-full); background: var(--mt-accent-soft); color: var(--mt-accent-2); margin-top: 3px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 弹层表单 */
.mt-pop.wide { max-width: 460px; }
.mt-pop .mt-fld { margin-bottom: 10px; }
.mt-pop h3 .mt-stagebadge { vertical-align: middle; }

/* ============ 模型 logo + 流水线 + 接入/导出（新增）============ */
/* 模型 logo 徽标（表格显示哪个模型参与）*/
.mt-mbadge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; color: #fff; font-size: 10px; font-weight: 800; flex: none; vertical-align: middle; line-height: 1; }
.mt-mbadge.anim { animation: mt-badgepulse .9s ease-in-out infinite; }
@keyframes mt-badgepulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, .55); transform: scale(1); } 50% { box-shadow: 0 0 0 5px rgba(236, 72, 153, 0); transform: scale(1.14); } }
.mt-logostrip { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; }
.mt-logostrip-l { font-size: 10px; color: var(--text-tertiary); margin-left: 3px; }
.mt-cell-logo { position: absolute; top: 3px; right: 3px; z-index: 1; pointer-events: none; }

/* 流水线指示条 */
.mt-pipe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.mt-pipe-step { padding: 7px 14px; border-radius: var(--mt-radius-full); background: var(--bg-secondary); border: 1px solid var(--border-subtle); color: var(--text-secondary); cursor: pointer; font-weight: 600; }
.mt-pipe-step.on { background: var(--mt-gradient); color: #fff; border-color: transparent; }
.mt-pipe-arrow { color: var(--text-tertiary); font-weight: 800; }

/* 数据源 / 导出目标 卡片 */
.mt-srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mt-src-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--border-subtle); border-radius: var(--mt-radius-md); padding: 12px 14px; cursor: pointer; transition: .15s; }
.mt-src-card:hover { border-color: var(--mt-accent); }
.mt-src-card.on { border-color: var(--mt-accent); background: var(--mt-accent-soft); }
.mt-src-ic { font-size: 22px; flex: none; line-height: 1.2; }
.mt-src-name { font-weight: 700; font-size: 13px; }
.mt-src-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; line-height: 1.45; }
.mt-ingest-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-lighter); }

/* 小表格（店铺矩阵）*/
.mt-mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-mini-table th { text-align: left; color: var(--text-tertiary); font-size: 12px; font-weight: 600; padding: 8px 10px; background: var(--bg-tertiary); white-space: nowrap; }
.mt-mini-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-lighter); }
.mt-mini-table tr:last-child td { border-bottom: none; }

/* 字段映射表 */
.mt-map-table { width: 100%; border-collapse: collapse; font-size: 13px; max-width: 560px; }
.mt-map-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-lighter); }
.mt-map-table td:first-child { color: var(--text-secondary); white-space: nowrap; }
.mt-map-table td:last-child { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--mt-accent-2); }

/* 多店铺勾选 */
.mt-shop-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-shop-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.mt-shop-pick input { accent-color: var(--mt-accent); }

/* ============ 数据看板（新增）============ */
.mt-vtag { font-size: 11px; font-weight: 700; color: var(--mt-accent-2); background: var(--mt-accent-soft); border-radius: var(--mt-radius-full); padding: 2px 9px; margin-left: 4px; vertical-align: middle; }
.mt-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1080px) { .mt-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .mt-kpis { grid-template-columns: 1fr 1fr; } }
.mt-kpi { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--mt-radius-lg); padding: 14px; box-shadow: var(--mt-shadow-sm); }
.mt-kpi-top { display: flex; align-items: center; gap: 7px; color: var(--text-tertiary); font-size: 12px; }
.mt-kpi-ic { font-size: 16px; }
.mt-kpi-val { font-size: 24px; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.mt-kpi-foot { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

.mt-board-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-board-table th { text-align: left; color: var(--text-tertiary); font-size: 12px; font-weight: 600; padding: 9px 10px; background: var(--bg-tertiary); white-space: nowrap; }
.mt-board-table td { padding: 10px; border-bottom: 1px solid var(--border-lighter); vertical-align: middle; white-space: nowrap; }
.mt-board-table tr:last-child td { border-bottom: none; }
.mt-rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--bg-tertiary); color: var(--text-secondary); }
.mt-rank-1 { background: linear-gradient(135deg, #FFD66B, #F5A623); color: #7a4a00; }
.mt-rank-2 { background: linear-gradient(135deg, #E3E8EF, #B9C2CF); color: #46505e; }
.mt-rank-3 { background: linear-gradient(135deg, #F3C9A8, #D9925E); color: #6b3a16; }
.mt-eff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .mt-eff-grid { grid-template-columns: 1fr 1fr; } }
.mt-eff { background: var(--bg-tertiary); border-radius: var(--mt-radius-md); padding: 12px 14px; }
.mt-eff-k { font-size: 12px; color: var(--text-tertiary); }
.mt-eff-v { font-size: 20px; font-weight: 800; margin-top: 4px; color: var(--mt-accent-2); font-variant-numeric: tabular-nums; }
.mt-board-bar { display: inline-flex; align-items: center; gap: 8px; }
.mt-board-bar .mt-scorebar { width: 70px; }

/* ============ 角色 / 审核（新增）============ */
.mt-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-roles { display: inline-flex; gap: 6px; }
.mt-role { font-size: 12px; padding: 6px 12px; border-radius: var(--mt-radius-full); border: 1px solid var(--border-subtle); background: var(--bg-secondary); color: var(--text-secondary); cursor: pointer; font-weight: 600; }
.mt-role:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-role.on { background: var(--mt-gradient); color: #fff; border-color: transparent; }

/* ============ AI 审核员 / 智能运营（新增）============ */
.mt-goals { display: flex; flex-direction: column; gap: 6px; }
.mt-goal { display: flex; gap: 10px; font-size: 13px; align-items: flex-start; }
.mt-goal-k { font-size: 11px; font-weight: 700; color: var(--mt-accent-2); background: var(--mt-accent-soft); border-radius: 6px; padding: 2px 9px; flex: none; }
.mt-goal-v { color: var(--text-secondary); }
.mt-link { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-link-step { border: 1px solid var(--border-subtle); border-radius: 10px; padding: 8px 10px; min-width: 128px; background: var(--bg-secondary); }
.mt-link-step .mt-ls-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.mt-link-step .mt-ls-note { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; line-height: 1.4; }
.mt-ls-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mt-ls-ok { border-color: rgba(0, 182, 122, .4); } .mt-ls-ok .mt-ls-dot { background: var(--color-success); }
.mt-ls-warn { border-color: rgba(255, 169, 64, .5); } .mt-ls-warn .mt-ls-dot { background: var(--color-warning); }
.mt-ls-doing { border-color: var(--mt-accent); } .mt-ls-doing .mt-ls-dot { background: var(--mt-accent); animation: mt-badgepulse .9s ease-in-out infinite; }
.mt-ls-wait .mt-ls-dot { background: #C9CDD4; }
.mt-decision { display: flex; flex-direction: column; gap: 8px; }
.mt-decision-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; background: var(--bg-tertiary); border-radius: 8px; }
.mt-decision-item .mt-st { flex: none; }
