:root {
  color-scheme: dark;
}

/* Generic page shell */
.page {
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 40px 16px 120px;
}

/* When page has header, adjust padding */
body > header ~ .page {
  padding-top: calc(var(--header-height) + 40px);
}

.page__container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 28px;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.card__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.auth__container {
  max-width: 520px;
  margin: 0 auto;
}

.auth__actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent-orange);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-orange-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--bg-card-border);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.text-link {
  color: var(--accent-cyan);
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* Dashboard layout */
.dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 18px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sidebar__brand-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.main {
  padding: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.stat__label {
  color: var(--text-secondary);
  font-size: 13px;
}

.stat__value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

