:root {
  --auth-ink: var(--brand-charcoal);
  --auth-accent: var(--brand-blue-700);
  --auth-accent-bright: var(--brand-blue-700);
  --auth-line: var(--brand-line);
}

html,
body.auth-body {
  height: 100%;
  min-height: 100%;
  background: var(--brand-charcoal);
  font-family: "Segoe UI Variable", "Aptos", "Segoe UI", system-ui, sans-serif;
}

.auth-body h1,
.auth-body h2,
.auth-body h3,
.auth-body strong,
.auth-body b,
.auth-body input,
.auth-body button {
  font-family: inherit;
}

.auth-body {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: stretch;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 15% 12%, rgb(6 96 165 / 20%), transparent 28rem),
    radial-gradient(circle at 88% 88%, rgb(0 128 247 / 18%), transparent 30rem),
    linear-gradient(145deg, var(--brand-charcoal), var(--brand-charcoal) 58%, var(--brand-charcoal));
}

.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 9%) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, var(--brand-charcoal), transparent 78%);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(410px, .8fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--brand-white);
  box-shadow: 0 45px 120px rgb(25 25 25 / 38%);
}

.auth-brand {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(34px, 5vw, 64px);
  background:
    radial-gradient(circle at 72% 78%, rgb(6 96 165 / 24%), transparent 17rem),
    radial-gradient(circle at 12% 0%, rgb(0 128 247 / 23%), transparent 22rem),
    linear-gradient(145deg, var(--brand-charcoal), var(--brand-charcoal-800) 70%, var(--brand-charcoal-800));
  color: var(--brand-white);
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgb(6 96 165 / 20%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand::before {
  right: -170px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  box-shadow: 0 0 0 64px rgb(6 96 165 / 3%), 0 0 0 128px rgb(6 96 165 / 2%);
}

.auth-brand::after {
  top: 160px;
  right: 66px;
  width: 10px;
  height: 10px;
  border: 0;
  background: var(--auth-accent-bright);
  box-shadow: 56px 82px 0 rgb(6 96 165 / 65%), -74px 148px 0 rgb(255 255 255 / 42%), 106px 202px 0 rgb(255 255 255 / 22%);
}

.auth-masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}

.auth-brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.auth-masthead-copy {
  display: grid;
  gap: 2px;
}

.auth-masthead strong {
  color: var(--brand-white);
  font-size: 1.32rem;
  font-weight: 820;
  letter-spacing: -.035em;
}

.auth-masthead strong b {
  color: var(--auth-accent-bright);
}

.auth-masthead span {
  color: var(--brand-blue);
  font-size: .63rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-edition {
  position: relative;
  z-index: 1;
  margin-block: auto;
}

.auth-kicker {
  margin: 0 0 16px !important;
  color: var(--auth-accent-bright) !important;
  font-size: .67rem !important;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.auth-edition h1 {
  max-width: 610px;
  margin: 0 0 20px;
  color: var(--brand-white);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .85;
  font-family: inherit !important;
}

.auth-edition > p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--brand-line-strong);
  font-size: clamp(.84rem, 1.2vw, 1rem);
  line-height: 1.65;
  font-family: inherit !important;
}

.auth-proof {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border: 0;
}

.auth-proof > span {
  display: grid;
  min-height: 108px;
  align-content: start;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 14px;
  background: rgb(255 255 255 / 5%);
  backdrop-filter: blur(10px);
}

.auth-proof i {
  margin-bottom: 7px;
  color: var(--auth-accent-bright);
  font-size: .58rem;
  font-style: normal;
  font-weight: 850;
}

.auth-proof b {
  color: var(--brand-white);
  font-size: .69rem;
}

.auth-proof small {
  color: var(--brand-grey);
  font-size: .58rem;
  line-height: 1.4;
}

.auth-brand footer {
  display: none;
}

.auth-card {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(34px, 5vw, 70px);
  background:
    radial-gradient(circle at 100% 0%, rgb(6 96 165 / 9%), transparent 18rem),
    var(--brand-white);
  color: var(--auth-ink);
}

.auth-folio {
  position: absolute;
  top: 26px;
  right: 28px;
  color: var(--brand-line-strong);
  font-size: .57rem;
  display: none;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
}

.auth-card > header {
  margin-bottom: 30px;
}

.auth-card > header h2 {
  margin: 8px 0 8px;
  color: var(--auth-ink);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 790;
  letter-spacing: -.055em;
  font-family: inherit !important;
}

.auth-card > header > p:last-child {
  margin: 0;
  color: var(--brand-charcoal-700);
  font-size: .79rem;
  font-family: inherit !important;
}

.auth-card form {
  display: grid;
  gap: 4px;
}

.auth-card .form-field {
  margin-bottom: 18px;
}

.auth-card .form-field > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-charcoal-800);
  font-size: .68rem;
  font-weight: 760;
}

