/* EliFactu — pantallas de acceso (login, recuperar contraseña, activación) */

body.auth { background: var(--eli-surface); min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.auth-main { display: flex; flex-direction: column; padding: 2rem 2.5rem; min-height: 100vh; }
.auth-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--eli-text); text-decoration: none; }
.auth-brand:hover { color: var(--eli-text); }
.auth-brand .eli-brand-name { font-size: 1.12rem; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem 0; }
.auth-form { width: 100%; max-width: 380px; animation: eliFadeInUp .3s ease-out both; }
.auth-foot { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; font-size: .78rem; color: var(--eli-faint); }
.auth-foot a { color: var(--eli-muted); }
.auth-foot a:hover { color: var(--eli-text); }

.auth-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1.25rem; background: var(--eli-primary-soft); color: var(--eli-primary); border: 1px solid var(--eli-primary-soft-2); }
.auth-icon.success { background: var(--eli-success-soft); color: var(--eli-success); border-color: var(--bs-success-border-subtle); }
.auth-icon.danger { background: var(--eli-danger-soft); color: var(--eli-danger); border-color: var(--bs-danger-border-subtle); }
.auth-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.028em; margin: 0 0 .45rem; }
.auth-sub { color: var(--eli-muted); font-size: .92rem; margin: 0 0 1.85rem; line-height: 1.55; }
.auth-form .form-label { font-size: .82rem; font-weight: 500; color: var(--eli-text-2); }
.auth-form .form-control { min-height: 42px; font-size: .9rem; border-radius: 9px; padding-left: .8rem; }
.auth-form .btn-lg { min-height: 44px; font-weight: 600; }
.auth-field { margin-bottom: 1.1rem; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.auth-label-row a { font-size: .8rem; font-weight: 500; }
.auth-pwd { position: relative; }
.auth-pwd .form-control { padding-right: 2.75rem; }
.auth-pwd .toggle-pwd { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 7px; background: none; color: var(--eli-faint); display: grid; place-items: center; }
.auth-pwd .toggle-pwd:hover { color: var(--eli-text); background: var(--eli-surface-3); }
.auth-code { font-family: var(--eli-mono); font-size: 1.35rem !important; letter-spacing: .45em; text-align: center; min-height: 52px !important; font-weight: 600; }
.auth-alt { margin-top: 1.5rem; text-align: center; font-size: .85rem; color: var(--eli-muted); }
.auth-divider { display: flex; align-items: center; gap: .75rem; color: var(--eli-faint); font-size: .75rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--eli-border); }

