/* Bloqueo de scroll global cuando un panel está abierto */
body.panel-open {
    overflow: hidden !important;
    height: 100vh !important;


}

/* ==========================================================================
   NUEVO LOGIN PREMIUM: VELOCIDAD Y CRISTAL (GLASSMORPHISM)
   ========================================================================== */
/* Fondo animado inmersivo */
body.login-page {
    background: linear-gradient(-45deg, #0f172a, #1e3c72, #2a5298, #4318FF);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* El contenedor de cristal */
body.login-page .login-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 40px;
    color: white;
}

/* Textos y Logo */
body.login-page .login-title {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.login-page .login-header img.logo {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    margin-bottom: 20px;
    max-height: 60px;
}

/* Ocultar el fondo blanco de las tarjetas viejas en el login */
body.login-page .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Inputs Estilo Cyber */
body.login-page .input-group label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 8px;
}

body.login-page .input-group input,
body.login-page .input-group select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

/* Efecto foco en inputs */
body.login-page .input-group input:focus,
body.login-page .input-group select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    outline: none;
}

/* Placeholder claro */
body.login-page .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Botón de Ingreso Neón */
body.login-page #btn-consultar {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
    color: white;
}

body.login-page #btn-consultar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 210, 255, 0.5);
}

/* Checkbox recordar */
body.login-page .checkbox-group label {
    color: rgba(255, 255, 255, 0.8);
}

/* Adaptar textos de selección de cuentas al modo oscuro */
body.login-page #seleccion-cuenta-section h2,
body.login-page #seleccion-cuenta-section p {
    color: white;
}

body.login-page .cuenta-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

body.login-page .cuenta-item h4 {
    color: white;
}

body.login-page .cuenta-detalle {
    color: rgba(255, 255, 255, 0.8);
}

body.login-page .cuenta-item .cuenta-info-principal span.badge-cliente {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   PASO 2: SPLIT SCREEN Y RESPONSIVIDAD INTELIGENTE
   ========================================================================== */
/* Por defecto (Móvil) ocultamos el marketing izquierdo */
.login-marketing {
    display: none;
}

.login-form-container {
    width: 100%;
}

/* --- VISTA DESKTOP (PC) --- */
@media (min-width: 769px) {

    /* Ocultar marketing cuando el portal está activo */
    body:not(.login-page) .login-marketing {
        display: none !important;
    }

    body:not(.login-page) .login-form-container {
        width: 100% !important;
        padding: 0 !important;
    }

    body.login-page .login-wrapper {
        display: flex;
        flex-direction: row;
        padding: 0 !important;
        max-width: 1000px !important;
        width: 100%;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
    }

    .login-marketing {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 50%;
        padding: 50px;
        background: rgba(0, 0, 0, 0.3);
        /* Fondo oscuro transparente */
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
    }

    .logo-marketing {
        max-height: 80px;
        width: auto;
        max-width: 90%;
        object-fit: contain;
        margin-bottom: 30px;
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
    }

    .login-marketing h2 {
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 1.2;
        margin-bottom: 15px;
        color: #fff;
    }

    .login-marketing p {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.5;
    }

    /* Animación de pulso óptico */
    .cyber-lines {
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(67, 24, 255, 0.4), transparent);
        transform: skewX(-20deg);
        animation: cyber-sweep 4s infinite linear;
    }

    @keyframes cyber-sweep {
        0% {
            left: -100%;
        }

        50%,
        100% {
            left: 200%;
        }
    }

    .login-form-container {
        width: 50%;
        padding: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Ocultar el logo superior del formulario porque ya está en el panel izquierdo */
    body.login-page .login-header img.logo {
        display: none;
    }

    body.login-page .login-header {
        text-align: left;
    }

    body.login-page .login-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
}

/* --- VISTA iOS (iPhone/iPad) --- */
body.is-ios.login-page {
    align-items: flex-end;
    /* Ancla el formulario abajo */
}

body.is-ios.login-page .login-wrapper {
    border-radius: 35px 35px 0 0 !important;
    margin: 0;
    width: 100%;
    border-bottom: none;
    padding-bottom: 50px !important;
    /* Espacio para la barra de inicio de iPhone */
    animation: slideUpLogin 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideUpLogin {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

#modal-ayuda-box {
    max-width: 420px !important;
    width: 90% !important;
    margin: 10vh auto !important;
    padding: 25px !important;
    border-radius: 16px !important;


}

.wa-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
    cursor: pointer;


}

.wa-card:hover {
    background-color: #f8f9fa;
    border-color: #25D366;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);


}

.wa-card-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #f8f9fa;
    border-radius: 50%;
    color: #4318ff;
    font-size: 1.1rem;
    margin-right: 15px;


}

