.auth {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg-primary);
}

.auth-form-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 32px 24px 40px;
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: auto;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-brand:hover {
  color: var(--color-text-primary);
  text-decoration: none;
}

.auth-brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-bg-brand-solid);
  box-shadow: var(--th-shadow-xs);
  color: var(--color-text-primary_on-brand);
}

.auth-brand-name {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.auth-theme-toggle {
  margin-left: auto;
}

.auth-body {
  width: 100%;
  max-width: 360px;
  margin: 48px auto;
}

.auth-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 38px;
}

.auth-subtitle {
  margin: 12px 0 0;
  color: var(--color-text-tertiary);
  font-size: 16px;
  line-height: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.auth-form .field {
  gap: 6px;
}

.auth-form .field > label {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.auth-form input {
  min-height: 44px;
  padding-inline: 14px;
}

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

.auth-input-wrap input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-fg-quaternary);
}

.auth-password-toggle:hover {
  background: var(--color-bg-active);
  color: var(--color-fg-secondary);
}

.auth-password-toggle:focus-visible {
  outline-offset: -2px;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.auth-switch {
  margin: 32px 0 0;
  color: var(--color-text-tertiary);
  text-align: center;
}

.auth-switch a {
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: auto;
  padding-top: 32px;
  color: var(--color-text-quaternary);
  font-size: 13px;
}

.auth-panel {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  height: 100dvh;
  align-self: start;
  flex-direction: column;
  justify-content: flex-end;
  gap: 32px;
  padding: 48px;
  overflow: hidden;
  background: var(--color-bg-brand-section);
  color: var(--th-text-on-section);
}

.auth-panel-quote {
  max-width: 22ch;
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 38px;
}

.auth-panel-attribution {
  margin: 16px 0 0;
  color: var(--th-text-on-section_muted);
  font-size: 15px;
}

.auth-panel-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.auth-panel-stat {
  flex: 1 1 140px;
  padding: 16px 18px;
  border: 1px solid var(--th-border-on-section);
  border-radius: var(--radius-lg);
  background: var(--th-surface-on-section);
}

.auth-panel-stat dt {
  color: var(--th-text-on-section_muted);
  font-size: 13px;
}

.auth-panel-stat dd {
  margin: 4px 0 0;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-panel-curve {
  position: absolute;
  top: 14%;
  right: 0;
  left: 0;
  width: 100%;
  height: 42%;
  pointer-events: none;
}

.auth-curve-line {
  fill: none;
  stroke: var(--th-line-on-section);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.auth-curve-grid {
  stroke: var(--th-border-on-section);
  stroke-width: 1;
}

.auth-curve-fill {
  fill: url("#auth-curve-fade");
}

.auth-curve-fade-top {
  stop-color: currentcolor;
  stop-opacity: 0.1;
}

.auth-curve-fade-bottom {
  stop-color: currentcolor;
  stop-opacity: 0;
}

@media (max-width: 1023px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-panel {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-form-side {
    padding: 20px 16px 32px;
  }

  .auth-body {
    margin: 32px auto;
  }

  .auth-title {
    font-size: 24px;
    line-height: 32px;
  }
}
