
/* ===== 数据看板样式（前缀 dash- 避免冲突） ===== */
.dash-wrap { padding: 15px 20px 30px; background: #f0f2f5; min-height: 100%; font-family: "Microsoft YaHei", sans-serif; }
.dash-wrap button, .dash-wrap select, .dash-wrap input { font-family: inherit; outline: none; }

/* 筛选栏 */
.dash-filter { background: #fff; border-radius: 6px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,.06); flex-wrap: wrap; gap: 8px; }
.dash-filter-left { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dash-filter-label { font-size: 16px; font-weight: bold; color: #1d2939; margin-right: 4px; }
.dash-select { height: 32px; border: 1px solid #d9d9d9; border-radius: 4px; padding: 0 8px; font-size: 13px; color: #333; }
.dash-date { height: 32px; border: 1px solid #d9d9d9; border-radius: 4px; padding: 0 8px; font-size: 13px; color: #333; }
.dash-sep { color: #999; }
.dash-seg { display: inline-flex; border: 1px solid #28b39c; border-radius: 4px; overflow: hidden; }
.dash-seg-btn { border: none; background: #fff; color: #28b39c; padding: 6px 14px; font-size: 13px; cursor: pointer; border-right: 1px solid #28b39c; }
.dash-seg-btn:last-child { border-right: none; }
.dash-seg-btn.active { background: #28b39c; color: #fff; }
.dash-btn-primary { background: #28b39c; color: #fff; border: none; border-radius: 4px; padding: 7px 16px; font-size: 13px; cursor: pointer; }
.dash-btn-primary:hover { background: #219a86; }
.dash-btn-plain { background: #fff; color: #666; border: 1px solid #d9d9d9; border-radius: 4px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.dash-btn-sm { padding: 4px 12px; font-size: 12px; }
.dash-range-tip { font-size: 13px; color: #888; }

/* KPI 卡片 */
.dash-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.dash-kpi { border-radius: 8px; padding: 20px 22px; color: #fff; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.dash-kpi-total { background: linear-gradient(135deg, #1d2939 0%, #2c4a6e 100%); }
.dash-kpi-online { background: linear-gradient(135deg, #28b39c 0%, #3fd0b5 100%); }
.dash-kpi-offline { background: linear-gradient(135deg, #f2762e 0%, #ff9d55 100%); }
.dash-kpi-icon { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 26px; margin-right: 18px; flex-shrink: 0; }
.dash-kpi-title { font-size: 13px; opacity: .85; }
.dash-kpi-num { font-size: 30px; font-weight: bold; line-height: 1.3; font-family: Arial, "Microsoft YaHei"; }
.dash-kpi-sub { font-size: 12px; opacity: .9; }
.dash-kpi-sub .up { color: #b8f5e5; }
.dash-kpi-sub .down { color: #ffd2b8; }
.dash-mini-sub .up { color: #28b39c; }
.dash-mini-sub .down { color: #e05c5c; }

/* 面板 */
.dash-panel { background: #fff; border-radius: 8px; margin-top: 15px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 16px 18px; }
.dash-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.dash-panel-title { font-size: 15px; font-weight: bold; color: #1d2939; }
.dash-panel-title i { color: #28b39c; margin-right: 6px; }
.dash-panel-tip { font-size: 12px; color: #999; }
.dash-sub-title { font-size: 13px; color: #666; margin-bottom: 6px; font-weight: bold; }

/* 图表容器 */
.dash-chart-lg { width: 100%; height: 320px; }
.dash-chart-lg2 { width: 100%; height: 280px; }
.dash-chart-md { width: 42%; height: 300px; }
.dash-chart-md2 { width: 100%; height: 260px; }

.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 0; }
.dash-grid-2 > .dash-panel { margin-top: 15px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }

/* 收入分类 */
.dash-income-body { display: flex; align-items: center; gap: 10px; }
.dash-income-table-wrap { flex: 1; overflow: auto; max-height: 300px; }

/* 表格 */
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { background: #f5f7fa; color: #555; font-weight: bold; padding: 9px 10px; text-align: left; border-bottom: 1px solid #e8e8e8; white-space: nowrap; }
.dash-table td { padding: 9px 10px; border-bottom: 1px solid #f0f0f0; color: #444; white-space: nowrap; }
.dash-table-striped tbody tr:nth-child(even) { background: #fafbfc; }
.dash-table tbody tr:hover { background: #eefcf9; }
.dash-rank { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: #eee; color: #888; font-size: 12px; }
.dash-rank-1 { background: #ffb800; color: #fff; }
.dash-rank-2 { background: #b0b8c4; color: #fff; }
.dash-rank-3 { background: #e08a4e; color: #fff; }
.dash-cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* 员工PK 底部 */
.dash-pk-footer { display: flex; justify-content: space-between; font-size: 13px; color: #666; padding: 8px 6px 0; border-top: 1px dashed #eee; margin-top: 4px; }
.dash-pk-champ b { color: #f2762e; }

/* 迷你卡片（工资/支出/回访） */
.dash-mini { border-radius: 8px; padding: 16px 18px; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.10); }
.dash-mini-blue { background: linear-gradient(135deg, #3a7bd5 0%, #5a9cf0 100%); }
.dash-mini-orange { background: linear-gradient(135deg, #e8654a 0%, #ff8f6b 100%); }
.dash-mini-teal { background: linear-gradient(135deg, #1fa389 0%, #35c9ad 100%); }
.dash-mini-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.dash-tag { font-size: 11px; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; }
.dash-mini-num { font-size: 28px; font-weight: bold; margin: 10px 0 6px; font-family: Arial, "Microsoft YaHei"; }
.dash-mini-sub { font-size: 12px; opacity: .92; }

/* 流量数据卡 */
.dash-flow-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 12px; }
.dash-flow-card { border: 1px solid #eceff3; border-radius: 8px; padding: 14px 14px 12px; background: #fbfcfe; }
.dash-flow-card .fc-title { font-size: 12px; color: #888; display: flex; align-items: center; gap: 6px; }
.dash-flow-card .fc-title i { width: 24px; height: 24px; border-radius: 6px; color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.dash-flow-card .fc-num { font-size: 22px; font-weight: bold; color: #1d2939; margin-top: 8px; font-family: Arial, "Microsoft YaHei"; }
.dash-flow-card .fc-sub { font-size: 11px; margin-top: 4px; }
.fc-sub .up { color: #28b39c; } .fc-sub .down { color: #e05c5c; }

/* 业务数据卡 */
.dash-biz { background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.dash-biz-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: bold; color: #1d2939; margin-bottom: 10px; }
.dash-biz-head i { color: #28b39c; margin-right: 4px; }
.dash-biz-nums { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 6px; }
.dash-biz-nums em { display: block; font-style: normal; font-size: 18px; font-weight: bold; color: #333; font-family: Arial, "Microsoft YaHei"; }
.dash-biz-nums span { font-size: 11px; color: #999; }
.dash-biz-chart { width: 100%; height: 110px; }

/* 分销合伙人 */
.dash-partner { border-top: 3px solid #28b39c; }
.dash-partner-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.dash-pk-card { border-radius: 8px; padding: 14px 16px; color: #fff; }
.dash-partner-charts { margin-top: 4px; margin-bottom: 12px; }

@media (max-width: 1200px) {
  .dash-kpi-row, .dash-grid-3, .dash-flow-row { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-income-body { flex-direction: column; }
  .dash-chart-md { width: 100%; }
  .dash-partner-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 响应式：整个后台框架（适配 Bracket 主题：.headerbar/.leftpanel/.mainpanel） ===== */
@media (max-width: 1024px) {
  /* 主题自带：≤1024px 隐藏 .leftpanel，body.leftpanel-show 时显示 */
  .leftpanel { width: 240px !important; }
  .leftpanel-show .leftpanel { display: block !important; box-shadow: 3px 0 14px rgba(0,0,0,.35); z-index: 1000; }
  .dash-sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.4); z-index: 900; }
  body.leftpanel-show .dash-sidebar-overlay { display: block; }
  .mainpanel { margin-left: 0 !important; width: 100% !important; }
  .leftpanel-show .mainpanel { margin-left: 240px !important; }
  .h1title { font-size: 16px !important; width: auto !important; margin-left: 10px !important; }
  .headermenu > li > a > .tp-icon.chat-icon { padding: 10px 8px !important; font-size: 12px !important; }
  .breadcrumb-wrapper, .pageheader { padding-left: 10px !important; }
}
@media (max-width: 600px) {
  .headermenu > li > a > .tp-icon.chat-icon { display: none; }  /* 隐藏四个文字管理入口 */
  .h1title { font-size: 14px !important; margin-left: 4px !important; }
  .headermenu .dropdown-menu-head { min-width: 240px !important; }
  .mainpanel { overflow-x: hidden; }
}
/* ===== 响应式：数据看板 ===== */
@media (max-width: 1200px) {
  .dash-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .dash-flow-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .dash-wrap { padding: 10px 10px 24px; }
  .dash-kpi-row, .dash-grid-3 { grid-template-columns: 1fr 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr !important; }
  .dash-partner-kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-income-body { flex-direction: column; }
  .dash-chart-md { width: 100%; }
  .dash-filter { padding: 10px 12px; }
  /* 宽表格横向滚动 */
  .dash-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-table { min-width: 640px; }
  body.dash-sidebar-open .sidebar { left: 0; display: block !important; }
}
@media (max-width: 600px) {
  .dash-kpi-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-flow-row { grid-template-columns: repeat(2, 1fr); }
  .dash-partner-kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-kpi { flex-direction: column; align-items: flex-start; padding: 9px 8px 8px; }
  .dash-kpi-icon { display: none; }
  .dash-kpi-title { font-size: 10px; }
  .dash-kpi-num { font-size: clamp(11px, 3.8vw, 16px); letter-spacing: -0.5px; white-space: nowrap; }
  .dash-kpi-sub { font-size: 9px; line-height: 1.45; white-space: normal; }
  .dash-filter-left { gap: 6px; }
  .dash-date { width: 118px; }
  .dash-chart-lg, .dash-chart-lg2 { height: 240px; }
  .dash-chart-md, .dash-chart-md2 { height: 220px; }
  .dash-panel { padding: 12px; }
}

/* 分销级别徽标与工具条 */
.dash-partner-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.dash-lv { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; color: #fff; white-space: nowrap; }
.dash-lv.lv1 { background: #e8a33d; }
.dash-lv.lv2 { background: #4a90d9; }
.dash-muted { color: #999; }
@media (max-width: 992px) {
  .dash-partner-tools { width: 100%; justify-content: flex-start; margin-top: 8px; }
  .dash-panel-head { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .dash-partner-tools .dash-panel-tip { display: none; }
  .dash-partner-kpis { grid-template-columns: 1fr 1fr !important; }
  .dash-pk-card { padding: 12px 12px !important; }
  .dash-pk-card > div:nth-child(2) { font-size: 20px !important; }
}

/* 用户扩散排行榜 KPI */
.dash-spread-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1200px) {
  .dash-spread-kpis { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .dash-spread-kpis { grid-template-columns: 1fr 1fr !important; }
}

/* ===== 客服回访工作台 ===== */
.dash-visit { border-top: 3px solid #3a7bd5; }
.dash-visit-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.dash-visit-kpis .dash-pk-card { padding: 12px 14px; }
.dash-visit-kpis .dash-pk-card > div:nth-child(2) { font-size: 21px !important; }
.dash-visit > .dash-grid-2 { margin-top: 14px; }
.dash-visit-bottom { margin-top: 14px; }

/* 状态 / 效果 / 加推 徽标 */
.dash-st, .dash-eff, .dash-pushtag, .dash-tp { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.dash-st { color: #fff; }
.dash-st.todo { background: #f2a93b; }
.dash-st.done { background: #28b39c; }
.dash-st.miss { background: #9aa4b2; }
.dash-st.refuse { background: #e05c5c; }
.dash-eff.good { background: #e8f8f4; color: #1a9c85; border: 1px solid #b8e8dd; }
.dash-eff.mid { background: #fdf4e6; color: #d38b16; border: 1px solid #f6e0b8; }
.dash-eff.bad { background: #fdeeee; color: #d24a4a; border: 1px solid #f6cece; }
.dash-eff.none { background: #f2f4f7; color: #9aa4b2; border: 1px solid #e5e9ef; }
.dash-pushtag { background: #eef4fd; color: #2f6fc4; border: 1px solid #cfe0f8; margin-right: 4px; }
.dash-pushtag.wx { background: #eaf8ef; color: #22915a; border: 1px solid #c6ead4; }
.dash-tp { background: #f4f5f8; color: #5d6779; }

/* 信息单元格（两行） */
.dash-info-cell { display: flex; flex-direction: column; line-height: 1.4; max-width: 240px; }
.dash-info-cell b { font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-info-id { font-size: 11px; color: #9aa4b2; font-family: Arial; }

/* 待加推队列 */
.dash-push-queue { display: flex; flex-direction: column; gap: 8px; max-height: 268px; overflow: auto; }
.dash-push-item { display: flex; align-items: center; gap: 10px; border: 1px solid #eceff3; border-radius: 8px; padding: 10px 12px; background: #fbfcfe; }
.dash-push-item .pi-ico { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; background: #3a7bd5; }
.dash-push-item .pi-main { flex: 1; min-width: 0; }
.dash-push-item .pi-title { font-size: 13px; color: #333; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-push-item .pi-sub { font-size: 11px; color: #9aa4b2; margin-top: 3px; }
.dash-push-item .pi-btn { flex-shrink: 0; font-size: 12px; border-radius: 4px; padding: 4px 10px; border: 1px solid #28b39c; color: #28b39c; background: #fff; cursor: default; }
.dash-push-item .pi-btn.on { background: #28b39c; color: #fff; border-color: #28b39c; }

/* 跟进记录时间轴 */
.dash-log-list { max-height: 268px; overflow: auto; padding-right: 4px; }
.dash-log-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #eef0f3; }
.dash-log-item:last-child { border-bottom: none; }
.dash-log-item .lg-time { font-size: 11px; color: #9aa4b2; width: 74px; flex-shrink: 0; font-family: Arial; padding-top: 2px; }
.dash-log-item .lg-body { flex: 1; min-width: 0; }
.dash-log-item .lg-head { font-size: 13px; color: #333; }
.dash-log-item .lg-head b { color: #1d2939; }
.dash-log-item .lg-note { font-size: 12px; color: #77808f; margin-top: 4px; line-height: 1.5; }
.dash-log-item .lg-foot { font-size: 11px; color: #9aa4b2; margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-log-item .lg-foot i { color: #28b39c; }
.dash-log-empty { font-size: 13px; color: #9aa4b2; padding: 24px 0; text-align: center; }

@media (max-width: 1200px) {
  .dash-visit-kpis { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
  .dash-visit-kpis { grid-template-columns: 1fr 1fr !important; }
  .dash-visit-kpis .dash-pk-card { padding: 10px 10px !important; }
  .dash-visit-kpis .dash-pk-card > div:nth-child(2) { font-size: 17px !important; }
  .dash-visit-kpis .dash-pk-card > div:nth-child(1) { font-size: 11px !important; }
  .dash-visit-kpis .dash-pk-card > div:nth-child(3) { font-size: 10px !important; }
  .dash-push-queue, .dash-log-list { max-height: none !important; }
}

