* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: 
    linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url('imagenes/siapolfondo.png') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.mensaje-alerta {
  background-color: #ffdddd;
  color: #d8000c;
  padding: 1rem;
  margin: 1rem auto;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.logocontainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start;
  padding: 1rem 1rem;
  z-index: 10;
}

.logo-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 4px 15px #000000ec;
}

.logo-texts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.siapol-title {
  font-size: 72px;
  font-weight: bold;
  color: #99ec2d;
  line-height: 1;
  text-shadow: 0 4px 15px #000000ec;
  margin: 0;
}

.siapol-subtitle {
  font-size: 32px;
  color: #fffafa;
  font-weight: 400;
  margin: 0.5rem 0 0 0;
  line-height: 1.2;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.login-form {
  background: rgba(2, 32, 66, 0.5);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 0 10px #fcfbfbec;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  width: 90%;
  max-width: 400px;
  gap: 1.2rem;
}

.login-form h2 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
}

.login-form label {
  color: #ffffff;
  font-size: 0.90rem;
  margin-bottom: -0.5rem;
  margin-top: 0.5rem;
}

.login-form input {
  padding: 0.9rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafbfc;
  outline: none;
  transition: border 0.2s;
  width: 100%;
}

.login-form input:focus {
  border: 1.5px solid #1976d2;
}

.login-form button {
  padding: 0.9rem;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form button:hover {
  background: #125ea6;
}

.forgot {
  text-align: right;
  font-size: 0.95rem;
  color: #ffffff;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.forgot:hover {
  text-decoration: underline;
}

.enlace {
  margin: 0;
}

/* CORREGIDO: contenedor del input de contraseña */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* CORREGIDO: input ocupa el 100% y no desborda */
.password-wrapper input {
  width: 100%;
  padding-right: 42px;
  box-sizing: border-box;
}

/* CORREGIDO: icono bien posicionado */
.toggle-password-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.toggle-password-icon:hover {
  opacity: 1;
}

/* Footer */
.footer {
  width: 100%;
  background-color: #020e27;
  padding: 15px 0;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  color: #4ecdff;
  margin-top: 10px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left {
  text-align: left;
  font-size: 1.2rem;
}

.footer-right a {
  margin-left: 10px;
  display: inline-block;
}

.footer-right img {
  width: 30px;
  height: 30px;
  opacity: 0.8;
  border: 1px solid transparent;
  border-radius: 50%;    
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-right img:hover {
  opacity: 1;
  transform: scale(1.3);
  border: 1px solid #4ecdff;
}

/* Responsive */
@media (max-width: 600px) {
  .logocontainer {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    text-align: center;
  }

  .logo-header {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .logo-img {
    width: 85px;
    height: 85px;
    margin: 0 auto;
  }

  .logo-texts {
    align-items: center;
    justify-content: center;
  }

  .siapol-title {
    font-size: 35px;
    margin: 0;
  }

  .siapol-subtitle {
    font-size: 16px;
    margin: 0;
    font-weight: bold;
  }

  .login-container {
    margin-top: 30px;
    width: 90%;
    justify-content: center;
  }

  .login-form h2 {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }

  .toggle-password-icon {
    width: 20px;
    height: 20px;
  }

  .footer-left {
    font-size: 1rem;
  }

  .footer-right img {
    width: 26px;
    height: 26px;
  }
}
