.auth-page {
  min-height: 100vh;
  background: var(--night);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 0.9fr) minmax(480px, 1.1fr);
  min-height: 100vh;
}

.auth-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(36px, 5vw, 72px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(89, 109, 255, 0.13), transparent 50%),
    radial-gradient(circle at 24% 78%, rgba(53, 213, 199, 0.1), transparent 28%),
    var(--night);
}

.auth-context::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 66%;
  height: 50%;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom right, transparent, #000);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.auth-brand i,
.mobile-brand i {
  color: #aeb9ff;
  font-style: normal;
}

.auth-brand .brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  background: var(--strategy-blue);
  border-radius: 9px;
}

.auth-context > div {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: auto 0;
}

.auth-eyebrow {
  margin: 0 0 20px;
  color: var(--running-cyan);
}

.auth-context h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.auth-context > div > p:last-child {
  max-width: 520px;
  margin: 28px 0 0;
  color: #9cabc0;
  font-size: 16px;
  line-height: 1.9;
}

.back-home {
  position: relative;
  z-index: 1;
  width: max-content;
  color: #a6b4c7;
  font-size: 13px;
  text-decoration: none;
}

.back-home:hover {
  color: #fff;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px;
  background: #f4f6f9;
}

.auth-card {
  width: min(100%, 430px);
  padding: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 30px 80px rgba(18, 34, 57, 0.13);
}

.mobile-brand {
  display: none;
}

.auth-kicker {
  margin: 0 0 14px;
  color: var(--strategy-blue);
  font: 700 11px ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.12em;
}

.auth-card h2 {
  margin: 0;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.auth-description {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.form-error {
  margin-bottom: 20px;
  padding: 12px 14px;
  color: #97383f;
  font-size: 13px;
  line-height: 1.6;
  background: #fff1f1;
  border: 1px solid #f0c6c8;
  border-radius: 8px;
}

.field + .field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd7e1;
  border-radius: 8px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: var(--strategy-blue);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(89, 109, 255, 0.12);
}

.errorlist {
  margin: 7px 0 0;
  padding: 0;
  color: #a23d44;
  font-size: 12px;
  list-style: none;
}

.auth-card button {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: var(--strategy-blue);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(89, 109, 255, 0.24);
  transition: background 160ms ease, transform 160ms ease;
}

.auth-card button:hover {
  background: var(--strategy-blue-dark);
  transform: translateY(-1px);
}

.password-help {
  margin: 18px 0 0;
  color: #65768b;
  font-size: 13px;
  text-align: center;
}

.auth-notice {
  margin: 24px 0 0;
  padding-top: 20px;
  color: #8997a9;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  border-top: 1px solid #edf0f4;
}

@media (max-width: 880px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-context {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 24px;
    background:
      linear-gradient(160deg, rgba(89, 109, 255, 0.14), transparent 50%),
      var(--night);
  }

  .mobile-brand {
    display: block;
    margin-bottom: 34px;
    font-size: 21px;
    font-weight: 800;
  }
}

@media (max-width: 520px) {
  .auth-panel {
    align-items: center;
    padding: 18px;
  }

  .auth-card {
    padding: 28px 24px;
    border-radius: 12px;
  }

  .auth-card h2 {
    font-size: 27px;
  }
}