/* Medidor de contraseña */
.pwd-meter { display: flex; gap: 4px; margin-top: .55rem; }
.pwd-meter span { flex: 1; height: 4px; border-radius: 4px; background: var(--eli-surface-3); transition: background .2s; }
.pwd-meter.s1 span:nth-child(1) { background: var(--eli-danger); }
.pwd-meter.s2 span:nth-child(-n+2) { background: #f97316; }
.pwd-meter.s3 span:nth-child(-n+3) { background: #f59e0b; }
.pwd-meter.s4 span:nth-child(-n+4) { background: #10b981; }
.pwd-meter.s5 span { background: var(--eli-success); }
.pwd-label { display: flex; justify-content: space-between; font-size: .76rem; color: var(--eli-muted); margin-top: .4rem; }
.check-list { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .8rem; display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; }
.check-list li { display: flex; align-items: center; gap: .45rem; color: var(--eli-faint); padding: .1rem 0; }
.check-list li.ok { color: var(--eli-success-text); }
.user-chip { display: flex; align-items: center; gap: .8rem; background: var(--eli-surface-2); border: 1px solid var(--eli-border); border-radius: 12px; padding: .75rem .9rem; margin-bottom: 1.4rem; }
.user-chip .name { font-weight: 600; font-size: .9rem; }
.user-chip .sub { font-size: .78rem; color: var(--eli-muted); }

/* Panel de marca */
.auth-aside {
    position: relative; overflow: hidden; margin: .75rem .75rem .75rem 0; border-radius: 24px; isolation: isolate;
    background: #0c0a24; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem 3.25rem;
}
/* Aurora animada */
.aurora { position: absolute; inset: -20%; z-index: -2; filter: blur(70px) saturate(140%); }
.aurora span { position: absolute; border-radius: 50%; opacity: .75; mix-blend-mode: screen; }
.aurora .a1 { width: 60%; height: 60%; left: 5%; top: 0; background: radial-gradient(circle, #6366f1 0%, transparent 65%); animation: auroraA 18s ease-in-out infinite alternate; }
.aurora .a2 { width: 55%; height: 55%; right: 0; top: 20%; background: radial-gradient(circle, #a855f7 0%, transparent 65%); animation: auroraB 22s ease-in-out infinite alternate; }
.aurora .a3 { width: 65%; height: 55%; left: 20%; bottom: -5%; background: radial-gradient(circle, #06b6d4 0%, transparent 65%); opacity: .55; animation: auroraC 26s ease-in-out infinite alternate; }
@keyframes auroraA { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes auroraB { to { transform: translate(-25%, 10%) scale(.9); } }
@keyframes auroraC { to { transform: translate(10%, -20%) scale(1.2); } }
.auth-aside::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(75% 65% at 60% 40%, #000 15%, transparent 80%);
    -webkit-mask-image: radial-gradient(75% 65% at 60% 40%, #000 15%, transparent 80%);
}
.auth-aside::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent 45%, rgba(12, 10, 36, .85) 100%); }
.auth-aside-top { font-size: .8rem; color: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: .5rem; }
.auth-aside-top .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); animation: eliPulseDot 2.4s ease-in-out infinite; }
@keyframes eliPulseDot { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }

.auth-quote { max-width: 32rem; }
.auth-quote h2 { color: #fff; font-size: 2.4rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.08; margin: 0 0 1rem; }
.auth-quote .grad { background: linear-gradient(90deg, #c7d2fe 0%, #a5b4fc 35%, #67e8f9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-quote p { color: rgba(255, 255, 255, .7); font-size: 1rem; line-height: 1.6; margin: 0; }
.auth-features { display: flex; flex-wrap: wrap; gap: .5rem; }
.auth-features span { font-size: .75rem; color: rgba(255, 255, 255, .8); padding: .32rem .7rem; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); display: inline-flex; align-items: center; gap: .4rem; backdrop-filter: blur(6px); }

/* Escena flotante (solo formas: sin cifras) */
.scene { position: relative; height: 360px; max-width: 34rem; width: 100%; margin: 1rem 0; }
.glass {
    position: absolute; border-radius: 16px; padding: 1rem 1.1rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    animation: floatY 7s ease-in-out infinite;
}
@keyframes floatY { 50% { transform: translateY(-10px); } }
.g-row { display: flex; align-items: center; gap: .6rem; }
.g-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .9rem; background: rgba(255, 255, 255, .14); flex-shrink: 0; }
.g-ic.ok { background: rgba(52, 211, 153, .22); color: #6ee7b7; }
.sk { display: block; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .22); margin: .38rem 0; }
.sk.light { background: rgba(255, 255, 255, .42); }
.sk.strong { background: rgba(255, 255, 255, .6); height: 10px; }
.sk.mt { margin-top: .9rem; }
.w15 { width: 15%; } .w25 { width: 25%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; }
.w52 { width: 52%; } .w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; }
.g-pill { margin-left: auto; font-size: .68rem; font-weight: 600; padding: .22rem .55rem; border-radius: 20px; display: inline-flex; align-items: center; gap: .25rem; }
.g-pill.ok { background: rgba(52, 211, 153, .2); color: #6ee7b7; }

.g-invoice { width: 56%; left: 0; top: 30px; z-index: 2; }
.g-lines { margin-top: .8rem; padding-top: .55rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.g-lines > div { display: flex; justify-content: space-between; gap: 1rem; }
.g-total { display: flex; justify-content: space-between; align-items: center; margin-top: .55rem; padding-top: .55rem; border-top: 1px solid rgba(255, 255, 255, .12); }

.g-match { width: 42%; right: 0; top: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; animation-delay: -2s; z-index: 3; }
.g-node { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .13); font-size: 1.05rem; }
.g-link { display: flex; align-items: center; gap: .3rem; }
.g-link span { flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, .15), rgba(110, 231, 183, .9), rgba(255, 255, 255, .15)); background-size: 200% 100%; animation: flow 2.6s linear infinite; }
.g-link i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: #10b981; color: #fff; box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }
@keyframes flow { to { background-position: -200% 0; } }
.g-cap { grid-column: 1 / -1; text-align: center; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }

.g-cal { width: 40%; right: 0; top: 128px; animation-delay: -4s; z-index: 3; }
.g-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: .75rem; }
.g-grid .d { aspect-ratio: 1; border-radius: 5px; background: rgba(255, 255, 255, .1); }
.g-grid .d.f { background: rgba(52, 211, 153, .55); }
.g-grid .d.m { background: rgba(251, 191, 36, .55); }
.g-grid .d.w { background: rgba(255, 255, 255, .04); }
.g-grid .d.t { background: transparent; box-shadow: inset 0 0 0 2px #a5b4fc; }

.g-toast { width: 48%; left: 14%; top: 282px; display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; animation-delay: -1s; z-index: 4; }

@media (max-height: 760px) { .scene { height: 300px; } .g-toast { display: none; } }
@media (prefers-reduced-motion: reduce) { .aurora span, .glass, .g-link span, .auth-aside-top .dot { animation: none !important; } }

/* Modo documento (privacidad) */
.auth-doc { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.auth-doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; }
.auth-doc h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; }
.auth-doc h2 { font-size: 1.02rem; font-weight: 600; margin: 2rem 0 .5rem; }
.auth-doc p, .auth-doc li { color: var(--eli-text-2); line-height: 1.7; font-size: .93rem; }

@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { padding: 1.5rem 1.25rem; }
    .auth-center { padding: 2rem 0; align-items: flex-start; }
}
