body { 
    font-family: system-ui, -apple-system, sans-serif; 
}

.fade-in { 
    animation: fadeIn 0.2s ease-in-out; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: scale(0.98); } 
    to { opacity: 1; transform: scale(1); } 
}

/* --- SCROLLBARS --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- OCULTAR POR DEFECTO EL TÍTULO DE IMPRESIÓN --- */
#print-header { display: none; }

/* --- ESTILOS DE IMPRESIÓN --- */
@media print {
    @page {
        size: landscape; 
        margin: 5mm; 
    }

    /* Ocultar interfaz */
    header, 
    button, 
    ::-webkit-scrollbar,
    .print\:hidden { 
        display: none !important; 
    }

    main > div.mt-4,
    td .flex-col > div {
        display: none !important;
    }

    /* Ocultar columnas saldo extra */
    th[class*="left-[16rem]"],
    td[class*="left-[16rem]"] {
        display: none !important;
    }

    /* Reset del layout */
    body, #app, main {
        height: auto !important;
        overflow: visible !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    main::before { content: none !important; }

    /* --- TÍTULO --- */
    #print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 40px; 
    }
    #print-header h1 {
        font-size: 24pt !important;
        font-weight: 900 !important;
        text-transform: uppercase;
        margin: 0;
        color: #0f172a;
        line-height: 1.2;
    }
    #print-header h2 {
        font-size: 16pt !important;
        font-weight: bold !important;
        color: #2563eb !important; 
        text-transform: uppercase;
        margin: 5px 0 0 0;
    }

    /* Ocultar botonera */
    main > div.max-w-\[1600px\].flex-none { 
        display: none !important; 
    }

    main > div:first-child {
        display: none !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* --- TABLA --- */
    main > div.overflow-hidden {
        border: none !important;
        box-shadow: none !important;
        width: auto !important;      
        max-width: none !important;
        margin: 0 !important;
        display: inline-block !important; 
    }

    .overflow-auto { overflow: visible !important; }

    table {
        font-size: 9px !important; 
        width: auto !important;    
        border-collapse: collapse;
        table-layout: fixed;
    }

    /* --- BORDES (GRISES 1px) --- */
    td, th {
        padding: 0px 1px !important;
        height: 16px !important;
        border: 1px solid #94a3b8 !important; 
    }

    th:first-child, td:first-child {
        width: auto !important;       
        min-width: 0 !important;      
        white-space: nowrap !important;
        border: 1px solid #94a3b8 !important;
    }
    
    th:first-child > div, 
    td:first-child > div {
        width: auto !important;
    }

    td:last-child, th:last-child {
        border-right: 1px solid #94a3b8 !important;
    }

    /* Ocultar Saldo */
    th[class*="left-[150px]"], td[class*="left-[150px]"],
    th[class*="left-[8rem]"], td[class*="left-[8rem]"],
    td[class*="left-[8rem]"] {
        display: none !important;
        width: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    /* --- SOLUCIÓN FINAL DÍA ACTUAL --- */
    /* Usamos la nueva clase marcadora que hemos puesto en UI.JS */
    
    .current-day-marker {
        background-color: transparent !important;
        background-image: none !important;
        color: #64748b !important; /* Color texto normal (gris oscuro) */
        
        /* Forzar borde gris fino de 1px */
        border: 1px solid #94a3b8 !important;
        border-width: 1px !important;
        
        /* Anular efectos visuales */
        box-shadow: none !important;
        transform: none !important;
        border-radius: 0 !important;
    }

    /* Colores planos */
    .bg-yellow-50 { background-color: #fef08a !important; color: black !important; }
    .bg-red-50 { background-color: #fca5a5 !important; color: black !important; }
    .bg-blue-50 { background-color: #93c5fd !important; color: black !important; }
    .bg-gray-200 { background-color: #cbd5e1 !important; color: black !important; } 
    .bg-pink-50 { background-color: #f9a8d4 !important; color: black !important; } 
    .bg-sky-50 { background-color: #7dd3fc !important; color: black !important; } 
    
    .bg-slate-200\/70, .bg-slate-200 {
        background-color: #e2e8f0 !important;
    }

    .diagonal-split { background: #e2e8f0 !important; }
}

/* --- VISTA MÓVIL --- */
@media (max-width: 768px) {
    .overflow-auto::-webkit-scrollbar {
        display: none; 
    }
    .overflow-auto {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}