.auth-page {
  min-width: 320px;
  overflow-x: hidden;
}

.auth-page-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  background: var(--ak-surface-elevated);
}

.auth-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ak-text);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: .85rem;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 .5rem 1.25rem var(--ak-shadow);
}

.auth-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-form-content {
  width: min(100%, 31rem);
  margin: clamp(2.5rem, 8vh, 6rem) auto 2rem;
}

.auth-stepper {
  margin-bottom: 1.75rem;
}

.auth-stepper ol {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-step {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
  flex-direction: column;
  gap: .4rem;
  color: var(--ak-text-secondary);
  text-align: center;
}

.auth-step:not(:last-child)::after {
  position: absolute;
  top: 1.1rem;
  right: calc(50% + 1.45rem);
  width: calc(100% - 2.9rem);
  height: 2px;
  background: var(--ak-border);
  content: "";
}

.auth-step--complete:not(:last-child)::after {
  background: var(--ak-primary);
}

.auth-step-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 2px solid var(--ak-border);
  border-radius: 50%;
  background: var(--ak-surface-elevated);
}

.auth-step--current,
.auth-step--complete {
  color: var(--ak-primary);
}

.auth-step--current .auth-step-icon,
.auth-step--complete .auth-step-icon {
  border-color: var(--ak-primary);
}

.auth-step--current .auth-step-icon {
  background: var(--ak-primary);
  color: var(--ak-on-primary);
}

.auth-step-label {
  overflow: hidden;
  max-width: 100%;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-eyebrow {
  margin-bottom: .55rem;
  color: var(--ak-primary);
  font-size: .9rem;
  font-weight: 700;
}

.auth-form-content h1 {
  margin-bottom: .75rem;
  color: var(--ak-text);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.35;
}

.auth-intro {
  margin-bottom: 1.75rem;
  color: var(--ak-text-secondary);
}

.otp-code-control {
  position: relative;
}

.otp-code-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: text;
  opacity: .01;
}

.otp-code-slots {
  display: flex;
  justify-content: center;
  gap: clamp(.4rem, 2.5vw, .75rem);
  direction: ltr;
}

.otp-code-slot {
  display: grid;
  width: clamp(2.65rem, 12vw, 3.25rem);
  height: clamp(3rem, 14vw, 3.65rem);
  place-items: center;
  border: 1px solid var(--ak-input-border);
  border-radius: .8rem;
  background: var(--ak-surface);
  color: var(--ak-text);
  font-size: 1.35rem;
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.otp-code-control:focus-within .otp-code-slot {
  border-color: var(--ak-focus);
  box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--ak-focus) 25%, transparent);
}

.otp-code-control.is-invalid .otp-code-slot {
  border-color: var(--ak-danger);
}

.otp-code-slot.is-filled {
  border-color: var(--ak-primary);
  background: var(--ak-selected);
}

.otp-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin: .4rem 0 .8rem;
  color: var(--ak-text-secondary);
  font-size: .9rem;
}

.otp-resend-form {
  margin: 0;
}

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1rem;
  margin-top: 1.5rem;
  font-size: .93rem;
}

.auth-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.auth-copyright {
  margin: auto 0 0;
  padding-top: 1.5rem;
  color: var(--ak-text-secondary);
  font-size: .78rem;
  text-align: center;
}

.auth-showcase {
  min-width: 0;
  min-height: 15rem;
  padding: 1rem;
  background: var(--ak-auth-accent);
}

.auth-carousel,
.auth-showcase-placeholder {
  height: 100%;
  min-height: 15rem;
}

.auth-carousel {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .75rem;
}

.auth-carousel-viewport,
.auth-showcase-placeholder {
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 1rem 3rem var(--ak-shadow);
}

.auth-carousel-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.auth-slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

.auth-slide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-carousel .carousel-control-prev,
.auth-carousel .carousel-control-next {
  top: 50%;
  bottom: auto;
  width: 3rem;
  height: 3rem;
  margin-inline: 1rem;
  border-radius: 50%;
  background: var(--ak-overlay);
  color: var(--ak-on-primary);
  opacity: 1;
  transform: translateY(-50%);
}

.auth-carousel-navigation {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

.auth-carousel .carousel-indicators {
  position: static;
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
}

.auth-carousel .carousel-indicators [data-bs-target] {
  position: relative;
  width: 3rem;
  height: 3rem;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  opacity: 1;
}

.auth-carousel .carousel-indicators [data-bs-target]::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--ak-text-secondary);
  content: "";
  opacity: .7;
  transform: translate(-50%, -50%);
}

.auth-carousel .carousel-indicators [data-bs-target].active::after {
  background: var(--ak-primary);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.25);
}

.auth-carousel .carousel-indicators [data-bs-target]:focus-visible {
  border-color: var(--ak-focus);
  outline-offset: 2px;
}

.auth-carousel-toggle {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ak-border);
  border-radius: 50%;
  background: var(--ak-surface);
  color: var(--ak-text-secondary);
}

.auth-carousel-toggle:hover {
  border-color: var(--ak-text-secondary);
  background: var(--ak-surface-secondary);
  color: var(--ak-text);
}

.auth-showcase-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  background: var(--ak-primary);
  color: var(--ak-on-primary);
  text-align: center;
}

.auth-showcase-placeholder h2 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(1.65rem, 4vw, 3rem);
  line-height: 1.45;
}

.auth-showcase-placeholder p {
  max-width: 38rem;
  margin-bottom: 0;
}

.auth-showcase-kicker {
  margin-bottom: .75rem !important;
  font-weight: 700;
}

.auth-showcase-mark {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
  place-items: center;
  border: 1px solid currentcolor;
  border-radius: 1.35rem;
  font-size: 1.75rem;
}

@media (max-width: 575.98px) {
  .auth-form-panel {
    padding: 1rem;
  }

  .auth-panel-header {
    align-items: flex-start;
  }

  .auth-panel-header .theme-switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .auth-panel-header .theme-choice {
    min-width: 2.75rem;
    padding-inline: .65rem;
  }

  .auth-panel-header .theme-choice span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .auth-form-content {
    margin-top: 2.5rem;
  }

  .auth-footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-step-label {
    font-size: .66rem;
  }
}

@media (min-width: 992px) {
  .auth-form-panel {
    padding: clamp(1.5rem, 2.8vw, 3rem);
  }

  .auth-showcase {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    align-items: center;
    padding: clamp(1rem, 2vw, 2rem);
  }

  .auth-carousel,
  .auth-showcase-placeholder {
    width: 100%;
    height: min(78vh, 46rem);
  }
}

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