/* ============================================================
   智慧自动通报 · 样式
   主色：联通红 #E60012 ｜ 浅色扁平
   ============================================================ */

:root {
  --tb-red: #E60012;
  --tb-red-deep: #C9000F;
  --tb-red-soft: #FFF1F2;
  --tb-ink: #1D2129;
  --tb-ink-2: #4A5366;
  --tb-muted: #6B7488;
  --tb-faint: #9AA3B5;
  --tb-line: #E8ECF3;
  --tb-line-2: #F2F5FA;
  --tb-bg: #F5F7FA;
  --tb-green: #2E9E5B;
  --tb-orange: #FA8C16;
  --tb-blue: #1990FF;
  --tb-purple: #722ED1;
  --tb-teal: #13C2C2;
  --tb-shadow: 0 1px 3px rgba(20, 25, 40, .04), 0 6px 20px rgba(20, 25, 40, .05);
  --tb-radius: 14px;
}



/* 基础重置交给 KPI 的 01-base.css，这里只保留作用域内的定义 */
#tb-root {
  /* 布局由 02-kit.css 的 .pg-wrap 接管，这里只保留配色 */
  color: var(--tb-ink);
}

#tb-root a { color: var(--tb-red); text-decoration: none; }
#tb-root button { font-family: inherit; }


/* ---------------- 按钮 ---------------- */
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; cursor: pointer; transition: .15s; white-space: nowrap;
  background: #fff; color: var(--tb-ink-2); font-family: inherit;
}
.tb-btn-red { background: var(--tb-red); color: #fff; }
.tb-btn-red:hover { background: var(--tb-red-deep); }
.tb-btn-ghost { background: #fff; border-color: var(--tb-line); color: var(--tb-ink-2); }
.tb-btn-ghost:hover { border-color: #CFD8E6; background: #FAFBFD; }
.tb-btn-line { background: #fff; border-color: var(--tb-line); color: var(--tb-ink-2); }
.tb-btn-line:hover { border-color: var(--tb-red); color: var(--tb-red); }
.tb-btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.tb-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 布局 ---------------- */

.tb-card {
  background: #fff; border-radius: var(--tb-radius); box-shadow: var(--tb-shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.tb-card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.tb-card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.2px; }
.tb-card-h .hint { font-size: 12px; color: var(--tb-faint); }
.tb-card-h .right { display: flex; align-items: center; gap: 8px; }

.tb-grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }

/* ---------------- 指标卡 ---------------- */
.tb-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }
.tb-kpi {
  background: #fff; border-radius: var(--tb-radius); padding: 16px 18px 14px;
  box-shadow: var(--tb-shadow); position: relative; overflow: hidden;
}
.tb-kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--tb-red));
}
.tb-kpi .k-label { font-size: 12.5px; color: var(--tb-muted); display: flex; align-items: center; gap: 6px; }
.tb-kpi .k-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--tb-red)); }
.tb-kpi .k-val {
  font-size: 27px; font-weight: 600; letter-spacing: -.8px; line-height: 1.2; margin: 7px 0 2px;
  font-variant-numeric: tabular-nums;
}
.tb-kpi .k-val em { font-size: 13px; font-weight: 400; color: var(--tb-faint); font-style: normal; margin-left: 3px; }
.tb-kpi .k-sub { font-size: 11.5px; color: var(--tb-faint); display: flex; align-items: center; gap: 6px; }
.tb-kpi .up { color: var(--tb-red); }        /* 涨：红 */
.tb-kpi .down { color: var(--tb-green); }    /* 跌：绿 */
.tb-kpi .flat { color: var(--tb-faint); }

/* ---------------- 图表 ---------------- */
.tb-chart { width: 100%; height: 260px; }
.tb-chart-sm { height: 200px; }
.tb-chart-lg { height: 300px; }

/* ---------------- 筛选条 ---------------- */
.tb-filterbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border-radius: var(--tb-radius); padding: 12px 16px;
  box-shadow: var(--tb-shadow); margin-bottom: 16px;
}
.tb-filterbar label { font-size: 12.5px; color: var(--tb-muted); }
.tb-filterbar select, .tb-filterbar input[type="text"] {
  height: 32px; border: 1px solid var(--tb-line); border-radius: 8px; padding: 0 10px;
  font-size: 12.5px; background: #fff; color: var(--tb-ink); font-family: inherit; outline: none; min-width: 96px;
}
.tb-filterbar select:focus, .tb-filterbar input:focus { border-color: var(--tb-red); }
.tb-filterbar .spacer { flex: 1; }

