/* Custom base styles and reset clues */
body { 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
}

/* Scrollbar mượt cho Sidebar */
aside::-webkit-scrollbar {
    width: 6px;
}
aside::-webkit-scrollbar-track {
    background: #0f172a;
}
aside::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Print CSS color filter fixes */
.white-logo-print-fix {
    filter: url(#svg-white-filter) !important;
    -webkit-filter: url(#svg-white-filter) !important;
}

.hue-logo-print-fix {
    filter: url(#svg-hue-filter) !important;
    -webkit-filter: url(#svg-hue-filter) !important;
}

.blur-logo-fix { 
    filter: blur(2px); 
}

/* ================= PRINT LAWS CONFIGURATION ================= */
@media print {
    /* Ẩn hoàn toàn Sidebar điều khiển khi in */
    .no-print, aside { 
        display: none !important; 
    }
    
    /* Đưa khu vực hiển thị chính ra toàn màn hình */
    main {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    #canvasDocument {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Clean and fix document canvas */
    html, body { 
        background: #ffffff !important; 
        color: #000000 !important; 
        padding: 0 !important; 
        margin: 0 !important;
        height: auto !important;
    }
    
    /* Avoid cutting layout elements between pages */
    .print-page { 
        page-break-after: auto !important; 
        break-after: auto !important;
        page-break-inside: avoid !important; 
        break-inside: avoid !important; 
        padding: 1.5rem 0 !important;
        margin-bottom: 1.5rem !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    
    /* Clean shadows for crisp vector elements and texts */
    .shadow-sm, .shadow-md, .shadow-xl { 
        box-shadow: none !important; 
        border: 1px solid #cbd5e1 !important; 
    }
}