/* =========================================================
   Página de Autenticación - Estilos
   ========================================================= */

.auth-container {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-elevated) 100%);
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: relative;
}

.auth-form-container h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

.btn-full:active {
  transform: translateY(0);
}

.auth-toggle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 24px;
}

.toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 0;
  font: inherit;
}

.toggle-btn:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

.auth-error {
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.9rem;
  margin-top: 16px;
}

.auth-success {
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: #15803d;
  font-size: 0.9rem;
  margin-top: 16px;
}

.loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
  .auth-wrapper {
    padding: 32px 24px;
  }

  .auth-form-container h1 {
    font-size: 1.5rem;
  }

  .form-group input {
    font-size: 16px; /* Previene zoom en iOS */
  }
}