body.auth-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: #f5ead1;
  background: #090909;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url("../images/authbg.webp") center center / cover no-repeat;
  filter: saturate(1.04) contrast(1.03) brightness(0.9);
}

body.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.74) 78%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.1), rgba(5, 5, 5, 0.62));
  pointer-events: none;
}

body.auth-page #sparks {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.45;
  mix-blend-mode: screen;
}

.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1rem;
}

.auth-layout {
  width: min(100%, 58rem);
  display: grid;
  grid-template-columns: minmax(0, 31.5rem) minmax(0, 26.5rem);
  align-items: stretch;
  border: 0.08rem solid rgba(226, 178, 57, 0.18);
  border-top-width: 0.22rem;
  border-radius: 0.78rem;
  background: rgba(10, 10, 10, 0.9);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.32);
  overflow: hidden;
  position: relative;
}

.auth-layout,
.auth-card,
.auth-aside {
  min-height: 46rem;
}

.auth-layout::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 54.31%;
  width: 3.8rem;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(8, 8, 8, 0.12) 24%, rgba(10, 10, 10, 0.34) 50%, rgba(8, 8, 8, 0.12) 76%, rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 2;
}

.auth-layout::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 54.31%;
  width: 0.08rem;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 224, 145, 0), rgba(226, 178, 57, 0.28) 6%, rgba(226, 178, 57, 0.32) 94%, rgba(255, 224, 145, 0));
  box-shadow: 0 0 0.7rem rgba(215, 180, 90, 0.14);
  pointer-events: none;
  z-index: 3;
}

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  border-right: 0.05rem solid rgba(226, 178, 57, 0.12);
}

.auth-top {
  padding: 1rem 1.45rem 0.5rem;
}

.auth-home {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.auth-home-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;
  background: url("../images/ui/BackButton.png") center / contain no-repeat;
  filter: brightness(0.98);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 1.45rem;
  border-bottom: 0.05rem solid rgba(226, 178, 57, 0.16);
}

.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem 0.95rem;
  border-bottom: 0.12rem solid transparent;
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.auth-tab.is-active {
  color: rgba(255, 184, 0, 0.92);
  border-bottom-color: rgba(255, 184, 0, 0.92);
}

.auth-alert {
  margin: 1rem 1.45rem 0;
  padding: 0.7rem 0.9rem;
  border: 0.05rem solid rgba(226, 178, 57, 0.2);
  border-radius: 0.45rem;
  background: rgba(33, 25, 12, 0.66);
  color: #f3d48c;
  font-size: 0.95rem;
}

.auth-panels {
  padding: 0.75rem 1.45rem 1.3rem;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.auth-form {
  display: none;
  gap: 0.75rem;
  width: 100%;
}

.auth-form.is-active {
  display: grid;
  width: 100%;
}

.auth-form-head {
  width: calc(100% - 1rem);
  margin-inline: auto;
  padding-top: 0;
  margin-bottom: 0.35rem;
  text-align: center;
}

.auth-form-head h1 {
  margin: 0;
  color: #efcf84;
  font-family: "Prasia", serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.1;
}

.auth-form[data-panel="forgot"] .auth-form-head {
  margin-bottom: -0.1rem;
  transform: translateY(-2rem);
}

.auth-grid {
  display: grid;
  gap: 0.75rem;
  width: calc(100% - 4rem);
  margin-inline: auto;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-field--full {
  grid-column: 1 / -1;
}

.auth-field > span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 700;
}

.auth-field input,
.auth-select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.78rem 0.95rem;
  border: 0.05rem solid rgba(226, 178, 57, 0.16);
  background: rgba(34, 34, 34, 0.95);
  color: #f2f2f2;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.auth-field input:focus,
.auth-select:focus {
  border-color: rgba(226, 178, 57, 0.7);
  box-shadow: 0 0 0 0.12rem rgba(226, 178, 57, 0.08);
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
  -webkit-text-fill-color: #f2f2f2;
  caret-color: #f2f2f2;
  border: 0.05rem solid rgba(226, 178, 57, 0.16);
  -webkit-box-shadow: 0 0 0 1000px rgba(34, 34, 34, 0.95) inset;
  box-shadow: 0 0 0 1000px rgba(34, 34, 34, 0.95) inset;
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

.auth-field input:-webkit-autofill:focus {
  border-color: rgba(226, 178, 57, 0.7);
  -webkit-box-shadow:
    0 0 0 0.12rem rgba(226, 178, 57, 0.08),
    0 0 0 1000px rgba(34, 34, 34, 0.95) inset;
  box-shadow:
    0 0 0 0.12rem rgba(226, 178, 57, 0.08),
    0 0 0 1000px rgba(34, 34, 34, 0.95) inset;
}

.auth-select {
  appearance: none;
  padding-right: 2.6rem;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.58) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.58) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) 1.22rem,
    calc(100% - 0.8rem) 1.22rem;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

