.ingreso-stock-page,.ingreso-stock-page .page-wrapper{overflow-x:hidden}.ingreso-stock-page .dataTables_wrapper{max-width:100%;overflow-x:hidden}.ingreso-stock-page .card-body{max-width:100%}.ingreso-stock-page #tablaIngresos{width:100%!important;min-width:0!important}.fila-ingreso{cursor:pointer}.fila-ingreso:hover{background:#f6f8ff}.ingreso-datos{display:grid;grid-template-columns:220px 220px;gap:16px;padding:18px;border:1px solid #e1e7f1;border-radius:14px;background:#f9fbff}.ingreso-agregar{display:grid;grid-template-columns:minmax(320px,1fr) 180px 180px 72px;gap:16px;align-items:end;margin:18px 0;padding:18px;border:1px solid #e1e7f1;border-radius:14px;background:#f9fbff}.selector-trigger{display:flex;align-items:center;justify-content:space-between;text-align:left;background:#fff}.ingreso-agregar .agregar{height:42px}.detalle td{vertical-align:middle}.detalle td strong,.detalle td small{display:block}.detalle td small{color:#718096;margin-top:3px}.sin-detalle,.sin-productos{text-align:center;color:#6b7280;padding:32px!important}.btn-eliminar{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid #f9dce3;border-radius:11px;color:#d23858;background:#fff0f3}.ingreso-total{display:flex;justify-content:flex-end;gap:25px;background:#f1f4ff;border-radius:12px;padding:18px;font-size:14px}.ingreso-total strong{font-size:18px;color:#26334d;margin-left:7px}.modal-form .close{border:1px solid #64748b;border-radius:50%;width:34px;height:34px;color:#fff;background:#334155}.selector-stock-panel{z-index:1090!important;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;width:min(1060px,calc(100% - 40px))!important;height:auto!important;max-height:82vh;border:1px solid #e5eaf4!important;border-radius:22px!important;overflow:hidden;box-shadow:0 18px 70px rgba(18,29,51,.24);transform:translate(-50%,100vh)!important}.selector-stock-panel.show{transform:translate(-50%,-50%)!important}.offcanvas-backdrop{z-index:1080!important}.selector-stock-panel .offcanvas-header{background:#fff!important;color:#20314d;padding:16px 22px;border-bottom:1px solid #edf0f7}.selector-stock-panel .offcanvas-body{padding:18px 22px;overflow:auto}.selector-stock-panel h5{font-size:20px;margin:3px 0}.selector-stock-panel #usarVariante{background:linear-gradient(110deg,#3867ff,#7b61ff);border:0}.ingreso-stock-page #modalIngreso .modal-dialog{max-width:1140px}.ingreso-stock-page #modalIngreso .modal-body{overflow:visible}@media(max-width:767px){.ingreso-datos{grid-template-columns:1fr}.ingreso-agregar{grid-template-columns:1fr 1fr}.producto-campo{grid-column:1/-1}.ingreso-agregar .agregar{grid-column:1/-1}.selector-stock-panel{width:calc(100% - 20px)!important;max-height:90vh}.selector-stock-panel .venta-selector-layout{grid-template-columns:1fr}.selector-stock-panel .venta-productos-lista{max-height:170px;overflow:auto}}

