/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Base Styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-item.active {
    background-color: rgb(51 65 85); /* slate-800 */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Print Area (A4 Simulation on Screen) */
#printArea {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    margin: 0 auto;
    background: white;
    font-size: 11pt; /* Standard readable size */
    box-sizing: border-box;
    position: relative;
}

/* Print Media Query */
@media print {
    @page {
        size: A4;
        margin: 0;
    }
    body {
        margin: 0;
        padding: 0;
        background: white;
        height: auto;
        overflow: visible;
        font-family: 'Times New Roman', Times, serif; /* Often cleaner for print, or keep sans */
    }

    #sidebar, header, #viewContainer > div:not(#view-creator), #view-creator > div > div:first-child, #printBtn, #backupBtn, #newDocBtn, .no-print {
        display: none !important;
    }

    /* Force the print area to be the only thing visible */
    main {
        position: static;
        overflow: visible;
    }
    
    #viewContainer {
        padding: 0;
        overflow: visible;
        position: static;
    }

    #view-creator {
        display: block !important;
        height: auto;
    }

    #view-creator > div {
        display: block; 
    }

    .w-1\/2 {
        width: 100% !important;
    }

    #printArea {
        width: 100% !important;
        height: auto !important;
        box-shadow: none !important;
        margin: 0;
        padding: 20mm !important; /* Keep internal padding */
    }

    /* Reset background colors for print cleanliness */
    .bg-slate-50, .bg-slate-200, .bg-slate-900 {
        background: white !important;
    }
}

/* Utility for dynamic colors */
.text-brand-primary { color: var(--brand-primary); }
.bg-brand-primary { background-color: var(--brand-primary); }
.border-brand-primary { border-color: var(--brand-primary); }

.text-brand-secondary { color: var(--brand-secondary); }
.bg-brand-secondary { background-color: var(--brand-secondary); }
