/* ============================================================
   auth.css - ESTILOS DE AUTENTICACIÓN (LOGIN Y REGISTRO) AiaAcademy
   ============================================================ */

.auth-page-container {
  min-height: calc(85vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: var(--color-fondo, #1e293b);
  box-sizing: border-box;
}

.auth-login-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  width: min(100%, 1080px);
  margin: 0 auto;
}

.auth-login-robot {
  display: flex;
  flex: 0 0 280px;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 280px;
  color: #e2e8f0;
  text-align: center;
}

.auth-login-layout > .auth-card {
  flex: 0 1 480px;
  width: 100%;
}

.auth-robot-figure {
  animation: authRobotFloat 3.5s ease-in-out infinite;
}

.auth-robot-svg {
  display: block;
  width: 180px;
  height: auto;
}

.auth-login-tagline {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.auth-login-tagline span {
  color: #51d1f6;
}

.auth-login-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  list-style: none;
  text-align: left;
}

.auth-login-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.82rem;
}

.auth-login-features li::before {
  content: '✦';
  color: #fc7f00;
  font-size: 0.65rem;
}

@keyframes authRobotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.auth-card {
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-top: 5px solid var(--color-naranja, #FC7F00);
  width: 100%;
  max-width: 480px;
  padding: 2.5rem 2.25rem;
  color: #e2e8f0;
  animation: fadeInAuth 0.35s ease-out;
  box-sizing: border-box;
  position: relative;
}

@keyframes fadeInAuth {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-badge {
  display: inline-block;
  background: rgba(81, 209, 246, 0.12);
  color: var(--color-acento, #51D1F6);
  border: 1px solid rgba(81, 209, 246, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.auth-card-header h2 {
  color: #ffffff;
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Alertas de error y éxito */
.auth-alert-error {
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.4;
}

.auth-alert-success {
  background: rgba(21, 128, 61, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.4;
}

/* Formulario */
.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .auth-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.auth-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  border: 1px solid #334155;
  border-radius: 9px;
  background: #1e293b;
  color: #ffffff;
  transition: all 0.2s ease;
  box-sizing: border-box;
  outline: none;
}

.auth-form input[type="text"]::placeholder,
.auth-form input[type="email"]::placeholder,
.auth-form input[type="password"]::placeholder {
  color: #64748b;
}

.auth-form input:focus {
  background: #0f172a;
  border-color: var(--color-naranja, #FC7F00);
  box-shadow: 0 0 0 3px rgba(252, 127, 0, 0.25);
}

.auth-form .form-actions {
  margin-top: 0.5rem;
}

/* Botón de envío */
.btn-auth-submit {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(90deg, var(--color-azul, #030083), var(--color-naranja, #FC7F00));
  color: #ffffff !important;
  border: none;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(252, 127, 0, 0.3);
  margin-top: 0.75rem;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(252, 127, 0, 0.45);
  filter: brightness(1.08);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

/* Footer de la tarjeta */
.auth-card-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #334155;
  font-size: 0.92rem;
  color: #94a3b8;
}

.auth-card-footer p {
  margin: 0;
}

.auth-card-footer a {
  color: var(--color-naranja, #FC7F00);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-card-footer a:hover {
  color: #ff9d33;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }
  .auth-card-header h2 {
    font-size: 1.55rem;
  }
}

@media (max-width: 899px) {
  .auth-login-robot {
    display: none;
  }
  .auth-login-layout {
    justify-content: center;
  }
}

/* ============================================================
   CHECKBOX DE TÉRMINOS Y CONDICIONES (REGISTRO)
   Sin cajas encerradas; cuadradito alineado al costado del texto
   ============================================================ */
.form-terms-group {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.terms-check-row,
.legal-check-wrapper {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  width: 100%;
}

.auth-form .custom-checkbox-container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.65rem !important;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  color: #cbd5e1 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  width: 100%;
}

.auth-form .custom-checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
  pointer-events: none;
}

.auth-form .custom-checkmark {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex-shrink: 0 !important;
  background-color: #1e293b;
  border: 2px solid #64748b;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.auth-form .custom-checkbox-container:hover .custom-checkmark {
  border-color: var(--color-naranja, #FC7F00);
}

.auth-form .custom-checkbox-container input:checked ~ .custom-checkmark {
  background: linear-gradient(135deg, var(--color-naranja, #FC7F00), #e06d00);
  border-color: var(--color-naranja, #FC7F00);
  box-shadow: 0 0 8px rgba(252, 127, 0, 0.4);
}

.auth-form .custom-checkmark::after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.auth-form .custom-checkbox-container input:checked ~ .custom-checkmark::after {
  display: block;
}

.auth-form .terms-text {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.4;
  display: inline !important;
}

.auth-legal-link {
  color: var(--color-naranja, #FC7F00) !important;
  font-weight: 700;
  text-decoration: underline !important;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-legal-link:hover {
  color: #ff9d33 !important;
}

/* ============================================================
   MODAL EMERGENTE LEGAL PARA FORMULARIO DE REGISTRO
   ============================================================ */
.auth-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(3, 7, 18, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.auth-modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.auth-modal-box {
  background: #0f172a !important;
  border-radius: 14px !important;
  max-width: 640px !important;
  width: 100% !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: 1px solid #334155 !important;
  border-top: 5px solid var(--color-naranja, #FC7F00) !important;
  color: #e2e8f0 !important;
  transform: scale(0.93) translateY(20px) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.auth-modal-overlay.active .auth-modal-box {
  transform: scale(1) translateY(0) !important;
}

.auth-modal-header {
  padding: 1.25rem 1.75rem !important;
  border-bottom: 1px solid #334155 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #1e293b !important;
  box-sizing: border-box !important;
}

.auth-modal-header h3 {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.auth-modal-close {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.5rem !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
}

.auth-modal-close:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  transform: scale(1.05) !important;
}

.auth-modal-body {
  padding: 1.5rem 1.75rem !important;
  overflow-y: auto !important;
  font-size: 0.95rem !important;
  color: #cbd5e1 !important;
  line-height: 1.7 !important;
  box-sizing: border-box !important;
}

.auth-modal-body h4 {
  color: var(--color-acento, #51D1F6) !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.45rem !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

.auth-modal-body h4:first-child {
  margin-top: 0 !important;
}

.auth-modal-body p {
  margin-bottom: 0.75rem !important;
  color: #cbd5e1 !important;
}

.auth-modal-body strong {
  color: #ffffff !important;
}

.auth-modal-footer {
  padding: 1.15rem 1.75rem !important;
  border-top: 1px solid #334155 !important;
  background: #1e293b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  flex-wrap: wrap;
}

.auth-modal-full-link {
  color: #94a3b8 !important;
  font-size: 0.88rem !important;
  text-decoration: underline !important;
  transition: color 0.2s ease !important;
}

.auth-modal-full-link:hover {
  color: var(--color-naranja, #FC7F00) !important;
}

.auth-scroll-notice {
  font-size: 0.84rem !important;
  color: #fbbf24 !important;
  width: 100% !important;
  margin-bottom: 0.45rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-weight: 500 !important;
}

.btn-auth-modal-accept {
  padding: 0.65rem 1.5rem !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, var(--color-azul, #030083), var(--color-naranja, #FC7F00)) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 12px rgba(252, 127, 0, 0.25) !important;
}

.btn-auth-modal-accept:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(252, 127, 0, 0.4) !important;
}

.btn-auth-modal-accept:disabled,
.btn-auth-modal-accept.btn-modal-locked {
  background: #334155 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.75 !important;
}

@media (max-width: 600px) {
  .auth-modal-overlay {
    padding: 1rem !important;
  }
  .auth-modal-box {
    max-height: 90vh !important;
  }
  .auth-modal-header {
    padding: 1rem 1.25rem !important;
  }
  .auth-modal-body {
    padding: 1.25rem !important;
  }
  .auth-modal-footer {
    padding: 1rem 1.25rem !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    text-align: center !important;
  }
  .btn-auth-modal-accept {
    width: 100% !important;
  }
}