/* ---------------- 表格 ---------------- */
.tb-tbl-wrap { overflow-x: auto; }
table.tb-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb-tbl th {
  text-align: left; font-weight: 400; font-size: 12px; color: var(--tb-faint);
  padding: 9px 12px; background: #FAFBFD; border-bottom: 1px solid var(--tb-line-2); white-space: nowrap;
}
table.tb-tbl td {
  padding: 11px 12px; border-bottom: 1px solid var(--tb-line-2); color: var(--tb-ink-2); vertical-align: middle;
}
table.tb-tbl tr:last-child td { border-bottom: none; }
table.tb-tbl tbody tr:hover td { background: #FCFDFF; }
table.tb-tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tb-tbl .strong { color: var(--tb-ink); font-weight: 500; }
table.tb-tbl .rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px; background: #F2F5FA; color: var(--tb-faint);
  font-size: 11px; margin-right: 8px;
}
table.tb-tbl tr.top1 .rank { background: var(--tb-red); color: #fff; }
table.tb-tbl tr.top2 .rank { background: #FFB3BA; color: #fff; }
table.tb-tbl tr.top3 .rank { background: #FFD7DB; color: #C9000F; }

.tb-mini-bar { height: 4px; background: var(--tb-line-2); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.tb-mini-bar i { display: block; height: 100%; background: var(--tb-red); border-radius: 2px; }

/* ---------------- 徽标 ---------------- */
.tb-tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 5px;
  background: #F2F5FA; color: var(--tb-muted); white-space: nowrap;
}
.tb-tag.red { background: var(--tb-red-soft); color: var(--tb-red); }
.tb-tag.green { background: #EAF7F0; color: var(--tb-green); }
.tb-tag.orange { background: #FFF7E8; color: #B26A00; }
.tb-tag.blue { background: #EAF4FF; color: #0B6BCB; }
.tb-tag.gray { background: #F2F5FA; color: var(--tb-faint); }

/* ---------------- 上传区 ---------------- */
.tb-up-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tb-up-box {
  border: 1.5px dashed #DCE3EF; border-radius: var(--tb-radius); background: #fff;
  padding: 22px 20px; text-align: center; transition: .18s; cursor: pointer; position: relative;
}
.tb-up-box:hover, .tb-up-box.drag { border-color: var(--tb-red); background: #FFFCFC; }
.tb-up-box .ico {
  width: 42px; height: 42px; border-radius: 12px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--tb-red-soft); color: var(--tb-red);
}
.tb-up-box h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; }
.tb-up-box p { margin: 0; font-size: 12px; color: var(--tb-faint); line-height: 1.7; }
.tb-up-box .state { margin-top: 12px; font-size: 12.5px; }
.tb-up-box .state.ok { color: var(--tb-green); }
.tb-up-box .state.err { color: var(--tb-red); }
.tb-up-box .bar { height: 3px; background: var(--tb-line-2); border-radius: 2px; margin-top: 12px; overflow: hidden; display: none; }
.tb-up-box .bar i { display: block; height: 100%; width: 0; background: var(--tb-red); transition: width .2s; }
.tb-up-box.busy .bar { display: block; }

/* ---------------- 上传结果 ---------------- */
.tb-result {
  background: #FAFBFD; border: 1px solid var(--tb-line-2); border-radius: 12px;
  padding: 14px 16px; margin-top: 14px; font-size: 13px;
}
.tb-result .r-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 500; }
.tb-result .r-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--tb-muted); font-size: 12.5px; }
.tb-result .r-row b { color: var(--tb-ink); font-weight: 500; }

/* ---------------- 码表 ---------------- */
.tb-miss-list { max-height: 420px; overflow-y: auto; }
.tb-miss-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--tb-line-2); font-size: 13px;
}
.tb-miss-item:last-child { border-bottom: none; }
.tb-miss-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tb-ink); }
.tb-miss-item .cnt { font-size: 12px; color: var(--tb-faint); font-variant-numeric: tabular-nums; }

