/* public/css/print.css */
@media print {

    /* 1. ELIMINAR URL Y CABECERAS (HACK DE MÁRGENES) */
    @page {
        size: A4;
        margin: 0 !important; /* Eliminamos el margen de la página para que no quepa la URL */
    }

    body {
        background: white !important;
        color: black !important;
        font-family: "Times New Roman", Times, serif;
        font-size: 11pt;
        margin: 0;
        padding: 1.5cm 2cm; /* El margen real lo aplicamos al cuerpo del documento */
    }

    /* 2. OCULTAR ELEMENTOS WEB Y BASURA */
    .sidebar,
    .btn-primary,
    .delete-link,
    .top-header,
    nav,
    .logout-btn,
    form,
    [class*="cite"],
    .timeline-item::before {
        display: none !important;
    }

    /* Mostrar solo bloques de impresión */
    .print-only-header,
    .print-only-footer,
    .print-only {
        display: block !important;
    }

    .financial-section {
        display: none !important;
    }

    /* 3. LIMPIAR TABLA DE ARCHIVOS (Solo Nombre y Fecha) */
    /* Ocultamos las columnas 2 (Type), 3 (Size) y 5 (Actions) */
    .data-table th:nth-child(2), .data-table td:nth-child(2),
    .data-table th:nth-child(3), .data-table td:nth-child(3),
    .data-table th:nth-child(5), .data-table td:nth-child(5) {
        display: none !important;
    }

    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1px solid #000 !important;
    }

    .data-table th, .data-table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        text-align: left !important;
    }

    /* 4. RESET DE ESTRUCTURA */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* 5. FORMATEAR DETALLES COMO LÍNEAS FORMALES */
    .info-card {
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }

    .info-card h3 {
        border-bottom: 2px solid #000 !important;
        font-size: 13pt;
        text-transform: uppercase;
        margin-top: 20px;
        padding-bottom: 5px;
    }

    .info-item {
        display: flex;
        justify-content: space-between;
        border-bottom: 1px dotted #aaa;
        padding: 6px 0;
    }

    /* 6. PIE DE PÁGINA (FIRMA Y SELLO) */
    .print-only-footer {
        display: block !important;
        margin-top: 100px;
        page-break-inside: avoid;
    }

    .signature-container {
        display: flex;
        justify-content: space-around;
        width: 100%;
    }

    .signature-box {
        border-top: 1.5px solid #000;
        width: 220px;
        text-align: center;
        padding-top: 8px;
        font-weight: bold;
    }
}