.wa-card-center {
    display: flex;
    flex-direction: column;
    flex-grow: 1;


}

.wa-card-center strong {
    font-size: 1rem;
    color: #2b3674;
    margin-bottom: 3px;


}

.wa-card-center span {
    font-size: 0.8rem;
    color: #a3aed1;


}

.wa-card-right {
    color: #25D366;
    font-size: 1.6rem;
    margin-left: 15px;


    /* Modals General */
}

.modal-content-sm {
    max-width: 500px;
}

.modal-content-md {
    max-width: 600px;
}

.modal-content-lg {
    max-width: 800px;
}

/* Modal Ayuda */
.modal-ayuda-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.modal-ayuda-subtitle {
    color: #6c757d;
    margin-bottom: 25px;
}

.modal-ayuda-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Modal Upgrade */
#planes-loader {
    text-align: center;
}

#upgrade-docs {
    margin-top: 20px;
}

.upgrade-docs-text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.upgrade-docs-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.input-group-flexible {
    flex: 1 1 auto;
    min-width: 250px;
    max-width: max-content;
}

#btn-enviar-upgrade {
    margin-top: 20px;
}

/* Modal Hitcoins */
.hitcoins-header {
    text-align: center;
    margin-bottom: 20px;
}

.hitcoins-icon {
    font-size: 3em;
}

.hitcoins-title {
    color: #1e3c72;
    margin-top: 10px;
}

.hitcoins-subtitle {
    font-size: 1.1em;
    line-height: 1.5;
    color: #444;
    margin-bottom: 20px;
}

.hitcoins-disclaimer-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #1e3c72;
}

.hitcoins-disclaimer-text {
    margin: 0;
    font-size: 0.95em;
}

.hitcoins-actions {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.hitcoins-link {
    text-align: center;
    color: #6c757d;
    text-decoration: underline;
    font-size: 0.9em;
}

/* Tarjetas de Upgrade */
.plan-card-upgrade {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    width: 280px;
    max-width: 100%;
    flex: 0 1 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;


}

.plan-card-upgrade:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(67, 24, 255, 0.15);
    border-color: #4318FF;


}

.plan-image-container {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;


}

.plan-image-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s;


}

.plan-card-upgrade:hover .plan-image-container img {
    transform: scale(1.1);


}

.plan-content-box {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;


}

.plan-title {
    margin: 0;
    color: #1e293b;
    font-size: 1.25em;
    line-height: 1.3;
    font-weight: 700;


}

.plan-beneficio {
    display: block;
    font-size: 0.85em;
    color: #64748b;
    margin-top: 8px;
    min-height: 2.6em;


}

.plan-precio-box {
    margin-top: 15px;
    margin-bottom: 20px;


}

.plan-precio-box .precio-numero {
    display: block;
    font-size: 2em;
    font-weight: 800;
    color: #4318FF;
    letter-spacing: -1px;


}

.plan-precio-box .precio-detalle {
    font-size: 0.85em;
    color: #94a3b8;
    display: block;
    margin-top: 2px;


}

.btn-seleccionar-plan {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    background-color: #f1f5f9;
    color: #334155;
    border: none;
    transition: all 0.2s;


}

.plan-card-upgrade:hover .btn-seleccionar-plan {
    background-color: #4318FF;
    color: white;


    /* Boton Mejorar Plan */
}

@keyframes pulse-upgrade {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(67, 24, 255, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(67, 24, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(67, 24, 255, 0);
    }

}

.btn-upgrade-pulse {
    background: linear-gradient(135deg, #4318FF, #009ee3);
    color: white !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    animation: pulse-upgrade 2s infinite;
    transition: all 0.2s;

}

.btn-upgrade-pulse:hover {
    animation: none;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(67, 24, 255, 0.3);


    /* Animación de Brillo (Shine) para botones premium */
}

@keyframes shine-effect {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }


}

.btn-rewards-gold {
    background: linear-gradient(120deg, #f6d365 0%, #fda085 50%, #f6d365 100%);
    background-size: 200% auto;
    color: #8c3a00 !important;
    /* Texto oscuro para buen contraste con el dorado */
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(253, 160, 133, 0.3);
    animation: shine-effect 3s linear infinite;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.4);


}

.btn-rewards-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(253, 160, 133, 0.5);
    color: #5c2600 !important;


    /* 1. Ocultar el header externo viejo SOLO cuando el portal está activo */
}

body:not(.login-page) .login-header {
    display: none !important;


    /* --- HORUS IT COIN DASHBOARD --- */
}

.coins-dashboard-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;

}

.coins-info {
    display: flex;
    align-items: center;
    gap: 10px;

}

