* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  background: #eef2f7; color: #2c3e50; font-size: 14px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, #16304f 0%, #1e3a5f 60%, #24507f 100%);
  color: #fff; padding: 0 24px; height: 58px;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 8px rgba(16,42,72,.25);
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.brand::before { content: "📊"; margin-right: 8px; }
.nav-btn {
  background: none; border: none; color: #b8c9dc; font-size: 14px;
  padding: 8px 18px; margin-left: 6px; cursor: pointer; border-radius: 8px; transition: .15s;
}
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-btn.active { background: #fff; color: #1e3a5f; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.page { max-width: 1440px; margin: 0 auto; padding: 22px 24px 60px; }

/* 数据展示页（伙伴/小组维度表格）独立滚动，让表头可 sticky 吸顶 */
#page-dashboard {
  height: calc(100vh - 58px);
  overflow: auto;
  position: relative;
  padding-top: 0; /* 顶头：滚动到最顶时表头不留 22px 空隙 */
}
/* 通过 ?page=dashboard 嵌入（顶部导航已隐藏）时占满全高，不留空隙 */
#page-dashboard.no-topbar {
  height: 100vh;
}
/* 关键：table-wrap 不能成为滚动容器，否则 sticky 失效 */
#page-dashboard .table-wrap {
  overflow: visible;
}

