:root {
  --auth-ink: #172033;
  --auth-muted: #667085;
  --auth-line: #e4e7ec;
  --auth-canvas: #f4f6f9;
  --auth-primary: #2457d6;
  --auth-primary-hover: #1945b7;
  --auth-danger: #b42318;
  --auth-danger-hover: #8f1c13;
  --auth-focus: #8eb2ff;
}

* { box-sizing: border-box; }

.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(36, 87, 214, .13), transparent 27rem),
    var(--auth-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-skip-link {
  position: fixed;
  z-index: 10;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: .5rem;
  color: #fff;
  background: var(--auth-ink);
  transform: translateY(-160%);
}

.auth-skip-link:focus { transform: translateY(0); }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 29rem);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  width: min(70rem, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0;
}

.auth-intro {
  display: flex;
  min-height: 32rem;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 3vw, 2.5rem) 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.auth-intro .auth-brand { color: var(--auth-ink); }

.auth-brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: .65rem;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 .4rem 1rem rgba(36, 87, 214, .25);
  font-size: .7rem;
  letter-spacing: .04em;
}

.auth-eyebrow {
  margin: 0 0 .65rem;
  color: var(--auth-primary);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.auth-intro h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 5.3rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.auth-lede {
  max-width: 35rem;
  margin: 1.5rem 0 0;
  color: var(--auth-muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}

.auth-private-note {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  color: var(--auth-muted);
  font-size: .86rem;
}

.auth-private-note span { color: #12b76a; font-size: .65rem; }

.auth-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(228, 231, 236, .9);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1.5rem 4rem rgba(23, 32, 51, .12);
}

.auth-card-heading h1,
.auth-card-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.auth-card-heading > p:last-child {
  margin: .75rem 0 0;
  color: var(--auth-muted);
  line-height: 1.55;
}

.auth-alert {
  display: flex;
  gap: .8rem;
  margin-top: 1.5rem;
  padding: .9rem 1rem;
  border: 1px solid #fecdca;
  border-radius: .7rem;
  color: #7a271a;
  background: #fef3f2;
  font-size: .88rem;
  line-height: 1.45;
}

.auth-alert p { margin: .15rem 0 0; }
.auth-alert-detail { font-weight: 600; }

.auth-alert-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--auth-danger);
  font-weight: 800;
}

.auth-form { margin-top: 1.7rem; }
.auth-field + .auth-field { margin-top: 1.15rem; }

.auth-field label {
  display: block;
  margin-bottom: .45rem;
  font-size: .86rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 2.85rem;
  padding: 0 .85rem;
  border: 1px solid #cfd4dc;
  border-radius: .6rem;
  color: var(--auth-ink);
  background: #fff;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-field input:hover { border-color: #98a2b3; }

.auth-field input:focus {
  border-color: var(--auth-primary);
  outline: 0;
  box-shadow: 0 0 0 .22rem rgba(36, 87, 214, .15);
}

.auth-password { position: relative; }
.auth-password input { padding-right: 4.5rem; }

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  padding: .35rem .5rem;
  border: 0;
  border-radius: .35rem;
  color: var(--auth-primary);
  background: transparent;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-submit {
  width: 100%;
  min-height: 2.9rem;
  margin-top: 1.5rem;
  padding: .75rem 1rem;
  border: 0;
  border-radius: .65rem;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 .45rem 1rem rgba(36, 87, 214, .22);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.auth-submit:hover { background: var(--auth-primary-hover); transform: translateY(-1px); }
.auth-submit-danger { background: var(--auth-danger); box-shadow: 0 .45rem 1rem rgba(180, 35, 24, .18); }
.auth-submit-danger:hover { background: var(--auth-danger-hover); }

.auth-submit:focus-visible,
.auth-password-toggle:focus-visible,
.auth-secondary-action:focus-visible,
.auth-skip-link:focus-visible {
  outline: .2rem solid var(--auth-focus);
  outline-offset: .18rem;
}

.auth-help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: .78rem;
  line-height: 1.5;
}

.auth-page-centered { display: grid; place-items: center; padding: 1.5rem; }
.auth-logout-shell { width: min(29rem, 100%); }
.auth-logout-card { text-align: center; }
.auth-brand-dark { justify-content: center; color: var(--auth-ink); }

.auth-logout-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin: 2rem auto 1.25rem;
  place-items: center;
  border-radius: 50%;
  color: var(--auth-primary);
  background: #eef4ff;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-secondary-action {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .4rem;
  color: var(--auth-primary);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-secondary-action:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
    width: min(31rem, calc(100% - 2rem));
    padding: 1.5rem 0;
  }

  .auth-intro { min-height: 0; padding: .5rem 0 2rem; }
  .auth-intro > div:not(.auth-brand), .auth-private-note { display: none; }
  .auth-card { border-radius: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
