:root {
  --blue: #0056a8;
  --blue-dark: #003f7d;
  --blue-soft: #e8f1ff;
  --blue-accent: #064f9e;
  --blue-accent-soft: #2f7fd1;
  --ink: #132033;
  --muted: #71839a;
  --line: #dbe9f7;
  --danger: #b42331;
  --success: #08794a;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 86, 168, .16), transparent 24%),
    radial-gradient(circle at right 60%, rgba(0, 63, 125, .18), transparent 24%),
    linear-gradient(135deg, #f8fbff 0%, #eaf6ff 100%);
}

.recover-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
}

.recover-card {
  width: min(1050px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 430px);
  align-items: center;
  gap: clamp(24px, 5vw, 62px);
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid #dcecff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    radial-gradient(circle at 0 100%, rgba(0,86,168,.08), transparent 28%);
  box-shadow: 0 18px 55px rgba(0, 63, 125, .16), 0 0 0 12px rgba(255,255,255,.45);
  position: relative;
  overflow: hidden;
  animation: recoverCardIn .48s ease both;
}

.recover-card::before,
.recover-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.recover-card::before {
  width: 220px;
  height: 220px;
  right: -100px;
  top: 72px;
  background: rgba(0, 86, 168, .14);
}

.recover-card::after {
  width: 190px;
  height: 190px;
  right: 28px;
  bottom: -116px;
  background: rgba(0, 63, 125, .08);
}

.recover-art,
.recover-flow {
  position: relative;
  z-index: 1;
}

.recover-art {
  min-height: 390px;
}

.question-bubble {
  position: absolute;
  left: 116px;
  top: 54px;
  width: 70px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 22px 22px 22px 4px;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 63, 125, .2);
  animation: bubbleFloat 2.8s ease-in-out infinite;
}

.person {
  position: absolute;
  left: 92px;
  top: 118px;
  width: 120px;
  height: 220px;
}

.person .head {
  position: absolute;
  left: 38px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2f7fd1, #0056a8);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22);
}

.person .body {
  position: absolute;
  left: 28px;
  top: 48px;
  width: 62px;
  height: 105px;
  border-radius: 28px 28px 8px 8px;
  background: linear-gradient(180deg, #0056a8, #003f7d);
  transform: rotate(8deg);
  animation: personSway 3.4s ease-in-out infinite;
}

.person .leg {
  position: absolute;
  top: 145px;
  width: 26px;
  height: 82px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2f7fd1, #064f9e);
}

.person .leg-left {
  left: 34px;
  transform: rotate(5deg);
}

.person .leg-right {
  left: 66px;
  transform: rotate(-9deg);
}

.lock-window {
  position: absolute;
  left: 230px;
  top: 96px;
  width: 210px;
  height: 165px;
  border-radius: 24px;
  background: linear-gradient(180deg, #dbeafe, #7fb0e6);
  box-shadow: 0 22px 45px rgba(0, 63, 125, .18);
  animation: windowFloat 3.2s ease-in-out infinite;
}

.window-bar {
  height: 34px;
  border-radius: 24px 24px 0 0;
  background: var(--blue);
}

.lock-circle {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin: 17px auto 0;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-dark);
  font-size: 35px;
  box-shadow: inset 0 0 0 0 rgba(0,86,168,.08);
  animation: lockPulse 1.9s ease-in-out infinite;
}

.soft-key {
  position: absolute;
  left: 252px;
  top: 290px;
  color: #c5dcf0;
  font-size: 34px;
  transform: rotate(-12deg);
  animation: keyDrift 3.6s ease-in-out infinite;
}

.plant {
  position: absolute;
  left: 372px;
  top: 298px;
  width: 44px;
  height: 54px;
  border-radius: 0 0 10px 10px;
  background: #e9f1fa;
}

.plant span {
  position: absolute;
  left: 12px;
  top: -32px;
  width: 22px;
  height: 44px;
  border-radius: 50% 50% 0 0;
  background: #d8eafa;
}

.recover-flow {
  display: grid;
  gap: 18px;
  align-content: center;
  animation: flowIn .55s .08s ease both;
}

.recover-back {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.recover-back:hover { color: var(--blue-dark); }

.recover-brand {
  display: none;
}

.wizard-head p {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.wizard-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(31px, 4vw, 43px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.wizard-head span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
  font-weight: 600;
}

.wizard-progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
}

.wizard-progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #a4b4c8;
  font-size: 10px;
  font-weight: 900;
}

.wizard-progress li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #e5eef9;
}

