@media print {
    /* Hide navigation sidebar (desktop + mobile) */
    .lg\:fixed.lg\:inset-y-0.lg\:z-50.lg\:flex.lg\:w-72 {
        display: none !important;
    }

    /* Hide top bar */
    .sticky.top-0.z-40 {
        display: none !important;
    }

    /* Remove left padding from content (sidebar offset) */
    .lg\:pl-72 {
        padding-left: 0 !important;
    }

    /* Hide mobile sidebar toggle and overlay */
    [class*="Transition"] {
        display: none !important;
    }

    /* Hide background particles/decoration */
    .fixed.inset-0.overflow-hidden.pointer-events-none {
        display: none !important;
    }

    /* Project page: make grid full width, hide sidebar column */
    .grid.grid-cols-1.lg\:grid-cols-3 > .space-y-6:last-child {
        display: none !important;
    }
    .grid.grid-cols-1.lg\:grid-cols-3 > .lg\:col-span-2 {
        grid-column: 1 / -1 !important;
    }
    .grid.grid-cols-1.lg\:grid-cols-3 {
        display: block !important;
    }

    /* Hide action buttons in header */
    .flex.flex-wrap.gap-2 {
        display: none !important;
    }

    /* Hide Stats Cards (Postep, Zadania, Start, Termin) */
    .grid.grid-cols-2.lg\:grid-cols-4 {
        display: none !important;
    }

    /* Hide the print button itself */
    #print-project-btn {
        display: none !important;
    }

    /* Hide process map edit buttons */
    button[class*="bg-primary-600"],
    button[class*="bg-red-50"][class*="text-red-600"] {
        display: none !important;
    }

    /* Hide task action buttons */
    [data-action="send-reminder"],
    [data-action="status-notify"] {
        display: none !important;
    }

    /* Page setup */
    body {
        background: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure cards and charts print with backgrounds/colors */
    .bg-gradient-to-r,
    .bg-gradient-to-br,
    [class*="bg-"] {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Remove shadows and animations */
    * {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
    }

    /* Fix overflow ONLY on card-level containers, not chart internals */
    .space-y-8 > * > .overflow-hidden,
    .space-y-6 > .overflow-hidden,
    .lg\:col-span-2 > .space-y-6 > .overflow-hidden {
        overflow: visible !important;
    }

    /* Fix max-height on card containers only */
    .space-y-8 > *,
    .space-y-6 > * {
        max-height: none !important;
    }

    /* Scrollable areas should be fully visible */
    .overflow-y-auto,
    .overflow-x-auto {
        overflow: visible !important;
    }

    /* DMAIC print block - allow page breaks between phases */
    #dmaic-print-all {
        overflow: visible !important;
    }
    #dmaic-print-all > div {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Allow content to flow across pages, avoid breaks inside cards */
    .space-y-6 > * {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* DMAIC header: hide edit button and chevron */
    .bg-gradient-to-r.from-indigo-50.to-purple-50 button,
    .bg-gradient-to-r.from-indigo-50.to-purple-50 svg:last-child {
        display: none !important;
    }

    /* Margin adjustments */
    @page {
        margin: 12mm;
        size: A4;
    }
}
