/* =======================================
   Print Styles for A4 PDF Reports
   ======================================= */

@media print {

    /* Hide unnecessary elements */
    .no-print,
    #sidebar,
    .fab,
    .page-header,
    .toast-container {
        display: none !important;
    }

    /* Reset page */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        background: white !important;
        color: #000 !important;
    }

    #main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* A4 Paper Size */
    @page {
        size: A4;
        margin: 2cm;
    }

    /* Report Container */
    .report-container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        background: white !important;
        color: #000 !important;
    }

    /* Report Header */
    .report-header {
        text-align: center;
        margin-bottom: 30px;
        border-bottom: 2px solid #000;
        padding-bottom: 20px;
    }

    .report-header h1 {
        font-size: 24pt;
        margin: 0 0 10px 0;
        color: #000 !important;
    }

    .report-header h2 {
        font-size: 18pt;
        margin: 0 0 10px 0;
        color: #333 !important;
    }

    .report-period {
        font-size: 14pt;
        font-weight: bold;
        margin: 10px 0;
        color: #000 !important;
    }

    .report-date {
        font-size: 10pt;
        color: #666 !important;
    }

    /* Report Sections */
    .report-summary,
    .report-section {
        margin-bottom: 25px;
        page-break-inside: avoid;
    }

    .report-summary h3,
    .report-section h3 {
        font-size: 14pt;
        margin: 0 0 15px 0;
        padding-bottom: 5px;
        border-bottom: 1px solid #000;
        color: #000 !important;
    }

    /* Tables */
    .report-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
        page-break-inside: auto;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .report-table th,
    .report-table td {
        padding: 8px 10px;
        text-align: left;
        border-bottom: 1px solid #ddd;
        color: #000 !important;
    }

    .report-table th {
        background: #f5f5f5 !important;
        font-weight: bold;
        border-bottom: 2px solid #000;
    }

    .report-table .text-right {
        text-align: right !important;
    }

    .report-table .amount {
        font-family: 'Courier New', monospace;
    }

    .report-table .total-row {
        border-top: 2px solid #000;
        border-bottom: 2px solid #000;
        font-weight: bold;
    }

    .report-table .total-row td {
        padding: 12px 10px;
    }

    /* Footer */
    .report-footer {
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid #000;
        font-size: 9pt;
        color: #666 !important;
        text-align: center;
    }

    /* Force black text */
    strong,
    b {
        color: #000 !important;
    }

    /* Page breaks */
    .page-break {
        page-break-after: always;
    }

    .no-page-break {
        page-break-inside: avoid;
    }
}

/* Screen styles for report container */
.report-container {
    max-width: 800px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.report-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-primary);
}

.report-header h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-sm);
    color: var(--accent-teal);
}

.report-header h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.report-period {
    font-size: var(--font-size-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: var(--space-sm) 0;
}

.report-date {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.report-summary,
.report-section {
    margin-bottom: var(--space-xl);
}

.report-summary h3,
.report-section h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--accent-teal);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-primary);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
}

.report-table th,
.report-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-secondary);
}

.report-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.report-table .text-right {
    text-align: right;
}

.report-table .amount {
    font-family: 'Courier New', monospace;
    font-weight: var(--font-medium);
}

.report-table .total-row {
    border-top: 2px solid var(--border-primary);
    border-bottom: 2px solid var(--border-primary);
    background: var(--bg-secondary);
}

.report-table .total-row td {
    font-weight: var(--font-bold);
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.report-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-primary);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}