/* =========================
   LOGIN PAGE LAYOUT
   ========================= */

.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;

  /* Fondo tipo maqueta (cambia el archivo) */
  background-image: url("https://i.postimg.cc/Qd5XKZqt/bg-qiist-ebook-reader.webp");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

/* Ajuste para dejar espacio a la barra superior */
.login-page .main {
  min-height: calc(100vh - 64px);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   TOPBAR
   ========================= */

.login-page .topbar {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  height: 55px;
  background: #103953;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  color: #f9fafb;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
}

.login-page .topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-page .topbar-logo {
  width: 160px;
  height: 80px;
  border-radius: 0 45px 45px;
  object-fit: contain;
  background: #ffffff;
  padding: 14px 17px 13px 45px;
  left: -59px;
  position: relative;
}

.login-page .topbar-brand {
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    position: relative;
    left: -40px;
}
.login-page .topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-page .icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 999px;
    border: 0px solid rgba(248, 250, 252, 0.4);
    background: #446882;
    color: #ebff00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
}

.login-page .icon-btn:hover {
  background: rgba(248, 250, 252, 0.15);
}

/* =========================
   LOGIN CARD
   ========================= */

.login-page .login-wrap {
  width: 100%;
  max-width: 480px;
}

.login-page .login-card {
  width: 100%;
  padding: 2.25rem 2.5rem;
  background: #1b3c53;
  color: #e5e7eb;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-page .login-card h1 {
    margin: 0 0 1.8rem;
    text-align: center;
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    font-weight: 500;
    border-bottom: 1px solid;
    padding-bottom: 15px;
}

/* Campos */
.login-page .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.login-page .field-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(209, 213, 219, 0.85);
}

/* Stack helper */
.login-page .vstack {
  display: flex;
  flex-direction: column;
}

.login-page .gap {
  gap: 1.15rem;
}

/* Inputs */
.login-page .input {
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #456882;
  color: #f9fafb;
  font-size: 0.95rem;
  outline: none;
}

.login-page .input::placeholder {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.85);
}

.login-page .input:focus {
  border-color: #fbbf77;
  box-shadow: 0 0 0 1px #fbbf77;
}

/* Botón ENTRAR dentro de la tarjeta */
.login-page .btn.primary {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 0.9rem;
  border: none;
  padding: 0.95rem 1rem;
  background: #f2c4a8;
  color: #1f2933;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.login-page .btn.primary:hover {
  background: #f9b58b;
}

.login-page .btn-icon {
  font-size: 1.1rem;
}

/* Texto muted */
.login-page .muted {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
}

/* =========================
   BOTÓN FLOTANTE ENTRAR
   ========================= */

.login-page .cta-enter {
  position: fixed;
  right: 2.5rem;
  bottom: 2rem;
  padding: 1rem 2.8rem;
  border-radius: 999px;
  border: none;
  background: #fbbf24; /* amarillo */
  color: #1f2933;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 15;
}

.login-page .cta-enter:hover {
  background: #f59e0b;
}

/* Reutilizamos el iconito */
.login-page .cta-enter .btn-icon {
  font-size: 1.2rem;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
  .login-page {
    background-position: center;
  }

  .login-page .main {
    padding: 2rem 1.5rem;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .login-page .topbar {
    padding: 0 1rem;
  }

  .login-page .main {
    padding: 1.5rem 1rem;
  }

  .login-page .login-card {
    padding: 1.8rem 1.5rem;
  }

  /* Hacer el botón flotante tipo full width */
  .login-page .cta-enter {
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .login-page .topbar-brand {
    font-size: 0.9rem;
  }

  .login-page .login-card {
    padding: 1.6rem 1.25rem;
    border-radius: 1rem;
  }

  .login-page .cta-enter {
    bottom: 1.25rem;
  }
}

/* =========================
   MODAL LOGIN (versión simple)
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;              /* 🔴 oculto por defecto */
  align-items: center;
  justify-content: center;
  width: 100vw;
  background-color: #1111118f;
  border-radius: 0px;
}

/* Cuando se abre */
.modal.is-open {
  display: flex;              /* 🟢 visible */
}

/* Fondo oscuro */
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(26 57 80 / 46%);
}

/* Caja del modal */
.modal-dialog {
  position: relative;
  z-index: 51;
  width: 70vw;
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal button {
    background: #4caf4f00;

}

/* Botón X */
.modal-close {
  position: absolute;
  top: 0rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: #f97316;
}

/* Imagen */
.modal-body {
  border-radius: 0.9rem;
  overflow: hidden;
}

.modal-body img {
  display: block;
  width: 100%;
  height: auto;
}

/* Botones del modal */
.modal-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal .btn {
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: none;
}

.modal .btn.secondary {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.modal .btn.secondary:hover {
  background: rgba(15, 23, 42, 0.65);
}

.modal .btn.primary {
  background: #facc15;
  color: #1f2933;
  font-weight: 600;
}

.modal .btn.primary:hover {
  background: #f59e0b;
}

.modal .btn-icon {
  font-size: 1.1rem;
}

@media (max-width: 480px) {
  .modal-dialog {
    padding: 1rem 0.9rem 0.85rem;
    border-radius: 14px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal .btn {
    width: 100%;
    justify-content: center;
  }
}
