/* ========== Stats Page Styles ========== */

/* 维度切换 */
.stats-dimension-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.stats-dim-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.stats-dim-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.stats-dim-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 趋势对比 */
.stats-trend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.stats-trend-label {
  font-weight: 500;
  color: var(--text);
}

.stats-trend-value {
  font-weight: 600;
  font-size: 14px;
}

.stats-trend-value.up {
  color: var(--success);
}

.stats-trend-value.down {
  color: var(--danger);
}

.stats-trend-value.flat {
  color: var(--text-muted);
}

/* 数字卡片区域 */
.stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stats-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stats-card-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 图表卡片 */
.stats-chart-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.stats-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.stats-chart-wrap {
  position: relative;
  width: 100%;
}

.stats-chart-wrap canvas {
  width: 100% !important;
  max-height: 260px;
}

/* 空状态 */
.stats-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.stats-empty svg {
  margin-bottom: 12px;
}

.stats-empty p {
  font-size: 14px;
}

.stats-empty .stats-empty-hint {
  font-size: 12px;
  margin-top: 4px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }

  .stats-dim-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .stats-chart-wrap canvas {
    max-height: 200px;
  }
}

@media (min-width: 769px) {
  .stats-cards {
    grid-template-columns: 1fr 1fr;
  }
}
