:root {
  --bg: #07090f; --panel: rgba(16, 19, 30, .78); --line: rgba(255, 255, 255, .09);
  --text: #e8ebf3; --muted: #8b93a7; --red: #ff3b52; --red2: #b3001b; --green: #2ecc71;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); overflow-x: hidden;
  background-image:
    radial-gradient(900px 500px at 15% -10%, rgba(255, 59, 82, .22), transparent 60%),
    radial-gradient(700px 500px at 100% 110%, rgba(120, 60, 255, .16), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}
body::before { /* franjas diagonales decorativas */
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 140px, rgba(255, 59, 82, .035) 140px 142px);
}

.wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; }
.card {
  width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 36px 34px 28px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 59, 82, .06), inset 0 1px 0 rgba(255, 255, 255, .05);
  position: relative; animation: rise .5s ease both;
}
.card::before { /* filo de luz superior */
  content: ''; position: absolute; left: 14%; right: 14%; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent); border-radius: 2px;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.brand { text-align: center; margin-bottom: 26px; }
.brand img { width: 62px; height: 62px; filter: drop-shadow(0 6px 18px rgba(255, 59, 82, .45)); }
.brand h1 { margin-top: 14px; font-size: 21px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.brand h1 b { color: var(--red); font-weight: 800; }
.brand p { margin-top: 6px; font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }

.steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; font-size: 11.5px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.steps .st { display: flex; align-items: center; gap: 8px; }
.steps .n { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.steps .st.on { color: var(--text); }
.steps .st.on .n { background: linear-gradient(135deg, var(--red), var(--red2)); border-color: transparent; color: #fff; box-shadow: 0 0 14px rgba(255, 59, 82, .5); }
.steps .st.done .n { background: var(--green); border-color: transparent; color: #04140a; }
.steps .bar { width: 34px; height: 1px; background: var(--line); }

.field { position: relative; margin-bottom: 14px; }
.field svg.ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .2s; }
.field input {
  width: 100%; padding: 14px 44px 14px 44px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(5, 7, 12, .7); color: var(--text); font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #5d6579; }
.field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 59, 82, .16); }
.field input:focus ~ svg.ic, .field:focus-within svg.ic { stroke: var(--red); }
.field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.field .eye:hover { color: var(--text); }
.field .eye svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  width: 100%; margin-top: 6px; padding: 14px; border: 0; border-radius: 12px; cursor: pointer; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--red) 0%, var(--red2) 100%); box-shadow: 0 10px 26px rgba(255, 59, 82, .32); transition: transform .12s, box-shadow .2s, filter .2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(255, 59, 82, .42); filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: none; }
.btn:disabled { opacity: .65; cursor: wait; }
.btn.ghost { background: transparent; box-shadow: none; border: 1px solid var(--line); color: var(--muted); font-weight: 600; letter-spacing: .6px; }
.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: rgba(255, 255, 255, .22); box-shadow: none; filter: none; }
.spin { width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; display: none; }
.btn.loading .spin { display: block; }
@keyframes sp { to { transform: rotate(360deg); } }

.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; text-align: center; }
.hint code { background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 5px; font-size: 12px; color: var(--text); }
.err { min-height: 20px; margin-top: 12px; text-align: center; font-size: 13px; color: #ff7a8a; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.otp { display: flex; gap: 9px; justify-content: center; margin: 4px 0 16px; }
.otp input {
  width: 100%; max-width: 54px; height: 62px; text-align: center; font-size: 26px; font-weight: 700; font-family: Consolas, monospace; color: var(--text);
  background: rgba(5, 7, 12, .7); border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.otp input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 59, 82, .16); }
.otp input.fill { border-color: rgba(255, 59, 82, .55); }

.qrbox { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.qrbox img { width: 190px; height: 190px; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.secret { font-family: Consolas, monospace; font-size: 12.5px; letter-spacing: 1px; word-break: break-all; text-align: center; background: rgba(255, 255, 255, .05); padding: 8px 10px; border-radius: 8px; color: var(--text); }

.foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.foot svg { width: 14px; height: 14px; stroke: var(--green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foot.warn svg { stroke: #f5a524; }
.copy { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 11px; color: #5b6377; letter-spacing: 1.5px; text-transform: uppercase; }
.hidden { display: none !important; }
@media (max-width: 480px) { .card { padding: 28px 20px 22px; } .otp { gap: 6px; } .otp input { height: 54px; font-size: 22px; } }