.coins-label {
    color: #b8860b;
    font-size: 0.9em;
    font-weight: 600;
    margin: 0;

}

.coins-value {
    font-size: 1.3em;
    font-weight: 800;
    color: #2b3674;
    margin: 0;


    /* --- SALDO CERO --- */
}

.sin-deuda-text {
    display: block;
    color: #10b981;
    /* Verde éxito */
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 10px;


}

.saldo-monto-cero {
    font-size: 2rem !important;
    opacity: 0.6;
    /* Un poco de opacidad para restarle peso visual */


    /* --- BOTON PAGAR FACTURAS --- */
}

#btn-abrir-modal-pago {
    padding: 10px 24px;
    font-weight: 600;
    letter-spacing: 0.3px;


    /* 2. Estilos del nuevo Header interior */
}

.dashboard-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 35px;
    /* Aumentado para que respire mejor */
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;


    /* Branding (Izquierda) */
}

.dashboard-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;

}

.logo-dashboard {
    max-width: 170px;
    /* Tamaño del logo interior */
    height: auto;

}

.portal-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;


    /* Usuario (Derecha) */
}

.dashboard-user-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Alinea textos y botones a la derecha */

}

.dashboard-user-area #bienvenida-cliente {
    margin: 0;
    font-size: 1.4rem;
    color: #2b3674;
    font-weight: 700;


    /* Responsivo para Celulares */
}

@media (max-width: 768px) {}

.dashboard-header-modern {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;

}

.dashboard-brand,
.dashboard-user-area {
    align-items: center;

}

.portal-subtitle {
    margin-left: 0;



    /* --- iOS PWA PROMPT --- */
}

#ios-pwa-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 15px 20px 30px 20px;
    /* Padding bottom extra para la barra de inicio del iPhone */
    box-sizing: border-box;
    animation: slideUpPwa 0.5s ease-out;

}

.ios-pwa-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;

}

.ios-pwa-text {
    display: flex;
    flex-direction: column;
    gap: 4px;

}

.ios-pwa-text strong {
    color: #2b3674;
    font-size: 15px;

}

.ios-pwa-text span {
    color: #495057;
    font-size: 14px;

}

.ios-pwa-close {
    font-size: 28px;
    color: #a3aed1;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;

}

@keyframes slideUpPwa {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }


}

.badge-tipo-cuenta {
    font-size: 0.65em;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-cliente {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.badge-proveedor {
    background-color: #fce7f3;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

/* =========================================
   APP WALLET HEADER (Estilo Billetera)
   ========================================= */
.app-wallet-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4318FF 100%);
    padding: 30px 20px 40px 20px;
    color: white;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    margin: -20px -20px 25px -20px;
    box-shadow: 0 10px 25px rgba(67, 24, 255, 0.25);

}

.app-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.greeting-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.app-top-actions .btn-icon {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    margin-left: 15px;
    cursor: pointer;
    position: relative;
}

/* Tarjeta de Saldo Glassmorphism */
.wallet-card-main {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);

}

.wallet-label {
    font-size: 0.95rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.wallet-balance {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wallet-actions {
    display: flex;
    gap: 15px;
}

.wallet-action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 16px 10px;
    border-radius: 14px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;

}

.wallet-action-btn i {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.wallet-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.wallet-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border: none;
}

/* Banner de Puntos */
.points-banner {
    background: rgba(0, 0, 0, 0.25);
    margin-top: 15px;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;

}

.points-banner:active {
    transform: scale(0.98);
}

.points-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-right: 8px;
    color: #f6d365;
}

/* =========================================
   BOTTOM NAV (Estilo App)
   ========================================= */
.bottom-nav {
    display: none !important;
}

/* BASE GLOBAL PARA BURBUJAS DE NAVEGACIÓN */
.nav-badge {
    position: absolute;
    background-color: #ff3b30;
    color: white;
    font-size: 0.75rem !important;
    font-weight: bold;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bottom-nav .nav-item {
    position: relative;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08);
        z-index: 10005 !important;
        padding: 8px 4px 12px 4px;
        justify-content: space-around;
        align-items: center;
        border-top-left-radius: 25px;
        border-top-right-radius: 25px;
    }

    #resultado-section {
        padding-bottom: 110px;
    }

    .bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #9ca3af;
        font-weight: 600;
        gap: 4px;
        padding: 4px 1px;
        min-width: 40px;
    }

    .bottom-nav .nav-item span {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55px;
        text-align: center;
        display: block;
    }

    .bottom-nav .nav-item.active {
        color: #4318FF;
    }

    .bottom-nav .nav-item i {
        font-size: 1.7rem !important;
        margin-bottom: 4px !important;
    }

    .nav-badge {
        top: -6px;
        right: -2px;
    }

    .nav-item-center {
        position: relative;
        top: -25px;
    }

    .btn-qr-pay {
        background: linear-gradient(135deg, #2a5298, #4318FF);
        color: white;
        border: none;
        border-radius: 50%;
        width: 65px;
        height: 65px;
        font-size: 2rem;
        box-shadow: 0 6px 15px rgba(67, 24, 255, 0.4);
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
}

.slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    /* Oculto a la derecha por defecto */
    width: 100%;
    height: 100vh;
    background-color: #f4f7fe;
    z-index: 10000;
    /* Por encima de todo */
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    padding-bottom: 120px;

}

