/* ============================================================
   POSEIDÓN · Login v2 — "OPERACIÓN TRIDENTE"
   Cine 007/CIA. Grade de dos tonos "Abisal + Brass":
   EL MUNDO ES CIAN, LO QUE TOCAS ES ORO.
   Fondo procedural (canvas) + tarjeta densa que resalta.
   ============================================================ */
:root {
  --ink: #04070f; --panel: #0d1526; --panel-deep: #070c16;
  --line: #223050; --line-dim: #16203a;
  --txt: #e8eef7; --txt-2: #93a4bd; --txt-3: #5d6f8c; --ivory: #e9eef7;
  --cyan: #3fe0ff; --cyan-dim: rgba(80,150,190,.55); --cyan-faint: rgba(63,224,255,.16);
  --gold: #e8b34b; --gold-bright: #ffd97a; --gold-deep: #a97b26;
  --gold-glow: rgba(232,179,75,.35); --gold-ring: rgba(232,179,75,.14);
  --btn-ink: #1a1206; --blood: #ff5d5d;
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@property --ang2 { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--txt);
  font-family: "Rajdhani", "Poppins", system-ui, sans-serif;
  background: var(--ink);
}

/* ===== Capas de fondo ===== */
.lg-cine { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; filter: brightness(1.12) contrast(1.05); }
.bg-dim, .lg-tint, .lg-vignette, .lg-grain { position: fixed; inset: 0; pointer-events: none; }
/* Viñeta-foco suave: deja ver el mundo y solo atenúa un poco los bordes */
.bg-dim { z-index: 1; background: radial-gradient(ellipse 82% 86% at 50% 50%, rgba(4,7,14,0) 0%, rgba(4,7,14,.1) 52%, rgba(4,7,14,.5) 100%); }
/* Piso anamórfico cálido (rompe el azul total) */
.lg-tint { z-index: 1; background: linear-gradient(180deg, rgba(63,224,255,.03), rgba(232,179,75,.025)); }
.lg-vignette { z-index: 2; background: radial-gradient(ellipse 96% 92% at 50% 48%, transparent 62%, rgba(2,4,9,.34) 90%, rgba(1,2,6,.62) 100%); }
.lg-grain {
  z-index: 5; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: lg-grainmove .5s steps(3) infinite;
}
@keyframes lg-grainmove { 0%{transform:translate(0,0)} 33%{transform:translate(-4px,3px)} 66%{transform:translate(3px,-2px)} 100%{transform:translate(0,0)} }

/* ===== Letterbox: barra de operaciones (arriba) + subtítulo (abajo) ===== */
.ops-bar, .lg-caption {
  position: fixed; left: 0; right: 0; z-index: 6; background: rgba(4,7,14,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: "Rajdhani", sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-3);
  transition: opacity .3s ease; animation: lg-fade .8s .2s both;
}
.ops-bar { top: 0; height: 34px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line-dim); }
.lg-caption { bottom: 0; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0 18px; border-top: 1px solid var(--line-dim); }
.ops-bar.dim, .lg-caption.dim { opacity: .35; }
.ops-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ops-cell.right { justify-content: flex-end; }
.ops-cell b { color: var(--cyan-dim); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.ops-cell.right { color: var(--gold); font-weight: 700; }
.ops-cell.right b { color: var(--gold-bright); }
.ops-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: opsPulse 2.4s ease-in-out infinite; }
.ops-cell.is-online { color: #46e08f; font-weight: 700; }
.ops-cell.is-online .ops-dot { background: #46e08f; box-shadow: 0 0 9px #46e08f; }
@keyframes opsPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.ops-band { display: inline-flex; align-items: center; gap: 12px; }
.ops-band .stripe { width: 42px; height: 8px; background: repeating-linear-gradient(-45deg, var(--gold-deep) 0 4px, transparent 4px 8px); opacity: .8; }
.ops-band .band-tx { color: var(--gold); font-weight: 700; letter-spacing: .22em; text-shadow: 0 0 12px var(--gold-glow); }
.lg-caption #capScene { color: var(--txt-2); }
.lg-caption .cap-right { display: inline-flex; align-items: center; gap: 7px; }
.lg-caption .cap-right b { color: var(--cyan-dim); font-weight: 700; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blood); box-shadow: 0 0 8px rgba(255,93,93,.6); animation: recBlink 1s steps(2) infinite; }
@keyframes recBlink { 0%,50%{opacity:.85} 51%,100%{opacity:.15} }
@keyframes lg-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) { .ops-cell.left, .ops-cell.right { display: none; } .ops-bar { grid-template-columns: 1fr; justify-items: center; } }

