/* ═══════════════════════════════════════════════════════════════════
   login.css — Diseño profesional de pantalla de login
   Split 50/50 · Responsive · Sin dependencia de imágenes externas
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    font-family: 'Inter', system-ui, sans-serif;
    background: #0a2463;
    overflow-x: hidden;
}

/* ── Wrapper: dos columnas 50/50 ─────────────────────────────────── */
.lp-wrap {
    display: flex;
    min-height: 100dvh;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
   PANEL IZQUIERDO — decorativo
   ═══════════════════════════════════════════════════════════════════ */
.lp-left {
    flex: 1;
    position: relative;
    background: linear-gradient(145deg, #001f6b 0%, #003399 40%, #0055cc 75%, #1a72e8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3rem 2.5rem;
}

/* Círculos decorativos de fondo */
.lp-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.055);
    pointer-events: auto;
    cursor: default;
    will-change: transform;
    transition: background .45s ease, box-shadow .45s ease, filter .35s ease;
}

.lp-circle:hover {
    background: rgba(160, 210, 255, 0.13) !important;
    box-shadow: 0 0 70px rgba(130, 190, 255, 0.22), 0 0 130px rgba(80, 150, 255, 0.12);
    filter: brightness(1.45);
}

.lp-circle-1 {
    width: 500px;
    height: 500px;
    top: -180px;
    right: -160px;
    background: rgba(255,255,255,.06);
}

.lp-circle-2 {
    width: 360px;
    height: 360px;
    bottom: -120px;
    left: -100px;
    background: rgba(255,255,255,.05);
}

.lp-circle-3 {
    width: 180px;
    height: 180px;
    bottom: 120px;
    right: 40px;
    background: rgba(255,255,255,.08);
}

/* Contenido central del panel izquierdo */
.lp-left-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    max-width: 380px;
}

/* Icono de marca */
.lp-brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,.15);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,.2);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.lp-brand-icon svg {
    width: 48px;
    height: 48px;
}

/* Nombre y tagline */
.lp-brand-name {
    font-family: 'Manrope', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.lp-brand-tagline {
    font-size: 1.05rem;
    color: rgba(255,255,255,.78);
    line-height: 1.6;
    font-weight: 400;
}

/* Feature pills */
.lp-features {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: center;
    margin-top: .5rem;
}

.lp-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    font-size: .85rem;
    font-weight: 500;
    padding: .4rem .9rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lp-feature-pill svg {
    flex-shrink: 0;
    color: #7dd3fc;
}

/* Pie del panel izquierdo */
.lp-left-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .72rem;
    color: rgba(255,255,255,.45);
    z-index: 1;
    letter-spacing: .03em;
}

/* ═══════════════════════════════════════════════════════════════════
   PANEL DERECHO — formulario
   ═══════════════════════════════════════════════════════════════════ */
.lp-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2.5rem 2rem;
    overflow-y: auto;
    min-height: 100dvh;
}

/* Card del formulario */
.lp-form-card {
    width: 100%;
    max-width: 400px;
}

/* Logo móvil (solo visible cuando el panel izquierdo está oculto) */
.lp-mobile-brand {
    display: none;
    align-items: center;
    gap: .65rem;
    margin-bottom: 2rem;
    font-family: 'Manrope', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #003d9b;
}

.lp-mobile-icon {
    width: 38px;
    height: 38px;
    background: #e8f0fe;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-mobile-icon svg {
    width: 22px;
    height: 22px;
}

/* Títulos del formulario */
.lp-form-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
    margin-bottom: .4rem;
}

.lp-form-subtitle {
    font-size: .925rem;
    color: #64748b;
    margin-bottom: 2.25rem;
    line-height: 1.5;
}

/* Campos del formulario */
.lp-field {
    margin-bottom: 1.25rem;
}

.lp-label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}

/* Contenedor del input con icono */
.lp-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lp-input-icon {
    position: absolute;
    left: 1rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #94a3b8;
    transition: color .2s;
}

/* Input */
.lp-input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 16px; /* 16px obligatorio para evitar zoom iOS */
    color: #0f172a;
    background: #f8fafc;
    border: 1.75px solid #e2e8f0;
    border-radius: .625rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

.lp-input:focus {
    border-color: #003d9b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 61, 155, .1);
}