.slide-panel.open {
    right: 0;
    /* Desliza hacia adentro */

}

.slide-header {
    background: linear-gradient(135deg, #1e3c72, #4318FF);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}

.slide-header i {
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;


    /* =========================================
   SLIDING PANELS (App Screens)
   ========================================= */
}

.slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    /* Oculto a la derecha por defecto */
    width: 100%;
    height: 100vh;
    background-color: #f4f7fe;
    z-index: 10000;
    /* Por encima de todo */
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    padding-bottom: 120px;

}

.slide-panel.open {
    right: 0;
    /* Desliza hacia adentro */

}

.slide-header {
    background: linear-gradient(135deg, #1e3c72, #4318FF);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

}

.slide-header i {
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;


}

.slide-content .apartado {
    display: block !important;
    opacity: 1 !important;
}

.slide-panel-left {
    left: -100% !important;
    right: auto !important;
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

}

.slide-panel-left.open {
    left: 0 !important;


    /* Bloqueo estricto de Nav en Login */
}

body.login-page .bottom-nav {
    display: none !important;



    /* =========================================
   ACTION SHEET (Menú Desplegable Inferior)
   ========================================= */
}

.action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10020;
    /* Máxima prioridad, por encima del nav */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;

}

.action-sheet-overlay.show {
    opacity: 1;
}

.action-sheet {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 25px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);

}

.action-sheet-overlay.show .action-sheet {
    transform: translateY(0);
}

.action-sheet-header h3 {
    margin: 0 0 20px 0;
    color: #1e3c72;
    font-size: 1.2rem;
    text-align: center;
}

.action-btn {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2b3674;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;

}

.action-btn i {
    font-size: 1.3rem;
}

.action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.action-btn.btn-danger {
    color: #dc3545;
    background: #fff0f0;
    border-color: #ffcdd2;
}

.action-btn.btn-danger:hover {
    background: #ffe0e0;
}

.action-btn.btn-cancel {
    background: transparent;
    border: none;
    color: #6c757d;
    margin-top: 10px;
    margin-bottom: 0;
    font-weight: 500;
}

.action-btn.btn-cancel:hover {
    background: transparent;
    color: #495057;
    text-decoration: underline;
}

/* =========================================
   COMPACT VIEW FACTURAS (Móvil)
   ========================================= */
@media (max-width: 768px) {}

.factura-item {
    padding: 8px 12px !important;
    margin-bottom: 6px !important;
    min-height: auto !important;

}

.factura-item span[data-label] {
    font-size: 0.85rem !important;
    padding: 2px 0 !important;

}

.factura-item span[data-label]::before {
    font-size: 0.75rem !important;
    margin-bottom: 2px !important;

}

.nc-vinculada-item {
    padding-left: 25px !important;
    margin-top: -6px !important;

}

.wallet-balance {
    font-size: 2.2rem !important;



    /* =========================================
   MODAL QR FIX (Centrado y Responsivo)
   ========================================= */

}

#qr-image {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 20px auto !important;
    width: 100% !important;
    text-align: center !important;

    /* Esto asegura que el canvas o imagen que genera la librería se comporte como bloque centrado */
}

#qr-image canvas {
    display: block !important;
    margin: 0 auto !important;
    max-width: 240px !important;
    height: auto !important;
    border: 8px solid white;
    border-radius: 10px;

}

#qr-image img {
    display: none !important;
    /* Mantiene oculto el clon generado por la librería */


    /* =========================================
   SERVICE STATUS BANNER (Grilla 3 Columnas)
   ========================================= */
}

.service-status-banner {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px 15px;
    margin-top: 15px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Laterales fijos, centro dinámico expansivo */
    gap: 15px;
    align-items: start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);


}

.status-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-col:nth-child(1) {
    align-items: flex-start;
    text-align: left;
}

.status-col:nth-child(2) {
    align-items: flex-start;
    text-align: left;
    padding-left: 10px;
}

.status-col:nth-child(3) {
    align-items: flex-end;
    text-align: right;
}

.status-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.85;
    color: #e2e8f0;
    font-weight: 700;


}

