/* =========================
   RESET
========================= */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* =========================
   BODY
========================= */
body{
  width: 100vw;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow-x: hidden;
}

/* =========================
   HEADER (LOGO MARCA)
========================= */
.login-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  z-index: 20;
}

.brand-logo{
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* =========================
   CONTENEDOR
========================= */
.login-container{
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 48px;
}

/* =========================
   CAJA LOGIN
========================= */
.login-box{
  background: rgba(0,0,0,0.85);
  padding: 2.8rem;
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  animation: fadeIn 0.35s ease both;
}

/* =========================
   TITULO + LOGO
========================= */
.titulo{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.client-logo{
  width: 45%;
  height: auto;
  object-fit: contain;
}

.login-box h2{
  text-align: center;
  font-weight: 600;
  letter-spacing: 1px;
}

/* =========================
   INPUTS (ALTURA FIJA)
========================= */
.login-box input{
  width: 100%;
  height: 48px;                 /* 🔑 clave */
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  background: #1c1c1c;
  color: #fff;
  transition: 0.2s;
}

.login-box input::placeholder{
  color: #aaa;
}

.login-box input:focus{
  background: #222;
  box-shadow: 0 0 0 2px #4da3ff;
}

/* =========================
   PASSWORD TOGGLE (PERFECTO)
========================= */
.password-wrapper{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-wrapper input{
  padding-right: 64px;          /* espacio real para el botón */
}

.toggle-password{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);

  width: 38px;
  height: 38px;                 /* menor que input (48px) */
  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;

  color: #fff;
  font-size: 1rem;
  line-height: 1;               /* 🔑 evita descuadre vertical */
  cursor: pointer;
  padding: 0;
}

.toggle-password:hover{
  border-color: rgba(77,163,255,0.9);
  box-shadow: 0 0 0 2px rgba(77,163,255,0.28);
}

/* =========================
   BOTON SUBMIT
========================= */
.login-box button[type="submit"]{
  margin-top: 0.6rem;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #4da3ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}

.login-box button[type="submit"]:hover{
  background: #3589e0;
  transform: translateY(-1px);
}

/* =========================
   MENSAJES
========================= */
.msg{
  text-align: center;
  font-size: 0.85rem;
}

.msg.error{ color: #ff6b6b; }
.msg.success{ color: #4cd964; }

/* =========================
   FOOTER
========================= */
.login-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #bbb;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  z-index: 10;
}

/* =========================
   ANIMACION
========================= */
@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px){

  body{ overflow: hidden; }

  .login-container{
    padding-top: 64px;
    padding-bottom: 48px;
    align-items: stretch;
  }

  .login-box{
    width: 100vw;
    height: calc(100vh - 64px - 48px);
    max-width: none;
    border-radius: 0;
    padding: 3rem 2rem;
    box-shadow: none;
    justify-content: center;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  }

  .titulo{
    border-bottom: 1px solid rgba(255,255,255,0.85);
    padding-bottom: 14px;
  }

  .login-header{
    height: 58px;
    padding: 0 16px;
  }

  .brand-logo{
    height: 60%;
  }
}
