.site-shell {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .site-shell {
    gap: var(--space-5);
  }
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 480px) {
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }
}

.page-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 480px) {
  .page-title {
    font-size: var(--text-2xl);
  }
}

.page-subtitle {
  color: var(--muted);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

@media (min-width: 480px) {
  .page-subtitle {
    font-size: var(--text-base);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

@media (min-width: 640px) {
  .card {
    padding: var(--space-5);
  }
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.inline-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 380px) {
  .inline-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-4);
}

@media (min-width: 480px) {
  .filter-bar {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: var(--space-5);
  }
}

.filter-bar__actions {
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .filter-bar__actions {
    align-items: end;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}


.stat-label {
  color: var(--muted);
  font-size: var(--text-sm);
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-2);
  line-height: 1.1;
}

@media (min-width: 640px) {
  .stat-value {
    font-size: var(--text-2xl);
  }
}

.progress {
  width: 100%;
  height: 10px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .progress {
    height: 14px;
  }
}

.progress__bar {
  height: 100%;
  background: var(--primary);
}

.progress__bar--success {
  background: var(--success);
}

.progress__bar--warning {
  background: var(--warning);
}

.progress__bar--danger {
  background: var(--danger);
}

.empty-state {
  padding: var(--space-4);
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

@media (min-width: 640px) {
  .empty-state {
    padding: var(--space-5) var(--space-6);
    font-size: var(--text-base);
  }
}