/* ============================================================
   LumideerAiStudio · 共享设计系统 (common.css)
   所有页面统一引用此文件，不再内联 CSS
   ============================================================ */

/* ===== 设计令牌（Design Tokens）===== */
:root {
  /* ── 颜色 ── */
  --primary:       #667eea;
  --primary-dark:  #5a6fd6;
  --primary-light: #e8f0fe;
  --success:       #28a745;
  --success-light: #e6f4ea;
  --warning:       #ff9800;
  --warning-light: #fff3e0;
  --danger:        #dc3545;
  --danger-light:  #fce8e6;
  --info:          #1557b0;
  --info-light:    #e8f4fd;

  --bg:           #f0f2f5;
  --card:          #ffffff;
  --border:        #e8e8e8;
  --border-light:  #f0f0f0;

  --text:          #1a1a1a;
  --text-secondary:#555;
  --text-muted:    #999;
  --text-placeholder:#bbb;

  /* ── 间距（紧凑化）── */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   12px;
  --sp-lg:   16px;
  --sp-xl:   20px;
  --sp-2xl:  28px;

  /* ── 圆角 ── */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 50%;

  /* ── 阴影 ── */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow-card: 0 1px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 5px 20px rgba(102,126,234,0.2);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.2);

  /* ── 管理端专用 ── */
  --admin-nav-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  --admin-sidebar-bg: #1e293b;
  --admin-sidebar-hover: rgba(255,255,255,0.06);
  --admin-sidebar-active: rgba(102,126,234,0.2);
  --badge-ai: #e8f0fe;  --badge-ai-text: #1a73e8;
  --badge-ir: #e6f4ea;  --badge-ir-text: #137333;
  --badge-hr: #fce8e6;  --badge-hr-text: #c5221f;
  --badge-fin: #fff3e0; --badge-fin-text: #e65100;
  --stat-green: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  --stat-orange: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  --stat-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* ── 门店端专用 ── */
  --store-header-bg: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  --store-sidebar-bg: #fff;
  --store-menu-hover: #f5f7ff;
  --store-menu-active: #e8eaf6;
  --store-menu-active-border: #3949ab;
}

/* ══════════════════════════════════════════════════════════╕
   暗色模式 (body.dark)
   自动覆盖所有 Design Tokens，无需修改页面代码
   ══════════════════════════════════════════════════════════╕ */
body.dark {
  --primary:       #8ea5ff;
  --primary-dark:  #7c93e8;
  --primary-light: #1e2940;
  --success:       #4caf50;
  --success-light: #1a3320;
  --warning:       #ff9800;
  --warning-light: #332414;
  --danger:        #f28b82;
  --danger-light:  #3d1a1a;
  --info:          #8ab4f8;
  --info-light:    #1a2332;
  --bg:           #0f1117;
  --card:          #1c1e26;
  --border:        #2d3040;
  --border-light:  #252830;
  --text:          #e1e3e8;
  --text-secondary:#a0a4b0;
  --text-muted:    #6b6f7c;
  --text-placeholder:#4a4d58;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.3);
  --shadow-card:   0 1px 8px rgba(0,0,0,0.35);
  --shadow-hover:  0 5px 20px rgba(102,126,234,0.15);
  --shadow-modal:  0 20px 60px rgba(0,0,0,0.5);
  --admin-nav-bg:  linear-gradient(135deg, #0a0a14 0%, #0d1322 60%, #071a30 100%);
  --admin-sidebar-bg: #13151c;
  --admin-sidebar-hover: rgba(255,255,255,0.04);
  --admin-sidebar-active: rgba(142,165,255,0.15);
  --badge-ai: #1a2e4a;  --badge-ai-text: #8ab4f8;
  --badge-ir: #1a3320;  --badge-ir-text: #81c995;
  --badge-hr: #3d1a1a;  --badge-hr-text: #f28b82;
  --badge-fin: #332414; --badge-fin-text: #f2a865;
  --stat-green: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  --stat-orange: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
  --stat-purple: linear-gradient(135deg, #5c6bc0 0%, #4527a0 100%);
  --store-sidebar-bg: #1c1e26;
  --store-menu-hover: #252830;
  --store-menu-active: #1e2940;
  --store-menu-active-border: #8ea5ff;
}

/* 暗色模式下特定组件微调 */
body.dark .sidebar { background: var(--admin-sidebar-bg); }
body.dark .sidebar-item:hover { background: var(--admin-sidebar-hover); }
body.dark .sidebar-item.active { background: var(--admin-sidebar-active); }
body.dark .top-nav { box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
body.dark #api-integration-panel { background:#1e2230;border-color:#2d3040;color:#a0a4b0 }
body.dark .tab-content { color: var(--text); }
body.dark table { color: var(--text); }
body.dark table th { background: #1e2230; }
body.dark .btn-outline { color: var(--text-secondary); border-color: var(--border); }
body.dark input, body.dark select, body.dark textarea {
  background: #1c1e26; color: var(--text); border-color: var(--border);
}
body.dark .preview-panel { background: #181a22; }
body.dark .right-panel { background: #181a22; }
body.dark .modal { background: var(--card); }
body.dark #uc-nav { background: #181a22; border-color: var(--border); }
body.dark #uc-nav a { background: #252830; color: var(--text-muted); }
body.dark #uc-nav a:hover, body.dark #uc-nav a.uc-active { background: var(--card); color: var(--primary); }
body.dark #rc-nav { background: #181a22; border-color: var(--border); }
body.dark #rc-nav a { background: #252830; color: var(--text-muted); }
body.dark #rc-nav a:hover, body.dark #rc-nav a.rc-active { background: var(--card); color: var(--primary); }
body.dark .stat-card { background: var(--card); }
body.dark .card { background: var(--card); border-color: var(--border); }
body.dark .pm-run-card { background: var(--card); }
body.dark .pm-step-card { background: #1e2230; border-color: var(--border); }
body.dark .uc-key-card { background: var(--card); border-color: var(--border); }
body.dark .badge-blue { background: var(--info-light); color: var(--info); }

/* ===== 侧边栏折叠按钮(桌面端) ===== */
.sidebar-collapse-btn {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-light);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  z-index: 10;
  transition: 0.2s;
}
.sidebar-collapse-btn:hover { color: var(--primary); background: var(--primary-light); }
@media (min-width:901px) { .sidebar-collapse-btn { display: block; } }

/* 侧边栏收起状态 (桌面端) */
.main-layout.sidebar-collapsed { grid-template-columns: 48px 1fr; }
.main-layout.sidebar-collapsed .sidebar { width: 48px; overflow: hidden; }
.main-layout.sidebar-collapsed .sidebar-section { padding: 0; }
.main-layout.sidebar-collapsed .sidebar-title { display: none; }
.main-layout.sidebar-collapsed .sidebar-section-sep { margin: 2px 8px; }
.main-layout.sidebar-collapsed .sidebar-item {
  justify-content: center; padding: 10px 4px; margin: 0 4px; font-size: 0;
}
.main-layout.sidebar-collapsed .sidebar-item .si-icon { font-size: 18px; margin: 0; }
.main-layout.sidebar-collapsed #api-integration-panel { display: none !important; }
.main-layout.sidebar-collapsed .sidebar-collapse-btn { left: 50%; }
@media (max-width:1200px) {
  .main-layout.sidebar-collapsed { grid-template-columns: 48px 1fr; }
}
/* 占位符 — 确保 @media 块正确闭合 */
/* ══════════════════════════════════════════════════════════ */

/* ===== 全局重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== 页面标题 ===== */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-light);
}
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}
a { text-decoration: none; color: inherit; }

/* ===== 顶部导航 ===== */
.top-nav {
  background: linear-gradient(135deg, #0a0e27 0%, #111640 40%, #1a1f55 100%);
  color: #e4e8f1;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 2px 24px rgba(57,73,171,0.15);
  border-bottom: 1px solid rgba(102,126,234,0.25);
}
.top-nav .logo {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #ffffff;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.top-nav .logo .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7b93ff;
  box-shadow: 0 0 8px rgba(123,147,255,0.7), 0 0 18px rgba(123,147,255,0.35);
}
.top-nav .logo .subtitle {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  margin-left: 2px;
  color: #c8d4ff;
}

/* ── 版本徽章 ── */
.top-nav .hn-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(123,147,255,0.22);
  color: #d4ddff;
  border: 1px solid rgba(123,147,255,0.4);
  line-height: 1.5;
}

/* ── 按钮 ── */
.top-nav .hn-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  line-height: 1.4;
  background: rgba(255,255,255,0.06);
  color: #e0e4f0;
  border: 1px solid rgba(255,255,255,0.18);
}
.top-nav .hn-btn:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.14);
}

/* ── 分隔线 ── */
.top-nav .hn-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.18);
  margin: 0 2px;
  flex-shrink: 0;
}

/* ── 标签/文本 ── */
.top-nav .hn-label {
  font-size: 12px;
  font-weight: 500;
  color: #d8dde8;
  white-space: nowrap;
}
.top-nav .hn-text {
  font-size: 11px;
  color: #c0c8da;
  white-space: nowrap;
}

/* ── 服务器状态 ── */
.top-nav .server-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #d0d6e4;
}

/* ── 门店/用户身份 ── */
.top-nav .hn-identity {
  font-size: 12px;
  font-weight: 500;
  color: #edf0f7;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}
.top-nav .hn-identity:hover { color: #ffffff; }

/* ── 弹性占位 ── */
.top-nav .spacer { flex: 1; }

.server-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #484f58; transition: background 0.3s; }
.server-status-dot.online  { background: #3fb950; box-shadow: 0 0 6px rgba(63,185,80,0.5); }
.server-status-dot.offline { background: #f85149; }
.server-status-dot.checking { background: #d29922; animation: pulse 1s infinite; }

/* ===== 主布局（两栏：侧边栏 + 内容区）v9.4: 去掉无用右预览面板 ===== */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - 52px);
  overflow: hidden;
}
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: var(--sp-md) 0;
}
.sidebar-section { margin-bottom: var(--sp-xs); }
.sidebar-title { padding: var(--sp-sm) var(--sp-lg) 4px; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-section-sep { height: 1px; background: var(--border-light); margin: 4px var(--sp-lg); }
.sidebar-item {
  padding: 10px var(--sp-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: 0.15s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 var(--sp-sm);
}
.sidebar-item:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.sidebar-item .si-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }

/* ===== 内容区 ===== */
.content-area { padding: var(--sp-lg) var(--sp-xl); overflow-y: auto; height: calc(100vh - 52px); }
.container { max-width: 100%; margin: 0 auto; padding: 0; }

/* ===== 右侧预览面板 ===== */
.right-panel { font-size:13px; 
  background: #fafbfc;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  height: calc(100vh - 52px);
  padding: 14px 16px;
}
.right-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.right-panel .preview-section {
  border: 1px solid #eef0f5;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  margin-bottom: var(--sp-sm);
  box-shadow: var(--shadow-sm);
}
.right-panel .preview-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.right-panel .preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}
.right-panel .preview-label {
  color: var(--text-muted);
  font-size: 11px;
}
.right-panel .preview-value {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  text-align: right;
}
.right-panel .preview-value.mono {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
}
.right-panel .preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.right-panel .preview-tag {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.right-panel .preview-tag.active {
  background: var(--primary-light);
  color: var(--primary);
}
.right-panel .preview-tag.inactive {
  background: #f0f0f0;
  color: #999;
}
.right-panel .preview-empty {
  text-align: center;
  color: #ccc;
  padding: 40px 20px;
  font-size: 13px;
}
.right-panel .preview-save-status {
  margin-top: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  font-size: 11px;
  text-align: center;
  transition: all 0.3s;
}
.right-panel .preview-save-status.saved {
  background: var(--success-light);
  color: var(--success);
}
.right-panel .preview-save-status.unsaved {
  background: var(--warning-light);
  color: var(--warning);
}
.right-panel .btn-save-agent {
  width: 100%;
  margin-top: var(--sp-sm);
}
.right-panel .preview-persona-preview {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 6px;
  white-space: pre-wrap;
}

/* ===== Tab 导航栏 ===== */
.tab-bar {
  display: flex;
  gap: var(--sp-sm);
  background: var(--card);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.tab-btn {
  padding: 9px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tab-btn .tab-icon { font-size: 15px; }
.tab-btn:hover { background: var(--primary-light); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: white; border-color: transparent; }

/* ===== 卡片 ===== */
.card { background: var(--card); border-radius: var(--radius-lg); box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid var(--border-light); margin-bottom: var(--sp-md); overflow: hidden; }
.card-header {
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}
.card-header h2 { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: var(--sp-sm); }
.card-header .header-actions { display: flex; gap: var(--sp-sm); align-items: center; }
.card-body { padding: var(--sp-lg); }

/* ===== 表单 ===== */
.form-group { margin-bottom: var(--sp-lg); }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--sp-xs); }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--sp-xs); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--card);
  line-height: 1.5;
  color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.8; padding: 12px 14px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: var(--sp-xs); line-height: 1.6; }
