/* ===== Reset viewport y sin scroll ===== */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: "Montserrat", system-ui, -apple-system, Arial, sans-serif;
}

/* Fondo a pantalla completa */
.bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0; /* ocupa todo */
  z-index: 0;
  pointer-events: none;                 /* no bloquea clics */
  
  background-image: url('../img/fondoGRS3.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;               /* clave: que llene */
  
  height: 100dvh;                       /* alto real en móviles */
}

/* Fallback/ajuste para navegadores sin dvh */
@supports (height: 100svh) {
  .bg { height: 100svh; }
}
@supports (height: 100vh) {
  .bg { height: 100vh; } /* último fallback */
}


/* ===== Layout del formulario a pantalla completa ===== */
#login {
  position: relative;
  z-index: 1;              /* por encima del fondo */
  display: grid;
  place-items: center;     /* centra #contin */
  height: 100dvh;          /* alto real del viewport (iOS/Android) */
  min-height: 100svh;
  padding: clamp(12px, 3vw, 24px);
  box-sizing: border-box;
}

/* ===== Caja central (azul marino) ===== */
#contin {
  background: #D7263D;     /* azul marino */
  color: #FFFFFF;
  width: min(92vw, 480px);
  max-width: 92vw;
  border-radius: 18px;
  box-shadow:
    0 18px 40px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.06);
  padding: clamp(16px, 4vw, 28px,16px);
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.06);
  display: grid;
  justify-items: center;
  gap: clamp(10px, 2.5vw, 16px);
  max-height: 88dvh;        /* por si aparece el teclado móvil */
  overflow: hidden;         /* pediste sin scroll */
}

/* Logo */
#contin > img[alt="Logo"] {
  height: clamp(40px, 10vw, 60px);
  width: auto;
}

/* ===== Inputs responsivos: 90% de pantalla (ancho) ===== */
.intxt, .intxtb, .pwa-btn {
  width: min(90vw, 420px);   /* 90% de la pantalla con tope */
  max-width: 90vw;
  box-sizing: border-box;
}

.intxt {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
  backdrop-filter: blur(2px);
}
.intxt::placeholder { color: rgba(255,255,255,.75); }
.intxt:focus {
  border-color: #8AB4F8;
  box-shadow: 0 0 0 3px rgba(138,180,248,.25);
}

/* Botón Ingresar (si quieres que mantenga azul marino, lo dejo sobrio) */
.intxtb {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  color: #fff;
  background: linear-gradient(180deg, #123054 0%, #0B1F3B 100%);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,.35);
  transition: transform .08s ease, filter .15s ease;
}
.intxtb:hover { filter: brightness(1.05); }
.intxtb:active { transform: translateY(1px) scale(.99); }

/* ===== Botones PWA ===== */
.pwa-actions { width: 100%; display: grid; gap: 10px; justify-items: center; }

/* Botón rojo para INSTALAR (clase .alt ya viene en tu HTML) */
.pwa-btn.alt {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  color: #fff;
  background: linear-gradient(180deg, #D7263D 0%, #B01E31 100%); /* rojo */
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,.35);
  transition: transform .08s ease, filter .15s ease;
}
.pwa-btn.alt:hover { filter: brightness(1.05); }
.pwa-btn.alt:active { transform: translateY(1px) scale(.99); }
.pwa-btn.alt:focus-visible { outline: 3px solid #FFD1D6; outline-offset: 2px; }

/* Botón de notificaciones (secundario, semitransparente) */
.pwa-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  color: #fff;
  font-weight: 600;
  backdrop-filter: blur(2px);
}

/* Oculta las bandas superiores/inferiores si existen en tu maquetación */
#nomcol, #nomcol2 { display: none; }

/* Mejoras cuando el teclado móvil aparece */
@media (max-width: 600px) {
  #contin {
    max-height: 88dvh;
    overflow: hidden; /* sin scroll como pediste */
  }
}

