.content-table {
    background-color: var(--co-fondo-superficie, #ffffff);
    border: 1px solid var(--co-borde-tabla);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 33, 71, 0.06);
    overflow-x: auto;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-right: 0;
    margin: 4px 0;
}

.content-table:not(.subtable) {
    min-height: calc(100vh - 150px);
    max-height: calc(100vh - 225px);
}

/* Scrollbar estilizado moderno */
.content-table::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
.content-table::-webkit-scrollbar-track {
    background: transparent;
}
.content-table::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 4px;
}
.content-table::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.75);
}

.content-table table span {
    font-size: 11px;
    font-weight: 700;
    background-color: var(--co-tabla-span-fondo);
    color: var(--co-tabla-span-texto);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.content-table table {
    border-collapse: separate;
    border-spacing: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.8125rem; /* 13px - Opción 1A */
    color: var(--co-texto-base, #1e293b);
    min-width: 450px;
    width: 100%;
}

.content-table table thead {
    background-color: var(--co-tabla-cabecera) !important;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
}

.content-table table thead th:not(.no-sort):not([data-sortable="false"]) {
    cursor: pointer;
}

.content-table table thead th.no-sort,
.content-table table thead th[data-sortable="false"] {
    cursor: default !important;
}

.content-table thead tr {
    color: var(--co-tabla-texto-cabecera, #f8fafc);
}

.content-table thead th {
    background-color: var(--co-tabla-cabecera) !important;
    color: var(--co-tabla-texto-cabecera, #f8fafc) !important;
    padding: 7px 10px !important;
    height: 35px;
    vertical-align: middle;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-right: none;
    border-top: none;
    border-left: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.content-table thead tr:first-child th:first-child {
    border-top-left-radius: 9px;
}

.content-table thead tr:first-child th:last-child {
    border-top-right-radius: 9px;
}

.content-table tbody tr {
    border-bottom: 1px solid var(--co-tabla-borde-fila);
    transition: background-color 0.15s ease;
}

.content-table tbody tr:nth-of-type(even) {
    background-color: var(--co-tabla-fila-alt);
}

.content-table tbody tr:hover {
    background-color: var(--co-tabla-fila-hover) !important;
    cursor: pointer;
}

/* Fila con RECHAZO DEFINITIVO de SUNAT (registro de ventas):
   tinte rojizo que funciona en tema claro y oscuro (superpuesto al fondo de la tabla) */
.content-table tbody tr.fila-rechazo-def {
    background-color: rgba(220, 53, 69, 0.20);
}

.content-table tbody tr.fila-rechazo-def:hover {
    background-color: rgba(220, 53, 69, 0.34) !important;
}

.content-table tbody tr.fila-seleccionable.seleccionada,
.content-table tbody tr.table-active,
.content-table tbody tr.selected {
    background-color: var(--co-tabla-fila-selected, #e0f2fe) !important;
    box-shadow: inset 4px 0 0 var(--co-foco, #0284c7) !important;
}

.content-table tbody tr.fila-seleccionable.seleccionada td:first-child {
    box-shadow: inset 4px 0 0 var(--co-foco, #0284c7);
}

.content-table td {
    height: 36px;
    min-height: 36px;
    padding: 6px 10px;
    vertical-align: top;
    line-height: 1.35;
    border-bottom: 1px solid var(--co-tabla-borde-fila);
    border-right: none;
}

.content-table tbody tr:last-of-type td {
    border-bottom: 2px solid var(--co-tabla-borde-pie);
}

.td-left {
    padding-left: 10px !important;
    text-align: left;
}

.td-right {
    padding-right: 10px !important;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.td-center {
    text-align: center;
}

.btn-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--co-texto-suave, #64748b);
    transition: all 0.15s ease;
}

.btn-accion:hover {
    background-color: var(--co-tabla-fila-hover);
    color: var(--co-texto-base, #0f172a);
    border-color: rgba(15, 33, 71, 0.1);
}

td .dropend .btn,
td .dropdown .btn {
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--co-texto-suave, #64748b);
    transition: all 0.15s ease;
}

td .dropend .btn:hover,
td .dropdown .btn:hover {
    background: rgba(15, 33, 71, 0.08);
    color: var(--co-texto-base, #0f172a);
}

td .form-check-input {
    margin: 0;
    vertical-align: middle;
    cursor: pointer;
}

/* Badges de estado modernos tipo píldora */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: nowrap;
}
.badge-status-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-status-warning {
    background: #fef9c3;
    color: #a16207;
    border: 1px solid #fde047;
}
.badge-status-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.badge-status-info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.badge-status-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/*DASHBOARD*/
.m-top5-dash {
    margin-top: 0;
}

/*TAMANOS DE CONTENIDOS DE FORMULARIOS*/

.content-table-inventario {
    min-height: calc(100vh - 109px) !important;
}

.content-table-inventario-mantenimiento {
    min-height: calc(100vh - 90px) !important;
}

.content-table-alta {
    min-height: calc(100vh - 110px) !important;
}
.content-table-venta {
    min-height: calc(100vh - 150px) !important;
}
.content-table-registroventa {
    min-height: calc(100vh - 150px) !important;
}
.content-table-cierrecaja {
    min-height: calc(100vh - 110px) !important;
}
.content-table-modal tr td {
    place-content: center;
}
.content-table-compra {
    min-height: calc(100vh - 110px) !important;
}
.content-table-prodxproveedor {
    min-height: calc(100vh - 90px) !important;
}
.content-table-kardex {
    min-height: calc(100vh - 110px) !important;
}
.content-table-stock {
    min-height: calc(100vh - 110px) !important;
}
.content-table-sugerencia {
    min-height: calc(100vh - 110px) !important;
}
.content-table-compra-productos {
    min-height: calc(100vh - 170px) !important;
}
.content-table-ctasxpagar {
    min-height: calc(100vh - 140px) !important;
}
.content-table-maestras {
    min-height: calc(100vh - 90px) !important;
}
.content-table-clientes {
    min-height: calc(100vh - 120px) !important;
}
.content-table-proveedores {
    min-height: calc(100vh - 85px) !important;
}
.content-table-productos {
    min-height: calc(100vh - 120px) !important;
}
.content-table-transferencia {
    min-height: calc(100vh - 115px) !important;
}
.content-table-gastosencaja {
    min-height: calc(100vh - 140px) !important;
}
.content-table-puntoventa {
    min-height: calc(100vh - 80px) !important;
}
.content-table-historial {
    min-height: calc(100vh - 80px) !important;
}
.content-table-listaprecios {
    min-height: calc(100vh - 80px) !important;
}
.content-table-venta-buscaproducto {
    min-height: calc(100vh - 180px) !important;
    width: 100%;
}
.content-table-productos-guiaremision {
    min-height: calc(62vh - 225px) !important;
    width: 100%;
}
.content-table-modal-oing { /*PRODUCTOS EN COMPRAS*/
    min-height: calc(84vh - 160px) !important;
}
.content-table-modal-gstos { /*PRODUCTOS EN COMPRAS*/
    min-height: calc(84vh - 160px) !important;
}

/*-----SUB LISTADOS ------*/

.content-table .subtable table thead {
    color: var(--co-tabla-texto-cabecera, #ffffff);
    background-color: var(--co-tabla-cabecera, #0f2147) !important;
    position: static !important;
}

/* Sublistados tipo tabla: la cabecera queda fija al hacer scroll dentro */
.content-table .height-subtable table thead {
    position: sticky !important;
    top: 0;
    z-index: 3;
}

.content-table .subtable table tbody tr:nth-of-type(even) {
    background-color: var(--co-tabla-fila-alt) !important;
}

.content-table .subtable table thead tr:hover {
    background-color: var(--co-tabla-cabecera, #0f2147);
}

.content-table .subtable table tbody tr {
    background-color: var(--co-fondo-superficie, #ffffff) !important;
}

.content-table table tbody tr td {
    vertical-align: top !important;
}

.content-table.subtable,
.content-table .subtable,
.subtable {
    min-height: 44px !important;
    height: auto !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    margin: 6px 0 8px 0 !important;
    border-radius: 6px !important;
    border: 1px solid var(--co-borde-tabla, #cbd5e1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    background-color: var(--co-fondo-superficie, #ffffff) !important;
}

/* Sublistados tipo tabla (.height-subtable): altura adaptada,
   tope a 6 filas visibles (34px cabecera + 6 x 36px fila) y scroll */
.content-table.subtable.height-subtable,
.content-table .subtable.height-subtable,
.subtable.height-subtable {
    min-height: 44px !important;
    height: auto !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    margin: 6px 0 8px 0 !important;
    border-radius: 6px !important;
    border: 1px solid var(--co-borde-tabla, #cbd5e1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    background-color: var(--co-fondo-superficie, #ffffff) !important;
    scrollbar-width: thin;
}

.content-table .subtable table {
    min-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse;
}

.content-table .subtable table thead th {
    background-color: var(--co-tabla-cabecera, #0f2147) !important;
    color: var(--co-tabla-texto-cabecera, #ffffff) !important;
    padding: 6px 10px !important;
    height: 34px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px;
    vertical-align: middle !important;
    box-shadow: none !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15) !important;
}

.content-table .subtable table thead tr:first-child th:first-child,
.subtable table thead tr:first-child th:first-child {
    border-top-left-radius: 5px;
}

.content-table .subtable table thead tr:first-child th:last-child,
.subtable table thead tr:first-child th:last-child {
    border-top-right-radius: 5px;
}

/* Quitar marca de ordenamiento en columnas de sublistados con botones o clase no-sort */
.content-table .subtable thead th:has(button),
.content-table .subtable thead th:has(.btn),
.content-table .subtable thead th.no-sort,
.subtable thead th:has(button),
.subtable thead th:has(.btn),
.subtable thead th.no-sort {
    cursor: default !important;
}

.content-table .subtable thead th:has(button)::after,
.content-table .subtable thead th:has(.btn)::after,
.content-table .subtable thead th.no-sort::after,
.content-table .subtable thead th:has(button):hover::after,
.content-table .subtable thead th:has(.btn):hover::after,
.content-table .subtable thead th.no-sort:hover::after,
.subtable thead th:has(button)::after,
.subtable thead th:has(.btn)::after,
.subtable thead th.no-sort::after,
.subtable thead th:has(button):hover::after,
.subtable thead th:has(.btn):hover::after,
.subtable thead th.no-sort:hover::after,
.content-table .subtable thead th:has(button).sort-asc::after,
.content-table .subtable thead th:has(button).sort-desc::after,
.content-table .subtable thead th:has(.btn).sort-asc::after,
.content-table .subtable thead th:has(.btn).sort-desc::after {
    content: none !important;
    display: none !important;
}

.content-table .subtable table tbody tr td {
    padding: 5px 8px !important;
    height: 30px !important;
    min-height: 30px !important;
    vertical-align: middle !important;
    font-size: 0.78rem !important;
    color: var(--co-texto-base, #1e293b);
}

.content-table .subtable table tbody tr:hover {
    background-color: var(--co-tabla-fila-hover) !important;
}

/* Fila contenedora dedicada de sublistados (Opción 3 con colspan) */
tr.fila-sublistado {
    border: none !important;
    background-color: transparent !important;
}

tr.fila-sublistado > td {
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
    height: 0 !important;
    line-height: 0 !important;
}

/* Ancho del sublistado: 70% hacia la derecha dejando 30% a la izquierda */
.collapse-sublistado {
    margin-left: 30% !important;
    width: 70% !important;
    max-width: 70% !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}

.collapse-sublistado .subtable,
.collapse-sublistado .height-subtable {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .collapse-sublistado,
    .fila-sublistado .subtable,
    .fila-sublistado .height-subtable {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.content-table tbody tr.fila-zebra {
    background-color: var(--co-tabla-fila-alt) !important;
}

.content-table table tbody tr td img.img-sublistado,
.content-table table tbody tr td img.imagen {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 1px;
    flex: 0 0 auto;
    vertical-align: middle;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.content-table table tbody tr td img.img-sublistado:hover,
.content-table table tbody tr td img.imagen:hover {
    transform: scale(2.2);
    z-index: 50;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    border-color: #94a3b8;
}

.sizeheightconfpvta {
    height: 23rem;
}

.listaModal {
    place-content: center;
}

.linkCollapse {
    font-weight: 600;
    color: var(--co-link-collapse);
}

.linkCollapse:hover {
    text-decoration: underline;
    cursor: hand;
    color: var(--co-link-collapse-hover);
}

.font-size-input-listado {
    font-size: 12px;
    min-width: 80px
}

.font-size-input-sublistado {
    font-size: 12px;
    min-width: 80px;
    height: 26px !important;
    padding: 2px 6px !important;
}

.deshabilitarItem {
    color: gray;
    cursor: not-allowed;
    opacity: 0.6;
}

.table-list-venta {
    min-height: 20%;
    height: auto;
    z-index: 5000;
    width: 90% !important;
    max-width: 90% !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 1px;
    background: rgba(245, 240, 168, 0.7);
}

.table-list-venta .content-table-venta-buscaproducto {
    min-height: 120px !important;
    max-height: calc(100vh - 120px) !important;
    height: auto !important;
    overflow-y: auto !important;
}

.h-ptoventa-local {
    height: 16rem;
}
.h-ptoventa-numeracion {
    height: 25rem;
}
.h-ptoventa-impresion {
    height: 32rem;
}

.h-confsist-sistema,
.h-confsist-sunat,
.h-confsist-tokens,
.h-confinic-empresa,
.h-confinic-APISSUNAT {
    height: auto !important;
    overflow: visible !important;
}

/*INFORMACION DEL PRODUCTO*/

.informacionProducto {
    border: var(--co-informacion-producto-borde) 0.5px solid;
    padding: 8px 12px;
    margin: 0;
    height: auto !important;
    min-height: auto !important;
    border-radius: 4px;
    display: block;
    width: 100%;
}

.informacionProducto img {
    width: 4rem;
    height: 100%;
    margin-right: 5px;
}

.informacionProducto .nota {
    width: 85%;
}

.informacionProducto .producto {
    color: var(--co-informacion-producto-texto);
    font-size: 1rem;
    font-weight: 700;
}

.informacionProducto .descripcion {
    color: var(--co-informacion-producto-texto) !important;
    font-size: 0.7rem;
    margin-left: .8rem;
    width: 100%;
}

.informacionProducto .activo {
    color: var(--co-informacion-producto-activo);
    font-size: 0.7rem;
    margin-left: .8rem;
}

.informacionProducto .categoria span {
    font-size: 0.8rem;
    background: rgba(245, 240, 168, 0.7);
    border: none;
    font-weight: 600;
    color: red;
}

.informacionProducto .categoria select {
    border: none;
}


/******************************************/
@media (max-width: 575.98px) {
    .m-top5-dash {
        margin-top: -50rem;
        background-color: #010525;
    }
    .content-table-inventario {
        min-height: calc(100vh - 179px) !important;
    }
    .content-table-compra {
        min-height: calc(100vh - 178px) !important;
    }
    .content-table-ctasxpagar {
        min-height: calc(100vh - 176px) !important;
    }
    .content-table-compra-productos {
        min-height: calc(100vh - 365px) !important;
    }
    .content-table-transferencia {
        min-height: calc(100vh - 150px) !important;
    }
    .content-table-puntoventa {
        min-height: calc(100vh - 80px) !important;
    }
    .content-table-alta {
        min-height: calc(100vh - 150px) !important;
    }
    .content-table-registroventa {
        min-height: calc(100vh - 288px) !important;
    }
    .content-table-venta {
        min-height: calc(92vh - 245px) !important;
    }
    .content-table-cierrecaja {
        min-height: calc(100vh - 180px) !important;
    }
    .content-table-kardex {
        min-height: calc(100vh - 180px) !important;
    }
    .content-table-stock {
        min-height: calc(100vh - 213px) !important;
    }
    .content-table-historial {
        min-height: calc(100vh - 145px) !important;
    }
    .content-table-listaprecios {
        min-height: calc(100vh - 115px) !important;
    }
    .content-table-gastosencaja {
        min-height: calc(100vh - 175px) !important;
    }
    .sizeheightconfpvta {
        height: 22rem;
        overflow-x: hidden;
    }
    .ocultarReg {
        display: none;
    }
    .table-list-venta {
        height: auto !important;
        max-height: calc(100vh - 120px) !important;
        width: 90% !important;
    }
    .m-top5-dash {
        margin-top: 2rem;
    }

    .h-ptoventa-local {
        height: 18rem;
    }
    .h-ptoventa-numeracion {
        height: 33rem;
    }
    .h-ptoventa-impresion {
        height: 49rem;
    }

    .h-confsist-sistema,
    .h-confsist-sunat,
    .h-confsist-tokens,
    .h-confinic-empresa,
    .h-confinic-APISSUNAT {
        height: auto !important;
        overflow: visible !important;
    }
}

/* Tablas responsivas en móvil */
@media (max-width: 768px) {
    /* Altura más manejable en pantallas pequeñas para la tabla de productos */
    .content-table {
        min-height: auto !important;
        max-height: 55vh;
        height: auto;
    }
    /* Fuente adecuada en móvil para todas las tablas */
    table, .table {
        font-size: 12px !important;
    }
    .content-table th,
    .content-table td {
        padding: 4px 3px;
        font-size: .72em;
    }
    /* Tablas planas (sin .content-table): scroll horizontal en lugar de desbordar */
    .content-table { overflow-x: auto; }
    div:not(.content-table) > table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Pulido visual: contenedores tipo tarjeta ===== */
.content-table {
    background-color: var(--co-fondo-superficie, #ffffff);
    border: 1px solid var(--co-borde-tabla);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 33, 71, 0.06);
    margin: 4px 0;
}

.content-table thead th {
    padding: 7px 10px !important;
    height: 35px;
    vertical-align: middle;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.content-table thead th .bi {
    font-size: 1rem !important;
    line-height: 1;
    vertical-align: middle;
}

.content-table thead th .btn,
.content-table thead th .btn-sm,
.content-table thead th .btn-group .btn {
    line-height: 1;
    font-size: 0.8rem;
    padding: 2px 6px !important;
    border-radius: 5px;
}

.content-table td {
    padding: 6px 10px;
    height: 36px;
    line-height: 1.35;
}

/* ===== Pulido visual: inputs y botones ===== */
.form-control,
.form-select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    border-radius: 0.5rem;
}

.btn {
    border-radius: 0.5rem;
}

.btn:active {
    transform: translateY(1px);
}

/* Los formularios usan la altura calibrada por página (.content-table-*) según su cabecera */
[class*="content-table"]:not(.content-table-modal):not(.content-table-salida-Normal):not(.content-table-salida-normal):not(.content-table-modal-oing):not(.content-table-modal-gstos):not(.subtable):not(.height-subtable) {
    overflow-y: auto;
}

/* ============================================================
   ESTANDARIZACIÓN UNIVERSAL: TABLAS EN MODALES
   Garantiza que ninguna tabla sea más grande que su modal contenedor
   ============================================================ */

.modal-dialog {
    max-height: 96vh;
}

/* Modales en general: solo se limita la altura máxima, sin forzarla */
.modal .modal-content {
    max-height: calc(100vh - 88px) !important;
}

/* Modales de LISTA: altura completa + flex en columna + scroll interno */
#modSalProd .modal-content,
#modIngProd .modal-content,
#modSugeCompra .modal-content,
#modHistorialProducto .modal-content,
#modPrecioEnCatalago .modal-content {
    height: min(92vh, calc(100vh - 88px)) !important;
    max-height: min(92vh, calc(100vh - 88px)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Cuerpo de los modales de LISTA: flexbox en columna para el scroll interno */
#modSalProd .modal-body,
#modIngProd .modal-body,
#modSugeCompra .modal-body,
#modHistorialProducto .modal-body,
#modPrecioEnCatalago .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 8px 14px !important;
}

/* Contenedores de carga AJAX dentro de modales */
.modal .modal-body #lstmodsalprod,
.modal .modal-body #lstmodingprod,
.modal .modal-body #lstsugecompra,
.modal .modal-body #listadoPreciosenCatalago,
.modal .modal-body [id^="lstmod"] {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* Tablas dentro de modales: NO DESBORDAN, scroll interno propio */
.content-table-modal,
.content-table-salida-normal,
.content-table-salida-Normal,
.content-table-salida-Venta,
.content-table-modal-oing,
.content-table-modal-gstos,
.modal .content-table,
.modal [class*="content-table"] {
    flex: 1 1 auto !important;
    min-height: 140px !important;
    max-height: 100% !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    overscroll-behavior: contain !important;
    margin: 2px 0 !important;
    box-sizing: border-box !important;
}

.modal .content-table table,
.content-table-modal table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
    margin-bottom: 0 !important;
}

.modal .content-table table thead,
.content-table-modal table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: var(--co-tabla-cabecera, #0f2147) !important;
}

/* ============================================================
   FILA DE PRODUCTO EN MODAL DE SALIDA
   Usa la misma presentación que la búsqueda de ventas (.pos-prod-cell).
   ============================================================ */
#lstmodsalprod .content-table table {
    table-layout: fixed !important;
    width: 100% !important;
}

#lstmodsalprod .content-table table tbody tr td {
    height: auto;
    min-height: 52px;
    vertical-align: middle;
}

#lstmodsalprod .content-table table tbody tr td.td-center,
#lstmodsalprod .content-table table tbody tr td.td-right {
    white-space: nowrap;
}

#lstmodsalprod .pos-prod-cell .pos-prod-desc {
    max-width: none;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
}

/* Buscador de productos predictivo en Ventas y Proformas */
.pos-search-thumb {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 2px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.pos-search-thumb:hover {
    transform: scale(1.6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    border-color: #3b82f6 !important;
    z-index: 100;
    position: relative;
}

.pos-prod-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.pos-prod-cell .pos-prod-name {
    font-size: 0.88rem;
    font-weight: 700 !important;
    line-height: 1.25;
    color: #0f172a !important;
    background: transparent !important;
}

.pos-prod-cell .pos-prod-generic .badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 6px;
}

.pos-prod-cell .pos-prod-desc {
    max-width: 380px;
    font-size: 0.68rem;
    line-height: 1.3;
    text-transform: lowercase;
}

.table-list-venta tbody tr.fila-prod:hover,
.table-list-venta tbody tr.fila-activa {
    background-color: #e6f0fa !important;
    color: #0f172a !important;
}

.table-list-venta tbody tr.fila-prod:hover td,
.table-list-venta tbody tr.fila-activa td {
    color: #0f172a !important;
}

/* ============================================================
   TOPE DE SUBLISTADOS EN 6 FILAS (250 px) — REGLA FINAL
   Aplica en cualquier contexto (modales, listas, collapses) y
   gana a las reglas genéricas de modales que piden crecer al 100%.
   ============================================================ */
.content-table .subtable,
.content-table.subtable,
.collapse-sublistado .subtable,
.collapse-sublistado .height-subtable,
.modal .subtable,
.modal .content-table.subtable,
.modal .content-table .subtable,
.subtable.height-subtable {
    min-height: 44px !important;
    height: auto !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    margin: 6px 0 8px 0 !important;
    flex: 0 1 auto !important;
    align-self: flex-start !important;
}



