/* ==========================================
   企业AI智脑 SAAS平台 - 主样式表 v1.0
   从 index.html 提取, ~350 行
   ========================================== */

:root {
  --bg: #0f1923; --card-bg: #1a2332; --card-hover: #1e2d3d;
  --bg-tertiary: #141d2b;
  --sidebar-bg: #0a1119; --primary: #00d4aa; --danger: #ff4757;
  --warning: #ffa502; --info: #3742fa; --text: #e0e6ed;
  --text-muted: #8899aa; --border: #2a3a4a; --radius: 10px;
  --bg-card: #1a2332; --bg-disabled: #1e2d3d;
  /* v6.5+ 扩展调色板 */
  --indigo: #6366f1; --indigo-light: #818cf8; --indigo-dark: #4f46e5;
  --emerald: #22c55e; --emerald-light: #4ade80; --emerald-dark: #16a34a;
  --amber: #f59e0b; --amber-light: #fbbf24; --amber-dark: #d97706;
  --rose: #f43f5e; --rose-light: #fb7185; --rose-dark: #e11d48;
  --cyan: #06b6d4; --cyan-light: #22d3ee; --cyan-dark: #0891b2;
  --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --card-glass: rgba(26,35,50,.7); --card-glass-hover: rgba(30,45,61,.85);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.35);
  --shadow-glow-indigo: 0 0 20px rgba(99,102,241,.25);
  --shadow-glow-emerald: 0 0 20px rgba(34,197,94,.2);
  /* v20260813 AI 消息输入统一变量组（基类 .ai-input-base 数据源，值=各入口现状，保证收敛后视觉零变化） */
  --ai-input-bg: #141c26;           /* 输入框底色（AI Hub 原硬编码） */
  --ai-input-border: #1a2330;       /* 输入框边框（AI Hub 原硬编码） */
  --ai-input-radius: 12px;          /* 输入框圆角（AI Hub 原硬编码） */
  --ai-input-text: #e2e8f0;         /* 输入文字色（AI Hub 原硬编码） */
  --ai-input-ph: var(--text-muted); /* 占位符统一标准：#8899aa */
  --ai-input-gap: 8px;              /* 输入行内元素间距 */
}
/* ──── 全局滚动条彻底隐藏 ──── */
* { scrollbar-width:none !important; -ms-overflow-style:none !important; }
*::-webkit-scrollbar { display:none !important; width:0 !important; height:0 !important; }

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; background:var(--bg); color:var(--text); display:flex; height:100vh; overflow:hidden; }
.sidebar { width:220px; background:var(--sidebar-bg); padding:20px 0; display:flex; flex-direction:column; border-right:1px solid var(--border); flex-shrink:0; overflow-y:auto; }
/* 侧边栏滚动条美化 */
.sidebar::-webkit-scrollbar { width:4px; }
.sidebar::-webkit-scrollbar-track { background:transparent; }
.sidebar::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background:var(--primary); }
/* Firefox */
.sidebar { scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.sidebar .logo { padding:0 20px 14px; font-size:16px; font-weight:700; color:var(--primary); border-bottom:1px solid var(--border); margin-bottom:0; display:flex; align-items:center; gap:8px; }
.sidebar .logo .dot { width:10px; height:10px; background:var(--primary); border-radius:50%; animation:pulse 2s infinite; }
/* 品牌 logo（2026-11-06 二次替换：业主改用**深蓝底**版 KoiFlow AI 图）
   图自带深蓝背景，再套一层白底就变成白框，故改透明底 + 1px 微亮描边：
   视觉上像一块嵌进侧栏的品牌牌，而不是贴上去的白纸。 */
.sidebar .logo img { display:block; width:100%; height:auto; background:transparent; border-radius:6px;
  padding:0; box-sizing:border-box; box-shadow:0 0 0 1px rgba(255,255,255,.07); }
/* 登录卡品牌图：占满卡片内宽（上限 250），替代原「🔍 AI销售漏单雷达」文字标题 */
.login-card h1.login-brand { margin:0 0 14px; padding:0; line-height:0; text-align:center; font-size:0; }
.login-card .login-logo { display:block; width:100%; max-width:250px; height:auto; margin:0 auto; background:transparent;
  border-radius:10px; padding:0; box-sizing:border-box; box-shadow:0 0 0 1px rgba(255,255,255,.08); }
@keyframes spin { to{transform:rotate(360deg)} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.spinner { display:inline-block;width:16px;height:16px;border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle;margin-left:4px; }
/* P4: 骨架屏加载动画 */
@keyframes skeletonPulse { 0%,100%{opacity:.3} 50%{opacity:.6} }
.skeleton-line { height:12px;background:var(--border);border-radius:6px;animation:skeletonPulse 1.5s ease-in-out infinite; }
.skeleton-card { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:16px; }
.skeleton-card .sk-val { height:28px;width:55%;margin-bottom:6px; }
.skeleton-card .sk-label { height:12px;width:40%; }
.skeleton-chart { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:16px;margin-top:14px; }
.skeleton-chart .sk-bars { display:flex;align-items:flex-end;gap:10px;height:110px;padding:0 8px; }
.skeleton-chart .sk-bar { flex:1;height:100%;background:var(--border);border-radius:5px 5px 0 0;animation:skeletonPulse 1.5s ease-in-out infinite;animation-delay:calc(var(--i,0)*.15s); }
.skeleton-table { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:14px; }
.skeleton-table .sk-row { display:flex;gap:12px;margin-bottom:10px; }
.skeleton-table .sk-col { flex:1;height:10px;background:var(--border);border-radius:4px;animation:skeletonPulse 1.5s ease-in-out infinite;animation-delay:calc(var(--i,0)*.1s); }

/* ===== 360全景视窗 · 通用组件（新增，独立命名，不覆盖既有规则） ===== */
/* --- 页头 --- */
.p360-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px;flex-wrap:wrap; }
.p360-head .p360-hd-left { display:flex;align-items:center;gap:12px;min-width:0; }
.p360-head .p360-ico { width:42px;height:42px;flex:0 0 42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;
  background:linear-gradient(135deg,var(--indigo),var(--cyan));box-shadow:var(--shadow-glow-indigo); }
.p360-head h2 { margin:0;font-size:19px;font-weight:700;letter-spacing:.2px; }
.p360-head p { margin:5px 0 0;color:var(--text-muted);font-size:12px; }
.p360-head .p360-tags { display:inline-flex;gap:6px;margin-left:2px;flex-wrap:wrap; }
.p360-head .p360-tag { font-size:11px;padding:1px 7px;border-radius:999px;border:1px solid var(--border);color:var(--text-muted);background:var(--bg-tertiary); }

/* --- 健康分 Hero 横幅（经营总览顶部主视觉，替代原页头） --- */
.bi-health-hero { --health:#22c55e; display:flex;align-items:center;gap:28px;padding:28px 32px;margin-bottom:20px;
  border-radius:16px;background:linear-gradient(135deg,var(--bg-tertiary) 0%,var(--card-bg) 62%);
  border:1px solid var(--border);box-shadow:var(--shadow-lg);position:relative;overflow:hidden; }
.bi-health-hero::before { content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--health);opacity:.9; }
.bi-health-hero .bh-score { display:flex;flex-direction:column;align-items:flex-start;min-width:150px; }
.bi-health-hero .bh-num { font-size:60px;font-weight:800;line-height:1;color:var(--health);letter-spacing:-1px;font-variant-numeric:tabular-nums; }
.bi-health-hero .bh-cap { font-size:12px;color:var(--text-muted);margin-top:8px;letter-spacing:.5px; }
.bi-health-hero .bh-badge { display:inline-flex;align-items:center;gap:7px;margin-top:14px;font-size:13px;font-weight:600;color:var(--health);
  background:rgba(255,255,255,.04);border:1px solid var(--border);border-radius:999px;padding:5px 12px; }
.bi-health-hero .bh-dot { width:8px;height:8px;border-radius:50%;background:var(--health);flex-shrink:0;box-shadow:0 0 8px var(--health); }
.bi-health-hero .bh-divider { width:1px;align-self:stretch;background:var(--border); }
.bi-health-hero .bh-main { flex:1;min-width:0; }
.bi-health-hero .bh-state { font-size:18px;font-weight:700;letter-spacing:.2px; }
.bi-health-hero .bh-desc { font-size:13px;color:var(--text-muted);margin-top:10px;line-height:1.7; }
.bi-health-hero .bh-desc b.bh-warn { color:var(--rose);font-weight:600; }
.bi-health-hero .bh-desc b.bh-tip { color:var(--amber);font-weight:600; }
@media (max-width:720px) {
  .bi-health-hero { flex-wrap:wrap;gap:18px;padding:22px 20px; }
  .bi-health-hero .bh-divider { display:none; }
  .bi-health-hero .bh-num { font-size:46px; }
  .bi-health-hero .bh-main { flex-basis:100%; }
}

/* ============================================================
   经营诊断（diagnosis）专用组件 — 列表/指标条/现金流/六段式洞察
   设计原则：按数据语义选组件，非一律卡片
   ============================================================ */
/* 分区标题：左侧色条 + 标题 + 计数徽标 */
.diag-sec { margin-bottom:18px; }
.diag-sec-hd { display:flex;align-items:center;gap:10px;margin:0 0 12px; }
.diag-sec-hd .ds-ico { font-size:16px;line-height:1; }
.diag-sec-hd .ds-title { font-size:15px;font-weight:700;color:var(--text);letter-spacing:.2px; }
.diag-sec-hd .ds-bar { width:3px;height:15px;border-radius:2px;background:var(--primary); }
.diag-sec-hd .ds-count { font-size:11px;font-weight:700;color:var(--text-muted);background:rgba(255,255,255,.05);border:1px solid var(--border);border-radius:999px;padding:1px 8px; }
.diag-sec-hd .ds-sub { font-size:11px;color:var(--text-muted);margin-left:auto; }

/* 指标条：横向 KPI 带（比卡片更紧凑，适合并列数字） */
.diag-kpis { display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;margin-bottom:18px;
  background:var(--border);border:1px solid var(--border);border-radius:12px;overflow:hidden; }
.diag-kpi { background:var(--card-bg);padding:15px 16px;display:flex;flex-direction:column;gap:5px;transition:background .18s ease; }
.diag-kpi:hover { background:var(--card-hover); }
.diag-kpi .dk-lbl { font-size:11px;color:var(--text-muted);letter-spacing:.3px;display:flex;align-items:center;gap:4px; }
.diag-kpi .dk-val { font-size:21px;font-weight:700;color:var(--text);line-height:1.15;letter-spacing:-.4px;font-variant-numeric:tabular-nums; }
.diag-kpi .dk-hint { font-size:10px;color:var(--text-muted); }

/* 预警/关注/好消息：时间轴式列表（左侧色条，非卡片） */
.diag-list { display:flex;flex-direction:column;gap:8px; }
.diag-item { position:relative;padding:11px 14px 11px 16px;border-radius:9px;background:var(--card-bg);
  border:1px solid var(--border);border-left-width:3px;transition:transform .15s ease,border-color .15s ease; }
.diag-item:hover { transform:translateX(2px); }
.diag-item .di-title { font-size:13px;font-weight:600;line-height:1.45; }
.diag-item .di-detail { font-size:11.5px;color:var(--text-muted);line-height:1.6;margin-top:4px; }
.diag-item .di-action { font-size:11.5px;color:var(--emerald);line-height:1.55;margin-top:5px; }
.diag-item .di-action::before { content:'→ '; }
.diag-item.red { border-left-color:var(--rose);background:linear-gradient(90deg,rgba(244,63,94,.07),var(--card-bg) 60%); }
.diag-item.red .di-title { color:var(--rose); }
.diag-item.yellow { border-left-color:var(--warning);background:linear-gradient(90deg,rgba(255,165,2,.07),var(--card-bg) 60%); }
.diag-item.yellow .di-title { color:var(--warning); }
.diag-item.green { border-left-color:var(--emerald);background:linear-gradient(90deg,rgba(34,197,94,.07),var(--card-bg) 60%); }
.diag-item.green .di-title { color:var(--emerald); }
/* 明细行（列表内嵌数据，如逾期订单） */
.diag-item .di-rows { margin-top:8px;border-top:1px dashed var(--border);padding-top:6px; }
.diag-item .di-row { display:flex;justify-content:space-between;gap:12px;font-size:11px;padding:3px 0;color:var(--text-muted); }
.diag-item .di-row .di-r-amt { color:var(--rose);font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap; }

/* AI 六段式洞察卡：fact/cause/action/budget/effect/risk */
.diag-insight { border:1px solid rgba(99,102,241,.28);border-radius:14px;overflow:hidden;margin-bottom:18px;
  background:linear-gradient(135deg,rgba(99,102,241,.07),rgba(139,92,246,.03) 55%,transparent); }
.diag-insight .di-hd { display:flex;align-items:center;gap:9px;padding:13px 18px;border-bottom:1px solid rgba(99,102,241,.2); }
.diag-insight .di-hd .di-hd-ico { font-size:17px;line-height:1; }
.diag-insight .di-hd .di-hd-title { font-size:14px;font-weight:700;color:var(--text); }
.diag-insight .di-hd .di-hd-tag { font-size:10px;font-weight:700;color:var(--indigo);background:rgba(99,102,241,.15);border:1px solid rgba(99,102,241,.3);border-radius:999px;padding:2px 9px;letter-spacing:.4px; }
.diag-insight .di-summary { padding:14px 18px;font-size:13px;line-height:1.75;color:var(--text);border-bottom:1px solid rgba(99,102,241,.14); }
.diag-insight .di-cards { display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;padding:14px 18px 18px; }
.diag-icard { border:1px solid var(--border);border-radius:11px;background:var(--card-bg);padding:14px 15px;position:relative;overflow:hidden; }
.diag-icard::before { content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--pn,var(--indigo)); }
.diag-icard.p-high { --pn:var(--rose); }
.diag-icard.p-mid, .diag-icard.p-medium { --pn:var(--warning); }
.diag-icard.p-low { --pn:var(--emerald); }
.diag-icard .dic-pri { display:inline-block;font-size:9.5px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;
  color:var(--pn,var(--indigo));background:rgba(255,255,255,.05);border:1px solid var(--border);border-radius:5px;padding:1px 6px;margin-bottom:9px; }
.diag-icard .dic-seg { display:flex;gap:8px;margin-bottom:7px;font-size:11.5px;line-height:1.6; }
.diag-icard .dic-seg:last-child { margin-bottom:0; }
.diag-icard .dic-k { flex:0 0 42px;color:var(--text-muted);font-weight:600; }
.diag-icard .dic-v { flex:1;min-width:0;color:var(--text); }
.diag-icard .dic-seg.is-action .dic-v { color:var(--emerald); }
.diag-icard .dic-seg.is-risk .dic-v { color:var(--rose); }

/* 图表卡：两列自适应，承载 ECharts */
.diag-charts2 { display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin-bottom:18px; }
.diag-chart-card { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:14px 16px 10px;min-width:0;overflow:hidden; }
.diag-chart-card .dcc-title { font-size:12.5px;font-weight:700;color:var(--text);margin-bottom:6px;display:flex;align-items:center;gap:6px; }
.diag-chart-card > div[id^="diag"] { min-height:60px; }

@media (max-width:720px) {
  .diag-insight .di-cards { grid-template-columns:1fr; }
  .diag-charts2 { grid-template-columns:1fr; }
}

/* --- 提示条 --- */
.notice-bar { position:relative;border-radius:var(--radius);padding:13px 16px 13px 44px;margin-bottom:16px;font-size:13px;color:var(--text);
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;box-shadow:var(--shadow-sm);overflow:hidden; }
.notice-bar::before { content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:currentColor;opacity:.9; }
.notice-bar .nb-ico { position:absolute;left:15px;top:50%;transform:translateY(-50%);font-size:16px;line-height:1; }
.notice-bar.warn { background:linear-gradient(90deg,rgba(255,165,2,.14),rgba(255,165,2,.05));border:1px solid rgba(255,165,2,.35);color:var(--warning); }
.notice-bar.warn .nb-txt { color:var(--text); }
.notice-bar.info { background:linear-gradient(90deg,rgba(99,102,241,.14),rgba(99,102,241,.05));border:1px solid rgba(99,102,241,.35);color:var(--indigo); }
.notice-bar.info .nb-txt { color:var(--text); }

/* --- 统计卡（视觉升级：顶部色条 + 图标 + 大数字） --- */
.bi-cross-stats { margin-bottom:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:12px; }
.bi-cross-stats .stat-card { position:relative;cursor:default;padding:16px 14px 14px;text-align:left;overflow:hidden;
  background:var(--card-bg);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.bi-cross-stats .stat-card::after { content:'';position:absolute;left:0;right:0;top:0;height:3px;background:var(--sc,var(--indigo));opacity:.85; }
.bi-cross-stats .stat-card:hover { transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:var(--sc,var(--indigo)); }
.bi-cross-stats .sc-top { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.bi-cross-stats .sc-ico { font-size:16px;line-height:1;opacity:.95; }
.bi-cross-stats .stat-value { font-size:24px;font-weight:700;color:var(--text);line-height:1.15;letter-spacing:-.5px;
  font-variant-numeric:tabular-nums; }
.bi-cross-stats .stat-value .sc-unit { font-size:12px;font-weight:500;color:var(--text-muted);margin-left:3px;letter-spacing:0; }
.bi-cross-stats .stat-label { font-size:11px;letter-spacing:.3px;text-transform:none;margin:6px 0 0;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.bi-cross-stats .stat-card.is-money .stat-value { color:var(--emerald); }
.bi-cross-stats .stat-card.is-money::after { background:var(--emerald); }

/* --- 数据表格 --- */
.data-table-wrap { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;overflow:auto;box-shadow:var(--shadow-sm); }
.data-table thead th { background:linear-gradient(180deg,var(--bg-tertiary),var(--bg));font-size:11px;letter-spacing:.4px;color:var(--text-muted);text-transform:uppercase; }
.data-table tbody tr { transition:background .15s ease; }
.data-table tbody tr:hover { background:var(--card-hover)!important; }
.data-table tbody tr td:first-child { border-left:2px solid transparent; }
.data-table tbody tr:hover td:first-child { border-left-color:var(--primary); }
.data-table .evt-tag { display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;font-size:11px;color:#fff;white-space:nowrap;font-weight:500; }
.data-table .evt-tag .dot { width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.85);flex:0 0 6px; }
.data-table .muted { color:var(--text-muted); }
.data-table .chain-link { display:inline-flex;align-items:center;gap:3px;color:var(--primary);font-weight:500;text-decoration:none; }
.data-table .chain-link:hover { text-decoration:underline; }

/* --- 空态 / 错误态 --- */
.cross-state { text-align:center;padding:44px 20px;color:var(--text-muted);background:var(--card-bg);border:1px dashed var(--border);border-radius:12px; }
.cross-state .cs-ico { font-size:34px;line-height:1;margin-bottom:12px;opacity:.6; }
.cross-state .cs-title { font-size:14px;font-weight:600;color:var(--text);margin-bottom:6px; }
.cross-state .cs-desc { font-size:12px;color:var(--text-muted);margin-bottom:14px; }
.cross-state-err { color:var(--rose);border-color:rgba(244,63,94,.4); }
.cross-state-err .cs-title { color:var(--rose); }

/* 深色主题下 date/month 原生日历图标默认是黑色，切到深色渲染让图标变浅白 */
.filter-bar input[type="month"],
.filter-bar input[type="date"] { color-scheme: dark; }

/* --- 归因链抽屉 --- */
.chain-wrap { min-width:0; }
.chain-sub { color:var(--text-muted);font-size:12px;margin-bottom:14px; }
.chain-sec { font-weight:600;font-size:13px;margin:12px 0 6px;display:flex;align-items:center;gap:6px; }
.chain-sec .cs-cnt { font-size:11px;color:var(--text-muted);font-weight:400; }
.chain-row { position:relative;display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px;line-height:1.7;
  padding:8px 10px 8px 22px;background:var(--bg-tertiary);border-radius:8px;margin:5px 0;border-left:2px solid var(--indigo); }
.chain-row .chain-txt { color:var(--text);word-break:break-all; }
.chain-row .chain-time { color:var(--text-muted);flex:0 0 auto;white-space:nowrap;font-variant-numeric:tabular-nums; }
.chain-empty { color:var(--text-muted);padding:18px;text-align:center; }
/* 窄屏：表格转卡片（仅作用于 .data-table.responsive，不影响其它 .data-table 用法） */
@media (max-width:900px) {
  .data-table.responsive thead { display:none; }
  .data-table.responsive, .data-table.responsive tbody,
  .data-table.responsive tr, .data-table.responsive td { display:block;width:100%; }
  .data-table.responsive tr { border:1px solid var(--border);border-radius:var(--radius);margin-bottom:10px;padding:8px;background:var(--card-bg); }
  .data-table.responsive td { border:none;padding:4px 6px;display:flex;justify-content:space-between;gap:12px;align-items:baseline;min-width:0; }
  .data-table.responsive td::before { content:attr(data-label);color:var(--text-muted);font-size:11px;flex:0 0 auto;white-space:nowrap; }
  .data-table.responsive td::after { content:''; }
  /* 值区域可换行，防止长文本/长键撑破卡片 */
  .data-table.responsive { min-width:0;table-layout:fixed; }
  .data-table.responsive tbody td { overflow-wrap:anywhere;word-break:break-word;text-align:right; }
  .data-table.responsive tbody td > span,
  .data-table.responsive tbody td > a { min-width:0;overflow-wrap:anywhere; }
  .data-table-wrap { max-width:100%;overflow-x:hidden; }
}

/* ===== 部门架构美化 ===== */
.dept-card { background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:16px 18px;margin-bottom:6px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative; }
.dept-card:hover { border-color:var(--primary);box-shadow:0 4px 20px rgba(0,0,0,.1);transform:translateY(-1px); }
.dept-card-root { border-color:var(--primary);border-width:1.5px; }
.dept-card-root .dept-card-bar { display:block; }
.dept-card-bar { display:none;position:absolute;left:0;top:8px;bottom:8px;width:4px;background:var(--color-accent,var(--primary));border-radius:0 3px 3px 0; }
.dept-badge { font-size:10px;padding:2px 8px;border-radius:10px;font-weight:600;display:inline-flex;align-items:center;gap:3px; }
.dept-badge-root { background:rgba(0,212,170,.12);color:var(--primary); }
.dept-badge-children { background:var(--bg);color:var(--text-muted);border:1px solid var(--border); }
.dept-icon { width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;transition:transform .2s; }
.dept-card:hover .dept-icon { transform:scale(1.08); }
.dept-tree-indent { display:flex;flex-shrink:0; }
.dept-tree-indent-line { width:24px;flex-shrink:0;border-left:1.5px dashed var(--border); }
.dept-tree-indent-corner { width:24px;flex-shrink:0;display:flex;align-items:flex-start; }
.dept-tree-indent-corner::before { content:'';display:block;width:12px;height:22px;border-left:1.5px dashed var(--border);border-bottom:1.5px dashed var(--border);border-radius:0 0 0 6px;margin-top:-11px; }
.sidebar .nav-group { margin:4px 0; }
.sidebar .nav-group-header { padding:10px 20px 6px; font-size:12px; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; user-select:none; }
.sidebar .nav-group-header:hover { color:var(--text); }
.sidebar .nav-group-header .arrow { font-size:8px; transition:transform .2s; }
.sidebar .nav-group-header.collapsed .arrow { transform:rotate(-90deg); }
.sidebar .nav-group-items { overflow:hidden; transition:max-height .3s ease; max-height:600px; }
.sidebar .nav-group-items.collapsed { max-height:0; }
/* 嵌套分组：分类字典 */
.sidebar .nav-group-nested { margin:0 0 0 24px; border-left:2px solid var(--border); }
.sidebar .nav-group-header-nested { padding:8px 16px 6px 12px; font-size:12px; color:var(--text-muted); text-transform:none; letter-spacing:0; cursor:pointer; display:flex; justify-content:space-between; align-items:center; user-select:none; }
.sidebar .nav-group-header-nested:hover { color:var(--text); }
.sidebar .nav-group-header-nested .icon { width:16px; text-align:center; font-size:13px; display:inline-flex; align-items:center; justify-content:center; margin-right:6px; }
.sidebar .nav-item-nested { padding:8px 16px 8px 34px; font-size:12px; }
/* 首页工作台永久展开 — CSS 级防御，免疫任何 JS 时序问题 */
#nav-group-header-home.collapsed .arrow { transform:none !important; }
#nav-group-items-home.collapsed { max-height:600px !important; }
.sidebar .nav-item { padding:10px 20px 10px 28px; cursor:pointer; display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-muted); transition:.2s; border-left:3px solid transparent; }
.sidebar .nav-item:hover, .sidebar .nav-item.active { color:var(--text); background:rgba(0,212,170,.08); border-left-color:var(--primary); }
.sidebar .nav-item .icon { width:18px; text-align:center; font-size:15px; display:inline-flex; align-items:center; justify-content:center; }
.sidebar .nav-group-icon { width:16px; height:16px; display:inline-block; vertical-align:middle; margin-right:6px; color:var(--text-muted); flex-shrink:0; }
.sidebar .nav-group-header:hover .nav-group-icon { color:var(--text); }
.sidebar .user-section { margin-top:auto; padding:15px 20px; border-top:1px solid var(--border); }
.sidebar .user-section .user-name { font-size:14px; color:var(--text); font-weight:600; }
.sidebar .user-section .user-dept { font-size:13px; color:#c0cfdd; margin-top:2px; font-weight:500; }
.sidebar .user-section .user-role { font-size:11px; color:var(--text-muted); margin-top:1px; }
.sidebar .user-section .logout-btn { margin-top:8px; padding:5px 12px; background:rgba(255,71,87,.15); color:var(--danger); border:none; border-radius:4px; cursor:pointer; font-size:12px; }
.main { flex:1; overflow-y:auto; padding:24px; scrollbar-width:none; -ms-overflow-style:none; }
.main::-webkit-scrollbar { display:none; }
.page { display:none; }
.page.active { display:block; }
.header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; flex-wrap:wrap; gap:8px; }
.header h1 { font-size:22px; font-weight:700; }
.header .actions { display:flex; gap:10px; flex-wrap:wrap; }
/* 商城聚合页 header — 标题在上/tabs在下（覆盖 space-between） */
.page[id^="page-mall-"] .header { flex-direction: column; align-items: flex-start; gap: 12px; }
.agg-tab { white-space: nowrap; flex-shrink: 0; }
.btn { padding:8px 18px; border-radius:6px; border:none; cursor:pointer; font-size:13px; font-weight:600; transition:.2s; display:inline-flex; align-items:center; gap:6px; }
.btn-primary { background:var(--primary); color:#000; } .btn-primary:hover { opacity:.85; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-warning { background:var(--warning); color:#000; }
/* AI 功能按钮：气泡感/微立体/高可见（专治深色背景撞色） */
.btn-ai {
  background: linear-gradient(135deg, #00d4aa 0%, #38b6ff 100%);
  color: #0a1119;
  border-radius: 20px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 212, 170, .25), inset 0 1px 0 rgba(255,255,255,.35);
  font-weight: 700;
}
.btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 212, 170, .35);
  opacity: .95;
}
.btn-ai-sm { padding: 5px 14px; font-size: 12px; }
.btn-ai-xs { padding: 3px 10px; font-size: 11px; }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-outline:hover { border-color:var(--primary); color:var(--primary); }
.btn-sm { padding:5px 12px; font-size:12px; } .btn-xs { padding:3px 8px; font-size:11px; }
.btn-icon { display:inline-block;width:22px;height:22px;line-height:20px;text-align:center;border-radius:6px;cursor:pointer;font-size:13px;background:none;border:1px solid transparent;margin-left:6px;vertical-align:middle;transition:all .15s;flex-shrink:0; }
.btn-icon:hover { background:rgba(255,255,255,.08); border-color:var(--border); }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { background:var(--card-bg); border-radius:var(--radius); padding:20px; border:1px solid var(--border); transition:.2s; cursor:pointer; position:relative; }
.stat-card:hover { background:var(--card-hover); border-color:var(--primary); }
.stat-card .stat-label { font-size:12px; color:var(--text-muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:1px; }
.stat-card .stat-value { font-size:28px; font-weight:700; }
.stat-card .stat-sub { font-size:12px; color:var(--text-muted); margin-top:4px; }
.stat-card.danger .stat-value { color:var(--danger); }
.stat-card.warning .stat-value { color:var(--warning); }
.stat-card.success .stat-value { color:var(--primary); }
.stat-card .stat-compare { font-size:11px; margin-top:2px; }
.stat-card .stat-compare.up { color:var(--primary); } .stat-card .stat-compare.down { color:var(--danger); }
.stat-card .stat-hint { font-size:10px; color:var(--text-muted); position:absolute; bottom:8px; right:12px; opacity:0; transition:.2s; }
.stat-card:hover .stat-hint { opacity:1; }
.charts-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:24px; }
@media (max-width:1200px) { .charts-row { grid-template-columns:1fr; } }
@media (max-width:768px) {
  body { flex-direction:column; }
  .sidebar { width:100%; flex-direction:row; overflow-x:auto; padding:8px 0; border-right:none; border-bottom:1px solid var(--border); }
  .sidebar .logo { font-size:12px; padding:0 12px 8px; border-bottom:none; margin-bottom:0; white-space:nowrap; }
  .sidebar .nav-item { font-size:11px; padding:8px 10px; white-space:nowrap; border-left:none; border-bottom:2px solid transparent; }
  .sidebar .nav-item.active { border-left-color:transparent; border-bottom-color:var(--primary); }
  .sidebar .user-section { display:none; }
  .main { padding:12px; }
  .stats-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
  .stat-card { padding:12px; }
  .stat-card .stat-value { font-size:20px; }
  .header { flex-direction:column; align-items:flex-start; }
  .header h1 { font-size:16px; }
  .data-table { font-size:11px; }
  .data-table th, .data-table td { padding:6px 8px; }
  .filter-bar { flex-direction:column; }
  .filter-bar select, .filter-bar input { width:100%; }
  .modal { width:95%; max-width:95%; padding:16px; }
  .detail-panel { grid-template-columns:1fr; }
  .modal-lead-detail .detail-panel { grid-template-columns:1fr !important; }
  .form-row { grid-template-columns:1fr; }
  .bind-grid { grid-template-columns:1fr; }
  .knowledge-grid { grid-template-columns:1fr; }
  .cs-container { grid-template-columns:1fr; height:auto; }
  .cs-sidebar { display:none; }
  .cs-chat { height:60vh; }
  .schedule-bar { flex-direction:column; align-items:flex-start; }
}
.chart-card { background:var(--card-bg); border-radius:var(--radius); padding:16px; border:1px solid var(--border); }
.chart-card h3 { font-size:14px; margin-bottom:12px; color:var(--text-muted); }
.chart { width:100%; height:280px; }
.data-table { width:100%; border-collapse:collapse; font-size:13px; }
.data-table th { text-align:left; padding:10px 12px; border-bottom:2px solid var(--border); color:var(--text-muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.5px; white-space:nowrap; }
.data-table td { padding:10px 12px; border-bottom:1px solid var(--border); }
.data-table tr:hover td { background:rgba(0,212,170,.04); }
.data-table .risk-high { color:#f59e0b; font-weight:700; }
.data-table .risk-medium { color:var(--warning); font-weight:600; }
.data-table .risk-low { color:var(--primary); }
.data-table .select-col { width:30px; }
.badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; }
.badge-high { background:rgba(245,158,11,.15); color:#f59e0b; }
.badge-medium { background:rgba(255,165,2,.15); color:var(--warning); }
.badge-low { background:rgba(0,212,170,.15); color:var(--primary); }
.badge-active { background:rgba(55,66,250,.15); color:var(--info); }
.badge-closed { background:rgba(136,153,170,.15); color:var(--text-muted); }
.badge-won { background:rgba(0,212,170,.15); color:var(--primary); }
.badge-lost { background:rgba(245,158,11,.15); color:#f59e0b; }
.modal-overlay { display:none; position:fixed; top:0;left:0; width:100vw; height:100vh; background:rgba(0,0,0,.6); z-index:1000; }
.modal-overlay.show { display:block; backdrop-filter:blur(2px); }
.modal { background:var(--card-bg); border-radius:var(--radius); padding:24px; width:90%; max-width:900px; max-height:85vh; overflow-y:auto; border:1px solid var(--border); box-shadow:0 20px 60px rgba(0,0,0,.35); }
.modal-overlay > .modal:not(.modal-lead-detail) { position:fixed !important; top:50% !important; left:50% !important; transform:translate(-50%,-50%) !important; margin:0 !important; }
/* 线索详情专用大弹窗 - 全新设计 */
.modal-lead-detail {
  width:96% !important;
  max-width:1320px !important;
  height:92vh !important;
  padding:0 !important;
  background:var(--bg) !important;
  border:none !important;
  border-radius:16px !important;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 25px 80px rgba(0,0,0,.5), 0 0 1px rgba(255,255,255,.08) inset;
}
.modal-lead-detail .close { display:none; } /* 隐藏原角落按钮 */
/* 头部内嵌关闭按钮 - 紧贴内容 */
.ld-close-btn {
  width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.06);border:1px solid var(--border);
  color:var(--text-muted);font-size:15px;cursor:pointer;transition:.2s;
  margin-left:8px;flex-shrink:0;line-height:1;
}
.ld-close-btn:hover { background:rgba(251,146,60,.15);color:#fb923c;border-color:rgba(251,146,60,.3); }
/* leadDetailContent 必须是flex容器，否则modal-body的flex:1不生效，无法滚动 */
#leadDetailContent { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.modal-lead-detail .modal-body { padding:24px 32px 24px; overflow-y:auto; flex:1; min-height:0; }
.modal-lead-detail .ld-toolbar { flex-shrink:0; }
.modal h2 { margin-bottom:16px; font-size:18px; }
.modal .close { float:right; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:20px; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:12px; color:var(--text-muted); margin-bottom:4px; font-weight:600; }
.form-group input, .form-group select, .form-group textarea { width:100%; padding:8px 12px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:13px; }
.form-group textarea { min-height:80px; resize:vertical; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.tabs { display:flex; gap:4px; margin-bottom:16px; border-bottom:1px solid var(--border); }
.tab { padding:8px 16px; cursor:pointer; font-size:13px; color:var(--text-muted); border-bottom:2px solid transparent; transition:.2s; }
.tab:hover, .tab.active { color:var(--primary); border-bottom-color:var(--primary); }

/* ===== 人力资源枢纽页 tab 美化 ===== */
.hr-hub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  gap: 4px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.hr-hub-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border-bottom: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s ease;
}
.hr-hub-tabs .tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.hr-hub-tabs .tab.active {
  color: #081018;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,212,170,.25);
}
.hr-hub-tabs .tab svg { stroke: currentColor; }

/* 二级 tab：轻量下划线 */
.hr-sub-tabs {
  border-bottom: 1px solid var(--border);
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 0;
}
.hr-sub-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  letter-spacing: .3px;
}
.hr-sub-tabs .tab:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}
.hr-sub-tabs .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.hr-sub-tabs .tab svg { stroke: currentColor; }

/* ===== 分类字典聚合页 tab 美化 ===== */
.cd-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.cd-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border-bottom: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s ease;
}
.cd-tabs .tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.cd-tabs .tab.active {
  color: #081018;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,212,170,.25);
}
.cd-tabs .tab svg { stroke: currentColor; }

/* 分类字典页内部的二级 tab */
.cd-sub-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 0;
}
.cd-sub-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  letter-spacing: .3px;
}
.cd-sub-tabs .tab:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}
.cd-sub-tabs .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.cd-sub-tabs .tab svg { stroke: currentColor; }

/* ===== 分类字典深度美化体系 ===== */

/* 统计卡片网格 */
.cd-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; margin-bottom:16px; }
/* 统计卡片 */
.cd-stat-card { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px; transition:all .2s; cursor:default; position:relative; overflow:hidden; }
.cd-stat-card:hover { border-color:var(--primary); box-shadow:0 4px 16px rgba(0,212,170,.08); transform:translateY(-1px); }
.cd-stat-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--stat-accent,var(--primary)); border-radius:0 3px 3px 0; }
.cd-stat-card .cd-stat-value { font-size:26px; font-weight:700; line-height:1.2; color:var(--stat-color,var(--text)); }
.cd-stat-card .cd-stat-label { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-top:2px; }
.cd-stat-card .cd-stat-sub { font-size:11px; margin-top:2px; }