.wizard-progress li:first-child::before { display: none; }

.wizard-progress span {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #dbe7f5;
  background: #fff;
}

.wizard-progress li.active,
.wizard-progress li.done { color: var(--blue-dark); }

.wizard-progress li.active span,
.wizard-progress li.done span {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.wizard-progress li.done::before,
.wizard-progress li.active::before { background: #a7d9fb; }

.wizard-form {
  display: grid;
  gap: 14px;
}

.wizard-step {
  display: grid;
  gap: 10px;
  animation: stepIn .2s ease both;
}

.wizard-step[hidden] { display: none !important; }

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

.wizard-step label {
  color: #233b5d;
  font-size: 13px;
  font-weight: 800;
}

.field-control {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d3e3f4;
  border-radius: 8px;
  background: #eef7ff;
  padding: 0 13px;
}

.field-control i {
  color: var(--blue-dark);
}

.field-control input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1 Inter, Arial, sans-serif;
}

.field-control:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 86, 168, .14);
  background: #fff;
}

.step-note {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.verified-box {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #eefbf5;
  color: var(--success);
}

.verified-box i { font-size: 22px; }
.verified-box strong,
.verified-box span { display: block; }
.verified-box span {
  margin-top: 3px;
  color: #4e6b5d;
  font-size: 13px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  min-height: 100px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.choice-card i { color: var(--blue-dark); }
.choice-card span {
  color: var(--muted);
  font-size: 12px;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: #94d2fb;
  box-shadow: 0 14px 28px rgba(15,143,220,.12);
}

.password-hint {
  color: var(--muted);
  font-weight: 700;
}

.wizard-alert {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.wizard-alert.success { color: var(--success); }

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

.btn-primary,
.btn-light {
  min-height: 45px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  flex: 1;
  border: 0;
  background: linear-gradient(135deg, #0056a8, #003f7d);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 63, 125, .28);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.22) 45%, transparent 70%);
  transform: translateX(-115%);
  animation: buttonSweep 2.7s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 63, 125, .34);
}

.btn-light {
  border: 1px solid var(--line);
  background: #fff;
  color: #395270;
}

.btn-primary:disabled,
.btn-light:disabled {
  opacity: .62;
  cursor: not-allowed;
}

@keyframes recoverCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flowIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes personSway {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(4deg) translateY(-2px); }
}

@keyframes windowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes lockPulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(0,86,168,.08), 0 0 0 0 rgba(0,63,125,.18); }
  50% { box-shadow: inset 0 0 0 9px rgba(0,86,168,.08), 0 0 0 10px rgba(0,63,125,.08); }
}

@keyframes keyDrift {
  0%, 100% { transform: rotate(-12deg) translate(0, 0); }
  50% { transform: rotate(-4deg) translate(8px, -5px); }
}

@keyframes buttonSweep {
  0%, 58% { transform: translateX(-115%); }
  100% { transform: translateX(115%); }
}

@media (max-width: 880px) {
  .recover-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .recover-art {
    min-height: 260px;
    transform: scale(.8);
    transform-origin: center;
  }
}

@media (max-width: 560px) {
  .recover-shell { padding: 14px; }

  .recover-card {
    padding: 24px;
    box-shadow: 0 14px 34px rgba(31, 95, 174, .14);
  }

  .recover-art { display: none; }
  .wizard-progress small { display: none; }
  .choice-grid { grid-template-columns: 1fr; }
  .wizard-actions { flex-direction: column; }
  .btn-primary,
  .btn-light { width: 100%; }
}
