/* Login & registration ---------------------------------------------------- */

.auth-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background: #eaf4fb url("../background.webp") center 35% / cover no-repeat;
  filter: blur(9px);
  transform: scale(1.06);
}
.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(203, 231, 249, .72);
}
:root[data-theme-resolved="dark"] .auth-bg::after { background: rgba(10, 10, 12, .78); }

.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  animation: rise .4s var(--ease) both;
}
.auth-card.is-wide { width: min(460px, 100%); }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 20px;
}
.auth-brand:hover { text-decoration: none; }
.auth-brand .icon { color: var(--blue); font-size: 17px; }

.auth-title { font-size: 22px; letter-spacing: -.02em; }
.auth-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }
.auth-head { margin-bottom: 20px; }

.auth-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

/* Back / forward pair at the bottom of a wizard step */
.step-nav { display: flex; justify-content: space-between; gap: 8px; }
.step-nav .btn { min-width: 96px; }

.error-back { margin-top: 20px; }
.modal-body > .field:last-child { margin-bottom: 0; }

/* Step machine: only one step is mounted at a time. */
.step { animation: step-in var(--base) var(--ease) both; }
.step.is-back { animation: step-back var(--base) var(--ease) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-14px); } }

/* Identity plate shown on the password step */
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
}
.identity .avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--line-soft);
  image-rendering: pixelated;
  flex: none;
}
.identity-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
  word-break: break-all;
}
.identity-meta { font-size: 12.5px; color: var(--muted); }
.identity .btn-ghost { margin-left: auto; flex: none; font-size: 13px; }

/* Registration progress -------------------------------------------------- */
.progress { margin-bottom: 22px; }
.progress-track {
  height: 4px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 25%;
  background: var(--blue);
  border-radius: 999px;
  transition: width .34s var(--ease);
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.progress-steps span { transition: color var(--fast) var(--ease); }
.progress-steps span.is-active { color: var(--blue); font-weight: 600; }
.progress-steps span.is-done { color: var(--ink-2); }

/* Success ---------------------------------------------------------------- */
.success {
  text-align: center;
  padding: 8px 0 4px;
}
.success .icon {
  font-size: 64px;
  color: var(--blue);
  animation: pop .5s var(--ease) both;
}
.success-title { margin-top: 14px; font-size: 21px; letter-spacing: -.02em; }
.success-sub { margin-top: 8px; font-size: 14px; color: var(--muted); }
.success .btn { margin-top: 22px; }

/* Cap.js widget ---------------------------------------------------------- */
.captcha-slot { margin: 4px 0 14px; min-height: 40px; }
cap-widget {
  --cap-background: var(--surface);
  --cap-border-color: var(--line);
  --cap-border-radius: 10px;
  --cap-color: var(--ink);
  --cap-checkbox-border: 1px solid var(--line);
  --cap-checkbox-border-radius: 5px;
  --cap-spinner-color: var(--blue);
  --cap-widget-width: 100%;
  --cap-font: var(--font);
  display: block;
}

.password-meter { display: flex; gap: 4px; margin-top: 8px; }
.password-meter i {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--line-soft);
  transition: background var(--base) var(--ease);
}
.password-meter i.on { background: var(--blue); }
.password-meter i.weak { background: #e0a100; }
