:root {
  color-scheme: light;
  --auth-navy-950: #0b1830;
  --auth-navy-900: #102548;
  --auth-navy-800: #193a61;
  --auth-blue-700: #1d4ed8;
  --auth-blue-600: #2557df;
  --auth-blue-500: #2f6af1;
  --auth-sky-300: #8ed8f5;
  --auth-mint-600: #0f9f88;
  --auth-coral-500: #f05d6f;
  --auth-canvas: #f6f7fb;
  --auth-surface: #ffffff;
  --auth-border: #cfd8e6;
  --auth-border-strong: #9eb0c7;
  --auth-text: #172138;
  --auth-text-muted: #5e6b82;
  --auth-text-faint: #7a869a;
  --auth-danger: #b42335;
  --auth-danger-surface: #fff1f3;
  --auth-danger-border: #fecdd5;
  --auth-focus: #38bdf8;
  --auth-shadow: 0 24px 70px rgb(11 24 48 / 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

a {
  color: var(--auth-blue-700);
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 88% 5%, rgb(56 189 248 / 0.11), transparent 25rem),
    radial-gradient(circle at 4% 92%, rgb(124 58 237 / 0.06), transparent 28rem),
    var(--auth-canvas);
  font-family: Inter, "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.auth-shell {
  width: min(1380px, calc(100% - 48px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 32px 0 20px;
}

.auth-card {
  min-height: min(720px, calc(100vh - 94px));
  min-height: min(720px, calc(100dvh - 94px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(480px, 0.95fr);
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
}

.auth-brand-panel {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 4.5vw, 60px);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 12%, rgb(56 189 248 / 0.24), transparent 27%),
    radial-gradient(circle at 7% 96%, rgb(240 93 111 / 0.18), transparent 29%),
    linear-gradient(150deg, var(--auth-navy-950), var(--auth-navy-800));
}

.auth-brand-panel::after {
  position: absolute;
  width: 390px;
  height: 390px;
  right: -228px;
  bottom: -196px;
  content: "";
  border: 58px solid rgb(255 255 255 / 0.055);
  border-radius: 50%;
}

.auth-brand-lockup,
.auth-brand-message,
.auth-trust-note {
  position: relative;
  z-index: 1;
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.auth-brand-lockup img {
  width: 38px;
  height: 48px;
  object-fit: contain;
}

.auth-brand-lockup span {
  display: flex;
  flex-direction: column;
  color: #bcecff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

.auth-brand-lockup strong {
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
}

.auth-brand-message {
  max-width: 590px;
}

.auth-kicker,
.auth-form-kicker {
  color: var(--auth-sky-300);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-brand-heading {
  margin: 12px 0 18px;
  font-size: clamp(2.75rem, 4.8vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.auth-brand-copy {
  max-width: 520px;
  margin: 0;
  color: #c7d1df;
  font-size: 0.95rem;
}

.auth-trust-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c7d1df;
  font-size: 0.72rem;
}

.auth-trust-note > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  background: var(--auth-mint-600);
  font-size: 0.7rem;
  font-weight: 800;
}

.auth-form-panel {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(38px, 5vw, 72px);
  background: var(--auth-surface);
}

.auth-form {
  width: min(100%, 420px);
  display: grid;
  gap: 20px;
}

.auth-form-kicker {
  color: var(--auth-blue-600);
}

.auth-form-heading h1 {
  margin: 7px 0 5px;
  font-size: clamp(1.75rem, 3vw, 2.05rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.auth-form-heading p {
  margin: 0;
  color: var(--auth-text-muted);
  font-size: 0.82rem;
}

.auth-alert {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--auth-danger-border);
  border-radius: 10px;
  color: var(--auth-danger);
  background: var(--auth-danger-surface);
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-alert-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--auth-danger);
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--auth-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.auth-field-label-row a {
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-field-label-row a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 10px;
  color: var(--auth-text);
  background: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input:hover {
  border-color: #748aa6;
}

.auth-field input:focus {
  border-color: var(--auth-blue-600);
  box-shadow: 0 0 0 3px rgb(37 87 223 / 0.16);
}

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

.auth-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.auth-button:hover {
  transform: translateY(-1px);
}

.auth-button:active {
  transform: translateY(0);
}

.auth-button-primary {
  color: #ffffff;
  background: var(--auth-blue-600);
  box-shadow: 0 7px 18px rgb(37 87 223 / 0.18);
}

.auth-button-primary:hover {
  background: var(--auth-blue-700);
}

.auth-button-secondary {
  border-color: var(--auth-border);
  color: var(--auth-text);
  background: #ffffff;
}

.auth-button-secondary:hover {
  border-color: var(--auth-border-strong);
  background: #f8fafc;
}

.auth-divider {
  position: relative;
  text-align: center;
}

.auth-divider::before {
  position: absolute;
  inset: 50% 0 auto;
  content: "";
  border-top: 1px solid var(--auth-border);
}

.auth-divider span {
  position: relative;
  padding: 0 11px;
  color: var(--auth-text-faint);
  background: #ffffff;
  font-size: 0.7rem;
}

.auth-legal {
  margin: -2px 0 0;
  color: var(--auth-text-faint);
  font-size: 0.67rem;
  text-align: center;
}

.auth-legal a {
  color: inherit;
  text-underline-offset: 2px;
}

.auth-page-footer {
  margin: 0;
  color: var(--auth-text-faint);
  font-size: 0.7rem;
  text-align: center;
}

.auth-page a:focus-visible,
.auth-page button:focus-visible,
.auth-page input:focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .auth-shell {
    width: min(860px, calc(100% - 32px));
    align-content: start;
    padding-top: 24px;
  }

  .auth-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

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

  .auth-brand-message {
    margin: 50px 0;
  }

  .auth-brand-heading {
    font-size: clamp(2.35rem, 8vw, 3.4rem);
  }

  .auth-form-panel {
    padding: 48px 28px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: 100%;
    display: block;
    padding: 0;
  }

  .auth-card {
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-brand-panel {
    min-height: 126px;
    padding: 24px;
    justify-content: flex-start;
  }

  .auth-brand-panel::after,
  .auth-brand-message,
  .auth-trust-note {
    display: none;
  }

  .auth-form-panel {
    min-height: calc(100vh - 126px);
    min-height: calc(100dvh - 126px);
    align-items: start;
    padding: 40px 24px 32px;
  }

  .auth-form {
    width: 100%;
  }

  .auth-page-footer {
    display: none;
  }
}

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