/* Panel "conexión detectada" (abajo-izquierda) */
.conn-panel {
  position: fixed; right: 16px; bottom: 44px; z-index: 6; width: 216px; padding: 11px 13px;
  background: rgba(4,8,16,.72); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border: 1px solid var(--line-dim); border-left: 2px solid var(--gold); border-radius: 10px;
  font-family: "Rajdhani", sans-serif; box-shadow: 0 12px 34px rgba(0,0,0,.5);
  animation: lg-fade 1s 1s both; transition: opacity .3s ease;
}
.conn-panel.dim { opacity: .4; }
.conn-h { display: flex; align-items: center; gap: 7px; font-size: .68rem; font-weight: 700; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.conn-ping { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); animation: opsPulse 2s ease-in-out infinite; }
.conn-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .74rem; letter-spacing: .04em; padding: 3px 0; }
.conn-row span { color: #a7bbdb; text-transform: uppercase; font-size: .66rem; font-weight: 600; letter-spacing: .09em; }
.conn-row b { color: #f2f7ff; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.conn-row b#connIp { color: var(--cyan); }
@media (max-width: 640px) { .conn-panel { display: none; } }

/* ===== Escenario ===== */
.lg-stage { position: relative; z-index: 4; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 54px 18px; }

/* ===== Marco animado (cometa perimetral: cola cian, cabeza oro) ===== */
.card-frame {
  position: relative; z-index: 4; width: min(93vw, 436px); border-radius: 15px; padding: 1px;
  background: conic-gradient(from var(--ang), transparent 0turn .74turn, rgba(63,224,255,.45) .84turn, rgba(232,179,75,.75) .93turn, var(--gold-bright) .965turn, transparent 1turn);
  animation: frameSweep 7s linear infinite;
}
@keyframes frameSweep { to { --ang: 360deg; } }
@supports not (background: conic-gradient(from var(--ang), red, blue)) {
  .card-frame { animation: none; background: linear-gradient(120deg, rgba(232,179,75,0), rgba(232,179,75,.4), rgba(232,179,75,0)); }
}
/* Corchetes de esquina que se dibujan solos (oro) */
.ck { position: absolute; width: 26px; height: 26px; pointer-events: none; z-index: 6; }
.ck::before, .ck::after { content: ""; position: absolute; background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.ck::before { height: 2px; width: 0; animation: ckH .45s cubic-bezier(.2,.9,.3,1) both; }
.ck::after { width: 2px; height: 0; animation: ckV .45s cubic-bezier(.2,.9,.3,1) both; }
.ck-tl { top: -7px; left: -7px; } .ck-tl::before, .ck-tl::after { top: 0; left: 0; }
.ck-tr { top: -7px; right: -7px; } .ck-tr::before { top: 0; right: 0; } .ck-tr::after { top: 0; right: 0; }
.ck-bl { bottom: -7px; left: -7px; } .ck-bl::before { bottom: 0; left: 0; } .ck-bl::after { bottom: 0; left: 0; }
.ck-br { bottom: -7px; right: -7px; } .ck-br::before { bottom: 0; right: 0; } .ck-br::after { bottom: 0; right: 0; }
.ck-tl::before { animation-delay: .15s; } .ck-tl::after { animation-delay: .15s; }
.ck-tr::before { animation-delay: .27s; } .ck-tr::after { animation-delay: .27s; }
.ck-br::before { animation-delay: .39s; } .ck-br::after { animation-delay: .39s; }
.ck-bl::before { animation-delay: .51s; } .ck-bl::after { animation-delay: .51s; }
/* parpadeo de los corchetes cuando pasa el cometa */
.ck { animation: ckPing 7s linear infinite; }
.ck-tr { animation-delay: 1.75s; } .ck-br { animation-delay: 3.5s; } .ck-bl { animation-delay: 5.25s; }
@keyframes ckH { from { width: 0; } to { width: 26px; } }
@keyframes ckV { from { height: 0; } to { height: 26px; } }
@keyframes ckPing { 0%,20%,100% { filter: none; } 8% { filter: drop-shadow(0 0 8px var(--gold-bright)); } }

/* ===== Tarjeta: vidrio cálido y denso (separa del fondo) ===== */
.lg-card {
  position: relative; border-radius: 14px; padding: 40px 38px 22px; overflow: hidden;
  background: linear-gradient(160deg, rgba(13,21,38,.92), rgba(7,12,22,.965));
  -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8);
  border: 1px solid rgba(122,144,180,.22);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.6), 0 0 120px -30px rgba(63,224,255,.1), inset 0 1px 0 rgba(255,210,138,.1);
  animation: lg-cardin .6s .25s cubic-bezier(.2,.8,.25,1) both;
}
.lg-card::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-glow) 30%, var(--gold-bright) 50%, var(--gold-glow) 70%, transparent); }
@keyframes lg-cardin { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ===== Cabecera ===== */
.lg-head { text-align: center; margin-bottom: 14px; }
/* Logo con borde NEÓN animado (cometa cian→oro girando + glow + sonar) */
.lg-logo {
  position: relative; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 22px; padding: 3px;
  background: conic-gradient(from var(--ang2), rgba(63,224,255,.12) 0turn .5turn, var(--cyan) .68turn, var(--gold-bright) .82turn, var(--cyan) .92turn, rgba(63,224,255,.12) 1turn);
  animation: logoSpin 5s linear infinite; transition: transform .16s ease;
  box-shadow: 0 0 22px rgba(63,224,255,.45), 0 0 48px rgba(63,224,255,.16);
}
@keyframes logoSpin { to { --ang2: 360deg; } }
@supports not (background: conic-gradient(from var(--ang2), red, blue)) { .lg-logo { animation: none; background: linear-gradient(135deg, var(--cyan), var(--gold-bright)); } }
.lg-logo.pop { transform: scale(1.06); }
.lg-logo img { position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 19px; object-fit: cover; background: #0a1626; filter: drop-shadow(0 6px 16px rgba(63,224,255,.3)); animation: lg-float 5.5s ease-in-out infinite; }
.lg-logo-glow { position: absolute; inset: -26%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(63,224,255,.32), transparent 62%); filter: blur(13px); animation: lg-pulse 3.6s ease-in-out infinite; }
.lg-logo-ring { position: absolute; inset: -7px; z-index: 1; border-radius: 27px; border: 1px solid rgba(63,224,255,.4); box-shadow: 0 0 16px rgba(63,224,255,.28); animation: logoSonar 3s ease-out infinite; }
@keyframes lg-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes lg-pulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .85; transform: scale(1.08); } }
@keyframes logoSonar { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.18); opacity: 0; } }

