/* ============================================================
   Report shell
   Settings-style sidebar used by all report pages
   ============================================================ */
.report-shell-page {
    min-height: 100vh;
}

.report-shell-header {
    padding-top: 0.25rem;
}

.report-shell-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6c757d;
    margin-bottom: 4px;
}

.report-shell-title {
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    color: #111827;
}

.report-shell-btn {
    --phoenix-btn-padding-x: -2.5rem !important;
}

.report-shell-border {
    border-right: 2px solid #6c757d;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.3);
    background: #fff;
}

.report-shell-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem;
    color: #222;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

    .report-shell-nav .nav-link:hover {
        background: #f0f4ff;
        color: #4f46e5;
    }

    .report-shell-nav .nav-link.active {
        background: #eef2ff;
        border-color: #6366f1;
        color: #4f46e5;
        font-weight: 600;
    }

.report-shell-content {
    padding: 0rem 1.5rem 1.5rem;
}

@media (max-width: 991.98px) {
    .report-shell-content {
        padding: 1rem;
    }
}

@media print {
    .report-shell-border,
    .offcanvas,
    .report-shell-header {
        display: none !important;
    }

    .report-shell-content {
        margin: 0 !important;
        padding: 0 !important;
        min-height: auto !important;
    }
}

/* AFTER */
@media print {
    @page {
        margin: 2mm; /* too small to render the header text but keeps content safe */
        size: A4 portrait;
    }

    html,
    body {
        height: auto !important;
        overflow: visible !important;
        margin: 10mm 10mm; /* ← your content margins go here instead */
        padding: 0;
    }

    .report {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .tbl-scroll {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .table-area,
    .table-card {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        page-break-inside: auto;
    }

    .no-print,
    .screen-only,
    .filter-wrap,
    .filter-selected-bar,
    .header-actions {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .footer {
        display: none !important;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    td,
    th {
        padding: 5px 6px;
        font-size: 10px;
        border: 1px solid #ddd;
        word-break: break-word;
    }

    th {
        background-color: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .score-bar-fill {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .score-wrap {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .score-bar-bg {
        width: 50px;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        overflow: hidden;
    }

    .header {
        display: flex;
        margin-bottom: 12px;
    }
}
/* ── Hide tfoot on screen ── */
.print-tbl tfoot {
    display: none;
}

/* ── Hide all old footer divs ── */
.page-print-footer,
.print-footer {
    display: none !important;
}

@media print {

    @page {
        size: A4;
        margin: 12mm 12mm 8mm 12mm;
    }

    /* ── tfoot/thead/tbody display groups ── */
    .print-tbl {
        width: 100%;
        border-collapse: collapse;
    }

        .print-tbl thead {
            display: table-header-group !important;
        }

        .print-tbl tfoot {
            display: table-footer-group !important;
        }

        .print-tbl tbody {
            display: table-row-group !important;
        }

    /* ── Footer cell ── */
    .pf-td {
        padding: 6px 14px !important;
        border-top: 1px solid #cccccc !important;
        border-bottom: none !important;
        border-left: none !important;
        border-right: none !important;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .pf-wrap {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .pf-left {
        font-size: 8px !important;
        color: #666666 !important;
        font-family: 'DM Sans', sans-serif !important;
    }

    .pf-center {
        font-size: 8px !important;
        color: #333333 !important;
        font-weight: 600 !important;
        font-family: 'DM Sans', sans-serif !important;
        text-align: center !important;
    }

    .pf-right {
        font-size: 8px !important;
        color: #666666 !important;
        font-family: 'DM Sans', sans-serif !important;
    }

    /* ── Also hide the page-print-footer div in print ── */
    .page-print-footer {
        display: none !important;
    }
}

@media print {
    .separation {
        display: none !important;
        border: none !important;
    }

    .report-shell-border {
        display: none !important;
    }
}

@media print {
    @page {
        margin-top: 0 !important;
    }
    .page-number::after {
        content: "Page " counter(page);
    }
}