.auth-input-shell {
  position: relative;
}

.auth-input-shell input {
  padding-right: 3rem;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.05rem solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.auth-eye svg {
  width: 1rem;
  height: 1rem;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.auth-check input {
  width: 1rem;
  height: 1rem;
  accent-color: rgba(255, 184, 0, 0.92);
}

.auth-check a {
  color: rgba(255, 184, 0, 0.92);
  text-decoration: none;
}

.auth-forgot {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  cursor: pointer;
}

.auth-forgot-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
  line-height: 1.45;
}

.auth-forgot-back {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.auth-actions {
  display: grid;
  gap: 0.75rem;
  width: calc(100% - 4rem);
  margin: 0.35rem auto 0;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  width: 100%;
  padding: 0.82rem 1.1rem;
  border: 0.05rem solid rgba(226, 178, 57, 0.2);
  border-radius: 0.42rem;
  background:
    linear-gradient(180deg, rgba(27, 25, 21, 0.98), rgba(11, 11, 11, 0.98)),
    radial-gradient(circle at 50% 24%, rgba(214, 172, 47, 0.12), transparent 54%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 0.05rem rgba(255, 220, 140, 0.08), 0 0.65rem 1.1rem rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-position 0.24s ease;
  background-size: 100% 100%, 140% 140%;
  background-position: center, 50% 20%;
}

.auth-link-text {
  margin: 0;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.64);
  text-align: center;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.64);
}

.auth-link-accent {
  color: rgba(255, 184, 0, 0.92);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}

.auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-0.06rem);
  border-color: rgba(226, 178, 57, 0.38);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 220, 140, 0.12), 0 0.95rem 1.45rem rgba(0, 0, 0, 0.22);
  background-position: center, 50% 12%;
}

.auth-submit:active {
  transform: translateY(0.04rem) scale(0.995);
  filter: brightness(0.98);
}

.auth-home:hover,
.auth-tab:hover,
.auth-link:hover,
.auth-check a:hover,
.auth-forgot:hover {
  color: rgba(255, 184, 0, 0.92);
}

.auth-home:hover .auth-home-icon {
  filter: brightness(1.08);
}

.auth-eye:hover {
  color: rgba(255, 184, 0, 0.92);
  border-color: rgba(226, 178, 57, 0.22);
  background: rgba(226, 178, 57, 0.08);
}

.auth-eye:active {
  transform: translateY(-50%) scale(0.96);
}

.auth-submit:focus-visible,
.auth-eye:focus-visible,
.auth-home:focus-visible,
.auth-tab:focus-visible,
.auth-link:focus-visible {
  outline: 0.08rem solid rgba(226, 178, 57, 0.62);
  outline-offset: 0.12rem;
}

.auth-aside {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #0b0b0b;
  border-left: 0.05rem solid rgba(226, 178, 57, 0.08);
  box-shadow: inset 1rem 0 1.4rem rgba(0, 0, 0, 0.42);
}

.auth-aside::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3.4rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(6, 6, 6, 0.14) 34%, rgba(6, 6, 6, 0.34) 68%, rgba(0, 0, 0, 0.06));
  pointer-events: none;
  z-index: 1;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08) 18%, transparent 36%, transparent 70%, rgba(0, 0, 0, 0.18)),
    linear-gradient(180deg, rgba(8, 8, 8, 0.08), rgba(8, 8, 8, 0.52) 86%);
  pointer-events: none;
  z-index: 2;
}

.auth-aside-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.auth-aside-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(130, 22, 32, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.24), rgba(8, 8, 8, 0) 22%, rgba(8, 8, 8, 0) 74%, rgba(8, 8, 8, 0.28)),
    linear-gradient(90deg, rgba(8, 8, 8, 0.26), rgba(8, 8, 8, 0) 18%, rgba(8, 8, 8, 0) 82%, rgba(8, 8, 8, 0.22));
  pointer-events: none;
  z-index: 1;
}

.auth-aside-media img,
.auth-aside-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 90% 18%;
  display: block;
  filter: saturate(1.02) contrast(1.02) brightness(0.96);
  transform: scale(0.94);
  z-index: 0;
}

