/* =============================================
CODIGO ORDEN DATATABLE
============================================= */

.tablaOrdenes .orden-codigo-cell {
    display: flex;
    align-items: center;
    gap: 9px;

    min-width: 105px;
}

.tablaOrdenes .orden-expand-btn {
    width: 26px;
    height: 26px;

    min-width: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #eaf2ff;

    color: #2563eb;

    font-size: 10px;

    cursor: pointer;

    box-shadow: none;

    transition: all .18s ease;
}

.tablaOrdenes .orden-expand-btn:hover {
    background: #2563eb;

    color: #ffffff;

    transform: scale(1.06);
}

.tablaOrdenes .orden-codigo-info {
    display: flex;
    flex-direction: column;

    line-height: 1.1;
}

.tablaOrdenes .orden-codigo-numero {
    color: #1e3a5f;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: .2px;
}

.tablaOrdenes .orden-codigo-label {
    margin-top: 2px;

    color: #94a3b8;

    font-size: 7px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: .6px;
}

.tablaOrdenes tbody td {
    vertical-align: middle !important;
}

.tablaOrdenes tbody tr {
    transition: background .15s ease;
}

.tablaOrdenes tbody tr:hover {
    background: #f8fbff !important;
}

/* Ocultar SOLO el botón responsive (+) de tablaOrdenes */

.tablaOrdenes.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
.tablaOrdenes.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before,
.tablaOrdenes.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,
.tablaOrdenes.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before {
    display: none !important;
}

.pendiente-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 88px;
    min-height: 32px;
    padding: 6px 11px;

    border-radius: 10px;

    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;

    box-shadow: 0 3px 8px rgba(15, 23, 42, .06);
}

.pendiente-card i {
    margin-right: 5px;
    font-size: 10px;
}

/* DEBE */
.pendiente-debe {
    background: #fff1f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.pendiente-debe i {
    color: #ef4444;
}

/* PAGADO */
.pendiente-pagado {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.pendiente-pagado i {
    color: #22c55e;
}


.tablaOrdenes .orden-expand-btn {
    display: none;
}

.tablaOrdenes.dataTable.collapsed .orden-expand-btn {
    display: inline-flex;
}

/*STATUS ORDEN*/

/* =========================================================
   EFECTIVO / CAMBIO
========================================================= */

.xe-efectivo-box {
    width: 100%;
}


.xe-efectivo-box .xe-status-field {
    margin-bottom: 6px;
}


.xe-cambio-box {
    padding: 7px 10px;

    border: 1px solid #bbf7d0;

    border-radius: 8px;

    background: #f0fdf4;
}


.xe-cambio-info {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;
}


.xe-cambio-info span {
    display: flex;

    align-items: center;

    gap: 5px;

    color: #64748b;

    font-size: 9px;
    font-weight: 700;
}


.xe-cambio-info span i {
    color: #22c55e;

    font-size: 9px;
}


.xe-cambio-info strong {
    color: #16a34a;

    font-size: 13px;
    font-weight: 800;
}

table.dataTable tbody td,
table.dataTable tbody td * {
    font-weight: 580 !important;
    font-size: 11px;
}

table.dataTable thead th {
    font-weight: 700 !important;
}

.orden-fecha-hora {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
}

.orden-fecha-hora span,
.orden-fecha-hora small {
    display: flex;
    align-items: center;
    gap: 4px;
}

.orden-fecha-hora i {
    color: #64748b;
    font-size: 11px;
}

.orden-fecha-hora span {
    color: #334155;
    font-size: 11px;
}

.orden-fecha-hora small {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
}



/* =========================================================
   MODAL IMPRESIÓN
========================================================= */

#modalImprimirOrden .modal-dialog {
    max-width: 480px;
}


.x-print-modal,
.x-pdf-modal {
    border: 0;

    border-radius: 16px;

    overflow: hidden;

    background: #f8fafc;

    box-shadow:
        0 24px 65px rgba(15, 23, 42, .20);
}


/* =========================================================
   HEADER
========================================================= */

.x-print-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 14px 16px;

    background: #ffffff;

    border-bottom:
        1px solid #e7ecf2;
}


.x-print-header-left {
    display: flex;

    align-items: center;

    gap: 10px;
}


.x-print-header-icon {
    width: 38px;

    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 14px;
}


.x-print-pdf-icon {
    background: #fff1f2;

    color: #dc2626;
}


.x-print-header h5 {
    margin: 0;

    color: #334155;

    font-size: 14px;

    font-weight: 800;
}


.x-print-header-left span {
    display: block;

    margin-top: 2px;

    color: #94a3b8;

    font-size: 9px;

    font-weight: 600;
}


.x-print-close {
    margin: 0 !important;

    padding: 0 !important;

    width: 30px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #94a3b8;

    opacity: 1;

    font-size: 23px;
}


.x-print-close:hover {
    color: #475569;
}


