* {
  box-sizing: border-box;
}

body.auth-page {
  position: relative;
  margin: 0;
  padding-left: 80px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgb(13 179 254 / 14%), transparent 30rem),
    radial-gradient(circle at 86% 88%, rgb(0 104 254 / 11%), transparent 28rem),
    var(--nen);
}

niti-rail {
  display: block;
}

.auth-header {
  width: min(1120px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-header .brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--chu);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.auth-header .brand img {
  width: 40px;
  height: 40px;
}

.auth-header .back {
  color: var(--chu-phu);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}

.auth-shell {
  width: min(420px, calc(100% - 32px));
  margin: clamp(1.25rem, 6vh, 4.5rem) auto 3rem;
}

.auth-card {
  padding: clamp(1.45rem, 5vw, 2.15rem);
  border: 1px solid var(--vien);
  border-radius: 22px;
  background: color-mix(in srgb, var(--nen-noi) 96%, transparent);
  box-shadow: var(--bong);
}

.auth-kicker {
  margin: 0 0 .35rem;
  color: var(--mau-nhan);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.auth-intro {
  margin: .65rem 0 1.4rem;
  color: var(--chu-phu);
  font-size: .94rem;
}

.auth-card form {
  display: grid;
  gap: .9rem;
  margin-top: 1rem;
}

.auth-card form[hidden],
[hidden] {
  display: none !important;
}

.auth-card label {
  display: grid;
  gap: .38rem;
  color: var(--chu);
  font-size: .88rem;
  font-weight: 750;
}

.auth-card input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: .72rem .82rem;
  border: 1px solid var(--vien);
  border-radius: 11px;
  background: var(--nen);
  color: var(--chu);
  font: inherit;
}

.auth-card input:focus-visible,
.auth-card button:focus-visible,
.auth-card a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mau-nhan) 45%, transparent);
  outline-offset: 2px;
}

.auth-card input[aria-invalid="true"] {
  border-color: var(--nguy-hiem);
}

.auth-primary,
.auth-google {
  min-height: 48px;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-primary {
  border: 1px solid var(--mau-xanh);
  background: var(--mau-xanh);
  color: #fff;
  box-shadow: 0 8px 20px rgb(0 104 254 / 18%);
}

.auth-primary:hover {
  background: var(--mau-xanh-dam);
}

.auth-primary:disabled {
  cursor: wait;
  opacity: .65;
}

.auth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  border: 1px solid var(--vien);
  background: var(--nen-noi);
  color: var(--chu);
  text-decoration: none;
}

.auth-google:hover {
  background: var(--nen-mem);
}

.auth-google img {
  width: 19px;
  height: 19px;
}

.auth-separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .8rem;
  margin: 1.2rem 0;
  color: var(--chu-phu);
  font-size: .78rem;
  font-weight: 700;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  background: var(--vien);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .55rem 1rem;
  margin-top: .2rem;
}

.auth-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mau-nhan);
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.auth-error {
  min-height: 1.25rem;
  margin: .1rem 0 0;
  color: var(--nguy-hiem);
  font-size: .86rem;
  font-weight: 700;
}

.auth-note {
  margin: .9rem 0 0;
  color: var(--chu-phu);
  font-size: .78rem;
  line-height: 1.5;
}

.auth-summary {
  margin: 0;
  padding: .7rem .8rem;
  border-radius: 10px;
  background: var(--nen-mem);
  color: var(--chu-phu);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.auth-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--chu-phu);
  font-size: .88rem;
}

.auth-footer a {
  color: var(--mau-nhan);
  font-weight: 800;
}

@media (max-width: 800px) {
  body.auth-page {
    padding-left: 0;
  }
}

@media (max-width: 440px) {
  .auth-header {
    width: calc(100% - 24px);
    min-height: 66px;
  }

  .auth-header .back {
    font-size: .8rem;
  }

  .auth-shell {
    width: calc(100% - 24px);
    margin-top: .75rem;
  }

  .auth-card {
    border-radius: 18px;
  }
}
