.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-base);
  margin-bottom: var(--space-3);
}

.btn-google:hover {
  border-color: var(--border-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-google svg {
  flex-shrink: 0;
}

.btn-facebook {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-facebook:hover {
  border-color: var(--border-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-facebook svg {
  flex-shrink: 0;
  color: #1877F2;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: var(--space-6) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: var(--border-light);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  background: var(--surface);
  padding: 0 var(--space-3);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: calc(var(--space-2) * -1);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  cursor: pointer;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
}

.auth-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  z-index: 10;
}

[data-theme="dark"] .auth-loading {
  background: rgba(15, 23, 42, 0.95);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-4);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.btn-block {
  width: 100%;
}

@media (max-width: 640px) {
  .auth-page {
    padding: var(--space-4);
  }

  .auth-card {
    padding: var(--space-6);
  }

  .auth-title {
    font-size: 1.5rem;
  }
}

/* Tweak alert layout on auth pages so inline buttons and messages stack nicely */
#authError.alert {
  flex-direction: column;
  align-items: flex-start;
}

#authError.alert .btn {
  margin-top: 0.5rem;
  align-self: flex-start;
}

#authError .verification-email {
  font-weight: 700;
  color: var(--accent-primary);
  display: inline-block;
  margin-left: 0.25rem;
}
