@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --font-ui: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-doc: 'Sarabun', serif;
}

body {
    font-family: var(--font-ui);
    background-color: #f8fafc;
    color: #0f172a;
}

.font-doc {
    font-family: var(--font-doc);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar Active Tab */
.nav-btn.active {
    background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

/* A4 Print Preview Box */
.a4-sheet {
    font-family: var(--font-doc);
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: #ffffff;
    padding: 18mm 20mm;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    color: #000000;
    line-height: 1.55;
    font-size: 14pt;
    position: relative;
}

.a4-sheet table {
    border-collapse: collapse;
    width: 100%;
}

.a4-sheet th,
.a4-sheet td {
    border: 1px solid #1e293b;
    padding: 6px 10px;
    font-size: 12.5pt;
}

/* Citizen ID Boxes for Thai Official Voucher (ใบสำคัญรับเงิน) */
.cid-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 26px;
    border: 1px solid #0f172a;
    font-weight: 600;
    font-size: 12pt;
    margin: 0 1px;
}

/* Print Rules */
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body * {
        visibility: hidden;
    }

    #printContainer,
    #printContainer * {
        visibility: visible;
    }

    #printContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .a4-sheet {
        width: 100% !important;
        min-height: auto !important;
        box-shadow: none !important;
        padding: 5mm 8mm !important;
        margin: 0 !important;
    }

    .no-print {
        display: none !important;
    }
}
