* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; }
body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c0c4cc; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  justify-content: center;
  align-items: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
  padding: 16px 0;
}
.login-logo img {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}
.login-box {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-header h2 { color: #333; margin-bottom: 10px; font-size: 32px; font-weight: 600; }
.login-header p { color: #999; font-size: 14px; }
.login-form .login-button { width: 100%; height: 44px; font-size: 16px; }
.captcha-row { gap: 12px; width: 100%; display: flex; }
.captcha-row .el-input { flex: 1; }
.captcha-row .captcha-image {
  cursor: pointer;
  background: #f5f7fa;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 40px;
  transition: border-color 0.3s;
  display: flex;
  overflow: hidden;
}
.captcha-row .captcha-image:hover { border-color: #409eff; }
.captcha-row .captcha-image img { object-fit: cover; width: 100%; height: 100%; }
.captcha-row .captcha-image span { color: #909399; font-size: 12px; }
.login-footer { text-align: center; margin-top: 20px; }
.login-footer p { color: #999; font-size: 12px; line-height: 20px; }
.login-footer a { color: #999; text-decoration: none; }
.login-footer a:hover { color: #409eff; text-decoration: underline; }
.login-footer-line { white-space: nowrap; }
.login-footer-sep { margin: 0 6px; color: #c0c4cc; }

/* ============ 后台布局 ============ */
.layout-container { height: 100vh; overflow: hidden; }
.aside {
  background: linear-gradient(#1a1a2a 0%, #2d2d3a 100%);
  transition: width 0.3s;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}
.logo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  justify-content: center;
  align-items: center;
  height: 60px;
  display: flex;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.logo-text { color: #fff; letter-spacing: 2px; font-size: 22px; font-weight: 700; }
.logo-mini { color: #fff; font-size: 20px; font-weight: 700; }
.menu { background: none !important; border-right: none !important; }
.menu .el-menu-item, .menu .el-sub-menu__title { color: rgba(255, 255, 255, 0.85); }
.menu .el-menu-item:hover, .menu .el-sub-menu__title:hover { background: rgba(255, 255, 255, 0.1) !important; }
.menu .el-menu-item.is-active {
  border-radius: 8px;
  margin: 4px 12px;
  color: #fff !important;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
}
.menu .el-sub-menu .el-menu-item {
  color: rgba(255, 255, 255, 0.85) !important;
  background-color: transparent !important;
  padding-left: 50px !important;
  min-width: auto;
}
.menu .el-sub-menu .el-menu-item:hover { background: rgba(255, 255, 255, 0.1) !important; }
.menu .el-sub-menu .el-menu-item.is-active { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important; }
/* 子菜单弹出层挂载在 body 层 (不在 .menu 内), 需全局覆盖 */
.el-menu--popup {
  background: #2d2d3a !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.el-menu--popup .el-menu-item, .el-menu--popup .el-sub-menu__title {
  color: rgba(255, 255, 255, 0.85) !important;
}
.el-menu--popup .el-menu-item:hover, .el-menu--popup .el-sub-menu__title:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
.el-menu--popup .el-menu-item.is-active {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
}
.main-container { background: #f5f7fa; flex-direction: column; display: flex; }
.header {
  background: #fff;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 0 20px;
  display: flex;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.header-left { align-items: center; gap: 16px; display: flex; }
.collapse-btn { cursor: pointer; color: #606266; font-size: 20px; transition: all 0.3s; }
.collapse-btn:hover { color: #409eff; transform: scale(1.1); }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-info {
  cursor: pointer;
  border-radius: 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  transition: all 0.3s;
  display: flex;
}
.user-info:hover { background: #f5f7fa; }
.user-info:focus { outline: none; }
.user-info:focus-visible { outline: 2px solid #409eff; outline-offset: 2px; }
.username { color: #303133; font-weight: 500; }
.user-info .el-avatar { flex: 0 0 auto; overflow: hidden; }
.user-info .el-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 4px; }
.avatar-edit .el-avatar { background: #f0f2f5; }
.avatar-edit .el-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-tips { font-size: 12px; color: #909399; }
.code-row { display: flex; gap: 8px; width: 100%; }
.code-row .el-input { flex: 1; }
.tabs-container {
  background: #fff;
  border-bottom: 1px solid #e4e7ed;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  display: flex;
}
.tabs-wrapper { flex: 1; gap: 8px; display: flex; overflow-x: auto; }
.tabs-wrapper::-webkit-scrollbar { display: none; }
.tab-item {
  cursor: pointer;
  white-space: nowrap;
  background: #f5f7fa;
  border-radius: 4px;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  transition: all 0.3s;
  display: flex;
}
.tab-item.active {
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.tab-item:hover:not(.active) { background: #e8e8e8; }
.tab-title { font-size: 13px; }
.main { background: #f5f7fa; padding: 12px; overflow-y: auto; flex: 1; min-height: 0; }

.fade-transform-enter-active, .fade-transform-leave-active { transition: all 0.3s; }
.fade-transform-enter-from, .fade-transform-leave-to { opacity: 0; transform: translate(10px); }

/* ============ 通用页面样式 ============ */
.page-container { display: flex; flex-direction: column; gap: 12px; }
.search-bar {
  background: #fff;
  border-radius: 4px;
  padding: 16px 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.search-bar .el-form-item { margin-bottom: 16px; margin-right: 0; }
.table-card { background: #fff; border-radius: 4px; padding: 16px; }
.table-card .el-table { font-size: 13px; }
.el-table .nowrap-cell .cell { white-space: nowrap; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.table-toolbar .left-actions, .table-toolbar .right-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.selected-info { color: #909399; font-size: 13px; margin-left: 4px; }
.operation-buttons { display: flex; gap: 4px; align-items: center; }
.ops-line { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.ops-line .el-button + .el-button { margin-left: 0; }
.security-form .el-form-item__label { white-space: nowrap; }
.form-tip { font-size: 12px; color: #909399; line-height: 1.6; margin-top: 2px; }
.pagination-wrap { display: flex; justify-content: flex-end; margin-top: 14px; }
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
}
.stat-card .stat-info .stat-value { font-size: 26px; font-weight: 600; color: #303133; line-height: 1.2; }
.stat-card .stat-info .stat-label { font-size: 13px; color: #909399; margin-top: 4px; }
.section-title { font-size: 16px; font-weight: 600; color: #303133; margin-bottom: 4px; }

/* ============ 产品分类卡片墙 ============ */
.cat-header {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
}
.cat-header__left { align-items: center; gap: 14px; flex-wrap: wrap; display: flex; }
.cat-header__logo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}
.cat-header__logo .el-icon { color: #fff; font-size: 22px; }
.cat-header__title { font-size: 18px; font-weight: 700; color: #303133; line-height: 1.3; }
.cat-header__sub { color: #909399; font-size: 12px; margin-top: 3px; }
.cat-header__stats { gap: 8px; margin-left: 8px; display: flex; flex-wrap: wrap; }
.stat-pill {
  background: #eef0ff;
  border: 1px solid #dcdffe;
  border-radius: 999px;
  color: #667eea;
  font-size: 12px;
  line-height: 18px;
  padding: 2px 10px;
  white-space: nowrap;
}
.stat-pill--muted { background: #f5f7fa; border-color: #e4e7ed; color: #909399; }
.stat-pill--info { background: #f0f9eb; border-color: #e1f3d8; color: #67c23a; }
.cat-header__actions { gap: 8px; align-items: center; display: flex; flex-wrap: wrap; }
.btn-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn-gradient:hover { box-shadow: 0 6px 18px rgba(102, 126, 234, 0.45); transform: translateY(-1px); }

.cat-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  align-content: start;
  min-height: 340px;
  gap: 16px;
  display: grid;
}
.cat-card {
  --i: 0;
  --g1: #667eea;
  --g2: #764ba2;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 14px;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  cursor: pointer;
  position: relative;
  display: flex;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  animation: catCardIn 0.45s cubic-bezier(0.22, 0.68, 0.36, 1) backwards;
  animation-delay: calc(var(--i) * 30ms);
}
.cat-card::before {
  content: "";
  background: linear-gradient(90deg, var(--g1), var(--g2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.1);
  border-color: transparent;
}
.cat-card:hover::before, .cat-card.is-current::before { transform: scaleX(1); }
.cat-card.is-current { box-shadow: 0 10px 24px rgba(102, 126, 234, 0.2); border-color: var(--g1); }
.cat-card__head { justify-content: space-between; align-items: flex-start; display: flex; }
.cat-card__icon {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  box-shadow: 0 6px 14px -4px var(--g1);
}
.cat-card__icon .el-icon { color: #fff; font-size: 20px; }
.cat-card__ops { opacity: 0; transition: opacity 0.2s; }
.cat-card:hover .cat-card__ops, .cat-card.is-current .cat-card__ops { opacity: 1; }
.cat-card__name {
  color: #303133;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-card__parent { color: #a8abb2; font-size: 12px; margin-top: -4px; }
.cat-card__meta {
  border-top: 1px dashed #ebeef5;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  display: flex;
}
.meta-pill {
  background: #f5f7fa;
  border-radius: 6px;
  color: #909399;
  font-size: 12px;
  line-height: 18px;
  padding: 1px 8px;
}
.meta-pill.is-hot { background: #eef0ff; color: #667eea; font-weight: 600; }
.meta-pill.is-warn { background: #fdf6ec; color: #e6a23c; }
.cat-empty { grid-column: 1 / -1; }
@keyframes catCardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.detail-row { display: flex; margin-bottom: 12px; }
.detail-row .detail-label { width: 90px; color: #909399; flex-shrink: 0; }
.detail-row .detail-value { flex: 1; color: #303133; word-break: break-all; }

/* ============ 线索中心 (我的线索 / 公海线索) ============ */
.leads-page .search-bar {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 18px 20px 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.leads-page .search-bar .el-form--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.leads-page .search-bar .el-form-item { margin: 0 16px 14px 0; }
.leads-page .search-bar .el-form-item__label { color: #5f6480; font-weight: 500; white-space: nowrap; }
.leads-page .search-bar .filter-actions { margin-left: auto; margin-right: 0; }
.leads-page .table-card {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 16px 16px 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.leads-page .table-toolbar {
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px dashed #ebeef5;
}
.leads-page .toolbar-tip { color: #a8abb2; font-size: 13px; }
.leads-page .selected-tag { margin-left: 4px; }
.leads-page .el-table {
  --el-table-header-bg-color: #f6f7fd;
  --el-table-header-text-color: #5b6089;
  --el-table-row-hover-bg-color: #f4f5ff;
  --el-table-border-color: #eef0f6;
  margin-top: 12px;
}
.leads-page .el-table th.el-table__cell { font-weight: 600; }
.leads-page .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { background: #fbfbfe; }

/* ============ 工作台数据可视化 ============ */
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.dash-sub { font-size: 12px; color: #909399; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-chip { display: inline-block; background: #f5f7fa; border: 1px solid #ebeef5; border-radius: 999px; padding: 1px 10px; font-size: 12px; color: #606266; line-height: 18px; }
.dash-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 实时刷新状态灯: 呼吸点 + 数据更新时间 */
.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #909399;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
  border-radius: 999px;
  padding: 4px 11px;
  line-height: 18px;
  white-space: nowrap;
}
.live-flag .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #c0c4cc; flex: 0 0 auto; }
.live-flag .live-time { font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.85; }
.live-flag.on { color: #67c23a; background: #f0f9eb; border-color: #e1f3d8; }
.live-flag.on .live-dot { background: #67c23a; animation: livePulse 1.6s ease-out infinite; }
.live-flag.busy { color: #409eff; background: #ecf5ff; border-color: #d9ecff; }
.live-flag.busy .live-dot { background: #409eff; animation: livePulse 0.8s ease-out infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 6px transparent; opacity: 0.75; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.kpi-card { display: block; padding: 16px; border-radius: 10px; height: 100%; }
.kpi-head { display: flex; align-items: center; gap: 10px; }
.kpi-card .kpi-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 19px; }
.kpi-card .kpi-label { font-size: 13px; color: #606266; font-weight: 600; }
.kpi-card .kpi-value { font-size: 26px; font-weight: 700; color: #303133; margin-top: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-card .kpi-sub { font-size: 12px; color: #909399; margin-top: 8px; line-height: 1.5; word-break: break-all; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.chart-head .section-title { margin-bottom: 0; }
.chart-tip { font-size: 12px; color: #909399; }
.chart-box { height: 300px; width: 100%; }
.dash-chart-row .table-card { height: 100%; display: flex; flex-direction: column; }
.dash-chart-row .chart-box { flex: 1 1 auto; min-height: 300px; }
.dash-trend-wrap { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.dash-trend-wrap .trend-main { flex: 1 1 58%; min-width: 360px; }
.dash-trend-wrap .trend-rank { flex: 1 1 30%; min-width: 280px; max-width: 420px; border-left: 1px solid #ebeef5; padding-left: 20px; display: flex; flex-direction: column; }
.rank-list { flex: 1 1 auto; overflow: auto; margin-top: 4px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 6px; }
.rank-item:hover { background: #f5f7fa; }
.rank-no { width: 22px; height: 22px; border-radius: 6px; background: #f0f2f5; color: #909399; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.rank-no.top1 { background: linear-gradient(135deg, #fc4a1a, #f7b733); color: #fff; }
.rank-no.top2 { background: linear-gradient(135deg, #4568dc, #b06ab3); color: #fff; }
.rank-no.top3 { background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; }
.rank-name { flex: 1 1 auto; font-size: 13px; color: #303133; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { flex: 0 0 38%; max-width: 120px; height: 6px; background: #ebeef5; border-radius: 3px; overflow: hidden; }
.rank-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #409eff, #764ba2); border-radius: 3px; }
.rank-vals { flex: 0 0 auto; font-size: 12px; color: #606266; font-variant-numeric: tabular-nums; }
.rank-vals b { color: #303133; font-weight: 600; margin-right: 8px; }
.rank-empty { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; color: #909399; font-size: 13px; }
.seg { display: inline-flex; background: #f2f4f7; border-radius: 6px; padding: 3px; gap: 2px; }
.seg span { font-size: 12px; color: #606266; padding: 4px 14px; border-radius: 4px; cursor: pointer; transition: all 0.15s; user-select: none; }
.seg span.on { background: #fff; color: #409eff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

/* 趋势卡: 工具组 + 统计摘要 + 对比上期开关 */
.chart-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trend-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.trend-stat {
  flex: 1 1 170px;
  min-width: 150px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: #f7f9fc;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  padding: 8px 12px;
}
.ts-label { font-size: 12px; color: #8a90a5; white-space: nowrap; }
.ts-value { font-size: 16px; font-weight: 700; color: #303133; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-cmp { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ts-cmp.up { color: #67c23a; }
.ts-cmp.down { color: #f56c6c; }
.ts-cmp.flat { color: #909399; }
.mini-chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #606266;
  border: 1px solid #dcdfe6;
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition: all 0.15s;
}
.mini-chk::before { content: ''; width: 9px; height: 9px; border-radius: 3px; border: 1px solid #c0c4cc; background: #fff; }
.mini-chk:hover { border-color: #a0cfff; color: #409eff; }
.mini-chk.on { color: #409eff; border-color: #b3d8ff; background: #ecf5ff; }
.mini-chk.on::before { background: #409eff; border-color: #409eff; }

/* 销售数据对比: 热力色阶 + 环比 + 迷你走势 + 占比条 + 分组表头 + 合计强调 */
.sales-table .cell { font-variant-numeric: tabular-nums; }
.name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name-cell .name-txt { flex: 1 1 auto; min-width: 0; font-weight: 600; color: #303133; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-v { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 34px; padding: 2px 4px; border-radius: 4px; }
.cell-v .cv-num { font-size: 13px; color: #303133; line-height: 1.2; }
.cell-v.zero .cv-num { color: #c9ccd4; }
.delta { font-size: 11px; font-weight: 600; line-height: 1.1; color: #909399; }
.delta.up { color: #67c23a; }
.delta.down { color: #f56c6c; }
.delta.flat { color: #b4b9c4; }
.spark { display: block; margin: 0 auto; color: #409eff; }
.spark.flat { color: #c9ccd4; }
.share-strip { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; flex-wrap: wrap; }
.share-label, .share-total { font-size: 12px; color: #909399; white-space: nowrap; }
.share-bar { display: flex; flex: 1 1 240px; min-width: 140px; max-width: 380px; height: 18px; border-radius: 4px; overflow: hidden; background: #f0f2f5; }
.share-bar > i { display: flex; align-items: center; justify-content: center; min-width: 4px; height: 100%; transition: width 0.25s ease; }
.share-bar > i em { font-style: normal; font-size: 11px; font-weight: 600; color: #fff; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-empty { font-size: 12px; color: #c0c4cc; }
.sales-table th.el-table__cell.grp-leads { background-color: #f3f8ff !important; color: #409eff !important; font-weight: 700; }
.sales-table th.el-table__cell.grp-orders { background-color: #f1faf1 !important; color: #529b58 !important; font-weight: 700; }
.sales-table th.el-table__cell.grp-perf { background-color: #fff8ee !important; color: #e6a23c !important; font-weight: 700; }
.sales-table .el-table__footer-wrapper td.el-table__cell { background: #f7f9fc; font-weight: 700; color: #303133; border-top: 2px solid #dfe4ec; }

/* ============ 销售数据对比 (矩阵 / 雷达 / 诊断) ============ */
.cmp-matrix { margin-top: 4px; }
.cmp-user { display: flex; align-items: center; gap: 6px; }
.cmp-user .name-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-score { font-size: 11px; font-weight: 700; min-width: 30px; text-align: center; padding: 1px 5px; border-radius: 9px; }
.cmp-score.lv-good { background: #f0f9eb; color: #67c23a; border: 1px solid #c2e7b0; }
.cmp-score.lv-mid { background: #fdf6ec; color: #e6a23c; border: 1px solid #f5dab1; }
.cmp-score.lv-low { background: #fef0f0; color: #f56c6c; border: 1px solid #fab6b6; }
.cm-h { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.cm-h-sub { font-size: 11px; font-weight: 400; color: #c0c4cc; }
.cm-gap { font-size: 10px; line-height: 1.1; color: #b4b9c4; }
.cm-gap.g-up { color: #67c23a; }
.cm-gap.g-mid { color: #e6a23c; }
.cm-gap.g-low { color: #f56c6c; }
.cmp-health { display: flex; align-items: center; gap: 6px; }
.health-bar { flex: 1; height: 6px; border-radius: 3px; background: #f0f2f5; overflow: hidden; min-width: 40px; }
.health-bar > i { display: block; height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.health-bar > i.lv-good { background: linear-gradient(90deg,#95de64,#67c23a); }
.health-bar > i.lv-mid { background: linear-gradient(90deg,#f8d89b,#e6a23c); }
.health-bar > i.lv-low { background: linear-gradient(90deg,#fab6b6,#f56c6c); }
.health-txt { font-size: 11px; font-weight: 700; white-space: nowrap; }
.health-txt.lv-good { color: #67c23a; }
.health-txt.lv-mid { color: #e6a23c; }
.health-txt.lv-low { color: #f56c6c; }

/* 诊断条 */
.cmp-diagnose { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 10px; border-bottom: 1px dashed #e9ecf2; margin-bottom: 6px; }
.cmp-diag-item { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 13px; border: 1px solid transparent; line-height: 1.5; }
.cmp-diag-item .cd-user { font-weight: 700; color: #303133; }
.cmp-diag-item .cd-tag { font-weight: 700; padding: 0 4px; border-radius: 3px; font-size: 11px; }
.cmp-diag-item .cd-text { color: #606266; }
.cmp-diag-item.danger { background: #fef0f0; border-color: #fde2e2; }
.cmp-diag-item.danger .cd-tag { background: #f56c6c; color: #fff; }
.cmp-diag-item.warn { background: #fdf6ec; border-color: #faecd8; }
.cmp-diag-item.warn .cd-tag { background: #e6a23c; color: #fff; }
.cmp-diag-item.ok { background: #f0f9eb; border-color: #e1f3d8; }
.cmp-diag-item.ok .cd-tag { background: #67c23a; color: #fff; }

/* 雷达 */
.cmp-radar-wrap { display: flex; gap: 12px; align-items: stretch; padding-top: 8px; }
.cmp-radar-side { flex: 0 0 250px; min-width: 0; padding: 6px 2px; }
.cmp-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.cmp-chip { font-size: 12px; padding: 3px 10px; border-radius: 13px; background: #f4f5f7; color: #606266; cursor: pointer; user-select: none; border: 1px solid transparent; transition: all 0.15s ease; }
.cmp-chip:hover { background: #ecf3ff; color: #409eff; }
.cmp-chip.on { background: #409eff; color: #fff; border-color: #409eff; }
.cmp-radar-sum { border: 1px solid #ebeef5; border-radius: 8px; background: #fafbfd; margin-top: 12px; overflow: hidden; }
.sum-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px 6px; background: #f3f6fb; border-bottom: 1px solid #ebeef5; }
.sum-title { font-size: 12px; font-weight: 700; color: #303133; }
.sum-sub { font-size: 11px; color: #909399; white-space: nowrap; }
.sum-table { width: 100%; border-collapse: collapse; }
.sum-table tr + tr td { border-top: 1px dashed #eef1f6; }
.sum-table td { padding: 6px 10px; font-size: 12px; line-height: 1.4; }
.sum-table .st-label { color: #606266; white-space: nowrap; }
.st-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sum-table .st-val { text-align: right; font-weight: 700; color: #303133; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-table .st-val em { font-style: normal; font-weight: 400; font-size: 11px; color: #909399; margin-left: 2px; }
.cmp-radar-box { flex: 1; min-width: 0; height: 380px; }

@media (max-width: 991px) {
  .cmp-radar-wrap { flex-direction: column-reverse; }
  .cmp-radar-side { flex: 1 1 auto; }
  .cmp-radar-box { height: 320px; }
}

/* ============ 移动端适配 (<768px) ============ */
@media (max-width: 767px) {
  /* 侧栏 → 离屏抽屉 */
  .layout-container .aside {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px !important;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .layout-container.nav-open .aside { transform: translateX(0); }
  .nav-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 1000; }

  /* 顶栏 */
  .header { padding: 0 10px; }
  .header .el-breadcrumb { display: none; }
  .username { display: none; }

  /* 主内容 */
  .main { padding: 10px; }
  .page-container { gap: 10px; }
  .table-card { padding: 12px 10px; }
  .section-title { font-size: 15px; }

  /* 搜索/筛选条: 全宽堆叠 */
  .search-bar { padding: 12px 12px 0; gap: 0; }
  .search-bar .el-form-item { width: 100%; margin-bottom: 10px; }
  .search-bar .el-form-item__content { flex: 1; min-width: 0; }
  .search-bar .el-input,
  .search-bar .el-select,
  .search-bar .el-date-editor,
  .search-bar .el-cascader { width: 100% !important; }
  .search-bar .el-button { width: 100%; height: 38px; }

  /* 工具条/分页 */
  .table-toolbar { margin-bottom: 10px; }
  .pagination-wrap { overflow-x: auto; }

  /* 表格触控 */
  .table-card .el-table { font-size: 12px; }
  .el-table th.el-table__cell, .el-table td.el-table__cell { padding: 6px 0; }

  /* 工作台 */
  .dash-header { gap: 8px; }
  .dash-filters { width: 100%; }
  .chart-tools { width: 100%; }
  .trend-stats { gap: 6px; margin: 4px 0 8px; }
  .trend-stat { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 7px 10px; gap: 5px; }
  .ts-value { font-size: 14px; }
  .kpi-card { padding: 12px; }
  .kpi-card .kpi-value { font-size: 20px; }
  .kpi-card .kpi-head { gap: 8px; }
  .kpi-card .kpi-icon { width: 32px; height: 32px; font-size: 16px; }
  .dash-chart-row .chart-box { height: 220px; min-height: 220px; }
  .share-strip { width: 100%; }
  .share-bar { flex: 1 1 auto; min-width: 110px; max-width: none; }
  .dash-trend-wrap .trend-main { flex: 1 1 100%; min-width: 0; }
  .dash-trend-wrap .trend-rank {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #ebeef5;
    padding-top: 10px;
  }

  /* 弹窗/抽屉/消息框 */
  .el-dialog { width: calc(100vw - 24px) !important; margin: 12px auto !important; }
  .el-dialog__body { padding: 16px; max-height: calc(100vh - 180px); overflow-y: auto; }
  .el-drawer { width: 92% !important; }
  .el-message-box { max-width: calc(100vw - 24px); }

  /* 详情/描述 */
  .detail-row { flex-wrap: wrap; }
  .detail-row .detail-value { word-break: break-all; }

  /* 登录页 */
  .login-box { width: calc(100% - 32px); padding: 28px 20px; }
  .login-header { margin-bottom: 20px; }
  .login-header h2 { font-size: 22px; }
  .login-footer-line { font-size: 11px; }
}
