/* components/stats.css */
/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-icon.primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.stat-icon.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.stat-icon.warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.stat-icon.info {
  background: var(--color-info-bg);
  color: var(--color-info);
}
.stat-icon.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card-content {
  min-width: 0;
}
.stat-label {
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-value {
  color: var(--text-primary);
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-meta {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  font-size: 17px;
}
.stat-icon.primary {
  color: var(--color-primary);
}
.stat-icon.success {
  color: var(--color-success);
}
.stat-icon.warning {
  color: var(--color-warning);
}
.stat-icon.info {
  color: var(--color-info);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.badge-success {
  border-color: var(--color-success);
  color: var(--color-success);
  background: var(--bg-muted);
}
.badge-warning {
  border-color: var(--color-warning);
  color: var(--color-warning);
  background: var(--color-warning-bg);
}
.badge-muted {
  color: var(--text-muted);
  background: var(--bg-muted);
}
.empty-state {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  padding: 32px 24px;
  text-align: center;
}
.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 20px;
}
.empty-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.empty-title {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}
.empty-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.empty-state .btn {
  margin-top: 4px;
  font-size: 13px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.page-title {
  min-width: 0;
}
.page-overline {
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.page-title h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.page-title p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 10px 13px 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  line-height: 1.45;
}
.alert-message {
  min-width: 0;
}
.alert-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.alert-close:hover {
  color: var(--text-primary);
}
@media (max-width: 700px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-title h1 {
    font-size: 26px;
  }
  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-value {
    font-size: 22px;
  }
}
