/* Screen preview typography for invoice / voucher print areas (not print output) */
@media screen {
    #printable-form,
    .print-area,
    .invoice-paper,
    .invoice-page-container .invoice-paper,
    .invoice-page-container .template-default,
    .invoice-page-container .template-zoho,
    .invoice-page-container .template-tally,
    .invoice-page-container .template-taxinvoice,
    .invoice-page-container .template-erp-a4,
    .invoice-page-container .template-invox {
        font-size: 14px;
        line-height: 1.45;
        color: #222;
    }

    #printable-form .table,
    #printable-form .table-sm,
    #printable-form table,
    .print-area .table,
    .print-area .table-sm,
    .print-area table,
    .invoice-paper table {
        font-size: 13px;
    }

    #printable-form .small,
    #printable-form .text-muted.small,
    .print-area .small,
    .print-area .text-muted.small {
        font-size: 12px;
    }

    #printable-form h3,
    #printable-form h4,
    .print-area h3,
    .print-area h4 {
        font-size: 1.15rem;
    }

    #printable-form .fs-5,
    .print-area .fs-5 {
        font-size: 1.2rem !important;
    }

    #printable-form .fw-bold,
    #printable-form strong,
    .print-area .fw-bold,
    .print-area strong {
        font-weight: 600;
    }

    /* Blazor-style PO / invoice preview on screen */
    .invoice-page-container .invoice-paper,
    #printable-form.invoice-paper {
        width: 100%;
        max-width: 800px;
        min-height: auto;
        padding: 0;
        margin: 0 auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .invoice-page-container .template-default,
    #printable-form .template-default {
        padding: 32px;
    }

    .invoice-page-container .default-items-table th,
    .invoice-page-container .default-items-table td,
    #printable-form .default-items-table th,
    #printable-form .default-items-table td {
        font-size: 13px;
        padding: 10px 12px;
    }

    .invoice-page-container .default-totals,
    #printable-form .default-totals,
    .invoice-page-container .template-zoho .zoho-totals-section,
    #printable-form .zoho-totals-section {
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        gap: 24px;
    }

    .invoice-page-container .default-totals table,
    #printable-form .default-totals table,
    .invoice-page-container .template-zoho .zoho-totals table,
    #printable-form .zoho-totals table,
    .erp-a4-totals table {
        width: 280px !important;
        max-width: 100%;
        margin-left: auto;
    }

    .invoice-page-container .default-totals td,
    #printable-form .default-totals td,
    .invoice-page-container .template-zoho .zoho-totals td,
    #printable-form .zoho-totals td {
        font-size: 13px !important;
        padding: 8px 0;
    }

    .invoice-page-container .default-totals tr.grand-total td,
    .invoice-page-container .template-zoho .zoho-totals tr.total-row td,
    #printable-form .default-totals tr.grand-total td,
    #printable-form .zoho-totals tr.total-row td {
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.35;
    }

    .invoice-page-container .template-zoho .zoho-totals {
        width: 280px;
        max-width: 100%;
        flex-shrink: 0;
    }

    .invoice-page-container .template-zoho .zoho-notes {
        flex: 1;
        min-width: 0;
    }

    /* ERP A4 template (sales / purchase invoice details) */
    .template-erp-a4,
    .template-invox {
        font-size: 14px;
        line-height: 1.45;
        color: #1e293b;
    }

    .erp-a4-items-table thead th {
        font-size: 12px;
        padding: 8px 6px;
    }

    .erp-a4-items-table tbody td {
        font-size: 13px;
        padding: 8px 6px;
    }

    .erp-a4-totals {
        display: flex;
        justify-content: flex-end;
        margin: 0 0 12px;
    }

    .erp-a4-totals td {
        font-size: 13px !important;
        padding: 6px 8px !important;
    }

    .erp-a4-totals tr.erp-a4-grand td,
    .erp-a4-totals tr.erp-a4-balance td {
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.35;
        padding: 10px 8px !important;
    }

    .erp-a4-words,
    .erp-a4-notes,
    .erp-a4-terms,
    .erp-a4-bank {
        font-size: 13px;
    }

    /* Simple tpl-* layouts used by other transaction detail views */
    .print-area .tpl-default .table-sm th,
    .print-area .tpl-default .table-sm td {
        font-size: 13px;
        padding: 0.45rem 0.5rem;
    }

    .print-area .tpl-default .fw-bold th,
    .print-area .tpl-default .fw-bold td,
    .print-area .tpl-tally strong,
    .print-area .tpl-tax .fw-bold {
        font-size: 15px !important;
    }

    /* Transaction form totals panel */
    .card .card-body .fw-bold.fs-5 {
        font-size: 1.25rem !important;
    }
}