.lp-input:focus ~ .lp-input-icon,
.lp-input-wrap:focus-within .lp-input-icon {
    color: #003d9b;
}

.lp-input::placeholder { color: #c0c9d9; }

/* Botón ojo contraseña */
.lp-eye-btn {
    position: absolute;
    right: .85rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: .2rem;
    border-radius: .25rem;
    transition: color .2s;
}

.lp-eye-btn:hover { color: #003d9b; }

/* Botón de submit */
.lp-btn-submit {
    width: 100%;
    padding: .9rem 1.5rem;
    margin-top: .75rem;
    background: linear-gradient(135deg, #003d9b 0%, #0052cc 100%);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: .625rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    letter-spacing: .01em;
    box-shadow: 0 4px 20px rgba(0, 61, 155, .28);
    transition: transform .15s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
    appearance: none;
}

.lp-btn-submit:hover {
    background: linear-gradient(135deg, #002d80 0%, #003eb5 100%);
    box-shadow: 0 6px 24px rgba(0, 61, 155, .38);
    transform: translateY(-1px);
}

.lp-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 61, 155, .22);
}

.lp-btn-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ── Fila Recordar / Contactar ──────────────────────────────────── */
.lp-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .15rem;
    margin-bottom: .6rem;
    gap: .5rem;
}

/* Checkbox personalizado */
.lp-check-label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    font-size: .82rem;
    color: #4b5563;
    user-select: none;
    -webkit-user-select: none;
}

.lp-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.lp-check-box {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.75px solid #cbd5e1;
    border-radius: 5px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}

.lp-check-input:checked + .lp-check-box {
    background: #003d9b;
    border-color: #003d9b;
}

.lp-check-box svg {
    opacity: 0;
    transition: opacity .15s;
}

.lp-check-input:checked + .lp-check-box svg {
    opacity: 1;
}

/* Enlace contactar */
.lp-contact-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: #003d9b;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s, gap .2s;
}

.lp-contact-link:hover {
    color: #0052cc;
    gap: .5rem;
    text-decoration: underline;
}

.lp-contact-link svg {
    flex-shrink: 0;
}

/* Pie del formulario */
.lp-form-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    text-align: center;
    font-size: .75rem;
    color: #94a3b8;
    line-height: 1.5;
}

.lp-footer-sep {
    color: #dde3ee;
}

.lp-footer-link {
    color: #003d9b;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}

.lp-footer-link:hover {
    color: #0052cc;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet (768px – 1023px): split 45/55, paneles más compactos */
@media (max-width: 1023px) and (min-width: 768px) {
    .lp-brand-name   { font-size: 1.75rem; }
    .lp-brand-tagline { font-size: .95rem; }
    .lp-features     { display: none; }  /* más espacio en tablet pequeña */
    .lp-left-body    { gap: 1rem; }
}

/* Móvil (<768px): solo panel derecho, stacked */
@media (max-width: 767.98px) {
    html, body { overflow-y: auto; }

    .lp-wrap {
        flex-direction: column;
        background: linear-gradient(160deg, #001f6b 0%, #0052cc 45%, #ffffff 45%);
    }

    /* Ocultar panel izquierdo */
    .lp-left { display: none; }

    /* Panel derecho ocupa todo */
    .lp-right {
        flex: none;
        width: 100%;
        min-height: 100dvh;
        background: transparent;
        padding: 3rem 1.5rem 2.5rem;
        align-items: flex-start;
    }

    .lp-form-card {
        max-width: 100%;
        background: #fff;
        border-radius: 1.5rem 1.5rem 0 0;
        padding: 2rem 1.5rem;
        box-shadow: 0 -4px 32px rgba(0,0,0,.1);
        min-height: calc(100dvh - 3.5rem);
    }

    /* Mostrar logo móvil */
    .lp-mobile-brand { display: flex; }

    /* Card flota sobre el gradiente */
    .lp-wrap {
        background: linear-gradient(160deg, #002080 0%, #0052cc 38%, #f8fafc 38%);
    }
}

/* Mobile muy pequeño (<380px) */
@media (max-width: 379.98px) {
    .lp-form-title  { font-size: 1.5rem; }
    .lp-right       { padding: 2.5rem 1.1rem 2rem; }
    .lp-form-card   { padding: 1.5rem 1.1rem; }
}

/* Spinner para el botón durante carga */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
