:root {
  --auth-cyan: #55e3d7;
  --auth-cyan-soft: rgba(85, 227, 215, 0.28);
  --auth-ink: #020f15;
  --auth-gold: #d9bf77;
}

html {
  min-height: 100%;
  background: var(--auth-ink);
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 58px);
  background:
    linear-gradient(105deg, rgba(1, 12, 18, 0.25), rgba(1, 15, 21, 0.58)),
    url('/static/assets/imgs/bg_home_huyenanh.png') center/cover fixed no-repeat;
}

body::before {
  background:
    radial-gradient(circle at 24% 42%, rgba(70, 229, 216, 0.2), transparent 30%),
    radial-gradient(circle at 78% 30%, rgba(44, 185, 198, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(1, 10, 15, 0.06), rgba(1, 8, 13, 0.56));
}

.huyenanh-ambient {
  z-index: 3;
  opacity: 0.82;
}

.auth-layout {
  width: min(1320px, 100%);
  min-height: min(760px, calc(100vh - 72px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(101, 226, 217, 0.4);
  background: rgba(2, 17, 23, 0.3);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.58),
    0 0 44px rgba(40, 197, 193, 0.12),
    inset 0 0 0 1px rgba(224, 255, 251, 0.04);
  overflow: hidden;
}

.auth-layout::before,
.auth-layout::after {
  content: '';
  position: absolute;
  z-index: 4;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(161, 244, 235, 0.82);
  background: #0b6870;
  box-shadow: 0 0 16px rgba(76, 232, 220, 0.75);
  transform: rotate(45deg);
}

.auth-layout::before {
  top: -7px;
  left: 50%;
}

.auth-layout::after {
  right: -7px;
  bottom: 42px;
}

.auth-visual {
  view-transition-name: auth-brand;
  isolation: isolate;
  justify-content: flex-end;
  padding: clamp(30px, 5vw, 72px);
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(2, 16, 22, 0.02) 20%, rgba(1, 12, 17, 0.26) 58%, rgba(1, 10, 15, 0.86) 100%);
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent 72%, rgba(1, 12, 18, 0.62)),
    radial-gradient(circle at 50% 68%, rgba(75, 234, 220, 0.2), transparent 30%);
}

.auth-visual::after {
  content: '';
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(121, 238, 229, 0.65), transparent);
  box-shadow: 0 0 14px rgba(66, 223, 212, 0.5);
}

.auth-visual a {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto 35px;
}

.auth-visual img {
  width: min(390px, 76%);
  max-width: none;
  margin: auto;
  filter: drop-shadow(0 18px 42px rgba(54, 219, 209, 0.48));
}

.auth-main {
  view-transition-name: auth-form;
  justify-content: center;
  padding: clamp(46px, 4.5vw, 70px);
  border-left: 1px solid rgba(91, 226, 217, 0.34);
  background:
    radial-gradient(circle at 78% 13%, rgba(66, 215, 210, 0.12), transparent 26%),
    linear-gradient(145deg, rgba(4, 29, 36, 0.94), rgba(2, 17, 23, 0.9));
  box-shadow: inset 20px 0 60px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.auth-main > * {
  width: min(100%, 535px);
  margin-left: auto;
  margin-right: auto;
}

.auth-main::before {
  opacity: 0.72;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(82, 220, 212, 0.035) 49% 50%, transparent 51% 100%),
    radial-gradient(circle at 82% 82%, rgba(29, 168, 180, 0.12), transparent 28%);
  background-size: 110px 110px, auto;
}

.auth-nav {
  gap: 34px;
  margin-bottom: 38px;
  border-bottom-color: rgba(72, 184, 187, 0.26);
}

.auth-nav a {
  letter-spacing: 0;
}

.auth-nav a.is-active {
  color: #7ff9ee;
  border-bottom-color: #4edfd5;
}

.eyebrow {
  color: var(--auth-gold);
}

.auth-title {
  color: #f5ffff;
  font-size: clamp(30px, 2.25vw, 40px);
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.44);
}

.auth-intro {
  max-width: 620px;
  color: rgba(202, 225, 225, 0.72);
  line-height: 1.7;
}

.field span {
  color: #6be9df;
  font-weight: 600;
}