/* Wordmark POSEIDÓN: tracking-in + decrypt + brillo dorado */
.lg-title {
  margin: 32px 0 0; font-family: "Cinzel", serif; font-weight: 800; font-size: 2.6rem; line-height: 1;
  letter-spacing: .6em; text-indent: .6em; text-align: center; color: var(--ivory); opacity: 0;
  transition: letter-spacing 1.6s cubic-bezier(.16,1,.3,1), opacity 1.6s cubic-bezier(.16,1,.3,1); white-space: nowrap;
}
.lg-title.run { opacity: 1; letter-spacing: .18em; text-indent: .18em; }
.lg-title .lt { display: inline-block; position: relative; }
.lg-title .lt.scram { color: var(--cyan-dim); filter: blur(2px); }
.lg-title .lt.locked { color: #fff; transform: scale(1); animation: ltLock .28s cubic-bezier(.2,1.6,.3,1); }
.lg-title .lt.locked::after { content: "▸"; position: absolute; left: 50%; bottom: -.5em; transform: translateX(-50%); font-size: .28em; color: var(--gold-bright); animation: ltTick .35s ease both; }
@keyframes ltLock { from { transform: scale(1.18); filter: blur(2px); } to { transform: scale(1); filter: blur(0); } }
@keyframes ltTick { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
.lg-title.flash { text-shadow: 0 0 22px rgba(232,179,75,.55); }
.lg-title.done {
  background: linear-gradient(105deg, var(--ivory) 40%, var(--gold-bright) 50%, var(--ivory) 60%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wmShine 12s linear infinite;
}
@keyframes wmShine { 0% { background-position: 100% 0; } 8% { background-position: 0 0; } 100% { background-position: 0 0; } }

.lg-uline { display: block; width: 120px; height: 2px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); transition: transform .5s ease .1s; }
.lg-uline.run { transform: scaleX(1); }
.lg-sub { margin: 12px 0 0; font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--txt-2); display: inline-flex; align-items: center; gap: 8px; }
.lg-live { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(63,224,255,.6); animation: lg-blip 1.8s infinite; }
@keyframes lg-blip { 0% { box-shadow: 0 0 0 0 rgba(63,224,255,.6); } 70% { box-shadow: 0 0 0 9px rgba(63,224,255,0); } 100% { box-shadow: 0 0 0 0 rgba(63,224,255,0); } }

/* ===== Formulario (interior oro/marfil) ===== */
/* space-evenly (no center): el login tiene menos contenido que la altura estándar, así
   que el sobrante se reparte en huecos PAREJOS en vez de dejar un vacío grande arriba y
   otro abajo (se veía desbalanceado). */
.lg-form { display: flex; flex-direction: column; gap: 15px; min-height: 420px; justify-content: space-evenly; }
.lg-field { display: block; }
.lg-lbl { display: flex; align-items: center; gap: 8px; margin: 0 0 7px 2px; font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--txt-2); }
.lg-lbl::before { content: ""; width: 8px; height: 1px; background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

.lg-inp { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 13px; border-radius: 13px; background: rgba(4,8,16,.65); border: 1px solid var(--line); transition: border-color .2s ease, box-shadow .25s ease, background .2s ease; }
.lg-inp:hover { border-color: #31456e; }
.lg-inp:focus-within { border-color: var(--gold); background: rgba(3,6,12,.8); box-shadow: 0 0 0 3px var(--gold-ring), 0 0 18px -6px var(--gold-glow); }
.lg-inp > i { font-size: 1.25rem; color: var(--txt-3); transition: color .2s ease, transform .2s ease; }
.lg-inp:focus-within > i { color: var(--gold); transform: scale(1.08); }
.lg-inp input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--txt); font-family: "Poppins", sans-serif; font-size: .95rem; letter-spacing: .02em; caret-color: var(--gold); }
.lg-inp input::placeholder { color: var(--txt-3); }
.lg-inp input:-webkit-autofill { -webkit-text-fill-color: var(--txt); -webkit-box-shadow: 0 0 0 40px #0a1120 inset; transition: background-color 9999s; }

.lg-eye { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--txt-3); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; transition: color .18s ease, background .18s ease; }
.lg-eye:hover { color: var(--gold); background: rgba(232,179,75,.08); }

