/* Creado por Ing. Emigdio Zarate con Claude Code como gestor y Gemini como agente */
:root {
  --bg:#001E3C; --bg-card:#002D5A;
  --steel:#1E8FD8; --steel-lt:#4AABEC;
  --orange:#EA580C; --orange-lt:#FB923C;
  --green:#22C55E; --red:#DC2626;
  --white:#FFFFFF; --gray:#94A3B8;
  --text:#E2E8F0; --text-dim:#94A3B8;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter','Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--text);min-height:100vh}
.app-wrap{max-width:430px;margin:0 auto;min-height:100vh}
@media(min-width:500px){body{background:#000d1f}.app-wrap{background:var(--bg);box-shadow:0 0 80px rgba(0,0,0,.7)}}

.portal-header{position:sticky;top:0;z-index:100;background:rgba(0,20,48,.97);backdrop-filter:blur(16px);padding:.75rem 1rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.07)}
.header-back{color:var(--gray);font-size:.8rem;font-weight:600;text-decoration:none}
.header-back:hover{color:var(--white)}
.header-title{font-size:.78rem;font-weight:700;color:var(--green)}

.main-section{padding:2.5rem 1.25rem 1.5rem}
.section-icon{font-size:2.5rem;text-align:center;margin-bottom:.9rem}
.section-title{font-size:1.4rem;font-weight:800;text-align:center;margin-bottom:.45rem}
.section-desc{font-size:.82rem;color:var(--text-dim);text-align:center;margin-bottom:1.75rem;line-height:1.6}
.section-desc strong{color:var(--text)}

.form-group{margin-bottom:1.15rem}
label{display:block;font-size:.75rem;font-weight:600;color:var(--gray);margin-bottom:.38rem;letter-spacing:.03em}
input{width:100%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:.6rem;padding:.8rem 1rem;color:var(--text);font-size:.95rem;font-family:inherit;outline:none;transition:border-color .2s;-webkit-appearance:none}
input:focus{border-color:var(--green);background:rgba(255,255,255,.09)}
input.has-error{border-color:var(--red)}
input.has-success{border-color:var(--green)}
.form-error{display:block;font-size:.7rem;color:var(--red);margin-top:.3rem;min-height:.9rem}
.form-error:empty{visibility:hidden}
.form-note{font-size:.68rem;color:var(--text-dim);margin-top:.3rem;line-height:1.5}

/* Code input — large, monospace */
#inputCode{font-family:'Courier New',Courier,monospace;font-size:1.3rem;letter-spacing:.12em;text-align:center;text-transform:uppercase;background:rgba(34,197,94,.06);border-color:rgba(34,197,94,.2)}
#inputCode:focus{border-color:var(--green);background:rgba(34,197,94,.1)}
#inputCode::placeholder{font-size:.85rem;letter-spacing:.02em;font-family:'Inter',system-ui,sans-serif;text-transform:none;opacity:.5}

.submit-btn{width:100%;background:var(--green);color:#fff;border:none;border-radius:.7rem;padding:.9rem;font-size:.97rem;font-weight:700;cursor:pointer;letter-spacing:.02em;transition:background .2s,opacity .2s;margin-top:.4rem;display:flex;align-items:center;justify-content:center;gap:.55rem;font-family:inherit}
.submit-btn:hover{background:var(--green-dark,#16A34A)}
.submit-btn:disabled{opacity:.4;cursor:not-allowed}
.spinner{width:.9rem;height:.9rem;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:none;flex-shrink:0}
@keyframes spin{to{transform:rotate(360deg)}}

/* STATUS */
.status-box{display:none;border-radius:.7rem;padding:.85rem 1rem;font-size:.8rem;line-height:1.55;margin-top:.85rem;text-align:center}
.status-box.error{background:rgba(220,38,38,.12);border:1px solid rgba(220,38,38,.3);color:#fca5a5;display:block}
.status-box.success{background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.25);color:#86efac;display:block}

/* SUCCESS STATE */
.success-state{display:none;padding:2.5rem 1.25rem;text-align:center}
.success-icon{font-size:3.5rem;margin-bottom:1rem}
.success-title{font-size:1.5rem;font-weight:800;margin-bottom:.5rem;color:var(--green)}
.success-plan{display:inline-block;background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.3);color:var(--green);font-size:.78rem;font-weight:700;padding:.3rem .85rem;border-radius:999px;margin-bottom:.75rem}
.success-desc{font-size:.83rem;color:var(--text-dim);line-height:1.65;margin-bottom:1.5rem}
.success-cta{display:block;background:var(--orange);color:#fff;font-size:.95rem;font-weight:700;padding:.85rem;border-radius:.7rem;text-decoration:none;text-align:center}

/* HOW IT WORKS */
.how-section{padding:1rem 1.25rem 2rem;border-top:1px solid rgba(255,255,255,.07)}
.how-title{font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--gray);margin-bottom:.75rem}
.how-item{display:flex;gap:.65rem;margin-bottom:.65rem;align-items:flex-start}
.how-num{flex-shrink:0;width:1.5rem;height:1.5rem;background:rgba(255,255,255,.08);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:700;color:var(--text-dim)}
.how-text{font-size:.76rem;color:var(--text-dim);line-height:1.5}
.how-text strong{color:var(--text)}

.portal-footer{padding:1.4rem 1.25rem 1.8rem;text-align:center;border-top:1px solid rgba(255,255,255,.07)}
.portal-footer a.ft-logo{display:inline-block;margin-bottom:.55rem;opacity:.5;transition:opacity .2s}
.portal-footer a.ft-logo:hover{opacity:.85}
.portal-footer a.ft-logo img{height:28px;object-fit:contain;border-radius:4px;display:block}
.portal-footer p{font-size:.68rem;color:var(--text-dim);line-height:1.6}
#scrollTop{position:fixed;bottom:1.8rem;left:1.8rem;z-index:200;width:3rem;height:3rem;border-radius:50%;background:linear-gradient(135deg,#EA580C,#FB923C);border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px rgba(234,88,12,.45);opacity:0;transform:translateY(16px) scale(.8);transition:opacity .35s,transform .35s;pointer-events:none}
#scrollTop.show{opacity:1;transform:none;pointer-events:auto}
#scrollTop:hover{box-shadow:0 6px 28px rgba(234,88,12,.7);transform:scale(1.1) translateY(-2px)}
#scrollTop:active{transform:scale(.9)}