/* 工具栏 */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end;
  background: #fff; border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 18px;
}
.control label { display: block; font-size: 12px; color: #8492a6; margin-bottom: 6px; font-weight: 600; }
.control.grow { flex: 1; min-width: 160px; }
select, input[type=text] {
  height: 36px; padding: 0 12px; border: 1px solid #d5dde7; border-radius: 8px;
  font-size: 14px; background: #fff; color: #2c3e50; min-width: 150px; width: 100%; transition: .15s;
}
select:focus, input[type=text]:focus { outline: none; border-color: #1e6bd6; box-shadow: 0 0 0 3px rgba(30,107,214,.12); }
.seg { display: inline-flex; border: 1px solid #d5dde7; border-radius: 9px; overflow: hidden; background: #f4f7fb; padding: 3px; }
.seg-btn {
  border: none; background: transparent; padding: 7px 20px; cursor: pointer;
  font-size: 14px; color: #556; border-radius: 7px; transition: .15s; font-weight: 600;
}
.seg-btn.active { background: #1e6bd6; color: #fff; box-shadow: 0 1px 3px rgba(30,107,214,.3); }

/* 汇总卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
  position: relative; background: #fff; border-radius: 12px; padding: 16px 18px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden; transition: .15s;
  border-top: 3px solid #d5dde7;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.card .ic {
  position: absolute; right: 12px; top: 12px; font-size: 26px; opacity: .18; line-height: 1;
}
.card .k { font-size: 12px; color: #8492a6; font-weight: 600; }
.card .v { font-size: 24px; font-weight: 700; margin-top: 6px; color: #1e3a5f; font-variant-numeric: tabular-nums; }
.card .v small { font-size: 12px; font-weight: 400; color: #8492a6; }
.card.c-blue { border-top-color: #1e6bd6; }
.card.c-indigo { border-top-color: #4f46e5; }
.card.c-red { border-top-color: #dc2626; }
.card.c-red .v { color: #dc2626; }
.card.c-amber { border-top-color: #d97706; }
.card.c-teal { border-top-color: #0891b2; }

/* 数据表 */
.table-wrap {
  background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow-x: auto; overflow-y: visible;
}
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
#data-table thead th {
  position: sticky; top: 0; background: linear-gradient(180deg, #24425f 0%, #1e3a5f 100%);
  color: #fff; font-size: 13px; font-weight: 600; padding: 12px 12px; text-align: center;
  cursor: pointer; user-select: none; letter-spacing: .3px;
  border-right: 1px solid rgba(255,255,255,.08); z-index: 3;
}
#data-table thead th:first-child { border-top-left-radius: 12px; }
#data-table thead th:last-child { border-top-right-radius: 12px; border-right: none; }
#data-table thead th:hover { background: #2a4d75; }
#data-table thead th .arrow { font-size: 10px; color: #7fd0ff; }
#data-table tbody td {
  padding: 9px 12px; text-align: center; border-bottom: 1px solid #eef2f7;
  font-variant-numeric: tabular-nums;
}
#data-table tbody tr:nth-child(even) { background: #f8fafc; }
#data-table tbody tr:hover { background: #eaf2fb; }
#data-table td.name-cell {
  text-align: left; font-weight: 600; position: sticky; left: 0; background: #fff; z-index: 2; min-width: 150px;
}
#data-table tbody tr:nth-child(even) td.name-cell { background: #f8fafc; }
#data-table tr:hover td.name-cell { background: #eaf2fb; }
#data-table td.sub-cell { color: #8492a6; font-size: 12px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  font-size: 13px; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.15);
  vertical-align: middle; margin-right: 8px;
}
#data-table td.name-cell .nm { vertical-align: middle; }
#data-table td.name-cell .nm-abn {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  font-size: 11px; font-weight: 700; line-height: 1; color: #fff;
  background: #dc2626; border-radius: 4px; padding: 2px 6px; white-space: nowrap;
}
td.bad { color: #d92b2b; font-weight: 700; background: #fdeaea; box-shadow: inset 0 0 0 1px #f3c4c4; }
tr:hover td.bad { background: #fbdcdc; }
.badge { display: inline-block; background: #eef3f9; color: #556; border-radius: 10px; font-size: 12px; padding: 1px 8px; }

/* 小组维度：组头行 */
#data-table tr.group-head td {
  background: linear-gradient(90deg, #16304f 0%, #24425f 100%); color: #fff; font-weight: 700; text-align: center;
  position: sticky; left: 0; border-bottom: 2px solid #fff; padding: 11px 12px; letter-spacing: .3px;
}
#data-table tr.group-head td.gh { text-align: left; font-size: 14px; }
#data-table tr.group-head td.gh small { font-weight: 400; color: #aec6de; margin-left: 6px; }
#data-table tr.group-head td.bad { color: #ffd2d2; background: #8a3030; }
#data-table tr.group-head:hover td { background: linear-gradient(90deg, #16304f 0%, #24425f 100%); }

/* 小组维度：每个小组的弱化列标题行（不抢眼，能看清每列是什么） */
#data-table.group-mode tr.group-subhead td {
  background: #eaeef4 !important; color: #6b7a8f; font-size: 11px; font-weight: 600;
  text-align: center; padding: 5px 8px; border-bottom: 2px solid #d5dde7;
  letter-spacing: .2px; border-left: none !important;
}
#data-table.group-mode tr.group-subhead td[colspan] {
  text-align: left; font-size: 11px; color: #9aaabc;
}
#data-table.group-mode tr.group-subhead:hover td { background: #eaeef4 !important; }

/* 小组维度：弱化表头 */
#data-table.group-mode thead th {
  background: #eef3f9; color: #5a6b80; font-size: 12px; font-weight: 600;
  border-right: 1px solid #e0e7f0; cursor: default;
}
#data-table.group-mode thead th:hover { background: #e7edf5; }
#data-table.group-mode thead th:first-child { border-top-left-radius: 12px; }
#data-table.group-mode thead th:last-child { border-top-right-radius: 12px; border-right: none; }