/* El encabezado y la acción de guardado permanecen visibles; el contenido largo se desplaza. */
.ingreso-stock-page #modalIngreso .modal-dialog{height:calc(100vh - 32px);margin:16px auto}
.ingreso-stock-page #modalIngreso .modal-content{display:flex;max-height:100%;overflow:hidden}
.ingreso-stock-page #modalIngreso .modal-header,.ingreso-stock-page #modalIngreso .modal-footer{flex:0 0 auto}
.ingreso-stock-page #modalIngreso .modal-body{display:flex;flex-direction:column;min-height:0;overflow:hidden!important}
.ingreso-stock-page #modalIngreso .ingreso-datos,.ingreso-stock-page #modalIngreso #formIngreso,.ingreso-stock-page #modalIngreso .ingreso-total,.ingreso-stock-page #modalIngreso .ingreso-observacion{flex:0 0 auto}
.ingreso-stock-page #modalIngreso .ingreso-listado-scroll{flex:1 1 auto;min-height:140px;overflow:auto;overscroll-behavior:contain}
.ingreso-stock-page #modalIngreso .ingreso-listado-scroll .detalle{margin-bottom:0}
.ingreso-stock-page #modalIngreso .ingreso-listado-scroll thead th{position:sticky;top:0;z-index:2;background:#f6f8fc;box-shadow:0 1px 0 #e4e9f2}
.ingreso-stock-page #modalIngreso .ingreso-observacion{padding-top:14px}
.ingreso-stock-page #modalIngreso .ingreso-agregar{grid-template-columns:minmax(220px,2.3fr) minmax(110px,.7fr) minmax(110px,.7fr) minmax(130px,.8fr) 72px}
@media(max-width:900px){.ingreso-stock-page #modalIngreso .ingreso-agregar{grid-template-columns:repeat(2,minmax(0,1fr))}.ingreso-stock-page #modalIngreso .producto-campo,.ingreso-stock-page #modalIngreso .agregar{grid-column:1/-1}}
.ingreso-stock-page #modalIngreso .modal-footer{justify-content:flex-end}
@media(max-width:767px){.ingreso-stock-page #modalIngreso .modal-dialog{height:calc(100vh - 16px);margin:8px}.ingreso-stock-page #modalIngreso .modal-body{overflow-y:auto!important}.ingreso-stock-page #modalIngreso .ingreso-listado-scroll{flex:none;max-height:42vh}}

/* Selector de productos: lista compacta con desplazamiento independiente. */
.ingreso-stock-page .selector-stock-panel{height:min(760px,calc(100vh - 40px))!important;max-height:calc(100vh - 40px)!important}
.ingreso-stock-page .selector-stock-panel .offcanvas-body{min-height:0;overflow:hidden!important}
.ingreso-stock-page .selector-stock-panel .venta-selector-layout{height:100%;min-height:0;align-items:stretch}
.ingreso-stock-page .selector-stock-panel .venta-selector-layout>section{min-height:0}
.ingreso-stock-page .selector-stock-panel .venta-selector-layout>section:first-child{display:flex;flex-direction:column;overflow:hidden}
.ingreso-stock-page .selector-stock-panel .venta-productos-lista{display:flex;flex-direction:column;gap:6px;min-height:0;max-height:none;margin-top:10px;padding-right:6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.ingreso-stock-page .selector-stock-panel .venta-producto-card{flex:0 0 auto;gap:2px;padding:10px 12px;border-radius:11px;line-height:1.25}
.ingreso-stock-page .selector-stock-panel .venta-producto-card strong{font-size:13px}
.ingreso-stock-page .selector-stock-panel .venta-producto-card small{font-size:12px}
.ingreso-stock-page .selector-stock-panel .venta-atributos{align-self:start;width:100%;max-height:100%;overflow-y:auto;padding:2px 8px 12px 4px;overscroll-behavior:contain}
@media(max-width:767px){.ingreso-stock-page .selector-stock-panel{height:min(90vh,760px)!important;max-height:90vh!important}.ingreso-stock-page .selector-stock-panel .offcanvas-body{overflow-y:auto!important}.ingreso-stock-page .selector-stock-panel .venta-selector-layout{height:auto}.ingreso-stock-page .selector-stock-panel .venta-selector-layout>section:first-child{overflow:visible}.ingreso-stock-page .selector-stock-panel .venta-productos-lista{max-height:190px;overflow-y:auto}.ingreso-stock-page .selector-stock-panel .venta-atributos{max-height:none;overflow:visible}}
.ingreso-stock-page #modalIngreso .ingreso-datos{grid-template-columns:220px minmax(260px,1fr);align-items:start}
.ingreso-stock-page #modalIngreso .ingreso-datos:has(#numeroGrupo:not(.d-none)){grid-template-columns:220px 220px minmax(260px,1fr)}
.ingreso-stock-page #modalIngreso .ingreso-busqueda{grid-column:-2/-1;min-width:0}
.ingreso-stock-page #modalIngreso .ingreso-busqueda-control{position:relative}
.ingreso-stock-page #modalIngreso .ingreso-busqueda-control i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#8290aa;pointer-events:none}
.ingreso-stock-page #modalIngreso #buscarDetalleIngreso{padding-left:38px;background:#fff}
.ingreso-stock-page #modalIngreso #coincidenciasIngreso{display:block;min-height:16px;margin-top:3px;color:#65758f;font-size:11px}
@media(max-width:767px){.ingreso-stock-page #modalIngreso .ingreso-datos,.ingreso-stock-page #modalIngreso .ingreso-datos:has(#numeroGrupo:not(.d-none)){grid-template-columns:1fr}.ingreso-stock-page #modalIngreso .ingreso-busqueda{grid-column:1}}

/* Filtros y calendario con el mismo lenguaje visual del módulo de ventas. */
.ingreso-acciones{display:flex;align-items:center;gap:10px}.ingreso-nuevo-movil{display:none}.ingreso-filtros{border:1px solid #e1e7f0;border-radius:17px}.ingreso-filtros .card-body{padding:20px}.ingreso-filtros-titulo{display:flex;align-items:center;gap:12px;margin-bottom:17px}.ingreso-filtros-titulo>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:#5268e7;background:#eef1ff}.ingreso-filtros-titulo strong,.ingreso-filtros-titulo small{display:block}.ingreso-filtros-titulo strong{color:#24314a}.ingreso-filtros-titulo small{margin-top:2px;color:#7b879a;font-size:11px}.ingreso-filtros label,.ingreso-listado-card .dataTables_wrapper label{color:#5d6c84;font-size:11px;font-weight:800;letter-spacing:.035em;text-transform:uppercase}.ingreso-stock-page .input-groupicon{position:relative}.ingreso-stock-page .input-groupicon .form-control{height:42px;padding-right:48px;border-color:#d9e2ef;border-radius:11px;background:#fbfcff}.ingreso-stock-page .input-groupicon .addonset{position:absolute;z-index:3;top:4px;right:4px;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:9px;color:#5268e7;background:#eef1ff}.ingreso-stock-page .bootstrap-datetimepicker-widget.dropdown-menu{width:310px!important;max-width:calc(100vw - 32px);padding:10px;border:1px solid #dce4f0;border-radius:14px;box-shadow:0 18px 42px rgba(23,39,68,.2)}.ingreso-stock-page .bootstrap-datetimepicker-widget table{width:100%;margin:0}.ingreso-stock-page .bootstrap-datetimepicker-widget table th{height:32px;color:#53627a;font-size:11px;font-weight:800}.ingreso-stock-page .bootstrap-datetimepicker-widget table td{height:32px;border-radius:8px;color:#33415a;font-size:11px}.ingreso-stock-page .bootstrap-datetimepicker-widget table td.day:hover,.ingreso-stock-page .bootstrap-datetimepicker-widget table th.picker-switch:hover,.ingreso-stock-page .bootstrap-datetimepicker-widget table th.next:hover,.ingreso-stock-page .bootstrap-datetimepicker-widget table th.prev:hover{background:#eef1ff;color:#4057db}.ingreso-stock-page .bootstrap-datetimepicker-widget table td.active,.ingreso-stock-page .bootstrap-datetimepicker-widget table td.active:hover{color:#fff;background:linear-gradient(135deg,#3478f6,#7457f7);text-shadow:none}.ingreso-stock-page .bootstrap-datetimepicker-widget table td.today:before{border-bottom-color:#5268e7}.ingreso-listado-card{border:1px solid #e1e7f0;border-radius:17px}.ingreso-listado-card .card-body{padding:20px}

@media(max-width:767.98px){
    .ingreso-stock-page .page-header{padding:20px 16px}
    .ingreso-stock-page .page-header .page-breadcrumb{display:none}
    .ingreso-stock-page .page-header .page-title{width:100%;text-align:center}
    .ingreso-stock-page .page-header .page-title h4{margin-bottom:15px}
    .ingreso-acciones{display:grid;width:100%;grid-template-columns:1fr 1fr;gap:8px}
    .ingreso-acciones .btn{display:flex;align-items:center;justify-content:center;min-width:0;height:42px;padding:8px 10px;white-space:nowrap}
    .ingreso-nuevo-completo{display:none}.ingreso-nuevo-movil{display:inline}
    .ingreso-filtros .card-body,.ingreso-listado-card .card-body{padding:14px}
    .ingreso-filtros,.ingreso-filtros .card-body{overflow:visible!important}
    .ingreso-filtros-titulo{margin-bottom:14px}
    .ingreso-filtros-titulo small{display:none}
    .ingreso-stock-page .bootstrap-datetimepicker-widget.dropdown-menu{left:0!important;right:0!important;width:100%!important;min-width:0!important;max-width:100%;padding:8px}
    .ingreso-stock-page .bootstrap-datetimepicker-widget table th,.ingreso-stock-page .bootstrap-datetimepicker-widget table td{height:30px;padding:3px 1px;font-size:10px}
    .ingreso-listado-card .table-responsive{overflow:visible}

    #tablaIngresos_wrapper>.row{margin-right:0;margin-left:0}
    #tablaIngresos_wrapper>.row:first-child{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:14px}
    #tablaIngresos_wrapper>.row:first-child>[class*=col-]{width:100%;max-width:none;padding:0}
    #tablaIngresos_wrapper .dataTables_length,#tablaIngresos_wrapper .dataTables_filter{display:block!important;width:100%!important;max-width:none!important;margin:0;text-align:left}
    #tablaIngresos_wrapper .dataTables_length label,#tablaIngresos_wrapper .dataTables_filter label{display:grid!important;grid-template-columns:1fr;width:100%!important;max-width:none!important;margin:0;font-size:0}
    #tablaIngresos_wrapper .dataTables_length label:before,#tablaIngresos_wrapper .dataTables_filter label:before{display:block;margin-bottom:5px;color:#617087;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
    #tablaIngresos_wrapper .dataTables_length label:before{content:'Registros por página'}
    #tablaIngresos_wrapper .dataTables_filter label:before{content:'Buscar ingreso'}
    #tablaIngresos_wrapper .dataTables_length select,#tablaIngresos_wrapper .dataTables_filter input{display:block!important;width:100%!important;max-width:none!important;height:42px;margin:0!important;padding:0 12px;box-sizing:border-box!important;border:1px solid #d9e2ef;border-radius:10px;background:#fbfcff;color:#263750;font-size:13px}
    #tablaIngresos_wrapper .dataTables_length select:focus,#tablaIngresos_wrapper .dataTables_filter input:focus{border-color:#6175f2;outline:0;box-shadow:0 0 0 3px rgba(82,104,231,.11)}

    .ingreso-stock-page #tablaIngresos{display:block!important;width:100%!important;min-width:0!important;border:0!important}
    #tablaIngresos thead{display:none}
    #tablaIngresos tbody{display:grid;width:100%;gap:9px}
    #tablaIngresos tbody tr{display:block;width:100%;padding:5px 12px;border:1px solid #e0e7f1;border-left:4px solid #6170ed;border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(32,51,83,.06)}
    #tablaIngresos tbody td{display:grid!important;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:8px;width:100%!important;min-height:31px;padding:5px 0!important;border:0!important;border-bottom:1px solid #edf1f6!important;color:#34445d;font-size:11px;text-align:right!important;white-space:normal!important}
    #tablaIngresos tbody td:last-child{border-bottom:0!important}
    #tablaIngresos tbody td:before{color:#8793a5;font-size:8px;font-weight:800;letter-spacing:.05em;text-align:left;text-transform:uppercase}
    #tablaIngresos tbody td:nth-child(1):before{content:'N.º ingreso'}
    #tablaIngresos tbody td:nth-child(2):before{content:'Fecha'}
    #tablaIngresos tbody td:nth-child(3):before{content:'Ítems'}
    #tablaIngresos tbody td:nth-child(4):before{content:'Cantidad'}
    #tablaIngresos tbody td:nth-child(5):before{content:'Observación'}
    #tablaIngresos tbody td:nth-child(6):before{content:'Acciones'}
    #tablaIngresos tbody td .ingreso-card-valor{min-width:0;text-align:right;overflow-wrap:anywhere}
    #tablaIngresos tbody td:nth-child(6) .ingreso-card-valor{justify-self:end}
    #tablaIngresos tbody td[colspan]{display:block!important;padding:24px 10px!important;text-align:center!important}
    #tablaIngresos tbody td[colspan]:before{display:none}
    #tablaIngresos_wrapper>.row:last-child{display:grid;gap:10px;margin-top:14px}
    #tablaIngresos_wrapper>.row:last-child>[class*=col-]{width:100%;max-width:none;padding:0;text-align:center}
    #tablaIngresos_wrapper .dataTables_info{padding-top:0;font-size:11px;color:#758399}
    #tablaIngresos_wrapper .dataTables_paginate{display:flex;justify-content:center;margin:0}

    /* Flujo móvil del selector: catálogo arriba y atributos/variantes debajo. */
    .ingreso-stock-page .selector-stock-panel .venta-selector-layout{display:flex!important;flex-direction:column;gap:14px}
    .ingreso-stock-page .selector-stock-panel .venta-selector-layout>section:first-child{order:1}
    .ingreso-stock-page .selector-stock-panel .venta-atributos{order:2;width:100%}
}
