/* Englody · login nuevo (rediseño 2026, solo con ENGLODY_LOGIN_NUEVO=1). Colores del logo: ámbar #F8A800 y morado #504898 / #484090. */
:root {
  --lg-ambar: #F8A800; --lg-ambar-2: #FFC24A; --lg-coral: #FF8A4C;
  --lg-morado: #504898; --lg-morado-2: #5850A0; --lg-morado-d: #3C3488; --lg-noche: #120E2C; --lg-noche-2: #1C1640;
  --lg-tinta: #1E1B3A; --lg-tinta-2: #5E5A7A; --lg-tinta-3: #8A86A3; --lg-linea: #E6E3F2;
  --lg-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lg-muelle: cubic-bezier(.34, 1.4, .64, 1); --lg-suave: cubic-bezier(.2, .8, .2, 1);
}
html body:has(.lg) { background: var(--lg-noche) !important; overflow: hidden; }
body:has(.lg) #mensajeError-login, body:has(.lg) #mensajeError, body:has(.lg) #mensajeSuccess { display: none !important; }
html.e-prep:has(body .lg), html:has(.lg) { background: var(--lg-noche) !important; }

.lg { position: fixed; inset: 0; z-index: 50; overflow-x: hidden; overflow-y: auto; font-family: var(--lg-font); color: #fff; -webkit-font-smoothing: antialiased; background: var(--lg-noche); }
.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }
.lg-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Escena ============ */
.lg-escena { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.lg-malla { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lg-malla-css { position: absolute; inset: -10%; opacity: 0; transition: opacity .6s;
  background:
    radial-gradient(40% 50% at 78% 18%, rgba(248,168,0,.55), transparent 70%),
    radial-gradient(45% 55% at 12% 85%, rgba(88,80,160,.85), transparent 70%),
    radial-gradient(35% 40% at 60% 80%, rgba(255,138,76,.30), transparent 70%),
    radial-gradient(60% 60% at 30% 20%, rgba(60,52,136,.9), transparent 70%), var(--lg-noche); }
.lg.sin-gl .lg-malla-css { opacity: 1; }
.lg-vineta { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(8,6,22,.55) 100%); }
.lg-grano { position: absolute; inset: -50%; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: lgGrano .9s steps(6) infinite; }
@keyframes lgGrano { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* palabras en muchos idiomas, en tres profundidades */
.lg-palabras { position: absolute; inset: 0; }
.lg-palabras .lg-fila-p { position: absolute; left: 0; }
.lg-fila-p--0 { top: 7vh; }
.lg-fila-p--1 { bottom: 15vh; }
.lg-fila-p--2 { bottom: 1vh; }
.lg-fila-p { white-space: nowrap; transform: translate3d(calc(var(--px, 0) * var(--d) * -60px), calc(var(--py, 0) * var(--d) * -36px), 0); will-change: transform; }
.lg-fila-p__pista { display: inline-flex; animation: lgDeriva 120s linear infinite; }
.lg-fila-p__pista > span { display: inline-flex; }
.lg-fila-p b { font-weight: 800; letter-spacing: -.04em; padding: 0 .55em; line-height: 1; }
.lg-fila-p--0 b { font-size: clamp(64px, 9.5vw, 170px); color: transparent; -webkit-text-stroke: 1.2px rgba(255,255,255,.09); }
.lg-fila-p--1 { opacity: 1; }
.lg-fila-p--1 .lg-fila-p__pista { animation-duration: 160s; animation-direction: reverse; }
.lg-fila-p--1 b { font-size: clamp(30px, 3.6vw, 64px); font-weight: 600; color: rgba(255,255,255,.06); font-style: italic; }
.lg-fila-p--2 .lg-fila-p__pista { animation-duration: 95s; }
.lg-fila-p--2 b { font-size: clamp(44px, 6vw, 110px); color: rgba(255,255,255,.045); filter: blur(1.5px); }
@keyframes lgDeriva { to { transform: translateX(-50%); } }

/* ============ Lienzo: cabecera, saludo y tarjeta ============ */
.lg-lienzo { position: relative; z-index: 2; min-height: 100%; max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 392px); grid-template-rows: auto 1fr; column-gap: clamp(32px, 6vw, 120px); padding: 28px clamp(24px, 5vw, 80px) 40px; }
.lg-arriba { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lg-curso { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 600 13px var(--lg-font); color: rgba(255,255,255,.86); }
.lg-curso i { width: 7px; height: 7px; border-radius: 50%; background: var(--lg-ambar); box-shadow: 0 0 0 4px rgba(248,168,0,.18); }
.lg-idioma { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; cursor: pointer; margin: 0 !important; transition: background .2s; }
.lg-idioma:hover { background: rgba(255,255,255,.14); }
.lg-idioma svg { width: 16px; height: 16px; opacity: .85; }
.lg-idioma select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: #fff !important; font: 600 13.5px var(--lg-font) !important; padding: 0 2px; cursor: pointer; outline: 0; }
.lg-idioma select option { color: var(--lg-tinta); }
.lg-idioma:focus-within { box-shadow: 0 0 0 3px rgba(248,168,0,.45); }

/* saludo */
.lg-hero { align-self: center; padding: 6vh 0 8vh; max-width: 760px; }
.lg-hero__idioma { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 13px var(--lg-font); letter-spacing: .02em; color: rgba(255,255,255,.72); }
.lg-hero__punto { width: 8px; height: 8px; border-radius: 50%; background: var(--lg-ambar); }
.lg-hero__barra { width: 64px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.lg-hero__barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lg-ambar-2), var(--lg-ambar)); }
.lg-hero__t { margin: 0; padding: 0; font: 800 clamp(64px, 9.2vw, 168px)/.92 var(--lg-font); letter-spacing: -.055em; color: #fff; text-wrap: balance; }
/* sin background-clip:text ni filter en el padre: en Safari dejaba restos de la palabra anterior. Cada letra lleva su color del degradado (lo calcula el JS) */
.lg-saludo { display: inline-block; padding-right: .06em; color: var(--lg-ambar); }
.lg-saludo .ch { display: inline-block; white-space: pre; color: var(--k, var(--lg-ambar)); text-shadow: 0 10px 40px rgba(248,168,0,.28); will-change: transform, opacity, filter; backface-visibility: hidden; }
.lg-saludo.sale .ch { animation: lgChSale .42s var(--lg-suave) both; animation-delay: calc(var(--c) * 22ms); }
.lg-saludo.entra .ch { animation: lgChEntra .7s var(--lg-suave) both; animation-delay: calc(var(--c) * 34ms); }
@keyframes lgChSale { to { opacity: 0; filter: blur(14px); transform: translateY(-.14em) scale(.98); } }
@keyframes lgChEntra { from { opacity: 0; filter: blur(16px); transform: translateY(.22em) scale(1.02); } to { opacity: 1; filter: blur(0); transform: none; } }
.lg-hero__resto { display: block; font-weight: 300; color: rgba(255,255,255,.94); letter-spacing: -.045em; }
.lg-hero__sub { margin: 28px 0 0; max-width: 520px; font: 400 clamp(16px, 1.25vw, 19px)/1.55 var(--lg-font); color: rgba(255,255,255,.72); }

/* ============ Tarjeta de acceso: vidrio ahumado, compacta (03/11) ============ */
.lg-tarjeta { --t-tx: rgba(255,255,255,.96); --t-tx2: rgba(255,255,255,.74); --t-tx3: rgba(255,255,255,.64); --t-borde: rgba(255,255,255,.11); --t-campo: rgba(255,255,255,.06); --t-campo-h: rgba(255,255,255,.085);
  position: relative; align-self: center; justify-self: end; width: 100%; max-width: 392px; margin: 4vh 0; border-radius: 22px; padding: 28px 28px 22px; color: var(--t-tx);
  background: linear-gradient(180deg, rgba(30,24,64,.58), rgba(16,12,40,.66)); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.07), 0 30px 80px -24px rgba(4,2,18,.85), 0 10px 30px -18px rgba(0,0,0,.6); }