.plan-name-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

}

.header-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    color: #1e3c72;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

}

.header-status-badge.estado-servicio-con-falta-de-pago {
    background: #fee2e2;
    color: #b91c1c;
}

.header-status-badge.estado-servicio-activo {
    background: #dcfce7;
    color: #15803d;
}

/* --- LAYOUT MOBILE 2 COLUMNAS PARA BANNER DE ESTADO --- */
@media (max-width: 768px) {}

.service-status-banner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 15px;

    /* Fila 1 Izquierda: Estado */
}

.status-col:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    align-items: flex-start;
    text-align: left;
    padding-left: 0;

    /* Fila 2 Izquierda: Plan Actual */
}

.status-col:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    align-items: flex-start;
    text-align: left;
    padding-left: 0;

    /* Columna Derecha: Botón Upgrade */
}

.status-col:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    justify-content: center;
    align-items: center;
    /* Centrado perfecto */

    /* Restaurar el label para contexto */
}

.status-col:nth-child(3) .status-label {
    display: block;
    text-align: center;
    margin-bottom: 8px;

    /* Botón circular latiendo */
}

.status-col:nth-child(3) .btn-upgrade-pulse {
    width: 55px;
    height: 55px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(67, 24, 255, 0.4);

    /* Ocultar la palabra en celular */
}

.status-col:nth-child(3) .btn-upgrade-pulse .upgrade-text {
    display: none;

    /* Agrandar el cohete y centrarlo */
}

.status-col:nth-child(3) .btn-upgrade-pulse i {
    margin: 0;
    font-size: 1.5rem;



}

.btn-upgrade-micro {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 82, 212, 0.3);
    transition: transform 0.2s;
    white-space: nowrap;

}

.btn-upgrade-micro:hover {
    transform: scale(1.05);
    color: white;
}

/* =========================================
   PREMIUM PROFILE CARD
   ========================================= */
.premium-profile-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);

}

.premium-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 15px;

}

.premium-profile-info {
    flex: 1;
    padding-right: 15px;
}

.premium-client-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;

}

.premium-name {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
    font-weight: 800;
    line-height: 1.2;
}

.premium-avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.premium-avatar {
    width: 75px;
    height: 75px;
    min-width: 75px;
    min-height: 75px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    background-color: #e2e8f0;
    /* Fondo gris por si tarda en cargar */

}

.premium-avatar-wrapper:hover .premium-avatar {
    transform: scale(1.05);
}

.premium-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #4318FF;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    border: 2px solid #ffffff;

}

.premium-profile-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.premium-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    color: #4318FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;

}

.premium-detail-text {
    display: flex;
    flex-direction: column;
}

.premium-detail-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.premium-detail-value {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
}

/* Selector de Avatares (Scroll Horizontal) */
.premium-avatar-selector {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    animation: fadeIn 0.3s;

}

.premium-avatar-selector h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #475569;
}

.avatar-scroll-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    /* Permite que bajen a la siguiente línea */
    justify-content: center;
    max-height: 260px;
    /* Alto máximo antes de scrollear */
    overflow-y: auto;
    /* Scroll vertical */
    padding: 10px;
    scrollbar-width: thin;

}

.avatar-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.avatar-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.avatar-option {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #f1f5f9;

}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #4318FF;
}

