/* Setup wizard — matches admin / WAF shell */
.setup-content {
  padding-bottom: 40px;
}

.setup-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--shell-border);
  background: var(--shell-panel);
  box-shadow: none;
}

.setup-hero-text h2 {
  margin: 0 0 4px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.setup-hero-text p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--shell-muted);
  max-width: 520px;
  line-height: 1.45;
}

.setup-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-inset);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.setup-progress-step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius-full);
  transition: background 0.2s, color 0.2s;
}

.setup-progress-step.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  color: var(--accent);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.setup-progress-step.is-done {
  color: var(--success);
}

.setup-progress-step .step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--surface-dim);
  color: var(--muted);
  flex-shrink: 0;
}

.setup-progress-step.is-active .step-dot {
  background: var(--accent-soft);
  color: var(--accent);
}

.setup-progress-step.is-done .step-dot {
  background: var(--success-soft);
  color: var(--success);
}

.setup-progress-step.is-done .step-dot::after {
  content: '✓';
}

.setup-progress-step.is-done .step-num {
  display: none;
}

.setup-timeline {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.setup-step {
  position: relative;
  background: var(--shell-panel);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-sm);
  padding: 14px 14px 14px 64px;
  box-shadow: none;
  transition: border-color 0.12s;
}

.setup-step.is-done {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.setup-step.is-active {
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 2px var(--shell-active);
}

.setup-step-marker {
  position: absolute;
  left: 22px;
  top: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-inset);
  border: 2px solid var(--line);
}

.setup-step.is-done .setup-step-marker {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
  font-size: 0;
}

.setup-step.is-done .setup-step-marker::after {
  content: '✓';
  font-size: 1rem;
  font-weight: 800;
}

.setup-step.is-active .setup-step-marker {
  background: var(--accent-soft);
  border-color: var(--accent-muted);
  color: var(--accent);
}

.setup-step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.setup-step > p {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.setup-snippet {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #1e293b;
}

.setup-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.setup-status.wait {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

.setup-status.ok {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.setup-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.setup-status.wait::before {
  animation: livePulse 1.4s ease-in-out infinite;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.setup-actions .btn-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.setup-actions .btn-link:hover {
  color: var(--accent-hover);
}

.setup-origins-input {
  width: 100%;
  min-height: 88px;
  margin-bottom: 12px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  resize: vertical;
  box-shadow: var(--shadow-xs);
}

.setup-origins-input:focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.setup-finish {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-inset);
}

.setup-finish p {
  flex: 1 1 100%;
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.setup-finish span {
  flex: 1 1 100%;
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.setup-security-note {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--warn-border);
  background: var(--warn-soft);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.setup-security-note strong {
  color: var(--warn);
}

.setup-field-hint {
  margin: -8px 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .setup-step {
    padding-left: 24px;
    padding-top: 56px;
  }
  .setup-step-marker {
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
  }
  .setup-progress-step span:not(.step-dot):not(.step-num) {
    display: none;
  }
}