/* ---------------- 空态 ---------------- */
.tb-empty { text-align: center; color: var(--tb-faint); padding: 60px 20px; font-size: 13.5px; }
.tb-empty .big { font-size: 36px; margin-bottom: 10px; opacity: .5; }

/* ---------------- 分页 ---------------- */
.tb-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--tb-muted); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .tb-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .g2, .g3, .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
  .tb-up-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .brand span { display: none; }
  .topbar-r { width: 100%; justify-content: space-between; }
  .tabs { top: 0; position: relative; padding: 0 10px; }
  .tb-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tb-kpi { padding: 13px 14px; }
  .tb-kpi .k-val { font-size: 22px; }
  .tb-card { padding: 14px 14px; }
  .tb-filterbar { padding: 10px 12px; }
}

/* ---------- 小屏顶栏优化 ---------- */
@media (max-width: 760px) {
  .topbar { padding: 10px 12px; }
  .topbar-l { flex: 1 1 auto; min-width: 0; }
  .topbar-r { flex: 1 1 100%; gap: 8px; }
  .period { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .period .tb-seg button { padding: 5px 10px; }
  .period .date-in { min-width: 0; width: 118px; flex: 0 0 auto; padding: 0 6px; font-size: 12.5px; }
  .tabs a { padding: 11px 12px 12px; font-size: 13.5px; }
  .tb-filterbar select, .tb-filterbar input[type="text"] { min-width: 0; flex: 1 1 120px; }
  .tb-filterbar label { flex: 0 0 auto; font-size: 12px; }
  .tb-kpi .k-val { font-size: 21px; }
  .tb-card-h .hint { display: none; }
}
@media (max-width: 420px) {
  .tb-kpis { grid-template-columns: 1fr 1fr; }
  .period .date-in { width: 106px; }
}

/* ================= 周期选择（子标签改用 .pg-tabs） ================= */
.tb-period { display: flex; align-items: center; gap: 8px; }
.tb-seg { display: inline-flex; background: #fff; border-radius: 9px; padding: 3px; box-shadow: var(--tb-shadow); }
.tb-seg button {
  border: none; background: transparent; padding: 5px 14px; border-radius: 7px;
  font-size: 13px; color: var(--tb-muted); cursor: pointer; transition: .15s;
}
.tb-seg button.active { background: var(--tb-red); color: #fff; font-weight: 500; }
.tb-date-in {
  height: 34px; border: 1px solid var(--tb-line); border-radius: 9px; padding: 0 10px;
  font-size: 13px; background: #fff; color: var(--tb-ink); font-family: inherit; outline: none;
  width: auto; flex: 0 0 auto;
}
.tb-date-in:focus { border-color: var(--tb-red); }
input.tb-date-in[type="date"], input.tb-date-in[type="month"] { width: 150px; }

.tb-filterbar .spacer { flex: 1; }

/* 小屏 */
@media (max-width: 820px) {
  .tb-period { width: 100%; justify-content: space-between; }
  .tb-kpis { grid-template-columns: repeat(2, 1fr); }
  .tb-kpi .k-val { font-size: 21px; }
  .tb-filterbar select, .tb-filterbar input[type="text"] { min-width: 0; flex: 1 1 120px; }
  input.tb-date-in[type="date"], input.tb-date-in[type="month"] { width: 130px; }
}

/* KPI 的 01-base.css 给所有 select/input 设了 width:100%，这里必须显式收回，
   否则筛选条里的下拉会各占一整行 */
.tb-filterbar select,
.tb-filterbar input[type="text"],
.tb-filterbar input[type="date"],
.tb-filterbar input[type="month"] {
  width: auto;
  flex: 0 0 auto;
  min-width: 96px;
  height: 32px;
  border: 1px solid var(--tb-line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12.5px;
  background: #fff;
  color: var(--tb-ink);
  font-family: inherit;
  outline: none;
}
.tb-filterbar input[type="text"] { min-width: 160px; }
.tb-filterbar select:focus,
.tb-filterbar input:focus { border-color: var(--tb-red); background: #fff; }
.tb-filterbar label { white-space: nowrap; }

/* 码表搜索框同理 */
#tb-code-kw { width: 180px !important; flex: 0 0 auto; }
.tb-form-row input[type="text"] { width: 100%; }

/* #tb-root a 的默认红色会盖掉按钮自身的白字，这里收回 */
#tb-root a.tb-btn-red { color: #fff; }
#tb-root a.tb-btn-line, #tb-root a.tb-btn-ghost { color: var(--tb-ink-2); }

/* ---------- 导入结果：增量统计 ---------- */
.tb-result .r-row .r-new b { color: var(--tb-green); }
.tb-result .r-row .r-upd b { color: var(--tb-orange); }
.tb-result .r-row .r-same b { color: var(--tb-faint); }
.tb-result .r-note {
  font-size: 11.5px; color: #A8B0C0; margin-top: 7px; line-height: 1.6;
}

/* ---------- 未匹配清单：两个操作按钮 ---------- */
.tb-miss-item { gap: 8px; }
.tb-miss-item .cnt { flex: 0 0 auto; margin-right: 2px; }
.tb-miss-item .tb-btn { flex: 0 0 auto; padding: 0 10px; font-size: 12px; }
.tb-miss-item .tb-btn-red { background: var(--tb-red); }

/* 码表表格操作列 */
.tb-code-ops { white-space: nowrap; }
.tb-code-ops .tb-btn { padding: 0 9px; height: 26px; font-size: 11.5px; margin-left: 4px; }

/* ---------- 码表新建/编辑弹窗 ---------- */
.code-dlg { display: flex; flex-direction: column; max-height: 88vh; }
.code-dlg-h { padding: 20px 24px 14px; border-bottom: 1px solid var(--tb-line-2); }
.code-dlg-h h3 { margin: 0 0 5px; font-size: 16.5px; font-weight: 600; color: var(--tb-ink); }
.code-dlg-h p { margin: 0; font-size: 12.5px; color: var(--tb-faint); line-height: 1.65; }
.code-dlg-b { padding: 16px 24px 6px; overflow-y: auto; }
.code-dlg-f {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px 18px; border-top: 1px solid var(--tb-line-2);
}

.code-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; min-width: 0; }
.code-field > label { font-size: 12.5px; color: var(--tb-muted); }
.code-field > label i { font-style: normal; color: var(--tb-red); margin-left: 2px; }
.code-field input[type="text"],
.code-field input[type="number"],
.code-field select {
  width: 100%; box-sizing: border-box; height: 38px;
  border: 1px solid var(--tb-line); border-radius: 9px; padding: 0 11px;
  font-size: 13.5px; font-family: inherit; color: var(--tb-ink);
  background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.code-field input:focus, .code-field select:focus {
  border-color: var(--tb-red); box-shadow: 0 0 0 3px rgba(230, 0, 18, .07);
}
.code-field input[readonly] { background: #FAFBFD; color: var(--tb-ink-2); }
.code-field select { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A93A6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }

.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.code-grid.m2 { grid-template-columns: 1fr 1fr; }

.code-checks { display: flex; gap: 18px; align-items: center; padding: 2px 0 4px; }
.code-checks label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--tb-ink-2); cursor: pointer;
}
.code-checks input { accent-color: var(--tb-red); width: 15px; height: 15px; }

.code-tip {
  margin-top: 4px; padding: 9px 12px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.6;
  background: #FFFBF0; border: 1px solid #F5E7C8; color: #7A6A2F;
}
.code-tip b { color: #B26A00; }
.code-tip.ok { background: #F3FAF6; border-color: #D6EEDF; color: #237A45; }

@media (max-width: 640px) {
  .code-grid, .code-grid.m2 { grid-template-columns: 1fr; gap: 0; }
  .code-dlg-b { padding: 14px 16px 4px; }
  .code-dlg-h { padding: 16px 16px 12px; }
  .code-dlg-f { padding: 12px 16px 16px; }
  .code-dlg-f .tb-btn { flex: 1; }
}

/* 未匹配清单的次要按钮：描边深一点，避免看起来像纯文字 */
.tb-miss-item .tb-btn-ghost {
  border-color: #C9D2E0; color: var(--tb-ink-2); background: #fff;
}
.tb-miss-item .tb-btn-ghost:hover { border-color: var(--tb-red); color: var(--tb-red); background: #FFF9F9; }

/* ---------- 可选可建组合控件（渠道/人员/单元/网格） ---------- */
.code-grid { align-items: start; }

.cc { position: relative; }
.cc input[type="text"] { padding-right: 34px; }

.cc-btn {
  position: absolute; right: 1px; top: 1px; width: 32px; height: 36px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #8A93A6; border-radius: 0 8px 8px 0; transition: .15s;
}
.cc-btn:hover { background: #F2F5FA; color: var(--tb-ink); }
.cc.open .cc-btn { color: var(--tb-red); }
.cc.open .cc-btn svg { transform: rotate(180deg); }
.cc-btn svg { transition: transform .15s; }

.cc-panel {
  margin-top: 6px; border: 1px solid var(--tb-line); border-radius: 10px;
  background: #fff; overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 25, 40, .07);
}
.cc-list { max-height: 192px; overflow-y: auto; }
.cc-group {
  padding: 7px 12px 4px; font-size: 11px; color: var(--tb-faint);
  letter-spacing: .2px;
}
.cc-item {
  padding: 8px 12px; font-size: 13px; color: var(--tb-ink-2);
  cursor: pointer; transition: background .12s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-item:hover { background: #F7F9FC; }
.cc-item.on { background: #FFF7F7; color: var(--tb-red); font-weight: 500; }
.cc-empty { padding: 16px 12px; font-size: 12.5px; color: var(--tb-faint); text-align: center; }
.cc-more { padding: 6px 12px 8px; font-size: 11.5px; color: #B7BECD; }

.cc-foot { border-top: 1px solid var(--tb-line-2); padding: 6px; }
.cc-new {
  width: 100%; height: 32px; box-sizing: border-box;
  border: 1px dashed #C9D2E0; border-radius: 7px; background: #FAFBFD;
  color: var(--tb-ink-2); font-size: 12.5px; font-family: inherit;
  cursor: pointer; text-align: left; padding: 0 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: .15s;
}
.cc-new:hover:not(:disabled) { border-color: var(--tb-red); color: var(--tb-red); background: #FFF9F9; }
.cc-new:disabled { color: #BFC7D5; cursor: default; border-style: solid; border-color: var(--tb-line-2); }

.cc-hint { font-size: 11.5px; line-height: 1.5; color: var(--tb-faint); }
.cc-hint:empty { display: none; }
.cc-hint.new { color: var(--tb-green); }
.cc-hint.warn { color: #B26A00; }

/* 提示文字在 .cc 内部，需要一点上间距 */
.cc > .cc-hint { margin-top: 5px; }

/* 候选列表再高一点，能一次看到 7 项 */
.cc-list { max-height: 248px; }
/* 值已在候选里时，底部按钮变成「已选中」的提示态 */
.cc-new.is-picked {
  border-style: solid; border-color: #D6EEDF; background: #F3FAF6;
  color: #237A45; cursor: default;
}

/* ---------- 未匹配清单：原表渠道名称 ---------- */
.tb-miss-item .mi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tb-miss-item .mi-main .nm { flex: none; display: block; }
.tb-miss-item .mi-ch {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--tb-faint); line-height: 1.4;
}
.tb-miss-item .mi-ch i {
  font-style: normal; max-width: 210px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 1px 7px; border-radius: 5px;
  background: #F3F6FB; border: 1px solid #E4EAF3; color: var(--tb-ink-2);
}

/* ---------- 码表弹窗：原表渠道提示条 ---------- */
.code-src {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: -2px 0 12px; padding: 8px 11px;
  background: #F7F9FC; border: 1px dashed #D8E0EC; border-radius: 9px;
}
.code-src .lbl { font-size: 12px; color: var(--tb-muted); flex: 0 0 auto; }
.code-src .tip { font-size: 11.5px; color: var(--tb-faint); }
.src-chip {
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  height: 26px; padding: 0 10px; border-radius: 13px;
  border: 1px solid #D8E0EC; background: #fff; color: var(--tb-ink-2);
  font-size: 12px; font-family: inherit; cursor: pointer; transition: .15s;
}
.src-chip:hover { border-color: var(--tb-red); color: var(--tb-red); background: #FFF9F9; }
.src-chip.on { border-color: var(--tb-red); background: #E60012; color: #fff; }

/* ---------- 码表弹窗：二选一说明 ---------- */
.code-note {
  margin: -2px 0 12px; padding: 8px 11px; border-radius: 8px;
  font-size: 12px; line-height: 1.6; color: #6B5A2E;
  background: #FFFBF0; border: 1px solid #F5E7C8;
}
.code-note b { color: #B26A00; }

/* 码表列表里「渠道/自拓」合并列 */
.tb-belong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-belong .tb-tag { margin-right: 4px; }

/* ---------- 外部子页（任务下发 / 重点指标 / 指标管理）贴合外壳 ---------- */
#tb-body.tb-ext { padding: 0; }

/* ---------- 码表分页条 ---------- */
.tb-pager-bar{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  padding:12px 14px;border-top:1px solid var(--tb-line);
  font-size:12.5px;color:var(--tb-muted);
}
.tb-pager-bar .sp{flex:1 1 auto}
.tb-pager-bar b{color:var(--tb-ink);font-weight:600}
.tb-pg{
  min-width:30px;height:30px;padding:0 9px;border-radius:7px;
  border:1px solid var(--tb-line);background:#fff;color:var(--tb-ink-2);
  font-size:12.5px;font-family:inherit;cursor:pointer;transition:.15s;
}
.tb-pg:hover:not(:disabled){border-color:var(--tb-red);color:var(--tb-red)}
.tb-pg.on{background:var(--tb-red);border-color:var(--tb-red);color:#fff;font-weight:500}
.tb-pg:disabled{opacity:.45;cursor:default}
.tb-pg-size{
  height:30px;border:1px solid var(--tb-line);border-radius:7px;padding:0 6px;
  font-size:12.5px;font-family:inherit;background:#fff;color:var(--tb-ink-2);outline:none;cursor:pointer;
}
.tb-pg-size:focus{border-color:var(--tb-red)}
.tb-pg-size{width:auto;max-width:118px;flex:0 0 auto}

/* ---------- 个人通报（下钻到人） ---------- */
.tb-filterbar-plain{padding-top:0;border-top:none;margin-top:-2px}
.tb-pgroup{padding:0!important;overflow:hidden}
.tb-pgroup-h{
  display:flex;align-items:center;gap:10px;padding:13px 16px;cursor:pointer;
  user-select:none;border-bottom:1px solid var(--tb-line-2);
}
.tb-pgroup-h:hover{background:#FAFBFD}
.tb-pgroup-h h3{margin:0;font-size:14.5px;font-weight:600;color:var(--tb-ink);white-space:nowrap}
.tb-pgroup-h .caret{width:12px;color:var(--tb-faint);font-size:11px;flex:0 0 auto}
.tb-pgroup-h .hint{font-size:12px;color:var(--tb-muted)}
.tb-tbl-person td,.tb-tbl-person th{padding:9px 10px;font-size:12.5px}
table.tb-tbl tr.tb-row-sum td{
  background:#FAFBFD;font-weight:600;color:var(--tb-ink);
  border-top:1px solid var(--tb-line);border-bottom:none;
}
.tb-kind{
  display:inline-block;font-size:11px;padding:1px 7px;border-radius:4px;
  line-height:1.7;white-space:nowrap;
}
.tb-kind.self{background:#FFF1F1;color:#D0021B}
.tb-kind.channel{background:#F0F4FF;color:#2F5BD2}
.tb-kind.campus{background:#FFF6E8;color:#B26A00}
.tb-kind.other{background:#F2F4F8;color:#6B7488}
.tb-acct{font-size:11.5px;color:var(--tb-faint);white-space:nowrap}
.tb-acct.on{color:#2E9E5B}
.tb-acct i{font-style:normal;color:var(--tb-faint);margin-left:2px}
.tb-acct.miss{color:#D46B08}
.tb-acct.dim{color:#C9CFDA}
#tb-p-kind button i{font-style:normal;font-size:11px;margin-left:5px;opacity:.6}
#tb-p-kind button.active i{opacity:.85}
a.tb-drill{color:var(--tb-red);text-decoration:none;border-bottom:1px dashed rgba(230,0,18,.35)}
a.tb-drill:hover{color:#B8000E;border-bottom-style:solid}
