:root {
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --purple-deep: #2e1065;
  --purple-soft: #f5f3ff;
  --text: #1f1638;
  --muted: #6b6485;
  --border: #e4def7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #fff;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ---------- IZQUIERDA ---------- */
.brand {
  position: relative;
  background:
    radial-gradient(ellipse 65% 50% at 50% 55%, #a878ff 0%, rgba(168,120,255,0) 100%),
    radial-gradient(ellipse 120% 100% at 50% 50%, #7c3aed 55%, #5b21b6 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 40px;
  overflow: hidden;
}
.brand::before, .brand::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.08); pointer-events: none;
}
.brand::before { width: 420px; height: 420px; top: -140px; left: -140px; }
.brand::after  { width: 320px; height: 320px; bottom: -120px; right: -100px; }

.logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.logo img { width: 200px; max-width: 60vw; height: auto; display: block; }

.hero {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; position: relative; z-index: 1; gap: 12px;
}
/* Vista previa del producto */
.mock { position: relative; width: min(400px, 100%); margin: 34px 0 8px; }
.glass {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 22px;
  box-shadow: 0 24px 50px -18px rgba(30,8,80,.55);
}
.main { padding: 52px 24px 20px; text-align: left; }
.m-top { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; opacity: .9; }
.chip { background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 99px; font-weight: 600; font-size: .75rem; }
.m-amount { font-size: 2rem; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 4px; }
.m-chart { width: 100%; height: 86px; display: block; }
.m-row { display: flex; gap: 12px; margin-top: 14px; }
.m-row > div { flex: 1; background: rgba(255,255,255,.12); border-radius: 14px; padding: 10px 14px; }
.m-row small { display: block; font-size: .72rem; opacity: .8; }
.m-row b { font-size: 1rem; font-weight: 600; }
.float { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; text-align: left; font-size: .8rem; }
.float b { display: block; font-size: .95rem; font-weight: 600; }
.float small { opacity: .8; font-size: .72rem; }
.goal { right: -28px; bottom: -34px; }
.shield { left: -28px; top: -24px; }
.shield .ic { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--purple); display: grid; place-items: center; }
.shield .ic svg { width: 20px; height: 20px; }
.caption { font-size: .7rem; opacity: .6; margin-top: 44px; }
.hero h2 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.4px; line-height: 1.25; max-width: 420px; margin-top: 6px; text-wrap: balance; }

.trust { position: relative; z-index: 2; display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; padding-top: 18px; }
.trust div { display: flex; align-items: center; gap: 8px; font-size: .8rem; opacity: .92; }
.trust svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero p { max-width: 340px; opacity: .9; font-size: .98rem; line-height: 1.6; }

/* ---------- DERECHA ---------- */
.panel {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 6%;
}
.card {
  width: 100%; max-width: 560px;
  background: transparent;
  border: 0;
  padding: 0;
}
.card h1 { font-size: 1.7rem; font-weight: 700; }
.card .sub { color: var(--muted); margin: 6px 0 28px; font-size: .95rem; }

label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
.field { margin-bottom: 18px; position: relative; }
.field input {
  width: 100%; padding: 16px 18px;
  border: 1.5px solid transparent; border-radius: 14px;
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--purple-soft); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus {
  border-color: var(--purple); background: #fff;
  box-shadow: 0 0 0 4px rgba(124,58,237,.15);
}
.toggle {
  position: absolute; right: 14px; top: 42px;
  background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: .8rem; font-family: inherit; padding: 4px 6px;
}
.toggle:hover { color: var(--purple); }

.row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: .85rem;
}
.row label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--muted); cursor: pointer; }
.row input[type=checkbox] { accent-color: var(--purple); width: 16px; height: 16px; }
a { color: var(--purple); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

.btn {
  width: 100%; padding: 14px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 10px 20px -8px rgba(124,58,237,.6);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 24px -8px rgba(124,58,237,.7); }
.btn:active { transform: translateY(0); }

.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.btn-alt {
  width: 100%; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 0; background: var(--purple-soft); color: var(--text);
  font: inherit; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .2s;
}
.btn-alt:hover { background: #ede9fe; }
.btn-alt svg { width: 18px; height: 18px; }

.signup { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--muted); }

/* Autocompletado del navegador */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--purple-soft) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}
.field input#password { padding-right: 90px; }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .brand { padding: 28px 24px 52px; }
  .mock, .caption, .trust, .hero p { display: none; }
  .hero { align-items: flex-start; text-align: left; margin-top: 14px; }
  .hero h2 { font-size: 1.35rem; margin: 0; }
  .panel {
    margin-top: -24px; position: relative; z-index: 3;
    border-radius: 28px 28px 0 0; padding: 36px 24px 40px;
    align-items: flex-start;
  }
  .card { max-width: 560px; }
  .logo img { width: 160px; }
}
@media (max-width: 380px) {
  .panel { padding: 30px 18px 36px; }
  .card h1 { font-size: 1.45rem; }
}

/* ---------- Login seguro, registro y recuperación ---------- */
.field.has-toggle input { padding-right: 90px; }
.hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; }

.form-msg { display: none; padding: 12px 14px; border-radius: 12px; font-size: .88rem; line-height: 1.5; margin-bottom: 18px; }
.form-msg.show { display: block; }
.form-msg.error { background: #fdecea; color: #a3261b; }
.form-msg.info  { background: var(--purple-soft); color: #4c1d95; }
.form-msg.ok    { background: #e3f5ec; color: #0e5c3b; }
.form-msg .link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; cursor: pointer; }
.form-msg .link-btn:disabled { opacity: .6; cursor: default; text-decoration: none; }

a.btn { display: block; text-align: center; text-decoration: none; color: #fff; }
a.btn:hover { text-decoration: none; color: #fff; }
.btn-sec {
  width: 100%; padding: 13px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .95rem; color: #4c1d95; background: var(--purple-soft);
  transition: background .2s;
}
.btn-sec:hover { background: #ede9fe; }
.btn-sec:disabled { opacity: .6; cursor: default; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; margin-bottom: 22px; }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.done { text-align: center; }
.done .icono {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--purple-soft); color: var(--purple);
}
.done .icono.ok { background: #e3f5ec; color: #0e5c3b; }
.done .icono.error { background: #fdecea; color: #a3261b; }
.done .icono svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.done .sub b { color: var(--text); overflow-wrap: anywhere; }
.done .acciones { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
[hidden] { display: none !important; }

/* Consentimiento en el registro y enlaces legales */
.acepto { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .84rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.acepto input { accent-color: var(--purple); width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.acepto a { font-weight: 600; }
.legal-links { text-align: center; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--purple); }
