/* ===================================
   PM - Print Styles (PDF Reports)
   =================================== */

@media print {
    /* Reset for print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        font-size: 11pt;
        line-height: 1.4;
        color: #000;
    }

    /* Hide non-print elements */
    .app-header,
    .app-sidebar,
    .app-footer,
    .btn,
    .modal-overlay,
    .toast-container,
    .filter-bar,
    .action-menu,
    .no-print {
        display: none !important;
    }

    /* Main content full width */
    .app-main {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    /* Page setup */
    @page {
        size: A4;
        margin: 20mm 15mm;
    }

    /* Report Header */
    .report-header {
        border-bottom: 2px solid #333;
        padding-bottom: 15pt;
        margin-bottom: 20pt;
    }

    .report-header__title {
        font-size: 18pt;
        font-weight: 700;
        margin: 0 0 5pt 0;
    }

    .report-header__subtitle {
        font-size: 12pt;
        color: #666;
        margin: 0 0 10pt 0;
    }

    .report-header__meta {
        display: flex;
        justify-content: space-between;
        font-size: 9pt;
        color: #666;
    }

    /* Summary Section */
    .report-summary {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20pt;
        padding: 15pt;
        background: #f5f5f5 !important;
        border: 1px solid #ddd;
    }

    .report-summary__stat {
        text-align: center;
    }

    .report-summary__value {
        font-size: 24pt;
        font-weight: 700;
        color: #333;
    }

    .report-summary__label {
        font-size: 9pt;
        color: #666;
        text-transform: uppercase;
    }

    /* Component status in print */
    .report-component-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6pt;
        margin-bottom: 15pt;
    }

    .report-component-item {
        display: flex;
        align-items: center;
        gap: 6pt;
        padding: 4pt;
        border: 1px solid #eee;
        font-size: 9pt;
    }

    .report-component-item__dot {
        width: 8pt;
        height: 8pt;
        border-radius: 50%;
    }

    .report-component-item__dot--in-progress { background: #3b82f6 !important; }
    .report-component-item__dot--awaited { background: #f59e0b !important; }
    .report-component-item__dot--in-approval { background: #8b5cf6 !important; }
    .report-component-item__dot--complete { background: #22c55e !important; }

    /* Progress colors in print */
    .report-progress-cell--progress-none { color: #ef4444; font-weight: 600; }
    .report-progress-cell--progress-partial { color: #f59e0b; font-weight: 600; }
    .report-progress-cell--progress-most { color: #3b82f6; font-weight: 600; }
    .report-progress-cell--progress-complete { color: #22c55e; font-weight: 600; }

    /* Tables */
    .report-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
        margin-bottom: 15pt;
    }

    .report-table th,
    .report-table td {
        padding: 8pt;
        text-align: left;
        border: 1px solid #ddd;
    }

    .report-table th {
        background: #f0f0f0 !important;
        font-weight: 600;
    }

    .report-table tr:nth-child(even) {
        background: #fafafa !important;
    }

    /* Priority in tables */
    .report-table .priority-cell--high { color: #ef4444; font-weight: 600; }
    .report-table .priority-cell--medium { color: #f59e0b; }
    .report-table .priority-cell--low { color: #22c55e; }

    /* Progress bar in print */
    .report-progress {
        display: flex;
        align-items: center;
        gap: 8pt;
    }

    .report-progress__bar {
        flex: 1;
        height: 8pt;
        background: #e0e0e0 !important;
        border-radius: 4pt;
        overflow: hidden;
    }

    .report-progress__fill {
        height: 100%;
        background: #3b82f6 !important;
    }

    .report-progress__label {
        font-size: 9pt;
        min-width: 30pt;
        text-align: right;
    }

    /* Section Headers */
    .report-section {
        margin-bottom: 20pt;
        page-break-inside: avoid;
    }

    .report-section__title {
        font-size: 12pt;
        font-weight: 600;
        border-bottom: 1px solid #ddd;
        padding-bottom: 5pt;
        margin-bottom: 10pt;
    }

    /* Awaited components section */
    .report-blockers {
        background: #fffbeb !important;
        border: 1px solid #fde68a !important;
        padding: 10pt;
        margin-bottom: 15pt;
    }

    .report-blockers__title {
        color: #f59e0b;
        font-weight: 600;
        margin-bottom: 8pt;
    }

    .report-blockers__list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .report-blockers__item {
        padding: 5pt 0;
        border-bottom: 1px solid #fde68a;
        font-size: 10pt;
    }

    .report-blockers__item:last-child {
        border-bottom: none;
    }

    /* Footer */
    .report-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        font-size: 8pt;
        color: #999;
        padding-top: 10pt;
        border-top: 1px solid #ddd;
    }

    /* Page breaks */
    .page-break {
        page-break-after: always;
    }

    .avoid-break {
        page-break-inside: avoid;
    }

    /* Hide regular view elements */
    .list-view:not(.print-view),
    .dashboard-view:not(.print-view),
    .detail-view:not(.print-view) {
        display: none !important;
    }

    /* Show print view */
    .print-view {
        display: block !important;
    }
}

/* Print preview mode (on-screen) */
.print-preview {
    background: #666;
    padding: 20px;
    min-height: 100vh;
}

.print-preview__page {
    background: white;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 20px;
    padding: 20mm 15mm;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.print-preview .report-header,
.print-preview .report-summary,
.print-preview .report-section,
.print-preview .report-table,
.print-preview .report-footer {
    /* Same styles as print */
}
