/* ═══════════════════════════════════════════════════════════════
   login.css — ERP NovaSIG
   Diseño split panel: marca izquierda (#1a365d) + formulario derecha
   Prefijo de clases: .lv-  (login view)
   Iconos: Font Awesome (clases fas fa-*)
   ═══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
.lv-body {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
}

/* ── Wrapper split ── */
.lv-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════
   PANEL IZQUIERDO — MARCA
   ══════════════════════════════════════════════ */
.lv-marca {
    width: 40%;
    background: #1a365d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Círculo decorativo de fondo */
.lv-marca::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(24, 95, 165, 0.25);
    pointer-events: none;
}
.lv-marca::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(24, 95, 165, 0.15);
    pointer-events: none;
}

/* Logo */
.lv-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.lv-logo-icono {
    font-size: 1.8rem;
    color: #fff;
}

/* Nombre y tagline */
.lv-nombre {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
    margin-bottom: .25rem;
}
.lv-tagline {
    font-size: .82rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* Descripción y features */
.lv-marca-medio { margin: auto 0; padding: 2.5rem 0; }

.lv-descripcion {
    font-size: .92rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.lv-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.lv-features li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, 0.55);
}
.lv-features li .fas {
    font-size: 1rem;
    color: rgba(24, 95, 165, 0.9);
    flex-shrink: 0;
}

/* Tasas */
.lv-tasas {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.lv-tasa-item { display: flex; flex-direction: column; gap: 2px; }
.lv-tasa-label {
    font-size: .65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.lv-tasa-valor {
    font-size: .88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
}
.lv-tasa-sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
}

/* Copyright */
.lv-copyright {
    font-size: .72rem;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* ══════════════════════════════════════════════
   PANEL DERECHO — FORMULARIO
   ══════════════════════════════════════════════ */
.lv-formulario-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f0f4f8;
}

.lv-formulario {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 4px 24px rgba(26, 54, 93, 0.08),
                0 1px 4px rgba(26, 54, 93, 0.04);
    border: 1px solid #e2e8f0;
}

/* Header del formulario */
.lv-form-header { margin-bottom: 1.75rem; }
.lv-form-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: .3rem;
}
.lv-form-subtitulo {
    font-size: .85rem;
    color: #94a3b8;
    margin: 0;
}

/* Alerta de error */
.lv-alerta {
    background: #fde8e8;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .85rem;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.lv-alerta .fas { font-size: 1rem; flex-shrink: 0; }

/* ── Campos ── */
.lv-field { margin-bottom: 1.1rem; }

.lv-field-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}

.lv-field-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lv-field-icon {
    position: absolute;
    left: 12px;
    font-size: 1rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.lv-field-input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .9rem;
    font-family: "Nunito", sans-serif;
    font-weight: 500;
    color: #1a365d;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none;
}
.lv-field-input::placeholder {
    color: #b0bec5;
    font-weight: 400;
}
.lv-field-input:focus {
    border-color: #185FA5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, .12);
}

/* Botón toggle contraseña */
.lv-toggle-pass {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: #94a3b8;
    transition: color .15s;
}
.lv-toggle-pass:hover { color: #1a365d; }
.lv-toggle-pass .fas { font-size: 1rem; }

/* ── Recuérdame ── */
.lv-recordar { margin-bottom: 1.5rem; }

.lv-check-label {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.lv-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.lv-check-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d4dbe3;
    border-radius: 5px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .15s, background .15s;
}
.lv-check-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid transparent;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: border-color .15s;
}

.lv-check:checked ~ .lv-check-custom {
    background: #185FA5;
    border-color: #185FA5;
}
.lv-check:checked ~ .lv-check-custom::after {
    border-color: #fff;
}

/* ── Botón ingresar ── */
.lv-btn-ingresar {
    width: 100%;
    height: 48px;
    background: #1a365d;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
    font-family: "Nunito", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    transition: background .15s, transform .1s, box-shadow .15s;
    letter-spacing: .01em;
    margin-bottom: 1.5rem;
}
.lv-btn-ingresar .fas { font-size: 1.1rem; }
.lv-btn-ingresar:hover {
    background: #185FA5;
    box-shadow: 0 4px 14px rgba(24, 95, 165, .35);
}
.lv-btn-ingresar:active { transform: scale(.98); }
.lv-btn-ingresar:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Footer del formulario */
.lv-form-footer { text-align: center; }
.lv-version {
    font-size: .72rem;
    color: #b0bec5;
    margin: 0;
}

/* ══════════════════════════════════════════════
   MODALES — bienvenida (éxito) y error del login.
   Custom, no Bootstrap (esta vista no lo carga): mismo lenguaje
   visual .lv-* del resto del formulario, cerrado a mano en login.js.
   ══════════════════════════════════════════════ */
.lv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity .18s ease;
}
.lv-modal-overlay[hidden] { display: none; }
.lv-modal-overlay.lv-modal-visible { opacity: 1; }