.header-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- CORRECCIÓN PREMIUM HEADER MOBILE --- */
@media (max-width: 768px) {
    .app-top-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 15px;
        padding: 5px;
        background: transparent;
        border: none;
        height: auto;
        margin-top: -10px;
    }

    .btn-icon#btn-perfil-header {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        margin: 0;
        overflow: visible;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-avatar-img {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
        object-fit: cover;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .notification-container {
        position: relative;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        cursor: pointer;
    }

    .notification-bell {
        font-size: 20px;
        color: #64748b;
    }

    .notification-badge {
        position: absolute;
        top: -3px;
        right: -3px;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        background-color: #ef4444;
        color: white;
        padding: 0;
        z-index: 10;
        border: 1.5px solid white;
    }

    .app-logo {
        max-height: 30px;
    }

    .service-status-banner {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 12px 15px;
    }

    .status-col:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        align-items: flex-start;
        text-align: left;
        padding-left: 0;
    }

    .status-col:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        align-items: flex-start;
        text-align: left;
        padding-left: 0;
    }

    .status-col:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        justify-content: center;
        align-items: center;
    }

    .status-col:nth-child(3) .status-label {
        display: block;
        text-align: center;
        margin-bottom: 8px;
    }

    .status-col:nth-child(3) .btn-upgrade-pulse {
        width: 55px;
        height: 55px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        box-shadow: 0 4px 15px rgba(67, 24, 255, 0.4);
    }

    .status-col:nth-child(3) .btn-upgrade-pulse .upgrade-text {
        display: none;
    }

    .status-col:nth-child(3) .btn-upgrade-pulse i {
        margin: 0;
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   LAYOUT DE ESCRITORIO (PC / TABLETS GRANDES)
   ========================================================================== */
@media (min-width: 769px) {

    /* 1. Sidebar y Menú */
    .bottom-nav {
        display: flex !important;
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 40px;
        background: #ffffff;
        border-top: none;
        border-right: 1px solid #e2e8f0;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.03);
        border-radius: 0;
        z-index: 1000;
    }

    .bottom-nav .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 16px 30px;
        width: 100%;
        border-radius: 0;
        transition: all 0.3s ease;
    }

    .bottom-nav .nav-item:hover {
        background-color: #f8fafc;
        border-left: 4px solid #4318FF;
    }

    .bottom-nav .nav-item i {
        margin-right: 15px;
        margin-bottom: 0 !important;
        font-size: 1.3rem !important;
        width: 25px;
        text-align: center;
    }

    .bottom-nav .nav-item span {
        font-size: 1.05rem;
        font-weight: 500;
    }

    .nav-badge {
        top: 10px;
        left: 35px;
        transform: none;
    }

    .bottom-nav .nav-item-center {
        position: relative;
        top: 0;
        transform: none;
        width: 100%;
        margin: 20px 0;
        display: flex;
        justify-content: center;
    }

    .btn-qr-pay {
        width: 85%;
        height: 50px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #4318FF;
        color: white;
    }

    .btn-qr-pay::after {
        content: " Pagar con QR";
        font-size: 1rem;
        font-weight: 600;
        margin-left: 10px;
        font-family: inherit;
    }

    /* 2. Login y Dashboard Principal */
    .login-wrapper.portal-activo {
        margin-left: 260px;
        max-width: calc(100% - 260px);
        padding: 40px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .login-wrapper.portal-activo .login-main {
        max-width: 100% !important;
        width: 100%;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    #resultado-section {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
        padding-bottom: 40px;
        transition: max-width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        transform-origin: left top;
    }

    body.panel-open #resultado-section {
        max-width: 450px !important;
        margin-left: 20px !important;
    }

    .app-wallet-header {
        margin: 0 0 25px 0 !important;
        border-radius: 25px !important;
    }

    /* 3. Selección de Cuenta en Desktop */
    .login-main {
        max-width: 850px !important;
        width: 100%;
        margin: 0 auto;
    }

    #consulta-section.card {
        max-width: 420px !important;
        margin: 0 auto;
    }

    #seleccion-cuenta-section.card {
        max-width: 100% !important;
        width: 100%;
        margin: 40px auto;
    }

    #lista-cuentas {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    #lista-cuentas .cuenta-item {
        margin-bottom: 0;
        height: 100%;
    }

    /* 4. Paneles Deslizables */
    .slide-panel,
    .slide-panel-left {
        width: 650px !important;
        right: -650px !important;
        left: auto !important;
        border-left: 1px solid #e2e8f0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
        transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    }

    .slide-panel.open,
    .slide-panel-left.open {
        right: 0 !important;
    }

    /* 5. Tabla de Facturas */
    #panel-facturas .factura-item {
        display: grid !important;
        grid-template-columns: 2.5fr 1.2fr 1.2fr 1fr 90px;
        align-items: center;
        gap: 15px;
        padding: 12px 15px !important;
        border-bottom: 1px solid #f1f5f9;
    }

    #panel-facturas .factura-header {
        background-color: #f8fafc !important;
        border-bottom: 2px solid #e2e8f0 !important;
        border-radius: 8px 8px 0 0;
        margin-bottom: 5px;
    }

    #panel-facturas .factura-header span {
        font-weight: 700 !important;
        color: #475569 !important;
        text-transform: uppercase;
        font-size: 0.75rem !important;
        letter-spacing: 0.5px;
    }

    #panel-facturas .factura-item>span {
        display: block;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #panel-facturas .factura-item .accion-cell {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .accion-impaga {
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .item-checkbox {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #4318FF;
    }

    #panel-facturas .nc-vinculada-item {
        border-top: none !important;
    }

    #panel-facturas .nc-vinculada-item span:first-child {
        padding-left: 20px;
    }
}

/* Ocultar menú y paneles en la pantalla de Login */
body.login-page .slide-panel,
body.login-page .slide-panel-left,
body.login-page .bottom-nav {
    display: none !important;
}

/* ========================================================================== */
/* FIX: Espaciado inferior para evadir el Bottom Nav en Modal de Upgrade      */
/* ========================================================================== */
#modal-upgrade .modal-content {
    padding-bottom: 100px !important;
    /* Asegura que el scroll baje más allá del menú */
}