.field input {
  min-height: 50px;
  border: 1px solid rgba(65, 200, 202, 0.42);
  border-radius: 4px;
  background: rgba(1, 14, 19, 0.72);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.3);
}

.field input:hover {
  border-color: rgba(93, 229, 220, 0.66);
}

.field input:focus {
  border-color: #6cf4e7;
  box-shadow: 0 0 0 2px rgba(46, 205, 202, 0.18), 0 0 20px rgba(46, 205, 202, 0.12);
}

.btn-submit {
  min-height: 52px;
  border-radius: 4px;
  border-color: rgba(125, 243, 232, 0.78);
  background: linear-gradient(105deg, #087f91, #17a99c, #087f91);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.18);
}

.btn-submit:hover {
  box-shadow: 0 13px 36px rgba(0, 0, 0, 0.32), 0 0 28px rgba(57, 221, 209, 0.28);
}

.home-link {
  color: rgba(200, 228, 226, 0.72);
}

/* Register reverses the two primary surfaces. */
.auth-register-page .auth-main {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid rgba(91, 226, 217, 0.34);
  border-left: 0;
  box-shadow: inset -20px 0 60px rgba(0, 0, 0, 0.2);
}

.auth-register-page .auth-visual {
  grid-column: 2;
  grid-row: 1;
  border-left: 0;
}

.auth-register-page .auth-visual::before {
  background:
    linear-gradient(270deg, transparent 72%, rgba(1, 12, 18, 0.62)),
    radial-gradient(circle at 50% 68%, rgba(75, 234, 220, 0.2), transparent 30%);
}

.auth-layout,
.auth-visual,
.auth-main {
  transition: transform 0.48s cubic-bezier(0.22, 0.8, 0.22, 1), opacity 0.38s ease;
}

.auth-login-page.auth-switching-to-register .auth-visual,
.auth-register-page.auth-switching-to-login .auth-main {
  transform: translateX(70px);
  opacity: 0.62;
}

.auth-login-page.auth-switching-to-register .auth-main,
.auth-register-page.auth-switching-to-login .auth-visual {
  transform: translateX(-70px);
  opacity: 0.62;
}

@view-transition {
  navigation: auto;
}

::view-transition-group(auth-brand),
::view-transition-group(auth-form) {
  animation-duration: 0.72s;
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.22, 1);
}

::view-transition-old(auth-brand),
::view-transition-new(auth-brand),
::view-transition-old(auth-form),
::view-transition-new(auth-form) {
  mix-blend-mode: normal;
}

@media (max-width: 900px) {
  body {
    display: block;
    padding: 0;
  }
  .auth-layout {
    width: 100%;
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
  }
  .auth-register-page .auth-main,
  .auth-register-page .auth-visual {
    grid-column: 1;
    grid-row: auto;
  }
  .auth-register-page .auth-visual {
    grid-row: 1;
  }
  .auth-register-page .auth-main {
    grid-row: 2;
    border-right: 0;
  }
  .auth-visual {
    min-height: 260px;
    justify-content: center;
    padding: 28px 20px;
    border-bottom: 1px solid rgba(85, 227, 215, 0.34);
  }
  .auth-visual a {
    margin: 0;
  }
  .auth-visual img {
    width: min(290px, 72vw);
  }
  .auth-visual::after {
    bottom: 13px;
  }
  .auth-main {
    min-height: calc(100vh - 260px);
    padding: 42px clamp(22px, 6vw, 48px) 56px;
    border-left: 0;
  }
  .auth-login-page.auth-switching-to-register .auth-visual,
  .auth-login-page.auth-switching-to-register .auth-main,
  .auth-register-page.auth-switching-to-login .auth-visual,
  .auth-register-page.auth-switching-to-login .auth-main {
    transform: translateY(-24px);
  }
}

@media (max-width: 520px) {
  .auth-visual {
    min-height: 210px;
  }
  .auth-visual img {
    width: min(185px, 55vw);
  }
  .auth-main {
    min-height: calc(100vh - 210px);
    padding-top: 34px;
  }
  .auth-nav {
    margin-bottom: 30px;
  }
  .auth-title {
    font-size: 28px;
  }
}
