.partners-login-page {
  --auth-stack-width: 540px;
  max-width: 760px;
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.partners-login-page h1 {
  max-width: none;
  font-size: var(--content-font-page-title);
  line-height: var(--line-height-snug);
  text-wrap: pretty;
}

.partners-login-page .intro {
  width: min(100%, var(--content-readable-width-compact));
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--content-font-subtitle);
  line-height: var(--line-height-body);
}

.auth-status-page {
  min-height: 0;
  margin-top: 0;
  margin-bottom: var(--auth-space-sm);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-muted);
  font-size: var(--content-font-body);
  text-align: center;
}

.auth-status-page:empty {
  display: none;
}

.auth-modal-card.is-booting .auth-status-page {
  display: none;
}

.auth-modal-card.is-loading .auth-status-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--auth-space-sm);
  min-height: 24px;
}

.auth-modal-card.is-ready .auth-status-page,
.auth-modal-card.is-error .auth-status-page {
  min-height: 0;
}

.auth-modal-card.is-loading .auth-status-page::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(30, 111, 102, 0.18);
  border-top-color: var(--color-accent-strong);
  border-radius: 999px;
  animation: auth-spinner 0.8s linear infinite;
}

.auth-modal-card.is-booting .clerk-auth-shell,
.auth-modal-card.is-loading .clerk-auth-shell {
  visibility: hidden;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
}

.auth-modal-card.is-ready .clerk-auth-shell,
.auth-modal-card.is-error .clerk-auth-shell {
  visibility: visible;
  pointer-events: auto;
  max-height: none;
  overflow: visible;
}

.auth-modal-card.is-ready .auth-status-page:empty {
  display: none;
}

.auth-modal-card.is-error .auth-status-page {
  display: block;
}

