/* BUILD: lp-gate-13 fresh */
:root {
  --ink: #0b2231;
  --foam: #eef6f8;
  --brass: #a9c3cf;
  --mint: #1ec9a8;
  --mint-2: #6ef0d0;
  --accent: #22d3ee;
  --accent-2: #a5f3fc;
  --rose: #ff6b6b;
  --muted: rgba(238, 246, 248, 0.62);
  --line: rgba(34, 211, 238, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.lp {
  min-height: 100vh;
  font-family: Sora, system-ui, sans-serif;
  color: var(--foam);
  background: var(--ink);
  overflow-x: hidden;
  --tape-h: 44px;
}

/* —— Live tape bar —— */
.lp-tape-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--tape-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  background: rgba(4, 16, 22, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lp-tape-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-family: Syne, Sora, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--mint-2);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.lp-tape-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(30, 201, 168, 0.55);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 201, 168, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(30, 201, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 201, 168, 0); }
}
.lp-tape-track {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.lp-tape-rail {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
  animation: tapeMarquee 38s linear infinite;
}
.lp-tape-rail:hover {
  animation-play-state: paused;
}
@keyframes tapeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.lp-tape-item {
  flex: 0 0 auto;
  width: 216px;
  display: grid;
  grid-template-columns: auto auto minmax(46px, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid rgba(240, 226, 196, 0.08);
  border-bottom: 2px solid transparent;
  font-variant-numeric: tabular-nums;
}
.lp-tape-item .sym {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass);
}
.lp-tape-item .px {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--foam);
}
.lp-tape-spark {
  width: 100%;
  height: 22px;
  display: block;
}
.lp-tape-item .chg {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}
.lp-tape-item.is-up {
  border-bottom-color: var(--mint);
}
.lp-tape-item.is-up .chg { color: var(--mint-2); }
.lp-tape-item.is-down {
  border-bottom-color: #ff8a8a;
}
.lp-tape-item.is-down .chg { color: #ff9a9a; }
.lp-tape-item.is-flat {
  border-bottom-color: rgba(240, 226, 196, 0.25);
}
.lp-tape-item.is-flat .chg { color: var(--muted); }
.lp-tape-link {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.lp-tape-link:hover { color: var(--mint-2); }

.lp-bg {
  position: fixed;
  inset: 0;
  top: var(--tape-h);
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}
.lp-spot {
  position: absolute;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.09), transparent 70%);
  transform: translate(-50%, -50%);
  left: 50%;
  top: 45%;
  transition: left 0.4s ease, top 0.4s ease;
  will-change: left, top;
}
.lp-wave {
  /* inset negativo en vez de transform:scale() porque el JS de parallax
     escribe wave.style.transform en cada pointermove — si el "zoom" viviera
     en transform, ese estilo inline lo pisaría y la gráfica pegaría un
     salto de tamaño en el primer movimiento del mouse. */
  position: absolute;
  inset: -18%;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.lp-head {
  filter: drop-shadow(0 0 6px rgba(165, 243, 252, 0.9));
}
.lp-head-ring {
  opacity: 0.55;
  transform-origin: center;
  animation: headPulse 1.6s ease-out infinite;
}
@keyframes headPulse {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-wave { transition: none; }
}

/* —— Layout centrado: un solo canvas, la tarjeta es la protagonista —— */
.lp-center {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--tape-h));
  margin-top: var(--tape-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px) 20px;
  gap: 22px;
}

.lp-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lp-sys {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-family: Syne, Sora, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #032b36;
  background: var(--accent);
  animation: pulseSoft 3.2s ease-in-out infinite;
}
@keyframes pulseSoft {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
.lp-clock {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.lp-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  padding: 32px 30px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11, 34, 49, 0.7);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(34, 211, 238, 0.05) inset;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.lp-card.is-pulse {
  animation: cardKick 0.45s ease;
}
@keyframes cardKick {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.lp-name {
  margin: 0;
  font-family: Syne, Sora, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}
.lp-tag {
  margin: 4px 0 22px;
  font-size: 0.84rem;
  color: var(--muted);
}

.lp-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.lp-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 9px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.lp-pill-icon {
  flex-shrink: 0;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.lp-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lp-pill:hover {
  color: var(--foam);
  background: rgba(255, 255, 255, 0.04);
}
.lp-pill:hover .lp-pill-icon { transform: scale(1.12); }
.lp-pill.is-on {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--accent-2);
}
.lp-pill:active { transform: scale(0.97); }
.lp-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lp-field { margin: 0 0 14px; }
.lp-label {
  display: block;
  margin: 0 0 7px;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brass);
}
.lp-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--foam);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lp-input:hover { border-color: rgba(34, 211, 238, 0.32); }
.lp-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.lp-pass { position: relative; }
.lp-pass .lp-input { padding-right: 46px; }
.lp-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--brass);
  cursor: pointer;
  transition: color 0.15s ease;
}
.lp-eye:hover { color: var(--foam); }
.lp-eye[aria-pressed="true"] { color: var(--accent-2); }

.lp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 2px 0 18px;
  font-size: 0.84rem;
}
.lp-meta a {
  color: var(--accent-2);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.lp-meta a:hover { opacity: 0.85; text-decoration: underline; }
.lp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
}
.lp-check input { accent-color: var(--accent); }

.lp-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  background: var(--accent);
  color: #032b36;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.lp-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}
.lp-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.lp-submit:hover::after { transform: translateX(120%); }
.lp-submit:active { transform: translateY(0); }
.lp-submit.loading { opacity: 0.88; cursor: wait; }
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(3, 43, 54, 0.2);
  border-top-color: rgba(3, 43, 54, 0.7);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lp-schwab {
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--brass);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lp-schwab:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.06);
}

.lp-err {
  margin: 0 0 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--rose);
  background: rgba(255, 107, 107, 0.12);
  color: #ffb4b4;
  font-size: 0.86rem;
  animation: rise 0.4s ease both;
}
body.has-error .lp-auth-card { border-color: rgba(255, 107, 107, 0.5); }
.lp-note {
  margin: 16px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 880px) {
  .lp-tape-item .px { display: none; }
  .lp-tape-spark { display: none; }
  .lp-tape-item { width: 110px; gap: 6px; padding: 0 12px; grid-template-columns: auto auto; }
  .lp-tape-rail { animation-duration: 28s; }
  .lp-tape-link { padding: 0 12px; font-size: 0.72rem; }
  .lp-wave { opacity: 0.28; }
  .lp-tabs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 420px) {
  .lp-card { padding: 26px 20px 24px; }
  .lp-tabs { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-sys, .lp-card, .lp-mark,
  .lp-tape-rail, .lp-tape-dot {
    animation: none !important;
  }
  .lp-spot { transition: none; }
  .lp-wave { transition: none; }
}

.lp-build {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 50;
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(110, 240, 208, 0.55);
  pointer-events: none;
  font-family: Syne, Sora, system-ui, sans-serif;
  font-weight: 700;
}