.lv-modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem 1.75rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
    transform: translateY(10px) scale(.97);
    transition: transform .18s ease;
}
.lv-modal-visible .lv-modal { transform: translateY(0) scale(1); }

.lv-modal-icono {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.7rem;
}
.lv-modal-icono-exito { background: #dcfce7; color: #15803d; }
.lv-modal-icono-error { background: #fde8e8; color: #991b1b; }

.lv-modal-titulo {
    font-family: "Nunito", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 .6rem;
}
.lv-modal-texto {
    font-size: .88rem;
    color: #475569;
    margin: 0 0 .3rem;
    line-height: 1.5;
}
.lv-modal-subtexto {
    font-size: .78rem;
    color: #94a3b8;
    margin: 0 0 1.5rem;
}
#lvModalError .lv-modal-texto { margin-bottom: 1.5rem; }

.lv-modal-btn { margin-bottom: 0; }
.lv-modal-btn-error {
    background: #991b1b;
}
.lv-modal-btn-error:hover {
    background: #b91c1c;
    box-shadow: 0 4px 14px rgba(153, 27, 27, .35);
}

/* ══════════════════════════════════════════════
   TEXTURA DE FONDO — hexágonos sutiles (mitad superior)
   ══════════════════════════════════════════════ */
.lv-marca-textura {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 58%;
    opacity: .09;
    pointer-events: none;
    z-index: 0;
    background-repeat: repeat;
    background-size: 300px 260px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='260' viewBox='0 0 300 260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpolygon points='40,10 62,22 62,46 40,58 18,46 18,22'/%3E%3Cpolygon points='150,40 172,52 172,76 150,88 128,76 128,52'/%3E%3Cpolygon points='250,15 268,25 268,45 250,55 232,45 232,25'/%3E%3Cpolygon points='90,120 110,131 110,153 90,164 70,153 70,131'/%3E%3Cpolygon points='220,140 240,151 240,173 220,184 200,173 200,151'/%3E%3Cpolygon points='30,200 48,210 48,230 30,240 12,230 12,210'/%3E%3Cline x1='62' y1='34' x2='128' y2='64'/%3E%3Cline x1='172' y1='64' x2='232' y2='35'/%3E%3Cline x1='110' y1='142' x2='200' y2='162'/%3E%3Cline x1='70' y1='142' x2='48' y2='220'/%3E%3Cline x1='150' y1='88' x2='90' y2='120'/%3E%3C/g%3E%3C/svg%3E");
}

/* El resto del contenido del panel debe quedar por encima de la textura */
.lv-marca-top, .lv-marca-medio, .lv-marca-expansion, .lv-marca-bottom {
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════════════
   EXPANSIÓN — descripción corta, tarjetas de módulo, chips
   ══════════════════════════════════════════════ */
.lv-marca-expansion {
    padding-bottom: 1.5rem;
}

.lv-desc-corta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    max-width: 34em;
}

.lv-modulos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.lv-modulo-card {
    background: #ffffff;
    border-radius: 12px;
    padding: .85rem .9rem;
    box-shadow: none;
}

.lv-modulo-ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e6f1fb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .5rem;
}
.lv-modulo-ico .fas {
    font-size: .82rem;
    color: #185FA5;
}

.lv-modulo-titulo {
    font-size: .8rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: .2rem;
}

.lv-modulo-desc {
    font-size: .7rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Fila "Módulos en expansión" — chips punteados, transparentes */
.lv-modulos-expansion-fila {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.lv-expansion-label {
    font-size: .7rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.lv-expansion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.lv-chip {
    font-size: .72rem;
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: .3rem .75rem;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════
   TARJETA TRM — fondo azul sólido de marca
   ══════════════════════════════════════════════ */
.lv-trm-card {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    background: #185FA5;
    border-radius: 10px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

.lv-trm-label {
    font-size: .68rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.lv-trm-valor {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.lv-trm-spacer { flex: 1; }

.lv-trm-variacion {
    font-size: .78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.lv-trm-up   { color: #86efac; }
.lv-trm-down { color: #fca5a5; }

.lv-trm-fecha {
    font-size: .7rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ══════════════════════════════════════════════
   RESPONSIVE — pantallas pequeñas
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .lv-wrapper { flex-direction: column; }
    .lv-marca {
        width: 100%;
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    .lv-marca-medio { padding: 1.5rem 0; }
    .lv-features { display: none; }
    .lv-formulario-wrap { padding: 1.5rem 1rem; }
    .lv-formulario { padding: 2rem 1.5rem; }
    .lv-modulos-grid { grid-template-columns: 1fr; }
    .lv-trm-card { flex-direction: column; align-items: flex-start; gap: .3rem; }
    .lv-trm-spacer { display: none; }
}

@media (max-width: 480px) {
    .lv-marca { padding: 1.5rem 1.25rem; }
    .lv-nombre { font-size: 1.4rem; }
    .lv-formulario { padding: 1.75rem 1.25rem; }
}