#form-upgrade {
    margin-bottom: 40px;
    /* Separación extra directa debajo del botón de envío */
}


/* =========================================
   NEWS TICKER WIDGET
   ========================================= */
.news-ticker-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin: 0 auto 25px auto;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    width: 100%;
    position: relative;
}

.news-ticker-label {
    background: linear-gradient(135deg, #1e3c72, #4318FF);
    color: white;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    z-index: 2;
    white-space: nowrap;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.news-ticker-scroll {
    display: flex;
    gap: 50px;
    padding: 0 20px;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
}

.news-ticker-scroll span {
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
}

.news-ticker-scroll span i {
    color: #4318FF;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Desplaza exactamente la mitad (los items originales) */
}

.news-ticker-container:hover .news-ticker-scroll {
    animation-play-state: paused;
    /* Pausa si el cliente pone el mouse arriba */
}

@media (max-width: 768px) {

    /* Ajuste específico para pantallas móviles donde el menú inferior es visible */
    #btn-enviar-upgrade {
        margin-bottom: 60px !important;
    }
}

/* ========================================================================== */
/* ESTILOS PARA PANEL LATERAL DE MOTIVO DE RECHAZO                            */
/* ========================================================================== */
.panel-motivo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.panel-motivo-title {
    margin: 0;
    color: #9f1239;
    font-size: 1.2em;
    font-weight: 600;
}

.btn-cerrar-panel {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 5px;
}

.btn-cerrar-panel:hover {
    color: #0f172a;
}

.panel-motivo-body {
    padding: 20px;
    color: #334155;
    line-height: 1.6;
    font-size: 15px;
}

.motivo-caja-alerta {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff1f2;
    border-left: 4px solid #fda4af;
    border-radius: 6px;
    color: #881337;
}

/* Limitar ancho visual del input de documento */
body.login-page #documento {
    max-width: 180px;
}

/* =========================================
   PROMO CAROUSEL WIDGETS
   ========================================= */
.promo-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 25px;
    position: relative;
    padding: 10px 0;
}

.promo-carousel-wrapper::before,
.promo-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 2;
}

.promo-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f4f7fe, transparent);
}

.promo-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #f4f7fe, transparent);
}

.promo-track {
    display: flex;
    gap: 15px;
    width: max-content;
    animation: carouselScroll 25s linear infinite;
}

.promo-track:hover {
    animation-play-state: paused;
}

.promo-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 16px;
    color: white;
    width: 280px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.promo-card:hover {
    transform: translateY(-3px);
}

.promo-card i {
    font-size: 2rem;
    opacity: 0.9;
}

.promo-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.promo-info p {
    margin: 3px 0 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Gradientes Premium para las tarjetas */
.bg-gradient-1 {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.bg-gradient-4 {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.bg-gradient-5 {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.bg-gradient-6 {
    background: linear-gradient(135deg, #FDC830, #F37335);
}

@keyframes carouselScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 7.5px));
    }

    /* Desplaza exactamente los primeros 6 items */
}

/* ==========================================================================
   OPTIMIZACIÓN MOBILE: ENCAJE PERFECTO (NO SCROLL / ABOVE THE FOLD)
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. Etiqueta de Novedades: Solo Rayo */
    .news-ticker-label {
        font-size: 0 !important;
        /* Oculta la palabra */
        padding: 10px 15px !important;
    }

    .news-ticker-label i {
        font-size: 1.1rem !important;
        /* Mantiene el rayo visible */
        margin: 0 !important;
    }

    .news-ticker-container {
        margin-bottom: 12px !important;
        border-radius: 8px !important;
    }

    /* 2. Achicar la Billetera Azul y sus márgenes */
    .app-wallet-header {
        padding: 15px 15px 20px 15px !important;
        margin: -20px -20px 15px -20px !important;
    }

    .app-top-bar {
        margin-bottom: 10px !important;
    }

    .greeting-text {
        font-size: 1.1rem !important;
    }

    /* 3. Achicar Tarjeta Principal de Pago */
    .wallet-card-main {
        padding: 12px 15px !important;
    }

    .wallet-balance {
        font-size: 2rem !important;
        margin-bottom: 10px !important;
    }

    .wallet-action-btn {
        padding: 8px !important;
        font-size: 0.85rem !important;
    }

    .wallet-action-btn i {
        font-size: 1.2rem !important;
        margin-bottom: 4px !important;
    }

    /* 4. Ajustar Puntos y Estado (Súper compactos) */
    .points-banner {
        padding: 8px 15px !important;
        margin-top: 10px !important;
    }

    .points-value {
        font-size: 1.2rem !important;
    }

    .service-status-banner {
        padding: 8px 12px !important;
        margin-top: 10px !important;
        gap: 5px 10px !important;
    }

    .status-col:nth-child(3) .btn-upgrade-pulse {
        width: 40px !important;
        height: 40px !important;
    }

    .status-col:nth-child(3) .btn-upgrade-pulse i {
        font-size: 1.2rem !important;
    }

    /* 5. Achicar Carrusel Promocional */
    .promo-carousel-wrapper {
        margin-bottom: 85px !important;
        padding: 0 !important;
    }

    .promo-card {
        width: 220px !important;
        /* Un poco más ancho para el nuevo texto */
        padding: 16px 15px !important;
        /* Más altura: 16px arriba y abajo */
        gap: 12px !important;
        border-radius: 14px !important;
    }

    .promo-card i {
        font-size: 1.6rem !important;
        /* Icono más grande */
    }

    .promo-info h4 {
        font-size: 0.95rem !important;
        /* Título principal más grande */
    }

    .promo-info p {
        font-size: 0.8rem !important;
        /* Subtítulo más legible */
        margin-top: 3px !important;
    }
}