/* 巡检状态条 */
.cd-status-bar { padding:12px 16px; background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:16px; font-size:13px; color:var(--text-muted); display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cd-status-bar .cd-status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.cd-status-bar .cd-status-dot.ok { background:var(--primary); }
.cd-status-bar .cd-status-dot.warn { background:var(--warning); animation:pulse 2s infinite; }

/* 巡检项卡片 */
.cd-inspect-item { display:flex; align-items:center; gap:14px; padding:12px 16px; background:var(--card-bg); border:1px solid var(--border); border-radius:8px; margin-bottom:8px; cursor:pointer; transition:all .2s; }
.cd-inspect-item:hover { border-color:var(--primary); background:var(--card-hover); transform:translateX(3px); }
.cd-inspect-item .cd-inspect-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.cd-inspect-item .cd-inspect-icon.success { background:rgba(34,197,94,.12); }
.cd-inspect-item .cd-inspect-icon.warning { background:rgba(245,158,11,.12); }
.cd-inspect-item .cd-inspect-name { flex:1; font-weight:600; font-size:14px; }
.cd-inspect-item .cd-inspect-count { font-size:20px; font-weight:700; }
.cd-inspect-item .cd-inspect-action { color:var(--primary); font-size:12px; font-weight:600; opacity:0; transition:opacity .2s; }
.cd-inspect-item:hover .cd-inspect-action { opacity:1; }

/* 建议卡片（分类学习） */
.cd-suggest-card { background:var(--card-bg); border:1px solid var(--border); border-radius:10px; padding:14px 18px; margin-bottom:10px; display:flex; align-items:flex-start; gap:16px; transition:all .2s; }
.cd-suggest-card:hover { border-color:var(--primary); box-shadow:0 2px 12px rgba(0,212,170,.06); }
.cd-suggest-avatar { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; flex-shrink:0; color:#fff; }
.cd-suggest-body { flex:1; min-width:0; }
.cd-suggest-name { font-size:15px; font-weight:700; margin-bottom:4px; }
.cd-suggest-meta { font-size:11px; color:var(--text-muted); margin-bottom:4px; }
.cd-suggest-samples { font-size:11px; color:var(--text-muted); line-height:1.5; }

/* 覆盖率进度条组 */
.cd-progress-group { padding:16px; background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:16px; }
.cd-progress-row { display:flex; align-items:center; margin-bottom:10px; gap:10px; }
.cd-progress-row:last-child { margin-bottom:0; }
.cd-progress-label { width:70px; font-size:12px; font-weight:600; flex-shrink:0; }
.cd-progress-track { flex:1; background:var(--border); border-radius:6px; height:24px; overflow:hidden; }
.cd-progress-fill { height:100%; border-radius:6px; transition:width .6s cubic-bezier(.4,0,.2,1); display:flex; align-items:center; justify-content:flex-end; padding-right:8px; font-size:10px; color:#fff; font-weight:700; min-width:0; }
.cd-progress-value { width:46px; text-align:right; font-size:12px; flex-shrink:0; }
.cd-progress-count { width:36px; text-align:right; font-size:11px; color:var(--text-muted); flex-shrink:0; }

/* 分区面板 */
.cd-panel { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:16px; }
.cd-panel-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.cd-panel-title { font-size:14px; font-weight:700; margin:0; }

/* 柱状图 */
.cd-bar-chart { display:flex; gap:4px; align-items:flex-end; min-height:160px; padding:0 4px; }
.cd-bar-col { flex:1; text-align:center; }
.cd-bar { background:var(--primary); border-radius:4px 4px 0 0; transition:height .4s; min-width:16px; margin:0 auto; }
.cd-bar-label { font-size:10px; color:var(--text-muted); margin-top:6px; }
.cd-bar-val { font-size:10px; font-weight:600; color:var(--text); }

/* 水平条（分布图） */
.cd-hbar-row { display:flex; align-items:center; margin-bottom:7px; gap:8px; }
.cd-hbar-label { width:80px; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; }
.cd-hbar-track { flex:1; background:var(--border); border-radius:3px; height:14px; overflow:hidden; }
.cd-hbar-fill { height:100%; border-radius:3px; transition:width .5s; }
.cd-hbar-count { font-size:11px; width:36px; text-align:right; flex-shrink:0; }

/* 统计徽章条 */
.cd-badge-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.cd-badge-stat { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:8px; font-size:12px; font-weight:600; color:#fff; }
.cd-badge-stat b { font-size:15px; }

/* SKU重复组 */
.cd-sku-group { background:var(--card-bg); border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:12px; transition:all .2s; }
.cd-sku-group:hover { border-color:var(--primary); }
.cd-sku-group-header { padding:10px 16px; background:var(--bg); font-weight:700; font-size:13px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:8px; }
.cd-sku-group-item { padding:8px 16px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--border); font-size:12px; transition:background .15s; }
.cd-sku-group-item:last-child { border-bottom:none; }
.cd-sku-group-item:hover { background:rgba(255,255,255,.02); }

/* 树节点增强 */
.cd-tree-container { border:1px solid var(--border); border-radius:8px; padding:14px; max-height:65vh; overflow-y:auto; }
.cd-tree-node { margin-left:var(--indent); border-left:2px solid var(--level-color); padding:4px 0 4px 12px; }
.cd-tree-node.root { border-left-color:var(--primary); background:var(--bg); }
.cd-tree-row { display:flex; align-items:center; gap:6px; padding:6px 8px; border-radius:6px; transition:background .15s; }
.cd-tree-row:hover { background:rgba(255,255,255,.03); }
.cd-tree-toggle { cursor:pointer; width:18px; text-align:center; display:inline-flex; align-items:center; justify-content:center; color:var(--text-muted); flex-shrink:0; }
.cd-tree-level-tag { display:inline-block; padding:2px 7px; border-radius:4px; font-size:10px; font-weight:700; flex-shrink:0; }
.cd-tree-code { font-family:monospace; font-size:11px; color:var(--text-muted); background:var(--bg); padding:2px 7px; border-radius:4px; flex-shrink:0; }
.cd-tree-name { font-weight:600; font-size:13px; }
.cd-tree-actions { margin-left:auto; display:flex; gap:4px; }

/* 字典表优化 */
.cd-table { width:100%; border-collapse:collapse; font-size:12px; }
.cd-table thead th { text-align:left; padding:10px 10px; background:var(--bg); color:var(--text-muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.5px; border-bottom:2px solid var(--border); position:sticky; top:0; z-index:1; }
.cd-table tbody td { padding:8px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.cd-table tbody tr:hover td { background:rgba(0,212,170,.03); }
.cd-table .cd-cell-mono { font-family:monospace; font-size:11px; }
.cd-table .cd-cell-status { white-space:nowrap; }
.cd-table .cd-cell-actions { white-space:nowrap; }
.cd-table .cd-cell-actions .btn { margin-right:3px; }

/* 过滤栏 */
.cd-filter-bar { display:flex; gap:8px; margin-bottom:14px; align-items:center; flex-wrap:wrap; }
.cd-filter-bar select,.cd-filter-bar input { padding:6px 10px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:12px; }
.cd-filter-bar select { min-width:90px; }
.cd-filter-bar input { width:180px; }
.cd-filter-bar .cd-check-label { font-size:11px; color:var(--text-muted); cursor:pointer; }

/* 表单卡片 */
.cd-form-card { margin-top:12px; padding:14px 16px; background:var(--bg); border:1px solid var(--primary); border-radius:10px; }
.cd-form-card .cd-form-title { font-weight:700; color:var(--primary); margin-bottom:10px; font-size:13px; }
.cd-form-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.cd-form-row input,.cd-form-row select { padding:6px 10px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:12px; }
.cd-form-row input { min-width:100px; }

/* 空状态 */
.cd-empty { text-align:center; padding:50px 20px; color:var(--text-muted); }
.cd-empty-icon { width:56px; height:56px; border-radius:50%; background:var(--card-bg); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.cd-empty-icon svg { width:24px; height:24px; stroke:var(--text-muted); }
.cd-empty-title { font-size:14px; font-weight:600; margin-bottom:6px; color:var(--text-muted); }
.cd-empty-desc { font-size:12px; color:var(--text-muted); margin-bottom:16px; }
.cd-empty.ok .cd-empty-icon { border-color:rgba(34,197,94,.25); }
.cd-empty.ok .cd-empty-icon svg { stroke:var(--primary); }
.cd-empty-title.ok { color:var(--primary); }

/* 加载中 */
.cd-loading { text-align:center; padding:50px; color:var(--text-muted); }
.cd-loading .spinner { margin-bottom:10px; }

/* 提示文本 */
.cd-hint { text-align:center; font-size:11px; color:var(--text-muted); margin-top:12px; }
.cd-meta-row { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:12px; font-size:12px; color:var(--text-muted); }
.cd-text-muted { color:var(--text-muted); }

/* 响应式 */
@media (max-width:768px) {
  .cd-stats-grid { grid-template-columns:repeat(2,1fr); }
  .cd-status-bar { flex-direction:column; align-items:flex-start; }
  .cd-badge-row { gap:6px; }
}

.crm-group-label { display:inline-flex; align-items:center; align-self:center; font-size:9px; color:var(--text-muted); font-weight:600; padding:6px 4px 6px 8px; margin-right:2px; border-left:3px solid var(--border); letter-spacing:1px; text-transform:uppercase; white-space:nowrap; height:24px; box-sizing:border-box; }
.filter-bar { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; align-items:center; }
.filter-bar select, .filter-bar input { padding:6px 12px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:13px; }
.filter-bar input { min-width:200px; }
.empty-state { text-align:center; padding:60px 20px; color:var(--text-muted); }
.empty-state .icon { font-size:48px; margin-bottom:16px; }
.pagination { display:flex; justify-content:center; gap:8px; margin-top:16px; }
.pagination button { padding:6px 12px; background:var(--card-bg); border:1px solid var(--border); border-radius:4px; color:var(--text); cursor:pointer; font-size:12px; }
.pagination button.active { background:var(--primary); color:#000; border-color:var(--primary); }
.pagination button:disabled { opacity:.4; cursor:default; }
.login-page { display:flex; justify-content:center; align-items:center; height:100vh; background:linear-gradient(135deg,#0f1923,#1a2a3a); }
.login-card { background:var(--card-bg); border-radius:var(--radius); padding:40px; width:90%; max-width:420px; border:1px solid var(--border); }
.login-card h1 { text-align:center; color:var(--primary); margin-bottom:8px; font-size:20px; }
.login-card .sub { text-align:center; color:var(--text-muted); font-size:13px; margin-bottom:24px; }
.login-card .form-group { margin-bottom:16px; }
.login-card .btn { width:100%; padding:10px; font-size:14px; margin-top:8px; }
.login-card .error { color:var(--danger); font-size:12px; text-align:center; margin-top:8px; min-height:18px; }
.login-card .hint { text-align:center; color:var(--text-muted); font-size:11px; margin-top:16px; }
.login-card .login-switch { text-align:center; color:var(--text-muted); font-size:12px; margin-top:14px; }
.login-card .login-switch a { color:var(--primary); text-decoration:none; margin-left:4px; }
.cs-container { display:grid; grid-template-columns:280px 1fr 240px; gap:14px; height:calc(100vh - 140px); }
#page-cs-workbench .cs-container { grid-template-columns:280px 1fr; }  /* 工作台只有2栏 */
#page-cs-agent-desk .cs-container { grid-template-columns:280px 1fr 260px; height:calc(100vh - 240px); min-height:560px; }
.cs-sidebar { background:rgba(15,23,42,.55); border-radius:14px; border:1px solid rgba(99,102,241,.12); overflow-y:auto; backdrop-filter:blur(8px); box-shadow:0 4px 24px rgba(0,0,0,.18); }
#page-cs-agent-desk .cs-sidebar { background:linear-gradient(180deg,rgba(99,102,241,.08),rgba(15,23,42,.55)); }
.cs-sidebar h3 { padding:16px; font-size:14px; border-bottom:1px solid rgba(99,102,241,.12); }
.cs-chat { background:rgba(15,23,42,.55); border-radius:14px; border:1px solid rgba(99,102,241,.12); display:flex; flex-direction:column; backdrop-filter:blur(8px); box-shadow:0 4px 24px rgba(0,0,0,.18); overflow:hidden; }
.cs-chat-header { padding:14px 18px; border-bottom:1px solid rgba(99,102,241,.12); display:flex; justify-content:space-between; align-items:center; background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(34,197,94,.04)); }
#page-cs-agent-desk .cs-chat-header { padding:10px 18px; background:linear-gradient(135deg,rgba(99,102,241,.12),rgba(139,92,246,.08)); border-bottom:2px solid rgba(99,102,241,.2); }
#page-cs-agent-desk .cs-chat-header h3 { font-size:15px; background:linear-gradient(135deg,#a5b4fc,#86efac); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.cs-chat-header h3 { font-size:14px; font-weight:700; letter-spacing:.3px; }
.cs-messages { flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:14px; background:linear-gradient(180deg,rgba(99,102,241,.02),transparent 40%); }
#page-cs-agent-desk .cs-messages { padding:18px; gap:12px; background:linear-gradient(180deg,rgba(99,102,241,.04),rgba(139,92,246,.02) 60%,transparent); }
#page-cs-agent-desk .cs-input-area { padding:12px 18px; background:linear-gradient(180deg,rgba(15,23,42,.3),rgba(15,23,42,.6)); border-top:1px solid rgba(99,102,241,.15); }
#page-cs-agent-desk .cs-input-area input { padding:10px 16px; border-radius:24px; background:rgba(15,23,42,.8); border:1px solid rgba(99,102,241,.25); color:#fff; font-size:14px; transition:all .2s; }
#page-cs-agent-desk .cs-input-area input:focus { outline:none; border-color:rgba(99,102,241,.6); box-shadow:0 0 0 3px rgba(99,102,241,.15); }
#page-cs-agent-desk .cs-input-area button { padding:10px 20px; border-radius:24px; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; font-weight:600; border:none; cursor:pointer; transition:all .2s; box-shadow:0 4px 12px rgba(99,102,241,.3); }
#page-cs-agent-desk .cs-input-area button:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 6px 18px rgba(99,102,241,.4); }
#page-cs-agent-desk .cs-input-area button:disabled { opacity:.4; cursor:not-allowed; }
#page-cs-agent-desk .cs-quick-replies { padding:8px 18px 6px; border-top:1px solid rgba(99,102,241,.1); }
#page-cs-agent-desk #csDeskCustomerBar { font-size:13px; line-height:1.4; }

/* ── [v6.6] 筛选标签 ── */
.cs-filter-chip { display:inline-block; padding:4px 12px; border-radius:8px; font-size:11px; font-weight:600; color:var(--text-muted); cursor:pointer; transition:all .15s; white-space:nowrap; border:1px solid transparent; background:rgba(15,23,42,.4); }
.cs-filter-chip:hover { color:var(--text); background:rgba(99,102,241,.1); border-color:rgba(99,102,241,.2); }
.cs-filter-chip.active { color:#a5b4fc; background:rgba(99,102,241,.15); border-color:rgba(99,102,241,.3); }
.cs-msg { max-width:75%; padding:11px 15px; border-radius:14px; font-size:13px; line-height:1.65; word-wrap:break-word; animation:csMsgIn .25s ease; }
.cs-msg.inbound { align-self:flex-start; background:rgba(30,41,59,.85); border:1px solid rgba(148,163,184,.15); border-bottom-left-radius:4px; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.cs-msg.outbound { align-self:flex-end; background:linear-gradient(135deg,rgba(99,102,241,.22),rgba(34,197,94,.18)); border:1px solid rgba(99,102,241,.35); border-bottom-right-radius:4px; box-shadow:0 2px 10px rgba(99,102,241,.18); }
.cs-msg.system { align-self:center; max-width:85%; background:rgba(245,158,11,.12); color:#fbbf24; border:1px solid rgba(245,158,11,.25); border-radius:10px; font-size:12px; text-align:center; padding:8px 16px; }
.cs-msg .meta { font-size:10px; color:var(--text-muted); margin-top:6px; opacity:.7; }
.cs-handover-icon { margin-right:4px; }
@keyframes csMsgIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* 快捷回复 */
.cs-quick-replies { padding:10px 16px 4px; border-top:1px solid rgba(99,102,241,.12); display:flex; gap:8px; flex-wrap:wrap; align-items:center; min-height:0; }
.cs-quick-replies.hidden { display:none; }
.cs-quick-label { font-size:11px; color:var(--text-muted); margin-right:4px; white-space:nowrap; }
.cs-quick-btn { padding:6px 14px; font-size:11px; background:rgba(99,102,241,.08); border:1px solid rgba(99,102,241,.22); border-radius:14px; color:var(--text-light); cursor:pointer; transition:.2s; white-space:nowrap; font-weight:500; }
.cs-quick-btn:hover { background:linear-gradient(135deg,rgba(99,102,241,.25),rgba(34,197,94,.2)); color:#fff; border-color:rgba(99,102,241,.5); transform:translateY(-1px); }

.cs-input-area { padding:14px 16px 16px; border-top:1px solid rgba(99,102,241,.12); display:flex; gap:10px; background:linear-gradient(180deg,transparent,rgba(99,102,241,.03)); }
.cs-input-area input { flex:1; padding:11px 16px; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.2); border-radius:22px; color:var(--text); font-size:13px; transition:.2s; }
.cs-input-area input:focus { outline:none; border-color:rgba(99,102,241,.5); box-shadow:0 0 0 3px rgba(99,102,241,.1); }
.cs-input-area button { padding:11px 22px; background:linear-gradient(135deg,#6366f1,#22c55e); color:#fff; border:none; border-radius:22px; cursor:pointer; font-weight:600; font-size:13px; transition:.2s; box-shadow:0 4px 12px rgba(99,102,241,.3); }
.cs-input-area button:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(99,102,241,.4); }
.cs-input-area input:disabled, .cs-input-area button:disabled { opacity:0.4; cursor:not-allowed; }
.cs-typing { align-self:flex-start; padding:10px 16px; color:var(--text-muted); font-size:12px; font-style:italic; background:rgba(30,41,59,.6); border-radius:14px; border-bottom-left-radius:4px; }
.cs-typing::after { content:''; display:inline-block; width:6px; height:6px; margin-left:4px; background:var(--primary); border-radius:50%; animation:typingDot 1s infinite; }
@keyframes typingDot { 0%,100% { opacity:.3; transform:translateY(0); } 50% { opacity:1; transform:translateY(-3px); } }

/* 右侧数据面板 */
.cs-right-panel { background:rgba(15,23,42,.55); border-radius:14px; border:1px solid rgba(99,102,241,.12); display:flex; flex-direction:column; overflow-y:auto; backdrop-filter:blur(8px); box-shadow:0 4px 24px rgba(0,0,0,.18); }
.cs-rp-header { padding:14px 16px; font-size:13px; font-weight:700; border-bottom:1px solid rgba(99,102,241,.12); color:var(--text); background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(34,197,94,.04)); }
.cs-rp-body { padding:14px; flex:1; }
.cs-rp-empty { text-align:center; font-size:12px; color:var(--text-muted); padding:32px 8px; }
.cs-rp-section { margin-bottom:18px; padding:12px; background:rgba(15,23,42,.4); border:1px solid rgba(99,102,241,.1); border-radius:10px; }
.cs-rp-section-title { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; margin-bottom:10px; padding-bottom:6px; border-bottom:1px dashed rgba(99,102,241,.15); }
.cs-rp-row { display:flex; justify-content:space-between; align-items:center; padding:7px 0; font-size:12px; }
.cs-rp-row + .cs-rp-row { border-top:1px solid rgba(99,102,241,.06); }
.cs-rp-label { color:var(--text-light); }
.cs-rp-val { font-weight:700; color:var(--text); }
.cs-rp-val.primary { color:#22c55e; }
.cs-rp-val.danger { color:#ef4444; }
.cs-rp-val.warning { color:#fbbf24; }
.cs-rp-action { width:100%; padding:9px 12px; margin-top:6px; font-size:12px; border-radius:8px; border:1px solid rgba(99,102,241,.25); background:rgba(99,102,241,.08); color:var(--text); cursor:pointer; transition:.2s; text-align:center; font-weight:600; }
.cs-rp-action:hover { background:linear-gradient(135deg,rgba(99,102,241,.3),rgba(34,197,94,.2)); border-color:rgba(99,102,241,.5); }
.cs-rp-action.danger { border-color:rgba(239,68,68,.35); color:#fca5a5; background:rgba(239,68,68,.08); }
.cs-rp-action.danger:hover { background:linear-gradient(135deg,rgba(239,68,68,.3),rgba(239,68,68,.15)); color:#fff; }
.cs-rp-badge { display:inline-block; font-size:10px; padding:2px 8px; border-radius:6px; font-weight:700; }
.cs-rp-badge.active { background:rgba(34,197,94,.18); color:#4ade80; }
.cs-rp-badge.closed { background:rgba(148,163,184,.15); color:var(--text-muted); }
.cs-rp-badge.handover { background:rgba(245,158,11,.18); color:#fbbf24; }

/* CS 统计卡片 - 2x2 网格玻璃风格 */
#csStatsBar { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:14px 14px 10px; flex-shrink:0; }
.cs-stat-card { background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(34,197,94,.04)); border:1px solid rgba(99,102,241,.15); border-radius:10px; padding:10px 12px; display:flex; align-items:center; gap:10px; transition:.25s; position:relative; overflow:hidden; }
.cs-stat-card::before { content:''; position:absolute; top:0; right:0; width:40px; height:40px; background:radial-gradient(circle,rgba(99,102,241,.15),transparent 70%); pointer-events:none; }
.cs-stat-card:hover { border-color:rgba(99,102,241,.4); transform:translateY(-1px); box-shadow:0 4px 16px rgba(99,102,241,.18); }
.cs-stat-icon { width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; background:linear-gradient(135deg,#6366f1,#22c55e); color:#fff; box-shadow:0 2px 8px rgba(99,102,241,.3); }
.cs-stat-icon.cs-stat-icon-orange { background:linear-gradient(135deg,#f59e0b,#ef4444); box-shadow:0 2px 8px rgba(245,158,11,.3); }
.cs-stat-info { display:flex; flex-direction:column; min-width:0; }
.cs-stat-val { font-size:20px; font-weight:800; line-height:1; background:linear-gradient(135deg,#a5b4fc,#86efac); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.cs-stat-label { font-size:10px; color:var(--text-muted); margin-top:4px; font-weight:600; letter-spacing:.3px; }

/* CS 意图标签 */
.cs-intent-tag { display:inline-block; font-size:10px; padding:2px 8px; border-radius:6px; font-weight:600; margin-left:6px; }
.cs-intent-high { background:rgba(34,197,94,.18); color:#4ade80; border:1px solid rgba(34,197,94,.3); }
.cs-intent-mid { background:rgba(245,158,11,.18); color:#fbbf24; border:1px solid rgba(245,158,11,.3); }
.cs-intent-low { background:rgba(148,163,184,.15); color:var(--text-muted); border:1px solid rgba(148,163,184,.25); }
.cs-intent-method { display:inline-block; font-size:9px; padding:1px 6px; border-radius:4px; margin-left:4px; background:rgba(99,102,241,.12); color:#a5b4fc; font-weight:500; }
#csEmotion { display:inline-block; font-size:10px; padding:2px 7px; border-radius:6px; margin-left:6px; font-weight:600; }

/* CS 搜索和筛选 */
.cs-search-bar { padding:0 14px 12px; flex-shrink:0; }
.cs-search-wrap { position:relative; margin-bottom:8px; }
.cs-search-input { width:100%; padding:8px 14px 8px 32px; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.18); border-radius:10px; color:var(--text); font-size:12px; outline:none; transition:.2s; }
.cs-search-input:focus { border-color:rgba(99,102,241,.5); box-shadow:0 0 0 3px rgba(99,102,241,.08); }
.cs-search-input::placeholder { color:var(--text-muted); font-size:11px; }
.cs-search-wrap::before { content:'🔍'; position:absolute; left:10px; top:50%; transform:translateY(-50%); font-size:11px; opacity:.6; pointer-events:none; }
.cs-search-clear { position:absolute; right:8px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--text-muted); font-size:18px; cursor:pointer; line-height:1; padding:4px; border-radius:50%; }
.cs-search-clear:hover { background:rgba(99,102,241,.15); color:#fff; }
.cs-filter-row { display:flex; gap:6px; }
.cs-filter-sel { flex:1; padding:6px 10px; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.18); border-radius:8px; font-size:11px; color:var(--text); outline:none; cursor:pointer; min-width:0; transition:.2s; }
.cs-filter-sel:focus, .cs-filter-sel:hover { border-color:rgba(99,102,241,.4); }

/* CS 列表标题 */
.cs-list-header { padding:10px 16px 6px; font-size:11px; font-weight:700; color:var(--text-muted); letter-spacing:.5px; text-transform:uppercase; }

/* CS 会话项 - 玻璃风格 */
#csSessionList { padding-bottom:12px; }
.cs-session-item { padding:9px 12px; cursor:pointer; border-radius:10px; transition:.2s; display:flex; align-items:flex-start; gap:10px; margin:0 8px 4px; border:1px solid transparent; }
.cs-session-item:hover { background:rgba(99,102,241,.08); border-color:rgba(99,102,241,.15); transform:translateX(2px); }
.cs-session-item.active { background:linear-gradient(135deg,rgba(99,102,241,.15),rgba(34,197,94,.08)); border-color:rgba(99,102,241,.4); box-shadow:0 2px 12px rgba(99,102,241,.15); }
#page-cs-agent-desk .cs-session-item { padding:12px 14px; margin:0 8px 6px; border-radius:12px; }
#page-cs-agent-desk .cs-session-item:hover { transform:translateX(4px) scale(1.01); }
#page-cs-agent-desk .cs-session-item.active { transform:translateX(0) scale(1.02); }

/* 会话侧边栏头部 */
.cs-sidebar-header { padding:14px 16px; border-bottom:1px solid rgba(99,102,241,.12); background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(34,197,94,.04)); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:5; }
.cs-sidebar-header h3 { font-size:13px; font-weight:700; margin:0; letter-spacing:.3px; display:flex; align-items:center; gap:6px; }
.cs-sidebar-header .badge { font-size:10px; padding:2px 8px; border-radius:10px; background:rgba(99,102,241,.2); color:#a5b4fc; font-weight:600; }

/* 空状态美化 */
#page-cs-agent-desk .empty-state { padding:80px 24px; text-align:center; }
#page-cs-agent-desk .empty-state .icon { font-size:64px; margin-bottom:16px; opacity:.5; animation:csFloat 3s ease-in-out infinite; }
#page-cs-agent-desk .empty-state p { color:var(--text-muted); font-size:14px; line-height:1.6; }
@keyframes csFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }

/* CS 头像 - 渐变彩色 */
.cs-item-avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; flex-shrink:0; background:linear-gradient(135deg,#6366f1,#22c55e); box-shadow:0 2px 6px rgba(99,102,241,.25); }

/* CS 内容体 */
.cs-item-body { flex:1; min-width:0; }
.cs-item-row1 { display:flex; align-items:center; gap:6px; }
.cs-item-name { font-size:13px; font-weight:700; color:var(--text); }
.cs-item-status { width:7px; height:7px; border-radius:50%; flex-shrink:0; box-shadow:0 0 6px currentColor; }
.cs-status-active { background:#22c55e; }
.cs-status-closed { background:#64748b; opacity:.5; box-shadow:none; }
.cs-item-time { font-size:10px; color:var(--text-muted); margin-left:auto; font-weight:500; }

.cs-item-row2 { display:flex; align-items:center; gap:5px; flex-wrap:wrap; margin-top:4px; }
.cs-stage-tag { font-size:9px; padding:2px 7px; border-radius:5px; background:rgba(99,102,241,.12); color:#a5b4fc; font-weight:600; border:1px solid rgba(99,102,241,.2); }
.cs-score-high { background:linear-gradient(135deg,rgba(239,68,68,.18),rgba(245,158,11,.15)) !important; color:#fca5a5 !important; border:1px solid rgba(239,68,68,.3) !important; }
.cs-score-mid { background:rgba(245,158,11,.12) !important; color:#fbbf24 !important; border:1px solid rgba(245,158,11,.25) !important; }
.cs-score-low { background:rgba(99,102,241,.1) !important; color:#94a3b8 !important; border:1px solid rgba(99,102,241,.2) !important; }

.cs-item-row3 { margin-top:6px; }
.cs-convert-btn { padding:3px 10px; font-size:10px; background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(34,197,94,.12)); color:#a5b4fc; border:1px solid rgba(99,102,241,.3); border-radius:6px; cursor:pointer; font-weight:600; transition:.2s; }
.cs-convert-btn:hover { background:linear-gradient(135deg,rgba(99,102,241,.35),rgba(34,197,94,.25)); color:#fff; transform:translateY(-1px); }

/* CS 标签 */
.cs-tags-row { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.cs-tag-chip { font-size:9px; padding:2px 7px; border-radius:5px; font-weight:600; white-space:nowrap; line-height:16px; background:rgba(99,102,241,.1); color:#a5b4fc; border:1px solid rgba(99,102,241,.2); }

@media (max-width:1100px) { .cs-container { grid-template-columns:260px 1fr; } .cs-right-panel { display:none; } }
@media (max-width:900px) { .cs-container { grid-template-columns:1fr; } .cs-sidebar { display:none; } }

/* ── 客服工作台 ── */
.wb-sender-tag { display:inline-block; font-size:9px; padding:1px 6px; border-radius:4px; margin-bottom:2px; font-weight:600; }
.wb-sender-tag.human { background:rgba(0,212,170,.15); color:var(--primary); }
.wb-sender-tag.ai { background:rgba(55,66,250,.15); color:var(--info); }
.wb-sender-tag.customer { background:rgba(255,255,255,.05); color:var(--text-muted); }

/* ── 客服工作台 V2 UI 升级 ── */
/* 胶囊式 tab（覆盖工作台内 .tabs/.tab 通用下划线样式） */
#page-cs-workbench .tabs { display:flex; gap:6px; margin:10px 12px 0; padding:0; border-bottom:none; }
#page-cs-workbench .tabs .tab {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 14px; font-size:12px; font-weight:600;
  color:var(--text-muted); cursor:pointer;
  background:rgba(15,23,42,.5); border:1px solid rgba(99,102,241,.12);
  border-radius:18px; transition:.2s;
  white-space:nowrap;
}
#page-cs-workbench .tabs .tab:hover {
  background:rgba(99,102,241,.1); color:var(--text); border-color:rgba(99,102,241,.25);
  transform:translateY(-1px);
}
#page-cs-workbench .tabs .tab.active {
  background:linear-gradient(135deg,rgba(99,212,170,.18),rgba(99,102,241,.15));
  color:#a5b4fc; border-color:rgba(99,102,241,.45);
  box-shadow:0 2px 10px rgba(99,102,241,.18);
}
#page-cs-workbench .tabs .tab #wbQueueBadge {
  background:linear-gradient(135deg,#ef4444,#f59e0b) !important;
  color:#fff !important; border-radius:8px; padding:1px 6px;
  font-size:9px; font-weight:700; margin-left:2px;
  box-shadow:0 0 8px rgba(239,68,68,.4);
}

/* 接管/转接/关闭 操作按钮组 */
#wbChatActions { gap:8px !important; }
#wbChatActions #wbAgentBadge {
  font-size:11px; padding:3px 10px; border-radius:10px;
  background:rgba(99,102,241,.1); border:1px solid rgba(99,102,241,.2);
  font-weight:600;
}
#wbChatActions button {
  font-size:12px !important; font-weight:600 !important;
  padding:6px 14px !important; border-radius:8px !important;
  transition:.2s; border:1px solid transparent !important;
  box-shadow:none !important;
}
#wbChatActions button[onclick*="takeoverWB"] {
  background:linear-gradient(135deg,#22c55e,#16a34a) !important;
  color:#fff !important; box-shadow:0 2px 8px rgba(34,197,94,.3) !important;
}
#wbChatActions button[onclick*="takeoverWB"]:hover {
  transform:translateY(-1px); box-shadow:0 4px 12px rgba(34,197,94,.4) !important;
}
#wbChatActions button[onclick*="showTransferDialog"] {
  background:rgba(99,102,241,.1) !important;
  color:#a5b4fc !important; border-color:rgba(99,102,241,.3) !important;
}
#wbChatActions button[onclick*="showTransferDialog"]:hover {
  background:rgba(99,102,241,.2) !important; border-color:rgba(99,102,241,.5) !important;
}
#wbChatActions button[onclick*="showResolveDialog"] {
  background:linear-gradient(135deg,#ef4444,#dc2626) !important;
  color:#fff !important; box-shadow:0 2px 8px rgba(239,68,68,.3) !important;
}
#wbChatActions button[onclick*="showResolveDialog"]:hover {
  transform:translateY(-1px); box-shadow:0 4px 12px rgba(239,68,68,.4) !important;
}

/* 工作台空状态 - 简洁线框电脑图标 */
#page-cs-workbench .empty-state { padding:60px 20px; }
#page-cs-workbench .empty-state .icon {
  font-size:48px; opacity:.5;
  background:linear-gradient(135deg,rgba(99,102,241,.3),rgba(34,197,94,.2));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  filter:drop-shadow(0 0 12px rgba(99,102,241,.3));
}
#page-cs-workbench .empty-state p {
  color:var(--text-muted); font-size:13px; margin-top:12px; font-weight:500;
}

/* ── 底部工作台Tab ── */
.wb-bottom-tabs {
  display:flex; gap:4px; padding:0 16px 0;
  margin-top:12px; border-bottom:1px solid rgba(99,102,241,.12);
  background:rgba(15,23,42,.35);
}
.wb-btab {
  padding:10px 18px; font-size:13px; font-weight:600;
  color:var(--text-muted); cursor:pointer;
  background:transparent; border:none;
  border-bottom:2px solid transparent;
  transition:.2s; white-space:nowrap;
}
.wb-btab:hover { color:var(--text); }
.wb-btab.active {
  color:#a5b4fc;
  border-bottom-color:rgba(99,102,241,.6);
}
.wb-tab-content { display:none; min-height:200px; background:rgba(15,23,42,.35); border-radius:0 0 14px 14px; padding:16px; }
.wb-tab-content.active { display:block; }

/* ================================================================
   [v6.5+] 智能客服全局 UI 升级 — 统一所有 page-cs-* 页面
   ================================================================ */

/* ── 全局 Emoji 字体优化（去除描边、让 emoji 在深色背景清晰）── */
#page-cs-agent-desk,
#page-cs-ops-center,
#page-cs-train-exp,
#page-cs-config,
#page-cs-workbench,
#page-cs-training,
#page-cs-tickets,
#page-cs-settings,
#page-cs-quality,
#page-cs-dashboard,
#page-cs-satisfaction,
#page-cs-sentiment {
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
/* 去除 Emoji 字符描边（Emoji 在大字号 + 深色背景下会出现 white border） */
#page-cs-agent-desk [style*="font-size"],
#page-cs-ops-center [style*="font-size"],
#page-cs-train-exp [style*="font-size"],
#page-cs-config [style*="font-size"],
#page-cs-workbench [style*="font-size"],
#page-cs-training [style*="font-size"],
#page-cs-tickets [style*="font-size"],
#page-cs-settings [style*="font-size"],
#page-cs-quality [style*="font-size"],
#page-cs-dashboard [style*="font-size"],
#page-cs-satisfaction [style*="font-size"],
#page-cs-sentiment [style*="font-size"] {
  -webkit-text-stroke:0 !important;
  text-shadow:none !important;
}
/* Emoji 默认控制在 20px 以下，避免字号过大导致 stroke 显眼 */
#page-cs-agent-desk .stat-icon,
#page-cs-ops-center .stat-icon,
#page-cs-train-exp .stat-icon,
#page-cs-config .stat-icon,
#page-cs-workbench .stat-icon,
#page-cs-training .stat-icon,
#page-cs-tickets .stat-icon,
#page-cs-settings .stat-icon,
#page-cs-quality .stat-icon,
#page-cs-dashboard .stat-icon,
#page-cs-satisfaction .stat-icon,
#page-cs-sentiment .stat-icon {
  font-size:18px !important;
  line-height:1;
  -webkit-text-stroke:0;
  text-shadow:none;
  display:inline-block;
}

/* ── 通用页面Header升级 ── */
#page-cs-agent-desk .header,
#page-cs-ops-center .header,
#page-cs-train-exp .header,
#page-cs-config .header,
#page-cs-workbench .header,
#page-cs-training .header,
#page-cs-tickets .header,
#page-cs-settings .header,
#page-cs-quality .header,
#page-cs-dashboard .header,
#page-cs-satisfaction .header,
#page-cs-sentiment .header {
  background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(139,92,246,.05),rgba(34,197,94,.03));
  border:1px solid rgba(99,102,241,.12);
  border-radius:14px;
  padding:20px 24px !important;
  margin-bottom:18px;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
  backdrop-filter:blur(10px);
}
#page-cs-agent-desk .header h1,
#page-cs-ops-center .header h1,
#page-cs-train-exp .header h1,
#page-cs-config .header h1,
#page-cs-workbench .header h1,
#page-cs-training .header h1,
#page-cs-tickets .header h1,
#page-cs-settings .header h1,
#page-cs-quality .header h1,
#page-cs-dashboard .header h1,
#page-cs-satisfaction .header h1,
#page-cs-sentiment .header h1 {
  font-size:20px !important;
  font-weight:700;
  background:linear-gradient(135deg,#a5b4fc,#86efac);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}

/* ── 通用统计卡片升级（collab-stat 统一为 glass 风格）── */
#page-cs-agent-desk .collab-stat,
#page-cs-ops-center .collab-stat,
#page-cs-train-exp .collab-stat,
#page-cs-config .collab-stat,
#page-cs-workbench .collab-stat,
#page-cs-training .collab-stat,
#page-cs-tickets .collab-stat,
#page-cs-settings .collab-stat,
#page-cs-quality .collab-stat,
#page-cs-dashboard .collab-stat,
#page-cs-satisfaction .collab-stat,
#page-cs-sentiment .collab-stat {
  background:var(--card-glass);
  border:1px solid rgba(99,102,241,.1);
  border-radius:14px;
  padding:16px 14px;
  transition:all .25s cubic-bezier(.4,0,.2,1);
  backdrop-filter:blur(6px);
}
#page-cs-agent-desk .collab-stat:hover,
#page-cs-ops-center .collab-stat:hover,
#page-cs-train-exp .collab-stat:hover,
#page-cs-config .collab-stat:hover,
#page-cs-workbench .collab-stat:hover,
#page-cs-training .collab-stat:hover,
#page-cs-tickets .collab-stat:hover,
#page-cs-settings .collab-stat:hover,
#page-cs-quality .collab-stat:hover,
#page-cs-dashboard .collab-stat:hover,
#page-cs-satisfaction .collab-stat:hover,
#page-cs-sentiment .collab-stat:hover {
  transform:translateY(-4px);
  border-color:rgba(99,102,241,.35);
  box-shadow:0 8px 24px rgba(99,102,241,.15);
  background:var(--card-glass-hover);
}

/* ── 通用Tabs升级（胶囊风格）── */
#page-cs-agent-desk .tabs,
#page-cs-ops-center .tabs,
#page-cs-train-exp .tabs,
#page-cs-config .tabs,
#page-cs-training .tabs,
#page-cs-settings .tabs {
  display:flex;
  gap:6px;
  margin-bottom:14px;
  padding:4px;
  background:rgba(15,23,42,.5);
  border-radius:12px;
  border:1px solid rgba(99,102,241,.08);
}
#page-cs-agent-desk .tabs .tab,
#page-cs-ops-center .tabs .tab,
#page-cs-train-exp .tabs .tab,
#page-cs-config .tabs .tab,
#page-cs-training .tabs .tab,
#page-cs-settings .tabs .tab {
  padding:10px 20px;
  font-size:13px;
  font-weight:600;
  color:var(--text-muted);
  border-radius:10px;
  border:none;
  background:transparent;
  cursor:pointer;
  transition:all .2s;
  white-space:nowrap;
  border-bottom:none !important;
}
#page-cs-agent-desk .tabs .tab:hover,
#page-cs-ops-center .tabs .tab:hover,
#page-cs-train-exp .tabs .tab:hover,
#page-cs-config .tabs .tab:hover,
#page-cs-training .tabs .tab:hover,
#page-cs-settings .tabs .tab:hover {
  color:var(--text);
  background:rgba(99,102,241,.1);
}
#page-cs-agent-desk .tabs .tab.active,
#page-cs-ops-center .tabs .tab.active,
#page-cs-train-exp .tabs .tab.active,
#page-cs-config .tabs .tab.active,
#page-cs-training .tabs .tab.active,
#page-cs-settings .tabs .tab.active {
  color:#a5b4fc;
  background:linear-gradient(135deg,rgba(99,102,241,.2),rgba(139,92,246,.15));
  box-shadow:0 2px 8px rgba(99,102,241,.2);
}

/* ── 通用内容区玻璃卡片 ── */
#page-cs-ops-center [id$="Area"],
#page-cs-config [id$="Area"] {
  background:rgba(15,23,42,.4);
  border-radius:14px;
  border:1px solid rgba(99,102,241,.08);
  padding:16px;
  min-height:300px;
  backdrop-filter:blur(4px);
}

/* ── 每个数据版块独立卡片底色 ── */
#page-cs-ops-center [id$="Area"] > div[id$="Content"] > div,
#page-cs-ops-center [id$="Area"] > div[id*="rt"],
#page-cs-ops-center [id$="Area"] > div[style*="display:grid"] {
  background:var(--card-glass);
  border:1px solid rgba(99,102,241,.08);
  border-radius:14px;
  padding:18px;
  margin-bottom:14px;
  backdrop-filter:blur(6px);
  transition:all .25s;
}
#page-cs-ops-center [id$="Area"] > div[id$="Content"] > div:hover,
#page-cs-ops-center [id$="Area"] > div[id*="rt"]:hover {
  border-color:rgba(99,102,241,.2);
  box-shadow:0 4px 16px rgba(99,102,241,.08);
}
/* 容器内 grid 布局内的每个子项 */
#page-cs-ops-center [id$="Area"] > div[style*="display:grid"] > div {
  background:rgba(15,23,42,.5);
  border:1px solid rgba(99,102,241,.06);
  border-radius:12px;
  padding:16px;
  transition:all .2s;
}
#page-cs-ops-center [id$="Area"] > div[style*="display:grid"] > div:hover {
  border-color:rgba(99,102,241,.25);
  background:rgba(99,102,241,.05);
}

/* ── 服务运营中心专属 ── */
#page-cs-ops-center .cs-container {
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  min-height:500px;
}

/* ── 数据看板专属 ── */
#page-cs-dashboard .collab-stat {
  text-align:center;
  padding:20px 12px;
}
#page-cs-dashboard .collab-stat div:nth-child(1) {
  font-size:22px !important;
  font-weight:800;
  margin-bottom:6px;
  -webkit-text-stroke:0;
  text-shadow:none;
}
#page-cs-dashboard .collab-stat div:nth-child(2) {
  font-size:13px !important;
  color:var(--text-muted);
  font-weight:600;
}
#page-cs-dashboard .collab-stat div:nth-child(3) {
  font-size:12px !important;
  margin-top:4px;
}

/* ── 工单中心专属 ── */
#page-cs-tickets .header .actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
#page-cs-tickets .header .actions select {
  padding:8px 14px;
  border-radius:8px;
  background:rgba(15,23,42,.8);
  border:1px solid rgba(99,102,241,.2);
  color:var(--text);
  font-size:13px;
}

/* ── 质检中心专属 ── */
#page-cs-quality .header .actions select {
  padding:8px 14px;
  border-radius:8px;
  background:rgba(15,23,42,.8);
  border:1px solid rgba(99,102,241,.2);
  color:var(--text);
  font-size:13px;
}

/* ── 满意度 & 情绪感知 ── */
#page-cs-satisfaction .header .actions,
#page-cs-sentiment .header .actions {
  display:flex;
  gap:8px;
}
#page-cs-satisfaction .header .actions .btn,
#page-cs-sentiment .header .actions .btn {
  padding:8px 16px;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
}

