/* ==========================================================================
   AGORA — Páginas de autenticación (login, activar cuenta)
   Mobile first
   ========================================================================== */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(37, 99, 235, 0.22), transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.12), transparent 40%),
    #0f172a;
}

.auth-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.auth-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 28px);
  align-items: stretch;
}

/* ── Tarjeta de login ── */
.auth-card {
  order: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 32px);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px -20px rgba(0, 0, 0, 0.45),
    0 8px 24px -8px rgba(15, 23, 42, 0.2);
}

.auth-card--solo {
  max-width: min(480px, 100%);
}

.auth-card-header {
  text-align: center;
  margin-bottom: clamp(20px, 4vw, 28px);
}

.auth-card-header .auth-brand {
  justify-content: center;
  margin-bottom: 20px;
}

.auth-card-header .auth-brand-mark {
  width: 52px;
  height: 52px;
}

.auth-card-header h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.625rem);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Brand */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand-name {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.auth-brand-tagline {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

/* Hero: solo en escritorio (junto al formulario) */
.auth-hero {
  order: 2;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 40px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  box-shadow: 0 30px 60px -35px rgba(0, 0, 0, 0.5);
}

.auth-hero .auth-brand-name {
  color: #f8fafc;
}

.auth-hero .auth-brand-tagline {
  color: #94a3b8;
}

.auth-hero h1 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.25;
  margin: 20px 0 12px;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.auth-hero > p {
  color: #cbd5e1;
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 42ch;
}

.auth-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
}

.auth-hero-tip {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.auth-hero-tip strong {
  color: #f1f5f9;
}

/* Formulario login */
.auth-form .form-group {
  margin-bottom: 0;
}

.auth-form .form-label {
  font-size: 0.875rem;
  color: #334155;
}

.auth-form .form-control {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.auth-form .form-control:focus {
  background: #fff;
  border-color: #2563eb;
}

.auth-form .helper {
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-top: 6px;
}

.auth-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.auth-form-actions .btn {
  width: 100%;
  min-height: 48px;
  font-size: 0.9375rem;
  border-radius: 12px;
}

.auth-form-actions .btn-secondary {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
  box-shadow: none;
}

.auth-form-actions .btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: none;
}

.auth-notice {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

.auth-notice strong {
  color: #334155;
  font-weight: 600;
}

.auth-back-link {
  margin-top: 20px;
  text-align: center;
  font-size: 0.875rem;
}

.auth-back-link a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.auth-back-link a:hover {
  text-decoration: underline;
}

/* Desktop: layout dos columnas con hero visible */
@media (min-width: 992px) {
  .auth-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: stretch;
    max-width: none;
  }

  .auth-card {
    order: 2;
    max-width: none;
    margin: 0;
    align-self: center;
  }

  .auth-card-header {
    text-align: left;
  }

  .auth-card-header .auth-brand {
    justify-content: flex-start;
    margin-bottom: 24px;
  }

  .auth-hero {
    order: 1;
    display: flex;
    max-width: none;
    margin: 0;
  }
}

@media (min-width: 1200px) {
  .auth-shell {
    padding: 0 16px;
  }
}
