/* ════════════════════════════════════════════════════════
   01_login — page.css  v3.0 (3-step wizard)
   Colours from theme.css CSS variables where sensible; the
   welcome-step gradient is a deliberate, self-contained brand
   moment and is intentionally hard-coded (not theme-driven).
   ════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

html, body {
  min-height: 100vh;
  margin: 0;
}

.wizard-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

/* ── Step visibility ── */
.wizard-step {
  display: none;
  width: 100%;
}
.wizard-step.active { display: grid; place-items: center; }

/* ══════════════════════════════════════════════
   STEP 1 — Welcome: full-viewport gradient
   ══════════════════════════════════════════════ */
.step-welcome {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 45%, #818cf8 75%, #a5b4fc 100%);
}

.welcome-content {
  text-align: center;
  padding: 32px;
  max-width: 560px;
}

.brand-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin: 0 0 12px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.brand-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.88);
  margin: 0 0 40px;
  font-weight: 400;
}

.btn-continue {
  appearance: none;
  border: none;
  background: #ffffff;
  color: #4338ca;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-continue:hover  { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,0.22); }
.btn-continue:active { transform: translateY(0); }

/* ══════════════════════════════════════════════
   STEPS 2 & 3 — Username / Password cards
   ══════════════════════════════════════════════ */
.wizard-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  text-align: left;
}

.step-title {
  font-size: var(--font-size-2xl, 1.5rem);
  font-weight: var(--font-weight-bold, 700);
  color: var(--color-text);
  margin: 0 0 4px;
  text-align: center;
}

.step-sub {
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-text-muted);
  margin: 0 0 24px;
  text-align: center;
}

.stack { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
}

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.8rem; }

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  cursor: pointer;
  color: var(--color-text-muted);
  height: auto !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  width: auto !important;
  min-width: unset !important;
  box-shadow: none !important;
}
.toggle-pass:hover { color: var(--color-text-secondary); }

.back-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--color-primary); text-decoration: underline; }

.notice {
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  text-align: center;
}
.error {
  background: var(--color-danger-light);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
}

/* ── Footer small print — every step ── */
.wizard-footer {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  z-index: 10;
  pointer-events: none;
  margin: 0;
}

/* On the card steps (white-ish background) the footer needs a darker tone */
body:has(.step-card.active) .wizard-footer,
.wizard-page:has(.step-card.active) .wizard-footer {
  color: var(--color-text-muted);
}
