:root {
    --lp-accent: #2563eb;
    --lp-accent-strong: #1d4ed8;
    --lp-accent-deep: #1e40af;
    --lp-accent-soft: #eff6ff;
    --lp-ink: #0f172a;
    --lp-text: #1e293b;
    --lp-body-text: #475569;
    --lp-muted: #64748b;
    --lp-faint: #94a3b8;
    --lp-border: #e2e8f0;
    --lp-surface: #ffffff;
    --lp-field-bg: #f8fafc;
    --lp-radius-xl: 1.6rem;
    --lp-radius-lg: 1.1rem;
    --lp-radius-md: 0.85rem;
    --lp-radius-sm: 0.65rem;
    --lp-ring: 0 0 0 4px rgba(37, 99, 235, 0.12);
    --lp-shadow-panel: 0 24px 64px rgba(2, 6, 23, 0.18);
}

html,
body {
    min-height: 100%;
}

.lp-body {
    min-height: 100vh;
    background: var(--lp-surface);
    color: var(--lp-text);
    font-variant-numeric: tabular-nums;
}

.lp-root {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 56%);
    min-height: 100vh;
}

/* ══════════════════════════════════
   IZQUIERDA — Formulario
   ══════════════════════════════════ */

.lp-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 480px at -10% -10%, rgba(37, 99, 235, 0.05), transparent 60%),
        var(--lp-surface);
}

.lp-left__inner {
    width: 100%;
    max-width: 408px;
}

/* En desktop el formulario vive directo sobre el panel,
   sin tarjeta flotante: más limpio y profesional. */
.lp-auth-card {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

@keyframes lp-fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lp-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lp-fadein {
    animation: lp-fadein 0.4s ease-out both;
}

/* Entrada escalonada de los bloques del formulario */
.lp-auth-card > * {
    animation: lp-rise 0.55s cubic-bezier(0.21, 0.61, 0.35, 1) both;
}

.lp-auth-card > :nth-child(1) { animation-delay: 0.05s; }
.lp-auth-card > :nth-child(2) { animation-delay: 0.12s; }
.lp-auth-card > :nth-child(3) { animation-delay: 0.19s; }
.lp-auth-card > :nth-child(4) { animation-delay: 0.26s; }
.lp-auth-card > :nth-child(5) { animation-delay: 0.33s; }
.lp-auth-card > :nth-child(6) { animation-delay: 0.40s; }
.lp-auth-card > :nth-child(7) { animation-delay: 0.47s; }

.lp-logo__mark {
    width: 48px;
    height: 48px;
    border-radius: var(--lp-radius-sm);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-strong));
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.lp-logo__mark--sm {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.lp-logo__mark img,
.lp-logo__mark--sm img {
    width: 58%;
    height: 58%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.lp-card-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.lp-card-logo img {
    width: auto;
    height: 100px;
    max-width: 100%;
    object-fit: contain;
}

.lp-headline {
    text-align: center;
}

.lp-title {
    margin: 0 0 8px;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 700;
    color: var(--lp-ink);
}

.lp-sub {
    margin: 0 auto;
    max-width: 34ch;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--lp-muted);
}

/* Accesos rápidos (Facturador / Cotizador) */

.lp-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: var(--lp-radius-md);
    border: 1px solid var(--lp-border);
    background: var(--lp-surface);
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.lp-social-btn i {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--lp-accent-soft);
    color: var(--lp-accent);
    font-size: 0.8rem;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.lp-social-btn:hover {
    color: var(--lp-accent-strong);
    border-color: rgba(37, 99, 235, 0.35);
    background: #fbfdff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.lp-social-btn:hover i {
    background: var(--lp-accent);
    color: #fff;
}

.lp-divider {
    position: relative;
    text-align: center;
}

.lp-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: 1px;
    background: var(--lp-border);
}