.auth-layout {
  width: min(100%, 760px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.auth-copy-pane {
  width: min(100%, 720px);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.partner-auth-card {
  --auth-space-sm: 8px;
  --auth-space-md: 16px;
  --auth-space-lg: 24px;
  display: block;
  width: 100%;
  max-width: var(--auth-stack-width);
  margin-left: 0;
  padding: 0;
}

.partner-auth-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  justify-items: center;
  width: min(100%, 600px);
  padding: 0;
  margin: 0 auto;
}

.auth-modal-shell {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 116px);
  display: grid;
  place-items: center;
  padding: var(--auth-space-md) 0 var(--auth-space-lg);
}

.auth-modal-shell::before {
  content: "";
  position: fixed;
  inset: 73px 0 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  padding: var(--auth-space-lg) 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-entry-shell {
  width: 100%;
  display: grid;
  gap: 0;
  margin: 0 auto;
  border: 1px solid rgba(20, 32, 43, 0.1);
  border-radius: 30px;
  background: rgba(248, 251, 253, 0.98);
  overflow: hidden;
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.08);
  justify-items: center;
  align-items: start;
}

.auth-tabs {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.auth-tab {
  appearance: none;
  width: 100%;
  margin-bottom: 0;
  padding: var(--auth-space-md) var(--auth-space-lg);
  border: 0;
  border-bottom: 1px solid rgba(20, 32, 43, 0.08);
  border-radius: 0;
  background: transparent;
  color: var(--color-accent-strong);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  cursor: default;
  box-shadow: none;
}

.auth-tab.is-active {
  background: transparent;
  color: var(--color-accent-strong);
  box-shadow: none;
}

.auth-modal-copy {
  display: grid;
  justify-items: center;
  gap: var(--auth-space-sm);
  padding: 0 var(--auth-space-md);
  margin: var(--auth-space-md) 0;
  text-align: center;
}

.auth-modal-copy .intro {
  max-width: none;
  margin: 0 auto;
  color: var(--color-text-soft);
  white-space: nowrap;
  font-size: var(--content-font-subtitle);
  line-height: var(--line-height-body);
}

.auth-close {
  position: absolute;
  top: 34px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: rgba(20, 32, 43, 0.42);
  text-decoration: none;
  line-height: 1;
  transition: color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.auth-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  fill: none;
}

.auth-close:hover,
.auth-close:focus-visible {
  color: rgba(20, 32, 43, 0.96);
  opacity: 1;
  transform: scale(1.04);
}

.clerk-auth-shell {
  width: 100%;
  min-height: 0;
  margin-top: 0;
  padding: 0 var(--auth-space-md) var(--auth-space-md);
  background: transparent;
}

.clerk-auth-shell .cl-rootBox,
.clerk-auth-shell .cl-card,
.clerk-auth-shell .cl-main,
.clerk-auth-shell .cl-header,
.clerk-auth-shell .cl-form {
  font-family: var(--font-ui);
}

.clerk-auth-shell .cl-rootBox {
  display: flex;
  justify-content: center;
  width: 100%;
}

.clerk-auth-shell .cl-card,
.clerk-auth-shell .cl-rootBox,
.clerk-auth-shell .cl-auth-form {
  width: 100%;
  max-width: 100%;
}

.clerk-auth-shell .cl-main {
  gap: var(--space-3) !important;
}

.clerk-auth-shell .cl-card {
  margin-top: 0;
  padding-bottom: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.clerk-auth-shell .cl-headerTitle {
  font-family: var(--font-display);
  font-size: var(--content-font-card-title);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-wrap: balance;
}

.clerk-auth-shell .cl-headerSubtitle,
.clerk-auth-shell .cl-socialButtonsBlockButtonText,
.clerk-auth-shell .cl-footerActionText,
.clerk-auth-shell .cl-identityPreviewText,
.clerk-auth-shell .cl-dividerText {
  font-size: var(--content-font-body);
  line-height: var(--line-height-body);
}

.clerk-auth-shell .cl-headerSubtitle,
.clerk-auth-shell .cl-socialButtonsBlockButtonText,
.clerk-auth-shell .cl-footerActionText,
.clerk-auth-shell .cl-identityPreviewText,
.clerk-auth-shell .cl-dividerText {
  color: var(--color-text-soft);
}

.clerk-auth-shell .cl-formFieldLabel {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-text);
}

.clerk-auth-shell .cl-socialButtonsBlockButtonText,
.clerk-auth-shell .cl-formButtonPrimary,
.clerk-auth-shell .cl-footerActionLink {
  font-size: var(--content-font-body);
  font-weight: var(--font-weight-semibold);
}

.clerk-auth-shell .cl-formFieldInput,
.clerk-auth-shell .cl-socialButtonsBlockButton,
.clerk-auth-shell .cl-formButtonPrimary,
.clerk-auth-shell .cl-footerActionLink,
.clerk-auth-shell .cl-formFieldAction {
  font-family: var(--font-ui);
}

.clerk-auth-shell .cl-formFieldInput {
  font-size: var(--content-font-subtitle);
  line-height: var(--line-height-body);
}

.clerk-auth-shell .cl-socialButtonsBlockButton {
  font-size: var(--content-font-body);
  line-height: var(--line-height-body);
}

.clerk-auth-shell .cl-dividerRow {
  margin: 0;
}

.clerk-auth-shell .cl-formButtonPrimary {
  font-size: var(--content-font-subtitle);
  line-height: var(--line-height-snug);
}

.clerk-auth-shell .cl-footerActionLink,
.clerk-auth-shell .cl-formFieldAction {
  font-size: var(--content-font-body);
  line-height: var(--line-height-body);
}

.clerk-auth-shell .cl-footer {
  margin-top: 0;
  margin-bottom: -3px;
  padding-top: 0;
}

.clerk-auth-shell .cl-footerAction {
  margin-top: 18px;
  padding-top: 0;
}

.clerk-auth-shell .cl-footerActionText {
  margin: 0;
}

.clerk-auth-shell .cl-footerPages {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
}

@keyframes auth-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .partner-auth-card {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .partners-login-page h1 {
    font-size: var(--font-size-title-mobile);
  }

  .auth-modal-shell {
    min-height: calc(100vh - 132px);
    padding: 8px 0 18px;
  }

  .auth-modal-shell::before {
    inset: 97px 0 0;
  }

  .auth-modal-card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-layout {
    width: 100%;
    gap: 14px;
  }

  .auth-copy-pane,
  .partner-auth-panel {
    width: 100%;
  }

  .partners-login-page .intro {
    max-width: 32ch;
  }

  .auth-modal-copy .intro {
    white-space: normal;
  }

  .auth-tabs {
    margin-bottom: 12px;
  }
}
