.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--lavender-light) 0%, var(--surface) 45%, var(--cream) 100%);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
}

.auth-card h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.auth-lede {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-body);
  cursor: pointer;
}

.auth-terms-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.auth-terms-check a {
  color: var(--lavender-deep);
  text-decoration: underline;
}

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.auth-field > input[type='email'],
.auth-field > input[type='text'] {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.auth-field > input:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 1px;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.password-input-wrap input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 72px 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.password-input-wrap input:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 1px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--lavender-deep);
  background: transparent;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--charcoal);
  background: var(--lavender-light);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 1px;
}

.auth-remember-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--lavender-deep);
  cursor: pointer;
}

.auth-forgot-inline {
  font-size: 13px;
  font-weight: 600;
  color: var(--lavender-deep);
  text-decoration: none;
}

.auth-forgot-inline:hover {
  color: var(--charcoal);
  text-decoration: underline;
}

.auth-actions {
  margin-top: 20px;
}

.auth-submit {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--lavender-deep);
  color: #fff;
  cursor: pointer;
}

.auth-submit:hover {
  background: var(--charcoal);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-register-cta {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.auth-register-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.auth-secondary-btn {
  display: inline-block;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--lavender-deep);
  background: transparent;
  color: var(--lavender-deep);
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.auth-secondary-btn:hover {
  background: var(--lavender-light);
  color: var(--charcoal);
}

.auth-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--text-soft);
}

.auth-links {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  text-align: center;
}

.auth-message {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

.auth-message.is-visible {
  display: block;
}

.auth-message.is-error {
  background: #fce8e8;
  color: #8b3030;
}

.auth-message.is-success {
  background: #e8f5ec;
  color: #2d6a3e;
}

.auth-dev-link {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text-body);
  padding: 12px 14px;
  background: var(--lavender-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.auth-dev-link a {
  font-weight: 600;
  color: var(--lavender-deep);
}

/* ─── Split sign-in layout ─── */
.auth-main--split {
  align-items: stretch;
  padding: 24px 20px 48px;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 0;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  background: var(--surface-card);
}

.auth-panel--brand {
  padding: 40px 36px;
  background: linear-gradient(155deg, var(--lavender-deep) 0%, #4a3d6b 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 12px;
}

.auth-panel-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 14px;
}

.auth-panel-lede {
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.92;
  margin: 0 0 20px;
}

.auth-panel-points {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.auth-panel-points li {
  padding-left: 22px;
  position: relative;
}

.auth-panel-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
  opacity: 0.9;
}

.auth-panel-cta {
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--lavender-deep);
  text-decoration: none;
}

.auth-panel-cta:hover {
  background: var(--lavender-light);
  color: var(--charcoal);
}

.auth-panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  background: var(--surface-card);
}

.auth-card--flat {
  max-width: none;
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.auth-form-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--charcoal);
}

.auth-secondary-btn--prominent {
  background: var(--lavender-light);
}

.auth-secondary-btn--prominent:hover {
  background: var(--lavender-deep);
  color: #fff;
  border-color: var(--lavender-deep);
}

@media (max-width: 760px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-panel--brand {
    padding: 28px 24px;
  }

  .auth-panel-cta {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* ─── Registration wizard ─── */
.auth-main--wizard {
  align-items: flex-start;
  padding-top: 28px;
}

.auth-wizard-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.auth-wizard-shell--wide {
  max-width: 720px;
}

.auth-wizard-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.auth-wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-muted);
}

.auth-wizard-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--border-soft);
  color: var(--text-soft);
}

.auth-wizard-step.is-current {
  border-color: var(--lavender-deep);
  background: var(--surface-card);
  color: var(--charcoal);
  font-weight: 600;
}

.auth-wizard-step.is-current .auth-wizard-num {
  background: var(--lavender-deep);
  color: #fff;
}

.auth-wizard-step.is-done {
  color: var(--charcoal);
}

.auth-wizard-step.is-done .auth-wizard-num {
  background: #e8f5ec;
  color: #2d6a3e;
}

.auth-wizard-label {
  line-height: 1.2;
}

.auth-card--wizard {
  max-width: none;
}

.auth-card--welcome {
  max-width: none;
}

.auth-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.auth-path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  font-family: inherit;
  padding: 18px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.auth-path-card:hover {
  border-color: var(--lavender-deep);
  box-shadow: 0 4px 16px rgba(90, 70, 130, 0.12);
  transform: translateY(-1px);
}

.auth-path-card:focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 2px;
}

.auth-path-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.auth-path-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
}

.auth-path-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.auth-welcome-skip {
  margin-top: 22px;
  font-size: 13px;
  text-align: center;
  color: var(--text-muted);
}

.auth-welcome-skip a {
  color: var(--lavender-deep);
  font-weight: 600;
}

@media (max-width: 560px) {
  .auth-wizard-step .auth-wizard-label {
    display: none;
  }

  .auth-path-grid {
    grid-template-columns: 1fr;
  }
}
