:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --border: rgba(148, 163, 184, 0.2);

  --radius: 16px;
  --container: 70rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-main {
  flex: 1;
  padding: 2rem 0;
}

.dashboard-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.dashboard-header p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls-section {
  margin-bottom: 2rem;
}

.search-wrapper {
  width: 100%;
}

.search-wrapper label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.search-wrapper input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

.search-wrapper input::placeholder {
  color: var(--muted);
}

.stats-section {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--muted);
}

.stat-card p {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.users-grid {
  display: grid;
  gap: 1rem;
}

.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.user-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.user-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-section {
  margin-top: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.user-card {
  display: grid;
  gap: 0.75rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.user-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.user-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.view-details-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.view-details-btn:hover,
.view-details-btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.user-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

@media (min-width: 700px) {
  .dashboard-main {
    padding: 2.5rem 0;
  }

  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .users-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
