.btn-print {
    border: none;
    background: #16a34a;
    color: #ffffff;
    padding: 9px 13px;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-print:hover {
    background: #15803d;
}

/* ===== Dropdown tombol Cetak (PDF / Word / Excel) ===== */

.print-dropdown {
    position: relative;
    display: inline-block;
}

.print-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    min-width: 170px;
    padding: 6px;
    z-index: 50;
}

.print-menu.show {
    display: block;
}

.print-menu button {
    width: 100%;
    border: none;
    background: transparent;
    color: #1f2937;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
}

.print-menu button:hover {
    background: #f1f5f9;
}

.print-menu button i {
    width: 16px;
    text-align: center;
}

.print-menu button.opsi-pdf i {
    color: #dc2626;
}

.print-menu button.opsi-word i {
    color: #2563eb;
}

.print-menu button.opsi-excel i {
    color: #16a34a;
}

.print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.print-letterhead,
.print-document-title,
.print-signature {
    display: none;
}

.status-desc-print {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .print-only {
        display: table-cell !important;
    }

    .sidebar,
    .topbar,
    .page-header,
    .summary,
    .dashboard-charts,
    .dashboard-extra,
    .btn-print,
    .btn-detail,
    .mobile-overlay,
    #lightbox,
    .scroll-top-btn,
    .info-popup,
    .print-menu,
    th:nth-child(11),
    td:nth-child(11),
    th:nth-child(12),
    td:nth-child(12),
    .no-print {
        display: none !important;
    }

    body * {
        visibility: hidden;
    }

    #data-unjuk-rasa,
    #data-unjuk-rasa * {
        visibility: visible;
    }

    #data-unjuk-rasa {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    #data-unjuk-rasa>.panel-header,
    #data-unjuk-rasa>.panel-header * {
        display: none !important;
        visibility: hidden !important;
    }

    /* ===== TABEL & GARIS (semua garis diseragamkan 1px solid) ===== */

    .table-wrap {
        overflow: visible !important;
        width: 100% !important;
    }

    table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
        table-layout: fixed;
        font-size: 9pt;
        border: 1px solid #000 !important;
    }

    thead {
        display: table-header-group;
    }

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

    th,
    td {
        border: 1px solid #000 !important;
        padding: 4px 6px;
        color: #000;
        vertical-align: top;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.3;
        font-size: 9pt;
    }

    th {
        background: #e5e7eb !important;
        color: #000 !important;
        font-weight: 700;
        /* header pakai position: sticky di layar; ini sering bikin
                   border hilang saat print, jadi dipaksa static khusus cetak */
        position: static !important;
        top: auto !important;
        z-index: auto !important;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    th:nth-child(1),
    td:nth-child(1) {
        width: 4%;
    }

    th:nth-child(2),
    td:nth-child(2) {
        width: 8%;
    }

    th:nth-child(3),
    td:nth-child(3) {
        width: 6%;
    }

    th:nth-child(4),
    td:nth-child(4) {
        width: 14%;
    }

    th:nth-child(5),
    td:nth-child(5) {
        width: 13%;
    }

    th:nth-child(6),
    td:nth-child(6) {
        width: 11%;
    }

    th:nth-child(7),
    td:nth-child(7) {
        width: 14%;
    }

    th:nth-child(8),
    td:nth-child(8) {
        width: 6%;
    }

    th:nth-child(9),
    td:nth-child(9) {
        width: 7%;
    }

    th:nth-child(10),
    td:nth-child(10) {
        width: 17%;
    }

    .badge {
        display: none !important;
    }

    .status-desc-print {
        display: inline !important;
    }

    /* ===== LETTERHEAD & TANDA TANGAN CETAK ===== */

    .print-letterhead {
        display: flex;
        align-items: center;
        gap: 14px;
        border-bottom: 1px solid #000;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .print-letterhead-logo img {
        width: 62px;
        height: 62px;
        object-fit: contain;
    }

    .print-letterhead-text {
        flex: 1;
        text-align: center;
        color: #000;
        line-height: 1.2;
    }

    .print-letterhead-text h2,
    .print-letterhead-text h3,
    .print-letterhead-text p {
        margin: 0;
        color: #000;
    }

    .print-letterhead-text h2 {
        font-size: 14px;
        font-weight: 700;
    }

    .print-letterhead-text h3 {
        font-size: 13px;
        font-weight: 700;
    }

    .print-letterhead-text p {
        font-size: 9px;
    }

    .print-document-title {
        display: block;
        text-align: center;
        margin: 8px 0 10px;
        color: #000;
    }

    .print-document-title h3 {
        margin: 0;
        font-size: 12px;
        text-decoration: underline;
    }

    .print-signature {
        display: flex;
        justify-content: flex-end;
        margin-top: 30px;
        margin-right: 20px;
        color: #000;
        page-break-inside: avoid;
    }

    .signature-box {
        width: 350px;
        text-align: left;
        font-size: 14px;
        line-height: 1.35;
    }

    .signature-box p {
        margin: 0 0 4px;
        color: #000;
    }

    .signature-space {
        height: 70px;
    }
}

.print-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.print-filter select,
.btn-print-filter {
    height: 36px;
    border: 1px solid #d8e3e8;
    border-radius: 6px;
    padding: 0 10px;
    font-weight: 700;
}

.btn-print-filter {
    background: #eef2ff;
    color: #2563eb;
    cursor: pointer;
}