/**
 * ====================================================================
 * TEMA NAVIDEÑO INTEGRAL - SUBAGENTE BANCARIO DIGITAL
 * ====================================================================
 * Transforma el color de fondo y elementos clave de la interfaz a un
 * elegante ambiente navideño (Verde Pino Nórdico, Rojo Santa y Dorado Cálido)
 * para que las nieves cayendo resalten con total nitidez y belleza.
 *
 * Solo aplica cuando la clase .theme-christmas está activa en el body.
 * Cuando se desactiva, el sitio vuelve 100% a su diseño original intacto.
 */

/* 1. PALETA DE COLORES & FONDO NAVIDEÑO */
body.theme-christmas {
    --ink: #f8fafc !important;
    --muted: #94a3b8 !important;
    --green: #10b981 !important;
    --line: #184439 !important;
    --bg: #071915 !important;
    --red: #ef4444 !important;
    --gold: #f59e0b !important;

    background: #071915 radial-gradient(ellipse at 50% 0%, #103c30 0%, #071915 60%, #04120f 100%) !important;
    background-attachment: fixed !important;
    color: #f1f5f9 !important;
    transition: background 0.3s ease, color 0.3s ease !important;
}

/* 2. LIENZO DE NIEVE CAYENDO (CANVAS) */
#christmas-snow-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 99998 !important;
    user-select: none !important;
}

/* 3. CINTA DE SALUDO FESTIVO SUPERIOR */
.christmas-greeting-bar {
    background: linear-gradient(90deg, #991b1b 0%, #008f78 35%, #991b1b 70%, #d97706 100%) !important;
    background-size: 200% auto !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 8px 16px !important;
    position: relative !important;
    z-index: 10001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35) !important;
    letter-spacing: 0.2px !important;
    animation: festiveShimmer 7s linear infinite !important;
}

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

