.auth-screen {
  --auth-ink: #143b39;
  --auth-muted: #48635e;
  --auth-accent: #105e53;
  --auth-line: #d7e5df;
  min-block-size: 100vh;
  min-block-size: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse at 90% 0%, #e1eee8, transparent 62%), #f3f6f3;
}

.auth-screen > header {
  background: rgb(255 255 255 / 62%);
  border-color: var(--auth-line);
}

.auth-screen > header nav,
.auth-screen > footer > div {
  max-inline-size: 1224px;
  padding-inline: clamp(1.15rem, 3.2vw, 2rem);
}

.auth-screen > header nav { min-block-size: 72px; }
.auth-screen .brand img { inline-size: 126px; }

.auth-screen > header nav > a:not(.brand) {
  min-block-size: 42px;
  display: inline-flex;
  align-items: center;
  padding-inline: 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 999px;
  background: #fff;
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 650;
}

.auth-screen > footer {
  background: transparent;
  border-color: var(--auth-line);
}

.auth-screen > footer a { color: var(--auth-muted); }

.auth-page {
  inline-size: min(calc(100% - 3rem), 1176px);
  max-inline-size: none;
  min-block-size: 0;
  margin: clamp(1.1rem, 3.1vh, 2.8rem) auto;
  padding: 0;
  align-self: center;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  padding: .8rem;
  border: 1px solid #dce8e1;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 26px 65px rgb(22 62 47 / 10%), 0 3px 12px rgb(22 62 47 / 4%);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 2rem clamp(1.35rem, 3.4vw, 3.35rem);
  color: var(--auth-ink);
}

.auth-panel-inner { inline-size: min(100%, 382px); }

.auth-setup-panel {
  inline-size: min(100%, 620px);
  margin-inline: auto;
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 48px rgb(22 62 47 / 10%);
}

.auth-setup-panel .auth-panel-inner { inline-size: 100%; }
.auth-setup-panel h1 { font-size: clamp(1.7rem, 3.8vw, 2.45rem); }
.auth-setup-panel .auth-credentials p { margin-block-start: 0; }
.auth-submit[aria-disabled="true"] { cursor: progress; }

.auth-panel h1 {
  margin-block-end: 1.25rem;
  font-size: clamp(2.05rem, 4vw, 2.7rem);
  font-weight: 850;
  line-height: 1.3;
}

.auth-credentials {
  padding: clamp(1rem, 2.2vw, 1.35rem);
  border: 1px solid var(--auth-line);
  border-radius: 19px;
  background: #f5faf7;
}

.auth-method-heading {
  min-block-size: 32px;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .85rem;
  color: var(--auth-accent);
  font-size: .92rem;
  font-weight: 730;
}

.auth-lock {
  position: relative;
  flex: 0 0 31px;
  block-size: 31px;
  border-radius: 10px;
  background: #e3f0e9;
}

.auth-lock::before,
.auth-lock::after {
  position: absolute;
  inset-inline-start: 50%;
  translate: 50%;
  border: 1.5px solid currentColor;
  content: "";
}

.auth-lock::before {
  inset-block-start: 7px;
  inline-size: 7px;
  block-size: 7px;
  border-block-end: 0;
  border-radius: 5px 5px 0 0;
}

.auth-lock::after {
  inset-block-start: 13px;
  inline-size: 12px;
  block-size: 9px;
  border-radius: 3px;
}

.auth-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  margin-block-end: .85rem;
  padding: .23rem;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  background: #ecf4ef;
}

