
@import url('https://fonts.googleapis.com/css2?family=Shrikhand&display=swap');

@font-face {
  font-family: 'Nasalization';
  src: url('/fonts/nasalization/nasalization-rg.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  font-family: system-ui, Arial, sans-serif;
  background:
    radial-gradient(1000px 700px at 20% 0%, rgba(29,161,255,.16), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(255,64,129,.10), transparent 55%),
    #0b1320;
  color: rgba(255,255,255,.92);
}

.login-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.login-card {
  width: min(380px, calc(100vw - 44px));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.28);
  padding: 28px;
  box-sizing: border-box;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.login-card h1.login-brand {
  margin: 0 0 8px 0;
  font-family: 'Shrikhand', cursive;
  font-size: 46px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .02em;
  color: #fff;
  text-transform: lowercase;
  text-align: center;
}

.login-card p {
  margin: 0 0 18px 0;
  color: rgba(255,255,255,.65);
  text-align: center;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form input {
  display: block;
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 0 12px;
  outline: none;
}

.login-form input::placeholder {
  color: rgba(255,255,255,.55);
}

.login-form input:focus {
  border-color: rgba(29,161,255,.35);
  background: rgba(255,255,255,.08);
}

/* AUTOFILL oscuro: cubre completamente el color impuesto por Chrome */
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;

  -webkit-box-shadow: 0 0 0 1000px #141d2a inset !important;
  box-shadow: 0 0 0 1000px #141d2a inset !important;

  border: 1px solid rgba(255,255,255,.12) !important;

  transition:
    background-color 999999s ease-out 0s,
    color 999999s ease-out 0s;
}

/* Firefox y navegadores compatibles con :autofill */
.login-form input:autofill {
  color: #fff !important;
  caret-color: #fff !important;
  box-shadow: 0 0 0 1000px #141d2a inset !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

.pass-wrap {
  position: relative;
  width: 100%;
}

.pass-wrap #loginPass {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;
}

.pass-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pass-toggle:hover,
.pass-toggle:focus,
.pass-toggle:active {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pass-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: #e3e3e3;
  opacity: .88;
  pointer-events: none;
}

.pass-toggle:hover svg {
  opacity: 1;
}

.login-form > button[type="submit"] {
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(29,161,255,.35);
  background: rgba(29,161,255,.20);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.login-msg {
  margin-top: 14px;
  min-height: 20px;
  color: #ffb3b3;
}

/* Powered by BOSIA: misma marca usada en Playlists */
.login-powered {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  user-select: none;
}

.login-powered-label {
  color: rgba(225,233,242,.28);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .9px;
  white-space: nowrap;
  transform: translateY(1.5px);
}

.login-powered-logo {
  display: block;
  width: 72px;
  height: auto;
  max-height: 20px;
  object-fit: contain;

  pointer-events: none;
  user-select: none;

  transform: translateY(1px);
}

.login-powered-brand {
  position: relative;
  display: block;
  line-height: 0;
}

.login-powered-tm {
  position: absolute;
  top: 3px;
  left: calc(100% + 0px);

  color: rgba(225,233,242,.62);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;

  pointer-events: none;
  user-select: none;
}

@media (max-width: 640px) {
  .login-page {
    padding: 22px;
    align-items: center;
  }

  .login-card {
    width: min(360px, calc(100vw - 44px));
    padding: 22px;
    border-radius: 18px;
  }

  .login-card h1.login-brand {
    font-size: 40px;
  }

  .login-card p {
    font-size: 14px;
  }
}

/* ===== ALWAYS LOGIN PRESS COLOR V1 =====
   Feedback discreto: al mantener presionado INGRESAR se oscurece,
   sin cambiar texto, tamano ni posicion. */
.login-form > button[type="submit"]:active {
  background: rgba(12, 74, 110, .42);
  border-color: rgba(29, 161, 255, .28);
}
/* ===== END ALWAYS LOGIN PRESS COLOR V1 ===== */

/* ===== ALWAYS LOGIN PENDING COLOR V1.1 =====
   El boton queda oscuro desde que se envia el login hasta navegar o recibir error.
   No cambia texto, ancho, alto ni posicion. */
.login-form > button[type="submit"].is-submitting {
  background: rgba(12, 74, 110, .42);
  border-color: rgba(29, 161, 255, .28);
}
/* ===== END ALWAYS LOGIN PENDING COLOR V1.1 ===== */


/* ===== ALWAYS LOGIN BRAND SVG + SQUARE GAME V1 =====
   Identidad y fondo de login; formulario, seguridad y BOSIA intactos. */
.login-page::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 18px));
  height: min(388px, calc(100svh - 18px));
  background: linear-gradient(145deg, #071224 0%, #07101e 100%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: #060c16;
  border-color: rgba(147,171,201,.15);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
@font-face {
  font-family: 'Square Game';
  src: url('/fonts/square-game/square-game.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.login-card .login-identity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  margin: 0 0 18px;
}
.login-card .login-isotype {
  display: block;
  flex: 0 0 118px;
  width: 118px;
  height: 85px;
  pointer-events: none;
}
.login-card .login-isotype-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.login-card .login-identity-copy {
  flex: 1 1 0;
  min-width: 0;
}
.login-card .login-identity h1.login-brand {
  margin: 0;
  font-family: 'Square Game', sans-serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.login-card .login-identity p {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.25;
  color: rgba(227,234,245,.74);
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .login-card .login-identity { gap: 6px; }
  .login-card .login-isotype {
    flex-basis: clamp(78px, 28vw, 112px);
    width: clamp(78px, 28vw, 112px);
    height: auto;
    aspect-ratio: 860 / 620;
  }
  .login-card .login-identity h1.login-brand {
    font-size: clamp(30px, 11.5vw, 50px);
  }
  .login-card .login-identity p {
    font-size: clamp(10px, 3.15vw, 13px);
  }
}
@media (min-width: 481px) and (max-width: 640px) {
  .login-card {
    width: min(380px, calc(100vw - 44px));
    padding: 28px;
  }
  .login-card .login-isotype {
    flex-basis: 118px;
    width: 118px;
    height: 85px;
  }
  .login-card .login-identity h1.login-brand { font-size: 52px; }
  .login-card .login-identity p { font-size: 14px; }
}
/* ===== END ALWAYS LOGIN BRAND SVG + SQUARE GAME V1 ===== */

/* ALWAYS LOGIN NOTEBOOK REMOVE SECOND RECTANGLE V1 BEGIN */
/* La capa ::before genera el segundo cuadro oscuro de 460x388.
   Conservar la caja de login y el fondo real del body sin cambios.
   Solo notebook, modo normal y fullscreen; escritorio intacto. */
@media (min-width: 641px) and (max-width: 1600px) and (max-height: 1000px) {
  .login-page::before {
    display: none !important;
  }
}
/* ALWAYS LOGIN NOTEBOOK REMOVE SECOND RECTANGLE V1 END */

/* ALWAYS LOGIN BUTTON DOTS + MEDIA BOOT GATE V1 BEGIN */
.login-form > button[type="submit"].is-submitting {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: progress;
}
.login-form .alwaysLoginDots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 100%;
}
.login-form .alwaysLoginDots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: alwaysLoginDotPulse 1.05s ease-in-out infinite;
}
.login-form .alwaysLoginDots i:nth-child(1) { background: #1675f8; animation-delay: 0s; }
.login-form .alwaysLoginDots i:nth-child(2) { background: #18caec; animation-delay: .15s; }
.login-form .alwaysLoginDots i:nth-child(3) { background: #3cff85; animation-delay: .30s; }
@keyframes alwaysLoginDotPulse {
  0%, 60%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .login-form .alwaysLoginDots i { animation: none; opacity: 1; }
}
/* ALWAYS LOGIN BUTTON DOTS + MEDIA BOOT GATE V1 END */

/* ALWAYS LOGIN INLINE ERROR SUBTITLE V1 BEGIN */
.login-card .login-identity p.loginIdentityError {
  color: #ffb3b3;
  white-space: normal;
  overflow-wrap: break-word;
}
/* ALWAYS LOGIN INLINE ERROR SUBTITLE V1 END */