.lg-error { display: none; margin-top: 12px; padding: 9px 13px; border-radius: 11px; font-size: .82rem; font-weight: 600; line-height: 1.35; color: #ffbcbc; background: rgba(179,69,63,.2); border: 1px solid rgba(255,107,107,.4); }
.lg-error.show { display: flex; align-items: center; gap: 8px; animation: lg-fade .25s both; }
.lg-error i { font-size: 1.1rem; color: #ff9b9b; flex: 0 0 auto; }
/* Bloqueo temporal: tarjeta en dos filas con chip de fecha/hora (tono ámbar "candado", NO rojo de error) */
.lg-error.lg-error-block {
  flex-direction: column; align-items: stretch; gap: 10px; text-align: left; padding: 13px 15px;
  color: #f4d9a8; background: linear-gradient(160deg, rgba(232,179,75,.14), rgba(232,179,75,.05));
  border: 1px solid rgba(232,179,75,.34); box-shadow: 0 0 22px rgba(232,179,75,.08) inset, 0 10px 26px rgba(0,0,0,.34);
}
.lg-err-head { display: flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 700; color: #ffe3ad; letter-spacing: .01em; }
.lg-err-head i { font-size: 1.28rem; color: var(--gold-bright, #f0c368); }
.lg-err-chip {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 9px; align-self: flex-start;
  padding: 6px 13px; border-radius: 999px; background: rgba(6,13,24,.55); border: 1px solid rgba(232,179,75,.3);
}
.lg-chip-lbl { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b79a5f; }
.lg-chip-val { display: inline-flex; align-items: center; gap: 5px; font-size: .92rem; font-weight: 700; color: #ffe7b4; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lg-chip-val i { font-size: 1.02rem; color: var(--gold-bright, #f0c368); }
.lg-err-foot { font-size: .76rem; font-weight: 500; color: #c9b489; opacity: .9; }
.lg-caps { display: none; align-items: center; gap: 6px; margin: 7px 0 0 2px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; color: var(--gold); }
.lg-caps.show { display: inline-flex; animation: lg-fade .2s both; }

.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.lg-check { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 500; color: var(--txt-2); cursor: pointer; letter-spacing: .02em; }
.lg-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.lg-box { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line); background: rgba(4,8,16,.65); display: inline-flex; align-items: center; justify-content: center; color: var(--btn-ink); font-size: 1rem; transition: all .16s ease; }
.lg-box i { opacity: 0; transform: scale(.4); transition: all .16s ease; }
.lg-check input:checked + .lg-box { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 14px var(--gold-glow); }
.lg-check input:checked + .lg-box i { opacity: 1; transform: scale(1); }
.lg-check input:focus-visible + .lg-box { box-shadow: 0 0 0 3px var(--gold-ring); }
.lg-forgot { font-size: .8rem; font-weight: 500; color: var(--cyan-dim); text-decoration: none; letter-spacing: .02em; transition: color .16s ease; }
.lg-forgot:hover { color: var(--gold); text-shadow: 0 0 12px var(--gold-glow); }

/* Botón: el ÚNICO bloque sólido oro */
.lg-btn {
  position: relative; width: 100%; height: 54px; margin-top: 12px; border: 1px solid var(--gold-deep); border-radius: 13px; cursor: pointer; overflow: hidden;
  font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 1.08rem; letter-spacing: .18em; text-transform: uppercase; color: var(--btn-ink);
  background: linear-gradient(180deg, #f3c766, #d99a2b);
  box-shadow: 0 8px 24px -8px rgba(232,179,75,.45), inset 0 1px 0 rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .14s ease, box-shadow .22s ease, filter .2s ease;
}
.lg-btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 14px 32px -8px rgba(232,179,75,.6); }
.lg-btn:active { transform: translateY(0) scale(.99); }
.lg-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
/* Deshabilitado (p.ej. "Guardar contraseña" hasta que sea fuerte + coincida): apagado, no dorado */
.lg-btn:disabled { cursor: not-allowed; color: var(--txt-3, #5d6f8c); background: linear-gradient(180deg, #26324c, #1b2438); border-color: rgba(120,150,200,.18); box-shadow: none; }
.lg-btn:disabled:hover { transform: none; filter: none; box-shadow: none; }
.lg-btn:disabled .lg-btn-scan { display: none; }
.lg-btn-ic { font-size: 1.35rem; transition: transform .18s ease; }
.lg-btn:hover .lg-btn-ic { transform: translateX(4px); }
.lg-btn-scan { position: absolute; top: 0; bottom: 0; left: -45%; width: 38%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-20deg); }
.lg-btn:hover .lg-btn-scan { animation: lg-sweep .75s ease; }
@keyframes lg-sweep { from { left: -45%; } to { left: 130%; } }
.lg-btn.is-loading { pointer-events: none; letter-spacing: .22em; }
.lg-btn.is-loading .lg-btn-ic { animation: lg-rot .8s linear infinite; }
@keyframes lg-rot { to { transform: rotate(360deg); } }
.lg-btn.is-loading::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(26,18,6,.9); animation: lg-prog 1.5s ease forwards; }
@keyframes lg-prog { to { width: 100%; } }

/* Pie */
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-dim); font-size: .7rem; letter-spacing: .05em; color: var(--txt-3); }
.lg-foot i { font-size: .9rem; margin-right: 4px; vertical-align: -1px; }
.lg-secure { color: #63d6a0; } .lg-secure i { color: #34d399; }
.sess-line { letter-spacing: .16em; }

/* ===== Responsive ===== */
@media (max-width: 560px) { .lg-card { padding: 32px 24px 20px; } .lg-title { font-size: 2.05rem; } .lg-foot { justify-content: center; text-align: center; } }

/* ===== Menos movimiento ===== */
@media (prefers-reduced-motion: reduce) {
  .lg-cine, .lg-grain, .lg-logo, .lg-logo img, .lg-logo-glow, .lg-logo-ring, .lg-live, .ops-dot, .rec-dot,
  .card-frame, .lg-card, .lg-title.done { animation: none !important; }
  .card-frame { background: linear-gradient(120deg, rgba(232,179,75,0), rgba(232,179,75,.4), rgba(232,179,75,0)); }
  .lg-logo { background: linear-gradient(135deg, var(--cyan), var(--gold-bright)) !important; }
  .ck::before { width: 26px !important; } .ck::after { height: 26px !important; } .ck, .ck::before, .ck::after { animation: none !important; }
  .lg-card, .lg-title, .lg-sub, .ops-bar, .lg-caption { opacity: 1 !important; transform: none !important; }
  .lg-title { transition: opacity .4s ease; letter-spacing: .18em; text-indent: .18em; }
  .lg-title.done { background: linear-gradient(105deg, var(--ivory), var(--gold-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

/* ============================================================================
   Segundo factor (app autenticadora / TOTP) — panel que reemplaza al formulario.
   ========================================================================== */
.lg-mfa { animation: lg-fade .4s ease both; }
.lg-mfa-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.lg-mfa-badge {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; color: var(--gold-bright);
  background: linear-gradient(160deg, rgba(63,224,255,.12), rgba(232,179,75,.14));
  border: 1px solid var(--gold-ring); box-shadow: 0 0 18px rgba(232,179,75,.18) inset;
}
.lg-mfa-title { font-size: 1.06rem; font-weight: 700; letter-spacing: .01em; color: var(--ivory, #eef2fb); margin: 0; }
.lg-mfa-sub { font-size: .8rem; color: var(--cyan-dim); margin: 3px 0 0; line-height: 1.4; }

.lg-enroll {
  background: rgba(10,18,32,.5); border: 1px solid var(--line-dim); border-radius: 12px;
  padding: 14px 16px 16px; margin-bottom: 16px;
}
.lg-enroll-steps { margin: 0 0 12px; padding-left: 18px; color: #b9c6dc; font-size: .82rem; line-height: 1.6; }
.lg-enroll-steps li::marker { color: var(--gold); font-weight: 700; }
.lg-enroll-apps { color: #8296b4; }
/* Tarjetas de apps autenticadoras (paso 1 del asistente OTP): logo real sobre teja
   blanca + botones a las tiendas oficiales, en el tema oscuro/dorado. */
.lg-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 8px; }
@media (max-width: 430px) { .lg-apps { grid-template-columns: 1fr; } }
.lg-app {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
  background: rgba(10,18,32,.5); border: 1px solid var(--line-dim); border-radius: 12px;
  padding: 11px 10px; transition: border-color .2s;
}
.lg-app:hover { border-color: var(--gold-ring); }
.lg-app-logo {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: #fff; border-radius: 11px; box-shadow: 0 5px 16px rgba(0,0,0,.4);
}
.lg-app-logo svg { width: 28px; height: 28px; display: block; }
.lg-app-name { font-size: .8rem; font-weight: 700; color: var(--ivory, #eef2fb); line-height: 1.2; }
.lg-app-dl { display: flex; gap: 8px; }
.lg-app-btn {
  display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600;
  color: var(--cyan); text-decoration: none; letter-spacing: .02em;
  background: rgba(4,7,14,.55); border: 1px solid var(--gold-ring); border-radius: 8px;
  padding: 5px 10px; transition: .2s;
}
.lg-app-btn:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(4,7,14,.85); }
.lg-app-btn i { font-size: .95rem; }
/* Vinculación del autenticador DENTRO de la pantalla de código del login (#lgOtpEnroll).
   Aparece solo cuando el servidor responde mode:"enroll". Reutiliza el mismo lenguaje
   visual que .lg-enroll del asistente para que no parezcan dos pantallas distintas. */
.lg-otp-enroll {
  background: rgba(10,18,32,.5); border: 1px solid var(--line-dim); border-radius: 12px;
  padding: 14px 16px 12px; margin: 4px 0 18px; text-align: center;
}
.lg-otp-enroll[hidden] { display: none; }
.lg-enroll-help { margin: 0; color: #b9c6dc; font-size: .82rem; line-height: 1.55; }
.lg-enroll-help b { color: var(--ivory, #eef2fb); font-weight: 700; }
/* Salida digna si la librería del QR no cargó: la clave de abajo sigue sirviendo. */
.lg-qr-fallback {
  display: grid; place-items: center; height: 100%; padding: 8px;
  color: #4a5568; font-size: .72rem; text-align: center; line-height: 1.4;
}
.lg-secret {
  /* Altura FIJA (reserva 2 líneas y centra el texto): la clave base32 wrapea a 1 o 2
     líneas según el ancho, y sin esto la pantalla del QR cambiaba de alto respecto a las
     demás. Con altura constante + QR pequeño, este paso mide igual que el resto siempre. */
  display: grid; place-items: center; width: 100%; min-height: 56px; text-align: center; cursor: pointer;
  font-family: "Rajdhani", monospace; font-weight: 700; font-size: .92rem; letter-spacing: .14em;
  color: var(--gold-bright); background: rgba(4,7,14,.6); border: 1px dashed var(--gold-ring);
  border-radius: 10px; padding: 6px 10px; margin: 0 0 8px; transition: .2s;
}
.lg-secret:hover { border-color: var(--gold); background: rgba(4,7,14,.8); }
.lg-secret.copied { color: #46e08f; border-color: #46e08f; }
.lg-secret.copied::after { content: " ✓ copiado"; font-size: .7rem; letter-spacing: .08em; }
.lg-otpauth {
  display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600;
  color: var(--cyan); text-decoration: none; letter-spacing: .04em;
}
.lg-otpauth:hover { color: var(--cyan-dim); text-decoration: underline; }
.lg-enroll-hint { font-size: .78rem; color: #8296b4; margin: 12px 0 0; line-height: 1.5; }

/* Input del código: dígitos grandes y espaciados */
#lgCode {
  text-align: center; letter-spacing: .5em; font-weight: 700; font-size: 1.2rem;
  font-family: "Rajdhani", monospace; padding-left: 12px;
}
#lgCode::placeholder { letter-spacing: .5em; color: rgba(130,150,180,.4); }

.lg-mfa-back {
  display: block; width: 100%; margin-top: 12px; background: none; border: none; cursor: pointer;
  color: var(--cyan-dim); font-size: .78rem; letter-spacing: .06em; padding: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color .2s;
}
.lg-mfa-back:hover { color: var(--cyan); }

/* ===== Selector de método MFA (Validación de identidad) ===== */
/* Altura ESTANDARIZADA: todos los pasos ocupan al menos lo mismo y centran su contenido
   en vertical, para que el card no salte de tamaño al pasar de un paso a otro. Los pasos
   con más contenido (lista de métodos, apps) crecen por encima de este mínimo. */
.lg-step {
  animation: lg-fade .35s ease both;
  min-height: 420px; display: flex; flex-direction: column; justify-content: center;
}
/* CRÍTICO: el display:flex de arriba anularía el atributo `hidden` (un display explícito
   gana al [hidden]{display:none} del navegador) y se mostrarían TODOS los pasos apilados.
   Esta regla restaura el ocultado. */
.lg-step[hidden] { display: none; }

/* Encabezado como TÍTULO DE SECCIÓN (no como una tarjeta más): centrado, eyebrow + regla */
.lg-choose-head { text-align: center; margin: 2px 0 11px; }
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: .82rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold-bright);
}
.lg-eyebrow i { font-size: 1.05rem; color: var(--gold); }
.lg-choose-sub {
  margin: 7px 0 0; font-size: .8rem; color: var(--txt-2, #93a4bd); letter-spacing: .01em;
}
.lg-choose-head::after {
  content: ""; display: block; width: 74px; height: 2px; margin: 9px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}

.lg-methods { display: flex; flex-direction: column; gap: 9px; margin: 0 0 4px; }
.lg-method {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  cursor: pointer; padding: 11px 14px; border-radius: 13px; overflow: hidden;
  background: linear-gradient(150deg, rgba(16,26,46,.72), rgba(9,15,28,.72));
  border: 1px solid var(--line-dim);
  transition: transform .28s cubic-bezier(.2,.8,.25,1), box-shadow .28s ease, border-color .2s ease, background .28s ease;
}
/* Filo cian→oro a la izquierda que crece al pasar el cursor (marca la opción activa) */
.lg-method::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 0; width: 3px; transform: translateY(-50%);
  background: linear-gradient(180deg, var(--cyan), var(--gold-bright)); border-radius: 3px;
  transition: height .28s cubic-bezier(.2,.8,.25,1);
}
/* Barrido de luz diagonal al pasar el cursor */
.lg-method::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 48%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,241,205,.12) 45%, rgba(63,224,255,.10) 55%, transparent);
  transform: skewX(-16deg); opacity: 0;
}
.lg-method:hover {
  border-color: var(--gold-ring); background: linear-gradient(150deg, rgba(26,40,66,.92), rgba(13,22,40,.92));
  transform: translateY(-3px) scale(1.012); box-shadow: 0 16px 34px rgba(0,0,0,.46), 0 0 0 1px rgba(232,179,75,.1);
}
.lg-method:hover::before { height: 62%; }
.lg-method:hover::after { animation: lg-shine .75s ease; }
@keyframes lg-shine { 0% { left: -70%; opacity: 0; } 18% { opacity: 1; } 100% { left: 135%; opacity: 0; } }
.lg-method:active { transform: translateY(-1px) scale(.995); transition-duration: .06s; }
.lg-method-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 20px; color: var(--gold-bright);
  background: linear-gradient(160deg, rgba(63,224,255,.16), rgba(232,179,75,.18));
  border: 1px solid var(--gold-ring);
  transition: transform .28s cubic-bezier(.2,.8,.25,1), box-shadow .28s ease, color .2s;
}
.lg-method:hover .lg-method-ic {
  box-shadow: 0 0 20px rgba(232,179,75,.4) inset, 0 0 14px rgba(63,224,255,.22);
  transform: scale(1.07) rotate(-3deg); color: #fff;
}
.lg-method-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-method-tx b { color: var(--ivory, #eef2fb); font-size: .92rem; font-weight: 700; letter-spacing: .01em; transition: color .2s; }
.lg-method:hover .lg-method-tx b { color: #fff; }
.lg-method-tx small { color: var(--txt-2, #93a4bd); font-size: .73rem; line-height: 1.32; }
.lg-method-go {
  flex: 0 0 auto; font-size: 24px; color: var(--cyan-dim);
  transition: transform .28s cubic-bezier(.2,.8,.25,1), color .2s;
}
.lg-method:hover .lg-method-go { color: var(--gold-bright); transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) {
  .lg-method, .lg-method-ic, .lg-method-go, .lg-method::before { transition: none; }
  .lg-method:hover { transform: none; }
  .lg-method:hover::after { animation: none; }
}

/* ===== Panel OTP (código de la app): centrado, casillas por dígito, píldora de tiempo ===== */
.lg-otp { text-align: center; animation: lg-fade .35s ease both; }
.lg-otp-badge {
  width: 52px; height: 52px; margin: 0 auto 11px; border-radius: 15px; display: grid; place-items: center;
  font-size: 25px; color: var(--gold-bright);
  background: linear-gradient(160deg, rgba(63,224,255,.15), rgba(232,179,75,.2));
  border: 1px solid var(--gold-ring); box-shadow: 0 0 24px rgba(232,179,75,.18) inset, 0 6px 18px rgba(0,0,0,.35);
}
.lg-otp-title { font-size: 1.2rem; font-weight: 700; color: var(--ivory, #eef2fb); letter-spacing: .01em; margin: 0; }
.lg-otp-sub { font-size: .82rem; color: var(--txt-2, #93a4bd); line-height: 1.45; max-width: 350px; margin: 6px auto 0; }

/* Píldora "Código expira en MM:SS" (sincronizada con la ventana de 30 s del autenticador) */
.lg-otp-timer {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0; padding: 6px 15px; border-radius: 999px;
  font-family: "Rajdhani", sans-serif; font-size: .84rem; letter-spacing: .03em; color: var(--cyan);
  background: rgba(63,224,255,.07); border: 1px solid rgba(63,224,255,.22);
}
.lg-otp-timer i { font-size: 1.1rem; }
.lg-otp-timer b { color: var(--cyan); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.lg-otp-timer.soon { color: var(--gold-bright); background: rgba(232,179,75,.09); border-color: rgba(232,179,75,.32);
  animation: totpPulse 1s ease-in-out infinite; }
.lg-otp-timer.soon i, .lg-otp-timer.soon b { color: var(--gold-bright); }
/* Expirado: el código ya no sirve -> rojo (correo/Telegram/recuperación) */
.lg-otp-timer.expired { color: #ff9b9b; background: rgba(255,93,93,.1); border-color: rgba(255,93,93,.42); animation: none; }
.lg-otp-timer.expired i, .lg-otp-timer.expired b { color: #ff9b9b; }
@keyframes totpPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }

/* 6 casillas de dígito */
.lg-otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 2px 0 4px; }
.lg-otp-cell {
  width: 44px; height: 52px; text-align: center; font-size: 1.4rem; font-weight: 700;
  font-family: "Rajdhani", monospace; color: var(--ivory, #eef2fb); caret-color: var(--gold-bright);
  background: rgba(31,46,73,.82); border: 1.6px solid rgba(126,156,206,.5); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .12s ease;
}
.lg-otp-cell::placeholder { color: rgba(150,170,205,.35); }
.lg-otp-cell:hover { border-color: rgba(150,180,225,.72); background: rgba(38,55,86,.9); }
.lg-otp-cell:focus {
  outline: none; border-color: var(--gold-bright); background: rgba(40,56,86,.95); transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(232,179,75,.2), 0 0 18px rgba(232,179,75,.28);
}
.lg-otp-cell.filled { border-color: rgba(63,224,255,.6); color: var(--gold-bright); background: rgba(28,44,72,.92); }
.lg-otp-boxes.shake { animation: otpShake .38s ease; }
@keyframes otpShake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-7px)} 40%,80%{transform:translateX(7px)} }
.lg-btn-ic-l { font-size: 1.3rem; }
@media (max-width: 430px) { .lg-otp-cell { width: 42px; height: 52px; font-size: 1.35rem; } .lg-otp-boxes { gap: 7px; } }
@media (prefers-reduced-motion: reduce) { .lg-otp-timer.soon, .lg-otp-boxes.shake { animation: none; } }

/* ===== Panel "Código por correo" (reusa .lg-otp): matiz cian + enlace de reenvío ===== */
.lg-otp-badge-mail { color: var(--cyan); background: linear-gradient(160deg, rgba(63,224,255,.2), rgba(63,224,255,.06)); border-color: rgba(63,224,255,.28); box-shadow: 0 0 22px rgba(63,224,255,.14) inset, 0 6px 18px rgba(0,0,0,.35); }
/* Telegram: azul de marca (endpoints reales del logo #2AABEE->#229ED9), mismo formato que el correo */
.lg-otp-badge-tg { color: #2aabee; background: linear-gradient(160deg, rgba(42,171,238,.22), rgba(34,158,217,.06)); border-color: rgba(42,171,238,.32); box-shadow: 0 0 22px rgba(42,171,238,.16) inset, 0 6px 18px rgba(0,0,0,.35); }
/* Reenvío de código: pregunta tenue + PÍLDORA con icono (correo, Telegram y recuperación).
   Enfriamiento -> píldora apagada "Reenviar en Ns"; lista -> píldora cian accionable. */
.lg-resend { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 16px 0 2px; font-size: .78rem; color: var(--txt-2, #93a4bd); text-align: center; }
.lg-resend-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px;
  font: inherit; font-weight: 700; letter-spacing: .02em; cursor: pointer; color: var(--cyan);
  background: rgba(63,224,255,.08); border: 1px solid rgba(63,224,255,.28);
  transition: color .18s, background .18s, border-color .18s, transform .12s ease, box-shadow .18s ease;
}
.lg-resend-btn i { font-size: 1.05rem; transition: transform .35s cubic-bezier(.2,.8,.25,1); }
.lg-resend-btn:hover:not(:disabled) { background: rgba(63,224,255,.14); border-color: rgba(63,224,255,.5); transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(63,224,255,.55); }
.lg-resend-btn:hover:not(:disabled) i { transform: rotate(-180deg); }
.lg-resend-btn:disabled { cursor: default; font-weight: 600; color: var(--txt-3, #5d6f8c); background: rgba(120,150,200,.06); border-color: rgba(120,150,200,.16); }
.lg-resend-btn span { font-variant-numeric: tabular-nums; }   /* cuenta atrás (correo, Telegram, recuperación) */
@media (prefers-reduced-motion: reduce) { .lg-resend-btn, .lg-resend-btn i { transition: none; } }

/* ============================ RECUPERACIÓN DE CONTRASEÑA ============================ */
/* Campos alineados a la izquierda dentro del panel centrado .lg-otp */
.lg-rec-field { text-align: left; margin-top: 16px; }
/* Confirmar contraseña: estado "coincide" (verde, mismo patrón que focus-within) */
.lg-inp.is-match { border-color: #46e08f; box-shadow: 0 0 0 3px rgba(70,224,143,.14); }
.lg-inp.is-match > i { color: #46e08f; }

/* ===== Stepper de 3 nodos (dirigido por data-step) ===== */
.lg-rec-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 2px auto 18px; padding: 0; list-style: none; max-width: 260px; }
.lg-rec-steps[hidden] { display: none; }   /* display:flex pisa el [hidden] del navegador; forzar oculto */
.lg-rec-step { position: relative; display: flex; align-items: center; flex: 0 0 auto; }
.lg-rec-step + .lg-rec-step { flex: 1 1 auto; }
.lg-rec-step + .lg-rec-step::before {           /* conector a la izquierda del paso 2 y 3 */
  content: ""; flex: 1 1 auto; height: 2px; min-width: 34px; margin: 0 7px; border-radius: 2px;
  background-color: var(--line-dim); background-image: linear-gradient(90deg, #46e08f, var(--gold-bright));
  background-repeat: no-repeat; background-size: 0% 100%; transition: background-size .45s cubic-bezier(.2,.8,.25,1);
}
.lg-rec-node {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(4,8,16,.65); border: 1.6px solid var(--line); transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.lg-rec-num { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: .95rem; color: var(--txt-3); transition: color .25s ease, opacity .2s ease; }
.lg-rec-tick { position: absolute; font-size: 1.15rem; color: #06110b; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .2s ease; }
/* paso ACTUAL (oro, pulso) */
.lg-rec-steps[data-step="1"] .lg-rec-step:nth-child(1) .lg-rec-node,
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(2) .lg-rec-node,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(3) .lg-rec-node {
  border-color: var(--gold); background: rgba(3,6,12,.8);
  box-shadow: 0 0 0 3px var(--gold-ring), 0 0 16px -3px var(--gold-glow); animation: recNodePulse 2s ease-in-out infinite;
}
.lg-rec-steps[data-step="1"] .lg-rec-step:nth-child(1) .lg-rec-num,
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(2) .lg-rec-num,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(3) .lg-rec-num { color: var(--gold-bright); }
/* pasos COMPLETADOS (verde + check) */
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(1) .lg-rec-node,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(1) .lg-rec-node,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(2) .lg-rec-node {
  border-color: #46e08f; background: linear-gradient(160deg, #52e89a, #29b774); box-shadow: 0 0 14px rgba(70,224,143,.4);
}
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(1) .lg-rec-num,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(1) .lg-rec-num,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(2) .lg-rec-num { opacity: 0; }
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(1) .lg-rec-tick,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(1) .lg-rec-tick,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(2) .lg-rec-tick { opacity: 1; transform: scale(1); }
/* conectores que se llenan */
.lg-rec-steps[data-step="2"] .lg-rec-step:nth-child(2)::before,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(2)::before,
.lg-rec-steps[data-step="3"] .lg-rec-step:nth-child(3)::before { background-size: 100% 100%; }
@keyframes recNodePulse {
  0%,100% { box-shadow: 0 0 0 3px var(--gold-ring), 0 0 16px -3px var(--gold-glow); }
  50% { box-shadow: 0 0 0 5px rgba(232,179,75,.10), 0 0 22px -3px var(--gold-glow); }
}

/* ===== Medidor de fuerza (4 segmentos, dirigido por data-level) ===== */
.lg-strength { margin: 11px 2px 2px; text-align: left; }
.lg-strength-track { display: flex; gap: 6px; }
.lg-strength-seg { flex: 1 1 0; height: 5px; border-radius: 3px; background: var(--line-dim); transition: background .25s ease, box-shadow .25s ease; }
.lg-strength-lbl { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); transition: color .25s ease; }
.lg-strength-lbl i { font-size: .95rem; }
.lg-strength[data-level="1"] .lg-strength-seg:nth-child(1) { background: var(--blood); box-shadow: 0 0 10px rgba(255,93,93,.45); }
.lg-strength[data-level="1"] .lg-strength-lbl { color: var(--blood); }
.lg-strength[data-level="2"] .lg-strength-seg:nth-child(-n+2) { background: #e0973a; box-shadow: 0 0 10px rgba(224,151,58,.40); }
.lg-strength[data-level="2"] .lg-strength-lbl { color: #e6a24a; }
.lg-strength[data-level="3"] .lg-strength-seg:nth-child(-n+3) { background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-glow); }
.lg-strength[data-level="3"] .lg-strength-lbl { color: var(--gold-bright); }
.lg-strength[data-level="4"] .lg-strength-seg { background: #46e08f; box-shadow: 0 0 12px rgba(70,224,143,.5); }
.lg-strength[data-level="4"] .lg-strength-lbl { color: #46e08f; }
@media (prefers-reduced-motion: reduce) {
  .lg-rec-node { animation: none !important; }
  .lg-rec-step + .lg-rec-step::before, .lg-rec-tick, .lg-rec-num, .lg-strength-seg, .lg-strength-lbl { transition: none; }
}

/* ===== Onboarding (primer ingreso): chip de estado del método + placa del QR ===== */
.lg-status {
  margin-left: auto; flex: 0 0 auto; align-self: center; display: inline-flex; align-items: center; gap: 4px;
  font: 700 .64rem/1 "Rajdhani", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.lg-status.is-pending { color: #e6a24a; border-color: rgba(224,151,58,.4); background: rgba(224,151,58,.08); }
.lg-status.is-done { color: #46e08f; border-color: rgba(70,224,143,.4); background: rgba(70,224,143,.08); }
/* Método YA ACTIVADO = bloqueado: no responde al cursor, atenuado, solo informa. */
.lg-method.is-done, .lg-method:disabled { cursor: default; opacity: .72; }
.lg-method.is-done:hover, .lg-method:disabled:hover {
  transform: none; box-shadow: none; border-color: var(--line-dim);
  background: linear-gradient(150deg, rgba(16,26,46,.72), rgba(9,15,28,.72));
}
.lg-method.is-done:hover::before { height: 0; }
.lg-method.is-done:hover::after { animation: none; }
.lg-method.is-done .lg-method-ic { color: #7f93b4; background: rgba(20,30,50,.55); border-color: var(--line-dim); box-shadow: none; }
/* Placa CLARA fija para el QR (alto contraste para escanear), aun en el tema oscuro */
.lg-qr {
  width: 96px; height: 96px; margin: 8px auto 8px; padding: 8px; border-radius: 12px;
  background: #fff; border: 1px solid var(--gold-ring);
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 3px rgba(232,179,75,.10);
}
.lg-qr svg, .lg-qr img { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .lg-qr { box-shadow: none; } }
