/* 公司后台 v4 · 总览。颜色、圆角、阴影只用 --r12-*；团队色用数据带进来的 --team-color。 */

/* ---------- 快捷操作 ---------- */
.co-quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.co-quick-slot { position: relative; min-width: 0; }
.co-quick-slot .quick { height: 100%; }
.co-quick-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r12-r-pill);
  background: var(--r12-review-soft);
  color: var(--r12-review);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

/* ---------- 数字区：顶部 4 张 + 中部 6 张 + 发放 / 扣回 2 张，共 12 张一个网格 ---------- */
.co-stat-area { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.co-stat-toolbar { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.co-stat-toolbar > * { margin: 0; }
.co-stat-toolbar .co-unpriced-tip { margin-left: auto; }
.co-unpriced-tip {
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r12-r-pill, 999px);
  background: var(--r12-review-soft);
  color: var(--r12-review);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  white-space: nowrap;
  cursor: pointer;
}
.co-unpriced-tip:hover { background: var(--r12-review); color: var(--r12-bg); }
.co-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.co-stat-grid > .kpi.card,
.co-stat-grid > .stat {
  padding: 10px 12px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface);
  min-width: 0;
}
.co-stat-grid > .kpi { gap: 0; }
.co-stat-grid .kpi-label,
.co-stat-grid .stat-label { font-size: 12px; line-height: 16px; color: var(--r12-muted); }
.co-stat-grid .kpi-value,
.co-stat-grid .stat-value {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--r12-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-stat-grid .kpi-sub,
.co-stat-grid .stat-sub { display: block; margin-top: 2px; font-size: 11px; line-height: 15px; color: var(--r12-muted); }

/* 投诉提醒保持一行，高度约 36px。 */
.co-overview .banner[data-complaint-alert] { align-items: center; padding: 6px 12px; }
.co-overview .banner[data-complaint-alert] .bang { margin-top: 0; }
.co-overview .banner[data-complaint-alert] .banner-text { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co-overview .banner[data-complaint-alert] .banner-text .btn { margin-left: 0; }

/* ---------- 两栏 ---------- */
.co-overview-two-col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr); gap: 8px; align-items: stretch; }
.co-ov-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.co-ov-col[data-ov-col="left"] > .panel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.co-ov-col > .panel { min-width: 0; }

/* ---------- 消耗走势 ---------- */
.co-legend { display: flex; align-items: center; gap: 10px; }
.co-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--r12-muted); white-space: nowrap; }
.co-legend-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.co-legend-dot.is-image { background: var(--r12-running); }
.co-legend-dot.is-video { background: var(--r12-review); }
.co-legend-dot.is-language { background: var(--r12-ok); }
.co-trend { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; }
.co-trend-plot { position: relative; flex: 1; min-width: 0; min-height: 120px; }
.co-trend-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.co-trend-ylabels { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.co-trend-ylabel { position: absolute; left: 0; top: var(--y); transform: translateY(-50%); width: 42px; text-align: right; font-size: 11px; line-height: 1; color: var(--r12-faint); font-variant-numeric: tabular-nums; }
.co-trend-grid { stroke: var(--r12-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.co-trend-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.co-trend-line.is-image { stroke: var(--r12-running); }
.co-trend-line.is-video { stroke: var(--r12-review); }
.co-trend-line.is-language { stroke: var(--r12-ok); }
.co-trend-day { fill: transparent; pointer-events: all; }
.co-trend-cursor { stroke: var(--r12-line-strong); stroke-width: 1; opacity: 0; vector-effect: non-scaling-stroke; }
.co-trend-cursor.is-on { opacity: 1; }
.co-trend-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--r12-faint); font-variant-numeric: tabular-nums; }
.co-trend-tip {
  position: absolute;
  z-index: 2;
  left: var(--tip-x, 50%);
  top: var(--tip-y, 8px);
  transform: translateX(-50%);
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface);
  box-shadow: var(--r12-shadow-pop);
  pointer-events: none;
}
.co-trend-tip[hidden] { display: none; }
.co-trend-tip-date { margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--r12-ink); }
.co-trend-tip-row { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 20px; color: var(--r12-muted); }
.co-trend-tip-row b { margin-left: auto; font-weight: 600; color: var(--r12-ink); font-variant-numeric: tabular-nums; }
.co-trend-tip-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.co-trend-tip-dot.is-image { background: var(--r12-running); }
.co-trend-tip-dot.is-video { background: var(--r12-review); }
.co-trend-tip-dot.is-language { background: var(--r12-ok); }

