/* ---------------------- BASE ----------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html, body {
    height: 100%;
    width: 100%;
    background: #d8d8d8;
}

body.inicio {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: url('../../Imagenes/imagen_login.png') no-repeat center center;
    background-size: cover;
}

/* Selección de texto */
::selection{
  background: #4158d0;
  color: #fff;
}

/* ---------------------- LOGIN / REGISTRO ---------------------- */

.wrapper{
  width: 550px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0px 15px 20px rgba(0,0,0,0.1);
}

/* LOGO A LOS LADOS */

.wrapper .title{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;

  font-size: 35px;
  font-weight: 600;
  color: white;
  height: 130px; /* ALTURA DONDE VAN LOS LOGOS */

  border-radius: 15px 15px 0 0;
  background: linear-gradient(-135deg,#36db89,#39a84a);
}

.logo-corporativo{
    width:120px;
    height:auto;
    margin-bottom:5px;
}

.texto-titulo{
    font-size:32px;
    font-weight:600;
    color:white;
}

.texto-titulo:hover {
    background: none;
    border-radius: 5px;
    transform:scale(1.25);
}

/* LOGO RECUPERAR CONTRASEÑA */

/* CABECERA VERTICAL (logo arriba, texto debajo) */

.wrapper .title-vertical{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 180px;
    gap: 10px;

    border-radius: 15px 15px 0 0;
    background: linear-gradient(-135deg, #36db89, #39a84a);
}

.title-vertical .logo-corporativo{
    width: 120px;
    height: auto;
    margin: 0;
}

.title-vertical .texto-titulo{
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.title-vertical .texto-titulo:hover{
    background: none;
    transform: scale(1.08);
}

/*=============================*/


.wrapper form{
  padding: 10px 30px 50px 30px;
}

.texto-ayuda-registro{
  margin: 18px 4px 8px;
  color: #555;
  text-align: center;
  line-height: 1.5;
}

.wrapper form .field input:disabled{
  cursor: not-allowed;
  opacity: .6;
}

.wrapper form .field{
  height: 60px;
  width: 100%;
  margin-top: 10px;
  position: relative;
}

.wrapper form .field input,
.wrapper form .field select{
  height: 100%;
  width: 100%;
  outline: none;
  font-size: 17px;
  padding-left: 20px;
  border: 1px solid lightgrey;
  border-radius: 25px;
  transition: 0.3s;
  background: #fff;
}

.wrapper form .field input:focus,
.wrapper form .field input:valid{
  border-color: #278e61;
}

.wrapper form .password-field input{
  padding-right: 58px;
}

.wrapper form .password-field label{
  right: 58px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.password-toggle{
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #278e61;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .2s ease, background-color .2s ease;
}

.password-toggle:hover{
  color: #1c6846;
  background: #eaf7ef;
}

.password-toggle:focus-visible{
  outline: 3px solid rgba(39, 142, 97, .35);
  outline-offset: 1px;
}

.password-toggle__icon{
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle__icon[hidden]{
  display: none;
}

.wrapper form .field label{
  position: absolute;
  top: 50%;
  left: 20px;
  color: #999;
  font-size: 17px;
  pointer-events: none;
  transform: translateY(-50%);
  transition: 0.3s;
}

form .field input:focus ~ label,
form .field input:valid ~ label{
  top: 0%;
  font-size: 16px;
  color: #2b8d2d;
  background: #fff;
  padding: 0 5px;
}

/* En el registro las etiquetas funcionan como texto informativo interior.
   Desaparecen con el foco, cualquier valor parcial o el autocompletado. */
.registration-form .field input:focus ~ label,
.registration-form .field input:not(:placeholder-shown) ~ label,
.registration-form .field input:-webkit-autofill ~ label{
  opacity: 0;
}

form .content{
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: space-around;
}

form .content input{
  width: 15px;
  height: 15px;
}

form .field input[type="submit"]{
  color: #fff;
  border: none;
  margin-top: -10px;
  font-size: 20px;
  cursor: pointer;
  background: linear-gradient(-135deg,  #36db89, #39a84a);
  transition: 0.3s;
}

form .field input[type="submit"]:active{
  transform: scale(0.95);
}

form .pass-link a{
  color: #4158d0;
}

.pass-link:hover {

  transform:scale(1.5);
  
}

form .signup-link a{
  color: #4158d0;
  margin-left: 10px;
 
}

.signup-link:hover {

  display: inline-block;
  transform:scale(1.5);
  transform-origin: left center;/* Crece desde la izquierda */
}

/* ---------------------- ALERTA MODERNA INTEGRADA ---------------------- */
.wrapper .mensaje-alerta {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #fff9f0, #fff4e5); /* degradado suave */
    border: 1px solid #ffb74d; /* borde naranja */
    padding: 18px 22px;
    border-radius: 12px;
    color: #8a4b00; /* texto marrón oscuro */
    font-weight: 600;
    font-size: 15px;
    margin: 20px 20px 15px 20px; /* separaciones: arriba, lateral, abajo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.wrapper .mensaje-alerta .icono {
    font-size: 42px; /* icono más visible */
    margin-right: 12px;
    flex-shrink: 0;
}

.wrapper .mensaje-alerta p {
    margin: 0;
    line-height: 1.5;
    text-align: center;
    flex: 1;
    word-wrap: break-word; /* asegura que los textos largos se ajusten */
}

/* ---------------------- ADAPTACION MOVIL ---------------------- */

@media (max-width: 640px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body.inicio {
    place-items: start center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 16px;
    overflow-y: auto;
  }

  .wrapper {
    width: 100%;
    max-width: 550px;
    border-radius: 12px;
  }

  .wrapper .title {
    min-height: 150px;
    height: auto;
    padding: 18px 16px;
    flex-direction: column;
    gap: 8px;
    border-radius: 12px 12px 0 0;
  }

  .wrapper .title .logo-corporativo {
    width: 82px;
    margin: 0;
  }

  .wrapper .title .logo-corporativo:last-child {
    display: none;
  }

  .wrapper .title .texto-titulo {
    font-size: 26px;
    line-height: 1.2;
    text-align: center;
  }

  .wrapper form {
    padding: 10px 20px 32px;
  }

  .wrapper form .field {
    height: 54px;
    margin-top: 12px;
  }

  .wrapper form .field input,
  .wrapper form .field select {
    padding-left: 16px;
    font-size: 16px;
  }

  .wrapper form .password-field input {
    padding-right: 54px;
  }

  .wrapper form .password-field label {
    right: 54px;
    font-size: 14px;
  }

  .wrapper form .field label {
    left: 16px;
    font-size: 16px;
  }

  form .field input:focus ~ label,
  form .field input:valid ~ label {
    font-size: 14px;
  }

  form .content {
    min-height: 64px;
    height: auto;
    padding-top: 8px;
    justify-content: space-between;
    gap: 8px 18px;
    flex-wrap: wrap;
  }

  .texto-ayuda-registro {
    margin-top: 14px;
    font-size: 14px;
  }

  .wrapper .mensaje-alerta {
    margin: 16px 16px 8px;
    padding: 14px;
    font-size: 14px;
  }

  .wrapper .mensaje-alerta .icono {
    margin-right: 8px;
    font-size: 28px;
  }

  .signup-link {
    line-height: 1.6;
    text-align: center;
  }

  .texto-titulo:hover,
  .pass-link:hover,
  .signup-link:hover {
    transform: none;
  }
}

@media (max-width: 380px) {
  body.inicio {
    padding: 10px;
  }

  .wrapper .title {
    min-height: 136px;
  }

  .wrapper .title .logo-corporativo {
    width: 72px;
  }

  .wrapper .title .texto-titulo {
    font-size: 23px;
  }

  .wrapper form {
    padding: 8px 14px 24px;
  }

  form .content {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  form .signup-link a {
    margin-left: 4px;
  }
}
