/* ── Page wrapper ──────────────────────────────────────────── */
.onboarding-page {
  min-height:      calc(100vh - var(--header-h));
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  padding:         2rem 1.5rem 3rem;
}

.onboarding-card {
  width:      100%;
  max-width:  460px;
}

/* ── Stepper ───────────────────────────────────────────────── */
.stepper {
  display:         flex;
  align-items:     flex-start;
  margin-bottom:   2.5rem;
}

.stepper__item {
  flex:            1;
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  position:        relative;
}

/* connecting line */
.stepper__item:not(:last-child)::after {
  content:    '';
  position:   absolute;
  top:        13px;
  left:       calc(50% + 16px);
  right:      calc(-50% + 16px);
  height:     1px;
  background: var(--border);
  transition: background .3s;
}

.stepper__item.is-done:not(:last-child)::after {
  background: var(--green);
}

.stepper__dot {
  width:           28px;
  height:          28px;
  border-radius:   50%;
  border:          1px solid var(--border);
  background:      var(--bg2);
  color:           var(--muted);
  font-size:       10px;
  font-weight:     700;
  display:         flex;
  align-items:     center;
  justify-content: center;
  margin-bottom:   0.45rem;
  transition:      background .2s, border-color .2s, color .2s;
}

.stepper__item.is-active .stepper__dot {
  background:    var(--accent);
  border-color:  var(--accent);
  color:         var(--btn-primary-fg);
}

.stepper__item.is-done .stepper__dot {
  background:   var(--green);
  border-color: var(--green);
  color:        var(--bg);
}

.stepper__label {
  font-size:      9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color:          var(--muted);
  text-align:     center;
  transition:     color .2s;
}

.stepper__item.is-active .stepper__label {
  color:       var(--text);
  font-weight: 700;
}

/* ── Steps ─────────────────────────────────────────────────── */
.step { display: none; }
.step.is-active {
  display:   block;
  animation: stepIn .2s ease;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Security checks ───────────────────────────────────────── */
.security-list {
  list-style:   none;
  margin:       1.5rem 0 2rem;
}

.security-item {
  display:     flex;
  gap:         0.75rem;
  align-items: flex-start;
  padding:     0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size:   0.82rem;
}

.security-item:last-child { border-bottom: none; }

.security-item__icon {
  color:       var(--green);
  font-size:   14px;
  flex-shrink: 0;
  margin-top:  1px;
}

.security-item__title {
  font-weight:   700;
  margin-bottom: 0.15rem;
}

.security-item__desc {
  color:       var(--muted);
  font-size:   0.76rem;
  line-height: 1.5;
}

/* ── Form fields ───────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }

.field__label {
  display:        block;
  font-size:      10px;
  font-weight:    700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color:          var(--muted);
  margin-bottom:  0.4rem;
}

.field__input {
  width:         100%;
  padding:       9px 12px;
  background:    var(--bg);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  color:         var(--text);
  font-family:   var(--font);
  font-size:     12px;
  outline:       none;
  transition:    border-color .15s;
}

.field__input:focus     { border-color: var(--accent); }
.field__input.has-error { border-color: var(--red); }
.field__input.is-valid  { border-color: var(--green); }

.field__hint {
  font-size:  10px;
  color:      var(--muted);
  margin-top: 0.3rem;
}

/* ── URL validation status line ────────────────────────────── */
.url-status {
  display:     flex;
  align-items: center;
  gap:         0.4rem;
  font-size:   0.79rem;
  margin-top:  0.5rem;
  line-height: 1.4;
  min-height:  1.3rem;
}

.url-status--ok   { color: var(--green); }
.url-status--fail { color: var(--red); }

/* ── Validate button loading state ─────────────────────────── */
.btn--loading {
  pointer-events: none;
  opacity:        .72;
}

.btn--loading::after {
  content:          '';
  display:          inline-block;
  width:            9px;
  height:           9px;
  border:           2px solid currentColor;
  border-top-color: transparent;
  border-radius:    50%;
  animation:        spin .55s linear infinite;
  margin-left:      0.45rem;
  vertical-align:   middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Step nav ──────────────────────────────────────────────── */
.step-nav {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-top:      1.5rem;
  gap:             0.5rem;
}

.step-nav--end { justify-content: flex-end; }

/* ── Login error ───────────────────────────────────────────── */
#login-error {
  display:       none;
  margin-bottom: 1rem;
}

/* ── Submit button disabled while navigating ───────────────── */
#btn-connect:disabled { cursor: not-allowed; }