/* =========================================================
   BODY
========================================================= */

.x-print-body {
    padding: 22px;
}


/* =========================================================
   BOTONES DE IMPRESIÓN
========================================================= */

.x-print-options {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 14px;
}


/* BOTÓN CUADRADO */

.x-print-option {
    width: 105px;

    height: 105px;

    padding: 10px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border:
        1px solid #e2e8f0;

    border-radius: 12px;

    background: #ffffff;

    color: #475569;

    outline: 0;

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;

    font-family:
        'Inter',
        'Segoe UI',
        Arial,
        sans-serif;
}


.x-print-option:hover {
    transform:
        translateY(-2px);

    border-color: #bfdbfe;

    box-shadow:
        0 8px 20px rgba(15, 23, 42, .08);
}


.x-print-option:focus {
    outline: none;
}


/* TEXTO 12PX */

.x-print-option>span {
    color: #334155;

    font-size: 12px;

    font-weight: 700;

    line-height: 1;
}


/* =========================================================
   ICONOS
========================================================= */

.x-print-option-icon {
    width: 43px;

    height: 43px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    font-size: 17px;
}


/* TICKET */

.x-print-option-icon.ticket {
    background: #eff6ff;

    color: #2563eb;
}


/* A4 */

.x-print-option-icon.a4 {
    background: #ecfdf5;

    color: #16a34a;
}


/* STICKER */

.x-print-option-icon.sticker {
    background: #fff7ed;

    color: #f97316;
}


/* =========================================================
   FOOTER
========================================================= */

.x-print-footer {
    display: flex;

    justify-content: flex-end;

    padding: 11px 15px;

    background: #ffffff;

    border-top:
        1px solid #e7ecf2;
}


.x-print-footer-btn {
    min-height: 36px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 0 13px;

    border: 0;

    border-radius: 8px;

    background: #f1f5f9;

    color: #64748b;

    font-size: 10px;

    font-weight: 700;

    cursor: pointer;
}


.x-print-footer-btn:hover {
    background: #e2e8f0;

    color: #475569;
}


/* =========================================================
   MODAL PDF
========================================================= */

#modalPdf .modal-dialog {
    max-width: 1100px;

    width: 94%;
}


.x-pdf-body {
    padding: 12px;

    background: #f1f5f9;
}


.x-pdf-container {
    width: 100%;

    overflow: hidden;

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, .04);
}


#iframePDF {
    display: block;

    width: 100%;

    min-height: 600px;

    background: #ffffff;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:576px) {

    #modalImprimirOrden .modal-dialog {
        margin: 8px;
    }


    .x-print-body {
        padding: 16px 12px;
    }


    .x-print-options {
        gap: 8px;
    }


    .x-print-option {
        width: 88px;

        height: 88px;

        padding: 7px;
    }


    .x-print-option-icon {
        width: 37px;

        height: 37px;

        font-size: 14px;
    }


    .x-print-option>span {
        font-size: 11px;
    }


    #modalPdf .modal-dialog {
        width: auto;

        margin: 7px;
    }


    #iframePDF {
        min-height: 500px;
    }

}





