body.page-login {
  margin: 0;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #4cc4f4;
}

body.page-login::before {
  content: "";
  position: absolute;
  inset: -2%;
  background-image: var(--prestamito-login-bg-image);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(3px);
  transform: scale(1.03);
  pointer-events: none;
  z-index: 0;
}

body.page-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 0;
}

body.page-login .app-frame::before,
body.page-login .app-frame::after {
  content: none;
}

.login-main {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vh, 32px) 16px;
}

.login-container {
  position: relative;
  z-index: 2;
  width: min(100%, 450px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.5vh, 18px);
  margin: auto;
}

.logo-top {
  width: min(85%, 350px);
  max-width: 350px;
  z-index: 2;
  margin-bottom: clamp(-28px, -3vh, -14px);
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
  transform-origin: center center;
  animation: logoFloat 4.8s ease-in-out infinite, logoPulse 3.8s ease-in-out infinite;
}

.wood-board {
  width: 100%;
  max-width: 420px;
  padding: clamp(38px, 7vh, 62px) clamp(16px, 5vw, 30px) clamp(22px, 4vh, 38px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  z-index: 1;
  background-image: var(--prestamito-login-board-image);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.view-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.4s ease-in-out;
}

.login-title {
  margin: 0 0 2vh;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.wood-board input[type="email"] {
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.5vh;
  padding: 12px 20px;
  border: none;
  border-radius: 25px;
  outline: none;
  box-sizing: border-box;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.btn {
  width: 100%;
  max-width: 220px;
  margin-bottom: 1.2vh;
  padding: 10px 12px;
  border: 2px solid #ffffff;
  border-radius: 28px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.16s, filter 0.16s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.32);
  filter: brightness(1.03);
}

.btn:active {
  transform: scale(0.96);
}

.btn-ingresar {
  background-color: #9cd426;
  color: #0b2d5c;
}

.login-feedback {
  width: 100%;
  max-width: 320px;
  min-height: 18px;
  margin: 0 0 1.2vh;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.login-feedback[data-state="error"] {
  color: #ffd4dd;
}

.login-feedback[data-state="success"] {
  color: #dbffd0;
}

.logo-bottom {
  width: clamp(120px, 32vw, 150px);
  z-index: 2;
  margin-top: clamp(-18px, -2vh, -8px);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
}

.login-celebration__stage {
  height: 100svh;
}

.login-celebration__video {
  height: 100svh;
  object-fit: cover;
}

.view-content[aria-busy="true"] {
  pointer-events: none;
}

.view-content[aria-busy="true"] .btn-ingresar {
  filter: saturate(0.8) brightness(0.98);
}

[data-login-flow-resend][hidden] {
  display: none !important;
}

.login-flow__choice-emoji {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 24px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.01);
  }
}

@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
  }

  50% {
    filter:
      drop-shadow(0 14px 16px rgba(0, 0, 0, 0.34))
      drop-shadow(0 0 18px rgba(255, 255, 255, 0.22));
  }
}

@media (max-width: 480px) {
  .login-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-container {
    gap: 8px;
  }

  .logo-top {
    width: min(82%, 300px);
  }

  .wood-board {
    padding: 42px 16px 24px;
  }

  .wood-board input[type="email"],
  .btn {
    max-width: none;
  }
}

@media (max-height: 600px) {
  .login-main {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .login-container {
    gap: 8px;
  }

  .logo-top {
    width: min(60%, 240px);
    margin-bottom: -12px;
  }

  .wood-board {
    padding: 28px 20px 18px;
  }

  .login-title {
    font-size: 14px;
    margin-bottom: 1vh;
  }

  .wood-board input[type="email"] {
    padding: 8px 15px;
    margin-bottom: 1vh;
    font-size: 12px;
  }

  .btn {
    max-width: 276px;
    padding: 8px 10px;
    margin-bottom: 1vh;
    font-size: 12px;
  }

  .logo-bottom {
    width: 110px;
    margin-top: -8px;
  }
}