.christmas-greeting-text {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.christmas-greeting-text strong {
    color: #fff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}

.christmas-greeting-close {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 13px !important;
    line-height: 1 !important;
    margin-left: 12px !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.christmas-greeting-close:hover {
    background: rgba(239, 68, 68, 0.8) !important;
    transform: scale(1.15) !important;
}

/* 4. TARJETA DE FELICITACIÓN NAVIDEÑA PARA EL PORTAL DEL CLIENTE */
.christmas-client-card {
    background: linear-gradient(135deg, #0e352b 0%, #154539 100%) !important;
    border: 2px solid #ef4444 !important;
    border-radius: 16px !important;
    padding: 16px 22px !important;
    margin-bottom: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(239, 68, 68, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
}

.christmas-client-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981) !important;
}

.christmas-client-card h4 {
    margin: 0 0 3px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #fbbf24 !important;
}

.christmas-client-card p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
}

/* Badge navideño en Hero para visitantes */
.christmas-hero-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #b91c1c 0%, #008f78 100%) !important;
    color: #ffffff !important;
    padding: 7px 18px !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    font-size: 13.5px !important;
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    margin-bottom: 14px !important;
}

/* 5. ENCABEZADOS Y BARRAS (MODERN-HEADER & ADMIN-HEADER) */
body.theme-christmas .modern-header,
body.theme-christmas .admin-header,
body.theme-christmas header {
    background: rgba(7, 25, 21, 0.94) !important;
    border-bottom: 1px solid #1a4d3f !important;
    backdrop-filter: blur(14px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

body.theme-christmas .brand,
body.theme-christmas .brand span {
    color: #ffffff !important;
}

body.theme-christmas .header-nav a.nav-link {
    color: #e2e8f0 !important;
}

body.theme-christmas .header-nav a.nav-link:hover {
    color: #10b981 !important;
}

/* 6. GUIRNALDA DE LUCES NAVIDEÑAS */
.christmas-lights-garland {
    position: absolute !important;
    bottom: -10px !important;
    left: 0 !important;
    width: 100% !important;
    height: 18px !important;
    pointer-events: none !important;
    z-index: 100 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: space-around !important;
    padding: 0 15px !important;
}

.christmas-lights-garland::before {
    content: '' !important;
    position: absolute !important;
    top: 2px !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: #022c22 !important;
    border-radius: 50% / 100% !important;
    opacity: 0.85 !important;
}

.christmas-light-bulb {
    width: 10px !important;
    height: 14px !important;
    border-radius: 50% 50% 45% 45% !important;
    margin-top: 3px !important;
    position: relative !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    animation-duration: 1.8s !important;
    animation-iteration-count: infinite !important;
    animation-timing-function: ease-in-out !important;
    animation-direction: alternate !important;
}

.christmas-light-bulb::before {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    left: 2px !important;
    width: 6px !important;
    height: 3px !important;
    background: #334155 !important;
    border-radius: 2px !important;
}

.christmas-light-red {
    background: #ef4444 !important;
    box-shadow: 0 0 10px #ef4444, 0 0 18px rgba(239, 68, 68, 0.7) !important;
    animation-name: lightPulseRed !important;
}
.christmas-light-green {
    background: #10b981 !important;
    box-shadow: 0 0 10px #10b981, 0 0 18px rgba(16, 185, 129, 0.7) !important;
    animation-name: lightPulseGreen !important;
}
.christmas-light-gold {
    background: #f59e0b !important;
    box-shadow: 0 0 10px #f59e0b, 0 0 18px rgba(245, 158, 11, 0.7) !important;
    animation-name: lightPulseGold !important;
}
.christmas-light-blue {
    background: #38bdf8 !important;
    box-shadow: 0 0 10px #38bdf8, 0 0 18px rgba(56, 189, 248, 0.7) !important;
    animation-name: lightPulseBlue !important;
}
.christmas-light-purple {
    background: #c084fc !important;
    box-shadow: 0 0 10px #c084fc, 0 0 18px rgba(192, 132, 252, 0.7) !important;
    animation-name: lightPulsePurple !important;
}

@keyframes lightPulseRed {
    0% { opacity: 0.45; filter: drop-shadow(0 0 2px #ef4444); }
    100% { opacity: 1; filter: drop-shadow(0 0 12px #ef4444); transform: scale(1.1); }
}
@keyframes lightPulseGreen {
    0% { opacity: 0.45; filter: drop-shadow(0 0 2px #10b981); }
    100% { opacity: 1; filter: drop-shadow(0 0 12px #10b981); transform: scale(1.1); }
}
@keyframes lightPulseGold {
    0% { opacity: 0.45; filter: drop-shadow(0 0 2px #f59e0b); }
    100% { opacity: 1; filter: drop-shadow(0 0 12px #f59e0b); transform: scale(1.1); }
}
@keyframes lightPulseBlue {
    0% { opacity: 0.45; filter: drop-shadow(0 0 2px #38bdf8); }
    100% { opacity: 1; filter: drop-shadow(0 0 12px #38bdf8); transform: scale(1.1); }
}
@keyframes lightPulsePurple {
    0% { opacity: 0.45; filter: drop-shadow(0 0 2px #c084fc); }
    100% { opacity: 1; filter: drop-shadow(0 0 12px #c084fc); transform: scale(1.1); }
}

/* 7. GORRO DE PAPÁ NOEL EN LOGO */
.brand,
.login-brand-logo,
.header-brand-wrap .brand,
.header-brand-group .brand {
    position: relative !important;
}

.christmas-santa-hat {
    position: absolute !important;
    top: -16px !important;
    left: -14px !important;
    width: 38px !important;
    height: 38px !important;
    pointer-events: none !important;
    z-index: 10 !important;
    transform: rotate(-18deg) !important;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)) !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.brand:hover .christmas-santa-hat,
.login-brand-logo:hover .christmas-santa-hat {
    transform: rotate(-8deg) scale(1.15) !important;
}

/* 8. TARJETAS & PANELES CON TEMA NAVIDEÑO */
body.theme-christmas .card,
body.theme-christmas .kpi-card,
body.theme-christmas .settings-card,
body.theme-christmas .admin-login-card,
body.theme-christmas .table-card,
body.theme-christmas .requests,
body.theme-christmas .request,
body.theme-christmas .client-hero-bar,
body.theme-christmas .stat-pill,
body.theme-christmas .modal-card,
body.theme-christmas .legal-card {
    background: #0d2822 !important;
    border: 1px solid #1a4d3f !important;
    color: #f1f5f9 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    position: relative;
    border-top: 3px solid #ef4444 !important;
}

/* Detalle de escarcha / nieve en el borde superior de las tarjetas */
body.theme-christmas .card::before,
body.theme-christmas .settings-card::before,
body.theme-christmas .admin-login-card::before,
body.theme-christmas .table-card::before {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    left: 20px !important;
    right: 20px !important;
    height: 3px !important;
    background: linear-gradient(90deg, #ef4444 0%, #10b981 50%, #f59e0b 100%) !important;
    border-radius: 4px 4px 0 0 !important;
    pointer-events: none !important;
}

body.theme-christmas .kpi-card:hover {
    background: #133a30 !important;
    border-color: #10b981 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25) !important;
}

body.theme-christmas .kpi-card .kpi-value,
body.theme-christmas .kpi-card .kpi-title,
body.theme-christmas .card h1,
body.theme-christmas .card h2,
body.theme-christmas .card h3,
body.theme-christmas .settings-card h2,
body.theme-christmas .settings-card h3,
body.theme-christmas .admin-top h1,
body.theme-christmas .dashboard-head h1,
body.theme-christmas .client-name-title,
body.theme-christmas .hero-title {
    color: #ffffff !important;
}

body.theme-christmas .hero-title em {
    color: #fbbf24 !important;
}

body.theme-christmas .card label,
body.theme-christmas .settings-card label {
    color: #cbd5e1 !important;
}

/* 9. INPUTS, SELECTS Y FORMULARIOS */
body.theme-christmas input,
body.theme-christmas select,
body.theme-christmas textarea {
    background: #09201b !important;
    border: 1px solid #1a4d3f !important;
    color: #ffffff !important;
}

body.theme-christmas input:focus,
body.theme-christmas select:focus,
body.theme-christmas textarea:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

body.theme-christmas input[readonly] {
    background: #061713 !important;
    color: #94a3b8 !important;
}

/* 10. BOTONES CON ESTILO FESTIVO NAVIDEÑO (ROJO SANTA & VERDE NAVIDAD) */
body.theme-christmas .btn-primary,
body.theme-christmas button[type="submit"],
body.theme-christmas .button {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease !important;
}

body.theme-christmas .btn-primary:hover,
body.theme-christmas button[type="submit"]:hover,
body.theme-christmas .button:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

body.theme-christmas .btn-primary::after,
body.theme-christmas button[type="submit"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 60% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent) !important;
    transform: skewX(-25deg) !important;
    animation: festiveButtonSheen 4.5s infinite !important;
    pointer-events: none !important;
}

@keyframes festiveButtonSheen {
    0%, 70% { left: -100%; }
    100% { left: 160%; }
}

/* 11. PESTAÑAS ADMINISTRATIVAS & DE OPERACIÓN */
body.theme-christmas .admin-tabs {
    background: #0a241e !important;
    border-color: #1a4d3f !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}

body.theme-christmas .admin-tab {
    background: #0f3028 !important;
    border-color: #1d5244 !important;
    color: #cbd5e1 !important;
}

body.theme-christmas .admin-tab:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

body.theme-christmas .admin-tab.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4) !important;
}

body.theme-christmas .operation-tabs-nav .op-tab-btn.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
}

/* 12. TABLAS Y FILAS */
body.theme-christmas table th {
    background: #09201b !important;
    color: #a7f3d0 !important;
    border-bottom: 1px solid #1a4d3f !important;
}

body.theme-christmas table td {
    border-bottom: 1px solid #143b31 !important;
    color: #e2e8f0 !important;
}

body.theme-christmas .request {
    border-bottom: 1px solid #143b31 !important;
}

body.theme-christmas .request strong {
    color: #ffffff !important;
}

/* 13. CHIPS Y STATS */
body.theme-christmas .stat-pill {
    background: #09201b !important;
    border: 1px solid #1a4d3f !important;
}

body.theme-christmas .sim-chip {
    background: #09201b !important;
    border: 1px solid #1a4d3f !important;
    color: #fbbf24 !important;
}

body.theme-christmas .sim-chip:hover {
    background: #133a30 !important;
    border-color: #fbbf24 !important;
}

/* 14. ADAPTACIONES MÓVILES */
@media (max-width: 768px) {
    .christmas-greeting-bar {
        font-size: 12.5px !important;
        padding: 6px 12px !important;
    }
    .christmas-client-card {
        padding: 14px 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .christmas-santa-hat {
        width: 30px !important;
        height: 30px !important;
        top: -12px !important;
        left: -10px !important;
    }
    .christmas-lights-garland {
        height: 14px !important;
        bottom: -7px !important;
    }
    .christmas-light-bulb {
        width: 8px !important;
        height: 11px !important;
    }
}