/* 分类背景色 + 边界 */
#data-table.group-mode td.col-refund,
#data-table.group-mode th.col-refund { background: #fef6f6; }
#data-table.group-mode td.col-comm,
#data-table.group-mode th.col-comm { background: #f3f8fe; }
#data-table.group-mode td.col-referral,
#data-table.group-mode th.col-referral { background: #f7f4fe; }
#data-table.group-mode td.col-save,
#data-table.group-mode th.col-save { background: #fefbf3; }
/* 分类边界线 */
#data-table.group-mode td.col-refund,
#data-table.group-mode th.col-refund { border-left: 2px solid #f0d6d6; }
#data-table.group-mode td.col-save,
#data-table.group-mode th.col-save { border-left: 2px solid #f0e0b8; }
#data-table.group-mode td.col-comm,
#data-table.group-mode th.col-comm { border-left: 2px solid #c8ddf0; }
#data-table.group-mode td.col-referral,
#data-table.group-mode th.col-referral { border-left: 2px solid #d8cdf0; }
/* 组头行也加分类色（半透明叠加在深色上） */
#data-table.group-mode tr.group-head td.col-refund { background: #3a2530 !important; border-left: 2px solid #5a3540; }
#data-table.group-mode tr.group-head td.col-save { background: #3a3525 !important; border-left: 2px solid #5a4f35; }
#data-table.group-mode tr.group-head td.col-comm { background: #253040 !important; border-left: 2px solid #354f70; }
#data-table.group-mode tr.group-head td.col-referral { background: #2f2a3a !important; border-left: 2px solid #4a4060; }
/* 行hover时保持分类色 */
#data-table.group-mode tbody tr:hover td.col-refund { background: #fdeaea; }
#data-table.group-mode tbody tr:hover td.col-comm { background: #eaf3fc; }
#data-table.group-mode tbody tr:hover td.col-referral { background: #f0ebfc; }
#data-table.group-mode tbody tr:hover td.col-save { background: #fdf6e8; }
/* bad 标红叠加分类色 */
#data-table.group-mode td.col-refund.bad { background: #fbdcdc !important; }
#data-table.group-mode td.col-comm.bad { background: #fbdcdc !important; }
#data-table.group-mode td.col-referral.bad { background: #fbdcdc !important; }
#data-table.group-mode td.col-save.bad { background: #fbdcdc !important; }

/* 伙伴维度（非 group-mode）：同样的分类背景色 + 边界 + bad 叠加 */
#data-table:not(.group-mode) tbody td.col-refund { background: #fef6f6; }
#data-table:not(.group-mode) tbody td.col-comm { background: #f3f8fe; }
#data-table:not(.group-mode) tbody td.col-referral { background: #f7f4fe; }
#data-table:not(.group-mode) tbody td.col-save { background: #fefbf3; }
#data-table:not(.group-mode) tbody td.col-refund { border-left: 2px solid #f0d6d6; }
#data-table:not(.group-mode) tbody td.col-save { border-left: 2px solid #f0e0b8; }
#data-table:not(.group-mode) tbody td.col-comm { border-left: 2px solid #c8ddf0; }
#data-table:not(.group-mode) tbody td.col-referral { border-left: 2px solid #d8cdf0; }
#data-table:not(.group-mode) tbody tr:hover td.col-refund { background: #fdeaea; }
#data-table:not(.group-mode) tbody tr:hover td.col-comm { background: #eaf3fc; }
#data-table:not(.group-mode) tbody tr:hover td.col-referral { background: #f0ebfc; }
#data-table:not(.group-mode) tbody tr:hover td.col-save { background: #fdf6e8; }
#data-table:not(.group-mode) td.col-refund.bad,
#data-table:not(.group-mode) td.col-comm.bad,
#data-table:not(.group-mode) td.col-referral.bad,
#data-table:not(.group-mode) td.col-save.bad { background: #fbdcdc !important; box-shadow: inset 0 0 0 1px #f3c4c4; }
/* 伙伴维度数据条 bad 颜色 */
#data-table:not(.group-mode) td.bad .mini-bar-val { color: #d92b2b; }
/* 伙伴维度表头分类色（在深蓝底上微调） */
#data-table:not(.group-mode) thead th.col-refund { border-bottom: 3px solid #e8a8a8; }
#data-table:not(.group-mode) thead th.col-save { border-bottom: 3px solid #e8d098; }
#data-table:not(.group-mode) thead th.col-comm { border-bottom: 3px solid #a8c8e8; }
#data-table:not(.group-mode) thead th.col-referral { border-bottom: 3px solid #b8a8e8; }

