/* =========================================================
   🎨 Portal Sulconfec - Estilos del Login
   ========================================================= */

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #0f1568;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contenedor {
  display: flex;
  width: 95%;
  max-width: 1100px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   PANEL IZQUIERDO
   ========================================================= */

.left-panel {
  flex: 1;
  background: #0f1568;
  color: #ffffff;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: left;
}

.logo-principal {
  width: 400px;
  height: 250px;
  margin-bottom: 25px;
}

.left-panel h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 15px;
  font-weight: 700;
}

.descripcion {
  font-size: 15px;
  margin-bottom: 25px;
  opacity: 0.9;
}

.beneficios {
  list-style: none;
  padding: 0;
  margin: 0;
}

.beneficios li {
  margin-bottom: 10px;
  font-size: 14px;
  position: relative;
  padding-left: 18px;
}

.beneficios li::before {
  content: "•";
  color: #f7a400;
  position: absolute;
  left: 0;
}

.claim {
  margin-top: 30px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

/* =========================================================
   PANEL DERECHO – LOGIN CARD
   ========================================================= */

.right-panel {
  flex: 1;
  background: #eef0f1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.card-login {
  background: white;
  width: 100%;
  max-width: 360px;
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  /* para animación de redirección */
}

/* =========================================================
   LOGO + TEXTO
   ========================================================= */

.logo-login {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.logo-login .logo-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.logo-text {
  margin: 0;
  padding: 0;
  text-align: left;
  font-family: "Berlin Sans FB Demi";
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.5px;
  color: #0D2B55;
}

/* =========================================================
   SUBTÍTULO ACCESO
   ========================================================= */

.card-accesso {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.card-accesso .sub {
  font-size: 18px;
  font-weight: 500;
  transform: scaleY(1.2);
  display: inline-block;
}

/* =========================================================
   FORMULARIO
   ========================================================= */

form label {
  font-weight: 600;
  font-size: 14px;
  color: #0d2b55;
  margin-top: 10px;
}

form input {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  height: 48px;
  /* ⭐ mismo alto que password */
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  box-sizing: border-box;
}

/* BOTÓN */
.btn-primary {
  width: 50%;
  padding: 12px;
  border: none;
  background: #f7a400;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;

}

.btn-primary:hover {
  background: #d98a00;
}

/* LINKS */
.extras {
  font-size: 13px;
  text-align: center;
  margin-top: 15px;
}

.extras a {
  color: #0d2b55;
  text-decoration: none;
  font-weight: 600;
}

.footer {
  display: block;
  margin-top: 25px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}

/* =========================================================
   RESPONSIVE – TABLET
   ========================================================= */

@media (max-width: 850px) {
  .contenedor {
    flex-direction: column;
    height: auto;
  }

  .left-panel {
    display: none;
  }

  .right-panel {
    width: 100%;
    padding: 20px;
    background: #ffffff;
    display: flex;
    justify-content: center;
  }

  .card-login {
    width: 100%;
    max-width: 450px;
    padding: 30px 25px;
    margin-top: 20px;
  }

  .logo-login .logo-img {
    width: 120px;
    height: 120px;
  }

  .logo-text {
    font-size: 24px;
  }

  .card-accesso .sub {
    font-size: 18px;
    text-align: center;
  }

  form input {
    font-size: 15px;
  }

  .btn-primary {
    padding: 14px;
    font-size: 16px;
  }
}


.card-accesso .sub {
  font-size: 18px;
  font-weight: 500;
  transform: scaleY(1.2);
  display: inline-block;
  margin-top: 0px;
  margin-bottom: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
}

#username {
  text-transform: uppercase;
}

/* ========= OJO DE MOSTRAR CONTRASEÑA ========= */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
  /* espacio para el ojo */
}

/* Input de password mismo tamaño que el input normal */
.password-wrapper input#password {
  padding: 12px !important;
  font-size: 15px !important;
  height: 48px !important;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}



#togglePassword {
  position: absolute;
  right: 10px;
  font-size: 20px;
  color: #0d2b55;
  cursor: pointer;
  opacity: 0.75;
  transition: 0.2s;
}

#togglePassword:hover {
  opacity: 1;
}

/* =========================================================
   ✨ EFECTO MATERIAL DESIGN EN INPUTS (Usuario y Password)
   ========================================================= */

form input {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid #ccc;
  /* borde más limpio */
  margin-bottom: 10px;
  box-sizing: border-box;
  transition: all 0.25s ease;
  /* ⭐ animación suave */
}

/* Cuando el usuario hace clic o escribe */
form input:focus {
  border-color: #0D2B55;
  /* azul corporativo Sulconfec */
  box-shadow: 0 0 6px rgba(13, 43, 85, 0.35);
  outline: none;
  /* quitamos el borde feo del navegador */
}

