/* ═══════════════════════════════════════════════════════════
   PRINT STYLES — Shared for receipts & statements
   Loaded via <link rel="stylesheet" media="print">
   ═══════════════════════════════════════════════════════════ */

@page {
    size: A4;
    margin: 15mm 12mm;
}

@media print {
    /* Hide everything else */
    body > *:not(.print-root) {
        display: none !important;
    }

    .print-root {
        display: block !important;
        color: #000 !important;
        background: #fff !important;
        font-family: 'Helvetica', 'Arial', sans-serif;
        font-size: 11pt;
        line-height: 1.4;
    }

    /* Remove shadows and dark backgrounds */
    .print-root * {
        box-shadow: none !important;
        text-shadow: none !important;
        background: transparent !important;
        color: #000 !important;
    }

    /* Tables */
    .print-root table {
        width: 100%;
        border-collapse: collapse;
        margin: 8pt 0;
    }

    .print-root th {
        background: #f0f0f0 !important;
        border: 0.5pt solid #999;
        padding: 6pt 8pt;
        text-align: left;
        font-weight: 600;
        font-size: 10pt;
    }

    .print-root td {
        border: 0.5pt solid #ccc;
        padding: 5pt 8pt;
        font-size: 10pt;
        vertical-align: top;
    }

    .print-root .amount {
        text-align: right;
        font-family: 'Courier New', monospace;
    }

    /* Page breaks */
    .print-root .page-break {
        page-break-before: always;
    }

    .print-root tr {
        page-break-inside: avoid;
    }
}

/* Screen-preview styles (shown in the modal before printing) */
.print-preview {
    background: #fff;
    color: #000;
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.print-preview h1,
.print-preview h2,
.print-preview h3 {
    color: #111;
    margin: 0 0 6px;
}

.print-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.print-preview th {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.print-preview td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    font-size: 12px;
    vertical-align: top;
}

.print-preview .amount {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #111;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.print-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.print-header .brand-mark {
    width: 48px;
    height: 48px;
    background: #0d9488;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.print-header .brand-info h2 {
    font-size: 16px;
    margin: 0;
}

.print-header .brand-info p {
    font-size: 10px;
    color: #555;
    margin: 2px 0 0;
}

.print-header .doc-info {
    text-align: right;
    font-size: 11px;
}

.print-header .doc-info .label {
    color: #666;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.print-header .doc-info .value {
    font-weight: 600;
    font-size: 13px;
}

.print-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #333;
    margin: 20px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ccc;
}

.print-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.print-meta-grid .meta-item {
    padding: 6px 0;
}

.print-meta-grid .meta-label {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.print-meta-grid .meta-value {
    font-size: 12px;
    font-weight: 500;
    color: #111;
    margin-top: 2px;
}

.print-total-box {
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.print-total-box .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.print-total-box .value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.print-footer {
    margin-top: 40px;
    padding-top: 12px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #666;
}

.print-signature {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.print-signature .sig-block {
    text-align: center;
}

.print-signature .sig-line {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 4px;
    font-size: 10px;
    color: #555;
}

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