/* Login: panel de marca con maqueta animada + formulario. Plano, sin brillos ni halos. Todo en rem (escala con el tamaño de la interfaz). */
.lg { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); min-height: 100vh; transition: opacity .3s ease; }
.lg.leaving { opacity: 0; }

/* ---------- panel de marca ---------- */
.lg-brand { position: relative; background: #0a0a0a; color: #fff; padding: 2.25rem 3.25rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; overflow: hidden;
  background-image: radial-gradient(#1c1c1c 1px, transparent 1px); background-size: 1.5rem 1.5rem; }
.lg-logo, .lg-mobile-logo { display: flex; align-items: center; gap: 0.75rem; }
.lg-mark { width: 2.25rem; height: 2.25rem; border-radius: 0.625rem; background: #fff; display: grid; place-items: center; flex: none; animation: lgPop .5s cubic-bezier(.2, .8, .2, 1) both; }
.lg-mark svg { width: 100%; height: 100%; fill: none; stroke: #0a0a0a; stroke-linecap: round; stroke-linejoin: round; }
.lg-mark .d1 { stroke-width: 6; } .lg-mark .d2 { stroke: #737373; stroke-width: 4.5; stroke-linecap: butt; }
.lg-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lgDraw .7s cubic-bezier(.4, 0, .2, 1) forwards; }
.lg-mark .d2 { animation-delay: .1s; } .lg-mark .d1 { animation-delay: .3s; }
.lg-wordmark { font-weight: 700; letter-spacing: .16em; font-size: 0.9375rem; line-height: 1.1; }
.lg-wordmark small { display: block; font-weight: 500; letter-spacing: .14em; font-size: 0.625rem; color: #a3a3a3; text-transform: uppercase; margin-top: 2px; }

.lg-hero { max-width: 34rem; }
.lg-kicker { margin: 0 0 0.875rem; font-size: 0.75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #a3a3a3; animation: lgUp .6s .1s both; }
.lg-hero h2 { text-wrap: balance; margin: 0 0 0.875rem; font-size: 2.375rem; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.lg-hero h2 .w { display: inline-block; animation: lgWord .6s cubic-bezier(.2, .8, .2, 1) both; }
.lg-lead { margin: 0 0 1.75rem; color: #b5b5b5; line-height: 1.6; font-size: 0.9375rem; max-width: 30rem; animation: lgUp .6s .5s both; }

/* maqueta del sistema */
.lg-demo { position: relative; max-width: 30rem; animation: lgUp .7s .65s both; }
.lg-win { border: 1px solid #2a2a2a; border-radius: 0.875rem; background: #111; overflow: hidden; }
.lg-win-bar { display: flex; align-items: center; gap: 0.3125rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid #222; font-size: 0.6875rem; color: #8a8a8a; }
.lg-win-bar i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #333; }
.lg-win-bar span { margin-left: 0.5rem; }
.lg-win-body { padding: 0.75rem; display: grid; gap: 0.625rem; }
.lg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.lg-stats div { border: 1px solid #242424; border-radius: 0.5rem; padding: 0.5rem 0.625rem; background: #141414; }
.lg-stats span { display: block; font-size: 0.625rem; color: #8a8a8a; }
.lg-stats b { display: block; font-size: 1.125rem; font-variant-numeric: tabular-nums; margin-top: 0.125rem; }
.lg-chart { display: flex; align-items: flex-end; gap: 0.375rem; height: 4rem; padding: 0.375rem 0.25rem 0; border: 1px solid #242424; border-radius: 0.5rem; background: #141414; }
.lg-chart i { flex: 1; height: var(--h); background: #e5e5e5; border-radius: 3px 3px 0 0; transform-origin: bottom; animation: lgGrow .7s cubic-bezier(.2, .8, .2, 1) both; transition: height .8s ease; }
.lg-chart i:nth-child(even) { background: #737373; }
.lg-chart i:nth-child(1) { animation-delay: .9s; } .lg-chart i:nth-child(2) { animation-delay: .95s; } .lg-chart i:nth-child(3) { animation-delay: 1s; } .lg-chart i:nth-child(4) { animation-delay: 1.05s; }
.lg-chart i:nth-child(5) { animation-delay: 1.1s; } .lg-chart i:nth-child(6) { animation-delay: 1.15s; } .lg-chart i:nth-child(7) { animation-delay: 1.2s; }
.lg-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.lg-orders li { display: flex; align-items: center; gap: 0.625rem; padding: 0.4375rem 0.625rem; border: 1px solid #242424; border-radius: 0.5rem; background: #141414; font-size: 0.75rem; transition: border-color .3s, background .3s; }
.lg-orders li.hot { border-color: #6b6b6b; background: #1a1a1a; }
.lg-orders .ot { font-weight: 600; font-variant-numeric: tabular-nums; }
.lg-orders .pl { font: 600 0.6875rem monospace; border: 1px solid #444; border-radius: 0.25rem; padding: 0.0625rem 0.375rem; color: #d4d4d4; }
.lg-orders .st { margin-left: auto; font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: #262626; color: #d4d4d4; transition: background .3s, color .3s; }
.lg-orders li.hot .st { background: #fff; color: #0a0a0a; }
.lg-chip { position: absolute; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid #333; border-radius: 0.625rem; background: #0a0a0a; font-size: 0.75rem; color: #e5e5e5; opacity: 0; transform: translateY(0.5rem); transition: opacity .4s, transform .4s; white-space: nowrap; }
.lg-chip.on { opacity: 1; transform: none; }
.lg-chip b { font-weight: 600; }
.lg-chip-a { right: -0.5rem; top: -1.125rem; }
.lg-chip-b { left: -0.5rem; bottom: -1rem; }

.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.lg-points { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.75rem; color: #b5b5b5; animation: lgUp .6s 1.1s both; }
.lg-points li { display: flex; align-items: center; gap: 0.4375rem; }
.lg-points .ico svg { width: 0.9375rem; height: 0.9375rem; }
.lg-copy { font-size: 0.75rem; color: #737373; }

/* ---------- formulario ---------- */
.lg-panel { position: relative; display: grid; place-items: center; padding: 2rem 1.5rem; background: var(--surface); }
.lg-theme { position: absolute; top: 1rem; right: 1rem; }
.lg-form { width: 100%; max-width: 23.5rem; display: flex; flex-direction: column; gap: 1.125rem; }
.lg-form > * { animation: lgUp .5s both; }
.lg-form > :nth-child(2) { animation-delay: .05s; } .lg-form > :nth-child(4) { animation-delay: .12s; } .lg-form > :nth-child(5) { animation-delay: .18s; }
.lg-form > :nth-child(6) { animation-delay: .24s; } .lg-form > :nth-child(7) { animation-delay: .3s; } .lg-form > :nth-child(8) { animation-delay: .36s; }
.lg-mobile-logo { display: none; color: var(--ink); }
.lg-mobile-logo .lg-mark { background: #0a0a0a; }
.lg-mobile-logo .lg-mark svg { stroke: #fff; } .lg-mobile-logo .lg-mark .d2 { stroke: #a3a3a3; }
.lg-mobile-logo .lg-wordmark small { color: var(--ink-3); }
.lg-head h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -.025em; }
.lg-head p { margin: 0.375rem 0 0; color: var(--ink-2); font-size: 0.875rem; }
.lg-error { padding: 0.625rem 0.875rem; border: 1px solid var(--bad); border-left-width: 3px; border-radius: 0.5rem; background: var(--bad-soft); color: var(--bad); font-size: 0.8125rem; }
.lg-field { display: flex; flex-direction: column; gap: 0.375rem; }
.lg-field > span:first-child { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; }
.lg-caps { font-style: normal; font-size: 0.75rem; color: var(--warn); font-weight: 500; }
.lg-input { display: flex; align-items: center; gap: 0.5rem; height: 2.75rem; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 0.625rem; background: var(--surface); transition: border-color .12s; }
.lg-input:focus-within { border-color: var(--ink); outline: 1px solid var(--ink); }
.lg-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.9375rem; color: var(--ink); height: 100%; }
.lg-input input::placeholder { color: var(--ink-3); }
.lg-ico { color: var(--ink-3); display: grid; place-items: center; }
.lg-input:focus-within .lg-ico { color: var(--ink); }
.lg-eye { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0.25rem; border-radius: 0.375rem; display: grid; place-items: center; }
.lg-eye:hover { color: var(--ink); }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8125rem; }
.lg-row a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.lg-row a:hover { color: var(--ink); }
.lg-switch { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--ink-2); user-select: none; }
.lg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.lg-track { width: 2rem; height: 1.125rem; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.lg-track i { position: absolute; top: 2px; left: 2px; width: calc(1.125rem - 4px); height: calc(1.125rem - 4px); border-radius: 50%; background: #fff; transition: transform .15s; }
.lg-switch input:checked + .lg-track { background: var(--ink); }
.lg-switch input:checked + .lg-track i { transform: translateX(0.875rem); background: var(--surface); }
.lg-switch input:focus-visible + .lg-track { outline: 2px solid var(--ink); outline-offset: 2px; }
.lg-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.625rem; height: 2.875rem; border: 0; border-radius: 0.625rem; background: var(--ink); color: var(--bg); font: 600 0.9375rem var(--font); cursor: pointer; transition: transform .12s, opacity .12s; }
.lg-btn:hover { opacity: .9; }
.lg-btn:active { transform: translateY(1px); }
.lg-btn:disabled { cursor: default; }
.lg-btn-arrow { display: grid; transition: transform .15s; }
.lg-btn:hover .lg-btn-arrow { transform: translateX(3px); }
.lg-btn.loading .lg-btn-text, .lg-btn.loading .lg-btn-arrow, .lg-btn.done .lg-btn-text, .lg-btn.done .lg-btn-arrow { visibility: hidden; }
.lg-btn.loading::after { content: ''; position: absolute; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: lgSpin .7s linear infinite; }
.lg-btn.done::after { content: '✓'; position: absolute; font-size: 1.125rem; animation: lgPop .3s both; }
.lg-secure { display: flex; align-items: center; justify-content: center; gap: 0.4375rem; margin: 0; font-size: 0.75rem; color: var(--ink-3); }
.lg-help { margin: 0; text-align: center; font-size: 0.8125rem; color: var(--ink-2); }
.lg-help a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lg-form.shake { animation: lgShake .45s; }

@keyframes lgUp { from { opacity: 0; transform: translateY(0.875rem); } to { opacity: 1; transform: none; } }
@keyframes lgWord { from { opacity: 0; transform: translateY(0.55em); } to { opacity: 1; transform: none; } }
@keyframes lgPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes lgDraw { to { stroke-dashoffset: 0; } }
@keyframes lgGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lgSpin { to { transform: rotate(360deg); } }
@keyframes lgShake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* pantallas medianas: se achican los espacios del panel de marca */
@media (max-width: 1180px) { .lg-brand { padding: 2rem 2.25rem; } .lg-hero h2 { font-size: 2rem; } .lg-chip-a { right: 0; } .lg-chip-b { left: 0; } }
/* celular y tablet: queda el formulario con el logo arriba (la presentación se oculta) */
@media (max-width: 900px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .lg-brand { display: none; }
  .lg-panel { align-items: start; padding-top: 4rem; }
  .lg-mobile-logo { display: flex; }
  .lg-head h1 { font-size: 1.5rem; }
}
@media (max-width: 480px) { .lg-input input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .lg *, .lg *::before, .lg *::after { animation: none !important; transition: none !important; }
  .lg-mark path { stroke-dashoffset: 0; }
  .lg-chip { opacity: 1; transform: none; }
}
html[data-motion='reducido'] .lg *, html[data-motion='reducido'] .lg *::before { animation: none !important; transition: none !important; }
html[data-motion='reducido'] .lg-mark path { stroke-dashoffset: 0; }