.lg-cab { margin-bottom: 22px; }
.lg-marca { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; border-radius: 8px; text-decoration: none !important; }
.lg-marca:focus-visible { outline: 0; box-shadow: 0 0 0 2px rgba(248,168,0,.7); }
.lg-iso { display: block; width: 42px; height: 28px; overflow: hidden; flex: none; }
.lg-iso img { display: block; height: 28px; width: auto; max-width: none; filter: brightness(1.45) saturate(1.15); }
.lg-marca b { font: 700 15px var(--lg-font); letter-spacing: -.01em; color: var(--t-tx); }
.lg-cab h1 { margin: 0; font: 700 21px/1.25 var(--lg-font) !important; letter-spacing: -.025em; color: var(--t-tx) !important; }
.lg-sub { margin: 5px 0 0; font: 400 13.5px/1.5 var(--lg-font); color: var(--t-tx2); }
.lg-etq { display: block; margin: 0 0 7px; padding: 0; font: 500 12.5px/1 var(--lg-font); color: var(--t-tx2); letter-spacing: .005em; }

.lg-aviso { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; padding: 10px 12px; border-radius: 11px; background: rgba(229,72,77,.12); box-shadow: inset 0 0 0 1px rgba(255,120,120,.28); color: #FFC9C4; font: 500 12.5px/1.45 var(--lg-font); }
.lg-aviso svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #FF8A84; }

/* perfiles: segmentado compacto con píldora luminosa que se desliza */
.lg-roles { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.lg-roles__cab { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.lg-roles__cab .lg-etq { margin: 0; }
.lg-roles__g { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--t-borde); }
.lg-rol { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 !important; padding: 0 11px; border-radius: 9px; cursor: pointer; color: var(--t-tx2); transition: color .2s; user-select: none; min-width: 0; }
.lg-rol input { position: absolute; opacity: 0; pointer-events: none; }
.lg-rol svg { width: 15px; height: 15px; flex: none; opacity: .9; }
.lg-rol b { font: 500 13px var(--lg-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-rol:hover { color: var(--t-tx); }
.lg-rol.on { color: #fff; }
.lg-rol.on b { font-weight: 600; }
.lg-rol.on svg { color: var(--lg-ambar-2); opacity: 1; }
.lg-rol:has(input:focus-visible) { box-shadow: 0 0 0 2px rgba(248,168,0,.7); }
.lg-roles__pildora { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 36px; border-radius: 9px; opacity: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.09)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(255,255,255,.1), 0 6px 16px -6px rgba(0,0,0,.5), 0 0 18px -4px rgba(248,168,0,.35);
  transition: transform .42s var(--lg-muelle), width .42s var(--lg-muelle), opacity .2s; }
.lg-roles__g.con .lg-roles__pildora { opacity: 1; }
.lg-otros { position: static; }
.lg-otros summary { list-style: none; display: inline-flex; align-items: center; gap: 3px; min-height: 24px; cursor: pointer; font: 500 12.5px var(--lg-font); color: var(--t-tx3); border-radius: 6px; transition: color .2s; }
.lg-otros summary::-webkit-details-marker { display: none; }
.lg-otros summary:hover, .lg-otros[open] summary { color: var(--t-tx); }
.lg-otros summary:focus-visible { outline: 0; box-shadow: 0 0 0 2px rgba(248,168,0,.6); }
.lg-otros summary svg { width: 13px; height: 13px; transition: transform .25s var(--lg-suave); }
.lg-otros[open] summary svg { transform: rotate(180deg); }
.lg-otros.con-otro summary { color: var(--lg-ambar-2); }
.lg-otros__l { position: absolute; z-index: 6; top: calc(100% + 6px); left: 0; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 12px;
  background: #1A1540; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 20px 40px -12px rgba(0,0,0,.7); animation: lgCae .22s var(--lg-suave); }
.lg-otros__l label { margin: 0 !important; cursor: pointer; display: block; }
.lg-otros__l input { position: absolute; opacity: 0; pointer-events: none; }
.lg-otros__l span { display: flex; align-items: center; height: 34px; padding: 0 10px; border-radius: 8px; font: 500 12.5px var(--lg-font); color: var(--t-tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; }
.lg-otros__l label:hover span { background: rgba(255,255,255,.07); color: #fff; }
.lg-otros__l input:checked + span { background: rgba(248,168,0,.16); color: var(--lg-ambar-2); }
.lg-otros__l input:focus-visible + span { box-shadow: 0 0 0 2px rgba(248,168,0,.6); }
@keyframes lgCae { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* campos: etiqueta pequeña encima, caja de 44 px */
.lg-campos { display: grid; gap: 14px; }
.lg-campo { position: relative; display: block; margin: 0 !important; }
.lg-campo__fila { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lg-campo__fila .lg-etq { margin-bottom: 7px; }
.lg-caja { position: relative; display: block; }
.lg-caja > svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--t-tx3); pointer-events: none; transition: color .2s; }
.lg-campo input { width: 100%; height: 44px !important; padding: 0 76px 0 39px !important; border-radius: 10px !important; border: 1px solid var(--t-borde) !important; background: var(--t-campo) !important;
  font: 500 14px var(--lg-font) !important; color: #fff !important; outline: 0; box-shadow: none !important; caret-color: var(--lg-ambar); transition: border-color .2s, background .2s, box-shadow .25s !important; -webkit-text-fill-color: #fff; }
.lg-campo input#loginUsuario { padding-right: 46px !important; }
.lg-campo input:hover { background: var(--t-campo-h) !important; border-color: rgba(255,255,255,.18) !important; }
.lg-campo input:focus { background: rgba(255,255,255,.09) !important; border-color: rgba(248,168,0,.7) !important; box-shadow: 0 0 0 3px rgba(248,168,0,.16) !important; }
.lg-campo:focus-within .lg-caja > svg { color: var(--lg-ambar-2); }
.lg-campo input:-webkit-autofill, .lg-campo input:-webkit-autofill:hover, .lg-campo input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #2A2352 inset !important; transition: background-color 9999s; }
.lg-ver { position: absolute; right: 36px; top: 50%; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--t-tx3); display: grid; place-items: center; cursor: pointer; transition: color .15s, background .15s; }
.lg-ver svg { width: 16px; height: 16px; display: block; }
.lg-ver .lg-ver__no { display: none; }
.lg-ver.on .lg-ver__si { display: none; }
.lg-ver.on .lg-ver__no { display: block; }
.lg-ver:hover { background: rgba(255,255,255,.08); color: #fff; }
.lg-ver:focus-visible { outline: 0; box-shadow: 0 0 0 2px rgba(248,168,0,.6); }
.recordarPassMe { font: 500 12.5px var(--lg-font); color: var(--t-tx3) !important; text-decoration: none !important; display: inline-flex; align-items: center; min-height: 24px; transition: color .2s; }
.recordarPassMe:hover { color: var(--lg-ambar-2) !important; }
.recordarPassMe:focus-visible { outline: 0; border-radius: 6px; box-shadow: 0 0 0 2px rgba(248,168,0,.7); color: var(--lg-ambar-2) !important; }
.lg-mayus { display: flex; align-items: center; gap: 6px; margin: -6px 0 0; font: 500 12px var(--lg-font); color: #FFC24A; }
.lg-mayus[hidden] { display: none; }
.lg-mayus svg { width: 13px; height: 13px; }

/* recordarme: interruptor pequeño */
.lg-check { display: inline-flex; align-items: center; gap: 9px; min-height: 28px; margin: 14px 0 18px !important; cursor: pointer; font: 500 13px var(--lg-font); color: var(--t-tx2); user-select: none; }
.lg-check input { position: absolute; opacity: 0; pointer-events: none; }
.lg-check__int { position: relative; width: 30px; height: 18px; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: background .25s; flex: none; }
.lg-check__int::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .3s var(--lg-muelle); }
.lg-check input:checked + .lg-check__int { background: var(--lg-ambar); box-shadow: none; }
.lg-check input:checked + .lg-check__int::after { transform: translateX(12px); }
.lg-check input:focus-visible + .lg-check__int { box-shadow: 0 0 0 2px rgba(248,168,0,.6); }
.lg-check em { font-style: normal; }
.lg-check:hover em { color: var(--t-tx); }

/* botón: ámbar del logo, texto oscuro y spinner fino al enviar */
.lg-entrar { position: relative; overflow: hidden; width: 100%; height: 46px; border: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: #1A1433;
  font: 600 14.5px var(--lg-font); letter-spacing: -.005em; background: linear-gradient(180deg, #FFBE2E, var(--lg-ambar)); isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(150,90,0,.25), 0 8px 24px -10px rgba(248,168,0,.65); transition: transform .3s var(--lg-muelle), box-shadow .25s, filter .2s; }
.lg-entrar:hover { filter: brightness(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(150,90,0,.25), 0 12px 30px -10px rgba(248,168,0,.8); }
.lg-entrar:active { transform: scale(.975); }
.lg-entrar:focus-visible { outline: 0; box-shadow: 0 0 0 2px #120E2C, 0 0 0 4px var(--lg-ambar-2); }
.lg-entrar__ic { display: grid; place-items: center; transition: transform .3s var(--lg-muelle); }
.lg-entrar__ic svg { width: 16px; height: 16px; }
.lg-entrar:hover .lg-entrar__ic { transform: translateX(3px); }
.lg-entrar__giro { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(26,20,51,.25); border-top-color: #1A1433; animation: lgGira .7s linear infinite; }
.lg-entrar.cargando { pointer-events: none; }
.lg-entrar.cargando .lg-entrar__ic { display: none; }
.lg-entrar.cargando .lg-entrar__giro { display: block; }
@keyframes lgGira { to { transform: rotate(360deg); } }
.lg-pie { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); text-align: center; font: 500 11.5px var(--lg-font); color: var(--t-tx3); }

/* error del servidor: sacudida suave al llegar */
.lg-form.lg-error { animation: lgSacude .5s var(--lg-suave); }
@keyframes lgSacude { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ============ Entrada coreografiada ============ */
.lg.lg-in .lg-escena { animation: lgFunde 1.4s ease-out both; }
.lg.lg-in .lg-arriba { animation: lgSube .9s var(--lg-suave) .5s both; }
.lg.lg-in .lg-hero__idioma { animation: lgSube .9s var(--lg-suave) .35s both; }
.lg.lg-in .lg-hero__t { animation: lgTitular 1.3s var(--lg-suave) .15s both; }
.lg.lg-in .lg-hero__sub { animation: lgSube .9s var(--lg-suave) .65s both; }
.lg.lg-in .lg-tarjeta { animation: lgTarjeta 1.1s var(--lg-muelle) .45s both; }
.lg.lg-in .lg-form > * { animation: lgSube .7s var(--lg-suave) both; animation-delay: calc(.7s + var(--k, 0) * 60ms); }
@keyframes lgFunde { from { opacity: 0; } }
@keyframes lgSube { from { opacity: 0; transform: translateY(14px); } }
@keyframes lgTitular { from { opacity: 0; filter: blur(22px); transform: translateY(24px) scale(.98); } }
@keyframes lgTarjeta { from { opacity: 0; transform: translateY(40px) scale(.96); } }

/* ============ Salida al enviar: la tarjeta se funde con la luz ============ */
.lg-salida { position: fixed; z-index: 60; left: var(--sx, 50%); top: var(--sy, 50%); width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, #FFF6E2 0%, #FFE0A0 25%, rgba(248,168,0,.85) 45%, rgba(80,72,152,.95) 75%, var(--lg-noche) 100%); }
.lg.lg-sale .lg-salida { animation: lgLuz 1s cubic-bezier(.7, 0, .3, 1) forwards; }
.lg.lg-sale .lg-tarjeta { transition: transform .7s var(--lg-suave), opacity .6s, filter .6s; transform: scale(.94) translateY(6px); opacity: 0; filter: blur(8px); }
.lg.lg-sale .lg-hero { transition: opacity .5s, filter .6s; opacity: 0; filter: blur(10px); }
@keyframes lgLuz { 0% { opacity: 0; transform: scale(1); } 15% { opacity: 1; } 100% { opacity: 1; transform: scale(160); } }

/* ============ Pantallas medianas ============ */
@media (max-width: 1180px) {
  .lg-lienzo { grid-template-columns: minmax(0, 1fr) 372px; column-gap: 40px; }
  .lg-tarjeta { padding: 26px 24px 20px; }
  .lg-rol { padding: 0 9px; gap: 7px; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .lg-tarjeta { padding-top: 22px; padding-bottom: 16px; margin: 2vh 0; }
  .lg-marca { margin-bottom: 14px; }
  .lg-cab { margin-bottom: 16px; }
  .lg-roles { margin-bottom: 14px; }
  .lg-check { margin: 10px 0 14px !important; }
  .lg-pie { margin-top: 12px; padding-top: 10px; }
}

/* ============ Móvil: escena arriba con el saludo y la tarjeta como hoja ============ */
@media (max-width: 860px) {
  .lg-lienzo { display: block; padding: 0; }
  .lg-arriba { position: absolute; top: 0; left: 0; right: 0; padding: max(14px, env(safe-area-inset-top)) 16px 0; z-index: 3; }
  .lg-curso { height: 32px; font-size: 12px; padding: 0 12px; }
  .lg-idioma { height: 36px; }
  .lg-hero { min-height: 46vh; min-height: 46svh; padding: 82px 22px 72px; display: flex; flex-direction: column; justify-content: flex-end; max-width: none; }
  .lg-hero__t { font-size: clamp(54px, 17vw, 96px); }
  .lg-hero__sub { display: none; }
  .lg-hero__idioma { margin-bottom: 12px; }
  .lg-tarjeta { max-width: none; margin: -32px 0 0; border-radius: 24px 24px 0 0; min-height: calc(54vh + 32px); min-height: calc(54svh + 32px); padding: 26px 20px max(24px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(24,19,54,.88), rgba(14,11,34,.96)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 -20px 50px -20px rgba(4,2,18,.8); }
  .lg-tarjeta::before { content: ""; position: absolute; top: 9px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(255,255,255,.2); }
  .lg-marca { display: none; }
  .lg-cab h1 { font-size: 20px !important; }
  .lg-cab { margin-bottom: 16px; }
  .lg-rol { height: 44px; }
  .lg-roles__pildora { height: 44px; }
  .lg-campo input { height: 48px !important; font-size: 16px !important; }
  .lg-check { min-height: 44px; margin: 8px 0 12px !important; }
  .lg-entrar { height: 50px; font-size: 15px; }
  .recordarPassMe, .lg-otros summary { min-height: 32px; }
  .lg-fila-p--0 { top: 9vh; }
  .lg-fila-p--0 b { -webkit-text-stroke-color: rgba(255,255,255,.055); }
  .lg-fila-p--2 { top: 28vh; bottom: auto; }
  .lg-fila-p--1 { display: none; }
  .lg.lg-in .lg-tarjeta { animation-name: lgHoja; }
  @keyframes lgHoja { from { opacity: 0; transform: translateY(80px); } }
}
@media (max-width: 360px) {
  .lg-rol svg { display: none; }
}

/* ============ Reducir movimiento: todo quieto y legible ============ */
@media (prefers-reduced-motion: reduce) {
  .lg *, .lg *::before, .lg *::after { animation: none !important; transition-duration: 0s !important; }
  .lg-fila-p { transform: none !important; }
}

/* ============ Ventana «Recuperar contraseña» (sweetalert del original) con el estilo de la tarjeta ============ */
body:has(.lg) .swal2-container { z-index: 70 !important; }
body:has(.lg) .swal2-container.swal2-backdrop-show { background: rgba(8,6,22,.55) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html body:has(.lg) .swal2-popup:not(#_l) { width: min(392px, calc(100vw - 32px)) !important; border-radius: 20px !important; padding: 26px 24px 22px !important; font-family: var(--lg-font) !important;
  background: linear-gradient(180deg, rgba(34,27,72,.97), rgba(18,14,44,.98)) !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.1), 0 30px 80px -20px rgba(0,0,0,.85) !important; }
html body:has(.lg) .swal2-popup .swal2-icon:not(#_l) { width: 44px !important; height: 44px !important; margin: 0 0 14px !important; border: 0 !important; border-radius: 12px !important; background: rgba(248,168,0,.14) !important; align-items: center; justify-content: center; }
html body:has(.lg) .swal2-popup .swal2-icon:not(.swal2-icon-show):not(#_l) { display: none !important; } /* solo el icono que toca, no los cinco */
html body:has(.lg) .swal2-popup .swal2-icon.swal2-icon-show:not(#_l) { display: flex !important; }
html body:has(.lg) .swal2-popup .swal2-icon [class^="swal2-x-mark"], html body:has(.lg) .swal2-popup .swal2-icon [class^="swal2-success"] { display: none !important; }
html body:has(.lg) .swal2-popup .swal2-icon .swal2-icon-content { margin: 0 !important; line-height: 1 !important; font-size: 22px !important; font-weight: 700; color: var(--lg-ambar-2) !important; }
html body:has(.lg) .swal2-popup .swal2-title:not(#_l) { font: 700 19px/1.3 var(--lg-font) !important; letter-spacing: -.02em; color: #fff !important; padding: 0 !important; text-align: left !important; }
html body:has(.lg) .swal2-popup .swal2-html-container:not(#_l) { font: 400 13.5px/1.5 var(--lg-font) !important; color: rgba(255,255,255,.78) !important; margin: 6px 0 0 !important; text-align: left !important; }
html body:has(.lg) .swal2-popup .swal2-input:not(#_l) { height: 44px !important; margin: 16px 0 0 !important; width: 100% !important; border-radius: 10px !important; border: 1px solid rgba(255,255,255,.12) !important; background: rgba(255,255,255,.06) !important;
  box-shadow: none !important; font: 500 14px var(--lg-font) !important; color: #fff !important; padding: 0 14px !important; }
html body:has(.lg) .swal2-popup .swal2-input:not(#_l):focus { border-color: rgba(248,168,0,.7) !important; box-shadow: 0 0 0 3px rgba(248,168,0,.16) !important; }
html body:has(.lg) .swal2-popup .swal2-input::placeholder { color: rgba(255,255,255,.38); }
html body:has(.lg) .swal2-popup .swal2-validation-message { background: rgba(229,72,77,.14) !important; color: #FFC9C4 !important; border-radius: 10px; margin: 10px 0 0 !important; font: 500 12.5px var(--lg-font) !important; }
html body:has(.lg) .swal2-popup .swal2-actions:not(#_l) { width: 100%; gap: 8px; margin: 20px 0 0 !important; flex-direction: row-reverse; }
html body:has(.lg) .swal2-popup .swal2-actions button:not(#_l) { flex: 1; height: 44px; margin: 0 !important; border-radius: 11px !important; font: 600 14px var(--lg-font) !important; box-shadow: none !important; border: 0 !important; }
html body:has(.lg) .swal2-popup .swal2-actions .swal2-confirm:not(#_l) { background: linear-gradient(180deg, #FFBE2E, #F8A800) !important; color: #1A1433 !important; }
html body:has(.lg) .swal2-popup .swal2-actions .swal2-cancel:not(#_l) { background: rgba(255,255,255,.08) !important; color: rgba(255,255,255,.8) !important; }
html body:has(.lg) .swal2-popup .swal2-actions .swal2-cancel:not(#_l):hover { background: rgba(255,255,255,.14) !important; color: #fff !important; }

/* «Otros perfiles» con 5 opciones (Equipo Englody, 10/11): la tercera fila caía bajo la etiqueta «Usuario», que
   se pintaba encima y se quedaba los clics. Abierto, el bloque de perfiles va por encima de los campos; la opción
   suelta ocupa la fila entera. */
.lg-roles:has(.lg-otros[open]) { position: relative; z-index: 30; }
.lg-otros__l label:last-child:nth-child(odd) { grid-column: 1 / -1; }