.lp-divider span {
    position: relative;
    padding: 0 12px;
    background: var(--lp-surface);
    color: var(--lp-faint);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

/* Campos */

.lp-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.lp-field {
    text-align: left;
}

.lp-input-wrap {
    position: relative;
}

.lp-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 44px 12px 42px;
    border-radius: var(--lp-radius-md);
    border: 1px solid var(--lp-border);
    background: var(--lp-field-bg);
    color: var(--lp-ink);
    font-size: 0.95rem;
    box-shadow: none;
    position: relative;
    z-index: 1;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.lp-input::placeholder {
    color: var(--lp-faint);
}

.lp-input:hover {
    border-color: #cbd5e1;
    background: var(--lp-surface);
}

.lp-input:focus,
.lp-input-wrap:focus-within .lp-input {
    background: var(--lp-surface);
    border-color: var(--lp-accent);
    box-shadow: var(--lp-ring);
    outline: none;
}

.lp-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--lp-faint);
    pointer-events: none;
    z-index: 2;
    transition: color 0.16s ease;
}

.lp-input-icon--right {
    left: auto;
    right: 13px;
    pointer-events: all;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.lp-input-icon--right:hover {
    background: rgba(100, 116, 139, 0.10);
    color: var(--lp-muted);
}

.lp-input-wrap:focus-within .lp-input-icon {
    color: var(--lp-accent);
}

.lp-password-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.passwordToggle.bi-eye-fill::before,
.passwordToggle.bi-eye-slash-fill::before {
    content: none !important;
    display: none !important;
}

.lp-link {
    color: var(--lp-accent-strong);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.16s ease;
}

.lp-link:hover {
    color: var(--lp-accent-deep);
    text-decoration: underline;
}

.lp-link--sm {
    font-size: 0.8rem;
}

/* Botones */

.lp-btn,
.lp-btn-outline {
    min-height: 50px;
    border-radius: var(--lp-radius-md);
    font-size: 0.92rem;
    font-weight: 600;
}

.lp-btn {
    position: relative;
    background: linear-gradient(180deg, var(--lp-accent), var(--lp-accent-strong));
    color: #fff;
    border: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 1px 2px rgba(15, 23, 42, 0.18),
        0 8px 20px rgba(37, 99, 235, 0.24);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.lp-btn:hover:not(:disabled) {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 2px 4px rgba(15, 23, 42, 0.16),
        0 12px 26px rgba(37, 99, 235, 0.30);
}

.lp-btn:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.98);
}

.lp-btn.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.lp-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lp-border);
    background: var(--lp-surface);
    color: var(--lp-muted);
    text-decoration: none;
    transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.lp-btn-outline:hover {
    color: var(--lp-accent-strong);
    background: #fbfdff;
    border-color: rgba(37, 99, 235, 0.35);
}

.lp-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    color: var(--lp-faint);
    font-size: 0.78rem;
}

.lp-footer a {
    color: var(--lp-muted);
    text-decoration: none;
    transition: color 0.16s ease;
}

.lp-footer a:hover {
    color: var(--lp-accent-strong);
}

/* ══════════════════════════════════
   DERECHA — Branding
   ══════════════════════════════════ */

.lp-right {
    padding: 16px 16px 16px 0;
    background: var(--lp-surface);
}

.lp-right__panel {
    position: relative;
    min-height: calc(100vh - 32px);
    padding: 40px 44px;
    border-radius: var(--lp-radius-xl);
    overflow: hidden;
    background: #0b1230;
    box-shadow: var(--lp-shadow-panel);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Foto en pseudo-elemento para poder animarla (Ken Burns) */
@keyframes lp-kenburns {
    from {
        transform: scale(1) translate(0, 0);
    }
    to {
        transform: scale(1.09) translate(-1.2%, 0.8%);
    }
}

.lp-right__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../img/fondo/fondo.png") center/cover no-repeat;
    animation: lp-kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
    pointer-events: none;
}

.lp-right__panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(7, 14, 36, 0.92) 0%, rgba(13, 30, 84, 0.78) 42%, rgba(13, 30, 84, 0.30) 100%),
        radial-gradient(640px 420px at 86% -8%, rgba(96, 165, 250, 0.16), transparent 70%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.45) 0%, transparent 38%);
    pointer-events: none;
}

.lp-right__logo,
.lp-right__body,
.lp-right__foot {
    position: relative;
    z-index: 1;
}