.xo-check-diagnostico {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 125px minmax(150px, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e7edf4;
    border-radius: 10px;
    background: #fff;
}

.xo-check-name {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.xo-check-name i {
    width: 18px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

.xo-check-diagnostico select,
.xo-check-diagnostico input {
    min-height: 34px;
    height: 34px;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    box-shadow: none;
    font-size: 10px;
    font-weight: 600;
}

.xo-checklist-empty {
    grid-column: 1 / -1;
    padding: 22px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.xo-checklist-empty i {
    margin-right: 5px;
}

@media(max-width:768px) {

    .xo-check-diagnostico {
        grid-template-columns: 1fr;
    }

}

.xo-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.xo-check-diagnostico {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    min-height: 54px;
    padding: 8px 10px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.xo-check-name {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;

    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.xo-check-name i {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: #64748b;
    font-size: 11px;
}

.xo-check-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.estadoChecklistOrden {
    width: 116px !important;
    min-width: 116px;
    height: 36px !important;
    min-height: 36px !important;

    padding: 4px 8px !important;

    border: 1px solid #dbe4ef !important;
    border-radius: 8px !important;
    background: #fff;

    font-size: 10px !important;
    font-weight: 700 !important;

    box-shadow: none !important;
}

.observacionChecklistOrden {
    display: none;
}

.xo-check-diagnostico.tiene-falla {
    grid-column: span 1;
    flex-wrap: wrap;

    border-color: #fecaca;
    background: #fffafa;
}

.xo-check-diagnostico.tiene-falla .observacionChecklistOrden {
    display: block;

    width: 100%;
    height: 34px;

    padding: 5px 8px;

    border: 1px solid #fecaca;
    border-radius: 7px;

    font-size: 10px;
    box-shadow: none;
}

@media(max-width:1100px) {

    .xo-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media(max-width:650px) {

    .xo-check-grid {
        grid-template-columns: 1fr;
    }

}

.xo-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.xo-check-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-height: 48px;
    padding: 8px 10px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #fff;

    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.xo-check-state:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}

.xo-check-state-name {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;

    color: #334155;

    font-size: 11px;
    font-weight: 700;
}

.xo-check-state-name i {
    width: 18px;
    flex: 0 0 18px;

    text-align: center;

    color: #64748b;

    font-size: 11px;
}

.xo-check-state-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xo-state-button {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    font-size: 11px;

    transition:
        transform .12s ease,
        background .12s ease,
        color .12s ease;
}

.xo-state-button:hover {
    transform: scale(1.05);
}


/* NO PROBADO */

.estado-no-probado {
    background: #e2e8f0;
    color: #64748b;
}


/* OK */

.estado-ok {
    background: #dcfce7;
    color: #16a34a;
}


/* FALLA */

.estado-falla {
    background: #fee2e2;
    color: #dc2626;
}


/* TARJETA SEGÚN ESTADO */

.xo-check-state[data-estado="OK"] {
    border-color: #bbf7d0;
    background: #f8fff9;
}

.xo-check-state[data-estado="FALLA"] {
    border-color: #fecaca;
    background: #fffafa;
}

.xo-check-state[data-estado="NO PROBADO"] {
    border-color: #e2e8f0;
    background: #fff;
}


@media(max-width:768px) {

    .xo-check-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   XPERTECH - ACCIONES DE ORDENES
   Principal + menú de tres puntos
========================================================= */

.x-order-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}


/* =========================================================
   BOTÓN PRINCIPAL
========================================================= */

.x-order-action-main {
    min-width: 66px;
    height: 36px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: 1px solid #dbe4ee;
    border-radius: 11px;

    background: #ffffff;
    color: #334155;

    font-size: 11px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    box-shadow: none;
    outline: none;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.x-order-action-main:hover,
.x-order-action-main:focus {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;

    box-shadow: none;
    outline: none;
}

.x-order-action-main i {
    margin: 0 !important;
    color: #2563eb;
    font-size: 10px !important;
}


/* =========================================================
   TRES PUNTOS
========================================================= */

.x-order-action-dropdown {
    position: relative;
}

.x-order-action-more {
    width: 42px;
    height: 36px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #dbe4ee;
    border-radius: 11px;

    background: #ffffff;
    color: #64748b;

    cursor: pointer;

    box-shadow: none;
    outline: none;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.x-order-action-more:hover,
.x-order-action-more:focus,
.x-order-action-dropdown.show .x-order-action-more {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #2563eb;

    box-shadow: none;
    outline: none;
}

.x-order-action-more i {
    margin: 0 !important;
    font-size: 11px !important;
}


/* =========================================================
   DROPDOWN
========================================================= */

.x-order-action-menu {
    min-width: 178px;
    padding: 6px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 15px 35px rgba(15, 23, 42, .12);

    z-index: 9999;
}

.x-order-menu-item {
    width: 100%;
    min-height: 36px;
    padding: 0 10px !important;

    display: flex !important;
    align-items: center !important;
    gap: 9px !important;

    border: 0 !important;
    border-radius: 8px !important;

    background: transparent !important;
    color: #475569 !important;

    font-size: 12px !important;
    font-weight: 700 !important;

    text-transform: none !important;

    box-shadow: none !important;
}

.x-order-menu-item:hover,
.x-order-menu-item:focus {
    background: #f8fafc !important;
    color: #0f172a !important;

    outline: none !important;
    box-shadow: none !important;
}

.x-order-menu-item i {
    width: 16px;

    margin: 0 !important;

    color: #64748b;

    font-size: 10px !important;
    text-align: center;
}


/* WHATSAPP */
.x-order-menu-whatsapp i {
    color: #10b981 !important;
}

.x-order-menu-whatsapp:hover {
    background: #ecfdf5 !important;
    color: #047857 !important;
}


/* ELIMINAR */
.x-order-menu-danger {
    color: #dc2626 !important;
}

.x-order-menu-danger i {
    color: #dc2626 !important;
}

.x-order-menu-danger:hover {
    background: #fff1f2 !important;
    color: #b91c1c !important;
}


/* DIVISOR */
.x-order-action-menu .dropdown-divider {
    margin: 5px 2px;

    border-top: 1px solid #f1f5f9;
}


/* =========================================================
   DATATABLE / RESPONSIVE
========================================================= */

.tablaOrdenes td {
    overflow: visible !important;
}

.tablaOrdenes .dropdown-menu {
    z-index: 9999 !important;
}

@media(max-width:768px) {

    .x-order-action-main {
        min-width: 62px;
        height: 34px;
        padding: 0 10px;
    }

    .x-order-action-more {
        width: 38px;
        height: 34px;
    }

    .x-order-action-menu {
        min-width: 170px;
    }
}