/* =====================================================================
   GESMART - Estilo comun de las tablas de REPORTES (app/reporte/*).
   Solo CSS: no cambia ids, eventos ni datos. Se aplica dentro de .gs-rpt
   (clase puesta en la raiz de cada vista de reporte).
   Mismo look que "Compras a credito": bordes, filas compactas, cabecera gris,
   filas de grupo (celda combinada) y filas de total resaltadas.
   Las filas que ya traen color propio (style="background...") se respetan.
   ===================================================================== */

/* ---------- tablas de datos (no las de maquetacion ni el fullgrid) ---------- */
.gs-rpt table.table:not(.fullgrid) {
    border: 1px solid #ddd;
    margin-bottom: 12px;
    background: #fff;
}
.gs-rpt table.table:not(.fullgrid) > thead > tr > th,
.gs-rpt table.table:not(.fullgrid) > tbody > tr > th,
.gs-rpt table.table:not(.fullgrid) > tbody > tr > td,
.gs-rpt table.table:not(.fullgrid) > tfoot > tr > td,
.gs-rpt table.table:not(.fullgrid) > tfoot > tr > th {
    border: 1px solid #ddd;
    padding: 5px 10px;
    vertical-align: middle;
}
.gs-rpt table.table:not(.fullgrid) > thead > tr > th {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-bottom-width: 2px;
}
.gs-rpt table.table:not(.fullgrid) > tbody > tr > td {
    font-size: 13px;
}
/* importes alineados */
.gs-rpt table.table:not(.fullgrid) td.text-right,
.gs-rpt table.table:not(.fullgrid) th.text-right {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.gs-rpt table.table:not(.fullgrid) > tbody > tr:hover > td {
    background-color: rgba(79, 126, 248, .05);
}

/* ---------- fila de GRUPO: una sola celda combinada (ej. nombre del proveedor/cliente) ---------- */
.gs-rpt table.table:not(.fullgrid) > tbody > tr:not([style*="background"]):not([class*="bg-"]):has(> td[colspan]:only-child:not(.text-right)) > td {
    background-color: #d6dde7;
    font-weight: 700;
    text-align: left;
}

/* ---------- fila de TOTAL: celda combinada alineada a la derecha + importes, o el pie de tabla ---------- */
.gs-rpt table.table:not(.fullgrid) > tbody > tr:not([style*="background"]):not([class*="bg-"]):has(> td[colspan].text-right:not(:only-child)) > td,
.gs-rpt table.table:not(.fullgrid) > tfoot > tr:not([style*="background"]):not([class*="bg-"]) > td,
.gs-rpt table.table:not(.fullgrid) > tfoot > tr:not([style*="background"]):not([class*="bg-"]) > th {
    background-color: #ecf3f8;
    font-weight: 700;
}

/* ---------- pestanas y acordeones de los reportes ---------- */
.gs-rpt .panel-group .panel { border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.gs-rpt .nav-tabs.bordered > li > a { font-weight: 600; }

/* ---------- modo oscuro: solo bordes y resaltes suaves (los fondos los maneja dark_theme.css) ---------- */
body.theme-dark .gs-rpt table.table:not(.fullgrid) { border-color: var(--g-border2, rgba(255,255,255,.1)); background: transparent; }
body.theme-dark .gs-rpt table.table:not(.fullgrid) > thead > tr > th,
body.theme-dark .gs-rpt table.table:not(.fullgrid) > tbody > tr > td,
body.theme-dark .gs-rpt table.table:not(.fullgrid) > tfoot > tr > td { border-color: var(--g-border2, rgba(255,255,255,.1)); }
body.theme-dark .gs-rpt table.table:not(.fullgrid) > tbody > tr:not([style*="background"]):not([class*="bg-"]):has(> td[colspan]:only-child:not(.text-right)) > td { background-color: rgba(79, 126, 248, .16); }
body.theme-dark .gs-rpt table.table:not(.fullgrid) > tbody > tr:not([style*="background"]):not([class*="bg-"]):has(> td[colspan].text-right:not(:only-child)) > td,
body.theme-dark .gs-rpt table.table:not(.fullgrid) > tfoot > tr:not([style*="background"]):not([class*="bg-"]) > td { background-color: rgba(255, 255, 255, .06); }

/* ---------- graficos estadisticos de reportes (GsRptChart) ---------- */
.gs-rpt-chart { margin: 14px 0 18px; padding: 12px 14px 6px; border: 1px solid #e3e7ee; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.gs-rpt-chart-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; color: #4a5568; }
.gs-rpt-chart-title:before { content: "\f080"; font-family: FontAwesome; margin-right: 6px; color: #4f7ef8; }
.gs-rpt-chart-body { width: 100%; height: 320px; }
body.theme-dark .gs-rpt-chart { background: transparent; border-color: var(--g-border2, rgba(255,255,255,.1)); }
body.theme-dark .gs-rpt-chart-title { color: var(--g-text2, #c9d1e0); }