/* ==========================================================================  
   FIX: MODALES SOBRE MENU LATERAL (DESKTOP)  
   ========================================================================== */
.modal {
    z-index: 99999 !important;
    /* Fuerza al modal a estar por encima de cualquier sidebar o navbar */
}


/* Responsive Mobile Table para Facturas */
.tabla-facturas-responsive {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

@media (max-width: 768px) {

    .tabla-facturas-responsive th,
    .tabla-facturas-responsive td {
        padding: 8px 2px !important;
        font-size: 0.75rem !important;
    }

    .tabla-facturas-responsive td:nth-child(1),
    .tabla-facturas-responsive th:nth-child(1) {
        white-space: normal !important;
        word-break: break-all;
        max-width: 100px;
    }

    .tabla-facturas-responsive .estado-factura {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
    }
}

/* Micro-Ajustes UI: Forzar Encogimiento de Columna Final */
@media (max-width: 768px) {

    .tabla-facturas-responsive th:last-child,
    .tabla-facturas-responsive td:last-child {
        width: 1%;
        white-space: nowrap !important;
        padding-right: 5px !important;
    }
}

/* =========================================
   QUICK PAY (BENTO GRID TUNNEL)
   ========================================= */
.qp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.qp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: white;
}

.qp-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)) brightness(1.1);
}

.qp-brand i {
    color: #00d2ff;
    font-size: 28px;
}

.qp-status-badge {
    background: #fef3c7;
    color: #d97706;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.15);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(217, 119, 6, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
    }
}

.qp-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.qp-bento-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.qp-card-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a3aed1;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qp-saldo-hero {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.qp-deuda-monto {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    color: #1e3c72;
    line-height: 1;
    margin-bottom: 8px;
}

.qp-deuda-detalle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.qp-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qp-btn-pay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s ease;
}

.qp-btn-pay:hover {
    transform: translateY(-2px);
}

.qp-btn-pay .left-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qp-btn-pay i {
    font-size: 24px;
}

.qp-btn-mp {
    background: #009ee3;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 158, 227, 0.25);
}

.qp-btn-qr {
    background: #4318FF;
    color: white;
    box-shadow: 0 6px 15px rgba(67, 24, 255, 0.25);
}

.qp-btn-transfer {
    background: #f8fafc;
    color: #2b3674;
    border: 1px solid #e2e8f0;
}

.qp-invoice-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.qp-invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.qp-invoice-item:last-child {
    border-bottom: none;
}

.qp-invoice-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qp-invoice-number {
    font-weight: 700;
    color: #2b3674;
    font-size: 16px;
}

.qp-invoice-date {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qp-invoice-amount {
    font-weight: 800;
    color: #4318FF;
    font-size: 18px;
}

.qp-reassurance {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qp-reassurance i {
    color: #00d2ff;
    font-size: 20px;
}

@media (max-width: 768px) {
    .qp-deuda-monto {
        font-size: 2.8rem;
    }

    .qp-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .qp-status-badge {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   FIX: CONTRASTE DE TEXTO EN MODALES SOBRE FONDO LOGIN (QUICK PAY)
   ========================================================================== */
body.login-page .modal-content {
    color: #334155 !important;
}

body.login-page .modal-content h2,
body.login-page .modal-content h3,
body.login-page .modal-content p {
    color: #1e293b !important;
}

body.login-page .modal-content strong {
    color: #0f172a !important;
}

body.login-page .modal-content .modal-close {
    color: #64748b !important;
}

body.login-page .modal-content .modal-close:hover {
    color: #0f172a !important;
}