/* ==========================================================================
   Cards - Stats cards, summary cards, glass containers
   ========================================================================== */

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-base);
  margin-bottom: var(--sp-xl);
}

.stat-card {
  padding: var(--sp-lg) var(--sp-xl);
  text-align: center;
}

.stat-card__value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--base-text);
  opacity: 0.75;
  margin-top: var(--sp-xs);
}

.stat-card__icon {
  font-size: 24px;
  margin-bottom: var(--sp-sm);
}

.stat-card--primary .stat-card__value { color: var(--primary); }
.stat-card--danger .stat-card__value { color: var(--error); }
.stat-card--warning .stat-card__value { color: var(--warning); }
.stat-card--success .stat-card__value { color: var(--success); }

/* ---------- Dashboard Grid ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.dashboard-grid--even {
  grid-template-columns: 1fr 1fr;
}

/* ---------- Section Card ---------- */
.section-card {
  padding: var(--sp-lg) var(--sp-xl);
}

.section-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-base);
}

.section-card__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-card__action {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.section-card__action:hover {
  color: var(--primary-hover);
}

/* ---------- Activity List ---------- */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--glass-border-secondary);
  font-size: 13px;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item--clickable {
  cursor: pointer;
}

.activity-item__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: var(--glass-bg-secondary);
}

.activity-item__content {
  flex: 1;
  min-width: 0;
}

.activity-item__text {
  color: var(--base-text);
  word-break: break-word;
}

.activity-item__meta {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: var(--sp-xs);
}

/* ---------- Chart Container ---------- */
.chart-container {
  position: relative;
  width: 100%;
  max-height: 250px;
}

.chart-container canvas {
  max-height: 250px;
}

/* ---------- Section Card Spacing Modifier ---------- */
.section-card--spaced {
  margin-top: var(--sp-xl);
}

.empty-state--compact {
  padding: var(--sp-xl);
}

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid--even {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card__value {
    font-size: 28px;
  }
}
