/* ============================================================
   全域营销版块 CSS — 品牌品类销售看板 + 品牌人群资产
   适配 tmall-scraper 主项目设计体系（base.css + components.css）
   ============================================================ */

/* --- 页面容器 --- */
.cross-page-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.cross-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.cross-page-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.cross-page-tags {
  display: flex;
  gap: 8px;
}

.cross-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.cross-tag-primary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.cross-tag-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* --- KPI 卡片行 --- */
.cross-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.cross-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.cross-kpi-card:hover {
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
  transform: translateY(-1px);
}

.cross-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cross-kpi-title {
  font-size: 12px;
  color: #888;
  font-weight: 500;
}

.cross-kpi-mom {
  font-size: 11px;
  font-weight: 600;
}

.cross-kpi-mom.up {
  color: #22c55e;
}

.cross-kpi-mom.down {
  color: #ef4444;
}

.cross-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
  line-height: 1.2;
}

.cross-kpi-sub {
  font-size: 11px;
  color: #aaa;
  line-height: 1.4;
}

/* --- 图表行 --- */
.cross-chart-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.cross-chart-box {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
}

.cross-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.cross-chart-body {
  width: 100%;
}

/* --- 表格卡片 --- */
.cross-table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  margin-bottom: 20px;
  overflow: hidden;
}

/* ============================================================
   全局统一视觉规范（补齐各版块未定义类）
   ============================================================ */

/* 页面标题行统一 */
.cross-page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.cross-page-title-row h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cross-page-desc {
  font-size: 12px;
  color: #888;
  margin: 0;
}

/* 区块标题统一 */
.cross-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.cross-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding: 14px 18px;
  border-bottom: 1px solid #f0eef8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 通用表格统一 */
.cross-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cross-table thead th {
  background: #f8f9fc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  border-bottom: 2px solid #f0eef8;
  white-space: nowrap;
}
.cross-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid #f8f8f8;
  color: #333;
}
.cross-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.03);
}
.cross-table .text-right {
  text-align: right;
}

/* 图表面板统一 */
.cross-chart-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  padding: 16px;
  margin-bottom: 16px;
}

/* KPI 行变体统一 */
.cross-kpi-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.cross-kpi-row-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* KPI 徽章标签统一 */
.cross-kpi-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* 状态徽章统一 */
.badge-green,
.badge-success {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.badge-yellow,
.badge-warning {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.badge-blue,
.badge-info {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(102, 126, 234, 0.12);
  color: #667eea;
}
.badge-gray,
.badge-default {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
}

/* 通用按钮统一 */
.cross-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.cross-btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}
.cross-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.cross-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 标签变体统一 */
.cross-tag-info {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}
.cross-tag-green {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* M1 导入页统计卡片值统一 */
.m1-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
}

/* D0 上传网格统一 */
.d0-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.d0-upload-card {
  background: #f8faff;
  border: 1px solid #e0e8f8;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.d0-upload-card:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.04);
  transform: translateY(-1px);
}
.d0-upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.d0-upload-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}
.d0-upload-desc {
  font-size: 11px;
  color: #888;
}

/* 抖音 D0 KPI 标签修正 */
.cross-kpi-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
}
.cross-kpi-change {
  font-size: 11px;
  font-weight: 600;
}

/* M1 宽卡片修正 */
.m1-import-card--wide {
  grid-column: 1 / -1;
}

/* 平台颜色变量统一 */
:root {
  --taobao-primary: #667eea;
  --douyin-primary: #06b6d4;
  --up-color: #22c55e;
  --down-color: #ef4444;
}

.cross-table-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding: 14px 18px;
  border-bottom: 1px solid #f0eef8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cross-filter-select {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #e0e8f8;
  border-radius: 6px;
  background: #fafbff;
  color: #555;
  outline: none;
}

.cross-table-wrap {
  overflow-x: auto;
  padding: 0;
}

.cross-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cross-data-table thead th {
  background: #f8f9fc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  border-bottom: 2px solid #f0eef8;
  white-space: nowrap;
}

.cross-data-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid #f8f8f8;
  color: #333;
}

.cross-data-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.03);
}

.cross-data-table .text-right {
  text-align: right;
}

.cross-table-summary {
  background: rgba(102, 126, 234, 0.04);
}

.cross-table-summary td {
  font-weight: 600;
  color: #333;
}

/* --- 徽章 --- */
.cross-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* --- 人群画像网格 --- */
.cross-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 8px 0;
}