/* ---------- 待办 ---------- */
.co-todo-list { display: flex; flex-direction: column; gap: 2px; }
.co-todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--r12-r-control);
  background: transparent;
  color: var(--r12-ink);
  font: inherit;
  text-align: left;
}
.co-todo-item:hover { background: var(--r12-hover); }
.co-todo-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r12-r-control); background: var(--r12-surface-3); color: var(--r12-muted); }
.co-todo-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.co-todo-text b { font-size: 13px; font-weight: 600; }
.co-todo-text small { font-size: 12px; color: var(--r12-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-todo-go { display: flex; flex: none; color: var(--r12-faint); }

/* ---------- 注册方式 ---------- */
.co-reg-panel .seg-control { width: 100%; }
.co-reg-panel .seg-btn { flex: 1; }
.co-reg-desc { margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--r12-muted); }

/* ---------- 团队排行 ---------- */
.co-team-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.co-team-dot { width: 10px; height: 10px; flex: none; border-radius: var(--r12-r-media); background: var(--team-color, var(--r12-muted)); }
.co-team-table td { white-space: nowrap; }

/* ---------- 自定义快捷操作弹窗 ---------- */
.co-quick-dialog-body { display: flex; flex-direction: column; gap: 12px; }
.co-quick-selected { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--r12-line); }
.co-quick-group { display: flex; flex-direction: column; gap: 2px; }
.co-quick-group-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; font-size: 12px; color: var(--r12-muted); }
.co-quick-option-row { display: flex; align-items: center; gap: 6px; border-radius: var(--r12-r-control); }
.co-quick-option-row:hover { background: var(--r12-hover); }
.co-quick-option {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--r12-r-control);
  background: transparent;
  color: var(--r12-ink);
  font: inherit;
  text-align: left;
}
.co-quick-option:disabled { opacity: 0.38; cursor: not-allowed; }
.co-quick-option:disabled:hover { background: transparent; }
.co-quick-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border: 1px solid var(--r12-line-strong);
  border-radius: 50%;
  color: var(--r12-bg);
}
.co-quick-option.is-on .co-quick-check { background: var(--r12-ink); border-color: var(--r12-ink); }
.co-quick-option-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r12-r-control); background: var(--r12-surface-3); color: var(--r12-muted); }
.co-quick-option-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.co-quick-option-text b { font-size: 13px; font-weight: 600; }
.co-quick-option-text small { font-size: 12px; color: var(--r12-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-quick-order { display: flex; align-items: center; gap: 2px; flex: none; padding-right: 4px; }
.co-quick-empty { margin: 4px 6px; font-size: 12px; color: var(--r12-muted); }
.co-quick-limit { margin: 0; padding: 6px 8px; border-radius: var(--r12-r-control); background: var(--r12-surface-3); font-size: 12px; color: var(--r12-muted); }
.co-quick-limit.is-full { color: var(--r12-review); }

/* ---------- 自选日期弹窗 ---------- */
.co-range-form { display: flex; flex-direction: column; gap: 12px; }
.co-range-field { display: flex; flex-direction: column; gap: 6px; }
.co-range-field span { font-size: 12px; color: var(--r12-muted); }
.co-range-field .input { width: 100%; }
.co-range-hint { margin: 0; font-size: 12px; line-height: 18px; color: var(--r12-muted); }
.co-range-error { margin: 0; font-size: 12px; color: var(--r12-error); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .co-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .co-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .co-overview-two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .co-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
