/* Ajustes visuales del Centro de Reportes.
   Se carga después del bundle principal para mantener el layout estable sin
   tocar la lógica de cada reporte. */

.rm-center{
  width:100%;
  max-width:none;
  margin:0;
  padding:18px 20px 24px!important;
  box-sizing:border-box;
}

/* La cabecera superior de la aplicación ya identifica el módulo. */
.rm-heading{display:none!important}

/* En escritorio el contenido ocupa el ancho útil y el selector de reportes
   queda a la derecha, separado del sidebar principal de la aplicación. */
.rm-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 230px;
  gap:18px;
  align-items:start;
  width:100%;
  max-width:none;
}
.rm-workspace{
  grid-column:1;
  grid-row:1;
  width:100%;
  min-width:0;
  height:calc(100vh - 126px);
  min-height:620px;
  max-height:900px;
  overflow-x:hidden;
  overflow-y:scroll;
  scrollbar-gutter:stable;
  box-sizing:border-box;
}
.rm-nav{
  grid-column:2;
  grid-row:1;
  width:230px;
  max-height:calc(100vh - 126px);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
  box-sizing:border-box;
}

/* Evita saltos de tamaño al cambiar filtros, opciones o reportes. */
.rm-workspace-head{
  min-height:84px;
  box-sizing:border-box;
}
.rm-global-filters{
  min-height:60px;
  box-sizing:border-box;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
}
.rm-local-toolbar{
  min-height:60px;
  box-sizing:border-box;
  flex-wrap:nowrap;
}
.rm-local-filters{
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
}
.rm-report-body,
.rm-section-stack,
.rm-download-grid{
  width:100%;
  box-sizing:border-box;
}
.rm-report-body{min-height:560px}
.rm-table-wrap{width:100%;box-sizing:border-box}

/* El detalle explicativo era útil durante el armado, pero no forma parte de la
   experiencia final del centro de reportes. */
.rm-criteria{display:none!important}

/* Los controles pueden desplazarse horizontalmente en resoluciones intermedias,
   pero no fuerzan a que el panel cambie de ancho o altura. */
.rm-global-filters>label,
.rm-local-filters>label,
.rm-period-pill,
.rm-filter-actions,
.rm-inline-actions{
  flex:0 0 auto;
}

/* Scroll discreto y consistente con el resto del ERP. */
.rm-workspace,
.rm-nav,
.rm-global-filters,
.rm-local-filters,
.rm-table-wrap{
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--text-muted) 45%,transparent) transparent;
}
.rm-workspace::-webkit-scrollbar,
.rm-nav::-webkit-scrollbar,
.rm-global-filters::-webkit-scrollbar,
.rm-local-filters::-webkit-scrollbar,
.rm-table-wrap::-webkit-scrollbar{width:8px;height:8px}
.rm-workspace::-webkit-scrollbar-thumb,
.rm-nav::-webkit-scrollbar-thumb,
.rm-global-filters::-webkit-scrollbar-thumb,
.rm-local-filters::-webkit-scrollbar-thumb,
.rm-table-wrap::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--text-muted) 38%,transparent);
  border-radius:999px;
}

@media(max-width:1180px) and (min-width:901px){
  .rm-center{padding-left:16px!important;padding-right:16px!important}
  .rm-layout{grid-template-columns:minmax(0,1fr) 210px;gap:14px}
  .rm-nav{width:210px}
}

@media(max-width:900px){
  .rm-center{padding:14px!important}
  .rm-layout{grid-template-columns:1fr;gap:10px}
  .rm-nav{
    grid-column:1;
    grid-row:1;
    width:100%;
    max-height:none;
    overflow:auto hidden;
    position:static;
  }
  .rm-workspace{
    grid-column:1;
    grid-row:2;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
  }
  .rm-workspace-head{min-height:0}
  .rm-global-filters,
  .rm-local-toolbar{
    min-height:0;
    flex-wrap:wrap;
    overflow:visible;
  }
  .rm-local-filters{
    flex-wrap:wrap;
    overflow:visible;
  }
  .rm-report-body{min-height:0}
}