/* =====================================================================
   Despacho / Ventas — estilos del módulo
   ===================================================================== */

/* KPI cards — sin transform en hover (mantiene los headers/columnas
   estables, igual que en contabilidad). Solo cambia borde y sombra. */
.dp-kpi {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 8px;
    padding: .65rem .8rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.dp-kpi:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .07);
}
.dp-kpi-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ct-c-text-muted, #64748b);
    margin-bottom: .2rem;
}
.dp-kpi-head .dp-kpi-label { font-weight: 600; }
.dp-kpi-valor {
    font-family: var(--ct-font-mono, 'JetBrains Mono', monospace);
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ct-c-text, #1e293b);
}
.dp-kpi-valor small {
    font-size: .7rem;
    font-weight: 500;
    color: var(--ct-c-text-muted, #64748b);
}

/* Variantes de color por borde-izquierdo */
.dp-kpi-primary   { border-left: 4px solid #4f46e5; }
.dp-kpi-info      { border-left: 4px solid #0ea5e9; }
.dp-kpi-secondary { border-left: 4px solid #64748b; }
.dp-kpi-success   { border-left: 4px solid #16a34a; }
.dp-kpi-warning   { border-left: 4px solid #f59e0b; }
.dp-kpi-dark      { border-left: 4px solid #1e293b; }

/* Tabs */
.ct-tabs .nav-link {
    color: var(--ct-c-text-muted, #64748b);
    font-size: .82rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    padding: .45rem .9rem;
}
.ct-tabs .nav-link.active {
    color: #4f46e5;
    background: #fff;
    border-color: var(--ct-c-border, #e2e8f0);
    font-weight: 600;
}
.ct-tabs .nav-link:hover:not(.active) {
    background: #f1f5f9;
    color: var(--ct-c-text, #1e293b);
}

/* Las tablas reusan .ct-tabla-mp de contabilidad para mantener el
   mismo look & feel (header subtle, mono numbers, padding compact).
   Solo agregamos el cursor pointer en filas clickeables. */
.ct-tabla-mp tbody tr.dp-prod-row,
.ct-tabla-mp tbody tr.dp-orden-row {
    cursor: pointer;
}
.ct-tabla-mp tbody tr.dp-prod-row:hover,
.ct-tabla-mp tbody tr.dp-orden-row:hover {
    background: var(--ct-c-bg-hover, #eef2ff);
}

/* Footer de totales — coincide con el subtotal de contabilidad
   (banda azul clara, bordes superior/inferior bien visibles). */
.dp-tfoot th {
    background: #eef2ff !important;
    color: #1e3a8a !important;
    padding: .45rem .55rem !important;
    border-top: 2px solid #1e3a8a !important;
    border-bottom: 2px solid #1e3a8a !important;
    font-size: .76rem;
    font-family: var(--ct-font-mono, 'JetBrains Mono', monospace);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Barra de progreso (% del total) en Por Producto */
.dp-progress-wrap {
    position: relative;
    width: 100%;
    height: 18px;
    background: #f1f5f9;
    border-radius: 9px;
    overflow: hidden;
}
.dp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
    border-radius: 9px;
    transition: width .25s ease;
}
.dp-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--ct-font-mono, 'JetBrains Mono', monospace);
    font-size: .68rem;
    font-weight: 700;
    color: #1e293b;
    pointer-events: none;
    mix-blend-mode: difference;
    color: #fff;
}

/* Chart wrapper */
#dpChartDia {
    min-height: 300px;
}

/* Modal: hereda ct-modal de contabilidad.css. Solo afinamos el body. */
#modalDetalleProductoVenta .modal-body,
#modalDetalleOrdenVenta    .modal-body {
    background: #f8fafc;
}

/* Header del módulo */
.ct-header h5 i { color: #4f46e5; }

/* =====================================================================
   Offcanvas de filtros — respeta el navbar fijo (mismo patrón que
   #offcanvasFiltrosCT en contabilidad.css). Sin esto, el encabezado
   del offcanvas queda detrás del navbar azul.
   ===================================================================== */
#dpOffcanvasFiltros {
    top: 70px;
    height: calc(100% - 75px);
    width: 380px;
    border-left: 1px solid var(--ct-c-border, #e2e8f0);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
}
#dpOffcanvasFiltros .offcanvas-header {
    background: var(--ct-c-bg-card, #fff);
    border-bottom: 1px solid var(--ct-c-border, #e2e8f0);
    padding: 1rem 1.25rem;
}
#dpOffcanvasFiltros .offcanvas-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem;
}
#dpOffcanvasFiltros .offcanvas-title i { color: #4f46e5; }

/* Backdrop con blur sutil, igual que en contabilidad */
.ct-page ~ .offcanvas-backdrop,
body > .offcanvas-backdrop {
    background-color: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Modal de orden — cabecera tipo key/value */
.dp-orden-cab {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-left: 4px solid #4f46e5;
    border-radius: 8px;
    padding: .8rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dp-kv-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ct-c-text-muted, #64748b);
    font-weight: 600;
    margin-bottom: .15rem;
}
.dp-kv-value {
    font-size: .88rem;
    color: var(--ct-c-text, #1e293b);
    line-height: 1.3;
}
.dp-kv-value .ct-mono { font-family: var(--ct-font-mono, 'JetBrains Mono', monospace); }
.dp-orden-obs {
    background: #f8fafc;
    border-radius: 6px;
    padding: .45rem .65rem;
}

/* Encabezados de secciones dentro del modal */
.dp-modal-section-head {
    font-size: .78rem;
    font-weight: 700;
    color: var(--ct-c-text, #1e293b);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .35rem .15rem;
    border-bottom: 2px solid var(--ct-c-border, #e2e8f0);
    margin-bottom: .4rem;
}
.dp-modal-section-head small { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* =====================================================================
   Reconciliación Despacho vs Ventas
   ===================================================================== */
.dp-rec-card {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-left: 4px solid #cbd5e1;
    border-radius: 8px;
    padding: .75rem .9rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dp-rec-card-head {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ct-c-text, #1e293b);
    margin-bottom: .35rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--ct-c-border, #e2e8f0);
}
.dp-rec-card-head small { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .65rem; }
.dp-rec-card-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .12rem 0;
    font-size: .82rem;
}
.dp-rec-card-key   { color: var(--ct-c-text-muted, #64748b); font-size: .72rem; }
.dp-rec-card-val   {
    font-family: var(--ct-font-mono, 'JetBrains Mono', monospace);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--ct-c-text, #1e293b);
}
.dp-rec-card-val small { font-size: .65rem; font-weight: 500; color: var(--ct-c-text-muted, #64748b); margin-left: .15rem; }

/* Variantes por lado */
.dp-rec-card-desp   { border-left-color: #4f46e5; }
.dp-rec-card-venta  { border-left-color: #0ea5e9; }
.dp-rec-card-cuadra { border-left-color: #16a34a; background: linear-gradient(135deg, #ffffff 0%, #dcfce7 100%); }
.dp-rec-card-warn   { border-left-color: #f59e0b; background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%); }
.dp-rec-card-err    { border-left-color: #dc2626; background: linear-gradient(135deg, #ffffff 0%, #fee2e2 100%); }

/* Bloque de diagnóstico del cierre en el card Producción */
.dp-rec-diagnostico {
    margin-top: .5rem;
    padding: .55rem .65rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .78rem;
    line-height: 1.4;
    border: 1px solid transparent;
}
.dp-rec-diagnostico i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: .1rem;
}
.dp-rec-diagnostico strong { font-weight: 700; }
.dp-rec-diagnostico-ok {
    background: rgba(22, 163, 74, .10);
    border-color: #86efac;
    color: #14532d;
}
.dp-rec-diagnostico-ok i   { color: #16a34a; }
.dp-rec-diagnostico-warn {
    background: rgba(245, 158, 11, .12);
    border-color: #fcd34d;
    color: #78350f;
}
.dp-rec-diagnostico-warn i { color: #d97706; }
.dp-rec-diagnostico-err {
    background: rgba(220, 38, 38, .10);
    border-color: #fca5a5;
    color: #7f1d1d;
}
.dp-rec-diagnostico-err i  { color: #dc2626; }

/* Badge inline del estado de Rem./Exced. dentro del diagnóstico */
.dp-rec-rem-badge {
    display: inline-block;
    margin-left: .35rem;
    padding: .08rem .4rem;
    border-radius: 10px;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    background: #fff;
    vertical-align: baseline;
}
.dp-rec-rem-badge-on  {
    color: #14532d;
    background: #d1fae5;
    border-color: #6ee7b7;
}
.dp-rec-rem-badge-off {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Header agrupado de la tabla de reconciliación */
.dp-rec-hdr-desp {
    background: #eef2ff !important;
    color: #1e3a8a !important;
    border-bottom: 2px solid #c7d2fe !important;
}
.dp-rec-hdr-ven {
    background: #ecfeff !important;
    color: #155e75 !important;
    border-bottom: 2px solid #a5f3fc !important;
}
.dp-rec-hdr-diff {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

/* Filas con discrepancias resaltadas */
.ct-tabla-mp tbody tr.dp-rec-row-warn { background: rgba(245, 158, 11, .07); }
.ct-tabla-mp tbody tr.dp-rec-row-err  { background: rgba(220,  38, 38, .07); }
/* Fila con ajuste cerrado (descuadre ya resuelto) — verde-azulado suave */
.ct-tabla-mp tbody tr.dp-rec-row-aj   { background: rgba(16, 185, 129, .10); }
.ct-tabla-mp tbody tr.dp-rec-row.dp-rec-row-aj:hover { background: rgba(16, 185, 129, .22); }
/* Fila con remisión ANULADA — gris/rojo punteado para que sea obvio */
.ct-tabla-mp tbody tr.dp-rec-row-anulada {
    background: repeating-linear-gradient(
        45deg,
        rgba(220, 38, 38, .04),
        rgba(220, 38, 38, .04) 8px,
        rgba(220, 38, 38, .10) 8px,
        rgba(220, 38, 38, .10) 16px
    );
}
.ct-tabla-mp tbody tr.dp-rec-row.dp-rec-row-anulada:hover {
    background: rgba(220, 38, 38, .16);
}
.dp-rec-banner-anulada {
    border-left: 4px solid #dc2626;
}

/* Card de remisión anulada en el modal de orden de carga */
.dp-oc-rem-card.dp-oc-rem-anulada {
    border-left-color: #dc2626;
    background: rgba(220, 38, 38, .025);
}
.dp-oc-rem-card.dp-oc-rem-anulada .dp-oc-rem-head {
    background: #fef2f2;
}

/* Filas clickeables (drill-down) */
.ct-tabla-mp tbody tr.dp-rec-row { cursor: pointer; }
.ct-tabla-mp tbody tr.dp-rec-row:hover {
    background: var(--ct-c-bg-hover, #eef2ff);
}
.ct-tabla-mp tbody tr.dp-rec-row.dp-rec-row-warn:hover {
    background: rgba(245, 158, 11, .18);
}
.ct-tabla-mp tbody tr.dp-rec-row.dp-rec-row-err:hover {
    background: rgba(220, 38, 38, .18);
}

/* Scroll interno de la tabla — headers stick al top mientras se hace
   scroll del cuerpo. Coincide con la altura cómoda de viewport. */
.dp-rec-scroll {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 6px;
    background: #fff;
}
.dp-rec-scroll.dp-rec-scroll-sm { max-height: 280px; }
.dp-rec-scroll table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--ct-c-bg-subtle, #f8fafc);
}
/* Sticky para la 2da fila del header agrupado */
.dp-rec-scroll table thead tr:nth-child(2) th {
    top: 32px;   /* ajustar si cambia la altura del thead row 1 */
}
.dp-rec-scroll table thead th.dp-rec-hdr-desp,
.dp-rec-scroll table thead th.dp-rec-hdr-ven,
.dp-rec-scroll table thead th.dp-rec-hdr-diff {
    /* fondo del header agrupado conserva su color identitario */
    z-index: 3;
}

/* Leyenda de pills */
.dp-rec-legend { display: inline-flex; gap: .35rem; }

/* =====================================================================
   Verificación BD — chips de filtro
   ===================================================================== */
.dp-bd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.dp-bd-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .55rem;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    background: #fff;
    border-radius: 999px;
    font-size: .72rem;
    color: var(--ct-c-text, #1e293b);
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.dp-bd-chip:hover { background: #f1f5f9; }
.dp-bd-chip.is-active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    font-weight: 600;
}
.dp-bd-chip.is-active .dp-bd-chip-dot { background: #fff; }
.dp-bd-chip-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.dp-bd-chip-gray .dp-bd-chip-dot    { background: #94a3b8; }
.dp-bd-chip-success .dp-bd-chip-dot { background: #16a34a; }
.dp-bd-chip-warning .dp-bd-chip-dot { background: #f59e0b; }
.dp-bd-chip-danger  .dp-bd-chip-dot { background: #dc2626; }

/* Celdas con diferencia entre Producción y Ventas — fondo rojo tenue
   + borde lateral rojo para destacar exactamente qué campo no cuadra. */
.ct-tabla-mp tbody td.dp-bd-cell-diff {
    background: rgba(220, 38, 38, .14) !important;
    color: #7f1d1d;
    font-weight: 700;
    border-left: 2px solid rgba(220, 38, 38, .55);
    border-right: 2px solid rgba(220, 38, 38, .55);
}

/* Badges chiquitos que muestran QUÉ campo difiere (al lado del estado) */
.dp-bd-diff-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
}
.dp-bd-diff-tag {
    display: inline-block;
    font-family: var(--ct-font-mono, monospace);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .12rem .35rem;
    border-radius: .25rem;
    color: #fff;
    background: #dc2626;
    text-transform: uppercase;
}
.dp-bd-diff-tag.tag-unid  { background: #ea580c; }
.dp-bd-diff-tag.tag-peso  { background: #dc2626; }
.dp-bd-diff-tag.tag-orden { background: #7c3aed; }
.dp-bd-diff-tag.tag-remis { background: #2563eb; }
.dp-bd-diff-tag.tag-fecha { background: #0891b2; }

/* Modal Reconciliación drill-down — más ancho que modal-xl para que
   las tablas Producción vs Ventas + Δ quepan sin tanto scroll horizontal. */
.dp-modal-wide {
    max-width: 95vw !important;
}
@media (min-width: 1600px) {
    .dp-modal-wide { max-width: 1500px !important; }
}

/* Modal anidado (Comparación de peso por etiqueta) — z-index por encima
   del drill-down (modal padre) para que no quede tirado atrás. */
#modalComparacionEtq        { z-index: 1075; }
.modal-backdrop.dp-cmp-backdrop { z-index: 1070; }

/* SweetAlert2 — body custom para "Verificación completada" */
.dp-swal-body { font-size: .9rem; }
.dp-swal-row {
    display: flex;
    align-items: center;
    padding: .35rem .65rem;
    border-radius: .35rem;
    margin-bottom: .25rem;
    background: #f8fafc;
}
.dp-swal-row strong { font-family: var(--ct-font-mono, 'JetBrains Mono', monospace); font-size: 1rem; }
.dp-swal-row.dp-swal-warn { background: #fef3c7; color: #92400e; }
.dp-swal-row.dp-swal-ok   { background: #dcfce7; color: #166534; }
.dp-swal-row.dp-swal-err  { background: #fee2e2; color: #991b1b; }

/* Botón verde de exportar Excel + checkbox de selección */
.dp-btn-export-excel { font-weight: 500; }
.dp-fact-check, .dp-fact-master { cursor: pointer; }
.ct-tabla-mp tbody tr.dp-fact-header td:first-child { background: transparent !important; }

/* =====================================================================
   Por Factura — filas expandibles en el modal Reconciliación
   ===================================================================== */
.dp-fact-header { cursor: pointer; }
.dp-fact-header:hover { background: var(--ct-c-bg-hover, #eef2ff); }
.dp-fact-chevron {
    transition: transform .15s ease;
    color: var(--ct-c-text-muted, #64748b);
    font-size: .7rem;
}
.dp-fact-header.is-open .dp-fact-chevron {
    transform: rotate(90deg);
    color: #4f46e5;
}
.dp-fact-detail > td {
    padding: 0 !important;
    background: #f8fafc;
    border-top: none !important;
    border-bottom: 2px solid var(--ct-c-border, #e2e8f0) !important;
}
.dp-fact-detail-wrap {
    padding: .65rem .85rem;
    border-left: 3px solid #4f46e5;
    background: #f8fafc;
}
.dp-fact-detail-hdr th {
    background: #eef2ff !important;
    color: #1e3a8a !important;
    font-size: .65rem !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .35rem .5rem !important;
}

/* Filas de etiqueta clickeables (abren modal de comparación de peso) */
.ct-tabla-mp tbody tr.dp-etq-row { cursor: pointer; }
.ct-tabla-mp tbody tr.dp-etq-row:hover { background: #eef2ff; }

/* Filas de Por Cliente clickeables (expanden detalle) */
.ct-tabla-mp tbody tr.dp-cli-header { cursor: pointer; }
.ct-tabla-mp tbody tr.dp-cli-header:hover { background: var(--ct-c-bg-hover, #eef2ff); }
.dp-cli-header.is-open .dp-fact-chevron {
    transform: rotate(90deg);
    color: #4f46e5;
}
.dp-cli-detail > td {
    padding: 0 !important;
    background: #f8fafc;
    border-top: none !important;
    border-bottom: 2px solid var(--ct-c-border, #e2e8f0) !important;
}
.dp-cli-detail-wrap {
    padding: .65rem .85rem;
    border-left: 3px solid #16a34a;
    background: #f8fafc;
}

/* Modal de comparación de peso por etiqueta — card de consenso */
.dp-cmp-consensus {
    background: #fff;
    border: 1px solid;
    border-radius: 8px;
    padding: .85rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.dp-cmp-consensus.dp-cmp-ok   { border-color: #16a34a; background: linear-gradient(135deg, #fff 0%, #dcfce7 100%); }
.dp-cmp-consensus.dp-cmp-warn { border-color: #f59e0b; background: linear-gradient(135deg, #fff 0%, #fef3c7 100%); }
.dp-cmp-consensus-head {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.dp-cmp-consensus.dp-cmp-ok   .dp-cmp-consensus-head { color: #15803d; }
.dp-cmp-consensus.dp-cmp-warn .dp-cmp-consensus-head { color: #b45309; }
.dp-cmp-consensus-body {
    font-size: .88rem;
    color: #1e293b;
}
.dp-cmp-consensus .ct-mono { font-family: var(--ct-font-mono, monospace); }

/* Filas con clasificación de cuadre */
.ct-tabla-mp tbody tr.dp-cmp-row-ok    td { background: rgba(34, 197, 94, .08); }
.ct-tabla-mp tbody tr.dp-cmp-row-warn  td { background: rgba(245, 158, 11, .10); }
.ct-tabla-mp tbody tr.dp-cmp-row-err   td {
    background: rgba(220, 38, 38, .12);
    border-left: 3px solid #dc2626 !important;
}

/* Diagnóstico */
.dp-cmp-diag {
    background: #f8fafc;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 6px;
    padding: .65rem .85rem;
}
.dp-cmp-diag-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: .85rem;
}
.dp-cmp-diag-list li {
    padding: .15rem 0;
    line-height: 1.5;
}
.dp-cmp-diag-list li.dp-diag-ok   { color: #15803d; }
.dp-cmp-diag-list li.dp-diag-warn { color: #b45309; }
.dp-cmp-diag-list li.dp-diag-err  { color: #b91c1c; font-weight: 500; }
.dp-kv-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}
.dp-kv-stack .dp-rec-card-val {
    font-size: .72rem;
    font-weight: 500;
    max-width: 100%;
    display: block;
}
/* Descripción completa — sin truncar, wrap a varias líneas si hace falta */
.dp-desc-full {
    white-space: normal !important;
    word-break: break-word;
    line-height: 1.35;
}

/* =====================================================================
   Guía de la sección Ajustes de Peso (renderGuia)
   Panel colapsable que explica los estados y las acciones a la contadora.
   ===================================================================== */
.dp-aj-guia {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-left: 4px solid #4f46e5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    padding: .65rem .9rem;
}
.dp-aj-guia[open] {
    padding-bottom: .9rem;
}
.dp-aj-guia summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    font-size: .9rem;
    color: var(--ct-c-text, #1e293b);
    padding: .15rem 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
    transition: color .15s ease;
}
.dp-aj-guia summary::-webkit-details-marker { display: none; }
.dp-aj-guia summary::before {
    content: "\f054"; /* chevron-right */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 900;
    font-size: .7rem;
    color: var(--ct-c-text-muted, #64748b);
    margin-right: .4rem;
    transition: transform .2s ease;
    display: inline-block;
}
.dp-aj-guia[open] summary::before {
    transform: rotate(90deg);
}
.dp-aj-guia summary:hover {
    color: #4f46e5;
}
.dp-aj-guia-body {
    border-top: 1px dashed var(--ct-c-border, #e2e8f0);
    padding-top: .25rem;
}
.dp-aj-guia-card {
    background: #f8fafc;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 8px;
    padding: .65rem .8rem;
    height: 100%;
}
.dp-aj-guia-titulo {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ct-c-text, #1e293b);
    margin-bottom: .45rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--ct-c-border, #e2e8f0);
}
.dp-aj-guia-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--ct-c-text, #1e293b);
}
.dp-aj-guia-list > li {
    padding: .25rem 0;
    border-bottom: 1px dotted #e2e8f0;
}
.dp-aj-guia-list > li:last-child {
    border-bottom: none;
}
.dp-aj-guia-list .ct-state-badge,
.dp-aj-guia-list .badge {
    margin-right: .35rem;
    vertical-align: baseline;
}

/* =====================================================================
   Pills de ajuste cerrado (drill-down de Reconciliación)
   Visualmente distinto del verde "cuadra" porque significa "alguien
   tuvo que resolver esto manualmente", no "cuadra naturalmente".
   ===================================================================== */
.ct-pill.ct-pill-aj {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
}
.ct-pill.ct-pill-aj-parcial {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}
.dp-rec-banner-aj {
    border-left: 4px solid #10b981;
}

/* Overlay de loading dentro del body de un modal — bloquea visualmente
   los inputs mientras se espera la respuesta del backend. */
.dp-modal-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
    animation: dp-fade-in .12s ease-out;
}
.dp-modal-loading-box {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 10px;
    padding: 1.1rem 1.6rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    text-align: center;
    min-width: 180px;
}
@keyframes dp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Badge inline "N ajustes cerrados" para totales y filas de producto */
.dp-badge-aj {
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .4rem;
    border-radius: 999px;
}
.dp-badge-aj i { font-size: .6rem; }

/* Fila "parcial" en la tabla top-level — ámbar muy suave para indicar
   "hay descuadre pero parte ya está justificada". */
.ct-tabla-mp tbody tr.dp-rec-row-parcial { background: rgba(245, 158, 11, .05); }
.ct-tabla-mp tbody tr.dp-rec-row.dp-rec-row-parcial:hover {
    background: rgba(245, 158, 11, .15);
}

/* Sub-anotación bajo Δ Peso (top-level) con desglose ajustado / pendiente */
.dp-rec-sub-delta {
    margin-top: .15rem;
    font-size: .65rem;
    line-height: 1.1;
    color: var(--ct-c-text-muted, #64748b);
    display: flex;
    gap: .35rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    font-family: var(--ct-font-mono, 'JetBrains Mono', monospace);
}
.dp-rec-sub-delta .dp-rec-sub-aj { color: #0e7490; }
.dp-rec-sub-delta .dp-rec-sub-pd { color: #b45309; }

/* Sub-filas del tfoot en el drill-down — desglose Ajustado / Pendiente */
.dp-tfoot-sub > th {
    font-weight: 500 !important;
    background: #f8fafc !important;
    border-top: 1px dashed #cbd5e1 !important;
}
.dp-tfoot-sub-aj > th { color: #0e7490 !important; }
.dp-tfoot-sub-pd > th { color: #b45309 !important; }

/* Líneas de desglose en la card Diferencia (top) */
.dp-rec-card-line.dp-rec-line-aj {
    border-top: 1px dashed #a7f3d0;
    margin-top: .25rem;
    padding-top: .2rem;
}
.dp-rec-card-line.dp-rec-line-aj .dp-rec-card-key,
.dp-rec-card-line.dp-rec-line-aj .dp-rec-card-val { color: #0e7490; }
.dp-rec-card-line.dp-rec-line-aj-per .dp-rec-card-key,
.dp-rec-card-line.dp-rec-line-aj-per .dp-rec-card-val { color: #6d28d9; }

/* Botón "Registrar ajuste del período" dentro de la card Diferencia */
.dp-rec-card-line.dp-rec-card-action {
    border-top: 1px solid var(--ct-c-border, #e2e8f0);
    margin-top: .35rem;
    padding-top: .45rem;
    display: block;
}
.dp-rec-card-line.dp-rec-line-pd .dp-rec-card-key,
.dp-rec-card-line.dp-rec-line-pd .dp-rec-card-val { color: #b45309; }

/* =====================================================================
   Sub-tabs internos dentro del tab "Ajustes de Peso"
   (Por Factura / Por Período)
   ===================================================================== */
.dp-aj-subtabs {
    background: #f1f5f9;
    border-radius: 10px;
    padding: .25rem;
    gap: .15rem;
    width: max-content;
}
.dp-aj-subtabs .nav-link {
    color: var(--ct-c-text, #1e293b);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .82rem;
    padding: .4rem .9rem;
    transition: background .15s ease, color .15s ease;
}
.dp-aj-subtabs .nav-link:hover {
    background: rgba(79, 70, 229, .08);
}
.dp-aj-subtabs .nav-link.active {
    background: #fff;
    color: #4f46e5;
    border-color: #c7d2fe;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.dp-aj-subtabs .nav-link small { font-weight: 400; }

/* KPI variants nuevos usados en renderAjustesPeriodo */
.dp-kpi-secondary {
    background: linear-gradient(135deg, #fff 0%, #f1f5f9 100%);
    border-left: 4px solid #64748b;
}
.dp-kpi-dark {
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    border-left: 4px solid #1e293b;
}

/* Caja de "disponible" dentro del modal de crear/editar ajuste-período.
   Cuando termina de calcular se sustituye su contenido por un layout
   detallado con líneas alineadas (clave : valor en ct-mono). */
.dp-ajp-info-box.dp-ajp-info-box-loaded {
    background: #f8fafc;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    color: var(--ct-c-text, #1e293b);
}
.dp-ajp-info-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .12rem 0;
    font-size: .78rem;
}

/* Grid de dos columnas (Toneladas / Unidades) dentro del info-box */
.dp-ajp-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
@media (max-width: 540px) {
    .dp-ajp-info-grid { grid-template-columns: 1fr; }
}
.dp-ajp-info-col {
    padding: .35rem .55rem;
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 6px;
}
.dp-ajp-info-col-head {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ct-c-text-muted, #64748b);
    border-bottom: 1px dashed var(--ct-c-border, #e2e8f0);
    padding-bottom: .2rem;
    margin-bottom: .25rem;
}

/* =====================================================================
   Modal "Detalle completo de Orden de Carga"
   ===================================================================== */

/* Link de orden76 dentro de tablas — discreto pero claro que es clickeable */
.dp-orden-carga-link {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px dashed #c7d2fe;
    cursor: pointer;
    font-weight: 700;
    transition: color .12s ease, border-color .12s ease;
}
.dp-orden-carga-link:hover {
    color: #312e81;
    border-bottom-color: #4f46e5;
    background: rgba(79, 70, 229, .06);
}

/* Si el modal de orden carga se abre encima de otro modal, su backdrop
   debe quedar por encima del backdrop padre (similar al patrón usado en
   modalComparacionEtq dentro del drill-down de reconciliación). */
.modal-backdrop.dp-oc-backdrop { z-index: 1075 !important; }
#modalOrdenCargaCompleta        { z-index: 1080 !important; }

/* Secciones colapsables dentro del modal */
.dp-oc-section {
    background: #fff;
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-radius: 8px;
    padding: .55rem .9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.dp-oc-section summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    font-size: .92rem;
    color: var(--ct-c-text, #1e293b);
    padding: .15rem 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
}
.dp-oc-section summary::-webkit-details-marker { display: none; }
.dp-oc-section summary::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 900;
    font-size: .7rem;
    color: var(--ct-c-text-muted, #64748b);
    margin-right: .4rem;
    transition: transform .2s ease;
    display: inline-block;
}
.dp-oc-section[open] summary::before { transform: rotate(90deg); }
.dp-oc-section summary:hover { color: #4f46e5; }
.dp-oc-section-body {
    border-top: 1px dashed var(--ct-c-border, #e2e8f0);
    padding-top: .55rem;
    margin-top: .15rem;
}

/* Tarjetas por remisión dentro de la sección "Remisiones" */
.dp-oc-rem-card {
    border: 1px solid var(--ct-c-border, #e2e8f0);
    border-left: 4px solid #4f46e5;
    border-radius: 6px;
    overflow: hidden;
}
.dp-oc-rem-head {
    background: #f8fafc;
    padding: .4rem .65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ct-c-border, #e2e8f0);
}

/* ========== Tab "Buscar" ========== */
.dp-bs-card {
    border: 1px solid var(--ct-c-border, #e2e8f0);
    transition: box-shadow .15s ease;
}
.dp-bs-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.dp-bs-cadena {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem .75rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: .85rem;
}
.dp-bs-step {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    white-space: nowrap;
}
.dp-bs-arrow {
    color: #94a3b8;
    font-weight: 700;
    user-select: none;
}
.dp-bs-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem 1.25rem;
    padding-top: .25rem;
    font-size: .85rem;
}
.dp-bs-cell {
    min-width: 0;
}

/* Ajustadas en card DESPACHO */
.dp-rec-card-line.dp-rec-line-total {
    border-top: 1px dashed var(--ct-c-border, #e2e8f0);
    margin-top: .25rem;
    padding-top: .35rem;
}

/* =====================================================================
   Card Diferencia rediseñada — versión visual con ecuación destacada
   ===================================================================== */

/* Bruto destacado al tope: número grande con su signo y color */
.dp-rec-card-diff-v2 .dp-rec-diff-bruto {
    background: linear-gradient(135deg, rgba(248,113,113,.08), rgba(248,113,113,.02));
    border: 1px solid rgba(248,113,113,.25);
    border-radius: 8px;
    padding: .55rem .7rem;
    margin: .25rem 0 .65rem;
}
.dp-rec-card-diff-v2.dp-rec-card-cuadra .dp-rec-diff-bruto {
    background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(34,197,94,.02));
    border-color: rgba(34,197,94,.25);
}
.dp-rec-card-diff-v2.dp-rec-card-warn .dp-rec-diff-bruto {
    background: linear-gradient(135deg, rgba(251,191,36,.08), rgba(251,191,36,.02));
    border-color: rgba(251,191,36,.3);
}
.dp-rec-diff-bruto-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: .15rem;
}
.dp-rec-diff-bruto-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}
.dp-rec-diff-bruto-num {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}
.dp-rec-diff-bruto-num-sub {
    font-size: .85rem;
    font-weight: 600;
    color: #64748b;
}

/* Ecuación: Bruto − Resuelto = Pendiente */
.dp-rec-diff-ecuacion {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .35rem .5rem;
    margin-top: .35rem;
}
.dp-rec-diff-eq-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .25rem 0;
    border-bottom: 1px dashed #e2e8f0;
}
.dp-rec-diff-eq-row:last-child { border-bottom: none; }
.dp-rec-diff-eq-label {
    font-size: .78rem;
    color: #475569;
}
.dp-rec-diff-eq-val {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1e293b;
    font-size: .85rem;
    text-align: right;
    line-height: 1.15;
}
.dp-rec-diff-eq-val .small {
    font-size: .7rem;
    font-weight: 500;
    color: #94a3b8;
    margin-top: .05rem;
}

/* Filas de resuelto (verde tenue) */
.dp-rec-diff-eq-resuelto {
    background: rgba(34,197,94,.04);
    margin: 0 -.5rem;
    padding-left: .5rem;
    padding-right: .5rem;
    border-bottom: 1px dashed rgba(34,197,94,.2);
}

/* Fila Pendiente destacada (rojo si > 0, verde si cuadra) */
.dp-rec-diff-eq-pendiente {
    margin: .15rem -.5rem -.35rem;
    padding: .55rem .5rem;
    background: linear-gradient(90deg, rgba(248,113,113,.08), rgba(248,113,113,.03));
    border-top: 2px solid rgba(248,113,113,.4) !important;
    border-radius: 0 0 8px 8px;
}
.dp-rec-diff-eq-pendiente.is-cuadrado {
    background: linear-gradient(90deg, rgba(34,197,94,.1), rgba(34,197,94,.04));
    border-top-color: rgba(34,197,94,.5) !important;
}
.dp-rec-diff-eq-pendiente .dp-rec-diff-eq-label {
    font-size: .82rem;
    color: #0f172a;
}
.dp-rec-diff-eq-pendiente .dp-rec-diff-eq-val {
    font-size: 1.05rem;
}

/* Barra de progreso */
.dp-rec-diff-progress .progress {
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.dp-rec-diff-progress .progress-bar {
    transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* =====================================================================
   Card Despacho v2 — bloques agrupados con jerarquía visual
   ===================================================================== */
.dp-rec-card-v2 .dp-rec-block {
    border-radius: 8px;
    padding: .55rem .7rem;
    margin: .35rem 0;
    border: 1px solid #e2e8f0;
    background: #fafbfc;
}
.dp-rec-card-v2 .dp-rec-block-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .2rem;
}
.dp-rec-card-v2 .dp-rec-block-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .15rem 0;
    border-bottom: 1px dashed transparent;
    font-size: .82rem;
}
.dp-rec-card-v2 .dp-rec-block-row + .dp-rec-block-row {
    border-top: 1px dashed #e8edf2;
    padding-top: .25rem;
    margin-top: .1rem;
}
.dp-rec-card-v2 .dp-rec-block-key {
    color: #475569;
    font-size: .78rem;
}
.dp-rec-card-v2 .dp-rec-block-val {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    white-space: nowrap;
}
.dp-rec-card-v2 .dp-rec-block-val-big {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}
.dp-rec-card-v2 .dp-rec-block-val small {
    font-size: .65rem;
    color: #94a3b8;
    font-weight: 500;
    margin-left: .15rem;
}

/* Bloque AJUSTADAS — fondo ámbar suave cuando ON, gris cuando OFF */
.dp-rec-card-v2 .dp-rec-block-aj.is-on {
    background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(245,158,11,.02));
    border-color: rgba(245,158,11,.3);
}
.dp-rec-card-v2 .dp-rec-block-aj.is-off {
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: .65;
}
.dp-rec-card-v2 .dp-rec-block-aj.is-on .dp-rec-block-label {
    color: #92400e;
}

/* Bloque Σ TOTAL — destacadísimo */
.dp-rec-card-v2 .dp-rec-block-total {
    background: linear-gradient(135deg, rgba(79,70,229,.1), rgba(99,102,241,.04));
    border: 2px solid rgba(79,70,229,.3);
    text-align: center;
    padding: .65rem .7rem;
}
.dp-rec-card-v2 .dp-rec-block-total .dp-rec-block-label {
    color: #3730a3;
    font-weight: 800;
    justify-content: center;
}
.dp-rec-card-v2 .dp-rec-block-total-num {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 1.5rem;
    font-weight: 800;
    color: #3730a3;
    line-height: 1.1;
}
.dp-rec-card-v2 .dp-rec-block-total-num small {
    font-size: .7rem;
    color: #6366f1;
    font-weight: 600;
    margin-left: .2rem;
}
.dp-rec-card-v2 .dp-rec-block-total-sub {
    font-size: .8rem;
    color: #6366f1;
    font-weight: 600;
    margin-top: .15rem;
}

/* Bloque ajustes período (contable) — verde tenue al pie */
.dp-rec-card-v2 .dp-rec-block-aj-per {
    background: linear-gradient(135deg, rgba(34,197,94,.06), rgba(34,197,94,.01));
    border: 1px dashed rgba(34,197,94,.4);
}
.dp-rec-card-v2 .dp-rec-block-note {
    font-size: .68rem;
    color: #64748b;
    margin-top: .25rem;
    font-style: italic;
}

/* Bloque VENTAS — fondo cyan suave para distinguir de Despacho */
.dp-rec-card-v2 .dp-rec-block-ventas {
    background: linear-gradient(135deg, rgba(8,145,178,.06), rgba(6,182,212,.02));
    border-color: rgba(8,145,178,.25);
}
.dp-rec-card-v2 .dp-rec-block-ventas .dp-rec-block-label {
    color: #155e75;
}
.dp-rec-card-v2 .dp-rec-block-ventas .dp-rec-block-val-big {
    color: #155e75;
}

/* =====================================================================
   Compactación general — reducir padding, font-size y altura de cards
   ===================================================================== */
.dp-rec-card-v2 {
    padding: .65rem .75rem !important;
}
.dp-rec-card-v2 .dp-rec-card-head {
    font-size: .92rem;
    margin-bottom: .25rem;
    padding-bottom: .25rem;
}
.dp-rec-card-v2 .dp-rec-block {
    padding: .4rem .55rem;
    margin: .25rem 0;
}
.dp-rec-card-v2 .dp-rec-block-label {
    font-size: .62rem;
    margin-bottom: .15rem;
}
.dp-rec-card-v2 .dp-rec-block-row {
    padding: .08rem 0;
    font-size: .76rem;
    line-height: 1.25;
}
.dp-rec-card-v2 .dp-rec-block-row + .dp-rec-block-row {
    padding-top: .15rem;
    margin-top: .05rem;
}
.dp-rec-card-v2 .dp-rec-block-val {
    font-size: .8rem;
}
.dp-rec-card-v2 .dp-rec-block-val-big {
    font-size: 1rem;
}
.dp-rec-card-v2 .dp-rec-block-val-big small {
    font-size: .6rem;
}

/* Total más compacto */
.dp-rec-card-v2 .dp-rec-block-total {
    padding: .45rem .55rem;
}
.dp-rec-card-v2 .dp-rec-block-total-num {
    font-size: 1.25rem;
    line-height: 1.1;
}
.dp-rec-card-v2 .dp-rec-block-total-sub {
    font-size: .72rem;
    margin-top: .1rem;
}

/* También compactar la card de Diferencia v2 */
.dp-rec-card-diff-v2 .dp-rec-diff-bruto {
    padding: .4rem .55rem;
    margin: .2rem 0 .4rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-bruto-label {
    font-size: .62rem;
    margin-bottom: .1rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-bruto-num {
    font-size: 1.2rem;
    line-height: 1.1;
}
.dp-rec-card-diff-v2 .dp-rec-diff-bruto-num-sub {
    font-size: .75rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-ecuacion {
    padding: .25rem .4rem;
    margin-top: .25rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-eq-row {
    padding: .15rem 0;
    font-size: .76rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-eq-label {
    font-size: .73rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-eq-val {
    font-size: .82rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-eq-pendiente {
    padding: .4rem .4rem;
    margin: .1rem -.4rem -.25rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-eq-pendiente .dp-rec-diff-eq-val {
    font-size: .95rem;
}
.dp-rec-card-diff-v2 .dp-rec-diff-progress {
    margin-top: .35rem !important;
}
.dp-rec-card-diff-v2 .dp-rec-diff-progress .progress {
    height: 6px !important;
}

/* =====================================================================
   DESPACHO NO FACTURABLE (cambio de material / devolución)
   ===================================================================== */
/* Bloque "No facturable" DENTRO de la card de Ventas */
.dp-rec-block-nf {
    background: linear-gradient(135deg, #fafaff 0%, #eef2ff 100%) !important;
    border-color: #c7d2fe !important;
    margin-top: .5rem !important;
}
.dp-rec-block-nf .dp-rec-block-label { color: #4f46e5 !important; }

/* Control dentro del modal de orden de carga */
.dp-nf-control .dp-nf-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .6rem .8rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.dp-nf-control .dp-nf-banner-txt { font-size: .82rem; color: #334155; }
.dp-nf-control .dp-nf-banner-on {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #fafaff 0%, #eef2ff 100%);
}
.dp-nf-control .dp-nf-banner-on .dp-nf-banner-txt { color: #3730a3; }
.dp-nf-control .dp-nf-obs {
    margin-top: .2rem;
    font-style: italic;
    color: #64748b;
    font-size: .78rem;
}