/* Entrada escalonada del contenido del panel derecho */
.lp-right__logo,
.lp-right__foot {
    animation: lp-fadein 0.6s ease-out both;
    animation-delay: 0.55s;
}

.lp-right__copy > *,
.lp-right__feature {
    animation: lp-rise 0.6s cubic-bezier(0.21, 0.61, 0.35, 1) both;
}

.lp-right__copy > :nth-child(1) { animation-delay: 0.15s; }
.lp-right__copy > :nth-child(2) { animation-delay: 0.24s; }
.lp-right__copy > :nth-child(3) { animation-delay: 0.33s; }
.lp-right__feature:nth-of-type(1) { animation-delay: 0.42s; }
.lp-right__feature:nth-of-type(2) { animation-delay: 0.51s; }

.lp-right__logo {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.lp-right__brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.lp-right__brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

.lp-right__brand-tag {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.68);
}

.lp-right__body {
    max-width: 480px;
}

.lp-right__copy {
    margin-bottom: 30px;
}

.lp-right__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 13px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lp-right__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.85);
}

.lp-right__title {
    margin: 0 0 16px;
    font-family: "Fraunces", Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 3.2vw, 3.3rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    font-weight: 600;
    color: #fff;
    max-width: 16ch;
    text-wrap: balance;
}

.lp-right__desc {
    margin: 0;
    max-width: 48ch;
    font-size: 0.98rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

.lp-right__feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-top: 12px;
    border-radius: var(--lp-radius-lg);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(8px);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lp-right__feature:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.lp-right__feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--lp-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #93c5fd;
}

.lp-right__feature-icon svg,
.lp-right__feature-icon i {
    font-size: 1.05rem;
    line-height: 1;
}

.lp-right__feature strong {
    display: block;
    margin-bottom: 3px;
    color: #fff;
    font-size: 0.94rem;
    letter-spacing: -0.01em;
}

.lp-right__feature span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    font-size: 0.88rem;
}

.lp-right__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.lp-right__secure {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Usuarios con animaciones reducidas: sin Ken Burns ni stagger */
@media (prefers-reduced-motion: reduce) {
    .lp-right__panel::before,
    .lp-fadein,
    .lp-auth-card > *,
    .lp-right__logo,
    .lp-right__foot,
    .lp-right__copy > *,
    .lp-right__feature {
        animation: none !important;
    }
}

/* Helpers de espaciado usados por la vista */
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-7 { margin-bottom: 1.75rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

/* ══════════════════════════════════
   Responsive
   ══════════════════════════════════ */

@media (max-width: 991.98px) {
    .lp-root {
        grid-template-columns: 1fr;
    }

    /* Pantalla completa blanca, igual al panel izquierdo de desktop */
    .lp-body {
        background: var(--lp-surface);
    }

    .lp-left {
        padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
        min-height: 100vh;
        min-height: 100svh;
        align-items: center;
        background:
            radial-gradient(640px 360px at 50% -12%, rgba(37, 99, 235, 0.06), transparent 60%),
            var(--lp-surface);
    }

    .lp-left__inner {
        max-width: 460px;
        width: 100%;
        position: relative;
        z-index: 1;
    }

    .lp-card-logo {
        min-height: 72px;
    }

    .lp-card-logo img {
        height: 68px;
    }

    .lp-input {
        font-size: 16px;
        min-height: 52px;
    }

    .lp-title {
        font-size: 1.6rem;
    }

    .lp-footer {
        margin-top: 24px;
    }

    .lp-btn,
    .lp-btn-outline {
        min-height: 52px;
    }
}

@media (max-width: 575.98px) {
    .lp-left {
        padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
    }

    .lp-card-logo {
        min-height: 64px;
    }

    .lp-card-logo img {
        height: 60px;
    }

    .lp-title {
        font-size: 1.45rem;
    }

    .lp-sub {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .lp-social-btn {
        min-height: 46px;
        font-size: 0.85rem;
    }

    .row.g-3 > .col-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .lp-link--sm {
        font-size: 0.78rem;
    }

    .lp-footer {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.74rem;
    }
}