.auth-aside-media video {
  background: transparent;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.08);
  filter: saturate(1.04) contrast(1.03) brightness(0.94);
}

.auth-alert[hidden],
.auth-field[hidden],
.auth-error[hidden] {
  display: none;
}

.auth-alert--ok {
  border-color: rgba(120, 190, 110, 0.3);
  background: rgba(16, 33, 14, 0.66);
  color: #bfe3a8;
}

.auth-error {
  color: #ef8a7a;
  font-size: 0.86rem;
  line-height: 1.35;
}

.auth-field input.is-invalid,
.auth-select.is-invalid {
  border-color: rgba(239, 138, 122, 0.55);
}

.auth-submit.is-loading {
  opacity: 0.6;
  cursor: progress;
  pointer-events: none;
}

.auth-captcha:empty,
.auth-captcha:not(:has(.c-captcha)) {
  display: none;
}

.auth-captcha .c-captcha {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-captcha .c-captcha__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.auth-captcha .c-captcha__badge {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  color: #e2b239;
}

.auth-captcha .c-captcha__badge svg,
.auth-captcha .c-captcha__check svg {
  width: 100%;
  height: 100%;
}

.auth-captcha .c-captcha__quiz {
  margin-left: auto;
  color: #f3d48c;
  font-style: normal;
}

.auth-captcha .c-captcha__quiz em,
.auth-captcha .c-captcha__quiz i {
  font-style: normal;
  margin-left: 0.25rem;
}

.auth-captcha .c-captcha__field {
  position: relative;
}

.auth-captcha .c-captcha__check {
  display: none;
}

.auth-captcha .c-captcha__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-captcha .c-field__msg-text:empty {
  display: none;
}

@media (max-width: 960px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 31.5rem;
  }

  .auth-card {
    border-right: 0;
    border-bottom: 0.05rem solid rgba(226, 178, 57, 0.12);
  }

  .auth-aside {
    min-height: 18rem;
  }
}

@media (max-width: 768px) {
  .auth-wrap {
    align-items: flex-start;
    padding: 1rem 0.75rem 1.25rem;
  }

  .auth-layout {
    width: 100%;
    border-radius: 0.72rem;
  }

  .auth-top,
  .auth-tabs,
  .auth-panels {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-form-head,
  .auth-grid,
  .auth-actions {
    width: 100%;
  }

  .auth-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-aside {
    min-height: 15rem;
  }

  .auth-aside-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 1.15rem 1.05rem 1.05rem;
    max-width: 17.5rem;
  }

  .auth-layout,
  .auth-card,
  .auth-aside {
    min-height: 0;
  }

  .auth-layout::after {
    display: none;
  }
}

.auth-alt {
  display: grid;
  gap: 0.6rem;
}

.auth-alt-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.8rem;
  white-space: nowrap;
}

.auth-alt-sep::before,
.auth-alt-sep::after {
  content: "";
  flex: 1;
  height: 0.05rem;
  background: linear-gradient(90deg, transparent, rgba(226, 178, 57, 0.22), transparent);
}

.auth-alt-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.auth-alt-btn {
  flex: 1 1 8.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 0.05rem solid rgba(226, 178, 57, 0.2);
  border-radius: 0.42rem;
  background: linear-gradient(180deg, rgba(27, 25, 21, 0.98), rgba(11, 11, 11, 0.98));
  color: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 0.05rem rgba(255, 220, 140, 0.05), 0 0.45rem 0.9rem rgba(0, 0, 0, 0.22);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-alt-btn[hidden] {
  display: none;
}

.auth-alt-btn--icon {
  flex: 0 0 2.5rem;
  padding: 0;
}

.auth-alt-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  color: rgba(226, 178, 57, 0.85);
  transition: color 0.2s ease;
}

.auth-alt-btn:hover,
.auth-alt-btn.is-drag {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(226, 178, 57, 0.32);
  transform: translateY(-0.04rem);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 220, 140, 0.07), 0 0.6rem 1.1rem rgba(0, 0, 0, 0.26);
}

.auth-alt-btn:hover .auth-alt-icon,
.auth-alt-btn.is-drag .auth-alt-icon {
  color: rgba(236, 190, 72, 0.95);
}

.auth-alt-btn:active {
  transform: translateY(0.03rem) scale(0.995);
}

.auth-alt-btn:focus-visible {
  outline: 0.08rem solid rgba(226, 178, 57, 0.62);
  outline-offset: 0.12rem;
}

.auth-alt-btn.is-loading {
  opacity: 0.6;
  cursor: progress;
  pointer-events: none;
}
