.auth-page {
  align-items: stretch;
  --auth-header-offset: 6.25rem;
}

@media (min-width: 48rem) {
  .auth-page {
    padding-top: var(--auth-header-offset);
    padding-bottom: 0;
  }

  .auth-page__benefits {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }

  .auth-page__form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1.25rem;
    padding-bottom: 3rem;
  }

  .auth-page__form .auth-shell-form {
    margin-inline: 0;
  }
}

.auth-shell-form {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.auth-shell-form--wide {
  max-width: 36rem;
}

.auth-card {
  border-radius: calc(var(--radius) * 1.4);
  border: 1px solid var(--border);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 40rem) {
  .auth-card {
    padding: 2rem;
  }
}

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

.auth-heading__title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
}

.auth-heading__subtitle {
  margin-top: 0.5rem;
  font-size: 13.5px;
  line-height: 1.5;
  color: #4a5565;
}

.auth-alert {
  margin-bottom: 1rem;
  border-radius: calc(var(--radius) * 1.4);
  border: 1px solid color-mix(in oklab, var(--destructive) 30%, transparent);
  background: color-mix(in oklab, var(--destructive) 5%, transparent);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--destructive);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form--spaced {
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.auth-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.auth-input,
.auth-select {
  box-sizing: border-box;
  height: 3rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0 0.625rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
}

.auth-input:hover,
.auth-select:hover {
  border-color: color-mix(in oklab, var(--foreground) 30%, transparent);
}

.auth-input:focus-visible,
.auth-select:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-toggle-password {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.auth-toggle-password:hover {
  color: var(--foreground);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.25rem;
}

.auth-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: var(--foreground);
}

.auth-button {
  margin-top: 0.25rem;
  height: 3rem;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.auth-button:hover:not(:disabled) {
  background: color-mix(in oklab, var(--primary) 80%, transparent);
}

.auth-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-footer__link {
  font-weight: 600;
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: calc(var(--radius) * 1.4);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, transparent);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox input {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 40rem) {
  .auth-grid-2 {
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.auth-benefits__title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
}

.auth-benefits__subtitle {
  margin-top: 0.5rem;
  font-size: 13.5px;
  line-height: 1.5;
  color: #4a5565;
}

.auth-benefits__item-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.auth-benefits__item-desc {
  margin-top: 0.125rem;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4a5565;
}

.auth-message {
  border-radius: calc(var(--radius) * 1.4);
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, transparent);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
}

.auth-back-link {
  display: inline-block;
  margin-top: 1.5rem;
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-input--success {
  border-color: #00a544;
  box-shadow: 0 0 0 3px rgba(0, 165, 68, 0.15);
}

.auth-input--success:hover {
  border-color: #008138;
}

.auth-input--success:focus-visible {
  border-color: #008138;
  box-shadow: 0 0 0 3px rgba(0, 165, 68, 0.22);
}

.auth-input--error {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 15%, transparent);
}

.auth-password-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-password-rules {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.auth-password-rules--open {
  max-height: 4rem;
  opacity: 1;
}

.auth-password-rules__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding-top: 0.375rem;
  margin: 0;
  list-style: none;
}

.auth-rule {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 11px;
  line-height: 1;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.auth-rule svg {
  opacity: 0.45;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.auth-rule--ok {
  color: #00a544;
}

.auth-rule--ok svg {
  opacity: 1;
}

.auth-password-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: calc(var(--radius) * 1.4);
  border: 1px solid rgba(0, 165, 68, 0.25);
  background: rgba(0, 165, 68, 0.08);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #008138;
  animation: auth-success-in 0.35s ease;
}

@keyframes auth-success-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-password-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.auth-password-hint--error {
  color: var(--destructive);
}