.form-inline { display: flex; gap: var(--sp-sm); align-items: flex-end; flex-wrap: wrap; }

/* ===== 网格 ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-sm); }
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-md);
}

/* ===== 知识库状态卡片 ===== */
.kb-stat-card {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border: 1px solid #e8eaf6;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}
.kb-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(63, 81, 181, 0.12);
  border-color: #c5cae9;
}

/* ===== 统计卡片 ===== */
.stat-card {
  text-align: center;
  padding: var(--sp-md) var(--sp-sm);
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-light);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.stat-card .sub { font-size: 11px; color: #aaa; margin-top: 3px; }

/* ===== 按钮 ===== */
.btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-success  { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #218838; }
.btn-danger   { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled)  { background: #c82333; }
.btn-warning  { background: var(--warning); color: #333; }
.btn-warning:hover:not(:disabled) { background: #e0a800; }
.btn-outline  { background: white; border-color: var(--border); color: var(--text-secondary); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table tr:hover { background: #f9faff; }
.table tr:last-child td { border-bottom: none; }

/* ===== 门店表格优化 ===== */
#stores-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
#stores-table th {
  background: linear-gradient(135deg, #f8f9ff, #f0f3ff);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
#stores-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
#stores-table tr:hover {
  background: linear-gradient(135deg, #f8f9ff, #f0f3ff);
}
#stores-table tr:last-child td {
  border-bottom: none;
}
#stores-table td code {
  background: #f0f4ff;
  padding: 4px 10px;
  border-radius: 6px;
  color: #4a5568;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}
#stores-table td strong {
  color: #1a202c;
  font-weight: 600;
}
#stores-table .btn-xs {
  margin: 0 4px;
  padding: 6px 12px;
  font-size: 12px;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  white-space: nowrap;
}
.badge-blue   { background: var(--primary-light); color: var(--info); }
.badge-green  { background: var(--success-light); color: var(--success); }
.badge-red    { background: var(--danger-light); color: var(--danger); }
.badge-orange { background: var(--warning-light); color: var(--warning); }
.badge-purple { background: #f3e8fd; color: #6a1b9a; }
.badge-gray   { background: var(--bg); color: var(--text-muted); }
.badge-yellow { background: #fffde7; color: #f57f17; }
.badge-pink   { background: #fce4ec; color: #c2185b; }

/* ===== 状态指示点 ===== */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: var(--radius-full);
  margin-right: 5px;
  flex-shrink: 0;
}
.status-dot.success  { background: var(--success); }
.status-dot.failed   { background: var(--danger); }
.status-dot.running  { background: var(--warning); animation: pulse 1s infinite; }
.status-dot.pending  { background: #ddd; }
.status-dot.skipped  { background: #aaa; }

/* ===== 流程节点 ===== */
.flow-node { border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--sp-sm); overflow: hidden; background: var(--card); transition: border-color 0.2s; }
.flow-node:hover { border-color: var(--primary); }
.flow-node-header { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; background: #fafafa; }
.flow-node-header:hover { background: #f0f2ff; }
.flow-node-num { width: 32px; height: 32px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--primary), #764ba2); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.flow-node-info { flex: 1; min-width: 0; }
.flow-node-title { font-size: 14px; font-weight: 700; color: var(--text); }
.flow-node-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.flow-node-arrow { font-size: 12px; color: var(--text-muted); transition: 0.3s; }
.flow-node-body { padding: var(--sp-md) var(--sp-lg); border-top: 1px solid var(--border-light); background: var(--card); }

/* ===== 流程模式 Tab ===== */
.flow-mode { display: none; }
.flow-mode.active { display: block; }
.agent-config-panel { display: none; }
.agent-config-panel.active { display: block; }
.test-result-tab { display: none; }
.test-result-tab.active { display: block; }

/* ===== 配置分段 ===== */
.config-section { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--sp-sm); overflow: hidden; }
.config-section-title { padding: 10px 16px; background: #fafbfc; font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; user-select: none; }
.config-section-title:hover { background: #f0f2ff; }
.config-section-body { padding: 14px 16px; border-top: 1px solid var(--border-light); }

/* ===== Tab 内容面板 (由 index.html 内联样式统一约束) ===== */

/* ===== 智能体子Tab ===== */
.agent-subtab-bar { display:flex;gap:4px;border-bottom:2px solid #e0e0e0;padding-bottom:0;overflow-x:auto;flex:1 }
.agent-subtab-btn { padding:8px 14px;border:none;background:none;font-size:12px;font-weight:500;color:#888;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;white-space:nowrap;transition:all 0.2s }
.agent-subtab-btn:hover { color:var(--primary);border-bottom-color:#c5cae9 }
.agent-subtab-btn.active { color:var(--primary);font-weight:600;border-bottom-color:var(--primary) }
.agent-subtab-content { min-height: 300px; padding-top: var(--sp-md); }

/* ===== 门店覆盖状态栏 ===== */
.store-override-bar {
  padding: var(--sp-sm) 14px;
  margin-top: var(--sp-md);
  background: #fff8e1;
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #8d6e00;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== 字段覆盖标识 ===== */
.field-owner-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.field-owner-badge.inherited { background: var(--bg); color: var(--text-muted); }
.field-owner-badge.overridden { background: var(--primary-light); color: var(--info); }
.inherited-field input, .inherited-field textarea, .inherited-field select { border-color: #e0e0e0; background: #fafafa; }
.overridden-field input, .overridden-field textarea, .overridden-field select { border-color: var(--primary); box-shadow: 0 0 0 1px rgba(102,126,234,0.15); }

/* ===== 分分割线 ===== */
.divider { height: 1px; background: var(--border-light); margin: var(--sp-md) 0; }

/* ===== 加载状态 ===== */
.loading { text-align: center; padding: 40px; color: #bbb; font-size: 13px; }
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

/* ===== Toast 通知 ===== */
#toast-container {
  position: fixed;
  top: 70px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.toast {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: fadeIn 0.3s ease;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--primary); }
.toast.warning { background: var(--warning); color: #333; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  animation: fadeIn 0.25s ease;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 4px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: var(--sp-lg); overflow-y: auto; flex: 1; }
.modal-footer { padding: var(--sp-md) var(--sp-lg); border-top: 1px solid var(--border-light); display: flex; gap: var(--sp-sm); justify-content: flex-end; }

/* ===== 知识库卡片 ===== */
.kb-card {
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s;
  cursor: pointer;
}
.kb-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(102,126,234,0.15); }
.kb-card.selected { border-color: var(--primary); background: var(--primary-light); }
.kb-card .kb-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.kb-card .kb-desc { font-size: 12px; color: var(--text-muted); }
.kb-card .kb-meta { display: flex; gap: var(--sp-sm); margin-top: 8px; font-size: 11px; color: #aaa; align-items: center; }

/* ===== 评分条 ===== */
.score-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-sm); }
.score-bar-label { font-size: 12px; color: var(--text-secondary); width: 90px; flex-shrink: 0; text-align: right; }
.score-bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.score-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.score-bar-value { font-size: 12px; font-weight: 600; width: 36px; text-align: right; }

/* ===== 日志面板 ===== */
.log-panel {
  background: #0d1117;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #c9d1d9;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.8;
}
.log-line { padding: 1px 0; }
.log-info  { color: #79c0ff; }
.log-warn  { color: #e3b341; }
.log-error { color: #f85149; }
.log-success { color: #56d364; }
.log-dim   { color: #6e7681; }
.log-hl    { color: #ffa657; }

/* ===== 热词标签 ===== */
.hotword-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hw-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--primary-light);
  border-radius: var(--radius-xl);
  font-size: 12px;
  color: var(--info);
  font-weight: 500;
}
.hw-tag .del-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 14px; line-height: 1; padding: 0 2px; transition: color 0.15s; }
.hw-tag .del-btn:hover { color: var(--danger); }

/* ===== 向量状态网格 ===== */
.node-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.node-timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), #764ba2);
}
.node-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0 10px 36px;
  position: relative;
}
.node-item .node-dot {
  position: absolute;
  left: 8px; top: 14px;
  width: 16px; height: 16px;
  border-radius: var(--radius-full);
  border: 3px solid white;
  box-shadow: 0 0 0 2px currentColor;
  background: white;
  z-index: 1;
}
.node-item.s-success .node-dot { color: var(--success); background: var(--success); }
.node-item.s-failed  .node-dot { color: var(--danger);  background: var(--danger); }
.node-item.s-running .node-dot { color: var(--warning); background: var(--warning); animation: pulse 1s infinite; }
.node-item.s-skipped .node-dot { color: #aaa; }
.node-item.s-pending .node-dot { color: #ddd; }
.node-body { flex: 1; min-width: 0; }
.node-title { font-size: 13px; font-weight: 600; color: var(--text); }
.node-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.node-output { font-size: 12px; color: var(--text-secondary); margin-top: 6px; background: var(--bg); padding: 6px 10px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; }

/* ===== 提示与内联表单 ===== */
.hint { font-size: 11px; color: var(--text-muted); margin-top: var(--sp-xs); line-height: 1.6; }
.inline-form { display: flex; gap: var(--sp-sm); align-items: flex-end; }

/* ===== 调试面板专用 ===== */
.debug-query-area {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-sm);
  align-items: end;
  margin-bottom: var(--sp-md);
}
.debug-result-card {
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
  animation: fadeIn 0.3s ease;
}
.debug-result-card .score-bar-bg {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(102,126,234,0.07), transparent);
  border-radius: var(--radius-md);
  pointer-events: none;
  transition: width 0.5s ease;
}
.score-circle {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.score-high   { background: var(--success-light); color: var(--success); border: 2px solid var(--success); }
.score-mid    { background: var(--warning-light); color: var(--warning); border: 2px solid var(--warning); }
.score-low    { background: var(--bg); color: var(--text-muted); border: 2px solid var(--border); }
.matched-kw {
  display: inline-block;
  padding: 2px 8px;
  background: var(--warning-light);
  border-radius: 4px;
  font-size: 11px;
  color: var(--warning);
  font-weight: 600;
  margin: 2px 2px;
}

/* ===== 预览面板（右侧面板/预览区通用） ===== */
.preview-section { margin-bottom: var(--sp-md); }
.preview-section-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: var(--sp-sm); display: flex; align-items: center; gap: var(--sp-xs); }
.preview-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border-light); }
.preview-item:last-child { border-bottom: none; }
.preview-label { color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.preview-value { color: var(--text); font-weight: 500; }
.preview-value.mono { font-family: monospace; font-size: 11px; }
.preview-empty { color: var(--text-muted); font-size: 12px; text-align: center; padding: var(--sp-md); }
.preview-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
}
.preview-tag.active { background: var(--primary-light); color: var(--info); }
.preview-tag.inactive { background: var(--bg); color: var(--text-muted); }
.preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-xs); }

/* ===== 上传区域 ===== */
.upload-zone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.upload-zone:hover { background: var(--primary-light); border-color: var(--primary-dark); }
.upload-zone.drag { border-color: var(--primary-dark);background:var(--primary-light) }
.uz-hint { font-size:12px;color:var(--text-muted,#aaa);margin-top:8px }
.uz-icon { font-size:42px;margin-bottom:10px }
.uz-text { font-size:15px;color:var(--text-secondary,#555);font-weight:600 }

/* ===== 提取规则行 ===== */
.extraction-rule-row {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  margin-bottom: var(--sp-md);
  padding: var(--sp-md);
  background: var(--bg);
  border-radius: var(--radius-sm);
}

/* ===== 门店选择器（顶部导航内） ===== */
.store-selector select {
  background: rgba(255,255,255,0.08);
  color: #c9d1d9;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}
.store-selector select:hover { border-color: rgba(255,255,255,0.25); }
.store-selector select:focus { border-color: #58a6ff; }
.store-selector option { background: #161b22; color: #c9d1d9; }

/* ===== 动画 ===== */
@keyframes pulse  { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes spin   { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 管线监控页面样式 ===== */

/* 统计卡片行 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* 录音列表容器 */
.runs-container {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

/* 录音卡片 */
.run-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.run-card:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.run-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.run-id {
  font-family: 'Consolas', monospace;
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
}

.status-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.status-success { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }
.status-skipped { background: #fff8e1; color: #e65100; }
.status-running { background: #fff3cd; color: #856404; }
.status-pending { background: #f0f0f0; color: #666; }

.run-card-body {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.run-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.info-icon {
  font-size: 14px;
}

.info-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-card-footer {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
}

.progress-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.run-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #888;
}

/* DAG监控容器 */
.dag-container {
  display: flex;
  height: 600px;
}

/* DAG左侧边栏 */
.dag-sidebar {
  width: 320px;
  background: #f8f9fa;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
}

.dag-sidebar-header {
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
}

.dag-nodes-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* DAG节点项 */
.dag-node-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dag-node-item:hover {
  border-color: #667eea;
}
.dag-node-item.selected {
  border-color: #667eea;
  background: #f8f9ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}
.dag-node-item.node-failed-highlight {
  border-color: #c62828;
  background: #fff5f5;
}
.dag-node-item.node-failed-highlight:hover {
  border-color: #b71c1c;
  background: #ffebee;
}
.dag-node-item.status-failed {
  border-left: 3px solid #c62828;
}
.dag-node-item.status-skipped {
  border-left: 3px solid #ff9800;
  opacity: 0.75;
}
.dag-node-item.status-skipped:hover {
  opacity: 1;
  border-left-color: #f57c00;
}
.dag-node-item.node-skipped-dim {
  opacity: 0.65;
}
.dag-node-item.node-skipped-dim:hover {
  opacity: 0.9;
}
.dag-node-item.status-success {
  border-left: 3px solid #2e7d32;
}
.dag-node-item.status-running {
  border-left: 3px solid #e65100;
}

.dag-node-item.node-post-failure {
  opacity: 0.5;
  pointer-events: none;
  background: #fafafa;
}

.dag-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  margin-bottom: 4px;
}

.dag-connector .connector-line {
  display: block;
  width: 2px;
  height: 16px;
  background: #c5cae9;
  border-radius: 1px;
}

.dag-connector .connector-arrow {
  font-size: 10px;
  color: #c5cae9;
  margin-top: -2px;
}

.dag-connector-failed .connector-line {
  background: #c62828;
  width: 3px;
  animation: pulse-failed-line 1.5s ease-in-out infinite;
}

.dag-connector-failed .connector-label {
  background: #fff5f5;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ffcdd2;
}

.dag-connector-skipped .connector-line {
  background: #bdbdbd;
  background-image: repeating-linear-gradient(0deg, #bdbdbd 0px, #bdbdbd 4px, transparent 4px, transparent 8px);
  width: 2px;
}

@keyframes pulse-failed-line {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.node-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.node-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.node-info {
  flex: 1;
  min-width: 0;
}

.node-name {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
}

.node-desc {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.node-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.node-duration {
  font-size: 11px;
  color: #888;
}

/* DAG详情区域 */
.dag-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* 信息栏 */
.dag-info-bar {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e8e8e8;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 11px;
  color: #888;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.info-value.status-failed { color: #dc3545; }
.info-value.status-skipped { color: #e65100; }
.info-value.status-success { color: #28a745; }
.info-value.status-running { color: #ffc107; }

/* 统计卡片行 */
.dag-stats-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.stat-card-mini {
  flex: 1;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.stat-card-mini.success { background: #f0fff4; }
.stat-card-mini.danger { background: #fff5f5; }
.stat-card-mini.warning { background: #fffbf0; }

.stat-card-mini .num {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}
.stat-card-mini.success .num { color: #28a745; }
.stat-card-mini.danger .num { color: #dc3545; }
.stat-card-mini.warning .num { color: #ffc107; }

.stat-card-mini .label {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* 详情内容区 */
.dag-detail-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: #ddd;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 13px;
  color: #aaa;
}

/* 节点详情面板 */
.node-detail-panel {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-left: 4px solid #667eea;
}

.detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.detail-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.detail-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.detail-body {
  padding: 16px;
}

.detail-section {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}
.detail-section.error {
  background: #fff5f5;
  border: 1px solid #ffebee;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.result-content {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.error-content {
  font-size: 13px;
  color: #dc3545;
  line-height: 1.6;
}

.meta-info {
  font-size: 13px;
  color: #555;
}

.detail-json {
  font-size: 12px;
  color: #555;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
}

/* 输出内容区域 */
.output-sub-section {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e0e0e0;
}
.output-sub-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.output-sub-title {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  padding: 4px 8px;
  background: #eef1f5;
  border-radius: 4px;
  display: inline-block;
}
.output-content-pre {
  font-size: 12px;
  color: #333;
  background: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* 输出信息网格 */
.output-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.output-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 12px;
}
.output-info-item .info-label {
  color: #888;
  font-weight: 500;
}
.output-info-item .info-value {
  color: #333;
  font-weight: 600;
}

/* 错误分析面板 */
.error-analysis {
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.error-analysis-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ff5252, #ff867f);
  color: #fff;
}

.error-icon {
  font-size: 20px;
}

.error-title {
  font-size: 14px;
  font-weight: 600;
}

.error-analysis-body {
  padding: 16px;
}

.error-main {
  margin-bottom: 14px;
}

.error-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.error-message {
  font-size: 14px;
  color: #c62828;
  line-height: 1.5;
  padding: 10px 14px;
  background: #ffebee;
  border-radius: 6px;
  border-left: 3px solid #ef5350;
}

.error-causes {
  margin-bottom: 14px;
}

.error-cause-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.error-cause-list li {
  margin-bottom: 4px;
}

.error-cause-list li::marker {
  color: #ff7043;
}

.error-suggestions {
  padding: 12px 14px;
  background: #e8f5e9;
  border-radius: 6px;
  border-left: 3px solid #66bb6a;
}

.suggestion-text {
  font-size: 13px;
  color: #2e7d32;
  line-height: 1.5;
}

/* 重试按钮区域 */
.retry-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fffde7;
  border: 1px solid #fff59d;
  border-radius: 8px;
  margin-bottom: 16px;
}

.retry-section .btn-warning {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.retry-section .btn-warning:hover {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.retry-section .btn-warning:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.retry-icon {
  font-size: 16px;
}

.retry-hint {
  font-size: 12px;
  color: #888;
  flex: 1;
}

/* ===== 知识库样式 ===== */
.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  padding: 16px;
  color: white;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 12px;
  opacity: 0.9;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.kb-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  border: 2px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s ease;
}
.kb-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}
.kb-card.selected {
  border-color: #667eea;
  background: #f8f9ff;
}

.kb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.kb-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.kb-badges {
  display: flex;
  gap: 4px;
}
.kb-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.5;
}
.kb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #888;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.kb-count strong {
  color: #667eea;
}
.kb-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

/* 筛选栏 */
.kb-filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  min-width: 140px;
}
.search-group {
  flex: 1;
  min-width: 200px;
}
.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.filter-actions {
  display: flex;
  gap: 6px;
}

/* 表格容器 */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #eee;
}
.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.kb-table th,
.kb-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.kb-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
}
.kb-table th.col-id { width: 80px; }
.kb-table th.col-type { width: 100px; }
.kb-table th.col-weight { width: 80px; text-align: center; }
.kb-table th.col-actions { width: 100px; }
.kb-table tbody tr:hover { background: #f8f9ff; }

/* 结果提示 */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 门店知识库弹窗 */
.store-kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.store-kb-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 1000px) {
  .sidebar { width: 180px; }
  .top-nav .nav-btn { padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .main-layout { grid-template-columns: 1fr; }
  /* v129: 不再 display:none 侧边栏，改为由 index.html 内联样式控制 position:fixed 抽屉式 */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Flow panel internal ===== */
.flow-mode { display: none; }
.flow-mode.active { display: block; }

/* ===== Agent sub-tabs ===== */
.agent-subtab-content { display: block !important; min-height: 300px; padding-top: var(--sp-md); }

/* ════ 右侧预览面板 ════ */
.preview-panel {
  width: 260px;
  min-width: 200px;
  max-width: 360px;
  background: #fff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
}
.preview-panel.collapsed {
  width: 40px;
  min-width: 40px;
}
.preview-panel.collapsed #preview-content,
.preview-panel.collapsed #preview-save-status {
  display: none;
}
#preview-content { flex: 1; overflow-y: auto; min-height: 0; }
#preview-content .preview-empty { text-align: center; padding: 40px 16px; font-size: 13px; }
#preview-content h4 { font-size: 13px; margin: 8px 0 4px; color: #333; }
#preview-content p { margin: 4px 0; font-size: 12px; line-height: 1.5; color: #555; }
#preview-content .preview-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid #f0f0f0; font-size: 11px; }
#preview-content .preview-row .key { color: #888; }
#preview-content .preview-row .val { color: #333; font-weight: 600; }
#preview-content .preview-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 700;
}
#preview-content .preview-badge.ok { background: #e8f5e9; color: #2e7d32; }
#preview-content .preview-badge.warn { background: #fff3e0; color: #e65100; }
#preview-content .preview-badge.err { background: #ffebee; color: #c62828; }

/* ════ 管线监控卡片 ════ */
.pm-run-card {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 11px;
  transition: background 0.15s;
}
.pm-run-card:hover { background: #e8f0fe; }
.pm-run-card.selected { background: #e3f2fd; border-left: 3px solid #1967d2; }
.run-status { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.run-status.ok { background: #e8f5e9; color: #2e7d32; }
.run-status.fail { background: #ffebee; color: #c62828; }
.run-status.pend { background: #fff8e1; color: #e65100; }
.run-id { font-family: monospace; font-size: 10px; color: #888; min-width: 70px; }
.run-store { color: #333; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-scene { color: #555; font-size: 10px; }
.run-score { color: #2e7d32; font-weight: 700; font-size: 12px; margin-left: auto; }
.run-time { color: #aaa; font-size: 9px; text-align: right; min-width: 80px; }

/* ════ 统计卡片 ════ */
.stat-card {
  flex: 1; background: #f8f9fa; border-radius: 8px; padding: 12px; text-align: center;
  border: 1px solid #e0e0e0; min-width: 80px;
}
.stat-card .num { font-size: 24px; font-weight: 700; color: #667eea; }
.stat-card .label { font-size: 11px; color: #888; margin-top: 2px; }
.stat-card.success .num { color: #2e7d32; }
.stat-card.danger .num { color: #c62828; }

/* ════ 管线步骤 ════ */
.pm-step-header { transition: background 0.15s; }
.pm-step-header:hover { background: #f0f0f0 !important; }
.pm-step-card { transition: box-shadow 0.2s; }
.pm-step-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.step-badge.ok { background: #e8f5e9; color: #2e7d32; }
.step-badge.fail { background: #ffebee; color: #c62828; }
.step-badge.skip { background: #fff3e0; color: #e65100; }
.step-badge.pend { background: #f5f5f5; color: #999; }

/* ════ 面板过渡动画 ════ */
.tab-content {
  animation: tabFadeIn 0.2s ease;
}
@keyframes tabFadeIn {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ════ 响应式 ════ */
@media (max-width: 1024px) {
  .preview-panel { display: none !important; }
  .content-area { padding: 12px; }
}

/* ════ Toast 优化 ════ */
#toast-container { position: fixed; top: 60px; right: 16px; z-index: 99999; display: flex; flex-direction: column; gap: 6px; }
.toast-item { padding: 10px 18px; border-radius: 6px; font-size: 13px; color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.15); animation: toastIn 0.3s ease; max-width: 360px; }
.toast-item.success { background: #2e7d32; }
.toast-item.error { background: #c62828; }
.toast-item.warn { background: #e65100; }
.toast-item.info { background: #1967d2; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* ════ 统计面板卡片样式 ════ */
.dash-card {
  background: linear-gradient(135deg,#667eea,#764ba2);
  border-radius: 10px; padding: 18px; color: #fff; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); transition: transform 0.15s;
}
.dash-card:hover { transform: translateY(-2px); }
.dash-card .dc-num { font-size: 30px; font-weight: 700; line-height: 1.2; }
.dash-card .dc-label { font-size: 11px; opacity: 0.85; margin-top: 4px; }
/* ════ 管线监控增强卡片 ════ */
.pm-run-card {
  display: flex; flex-direction: row; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid #f0f0f0; cursor: pointer;
  transition: background 0.15s; font-size: 12px;
}
.pm-run-card:hover { background: #e8f0fe; }
.pm-run-card.selected { background: #e3f2fd; border-left: 3px solid #1967d2; }
.pm-run-card-body { flex: 1; min-width: 0; }
.pm-run-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.pm-run-row2 { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #888; flex-wrap: wrap; }
.run-store { color: #333; font-weight: 700; font-size: 13px; }
.run-customer { color: #667eea; font-weight: 600; font-size: 11px; }
.run-score { color: #2e7d32; font-weight: 700; font-size: 13px; white-space: nowrap; }
.run-dur { color: #e65100; font-weight: 600; font-size: 11px; white-space: nowrap; margin-left: auto; }
.run-scene { font-size: 10px; color: #555; }
.run-id { font-family: monospace; font-size: 10px; color: #999; }
.run-uploader { color: #999; }
.run-file { color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.run-time { color: #aaa; margin-left: auto; white-space: nowrap; }
.run-status { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.run-status.ok { background: #e8f5e9; color: #2e7d32; }
.run-status.fail { background: #ffebee; color: #c62828; }
.run-status.pend { background: #fff8e1; color: #e65100; }
.pm-trace-header { flex-wrap: wrap; }
.pm-agent-card { border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 6px; overflow: hidden; }
.pm-agent-card .agent-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #f8f9fa; border-bottom: 1px solid #e0e0e0; }
.pm-agent-card .agent-name { font-size: 13px; font-weight: 600; }
.pm-agent-card .agent-score { font-size: 16px; font-weight: 700; }
.pm-agent-card .agent-output { padding: 6px 10px; font-size: 12px; color: #333; line-height: 1.6; white-space: pre-wrap; background: #fafafa; border-radius: 0 0 4px 4px; }
.pm-content-block { background: #fafafa; border: 1px solid #e0e0e0; border-radius: 4px; padding: 8px 12px; font-size: 12px; color: #333; line-height: 1.7; white-space: pre-wrap; max-height: 400px; overflow-y: auto; font-family: monospace; }
.pm-content-block.transcript { background: #f5f7fa; border-color: #c5cae9; }
.pm-content-block.error { background: #fff5f5; border-color: #ffcdd2; color: #c62828; }
.pm-content-block.cleaned { background: #f1f8e9; border-color: #c8e6c9; }
.pm-meta { font-size: 12px; color: #555; padding: 2px 0; }
.validate-ok, .validate-warn, .validate-err { border-radius: 3px; font-size: 9px; font-weight: 700; }

/* ============================================================
   v60: 共享 Toast + Skeleton (统一管理端和门店端)
   ============================================================ */

/* ── Toast通知 ── */
#toast-container{position:fixed;top:60px;right:16px;z-index:99999;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast-msg{pointer-events:auto;padding:12px 20px;border-radius:10px;color:#fff;font-size:13px;font-weight:500;box-shadow:0 4px 16px rgba(0,0,0,.2);animation:toast-in .35s ease-out,toast-out .4s ease-in 3s forwards;max-width:360px;word-break:break-word;display:flex;align-items:center;gap:10px}
.toast-msg.success{background:linear-gradient(135deg,#2e7d32,#43a047)}
.toast-msg.error{background:linear-gradient(135deg,#c62828,#e53935)}
.toast-msg.warn{background:linear-gradient(135deg,#e65100,#fb8c00)}
.toast-msg.info{background:linear-gradient(135deg,#1565c0,#1e88e5)}
@keyframes toast-in{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}
@keyframes toast-out{0%,70%{opacity:1}100%{opacity:0;transform:translateY(-16px)}}
/* 管理端覆盖: Toast位置稍下 */
.admin-context #toast-container{top:64px}
.admin-context .toast-msg{animation:toast-in .35s ease-out,toast-out .4s ease-in 2.8s forwards}

/* ── 骨架屏 ── */
.skel{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:skel-shimmer 1.5s infinite;border-radius:6px}
@keyframes skel-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skel-row{display:flex;gap:12px;margin-bottom:12px;align-items:center}
.skel-text{height:14px}.skel-title{height:20px;width:40%}.skel-card{height:80px;border-radius:10px}
.skel-circle{width:40px;height:40px;border-radius:50%}
.skel-badge{height:24px;width:60px;border-radius:12px}
.skel-block{height:120px;border-radius:10px;margin-bottom:16px}
.skel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}

/* ============================================================
   LumideerAiStudio 聊天与工具组件 (从 store/css/base.css 迁移)
   v65: 重构优化，移入 common.css
   ============================================================ */

#chat-shortcuts { display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px }
#chat-shortcuts .btn-sm { font-size:10px;padding:4px 8px }
#toast-container { position:fixed;top:70px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:8px }
.ac-detail { font-size:12px;color:#666;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden }
.ac-dim { font-size:10px;padding:2px 6px;border-radius:4px;background:#f0f2ff;color:#3949ab }
.ac-dims { display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 }
.ac-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:8px }
.ac-name { font-size:13px;font-weight:700;color:#333 }
.ac-score { font-size:28px;font-weight:900 }
.admin-link { color:rgba(255,255,255,0.7);text-decoration:none;font-size:12px;transition:color .2s }
.admin-link:hover { color:#fff }
.adv-tag { font-size:10px;padding:3px 8px;border-radius:20px;background:#e8f5e9;color:#2e7d32;font-weight:600;border:1px solid #a5d6a7;white-space:nowrap }
/* v76: 智能体配置中心 - 知识库徽章 */
.uc-kb-badge { display:inline-block;margin-left:4px;font-size:9px;border-radius:8px;padding:0 5px;line-height:15px }
.uc-kb-badge.has-kb { background:#c5e1a5;color:#33691e }
.uc-kb-badge.no-kb { color:#ccc }
/* v76: 智能体列表项（v94 统一: 使用 var(--primary) 与 sr-lr-* 对齐） */
.uc-agent-section-title { font-size:10px;padding:4px 10px 2px;text-transform:uppercase;letter-spacing:0.5px }
.uc-agent-section-title.configured { color:#999 }
.uc-agent-section-title.unconfigured { color:#bbb;padding-top:6px;margin-top:2px }
.uc-agent-item { padding:9px 10px;margin-bottom:2px;border-radius:6px;font-size:12px;line-height:1.5;transition:all .12s;border:1px solid transparent;background:transparent;cursor:pointer;display:flex;align-items:center;gap:6px;color:#555 }
.uc-agent-item.unconfigured { padding:6px 10px;margin-bottom:1px;line-height:1.4;border:none;background:transparent;color:#bbb }
.uc-agent-item:hover { background:#e8eaf6;color:var(--primary) }
.uc-agent-item.active { background:var(--primary);color:#fff;font-weight:600;border-color:var(--primary) }
.uc-agent-item-name { font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;flex:1;min-width:0 }
.uc-agent-item-name > span { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis }
.uc-agent-item-model { font-size:10px;opacity:0.7;margin-top:1px }
.uc-agent-item-label { white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
.uc-agent-list-sep { margin:6px 0;border-top:1px solid #e0e3ed }
.uc-agent-sysprompt { padding:8px 10px;border-radius:6px;cursor:pointer;font-size:11px;color:#888;transition:all .12s }
.uc-agent-sysprompt:hover { background:#e8eaf6;color:var(--primary) }
.uc-agent-sysprompt small { font-size:10px }
/* v76: 智能体编辑器 头部（v94 统一颜色） */
.uc-agent-header { display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid #f0f2f5 }
.uc-agent-header-info { flex:1 }
.uc-agent-header-title { display:flex;align-items:center;gap:8px;margin-bottom:4px;font-size:16px;font-weight:700;color:#333 }
.uc-agent-header-title strong { font-size:16px }
.uc-agent-id-badge { font-size:10px;background:#e8eaf6;color:var(--primary);padding:2px 8px;border-radius:10px;font-family:monospace }
.uc-agent-input { font-size:13px;padding:8px 10px;border:1px solid #ddd;border-radius:6px;width:100%;max-width:300px;margin-bottom:6px;background:#fff }
.uc-agent-input.desc { font-size:12px;max-width:500px;color:#666 }
.uc-agent-save-btn { padding:9px 22px;background:var(--primary);color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;box-shadow:0 1px 3px rgba(102,126,234,.3);flex-shrink:0;margin-left:16px;white-space:nowrap }
.uc-agent-tab-link { padding:8px 14px;border-radius:6px 6px 0 0;font-size:12px;color:#888;cursor:pointer;text-decoration:none;border:1px solid transparent;border-bottom:none;margin-bottom:-2px;transition:all .2s }
.uc-agent-tab-link:hover { color:var(--primary) }
.uc-agent-tab-link.active { background:#fff;color:var(--primary);font-weight:700;border-color:var(--border) }
.uc-agent-subtabs-bar { display:flex;gap:2px;border-bottom:2px solid var(--border);margin-bottom:14px }
.uc-agent-tab-content { min-height:380px }
/* v76: 智能体编辑器 Tab 内元素（v94 统一颜色） */
.uc-agent-plabel { font-size:12px;color:var(--primary);font-weight:600;display:block;margin-bottom:3px }
.uc-agent-ptextarea { width:100%;font-family:monospace;font-size:12px;border:1px solid #ddd;border-radius:6px;padding:10px;resize:vertical;line-height:1.6;background:#fff }
.uc-agent-ofrow { display:flex;justify-content:space-between;align-items:center;margin-bottom:3px }
.uc-agent-ofrow label { font-size:12px;color:var(--primary);font-weight:600 }
.uc-agent-ofpreset { padding:4px 10px;border:1px solid #ddd;border-radius:4px;font-size:11px }
.uc-agent-rule-row { display:flex;gap:6px;margin-bottom:6px;align-items:center }
.uc-agent-rule-input { flex:2;padding:6px 8px;border:1px solid #ddd;border-radius:4px;font-size:11px;background:#fff }
.uc-agent-rule-input.wide { flex:3 }
.uc-agent-rule-select { width:70px;padding:6px;border:1px solid #ddd;border-radius:4px;font-size:11px;background:#fff }
.uc-agent-rule-select.wt55 { width:55px }.uc-agent-rule-select.wt60 { width:60px }.uc-agent-rule-select.wt85 { width:85px }
.uc-agent-rule-req { font-size:10px;white-space:nowrap }
.uc-agent-rule-btn { margin-top:6px;padding:6px 14px;font-size:11px;background:#f0f2ff;border:1px solid #c5cae9;border-radius:4px;cursor:pointer }
.uc-agent-rule-hint { margin-bottom:8px;font-size:12px;color:#888 }
/* KB 标签页 */
.uc-agent-kb-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:8px;max-width:680px }
.uc-agent-kb-label { display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer;padding:8px 12px;border-radius:8px;transition:all 0.15s }
.uc-agent-kb-label.checked { border-color:#a5d6a7;background:#f1f8e9 }
.uc-agent-kb-label.unchecked { border:1px solid #e0e3ed;background:#fafbfd }
.uc-agent-kb-name { font-weight:500 }
.uc-agent-kb-cnt { font-size:10px;margin-left:4px }
.uc-agent-kb-cnt.has { color:#2e7d32 }
.uc-agent-kb-cnt.empty { color:#e65100 }
.uc-agent-kb-status { margin-top:12px;padding:8px 12px;background:#f0fdf4;border-radius:6px;font-size:11px;color:#2e7d32 }
.uc-agent-kb-total { margin-top:8px;padding:8px 12px;background:#f5f6fa;border-radius:6px;font-size:10px;color:#666 }
/* 模型参数标签页 */
.uc-agent-mfieldset { border:1px solid #e0e3ed;border-radius:8px;padding:14px 16px;margin-bottom:14px }
.uc-agent-mfieldset legend { font-size:13px;font-weight:600;color:var(--primary);padding:0 6px }
.uc-agent-mlabel { font-size:12px;color:#666;display:block;margin-bottom:3px }
.uc-agent-minput { width:100%;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:13px;background:#fff }
.uc-agent-mselect { width:100%;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:13px;background:#fff }
.uc-agent-mgrid { display:grid;grid-template-columns:1fr 1fr;gap:12px }
.uc-agent-mgrid .full { grid-column:1/-1 }
.uc-agent-minput.w160 { width:160px }
/* Tab 选中态 */
.uc-agent-tab-link.active { background:#fff !important;color:var(--primary) !important;font-weight:bold !important;border-color:var(--primary) !important }
.agent-card { background:#fff;border-radius:10px;padding:14px;box-shadow:0 2px 8px rgba(0,0,0,.05);transition:.2s;border:1px solid #eee }
.agent-card:hover { border-color:#3949ab;box-shadow:0 4px 14px rgba(57,73,171,.1) }
.agent-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-bottom:14px }
.agent-panel { font-size:11px }
.agent-preview-card { background:#fff;border:1px solid #e8eaf6;border-radius:10px;padding:14px;transition:.2s;display:flex;flex-direction:column;gap:6px }
.agent-preview-card:hover { border-color:#3949ab;box-shadow:0 4px 12px rgba(57,73,171,.08);transform:translateY(-1px) }
.agent-preview-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:12px }
.agent-step { padding:6px 12px;font-size:11px;border-radius:6px;background:#f5f5f5;display:inline-flex;align-items:center;gap:4px }
.agent-step.done { color:#2e7d32 }
.agent-step.pending { color:#ccc }
.agent-step.running { color:#3949ab;font-weight:500 }
.ai-tab-btn { flex:1;padding:10px 16px;border:none;background:transparent;border-radius:8px;cursor:pointer;font-size:13px;font-weight:500;color:#666;transition:all .2s }
.ai-tab-btn.active { background:var(--primary);color:#fff;box-shadow:0 2px 8px rgba(102,126,234,.25) }
.ai-tab-btn:hover:not(.active) { background:#e8eaf6;color:var(--primary) }
.ai-tab-nav { display:flex;gap:4px;margin-bottom:14px;background:#f5f5f5;border-radius:10px;padding:4px }
.ai-tab-panel { display:none }
.ai-tab-panel.active { display:block }
.apc-desc { font-size:11px;color:#777;line-height:1.5 }
.apc-icon { font-size:24px }
.apc-name { font-size:13px;font-weight:700;color:#333 }
.auto-push-card { background:var(--surface);border-color:var(--border) }
.auto-push-card .push-slider { position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;border-radius:24px;transition:.3s }
.auto-push-card .push-slider:before { position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s }
.auto-push-card .push-toggle { position:relative;display:inline-block;width:44px;height:24px }
.auto-push-card .push-toggle input { opacity:0;width:0;height:0 }
.auto-push-card input:checked+.push-slider { background:#4caf50 }
.auto-push-card input:checked+.push-slider:before { transform:translateX(20px) }
.auto-push-card.enabled { border-color:#4caf50;background:#f1f8f4 }
.badge-blue { background:#e3f2fd;color:#1565c0 }
.badge-bot-custom { background:#f3e5f5;color:#7b1fa2 }
.badge-bot-default { background:#e8f5e9;color:#2e7d32 }
.badge-bot-sales { background:#e3f2fd;color:#1565c0 }
.badge-bot-service { background:#fff3e0;color:#e65100 }
.badge-green { background:#e8f5e9;color:#2e7d32 }
.badge-orange { background:#fff3e0;color:#e65100 }
.badge-red { background:#fce4ec;color:#c62828 }
.biz-type-btn { background:var(--surface);color:var(--text-secondary);border-color:var(--border);padding:8px 16px;border-radius:8px;border:1.5px solid #e0e0e0;font-size:13px;cursor:pointer;transition:.2s;white-space:nowrap }
.biz-type-btn.active { background:#667eea;color:#fff;border-color:#667eea;box-shadow:0 2px 8px rgba(102,126,234,.3);font-weight:600 }
.biz-type-btn:hover:not(.active) { border-color:#667eea;background:#f0f4ff }
.biz-type-group { display:flex;flex-wrap:wrap;gap:6px }
.bot-card { border:1.5px solid #e0e0e0;border-radius:10px;padding:16px;margin-bottom:12px;transition:.2s;position:relative }
.bot-card-actions { display:flex;gap:6px }
.bot-card-badge { font-size:10px;padding:3px 8px;border-radius:10px;font-weight:600 }
.bot-card-body { display:grid;grid-template-columns:1fr 1fr;gap:10px }
.bot-card-footer { display:flex;align-items:center;gap:16px;margin-top:12px;padding-top:10px;border-top:1px solid #f0f0f0;font-size:12px }
.bot-card-header { display:flex;align-items:center;gap:10px;margin-bottom:12px }
.bot-card-name { font-weight:700;font-size:14px;flex:1 }
.bot-card.active-bot { border-color:#4caf50;background:#f8fff8 }
.bot-card:hover { border-color:#3949ab }
.bot-model-badge { display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:6px;background:#f0f2ff;color:#3949ab;font-size:11px;font-weight:600 }
.bot-toggle { position:relative;width:42px;height:24px;display:inline-block }
.bot-toggle input { opacity:0;width:0;height:0 }
.bot-toggle input:checked+.bot-toggle-slider { background:#4caf50 }
.bot-toggle input:checked+.bot-toggle-slider:before { transform:translateX(18px) }
.bot-toggle-slider { position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;transition:.3s;border-radius:24px }
.bot-toggle-slider:before { position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:white;transition:.3s;border-radius:50% }
.btn { font-size:12px;padding:8px 14px }
.btn-danger { background:#f44336;color:#fff }
.btn-group { display:flex;gap:8px;flex-wrap:wrap;margin-top:12px }
.btn-outline { border-color:var(--border);color:var(--text) }
.btn-outline:hover { background:#3949ab;color:#fff }
.btn-primary { background:linear-gradient(135deg,#3949ab,#5c6bc0);color:#fff }
.btn-primary:disabled { background:#aaa;cursor:not-allowed;box-shadow:none }
.btn-primary:hover { box-shadow:0 4px 14px rgba(57,73,171,.3) }
.btn-sm { font-size:11px;padding:5px 10px }
.btn-success { background:#4caf50;color:#fff }
.btn-success:hover { background:#43a047 }
.btn:active { transform:scale(.97) }
.card { border:1px solid var(--border,#e0e0e0);border-radius:12px }
.card,.stat-card { background:var(--card);border-color:var(--border);color:var(--text) }
.card-body { padding:20px }
.card-title { font-size:15px;font-weight:700 }
.card-title,.page-title,.page-subtitle { color:var(--text) }
/* 门店端卡片标题: 独立于管理端 card-header 结构 */
.main-container .card-title { padding:14px 18px;border-bottom:1px solid var(--border-light,#f0f0f0);margin:0 }
.card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08);border-color:#aab0e0 }
.chat-avatar { width:32px;height:32px;border-radius:50%;background:#3949ab;color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0 }
.chat-bubble { max-width:78%;padding:10px 14px;border-radius:12px;font-size:13px;line-height:1.6;word-wrap:break-word }
.chat-container { display:flex;flex-direction:column;height:calc(100vh - 140px) }
.chat-feedback { display:flex;gap:6px;margin-top:4px }
.chat-footer { background:var(--surface);border-color:var(--border) }
.chat-footer input { background:var(--bg);color:var(--text) }
.chat-message { animation:fadeIn .2s ease }
.chat-msg { display:flex;margin-bottom:12px;gap:10px }
.chat-msg.assistant { justify-content:flex-start }
.chat-msg.assistant .chat-bubble { background:var(--surface);color:var(--text) }
.chat-msg.user { justify-content:flex-end }
.chat-msg.user .chat-bubble { background:#2a3a6c;color:#fff }
/* 会话列表侧边栏 */
.chat-session-item { padding:10px 12px;cursor:pointer;border-radius:6px;margin:2px 0;font-size:12px;color:#555;transition:.15s;display:flex;align-items:center;gap:6px }
.chat-session-item:hover { background:#f0f4ff }
.chat-session-item.active { background:#e8eaf6;color:#3949ab;font-weight:600 }
.chat-session-title { font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 }
.chat-session-time { font-size:10px;color:#aaa;flex-shrink:0 }
.chat-session-delete { font-size:14px;color:#ccc;cursor:pointer;padding:2px 4px;visibility:hidden;flex-shrink:0 }
.chat-session-item:hover .chat-session-delete { visibility:visible }
.chat-session-delete:hover { color:#f44336 }
/* 快捷提问按钮 */
.quick-action-btn { padding:6px 14px;border:1px solid #e0e0e0;border-radius:18px;background:#fff;cursor:pointer;font-size:12px;color:#555;transition:all .2s;white-space:nowrap }
.quick-action-btn:hover { background:#f0f4ff;border-color:#3949ab;color:#3949ab }
/* 状态指示点 */
.dot-on { display:inline-block;width:8px;height:8px;border-radius:50%;background:#4caf50 }
.dot-off { display:inline-block;width:8px;height:8px;border-radius:50%;background:#ccc }
/* 斜杠命令 */
.slash-cmd-item { display:flex;align-items:center;gap:8px;padding:8px 14px;cursor:pointer;font-size:13px;border-bottom:1px solid #f5f5f5;transition:background .15s }
.slash-cmd-item:hover { background:#f0f4ff }
.chat-system-msg { text-align:center;padding:6px 0;font-size:12px }
.chat-system-msg .pipe-msg { margin:3px 16px }
.chat-system-msg .pipe-msg-panel { padding:4px 16px }
.chat-system-msg .pipe-step { text-align:left }
.content { padding:20px 24px;overflow-y:auto }
.credits-balance { display:flex;align-items:baseline;gap:8px;margin-bottom:6px }
.credits-balance-num { font-size:48px;font-weight:800;letter-spacing:-2px;line-height:1 }
.credits-balance-sub { font-size:13px;opacity:.65;margin-bottom:16px }
.credits-balance-unit { font-size:18px;font-weight:400;opacity:.8 }
.credits-consumption-dots { flex:1;margin:0 10px;border-bottom:1px dotted #ccc }
.credits-consumption-name { font-size:13px;color:#333 }
.credits-consumption-row { display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f0f0f0 }
.credits-consumption-row:last-child { border-bottom:none }
.credits-consumption-val { font-size:13px;font-weight:600;color:#3949ab }
.credits-hero { background:linear-gradient(135deg,#1a237e 0%,#3949ab 50%,#5c6bc0 100%);
  border-radius:16px;padding:28px 32px;color:#fff;margin-bottom:20px;
  position:relative;overflow:hidden }
.credits-hero::after { content:'';position:absolute;right:-30px;top:-30px;width:200px;height:200px;
  background:rgba(255,255,255,.06);border-radius:50% }
.credits-hero::before { content:'';position:absolute;right:60px;bottom:-60px;width:160px;height:160px;
  background:rgba(255,255,255,.04);border-radius:50% }
.credits-plan-card { background:#fff;border-radius:14px;padding:22px 18px;border:2px solid #e8eaf6;
  cursor:pointer;transition:.3s;position:relative;overflow:hidden }
.credits-plan-card.popular { padding-top:36px }
.credits-plan-card.popular::before { content:'\2B50 \\6700\\53D7\\6B22\\8FCE';position:absolute;top:0;left:0;right:0;
  background:linear-gradient(90deg,#3949ab,#5c6bc0);color:#fff;font-size:10px;font-weight:700;
  padding:4px 10px;text-align:center;letter-spacing:.5px }
.credits-plan-card:hover { border-color:#3949ab;transform:translateY(-2px);box-shadow:0 6px 20px rgba(57,73,171,.15) }
.credits-plan-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px }
.credits-recharge-btn { width:100%;padding:12px;border:none;border-radius:10px;font-size:15px;font-weight:700;
  cursor:pointer;transition:.3s;margin-top:4px;
  background:linear-gradient(135deg,#1a237e,#3949ab);color:#fff; }
.credits-recharge-btn:active { transform:translateY(0) }
.credits-recharge-btn:hover { transform:translateY(-1px);box-shadow:0 4px 16px rgba(57,73,171,.35) }
.credits-rule-table { width:100%;border-collapse:collapse;font-size:12px }
.credits-stat { text-align:center }
.credits-stat-lbl { font-size:11px;opacity:.6;margin-top:2px }
.credits-stat-row { display:flex;gap:32px;margin-top:12px }
.credits-stat-val { font-size:20px;font-weight:700 }
.credits-tier-badge { display:inline-block;padding:2px 10px;border-radius:20px;font-size:11px;font-weight:600 }
.feedback-btn { padding:2px 8px;border:1px solid #ddd;border-radius:6px;background:transparent;cursor:pointer;font-size:13px;transition:.2s }
.feedback-btn.voted { border-color:#3949ab;background:#e8eaf6 }
.feedback-btn:hover { border-color:#3949ab;background:#f0f2ff }
.flow-arrow { font-size:14px;color:#999 }
.flow-row { display:flex;align-items:center;gap:8px }
.flow-step { flex:1;padding:10px;border-radius:8px;background:#f8f9fa;border:1px solid #eee;text-align:center;font-size:12px }
.flow-step.highlight { background:#e8f0fe;border-color:#3949ab }
.framework-preview { background:#f8f9fa;border:1px dashed #c5cae9;border-radius:8px;padding:16px;font-family:monospace;font-size:11px;line-height:1.8;color:#555;max-height:260px;overflow-y:auto;white-space:pre-wrap }
.kb-link-item { display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #eee;border-radius:8px;margin-bottom:8px;transition:.2s }
.kb-link-item:hover { background:#f8f9ff }
.kb-link-source { font-size:10px;padding:2px 8px;border-radius:4px;font-weight:600 }
.kb-stat-item { font-size:10px;padding:4px 8px }

/* ══════════════════════════════════════════════════════════╕
   v66-FIX: 门店端核心布局 (base.css origin, 被去重误伤)
   ══════════════════════════════════════════════════════════╕ */
/* 主容器 */
.main-container { display:grid;grid-template-columns:200px 1fr;height:calc(100vh - 52px);overflow:hidden }
/* 侧边栏 */
.main-container .sidebar { background:var(--store-sidebar-bg,#fff);border-right:1px solid var(--border,#e0e0e0);overflow-y:auto;padding-bottom:20px }
/* 菜单项 */
.menu-item { padding:9px 16px;cursor:pointer;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary,#555);border-left:3px solid transparent;transition:.2s;letter-spacing:0.2px }
.menu-item .mi-icon { font-size:14px;width:20px;text-align:center;flex-shrink:0 }
.menu-item.active { background:var(--store-menu-active,#e8eaf6);color:var(--store-menu-active-border,#3949ab);border-left-color:var(--store-menu-active-border,#3949ab);font-weight:600;letter-spacing:0 }
.menu-item:hover { background:var(--store-menu-hover,#f5f7ff);color:var(--store-menu-active-border,#3949ab) }
/* 菜单内部 */
.mi-text { flex:1;min-width:0 }
.mi-label { display:block;font-size:13px;line-height:1.3 }
.mi-desc { display:block;font-size:10px;color:var(--text-muted,#aaa);line-height:1.3;margin-top:1px }
.menu-badge { margin-left:auto;padding:2px 7px;border-radius:10px;font-size:10px;font-weight:600;background:var(--primary-light,#e8eaf6);color:var(--primary,#3949ab);flex-shrink:0 }
/* 分隔线 */
.section-divider { padding:12px 16px 6px;font-size:10px;font-weight:700;color:var(--text-muted,#aaa);text-transform:uppercase;letter-spacing:1px;margin-top:4px }
.server-status-dot.checking { background:#ffa000 }
.server-status-dot.offline { background:#f44336 }
.server-status-dot.online { background:#4caf50 }
/* 内容区 */
.content { padding:20px 24px;overflow-y:auto }
.page { display:none }
.page.active { display:block }
.page-title { font-size:18px;font-weight:700;color:var(--text,#222);margin-bottom:4px;display:flex;align-items:center;gap:8px }
.page-subtitle { font-size:12px;color:var(--text-muted,#888);margin-bottom:16px }

/* ═══ 已存在规则的补丁 (不覆盖已有定义) ═══ */
.main-content { margin-left:0!important;padding:0!important }
.mi-text { flex:1;min-width:0 }
.mobile-menu-btn { display:none!important }
.mobile-menu-overlay { display:none!important }
.mobile-menu-overlay.active { display:block }
.modal-content { background:var(--card) }
.notify-badge { position:absolute;top:-6px;right:-8px;min-width:18px;height:18px;background:#f44336;color:#fff;font-size:10px;font-weight:700;border-radius:9px;display:none;align-items:center;justify-content:center;padding:0 4px;animation:notify-pulse 2s infinite }
.notify-bell { position:relative;cursor:pointer;font-size:20px;transition:transform .2s }
.notify-bell:active { transform:scale(.95) }
.notify-bell:hover { transform:scale(1.15) }
.notify-panel { width:calc(100vw-24px);right:-4px;left:-4px;max-height:60vh }
.notify-panel-body { max-height:45vh }
.notify-panel-footer { padding:10px 16px;text-align:center;font-size:11px;color:#aaa;border-top:1px solid #f0f0f0 }
.notify-panel-header { padding:12px 16px;font-weight:700;font-size:14px;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center }
.page { animation:fadeInUp .25s ease }
.page.active { display:block }
.pipe-msg { font-size:12px;padding:8px 12px;border-radius:6px;margin:3px 0;background:#f5f6fa;color:#666 }
.pipe-msg-panel { padding:8px 0 }
.pipe-msg.pipe-done { background:#e8f5e9;color:#2e7d32 }
.pipe-msg.pipe-fail { background:#fce4ec;color:#c62828 }
.pipe-msg.pipe-pending { background:#fff8e1;color:#e65100 }
.pipe-step { font-size:12px;padding:5px 10px;margin:2px 0;border-radius:4px;display:flex;align-items:center;gap:6px }
.pipe-step .spinner { display:inline-block;width:12px;height:12px;border:2px solid #90caf9;border-top-color:#1565c0;border-radius:50%;animation:spin .8s linear infinite;margin-left:4px }
.pipe-step.pipe-done { color:#2e7d32;background:#f5fdf5 }
.pipe-step.pipe-fail { color:#c62828;background:#fef5f5 }
.pipe-step.pipe-running { color:#1565c0;background:#f0f7ff;font-weight:600 }
.pipe-summary { font-size:13px;font-weight:600;color:#3949ab;padding:8px 12px;border-radius:6px;background:#f0f4ff;margin:8px 0 }
.pipeline-step.active { background:#e8f0fe;color:#3949ab;font-weight:600 }
.pipeline-step.done { background:#e8f5e9;color:#2e7d32 }
.pipeline-step.failed { background:#fce4ec;color:#c62828 }
.plan-divider { height:1px;background:linear-gradient(90deg,transparent,#e0e0e0,transparent);margin:10px 0 }
.plan-feature { font-size:12px;color:#555;padding:3px 0;display:flex;align-items:center;gap:6px }
.plan-feature.hot::before { content:'\U0001F525';color:#ff9800 }
.plan-feature::before { content:'\2713';color:#4caf50;font-weight:700;font-size:11px }
.plan-name { font-size:13px;font-weight:700;color:#3949ab;margin-bottom:8px }
.plan-price { font-size:32px;font-weight:800;color:#1a237e;margin:6px 0 2px }
.plan-price span { font-size:14px;font-weight:400;color:#888;margin-left:2px }
.plan-scene-label { font-size:11px;font-weight:700;color:var(--text-muted,#999);text-transform:uppercase;letter-spacing:0.5px;margin-top:8px;margin-bottom:4px;width:100% }
.plan-template-group { display:flex;flex-wrap:wrap;gap:6px;align-items:center }
.progress-bar { height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden }
.progress-fill { height:100%;background:linear-gradient(90deg,#3949ab,#5c6bc0);border-radius:3px;transition:width .5s }
.progress-text { font-size:11px;color:#888;margin-top:4px;text-align:center }
.progress-wrap { background:var(--bg,#f5f5f5) }
.pstep { padding:8px 4px;border-radius:8px;border:1.5px solid #e0e0e0;background:#f8f9fa;font-size:11px;text-align:center;cursor:pointer;transition:all .2s;line-height:1.4;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px }
.pstep-icon { font-size:16px }
.pstep-label { font-weight:600 }
.pstep-time { font-size:10px;color:#888;margin-top:1px }
.pstep:hover { border-color:#3949ab;background:#f0f2ff;transform:translateY(-1px) }
.pstep[data-status="completed"] { color:#2e7d32;background:#e8f5e9;border-color:#4caf50 }
.pstep[data-status="failed"] { color:#c62828;background:#fce4ec;border-color:#f44336 }
.pstep[data-status="pending"] { color:#bbb;background:#f8f9fa;border-color:#eee }
.pstep[data-status="running"] { color:#1565c0;background:#e3f2fd;border-color:#1976d2;animation:pstep-pulse 1.5s infinite }
.redline-bar { display:flex;align-items:center;gap:12px;background:#fce4ec;border:1px solid #f48fb1;border-radius:8px;padding:10px 14px;margin-bottom:14px }
.redline-bar.hide { display:none }
.report-box { background:#fff;border:1px solid #eee;border-radius:8px;padding:16px;font-size:13px;line-height:1.8;max-height:600px;overflow-y:auto }
.rl-icon { font-size:22px }
.rl-text { flex:1;font-size:13px;font-weight:600;color:#c62828 }
.rp-agent-status { font-size:11px;color:#4caf50 }
.rp-chat-area { min-height:400px }
.rp-chat-avatar { width:34px;height:34px;border-radius:50%;background:#3949ab;color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0 }
.rp-chat-body { flex:1;overflow-y:auto;padding:16px }
.rp-chat-bubble { max-width:90% }
.rp-chat-footer { padding:12px 18px;border-top:1px solid #eee;display:flex;gap:10px;align-items:center }
.rp-chat-footer button { background:#3949ab;color:#fff;border:none;border-radius:20px;padding:10px 20px;cursor:pointer;font-size:13px;font-weight:500;white-space:nowrap }
.rp-chat-footer button:hover { background:#283593 }
.rp-chat-footer input { flex:1;padding:10px 14px;border:1px solid #ddd;border-radius:20px;font-size:13px;outline:none }
.rp-chat-footer input:focus { border-color:#3949ab }
.rp-chat-header { padding:14px 18px;border-bottom:1px solid #eee;background:#fafafa;display:flex;align-items:center;gap:12px }
.rp-chat-msg { display:flex;margin-bottom:14px;gap:10px }
.rp-chat-msg.assistant .rp-chat-bubble { background:#f0f0f0;color:#333;border-bottom-left-radius:4px }
.rp-chat-msg.user { justify-content:flex-end }
.rp-chat-msg.user .rp-chat-bubble { background:#3949ab;color:#fff;border-bottom-right-radius:4px }
.rp-layout { flex-direction:column;height:auto }
.rp-main-panel { display:none }
.rp-main-panel.active { display:block }
.rp-param-block { background:#fafafa;border-radius:8px;padding:12px;margin-bottom:10px;font-size:12px;line-height:1.6 }
.rp-param-block strong { color:#333 }
.rp-preset-card { border:2px solid #eee;border-radius:10px;padding:12px;cursor:pointer;text-align:center;transition:all .2s;font-size:12px }
.rp-preset-card .rp-preset-desc { font-size:10px;color:#999 }
.rp-preset-card .rp-preset-icon { font-size:24px;margin-bottom:4px }
.rp-preset-card .rp-preset-name { font-weight:600;color:#333;margin-bottom:2px }
.rp-preset-card.selected { border-color:#3949ab;background:#e8eaf6 }
.rp-preset-card:hover { border-color:#3949ab }
.rp-preset-grid { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px }
.rp-report-preview { margin-top:12px;max-height:200px;overflow-y:auto;font-size:12px;line-height:1.6;background:#f9f9f9;border-radius:8px;padding:10px;border:1px solid #eee }
.rp-setting-group { margin-bottom:14px }
.rp-setting-group input,.rp-setting-group select { width:100%;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:12px }
.rp-setting-group label { display:block;font-size:12px;font-weight:600;color:#555;margin-bottom:4px }
.rp-sidebar { width:100% }
.rp-suggest-chip { background:#f5f5f5;border:1px solid #e0e0e0;border-radius:16px;padding:6px 14px;font-size:12px;cursor:pointer;color:#555;transition:all .2s }
.rp-suggest-chip:hover { background:#e8eaf6;border-color:#3949ab;color:#3949ab }
.rp-tab-btn { padding:10px 20px;cursor:pointer;border:none;background:none;font-size:14px;color:#666;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .2s }
.rp-tab-btn.active { color:var(--primary);border-bottom-color:var(--primary);font-weight:600 }
.rp-tab-btn:hover { color:var(--primary);background:#f5f6fa }
.rp-tab-nav { display:flex;gap:0;border-bottom:2px solid #e0e0e0;margin-bottom:20px }
.rp-welcome { text-align:center;padding:40px 20px;color:#999 }
.rp-welcome .rp-suggest { display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px }
.section-divider { padding:12px 16px 6px;font-size:10px;font-weight:700;color:var(--text-muted,#aaa);text-transform:uppercase;letter-spacing:1px;margin-top:4px }

/* ═══ 管理端专属暗色侧边栏 (不泄露到门店端) ═══ */
.main-layout > .sidebar, body.admin-layout .sidebar {
  background: linear-gradient(180deg,#0f3460,#16213e);
  color: #ccc;
}
.main-layout .sidebar .menu-item, body.admin-layout .sidebar .menu-item { color:#bbb }
.main-layout .sidebar .menu-item.active, body.admin-layout .sidebar .menu-item.active { background:rgba(57,73,171,.3);color:#fff }
.main-layout .sidebar .menu-item:hover, body.admin-layout .sidebar .menu-item:hover { background:rgba(255,255,255,.06) }

/* ═══ 移动端响应式 (必须保留 @media 包裹!) ═══ */
@media (max-width: 768px) {
  /* v109: top-nav 不能隐藏，它是窄屏下唯一的导航入口 */
  .top-nav { padding:4px 8px;flex-wrap:wrap;gap:2px;min-height:40px }
  .top-nav .logo { font-size:12px }
  .top-nav .store-selector select { max-width:100px;font-size:10px }
  .top-nav .btn { font-size:10px!important;padding:4px 8px!important }
  .top-nav .server-status { display:none }
  .chat-footer,.notify-bell { display:none!important }
  /* 门店端：窄屏变为单列布局 */
  .main-container { grid-template-columns:1fr!important }
  .main-container .content { padding:12px;width:100% }
  /* 管理端侧边栏在移动端改为抽屉式（v129: 不再 display:none，由 index.html 内联样式控制 position:fixed） */
  .main-layout > .sidebar { position:fixed!important;left:-220px;top:48px;bottom:0;z-index:100;transition:left 0.25s;width:200px;overflow-y:auto }
  .main-layout > .sidebar.open { left:0;box-shadow:2px 0 12px rgba(0,0,0,0.15) }
  /* 门店端侧边栏用 fixed + left 切换替代 display:none */
  .main-container .sidebar { display:flex;flex-direction:column;position:fixed;left:-240px;top:52px;bottom:0;width:200px;z-index:900;box-shadow:2px 0 12px rgba(0,0,0,.15);transition:left .25s ease;background:var(--store-sidebar-bg,#fff) }
  .main-container .sidebar.open { left:0 }
}
.skeleton { background:linear-gradient(90deg,#e8ecf0 25%,#f0f2f5 50%,#e8ecf0 75%);background-size:200% 100%;animation:skeleton-shimmer 1.5s infinite;border-radius:4px;min-height:16px }
.skeleton-avatar { width:40px;height:40px;border-radius:50% }
.skeleton-card { width:100%;height:80px;margin-bottom:10px }
.skeleton-text { width:60%;height:12px;margin-bottom:8px }
.skeleton-title { width:40%;height:18px;margin-bottom:12px }
.source-feishu { background:#e3f2fd;color:#1565c0 }
.source-local { background:#f3e5f5;color:#7b1fa2 }
.source-tencent { background:#e8f5e9;color:#2e7d32 }
.spinner-sm { display:inline-block;width:12px;height:12px;border:2px solid #e0e0e0;border-top-color:#3949ab;border-radius:50%;animation:spin-sm .6s linear infinite;vertical-align:middle }
.stat-card { padding:20px }
.stat-grid { grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px }
.stat-label { color:var(--text-secondary) }
.stat-num { font-size:28px;font-weight:800 }
.step-connector.done { background:#4caf50 !important }
.step-connector.failed { background:#f44336 !important }
.step-detail-badge { font-size:11px;padding:2px 10px;border-radius:12px;font-weight:600 }
.step-detail-badge.completed { background:#e8f5e9;color:#2e7d32 }
.step-detail-badge.failed { background:#fce4ec;color:#c62828 }
.step-detail-badge.pending { background:#f5f5f5;color:#999 }
.step-detail-badge.running { background:#e3f2fd;color:#1565c0 }
.step-detail-close { margin-top:16px;display:flex;justify-content:flex-end }
.step-detail-error { background:#fff5f5;border-left:3px solid #f44336;padding:10px 12px;border-radius:0 8px 8px 0;color:#c62828;font-size:12px;line-height:1.6 }
.step-detail-header { display:flex;align-items:center;gap:10px;margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid #eee }
.step-detail-icon { font-size:28px }
.step-detail-modal { background:#fff;border-radius:14px;max-width:580px;width:100%;max-height:80vh;overflow-y:auto;padding:24px;box-shadow:0 20px 60px rgba(0,0,0,.25) }
.step-detail-overlay { position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:9000;display:flex;align-items:center;justify-content:center;padding:20px }
.step-detail-row { margin-bottom:10px;padding:10px 12px;background:#f8f9fa;border-radius:8px }
.step-detail-row-label { font-size:10px;font-weight:700;color:#888;text-transform:uppercase;margin-bottom:4px }
.step-detail-row-value { color:#333;word-break:break-all;font-size:12px;line-height:1.6 }
.step-detail-title { font-size:16px;font-weight:700;color:#333;flex:1 }
.suggestion-chip { font-size:12px;padding:6px 12px;border:1px solid #e0e0e0;border-radius:20px;background:#fff;cursor:pointer;transition:.2s;white-space:nowrap }
.suggestion-chip:hover { border-color:#3949ab;background:#f0f4ff }
.suggestion-chips { display:flex;flex-wrap:wrap;gap:8px }
.sync-field-full { margin-bottom:12px }
.sync-field-row { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px }
.sync-panel { display:none;border:1px solid #eee;border-radius:10px;padding:16px;background:#fafbfc }
.sync-panel.active { display:block }
.sync-status-row { display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px;border-radius:8px;background:#f8f9fa;font-size:12px }
.sync-status-row.connected { background:#e8f5e9 }
.sync-status-row.disconnected { background:#fff3e0 }
.sync-status-row.error { background:#fce4ec }
.sync-tab-btn { padding:8px 16px;border:1.5px solid #e0e0e0;border-radius:8px;background:#fff;font-size:12px;font-weight:600;color:#666;cursor:pointer;transition:.2s;display:flex;align-items:center;gap:6px }
.sync-tab-btn.active { background:var(--primary);color:#fff;border-color:var(--primary) }
.sync-tab-btn:hover { border-color:var(--primary);color:var(--primary) }
.sync-tabs { display:flex;gap:4px;margin-bottom:16px;flex-wrap:wrap }
.tab-content { display:none }
.tab-content.active { display:block }
.tab-nav { display:flex;overflow-x:auto;gap:4px;flex-wrap:nowrap;margin-bottom:14px }
.tab-nav .tab-btn { transition:all .2s ease }
.tag-agent { background:#e8f5e9;color:#2e7d32 }
.tag-model { background:#e8f0fe;color:#1557b0 }
.tag-node { background:#fff3e0;color:#e65100 }
.task-item { display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;border:1px solid #eee;margin-bottom:6px;cursor:pointer;transition:.2s;font-size:13px }
.task-item.selected { border-color:#3949ab;background:#e8eaf6 }
.task-item:hover { border-color:#3949ab;background:#f0f2ff }
.task-list { margin-bottom:10px }
.task-status { font-size:10px;padding:3px 8px;border-radius:5px;min-width:60px;text-align:center;flex-shrink:0 }
.task-status.analyzing { background:#fff3e0;color:#e65100 }
.task-status.completed { background:#e3f2fd;color:#1565c0 }
.task-status.failed { background:#fce4ec;color:#c62828 }
.task-status.transcribing { background:#fff3e0;color:#e65100 }
.task-status.uploaded { background:#e8f5e9;color:#2e7d32 }
.template-flow { display:flex;flex-direction:column;gap:8px;margin:12px 0 }
.template-meta { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px }
.template-meta-tag { padding:4px 10px;border-radius:6px;font-size:11px;font-weight:600 }
.template-preview { border:1px solid #e0e0e0;border-radius:10px;padding:16px;margin-top:16px;display:none }
.template-preview.active { display:block }
.tier-basic { background:#e3f2fd;color:#1565c0 }
.tier-enterprise { background:#fff3e0;color:#e65100 }
.tier-free { background:#f0f0f0;color:#666 }
.tier-pro { background:#e8f5e9;color:#2e7d32 }
.timeline-preview { display:flex;align-items:center;gap:0;margin:16px 0;padding:12px;background:#fafafa;border-radius:8px;overflow-x:auto }
.tl-dot { width:14px;height:14px;border-radius:50%;background:#3949ab;flex-shrink:0 }
.tl-dot.active { background:#ff9800;box-shadow:0 0 8px rgba(255,152,0,.4) }
.tl-dot.done { background:#4caf50 }
.tl-label { font-size:10px;color:#666;text-align:center;white-space:nowrap }
.tl-line { height:2px;background:#e0e0e0;flex:1;min-width:20px }
.tl-node { display:flex;flex-direction:column;align-items:center;gap:6px;min-width:80px;position:relative }
.toast { border-color:var(--border) }
.toast.error { background:#dc3545 }
.toast.info { background:#3949ab }
.toast.success { background:#28a745 }
.toast.warning { background:#ff9800 }
.top-nav .btn { font-size:12px;padding:6px 12px }
.top-nav .logo { font-size:13px }
.top-nav .server-status { display:none }
.transcript-box { background:#fafafa;border:1px solid #eee;border-radius:8px;padding:16px;font-size:13px;line-height:1.8;max-height:500px;overflow-y:auto;white-space:pre-wrap;font-family:"Microsoft YaHei",sans-serif }
a { transition:color .2s }
canvas { max-width:100%!important }
h3 { font-size:15px;font-weight:700;color:var(--text,#333);margin:12px 0 8px }  
input,select,textarea { font-size:14px }
table { font-size:13px }


/* ═══════════════════════════════════════════════════════════
   v69: AI 页面组件样式 — 销售顾问 & 报告助手
   ═══════════════════════════════════════════════════════════ */

/* ── AI 页面布局 ── */
.ai-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 190px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

/* ── AI 页头 ── */
.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

/* ── AI 消息区域 ── */
.ai-msg-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
}

/* ── AI 欢迎界面 ── */
.ai-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.ai-welcome h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.ai-sugg-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 520px;
  margin-top: 8px;
}
.ai-sugg-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.ai-sugg-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── AI 消息气泡 ── */
.ai-msg {
  display: flex;
  margin-bottom: 12px;
  animation: msgIn .3s ease;
}
.ai-msg.msg-user { justify-content: flex-end; }
.ai-msg.msg-bot { justify-content: flex-start; }
.ai-msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}
.ai-msg-user .ai-msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg-bot .ai-msg-bubble {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* ── AI 技能跟踪 ── */
.ai-skill-trace {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.skill-dot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--primary-light);
  font-size: 10px;
}

/* ── AI 输入区 ── */
.ai-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--card);
}

/* ── 技能徽章 ── */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  background: #f0f0f0;
  color: #999;
}
.skill-badge.skill-on {
  background: var(--primary-light);
  color: var(--primary);
}

/* ── AI 侧边栏 ── */
.ai-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
  background: #fafbfc;
}
.skill-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── AI Tab 导航 ── */
.ai-tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  width: fit-content;
}
.ai-tab-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}
.ai-tab-btn.active {
  background: var(--primary);
  color: #fff;
}
.ai-tab-panel { display: none; }
.ai-tab-panel.active { display: block; }

/* ── 报告助手布局 ── */
.rp-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 260px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.rp-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rp-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}
.rp-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rp-agent-status {
  font-size: 11px;
  color: var(--success);
}

.rp-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}
.rp-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
}
.rp-welcome h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.rp-welcome p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.rp-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 520px;
}
.rp-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.rp-suggest-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.rp-chat-msg {
  display: flex;
  margin-bottom: 10px;
  gap: 8px;
  animation: msgIn .3s ease;
}
.rp-chat-msg.user { justify-content: flex-end; }
.rp-chat-msg.assistant { justify-content: flex-start; }
.rp-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.rp-chat-msg.user .rp-chat-avatar { background: var(--primary-light); }
.rp-chat-msg.assistant .rp-chat-avatar { background: var(--primary-light); }
.rp-chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}
.rp-chat-msg.user .rp-chat-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.rp-chat-msg.assistant .rp-chat-bubble {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.rp-chat-footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
  background: var(--card);
}
.rp-chat-footer input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
}
.rp-chat-footer input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.rp-chat-footer button {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ── 报告助手侧边栏 ── */
.rp-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  background: #fafbfc;
}
.rp-setting-group {
  margin-bottom: 10px;
}
.rp-setting-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.rp-setting-group input,
.rp-setting-group select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
}

.rp-preset-card {
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
}
.rp-preset-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.rp-preset-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.rp-preset-icon { font-size: 18px; }
.rp-preset-name { font-size: 12px; font-weight: 600; margin-top: 2px; }
.rp-preset-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.rp-param-block {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.rp-report-preview {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

/* ── 自动推送卡片 ── */
.auto-push-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--card);
  transition: border-color 0.2s;
}
.auto-push-card.enabled {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(102,126,234,0.1);
}

/* ── 推送开关 ── */
.push-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.push-toggle input { opacity: 0; width: 0; height: 0; }
.push-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: 0.3s;
}
.push-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.push-toggle input:checked + .push-slider { background: var(--primary); }
.push-toggle input:checked + .push-slider::before { transform: translateX(18px); }

/* ── PF 字段 (profile) ── */
.pf-field {
  margin-bottom: 10px;
}
.pf-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pf-field input,
.pf-field select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* ── Typing Dots 动画 ── */
.typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 4px 0;
}
.typing-dots::before,
.typing-dots::after {
  content: '';
}
.typing-dots::before {
  content: '●';
  animation: dotPulse 1.4s infinite;
}
.typing-dots::after {
  content: '● ●';
  animation: dotPulse 1.4s infinite .2s;
}

/* ── 动画 ── */
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dotPulse {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── 门店端侧边栏菜单项 ── */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  border-left: 3px solid transparent;
  font-size: 13px;
}
.menu-item:hover { background: var(--store-menu-hover); color: var(--primary); }
.menu-item.active {
  background: var(--store-menu-active);
  color: var(--primary);
  border-left-color: var(--store-menu-active-border);
  font-weight: 600;
}
.mi-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.mi-text { flex: 1; min-width: 0; }
.mi-label { display: block; font-weight: 500; font-size: 13px; }
.mi-desc { display: block; font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.section-divider {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.menu-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.menu-badge.badge-blue { background: var(--primary-light); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════
   v93: 统一视觉风格 — 参考录音分析管线
   用于: 统一配置中心 / 门店AI助手 / 报告中心 / 报告智能体
   ═══════════════════════════════════════════════════════════ */

/* ── 章节标题（#667eea 色 + 图标）── */
.sr-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 20px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sr-section-title:first-child { margin-top: 0; }

/* ── 信息提示条（灰底圆角）── */
.sr-info-bar {
  font-size: 12px;
  color: var(--text-secondary);
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: var(--sp-md);
  line-height: 1.6;
}

/* ── 流程横幅（渐变底 + 步骤链）── */
.sr-flow-banner {
  background: linear-gradient(135deg, #fff3e0, #fce4ec);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.7;
}
.sr-flow-banner .sr-flow-title {
  font-weight: 700;
  font-size: 13px;
  color: #e65100;
  margin-bottom: 6px;
}
.sr-flow-banner .sr-flow-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.sr-flow-banner .sr-flow-step {
  background: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}
.sr-flow-banner .sr-flow-arrow { font-size: 16px; }
.sr-flow-banner .sr-flow-desc {
  color: #777;
  font-size: 11px;
  line-height: 1.6;
}

/* ── 双栏布局（左右自适应）── */
.sr-two-col {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.sr-two-col > * { flex: 1; min-width: 0; }
@media (max-width: 768px) {
  .sr-two-col { flex-direction: column; }
}

/* ── 表单网格（自动列数）── */
.sr-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* ── 子Tab导航（统一风格）── */
.sr-subtab-nav {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  flex-wrap: wrap;
}
.sr-subtab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.2s;
  font-weight: 500;
}
.sr-subtab-btn:hover { background: var(--primary-light); color: var(--primary); }
.sr-subtab-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* ── 内嵌面板（子Tab内容区）── */
.sr-sub-panel { display: none; }
.sr-sub-panel.active { display: block; }

/* ── 配置卡片（统一边距+分隔线）── */
.sr-config-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

/* ── agent-editor中的子Tab导航 ── */
.sr-agent-subtabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}
.sr-agent-subtab-btn {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.2s;
}
.sr-agent-subtab-btn:hover { background: var(--primary-light); color: var(--primary); }
.sr-agent-subtab-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.sr-agent-panel { display: none; }
.sr-agent-panel.active { display: block; }

/* ── 文件/配置操作行（标题+右侧按钮）── */
.sr-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 统计卡（小尺寸版本，统一配色）── */
.sr-stat-mini {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: left;
}
.sr-stat-mini .sr-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.sr-stat-mini .sr-stat-label {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  font-weight: 600;
}
.sr-stat-mini.success { border-color: #a5d6a7; background: #f1f8e9; }
.sr-stat-mini.success .sr-stat-num { color: #2e7d32; }
.sr-stat-mini.danger { border-color: #ef9a9a; background: #fff5f5; }
.sr-stat-mini.danger .sr-stat-num { color: #c62828; }

/* ── 批量操作按钮行 ── */
.sr-batch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

/* ── 上传区域 ── */
.sr-upload-zone {
  padding: 32px;
  border: 2px dashed #ccc;
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  background: #fafbfd;
}
.sr-upload-zone:hover {
  border-color: var(--primary);
  background: #f8f9ff;
}

/* ── 设置面板内的小信息提示 ── */
.sr-settings-tip {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── 报告设置中的section包裹 ── */
.sr-settings-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════
   v94: 共享左右布局 — 参考录音分析管线
   左侧: 智能体列表 | 右侧: 配置编辑器(含子Tab)
   用于: 报告智能体 / 门店AI助手 / 统一配置中心
   ═══════════════════════════════════════════════════════════ */

/* ── 左右布局容器 ── */
.sr-lr-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 320px);
  min-height: 480px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sr-lr-left {
  width: 200px;
  min-width: 200px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: #fafbfd;
  padding: 8px 4px;
  flex-shrink: 0;
}
.sr-lr-right {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-width: 0;
}

/* ── 左侧列表项 ── */
.sr-lr-item {
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #555;
  background: transparent;
}
.sr-lr-item:hover { background: #e8eaf6; color: var(--primary); }
.sr-lr-item.active { background: var(--primary); color: #fff; font-weight: 600; border-color: var(--primary); }
.sr-lr-item .sr-lr-icon { font-size: 16px; flex-shrink: 0; }
.sr-lr-item .sr-lr-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-lr-item .sr-lr-badge {
  font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 600; flex-shrink: 0;
}
.sr-lr-item .sr-lr-badge.blue { background: #e3f2fd; color: #1565c0; }
.sr-lr-item .sr-lr-badge.orange { background: #fff3e0; color: #e65100; }
.sr-lr-item .sr-lr-badge.purple { background: #f3e5f5; color: #7b1fa2; }

/* ── 左侧列表分组标题 ── */
.sr-lr-section {
  font-size: 10px; padding: 8px 10px 4px; text-transform: uppercase;
  letter-spacing: 0.5px; color: #999; font-weight: 600;
}
.sr-lr-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ── 右侧编辑器头部 ── */
.sr-lr-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f0f2f5;
}
.sr-lr-header-info { flex: 1; }
.sr-lr-header-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 16px; font-weight: 700; color: #333;
}
.sr-lr-header-id {
  font-size: 10px; background: #e8eaf6; color: var(--primary);
  padding: 2px 8px; border-radius: 10px; font-family: monospace;
}
.sr-lr-header-desc { font-size: 12px; color: #888; margin-top: 4px; }
.sr-lr-save-btn {
  padding: 9px 22px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer; font-size: 13px;
  font-weight: 600; box-shadow: 0 1px 3px rgba(102,126,234,0.3);
  flex-shrink: 0; margin-left: 16px; white-space: nowrap;
}

/* ── 右侧编辑器子Tab导航 ── */
.sr-lr-subtabs {
  display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 14px;
}
.sr-lr-stab {
  padding: 8px 14px; border-radius: 6px 6px 0 0; font-size: 12px; color: #888;
  cursor: pointer; border: 1px solid transparent; border-bottom: none;
  margin-bottom: -2px; background: transparent; transition: all 0.2s;
}
.sr-lr-stab:hover { color: var(--primary); }
.sr-lr-stab.active {
  background: #fff; color: var(--primary); font-weight: 700; border-color: var(--border);
}

/* ── 右侧编辑表单通用 ── */
.sr-lr-label {
  font-size: 12px; color: var(--primary); font-weight: 600; display: block; margin-bottom: 3px;
}
.sr-lr-textarea {
  width: 100%; font-family: monospace; font-size: 12px; border: 1px solid #ddd;
  border-radius: 6px; padding: 10px; resize: vertical; line-height: 1.6; background: #fff;
}
.sr-lr-input {
  width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.sr-lr-select {
  width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.sr-lr-field { margin-bottom: 12px; }
.sr-lr-hint { margin-bottom: 8px; font-size: 11px; color: #888; line-height: 1.5; }
.sr-lr-scope {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
.sr-lr-scope-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 10px; background: #f5f5f5; color: #888;
}
.sr-lr-scope-tag.backend { background: #fff3e0; color: #e65100; }
.sr-lr-scope-tag.store { background: #e8f5e9; color: #2e7d32; }
.sr-lr-panel { display: none; }
.sr-lr-panel.active { display: block; }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .ai-layout, .rp-layout, .sr-lr-layout { flex-direction: column; height: auto; }
  .ai-sidebar, .rp-sidebar, .sr-lr-left { width: 100%; border-left: none; border-top: 1px solid var(--border); border-right: none; }
  .ai-msg-bubble { max-width: 90%; }
  .rp-chat-bubble { max-width: 90%; }
}

/* ═══════════════════════════════════════════════════════════
   v69: QA 问答助手样式
   ═══════════════════════════════════════════════════════════ */

.qa-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - 210px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.qa-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.qa-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

.qa-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.qa-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

.qa-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.qa-welcome h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.qa-welcome p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.qa-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 560px;
}

.qa-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.qa-quick-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* QA 消息 */
.qa-msg {
  display: flex;
  margin-bottom: 12px;
  gap: 10px;
  animation: msgIn .3s ease;
}

.qa-msg.user { justify-content: flex-end; }
.qa-msg.assistant { justify-content: flex-start; }

.qa-msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.qa-msg.user .qa-msg-avatar { background: var(--primary-light); }
.qa-msg.assistant .qa-msg-avatar { background: var(--primary-light); }

.qa-msg-content {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qa-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.qa-msg.user .qa-msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.qa-msg.assistant .qa-msg-bubble {
  background: var(--card);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* QA 技能跟踪 */
.qa-skill-trace {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  flex-wrap: wrap;
}

.qa-skill-dot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 10px;
}

/* QA 输入区 */
.qa-chat-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--card);
}

/* QA 侧边栏 */
.qa-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
  background: #fafbfc;
}

.qa-skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
}

.qa-skill-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* 技能标签 */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  background: #f0f0f0;
  color: #999;
  transition: all 0.2s;
}

.skill-tag.skill-on {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* QA 报告快捷芯片 */
.rp-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.rp-quick-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* spinner-sm */
.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

/* 报告预览 */
.rp-report-preview {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

/* ── v4.0: QA 指令提示栏 ── */
.qa-prompt-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fc 100%);
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.qa-prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  color: #5c6bc0;
  background: #fff;
  border: 1px solid #d1d9ff;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.qa-prompt-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── v4.0: KB 切换开关 ── */
.qa-kb-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
}

.qa-kb-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ── v4.0: KB来源卡片 ── */
.qa-kb-source {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f5f7fa;
  border-radius: 8px;
  border-left: 3px solid var(--primary-light);
}

.qa-kb-source-item {
  margin-top: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════
   v98: 门店数据中心 Dashboard 样式
   ═══════════════════════════════════════════════════════════ */

.ds-shell { padding: 0; }
.ds-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.ds-header h2 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }

.ds-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-tab-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); font-size: 13px; cursor: pointer; color: var(--text-secondary); transition: all .15s; white-space: nowrap; }
.ds-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.ds-tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ds-content { min-height: 300px; }

.ds-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ds-cards-sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ds-card { background: var(--card); border: 1px solid var(--border-light); border-radius: 10px; padding: 14px 16px; text-align: center; }
.ds-card-val { font-size: 28px; font-weight: 800; line-height: 1.2; }
.ds-card-unit { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-left: 2px; }
.ds-card-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.ds-section { background: var(--card); border: 1px solid var(--border-light); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.ds-section-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

.ds-row { display: flex; gap: 14px; flex-wrap: wrap; }
.ds-row-2col > * { flex: 1; min-width: 280px; }

.ds-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.ds-bar-label { width: 100px; flex-shrink: 0; color: var(--text-secondary); font-weight: 500; }
.ds-bar-track { flex: 1; height: 20px; background: #f0f0f0; border-radius: 10px; overflow: hidden; }
.ds-bar-fill { height: 100%; border-radius: 10px; transition: width .3s; min-width: 4px; }
.ds-bar-val { width: 60px; text-align: right; color: var(--text); font-weight: 600; flex-shrink: 0; }
.ds-bar-score { width: 50px; text-align: right; color: var(--text-muted); font-size: 11px; flex-shrink: 0; }

.ds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-table th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border); white-space: nowrap; }
.ds-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-light); color: var(--text); }
.ds-table tr:hover { background: #fafbfc; }
.ds-rank { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 700; margin-right: 4px; }

.ds-trend { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; overflow-x: auto; }
.ds-trend-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 16px; }
.ds-trend-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; cursor: pointer; }
.ds-trend-label { font-size: 9px; color: var(--text-muted); transform: rotate(-45deg); white-space: nowrap; margin-top: 4px; }

.ds-insight { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.5; }
.ds-insight-icn { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ds-insight strong { display: block; margin-bottom: 2px; }
.ds-insight small { color: var(--text-muted); }

.ds-audit-item { background: var(--card); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.ds-audit-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ds-audit-count { margin-left: auto; font-weight: 600; color: var(--text-secondary); font-size: 14px; }
.ds-audit-item p { font-size: 13px; color: var(--text-secondary); margin: 6px 0 10px; }

.ds-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.ds-ok { background: #e6f4ea; color: var(--success); }
.ds-fail { background: #fce8e6; color: var(--danger); }
.ds-rank-badge { background: var(--primary-light); color: var(--primary); padding: 2px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; }

.score-high { color: #059669; font-weight: 700; }
.score-mid { color: #D97706; font-weight: 600; }
.score-low { color: #DC2626; font-weight: 600; }
.ds-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.ds-member-sidebar { width: 200px; flex-shrink: 0; background: var(--card); border: 1px solid var(--border-light); border-radius: 10px; padding: 12px; }
.ds-member-btn { display: block; width: 100%; padding: 8px 12px; border: none; background: none; text-align: left; cursor: pointer; border-radius: 6px; margin-bottom: 4px; font-size: 13px; color: var(--text-secondary); transition: all .15s; }
.ds-member-btn:hover { background: var(--primary-light); color: var(--primary); }
.ds-member-btn.active { background: var(--primary); color: #fff; }
.ds-member-btn small { display: block; font-size: 10px; color: inherit; opacity: .8; }
.ds-member-detail { flex: 1; min-width: 0; }

.ds-accounts-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ds-accounts-count { font-weight: 600; color: var(--text); font-size: 14px; }
.ds-col-chk { width: 30px; }
.ds-actions { white-space: nowrap; font-size: 12px; }
.ds-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--card); }
.ds-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.ds-input:focus { outline: none; border-color: var(--primary); }

.ds-modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000; justify-content: center; align-items: center; }
.ds-modal-content { background: var(--card); border-radius: 12px; width: 420px; max-width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.ds-modal-header { padding: 14px 18px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.ds-modal-close { cursor: pointer; font-size: 20px; color: var(--text-muted); }
.ds-modal-body { padding: 18px; }
.ds-modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.ds-field { margin-bottom: 12px; }
.ds-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }

.ds-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.ds-error { text-align: center; padding: 40px; color: var(--danger); }
.ds-empty { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }
.ds-footer { text-align: center; padding: 16px; font-size: 11px; color: var(--text-muted); }
.ds-hint { font-size: 12px; color: var(--text-muted); }

/* QA 响应式 */
@media (max-width: 768px) {
  .qa-layout { flex-direction: column; height: auto; }
  .qa-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .qa-msg-content { max-width: 90%; }
  .rp-quick-chip { font-size: 11px; padding: 6px 12px; }
  .qa-prompt-bar { gap: 4px; justify-content: center; }
  .qa-prompt-chip { font-size: 10px; padding: 3px 8px; }
}