/* ================================================================
   AppVDN — Login Premium Cinematográfico  ·  login.css
   Standalone (login.html no hereda layout). Usa tokens --tk-* del
   tenant inyectados inline + ds.css ya cargado. Mobile-first.
   ================================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface-body, #0f0f1a);
  color: var(--text-primary, #f1f5f9);
}

.lx {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 100vh;
}
@media (max-width: 980px) { .lx { grid-template-columns: 1fr; } }

/* ── HERO CINEMATOGRÁFICO (izquierda) ───────────────────────── */

.lx-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4.2rem);
  color: #fff;
  background:
    var(--tk-gradient-hero,
      linear-gradient(135deg, #1e1b4b 0%, #4f46e5 45%, #6d28d9 100%));
  isolation: isolate;
}
.lx-hero.has-img::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--lx-hero-img);
  background-size: cover; background-position: center;
  opacity: .32;
}
.lx-hero::after {
  /* overlay cinematográfico + textura de ruido sutil */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.16) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.38) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

/* Aurora mesh (Linear/Vercel-style) — reemplaza los círculos difuminados.
   Blobs grandes, suaves, en tonos de marca, con blend screen y deriva lenta. */
.lx-shape {
  position: absolute; z-index: -1; pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: .55;
  will-change: transform;
  animation: aurora 22s ease-in-out infinite;
}
.lx-shape.s1 {
  width: 540px; height: 540px; top: -180px; right: -140px;
  background: radial-gradient(circle at 30% 30%,
    var(--tk-primary, #6366f1) 0%, transparent 70%);
}
.lx-shape.s2 {
  width: 440px; height: 440px; bottom: -160px; left: -120px;
  background: radial-gradient(circle at 60% 40%,
    var(--tk-accent, #7c3aed) 0%, transparent 70%);
  opacity: .5; animation-delay: -7s; animation-duration: 26s;
}
.lx-shape.s3 {
  width: 300px; height: 300px; top: 42%; left: 55%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--tk-primary, #6366f1) 60%, #ffffff) 0%, transparent 70%);
  opacity: .35; animation-delay: -13s; animation-duration: 30s;
}
@keyframes aurora {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  33%     { transform: translate3d(28px,-34px,0) scale(1.12); }
  66%     { transform: translate3d(-22px,18px,0) scale(.94); }
}

.lx-brand { display: flex; align-items: center; gap: .8rem;
  position: relative; z-index: 1; }
.lx-brand img { height: 46px; max-width: 190px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.lx-brand .lx-mono {
  width: 52px; height: 52px; border-radius: 15px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.25rem;
  color: #fff;
}
.lx-brand .lx-bname { font-family: 'Outfit',sans-serif; font-weight: 700;
  font-size: 1.15rem; }

.lx-hero-center { position: relative; z-index: 1; max-width: 30ch; }
.lx-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  padding: .4rem .8rem; border-radius: 99px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  margin-bottom: 1.4rem;
}
.lx-eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.lx-hero h1 {
  font-family: 'Outfit','Inter',sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700;
  line-height: 1.12; margin: 0 0 1rem;
  letter-spacing: -.02em;
}
.lx-hero .lx-slogan {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: rgba(255,255,255,.86); line-height: 1.6; margin: 0;
  max-width: 42ch;
}

.lx-feats { position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: .6rem; }
.lx-feat {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.9);
  padding: .55rem .85rem; border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(6px);
}
.lx-feat i { font-size: .95rem; }

/* ── PANEL DE LOGIN (derecha) ───────────────────────────────── */

.lx-panel {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--surface-body, #0f0f1a);
}
.lx-theme {
  position: absolute; top: 1.3rem; right: 1.5rem;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border-default);
  background: var(--surface-card); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .95rem; z-index: 5;
}
.lx-theme:hover { color: var(--tk-primary); }

.lx-card {
  width: 100%; max-width: 410px;
  animation: lx-in .55s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes lx-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.lx-card .lx-logo-m {
  display: none; margin-bottom: 1.6rem;
}
.lx-card .lx-logo-m img { height: 44px; object-fit: contain; }
.lx-card .lx-logo-m .lx-mono {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--tk-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.2rem;
}

.lx-card h2 {
  font-family: 'Outfit','Inter',sans-serif;
  font-size: 1.6rem; font-weight: 700; margin: 0 0 .4rem;
  color: var(--text-primary);
}
.lx-card .lx-lead { font-size: .92rem; color: var(--text-muted);
  margin: 0 0 1.8rem; }

.lx-alert {
  display: flex; align-items: center; gap: .55rem;
  font-size: .85rem; padding: .8rem 1rem; border-radius: 12px;
  margin-bottom: 1.1rem;
}
.lx-alert.err { background: var(--color-danger-subtle,rgba(248,113,113,.12));
  color: var(--color-danger,#f87171); }
.lx-alert.info { background: var(--color-info-subtle,rgba(56,189,248,.12));
  color: var(--color-info,#38bdf8); }
.lx-alert.ok { background: var(--color-success-subtle,rgba(16,185,129,.12));
  color: var(--color-success,#10b981); }

/* Floating-label fields */
.lx-field { position: relative; margin-bottom: 1.15rem; }
.lx-field input {
  width: 100%; height: 56px;
  padding: 1.35rem 2.8rem .55rem 1rem;
  font-size: .95rem;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1.5px solid var(--border-default);
  border-radius: 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease,
              background .18s ease;
}
.lx-field input:focus {
  border-color: var(--tk-primary);
  box-shadow: 0 0 0 4px var(--tk-ring, rgba(99,102,241,.32));
}
.lx-field label {
  position: absolute; left: 1rem; top: 1rem;
  font-size: .95rem; color: var(--text-muted);
  pointer-events: none;
  transition: all .16s ease; transform-origin: left;
}
.lx-field input:focus + label,
.lx-field input:not(:placeholder-shown) + label {
  top: .5rem; font-size: .7rem; font-weight: 600;
  color: var(--tk-primary); letter-spacing: .02em;
}
.lx-field .lx-ic {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem;
  background: none; border: 0; cursor: default; padding: 0;
}
.lx-field button.lx-ic { cursor: pointer; }
.lx-field button.lx-ic:hover { color: var(--tk-primary); }

.lx-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: -.2rem 0 1.4rem;
}
.lx-remember { display: flex; align-items: center; gap: .5rem;
  font-size: .83rem; color: var(--text-secondary); cursor: pointer;
  user-select: none; }
.lx-remember input { width: 16px; height: 16px; accent-color: var(--tk-primary);
  cursor: pointer; }
.lx-link { font-size: .83rem; color: var(--tk-primary);
  text-decoration: none; font-weight: 600; }
.lx-link:hover { text-decoration: underline; }

.lx-submit {
  width: 100%; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Outfit','Inter',sans-serif;
  font-size: .98rem; font-weight: 600; color: #fff;
  background: var(--tk-gradient);
  border: 0; border-radius: 13px; cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: 0 12px 30px var(--tk-glow, rgba(99,102,241,.4));
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.lx-submit:hover { transform: translateY(-2px); filter: brightness(1.06);
  box-shadow: 0 16px 40px var(--tk-glow, rgba(99,102,241,.5)); }
.lx-submit:active { transform: translateY(0); }
.lx-submit:disabled { opacity: .8; cursor: progress; }
.lx-submit .spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
.lx-submit.loading .lx-txt { display: none; }
.lx-submit.loading .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.lx-foot {
  margin-top: 2rem; text-align: center;
  font-size: .76rem; color: var(--text-muted);
}
.lx-foot .lx-pw {
  display: inline-flex; align-items: center; gap: .35rem;
  opacity: .8;
}

/* ── V2 · PULIDO PREMIUM ────────────────────────────────────── */

/* Autofill: Chrome/Safari pintaban el input blanco/amarillo y rompían
   el glass oscuro. Forzamos surface + texto del tema. */
.lx-field input:-webkit-autofill,
.lx-field input:-webkit-autofill:hover,
.lx-field input:-webkit-autofill:focus,
.lx-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-primary);
  caret-color: var(--text-primary);
  transition: background-color 9999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px var(--surface-card) inset;
  -webkit-box-shadow: 0 0 0 1000px var(--surface-card) inset;
  border-color: var(--border-default);
}
.lx-field input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--surface-card) inset,
              0 0 0 4px var(--tk-ring, rgba(99,102,241,.32));
  -webkit-box-shadow: 0 0 0 1000px var(--surface-card) inset,
              0 0 0 4px var(--tk-ring, rgba(99,102,241,.32));
  border-color: var(--tk-primary);
}
/* mantener visible la floating-label cuando hay valor autocompletado */
.lx-field input:-webkit-autofill + label {
  top: .5rem; font-size: .7rem; font-weight: 600;
  color: var(--tk-primary); letter-spacing: .02em;
}

/* Indicador Caps Lock (premium SaaS) — lo muestra el JS */
.lx-caps {
  display: none;
  align-items: center; gap: .4rem;
  margin: -.55rem 0 1rem;
  font-size: .76rem; font-weight: 600;
  color: var(--color-warning, #f59e0b);
}
.lx-caps.on { display: flex; }
.lx-caps i { font-size: .9rem; }

/* Sheen sweep en el botón (microinteracción tipo Linear) */
.lx-submit::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent,
    rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg);
  transition: left .6s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.lx-submit:hover::after { left: 130%; }

/* Revelado escalonado del formulario (sobre la entrada de .lx-card) */
.lx-card h2,
.lx-card .lx-lead,
.lx-card form > * {
  animation: lx-rise .5s cubic-bezier(.2,.7,.3,1) both;
}
.lx-card h2          { animation-delay: .06s; }
.lx-card .lx-lead    { animation-delay: .10s; }
.lx-card form        { animation: none; }
.lx-card form .lx-field:nth-of-type(1) { animation-delay: .16s; }
.lx-card form .lx-field:nth-of-type(2) { animation-delay: .22s; }
.lx-card form .lx-row    { animation-delay: .28s; }
.lx-card form .lx-submit { animation-delay: .34s; }
@keyframes lx-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── MOBILE ─────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .lx-hero {
    min-height: 38vh; padding: 1.8rem 1.6rem;
    justify-content: flex-end;
  }
  .lx-hero .lx-feats { display: none; }
  .lx-hero-center { max-width: 100%; }
  .lx-hero h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .lx-hero .lx-slogan { font-size: .92rem; }
  .lx-brand { position: absolute; top: 1.5rem; left: 1.6rem; }
  .lx-brand img { height: 38px; }
  .lx-card { max-width: 440px; }
}
@media (max-width: 560px) {
  .lx-hero { display: none; }
  .lx-panel { min-height: 100vh; padding: 1.6rem 1.3rem; }
  .lx-card .lx-logo-m { display: flex; align-items: center; gap: .7rem; }
  .lx-card { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-shape, .lx-card, .lx-eyebrow .pulse,
  .lx-card h2, .lx-card .lx-lead, .lx-card form > * {
    animation: none !important;
  }
  .lx-submit::after { transition: none !important; }
}