.cross-profile-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cross-profile-label {
  font-size: 11px;
  color: #888;
  font-weight: 500;
}

.cross-profile-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.cross-profile-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.cross-profile-val {
  font-size: 12px;
  color: #333;
  font-weight: 600;
}

/* --- AI 洞察 --- */
.cross-ai-insight {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.cross-ai-insight-title {
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 12px;
}

.cross-ai-insight-body ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.cross-ai-insight-body li {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

/* --- 响应式 --- */
@media (max-width: 1280px) {
  .cross-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .cross-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .cross-chart-row {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .cross-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* 京东采集：与天猫采集页统一的宽屏阅读结构 */
.jd-page { padding-bottom: 28px; }
.jd-page .cross-page-header { margin-bottom: 14px; }
.jd-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; align-items:start; }
.jd-card { background:#fff; border:1px solid #e3e8f3; border-radius:14px; padding:18px 20px; box-shadow:0 2px 8px rgba(47,55,91,.05); }
.jd-card + .jd-card { margin-top:16px; }
.jd-section-title { display:flex; align-items:center; gap:8px; margin:0 0 14px; font-size:16px; font-weight:700; color:#20263a; }
.jd-section-title::before { content:""; width:4px; height:17px; border-radius:4px; background:linear-gradient(180deg,#667eea,#764ba2); }
.jd-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.jd-input { width:100%; border:1px solid #d7def0; border-radius:10px; padding:11px 13px; background:#fbfcff; box-sizing:border-box; outline:none; font:inherit; }
.jd-input:focus { border-color:#667eea; box-shadow:0 0 0 3px rgba(102,126,234,.10); background:#fff; }
textarea.jd-input { min-height:120px; resize:vertical; line-height:1.65; }
.jd-help { margin-top:10px; padding:10px 12px; border:1px solid #f2d39b; border-radius:9px; background:#fff9ed; color:#8a641e; font-size:12px; line-height:1.65; }
.jd-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
.jd-field { display:flex; flex-direction:column; gap:6px; color:#596277; font-size:12px; }
.jd-field input,.jd-field select { width:100%; border:1px solid #d7def0; border-radius:8px; padding:9px 10px; background:#fff; box-sizing:border-box; }
.jd-actions { display:flex; gap:10px; margin-top:16px; }
.jd-primary { flex:1; min-height:44px; border:0!important; border-radius:10px!important; color:#fff!important; font-weight:700!important; background:linear-gradient(135deg,#667eea,#764ba2)!important; box-shadow:0 6px 14px rgba(102,126,234,.20); }
.jd-secondary { min-height:44px; border:1px solid #d9dfed!important; border-radius:10px!important; background:#f7f9fd!important; color:#667085!important; }
.jd-status { padding:12px 14px; border-radius:10px; background:#f4f6fd; color:#596277; font-size:13px; line-height:1.65; }
.jd-results-card { margin-top:18px; }
.jd-fields-box { max-height:340px; overflow:auto; padding:12px; border:1px solid #e4e8f2; border-radius:10px; background:#fafbff; }
.jd-search-bar { display:grid; grid-template-columns:minmax(260px,1fr) 110px 110px 145px 90px 110px; gap:9px; align-items:center; }
.jd-search-bar .jd-primary { min-height:40px; }
.jd-summary-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.jd-summary-item { padding:10px 12px; border-radius:9px; background:#f7f8fd; color:#697386; font-size:12px; }
.jd-summary-item b { display:block; margin-top:3px; color:#222a3e; font-size:15px; }
@media (max-width:1100px) { .jd-workspace{grid-template-columns:1fr;} .jd-search-bar{grid-template-columns:1fr 1fr;} }
@media (max-width:680px) { .jd-form-grid,.jd-summary-strip,.jd-search-bar{grid-template-columns:1fr;} .jd-card{padding:15px;} }

/* 京东分析：沿用天猫分析的信息层级，按京东独立字段渲染 */
.jd-analysis-page .jd-results-card{background:#f8faff;border-color:#e5e9f5}.jd-analysis-page #jdAnalysisResult{display:flex;flex-direction:column;gap:16px}
.jd-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.jd-kpi{min-height:88px;padding:15px 17px;border-radius:11px;color:#fff;display:flex;flex-direction:column;justify-content:center;box-shadow:0 5px 14px rgba(77,89,150,.12)}.jd-kpi span{font-size:12px;opacity:.9}.jd-kpi b{font-size:22px;margin-top:6px;line-height:1.15}.jd-kpi small{font-size:11px;margin-top:5px;opacity:.85}.jd-kpi-0{background:linear-gradient(135deg,#627eea,#6c62d5)}.jd-kpi-1{background:linear-gradient(135deg,#7450b7,#9256bf)}.jd-kpi-2{background:linear-gradient(135deg,#139e94,#2bb3a8)}.jd-kpi-3{background:linear-gradient(135deg,#2bdca1,#3be873)}.jd-kpi-4{background:linear-gradient(135deg,#df74e9,#ef8be8)}.jd-kpi-5{background:linear-gradient(135deg,#ef5573,#fb6c7e)}
.jd-analysis-section{background:#fff;border:1px solid #e1e7f2;border-radius:12px;padding:16px 18px;box-shadow:0 2px 8px rgba(51,66,110,.035)}.jd-analysis-section>h3{font-size:15px;color:#242a3d;margin:0 0 12px;padding-left:10px;border-left:3px solid #667eea}.jd-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.jd-chart-card{background:#fff;border:1px solid #e1e7f2;border-radius:12px;padding:14px}.jd-chart-card h4{margin:0 0 4px;font-size:14px;color:#30364b}.jd-chart{width:100%;height:290px}.jd-quantile-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.jd-quantile-grid>div{text-align:center;padding:15px 8px;border:2px solid #667eea;border-radius:10px;background:#fff}.jd-quantile-grid>div:nth-child(2){border-color:#8453bb}.jd-quantile-grid>div:nth-child(3){border-color:#19a99d}.jd-quantile-grid>div:nth-child(4){border-color:#e56de0}.jd-quantile-grid>div:nth-child(5){border-color:#f05c72}.jd-quantile-grid span,.jd-quantile-grid small{display:block;font-size:11px;color:#7b8497}.jd-quantile-grid b{display:block;font-size:18px;color:#28304a;margin:7px 0}.jd-insight{padding:15px 18px;border-radius:10px;background:linear-gradient(135deg,#f0faee,#f5fbdf);color:#4b5b48;line-height:1.9;border:1px solid #e0efd8}.jd-analysis-page .cross-table th{background:#f0f2fb;color:#48506b}.jd-analysis-page .cross-table td{vertical-align:middle}
@media(max-width:900px){.jd-chart-grid{grid-template-columns:1fr}.jd-quantile-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.jd-kpi-grid,.jd-quantile-grid{grid-template-columns:1fr}.jd-chart{height:240px}}

/* ============================================================
   新增页面专属样式 — X1/X2/X4/X5/X6/X7/X8
   ============================================================ */

/* --- 策略矩阵表格 --- */
.cross-tag-warn { background: rgba(245,158,11,0.12); color: #d97706; }
.cross-link { color: #667eea; text-decoration: none; }
.cross-link:hover { text-decoration: underline; }

/* --- 生命周期卡片 --- */
.cross-lifecycle-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.lifecycle-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
}
.lifecycle-icon { font-size: 32px; flex-shrink: 0; }
.lifecycle-name { font-size: 15px; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.lifecycle-cats { font-size: 12px; color: #666; margin-bottom: 6px; }
.lifecycle-desc { font-size: 12px; color: #888; line-height: 1.5; }

/* --- 策略类型卡片（X5 品类策略库） --- */
.cross-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.strategy-type-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 16px;
  transition: box-shadow 0.2s;
}
.strategy-type-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.strategy-type-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.strategy-type-icon { font-size: 28px; }
.strategy-type-name { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.strategy-type-cats { font-size: 11px; color: #888; }
.strategy-type-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #555; margin-bottom: 6px; }
.strategy-type-ratio { font-size: 12px; color: #888; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e8ecf1; }

/* --- 策略 JSON 代码块 --- */
.cross-strategy-json {
  background: #1a1a2e;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  max-height: 420px;
}
.cross-strategy-json pre {
  margin: 0;
  font-family: 'Consolas','Monaco',monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* --- 策略规则网格 --- */
.cross-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.rule-card {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 16px;
}
.rule-card-title { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 10px; }
.rule-card-list { margin: 0; padding-left: 18px; font-size: 12px; color: #555; line-height: 1.8; }

/* --- 归因模型选择器 --- */
.cross-attribution-selector {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.cross-attribution-btn {
  padding: 6px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}
.cross-attribution-btn.active,
.cross-attribution-btn:hover {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

/* --- 数据可信度分级 --- */
.cross-credibility-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.credibility-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
}
.credibility-item.high { background: #f0fdf4; border: 1px solid #bbf7d0; }
.credibility-item.mid  { background: #fefce8; border: 1px solid #fef08a; }
.credibility-item.low  { background: #fef2f2; border: 1px solid #fecaca; }
.credibility-icon { font-size: 20px; flex-shrink: 0; }
.credibility-title { font-size: 13px; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.credibility-desc { font-size: 11px; color: #666; line-height: 1.5; }

/* --- 归因方法论卡片 --- */
.cross-method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.method-card {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 16px;
}
.method-card-title { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 6px; }
.method-card-desc { font-size: 12px; color: #666; line-height: 1.6; }

/* --- AI 报告 --- */
.cross-ai-report {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}
.ai-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-report-badge {
  background: rgba(255,255,255,0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ai-report-time { font-size: 11px; opacity: 0.85; }
.ai-report-body { padding: 20px; }
.ai-report-section { margin-bottom: 18px; }
.ai-report-section:last-child { margin-bottom: 0; }
.ai-report-section-title { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 8px; }
.ai-report-section p { font-size: 13px; color: #555; line-height: 1.7; margin: 0 0 6px 0; }

/* --- AI 策略建议列表 --- */
.ai-suggestion-list { display: flex; flex-direction: column; gap: 10px; }
.ai-suggestion-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: #f8fafc; border-radius: 8px; }
.ai-suggestion-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #667eea; color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ai-suggestion-content { flex: 1; }
.ai-suggestion-title { font-size: 13px; color: #1a1a2e; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ai-suggestion-impact { font-size: 11px; color: #888; }

/* --- 预算优化建议列表 --- */
.cross-optimization-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.optimization-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; background: #f8fafc; border: 1px solid #e8ecf1; border-radius: 8px;
}
.optimization-icon { font-size: 20px; flex-shrink: 0; }
.optimization-title { font-size: 13px; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.optimization-desc { font-size: 11px; color: #666; }

/* --- 响应式扩展 --- */
@media (max-width: 1280px) {
  .cross-lifecycle-row { grid-template-columns: repeat(2, 1fr); }
  .cross-strategy-grid { grid-template-columns: repeat(2, 1fr); }
  .cross-rules-grid { grid-template-columns: 1fr; }
  .cross-method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cross-lifecycle-row { grid-template-columns: 1fr; }
  .cross-strategy-grid { grid-template-columns: 1fr; }
  .cross-attribution-selector { flex-direction: column; }
}

/* ============================================================
   淘系竞争情报模块样式 — M1/M2/M11/M12
   ============================================================ */

/* --- M1 数据导入中心 --- */
.m1-import-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.m1-import-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.m1-import-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.m1-import-card-icon {
  font-size: 36px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border-radius: 12px;
  flex-shrink: 0;
}
.m1-import-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m1-import-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}
.m1-import-card-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}
.m1-import-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #999;
}
.m1-import-card-badge {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}
.m1-import-card-badge.green { background: #e8f5e9; color: #2e7d32; }
.m1-import-card-badge.blue { background: #e3f2fd; color: #1565c0; }
.m1-import-card-badge.purple { background: #f3e5f5; color: #6a1b9a; }
.m1-import-card-badge.orange { background: #fff3e0; color: #e65100; }
.m1-import-card-badge.red { background: #fce4ec; color: #c62828; }
.m1-import-btn {
  margin-top: 8px;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}
.m1-import-btn:hover {
  background: #f0f4ff;
  border-color: #667eea;
  color: #667eea;
}

/* M1 统计概览 */
.m1-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.m1-stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.m1-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
}
.m1-stat-label {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* M1 历史筛选 */
.m1-history-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.m1-history-filters select {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  background: #fff;
}
.m1-type-tag {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.m1-type-wanxiangtai { background: #e8f5e9; color: #2e7d32; }
.m1-type-dmp { background: #e3f2fd; color: #1565c0; }
.m1-type-search_ad { background: #f3e5f5; color: #6a1b9a; }
.m1-type-inventory { background: #fff3e0; color: #e65100; }
.m1-type-sync { background: #e0f2f1; color: #00695c; }
.m1-type-manual { background: #f5f5f5; color: #616161; }
.m1-status-tag {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.m1-status-success { background: #e8f5e9; color: #2e7d32; }
.m1-status-processing { background: #e3f2fd; color: #1565c0; }
.m1-status-failed { background: #fce4ec; color: #c62828; }
.m1-status-pending { background: #fff3e0; color: #e65100; }
.m1-action-link {
  color: #667eea;
  font-size: 13px;
  text-decoration: none;
  margin-right: 8px;
}
.m1-action-link:hover { text-decoration: underline; }
.m1-action-retry { color: #f59e0b; }

/* --- M2 投放健康诊断 --- */
.m2-score-card {
  position: relative;
}
.m2-score-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
}
.m2-score-text {
  position: absolute;
  text-align: center;
}
.m2-score-number {
  font-size: 36px;
  font-weight: 700;
  color: #4CAF50;
  line-height: 1;
}
.m2-score-label {
  font-size: 14px;
  color: #999;
}
.m2-score-breakdown {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}
.m2-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.m2-dot.red { background: #f44336; }
.m2-dot.yellow { background: #ff9800; }

/* M2 漏斗 */
.m2-funnel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
}
.m2-funnel-item {
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 6px;
  padding: 10px 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 80px;
  transition: width 0.3s;
}
.m2-funnel-label { font-size: 13px; font-weight: 500; }
.m2-funnel-val { font-size: 13px; font-weight: 700; }

/* M2 热力图 */
.m2-heatmap {
  overflow-x: auto;
}

/* M2 诊断表格 */
.m2-status {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.m2-status-good { background: #e8f5e9; color: #2e7d32; }
.m2-status-warn { background: #fff8e1; color: #f57f17; }
.m2-status-bad { background: #fce4ec; color: #c62828; }
.m2-cell-up { color: #2e7d32; font-weight: 600; }
.m2-cell-down { color: #c62828; font-weight: 600; }

/* M2 AI 洞察 */
.m2-ai-insights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m2-ai-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.m2-ai-item p { margin: 4px 0 0; color: #666; }
.m2-ai-good { background: #e8f5e9; border-left: 3px solid #4CAF50; }
.m2-ai-warn { background: #fff3e0; border-left: 3px solid #FF9800; }
.m2-ai-info { background: #e3f2fd; border-left: 3px solid #2196F3; }
.m2-ai-icon { font-size: 20px; flex-shrink: 0; }

/* --- M11 关键词效率 --- */
.m11-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m11-suggest-group {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.m11-suggest-group-title {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
.m11-suggest-group-title.add { background: #e8f5e9; color: #2e7d32; }
.m11-suggest-group-title.cut { background: #fce4ec; color: #c62828; }
.m11-suggest-group-title.watch { background: #fff8e1; color: #f57f17; }
.m11-suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
}
.m11-suggest-kw { font-weight: 500; color: #333; flex: 1; }
.m11-suggest-roi { font-weight: 600; margin: 0 12px; }
.m11-suggest-roi.up { color: #2e7d32; }
.m11-suggest-roi.down { color: #c62828; }
.m11-suggest-action { color: #667eea; font-size: 12px; }

/* M11 关键词状态标签 */
.m11-status {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.m11-status-star { background: #e8f5e9; color: #2e7d32; }
.m11-status-good { background: #e3f2fd; color: #1565c0; }
.m11-status-warn { background: #fff8e1; color: #f57f17; }
.m11-status-bad { background: #fce4ec; color: #c62828; }
.m11-action-link {
  color: #667eea;
  font-size: 12px;
  text-decoration: none;
}
.m11-action-link:hover { text-decoration: underline; }
.m11-action-cut { color: #c62828; }

/* M11 长尾词 */
.m11-longtail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m11-longtail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.2s;
}
.m11-longtail-item:hover { border-color: #667eea; }
.m11-longtail-kw {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}
.m11-longtail-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}
.m11-longtail-btn {
  padding: 4px 12px;
  border: 1px solid #667eea;
  border-radius: 6px;
  background: #fff;
  color: #667eea;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.m11-longtail-btn:hover { background: #667eea; color: #fff; }

/* --- M12 商品投放效率 --- */
.m12-budget-detail {
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m12-budget-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}
.m12-budget-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* M12 评分 */
.m12-score {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.m12-score-a { background: #e8f5e9; color: #2e7d32; }
.m12-score-b { background: #e3f2fd; color: #1565c0; }
.m12-score-c { background: #fff8e1; color: #f57f17; }
.m12-score-d { background: #fce4ec; color: #c62828; }

/* M12 建议标签 */
.m12-suggest {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.m12-suggest-up { color: #2e7d32; }
.m12-suggest-keep { color: #1565c0; }
.m12-suggest-watch { color: #f57f17; }
.m12-suggest-down { color: #c62828; }

/* ============================================================
   淘系 M14 / M15 + 抖音 D7 字体与卡片统一
   ============================================================ */

/* --- M14 决策与执行中心 --- */
.m14-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.m14-decision-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  transition: all 0.2s ease;
}
.m14-decision-card:hover {
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
}
.m14-decision-card.m14-urgent {
  border-left: 4px solid #ef4444;
}
.m14-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.m14-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.m14-badge-red { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.m14-badge-yellow { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.m14-badge-blue { background: rgba(102, 126, 234, 0.12); color: #667eea; }
.m14-card-type {
  font-size: 12px;
  color: #888;
}
.m14-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.4;
}
.m14-card-body {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}
.m14-card-impact {
  font-size: 12px;
  color: #667eea;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(102, 126, 234, 0.04);
  border-radius: 6px;
}
.m14-card-actions {
  display: flex;
  gap: 8px;
}
.m14-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #f8f8f8;
}
.m14-checklist-item:last-child { border-bottom: none; }
.m14-checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #667eea;
  flex-shrink: 0;
}

/* M14 异常诊断 */
.m14-anomaly-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.03), rgba(245, 158, 11, 0.03));
  border: 1px solid rgba(239, 68, 68, 0.15);
}
.m14-anomaly-badge {
  background: #ef4444;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.m14-anomaly-meta {
  color: #666;
  font-size: 13px;
}
.m14-anomaly-title {
  font-size: 14px;
  color: #1a1a2e;
  font-weight: 600;
  margin-bottom: 8px;
}
.m14-anomaly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
  color: #555;
}
.m14-anomaly-conclusion {
  margin-top: 12px;
  padding: 12px;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
.m14-anomaly-conclusion strong { color: #1a1a2e; }

/* --- M15 AI 分析报告 --- */
.m15-report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.m15-report-tab {
  padding: 8px 16px;
  border: 1px solid #e0e8f8;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}
.m15-report-tab:hover {
  background: rgba(102, 126, 234, 0.04);
  border-color: #667eea;
  color: #667eea;
}
.m15-report-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-color: transparent;
}
.m15-report-content {
  margin-bottom: 16px;
}
.m15-report-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  overflow: hidden;
}
.m15-report-meta {
  padding: 12px 16px;
  background: #f8f9fc;
  border-bottom: 1px solid #f0eef8;
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.m15-report-body {
  padding: 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}
.m15-report-body h3 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 16px 0 10px;
}
.m15-report-body h3:first-child { margin-top: 0; }
.m15-report-body ol,
.m15-report-body ul {
  margin: 0;
  padding-left: 20px;
}
.m15-report-body li {
  margin-bottom: 6px;
  color: #555;
}
.m15-report-body p {
  margin: 0 0 8px;
}
.m15-report-body strong {
  color: #1a1a2e;
}
.m15-report-footer {
  text-align: right;
  padding: 12px 16px;
  border-top: 1px solid #f0eef8;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- D7 抖音决策中心 - 跟品预警 --- */
.d7-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.d7-alert-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  background: #fff;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.06);
  transition: all 0.2s ease;
}
.d7-alert-card:hover {
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
}
.d7-alert-card.d7-alert-red { border-left: 4px solid #ef4444; background: rgba(239, 68, 68, 0.02); }
.d7-alert-card.d7-alert-yellow { border-left: 4px solid #f59e0b; background: rgba(245, 158, 11, 0.02); }
.d7-alert-card.d7-alert-green { border-left: 4px solid #22c55e; background: rgba(34, 197, 94, 0.02); }
.d7-alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.d7-alert-content { flex: 1; }
.d7-alert-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.d7-alert-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}
.d7-alert-action {
  font-size: 12px;
  color: #667eea;
  font-weight: 500;
  padding: 8px 10px;
  background: rgba(102, 126, 234, 0.04);
  border-radius: 6px;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .m14-decision-grid { grid-template-columns: 1fr; }
  .d7-alert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .m1-stats-row { grid-template-columns: repeat(2, 1fr); }
  .m1-import-cards { grid-template-columns: 1fr; }
  .m15-report-tabs { flex-direction: column; }
  .m15-report-tab { text-align: center; }
  .d7-alert-grid { grid-template-columns: 1fr; }
  .m14-anomaly-grid { grid-template-columns: 1fr; }
}