/* ── 培训专属 ── */
#page-cs-training .header .actions {
  display:flex;
  gap:8px;
}

/* ── 客服设置专属 ── */
#page-cs-settings .header .actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* ── 按钮增强（所有 .btn-primary 在 CS 页面）── */
#page-cs-agent-desk .btn-primary,
#page-cs-ops-center .btn-primary,
#page-cs-train-exp .btn-primary,
#page-cs-config .btn-primary,
#page-cs-workbench .btn-primary,
#page-cs-training .btn-primary,
#page-cs-tickets .btn-primary,
#page-cs-settings .btn-primary,
#page-cs-quality .btn-primary,
#page-cs-dashboard .btn-primary,
#page-cs-satisfaction .btn-primary,
#page-cs-sentiment .btn-primary {
  background:linear-gradient(135deg,var(--indigo),#8b5cf6) !important;
  border:none !important;
  padding:9px 18px !important;
  font-weight:600 !important;
  border-radius:10px !important;
  box-shadow:0 4px 12px rgba(99,102,241,.3);
  transition:all .2s;
  color:#fff !important;
}
#page-cs-agent-desk .btn-primary:hover,
#page-cs-ops-center .btn-primary:hover,
#page-cs-train-exp .btn-primary:hover,
#page-cs-config .btn-primary:hover,
#page-cs-workbench .btn-primary:hover,
#page-cs-training .btn-primary:hover,
#page-cs-tickets .btn-primary:hover,
#page-cs-settings .btn-primary:hover,
#page-cs-quality .btn-primary:hover,
#page-cs-dashboard .btn-primary:hover,
#page-cs-satisfaction .btn-primary:hover,
#page-cs-sentiment .btn-primary:hover {
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(99,102,241,.45);
}

/* ── 通用 .btn-outline 增强 ── */
#page-cs-agent-desk .btn-outline,
#page-cs-ops-center .btn-outline,
#page-cs-train-exp .btn-outline,
#page-cs-config .btn-outline,
#page-cs-workbench .btn-outline,
#page-cs-training .btn-outline,
#page-cs-tickets .btn-outline,
#page-cs-settings .btn-outline,
#page-cs-quality .btn-outline,
#page-cs-dashboard .btn-outline,
#page-cs-satisfaction .btn-outline,
#page-cs-sentiment .btn-outline {
  padding:8px 16px !important;
  border-radius:10px !important;
  font-weight:600 !important;
  border:1px solid rgba(99,102,241,.3) !important;
  color:var(--text-muted);
  transition:all .2s;
}
#page-cs-agent-desk .btn-outline:hover,
#page-cs-ops-center .btn-outline:hover,
#page-cs-train-exp .btn-outline:hover,
#page-cs-config .btn-outline:hover,
#page-cs-workbench .btn-outline:hover,
#page-cs-training .btn-outline:hover,
#page-cs-tickets .btn-outline:hover,
#page-cs-settings .btn-outline:hover,
#page-cs-quality .btn-outline:hover,
#page-cs-dashboard .btn-outline:hover,
#page-cs-satisfaction .btn-outline:hover,
#page-cs-sentiment .btn-outline:hover {
  color:var(--text);
  border-color:rgba(99,102,241,.6) !important;
  background:rgba(99,102,241,.08);
}

/* ── 通用 select/dropdown 美化 ── */
#page-cs-agent-desk select,
#page-cs-ops-center select,
#page-cs-train-exp select,
#page-cs-config select,
#page-cs-workbench select,
#page-cs-training select,
#page-cs-tickets select,
#page-cs-settings select,
#page-cs-quality select,
#page-cs-dashboard select,
#page-cs-satisfaction select,
#page-cs-sentiment select {
  padding:8px 14px;
  border-radius:8px;
  background:rgba(15,23,42,.8);
  border:1px solid rgba(99,102,241,.2);
  color:var(--text);
  font-size:13px;
  font-weight:500;
  cursor:pointer;
  transition:all .2s;
}
#page-cs-agent-desk select:hover,
#page-cs-ops-center select:hover,
#page-cs-train-exp select:hover,
#page-cs-config select:hover,
#page-cs-workbench select:hover,
#page-cs-training select:hover,
#page-cs-tickets select:hover,
#page-cs-settings select:hover,
#page-cs-quality select:hover,
#page-cs-dashboard select:hover,
#page-cs-satisfaction select:hover,
#page-cs-sentiment select:hover {
  border-color:rgba(99,102,241,.5);
  box-shadow:0 0 0 3px rgba(99,102,241,.1);
}
#page-cs-agent-desk select:focus,
#page-cs-ops-center select:focus,
#page-cs-train-exp select:focus,
#page-cs-config select:focus,
#page-cs-workbench select:focus,
#page-cs-training select:focus,
#page-cs-tickets select:focus,
#page-cs-settings select:focus,
#page-cs-quality select:focus,
#page-cs-dashboard select:focus,
#page-cs-satisfaction select:focus,
#page-cs-sentiment select:focus {
  outline:none;
  border-color:rgba(99,102,241,.6);
  box-shadow:0 0 0 3px rgba(99,102,241,.15);
}

/* ── 通用 input 美化 ── */
#page-cs-agent-desk input[type="text"],
#page-cs-ops-center input[type="text"],
#page-cs-train-exp input[type="text"],
#page-cs-config input[type="text"],
#page-cs-workbench input[type="text"],
#page-cs-training input[type="text"],
#page-cs-tickets input[type="text"],
#page-cs-settings input[type="text"],
#page-cs-quality input[type="text"],
#page-cs-dashboard input[type="text"],
#page-cs-satisfaction input[type="text"],
#page-cs-sentiment input[type="text"] {
  padding:10px 16px;
  border-radius:10px;
  background:rgba(15,23,42,.8);
  border:1px solid rgba(99,102,241,.15);
  color:var(--text);
  font-size:14px;
  transition:all .2s;
}
#page-cs-agent-desk input[type="text"]:focus,
#page-cs-ops-center input[type="text"]:focus,
#page-cs-train-exp input[type="text"]:focus,
#page-cs-config input[type="text"]:focus,
#page-cs-workbench input[type="text"]:focus,
#page-cs-training input[type="text"]:focus,
#page-cs-tickets input[type="text"]:focus,
#page-cs-settings input[type="text"]:focus,
#page-cs-quality input[type="text"]:focus,
#page-cs-dashboard input[type="text"]:focus,
#page-cs-satisfaction input[type="text"]:focus,
#page-cs-sentiment input[type="text"]:focus {
  outline:none;
  border-color:rgba(99,102,241,.5);
  box-shadow:0 0 0 3px rgba(99,102,241,.12);
}

/* ── 通用表格升级 ── */
#page-cs-ops-center table,
#page-cs-tickets table,
#page-cs-quality table,
#page-cs-settings table,
#page-cs-training table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border-radius:12px;
  overflow:hidden;
  background:rgba(15,23,42,.4);
  border:1px solid rgba(99,102,241,.08);
}
#page-cs-ops-center table thead th,
#page-cs-tickets table thead th,
#page-cs-quality table thead th,
#page-cs-settings table thead th,
#page-cs-training table thead th {
  padding:12px 16px;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--text-muted);
  background:rgba(99,102,241,.06);
  border-bottom:1px solid rgba(99,102,241,.12);
}
#page-cs-ops-center table tbody td,
#page-cs-tickets table tbody td,
#page-cs-quality table tbody td,
#page-cs-settings table tbody td,
#page-cs-training table tbody td {
  padding:12px 16px;
  font-size:13px;
  border-bottom:1px solid rgba(99,102,241,.06);
  transition:background .15s;
}
#page-cs-ops-center table tbody tr:hover td,
#page-cs-tickets table tbody tr:hover td,
#page-cs-quality table tbody tr:hover td,
#page-cs-settings table tbody tr:hover td,
#page-cs-training table tbody tr:hover td {
  background:rgba(99,102,241,.04);
}

/* ── 工单列表项升级 ── */
#page-cs-tickets [id$="Content"] > div > div {
  background:var(--card-glass);
  border:1px solid rgba(99,102,241,.08);
  border-radius:12px;
  padding:16px;
  margin-bottom:10px;
  transition:all .2s;
  backdrop-filter:blur(4px);
}
#page-cs-tickets [id$="Content"] > div > div:hover {
  border-color:rgba(99,102,241,.2);
  box-shadow:0 4px 16px rgba(99,102,241,.1);
  transform:translateY(-1px);
}

/* ── 图表容器升级 ── */
#page-cs-dashboard [id*="Chart"],
#page-cs-ops-center [id*="Chart"] {
  background:var(--card-glass);
  border:1px solid rgba(99,102,241,.08);
  border-radius:14px;
  padding:16px;
  margin-bottom:14px;
  backdrop-filter:blur(4px);
}

/* ── 图表标题动态图标 ── */
#page-cs-dashboard [style*="font-weight:600"] > span,
#page-cs-ops-center [style*="font-weight:600"] > span {
  display:inline-block;
  -webkit-text-stroke:0;
  text-shadow:none;
}
#page-cs-dashboard [style*="font-weight:600"] > span:first-child,
#page-cs-ops-center [style*="font-weight:600"] > span:first-child {
  animation:csIconPulse 2.5s ease-in-out infinite;
}
@keyframes csIconPulse {
  0%,100% { transform:scale(1); }
  50% { transform:scale(1.2); }
}
@keyframes csGlow {
  0%,100% { filter:drop-shadow(0 0 4px rgba(99,102,241,.3)); }
  50% { filter:drop-shadow(0 0 12px rgba(99,102,241,.6)); }
}

/* ── 实时大盘指标升级 ── */
#page-cs-dashboard [id*="rt"],
#page-cs-ops-center [id*="rt"] {
  text-align:center;
  padding:14px 8px;
}

/* ── 客服工作台（老版）消息区升级 ── */
#page-cs-workbench .cs-messages {
  background:linear-gradient(180deg,rgba(99,102,241,.03),rgba(34,197,94,.02) 50%,transparent);
  padding:20px;
}

/* ================================================================
   [v6.5+] 智能客服 UI 升级 — 结束
   ================================================================ */

/* ── 客户画像侧边栏 ── */
.wb-profile-panel {
  position:fixed; top:0; right:-380px; width:360px; height:100vh;
  background:rgba(15,23,42,.95); border-left:1px solid rgba(99,102,241,.18);
  box-shadow:-8px 0 30px rgba(0,0,0,.4);
  z-index:9000; transition:right .3s ease; display:flex; flex-direction:column;
  backdrop-filter:blur(12px);
}
.wb-profile-panel.open { right:0; }
.wb-profile-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 20px; border-bottom:1px solid rgba(99,102,241,.15);
}
.wb-profile-header h3 { font-size:15px; font-weight:700; }
.wb-profile-body { flex:1; overflow-y:auto; padding:16px; }
.wb-profile-section {
  background:rgba(15,23,42,.5); border:1px solid rgba(99,102,241,.1);
  border-radius:10px; padding:14px; margin-bottom:14px;
}
.wb-profile-section h4 {
  font-size:11px; font-weight:700; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px;
  padding-bottom:6px; border-bottom:1px dashed rgba(99,102,241,.15);
}
.wb-profile-name { font-size:18px; font-weight:700; }
.wb-profile-company { font-size:12px; color:var(--text-muted); margin-top:4px; }
.wb-profile-phone { font-size:12px; color:var(--primary); margin-top:4px; }
.wb-profile-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.wb-profile-stat { text-align:center; padding:8px; background:rgba(99,102,241,.06); border-radius:8px; }
.wb-profile-stat-val { font-size:18px; font-weight:800; color:#a5b4fc; }
.wb-profile-stat-label { font-size:10px; color:var(--text-muted); margin-top:2px; }
.wb-profile-tags { display:flex; flex-wrap:wrap; gap:4px; }
.wb-profile-tag {
  font-size:10px; padding:3px 8px; border-radius:6px;
  background:rgba(99,102,241,.1); color:#a5b4fc; border:1px solid rgba(99,102,241,.2); font-weight:600;
}
.wb-profile-history-item {
  padding:8px 10px; border-radius:6px; cursor:pointer; font-size:11px;
  margin-bottom:4px; transition:.15s; background:rgba(99,102,241,.04);
}
.wb-profile-history-item:hover { background:rgba(99,102,241,.12); }

/* ── 数据看板图表容器 ── */
.wb-chart-box {
  background:rgba(15,23,42,.4); border:1px solid rgba(99,102,241,.1);
  border-radius:10px; padding:12px;
}
.wb-chart-title {
  font-size:12px; font-weight:700; color:var(--text-light);
  margin-bottom:8px; padding-bottom:6px;
  border-bottom:1px dashed rgba(99,102,241,.12);
}

/* ── 设置弹窗优化 ── */
.wb-settings-modal { position:fixed; inset:0; z-index:10000; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.6); backdrop-filter:blur(4px); }
.wb-settings-box { background:rgba(15,23,42,.95); border:1px solid rgba(99,102,241,.2); border-radius:14px; width:90%; max-width:520px; max-height:80vh; overflow-y:auto; }
.wb-settings-box .settings-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid rgba(99,102,241,.15); }
.wb-settings-box .settings-body { padding:20px; }
.wb-settings-box .settings-group { margin-bottom:18px; }
.wb-settings-box .settings-group label { display:block; font-size:12px; font-weight:600; color:var(--text-light); margin-bottom:8px; }
.wb-settings-box .settings-group .checkbox-group { display:flex; flex-direction:column; gap:6px; }
.wb-settings-box .settings-group .checkbox-group label { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:400; cursor:pointer; }
.wb-settings-box .settings-group input[type="number"] { width:80px; padding:6px 10px; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.2); border-radius:8px; color:var(--text); font-size:12px; }
.wb-settings-box .settings-footer { display:flex; gap:8px; justify-content:flex-end; padding:14px 20px; border-top:1px solid rgba(99,102,241,.15); }

/* Modal - 使用已有的 .modal-overlay 与 .modal-overlay.show，不重复定义 .modal-overlay 以免覆盖 display:none */
.modal-overlay.show { z-index:10000; }
.modal-content { background:var(--card-bg); border-radius:12px; border:1px solid var(--border); width:90%; max-width:500px; max-height:80vh; overflow-y:auto; }
.modal-header { padding:16px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:15px; margin:0; }
.modal-close { background:none; border:none; color:var(--text-muted); font-size:20px; cursor:pointer; padding:0 4px; }
.modal-close:hover { color:var(--text); }
.modal-body { padding:20px; }
.modal-footer { padding:12px 20px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; font-size:12px; color:var(--text-muted); margin-bottom:5px; font-weight:600; }
/* ── 渠道接入卡片（客服设置-渠道接入 / 渠道绑定管理）── */
.bind-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:18px; }

.bind-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 0;
  border: 1px solid var(--border);
  transition: all .2s ease;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.bind-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.bind-card.bound {
  border-color: rgba(0,212,170,.45);
  background: linear-gradient(180deg, var(--card-bg) 0%, rgba(0,212,170,.04) 100%);
}

.bind-card .card-header { padding:18px 18px 14px; display:flex; align-items:flex-start; gap:12px; }
.bind-card .platform-icon-wrap { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0; }
.bind-card .card-info { flex:1; min-width:0; }
.bind-card .card-info h3 { font-size:15px; margin-bottom:2px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bind-card .card-info .method-tag { font-size:10px; padding:3px 9px; border-radius:20px; font-weight:600; letter-spacing:.3px; flex-shrink:0; }
.bind-card .card-info .method-tag.config { background:rgba(55,66,250,.15); color:var(--info); }
.bind-card .card-info .method-tag.scan { background:rgba(0,212,170,.15); color:var(--primary); }
.bind-card .status-row { display:flex; align-items:center; gap:8px; margin-top:6px; font-size:12px; }
.bind-card .status-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.bind-card .status-dot.online { background:var(--primary); box-shadow:0 0 6px var(--primary); animation:pulse 2s infinite; }
.bind-card .status-dot.warning { background:var(--warning); box-shadow:0 0 6px var(--warning); animation:pulse 2s infinite; }
.bind-card .status-dot.offline { background:var(--text-muted); }

.bind-card .card-body { padding:0 18px 16px; flex:1; }
.bind-card .card-stats { display:flex; gap:10px; margin-bottom:12px; }
.bind-card .card-stat { flex:1; background:var(--bg); border-radius:10px; padding:10px 6px; text-align:center; }
.bind-card .card-stat .val { font-size:17px; font-weight:700; }
.bind-card .card-stat .lbl { font-size:10px; color:var(--text-muted); margin-top:3px; }
.bind-card .card-stat .val.danger { color:var(--danger); }
.bind-card .card-stat .val.success { color:var(--primary); }
.bind-card .card-stat .val.warning { color:var(--warning); }

.bind-card .bound-accounts { margin-bottom:12px; }
.bind-card .bound-account-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; background:var(--bg);
  border-radius:10px; margin-bottom:6px; font-size:12px;
  border:1px solid var(--border);
}
.bind-card .bound-account-item .acc-icon { width:32px; height:32px; border-radius:8px; background:rgba(0,212,170,.1); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.bind-card .bound-account-item .acc-info { flex:1; min-width:0; }
.bind-card .bound-account-item .acc-info .acc-name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bind-card .bound-account-item .acc-info .acc-meta { font-size:10px; color:var(--text-muted); }

.bind-card .data-scope-list {
  font-size:11px; color:var(--text-muted); line-height:1.55;
  padding:10px 12px; background:var(--bg); border-radius:10px;
}
.bind-card .data-scope-list div { position:relative; padding-left:14px; }
.bind-card .data-scope-list div::before { content:'•'; position:absolute; left:0; color:var(--primary); }

/* 底部按钮区：自动换行 + 强制等高 + 居中对齐 */
.bind-card .card-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--bg);
  align-items: stretch;   /* 所有按钮等高 */
  flex-wrap: wrap;        /* 过多时自动换行 */
  margin-top: auto;       /* 始终吸底 */
}
.bind-card .card-footer .btn,
.bind-card .card-footer button {
  flex: 1 1 calc(50% - 5px); /* 两个主按钮平铺，空间不足自动换行 */
  min-width: 90px;
  min-height: 40px;         /* 固定最小高度：换行后仍整齐 */
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  white-space: normal;        /* 允许自动换行 */
  word-break: keep-all;       /* 中文不随意断开 */
  border-radius: 10px;
  transition: all .2s;
}

