/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #18181b;
  padding: 1.5rem;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card__logo {
  display: block;
  height: 56px;
  width: auto;
  margin: 0 auto 1.75rem;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #18181b;
  text-align: center;
  margin-bottom: 0.4rem;
}

.card__subtitle {
  font-size: 0.85rem;
  color: #71717a;
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ── Form ───────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  color: #18181b;
  font-size: 0.95rem;
  padding: 0.65rem 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus { border-color: #dc2626; }
.field input::placeholder { color: #a1a1aa; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  transition: opacity 0.15s;
  width: 100%;
  margin-top: 0.5rem;
}
.btn:hover:not(:disabled) { opacity: 0.85; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--primary { background: #dc2626; color: #ffffff; }
.btn--ghost {
  background: transparent;
  border: 1px solid #d4d4d8;
  color: #52525b;
  margin-top: 0;
}
.btn--ghost:hover:not(:disabled) { border-color: #a1a1aa; color: #18181b; opacity: 1; }

/* ── Links row ──────────────────────────────────────────────────────────── */
.links {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.link {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.link:hover { color: #52525b; }

/* ── Alert ──────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}
.alert--error   { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.alert--success { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.alert--info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ── Step indicator ─────────────────────────────────────────────────────── */
.steps {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.step {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e4e4e7;
  transition: background 0.2s;
}
.step--active  { background: #dc2626; }
.step--done    { background: #a1a1aa; }

/* ── Loader ─────────────────────────────────────────────────────────────── */
.btn--loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Screen visibility ──────────────────────────────────────────────────── */
.screen { display: none; }
.screen--active { display: block; }