.auth-methods a {
  display: grid;
  place-items: center;
  min-block-size: 42px;
  padding: .2rem .3rem;
  border-radius: 10px;
  color: var(--auth-muted);
  font-size: .91rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.auth-methods a[aria-current="page"] {
  background: #fff;
  color: var(--auth-ink);
  box-shadow: 0 1px 5px rgb(18 64 45 / 12%);
}

.auth-form { display: grid; gap: .95rem; }
.auth-form label { gap: .32rem; font-size: .94rem; font-weight: 650; }
.auth-form .password-field { position: relative; }

.auth-form input:not([type="checkbox"]) {
  min-block-size: 50px;
  padding: .55rem .8rem;
  border-color: #9eb9ae;
  border-radius: 11px;
  color: var(--auth-ink);
  font-size: 1rem;
  font-weight: 500;
}

.auth-form input:focus-visible {
  outline: 2px solid #167e6b;
  outline-offset: 1px;
  border-color: #167e6b;
}

.auth-form .password-field:has(.auth-reveal:not([hidden])) input { padding-left: 3.05rem; }

.auth-reveal {
  position: absolute;
  inset-block-end: 3px;
  inset-inline-end: 3px;
  inline-size: 44px;
  block-size: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
}

.auth-reveal:not([hidden]) { display: grid; }

.auth-eye {
  display: grid;
  place-items: center;
  inline-size: 14px;
  block-size: 14px;
  rotate: 45deg;
  border: 1.5px solid currentColor;
  border-radius: 75% 18%;
}

.auth-eye::before {
  inline-size: 5px;
  block-size: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.auth-reveal.is-visible::after {
  position: absolute;
  inline-size: 21px;
  block-size: 1.5px;
  rotate: -42deg;
  background: currentColor;
  box-shadow: 0 1.5px #fff;
  content: "";
}

.auth-form label:has([name="terms"]) {
  align-items: baseline;
  gap: .46rem;
  color: var(--auth-muted);
  font-size: .86rem;
  font-weight: 500;
}

.auth-form input[type="checkbox"] { accent-color: var(--auth-accent); margin: 0; }

.auth-submit {
  position: relative;
  min-block-size: 52px;
  justify-self: stretch;
  margin-block-start: .2rem;
  padding: .5rem 2.8rem;
  border: 1px solid #0b5b4e;
  border-radius: 12px;
  background: linear-gradient(110deg, #0d5148, #116658);
  box-shadow: 0 5px 10px rgb(12 85 67 / 17%);
  font-size: .99rem;
  font-weight: 750;
  transition: background-color .15s, box-shadow .15s;
}

.auth-submit::before,
.auth-submit::after {
  position: absolute;
  inset-block-start: 50%;
  translate: 0 -50%;
  content: "";
}

.auth-submit::before {
  inset-inline-end: .9rem;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 8px;
  background: rgb(255 255 255 / 14%);
}

.auth-submit::after {
  inset-inline-end: 1.4rem;
  inline-size: 8px;
  block-size: 8px;
  rotate: 45deg;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

.auth-submit:hover { background: #094e44; box-shadow: 0 7px 15px rgb(12 85 67 / 24%); }
.auth-submit:active { box-shadow: 0 2px 6px rgb(12 85 67 / 19%); }

.auth-alert {
  margin: 0 0 .9rem;
  border-radius: 8px;
  overflow-wrap: anywhere;
  font-size: .9rem;
}

.auth-retry { margin-block-start: .8rem; }
.auth-retry button { inline-size: 100%; min-block-size: 44px; border-color: var(--auth-line); border-radius: 11px; }

.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  margin-block-start: 1rem;
  color: var(--auth-muted);
  font-size: .92rem;
}

.auth-switch a {
  display: inline-flex;
  align-items: center;
  min-block-size: 42px;
  padding-inline: .95rem;
  border: 1px solid #d0e3d9;
  border-radius: 10px;
  background: #f6faf7;
  color: var(--auth-accent);
  font-weight: 750;
  text-decoration: none;
}

.auth-screen > header nav > a:not(.brand):hover,
.auth-switch a:hover,
.auth-reveal:hover,
.auth-retry button:hover { background-color: #e7f2eb; }

.auth-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-block-size: clamp(536px, 52vw, 620px);
  margin: 0;
  overflow: hidden;
  border-radius: 21px;
  background: #082f34;
  color: #fff9eb;
}

.auth-banner img,
.auth-banner::after { position: absolute; inset: 0; }

.auth-banner img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.auth-banner::after {
  z-index: -1;
  background: linear-gradient(180deg, transparent 51%, rgb(3 35 38 / 55%) 75%, #062c31 100%);
  content: "";
}

.auth-banner-caption { padding: clamp(1.5rem, 3.7vw, 3rem); }

.auth-banner-caption::before {
  display: block;
  inline-size: 31px;
  block-size: 2px;
  margin-block-end: .85rem;
  border-radius: 2px;
  background: #d8b576;
  content: "";
}

.auth-banner h2 {
  margin: 0 0 .45rem;
  font-size: clamp(1.65rem, 3.05vw, 2.5rem);
  font-weight: 800;
  line-height: 1.35;
}

.auth-banner p { margin: 0; color: #d3ebe4; }

@media (max-width: 820px) {
  .auth-page { inline-size: min(calc(100% - 1.75rem), 530px); }
  .auth-layout { grid-template-columns: minmax(0, 1fr); padding: .55rem; border-radius: 24px; }
  .auth-panel { padding: clamp(1.25rem, 4vw, 2rem) clamp(.6rem, 3.6vw, 2rem) 1.4rem; }
  .auth-banner { min-block-size: clamp(244px, 57vw, 337px); border-radius: 16px; }
  .auth-banner img { object-position: center 26%; }
  .auth-banner::after { background: linear-gradient(180deg, transparent 33%, rgb(3 35 38 / 64%) 62%, #062c31 100%); }
  .auth-banner-caption { padding: 1rem 1.2rem; }
  .auth-banner-caption::before { margin-block-end: .5rem; }
  .auth-banner p { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit { transition: none; }
}
