/* ============================================================
   Hose Flux - Estilos de Bitácora y Órdenes de Trabajo Físicas
   ============================================================ */

/* En pantalla, los contenedores de impresión NUNCA se muestran */
.print-only {
    display: none !important;
}

/* ============================================================
   REGLAS GLOBALES DE IMPRESIÓN (@media print)
   ============================================================ */
@media print {
    @page {
        size: letter portrait;
        margin: 10mm 12mm 10mm 12mm;
    }

    html, body {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, Helvetica, sans-serif !important;
    }

    aside, header, main, .no-print-area, #orderDetailModal, #bitacoraDateFilterModal {
        display: none !important;
    }

    /* MODO 1: IMPRIMIR BITÁCORA GENERAL */
    body.mode-print-bitacora #print-bitacora-container {
        display: block !important;
    }

    /* MODO 2: IMPRIMIR ORDEN FÍSICA */
    body.mode-print-order-sheet #print-order-sheet-container {
        display: block !important;
    }
}

/* ============================================================
   FORMATO 1: BITÁCORA DE MANTENIMIENTO PROFESIONAL
   ============================================================ */
.bitacora-sheet {
    width: 100%;
}

.bitacora-header-banner {
    background-color: #002B49 !important;
    color: #ffffff !important;
    text-align: center;
    padding: 8px 10px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.bitacora-header-banner h2 {
    font-size: 13pt;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.5px;
}

.bitacora-header-banner p {
    font-size: 7.5pt;
    font-weight: bold;
    margin: 2px 0 0 0;
    letter-spacing: 0.5px;
}

.bitacora-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 8pt;
    padding: 6px 4px;
    border-bottom: 1.5px solid #000000;
    margin-bottom: 6px;
}

.bitacora-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5pt;
}

.bitacora-table th {
    background-color: #f1f5f9 !important;
    color: #000000;
    border: 1px solid #94a3b8;
    padding: 5px 3px;
    text-align: center;
    font-weight: bold;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.bitacora-table td {
    border: 1px solid #cbd5e1;
    padding: 4px 3px;
    vertical-align: top;
    line-height: 1.15;
}

/* ============================================================
   FORMATO 2: HOJA DE ORDEN FÍSICA (IMÁGENES 4 Y 5)
   ============================================================ */
.order-sheet {
    width: 100%;
    max-width: 195mm;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding-bottom: 8px;
}

.order-logo-box {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}

.order-title-center {
    text-align: center;
    flex: 1;
}

.order-title-center h2 {
    font-size: 11.5pt;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.order-title-center h3 {
    font-size: 11pt;
    font-weight: 900;
    margin: 4px 0 2px 0;
    text-decoration: underline;
    letter-spacing: 0.5px;
}

.order-title-center h4 {
    font-size: 10pt;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.order-num-red {
    text-align: right;
    color: #dc2626 !important; /* Rojo característico */
    font-family: 'Courier New', Courier, monospace;
    font-size: 13pt;
    font-weight: 900;
    min-width: 70px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.order-meta-info {
    margin-top: 6px;
    margin-bottom: 12px;
    font-size: 9pt;
}

.order-meta-line {
    display: flex;
    align-items: flex-end;
    margin-bottom: 4px;
}

.meta-label {
    width: 75px;
    font-weight: bold;
}

.meta-dots {
    width: 12px;
    font-weight: bold;
}

.meta-underline {
    flex: 1;
    border-bottom: 1px solid #475569;
    padding-left: 6px;
    font-weight: 600;
    min-height: 16px;
    line-height: 16px;
}

.meta-underline.w-half {
    flex: none;
    width: 140px;
}

/* Secciones Rayadas */
.order-section-block {
    margin-bottom: 10px;
}

.section-title {
    font-size: 9pt;
    font-weight: bold;
    margin-bottom: 3px;
}

.lined-box {
    width: 100%;
}

.lined-row {
    width: 100%;
    height: 17px;
    line-height: 17px;
    border-bottom: 1px solid #64748b;
    font-size: 8.5pt;
    padding-left: 4px;
    overflow: hidden;
    white-space: nowrap;
}

/* Pie Operativo */
.order-footer-operational {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 8.5pt;
    font-weight: bold;
}

.col-left {
    width: 55%;
}

.col-right {
    width: 42%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.op-line {
    display: flex;
    align-items: flex-end;
    margin-bottom: 5px;
}

.op-line span {
    width: 90px;
}

.op-underline {
    flex: 1;
    border-bottom: 1px solid #475569;
    min-height: 15px;
    padding-left: 4px;
    font-family: monospace;
}

.op-line-dual {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 5px;
}

.op-line-dual span {
    font-size: 8pt;
}

.op-underline.sm {
    flex: 1;
    border-bottom: 1px solid #475569;
    min-height: 15px;
    padding-left: 4px;
    font-family: monospace;
}

.op-line-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.check-box {
    display: inline-block;
    width: 28px;
    border-bottom: 1px solid #475569;
    text-align: center;
    font-weight: 900;
    min-height: 14px;
}

/* Firmas */
.order-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    text-align: center;
    font-size: 8pt;
    font-weight: bold;
}

.sig-col {
    width: 44%;
}

.sig-line {
    border-top: 1px solid #000000;
    width: 100%;
    margin-bottom: 5px;
}