.auth-card .form-field > span:first-child i {
  color: var(--auth-accent);
  font-size: .55rem;
  font-style: normal;
}

.auth-card input {
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  background: var(--brand-canvas);
  font-size: .82rem;
}

.auth-card input:focus {
  border-color: var(--auth-accent);
  background: var(--brand-white);
  box-shadow: 0 0 0 4px rgb(6 96 165 / 10%);
}

.auth-card .button-primary {
  min-height: 54px;
  margin-top: 6px;
  justify-content: space-between;
  padding-inline: 18px;
  border-radius: 13px;
  font-size: .79rem;
}

.auth-card .button-primary b {
  font-size: 1rem;
}

.auth-security-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid var(--brand-line);
  border-radius: 13px;
  background: var(--brand-canvas);
}

.auth-security-note > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-off-white);
  color: var(--auth-accent);
}

.auth-security-note p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.auth-security-note strong {
  font-size: .65rem;
}

.auth-security-note small {
  color: var(--brand-grey);
  font-size: .58rem;
}

.auth-card .error-summary:not(:empty) {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid rgb(210 11 152 / 20%);
  border-radius: 12px;
  background: var(--brand-canvas);
  color: var(--brand-magenta-800);
  font-size: .7rem;
}

@media (max-width: 900px) {
  .auth-body {
    overflow: auto;
  }

  .auth-shell {
    width: min(560px, 100%);
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 300px;
    padding: 30px;
  }

  .auth-edition {
    margin: 48px 0 24px;
  }

  .auth-edition h1 {
    font-size: clamp(3.1rem, 12vw, 5rem);
  }

  .auth-proof {
    display: none;
  }

  .auth-card {
    padding: 38px 30px;
  }
}

@media (min-width: 901px) and (max-height: 700px) {
  .auth-brand {
    padding: 28px clamp(34px, 4vw, 58px);
  }

  .auth-edition h1 {
    font-size: clamp(3.4rem, 11vh, 5rem);
  }

  .auth-proof > span {
    min-height: 86px;
    padding: 10px 12px;
  }

  .auth-card {
    padding-block: 28px;
  }

  .auth-card > header {
    margin-bottom: 20px;
  }

  .auth-card .form-field {
    margin-bottom: 12px;
  }
}

@media (max-width: 520px) {
  .auth-body {
    display: block;
    padding: 0;
    background: var(--brand-white);
  }

  .auth-shell {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .auth-brand {
    min-height: 245px;
    border-radius: 0 0 26px 26px;
  }

  .auth-edition {
    margin: 32px 0 0;
  }

  .auth-edition h1 {
    font-size: 3.25rem;
  }

  .auth-edition > p:last-child {
    display: none;
  }

  .auth-card {
    padding: 34px 22px;
  }
}

.auth-status {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--brand-blue-200);
  border-radius: 12px;
  color: var(--brand-blue-700);
  background: var(--brand-canvas);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.45;
}

