/* Creado por Ing. Emigdio Zarate con Claude Code como gestor — CARGOTECH 2026 */
: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)}}

/* HEADER */
.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(--steel-lt);letter-spacing:.04em}

/* FORM SECTION */
.form-section{padding:2rem 1.25rem 1.5rem}
.form-icon{font-size:2.4rem;text-align:center;margin-bottom:.85rem}
.form-title{font-size:1.35rem;font-weight:800;text-align:center;margin-bottom:.5rem;line-height:1.25}
.form-desc{font-size:.82rem;color:var(--text-dim);text-align:center;margin-bottom:1.65rem;line-height:1.6}
.form-desc strong{color:var(--text)}

.form-group{margin-bottom:1.1rem}
label{display:block;font-size:.76rem;font-weight:600;color:var(--gray);margin-bottom:.35rem;letter-spacing:.03em}
input{width:100%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:.6rem;padding:.78rem 1rem;color:var(--text);font-size:.93rem;font-family:inherit;outline:none;transition:border-color .2s;-webkit-appearance:none}
input:focus{border-color:var(--orange);background:rgba(255,255,255,.09)}
input.has-error{border-color:var(--red)}
.form-error{display:block;font-size:.7rem;color:var(--red);margin-top:.28rem;min-height:.9rem}
.form-error:empty{visibility:hidden}

/* PASSWORD STRENGTH */
.pwd-strength{display:none;margin-top:.5rem}
.pwd-bar-track{height:4px;background:rgba(255,255,255,.1);border-radius:2px;overflow:hidden}
.pwd-bar-fill{height:100%;width:0;border-radius:2px;transition:width .25s,background .25s}
.pwd-str-text{font-size:.68rem;color:var(--gray);margin-top:.3rem;text-align:right}

/* SUBMIT BUTTON */
.submit-btn{width:100%;border:none;border-radius:.7rem;padding:.88rem;font-size:.95rem;font-weight:700;cursor:pointer;letter-spacing:.02em;background:var(--orange);color:#fff;transition:background .2s,opacity .2s;margin-top:.4rem;display:flex;align-items:center;justify-content:center;gap:.55rem}
.submit-btn:hover{background:var(--orange-lt)}
.submit-btn:disabled{opacity:.5;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)}}

.form-legal{font-size:.7rem;color:var(--text-dim);text-align:center;margin-top:1rem;line-height:1.7}
.form-legal strong{color:var(--text)}

/* DIVIDER / LOGIN LINK */
.divider{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.25rem}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.08)}
.divider span{font-size:.7rem;color:var(--text-dim);white-space:nowrap}
.login-row{text-align:center;padding:.5rem 1.25rem 2rem;font-size:.82rem;color:var(--text-dim)}
.login-row a{color:var(--orange-lt);font-weight:600;text-decoration:none}

/* TRUST ITEMS */
.trust-section{display:flex;flex-direction:column;gap:.55rem;padding:.5rem 1.25rem 1.75rem}
.trust-item{display:flex;align-items:flex-start;gap:.55rem;font-size:.78rem;color:var(--text-dim);line-height:1.5}

/* SUCCESS STATE */
.success-state{display:none;text-align:center;padding:3rem 1.25rem}
.success-icon{font-size:3.5rem;margin-bottom:1rem}
.success-title{font-size:1.6rem;font-weight:800;margin-bottom:.75rem}
.success-desc{font-size:.88rem;color:var(--text-dim);line-height:1.7;margin-bottom:1.5rem}
.success-desc strong{color:var(--text)}
.success-cta{display:inline-block;background:var(--orange);color:#fff;font-size:.9rem;font-weight:700;padding:.8rem 2rem;border-radius:.7rem;text-decoration:none;transition:background .2s}
.success-cta:hover{background:var(--orange-lt)}

/* FOOTER */
.portal-footer{padding:1.4rem 1.25rem 1.8rem;text-align:center;border-top:1px solid rgba(255,255,255,.07);margin-top:1rem}
.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)}
