/* ===== General ===== */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  background-image: url('../img_logo/virreyes_02.png');
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}

/* ===== Encabezado institucional ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: linear-gradient(to right, #7b1fa2, #e91e63);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
}

/* Agrupador de logos institucionales */
.logo-group {
  display: flex;
  gap: 130px;
  align-items: center;
}

.logo-group img {
  height: 50px;
  max-height: 60px;
  background-color: rgba(255,255,255,0.7);
  padding: 4px 6px;
  border-radius: 8px;
  object-fit: contain;
}

/* Solo mostrar el primer logo en pantallas pequeñas */
@media (max-width: 480px) {
  .logo-group img:not(:nth-child(2)) {
    display: none;
  }
  .logo-group img:first-child {
    margin: 0 auto;
  }
}

/* ===== Contenedor principal ===== */
.contenido-principal {
  flex: 1;
  padding: 100px 20px 20px; /* espacio para el topbar */
}

/* ===== Login ===== */
.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
}

.login-box {
  background: linear-gradient(135deg, #7b1fa2, #e91e63);
  border-radius: 10px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  margin: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  color: white;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.login-box .icon {
  text-align: center;
  margin-bottom: 20px;
}

.login-box img {
  width: 64px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ===== Formulario ===== */
input, button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
}

input[type="text"],
input[type="password"] {
  padding-right: 40px;
  height: 44px;
  font-size: 16px;
  margin-bottom: 10px;
  background-color: rgba(255,255,255,0.9);
  color: #2A7CF3;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* ===== Mostrar/ocultar contraseña (ojito) ===== */
.input-ojito {
  position: relative;
}

.input-ojito input {
  padding-right: 40px;
}

.ojo-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

/* ===== Checkbox y botón alineados horizontalmente ===== */
.acciones {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  margin-top: 10px;
}

.acciones label {
  font-size: 14px;
  color: #eee;
}

.acciones button {
  padding: 8px 16px;
  font-size: 14px;
  background-color: #fff;
  color: #7b1fa2;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.3s ease;
}

.acciones button:hover {
  background-color: #f0f0f0;
}

/* ===== Link recuperación ===== */
.forgot-link {
  display: block;
  margin-top: 15px;
  text-align: center;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* ===== Responsividad general ===== */
@media (max-width: 480px) {
  .login-box {
    padding: 24px;
    width: 90%;
    margin: 40px auto;
  }

  input, button {
    padding: 10px;
    font-size: 14px;
  }

  .login-box h2 {
    font-size: 20px;
  }
}