.auth-remember {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 2px 0 20px;
  color: var(--brand-charcoal-800);
  cursor: pointer;
}

.auth-card .auth-remember input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--brand-blue-700);
}

.auth-remember span { display: grid; gap: 2px; }
.auth-remember strong { font-size: .78rem; }
.auth-remember small { color: var(--brand-grey); font-size: .68rem; }

.auth-card .auth-code-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .35em;
}

.auth-resend { margin-top: 10px; }
.auth-resend .button:disabled { cursor: not-allowed; opacity: .6; }

.password-requirements {
  margin: -6px 0 18px;
  color: var(--brand-charcoal-700);
  font-size: .72rem;
  line-height: 1.5;
}

.auth-card .form-field > label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-charcoal-800);
  font-size: .68rem;
  font-weight: 760;
}

.auth-card .form-field > label i {
  color: var(--auth-accent);
  font-size: .55rem;
  font-style: normal;
}

.password-input {
  position: relative;
}

.auth-card .password-input input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  translate: 0 -50%;
  border: 0;
  border-radius: 10px;
  color: var(--brand-charcoal-700);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--brand-blue-700);
  background: var(--brand-canvas);
}

.password-toggle:focus-visible {
  outline: 3px solid rgb(6 96 165 / 18%);
  outline-offset: 1px;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye-slash {
  opacity: 0;
  transition: opacity 120ms ease;
}

.password-toggle[aria-pressed="true"] .password-eye-slash {
  opacity: 1;
}

.error-body {
  padding: clamp(18px, 4vw, 54px);
}

.error-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  width: min(1180px, 100%);
  min-height: min(720px, calc(100dvh - 72px));
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 30px;
  background: var(--brand-white);
  box-shadow: 0 34px 100px rgb(25 25 25 / 35%);
}

.error-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 70px);
  color: var(--brand-white);
  background:
    radial-gradient(circle at 88% 72%, rgb(6 96 165 / 24%), transparent 30%),
    linear-gradient(145deg, var(--brand-charcoal), var(--brand-blue-700));
}

.error-brand > div:last-child {
  max-width: 580px;
  margin-block: auto;
}

.error-brand h1 {
  margin: 14px 0 18px;
  color: var(--brand-white);
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: .92;
  letter-spacing: -.065em;
}

.error-brand > div:last-child > p:last-child {
  max-width: 460px;
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 1rem;
  line-height: 1.6;
}

.error-card {
  align-self: center;
  padding: clamp(38px, 6vw, 76px);
}

.error-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 18px;
  color: var(--brand-magenta-800);
  background: var(--brand-canvas);
  font-size: 1.7rem;
  font-weight: 850;
}

.error-card h2 {
  margin: 9px 0 12px;
  color: var(--brand-charcoal);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.error-card > p:not(.dialog-context, .error-reference) {
  margin: 0;
  color: var(--brand-charcoal-700);
  font-size: .9rem;
  line-height: 1.65;
}

.error-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0 22px;
}

.error-actions .button {
  justify-content: center;
  text-decoration: none;
}

.error-reference {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  color: var(--brand-charcoal-700);
  background: var(--brand-canvas);
  font-size: .68rem;
}

.error-reference code {
  overflow-wrap: anywhere;
  color: var(--brand-charcoal-800);
}

@media (max-width: 900px) {
  .error-shell { grid-template-columns: 1fr; min-height: 0; }
  .error-brand { min-height: 330px; }
}

@media (max-width: 520px) {
  .error-body { padding: 0; background: var(--brand-white); }
  .error-shell { min-height: 100dvh; border: 0; border-radius: 0; }
  .error-brand { min-height: 280px; padding: 28px 24px; }
  .error-brand h1 { font-size: 3rem; }
  .error-card { padding: 34px 24px; }
  .error-actions { grid-template-columns: 1fr; }
}
