:root {
  --login-bg: #1c1e2b;
  --login-orange: #fa8a1b;
  --login-orange-dark: #f68138;
  --login-grey-light: #f7f9fd;
  --login-grey-border: #ebedf5;
  --login-grey-text: #9697ac;
  --login-black: #181818;
}

.play-login-shell,
.play-login-main,
.play-login {
  min-height: 100vh;
}

.play-login {
  font-family: "Titillium Web", system-ui, sans-serif;
  background: var(--login-bg);
}

.login-page {
  --card-width: 383px;
  --card-height: 480.5px;
  --card-radius: 40px;
  --card-padding: 24px;
  --card-gap: 24px;
  --inner-width: 344px;
  --inner-height: 426px;
  --form-width: 296px;
  --input-height: 48px;
  --button-height: 48px;
  --title-size: 48px;
  --title-line: 48px;
  --subtitle-size: 20px;
  --subtitle-line: 28px;
  --logo-width: 210px;
  --logo-height: 72px;
  --corner-width: 676px;
  --corner-height: 380px;
  --page-pad-left: 120px;
  --page-pad-right: 346px;
  --page-pad-top: 0px;
  --page-pad-bottom: 0px;

  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--page-pad-top) var(--page-pad-right) var(--page-pad-bottom) var(--page-pad-left);
  overflow: hidden;
  background: var(--login-bg);
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg__image {
  position: absolute;
  inset: -16px -24px;
  background: url("/static/img/login/bg-blur.png") center/cover no-repeat;
  filter: blur(6px);
  transform: scale(1.02);
}

.login-bg__corner {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--corner-width);
  height: var(--corner-height);
  background: url("/static/img/login/corner-blur.png") center/cover no-repeat;
  filter: blur(2px);
}

.login-bg__mexica {
  position: absolute;
  bottom: 0;
  left: var(--mexica-left, 0);
  width: var(--mexica-width, 0);
  height: var(--mexica-height, 0);
  opacity: 1;
  transform: translateY(var(--mexica-top, 0)) rotate(0deg);
  object-fit: contain;
  pointer-events: none;
  display: none;
}

.login-bg__mexica-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mexica-card-width, 0);
  height: var(--mexica-card-height, 0);
  opacity: 1;
  transform: translate(-50%, -50%) translateY(var(--mexica-card-offset, 0)) rotate(0deg);
  object-fit: contain;
  pointer-events: none;
  display: none;
}

@media (min-width: 1920px) {
  .login-bg__mexica {
    display: block;
    --mexica-width: 1058px;
    --mexica-height: 1175px;
    --mexica-left: 0px;
  }
}

@media (min-width: 1280px) and (max-width: 1919px) {
  .login-bg__mexica {
    display: block;
    --mexica-width: 790px;
    --mexica-height: 878px;
    --mexica-left: -65px;
  }
}

@media (max-width: 743px) {
  .login-bg__mexica-card {
    display: block;
    --mexica-card-width: 448px;
    --mexica-card-height: 497px;
    --mexica-card-offset: -180px;
  }
}

.login-card {
  position: relative;
  z-index: 1;
  width: var(--card-width);
  height: var(--card-height);
  border-radius: 0;
  background-color: #ffffff;
  -webkit-mask-image: url("/static/img/login/rectangle-10322.svg");
  mask-image: url("/static/img/login/rectangle-10322.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card--error {
  --card-height: 523px;
  -webkit-mask-image: url("/static/img/login/rectangle-10322-error.svg");
  mask-image: url("/static/img/login/rectangle-10322-error.svg");
}

.login-card__inner {
  width: var(--inner-width);
  min-height: var(--inner-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--card-gap);
  padding: var(--card-padding);
}

.login-brand {
  width: var(--logo-width);
  height: var(--logo-height);
  object-fit: contain;
}

.login-heading {
  text-align: center;
}

.login-heading__title {
  margin: 0;
  font-family: "David Libre", "Times New Roman", serif;
  font-size: var(--title-size);
  line-height: var(--title-line);
  font-weight: 700;
  background: linear-gradient(90deg, var(--login-orange) 0%, #f78135 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-heading__subtitle {
  margin: 4px 0 0;
  font-size: var(--subtitle-size);
  line-height: var(--subtitle-line);
  font-weight: 400;
  color: var(--login-black);
}

.login-form {
  width: var(--form-width);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  width: 100%;
  height: var(--input-height);
  display: block;
  position: relative;
  box-shadow: inset 0 4px 4px rgba(238, 205, 153, 0.24);
}

.login-field input {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--login-grey-border);
  background: var(--login-grey-light);
  padding: 0 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--login-black);
  outline: none;
}

.login-field input::placeholder {
  color: var(--login-grey-text);
}

.login-field input:focus {
  border-color: var(--login-orange);
  box-shadow: 0 0 0 2px rgba(250, 138, 27, 0.2);
}

.login-field--error input {
  background: #ffeff4;
  border-color: #ff729c;
  color: #ff004d;
}

.login-field--error input::placeholder {
  color: #ff729c;
}

.login-field--password input {
  padding-right: 48px;
}

.login-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  width: 16px;
  height: 16px;
  color: var(--login-grey-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-field--error .login-password-toggle {
  color: #ff729c;
}

.login-field--error .login-password-toggle:hover,
.login-field--error:focus-within .login-password-toggle {
  color: #ff004d;
}

.login-field:focus-within .login-password-toggle,
.login-password-toggle:hover {
  color: var(--login-orange);
}

.login-password-toggle:focus-visible {
  outline: 2px solid rgba(250, 138, 27, 0.35);
  outline-offset: 4px;
  border-radius: 6px;
}

.login-password-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

.login-password-toggle .icon-eye-off {
  display: none;
}

.login-password-toggle.is-visible .icon-eye {
  display: none;
}

.login-password-toggle.is-visible .icon-eye-off {
  display: block;
}

.login-field-error {
  width: 100%;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: #ff004d;
  text-align: left;
}

.login-submit {
  width: 100%;
  height: var(--button-height);
  border: none;
  border-radius: 8px;
  background: var(--login-orange);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 4px rgba(255, 203, 116, 0.4), inset 0 -4px 6px var(--login-orange-dark);
  cursor: pointer;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-error {
  width: var(--form-width);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(230, 39, 62, 0.1);
  color: #e6273e;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 1280px) {
  .login-page {
    --page-pad-right: 192px;
    --card-gap: 20px;
    --inner-height: 416px;
  }
}

@media (max-width: 744px) {
  .login-bg__corner {
    display: none;
  }

  .login-card {
    transform: translateY(100px);
  }

  .login-page {
    --page-pad-left: 24px;
    --page-pad-right: 24px;
    --page-pad-top: 0px;
    --page-pad-bottom: 0px;
    --card-gap: 20px;
    --inner-height: 416px;

    justify-content: center;
    align-items: center;
  }
}