/* icon-only 删除按钮 */
.bind-card .card-footer .btn-icon-del {
  flex: 0 0 34px;
  min-width: 34px;
  min-height: 34px;
  width: 34px;
  padding: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.bind-card .card-footer .btn-icon-del:hover {
  background: rgba(255,77,79,.12);
  border-color: var(--danger);
  color: var(--danger);
}

/* 推送按钮：紧凑次要操作 */
.bind-card .card-footer .btn-push {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 6px 12px;
  font-size: 11px;
  min-height: 34px;
  border-radius: 8px;
}
.qr-container { text-align:center; padding:20px; }
.qr-canvas-wrap { position:relative; display:inline-block; }
.qr-canvas-wrap canvas { border-radius:16px; border:3px solid var(--border); }
.qr-platform-logo { position:absolute; top:50%;left:50%;transform:translate(-50%,-50%); width:48px;height:48px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;box-shadow:0 2px 8px rgba(0,0,0,.2); }
.qr-countdown { margin-top:12px; font-size:13px; color:var(--warning); font-weight:600; }
.qr-tips { font-size:11px; color:var(--text-muted); margin-top:8px; }
.qr-steps { display:flex; justify-content:center; gap:24px; margin:20px 0; }
.qr-step { text-align:center; width:80px; }
.qr-step .step-num { width:30px; height:30px; border-radius:50%; background:var(--bg); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; margin:0 auto 6px; font-size:13px; font-weight:700; color:var(--text-muted); }
.qr-step .step-num.done { background:var(--primary); border-color:var(--primary); color:#000; }
.qr-step .step-label { font-size:10px; color:var(--text-muted); }
.bind-progress { display:flex; align-items:center; gap:0; margin-bottom:20px; }
.bind-progress .bp-step { flex:1; text-align:center; position:relative; }
.bind-progress .bp-step .bp-dot { width:14px; height:14px; border-radius:50%; background:var(--border); margin:0 auto 6px; transition:.3s; }
.bind-progress .bp-step .bp-dot.active { background:var(--primary); box-shadow:0 0 8px rgba(0,212,170,.5); }
.bind-progress .bp-step .bp-dot.done { background:var(--primary); }
.bind-progress .bp-step .bp-label { font-size:10px; color:var(--text-muted); }
.bind-progress .bp-line { height:2px; background:var(--border); flex:0 0 40px; margin-top:6px; }
.bind-progress .bp-line.done { background:var(--primary); }
@keyframes dataFlow { 0%{opacity:0;transform:translateY(-10px)} 50%{opacity:1} 100%{opacity:1;transform:translateY(0)} }
.data-flow-item { animation:dataFlow .5s ease forwards; opacity:0; }
.knowledge-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.knowledge-card { background:var(--card-bg); border-radius:var(--radius); padding:20px; border:1px solid var(--border); }
.knowledge-card h4 { font-size:15px; margin-bottom:6px; }
.knowledge-card .cat { font-size:11px; color:var(--primary); margin-bottom:8px; }
.knowledge-card .desc { font-size:12px; color:var(--text-muted); margin-bottom:8px; line-height:1.5; }
/* ===== 线索详情弹窗 - 方案1: 信息条+双栏 ===== */
/* 详情面板: 改为双栏布局 */
.detail-panel { display:grid; grid-template-columns:1fr 380px; gap:20px; }
.detail-panel .detail-section:first-child {
  grid-row:auto;
}
.modal-lead-detail .detail-panel {
  grid-template-columns:1fr 400px;
}
@media(max-width:1100px) {
  .modal-lead-detail .detail-panel { grid-template-columns:1fr 340px; }
}
@media(max-width:900px) {
  .modal-lead-detail .detail-panel { grid-template-columns:1fr; }
}

/* ===== 横向指标条 (Metric Bar) ===== */
.ld-metric-bar {
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:10px;
  padding:16px 20px;
  background:linear-gradient(135deg, rgba(0,212,170,.04), rgba(99,102,241,.03));
  border-radius:12px;
  border:1px solid var(--border);
  margin-bottom:16px;
}
.ld-mb-card {
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:10px 8px;border-radius:10px;background:var(--bg);
  border:1px solid transparent;transition:.18s;text-align:center;
  min-width:0;overflow:hidden;
}
.ld-mb-card:hover {
  border-color:var(--border);
  transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.ld-mb-icon { font-size:14px;margin-bottom:2px; }
.ld-mb-val { font-size:17px;font-weight:900;line-height:1.1;color:#fff;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%; }
.ld-mb-label { font-size:9.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.6px;opacity:.85; }

/* 指标卡片颜色主题 - 用青/紫/琥珀替代刺眼红 */
.ld-mb-card.amount { border-color:rgba(0,212,170,.15);background:linear-gradient(135deg, rgba(0,212,170,.06), transparent); }
.ld-mb-card.amount .ld-mb-val { color:var(--primary);text-shadow:0 0 12px rgba(0,212,170,.25); }
.ld-mb-card.prob-high .ld-mb-val { color:#00e6b8; }
.ld-mb-card.prob-mid .ld-mb-val { color:#ffc94d; }
.ld-mb-card.prob-low .ld-mb-val { color:#f59e0b; }
.ld-mb-card.risk-high { border-color:rgba(245,158,11,.18);background:linear-gradient(135deg, rgba(245,158,11,.05), transparent); }
.ld-mb-card.risk-high .ld-mb-val { color:#f59e0b; }
.ld-mb-card.risk-mid .ld-mb-val { color:#ffc94d; }
.ld-mb-card.risk-low .ld-mb-val { color:#94a3b8; }
.ld-mb-card.health-warn { border-color:rgba(251,146,60,.2);background:linear-gradient(135deg, rgba(251,146,60,.06), transparent); }
.ld-mb-card.health-warn .ld-mb-val { color:#fb923c; font-weight:900; text-shadow:0 0 12px rgba(251,146,60,.4), 0 0 3px rgba(251,146,60,.3); } /* 亮橙色+发光 */
.ld-mb-card.health-ok .ld-mb-val { color:var(--primary); }
.ld-mb-card.stage { border-color:rgba(139,92,246,.15);background:linear-gradient(135deg, rgba(139,92,246,.04), transparent); }
.ld-mb-card.stage .ld-mb-val { color:#a78bfa;font-size:13px;padding:2px 10px;border-radius:6px;background:rgba(167,139,250,.1); }

/* ===== 信息副行 (标签+下一步+联系方式) ===== */
.ld-info-subrow {
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  padding:12px 20px;border-radius:10px;border:1px solid var(--border);
  background:linear-gradient(135deg, rgba(255,255,255,.01), transparent);
  margin-bottom:16px;font-size:12px;
}
.ld-info-subrow .sub-item {
  display:inline-flex;align-items:center;gap:5px;color:var(--text-light);
  padding:4px 10px;border-radius:6px;background:rgba(255,255,255,.02);
}
.ld-info-subrow .sub-item b { color:var(--text);font-weight:600; }
.ld-info-subrow .sub-contact { font-weight:700;color:var(--primary); }
.ld-info-subrow .sub-divider { width:1px;height:16px;background:var(--border);margin:0 4px; }

/* ===== 红色优化为协调色系 ===== */
/* 健康度异常: 用琥珀/橙色替代纯红 */
.health-text-warn { color:#f59e0b!important; } /* amber 替代 red */
.health-text-crit { color:#f97316!important; } /* orange 替代 bright-red */
/* 风险高: amber 替代 red */
.risk-text-high { color:#f59e0b!important; }
/* 成交概率低: orange */
.prob-text-low { color:#f59e0b!important; }
/* 不利信号: amber bg 替代 red bg */
.signal-neg-box { background:rgba(245,158,11,.07)!important;border-color:rgba(245,158,11,.12)!important;color:#ffc94d!important; }
/* 综合评估: amber 替代 red */
.assess-box { background:linear-gradient(135deg,rgba(245,158,11,.06),transparent)!important;border-left-color:#f59e0b!important; }
.assess-title { color:#f59e0b!important; }
.detail-section {
  background:linear-gradient(145deg,var(--card-bg),rgba(26,35,50,.6));
  border-radius:14px;padding:20px;border:1px solid var(--border);
  margin-bottom:16px;position:relative;overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.03);
}
/* section顶部装饰线 */
.detail-section::before {
  content:'';position:absolute;top:0;left:20px;right:20px;height:2px;
  border-radius:0 0 2px 2px;background:linear-gradient(90deg,transparent,var(--primary),transparent);opacity:.5;
}
.detail-section h4 {
  font-size:13px;font-weight:700;color:var(--primary);margin-bottom:16px;
  padding-bottom:12px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:8px;text-transform:uppercase;letter-spacing:.8px;
  font-family:'SF Mono',Consolas,monospace;
}
.detail-field {
  display:flex;margin-bottom:12px;font-size:13px;line-height:1.6;align-items:flex-start;
  padding:6px 10px;border-radius:8px;transition:.15s;
}
.detail-field:hover { background:rgba(255,255,255,.03); }
.detail-field .label {
  color:var(--text-muted);width:80px;flex-shrink:0;font-weight:600;font-size:11px;
  text-transform:uppercase;letter-spacing:.3px;padding-top:1px;
}
.timeline { position:relative;padding-left:24px;max-height:400px;overflow-y:auto; }
.timeline::-webkit-scrollbar { width:4px; }
.timeline::-webkit-scrollbar-track { background:transparent; }
.timeline::-webkit-scrollbar-thumb { background:var(--border);border-radius:4px; }
.timeline::before {
  content:'';position:absolute;left:7px;top:0;bottom:0;width:2px;
  background:linear-gradient(to bottom,var(--primary) 0%,rgba(0,212,170,.15) 50%,var(--border) 100%);
  border-radius:1px;
}
.timeline-item {
  position:relative;margin-bottom:20px;padding-left:16px;
  padding:12px 14px 12px 16px;border-radius:10px;
  background:linear-gradient(135deg,rgba(255,255,255,.02),transparent);
  border:1px solid transparent;transition:.2s;
}
.timeline-item:hover { background:rgba(255,255,255,.04);border-color:var(--border); }
.timeline-item::before {
  content:'';position:absolute;left:-21px;top:16px;
  width:11px;height:11px;background:var(--bg);border-radius:50%;
  border:2.5px solid var(--primary);z-index:2;
  box-shadow:0 0 8px rgba(0,212,170,.3);
}
.timeline-item .time {
  font-size:11px;color:var(--text-muted);font-weight:600;
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:5px;
  font-family:'SF Mono',Consolas,monospace;
}
.timeline-item .content {
  font-size:13px;line-height:1.7;white-space:pre-wrap;word-break:break-word;
  color:var(--text);
}
.timeline-item .tag {
  font-size:10px;font-weight:700;background:rgba(0,212,170,.15);color:#00d4aa;
  padding:2px 8px;border-radius:8px;margin-left:4px;
  text-transform:uppercase;letter-spacing:.5px;
}
.highlight-box { background:rgba(245,158,11,.08); border:1px solid rgba(245,158,11,.2); border-radius:8px; padding:12px; margin-bottom:12px; }
.insight-box { background:rgba(0,212,170,.06); border:1px solid rgba(0,212,170,.15); border-radius:8px; padding:12px; margin-bottom:12px; }
/* 详情弹窗内告警卡片 - 重新设计 */
.alert-card {
  display:flex;gap:12px;padding:14px 16px;
  background:linear-gradient(135deg,rgba(251,146,60,.05),transparent);
  border-radius:10px;border-left:4px solid #f59e0b;
  margin-bottom:10px;font-size:13px;line-height:1.5;
  border:1px solid rgba(251,146,60,.1);transition:.2s;
}
.alert-card:hover { background:linear-gradient(135deg,rgba(251,146,60,.09),rgba(251,146,60,.02)); }
.alert-card.alert-warning {
  border-left-color:var(--warning);
  background:linear-gradient(135deg,rgba(245,158,11,.06),transparent);
  border-color:rgba(245,158,11,.1);
}
.alert-card.alert-warning:hover { background:linear-gradient(135deg,rgba(245,158,11,.10),rgba(245,158,11,.02)); }
.alert-card.alert-info {
  border-left-color:var(--primary);
  background:linear-gradient(135deg,rgba(0,212,170,.05),transparent);
  border-color:rgba(0,212,170,.08);
}
.alert-card.alert-info:hover { background:linear-gradient(135deg,rgba(0,212,170,.10),rgba(0,212,170,.02)); }
/* AI提示框 */
.ai-tip { background:linear-gradient(135deg,rgba(102,126,234,.08),rgba(118,75,162,.05)); border:1px solid rgba(102,126,234,.2); border-radius:8px; padding:10px 12px; margin-bottom:10px; font-size:12px; }
.ai-tip .ai-label { color:#667eea; font-weight:700; margin-bottom:4px; font-size:11px; }
.alert-card .alert-badge {
  flex-shrink:0;font-size:10px;font-weight:700;padding:2px 8px;border-radius:4px;
  letter-spacing:.3px;
}
.alert-badge.risk { background:rgba(251,146,60,.15);color:#fb923c; }
.alert-badge.warning { background:rgba(245,158,11,.15);color:#fbbf24; }
.alert-badge.info { background:rgba(99,102,241,.12);color:#818cf8; }
.alert-card .alert-text { color:var(--text-light);font-size:12px;line-height:1.6; }

/* ===== 线索详情弹窗 - 全新设计系统 ===== */
/* 详情头部 */
.ld-header {
  background:linear-gradient(135deg,rgba(0,212,170,.08) 0%,rgba(55,66,250,.06) 50%,transparent 100%);
  border-bottom:1px solid var(--border);padding:22px 32px;
  display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:16px;
  flex-shrink:0;
}
.ld-header-left { flex:1;min-width:280px; }
.ld-header-right { display:flex;gap:8px;flex-shrink:0;align-items:center;padding-top:4px; }
.ld-title-row { display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px; }
.ld-customer-name { font-size:24px;font-weight:900;color:#fff;letter-spacing:-.3px; }
.ld-company-name { font-size:15px;color:var(--text-muted);font-weight:500; }
.ld-meta-row { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }

/* 状态徽章 */
.ld-badge {
  padding:4px 14px;border-radius:20px;font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.5px;
}
.ld-badge-active { background:linear-gradient(135deg,rgba(0,212,170,.18),rgba(0,212,170,.08));color:#00e6b8;border:1px solid rgba(0,212,170,.25); }
.ld-badge-lost { background:linear-gradient(135deg,rgba(255,71,87,.18),rgba(255,71,87,.08));color:#ff7a88;border:1px solid rgba(255,71,87,.25); }
.ld-badge-won { background:linear-gradient(135deg,rgba(55,66,250,.18),rgba(55,66,250,.08));color:#818cff;border:1px solid rgba(55,66,250,.25); }
.ld-level-badge {
  padding:3px 14px;border-radius:20px;font-size:11px;font-weight:800;border:none;
}
.ld-level-S { background:linear-gradient(135deg,rgba(255,215,0,.2),rgba(255,215,0,.08));color:#ffd700;text-shadow:0 0 10px rgba(255,215,0,.2); }
.ld-level-A { background:linear-gradient(135deg,rgba(99,102,241,.2),rgba(99,102,241,.08));color:#818cff; }
.ld-level-B { background:linear-gradient(135deg,rgba(0,212,170,.15),rgba(0,212,170,.05));color:#00d4aa; }
.ld-level-C { background:rgba(148,163,184,.1);color:#94a3b8; }

/* AI指标卡片 */
.ld-metric-grid { display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px; }
.ld-metric-card {
  text-align:center;padding:20px 16px;border-radius:14px;
  position:relative;overflow:hidden;border:1px solid var(--border);
  transition:.2s;
}
.ld-metric-card:hover { transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.2); }
.ld-metric-card::before {
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  border-radius:14px 14px 0 0;
}
/* 成交概率 */
.ld-met-win { background:linear-gradient(145deg,rgba(0,212,170,.07),rgba(0,212,170,.01));border-color:rgba(0,212,170,.15); }
.ld-met-win::before { background:linear-gradient(90deg,#00d4aa,rgba(0,212,170,.3)); }
.ld-met-win.high { background:linear-gradient(145deg,rgba(0,212,170,.12),rgba(0,212,170,.03));border-color:rgba(0,212,170,.28); }
.ld-met-win.mid { background:linear-gradient(145deg,rgba(245,158,11,.09),rgba(245,158,11,.02));border-color:rgba(245,158,11,.2); }
.ld-met-win.low { background:linear-gradient(145deg,rgba(245,158,11,.07),rgba(245,158,11,.01));border-color:rgba(245,158,11,.18); }
/* 风险评分 */
.ld-met-risk-high { background:linear-gradient(145deg,rgba(245,158,11,.09),rgba(245,158,11,.02));border-color:rgba(245,158,11,.22); }
.ld-met-risk-high::before { background:linear-gradient(90deg,#f59e0b,rgba(245,158,11,.35)); }
.ld-met-risk-mid { background:linear-gradient(145deg,rgba(245,158,11,.07),rgba(245,158,11,.01));border-color:rgba(245,158,11,.18); }
.ld-met-risk-mid::before { background:linear-gradient(90deg,#f59e0b,rgba(245,158,11,.30)); }
.ld-met-risk-low { background:linear-gradient(145deg,rgba(0,212,170,.06),rgba(0,212,170,.01));border-color:rgba(0,212,170,.15); }
.ld-met-risk-low::before { background:linear-gradient(90deg,#00d4aa,rgba(0,212,170,.25)); }
.ld-metric-label { font-size:11px;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.8px;margin-bottom:8px; }
.ld-metric-value { font-size:36px;font-weight:900;line-height:1;letter-spacing:-1.5px; }
.ld-metric-sub { font-size:11px;margin-top:8px;opacity:.8; }

/* 信息组 - 基本信息区 */
.ld-info-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:6px 14px;
}
.ld-info-grid .field-full { grid-column:span 2; }
.ld-contact-hero {
  display:flex;align-items:center;gap:12px;padding:14px 16px;
  background:linear-gradient(135deg,rgba(0,212,170,.06),rgba(0,212,170,.02));
  border-radius:12px;border:1px solid rgba(0,212,170,.15);
  margin-bottom:14px;grid-column:span 2;
}
.ld-contact-name { font-size:18px;font-weight:900;color:#fff; }
.ld-contact-phone { font-size:13px;color:var(--primary);font-weight:600; }
.ld-info-field {
  display:flex;flex-direction:column;gap:3px;
  padding:8px 12px;border-radius:8px;
  background:var(--bg);border:1px solid transparent;
  transition:.15s;font-size:12.5px;
}
.ld-info-field:hover { border-color:var(--border);background:rgba(255,255,255,.03); }
.ld-info-field .fld-label { font-size:10px;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.5px; }
.ld-info-field .fld-val { color:var(--text);font-weight:500;line-height:1.4; }
.ld-amount-row { grid-column:span 2; }
.ld-amount-inner {
  display:flex;align-items:center;gap:16px;padding:12px 16px;
  background:linear-gradient(135deg,rgba(0,212,170,.07),transparent);
  border-radius:10px;border:1px solid rgba(0,212,170,.12);
}
.ld-amount-num { font-size:26px;font-weight:900;color:var(--primary);text-shadow:0 0 20px rgba(0,212,170,.2); }
.ld-stage-inner {
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.ld-tag-row { display:flex;flex-wrap:wrap;gap:4px; }
.ld-info-group { margin-bottom:8px; }
.ld-info-group .group-title {
  font-size:10px;color:var(--primary);font-weight:800;
  text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;
  padding:4px 0;border-bottom:1px dashed rgba(0,212,170,.2);
  font-family:'SF Mono',Consolas,monospace;
}
.ld-amount-big {
  font-size:26px;font-weight:900;color:var(--primary);
  text-shadow:0 0 20px rgba(0,212,170,.2);
}
.ld-stage-pill {
  display:inline-flex;align-items:center;gap:6px;padding:5px 14px;border-radius:8px;
  background:linear-gradient(135deg,rgba(0,212,170,.15),rgba(0,212,170,.05));
  color:#00e6b8;font-size:13px;font-weight:700;border:1px solid rgba(0,212,170,.2);
}

/* 风险信号列表 */
.ld-risk-list { display:flex;flex-direction:column;gap:8px; }
.ld-risk-item {
  display:flex;align-items:flex-start;gap:10px;padding:10px 12px;
  background:var(--bg);border-radius:8px;font-size:12px;line-height:1.5;
  border:1px solid transparent;transition:.15s;
}
.ld-risk-item:hover { border-color:var(--border);background:rgba(255,255,255,.02); }
.ld-risk-dot { width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:4px;box-shadow:0 0 6px currentColor; }

/* 底部操作栏 */
.ld-toolbar {
  padding:18px 32px;border-top:1px solid var(--border);
  background:linear-gradient(to top,rgba(0,0,0,.15),transparent);
  display:flex;gap:10px;flex-wrap:wrap;
}
.ld-toolbar .btn { font-size:12px;padding:8px 16px; }
/* 批量操作栏 - 始终可见，选中时展开 */
.batch-bar { 
  display:flex; background:var(--card-bg); border:1px solid var(--border); border-radius:8px; padding:8px 16px; margin-bottom:12px; align-items:center; gap:8px; transition:.25s;
}
/* 空闲态：仅显示计数和提示 */
.batch-bar.idle { gap:12px; }
.batch-bar.idle .batch-count-wrap { display:flex;align-items:center;gap:10px; }
.batch-bar.idle .batch-hint { font-size:11px;color:var(--text-muted);font-style:italic; }
/* 选中态：显示所有按钮 */
.batch-bar.active { background:linear-gradient(135deg, rgba(0,212,170,.06), rgba(99,102,241,.04)); border-color:rgba(0,212,170,.2); flex-wrap:wrap; padding:10px 16px; }
.batch-bar.active .batch-actions { display:flex;flex-wrap:wrap;gap:6px;align-items:center;flex:1; }
.batch-bar.idle .batch-actions { display:none !important; }
/* 按钮禁用态（未选中的提示） */
.batch-btn-need-select { opacity:.45; cursor:not-allowed; position:relative; }
.batch-btn-need-select:hover::after {
  content:'请先勾选线索';position:absolute;top:-28px;left:50%;transform:translateX(-50%);
  background:rgba(0,0,0,.85);color:#fff;font-size:10px;padding:3px 8px;border-radius:4px;
  white-space:nowrap;z-index:100;pointer-events:none;animation:fadeInOut 2s forwards;
}
@keyframes fadeInOut { 0%{opacity:0;}15%{opacity:1;}85%{opacity:1;}100%{opacity:0;} }
/* ===== 跟进截图验证 ===== */
.fu-verify-section { margin-top:14px;margin-bottom:16px; }
.fu-upload-area {
  position:relative;border:2px dashed var(--border);border-radius:10px;
  min-height:100px;overflow:hidden;transition:.2s;background:rgba(255,255,255,.01);
}
.fu-upload-area:hover, .fu-upload-area.dragover { border-color:var(--primary);background:rgba(0,212,170,.04); }
.fu-upload-placeholder {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:24px 16px;cursor:pointer;
}
.fu-upload-icon { font-size:28px;margin-bottom:6px;opacity:.6; }
.fu-upload-text { font-size:12px;color:var(--text-light);margin-bottom:4px; }
.fu-upload-hint { font-size:10px;color:var(--text-muted); }
.fu-preview-area { position:relative;display:flex;justify-content:center;padding:12px; }
.fu-preview-area img { max-height:180px;max-width:100%;border-radius:8px;border:1px solid var(--border); }
.fu-preview-overlay {
  position:absolute;top:16px;right:16px;display:flex;gap:6px;align-items:center;
}
.fu-ai-badge {
  padding:3px 10px;border-radius:6px;font-size:10px;font-weight:700;letter-spacing:.3px;
  background:rgba(100,116,139,.15);color:#94a3b8;
}
.fu-ai-badge.ok { background:rgba(0,212,170,.15);color:#00e6b8; }
.fu-ai-badge.warn { background:rgba(245,158,11,.15);color:#fbbf24; }
.fu-ai-badge.verifying { background:rgba(99,102,241,.15);color:#818cf8;animation:pulse 1s infinite; }
.fu-remove-btn {
  width:26px;height:26px;border-radius:50%;border:1px solid var(--border);
  background:rgba(0,0,0,.4);color:var(--text-muted);font-size:12px;
  cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s;
}
.fu-remove-btn:hover { background:rgba(251,146,60,.2);color:#fb923c;border-color:rgba(251,146,60,.3); }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }
.fu-ai-result { margin-top:10px; }
.fu-ai-result-card {
  padding:12px 14px;border-radius:10px;font-size:12px;line-height:1.7;
  border:1px solid var(--border);background:var(--bg);
}
.fu-ai-result-card.ok { border-color:rgba(0,212,170,.2);background:linear-gradient(135deg,rgba(0,212,170,.04),transparent); }
.fu-ai-result-card.warn { border-color:rgba(245,158,11,.2);background:linear-gradient(135deg,rgba(245,158,11,.04),transparent); }
.fu-ai-row { display:flex;gap:8px;margin-bottom:3px; }
.fu-ai-row span { color:var(--text-muted);min-width:80px;flex-shrink:0; }
.fu-ai-row b { color:var(--text);font-weight:600; }
.fu-ai-warn { font-size:11px;color:#fbbf24;padding:6px 10px;background:rgba(245,158,11,.08);border-radius:6px;margin-top:6px; }
.fu-ai-summary { font-size:11px;color:var(--text-muted);margin-top:6px;padding-top:6px;border-top:1px dashed var(--border); }
.notification { position:fixed; top:20px; right:20px; z-index:200000; padding:12px 20px; border-radius:8px; font-size:13px; animation:slideIn .3s ease; max-width:400px; }
.notification.success { background:#00d4aa; color:#000; }
.notification.error { background:#ff4757; color:#fff; }
.notification.info { background:#3742fa; color:#fff; }
.notification.warning { background:#fbbf24; color:#000; }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes slideInRight { from{transform:translateX(120%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes csPulse { 0%,100%{opacity:0.5} 50%{opacity:1} }
/* P0: 弹窗通知 toast */
.toast-notify { position:fixed; bottom:20px; right:20px; z-index:10001; }
/* P1: 模块通知条 */
.module-notify-bar { display:none; align-items:center; gap:10px; padding:8px 16px; border-radius:8px; font-size:12px; margin-bottom:12px; cursor:pointer; transition:all .2s; }
.module-notify-bar.crm { background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.25); }
.module-notify-bar.erp { background:rgba(59,130,246,.08); border:1px solid rgba(59,130,246,.25); }
.module-notify-bar:hover { transform:translateY(-1px); }
.module-notify-bar .bar-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.module-notify-bar.crm .bar-dot { background:var(--danger); animation:pulse 2s infinite; }
.module-notify-bar.erp .bar-dot { background:var(--info); animation:pulse 2s infinite; }
.module-notify-bar .bar-count { font-weight:700; font-size:13px; }
.module-notify-bar.crm .bar-count { color:var(--danger); }
.module-notify-bar.erp .bar-count { color:var(--info); }
.module-notify-bar .bar-label { color:var(--text-muted); }
.module-notify-bar .bar-arrow { color:var(--text-muted); font-size:11px; }

/* ===== 通知中心 UI 改造 ===== */

/* 统计卡片（去色块，纯边框） */
.notify-stats-bar { margin-bottom:14px; }
.notify-stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.notify-stat { background:var(--card-bg); border:1px solid var(--border); border-radius:10px; padding:12px 14px; text-align:center; transition:all .2s; }
.notify-stat:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(0,0,0,.08); border-color:var(--primary); }
.notify-stat .val { font-size:22px; font-weight:700; color:var(--text); }
.notify-stat .label { font-size:10px; color:var(--text-muted); margin-top:4px; }

/* 模块 tab hover 效果 */
.notify-filter-bar .tab { padding:6px 14px; border-radius:6px; transition:all .15s; cursor:pointer; }
.notify-filter-bar .tab:hover { background:rgba(255,255,255,.08); color:var(--text); }
.notify-filter-bar .tab.active { background:rgba(255,255,255,.1); }

/* 通知分组（极简，无色块） */
.notify-group { }
.notify-group-header { margin-bottom:4px; opacity:.85; }

/* 通知卡片（精简，无大色块） */
.notif-card { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; cursor:pointer; transition:background .15s, transform .15s, opacity .15s; margin-bottom:3px; background:transparent; border:1px solid transparent; }
.notif-card:hover { background:rgba(255,255,255,.08); transform:translateX(2px); border-color:rgba(255,255,255,.1); }
.notif-card.unread { background:rgba(255,255,255,.025); }
.notif-card.unread:hover { background:rgba(55,66,250,.08); border-color:rgba(55,66,250,.2); }
.notif-card.read { opacity:.55; }
.notif-card.read:hover { opacity:.9; background:rgba(255,255,255,.06); }
.notif-level-dot { width:3px; height:14px; border-radius:1.5px; flex-shrink:0; opacity:.7; }
.notif-card.unread .notif-level-dot { opacity:1; }
.notif-card.read .notif-level-dot { opacity:.25; }
.notif-card-icon { display:flex; align-items:center; justify-content:center; width:24px; }
.notif-card-body { flex:1; min-width:0; overflow:hidden; }
.notif-card-title { font-size:13px; line-height:1.4; color:var(--text); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notif-card.unread .notif-card-title { font-weight:600; }
.notif-card-content { font-size:11px; color:var(--text-muted); margin-top:2px; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.notif-card-meta { display:flex; gap:6px; margin-top:4px; align-items:center; font-size:10px; color:var(--text-muted); }
.notif-meta-item { opacity:.7; }
.notif-meta-time { margin-left:auto; opacity:.5; }
.notif-card-right { flex-shrink:0; width:18px; display:flex; align-items:center; justify-content:center; }
.notif-read-btn { background:none; border:none; cursor:pointer; font-size:16px; color:var(--danger); padding:0; line-height:1; opacity:.4; }
.notif-read-btn:hover { opacity:1; }
.notif-read-mark { font-size:13px; color:var(--text-muted); opacity:.4; }

/* 模态弹窗 toast（屏幕中央） */
.toast-mask { position:fixed; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px); z-index:10000; animation:fadeIn .2s ease; }
.toast-mask-closing { animation:fadeOut .2s ease forwards; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeOut { from{opacity:1} to{opacity:0} }
.toast-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:420px; max-width:90vw; max-height:80vh; overflow:auto; background:var(--card-bg); border-radius:14px; box-shadow:0 24px 64px rgba(0,0,0,.5); z-index:10001; padding:0; animation:zoomIn .25s cubic-bezier(.34,1.56,.64,1); }
.toast-modal-closing { animation:zoomOut .2s ease forwards; }
@keyframes zoomIn { from{opacity:0;transform:translate(-50%,-50%) scale(.85)} to{opacity:1;transform:translate(-50%,-50%) scale(1)} }
@keyframes zoomOut { from{opacity:1;transform:translate(-50%,-50%) scale(1)} to{opacity:0;transform:translate(-50%,-50%) scale(.9)} }
.toast-modal-header { display:flex; align-items:center; gap:12px; padding:18px 20px 12px; position:relative; }
.toast-modal-icon { font-size:28px; flex-shrink:0; }
.toast-modal-title-wrap { flex:1; min-width:0; }
.toast-modal-level { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:4px; opacity:.7; }
.toast-modal-title { font-size:15px; font-weight:600; color:var(--text); }
.toast-modal-close { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:24px; line-height:1; padding:0; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.toast-modal-close:hover { background:rgba(255,255,255,.08); color:var(--text); }
.toast-modal-body { padding:0 20px 14px; font-size:13px; line-height:1.6; color:var(--text); }
.toast-modal-meta { display:flex; gap:10px; padding:0 20px 14px; font-size:11px; color:var(--text-muted); }
.toast-modal-tag { background:rgba(255,255,255,.06); padding:2px 10px; border-radius:10px; }
.toast-modal-time { opacity:.7; }
.toast-modal-actions { display:flex; gap:8px; padding:14px 20px 18px; border-top:1px solid var(--border); justify-content:flex-end; }
.toast-modal-actions .btn { font-size:12px; }

/* 弹窗按级别染色 */
.toast-modal.level-critical .toast-modal-icon { filter:drop-shadow(0 0 8px var(--danger)); }
.toast-modal.level-warning .toast-modal-icon { filter:drop-shadow(0 0 8px var(--warning)); }

/* 响应式 */
@media (max-width:768px) {
  .notify-stats-grid { grid-template-columns:repeat(3,1fr); }
  .toast-modal { width:92vw; }
}
.report-summary-box { background:linear-gradient(135deg,rgba(0,212,170,.05),rgba(55,66,250,.05)); border:1px solid var(--border); border-radius:var(--radius); padding:20px; margin-bottom:20px; }
.report-summary-box h3 { color:var(--primary); margin-bottom:10px; }
.report-summary-box p { font-size:13px; line-height:1.8; color:var(--text-muted); }
.schedule-bar { display:flex; gap:10px; align-items:center; padding:10px 0; margin-bottom:16px; }
.schedule-bar label { font-size:13px; color:var(--text-muted); }
.schedule-bar select, .schedule-bar input { padding:6px 12px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); }
.drilldown-overlay { display:none; position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,.7); z-index:999; justify-content:center; align-items:center; }
.drilldown-overlay.show { display:flex; }
.drilldown-panel { background:var(--card-bg); border-radius:var(--radius); padding:24px; width:90%; max-width:1000px; max-height:80vh; overflow-y:auto; border:1px solid var(--border); }
.drilldown-panel h2 { margin-bottom:16px; }
.drilldown-panel .close { float:right; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:20px; }
.confirm-dialog { position:fixed; top:0;left:0;right:0;bottom:0; background:rgba(0,0,0,.65); z-index:10000; display:flex; align-items:center; justify-content:center; }
.confirm-dialog .confirm-box { background:var(--card-bg); border-radius:12px; padding:28px; width:90%; max-width:450px; border:1px solid var(--border); box-shadow:0 20px 60px rgba(0,0,0,.5); text-align:center; }
.confirm-dialog .confirm-icon { font-size:48px; margin-bottom:12px; }
.confirm-dialog .confirm-title { font-size:16px; font-weight:700; margin-bottom:8px; }
.confirm-dialog .confirm-msg { font-size:13px; color:var(--text-muted); margin-bottom:20px; line-height:1.6; white-space:pre-line; }
.confirm-dialog .confirm-actions { display:flex; gap:10px; justify-content:center; }
.confirm-dialog .confirm-actions .btn { min-width:100px; justify-content:center; }
.mini-stats-row { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.mini-stat { background:var(--card-bg); border-radius:8px; padding:12px 16px; border:1px solid var(--border); flex:1; min-width:120px; }
.mini-stat .val { font-size:20px; font-weight:700; }
.mini-stat .lbl { font-size:11px; color:var(--text-muted); }
.progress-cell { display:flex; align-items:center; gap:8px; }
.progress-cell .bar { flex:1; height:6px; background:var(--border); border-radius:3px; overflow:hidden; }
.progress-cell .bar .fill { height:100%; border-radius:3px; }
.progress-cell .bar .fill.green { background:var(--primary); }
.progress-cell .bar .fill.yellow { background:var(--warning); }
.progress-cell .bar .fill.red { background:var(--danger); }
.filter-bar-advanced { display:flex; gap:8px; margin-bottom:8px; flex-wrap:wrap; align-items:center; }
.filter-bar-advanced select, .filter-bar-advanced input { padding:5px 10px; background:var(--bg); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:12px; }
.filter-bar-advanced input[type="date"], .filter-bar-advanced input[type="number"] { width:120px; }
.filter-bar-advanced input.small { width:80px; }
.filter-bar-advanced .sep { color:var(--text-muted); font-size:11px; margin:0 2px; }
.filter-quick { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:10px; }
.filter-quick button { padding:3px 10px; background:var(--bg); border:1px solid var(--border); border-radius:14px; color:var(--text-muted); cursor:pointer; font-size:11px; transition:.2s; }
.filter-quick button:hover, .filter-quick button.on { background:var(--primary); color:#000; border-color:var(--primary); }
.filter-result-info { font-size:11px; color:var(--text-muted); margin-bottom:8px; }
.filter-toggle { font-size:11px; color:var(--primary); cursor:pointer; user-select:none; }
.aihub-chat-container { display:none; position:fixed; top:0;left:0;right:0;bottom:0; background:#0f0f12; z-index:1200; }
.aihub-chat-container.show { display:flex; }
.aihub-chat-sidebar { width:260px; background:#0a0a0d; border-right:1px solid #1e1e24; display:flex; flex-direction:column; flex-shrink:0; }
.aihub-chat-sidebar .model-header { padding:20px 16px; border-bottom:1px solid #1e1e24; }
.aihub-chat-sidebar .back-btn { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-muted); cursor:pointer; margin-bottom:12px; transition:.2s; }
.aihub-chat-sidebar .back-btn:hover { color:var(--primary); }
.aihub-chat-sidebar .model-icon-lg { width:56px; height:56px; border-radius:16px; background:rgba(0,212,170,.1); display:flex; align-items:center; justify-content:center; font-size:28px; margin-bottom:10px; }
.aihub-chat-sidebar .model-name-lg { font-size:16px; font-weight:700; margin-bottom:4px; }
.aihub-chat-sidebar .model-vendor-lg { font-size:11px; color:var(--text-muted); }
.aihub-chat-sidebar .model-info { padding:12px 16px; border-bottom:1px solid #1e1e24; font-size:11px; color:var(--text-muted); line-height:1.6; }
.aihub-chat-sidebar .model-info .info-row { display:flex; justify-content:space-between; padding:3px 0; }
.aihub-chat-sidebar .model-info .info-row span:last-child { color:var(--text); }
.aihub-chat-sidebar .model-tags { padding:8px 16px; display:flex; gap:4px; flex-wrap:wrap; }
.aihub-chat-sidebar .model-tags .tag-sm { font-size:9px; padding:2px 8px; border-radius:8px; background:#1a1a20; color:var(--text-muted); }
.aihub-chat-sidebar .history-section { flex:1; overflow-y:auto; padding:8px 0; }
.aihub-chat-sidebar .history-title { font-size:10px; color:var(--text-muted); padding:8px 16px; text-transform:uppercase; letter-spacing:1px; }
.aihub-chat-sidebar .history-item { padding:8px 16px; cursor:pointer; font-size:11px; color:var(--text-muted); border-left:2px solid transparent; transition:.2s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.aihub-chat-sidebar .history-item:hover, .aihub-chat-sidebar .history-item.active { color:var(--text); background:rgba(0,212,170,.04); border-left-color:var(--primary); }
.aihub-chat-main { flex:1; display:flex; flex-direction:column; min-width:0; }
.aihub-chat-header { padding:14px 24px; border-bottom:1px solid #1e1e24; display:flex; align-items:center; justify-content:space-between; background:#0a0a0d; }
.aihub-chat-header .chat-title { font-size:14px; font-weight:600; display:flex; align-items:center; gap:10px; }
.aihub-chat-header .chat-title .online-dot { width:6px; height:6px; background:var(--primary); border-radius:50%; box-shadow:0 0 6px var(--primary); }
.aihub-chat-header .chat-actions { display:flex; gap:8px; }
.aihub-chat-messages { flex:1; overflow-y:auto; padding:20px 24px; display:flex; flex-direction:column; gap:8px; }
.aihub-chat-input-area { padding:12px 24px 16px; border-top:1px solid #1e1e24; background:rgba(10,10,13,.85); backdrop-filter:blur(12px); }
.aihub-chat-input-row { display:flex; gap:10px; align-items:flex-end; background:#1a1a20; border:1px solid #2a2a32; border-radius:16px; padding:8px 12px; transition:.2s; }
.aihub-chat-input-row:focus-within { border-color:var(--primary); box-shadow:0 0 0 3px rgba(0,212,170,.08); }
.aihub-chat-input-row textarea { flex:1; background:transparent; border:none; color:var(--text); font-size:13px; resize:none; outline:none; min-height:24px; max-height:120px; padding:4px 0; line-height:1.5; font-family:inherit; }
.aihub-chat-input-row textarea::placeholder { color:#555; }
.aihub-chat-input-row .send-btn { width:38px; height:38px; border-radius:50%; background:var(--primary); color:#000; border:none; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:.2s; }
.aihub-chat-input-row .send-btn:hover { opacity:.85; transform:scale(1.05); }
.aihub-chat-input-row .send-btn:disabled { opacity:.4; cursor:default; transform:none; }
.aihub-msg { display:flex; gap:10px; animation:fadeInUp .25s ease; max-width:85%; }
.aihub-msg.user { align-self:flex-end; flex-direction:row-reverse; }
.aihub-msg.assistant { align-self:flex-start; }
.aihub-msg .msg-avatar { width:32px; height:32px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.aihub-msg.user .msg-avatar { background:rgba(0,212,170,.12); }
.aihub-msg.assistant .msg-avatar { background:rgba(55,66,250,.12); }
.aihub-msg .msg-bubble { padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.6; position:relative; }
.aihub-msg.user .msg-bubble { background:rgba(0,212,170,.1); border-bottom-right-radius:4px; color:var(--text); }
.aihub-msg.assistant .msg-bubble { background:#1a1a20; border-bottom-left-radius:4px; color:var(--text); }
.aihub-msg .msg-time { font-size:9px; color:var(--text-muted); margin-top:2px; }
.aihub-msg.user .msg-time { text-align:right; }
.aihub-result-card { margin-top:4px; }
.aihub-result-card.image-card { background:#0a0a0d; border-radius:10px; padding:10px; text-align:center; border:1px solid #1e1e24; }
.aihub-result-card.image-card .img-placeholder { width:100%; max-width:400px; aspect-ratio:16/10; background:linear-gradient(135deg,rgba(139,92,246,.08),rgba(0,212,170,.08)); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:40px; cursor:pointer; transition:.2s; margin:0 auto; }
.aihub-result-card.image-card .img-placeholder:hover { opacity:.8; }
.aihub-result-card .result-meta { font-size:10px; color:var(--text-muted); margin-top:6px; }
.aihub-result-card .result-actions { display:flex; gap:6px; margin-top:8px; justify-content:center; }
.aihub-result-card .result-actions button { padding:4px 10px; border-radius:6px; border:1px solid #2a2a32; background:#1a1a20; color:var(--text-muted); cursor:pointer; font-size:10px; transition:.2s; }
.aihub-result-card .result-actions button:hover { border-color:var(--primary); color:var(--primary); }
.aihub-typing { display:flex; align-items:center; gap:6px; padding:8px 14px; color:var(--text-muted); font-size:11px; }
.aihub-typing .dot-anim { display:flex; gap:3px; }
.aihub-typing .dot-anim span { width:5px; height:5px; background:var(--text-muted); border-radius:50%; animation:dotBounce 1.4s infinite; }
.aihub-typing .dot-anim span:nth-child(2) { animation-delay:.2s; }
.aihub-typing .dot-anim span:nth-child(3) { animation-delay:.4s; }
@keyframes dotBounce { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-6px);opacity:1} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.aihub-collab-grid { display:grid; grid-template-columns:1fr; gap:4px; margin-top:4px; }
.aihub-collab-card { background:rgba(55,66,250,.06); border-radius:8px; padding:8px 10px; font-size:11px; line-height:1.4; border:1px solid rgba(55,66,250,.1); }
.aihub-collab-card .collab-model { font-weight:600; font-size:10px; color:var(--info); margin-bottom:3px; }
.aihub-summary-card { margin-top:6px; padding:10px 12px; background:rgba(0,212,170,.06); border-radius:8px; border:1px solid rgba(0,212,170,.15); font-size:11px; line-height:1.5; }
.aihub-summary-card .summary-label { font-weight:700; font-size:10px; color:var(--primary); margin-bottom:2px; }
@media (max-width:768px) { .aihub-chat-sidebar { width:200px; } .aihub-msg { max-width:95%; } }
@media (max-width:500px) { .aihub-chat-sidebar { display:none; } .aihub-chat-header .chat-title { font-size:12px; } }
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
/* ========== 日期选择器统一美化 ========== */
input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.7) sepia(0.6) saturate(6) hue-rotate(110deg) brightness(1.2);
  opacity: 0.9;
}

/* ============================================================
   协同办公 - 专属样式
   ============================================================ */
/* 过滤器 */
.collab-filter {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13px;
  outline: none; transition: border-color .2s;
}
.collab-filter:focus { border-color: var(--primary); }

/* 面板 */
.collab-panel {
  background: var(--card-bg); border-radius: 12px; padding: 18px;
  border: 1px solid var(--border); transition: border-color .2s;
}
.collab-panel:hover { border-color: rgba(0,212,170,.2); }
.collab-panel-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

/* 项目管理卡片 */
.project-card {
  background: var(--card-bg); border-radius: 14px; padding: 20px;
  border: 1px solid var(--border); cursor: pointer;
  transition: all .25s ease; position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  border-radius: 4px 0 0 4px;
}
.project-card.status-active::before { background: var(--primary); }
.project-card.status-completed::before { background: #6c757d; }
.project-card.status-paused::before { background: var(--warning); }
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-color: rgba(0,212,170,.3);
}
.project-card-header {
  display: flex; justify-content: space-between; align-items: start;
  margin-bottom: 10px;
}
.project-card-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.project-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.project-card-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge-active { background: rgba(0,212,170,.15); color: var(--primary); }
.badge-completed { background: rgba(108,117,125,.15); color: #6c757d; }
.badge-paused { background: rgba(255,165,2,.15); color: var(--warning); }
.badge-overdue { background: rgba(255,71,87,.15); color: var(--danger); font-size: 10px; }

.progress-bar {
  height: 6px; background: var(--border); border-radius: 3px;
  margin: 10px 0; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-fill.high { background: var(--primary); }
.progress-fill.mid { background: var(--warning); }
.progress-fill.low { background: var(--danger); }

/* 协作讨论卡片 */
.thread-card {
  background: var(--card-bg); border-radius: 12px; padding: 16px 18px;
  border: 1px solid var(--border); cursor: pointer;
  transition: all .2s ease;
}
.thread-card:hover {
  border-color: rgba(55,66,250,.3);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.thread-card-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.thread-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; align-items: center; }
.thread-card-ai { 
  font-size: 12px; color: var(--info); margin-top: 8px;
  background: rgba(55,66,250,.08); padding: 8px 10px; border-radius: 8px;
  line-height: 1.5;
}

/* OKR卡片 */
.goal-card {
  background: var(--card-bg); border-radius: 12px; padding: 18px;
  border: 1px solid var(--border); cursor: pointer;
  transition: all .2s ease; display: flex; gap: 16px; align-items: center;
}
.goal-card:hover {
  border-color: var(--primary); transform: translateX(4px);
}
.goal-progress-ring {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--pct)*1%), var(--border) 0);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.goal-ring-inner {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card-bg); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--text);
}
.goal-card-body { flex: 1; min-width: 0; }
.goal-card-header { display: flex; justify-content: space-between; align-items: start; }
.goal-card-title { font-size: 15px; font-weight: 700; }
.goal-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.goal-card-type {
  font-size: 10px; padding: 1px 8px; border-radius: 10px;
  background: rgba(0,212,170,.12); color: var(--primary); font-weight: 600;
}

/* 活跃度排行 */
.rank-item {
  display: flex; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.rank-item:hover { background: rgba(0,212,170,.03); margin: 0 -4px; padding: 8px 4px; border-radius: 6px; }
.rank-pos { width: 28px; font-size: 14px; text-align: center; flex-shrink: 0; }
.rank-name { flex: 1; font-size: 13px; font-weight: 500; }
.rank-score {
  font-weight: 700; font-size: 14px; padding: 2px 10px;
  border-radius: 8px; transition: all .2s;
}
.rank-score.high { color: var(--primary); background: rgba(0,212,170,.1); }
.rank-score.mid { color: var(--warning); background: rgba(255,165,2,.1); }
.rank-score.low { color: var(--danger); background: rgba(255,71,87,.1); }

/* Boss KPI 卡片 */
.kpi-card {
  background: var(--card-bg); border-radius: 14px; padding: 16px 18px;
  border: 1px solid var(--border); text-align: center; cursor: pointer;
  transition: all .2s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.kpi-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.kpi-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* 日报卡片 */
.daily-card {
  background: var(--card-bg); border-radius: 14px; padding: 24px;
  border: 1px solid var(--border); max-width: 720px;
}
.daily-metrics {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 18px;
}
.daily-metric {
  background: var(--bg); border-radius: 10px; padding: 14px 10px;
  text-align: center; border: 1px solid var(--border);
}
.daily-metric-value { font-size: 26px; font-weight: 800; color: var(--primary); }
.daily-metric-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* 统计仪表条 */
.stat-bar-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 13px;
}
.stat-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; margin: 0 12px; }
.stat-bar-fill { height: 6px; border-radius: 3px; background: var(--primary); transition: width .4s; }

/* 空状态 */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  font-size: 14px; line-height: 1.8;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .4; }

/* AI 洞察面板 */
.ai-insight-box {
  background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(55,66,250,.04));
  border: 1px solid rgba(0,212,170,.2); border-radius: 12px;
  padding: 16px 20px; line-height: 1.9; font-size: 13px;
}
.ai-insight-box b { color: var(--primary); }

/* 团队日报列表 */
.team-report-item {
  background: var(--card-bg); border-radius: 10px; padding: 14px 16px;
  border: 1px solid var(--border); margin-bottom: 8px;
  transition: all .15s;
}
.team-report-item:hover { border-color: var(--primary); }
.team-report-submitted { border-left: 3px solid var(--primary); }
.team-report-draft { border-left: 3px solid var(--text-muted); opacity: .7; }

/* Firefox 日期图标 */
input[type="date"]::-moz-calendar-picker-indicator {
  filter: invert(0.7) sepia(0.6) saturate(6) hue-rotate(110deg) brightness(1.2);
}

/* ========== 企业AI智脑 - 知识库专用组件 ========== */
/* 卡片容器 */
.kb-card { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:14px; }
.kb-card-p { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:16px; }
.kb-card-lg { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:18px; margin-bottom:14px; }
/* 内部区域 */
.kb-section { background:var(--bg); border-radius:8px; padding:10px; }
.kb-section-p12 { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:12px; }
.kb-section-p8 { background:var(--bg); border-radius:8px; padding:8px; }
/* 工具栏 */
.kb-toolbar { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:14px; margin-bottom:14px; }
/* 文本样式 */
.kb-meta { font-size:10px; color:var(--text-muted); }
.kb-label { font-weight:600; font-size:12px; }
.kb-desc { font-size:12px; color:var(--text-muted); line-height:1.5; }
.kb-placeholder { text-align:center; padding:20px; color:var(--text-muted); font-size:12px; }
.kb-empty { text-align:center; padding:30px; color:var(--text-muted); }
/* 微标 */
.kb-tag { padding:1px 5px; border-radius:4px; font-size:9px; }
.kb-tag-border { background:var(--bg); border:1px solid var(--border); padding:1px 5px; border-radius:4px; font-size:9px; color:var(--text-muted); }
/* 搜索输入 */
.kb-input { padding:8px 12px; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:12px; }
.kb-select { padding:8px; background:var(--bg); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:11px; }
/* 操作栏 */
.kb-actions { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.kb-actions-top { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
/* 结果卡片 */
.kb-result-card { background:var(--bg); border-radius:8px; padding:10px; }
.kb-result-card-bordered { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:12px; }
/* 分页 */
.kb-pagination { display:flex; gap:6px; justify-content:center; margin-top:14px; }
.kb-page-info { padding:4px 12px; font-size:11px; color:var(--text-muted); }

/* ========== 基础数据管理 ========== */
.ds-tab { cursor: pointer; user-select: none; }
.ds-tab:hover { color: var(--primary) !important; }

/* 表格统一布局 */
.ds-table { width:100%; border-collapse:collapse; }
.ds-table thead th { font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.3px; padding:10px 14px; border-bottom:1px solid var(--border); }
.ds-table tbody tr.ds-row { transition: background .12s; }
.ds-table tbody tr.ds-row:hover { background: rgba(0,212,170,.04); }
.ds-table tbody tr.ds-row td { padding:10px 14px; border-bottom:1px solid var(--border); font-size:13px; vertical-align:middle; }

/* 通用表格 (智能客服/智能培训等) */
.cs-table { width:100%; border-collapse:collapse; font-size:13px; }
.cs-table thead th { text-align:left; padding:10px 12px; background:rgba(99,102,241,.06); color:var(--text-muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.5px; border-bottom:2px solid rgba(99,102,241,.15); white-space:nowrap; }
.cs-table tbody td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.cs-table tbody tr:hover td { background:rgba(99,102,241,.03); }
.cs-table .cs-cell-name { font-weight:600; font-size:13px; }
.cs-table .cs-cell-sub { font-size:11px; color:var(--text-muted); }
.cs-table .cs-cell-mono { font-family:monospace; font-size:12px; }

/* 模态框 + 表单 (培训模块用) */
.tn-modal { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.7); z-index:9999; display:flex; align-items:center; justify-content:center; }
.tn-modal-box { background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius); padding:24px; width:640px; max-width:92vw; max-height:85vh; overflow:auto; }
.tn-modal-box h3 { margin:0 0 16px 0; font-size:17px; }
.tn-modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:16px; }
.tn-form-group { margin-bottom:12px; }
.tn-form-group label { display:block; margin-bottom:4px; font-size:12px; font-weight:600; color:var(--text-muted); }
.tn-form-group input,.tn-form-group textarea,.tn-form-group select { width:100%; padding:8px 10px; background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:6px; font-size:13px; box-sizing:border-box; }
.tn-form-group textarea { resize:vertical; min-height:60px; }

/* [v20260806t] 培训模块空状态 / 表格 / 响应式 */
.tn-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:38px 20px; color:var(--text); }
.tn-empty-state-small { padding:24px 16px; }
.tn-empty-icon { margin-bottom:14px; opacity:.85; }
.tn-empty-state-small .tn-empty-icon { margin-bottom:10px; }
.tn-empty-title { font-size:15px; font-weight:700; margin-bottom:6px; }
.tn-empty-state-small .tn-empty-title { font-size:13px; }
.tn-empty-desc { font-size:12.5px; color:var(--text-muted); max-width:360px; line-height:1.5; }
.tn-empty-action { margin-top:16px; }
.tn-empty-action .btn { display:inline-flex; align-items:center; gap:6px; }
.tn-table-wrap { overflow-x:auto; }
.tn-table { width:100%; border-collapse:collapse; font-size:13px; }
.tn-table th, .tn-table td { padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; }
.tn-table th { background:var(--bg); color:var(--text-muted); font-size:12px; font-weight:600; }
.tn-table tbody tr:hover { background:rgba(0,212,170,.04); }
.tn-modal-box { box-shadow:0 20px 60px rgba(0,0,0,.35); }
.tn-modal-box h3 { display:flex; align-items:center; gap:8px; }
@media (max-width:768px){
  .tn-modal-box { width:92vw; padding:18px; }
  #contentArea .grid-4, #contentArea .grid-3, #contentArea .grid-2 { grid-template-columns:1fr !important; }
}
@media (max-width:480px){
  .tn-modal-actions { flex-direction:column; }
  .tn-modal-actions .btn { width:100%; justify-content:center; }
}

/* 列样式层次 */
.ds-table .ds-idx  { color:var(--text-muted); font-size:11px; }
.ds-table .ds-name { font-weight:600; font-size:13px; }
.ds-table .ds-sub  { font-size:12px; color:var(--text-muted); }
.ds-table .ds-conv { font-size:12px; }
.ds-table .ds-ind  { font-size:11px; }
.ds-table .ds-def  { font-size:13px; color:var(--text-muted); }
.ds-table .ds-sort { font-size:13px; color:var(--text-muted); }
.ds-table .ds-action { white-space:nowrap; }

.ds-tree-node:hover > div:first-child { background: var(--card-hover) !important; }

/* 品牌品类选择器 */
.ds-tree-opt:hover { background: rgba(0,212,170,.08); color: var(--primary); }

/* 品牌品类导航 */
.ds-nav-item { cursor: pointer; border-left: 3px solid transparent; transition: .12s; }
.ds-nav-item:hover { background: rgba(0,212,170,.05); color: var(--primary) !important; }

/* ============================================================
   [NEW] 协同办公扩展样式（仅新增，不覆盖原有）
   ============================================================ */
.collab-filter::placeholder { color: var(--text-muted); opacity: .5; }
.badge-pending { background: rgba(245,158,11,.15); color: var(--warning); }
.badge-suspended { background: rgba(100,116,139,.15); color: var(--text-muted); }

.searchable-select { display: inline-block; }
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9999; max-height: 260px; overflow-y: auto;
  padding: 6px; animation: ddIn .15s ease;
}
@keyframes ddIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.search-dd-item {
  display:flex; align-items:center; gap:8px; padding:10px 12px;
  border-radius:7px; cursor:pointer; font-size:12.5px; color:var(--text);
  transition:all .12s; border:1px solid transparent;
}
.search-dd-item:hover { background:rgba(0,212,170,.08); border-color:rgba(0,212,170,.2); }
.search-dd-item.sel { background:rgba(0,212,170,.12); border-color:var(--primary); }
.search-dd-icon { flex-shrink:0; font-size:14px; }
.search-dd-name { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.search-dd-badge { flex-shrink:0; font-size:10px; padding:2px 7px; border-radius:10px; font-weight:600; }
.search-dd-badge.active { background:rgba(34,197,94,.15); color:#22c55e; }
.search-dd-badge.done { background:rgba(100,116,139,.2); color:#94a3b8; }
.search-dd-empty { padding:20px 14px; text-align:center; color:var(--text-muted); font-size:12.5px; }

.collab-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; cursor: pointer;
  transition: all .2s ease; position: relative;
}
.collab-card:hover { border-color: rgba(0,212,170,.25); box-shadow: 0 4px 20px rgba(0,0,0,.25); transform: translateY(-1px); }
.collab-card-title { font-size: 14px; font-weight: 700; line-height: 1.4; }
.collab-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.collab-card-progress { height: 3px; background: var(--border); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.collab-card-progress-fill { height: 100%; border-radius: 2px; background: var(--primary); transition: width .4s ease; }

.collab-stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 10px; transition: all .2s ease; cursor: default; }
.collab-stat:hover { border-color: var(--primary); box-shadow: 0 0 12px rgba(0,212,170,.15), 0 1px 4px rgba(0,0,0,.08); }
.collab-stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.collab-stat-value { font-size: 20px; font-weight: 800; color: var(--text); line-height:1.2; }

/* 商品分析卡片右上角「AI 分析」按钮（青色细描边 + 黄色四角星） */
.pa-ai-btn {
  position:absolute; top:6px; right:6px;
  display:inline-flex; align-items:center; gap:3px;
  padding:2px 7px; border-radius:6px;
  border:0.5px solid var(--primary);
  color:var(--primary);
  background:rgba(0,212,170,.08);
  font-size:10px; font-weight:700; letter-spacing:0;
  cursor:pointer; white-space:nowrap; flex-shrink:0;
  transition:all .15s ease;
}
.pa-ai-btn:hover { background:rgba(0,212,170,.18); box-shadow:0 0 8px rgba(0,212,170,.25); }
.pa-ai-btn .pa-ai-star { color:#f5c518; font-size:10px; line-height:1; }

/* 商品分析「估算口径」标注小标签：明确区分真实核算 / 部分估算 / 估算 / 数据不足 */
.pa-est-badge {
  display:inline-flex; align-items:center; gap:2px;
  padding:1px 6px; border-radius:999px;
  font-size:9px; font-weight:600; line-height:1.5;
  white-space:nowrap; cursor:help; flex-shrink:0;
  border:0.5px solid transparent;
}
.pa-est-badge.ok   { color:#22c55e; background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.35); }
.pa-est-badge.warn { color:#f59e0b; background:rgba(245,158,11,.14); border-color:rgba(245,158,11,.4); }
.pa-est-badge.gray { color:var(--text-muted); background:rgba(148,163,184,.12); border-color:rgba(148,163,184,.3); }

/* [v6.5+] 客服工作台统计卡片升级 */
#page-cs-agent-desk #csDeskStats .collab-stat { background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(34,197,94,.04)); padding:18px 14px; border-radius:14px; border:1px solid rgba(99,102,241,.15); transition:all .25s; }
#page-cs-agent-desk #csDeskStats .collab-stat:hover { transform:translateY(-3px); border-color:rgba(99,102,241,.4); box-shadow:0 8px 24px rgba(99,102,241,.2); }
#page-cs-agent-desk #csDeskStats .collab-stat div:nth-child(2) { font-size:28px !important; font-weight:800 !important; }
#page-cs-agent-desk #csDeskStats .collab-stat div:nth-child(3) { font-size:12px !important; margin-top:6px !important; letter-spacing:.5px; }
#page-cs-agent-desk #csDeskStats .collab-stat div:nth-child(1) { font-size:22px !important; margin-bottom:4px; -webkit-text-stroke:0; text-shadow:none; }

/* [v6.5+] 顶部actions区升级 */
#page-cs-agent-desk .header { background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.04)); border-radius:14px; padding:18px 22px !important; border:1px solid rgba(99,102,241,.12); margin-bottom:16px; }
#page-cs-agent-desk .header h1 { font-size:22px !important; background:linear-gradient(135deg,#a5b4fc,#86efac); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
#page-cs-agent-desk .header .actions .btn-primary { background:linear-gradient(135deg,#6366f1,#8b5cf6) !important; border:none !important; padding:10px 18px !important; font-weight:600 !important; box-shadow:0 4px 12px rgba(99,102,241,.35); transition:all .2s; }
#page-cs-agent-desk .header .actions .btn-primary:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(99,102,241,.45); }

.collab-section {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-top: 14px;
}
.collab-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-weight: 700; font-size: 13px;
}
.collab-section-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.collab-section-row:last-child { border-bottom: none; }

.collab-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 13px; }
.collab-empty-icon { font-size: 44px; margin-bottom: 10px; opacity: .45; }

.collab-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--text-muted); white-space: nowrap; }
.collab-tag.p0 { color:#ef4444; font-weight:700; }
.collab-tag.p1 { color:#f97316; font-weight:700; }
.collab-tag.primary { color:var(--primary); }

.collab-ai-card {
  background: rgba(0,212,170,.04); border: 1px solid var(--primary);
  border-radius: 12px; padding: 14px; margin: 10px 0;
  white-space: pre-wrap; font-size: 12px; line-height: 1.7; color: var(--text);
}
.collab-ai-title { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }

.collab-ai-btn {
  background: rgba(0,212,170,.1); color: var(--primary);
  border: 1px solid var(--primary); padding: 6px 14px;
  border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.collab-ai-btn:hover { background: rgba(0,212,170,.18); }
.collab-ai-btn:disabled { opacity: .5; cursor: wait; }

.collab-resolved { opacity: .55; }
.collab-resolved .collab-card-title { text-decoration: line-through; }

/* ===== 全宽页面模式：train/proactive 等 iframe 页面占满右侧内容区 ===== */
/* 默认状态（非全宽）：iframe 保留圆角和 calc 高度 */
#trainFrame,
#proactiveFrame { height: calc(100vh - 80px); border-radius: 12px; }
/* 进入全宽页面时，JS 会给 body 添加 fullwidth-page 类，离开时移除
   关键点：全宽模式下让当前 .active 的页面占满 100vh，但不能让非 active 的页面被强制显示 */
body.fullwidth-page .main { padding: 0 !important; }
body.fullwidth-page .page { display: none !important; }  /* 强制重置，防止 .page.active 之外的页面被显示 */
body.fullwidth-page .page.active#page-train,
body.fullwidth-page .page.active#page-proactive { display: flex !important; flex-direction: column; height: 100vh; margin: 0; }
body.fullwidth-page #trainFrame,
body.fullwidth-page #proactiveFrame { height: 100% !important; border-radius: 0 !important; flex:1; min-height:0; }

/* ============================================================
   电商管理 — 专属样式
   ============================================================ */

/* KPI 统计卡片行 */
.mall-stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 20px;
}

/* 区块标题 */
.mall-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 4px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mall-section-title svg {
  color: var(--primary);
}

.mall-stat-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all .2s ease; cursor: pointer; position: relative; overflow: hidden;
}
.mall-stat-card::after {
  content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 0 0 0 80px; opacity: .04; transition: all .3s;
}
.mall-stat-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.mall-stat-card:hover::after { opacity: .08; width: 100px; height: 100px; }
.mall-stat-card.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 4px 16px rgba(0,0,0,.15); background: rgba(0,212,170,.06); }
.mall-stat-card.t-primary { border-left: 3px solid var(--primary); }
.mall-stat-card.t-primary::after { background: var(--primary); }
.mall-stat-card.t-warning { border-left: 3px solid var(--warning); }
.mall-stat-card.t-warning::after { background: var(--warning); }
.mall-stat-card.t-info { border-left: 3px solid var(--info); }
.mall-stat-card.t-info::after { background: var(--info); }
.mall-stat-card.t-success { border-left: 3px solid #22c55e; }
.mall-stat-card.t-success::after { background: #22c55e; }
.mall-stat-card.t-danger { border-left: 3px solid var(--danger); }
.mall-stat-card.t-danger::after { background: var(--danger); }
.mall-stat-card.t-muted { border-left: 3px solid var(--text-muted); }
.mall-stat-card.t-muted::after { background: var(--text-muted); }
.mall-stat-icon {
  width: 42px; height: 42px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px;
}
.mall-stat-icon.primary { background: rgba(0,212,170,.12); color: var(--primary); }
.mall-stat-icon.warning { background: rgba(255,165,2,.12); color: var(--warning); }
.mall-stat-icon.info { background: rgba(55,66,250,.12); color: var(--info); }
.mall-stat-icon.success { background: rgba(34,197,94,.12); color: #22c55e; }
.mall-stat-icon.danger { background: rgba(255,71,87,.12); color: var(--danger); }
.mall-stat-icon.muted { background: rgba(148,163,184,.12); color: #94a3b8; }
.mall-stat-body { flex: 1; min-width: 0; }
.mall-stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.mall-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: .3px; }

/* 配置页卡片 */
.mall-config-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 900px) { .mall-config-grid { grid-template-columns: 1fr; } }
.mall-config-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; transition: border-color .2s;
  position: relative; overflow: hidden;
}
.mall-config-card:hover { border-color: rgba(0,212,170,.2); }
.mall-config-card .card-icon-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.mall-config-card .card-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 16px;
  background: rgba(0,212,170,.1); color: var(--primary);
}
.mall-config-card .card-title { font-size: 14px; font-weight: 700; }
.mall-config-card .card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.mall-config-card .form-group { margin-bottom: 14px; }
.mall-config-card .form-group:last-child { margin-bottom: 0; }

/* ══════════ 分享追踪看板 v2（agg-* 统一组件） ══════════ */
.agg-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* 转化漏斗 */
.agg-funnel { display: flex; flex-direction: column; gap: 10px; }
.agg-funnel-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
}
.agg-funnel-row:hover { border-color: rgba(0,212,170,.32); background: rgba(0,212,170,.03); }
.agg-funnel-step {
  display: flex; align-items: center; gap: 8px;
  min-width: 110px; flex-shrink: 0;
}
.agg-funnel-badge {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.agg-funnel-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.agg-funnel-track {
  flex: 1; height: 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.agg-funnel-bar {
  height: 100%; border-radius: 999px;
  min-width: 6px; transition: width .6s ease;
}
.agg-funnel-rate {
  width: 92px; text-align: right; font-size: 12px; font-weight: 700;
  color: var(--text-muted); flex-shrink: 0; white-space: nowrap;
}
.agg-funnel-rate b { color: var(--text); font-size: 13px; font-weight: 800; }

/* TOP 分享商品 */
.agg-rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.agg-rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; transition: background .15s;
}
.agg-rank-item:hover { background: rgba(255,255,255,.03); }
.agg-rank {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  background: rgba(148,163,184,.16); color: var(--text-muted);
}
.agg-rank.r1 { background: linear-gradient(135deg,#f6c945,#e2a30f); color: #3a2e00; box-shadow: 0 1px 4px rgba(246,201,69,.4); }
.agg-rank.r2 { background: linear-gradient(135deg,#c8d1dc,#9aa7b5); color: #1c2530; }
.agg-rank.r3 { background: linear-gradient(135deg,#e6b180,#b97f4a); color: #3a2410; }
.agg-rank-title {
  flex: 1; font-size: 12px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agg-rank-track {
  width: 72px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.06); overflow: hidden; flex-shrink: 0;
}
.agg-rank-bar { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s ease; }
.agg-rank-count { font-size: 12px; font-weight: 800; flex-shrink: 0; min-width: 34px; text-align: right; }

/* 行为/状态标签 */
.agg-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.agg-tag-green { background: rgba(34,197,94,.12); color: #22c55e; }
.agg-tag-blue { background: rgba(59,130,246,.12); color: #5b9bff; }
.agg-tag-amber { background: rgba(255,165,2,.12); color: #ffa502; }
.agg-tag-pink { background: rgba(236,72,153,.12); color: #ec4899; }
.agg-tag-gray { background: rgba(148,163,184,.12); color: #94a3b8; }

/* 弱化文字 */
.agg-cell-muted { color: var(--text-muted); font-size: 12px; }

/* 表格 */
.agg-table { width: 100%; border-collapse: collapse; }
.agg-table thead th {
  padding: 9px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 700; text-align: left;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); white-space: nowrap;
}
.agg-table tbody td {
  padding: 10px 12px; border-bottom: 1px solid rgba(42,58,74,.4);
  font-size: 12px; vertical-align: middle;
}
.agg-table tbody tr:last-child td { border-bottom: none; }
.agg-table tbody tr:hover td { background: rgba(0,212,170,.03); }
.agg-table tbody tr.row-click { cursor: pointer; }

/* 空态 */
.agg-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 34px 16px; text-align: center; color: var(--text-muted); gap: 8px;
}
.agg-empty svg { opacity: .35; }
.agg-empty > div { font-size: 13px; font-weight: 700; color: var(--text); }
.agg-empty p { font-size: 12px; color: var(--text-muted); margin: 0; }

/* 分享详情面板 */
.agg-detail-panel {
  position: fixed; right: 20px; top: 80px; width: 460px;
  max-height: calc(100vh - 100px); overflow-y: auto;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; z-index: 1000; display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  animation: aggPanelIn .18s ease;
}
@keyframes aggPanelIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.agg-dp-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(0,212,170,.14), rgba(0,212,170,.02));
  border-radius: 14px 14px 0 0;
}
.agg-dp-head h4 { margin: 0; font-size: 14px; font-weight: 800; }
.agg-dp-head .btn-close {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,.03); color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .15s;
}
.agg-dp-head .btn-close:hover { border-color: var(--danger); color: var(--danger); }
.agg-dp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
  padding: 14px; background: var(--bg); border-radius: 10px;
  border: 1px solid var(--border); margin: 14px 16px;
}
.agg-dp-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.agg-dp-value { font-size: 13px; font-weight: 600; word-break: break-all; }
.agg-dp-value code { font-size: 11px; }
.agg-dp-section { padding: 0 16px 16px; }
.agg-dp-section h5 {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  margin: 0 0 8px; display: flex; align-items: center; gap: 6px;
}
.agg-dp-section h5 .agg-dp-count {
  background: rgba(0,212,170,.12); color: var(--primary);
  padding: 0 7px; border-radius: 999px; font-size: 11px;
}
.agg-dp-table-wrap { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.agg-dp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.agg-dp-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 8px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 700; text-align: left;
  background: rgba(26,35,50,.98); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.agg-dp-table td { padding: 8px 10px; border-bottom: 1px solid rgba(42,58,74,.35); vertical-align: middle; }
.agg-dp-table tr:last-child td { border-bottom: none; }

/* 功能开关组 */
.mall-features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 700px) { .mall-features-grid { grid-template-columns: repeat(2, 1fr); } }
.mall-feature-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .2s; user-select: none;
}
.mall-feature-toggle:hover { border-color: var(--primary); background: rgba(0,212,170,.03); }
.mall-feature-toggle input[type="checkbox"] { width: auto; accent-color: var(--primary); }
.mall-feature-toggle .ft-icon { font-size: 16px; flex-shrink: 0; }
.mall-feature-toggle .ft-label { font-size: 12px; font-weight: 600; }

/* ===== 分类管理：层级深度配置卡 ===== */
/* 注意：早期实现用内联 style="background:var(--bg-elevated,#f7f9fc)"，
   而客户 SaaS 的 app.css 并未定义 --bg-elevated（仅平台管理台 platform.css 有），
   导致 fallback 亮色 #f7f9fc 命中，与深色主题的浅色文字撞色、内容不可读。
   此处统一改用 app.css 真实存在的语义变量，杜绝亮色兜底。 */
.mall-level-config {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.mall-level-config .mlc-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}
.mall-level-config .mlc-head .mlc-icon {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: rgba(0,212,170,.12); color: var(--primary);
}
.mall-level-config .mlc-head .mlc-badge {
  margin-left: auto; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0,212,170,.1); color: var(--primary); white-space: nowrap;
}
.mall-level-config .mlc-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}
.mall-level-config .mlc-row label { color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.mall-level-config input[type="number"] {
  width: 64px; padding: 6px 8px; font-size: 13px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
}
.mall-level-config input[type="number"]:focus { outline: none; border-color: var(--primary); }
.mall-level-config .mlc-hint {
  font-size: 11px; color: var(--text-muted); line-height: 1.6; margin-top: 8px;
}
.mall-level-config .mlc-empty { font-size: 11px; color: var(--text-muted); }
.mall-level-config .mlc-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.mall-level-config .mlc-table th {
  text-align: left; padding: 7px 6px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.mall-level-config .mlc-table td {
  padding: 7px 6px; color: var(--text); border-bottom: 1px solid rgba(42,58,74,.5);
}
.mall-level-config .mlc-table tr:last-child td { border-bottom: none; }
.mall-level-config .mlc-table input[type="number"] { width: 60px; padding: 4px 6px; font-size: 12px; }

/* ===== 分类管理：统计条 ===== */
.cat-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.cat-toolbar .cat-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}
.cat-toolbar .cat-summary .cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  font-size: 11px; color: var(--text);
}
.cat-toolbar .cat-summary .cat-chip b { color: var(--primary); font-variant-numeric: tabular-nums; }
.cat-toolbar .cat-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 分类树卡片 */
.mall-tree-wrapper {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.mall-tree-node {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  transition: background .15s; font-size: 13px;
}
.mall-tree-node:last-child { border-bottom: none; }
.mall-tree-node:hover { background: rgba(0,212,170,.03); }
.mall-tree-node .node-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 15px;
  background: rgba(0,212,170,.08); color: var(--primary); flex-shrink: 0;
  overflow: hidden;
}
.mall-tree-node .node-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 已配置且商城可见：主色高亮 */
.mall-tree-node .node-icon.on {
  background: rgba(0,212,170,.14); color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(0,212,170,.22);
}
/* 未配置商城：中性态，避免用 rgba(255,255,255,.0x) 在亮色底上不可见 */
.mall-tree-node .node-icon.off {
  background: var(--bg-tertiary); color: var(--text-muted);
}
.mall-tree-node .node-erp-name { color: var(--text-muted); font-size: 10px; margin-left: 3px; }
.mall-tree-node .node-name {
  flex: 1; font-weight: 600; display: flex; align-items: center; gap: 8px;
  color: var(--text); min-width: 0; flex-wrap: wrap;
}
.mall-tree-node .node-badge {
  font-size: 10px; padding: 1px 7px; border-radius: 8px;
  font-weight: 500; white-space: nowrap;
}
.mall-tree-node .node-badge.count { background: rgba(0,212,170,.1); color: var(--primary); }
.mall-tree-node .node-badge.hidden { background: rgba(136,153,170,.1); color: var(--text-muted); }
.mall-tree-node .node-badge.show { background: rgba(0,212,170,.1); color: var(--primary); }
.mall-tree-node .node-badge.noconfig { background: rgba(255,193,7,.12); color: #ffc107; }
.mall-tree-node .node-meta { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.mall-tree-node .node-actions { display: flex; gap: 4px; flex-shrink: 0; }

.mall-tree-node .cat-toggle {
  width: 24px; height: 24px; border-radius: 6px; border: none;
  background: rgba(255,255,255,.06); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0; transition: .15s;
}
.mall-tree-node .cat-toggle:hover { background: rgba(0,212,170,.12); color: var(--primary); }
.cat-children { overflow: hidden; transition: max-height .2s ease; }

/* 订单状态标签增强 */
.mall-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
}
.mall-badge i { font-size: 10px; }

/* 筛选栏增强 */
.mall-filter-bar {
  display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center;
}
.mall-filter-bar input, .mall-filter-bar select {
  padding: 7px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 12px; outline: none;
  transition: border-color .2s;
}
.mall-filter-bar input:focus, .mall-filter-bar select:focus { border-color: var(--primary); }
.mall-filter-bar input { min-width: 200px; }
.mall-filter-bar .filter-spacer { flex: 1; }

/* 表格内图片圆角增强 */
.mall-table-img {
  width: 48px; height: 48px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border);
}
.mall-table-img-placeholder {
  width: 48px; height: 48px; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--border); display: flex;
  align-items: center; justify-content: center; color: var(--text-muted); font-size: 18px;
}
/* 表格行悬停增强 */
.data-table tbody tr.mall-row { transition: background .12s; }
.data-table tbody tr.mall-row:hover td { background: rgba(0,212,170,.05); }

/* 订单详情卡 */
.mall-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
@media (max-width: 600px) { .mall-detail-grid { grid-template-columns: 1fr; } }
.mall-detail-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.mall-detail-card h4 {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.mall-detail-row {
  display: flex; justify-content: space-between; padding: 5px 0;
  font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.03);
}
.mall-detail-row:last-child { border-bottom: none; }
.mall-detail-row .label { color: var(--text-muted); }
.mall-detail-row .value { font-weight: 600; text-align: right; }
.mall-detail-row .value.total { font-size: 15px; color: var(--primary); }

/* 标签行 */
.mall-tag-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.mall-tag {
  display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 6px;
  font-weight: 600; white-space: nowrap;
}
.mall-tag.recommend { background: rgba(255,165,2,.12); color: var(--warning); }
.mall-tag.new { background: rgba(0,212,170,.12); color: var(--primary); }
.mall-tag.hot { background: rgba(255,71,87,.1); color: var(--danger); }

/* 修改密码弹窗小眼睛 */
.cp-eye-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 4px; transition: .15s;
}
.cp-eye-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.cp-eye-btn svg { display: block; }

/* 钱包/成员/岗位界面图标与卡片统一调优 */
.icon-svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* 审批列表卡片 hover */
.w-approval-list > div { transition: all .15s ease; }
.w-approval-list > div:hover { transform: translateY(-1px); border-color: rgba(0,212,170,.25); box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* 成员表格 hover */
.ent-members-table tbody tr { transition: background .12s; }
.ent-members-table tbody tr:hover { background: rgba(0,212,170,.05); }

/* 岗位卡片复用 .collab-stat，增强按钮图标对齐 */
.collab-stat button .icon-svg { vertical-align: -3px; }

/* 统一空状态组件 */
.wb-empty-state { text-align:center; padding:48px 24px; color:var(--text-muted); }
.wb-empty-state h4 { margin:12px 0 6px; font-size:14px; color:var(--text); font-weight:600; }
.wb-empty-state p { margin:0 auto 16px; font-size:12px; line-height:1.5; max-width:360px; }
.wb-empty-state .btn { margin-top:4px; }
.wb-empty-state-small { padding:32px 16px; }
.wb-empty-state-small h4 { font-size:13px; }
.wb-empty-state-small p { font-size:11px; }

/* 响应式断点优化 */
@media (max-width: 768px) {
  .tw { overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:8px; }
  .tw table { min-width:640px; }
  .ent-members-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--border); border-radius:8px; }
  .ent-members-table-wrap table { min-width:760px; }
  .modal { width:92%; padding:18px; }
}
@media (max-width: 480px) {
  .collab-stat { padding:10px; }
  .w-h { padding:18px; }
  .w-h .in { flex-direction:column; gap:12px; }
  .w-h .actions { width:100%; justify-content:flex-start; }
}

/* ============ 店铺装修 - 拖拽编辑器（UI 优化版） ============ */
.builder-panel { background: var(--card-bg); border-radius: var(--radius); padding: 14px; overflow-y: auto; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.builder-panel-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.builder-panel-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }

/* --- 顶部操作栏 --- */
.builder-header-btn { display: inline-flex; align-items: center; gap: 4px; }
/* [7.7.155] 预览框顶部操作按钮组（原顶部工具栏+弹窗预览已删） */
.builder-phone-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }

/* [装修 2.0 M1-b] 页面选择器：首页 + 专题页下拉 + 新建按钮 */
.builder-page-bar { display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.builder-page-bar-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.builder-page-select { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 12px; cursor: pointer; }
.builder-page-select:focus { outline: none; border-color: var(--primary); }

/* [2026-10-08 页面管理] 发布状态徽章 + 页面管理侧栏 */
.builder-status-badge { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px; margin-left: 8px; white-space: nowrap; vertical-align: middle; }
.builder-status-badge.is-live { background: rgba(22,163,74,.16); color: #22c55e; border: 1px solid rgba(22,163,74,.4); }
.builder-status-badge.is-draft { background: rgba(148,163,184,.14); color: #94a3b8; border: 1px solid rgba(148,163,184,.35); }
.builder-status-badge.is-scheduled { background: rgba(245,158,11,.16); color: #f59e0b; border: 1px solid rgba(245,158,11,.45); }
.builder-empty-hint { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* [2026-10-08 页面管理] ① 页面管理侧栏（五栏最左，常驻）：页面列表 + 行内操作 */
/* [2026-10-08 加宽] 196→248px：专题页标题 + 状态徽章 + 行内三操作在 196px 下拥挤，标题被过早截断 */
.builder-pages-panel { width: 248px; min-width: 248px; flex-shrink: 0; }
.builder-newpage-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.builder-page-item { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.builder-page-item:hover { background: rgba(255,255,255,.03); }
.builder-page-item.active { border-color: var(--primary); background: rgba(0,212,170,.08); box-shadow: 0 0 0 1px var(--primary) inset; }
.builder-page-item-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.builder-page-item-title { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--text); }
.builder-page-item-label { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-page-item .builder-status-badge { margin-left: 0; flex-shrink: 0; }
.builder-page-item-ops { display: flex; align-items: center; gap: 4px; margin-top: 7px; }
.builder-page-op { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.builder-page-op:hover { background: rgba(255,255,255,.06); color: var(--text); }
.builder-page-op.is-publish { color: var(--primary); border-color: rgba(0,212,170,.4); }
.builder-page-op.is-publish:hover { background: rgba(0,212,170,.12); }
.builder-page-op.is-danger:hover { background: rgba(239,68,68,.12); color: var(--danger); border-color: rgba(239,68,68,.4); }

/* [2026-10-08 弹窗升级] 新建专题页弹窗：图标头 + 表单字段 + 卡片式模板单选 + 分栏页脚 */
.builder-newpage-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.58); }
.builder-newpage-dialog { width: 452px; max-width: 94vw; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg-card, #14171c); border: 1px solid var(--border, #232830); border-radius: 14px; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.npd-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border, #232830); }
.npd-head-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,212,170,.14); color: var(--primary, #00d4aa); border: 1px solid rgba(0,212,170,.3); }
.npd-head-text { min-width: 0; }
.npd-title { font-size: 15px; font-weight: 700; color: var(--text); }
.npd-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.npd-close { margin-left: auto; flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.npd-close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.npd-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.npd-field { display: flex; flex-direction: column; gap: 7px; }
.npd-label { font-size: 12px; font-weight: 600; color: var(--text); }
.npd-req { color: var(--danger, #ef4444); margin-left: 3px; }
.npd-input { height: 38px; padding: 0 12px; border: 1px solid var(--border, #232830); border-radius: 9px; background: var(--bg, #0e1116);
  color: var(--text); font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.npd-input::placeholder { color: var(--text-muted); }
.npd-input:focus { outline: none; border-color: var(--primary, #00d4aa); box-shadow: 0 0 0 3px rgba(0,212,170,.14); }
.npd-hint { font-size: 11px; color: var(--text-muted); }
.npd-templates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.npd-tpl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px;
  border: 1px solid var(--border, #232830); border-radius: 10px; background: var(--bg, #0e1116); cursor: pointer; transition: all .15s; }
.npd-tpl:hover { border-color: rgba(0,212,170,.45); background: rgba(0,212,170,.05); }
.npd-tpl.active { border-color: var(--primary, #00d4aa); background: rgba(0,212,170,.1); box-shadow: 0 0 0 1px var(--primary, #00d4aa) inset; }
.npd-tpl.active::after { content: ''; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #00d4aa); }
.npd-tpl-icon { color: var(--primary, #00d4aa); display: inline-flex; }
.npd-tpl-name { font-size: 13px; font-weight: 700; color: var(--text); }
.npd-tpl-desc { font-size: 11px; color: var(--text-muted); }
.npd-note { font-size: 11px; line-height: 1.6; color: var(--text-muted); padding: 9px 11px; border-radius: 8px;
  background: rgba(148,163,184,.08); border-left: 3px solid rgba(148,163,184,.4); }
.npd-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border, #232830); background: rgba(255,255,255,.015); }
.npd-btn { height: 36px; padding: 0 18px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.npd-btn-cancel { background: transparent; color: var(--text-muted); border-color: var(--border, #232830); }
.npd-btn-cancel:hover { background: rgba(255,255,255,.05); color: var(--text); }
.npd-btn-create { background: var(--primary, #00d4aa); color: #04231d; }
.npd-btn-create:hover { filter: brightness(1.08); }
.npd-btn-danger { background: transparent; color: #ef4444; border-color: rgba(239,68,68,.45); }
.npd-btn-danger:hover { background: rgba(239,68,68,.12); }
.npd-hint-inline { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }

/* [7.7.156] ③ 修改区：楼层列表（排序/显隐/删除） */
.builder-sections-panel { width: 218px; min-width: 218px; overflow-y: auto; }
.builder-sects-count { margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--text-muted); background: rgba(255,255,255,.06); border-radius: 999px; padding: 1px 8px; }
.builder-sect-row { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.builder-sect-row:hover { background: rgba(255,255,255,.04); }
.builder-sect-row.selected { background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.35); }
.builder-sect-row.off .builder-sect-name { opacity: .45; text-decoration: line-through; }
.builder-sect-idx { flex-shrink: 0; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--text-muted); background: rgba(255,255,255,.06); border-radius: 6px; }
.builder-sect-name { flex: 1; font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-sect-ops { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.builder-sect-op { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--text-muted); cursor: pointer; }
.builder-sect-op:hover { background: rgba(255,255,255,.08); color: var(--text); }
.builder-sect-op.is-dis { opacity: .25; cursor: default; pointer-events: none; }
.builder-sect-op.builder-vis-toggle.on { color: #00d4aa; }
.builder-sect-op.builder-vis-toggle.off { color: #f59e0b; }
.builder-sect-op.builder-sect-del:hover { background: rgba(239,68,68,.15); color: #ef4444; }
/* [2026-10-08 文案精化] 下架行 badge 只留「已下架」——删除入口改由删除按钮承担，
   故下架行删除按钮默认即红色高亮（不靠 hover），让运营一眼看到删除入口。 */
.builder-sect-row.offline .builder-sect-del { color: #ef4444; border-color: rgba(239,68,68,.5); }
.builder-sect-row.offline .builder-sect-del:hover { background: rgba(239,68,68,.18); }

.builder-panel-title { display: flex; align-items: center; gap: 6px; }


/* --- 左侧：组件库 --- */
.builder-library { width: 210px; min-width: 210px; flex-shrink: 0; }
.builder-cat-title { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; padding: 12px 0 8px; border-top: 1px solid var(--border); margin-top: 6px; }
.builder-cat-title:first-of-type { border-top: none; margin-top: 0; }
.builder-cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.builder-cat-items { display: flex; flex-direction: column; gap: 6px; }
.builder-lib-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(255,255,255,.03); border: 1px solid transparent; border-radius: 10px; cursor: grab; transition: all .2s; user-select: none; position: relative; }
.builder-lib-item:hover { background: rgba(0,212,170,.08); border-color: rgba(0,212,170,.25); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.builder-lib-item:hover .builder-lib-plus { opacity: 1; transform: translateX(0); }
.builder-lib-item:hover .builder-lib-drag { opacity: 0; }
.builder-lib-item:active { cursor: grabbing; }
.builder-lib-icon-wrap { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: rgba(255,255,255,.06); border-radius: 8px; flex-shrink: 0; }
.builder-lib-name { font-size: 12px; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.builder-lib-drag { display: inline-flex; align-items: center; color: var(--text-muted); flex-shrink: 0; transition: opacity .2s; }
.builder-lib-plus { position: absolute; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--primary); color: #000; border-radius: 6px; opacity: 0; transform: translateX(6px); transition: all .2s; }

/* --- 中间：手机模拟器 --- */
.builder-phone-panel { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 300px; }
.builder-phone-frame { width: 306px; min-height: 580px; background: #0d0d0d; border-radius: 38px; border: 10px solid #1a1a1a; box-shadow: 0 20px 50px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.builder-phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #0d0d0d; border-radius: 0 0 16px 16px; z-index: 10; }
.builder-phone-notch::after { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; }
.builder-phone-statusbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 4px; font-size: 10px; color: #333; background: #fff; position: relative; z-index: 5; }
.phone-time { font-weight: 700; letter-spacing: 0.3px; }
.phone-signals { display: flex; align-items: center; gap: 4px; }
.signal-dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.signal-dot.empty { background: rgba(0,0,0,.18); }
.battery-icon { width: 16px; height: 8px; border: 1px solid currentColor; border-radius: 2px; position: relative; margin-left: 2px; }
.battery-icon::after { content: ''; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0; }
.battery-level { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 65%; background: currentColor; border-radius: 1px; }
.builder-phone-search { padding: 6px 12px; background: #fff; border-bottom: 1px solid rgba(0,0,0,.04); }
.phone-search-box { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #f0f0f0; border-radius: 16px; font-size: 11px; color: #999; }
.builder-phone-sections { flex: 1; overflow-y: auto; padding: 6px 0; min-height: 200px; background: #fff; }
.builder-phone-tabbar { display: flex; justify-content: space-around; padding: 6px 0 8px; background: #fff; border-top: 1px solid rgba(0,0,0,.04); }
.phone-tab { font-size: 9px; color: #999; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone-tab.active { color: #00d4aa; }
.builder-phone-home-indicator { height: 18px; background: #fff; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; }
.builder-phone-home-indicator::after { content: ''; width: 100px; height: 4px; background: rgba(0,0,0,.25); border-radius: 2px; }

/* --- Section缩略卡片 --- */
.builder-phone-section { margin: 6px 8px; border: 2px solid transparent; border-radius: 10px; transition: all .2s; position: relative; cursor: pointer; overflow: hidden; }
.builder-phone-section:hover { border-color: rgba(0,212,170,.35); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.builder-phone-section.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 8px 20px rgba(0,212,170,.15); }
.builder-phone-section.dragging { opacity: 0.35; }
/* [2026-10-08] 楼层工具栏（拖拽柄+组件名）默认隐藏，仅悬停/选中该楼层时显示。
   旧形态常驻一条灰条叠在预览上，C 端不渲染却始终挡视线 → 预览「不干净」。
   opacity 过渡保留占位，避免 hover 时楼层高度跳变（不改变 DOM 尺寸）。 */
.builder-section-toolbar { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: rgba(0,0,0,.03); border-radius: 8px 8px 0 0; opacity: 0; transition: opacity .15s; }
.builder-phone-section:hover .builder-section-toolbar,
.builder-phone-section.selected .builder-section-toolbar { opacity: 1; }
.builder-drag-handle { display: inline-flex; align-items: center; cursor: grab; color: var(--text-muted); padding: 2px 4px; user-select: none; }
.builder-drag-handle:active { cursor: grabbing; }
.builder-section-label { font-size: 10px; color: #666; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 4px; }
.builder-section-actions { display: flex; gap: 2px; align-items: center; }
.builder-section-btn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; color: var(--text-muted); transition: all .15s; }
.builder-section-btn:hover { background: rgba(0,0,0,.06); color: var(--text); }
.builder-section-btn.builder-section-delete:hover { background: rgba(239,68,68,.12); color: var(--danger); }
.builder-vis-toggle { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; transition: all .15s; }
.builder-vis-toggle.on { color: var(--text-muted); }
.builder-vis-toggle.on:hover { background: rgba(0,0,0,.06); }
.builder-vis-toggle.off { color: var(--text-muted); opacity: 0.4; }
.builder-vis-toggle.off:hover { opacity: 0.7; background: rgba(0,0,0,.06); }
.builder-section-thumb { position: relative; overflow: hidden; }
.builder-section-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-muted); background: rgba(255,255,255,.55); pointer-events: none; opacity: 0; transition: opacity .2s; }
.builder-phone-section:hover .builder-section-overlay { opacity: 1; }
.builder-section-overlay.hidden-overlay { opacity: 1; background: rgba(255,255,255,.82); }
.builder-overlay-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: rgba(0,0,0,.7); color: #fff; border-radius: 12px; font-size: 10px; }
/* [卡-2] 下架组件存量楼层标记——保留显示、不可再拖入，运营据此手动删除 */
.builder-section-offline-badge, .builder-sect-offline-badge { display: inline-flex; align-items: center; padding: 1px 6px; margin-left: 6px; border-radius: 8px; font-size: 10px; background: rgba(239,68,68,.12); color: var(--danger); border: 1px solid rgba(239,68,68,.35); white-space: nowrap; }
.builder-phone-section.offline, .builder-sect-row.offline { outline: 1px dashed rgba(239,68,68,.45); outline-offset: -1px; }

/* --- 缩略图内容 --- */
.thumb-banner { position: relative; }
.thumb-banner-img { height: 86px; background: linear-gradient(135deg, #e8f4fd 0%, #d4e8f8 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.1); }
.thumb-banner-dots { display: flex; gap: 4px; justify-content: center; padding: 4px; position: absolute; bottom: 4px; width: 100%; }
.thumb-banner-dots .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.6); }
.thumb-banner-dots .dot.active { background: #fff; }
.thumb-search { padding: 4px 0; }
.thumb-search-box { padding: 6px 10px; background: #f0f0f0; border-radius: 14px; font-size: 10px; color: #999; text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }
.thumb-notice { display: flex; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 6px; }
.thumb-notice-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.thumb-notice-text { font-size: 10px; color: #999; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thumb-categories { padding: 4px 0; }
.thumb-cat-item { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 4px; }
.thumb-cat-icon { font-size: 14px; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.thumb-cat-name { font-size: 9px; color: #666; margin-top: 3px; }
.thumb-section-title { font-size: 11px; font-weight: 700; color: #333; padding: 6px 4px 4px; display: flex; align-items: center; gap: 4px; }
.thumb-section-title span { display: inline-flex; align-items: center; }
.thumb-product-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 4px 4px; }
.thumb-product-scroll-item { flex-shrink: 0; width: 70px; text-align: center; }
.thumb-p-img { width: 60px; height: 60px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin: 0 auto; }
.thumb-p-name { font-size: 9px; color: #666; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-p-price { font-size: 10px; font-weight: 700; }
.thumb-product-grid { padding: 0 2px; display: flex; flex-wrap: wrap; }
.thumb-grid-item { padding: 3px; text-align: center; box-sizing: border-box; }
.thumb-grid-item .thumb-p-img { width: 100%; height: 50px; font-size: 16px; }
.thumb-image-ad { height: 70px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 500; margin: 0 4px 4px; position: relative; overflow: hidden; }
.thumb-image-ad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.thumb-image-ad > span { position: relative; z-index: 2; }
.thumb-unknown { padding: 20px; text-align: center; font-size: 11px; color: var(--text-muted); }

/* [2026-10-13] 预览消费楼层「通用样式」：此前预览完全不消费 → 用户反馈「改了组件属性，预览区看不到装修效果」。
   cardRadius 走 CSS 变量（C 端 product-card 同口径）；showTitle=false 时 data-notitle 隐藏楼层标题。 */
.builder-section-thumb .thumb-p-img { border-radius: var(--bt-card-radius, 6px); }
.builder-section-thumb[data-notitle="1"] .thumb-section-title { display: none; }
.thumb-subtitle { font-size: 9px; font-weight: 400; padding: 0 4px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-p-sales { font-size: 8px; color: #999; margin-top: 1px; }
.thumb-p-tag { display: inline-block; font-size: 8px; color: #fff; padding: 0 4px; border-radius: 3px; margin-top: 2px; }

/* [2026-10-13 用户裁定] 「发布上线」= 预览区右下角悬浮按钮。
   预览面板本身是滚动容器（overflow-y:auto）→ 用 sticky 让按钮滚动时仍常驻可见（真·悬浮）。 */
.builder-publish-fab { position: sticky; bottom: 14px; align-self: flex-end; margin: 6px 10px 6px 0; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 22px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.32); transition: transform .15s ease, box-shadow .15s ease; }
.builder-publish-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.42); }

/* --- 拖拽状态 --- */
.builder-drag-clone { padding: 8px 16px; background: var(--primary); color: #000; border-radius: 8px; font-size: 12px; font-weight: 600; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.3); transform: translate(-50%, -50%); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.builder-drop-indicator { height: 2px; margin: 0 10px; transition: all .15s; border-radius: 1px; }
.builder-drop-indicator.active { height: 3px; background: var(--primary); box-shadow: 0 0 8px rgba(0,212,170,.4); margin: 2px 6px; }
.builder-empty-hint { text-align: center; padding: 30px 20px; }
.builder-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: rgba(255,255,255,.05); border-radius: 12px; margin-bottom: 10px; color: var(--text-muted); }

/* --- 右侧：属性面板 --- */
.builder-props { width: 260px; min-width: 260px; flex-shrink: 0; }
.builder-props-header { font-size: 13px; font-weight: 700; color: var(--primary); padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.builder-props-field { margin-bottom: 14px; }
.builder-props-label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
.builder-props-input { width: 100%; padding: 7px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.builder-props-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(0,212,170,.12); }
.builder-props-select { cursor: pointer; appearance: auto; }
.builder-switch-wrap { display: flex; align-items: center; }
.builder-switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.builder-switch input { opacity: 0; width: 0; height: 0; }
.builder-switch-slider { position: absolute; inset: 0; background: #555; border-radius: 11px; transition: .2s; }
.builder-switch-slider::before { content: ''; position: absolute; left: 2px; bottom: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.builder-switch input:checked + .builder-switch-slider { background: var(--primary); }
.builder-switch input:checked + .builder-switch-slider::before { transform: translateX(16px); }

/* --- 预览弹窗 --- */
.builder-preview-header > span { display: inline-flex; align-items: center; gap: 6px; }
.builder-preview-content { flex: 1; overflow-y: auto; background: #fff; }
.builder-preview-tabbar { display: flex; justify-content: space-around; padding: 6px 0 10px; background: #fff; border-top: 1px solid rgba(0,0,0,.04); }
.preview-tab { font-size: 9px; color: #999; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.preview-tab.active { color: #00d4aa; }
.preview-time { font-weight: 700; letter-spacing: 0.3px; }
.preview-signals { display: flex; align-items: center; gap: 4px; }

/* --- 右侧面板：标签切换 --- */
.builder-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--border); padding: 2px; background: rgba(255,255,255,.03); border-radius: 10px; border-bottom: none; }
.builder-tab { flex: 1; padding: 8px 0; text-align: center; font-size: 12px; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: all .15s; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.builder-tab.active { color: #000; background: var(--primary); font-weight: 600; }
.builder-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,.05); }

/* --- 主题预设卡片 --- */
.builder-theme-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.builder-preset-card { padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; text-align: center; transition: all .2s; background: rgba(255,255,255,.02); }
.builder-preset-card:hover { background: rgba(255,255,255,.05); transform: translateY(-1px); }
.builder-preset-card.active { border-width: 2px; background: rgba(255,255,255,.04); }
.preset-swatch { width: 100%; height: 24px; border-radius: 6px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.preset-swatch-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }
.preset-label { font-size: 11px; color: var(--text); font-weight: 500; }

/* --- 颜色选择器 --- */
.builder-color-field { }
.builder-color-row { display: flex; align-items: center; gap: 8px; }
.builder-color-picker { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: none; flex-shrink: 0; overflow: hidden; }
.builder-color-picker::-webkit-color-swatch-wrapper { padding: 2px; }
.builder-color-picker::-webkit-color-swatch { border-radius: 5px; border: none; }
.builder-color-input { width: auto !important; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* --- 滑块 --- */
.builder-range { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: var(--border); border-radius: 2px; outline: none; margin: 8px 0; }
.builder-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid var(--card-bg); box-shadow: 0 0 4px rgba(0,0,0,.3); }
.builder-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid var(--card-bg); }

/* --- 主题操作按钮组 --- */
.builder-theme-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ============ 模板市场 ============ */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* 模板卡片 */
.market-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all .2s; }
.market-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.market-card-preview { padding: 16px; display: flex; align-items: center; justify-content: center; min-height: 180px; position: relative; }
.market-card-body { padding: 12px 14px 14px; }
.market-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.market-card-name { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-card-desc { font-size: 11px; color: var(--text-muted); margin: 0 0 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.market-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.market-tag { font-size: 10px; padding: 2px 8px; background: rgba(255,255,255,.06); border-radius: 10px; color: var(--text-muted); }
.market-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.market-stars { color: #ffb800; font-size: 13px; letter-spacing: 1px; }
.market-usage { color: var(--text-muted); font-size: 11px; }
.market-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; color: var(--text-muted); }

/* 分类筛选按钮 */
.market-cat-btn { padding: 4px 12px; border: 1px solid var(--border); border-radius: 16px; background: transparent; color: var(--text-muted); font-size: 12px; cursor: pointer; transition: all .15s; }
.market-cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.market-cat-btn.active { background: var(--primary); color: #000; border-color: var(--primary); font-weight: 600; }

/* 迷你手机预览（卡片内） */
.market-phone { width: 130px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.25); border: 1px solid #ddd; }
.market-phone-status { display: flex; justify-content: space-between; padding: 3px 8px; font-size: 7px; color: #999; background: #fafafa; }
.market-phone-body { padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; min-height: 60px; background: #fff; }
.market-phone-tabbar { display: flex; justify-content: space-around; padding: 2px 0 4px; font-size: 9px; background: #fafafa; border-top: 1px solid #eee; }
.market-phone-empty { font-size: 10px; color: #999; text-align: center; padding: 20px; }

.market-mt-banner { height: 30px; background: linear-gradient(135deg, #e8f4fd, #d4e8f8); border-radius: 3px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 3px; }
.market-mt-dot { width: 3px; height: 3px; border-radius: 50%; background: #bbb; }
.market-mt-dot.active { background: #666; }
.market-mt-search { font-size: 8px; color: #999; text-align: center; padding: 4px; background: #f0f0f0; border-radius: 3px; }
.market-mt-notice { font-size: 8px; color: #999; padding: 4px; background: #fffbe6; border-radius: 3px; overflow: hidden; white-space: nowrap; }
.market-mt-cats { display: flex; gap: 2px; font-size: 12px; justify-content: space-around; padding: 4px 0; }
.market-mt-scroll { display: flex; gap: 2px; font-size: 14px; padding: 2px 0; overflow: hidden; }
.market-mt-grid { display: flex; gap: 2px; font-size: 16px; justify-content: space-around; padding: 2px 0; }
.market-mt-ad { font-size: 20px; text-align: center; padding: 6px; background: #f8f8f8; border-radius: 3px; }
.market-mt-unknown { height: 10px; }

/* 模板预览弹窗 */
.market-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.market-preview-dialog { background: var(--card-bg); border-radius: 16px; max-width: 900px; width: 100%; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; }
.market-preview-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.market-preview-top h2 { margin: 0; font-size: 18px; color: var(--text); }
.market-preview-content { display: flex; gap: 24px; padding: 20px; overflow: hidden; }
.market-preview-phone-wrap { flex-shrink: 0; }
.market-preview-phone { width: 300px; height: 520px; background: #f5f5f5; border-radius: 20px; border: 3px solid #444; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.market-preview-info { flex: 1; overflow-y: auto; min-width: 0; }
.market-pv-statusbar { display: flex; justify-content: space-between; padding: 6px 16px; font-size: 10px; color: #333; background: #fff; font-weight: 600; }
.market-pv-sections { flex: 1; overflow-y: auto; background: #fff; padding: 4px 0; }
.market-pv-tabbar { display: flex; justify-content: space-around; padding: 4px 0 8px; font-size: 12px; background: #fff; border-top: 1px solid #eee; }
.market-pv-banner { height: 100px; background: linear-gradient(135deg, #e8f4fd, #d4e8f8); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #8899aa; margin: 4px 8px; border-radius: 6px; }
.market-pv-search { font-size: 10px; color: #999; text-align: center; padding: 8px 12px; margin: 2px 8px; background: #f0f0f0; border-radius: 14px; }
.market-pv-notice { font-size: 10px; color: #999; padding: 8px; margin: 4px 8px; background: #fffbe6; border-radius: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.market-pv-block { margin: 6px 8px; }
.market-pv-title { font-size: 11px; font-weight: 700; color: #333; padding: 4px 0; }
.market-pv-cats { display: flex; justify-content: space-around; text-align: center; gap: 4px; }
.pv-cat-item { font-size: 18px; padding: 4px; }
.market-pv-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.pv-p-item { flex-shrink: 0; width: 65px; text-align: center; font-size: 22px; padding: 4px; background: #f5f5f5; border-radius: 6px; }
.market-pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-g-item { text-align: center; font-size: 22px; padding: 8px; background: #f5f5f5; border-radius: 6px; }
.market-pv-ad { padding: 16px; margin: 4px 8px; background: #f8f8f8; border-radius: 6px; text-align: center; font-size: 12px; color: #999; }
.market-pv-unknown { padding: 10px; font-size: 10px; color: #999; }

/* 保存模板弹窗 */
.market-dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 99998; display: flex; align-items: center; justify-content: center; padding: 20px; }
.market-dialog { background: var(--card-bg); border-radius: 14px; max-width: 460px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.market-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.market-dialog-header h3 { margin: 0; font-size: 16px; color: var(--text); }
.market-dialog-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.market-dialog-body label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.market-dialog-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--border); }

/* 响应式 */
@media (max-width: 768px) {
  .market-preview-content { flex-direction: column; align-items: center; overflow-y: auto; }
  .market-preview-phone { width: 240px; height: 400px; }
  .market-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* 模板市场 - mini手机内SVG对齐 */
.market-phone-tabbar span,
.market-pv-tabbar span { display: inline-flex; align-items: center; justify-content: center; }
.market-mt-cats span,
.market-mt-scroll span,
.market-mt-grid span { display: inline-flex; align-items: center; justify-content: center; }
.market-mt-ad { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; }

/* 订单详情页卡片增强 */
.mall-detail-card { transition: border-color .2s; }
.mall-detail-card:hover { border-color: rgba(0,212,170,.15); }

/* ========== 商城管理扩展样式 ========== */

/* 批量操作栏 */
.mall-batch-bar {
  animation: batchSlideDown .2s ease;
}
@keyframes batchSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 推荐星标按钮 */
.mall-recommend-star {
  transition: transform .15s, opacity .15s;
}
.mall-recommend-star:hover {
  transform: scale(1.25);
}
.mall-recommend-star:active {
  transform: scale(.9);
}

/* Banner 配置行 */
.banner-field-row input {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  transition: border-color .15s;
}
.banner-field-row input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,212,170,.12);
}

/* 操作日志时间线 */
.mall-timeline {
  padding: 8px 0;
}
.mall-timeline-item {
  display: flex;
  gap: 10px;
  position: relative;
  padding-bottom: 14px;
}
.mall-timeline-item:last-child {
  padding-bottom: 0;
}
.mall-timeline-dot {
  width: 8px; height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}
.mall-timeline-line {
  position: absolute;
  left: 3px;
  top: 14px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.mall-timeline-body {
  flex: 1;
  min-width: 0;
}
.mall-timeline-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.mall-timeline-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

/* ========== 买家端商城样式 ========== */

.mall-shop-layout { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
@media (max-width: 768px) { .mall-shop-layout { grid-template-columns: 1fr; } }

.mall-shop-sidebar { background: var(--card-bg); border-radius: 10px; padding: 12px; }
.mall-cat-item { padding: 8px 12px; cursor: pointer; border-radius: 6px; font-size: 13px; transition: background .15s; }
.mall-cat-item:hover { background: var(--bg); }
.mall-cat-item.active { background: rgba(0,212,170,.12); color: var(--primary); font-weight: 600; }
.mall-cat-sub { padding-left: 28px; font-size: 12px; }

.mall-shop-main { min-width: 0; }
.mall-shop-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mall-shop-search { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; }

.mall-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mall-product-card { background: var(--card-bg); border-radius: 10px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mall-product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.mall-product-img-wrap { height: 160px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.mall-product-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mall-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
.mall-product-info { padding: 10px 12px; }
.mall-product-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.mall-product-price-row { display: flex; align-items: baseline; justify-content: space-between; }
.mall-product-price { color: var(--danger); font-size: 16px; font-weight: 700; }
.mall-product-sold { font-size: 11px; color: var(--text-muted); }

.mall-banner-card { transition: transform .15s; }
.mall-banner-card:hover { transform: translateY(-2px); }

/* 商品详情 */
.mall-detail-wrap { max-width: 100%; }
.mall-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .mall-detail-grid { grid-template-columns: 1fr; } }
.mall-detail-img { background: var(--bg); border-radius: 12px; overflow: hidden; }
.mall-detail-info h2 { margin: 0 0 8px 0; font-size: 20px; }
.mall-detail-desc { white-space: pre-wrap; line-height: 1.8; font-size: 14px; color: var(--text); }
.mall-detail-loading { text-align: center; padding: 40px; color: var(--text-muted); }

.mall-review-item { padding: 12px; border-bottom: 1px solid var(--border); }
.mall-review-reply { background: var(--bg); padding: 8px 12px; border-radius: 6px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }

/* 购物车 */
.mall-cart-list { display: flex; flex-direction: column; gap: 10px; }
.mall-cart-item { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border-radius: 10px; padding: 12px; }
.mall-cart-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.mall-cart-item-info { flex: 1; min-width: 0; }
.mall-cart-item-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mall-cart-item-price { color: var(--danger); font-weight: 600; margin-top: 4px; }
.mall-cart-qty { display: flex; align-items: center; gap: 8px; }
.mall-cart-subtotal { font-weight: 600; color: var(--danger); min-width: 70px; text-align: right; }
.mall-cart-footer { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 20px; padding: 16px; background: var(--card-bg); border-radius: 10px; }

/* 下单结算 */
.mall-checkout-wrap { padding: 0; }
.mall-checkout-summary { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.mall-addr-option { transition: border-color .15s; }
.mall-addr-option:hover { border-color: var(--primary) !important; }

/* 个人中心 */
.mall-user-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
@media (max-width: 768px) { .mall-user-layout { grid-template-columns: 1fr; } }
.mall-user-sidebar { background: var(--card-bg); border-radius: 10px; padding: 16px; }
.mall-user-avatar { text-align: center; margin-bottom: 16px; }
.mall-user-menu { display: flex; flex-direction: column; gap: 2px; }
.mall-user-menu-item { padding: 10px 12px; cursor: pointer; border-radius: 6px; font-size: 13px; transition: background .15s; }
.mall-user-menu-item:hover { background: var(--bg); }
.mall-user-menu-item.active { background: rgba(0,212,170,.12); color: var(--primary); font-weight: 600; }
.mall-user-main { min-width: 0; }

.mall-order-list { display: flex; flex-direction: column; gap: 10px; }
.mall-order-card { background: var(--card-bg); border-radius: 10px; padding: 14px; }
.mall-order-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(0,212,170,.12); color: var(--primary); }
.mall-points-card { text-align: center; padding: 24px; background: var(--card-bg); border-radius: 10px; }
.mall-coupon-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; position: relative; overflow: hidden; }
.mall-coupon-card.used { opacity: .6; }
.mall-coupon-used-badge { position: absolute; right: 10px; bottom: 10px; font-size: 10px; color: var(--text-muted); }
.mall-addr-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.mall-coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* ==================== 数据看板 (modern) ==================== */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 1200px) {
  .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .dash-stats-row { grid-template-columns: 1fr; }
}

.dash-stat-card {
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #00b894);
  opacity: 0.7;
  transition: opacity 0.25s;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 170, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 212, 170, 0.1);
}
.dash-stat-card:hover::before { opacity: 1; }
.dsc-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.dsc-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  opacity: 0.15;
  background: currentColor;
}
.dsc-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.dsc-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}
.dsc-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.dsc-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.dash-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.dash-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 1200px) {
  .dash-grid-2col { grid-template-columns: 1fr; }
  .dash-grid-3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dash-grid-3col { grid-template-columns: 1fr; }
}

.dash-card {
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.dash-card:hover { border-color: rgba(0, 212, 170, 0.2); }
.dash-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-card-title svg { color: var(--primary); }

/* 待处理 */
.dash-pending-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 600px) {
  .dash-pending-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-pending-item { padding: 14px 6px; }
  .dpi-num { font-size: 22px; }
}
.dash-pending-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
}
.dash-pending-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 12px 12px 0 0;
  opacity: 0.6;
}
.dash-pending-item.has-alert {
  border-color: rgba(255, 71, 87, 0.3);
  background: rgba(255, 71, 87, 0.04);
}
.dash-pending-item.has-alert::before {
  background: var(--danger);
  opacity: 1;
}
.dash-pending-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  border-color: rgba(0, 212, 170, 0.3);
}
.dash-pending-item.has-alert:hover { border-color: rgba(255, 71, 87, 0.5); }
.dpi-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.dash-pending-item.has-alert .dpi-num { color: var(--danger); }
.dpi-label { font-size: 11px; color: var(--text-muted); }

/* 营收趋势 */
.dash-trend {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 220px;
  padding-top: 12px;
}
.dash-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.dtc-val {
  font-size: 11px;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  font-weight: 600;
  opacity: 0.9;
}
.dtc-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  max-width: 48px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px 8px 0 0;
  position: relative;
}
.dtc-bar {
  width: 60%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(0, 212, 170, 0.25));
  min-height: 4px;
  transition: all 0.3s ease;
  position: relative;
}
.dtc-bar-today {
  background: linear-gradient(180deg, #3b82f6, rgba(59, 130, 246, 0.25));
}
.dtc-bar:hover {
  width: 80%;
  filter: brightness(1.2);
}
.dtc-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
  border-radius: 6px 6px 0 0;
}
.dtc-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}
.dtc-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* 订单状态分布 */
.dash-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dsg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.dsg-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.dsg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--c);
}
.dsg-cnt {
  margin-left: auto;
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}

/* 热销Top5 */
.dash-hot-list { display: flex; flex-direction: column; gap: 8px; }
.dhl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}
.dhl-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.dhl-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.dhl-rank.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb700); color: #000; }
.dhl-rank.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.dhl-rank.rank-3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }
.dhl-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}
.dhl-price {
  color: var(--danger);
  font-weight: 700;
  white-space: nowrap;
  font-size: 12px;
}
.dhl-sold {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 20px;
}

/* 指标行 */
.dash-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.dash-metric-row:last-child { border-bottom: none; }
.dash-metric-row span { color: var(--text-muted); }
.dash-metric-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

/* 评价条 */
.dash-review-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drb-row { display: flex; align-items: center; gap: 8px; }
.drb-star {
  font-size: 12px;
  color: #f59e0b;
  width: 70px;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 1px;
}
.drb-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}
.drb-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
  min-width: 2px;
}
.drb-cnt {
  font-size: 11px;
  color: var(--text-muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* 快捷入口 */
.dash-quick-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.dash-quick-links .btn {
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
}
.dash-quick-links .btn-primary { border-radius: 20px; }

/* 加载 */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 热销排行（新版） ==================== */
.rk-layout {
  display: flex;
  gap: 18px;
  min-height: 600px;
}

.rk-nav {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.rk-nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rk-nav-header svg { color: var(--primary); }
.rk-nav-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
}
.rk-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.rk-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.rk-nav-item.active {
  background: rgba(0, 212, 170, 0.1);
  border-color: rgba(0, 212, 170, 0.35);
}
.rk-nav-icon { color: var(--text-muted); flex-shrink: 0; }
.rk-nav-item.active .rk-nav-icon { color: var(--primary); }
.rk-nav-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.rk-badge-system {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.rk-add-btn {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

.rk-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.rk-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.rk-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.rk-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.rk-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.rk-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.rk-filter-group svg { color: var(--primary); }
.rk-filter-group select,
.rk-filter-group input[type="date"] {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.rk-filter-group select:focus,
.rk-filter-group input[type="date"]:focus { border-color: var(--primary); }
.rk-filter-group select option {
  background: var(--card-bg);
  color: var(--text);
}
.rk-custom-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rk-content {
  flex: 1;
  min-width: 0;
}
.rk-card {
  background: linear-gradient(145deg, var(--card-bg), #131c29);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  transition: all 0.25s;
}
.rk-card:hover { border-color: rgba(0, 212, 170, 0.2); }

.rk-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: rgba(0, 212, 170, 0.04);
  border-radius: 12px;
  transition: all 0.2s;
}
.rk-cat-header:hover { background: rgba(0, 212, 170, 0.08); }
.rk-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rk-cat-info svg { color: var(--primary); }
.rk-cat-name { font-weight: 600; font-size: 14px; color: var(--text); }
.rk-cat-num { font-size: 20px; font-weight: 700; color: var(--primary); }
.rk-cat-meta { font-size: 11px; color: var(--text-muted); }
.rk-cat-body { padding: 12px 0 0; }

.rk-prod-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.15s;
  border-bottom: 1px solid var(--border);
}
.rk-prod-row:last-child { border-bottom: none; }
.rk-prod-row:hover { background: rgba(255, 255, 255, 0.03); }
.rk-prod-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg);
}
.rk-prod-info { flex: 1; min-width: 0; }
.rk-prod-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-prod-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.rk-prod-bar {
  width: 90px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.rk-prod-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 3px;
  transition: width 0.3s;
}

.rk-table td { vertical-align: middle; }
.rk-table-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
}
.rk-table-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.rk-table-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 3px;
}

@media (max-width: 900px) {
  .rk-layout { flex-direction: column; }
  .rk-nav { width: 100%; max-height: none; }
  .rk-nav-list { max-height: 240px; }
  .rk-filter-bar { flex-direction: column; align-items: stretch; }
  .rk-filter-group { justify-content: space-between; }
  .rk-filter-group select { flex: 1; }
  .rk-header { flex-direction: column; }
  .rk-actions { width: 100%; justify-content: flex-end; }
}

/* ==================== 物流管理 ==================== */
.logistics-track { position: relative; padding-left: 20px; }
.lt-node { position: relative; padding-bottom: 16px; padding-left: 16px; border-left: 2px solid var(--border); }
.lt-node:last-child { border-left-color: transparent; }
.lt-node.lt-active { border-left-color: var(--primary); }
.lt-dot { position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.lt-active .lt-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(0,212,170,.2); }
.lt-content { font-size: 12px; }
.lt-status { font-weight: 600; color: var(--text); }
.lt-active .lt-status { color: var(--primary); }
.lt-desc { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.lt-time { color: var(--text-muted); font-size: 10px; margin-top: 2px; }


/* ==================== 拜访管理 & 配送跟踪 ==================== */

/* ── 页面头部 ── */
.visits-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.visits-page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.visits-page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── TAB 导航按钮 (pill 风格) ── */
.visits-tabs-wrapper {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 20px;
}
.visits-tab-btn, .delivery-tab-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}
.visits-tab-btn.active, .delivery-tab-btn.active {
  background: var(--primary);
  color: #111;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,212,170,.25);
}
.visits-tab-btn:hover:not(.active), .delivery-tab-btn:hover:not(.active) {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

/* ── 快捷跳转栏 ── */
.visits-quick-jump {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(0,212,170,.04);
  border: 1px solid rgba(0,212,170,.12);
  border-radius: 10px;
}
.visits-quick-jump-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
  font-weight: 500;
}
.visits-quick-chip {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.visits-quick-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,212,170,.06);
  box-shadow: 0 1px 4px rgba(0,212,170,.1);
}
.visits-quick-chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #111;
  font-weight: 600;
}

/* ── 筛选栏 ── */
.visits-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.visits-filter-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.visits-filter-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.visits-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,212,170,.1);
}
.visits-filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

/* ── 批量操作工具栏 ── */
.visits-batch-toolbar {
  display: none;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(0,212,170,.02));
  border: 1px solid rgba(0,212,170,.2);
  border-radius: 10px;
}
.visits-batch-toolbar.show { display: flex; }
.visits-batch-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-right: 4px;
}

/* ── 拜访计划卡片 ── */
.visits-plan-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card-bg);
  transition: all 0.25s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.visits-plan-card:hover {
  border-color: rgba(0,212,170,.25);
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  transform: translateY(-1px);
}
.visits-plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity 0.25s;
}
.visits-plan-card:hover::before {
  opacity: 1;
  background: var(--primary);
}
.visits-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.visits-plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.visits-plan-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.visits-plan-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.visits-plan-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.visits-plan-detail {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.visits-plan-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  text-align: center;
}
.visits-plan-summary-item {
  padding: 8px 4px;
  background: rgba(255,255,255,.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.visits-plan-summary-value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.visits-plan-summary-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── 统计卡片 (重新设计) ── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  border-color: rgba(0,212,170,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transform: translateY(-2px);
}
.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}
.stat-card-icon.primary { background: rgba(0,212,170,.12); color: var(--primary); }
.stat-card-icon.success { background: rgba(40,167,69,.12); color: #28a745; }
.stat-card-icon.warning { background: rgba(255,165,2,.12); color: var(--warning); }
.stat-card-icon.danger  { background: rgba(255,71,87,.12); color: var(--danger); }
.stat-card-icon.info    { background: rgba(55,66,250,.12); color: var(--info); }
.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-trend {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
}
.stat-trend.up   { color: #28a745; }
.stat-trend.down { color: var(--danger); }
.stat-trend.flat { color: var(--text-muted); }

/* ── 日历网格 ── */
.visits-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.visits-calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.visits-calendar-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
}
.visits-calendar-day-header.weekend {
  color: var(--danger);
  opacity: 0.7;
}
.visits-calendar-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid transparent;
  transition: all 0.15s;
  min-height: 48px;
  position: relative;
}
.visits-calendar-cell:hover {
  border-color: rgba(0,212,170,.3);
  background: rgba(0,212,170,.06);
}
.visits-calendar-cell.today {
  border-color: var(--primary);
  background: rgba(0,212,170,.1);
  font-weight: 700;
}
.visits-calendar-cell.other-month {
  color: var(--text-muted);
  opacity: 0.35;
}
.visits-calendar-cell.selected {
  border-color: var(--primary);
  background: rgba(0,212,170,.15);
  font-weight: 700;
}
.visits-calendar-cell.weekend {
  color: #ff6b7a;
}
.visits-calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 2px;
}
.visits-calendar-dot.planned { background: var(--primary); }
.visits-calendar-dot.completed { background: #28a745; }
.visits-calendar-dot.overdue { background: var(--danger); }

/* ── 日历底部信息栏 ── */
.visits-calendar-info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── 表格增强 (拜访表格) ── */
.visits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.visits-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  background: rgba(255,255,255,.01);
}
.visits-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.visits-table tbody tr:hover td {
  background: rgba(255,255,255,.02);
}
.visits-table tbody tr.selected td {
  background: rgba(0,212,170,.06);
  border-bottom-color: rgba(0,212,170,.15);
}

/* ── 状态徽章 ── */
.visits-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.visits-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.visits-status-badge.in_progress {
  background: rgba(255,165,2,.1);
  color: var(--warning);
  border: 1px solid rgba(255,165,2,.2);
}
.visits-status-badge.in_progress .visits-status-dot { background: var(--warning); }
.visits-status-badge.completed {
  background: rgba(40,167,69,.1);
  color: #28a745;
  border: 1px solid rgba(40,167,69,.2);
}
.visits-status-badge.completed .visits-status-dot { background: #28a745; }
.visits-status-badge.abandoned {
  background: rgba(255,71,87,.1);
  color: var(--danger);
  border: 1px solid rgba(255,71,87,.2);
}
.visits-status-badge.abandoned .visits-status-dot { background: var(--danger); }
.visits-status-badge.pending {
  background: rgba(136,153,170,.1);
  color: var(--text-muted);
  border: 1px solid rgba(136,153,170,.2);
}
.visits-status-badge.pending .visits-status-dot { background: var(--text-muted); }

/* ── 话术卡片 ── */
.visits-script-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--card-bg);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.visits-script-card:hover {
  border-color: rgba(0,212,170,.2);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.visits-script-card.preset {
  border-left: 3px solid #6366f1;
}
.visits-script-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.visits-script-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(0,212,170,.1);
  color: var(--primary);
  margin-bottom: 6px;
}
.visits-script-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.visits-script-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(255,255,255,.04);
  color: var(--text-muted);
}
.visits-script-content {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.visits-script-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.visits-script-stats {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 附件卡片 ── */
.visits-attach-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  transition: all 0.2s;
}
.visits-attach-card:hover {
  border-color: rgba(0,212,170,.2);
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.visits-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}
.visits-attach-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}
.visits-attach-icon.image { background: rgba(0,212,170,.1); }
.visits-attach-icon.doc   { background: rgba(55,66,250,.1); }
.visits-attach-icon.other { background: rgba(136,153,170,.1); }
.visits-attach-info {
  flex: 1;
  min-width: 0;
}
.visits-attach-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visits-attach-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── 地图面板 ── */
.visits-map-wrapper {
  display: flex;
  gap: 12px;
  height: calc(100vh - 240px);
  min-height: 500px;
}
.visits-map-container {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  min-height: 450px;
  overflow: hidden;
}
.visits-map-panel {
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  padding: 14px;
}
.visits-map-panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.visits-map-person-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.2s;
  border-left: 4px solid;
}
.visits-map-person-card:hover {
  border-color: rgba(0,212,170,.2);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.visits-map-person-card.status-online { border-left-color: #22c55e; }
.visits-map-person-card.status-warning { border-left-color: #f59e0b; }
.visits-map-person-card.status-offline { border-left-color: #ef4444; }
.visits-map-person-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.visits-map-person-cust {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.visits-map-person-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.visits-map-legend {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.visits-map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.visits-map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── 评分分布条 ── */
.visits-rating-bar-wrap {
  margin-bottom: 20px;
}
.visits-rating-bar-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
.visits-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.visits-rating-bar-label {
  width: 34px;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
}
.visits-rating-bar-track {
  flex: 1;
  background: var(--bg-muted);
  border-radius: 4px;
  height: 14px;
  overflow: hidden;
}
.visits-rating-bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.visits-rating-bar-count {
  width: 28px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
}

/* ── 附件页头部 ── */
.visits-attach-header-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.visits-attach-header-title {
  font-weight: 600;
  font-size: 14px;
}
.visits-attach-header-stats {
  font-size: 12px;
  color: var(--text-muted);
}
.visits-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
}

/* ── 表单操作按钮行 ── */
.visits-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ⭐ 星级评分容器 ── */
.visits-star-container {
  text-align: center;
  margin: 16px 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.visits-star-btn {
  font-size: 32px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.visits-star-btn:hover {
  transform: scale(1.15);
}
.visits-star-btn.active {
  color: #f59e0b;
}
.visits-batch-star-btn {
  font-size: 36px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.visits-batch-star-btn:hover {
  transform: scale(1.15);
}
.visits-batch-star-btn.active {
  color: #f59e0b;
}

/* ── 信息提示条 ── */
.visits-info-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.visits-info-bar strong {
  color: var(--text);
}

/* ── 警告提示框 ── */
.visits-warn-callout {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
}
.visits-warn-callout strong {
  color: #f59e0b;
}
.visits-warn-icon {
  display: inline-block;
  margin-right: 4px;
}

/* ── 拜访统计区块卡片 ── */
.visits-stat-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.visits-stat-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.visits-stat-section .visits-table {
  margin-bottom: 0;
}
.visits-stat-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.visits-stat-legend {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.visits-stat-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
}
@media (max-width: 768px) {
  .visits-stat-grid-2 { grid-template-columns: 1fr; }
}

/* ── GPS轨迹面板 ── */
.visits-gps-panel {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
}
.visits-gps-panel h4 {
  margin: 0 0 8px 0;
}
.visits-gps-event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.visits-gps-event-row:last-child {
  border-bottom: none;
}
.visits-gps-event-checkin { color: var(--success); }
.visits-gps-event-checkout { color: var(--danger); }
.visits-gps-event-waypoint { color: var(--primary); }
.visits-gps-coords {
  font-family: monospace;
  font-size: 11px;
}
.visits-gps-addr {
  color: var(--text-muted);
  font-size: 11px;
}
.visits-gps-battery {
  font-size: 11px;
}
.visits-gps-waypoint-detail {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}
.visits-gps-waypoint-line {
  font-size: 11px;
  padding: 2px 0;
  color: var(--text-muted);
  font-family: monospace;
}
.visits-gps-empty {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
}

/* ── 地图降级卡片网格 ── */
.visits-map-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 12px;
}
.visits-map-fallback-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--card-bg);
}
.visits-map-fallback-name {
  font-weight: 700;
  font-size: 15px;
}
.visits-map-fallback-cust {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.visits-map-fallback-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.visits-map-fallback-coords {
  background: var(--bg-muted);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  display: inline-block;
  margin-top: 4px;
}

/* ── 预警面板 ── */
.visits-warn-panel {
  background: linear-gradient(135deg, rgba(255,71,87,.04), rgba(255,165,2,.04));
  border: 1px solid rgba(255,71,87,.1);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.visits-warn-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 8px;
}
.visits-warn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.visits-warn-row:last-child {
  border-bottom: none;
}
.visits-warn-name {
  color: var(--text);
  font-weight: 500;
}
.visits-warn-detail {
  color: var(--text-muted);
  font-size: 11px;
}

/* ── 标准状态页 (loading/empty/error) ── */
.visits-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.visits-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.visits-state-icon.loading {
  background: rgba(0,212,170,.1);
  animation: visits-spin 1s linear infinite;
}
.visits-state-icon.empty {
  background: rgba(136,153,170,.1);
}
.visits-state-icon.error {
  background: rgba(255,71,87,.1);
}
.visits-state-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.visits-state-hint {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
}
@keyframes visits-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── 通用按钮 ── */
.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 500;
}

/* ── 配送实时追踪头部徽标 ── */
.delivery-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.delivery-track-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.delivery-track-title-text {
  font-weight: 700;
  font-size: 15px;
}
.delivery-track-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-muted);
  color: var(--text-muted);
  white-space: nowrap;
}
.delivery-track-badge.online {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.delivery-track-badge.active {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* ── 配送卡片 hover ── */
.delivery-track-card:hover {
  border-color: rgba(0,212,170,.25) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
#deliveryMap { z-index: 0; }

/* ── 拜访详情面板 (展开块) ── */
.visits-expand-section {
  margin-top: 10px;
  padding: 14px;
  background: rgba(255,255,255,.015);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.visits-expand-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.visits-expand-row strong {
  color: var(--text);
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  .visits-tabs-wrapper { width: 100%; overflow-x: auto; }
  .visits-map-wrapper { flex-direction: column; height: auto; }
  .visits-map-panel { width: 100%; max-height: 300px; }
  .visits-plan-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   ERP 商品中心 — 专属样式
   ================================================================ */

/* ── 工具栏 ── */
.erp-product-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 12px 0; flex-wrap: wrap;
}
.erp-product-toolbar .toolbar-left { display: flex; gap: 8px; align-items: center; }
.erp-product-toolbar .toolbar-right { display: flex; gap: 8px; align-items: center; }
.erp-product-toolbar .erp-search {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text); padding: 6px 12px; border-radius: 6px;
  width: 240px; font-size: 13px;
}
.erp-product-toolbar .erp-search:focus { border-color: var(--primary); outline: none; }
.erp-product-toolbar select {
  background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 13px;
}
.erp-checkbox-label {
  display: flex; align-items: center; gap: 4px; font-size: 13px;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
}

/* ── 商品卡片网格 ── */
.erp-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.erp-product-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.2s; position: relative;
}
.erp-product-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,212,170,.08); }
.erp-product-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.erp-product-card .card-checkbox {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 20px; height: 20px; cursor: pointer;
}
.erp-product-card .card-image {
  width: 100%; height: 160px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.erp-product-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.erp-product-card .no-image {
  color: var(--text-muted); font-size: 13px;
}
.erp-product-card .card-body { padding: 12px; }
.erp-product-card .card-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.erp-product-card .card-meta {
  display: flex; gap: 8px; font-size: 12px; color: var(--text-muted);
  margin-bottom: 8px;
}
.erp-product-card .card-meta .brand { color: var(--primary); }
.erp-product-card .card-prices {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
}
.erp-product-card .card-prices .price {
  font-size: 18px; font-weight: 700; color: var(--warning);
}
.erp-product-card .card-prices .market-price {
  font-size: 13px; color: var(--text-muted); text-decoration: line-through;
}
.erp-product-card .card-stock {
  display: flex; gap: 8px; font-size: 12px; color: var(--text-muted);
  margin-bottom: 10px;
}
.erp-product-card .card-stock .reserved { color: var(--info); }
.erp-product-card .card-stock .stock-alert {
  color: var(--danger); font-weight: 600;
}
.erp-product-card .card-footer {
  display: flex; gap: 6px; align-items: center; font-size: 12px;
  flex-wrap: wrap;
}
.erp-product-card .card-footer .sales { color: var(--text-muted); margin-left: auto; }
.erp-product-card .card-actions {
  display: flex; gap: 6px; padding: 0 12px 12px;
}

/* ── 商品编辑表单 ── */
.erp-product-editor {
  max-width: 960px; margin: 0 auto;
}
.erp-product-editor .editor-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.erp-product-editor .editor-header h3 {
  font-size: 18px; color: var(--text);
}
.erp-product-editor .header-actions { display: flex; gap: 8px; align-items: center; }
.unsaved-hint {
  font-size: 12px; color: var(--warning); font-style: italic;
}
.form-section {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.form-section h4 {
  font-size: 14px; color: var(--text); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.form-section h4 .muted { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.form-section h4 .required { color: var(--danger); }
.form-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.form-group label {
  display: block; font-size: 12px; color: var(--text-muted);
  margin-bottom: 4px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 8px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 13px;
}
select option, select optgroup {
  background: var(--bg-tertiary);
  color: var(--text);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary); outline: none;
}
.form-group input[readonly] {
  background: var(--bg-disabled); color: var(--text-muted); cursor: not-allowed;
}

/* 价格联动操作条 */
.price-impact-bar {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(255, 165, 2, 0.08); border: 1px solid rgba(255, 165, 2, 0.2);
  border-radius: 6px; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--warning);
}

/* 统计小卡片 */
.stats-grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat-card-sm {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px; text-align: center;
}
.stat-card-sm .stat-value {
  font-size: 20px; font-weight: 700; color: var(--primary);
}
.stat-card-sm .stat-label {
  font-size: 12px; color: var(--text-muted); margin-top: 4px;
}

/* 审计信息 */
.audit-info {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}

/* 空状态 */
.erp-empty {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.erp-empty p { margin-bottom: 16px; }

/* 加载 */
.erp-loading {
  text-align: center; padding: 40px; color: var(--text-muted);
}

/* 分页 */
.erp-pagination {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 12px; padding: 16px 0; font-size: 13px; color: var(--text-muted);
}

/* 低库存行警告 */
.row-warning { background: rgba(255, 71, 87, 0.06); }

/* ── 同步状态徽章 ── */
.sync-badge {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap;
}
.sync-badge.synced  { color: var(--primary); background: rgba(0,212,170,.1); }
.sync-badge.syncing { color: var(--info); background: rgba(55,66,250,.1); }
.sync-badge.failed  { color: var(--danger); background: rgba(255,71,87,.1); cursor: pointer; }
.sync-badge.idle    { color: var(--text-muted); background: rgba(136,153,170,.1); }

/* ── 对账面板 ── */
.reconciliation-modal {
  max-width: 960px !important;
}
.recon-stats {
  display: flex; gap: 16px; align-items: center;
  padding: 12px 16px; background: var(--bg); border-radius: 8px;
  font-size: 14px; color: var(--text);
}
.recon-stats .success { color: var(--primary); }
.recon-stats .danger  { color: var(--danger); font-weight: 600; }
.recon-stats button { margin-left: auto; }

/* 响应式 */
@media (max-width: 768px) {
  .erp-product-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .erp-product-toolbar { flex-direction: column; align-items: stretch; }
  .erp-product-toolbar .toolbar-left { flex-wrap: wrap; }
  .erp-product-toolbar .toolbar-right { flex-wrap: wrap; justify-content: flex-end; }
  .erp-product-toolbar .erp-search { width: 100%; }
}


/* ============================================
   企业管理中心 - 概览页（loadEntOverview）
   ============================================ */

/* 到期提醒条 */
.ent-alert{
  display:flex; align-items:center; gap:14px;
  padding:14px 18px; margin-bottom:20px;
  background:linear-gradient(135deg, rgba(255,71,87,.12), rgba(255,71,87,.04));
  border:1px solid rgba(255,71,87,.35);
  border-left:3px solid var(--danger);
  border-radius:12px;
  box-shadow:0 4px 16px rgba(255,71,87,.08);
}
.ent-alert-icon{
  flex-shrink:0; width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,71,87,.15); color:var(--danger);
  border-radius:10px;
}
.ent-alert-body{flex:1; min-width:0;}
.ent-alert-title{font-size:14px; font-weight:700; color:var(--danger); margin-bottom:2px;}
.ent-alert-sub{font-size:12px; color:var(--text-muted);}

/* 数据卡网格 */
.ent-stats-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:16px;
  margin-bottom:20px;
}
@media (max-width:1100px){ .ent-stats-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:560px){ .ent-stats-grid{ grid-template-columns:1fr; } }

/* 数据卡本体 */
.ent-card{
  position:relative;
  background:linear-gradient(180deg, var(--card-bg) 0%, rgba(26,35,50,.6) 100%);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px 18px 16px;
  transition:all .25s ease;
  overflow:hidden;
}
.ent-card::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at top right, var(--accent, rgba(0,212,170,.08)), transparent 60%);
  pointer-events:none; opacity:.9;
}
.ent-card:hover{
  transform:translateY(-3px);
  border-color:rgba(0,212,170,.35);
  box-shadow:0 10px 30px rgba(0,0,0,.25), 0 0 0 1px rgba(0,212,170,.1);
}
.ent-card-primary{ --accent: rgba(0,212,170,.10); }
.ent-card-info{ --accent: rgba(55,66,250,.10); }
.ent-card-warning{ --accent: rgba(255,165,2,.10); }
.ent-card-purple{ --accent: rgba(168,85,247,.12); }

.ent-card-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom:14px; position:relative;
}
.ent-card-icon{
  width:40px; height:40px; border-radius:11px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,212,170,.12); color:var(--primary);
  border:1px solid rgba(0,212,170,.2);
}
.ent-card-info .ent-card-icon{ background:rgba(55,66,250,.12); color:#6c7cff; border-color:rgba(55,66,250,.25); }
.ent-card-warning .ent-card-icon{ background:rgba(255,165,2,.12); color:var(--warning); border-color:rgba(255,165,2,.25); }
.ent-card-purple .ent-card-icon{ background:rgba(168,85,247,.12); color:#c084fc; border-color:rgba(168,85,247,.25); }

.ent-card-badge{ display:flex; align-items:center; }
.ent-card-label{
  font-size:12px; color:var(--text-muted); font-weight:500;
  margin-bottom:6px; letter-spacing:.3px; position:relative;
}
.ent-card-value{
  font-size:30px; font-weight:800; color:var(--text);
  line-height:1.1; letter-spacing:-.5px; position:relative;
  display:flex; align-items:baseline; gap:2px;
}
.ent-card-primary .ent-card-value{ color:var(--primary); }
.ent-card-info .ent-card-value{ color:#6c7cff; }
.ent-card-warning .ent-card-value{ color:var(--warning); }
.ent-card-purple .ent-card-value{ color:#c084fc; }
.ent-unit{ font-size:14px; font-weight:600; color:var(--text-muted); margin-left:4px; }
.ent-card-foot{
  margin-top:10px; font-size:12px; color:var(--text-muted); position:relative;
}
.ent-card-foot b{ color:var(--text); font-weight:600; }

/* 进度条 */
.ent-progress{
  height:5px; background:rgba(255,255,255,.06); border-radius:3px;
  overflow:hidden; margin-bottom:5px;
}
.ent-progress-bar{
  height:100%; border-radius:3px;
  background:linear-gradient(90deg, var(--primary), #00f0c0);
  box-shadow:0 0 8px rgba(0,212,170,.4);
  transition:width .6s ease;
}
.ent-progress-bar-purple{
  background:linear-gradient(90deg, #a855f7, #c084fc);
  box-shadow:0 0 8px rgba(168,85,247,.4);
}

/* [v6.9+] ECharts 暗色主题：所有 canvas 内的文字/标签颜色修正（防止"描边"看不见） */
.echarts-tooltip, [class*="echarts-"] { color: #e2e8f0; }
/* 强制覆盖 ECharts 默认浅色文字 */
text[fill="#fff"], text[fill="#FFF"], text[fill="#000"] { fill: #e2e8f0 !important; }
text[stroke] { stroke: none !important; }
.ent-progress-text{ font-size:11px; color:var(--text-muted); }

/* 状态 Pill */
.ent-pill{
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 9px; border-radius:10px; font-size:11px; font-weight:600;
  border:1px solid transparent;
}
.ent-pill::before{ content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.ent-pill-ok{ background:rgba(0,212,170,.12); color:var(--primary); border-color:rgba(0,212,170,.3); }
.ent-pill-warn{ background:rgba(255,165,2,.12); color:var(--warning); border-color:rgba(255,165,2,.3); }
.ent-pill-danger{ background:rgba(255,71,87,.12); color:var(--danger); border-color:rgba(255,71,87,.3); }

/* 快捷操作区 */
.ent-actions{
  background:var(--card-bg); border:1px solid var(--border);
  border-radius:14px; padding:18px;
  position:relative; overflow:hidden;
}
.ent-actions::before{
  content:""; position:absolute; top:-30px; right:-30px;
  width:140px; height:140px; border-radius:50%;
  background:radial-gradient(circle, rgba(0,212,170,.08), transparent 70%);
  pointer-events:none;
}
.ent-actions-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px; position:relative;
}
.ent-actions-title{
  display:inline-flex; align-items:center; gap:6px;
  font-size:14px; font-weight:600; color:var(--text);
}
.ent-actions-title svg{ color:var(--primary); }
.ent-actions-tip{ font-size:11px; color:var(--text-muted); padding:2px 8px; background:rgba(255,255,255,.04); border-radius:8px; }
.ent-actions-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:10px; position:relative;
}
.ent-action{
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-radius:10px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--border);
  color:var(--text); cursor:pointer; text-align:left;
  transition:all .2s ease; font-family:inherit;
}
.ent-action:hover{
  background:rgba(0,212,170,.08);
  border-color:rgba(0,212,170,.4);
  transform:translateX(2px);
  box-shadow:0 4px 14px rgba(0,212,170,.12);
}
.ent-action-icon{
  width:38px; height:38px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,212,170,.15); color:var(--primary);
  transition:transform .25s ease;
}
.ent-action:hover .ent-action-icon{ transform:rotate(-8deg) scale(1.08); }
.ent-action-body{ flex:1; min-width:0; }
.ent-action-title{ font-size:13px; font-weight:600; margin-bottom:1px; }
.ent-action-sub{ font-size:11px; color:var(--text-muted); }
.ent-action-arrow{
  font-size:18px; color:var(--text-muted); flex-shrink:0;
  transition:all .2s ease;
}
.ent-action:hover .ent-action-arrow{ color:var(--primary); transform:translateX(3px); }
.ent-action-primary{
  background:linear-gradient(135deg, rgba(0,212,170,.15), rgba(0,212,170,.04));
  border-color:rgba(0,212,170,.3);
}
.ent-action-primary .ent-action-icon{
  background:linear-gradient(135deg, var(--primary), #00f0c0);
  color:#0f1923; box-shadow:0 4px 12px rgba(0,212,170,.3);
}
.ent-action-primary .ent-action-title{ color:var(--primary); }

@media (max-width:640px){
  .ent-alert{ flex-direction:column; align-items:flex-start; gap:10px; }
  .ent-card-value{ font-size:24px; }
  .ent-actions-tip{ display:none; }
}

/* ============================================================
   AI 消息输入统一基类 v1 (2026-08-13)
   设计目标：新代码直接复用，现有入口逐步收敛到本基类
   基线：字号 14px / 行高 1.5 / 文字色 var(--ai-input-text)
   外壳：.ai-input-box（背景/边框/圆角/聚焦态走统一变量）
   注意：浅色主题场景（右下角 AI 助手 / ERP AI 助手）需自行覆盖
         color 与 ::placeholder，勿直接套用深色基线
   ============================================================ */
.ai-input-base {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ai-input-text, var(--text));
  font-family: inherit;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
}
.ai-input-base::placeholder {
  color: var(--ai-input-ph, var(--text-muted)); /* #8899aa */
}
.ai-input-box {
  display: flex;
  gap: var(--ai-input-gap, 8px);
  align-items: flex-end;
  background: var(--ai-input-bg, var(--card-bg));
  border: 1px solid var(--ai-input-border, var(--border));
  border-radius: var(--ai-input-radius, 12px);
  padding: 8px 12px;
  transition: border-color .2s, box-shadow .2s;
}
.ai-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 212, 170, .08);
}
.ai-input-box .ai-input-base {
  flex: 1;
  min-height: 28px;
  max-height: 120px;
  padding: 4px 0;
}

/* ===== 经营总览：子tab + 分组（BOSS驾驶舱视觉升级） ===== */
.bi-subtab {
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  border-radius: 16px;
  cursor: pointer;
  transition: all .2s;
}
.bi-subtab:hover { color: var(--text); border-color: var(--primary); }
.bi-subtab.active {
  background: linear-gradient(135deg, var(--primary), var(--emerald));
  color: #06251d;
  border-color: var(--primary);
  font-weight: 600;
}

/* 分组标题栏：左侧色条 + 图标块 + 名称 + 计数 + 折叠箭头 */
.bi-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--bg-tertiary), transparent);
  border-left: 3px solid var(--grp, var(--indigo));
  border-radius: 8px;
  cursor: pointer; user-select: none;
  transition: background .2s ease;
}
.bi-group-header:hover { background: linear-gradient(90deg, var(--card-hover), transparent); }
.bi-group-header .bi-grp-ico {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 8px; font-size: 14px; line-height: 26px; text-align: center;
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px var(--grp, var(--indigo));
}
.bi-group-header .bi-grp-name { font-weight: 700; font-size: 14px; color: var(--text); }
.bi-group-header .bi-grp-count {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-tertiary); padding: 2px 8px; border-radius: 999px;
}
.bi-group-header .bi-group-toggle {
  margin-left: auto; font-size: 12px; color: var(--text-muted);
  transition: color .2s;
}
.bi-group-header:hover .bi-group-toggle { color: var(--grp, var(--primary)); }

/* 分组 KPI 卡行：等宽一排 */
.bi-kpi-row { margin-bottom: 12px; }
.bi-kpi-inner { display: flex; flex-wrap: wrap; gap: 10px; }
.bi-kpi-item {
  position: relative; overflow: hidden;
  flex: 1 1 150px; min-width: 0; min-height: 74px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bi-kpi-item::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--grp, var(--indigo)); opacity: .85;
}
.bi-kpi-item:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--grp, var(--indigo));
}
.bi-kpi-item .bi-kpi-label {
  font-size: 12px; color: var(--text-muted); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bi-kpi-item .bi-card-body { color: var(--text-muted); font-size: 12px; }
.bi-kpi-item .bi-kpi-value {
  font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.bi-kpi-item .bi-kpi-unit { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 4px; letter-spacing: 0; }

/* 分组图表区：每行固定 2 个，宽度自适应平分，图表高度固定 */
.bi-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .bi-chart-grid { grid-template-columns: 1fr; }
  .bi-chart-grid > .bi-chart-card:last-child:nth-child(odd) { grid-column: auto; }
}
/* 奇数行最后一个图表占满整行：组内仅 1 图（整行）或奇数图最后剩 1 个时，
   该卡拉宽至左右边框对齐，占满两个图表位，更美观 */
.bi-chart-grid > .bi-chart-card:last-child:nth-child(odd) {
  grid-column: span 2;
}
.bi-chart-card {
  position: relative; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; min-width: 0; min-height: 250px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bi-chart-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--grp, var(--indigo)); opacity: .85;
}
.bi-chart-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--grp, var(--indigo));
}
.bi-chart-card .bi-chart-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px;
}
.bi-chart-card .bi-chart-title {
  font-weight: 600; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bi-chart-card .bi-chart-type {
  font-size: 11px; color: var(--text-muted); background: var(--bg-tertiary);
  padding: 2px 8px; border-radius: 4px; flex-shrink: 0;
}
.bi-chart-card .bi-card-body { color: var(--text-muted); font-size: 12px; height: 220px; }

/* 卡片内空态（数字卡/表格/图表共用） */
.bi-empty {
  height: 100%; min-height: 60px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--text-muted); font-size: 12px; text-align: center;
}
.bi-empty .bi-empty-ico { font-size: 22px; line-height: 1; opacity: .55; }
.bi-empty .bi-empty-sub { font-size: 11px; opacity: .7; }

/* ============================================================
   财务 · 利润预测（profit-forecast）深度视觉升级
   设计原则：Hero 主视觉 + KPI 带 + 分区卡片，语义类 pf-*
   ============================================================ */
.pf-page { display: flex; flex-direction: column; gap: 16px; }

/* 顶部工具条 */
.pf-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
.pf-toolbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-toolbar-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1;
  background: linear-gradient(135deg, rgba(0,212,170,.16), rgba(56,182,255,.12));
  border: 1px solid rgba(0,212,170,.28);
}
.pf-toolbar-head { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.pf-toolbar-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pf-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-period {
  width: 156px; padding: 7px 11px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
  color-scheme: dark;
}
.pf-period:focus { border-color: var(--primary); outline: none; }
.pf-ghost {
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  transition: .2s; display: inline-flex; align-items: center; gap: 6px;
}
.pf-ghost:hover { color: var(--text); border-color: var(--border); background: var(--bg-tertiary); }
.pf-loading { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.pf-loading::before {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(0,212,170,.25); border-top-color: var(--primary);
  animation: pf-spin .7s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* 主视觉 Hero：预测净利润 */
.pf-hero {
  --pf-sign: var(--emerald);
  position: relative; display: flex; align-items: stretch; gap: 26px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--card-bg) 62%);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.pf-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pf-sign); opacity: .9; }
.pf-hero.is-loss { --pf-sign: var(--rose); }
.pf-hero-main { flex: 1; min-width: 260px; }
.pf-hero-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); letter-spacing: .3px; }
.pf-hero-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  color: var(--pf-sign); background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; letter-spacing: .4px;
}
.pf-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pf-sign); box-shadow: 0 0 8px var(--pf-sign); }
.pf-hero-value {
  font-size: 46px; font-weight: 800; line-height: 1.05; margin-top: 14px;
  color: var(--pf-sign); letter-spacing: -1px; font-variant-numeric: tabular-nums;
}
.pf-hero-change { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.pf-hero-change.up { color: var(--emerald); }
.pf-hero-change.down { color: var(--rose); }
.pf-hero-change .pf-hero-prev { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.pf-hero-side { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 240px; flex: 1; }
.pf-hero-meta { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 12px; }
.pf-hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
.pf-hero-meta-item span { font-size: 11px; color: var(--text-muted); letter-spacing: .3px; }
.pf-hero-meta-item b { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pf-progress { margin-top: 4px; }
.pf-progress-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.pf-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--cyan)); transition: width .4s ease; }
.pf-progress-txt { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* KPI 指标带 */
.pf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pf-kpi {
  --pf-k: var(--indigo); position: relative; overflow: hidden;
  padding: 16px 16px 14px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pf-kpi::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pf-k); opacity: .85; }
.pf-kpi:hover { transform: translateY(-2px); border-color: var(--pf-k); box-shadow: var(--shadow-md); }
.pf-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-kpi-ico { font-size: 17px; line-height: 1; opacity: .95; }
.pf-kpi-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.15; margin-top: 12px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.pf-kpi-label { font-size: 11px; color: var(--text-muted); letter-spacing: .3px; margin-top: 7px; }
.pf-kpi-hint { font-size: 10px; color: var(--text-muted); margin-top: 3px; opacity: .8; }
.pf-kpi.k-cyan  { --pf-k: var(--cyan); }
.pf-kpi.k-indigo { --pf-k: var(--indigo); }
.pf-kpi.k-amber { --pf-k: var(--amber); }
.pf-kpi.k-rose  { --pf-k: var(--rose); }
.pf-kpi.k-emerald { --pf-k: var(--emerald); }

/* 分区卡片 */
.pf-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pf-card-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 15px 18px 12px; border-bottom: 1px solid var(--border);
}
.pf-card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.pf-card-title::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
.pf-card-sub { font-size: 11px; color: var(--text-muted); }
.pf-card-body { padding: 16px 18px; }

/* 趋势图 */
.pf-trend-chart { width: 100%; height: 320px; }

/* 情景预测卡 */
.pf-scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pf-scenario {
  --pf-s: var(--indigo); position: relative; padding: 16px 16px 15px; overflow: hidden;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 12px;
  border-left-width: 3px; border-left-color: var(--pf-s); transition: transform .18s ease, border-color .18s ease;
}
.pf-scenario:hover { transform: translateY(-2px); }
.pf-scenario .pf-s-name { font-size: 13px; font-weight: 700; color: var(--pf-s); letter-spacing: .2px; }
.pf-scenario .pf-s-tag {
  display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .4px;
  color: var(--pf-s); background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px;
}
.pf-scenario .pf-s-rows { margin-top: 13px; display: flex; flex-direction: column; gap: 10px; }
.pf-scenario .pf-s-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pf-scenario .pf-s-row span { font-size: 11px; color: var(--text-muted); }
.pf-scenario .pf-s-row b { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pf-scenario.is-base { background: linear-gradient(135deg, rgba(99,102,241,.08), var(--bg-tertiary) 58%); border-color: rgba(99,102,241,.45); }
.pf-scenario.s-base { --pf-s: var(--indigo); }
.pf-scenario.s-optimistic { --pf-s: var(--emerald); }
.pf-scenario.s-pessimistic { --pf-s: var(--rose); }

/* 市场驱动因子 */
.pf-drivers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pf-driver {
  --pf-d: var(--primary); padding: 14px 15px; background: var(--bg-tertiary);
  border: 1px solid var(--border); border-radius: 12px; border-left-width: 3px; border-left-color: var(--pf-d);
}
.pf-driver .pf-d-name { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); letter-spacing: .2px; }
.pf-driver .pf-d-ico { font-size: 16px; line-height: 1; }
.pf-driver .pf-d-value { font-size: 20px; font-weight: 700; color: var(--text); margin-top: 10px; font-variant-numeric: tabular-nums; }
.pf-driver .pf-d-hint { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; }
.pf-driver.d-hr  { --pf-d: var(--amber); }
.pf-driver.d-crm { --pf-d: var(--indigo); }
.pf-driver.d-ecom { --pf-d: var(--emerald); }
.pf-driver-note { margin-top: 12px; font-size: 10.5px; color: var(--text-muted); opacity: .85; }

/* AI 解读面板 */
.pf-ai {
  border: 1px solid rgba(99,102,241,.3);
  background: linear-gradient(135deg, rgba(99,102,241,.07), rgba(139,92,246,.03) 55%, transparent);
}
.pf-ai .pf-card-hd { border-bottom-color: rgba(99,102,241,.2); }
.pf-ai .pf-card-title::before { background: var(--indigo); }
.pf-ai-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--indigo-light);
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
  border-radius: 999px; padding: 2px 9px;
}
.pf-ai-body { padding: 16px 18px; font-size: 13.5px; line-height: 1.8; color: var(--text); white-space: pre-wrap; }

/* 空态 / 错误态 */
.pf-empty { padding: 44px 20px; text-align: center; color: var(--text-muted); background: var(--card-bg); border: 1px dashed var(--border); border-radius: 14px; }
.pf-empty .pf-empty-ico { font-size: 34px; line-height: 1; margin-bottom: 12px; opacity: .6; }
.pf-empty .pf-empty-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

@media (max-width: 720px) {
  .pf-hero { gap: 18px; padding: 22px 20px; }
  .pf-hero-value { font-size: 36px; }
  .pf-hero-side { flex-basis: 100%; }
  .pf-hero-meta { grid-template-columns: repeat(2, 1fr); }
  .pf-toolbar-actions { width: 100%; }
  .pf-period { flex: 1; }
}

/* ============================================================
   首页工作台 · 商品分析（deep）顶部 KPI 卡片区统一升级
   语义类 pa-card-*，替代 .collab-stat + 内联样式的混用
   ============================================================ */

/* 智能检索 · 检索类型选择器（胶囊 segmented，可扩展更多检索页） */
.pa-search-mode-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pa-search-mode-label { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.pa-search-mode-btn {
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--card-bg); color: var(--text-muted);
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.pa-search-mode-btn:hover { color: var(--text); border-color: var(--primary); }
.pa-search-mode-btn.active {
  background: linear-gradient(135deg, rgba(0,212,170,.18), rgba(0,136,254,.15));
  color: var(--primary); border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,212,170,.15);
}

.pa-kpi-row { display: grid; gap: 12px; margin-bottom: 14px; }
.pa-kpi-row-3 { grid-template-columns: repeat(3, 1fr); }
.pa-kpi-row-4 { grid-template-columns: repeat(4, 1fr); }

.pa-card {
  --pa-accent: var(--primary);
  position: relative; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px 13px; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pa-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--pa-accent); opacity: .9;
}
.pa-card:hover {
  transform: translateY(-2px); border-color: var(--pa-accent);
  box-shadow: var(--shadow-md);
}
.pa-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pa-card-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .2px;
}
.pa-card-ico { font-size: 16px; line-height: 1; }
.pa-card-value {
  font-size: 27px; font-weight: 800; color: var(--text); line-height: 1.15;
  margin-top: 10px; letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.pa-card-unit { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.pa-card-foot {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--text-muted); margin-top: 8px;
}
.pa-card-foot .pa-mom { display: inline-flex; align-items: center; gap: 3px; }
.pa-card .pa-ai-btn { position: static; top: auto; right: auto; flex-shrink: 0; }

/* 语义色（通过 --pa-accent 内联注入，保留原有动态变色能力） */
.pa-card.accent-emerald { --pa-accent: var(--emerald); }
.pa-card.accent-amber   { --pa-accent: var(--amber); }
.pa-card.accent-rose    { --pa-accent: var(--rose); }
.pa-card.accent-indigo  { --pa-accent: var(--indigo); }
.pa-card.accent-cyan    { --pa-accent: var(--cyan); }
.pa-card.accent-warning { --pa-accent: #f59e0b; }

@media (max-width: 1080px) {
  .pa-kpi-row-3, .pa-kpi-row-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pa-kpi-row-3, .pa-kpi-row-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   首页工作台 · 商品分析（deep）下方分析区块统一体系
   pa-sec-*：趋势图 / 产品&品类对比 / ABC 分类 / 生命周期 / 健康分布
   统一容器、可折叠标题栏、徽标、图例，替代逐块内联样式
   ============================================================ */
.pa-sec {
  margin-top: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.pa-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 11px 16px;
  background: var(--bg);
  user-select: none;
}
.pa-sec.collapsible > .pa-sec-head { cursor: pointer; }
.pa-sec-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.pa-sec-title .pa-sec-ico { font-size: 15px; line-height: 1; }
.pa-sec-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 10px; color: var(--text-muted);
}
.pa-sec-body { padding: 12px 16px 14px; }

/* 折叠箭头：统一 ▶ / ▼ 切换 */
.pa-sec-arrow {
  font-size: 10px; color: var(--text-muted); margin-left: 4px;
  transition: transform .18s ease; flex-shrink: 0;
}

/* 图例小圆点（热销/正常/滞销、A/B/C 类、生命周期各阶段） */
.pa-dot {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted);
}
.pa-dot > i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, var(--text-muted)); flex-shrink: 0;
}
.pa-dot > b { color: var(--dot, var(--text)); font-weight: 700; }

/* 区块内可复用的统计小卡（ABC 三类 / 生命周期阶段） */
.pa-tile {
  --pa-tile-accent: var(--primary);
  background: color-mix(in srgb, var(--pa-tile-accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--pa-tile-accent) 30%, transparent);
  border-radius: 8px; padding: 9px 10px;
}
.pa-tile-title { font-size: 11px; font-weight: 700; color: var(--pa-tile-accent); }
.pa-tile-main { font-size: 10px; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pa-tile-main b { font-size: 13px; font-weight: 800; }
.pa-tile-sub { font-size: 9px; color: var(--text-muted); margin-top: 2px; }

/* 小倍数 / 热力图 / 排名 共用的行与表头底色 */
.pa-sec-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--bg); border-radius: 6px;
}
.pa-sec.theme-green  { --pa-sec-accent: #22c55e; }
.pa-sec.theme-indigo { --pa-sec-accent: #6366f1; }
.pa-sec.theme-amber  { --pa-sec-accent: #f59e0b; }

@media (max-width: 560px) {
  .pa-sec-head { padding: 10px 12px; }
  .pa-sec-body { padding: 10px 12px 12px; }
}

/* ============================================
   报价管理（quotations）UI 升级
   语义化深色卡片体系，消除内联样式堆叠
   ============================================ */

.qt-toolbar { display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.qt-head { min-width:0; }
.qt-title { font-size:18px; font-weight:700; line-height:1.25; }
.qt-title-sub { font-size:12px; color:var(--text-muted); margin-top:3px; }
.qt-spacer { flex:1; }
.qt-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* 统计卡 */
.qt-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.qt-stat { position:relative; overflow:hidden; background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:16px 18px; display:flex; align-items:center; gap:14px; transition:all .2s; }
.qt-stat::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--stat-accent,var(--primary)); }
.qt-stat:hover { border-color:var(--stat-accent,var(--primary)); transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.22); }
.qt-stat-icon { width:46px; height:46px; flex:0 0 46px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; background:var(--stat-soft,rgba(0,212,170,.12)); }
.qt-stat-body { min-width:0; }
.qt-stat-value { font-size:23px; font-weight:700; line-height:1.15; letter-spacing:-.3px; color:var(--stat-accent,var(--text)); white-space:nowrap; }
.qt-stat-label { font-size:11px; color:var(--text-muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 筛选 + 工具条 */
.qt-filterbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.qt-seg { display:inline-flex; background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:3px; gap:2px; }
.qt-seg-item { padding:6px 14px; border-radius:7px; font-size:12px; color:var(--text-muted); cursor:pointer; border:none; background:transparent; white-space:nowrap; transition:all .15s; }
.qt-seg-item:hover { color:var(--text); }
.qt-seg-item.active { background:var(--primary); color:#062a22; font-weight:700; }
.qt-seg-item .cnt { opacity:.65; font-size:11px; margin-left:4px; }
.qt-seg-item.active .cnt { opacity:.9; }

/* 表格 */
.qt-table-wrap { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.qt-table { width:100%; border-collapse:collapse; font-size:13px; }
.qt-table th { text-align:left; padding:12px 16px; font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; background:var(--bg); border-bottom:1px solid var(--border); white-space:nowrap; }
.qt-table td { padding:13px 16px; border-bottom:1px solid var(--border); vertical-align:middle; }
.qt-table tbody tr:last-child td { border-bottom:none; }
.qt-table tbody tr { transition:background .12s; }
.qt-table tbody tr:hover { background:var(--card-hover); }
.qt-table .qt-num { text-align:right; font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
.qt-table .qt-no { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:12px; color:var(--indigo-light); white-space:nowrap; }
.qt-table .qt-main { font-weight:600; }
.qt-table .qt-sub { font-size:11px; color:var(--text-muted); margin-top:2px; }
.qt-table .qt-muted { color:var(--text-muted); }
.qt-ops { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.qt-empty, .qt-loading { text-align:center; padding:48px 20px; color:var(--text-muted); }

/* 状态徽章 */
.qt-badge { display:inline-block; font-size:11px; padding:3px 10px; border-radius:999px; font-weight:600; white-space:nowrap; }
.qt-badge.draft     { color:#a3b0c2; background:rgba(139,149,167,.16); }
.qt-badge.approved  { color:var(--emerald); background:rgba(34,197,94,.15); }
.qt-badge.converted { color:#60a5fa; background:rgba(59,130,246,.16); }

/* 分页 */
.qt-pager { display:flex; align-items:center; gap:10px; padding:12px 16px; border-top:1px solid var(--border); font-size:12px; color:var(--text-muted); }

/* 抽屉表单 */
.qt-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.qt-form-grid .qt-full { grid-column:1/-1; }
.qt-field { display:flex; flex-direction:column; gap:6px; }
.qt-field-label { font-size:12px; color:var(--text-muted); font-weight:500; }
.qt-field-label .qt-req { color:var(--danger); }
.qt-field .form-control { width:100%; }

/* 金额实时预览 */
.qt-amount-box { display:flex; flex-direction:column; gap:7px; padding:13px 16px; background:var(--bg); border:1px solid var(--border); border-radius:10px; margin-top:14px; }
.qt-amount-row { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--text-muted); }
.qt-amount-row b { color:var(--text); font-variant-numeric:tabular-nums; font-weight:600; }
.qt-amount-row.qt-total { border-top:1px dashed var(--border); padding-top:9px; font-size:13px; color:var(--text); }
.qt-amount-row.qt-total b { font-size:18px; font-weight:700; color:var(--primary); }

/* 详情抽屉 */
.qt-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }
.qt-detail-item { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px dashed var(--border); }
.qt-detail-item .qt-k { color:var(--text-muted); font-size:12px; flex-shrink:0; }
.qt-detail-item .qt-v { font-weight:600; font-size:13px; text-align:right; word-break:break-all; }
.qt-detail-item.qt-full { grid-column:1/-1; }

@media (max-width: 900px) {
  .qt-stats { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 640px) {
  .qt-stats { grid-template-columns:1fr; }
  .qt-form-grid, .qt-detail-grid { grid-template-columns:1fr; }
}

/* ===== CRM 销售主线：合同 / 回款 / 联系人 ===== */
.csc-wrap { display:flex; flex-direction:column; gap:14px; }
.csc-toolbar { display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.csc-head { display:flex; flex-direction:column; gap:4px; }
.csc-title { font-size:18px; font-weight:700; color:var(--text); }
.csc-sub { font-size:12px; color:var(--text-muted); }
.csc-spacer { flex:1; }
.csc-actions { display:flex; gap:8px; align-items:center; }
.csc-tabs { display:flex; gap:6px; border-bottom:1px solid var(--border); padding-bottom:0; }
.csc-tab { padding:9px 18px; font-size:13px; font-weight:600; color:var(--text-muted); background:transparent; border:none; border-bottom:2px solid transparent; cursor:pointer; transition:all .2s; }
.csc-tab:hover { color:var(--text); }
.csc-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.csc-body { display:flex; flex-direction:column; gap:12px; }
.csc-filterbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.csc-seg { padding:6px 14px; font-size:12px; font-weight:600; color:var(--text-muted); background:var(--bg-tertiary); border:1px solid var(--border); border-radius:999px; cursor:pointer; transition:all .2s; white-space:nowrap; }
.csc-seg:hover { color:var(--text); }
.csc-seg.active { color:#081018; background:var(--primary); border-color:var(--primary); }
.csc-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.csc-stat { display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--card-bg); border:1px solid var(--border); border-radius:12px; border-left:4px solid var(--a,#6366f1); }
.csc-stat-icon { font-size:22px; }
.csc-stat-value { font-size:18px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.csc-stat-label { font-size:12px; color:var(--text-muted); }
.csc-table-wrap { background:var(--card-bg); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.csc-table { width:100%; border-collapse:collapse; font-size:13px; }
.csc-table th { text-align:left; padding:11px 14px; font-size:11px; font-weight:600; color:var(--text-muted); background:var(--bg-tertiary); border-bottom:1px solid var(--border); white-space:nowrap; }
.csc-table td { padding:11px 14px; border-bottom:1px solid var(--border); color:var(--text); }
.csc-table tr:last-child td { border-bottom:none; }
.csc-table .csc-num { text-align:right; font-variant-numeric:tabular-nums; }
.csc-table .csc-muted { color:var(--text-muted); font-size:12px; }
.csc-loading, .csc-empty { text-align:center; color:var(--text-muted); padding:28px !important; }
.csc-empty-msg { text-align:center; color:var(--text-muted); padding:36px; background:var(--card-bg); border:1px solid var(--border); border-radius:12px; }
.csc-no { font-family:monospace; font-size:12px; color:var(--primary); }
.csc-badge { display:inline-block; font-size:11px; padding:3px 10px; border-radius:999px; font-weight:600; white-space:nowrap; }
.csc-badge.draft { color:#a3b0c2; background:rgba(139,149,167,.16); }
.csc-badge.pending { color:#f59e0b; background:rgba(245,158,11,.15); }
.csc-badge.approved { color:var(--emerald); background:rgba(34,197,94,.15); }
.csc-badge.signed { color:#22d3ee; background:rgba(34,211,238,.15); }
.csc-badge.archived { color:#a3b0c2; background:rgba(139,149,167,.14); }
.csc-badge.voided { color:#f87171; background:rgba(248,113,113,.14); }
.csc-badge.partial { color:#60a5fa; background:rgba(59,130,246,.16); }
.csc-badge.paid { color:var(--emerald); background:rgba(34,197,94,.15); }
.csc-badge.overdue { color:#f87171; background:rgba(248,113,113,.15); }
.csc-ops { display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }
.csc-role { display:inline-block; font-size:11px; padding:3px 10px; border-radius:6px; font-weight:600; color:#c4b5fd; background:rgba(139,92,246,.15); }
.csc-pager { display:flex; align-items:center; gap:10px; padding:12px 16px; border-top:1px solid var(--border); font-size:12px; color:var(--text-muted); }
.csc-form { display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.csc-form .csc-full { grid-column:1/-1; }
.csc-field { display:flex; flex-direction:column; gap:6px; }
.csc-label { font-size:12px; color:var(--text-muted); font-weight:500; }
.csc-label .csc-req { color:var(--danger); }
.csc-field .form-control { width:100%; }
.csc-detail { display:flex; flex-direction:column; }
.csc-detail-row { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px dashed var(--border); }
.csc-detail-row .csc-k { color:var(--text-muted); font-size:12px; flex-shrink:0; }
.csc-detail-row .csc-v { font-weight:600; font-size:13px; text-align:right; word-break:break-all; }
@media (max-width: 640px) {
  .csc-stats { grid-template-columns:1fr; }
  .csc-form { grid-template-columns:1fr; }
}

/* ===== 商城运维中心 Tab 胶囊化 ===== */
#page-mall-ops .mops-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 999px;
  transition: all .2s ease;
  white-space: nowrap;
}
#page-mall-ops .mops-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: rgba(0,212,170,.35);
}
#page-mall-ops .mops-tab.active {
  color: #081018;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,212,170,.25);
}

/* ============================================================
   商城运维中心（mall-ops）区块 UI 统一升级
   · 语义类 mo-* 前缀，主体作用域限定 #page-mall-ops
   · 目标：把散落的内联表格/徽章/按钮收敛为统一视觉
   ============================================================ */

#page-mall-ops .mo-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
#page-mall-ops .mo-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
#page-mall-ops .mo-section-ico {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: rgba(0, 212, 170, .12);
  border: 1px solid rgba(0, 212, 170, .24);
}
#page-mall-ops .mo-section-ttl {
  font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3;
}
#page-mall-ops .mo-section-tag {
  margin-left: auto;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  font-family: 'SF Mono', Consolas, monospace;
}
#page-mall-ops .mo-section-body { padding: 16px; }

/* 说明条（区块内顶部说明文案） */
#page-mall-ops .mo-note {
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
#page-mall-ops .mo-note b { color: var(--text); font-weight: 600; }

/* 圆角表格 */
#page-mall-ops .mo-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
#page-mall-ops .mo-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
#page-mall-ops .mo-table thead th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
#page-mall-ops .mo-table thead th.num { text-align: right; }
#page-mall-ops .mo-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
#page-mall-ops .mo-table tbody tr { transition: background .15s ease; }
#page-mall-ops .mo-table tbody tr:hover { background: rgba(255,255,255,.03); }
#page-mall-ops .mo-table tbody tr:last-child td { border-bottom: none; }
#page-mall-ops .mo-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
#page-mall-ops .mo-table td.mono { font-family: 'SF Mono', Consolas, monospace; font-size: 12px; color: var(--text-muted); }
#page-mall-ops .mo-table td.muted { color: var(--text-muted); }
#page-mall-ops .mo-table td.nowrap { white-space: nowrap; }

/* 语义徽章 */
#page-mall-ops .mo-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
#page-mall-ops .mo-badge.ok     { color: var(--emerald); background: rgba(34,197,94,.14); }
#page-mall-ops .mo-badge.warn   { color: var(--amber);   background: rgba(245,158,11,.14); }
#page-mall-ops .mo-badge.danger { color: var(--rose);    background: rgba(244,63,94,.14); }
#page-mall-ops .mo-badge.muted  { color: var(--text-muted); background: rgba(136,153,170,.14); }
#page-mall-ops .mo-badge.info   { color: var(--cyan);    background: rgba(6,182,212,.14); }

/* 统计卡 */
#page-mall-ops .mo-stat {
  flex: 1; min-width: 150px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
#page-mall-ops .mo-stat:hover { border-color: rgba(0,212,170,.3); box-shadow: var(--shadow-sm); }
#page-mall-ops .mo-stat-lbl { font-size: 12px; color: var(--text-muted); }
#page-mall-ops .mo-stat-val { font-size: 21px; font-weight: 700; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
#page-mall-ops .mo-stat-sub { font-size: 11px; color: var(--text-muted); }

/* 工具栏 / 区块小标题 / 输入控件 */
#page-mall-ops .mo-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
#page-mall-ops .mo-toolbar .spacer { flex: 1; }
#page-mall-ops .mo-subhead {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 14px 0 8px;
}
#page-mall-ops .mo-subhead::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--primary);
}
#page-mall-ops .mo-input,
#page-mall-ops .mo-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  transition: border-color .15s ease;
}
#page-mall-ops .mo-input:focus,
#page-mall-ops .mo-select:focus { outline: none; border-color: var(--primary); }
#page-mall-ops textarea.mo-input { width: 100%; box-sizing: border-box; line-height: 1.6; resize: vertical; }

/* ============================================================
   AI 内容审核（ai-review）页面 UI 升级
   · 语义类统一 ar-* 前缀，主体作用域限定 #page-ai-review
   · 视觉结构：Hero 页头 → KPI 统计带 → 胶囊 Tab → 审核卡片流
   ============================================================ */

#page-ai-review .ar-shell { display: flex; flex-direction: column; gap: 14px; }

/* ── Hero 页头 ── */
.ar-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--card-bg) 65%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.ar-hero::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--indigo), var(--cyan));
}
.ar-hero-ico {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
  background: rgba(99,102,241,.16);
  border: 1px solid rgba(99,102,241,.32);
}
.ar-hero-main { flex: 1; min-width: 0; }
.ar-hero-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: .2px;
}
.ar-hero-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }
.ar-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── KPI 统计带 ── */
.ar-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ar-kpi {
  --ar-k: var(--indigo);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ar-kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ar-k);
  opacity: .9;
}
.ar-kpi:hover { transform: translateY(-2px); border-color: var(--ar-k); box-shadow: var(--shadow-md); }
.ar-kpi.active { border-color: var(--ar-k); box-shadow: 0 0 0 1px var(--ar-k), var(--shadow-sm); }
.ar-kpi-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.ar-kpi-body { min-width: 0; }
.ar-kpi-value {
  font-size: 23px; font-weight: 800; line-height: 1.05;
  color: var(--ar-k);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.ar-kpi-label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.ar-kpi.k-pending { --ar-k: var(--amber); }
.ar-kpi.k-approved { --ar-k: var(--emerald); }
.ar-kpi.k-rejected { --ar-k: var(--rose); }
.ar-kpi.k-all { --ar-k: var(--indigo); }
.ar-kpi.k-pending .ar-kpi-ico { background: rgba(245,158,11,.14); }
.ar-kpi.k-approved .ar-kpi-ico { background: rgba(34,197,94,.14); }
.ar-kpi.k-rejected .ar-kpi-ico { background: rgba(244,63,94,.14); }
.ar-kpi.k-all .ar-kpi-ico { background: rgba(99,102,241,.16); }

/* ── 工具条 + 胶囊 Tab ── */
.ar-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ar-seg {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ar-seg-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.ar-seg-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.ar-seg-item.active { color: #062a22; background: var(--primary); box-shadow: 0 2px 8px rgba(0,212,170,.25); }
.ar-seg-cnt {
  font-size: 10.5px; font-weight: 700;
  padding: 0 6px; min-width: 18px; line-height: 16px; text-align: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-variant-numeric: tabular-nums;
}
.ar-seg-item.active .ar-seg-cnt { background: rgba(0,0,0,.18); color: #062a22; }
.ar-toolbar .ar-spacer { flex: 1; }

/* ── 提示条 ── */
.ar-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px;
  font-size: 12px; line-height: 1.65;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo);
  border-radius: 10px;
}
.ar-note .ar-note-ico { font-size: 15px; line-height: 1.3; flex-shrink: 0; }
.ar-note b { color: var(--text); font-weight: 600; }
.ar-note.is-history { border-left-color: var(--cyan); }
.ar-note.is-risk { border-left-color: var(--rose); }

/* ── 审核卡片流 ── */
.ar-list { display: flex; flex-direction: column; gap: 12px; }
.ar-card {
  --ar-s: var(--amber);
  position: relative;
  overflow: hidden;
  padding: 16px 18px 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ar-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--ar-s);
  opacity: .9;
}
.ar-card:hover { transform: translateY(-1px); border-color: var(--ar-s); box-shadow: var(--shadow-md); }
.ar-card.is-pending { --ar-s: var(--amber); }
.ar-card.is-approved { --ar-s: var(--emerald); }
.ar-card.is-rejected { --ar-s: var(--rose); }

.ar-card-top { display: flex; align-items: flex-start; gap: 12px; }
.ar-card-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}
.ar-card-main { flex: 1; min-width: 0; }
.ar-card-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ar-card-title {
  margin: 8px 0 0;
  font-size: 14.5px; font-weight: 600; line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  transition: color .15s ease;
}
.ar-card-title:hover { color: var(--primary); }
.ar-card-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted);
}
.ar-meta-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}
.ar-card-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* 徽标 */
.ar-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 11px; font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.ar-badge.type { color: var(--indigo-light); background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.3); }
.ar-badge.plan { color: var(--amber); background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.3); }
.ar-badge.risk { color: var(--rose); background: rgba(244,63,94,.13); border-color: rgba(244,63,94,.32); }
.ar-badge.ok { color: var(--emerald); background: rgba(34,197,94,.13); border-color: rgba(34,197,94,.3); }
.ar-badge.st-pending { color: var(--amber); background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.3); }
.ar-badge.st-approved { color: var(--emerald); background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3); }
.ar-badge.st-rejected { color: var(--rose); background: rgba(244,63,94,.14); border-color: rgba(244,63,94,.3); }
.ar-badge.muted { color: var(--text-muted); background: var(--bg-tertiary); border-color: var(--border); }
/* 真审批链（M3）：上链条目的「审批中 · 第 N/M 级」徽标，与普通状态徽标区分。 */
.ar-badge.chain { color: var(--cyan-light); background: rgba(6,182,212,.14); border-color: rgba(6,182,212,.32); }
/* 真审批链（M4）：管理员灰度开关面板 —— 折叠态轻量，展开态是一组表单。 */
.ar-chain-config { margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary, #fff); }
.ar-chain-config > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--text-secondary); user-select: none; }
.ar-chain-config[open] > summary { border-bottom: 1px solid var(--border); }
.ar-cc-body { padding: 14px; }
.ar-cc-status { font-size: 12px; margin-top: 4px; }

/* 内容 / 资产预览 */
.ar-preview {
  margin-top: 12px;
  padding: 11px 13px;
  font-size: 12.5px; line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 100px;
  overflow: auto;
}
.ar-asset { margin-top: 12px; }
.ar-asset-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
  font-size: 11px; color: var(--text-muted);
}
.ar-asset-media { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }

/* 审核链时间线 */
.ar-chain {
  margin-top: 12px;
  padding: 11px 13px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ar-chain-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 9px;
  font-size: 11px; color: var(--text-muted);
}
.ar-tl { display: flex; flex-direction: column; }
.ar-tl-item { position: relative; display: flex; gap: 10px; padding-bottom: 12px; }
.ar-tl-item:last-child { padding-bottom: 0; }
.ar-tl-item::before {
  content: '';
  position: absolute;
  left: 4px; top: 14px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.ar-tl-item:last-child::before { display: none; }
.ar-tl-dot {
  width: 10px; height: 10px; flex: 0 0 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--tl, var(--slate-700));
}
.ar-tl-body { flex: 1; min-width: 0; }
.ar-tl-title { font-size: 12px; font-weight: 600; color: var(--tl, var(--text)); }
.ar-tl-meta { margin-top: 2px; font-size: 11px; color: var(--text-muted); }
.ar-tl-comment { margin-top: 3px; font-size: 11.5px; color: var(--text); word-break: break-word; }

/* 卡片底部操作 */
.ar-card-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 13px;
  border-top: 1px dashed var(--border);
}
.ar-card-foot .ar-spacer { flex: 1; }
.ar-foot-note { font-size: 11.5px; color: var(--text-muted); }

/* ── 空态 / 分页 ── */
.ar-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  padding: 56px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.ar-empty-ico { font-size: 34px; line-height: 1; opacity: .55; }
.ar-empty-title { font-size: 14px; font-weight: 600; color: var(--text); }
.ar-empty-sub { font-size: 12px; }
.ar-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 14px;
  font-size: 12px; color: var(--text-muted);
}

/* ── 提交表单 ── */
.ar-form {
  max-width: 720px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.ar-form-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.ar-form-sub { margin: 4px 0 16px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.ar-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ar-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ar-field.ar-full { grid-column: 1 / -1; }
.ar-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.ar-label .req { color: var(--danger); }
.ar-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ar-check input { margin-top: 3px; flex-shrink: 0; }
.ar-check-text { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.ar-check-text b { color: var(--text); }

/* ── 详情弹层内容 ── */
.ar-detail { display: flex; flex-direction: column; gap: 14px; }
.ar-detail-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--text-muted); }
.ar-detail-meta .ar-dm { display: inline-flex; align-items: center; gap: 5px; }
.ar-detail-meta .ar-dm b { color: var(--text); font-weight: 600; }
.ar-detail-block { padding: 12px 14px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; }
.ar-detail-block-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.ar-detail-text { font-size: 12.5px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.ar-detail-media { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }

@media (max-width: 900px) {
  #page-ai-review .ar-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #page-ai-review .ar-kpis { grid-template-columns: 1fr; }
  .ar-form-grid { grid-template-columns: 1fr; }
  .ar-card-side { flex-direction: row; align-items: center; }
}

/* ══════════ E2B-5：商城运维·营销增长 分组导航与分组卡片 ══════════ */
.mops-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.mops-chip { padding: 6px 14px; border-radius: 999px; font-size: 12px; cursor: pointer; user-select: none; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-muted); transition: background .15s, color .15s; }
.mops-chip:hover { color: var(--text); }
.mops-chip.active { background: var(--primary); border-color: transparent; color: #fff; font-weight: 600; }
.mops-group { margin-bottom: 22px; }
.mops-group-head { font-weight: 700; font-size: 14px; color: var(--text); padding: 8px 12px; border-left: 4px solid var(--primary); background: var(--bg-tertiary); border-radius: 6px; margin-bottom: 10px; scroll-margin-top: 48px; }
.mops-group-body { display: flex; flex-direction: column; gap: 10px; }




/* [7.7.157] 预览弹窗（大图预览，用户裁定恢复）+ 楼层行拖拽态 */
.builder-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100000; display: flex; align-items: center; justify-content: center; }
.builder-preview-container { width: 380px; max-width: 92vw; background: var(--bg-card, #14171c); border: 1px solid var(--border, #232830); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.builder-preview-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--text, #e8eaed); border-bottom: 1px solid var(--border, #232830); }
.builder-preview-close { cursor: pointer; color: var(--text-muted, #8b939e); font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.builder-preview-close:hover { background: rgba(255,255,255,.08); color: var(--text, #e8eaed); }
.builder-preview-phone { max-height: 62vh; overflow-y: auto; padding: 14px; }
.builder-preview-statusbar { padding: 8px 14px; font-size: 11px; color: var(--text-muted, #8b939e); border-top: 1px solid var(--border, #232830); }
.bpp-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); margin-bottom: 8px; font-size: 12px; color: var(--text, #e8eaed); }
.bpp-idx { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #00d4aa; background: rgba(0,212,170,.12); border-radius: 6px; }
.builder-sect-row.dragging { opacity: .45; }

/* [7.7.161] 弹窗内手机框：定高 + 内容滑块（与预览区同源，仅限高） */
.builder-preview-container { width: 420px; max-width: 94vw; }
.builder-preview-container .builder-phone-frame { height: 72vh; max-height: 72vh; min-height: 0; }
.builder-preview-container .builder-phone-sections { flex: 1; overflow-y: auto; }

/* ═══════════════════════════════════════════════════════════
   广告投放 UI 全面升级（[7.7.229]）
   深色设计 tokens：--bg #0f1923 / --card-bg #1a2332 / --primary #00d4aa
   ═══════════════════════════════════════════════════════════ */
.mall-ad-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.mall-ad-title { font-size: 20px; font-weight: 700; color: var(--text, #e0e6ed); letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.mall-ad-title .ico { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, rgba(0,212,170,.25), rgba(55,66,250,.18)); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(0,212,170,.28); }
.mall-ad-sub { font-size: 12.5px; color: var(--text-muted, #7a8a9a); margin-top: 7px; line-height: 1.6; }
.mall-ad-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* KPI 指标卡 */
.mall-ad-kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 20px; }
.mall-ad-kpi { background: var(--card-bg, #1a2332); border: 1px solid var(--border, #2a3a4a); border-radius: 12px; padding: 14px 14px 12px; position: relative; overflow: hidden; transition: border-color .18s, transform .18s, box-shadow .18s; }
.mall-ad-kpi:hover { border-color: rgba(0,212,170,.45); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.mall-ad-kpi .k-label { font-size: 12px; color: var(--text-muted, #7a8a9a); display: flex; align-items: center; gap: 6px; }
.mall-ad-kpi .k-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mall-ad-kpi .k-num { font-size: 22px; font-weight: 700; color: var(--text, #e0e6ed); margin-top: 7px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mall-ad-kpi .k-num small { font-size: 12px; font-weight: 500; color: var(--text-muted, #7a8a9a); margin-left: 3px; }
.mall-ad-kpi .k-tip { font-size: 11px; color: var(--text-muted, #7a8a9a); margin-top: 4px; }
.mall-ad-kpi .k-badge { position: absolute; top: 12px; right: 12px; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(0,212,170,.14); color: #00d4aa; font-weight: 600; }

/* Tab 导航 */
.mall-ad-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--border, #2a3a4a); padding-bottom: 0; }
.mall-ad-tab { padding: 9px 18px; font-size: 13.5px; color: var(--text-muted, #7a8a9a); cursor: pointer; border-radius: 9px 9px 0 0; border: 1px solid transparent; border-bottom: none; background: transparent; transition: color .16s, background .16s; font-weight: 500; }
.mall-ad-tab:hover { color: var(--text, #e0e6ed); background: rgba(255,255,255,.03); }
.mall-ad-tab.active { color: #00d4aa; background: rgba(0,212,170,.07); border-color: var(--border, #2a3a4a); border-bottom: 2px solid #00d4aa; font-weight: 600; }
.mall-ad-tab .cnt { font-size: 11px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 7px; margin-left: 5px; color: var(--text-muted, #7a8a9a); }

/* 面板 */
.mall-ad-panel { display: none; }
.mall-ad-panel.active { display: block; animation: mallAdFadeIn .22s ease; }
@keyframes mallAdFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 卡片容器 */
.mall-ad-card { background: var(--card-bg, #1a2332); border: 1px solid var(--border, #2a3a4a); border-radius: 12px; overflow: hidden; }
.mall-ad-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border, #2a3a4a); flex-wrap: wrap; }
.mall-ad-card-head .t { font-size: 14px; font-weight: 600; color: var(--text, #e0e6ed); display: flex; align-items: center; gap: 8px; }
.mall-ad-card-head .t .sub { font-size: 11.5px; color: var(--text-muted, #7a8a9a); font-weight: 400; }

/* 表格统一样式（同时补全日报 mallAdLoadReport 使用的 .mall-table） */
.mall-ad-wrap { padding: 0 4px 4px; }
.mall-ad-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mall-ad-table th { text-align: left; padding: 10px 14px; color: var(--text-muted, #7a8a9a); font-size: 12px; font-weight: 600; background: rgba(255,255,255,.025); border-bottom: 1px solid var(--border, #2a3a4a); white-space: nowrap; }
.mall-ad-table td { padding: 11px 14px; border-bottom: 1px solid rgba(42,58,74,.55); color: var(--text, #e0e6ed); vertical-align: middle; }
.mall-ad-table tbody tr:last-child td { border-bottom: none; }
.mall-ad-table tbody tr:hover { background: rgba(0,212,170,.045); }
.mall-ad-table .muted { color: var(--text-muted, #7a8a9a); }
.mall-ad-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.mall-ad-table .num { font-variant-numeric: tabular-nums; }

/* 兼容日报 mallAdLoadReport 的输出类 */
.mall-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card-bg, #1a2332); border: 1px solid var(--border, #2a3a4a); border-radius: 12px; overflow: hidden; }
.mall-table th { text-align: left; padding: 10px 14px; color: var(--text-muted, #7a8a9a); font-size: 12px; font-weight: 600; background: rgba(255,255,255,.025); border-bottom: 1px solid var(--border, #2a3a4a); }
.mall-table td { padding: 11px 14px; border-bottom: 1px solid rgba(42,58,74,.55); color: var(--text, #e0e6ed); }
.mall-table tbody tr:last-child td { border-bottom: none; }
.mall-table tbody tr:hover { background: rgba(0,212,170,.045); }
.mall-ad-report-total { margin: 6px 0 14px; font-size: 13px; color: var(--text, #e0e6ed); background: rgba(0,212,170,.08); border: 1px solid rgba(0,212,170,.22); border-radius: 10px; padding: 11px 14px; line-height: 1.7; }
.mall-ad-report-total b { color: #00d4aa; }
.mall-ad-report-note { margin-top: 10px; font-size: 12px; color: var(--text-muted, #7a8a9a); line-height: 1.7; }

/* ===== 精细化 P0（2026-10-10）广告日报：趋势区 / 时段分布 / 广告位条形 ===== */
.mall-ad-zone { margin-top: 14px; background: var(--card-bg, #1a2332); border: 1px solid var(--border, #2a3a4a); border-radius: 12px; padding: 12px 14px; }
.mall-ad-zone .zone-t { font-size: 12.5px; font-weight: 600; color: var(--text, #e0e6ed); margin-bottom: 10px; }
/* 按日趋势（竖向柱状） */
.mall-ad-trend-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
.trend-date { flex: 0 0 58px; font-size: 11px; color: var(--text-muted, #7a8a9a); text-align: right; padding-bottom: 2px; white-space: nowrap; }
.trend-track { position: relative; flex: 1; height: 54px; display: flex; align-items: flex-end; gap: 3px; }
.trend-fill { display: block; min-width: 12px; border-radius: 3px 3px 0 0; }
.trend-fill.imp { background: linear-gradient(180deg, #4a7dff, #3b5bdb); opacity: .92; }
.trend-fill.clk { background: linear-gradient(180deg, #00d4aa, #00b894); }
.trend-num { flex: 0 0 86px; font-size: 11px; color: var(--text-muted, #7a8a9a); text-align: left; white-space: nowrap; }
.trend-legend { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-muted, #7a8a9a); }
.trend-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.trend-legend .lg.imp { background: linear-gradient(180deg, #4a7dff, #3b5bdb); }
.trend-legend .lg.clk { background: linear-gradient(180deg, #00d4aa, #00b894); }
/* 广告位条形 */
.mall-ad-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bar-label { flex: 0 0 110px; font-size: 11.5px; color: var(--text, #e0e6ed); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: rgba(255,255,255,.05); border-radius: 6px; height: 16px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #4a7dff, #00d4aa); border-radius: 6px; }
.bar-num { flex: 0 0 96px; font-size: 11px; color: var(--text-muted, #7a8a9a); white-space: nowrap; }
/* 人群画像占比条（表格内） */
.mall-ad-bar { display: inline-block; vertical-align: middle; width: 90px; height: 10px; background: rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; }
.mall-ad-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #4a7dff, #00d4aa); border-radius: 6px; }
/* 24h 时段分布（小时热力网格） */
.hour-grid { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 110px; }
.hour-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; cursor: default; }
.hour-bar { width: 100%; min-width: 6px; background: linear-gradient(180deg, #4a7dff, #3b5bdb); border-radius: 3px 3px 0 0; }
.hour-lb { font-size: 9.5px; color: var(--text-muted, #7a8a9a); text-align: center; white-space: nowrap; }

/* 状态徽章 */
.mall-ad-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2.5px 9px; border-radius: 999px; white-space: nowrap; }
.mall-ad-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mall-ad-badge.green { color: #2ecc8f; background: rgba(46,204,143,.12); }
.mall-ad-badge.orange { color: #f0a14b; background: rgba(240,161,75,.12); }
.mall-ad-badge.red { color: #ff6b6b; background: rgba(255,107,107,.12); }
.mall-ad-badge.gray { color: #8b9aab; background: rgba(139,154,171,.12); }
.mall-ad-badge.blue { color: #6fb6ff; background: rgba(111,182,255,.12); }
.mall-ad-badge.purple { color: #b39dff; background: rgba(179,157,255,.12); }

/* 操作按钮 */
.mall-ad-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1.4; }
.mall-ad-btn.primary { color: #06120e; background: linear-gradient(135deg, #00d4aa, #00b894); box-shadow: 0 2px 8px rgba(0,212,170,.25); }
.mall-ad-btn.primary:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(0,212,170,.35); }
.mall-ad-btn.ghost { color: var(--text, #e0e6ed); background: rgba(255,255,255,.04); border-color: var(--border, #2a3a4a); }
.mall-ad-btn.ghost:hover { border-color: rgba(0,212,170,.5); color: #00d4aa; }
.mall-ad-btn.blue { color: #fff; background: linear-gradient(135deg, #4a7dff, #3b5bdb); box-shadow: 0 2px 8px rgba(74,125,255,.25); }
.mall-ad-btn.danger { color: #ff6b6b; background: transparent; border-color: rgba(255,107,107,.45); }
.mall-ad-btn.danger:hover { background: rgba(255,107,107,.1); border-color: #ff6b6b; }
.mall-ad-btn.sm { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.mall-ad-btn.mini { padding: 2px 8px; font-size: 11px; border-radius: 6px; }
.mall-ad-btn[disabled], .mall-ad-btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.mall-ad-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* 空态 */
.mall-ad-empty { text-align: center; padding: 34px 16px 28px; color: var(--text-muted, #7a8a9a); }
.mall-ad-empty .e-ico { font-size: 30px; opacity: .5; margin-bottom: 8px; display: block; }
.mall-ad-empty .e-txt { font-size: 13px; margin-bottom: 12px; }

/* 表单（弹层内） */
.mall-ad-form { display: flex; flex-direction: column; gap: 12px; }
.mall-ad-form .f-row { display: flex; flex-direction: column; gap: 5px; }
.mall-ad-form .f-label { font-size: 12.5px; color: var(--text-muted, #7a8a9a); font-weight: 600; }
.mall-ad-form .f-label .req { color: #ff6b6b; margin-left: 2px; }
.mall-ad-form .f-hint { font-size: 11.5px; color: var(--text-muted, #7a8a9a); line-height: 1.5; }
.mall-ad-form .f-input, .mall-ad-form input[type="text"], .mall-ad-form input[type="number"], .mall-ad-form select, .mall-ad-form textarea {
  background: var(--bg, #0f1923); border: 1px solid var(--border, #2a3a4a); color: var(--text, #e0e6ed);
  border-radius: 8px; padding: 8px 11px; font-size: 13px; outline: none; transition: border-color .15s; width: 100%; box-sizing: border-box;
}
.mall-ad-form .f-input:focus, .mall-ad-form input:focus, .mall-ad-form select:focus, .mall-ad-form textarea:focus { border-color: rgba(0,212,170,.55); box-shadow: 0 0 0 3px rgba(0,212,170,.08); }
.mall-ad-form .f-sec { font-size: 12px; color: #00d4aa; font-weight: 700; letter-spacing: .4px; margin: 6px 0 0; padding-bottom: 5px; border-bottom: 1px dashed rgba(42,58,74,.8); }
.mall-ad-form .f-chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text, #e0e6ed); }
.mall-ad-form .f-chk input { accent-color: #00d4aa; }
.mall-ad-form .f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mall-ad-form .f-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.mall-ad-form .f-collapse { border: 1px dashed var(--border, #2a3a4a); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,.02); }
.mall-ad-form .f-collapse summary { font-size: 12px; color: var(--text-muted, #7a8a9a); cursor: pointer; font-weight: 600; user-select: none; }
.mall-ad-form .f-collapse[open] summary { margin-bottom: 10px; color: #00d4aa; }

/* 简化投放（2026-10-13）：主列表单元格 / 缩略图 / 预算进度 / 折叠高级区 */
.mall-ad-adcell { display: flex; flex-direction: column; gap: 2px; max-width: 240px; }
.mall-ad-adcell b { font-size: 12px; color: #6fb6ff; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mall-ad-adcell span { font-size: 12.5px; color: var(--text, #e0e6ed); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mall-ad-cells { font-size: 11px; color: var(--text-muted, #7a8a9a); margin-top: 3px; }
.mall-ad-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border, #2a3a4a); background: var(--bg, #0f1923); display: block; }
.mall-ad-thumb.ph { display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: .45; }
.mall-ad-budget { min-width: 132px; }
.mall-ad-budget .bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.mall-ad-budget .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #00d4aa, #2ecc8f); transition: width .3s; }
.mall-ad-budget .bar i.warn { background: linear-gradient(90deg, #f0a14b, #ffd166); }
.mall-ad-budget .bar i.full { background: linear-gradient(90deg, #ff6b6b, #ff8f8f); }
.mall-ad-budget .txt { font-size: 11px; color: var(--text-muted, #7a8a9a); margin-top: 4px; }

/* 高级区（折叠；技术配置默认收起，不干扰主流程） */
.mall-ad-adv { margin-top: 16px; border: 1px dashed var(--border, #2a3a4a); border-radius: 10px; background: rgba(255,255,255,.015); }
.mall-ad-adv > summary { cursor: pointer; user-select: none; padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-muted, #7a8a9a); }
.mall-ad-adv > summary:hover { color: var(--text, #e0e6ed); }
.mall-ad-adv[open] > summary { color: #00d4aa; border-bottom: 1px dashed var(--border, #2a3a4a); }
.mall-ad-adv-sec { padding: 12px 14px 2px; }
.mall-ad-adv-sec + .mall-ad-adv-sec { border-top: 1px dashed rgba(42,58,74,.55); }

/* ==================== 导航单模式：一级=分组入口 / 二级=hover 级联面板（2026-11-06） ====================
   交互（业主拍板）：鼠标移到一级分组 → 该行右侧紧贴侧栏（0 间隙）浮出二级面板；鼠标离开
   侧栏+面板后延迟收起；点击一级项 = 钉住（触摸设备无 hover 的兜底 + 键盘可达）。
   定位：left 由 JS 按 .sidebar.getBoundingClientRect().right 计算；top 对齐触发的一级行，
   下方空间不足时自动上移；高度随内容自适应（上限 = 视口高 - top - 12）。

   改造红线（勿删）：不改任何 .nav-item 的 class / data-page / data-role —— 门禁
   feature_guard（nav_pages 提取、smart-crm 文案、kpi-entry 不可隐藏…）与 5 套模块可见性函数
   （applySidebarPermissions / applyModuleNavFilter / applyPageModuleGating / applyGrayStatus /
   applyModuleMenuPermissions）都依赖这套选择器与 inline display 语义。
   面板只做 clone 渲染，**原 DOM 一个节点都不搬动**（搬走会让「组内可见项数=0」把整组隐藏）。 */

/* ① 二级入口不再内联展开（单模式：只在面板里出现） */
.sidebar .nav-group-items { display:none; }

/* ② 一级分组标题 = 入口行（右侧箭头 ›）；业主定稿：整行文字用品牌绿（不是只绿箭头），
      hover / 当前页 / 面板联动三态在绿的基础上加背景与左条区分 */
.sidebar .nav-group-header { padding:9px 12px 9px 16px; margin:1px 8px; border-radius:8px;
  font-size:13px; font-weight:600; color:var(--primary); text-transform:none; letter-spacing:0;
  border-left:3px solid transparent; transition:background .15s, color .15s, border-color .15s; }
.sidebar .nav-group-header:hover { background:rgba(0,212,170,.10); color:#5ff5cc; }
.sidebar .nav-group-header.nav-hover,
.sidebar .nav-group-header.nav-cur { background:rgba(0,212,170,.14); border-left-color:var(--primary); color:#6bffd6; }
.sidebar .nav-group-header .arrow { font-size:0; line-height:1; }
.sidebar .nav-group-header .arrow::after { content:'\203A'; font-size:16px; color:rgba(0,212,170,.62); }
.sidebar .nav-group-header:hover .arrow::after,
.sidebar .nav-group-header.nav-hover .arrow::after,
.sidebar .nav-group-header.nav-cur .arrow::after { color:#6bffd6; }
.sidebar .nav-group-header.collapsed .arrow { transform:none; }

/* ③ 级联面板：紧贴侧栏右缘（left/top 由 JS 写入），不再是贴视口右侧的模态抽屉。
      左侧无边框、左侧圆角为 0 —— 视觉上像从侧栏"长出来"的一列，而不是另开的浮层。
      出现动画刻意做得轻（.12s + 6px 位移）：hover 触发要跟手，不能像模态那样慢悠悠。 */
.nav-drawer { position:fixed; left:220px; top:120px; width:300px; max-width:calc(100vw - 240px);
  z-index:9001; display:flex; flex-direction:column; background:var(--card-bg,#101c26);
  /* 业主：面板边沿要一条绿色细线，与同色系背景区分开（纯 var(--border) 灰线在深底上看不出来） */
  border:1px solid rgba(0,212,170,.46); border-radius:0 10px 10px 0;
  box-shadow:14px 8px 34px rgba(0,0,0,.42), inset 0 0 0 1px rgba(0,212,170,.06);
  opacity:0; transform:translateX(-6px); pointer-events:none;
  transition:opacity .12s ease, transform .12s ease; }
.nav-drawer.show { opacity:1; transform:none; pointer-events:auto; }
.nav-drawer-hd { display:flex; align-items:center; gap:8px; padding:11px 12px 9px; border-bottom:1px solid var(--border); }
/* 面板标题与一级导航同色（业主：标题栏字体也要绿） */
.nav-drawer-title { flex:1; min-width:0; font-size:13px; font-weight:700; color:var(--primary);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-drawer-close { width:22px; height:22px; flex:0 0 auto; border:1px solid var(--border); border-radius:6px;
  background:transparent; color:var(--text-muted); cursor:pointer; font-size:11px; line-height:1; }
.nav-drawer-close:hover { color:var(--danger); border-color:var(--danger); }
.nav-drawer-search { padding:8px 12px 2px; }
.nav-drawer-search input { width:100%; padding:6px 10px; border-radius:7px; border:1px solid var(--border);
  background:var(--bg); color:var(--text); font-size:12px; outline:none; }
.nav-drawer-search input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(0,212,170,.10); }
.nav-drawer-body { flex:1; min-height:0; overflow-y:auto; padding:6px 8px 8px; }
.nav-drawer-ft { padding:7px 12px; border-top:1px solid var(--border); font-size:10px;
  color:var(--text-muted); line-height:1.6; }
.nav-drawer-body .nav-item { padding:8px 10px; margin-bottom:1px; border-radius:7px;
  font-size:12.5px; border-left-width:0; }
.nav-drawer-body .nav-item:hover { background:rgba(255,255,255,.05); color:var(--text); }
.nav-drawer-body .nav-item.active { background:rgba(0,212,170,.14); color:var(--text);
  box-shadow:inset 3px 0 0 var(--primary); }
.nav-drawer-body .nav-empty { padding:22px 10px; text-align:center; font-size:11.5px;
  color:var(--text-muted); line-height:1.8; }

/* 移动端（≤768px）本批不做专门适配：侧栏变横向顶栏后，面板改为贴底整宽，保证点得开、不溢出 */
@media (max-width:768px) {
  .nav-drawer { left:8px !important; right:8px; top:auto !important; bottom:8px;
    width:auto !important; max-width:none; max-height:60vh !important;
    border:1px solid var(--border); border-radius:10px; }
}