/* mini 数据条 */
.mini-bar { height: 14px; background: #e8edf3; border-radius: 3px; overflow: hidden; margin-bottom: 2px; }
.mini-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.mini-bar-val { font-size: 12px; color: #44546a; font-weight: 600; font-variant-numeric: tabular-nums; }
#data-table.group-mode td.bad .mini-bar-val { color: #d92b2b; }

/* 最好/最差标签 */
.bw-tag {
  display: inline-block; font-size: 10px; font-weight: 700; border-radius: 3px;
  padding: 0 4px; margin-left: 4px; line-height: 16px; vertical-align: middle;
}
.bw-best { background: #d4f0dd; color: #1a8a3a; }
.bw-worst { background: #fdeaea; color: #c92b2b; }
.bw-follow { background: #fff3cd; color: #8a6d10; border: 1px solid #ffc107; padding: 0 3px; }
.num-good { color: #1a8a3a; font-weight: 700; }

.hint { color: #8492a6; font-size: 12px; margin-top: 10px; }
.empty { text-align: center; color: #8492a6; padding: 60px 0; }

/* 数据分析页 */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0; }
.chart-box { background: #fbfcfe; border: 1px solid #eef2f7; border-radius: 10px; padding: 14px 16px; }
.chart-box h3 { font-size: 14px; color: #1e3a5f; margin-bottom: 10px; }
.chart-hold { height: 260px; }
.tbl-title { font-size: 15px; color: #1e3a5f; margin: 20px 0 10px; }
#anomaly-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
#anomaly-table thead th { background: #eef3f9; color: #33475b; font-size: 13px; padding: 9px 10px; text-align: center; border-bottom: 2px solid #d5dde7; }
#anomaly-table tbody td { padding: 7px 10px; text-align: center; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
#anomaly-table tbody tr:hover { background: #f6f9fd; }
#anomaly-table td.name-cell { text-align: left; font-weight: 600; }
#anomaly-table td.sub-cell { color: #8492a6; font-size: 12px; }
#anomaly-table td.bad-label { color: #d92b2b; font-weight: 600; text-align: left; }
#anomaly-table td.bad { color: #d92b2b; font-weight: 700; background: #fdeaea; }

/* 小组维度详细分析 */
.ga-card { background: #fff; border: 1px solid #e6ecf2; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.05); margin-bottom: 18px; overflow: hidden; }
.ga-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; background: #2f3a4a; color: #fff; }
.ga-gname { font-size: 15px; font-weight: 700; }
.ga-meta { font-size: 12px; opacity: .85; }
.ga-empty { padding: 18px 16px; color: #8492a6; font-size: 13px; }
.ga-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.ga-table thead th { background: #eef3f9; color: #33475b; font-size: 12px; padding: 7px 9px; text-align: center; border-bottom: 2px solid #d5dde7; border-left: 1px solid #e3eaf2; }
.ga-table thead th:first-child { border-left: none; text-align: left; position: sticky; left: 0; background: #eef3f9; z-index: 1; }
.ga-table tbody td { padding: 6px 9px; text-align: center; border-bottom: 1px solid #f0f3f7; font-size: 13px; border-left: 1px solid #f0f3f7; }
.ga-table tbody td:first-child { text-align: left; font-weight: 600; position: sticky; left: 0; background: #fff; border-left: none; z-index: 1; }
.ga-table tbody tr:hover td { background: #f6f9fd; }
.ga-table tbody tr:hover td:first-child { background: #f6f9fd; }
.ga-table td.bad { color: #d92b2b; font-weight: 700; background: #fdeaea; }
.empty-li { text-align: center; color: #8492a6; padding: 24px 0; font-size: 13px; }
@media (max-width: 800px) { .chart-row { grid-template-columns: 1fr; } }

/* 主按钮 */
.btn-primary {
  background: #1e6bd6; color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s;
  box-shadow: 0 1px 3px rgba(30,107,214,.25);
}
.btn-primary:hover { background: #1a5dc0; }
.btn-primary:disabled { background: #9db8dc; cursor: not-allowed; }

/* 数据分析：5 大指标模块 */
.mod {
  background: #fff; border-radius: 10px; padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 22px;
}
.mod-title {
  font-size: 16px; font-weight: 700; color: #1e3a5f; margin: 0 0 4px;
  padding-left: 10px; border-left: 4px solid #1e6bd6;
}
.mod-week { font-size: 12px; color: #8492a6; font-weight: 400; }
.mod-summary {
  color: #44546a; font-size: 13px; line-height: 1.7; margin: 10px 0 16px;
  padding-bottom: 14px; border-bottom: 1px dashed #e3eaf2;
}
.m-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.m-card {
  flex: 1; min-width: 120px; background: #f7fafd; border: 1px solid #e6ecf2;
  border-radius: 8px; padding: 12px 14px; text-align: center;
}
.m-card .m-k { font-size: 12px; color: #8492a6; margin-bottom: 6px; }
.m-card .m-v { font-size: 20px; font-weight: 700; color: #1e3a5f; }
.m-card-rank { background: #eef4fb; border-color: #cfdfef; }
.m-card-rank .m-v { color: #1e6bd6; }

.mod-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.mod-table thead th {
  background: #eef3f9; color: #33475b; font-size: 12px; padding: 8px 10px;
  text-align: center; border-bottom: 2px solid #d5dde7;
}
.mod-table thead th:first-child { text-align: left; }
.mod-table tbody td {
  padding: 7px 10px; text-align: center; border-bottom: 1px solid #f0f3f7; font-size: 13px;
}
.mod-table tbody td.name-cell { text-align: left; font-weight: 600; }
.mod-table tbody tr:hover td { background: #f6f9fd; }
.mod-table td.num-td { font-variant-numeric: tabular-nums; }
.mod-table td.bad { color: #d92b2b; font-weight: 700; }
.mod-table td.bad .bar-val { color: #d92b2b; font-weight: 700; }

/* 色块条形 */
.bar-td { min-width: 120px; }
.bar-wrap { height: 16px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin-bottom: 2px; }
.bar { height: 100%; border-radius: 4px; }
.bar-val { font-size: 12px; color: #44546a; font-weight: 600; font-variant-numeric: tabular-nums; }

.mod-advice {
  margin: 14px 0 0; padding: 10px 14px; font-size: 13px; line-height: 1.7;
  color: #1e5aa8; background: #eef4fb; border-left: 4px solid #1e6bd6; border-radius: 0 8px 8px 0;
}

/* 本组异常总览 */
.mod-overview { border-left: 4px solid #d92b2b; }
.mod-overview .mod-title { border-left: none; padding-left: 0; }
.ov-block { margin-top: 14px; }
.ov-label { font-size: 13px; font-weight: 700; color: #33475b; margin-bottom: 8px; }
.ov-hint { font-size: 12px; font-weight: 400; color: #8492a6; margin-left: 6px; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-chip {
  background: #fdeaea; color: #d92b2b; border: 1px solid #f3c9c9; border-radius: 16px;
  font-size: 13px; font-weight: 600; padding: 4px 12px; display: inline-flex; align-items: center; gap: 6px;
}
.ov-chip em { font-style: normal; font-size: 11px; background: #d92b2b; color: #fff; border-radius: 8px; padding: 0 6px; }
.ov-none { color: #2fa968; font-size: 13px; font-weight: 600; }
.ov-table td { vertical-align: top; }
.ov-n { color: #d92b2b; }
.ov-bad { text-align: left; }
.ov-tag {
  display: inline-block; background: #fdeaea; color: #d92b2b; border-radius: 4px;
  font-size: 12px; padding: 1px 8px; margin: 1px 3px 1px 0;
}

/* 后台 */
.panel {
  background: #fff; border-radius: 10px; padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px;
}
.panel h2 { font-size: 16px; margin-bottom: 8px; color: #1e3a5f; }
.sub { color: #8492a6; font-size: 13px; margin-bottom: 14px; line-height: 1.7; }
.week-input-row, .week-create-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.week-input-row label, .week-create-row label { font-size: 13px; color: #5a6a7e; white-space: nowrap; }
.week-input-row input, .week-create-row input {
  flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid #c8d4e0; border-radius: 6px;
  font-size: 14px; color: #1e3a5f; background: #fff;
}
.week-input-row input:focus, .week-create-row input:focus {
  outline: none; border-color: #1e6bd6; box-shadow: 0 0 0 3px rgba(30,107,214,.12);
}
.dropzone {
  border: 2px dashed #b8c9dc; border-radius: 10px; padding: 36px;
  text-align: center; color: #8492a6; cursor: pointer; transition: .15s;
}
.dropzone.drag { border-color: #1e6bd6; background: #f0f6ff; color: #1e6bd6; }
.dropzone .link { color: #1e6bd6; text-decoration: underline; }
.file-list { list-style: none; margin: 12px 0; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid #f0f3f7; font-size: 13px;
}
.file-list .tag { font-size: 12px; border-radius: 4px; padding: 2px 8px; background: #e8f4e8; color: #2a7d2a; }
.file-list .tag.unknown { background: #fdeaea; color: #d92b2b; }
.file-list .rm { color: #d92b2b; cursor: pointer; border: none; background: none; font-size: 13px; }
.empty-badge { font-size: 11px; background: #fff3cd; color: #8a6d10; padding: 1px 6px; border-radius: 4px; border: 1px solid #ffe08a; margin-left: 4px; }
button.primary {
  background: #1e6bd6; color: #fff; border: none; border-radius: 8px;
  padding: 10px 26px; font-size: 15px; cursor: pointer; margin-top: 8px;
}
button.primary:disabled { background: #b8c9dc; cursor: not-allowed; }
.msg { margin-top: 12px; font-size: 13px; min-height: 20px; }
.msg.ok { color: #2a7d2a; }
.msg.err { color: #d92b2b; }

.history-table { width: 100%; }
.history-table th, .history-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.history-table th { background: #eef3f9; color: #33475b; }
.history-table .op-btn { border: none; background: none; cursor: pointer; font-size: 13px; margin: 0 5px; }
.history-table .view { color: #1e6bd6; }
.history-table .del { color: #d92b2b; }

/* 组织架构调整 */
.org-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
button.secondary {
  background: #fff; color: #1e3a5f; border: 1px solid #b8c9dc; border-radius: 8px;
  padding: 8px 18px; font-size: 14px; cursor: pointer;
}
button.secondary:hover { border-color: #1e6bd6; color: #1e6bd6; }
.org-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.org-group {
  border: 1px solid #e3e9f0; border-radius: 10px; padding: 12px 14px; background: #fbfcfe;
}
.org-group.ungrouped { grid-column: 1 / -1; background: #fdf6f6; border-color: #f0d6d6; }
.org-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.org-group-head input.org-gname { width: 130px; font-weight: 700; color: #1e3a5f; }
.org-group-head label { font-size: 12px; color: #8492a6; display: flex; align-items: center; gap: 6px; }
.org-group-head input.org-leader { width: 110px; }
.org-group-head .org-del-group {
  margin-left: auto; border: none; background: none; color: #d92b2b; cursor: pointer; font-size: 13px;
}
.org-members { list-style: none; }
.org-members li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 5px 0; border-bottom: 1px dashed #eef2f7; font-size: 13px;
}
.org-members li:last-child { border-bottom: none; }
.org-members .mname { font-weight: 600; }
.org-members select { width: 140px; height: 30px; }
.org-members .empty-li { color: #b0bac8; justify-content: center; }
.empty-li { color: #b0bac8; text-align: center; padding: 10px; }

@media (max-width: 800px) {
  .page { padding: 12px; }
  .toolbar { gap: 10px; }
}

/* 表扬榜 */
.praise-board {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 12px 0 16px; padding: 12px 16px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff4d6 100%);
  border: 1px solid #f0d878; border-radius: 10px;
}
.praise-title { font-size: 14px; font-weight: 700; color: #8a6d10; white-space: nowrap; }
.praise-item {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 8px; padding: 6px 14px 6px 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.praise-item .avatar { width: 28px; height: 28px; font-size: 14px; }
.praise-name { font-weight: 700; color: #1e3a5f; font-size: 14px; }
.praise-val { font-size: 14px; font-weight: 700; color: #d97706; font-variant-numeric: tabular-nums; }

/* 模块扩充内容 */
.enrich-grid {
  display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px;
}
.enrich-item {
  flex: 1; min-width: 110px; background: #f7fafd; border: 1px solid #e6ecf2;
  border-radius: 8px; padding: 10px 12px; text-align: center;
}
.enrich-k { display: block; font-size: 11px; color: #8492a6; margin-bottom: 4px; font-weight: 600; }
.enrich-v { font-size: 16px; font-weight: 700; color: #1e3a5f; font-variant-numeric: tabular-nums; }
.enrich-v.v-warn { color: #d92b2b; }
.enrich-v.v-good { color: #2a7d2a; }
.enrich-note {
  margin: 6px 0 12px; padding: 8px 12px; font-size: 13px; line-height: 1.6;
  color: #c92b2b; background: #fef6f6; border-left: 3px solid #f0b8b8; border-radius: 0 6px 6px 0;
}

/* 伙伴数据总结与行动建议 */
.mod-ps { border-left: 4px solid #4f46e5; }
.ps-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ps-card {
  background: #fbfcfe; border: 1px solid #e6ecf2; border-radius: 10px; padding: 14px 16px;
  transition: .15s;
}
.ps-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.ps-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ps-head .avatar { width: 28px; height: 28px; font-size: 14px; }
.ps-name { font-weight: 700; color: #1e3a5f; font-size: 15px; flex: 1; }
.ps-badge {
  font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 10px;
}
.ps-badge.lv-good { background: #d4f0dd; color: #1a8a3a; }
.ps-badge.lv-warn { background: #fef3cd; color: #8a6d10; }
.ps-badge.lv-bad { background: #fdeaea; color: #c92b2b; }
.ps-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ps-metric {
  font-size: 12px; background: #eef3f9; color: #44546a; border-radius: 4px;
  padding: 2px 8px; font-variant-numeric: tabular-nums;
}
.ps-metric.ps-m-bad { background: #fdeaea; color: #c92b2b; font-weight: 600; }
.ps-assess { font-size: 13px; color: #44546a; line-height: 1.6; margin-bottom: 8px; }
.ps-tips {
  font-size: 13px; color: #1e5aa8; line-height: 1.6;
  padding: 8px 12px; background: #eef4fb; border-radius: 6px;
}

/* 重点关注伙伴 */
.focus-partners-section { margin: 10px 0 14px; }
.fp-title { font-size: 14px; font-weight: 700; color: #1e3a5f; margin-bottom: 8px; }
.fp-title .fp-count { font-size: 12px; font-weight: 400; color: #8492a6; }
.fp-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fp-card {
  background: linear-gradient(135deg, #fff9f5 0%, #fff7f0 100%);
  border: 1px solid #f0d5c5; border-radius: 7px;
  border-left: 3px solid #dc2626; padding: 7px 9px;
}
.fp-head { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.fp-head .avatar { width: 22px; height: 22px; font-size: 11px; }
.fp-name { font-size: 13px; font-weight: 700; color: #1e3a5f; }
.fp-badge {
  font-size: 9px; font-weight: 700; color: #fff; background: #dc2626;
  border-radius: 3px; padding: 0 5px; margin-left: auto;
}
.fp-metrics { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.fp-metric {
  font-size: 10.5px; background: #fff; border: 1px solid #e6ecf2; border-radius: 3px;
  padding: 2px 5px; color: #33475b; font-weight: 600; font-variant-numeric: tabular-nums;
}
.fp-metric.fp-bad {
  color: #c92b2b; background: #fef2f2; border-color: #fcd0d0;
}
.fp-assess { font-size: 11.5px; color: #44546a; line-height: 1.5; margin: 0; }
.grp-abn {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700;
  color: #fff; background: #dc2626; border-radius: 4px; padding: 1px 8px; vertical-align: middle;
}
.fp-tips p { font-size: 13px; line-height: 1.7; color: #1e3a5f; margin: 0; padding: 3px 0; }

/* 组长建议 */
.leader-advice {
  margin: 14px 0 18px; padding: 16px 18px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
  border: 1px solid #c5d9f0; border-radius: 10px;
  border-left: 4px solid #1e6bd6;
}
.la-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.la-head .avatar { width: 32px; height: 32px; font-size: 15px; }
.la-label {
  font-size: 11px; font-weight: 700; color: #fff; background: #1e6bd6;
  border-radius: 4px; padding: 1px 8px;
}
.la-name { font-size: 16px; font-weight: 700; color: #1e3a5f; }
.la-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lm-item {
  font-size: 13px; background: #fff; border: 1px solid #dde6f0; border-radius: 6px;
  padding: 6px 12px; color: #33475b; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lm-item em { font-style: normal; font-size: 11px; color: #8492a6; margin-left: 4px; }
.lm-item.lm-good { border-color: #b8e0c0; background: #f0faf2; }
.lm-item.lm-good em { color: #2a7d2a; }
.lm-item.lm-bad { border-color: #f0c0c0; background: #fef6f6; }
.lm-item.lm-bad em { color: #d92b2b; }
.la-tips p {
  font-size: 13px; line-height: 1.7; color: #1e3a5f; margin: 0;
  padding: 4px 0; border-bottom: 1px dashed #d5dde7;
}
.la-tips p:last-child { border-bottom: none; }

/* 导出按钮组 */
.export-btns { display: flex; gap: 8px; }
.btn-pdf { background: #dc2626; box-shadow: 0 1px 3px rgba(220,38,38,.25); }
.btn-pdf:hover { background: #c81e1e; }
.btn-pdf:disabled { background: #e8a0a0; }

/* 全部主管数据分析建议 */
.mod-leaders { border-left: 4px solid #0891b2; }
.leaders-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.leader-card {
  background: #fbfcfe; border: 1px solid #e6ecf2; border-radius: 10px; padding: 16px 18px;
  transition: .15s; border-top: 3px solid #d5dde7;
}
.leader-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.leader-card.lc-good { border-top-color: #2a7d2a; }
.leader-card.lc-warn { border-top-color: #d97706; }
.leader-card.lc-bad { border-top-color: #dc2626; }
.lc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lc-head .avatar { width: 32px; height: 32px; font-size: 15px; }
.lc-name { font-size: 16px; font-weight: 700; color: #1e3a5f; }
.lc-badge { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 8px; }
.lc-badge.lc-leader { background: #1e6bd6; color: #fff; }
.lc-badge.lc-noleader { background: #b0bac8; color: #fff; }
.lc-group { font-size: 13px; color: #8492a6; font-weight: 600; }
.lc-level { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 10px; margin-left: auto; }
.lc-level.lc-good { background: #d4f0dd; color: #1a8a3a; }
.lc-level.lc-warn { background: #fef3cd; color: #8a6d10; }
.lc-level.lc-bad { background: #fdeaea; color: #c92b2b; }
.lc-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.lc-metric {
  background: #f7fafd; border: 1px solid #e6ecf2; border-radius: 6px;
  padding: 8px 10px; text-align: center; font-variant-numeric: tabular-nums;
}
.lc-metric.lc-rk-good { border-color: #b8e0c0; background: #f0faf2; }
.lc-metric.lc-rk-bad { border-color: #f0c0c0; background: #fef6f6; }
.lc-mk { display: block; font-size: 11px; color: #8492a6; margin-bottom: 3px; font-weight: 600; }
.lc-mv { font-size: 15px; font-weight: 700; color: #1e3a5f; }
.lc-rank { display: block; font-size: 10px; color: #8492a6; margin-top: 2px; }
.lc-assess { font-size: 13px; color: #44546a; line-height: 1.6; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #e3eaf2; }
.lc-tips p { font-size: 13px; line-height: 1.7; color: #1e5aa8; margin: 0; padding: 3px 0; }

/* 文字汇总（可复制发群） */
.mod-chat-summary { border-left: 4px solid #7c3aed; }
.mod-chat-summary .mod-title { border-left-color: #7c3aed; }
.chat-summary-wrap { position: relative; }
.chat-summary-text {
  width: 100%; min-height: 220px; padding: 14px 16px;
  border: 1px solid #e3eaf2; border-radius: 10px;
  background: #f8fafc; color: #2c3e50; font-size: 14px; line-height: 1.8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  resize: vertical; outline: none;
}
.chat-summary-text:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.chat-summary-copy {
  position: absolute; top: 12px; right: 12px;
}