/* Placeholder más suave */
form input::placeholder {
  color: #999;
  opacity: 0.7;
}

/* Password también mantiene el efecto */
.password-wrapper input#password {
  padding: 12px !important;
  font-size: 15px !important;
  height: 48px !important;
  border-radius: 8px;
  border: 2px solid #ccc;
  transition: all 0.25s ease;
}

.password-wrapper input#password:focus {
  border-color: #0D2B55;
  box-shadow: 0 0 6px rgba(13, 43, 85, 0.35);
  outline: none;
}



/* =========================================================
   RESPONSIVE – MÓVILES MODERNOS (iPhone y Android)
   ========================================================= */

@media (max-width: 480px) {

  .contenedor {
    width: 100%;
    border-radius: 0;
  }

  .card-login {
    padding: 22px 20px;
    max-width: 350px;
  }

  .logo-login .logo-img {
    width: 110px;
    height: 110px;
  }

  .logo-text {
    font-size: 22px;
  }

  form input {
    padding: 10px;
    font-size: 14px;
  }

  .btn-primary {
    padding: 12px;
    font-size: 15px;
    width: 50%;
  }
}


/* =========================================================
   🎯 VERSIÓN FINAL MÓVIL ELEGANTE (Estilo Desktop Adaptado)
   ========================================================= */

@media (max-width: 480px) {

  /* Fondo azul ocupa toda la pantalla */
  body {
    background: #0f1568;
    display: block;
    padding: 25px 10px;
    height: auto !important;
  }

  /* Contenedor general sin bordes pegados */
  .contenedor {
    background: transparent !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  /* Ocultamos panel izquierdo (versión desktop) */
  .left-panel {
    display: none;
  }

  /* Panel derecho centrado */
  .right-panel {
    background: transparent !important;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  /* TARJETA LOGIN (EL CORAZÓN DEL DISEÑO) */
  .card-login {
    background: #ffffff;
    width: 92%;
    max-width: 360px;
    padding: 28px 22px;
    border-radius: 18px;            /* ⭐ Bordes premium */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);  /* ⭐ Sombra pro */
    margin: 40px auto;              /* ⭐ Separación visual */
  }

  /* Logo más elegante */
  .logo-login {
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
  }

  .logo-login .logo-img {
    width: 95px;
    height: 95px;
  }

  .logo-text {
    font-size: 22px;
    text-align: center;
    margin-top: 10px;
  }

  /* Subtítulo */
  .card-accesso .sub {
    text-align: center;
    font-size: 16px;
  }

  /* Inputs más reducidos */
  form input {
    font-size: 14px;
    height: 44px;
  }

  /* Botón tipo app, pero elegante */
  .btn-primary {
    width: 100% !important;
    font-size: 16px;
    padding: 13px;
    border-radius: 12px;
  }

  .extras {
    margin-top: 18px;
  }

  /* =========================================================
     📱 PANEL IZQUIERDO DEBAJO DEL LOGIN SOLO EN MÓVIL
     ========================================================= */

  .left-panel.mobile-section {
    display: block !important;
    width: 92%;
    margin: 20px auto 40px auto;
    padding: 22px 18px;
    background: #0f1568;
    border-radius: 16px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  }

  .left-panel.mobile-section .logo-principal {
    width: 120px;
    height: auto;
    margin: 0 auto 15px;
  }

  .left-panel.mobile-section h1 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .left-panel.mobile-section .descripcion {
    font-size: 14px;
    margin-bottom: 18px;
    opacity: 0.95;
  }

  .left-panel.mobile-section .beneficios {
    width: 85%;
    margin: 0 auto;
    padding: 0;
    text-align: left;
  }

  .left-panel.mobile-section .beneficios li {
    font-size: 13px;
    margin-bottom: 8px;
    padding-left: 14px;
  }

  .left-panel.mobile-section .beneficios li::before {
    left: 0;
  }

  .left-panel.mobile-section .claim {
    font-size: 13px;
    margin-top: 18px;
    opacity: 0.85;
  }

}

/* =========================================================
   🔽 ORDEN CORRECTO EN MÓVIL (Login arriba / Panel abajo)
   ========================================================= */
@media (max-width: 480px) {

  /* El contenedor pasa a modo columna */
  .contenedor {
    display: flex !important;
    flex-direction: column !important;
  }

  /* LOGIN primero */
  .right-panel {
    order: 1;
  }

  /* PANEL INFORMATIVO (izquierdo) después del login */
  .left-panel.mobile-section {
    order: 2;
  }
}
