/* =========================================================
   authStyle.css — Login + OTP (fusionado)
   - Igualar tamaño contenedor (OTP y Login)
   - Botón con look exacto tipo “Guardar pregunta” (degradado)
========================================================= */

:root {
  --purple: #3b1a4a;
  --bg: #efe9ff;
  --border: #d1d5db;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Container: igual para Login y OTP */
.login-container {
  background: #fff;
  width: 420px;
  padding: 48px;
  border-radius: 26px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);

  /* Evita que OTP se vea “más pequeño” */
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Logo centrado */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.logo {
  display: block;
  width: 100%;
  max-width: 330px;
  height: auto;
}

/* Asegurar que el form ocupa todo el ancho (login + otp) */
body.login-page .login-form {
  width: 100% !important;
}

/* Labels */
body.login-page .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 6px;
}

/* Inputs (blancos) */
body.login-page .form-control {
  background: #fff !important;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: none;
}

/* Focus suave */
body.login-page .form-control:focus {
  border-color: rgba(59, 26, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 26, 74, 0.1);
  outline: none;
}

/* Quitar azul autofill Chrome */
body.login-page input.form-control:-webkit-autofill,
body.login-page input.form-control:-webkit-autofill:hover,
body.login-page input.form-control:-webkit-autofill:focus,
body.login-page input.form-control:-webkit-autofill:active {
  -webkit-text-fill-color: #111827 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Password group (login) */
body.login-page .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

body.login-page .input-group-text {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-left: 0 !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  padding: 0 12px !important;
  cursor: pointer;
  color: var(--purple);
}

/* Botón (Login + OTP) — mismo look que “Guardar pregunta” */
.login-button {
  width: 100%;
  border: 0;
  padding: 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: block;

  background: linear-gradient(135deg, #3b1a4a, #7c3aed);
  box-shadow: 0 14px 26px rgba(59, 26, 74, 0.18);
}

/* Mantener el mismo estilo en hover/focus/active (sin verde) */
.login-button:hover,
.login-button:focus,
.login-button:active {
  background: linear-gradient(135deg, #3b1a4a, #7c3aed) !important;
  color: #fff !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: 0 14px 26px rgba(59, 26, 74, 0.18) !important;
  filter: brightness(1.03);
}

/* Disabled */
.login-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none !important;
  filter: none !important;
}

/* Error */
.error-message {
  margin-top: 14px;
  font-size: 13px;
  color: #b91c1c;
  text-align: center;
}

/* Link (login) */
.small-link {
  font-size: 12px;
  text-decoration: none;
}

/* =========================================================
   OTP específicos
========================================================= */

/* Input OTP */
body.login-page #otp {
  text-align: center;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
}

body.login-page #otp::placeholder {
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: none;
}

/* Centrado vertical del contenido OTP dentro del container */
body.login-page #otp-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

body.login-page #otp-form .login-button {
  margin-top: 14px !important;
}

/* Links (recover/reset) */
body.login-page a {
  color: var(--purple);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

body.login-page a:hover {
  text-decoration: underline;
}

/* Mensajes en recover/reset */
body.login-page #recovery-success,
body.login-page #recovery-error,
body.login-page #reset-success,
body.login-page #reset-error {
  font-size: 13px;
  text-align: center;
}

/* Si existe el form de recovery o reset, el container no debe tener min-height */
body.auth-compact .login-container {
  min-height: unset;      /* quita el alto mínimo de 420px */
  padding: 40px 48px;     /* opcional: un pelín menos alto */
}

body.auth-compact .logo-container {
  margin-bottom: 12px;    /* reduce espacio bajo el logo */
}

/* ===== Success view (Recover) ===== */
.auth-success {
  text-align: center;
  margin-top: 6px;
}

.auth-success__text {
  font-size: 14px;
  font-weight: 600;
  color: #3b1a4a;
  margin: 10px 0 18px;
  line-height: 1.35;
}

.auth-success__btn {
  max-width: 260px;   /* botón no tan ancho */
  margin: 0 auto;     /* centrado */
  padding: 12px 16px; /* un pelín más compacto */
  font-size: 14px;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 480px) {
  .login-container {
    width: min(420px, 100%);
    padding: 34px 18px;
    min-height: 0;
  }

  .logo {
    max-width: 280px;
  }
}
