/* ============================================================================
   Molino System .Net (web): emula la apariencia del sistema de escritorio.
   Los colores --principal y --secundario salen de la tabla Parametros
   (ColorPrincipalSuperior / ColorSecundarioLateral) y los aplica TemaSistema.
   ============================================================================ */
:root {
    --principal: #2E7D32;
    --principal-texto: #FFFFFF;
    --principal-oscuro: #225E26;
    --principal-suave: #E6F0E7;
    --secundario: #F57C00;
    --secundario-texto: #000000;
    --secundario-oscuro: #9F5000;
    --secundario-suave: #FEEFE0;

    --control: #F0F0F0;              /* SystemColors.Control */
    --ventana: #FFFFFF;
    --texto: #212529;
    --texto-suave: #6C757D;
    --borde: #ADADAD;
    --borde-suave: #DEE2E6;
    --seleccion: #0078D7;            /* selección del DataGridView */
    --seleccion-texto: #FFFFFF;
    --menu-resalte: #CCE8FF;
    --menu-resalte-borde: #99D1FF;
    --info: #FFFFE1;                 /* SystemColors.Info: barra de estado */
    --error: #C62828;
    --aviso: #E65100;
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: 12px;                 /* 9 pt, como los formularios de escritorio */
    color: var(--texto);
    background: var(--control);
}

button, input, select, textarea { font: inherit; color: inherit; }
h1, h2 { font-weight: 600; margin: 0; }
.nota { color: var(--texto-suave); }
.cargando { color: var(--texto-suave); padding: 12px; }
.enlace { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ---------- Botones (FlatStyle de escritorio) ---------- */
.boton {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 26px; padding: 2px 10px;
    background: var(--ventana); border: 1px solid #555; border-radius: 0;
    cursor: pointer; white-space: nowrap;
}
.boton:hover:not(:disabled) { background: var(--principal-suave); }
.boton:disabled { opacity: .45; cursor: default; }
/* Reproceso de stock (ventana emergente del kardex) */
.reproceso-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0 10px; }
.reproceso-filtros select { flex: 1 1 160px; min-width: 0; }
.reproceso-avance { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.reproceso-avance progress { flex: 1 1 240px; }
.boton-principal { background: var(--principal); color: var(--principal-texto); border-color: var(--principal-oscuro); }
.boton-principal:hover:not(:disabled) { background: var(--principal-oscuro); }

input:not([type=checkbox]), select {
    height: 24px; padding: 2px 6px;
    border: 1px solid #7A7A7A; border-radius: 0; background: var(--ventana);
}
input:focus, select:focus { outline: 1px solid var(--principal); outline-offset: 0; border-color: var(--principal); }
input[readonly] { background: var(--control); }

/* ============================================================================
   FrmPrincipal: barra de menús, barra de herramientas, área de trabajo, estado
   ============================================================================ */
.principal { display: grid; grid-template-rows: auto auto 1fr auto; height: 100vh; }

.barra-menu {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
    padding: 2px 4px;
    background: linear-gradient(#FFFFFF, #F5F6F7);
    border-bottom: 1px solid #DADBDC;
    position: relative; z-index: 30;
}
.menu-raiz { position: relative; }
.menu-raiz-boton {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 8px; background: none; border: 1px solid transparent; cursor: pointer;
}
.menu-raiz-boton:hover:not(:disabled), .menu-raiz.abierto > .menu-raiz-boton {
    background: var(--menu-resalte); border-color: var(--menu-resalte-borde);
}
.menu-raiz-boton:disabled { color: #A0A0A0; cursor: default; }
.menu-icono { font-size: 15px; line-height: 1; }
.barra-menu-usuario { margin-left: auto; display: flex; gap: 12px; padding: 0 8px; color: var(--texto-suave); }
.menu-cerrar { position: fixed; inset: 0; z-index: 20; }

.menu-lista {
    position: absolute; top: 100%; left: 0; z-index: 40;
    min-width: 230px; margin: 0; padding: 2px; list-style: none;
    background: #F2F2F2; border: 1px solid #CCCCCC; box-shadow: 2px 3px 6px rgb(0 0 0 / .2);
}
.menu-lista .menu-lista { top: -3px; left: 100%; }
.menu-item { position: relative; }
.menu-item > button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 4px 10px 4px 6px; background: none; border: 1px solid transparent;
    text-align: left; cursor: pointer; white-space: nowrap;
}
.menu-item > button .menu-icono { width: 20px; text-align: center; }
.menu-item > button:disabled .menu-icono { opacity: .45; filter: grayscale(1); }
.menu-item > button:hover:not(:disabled), .menu-item.abierto > button {
    background: var(--menu-resalte); border-color: var(--menu-resalte-borde);
}
.menu-item > button:disabled { color: #A0A0A0; cursor: default; }
.menu-texto { flex: 1; }
.menu-flecha { color: #555; }
.menu-pendiente { color: var(--secundario); font-weight: bold; }

.barra-herramientas {
    display: flex; flex-wrap: wrap;
    background: var(--principal); color: var(--principal-texto);
    border-bottom: 1px solid var(--principal-oscuro);
}
.barra-herramientas button {
    padding: 4px 10px; background: none; border: 0; border-right: 1px solid rgb(255 255 255 / .35);
    color: inherit; font-weight: 600; cursor: pointer;
}
.barra-herramientas button:hover:not(:disabled) { background: var(--principal-oscuro); }
.barra-herramientas button:disabled { opacity: .5; cursor: default; }

.area-trabajo { overflow: auto; padding: 6px; min-height: 0; }

.barra-estado {
    display: flex; flex-wrap: wrap; gap: 0;
    background: var(--info); border-top: 1px solid #D4D0C8;
}
.barra-estado > span { padding: 3px 14px; border-right: 1px solid #D4D0C8; }
.barra-estado-derecha { margin-left: auto; border-right: 0 !important; }
.barra-estado-enlace {
    padding: 3px 14px; background: none; border: 0; font: inherit; color: inherit; cursor: pointer;
}
.barra-estado-enlace:hover { text-decoration: underline; background: rgb(0 0 0 / .06); }

/* FrmGeneral: empresa y fecha arriba; cuentas, atajos y asesores en paneles */
/* Dentro del área de trabajo: sin esto la regla también pisaba la rejilla del marco (.principal de MainLayout) */
.area-trabajo .principal { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.principal-encabezado {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; background: var(--principal); color: var(--principal-texto); border-radius: 4px;
}
.principal-empresa { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.principal-configurar {
    padding: 0 4px; background: none; border: 1px solid transparent; border-radius: 4px;
    font-size: 16px; line-height: 1.4; cursor: pointer; opacity: .8;
}
.principal-configurar:hover { opacity: 1; border-color: currentColor; }
.principal-ciudad { font-size: 13px; opacity: .9; }
.principal-fecha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.principal-fecha .boton { min-width: 34px; }
.principal-fecha .enlace { color: var(--principal-texto); }
.principal-fecha input[type=date] { padding: 2px 4px; }
.principal-fecha-larga { font-size: 15px; font-weight: 600; }
.principal-fecha-cambiada { background: var(--secundario); color: var(--secundario-texto); padding: 1px 8px; border-radius: 3px; }
/* Fila superior: la altura la da "¿Qué desea hacer?"; Mis cuentas se estira a esa altura y desplaza su lista */
.principal-superior { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 10px; align-items: stretch; }
.principal-cuentas .principal-lista { flex: 1 1 0; height: 0; min-height: 120px; max-height: none; }
.principal-paneles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 700px) {
    .principal-superior { grid-template-columns: 1fr; }
    .principal-cuentas .principal-lista { flex: none; height: auto; max-height: 40vh; }
}
.principal-panel { display: flex; flex-direction: column; border: 1px solid var(--borde-suave); border-radius: 4px; background: var(--ventana); min-width: 0; }
.principal-panel h2 {
    margin: 0; padding: 6px 10px; font-size: 14px; background: var(--secundario-suave);
    border-bottom: 2px solid var(--secundario); border-radius: 4px 4px 0 0;
}
.principal-lista { display: flex; flex-direction: column; max-height: 40vh; overflow-y: auto; padding: 4px 0; }
.principal-lista-alta { max-height: 55vh; }
.principal-item {
    display: flex; justify-content: space-between; gap: 10px; padding: 3px 10px; cursor: pointer; user-select: none;
}
label.principal-item { justify-content: flex-start; }
.principal-item:hover { background: var(--menu-resalte); }
.principal-item.seleccionado { background: var(--seleccion); color: var(--seleccion-texto); }
.principal-tecla { font-size: 11px; opacity: .7; white-space: nowrap; }
.principal-acciones { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 10px; border-top: 1px solid var(--borde-suave); }
.principal-acciones .enlace:disabled { opacity: .5; cursor: default; }
.principal-icono { display: inline-block; width: 1.4em; margin-right: 4px; text-align: center; font-size: 18px; line-height: 1; }
.principal-acciones .principal-icono { width: auto; margin-right: 3px; font-size: 17px; text-decoration: none; }

/* Logos en circulo: clip-path y no border-radius, que recorta la imagen al circulo interior (sin el padding) */
/* Estructura de FrmGeneral: panel lateral (SplLogo) con logo y nombre del sistema, fecha y "¿Qué desea hacer?";
   a la derecha la empresa, Mis cuentas y los asesores */
.inicio {
    display: grid; grid-template-columns: 218px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    height: 100%; min-height: 420px; background: var(--ventana); border: 1px solid var(--borde);
}
/* Empresa (SplNombre, naranja, 72 px) pegada arriba y a la izquierda, con la franja del color lateral
   (SplCuentasFavoritas) debajo: título de las cuentas y sus enlaces; la lista de cuentas va pegada a la franja */
.inicio-cabecera { flex: none; margin: -10px -10px 0; }
.inicio-cabecera .principal-encabezado { min-height: 72px; padding: 8px 28px; border-radius: 0; }
.inicio-cabecera .principal-empresa, .inicio-cabecera .principal-ciudad { font-size: 21px; font-weight: 700; line-height: 1.3; opacity: 1; }
.inicio-cabecera .principal-configurar { margin-left: 12px; }
.inicio-franja {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 14px;
    min-height: 21px; padding: 1px 10px; background: var(--secundario); color: var(--secundario-texto); font-size: 13px;
}
.inicio-franja-titulo { font-weight: 700; }
.inicio-franja-enlaces { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.inicio-franja .enlace { color: inherit; font-weight: 600; }
.inicio-franja .principal-icono { width: auto; font-size: 15px; margin-right: 3px; }
.inicio .principal-superior { margin-top: -10px; }
.inicio-cuentas { border-top: 0; border-radius: 0 0 4px 4px; }
.inicio-lateral {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 0 10px; overflow-y: auto;
    background: var(--secundario); color: var(--secundario-texto);
}
/* Cabecera del lateral (como FrmGeneral): nombre y versión a la izquierda, logo en recuadro a la derecha, borde negro */
.marca-sistema {
    align-self: stretch; flex: none; display: flex; align-items: center; gap: 4px;
    height: 93px; padding: 4px 4px 4px 4px; border: 2px solid #000;
}
.marca-sistema-textos { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.marca-sistema-nombre {
    font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif; font-weight: 900; line-height: 1.12;
    color: var(--secundario-texto); overflow-wrap: anywhere;
    -webkit-text-stroke: 1px rgb(0 0 0 / .6); paint-order: stroke fill; text-shadow: 2px 2px 0 rgb(0 0 0 / .45);
}
.marca-sistema-version {
    padding: 0 9px; border: 1.5px solid #000; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 20px;
    background: var(--principal); color: var(--principal-texto);
}
.marca-sistema-logo {
    flex: none; width: 96px; height: 83px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #FFF; border: 1px solid #000;
}
.marca-sistema-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; padding: 2px; object-fit: contain; }
.marca-sistema.blanca { background: #FFF; }
.marca-sistema.blanca .marca-sistema-nombre { color: var(--secundario); -webkit-text-stroke: 0; text-shadow: 2px 2px 0 rgb(0 0 0 / .25); }
.inicio-lateral .enlace { color: inherit; }
.inicio-lateral input { color: #000; background: #FFF; }
.inicio-fecha { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 6px 10px 0; text-align: center; }
.inicio-fecha .principal-fecha-larga { font-size: 13px; }
.inicio-fecha .principal-fecha-cambiada { background: #FFF; color: #B00020; }
.inicio-fecha-controles { display: flex; align-items: center; gap: 4px; }
.inicio-fecha-controles .boton { min-width: 28px; padding: 2px 4px; color: #000; background: #FFF; }
.inicio-fecha-controles input[type=date] { width: 128px; padding: 2px 4px; }
.inicio-quehacer { align-self: stretch; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 160px; margin-top: 8px; }
.inicio-quehacer h2 { margin: 0; padding: 4px 10px; font-size: 14px; border-bottom: 1px solid rgb(255 255 255 / .35); }
.inicio-quehacer .principal-lista { flex: 1 1 0; max-height: none; min-height: 100px; }
.inicio-quehacer .principal-item:hover { background: rgb(255 255 255 / .18); }
.inicio-quehacer .principal-item.seleccionado { background: #FFF; color: #222; }
.inicio-quehacer .principal-acciones { border-top-color: rgb(255 255 255 / .35); gap: 4px 8px; padding: 6px 8px; font-size: 13px; }
.inicio-quehacer .principal-acciones .principal-icono { font-size: 15px; margin-right: 2px; }
.inicio-cuerpo { display: flex; flex-direction: column; gap: 10px; padding: 10px; min-width: 0; overflow-y: auto; }
.inicio .principal-encabezado { flex: none; }
.inicio .principal-superior { grid-template-columns: 1fr; }
.inicio .principal-cuentas .principal-lista { flex: none; height: auto; min-height: 0; max-height: 34vh; }
@media (max-width: 760px) {
    .inicio { display: flex; flex-direction: column; height: auto; }
    .inicio-lateral { padding-top: 8px; overflow: visible; }
    .inicio-lateral .inicio-fecha { margin-top: 0; }
    .marca-sistema { display: none; }
    .inicio-cabecera .principal-encabezado { padding: 8px 12px; }
    .inicio-quehacer .principal-lista { flex: none; max-height: 40vh; }
}

/* ============================================================================
   Maestros (FrmMaestroX): lateral con logo, encabezado, grilla y botones
   ============================================================================ */
.maestro {
    display: grid; grid-template-columns: 218px 1fr; grid-template-rows: minmax(0, 1fr);
    height: 100%; min-height: 420px;
    background: var(--ventana); border: 1px solid var(--borde);
}
/* Si los filtros no entran en la altura de la ventana, se desplaza el panel y no la página */
.maestro-lateral {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 18px; overflow-y: auto;
    background: var(--secundario); color: var(--secundario-texto);
}
.maestro-lateral { padding-top: 0; gap: 0; overflow: hidden; }   /* la cabecera (MarcaSistema) va pegada arriba, como en escritorio */
/* Lo de debajo de la cabecera se desplaza solo: la barra no angosta la cabecera */
.maestro-lateral-contenido {
    align-self: stretch; flex: 1 1 0; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 10px;
}
.maestro-opciones { align-self: stretch; margin-top: 14px; padding: 0 10px; }
.maestro-opciones-titulo { font-weight: 600; margin-bottom: 4px; }
.maestro-opciones-nota { margin-top: 6px; font-size: 12px; opacity: .9; }
.enlace-opcion {
    display: block; width: 100%; padding: 3px 0; text-align: left;
    background: none; border: 0; color: inherit; cursor: pointer;
}
.enlace-opcion:hover:not(:disabled) { text-decoration: underline; }
.enlace-opcion:disabled { opacity: .55; cursor: default; }
/* Gráfico de estados del panel lateral (ChartEstados de escritorio): fondo blanco para que no se pierdan los colores */
.grafico-estados { margin-top: 10px; padding: 8px; background: #FFF; color: #333; border: 1px solid #E1E1E4; border-radius: 6px; }
.grafico-estados svg { display: block; width: 100%; max-width: 150px; margin: 0 auto; }
.grafico-estados circle { cursor: default; }
.grafico-estados-valor { fill: #FFF; font-size: 10px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.grafico-estados-total { fill: #333; font-size: 15px; font-weight: 700; text-anchor: middle; }
.grafico-estados-pie { fill: #777; font-size: 8px; text-anchor: middle; }
.grafico-estados-leyenda { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 11.5px; }
.grafico-estados-leyenda i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.mensaje-reporte { width: 100%; resize: vertical; font: inherit; box-sizing: border-box; }
/* Datos de la empresa → Sistema: nombres y logos (PresentacionSistema) */
.sistema-presentacion { margin-top: 10px; }
.sistema-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.sistema-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sistema-logo-titulo { font-weight: 600; font-size: 12px; }
.sistema-logo-vista { width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; background: #FFF; border: 1px solid #D0D0D4; border-radius: 6px; padding: 6px; box-sizing: border-box; }
.sistema-logo-vista img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sistema-logo-vista.predeterminado { border-style: dashed; opacity: .75; }
.sistema-logo-botones { display: flex; gap: 6px; }
.sistema-logo-botones label.boton { cursor: pointer; }
.oculto { display: none; }

/* Columna: encabezado, búsqueda y (si hay) mensaje con su alto; la grilla toma el resto; el pie queda abajo */
.maestro-cuerpo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.maestro-encabezado, .maestro-busqueda, .maestro-mensaje { flex: none; }
/* Contenido bajo el encabezado: búsqueda, grilla y pie; con PanelIzquierdo, el panel a la izquierda a todo el alto */
.maestro-contenido, .maestro-principal { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.maestro-contenido.con-panel { flex-direction: row; }
.maestro-panel { flex: 0 0 270px; display: flex; flex-direction: column; min-height: 0; padding: 6px 0 6px 8px; }
.maestro-pie-grilla { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 8px 6px; font-size: 13px; }
@media (max-width: 900px) { .maestro-contenido.con-panel { flex-direction: column; } .maestro-panel { flex: none; max-height: 260px; padding-right: 8px; } }
.maestro-encabezado { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: 10px 14px; background: var(--principal); color: var(--principal-texto); }
.maestro-encabezado h1 { font-size: 20px; }
.maestro-encabezado p { margin: 2px 0 0; }

.maestro-busqueda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--borde-suave); }
.maestro-busqueda input[type=search] { flex: 1 1 220px; max-width: 360px; }
.maestro-busqueda .tecla-busqueda { color: var(--texto-suave, #666); font-size: .85em; margin-right: 8px; white-space: nowrap; cursor: pointer; }
.maestro-total { margin-left: auto; color: var(--texto-suave); }
.maestro-mensaje { margin: 6px 8px 0; padding: 4px 8px; color: var(--error); background: #FDECEA; border: 1px solid #F5C2C0; }

.grilla-contenedor { flex: 1 1 0; margin: 6px 8px; overflow: auto; border: 1px solid var(--borde); background: var(--ventana); min-height: 120px; }
.grilla { width: 100%; border-collapse: collapse; }
.grilla th, .grilla td { padding: 3px 6px; border-right: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5; white-space: nowrap; text-align: left; }
.grilla th {
    position: sticky; top: 0; z-index: 1;
    background: linear-gradient(#FFFFFF, #EFEFEF); border-bottom: 1px solid var(--borde);
    font-weight: 600; cursor: pointer; user-select: none;
}
.grilla td.centrado { text-align: center; }
/* AjustarAncho (Beneficiarios): las columnas con ancho fijo lo respetan y las demás se reparten el resto; el texto
   largo (direcciones) se corta con "…" y se ve completo al pasar el ratón */
.grilla.ajustada { table-layout: fixed; min-width: 1100px; }   /* en pantallas angostas, barra en vez de columnas aplastadas */
.grilla.ajustada th, .grilla.ajustada td { overflow: hidden; text-overflow: ellipsis; }
.grilla tbody tr { cursor: default; }
.grilla tbody tr:hover { background: #E5F3FF; }
.grilla tbody tr.inactiva { color: #8A8A8A; }
.grilla tbody tr.destacada { font-weight: 600; }
.grilla tbody tr.seleccionada, .grilla tbody tr.seleccionada:hover { background: var(--seleccion); color: var(--seleccion-texto); }

/* FrmRptConsolidadoMovimientos: cabecera de dos niveles (operación / Ing. Sal.), Código y Descripción fijos a la
   izquierda, fila TOTAL fija abajo; ingresos en azul, salidas en rojo, columnas Total resaltadas */
.consolidado { width: auto; min-width: 100%; }
.consolidado th { text-align: center; cursor: default; height: 24px; box-sizing: border-box; }
.consolidado thead tr:nth-child(2) th { top: 24px; }
.consolidado-grupo { font-weight: 700; }
.consolidado .consolidado-codigo, .consolidado td:first-child { position: sticky; left: 0; z-index: 2; width: 70px; min-width: 70px; }
.consolidado .consolidado-descripcion, .consolidado td:nth-child(2) { position: sticky; left: 70px; z-index: 2; min-width: 200px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.consolidado thead th.consolidado-codigo, .consolidado thead th.consolidado-descripcion { z-index: 3; }
.consolidado tbody td:first-child, .consolidado tbody td:nth-child(2) { background: var(--ventana); }
.consolidado tbody tr:hover td:first-child, .consolidado tbody tr:hover td:nth-child(2) { background: #E5F3FF; }
.consolidado tbody tr.seleccionada td { background: var(--seleccion); color: var(--seleccion-texto); }
.consolidado td.numero { min-width: 62px; }
.consolidado-ingreso { color: #0046BE; }
.consolidado-salida { color: #C80000; }
.consolidado-cero { opacity: .35; }
.consolidado-saldo { font-weight: 700; }
.consolidado td.consolidado-columna-total { background: #FFF4D6; font-weight: 700; }
.consolidado tfoot td { position: sticky; bottom: 0; z-index: 1; background: #FFDE82; font-weight: 700; border-top: 1px solid var(--borde); }
.consolidado tfoot td:first-child, .consolidado tfoot td:nth-child(2) { z-index: 3; }
.consolidado-barra { justify-content: space-between; flex-wrap: wrap; }
/* Consolidado de cuentas: un TOTAL por moneda; se fija el pie completo para que las filas no se encimen */
.consolidado-cuentas tfoot { position: sticky; bottom: 0; z-index: 3; }
.consolidado-cuentas tfoot td { position: static; }
.consolidado-cuentas tfoot td.consolidado-cero { opacity: 1; color: #9A8A60; }   /* la opacidad dejaba ver las filas de debajo */
.consolidado-cuentas td:nth-child(3) { min-width: 120px; }
.consolidado-leyenda > div { margin: 2px 0; }
.consolidado-leyenda .nota { color: inherit; opacity: 1; font-style: italic; margin-top: 6px; }   /* el gris de .nota no se leía sobre el panel lateral */
.consolidado-leyenda .consolidado-ingreso, .consolidado-leyenda .consolidado-salida { font-size: 14px; }

/* FrmRptConteoDiario: columna Conteo editable (crema), diferencia roja (falta) o azul (sobra), pie con responsable y totales */
.conteo thead th { white-space: normal; line-height: 1.1; }
.conteo td.numero { min-width: 58px; }
.conteo .consolidado-descripcion, .conteo td:nth-child(2) { min-width: 180px; max-width: 240px; }
.conteo .conteo-columna { background: #FFFCE1; min-width: 80px; }
.conteo tbody tr.seleccionada td.conteo-columna { background: #FFFCE1; }
.conteo-entrada { width: 100%; box-sizing: border-box; text-align: right; border: 1px solid transparent; background: transparent; font: inherit; color: #000; padding: 1px 3px; }
.conteo-entrada:focus { border-color: var(--borde); background: #FFF; outline: none; }
.conteo-falta { color: #B22222; font-weight: 700; }
.conteo-sobra { color: #4169E1; font-weight: 700; }
.conteo tbody tr.seleccionada td.conteo-falta, .conteo tbody tr.seleccionada td.conteo-sobra { color: #FFF; }
.conteo-pie { background: var(--lateral, #E9E9E9); padding: 4px 8px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; white-space: pre-wrap; }
.conteo-alerta { color: #B22222; font-weight: 700; }
.conteo-modo { display: flex; gap: 12px; }
.maestro-filtros label.check { display: flex; align-items: center; gap: 4px; }
.maestro-filtros label.check input { width: auto; }
.maestro-filtros .etiqueta { font-size: 12px; margin-top: 3px; }

/* Una sola fila de alto fijo: si no entran, se desplazan a lo ancho en vez de bajar a otra línea */
.maestro-botones {
    flex: none; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px;
    height: 42px; padding: 0 8px; overflow-x: auto; overflow-y: hidden;
    border-top: 1px solid var(--borde-suave);
}
.maestro-botones .boton { flex: none; white-space: nowrap; }
.maestro-botones .boton.activo { background: #CCE8FF; }
/* Otras opciones [F10]: los botones propios de la página, encima de su botón (molino.ubicarMenu lo coloca) */
.maestro-cuerpo { position: relative; }
.maestro-otras {
    position: absolute; right: 8px; bottom: 44px; z-index: 40;
    display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 4px;
    background: #F2F2F2; border: 1px solid #CCCCCC; box-shadow: 2px 3px 6px rgb(0 0 0 / .2);
}
.maestro-otras > .boton, .maestro-otras .menu-reportes > .boton { width: 100%; text-align: left; white-space: nowrap; }
.maestro-busqueda .check { white-space: nowrap; }

@media (max-width: 760px) {
    .maestro { display: flex; flex-direction: column; }
    .maestro-cuerpo { flex: 1; }
    .maestro-lateral { display: none; }
    /* en el teléfono el panel solo se muestra si tiene opciones, como franja sin logo */
    .maestro-lateral:has(.maestro-opciones) { display: block; padding: 6px 0 8px; }
    .maestro-lateral:has(.maestro-opciones) > .marca-sistema { display: none; }
    .maestro-lateral .maestro-opciones { margin-top: 0; }
    .maestro-lateral .maestro-lateral-contenido { display: block; overflow: visible; padding-top: 0; }
}

/* ============================================================================
   Ventanas de edición (FrmZona, FrmTransportista...)
   ============================================================================ */
.modal-fondo { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .35); }
.ventana, .ventana-pagina { background: var(--ventana); border: 1px solid #8A8A8A; box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.ventana-pagina { max-width: 560px; margin: 30px auto; }
.ventana-titulo {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 4px 4px 8px; background: var(--ventana); border-bottom: 1px solid var(--borde-suave);
}
.ventana-titulo img { width: 16px; height: 16px; }
.ventana-cerrar { margin-left: auto; width: 34px; height: 24px; background: none; border: 0; cursor: pointer; }
.ventana-cerrar:hover { background: #E81123; color: #FFF; }
.ventana-cuerpo { padding: 8px 10px 10px; }
.ventana-cuerpo.pendiente { padding: 18px; }
.ventana-cuerpo .fila-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ventana-mensaje { margin-top: 8px; color: var(--error); }

.grupo { margin: 0; padding: 6px 10px 10px; border: 1px solid #D5D5D5; border-radius: 3px; }
.grupo legend { padding: 0 3px; }
.grupo.sin-leyenda { border: 0; padding: 0; }

/* Pestañas de las ventanas de edición (SimpleTabControl de escritorio, con el color lateral) */
.pestanas { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--secundario); }
.pestanas button {
    padding: 5px 14px; border: 1px solid var(--borde-suave); border-bottom: 0; border-radius: 3px 3px 0 0;
    background: var(--secundario-suave); cursor: pointer;
}
.pestanas button.activa { background: var(--secundario); color: var(--secundario-texto); font-weight: 600; }
.pestana { padding: 8px 2px 2px; }
.pestana[hidden] { display: none; }
.grupo-interno { border: 1px solid #D5D5D5; border-radius: 3px; padding: 6px 10px 8px; margin-top: 8px; }
.grupo-titulo { font-weight: 600; }

/* Formularios compactos: filas más juntas, etiquetas cortas y dos campos por fila (fila-doble) */
.compacta .campo-fila { grid-template-columns: 92px 1fr; gap: 4px; margin-top: 3px; }
.compacta .campo-fila label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compacta .campo-fila-control input:not([type=checkbox]), .compacta .campo-fila-control select { padding-top: 1px; padding-bottom: 1px; }
.fila-doble { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.fila-grupos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compacta .grupo-interno { margin-top: 6px; padding: 4px 8px 6px; }
.compacta textarea { min-height: 0; }

/* FrmBeneficiario: datos a la izquierda, foto y marcas a la derecha */
.beneficiario-general { display: grid; grid-template-columns: 1fr 132px; gap: 12px; }
.beneficiario-foto { display: flex; flex-direction: column; gap: 4px; align-items: stretch; padding-top: 3px; }
.foto-marco { height: 128px; display: grid; place-items: center; border: 1px solid #ABADB3; background: #FFF; overflow: hidden; }
.foto-marco img { max-width: 100%; max-height: 100%; object-fit: contain; }
.foto-botones { display: flex; gap: 4px; }
.foto-botones .boton-archivo { flex: 1; }
.boton-archivo { position: relative; justify-content: center; overflow: hidden; }
.boton-archivo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compacta .grupo-interno .campo-fila { grid-template-columns: 110px 1fr; }
@media (max-width: 640px) {
    .beneficiario-general, .fila-doble, .fila-grupos { grid-template-columns: 1fr; }
}

/* Precios por presentación */
.lista-precios { margin-top: 6px; }
.lista-precios-barra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.lista-precios-barra select { flex: 1; min-width: 160px; }
.lista-precios-barra input.numero { width: 110px; text-align: right; }
.grilla-chica { border: 1px solid var(--borde); }
.grilla td.numero { text-align: right; }
.boton-mini { padding: 0 6px; border: 1px solid var(--borde-suave); background: #FFF; cursor: pointer; border-radius: 3px; }
.boton-mini:hover { background: #FDECEA; }

/* FrmMaestroProducto: "Cambiar precio" de toda la línea (las líneas van en el panel izquierdo, como en Salarios) */
.personal-lista tr.nivel-linea td { cursor: pointer; }
.procesar-linea { display: flex; gap: 6px; align-items: center; margin: 3px 0 8px; }
.procesar-linea select { width: 60px; }
/* El panel lateral tiene letra clara: sin esto los combos y cajas heredan el blanco (color: inherit) y no se lee lo elegido */
.maestro-lateral select, .maestro-lateral input:not([type=checkbox]):not([type=radio]) { color: #000; background: #FFF; }
a.enlace-opcion { text-decoration: none; }
.grilla td.celda-accion { cursor: pointer; font-size: 15px; line-height: 1; }
.grilla td.celda-accion:hover { background: rgb(0 0 0 / .06); }

/* FrmProducto: barra de la unidad de medida */
.unidad-barra select#uni-medida { flex: 1 1 170px; }
.unidad-barra select#uni-presentacion { flex: 1 1 120px; min-width: 110px; }
.mini-etiqueta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--texto-suave); }
.mini-etiqueta input.numero { width: 80px; }

/* FrmSysUsuario: datos y permisos a la izquierda, cuentas a la derecha */
.usuario-editor { display: grid; grid-template-columns: 1fr 260px; gap: 10px; align-items: start; }
.usuario-cuentas .asignacion-lista { height: 360px; }
.usuario-cuentas .asignacion-codigo { min-width: 22px; margin-right: 4px; }
.usuario-cuentas .asignacion-item { align-items: flex-start; }
.usuario-cuentas .asignacion-item label { line-height: 1.25; }
.permisos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.asignacion-item.favorita label { font-weight: 700; }
.asignacion-item label { flex: 1; cursor: pointer; }
.arbol-menu { height: 330px; }
.menu-raiz-texto { font-weight: 600; }
input.mayusculas { text-transform: uppercase; }
@media (max-width: 640px) { .usuario-editor, .permisos { grid-template-columns: 1fr; } }

/* Indicador de datos completos e inactivos en rojo (FrmMaestroBeneficiario) */
.indicador-verde { color: #2E9E44; }                     /* tamaño: ver "Indicadores de estado" */
.indicador-rojo { color: #D93025; }
.grilla tbody tr.texto-rojo td:not(.indicador-verde):not(.indicador-rojo) { color: #C62828; }
.campo-fila { display: grid; grid-template-columns: 105px 1fr; align-items: center; gap: 6px; margin-top: 6px; }
.campo-fila-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.campo-fila-control input:not([type=checkbox]) { flex: 1; min-width: 0; }
.campo-fila-control input.codigo { flex: 0 0 90px; text-align: center; }
.campo-fila-control input.corto { flex: 0 0 70px; }
.campo-fila-control input.medio { flex: 0 0 140px; }
.campo-fila-control input.numero { flex: 0 0 110px; text-align: right; }
.campo-fila-control select, .campo-fila-control textarea { flex: 1; min-width: 0; }
.campo-fila-control textarea, textarea.consulta { resize: vertical; }
textarea.consulta { width: 100%; margin-top: 6px; font-family: Consolas, monospace; font-size: 12px; }
.ventana-cuerpo { max-height: calc(100vh - 110px); overflow-y: auto; }
.ayuda { color: var(--texto-suave); }

/* Cuadro de mensaje (MessageBox): por encima de la ventana de edición */
.caja-mensaje-fondo { z-index: 200; }
.caja-mensaje { width: min(380px, 100%); }
.caja-mensaje-cuerpo { display: flex; gap: 12px; align-items: flex-start; padding: 16px 14px; }
.caja-mensaje-icono { font-size: 26px; line-height: 1; }
.caja-mensaje-texto { white-space: pre-line; padding-top: 4px; overflow-wrap: anywhere; }
.caja-mensaje-pie { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; background: #F0F0F0; border-top: 1px solid #DFDFDF; }
.caja-mensaje-pie .boton { min-width: 80px; justify-content: center; }

/* Sesión bloqueada / aviso de inactividad: encima de todo, también de las cajas de mensaje */
.sesion-fondo { z-index: 300; background: rgb(0 0 0 / .55); }
.sesion-ventana { width: min(420px, 100%); }
.sesion-cuerpo { display: flex; gap: 12px; align-items: flex-start; padding: 16px 14px; }
.sesion-datos { display: grid; gap: 4px; flex: 1; min-width: 0; }
.sesion-datos .caja-mensaje-texto { margin-bottom: 8px; }
.sesion-datos input { width: 100%; }
.sesion-error { color: #C62828; margin-top: 4px; }

/* Toasts (FrmToast): abajo a la derecha, el más reciente abajo; colores de escritorio por tipo */
.toasts {
    position: fixed; right: 16px; bottom: 34px; z-index: 300;
    display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px));
}
.toast {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 10px 10px 12px;
    color: #FFF; background: #323232; border-radius: 4px; box-shadow: 0 6px 18px rgb(0 0 0 / .3);
    animation: toast-entra .2s ease-out;
}
.toast-exito { background: #2E7D32; }
.toast-error { background: #C62828; }
.toast-advertencia { background: #F57C00; }
.toast-icono { font-size: 18px; line-height: 1.2; }
.toast-texto { flex: 1; display: flex; flex-direction: column; gap: 2px; white-space: pre-line; overflow-wrap: anywhere; }
.toast-acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.toast-version { font-size: 10px; opacity: .7; }
.toast-boton {
    padding: 1px 6px; font-size: 11px; color: #FFF; background: rgb(255 255 255 / .18);
    border: 1px solid rgb(255 255 255 / .35); border-radius: 3px; cursor: pointer;
}
.toast-boton:hover { background: rgb(255 255 255 / .3); }
@keyframes toast-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Lista con casillas de Balance / Centralización */
.asignacion { margin-top: 10px; }
.asignacion-titulo { font-weight: 600; margin-bottom: 4px; }
.asignacion-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.asignacion-barra input[type=search] { flex: 1; min-width: 140px; }
.asignacion-barra #asig-inicio { width: 90px; }
.asignacion-total { color: var(--texto-suave); margin-left: auto; }
.asignacion-lista { height: 260px; overflow-y: auto; border: 1px solid #ABADB3; background: #FFF; padding: 2px 0; }
.asignacion-item { display: flex; align-items: center; gap: 6px; padding: 1px 6px; cursor: pointer; }
.asignacion-item:hover { background: #E5F3FB; }
.asignacion-codigo { display: inline-block; min-width: 70px; color: var(--texto-suave); }

.ventana-pie {
    display: flex; justify-content: flex-end; gap: 6px;
    padding: 9px 10px 8px; background: #FAFAFB; border-top: 1px solid #E1E1E4;
    background-image: linear-gradient(90deg, var(--principal), var(--secundario));
    background-size: 100% 3px; background-repeat: no-repeat;
}

/* ============================================================================
   Login (FrmLogin): marca con el color secundario, como en escritorio
   ============================================================================ */
.login-fondo { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #E9ECEF; }
.login {
    display: grid; grid-template-columns: 200px 330px;
    min-height: 343px; background: #FFF; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.login-marca {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    padding-top: 40px; text-align: center; color: var(--secundario-texto);
    background: linear-gradient(150deg, var(--secundario-oscuro), var(--secundario));
}
.login-marca::before, .login-marca::after { content: ""; position: absolute; border-radius: 50%; background: rgb(255 255 255 / .09); }
.login-marca::before { width: 190px; height: 190px; left: -60px; bottom: -60px; }
.login-marca::after { width: 140px; height: 140px; right: -55px; top: -50px; }
/* Como el login de escritorio: el logo dentro del círculo (cuadrado inscrito) y recortado al círculo, sin asomar */
.login-logo { width: 84px; height: 84px; clip-path: circle(50%); background: #FFF; display: grid; place-items: center; }
.login-logo img { width: 60px; height: 60px; object-fit: contain; }
.login-sistema { margin-top: 12px; font-size: 18px; font-weight: 600; }
.login-identificacion { font-size: 11.5px; opacity: .85; }
.login-acento { width: 36px; height: 3px; margin-top: 10px; background: var(--principal); }
.login-pie { margin-top: auto; padding: 10px; font-size: 10px; line-height: 1.35; opacity: .85; }

/* Acerca de (FrmAbout): 480px, cabecera de 150px con degradado principal, franja secundaria, información y tarjeta */
.acerca-fondo { z-index: 300; }
.acerca {
    width: min(482px, 100%); background: #FFF; border: 1px solid #C8CCD0; border-radius: 8px; overflow: hidden;
    color: #212529; font-size: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.acerca-cabecera {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px;
    height: 150px; padding: 0 24px; border-bottom: 4px solid var(--secundario); color: var(--principal-texto, #FFF);
    background: linear-gradient(110deg, color-mix(in srgb, var(--principal), #000 30%), var(--principal));
}
.acerca-cabecera::before, .acerca-cabecera::after { content: ""; position: absolute; border-radius: 50%; background: rgb(255 255 255 / .08); pointer-events: none; }
.acerca-cabecera::before { width: 220px; height: 220px; right: -70px; top: -70px; }
.acerca-cabecera::after { width: 120px; height: 120px; right: -50px; bottom: -70px; }
.acerca-logo { flex: none; width: 84px; height: 84px; border-radius: 50%; background: #FFF; display: grid; place-items: center; box-shadow: 2px 3px 0 rgb(0 0 0 / .16); }
.acerca-logo img { width: 66px; height: 66px; object-fit: contain; }
.acerca-titulos { min-width: 0; }
.acerca-titulos > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acerca-sistema { font-size: 22px; font-weight: 600; }
.acerca-version, .acerca-descripcion { opacity: .85; }
.acerca-version { margin-top: 4px; }
.acerca-descripcion { font-size: 11.5px; margin-top: 2px; }
.acerca-x { position: absolute; top: 2px; right: 2px; width: 34px; height: 28px; border: 0; background: transparent; color: inherit; font-size: 13px; cursor: pointer; }
.acerca-x:hover { background: #E81123; color: #FFF; }
.acerca-cuerpo { padding: 18px 24px 0; }
.acerca-titulo { font-size: 10px; font-weight: 600; color: #6C757D; margin-bottom: 4px; }
.acerca-fila { display: grid; grid-template-columns: 120px 1fr; line-height: 22px; }
.acerca-fila span { color: #6C757D; }
.acerca-fila b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acerca-tarjeta {
    margin-top: 12px; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--secundario), #FFF 70%);
    border-left: 4px solid var(--secundario); background: color-mix(in srgb, var(--secundario), #FFF 92%);
}
.acerca-autor { font-size: 15px; font-weight: 600; }
.acerca-celular { color: #6C757D; margin-top: 2px; }
.acerca-pie { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 14px 24px 18px; border-top: 1px solid #DEE2E6; }
.acerca-derechos { flex: 1; min-width: 0; font-size: 10.5px; color: #6C757D; }
.acerca-pie button { height: 32px; cursor: pointer; }
.acerca-copiar { width: 140px; border: 1px solid #DEE2E6; background: #FFF; }
.acerca-copiar:hover { background: #F1F3F5; }
.acerca-cerrar { width: 96px; border: 0; font-weight: 600; background: var(--secundario); color: var(--secundario-texto); }
.acerca-cerrar:hover { filter: brightness(1.1); }

.login-contenido { padding: 22px 26px; }
.login-contenido h1 { font-size: 19px; }
.login-subtitulo { margin: 4px 0 14px; color: var(--texto-suave); font-size: 11.5px; }
.login-etiqueta { display: block; margin-top: 10px; color: var(--texto-suave); font-size: 10px; font-weight: 600; }
.login-empresa { margin-top: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-empresa-fila { display: flex; align-items: center; gap: 8px; }
.login-empresa-fila .login-empresa { flex: 1; min-width: 0; }
.login-opciones {
    flex: none; margin-top: 4px; padding: 2px 8px; font-size: 11px; cursor: pointer;
    color: var(--secundario); background: transparent; border: 1px solid currentColor; border-radius: 4px;
}
.login-opciones:hover:not(:disabled) { background: var(--secundario); color: var(--secundario-texto); }

/* FrmOpcionesPrincipales: encabezado con el color principal y botones numerados */
.opciones-empresa { width: min(420px, 100%); outline: none; }
.opciones-encabezado { padding: 12px 16px; background: var(--principal); color: var(--principal-texto); }
.opciones-encabezado h2 { font-size: 17px; }
.opciones-encabezado div { margin-top: 2px; font-size: 11px; opacity: .9; }
.opciones-franja { height: 3px; background: linear-gradient(90deg, var(--principal), var(--secundario)); }
.opciones-lista { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.opcion {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; text-align: left; cursor: pointer;
    background: #FFF; border: 1px solid var(--borde-suave); border-radius: 4px;
}
.opcion:hover:not(:disabled), .opcion:focus-visible { border-color: var(--secundario); background: var(--secundario-suave); }
.opcion:disabled { opacity: .6; cursor: default; }
.opcion-numero {
    flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
    background: var(--secundario); color: var(--secundario-texto); font-weight: 700;
}
.opcion-texto { display: flex; flex-direction: column; }
.opcion-texto span { color: var(--texto-suave); font-size: 11px; }
.opciones-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; }
.login-campo {
    display: flex; align-items: center; height: 32px; margin-top: 4px;
    border: 1px solid #CED4DA; border-radius: 5px; padding: 0 4px 0 10px;
}
.login-campo:focus-within { border: 2px solid var(--secundario); padding-left: 9px; }
.login-campo input { flex: 1; height: 28px !important; border: 0 !important; outline: 0 !important; padding: 0 !important; font-size: 13px; background: transparent; }
.login-campo input.mayusculas { text-transform: uppercase; }
.login-mostrar { background: none; border: 0; color: var(--secundario); font-weight: 600; font-size: 11px; cursor: pointer; }
.login-avisos { min-height: 44px; padding-top: 4px; font-size: 11px; }
.login-mayus { color: var(--aviso); }
.login-error { color: var(--error); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.login-nota { color: var(--texto-suave); }
.login-ingresar {
    width: 100%; height: 34px; border: 0; border-radius: 3px; cursor: pointer;
    background: var(--secundario); color: var(--secundario-texto); font-weight: 600; font-size: 13px;
}
.login-ingresar:hover:not(:disabled) { filter: brightness(1.1); }
.login-ingresar:disabled { opacity: .6; cursor: default; }
.login-botones { display: flex; gap: 6px; }
.login-volver { height: 34px; padding: 0 14px; background: #FFF; border: 1px solid #CED4DA; border-radius: 3px; cursor: pointer; }

@media (max-width: 600px) {
    .login { grid-template-columns: 1fr; }
    .login-marca { padding: 20px 0 6px; }
    .login-pie { display: none; }
}

/* ---------- Plantilla Blazor (carga y errores) ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Cargando");
    }

/* FrmParametros: grupos en rejilla; código + descripción en las referencias */
/* dense: un grupo de ancho completo no deja hueco antes; lo ocupan los grupos siguientes */
.parametros { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-auto-flow: row dense; gap: 0 8px; align-items: start; }
.parametros .grupo-ancho { grid-column: 1 / -1; }
.parametros .campo-fila, .compacta.parametros .grupo-interno .campo-fila { grid-template-columns: 130px 1fr; }
/* Primera pestaña: dos columnas como escritorio (los grupos grandes ocupan las dos) */
.parametros-general { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
    .parametros-general { grid-template-columns: 1fr; }
}
/* Otros: misma distribución que escritorio (StcOtros); en pantallas angostas, un grupo debajo de otro */
.parametros-otros {
    grid-template-columns: repeat(4, 1fr); align-items: stretch;
    grid-template-areas:
        "montos montos pago cobro"
        "montos montos industrial estiva"
        "montos montos colores colores"
        "asesores asesores lugares lugares"
        "permisos permisos permisos permisos"
        "perfiles perfiles sesion sesion"; }
.parametros-otros .campo-fila, .compacta.parametros-otros .grupo-interno .campo-fila { grid-template-columns: 270px 1fr; }
.compacta.parametros-otros :is(.otros-pago, .otros-cobro, .otros-industrial, .otros-estiva) .campo-fila { grid-template-columns: 52px 1fr; }
.compacta.parametros-otros :is(.otros-colores, .otros-perfiles) .campo-fila { grid-template-columns: 90px 1fr; }
.compacta.parametros-otros .otros-lugares .campo-fila { grid-template-columns: 60px 1fr; }
.compacta.parametros-otros .otros-sesion .campo-fila { grid-template-columns: minmax(0, 1fr) 110px; }
@media (max-width: 900px) {
    .parametros-otros { display: block; }
}
.referencia { display: flex; gap: 6px; align-items: center; min-width: 0; }
.referencia input.codigo { flex: 0 0 96px; width: 96px; }
.referencia input[type=color] { flex: 0 0 44px; width: 44px; height: 22px; padding: 0 2px; }
.referencia-descripcion { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texto-suave); }
.referencia-descripcion.texto-rojo, strong.texto-rojo { color: #C62828; }
.ubigeo { display: flex; gap: 4px; flex-wrap: wrap; }
.ubigeo select { flex: 1; min-width: 110px; }
select.corto { max-width: 130px; }
.grupo-titulo .boton-mini { margin-left: 8px; font-weight: normal; }
.texto-azul, .grilla tbody tr.texto-azul td { color: #1F4E9E; }

/* Cierre de operaciones: año y acciones en el panel lateral; avance del proceso */
.opciones-cierre { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.opciones-cierre select { width: 100%; }
.pasos-proceso { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; }
.pasos-proceso li { color: var(--texto-suave); }
.pasos-proceso li.hecho { color: #2E7D32; }
.pasos-proceso li.actual { color: inherit; font-weight: 600; }
.opciones-cierre select { color: #000; background: #FFF; }

/* Maestros de documentos: filtros en el panel lateral y pestañas Existentes / Eliminados */
.maestro-filtros .filtros-documento, .filtro-fechas { display: flex; flex-direction: column; gap: 3px; }
.maestro-filtros label { font-size: 12px; margin-top: 3px; }
.maestro-filtros select, .maestro-filtros input { width: 100%; color: #000; background: #FFF; }
.maestro-filtros .boton-mostrar { margin-top: 8px; width: 100%; }
/* FiltroMultiple: se ve como un combo; al abrirlo, casillas debajo (dentro del panel, sin tapar nada) */
.filtro-multiple { color: #000; background: #FFF; border: 1px solid #767676; border-radius: 2px; font-size: 13px; }
.filtro-multiple > summary { list-style: none; cursor: pointer; padding: 2px 22px 2px 4px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filtro-multiple > summary::-webkit-details-marker { display: none; }
.filtro-multiple > summary::after { content: "▾"; position: absolute; right: 6px; top: 1px; }
.filtro-multiple[open] > summary { border-bottom: 1px solid #CCC; }
.filtro-multiple-lista { display: flex; flex-direction: column; padding: 3px 4px; max-height: 180px; overflow-y: auto; }
.maestro-filtros .filtro-multiple-lista label { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.maestro-filtros .filtro-multiple-lista input { width: auto; margin: 2px 0; }
.leyenda-estado { margin-top: 8px; font-size: 12px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.maestro-propios { display: contents; }
.maestro-propios.oculto { display: none; }
/* Franja bajo el encabezado (SplCuentasFavoritas): color lateral; la leyenda de estados con cuadros de color como escritorio */
.maestro-franja { flex: none; min-height: 21px; padding: 1px 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
                  background: var(--secundario); color: var(--secundario-texto); font-size: 12px; }
.maestro-franja .leyenda-estado { margin: 0; gap: 4px; }
.maestro-franja .leyenda-estado [class^="indicador-"] { font-size: 0; display: inline-block; width: 14px; height: 14px; margin: 0 2px 0 8px;
                  background: currentColor; border: 1px solid var(--secundario-texto); vertical-align: middle; }
.maestro-franja .leyenda-estado [class^="indicador-"]:first-of-type { margin-left: 6px; }
.maestro-pestanas { margin: 6px 10px 0; }
.indicador-rojo { color: #C62828; }
.pregunta-motivo { white-space: pre-line; margin: 0 0 8px; }

/* Búsqueda de productos: por encima de la ventana de edición */
.busqueda-fondo { z-index: 150; }
.busqueda-fondo input[type=search] { width: 100%; margin-bottom: 6px; }
/* Sin scroll horizontal: las columnas se reparten el ancho del recuadro y el texto largo se corta con "…" */
.busqueda-lista { max-height: min(420px, calc(100vh - 220px)); overflow-x: hidden; overflow-y: auto; border: 1px solid #D5D5D5; }
.busqueda-lista .grilla tbody tr { cursor: pointer; }
.busqueda-lista .grilla { table-layout: fixed; }
.busqueda-lista .grilla th, .busqueda-lista .grilla td { overflow: hidden; text-overflow: ellipsis; }

/* FrmValeAlmacen */
.vale-linea { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.vale-producto { flex: 1 1 280px; }
.vale-linea select { width: 90px; }
.vale-linea input.numero { width: 100px; text-align: right; }
.stock-maximo { font-weight: 600; color: #1F4E9E; }
.vale-detalle { margin-top: 6px; max-height: 260px; overflow: auto; border: 1px solid #D5D5D5; }
.vale-detalle .grilla td button { white-space: nowrap; }
.vale-total { text-align: right; font-size: 12px; margin-top: 3px; }
.vale-monto { margin-left: 14px; font-size: 13px; font-weight: 700; color: #1F4E9E; }
.credito-linea { margin: 0 0 4px; padding-left: 114px; font-weight: 600; color: #1F4E9E; }
.credito-linea.excedido { color: var(--error); }
.retiro-lista { max-height: 170px; }
.retiro-filtro { width: 100%; margin: 2px 0 4px; }

/* FrmReparto */
.reparto-cabecera { display: grid; grid-template-columns: 3fr 2fr; gap: 6px; }
.reparto-cabecera .fila-doble .campo-fila-control { min-width: 0; }
.reparto-totales .reparto-lista-corta { max-height: 190px; }
.reparto-comision { margin: 2px 0; font-weight: 600; color: #1F4E9E; }
.reparto-ayudante { margin-left: 12px; font-weight: 400; color: inherit; }
.reparto-filtros { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.reparto-filtros input[type=search] { flex: 1 1 200px; }
.reparto-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: stretch; }
.reparto-cuerpo > .grupo-interno { min-width: 0; }
.reparto-filtros { align-items: center; }
.reparto-filtros select { flex: 1 1 140px; min-width: 0; }
.reparto-filtros .reparto-derecha { margin-left: auto; }
.reparto-filtros .boton-icono { padding: 2px 8px; }
.reparto-cuerpo .reparto-detalle { max-height: 470px; min-height: 300px; outline: none; }
.reparto-lista { max-height: 180px; min-height: 120px; }
.reparto-lista .grilla tbody tr { cursor: pointer; }
.reparto-detalle { max-height: 240px; }
.reparto-detalle input.celda { width: 100%; min-width: 0; padding: 1px 3px; }
/* Arrastrar y soltar: filas que se pueden arrastrar y la zona donde se pueden soltar */
.reparto-editor tr[draggable=true], .reparto-editor td.arrastrable, .arrastre-editor tr[draggable=true], .arrastre-editor td.arrastrable { cursor: grab; }
.arrastre-editor input.celda { width: 100%; min-width: 0; padding: 1px 3px; }
.reparto-editor .zona-soltar, .arrastre-editor .zona-soltar { outline: 2px dashed var(--principal); outline-offset: 2px; background: var(--principal-suave); }
.reparto-resumen { text-align: left; font-weight: 600; }
@media (max-width: 900px) { .reparto-cabecera, .reparto-cuerpo { grid-template-columns: 1fr; } }

/* FrmRecepcionCascara */
.pesada-columnas { display: grid; grid-template-columns: 3fr 2fr; gap: 6px; }
.pesada-columnas .fila-doble .campo-fila-control { min-width: 0; }
.pesada-secuencias { max-height: 200px; }
.pesada-calculo .campo-fila { grid-template-columns: 130px 1fr; }
.pesada-prestamos { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; align-items: center; }
.pesada-botones-prestamo { display: flex; flex-direction: column; gap: 4px; }
.pesada-lista { max-height: 130px; }
.pesada-lista .grilla tbody tr { cursor: pointer; }
input.pesada-final { font-weight: 700; color: #1F4E9E; }

/* FrmSecado */
.secado-precios select, .secado-precios input { width: 100%; }
.secado-totales td, .secado-totales th { padding: 2px 4px; }
.grilla tbody tr.fila-roja td { background: #F6D5D5; }
.grilla tbody tr.fila-verde td { background: #D9F2DD; }
.grilla tbody tr.fila-amarilla td { background: #FFF5C2; }
@media (max-width: 900px) { .pesada-columnas, .pesada-prestamos { grid-template-columns: 1fr; } }
.retiro-lista .grilla tbody tr { cursor: pointer; }

/* FrmServicioMaquila */
.maquila-produccion { max-height: 200px; }
.grilla tbody tr.fila-texto-verde td { color: #2E7D32; font-weight: 600; }
.maquila-liquidacion { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.maquila-liquidacion input.numero { text-align: right; }
.maquila-ordenes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.maquila-estiva { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.maquila-estiva input.numero { width: 100px; text-align: right; }
@media (max-width: 900px) { .maquila-liquidacion { grid-template-columns: 1fr; } }

/* FrmCajaMovimiento */
.pagina-documento { padding: 8px 12px; max-width: 1180px; }
.pagina-documento:has(.hoja-reporte.horizontal) { max-width: none; }
.pagina-titulo { margin: 0 0 8px; font-size: 18px; color: var(--principal, #1F4E9E); }
.grilla td.texto-error { color: var(--error); font-weight: 600; }
.movimientos-lista { max-height: 340px; }
.movimientos-lista .grilla tbody tr, .pendientes-lista .grilla tbody tr { cursor: pointer; }
.pendientes-lista { max-height: 260px; overflow-x: hidden; }
.pendientes-lista .grilla, .movimientos-lista .grilla { table-layout: fixed; width: 100%; }
.pendientes-lista .grilla td, .movimientos-lista .grilla td,
.movimientos-lista .grilla th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movimientos-lista { overflow-x: hidden; }                     /* columnas al ancho de la ventana: el texto largo se corta con "…" */
.cuentas-elegir { display: flex; flex-wrap: wrap; gap: 4px; }
.cuentas-elegir button.activa, .cuentas-elegir button.activa:hover { background: var(--secundario); color: var(--secundario-texto); font-weight: 600; }
/* Cuentas como el LvwCuentas de escritorio: mosaicos [icono] nombre, del mismo ancho */
.cuenta-mosaico { display: inline-flex; align-items: center; gap: 6px; width: 190px; padding: 3px 8px 3px 4px; text-align: left; }
.cuenta-mosaico img { flex: none; width: 24px; height: 24px; }
.cuenta-mosaico span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analisis-columnas { display: grid; grid-template-columns: 320px 1fr; gap: 8px; }
.analisis-grupos { max-height: 520px; }
.analisis-grupos .grilla tbody tr { cursor: pointer; }
.analisis-grupos tr.nivel-1 td { font-weight: 700; }
.analisis-grupos tr.nivel-2 td:first-child { padding-left: 18px; }
@media (max-width: 900px) { .analisis-columnas { grid-template-columns: 1fr; } }
/* FrmAnalisisMovimientosCaja: lista de beneficiarios / orígenes en el panel izquierdo; movimientos con columnas al
   ancho de la ventana, ingresos en azul, egresos en rojo y los totales fijos abajo */
.analisis-beneficiario { display: flex; align-items: center; gap: 4px; min-width: 0; }
.analisis-beneficiario span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.analisis-pagina .maestro-panel { flex-basis: 240px; }
.analisis-movimientos { table-layout: fixed; width: 100%; min-width: 740px; }   /* en pantallas angostas se desplaza a lo ancho */
.analisis-movimientos td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analisis-movimientos tbody tr { cursor: pointer; }
.analisis-movimientos tbody td.numero { font-weight: 600; }
.analisis-movimientos tfoot { position: sticky; bottom: 0; z-index: 2; }
.analisis-movimientos tfoot td { background: #FFDE82; font-weight: 700; border-top: 1px solid var(--borde); }
.analisis-movimientos .analisis-total-titulo { text-align: right; padding-right: 10px; }

/* Personal por área (Salarios, panel izquierdo del maestro): la lista ocupa el alto del panel; cada área con su
   ícono, franja del color principal y la cantidad en un globo; el personal con su ícono */
.maestro-panel .grupo-titulo { font-weight: 600; margin-bottom: 2px; }
.maestro-panel .personal-lista { flex: 1; max-height: none; min-height: 120px; margin-top: 0; border-color: var(--borde); background: var(--ventana); }
.personal-lista tr.nivel-1 td { background: #F2F2F2; border-left: 3px solid var(--principal); padding-top: 4px; padding-bottom: 4px; }
.personal-lista tr.nivel-2 td:first-child { padding-left: 16px; }
.personal-lista tr.nivel-1.seleccionada td { background: var(--seleccion); color: var(--seleccion-texto); }   /* el gris del grupo dejaba el texto blanco ilegible */
.personal-icono { display: inline-block; width: 1.5em; text-align: center; margin-right: 4px; }
.personal-cantidad { float: right; min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--principal); color: var(--principal-texto); font-size: 11px; line-height: 17px; text-align: center; }

/* Indicadores de estado (●) más grandes en todo el sistema, para verlos mejor */
.indicador-verde, .indicador-rojo, .indicador-amarillo, .indicador-azul, .indicador-gris,
.grilla td.indicador-verde, .grilla td.indicador-rojo, .grilla td.indicador-amarillo, .grilla td.indicador-azul, .grilla td.indicador-gris { font-size: 22px; line-height: 0.8; }
.grilla td.indicador-verde, .grilla td.indicador-rojo, .grilla td.indicador-amarillo, .grilla td.indicador-azul, .grilla td.indicador-gris { padding-top: 0; padding-bottom: 0; vertical-align: middle; }
.leyenda-estado .indicador-verde, .leyenda-estado .indicador-rojo, .leyenda-estado .indicador-amarillo,
.leyenda-estado .indicador-azul, .leyenda-estado .indicador-gris { font-size: 20px; vertical-align: -2px; }
.pagos-resumen { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.badge-estado { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.badge-estado.pendiente { background: #FDECEA; color: #C62828; }
.badge-estado.confirmado { background: #E6F4EA; color: #2E7D32; }
.badge-estado.eliminado { background: #EEE; color: #555; }
.badge-estado.ingreso { background: #E3F2FD; color: #1565C0; }
.badge-estado.salida { background: #FFF3E0; color: #E65100; }
.referencia select.tipo-vale { flex: 1 1 auto; min-width: 0; }
.filtro-beneficiario { display: flex; gap: 4px; }
.filtro-beneficiario input { flex: 1; min-width: 0; }
.filtro-nombre { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.direccion-transportista { margin: 0 0 2px; padding-left: 114px; font-size: 12px; }
.embarque-grupos { grid-template-columns: 3fr 2fr; }
.embarque-grupos .campo-fila-control { min-width: 0; }
.embarque-grupos input[type=date] { min-width: 0; width: 100%; }
@media (max-width: 640px) { .embarque-grupos { grid-template-columns: 1fr; } }
.indicador-azul, .grilla td.indicador-azul { color: #1F6FD1; }
.indicador-gris, .grilla td.indicador-gris { color: #8A8A8A; }
.indicador-amarillo, .grilla td.indicador-amarillo { color: #E0B000; }
.contrato-editor .grupo-interno .campo-fila { grid-template-columns: 104px 1fr; }
.opciones-radio { display: flex; gap: 14px; align-items: center; }

/* Reportes (páginas imprimibles que reemplazan a Crystal) */
.reporte-barra { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.reporte-seleccion { margin-top: 6px; font-size: 13px; }
.reporte-seleccion summary { cursor: pointer; }
.reporte-seleccion .vale-detalle { max-height: 220px; padding: 4px 6px; display: flex; flex-direction: column; }
.reporte-seleccion label.nivel-1 { font-weight: 700; }
.reporte-seleccion label.nivel-2 { padding-left: 18px; }
/* En pantalla la hoja mide lo mismo que el papel (A4 con márgenes de 12 mm, como @page): se ve tal cual se imprimirá */
.hoja-reporte { box-sizing: border-box; width: 210mm; max-width: none; margin: 0 auto; padding: 12mm; background: #FFF; color: #000; border: 1px solid #CFCFCF; box-shadow: 0 2px 8px rgb(0 0 0 / .12); font-family: Arial, sans-serif; font-size: 12px; }
.hoja-reporte.horizontal { width: 297mm; }
/* Cabecera estándar (como los .rpt): empresa, dirección y RUC en negrita; fecha y hora a la derecha; título en un recuadro redondeado */
.reporte-cabecera { display: flex; justify-content: space-between; gap: 12px; }
.reporte-datos-empresa { font-weight: 700; line-height: 1.35; }
.reporte-empresa { font-size: 14px; }
.reporte-ruc { display: inline-block; min-width: 60px; }
.reporte-fecha { text-align: right; white-space: nowrap; line-height: 1.35; }
.reporte-titulo { text-align: center; font-size: 13px; margin: 4px 0 6px; padding: 2px 0; border: 1px solid #E08A2E; border-radius: 8px; }
.reporte-titulo span { text-decoration: underline; text-underline-offset: 2px; }
.reporte-pie { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; padding-top: 6px; border-top: 1px solid #999; }
.reporte-pie span { color: #444; }
.reporte-subtitulo { text-align: center; margin-bottom: 8px; }
.reporte-tabla { width: 100%; border-collapse: collapse; }
.reporte-tabla th { border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 3px 4px; text-align: left; background: #EEE; }
.reporte-tabla td { padding: 2px 4px; vertical-align: top; }
.reporte-tabla .numero { text-align: right; white-space: nowrap; }
/* Hoja por bloques (cuentas pendientes detalladas): ficha, secciones en recuadro y total del bloque */
.reporte-bloque { padding: 6px 0 8px; border-bottom: 1px dashed #777; break-inside: avoid-page; }
.reporte-bloque-encabezado { font-weight: 700; font-size: 13px; margin: 0 4px 2px; }
.reporte-bloque-campos:empty { display: none; }
.reporte-bloque-campos { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px 12px; margin: 0 4px 4px; }
.reporte-bloque-campos > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reporte-bloque-campos span { display: inline-block; min-width: 82px; }
.reporte-seccion { border: 1px solid #444; margin-top: 4px; break-inside: avoid; }
.reporte-seccion-titulo { padding: 1px 4px; font-size: 11px; }
.reporte-seccion .reporte-tabla th { background: none; border-top: 0; text-align: center; }
.reporte-bloque-total { display: flex; justify-content: flex-end; gap: 16px; margin-top: 4px; padding-right: 4px; font-weight: 700; }
.reporte-bloque-total b { min-width: 110px; text-align: right; border-bottom: 3px double #000; }
.reporte-tabla th.centrado, .reporte-tabla td.centrado { text-align: center; }
/* Registros de compras/ventas: encabezado en negrita, recuadro a todo el ancho, sublínea con sangría */
.reporte-bloque.simple.negrita .reporte-bloque-encabezado { font-weight: 700; }
.reporte-bloque.simple.ancho .reporte-seccion { margin-left: 0; }
.reporte-bloque.sublinea .reporte-bloque-encabezado { padding-left: 48px; }
.reporte-bloque:has(> .reporte-bloque-encabezado):not(:has(.reporte-seccion)) { padding-bottom: 0; }
/* RptProducto: descripción a la izquierda y estado a la derecha; recuadro "General" con el código en negrita */
.ficha-producto .reporte-bloque { border-bottom: 0; }
.ficha-producto .reporte-bloque-encabezado { display: flex; justify-content: space-between; font-size: 14px; margin: 0 0 4px; }
.ficha-producto .reporte-bloque-campos { position: relative; border: 1px solid #444; padding: 16px 6px 4px; margin: 0 0 10px; gap: 2px 12px; grid-template-columns: 1.3fr 1.7fr 0.8fr; }
.ficha-producto .reporte-bloque-campos > div { white-space: normal; }
.ficha-producto .reporte-bloque-campos span { min-width: 66px; }
.ficha-producto .reporte-bloque-campos::before { content: "General"; position: absolute; top: 1px; left: 4px; font-size: 11px; font-weight: 700; }
.ficha-producto .reporte-bloque-campos > div:first-child { font-weight: 700; }
.ficha-producto .reporte-seccion { margin-top: 10px; }
.ficha-producto .reporte-seccion-titulo { font-weight: 700; }
/* RptBeneficiario: dos recuadros (datos generales con la foto a la derecha, datos laborales en tres columnas) y la
   tabla de precios por tipo de presentación, angosta y centrada */
.ficha-beneficiario .reporte-bloque { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #000; padding: 8px 10px; margin: 10px 4px 0; }
.ficha-beneficiario .reporte-bloque-campos { flex: 1; margin: 0; gap: 4px 12px; }
.ficha-beneficiario .reporte-bloque-campos > div { white-space: normal; display: flex; }   /* el valor largo baja alineado */
.ficha-beneficiario .reporte-bloque-campos > div > span { flex: none; }
.ficha-beneficiario .generales .reporte-bloque-campos { grid-template-columns: 2.2fr 1fr; }
.ficha-beneficiario .generales .reporte-bloque-campos span { min-width: 112px; }
.ficha-beneficiario .generales .reporte-bloque-campos > div:nth-child(even) span { min-width: 84px; }
.ficha-beneficiario .laborales .reporte-bloque-campos { grid-template-columns: 1fr 1fr 1fr; }
.ficha-beneficiario .laborales .reporte-bloque-campos span { min-width: 108px; }
.ficha-beneficiario .reporte-bloque.titulo-ficha { border: 0; padding: 0 10px; margin-top: 8px; }
.ficha-beneficiario .titulo-ficha .reporte-bloque-encabezado { flex: 1; margin: 0; padding-right: 110px; font-size: 13px; }
.ficha-beneficiario .titulo-ficha .reporte-bloque-encabezado span + span { font-weight: 400; font-size: 12px; white-space: pre; min-width: 150px; }
.ficha-beneficiario .reporte-bloque-imagen { width: 88px; height: 72px; object-fit: cover; }
.ficha-beneficiario .reporte-anexo { font-size: 12px; margin: 22px 4px 6px 20px; }
.ficha-beneficiario .reporte-anexo + .reporte-tabla { width: 320px; margin-left: 20px; }
.ficha-beneficiario .reporte-anexo + .reporte-tabla td { text-align: center; }
/* Fila de totales debajo del recuadro, alineada con sus columnas; "general" con doble raya */
.reporte-seccion.totales, .reporte-seccion.sin-recuadro { border: 0; }
.reporte-seccion.totales { margin-top: 0; }
.reporte-seccion.totales thead tr, .reporte-seccion.orden.siguiente thead tr { visibility: collapse; }   /* oculta el encabezado pero conserva los anchos */
.reporte-seccion.totales .reporte-total td { border-top: 0; }
.reporte-seccion.totales .reporte-total td[colspan] { text-align: right; padding-right: 12px; }
.reporte-seccion.totales .reporte-total td.numero:not(:empty) { border-top: 1px solid #000; }
.reporte-seccion.totales.general .reporte-total td.numero:not(:empty) { border-top: 0; border-bottom: 3px double #000; }
/* Detalladas por tercero: fila de la orden, sus productos en recuadro con sangría y el resumen a la derecha */
.reporte-seccion.detalle { border: 0; margin: 0 0 4px 48px; }
.reporte-seccion.detalle .reporte-seccion-titulo { font-style: italic; margin-left: -40px; }
.reporte-seccion.detalle .reporte-tabla { border: 1px solid #444; }
.reporte-bloque .reporte-seccion.detalle { margin-left: 48px; }
/* Ventas por línea agrupado por repartidor: zona y línea con sangría; raya de separación tras el total del repartidor */
.reporte-bloque.nivel-2 .reporte-bloque-encabezado { padding-left: 16px; }
.reporte-bloque.nivel-3 .reporte-bloque-encabezado { padding-left: 32px; }
.reporte-seccion.totales.fin-grupo { border-bottom: 1px dashed #777; padding-bottom: 6px; }
/* Comisiones por ventas PT: fila de la venta sombreada, productos con sangría y total con raya punteada encima */
.reporte-seccion.cabecera-venta thead tr { visibility: collapse; }
.reporte-seccion.cabecera-venta tbody td { background: #E6E6E6; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.reporte-bloque.comision .reporte-seccion.detalle { margin-left: 120px; margin-right: 110px; }
.reporte-seccion.totales.plano { border-top: 1px dashed #777; margin-top: 6px; }
.reporte-seccion.totales.plano .reporte-total td.numero:not(:empty) { border-top: 0; }
/* Stock de productos vendidos: encabezado del bloque con sangría, mensaje de la venta y raya punteada entre bloques */
.reporte-bloque.simple.stock { border-bottom: 1px dashed #777; padding-bottom: 6px; }
.reporte-bloque.stock .reporte-bloque-encabezado { justify-content: flex-start; padding-left: 48px; white-space: pre; }
.reporte-bloque.stock .reporte-seccion { margin-left: 32px; }
.reporte-seccion.nota-bloque { border: 0; }
.reporte-seccion.nota-bloque .reporte-seccion-titulo { font-size: 12px; padding: 2px 0; white-space: pre; }
.reporte-seccion.totales.sin-raya .reporte-total td.numero:not(:empty) { border-top: 0; }
.reporte-seccion.resumen { border: 0; display: flex; justify-content: flex-end; align-items: flex-start; gap: 24px; margin-top: 6px; }
.reporte-seccion.resumen .reporte-seccion-titulo { font-weight: 700; font-style: italic; font-size: 12px; }
.reporte-seccion.resumen .reporte-tabla { width: 360px; border: 1px solid #444; }
.reporte-bloque-encabezado { display: flex; justify-content: space-between; gap: 12px; }
.reporte-bloque.simple { border-bottom: 0; padding-bottom: 2px; }
.reporte-bloque.simple .reporte-bloque-encabezado { font-weight: 400; font-size: 12px; }
.reporte-bloque.simple .reporte-seccion { margin-left: 48px; }
.reporte-bloque.simple .reporte-bloque-total b { border-bottom: 0; border-top: 1px solid #000; }
.reporte-tabla.una-linea { table-layout: fixed; }
.reporte-tabla.una-linea th { white-space: normal; vertical-align: bottom; }
.reporte-tabla.una-linea th, .reporte-tabla.una-linea td { padding-left: 2px; padding-right: 2px; }
.reporte-tabla.una-linea tbody tr:not(.reporte-subtotal):not(.reporte-total) td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reporte-tabla thead { display: table-header-group; }
.reporte-tabla tr { break-inside: avoid; }
.reporte-grupo td { font-weight: 700; padding-top: 6px; border-bottom: 1px solid #999; }
.reporte-grupo.nivel-2 td { padding-left: 16px; font-weight: 600; border-bottom: 1px dotted #999; }
.reporte-subtotal td { font-weight: 700; border-top: 1px solid #999; }
.reporte-subtotal.nivel-2 td { font-weight: 600; border-top: 1px dotted #999; }
.reporte-total td { font-weight: 700; border-top: 2px solid #000; }
@media print {
    @page {
        margin: 12mm;
        @top-right { content: "Página " counter(page) " de " counter(pages); font: 11px Arial, sans-serif; }
    }
    /* La primera hoja ya lo dice en la cabecera del reporte */
    @page :first { @top-right { content: none; } }
    /* El gris de fondo de la aplicación salía debajo de la hoja si se imprimen los gráficos de fondo */
    html, body { background: #FFF !important; }
    .barra-menu, .barra-herramientas, .barra-estado, .menu-cerrar, .no-imprimir { display: none !important; }
    .principal { display: block; height: auto; }
    .area-trabajo { overflow: visible; padding: 0; }
    .pagina-documento { padding: 0; max-width: none; }
    .hoja-reporte, .hoja-reporte.horizontal { width: auto; margin: 0; border: 0; box-shadow: none; padding: 0; }
    .reporte-tabla th { background: none; }
}
.pagina-documento .filtros-documento .filtro-fechas { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagina-documento .filtros-documento .filtro-fechas select, .pagina-documento .filtros-documento .filtro-fechas input { width: auto; }
.seleccion-multiple { margin-top: 6px; font-size: 13px; }
.seleccion-multiple summary { cursor: pointer; }
.seleccion-multiple-panel { border: 1px solid #D5D5D5; padding: 6px; margin-top: 4px; max-width: 620px; }
.seleccion-multiple-barra { display: flex; gap: 6px; margin-bottom: 4px; }
.seleccion-multiple-barra input { flex: 1; min-width: 0; }
.seleccion-multiple .vale-detalle { max-height: 220px; display: flex; flex-direction: column; padding: 2px 4px; }
.seleccion-beneficiarios { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; }
.seleccion-beneficiarios .chip { background: #EEF5EE; border: 1px solid #C9DCC9; border-radius: 10px; padding: 1px 4px 1px 8px; }
.reporte-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 3px 16px; margin: 8px 0 10px; }
.reporte-campos span { color: #444; }
.reporte-campos.fijas { gap: 3px 12px; }
.reporte-campos.fijas > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reporte-campos.fijas span { display: inline-block; min-width: 96px; }
.reporte-recuadros { display: flex; gap: 10px; margin: 0 0 10px; }
.reporte-recuadro { flex: 1; border: 1px solid #000; padding: 0 6px 4px; }
.reporte-recuadro > div { padding: 2px 0; }
.reporte-recuadro span { display: inline-block; min-width: 82px; color: #444; }
.reporte-recuadro-titulo { margin: 0 -6px 4px; padding: 2px 6px; border-bottom: 1px solid #000; text-align: center; font-weight: 700; }
.reporte-anexo { font-size: 13px; margin: 12px 0 4px; }
.reporte-nota { margin: 8px 0 0; }
.reporte-firmas { display: flex; justify-content: space-around; gap: 24px; margin-top: 56px; }
.reporte-firmas div { flex: 1; max-width: 220px; border-top: 1px solid #000; text-align: center; padding-top: 4px; }
.hoja-reporte.ticket { width: 80mm; padding: 8px; font-size: 11px; }
.hoja-reporte.ticket .reporte-cabecera { display: block; text-align: center; }
.hoja-reporte.ticket .reporte-campos { grid-template-columns: 1fr; }
.hoja-reporte.ticket .reporte-tabla th, .hoja-reporte.ticket .reporte-tabla td { padding: 1px 2px; }
/* RptOrdenVentaTicket: empresa centrada; cuerpo con letra monoespaciada y líneas de guiones como en la ticketera */
.ticket-venta { color: #000; }
.ticket-empresa { text-align: center; line-height: 1.3; font-family: Consolas, "Courier New", monospace; font-weight: 700; }
.ticket-logo { display: block; max-width: 45mm; max-height: 28mm; margin: 0 auto 4px; }
.ticket-slogan, .ticket-razon { font-size: 12px; }
.ticket-cuerpo { margin-top: 8px; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.35; }
.ticket-titulo { font-weight: 700; border-top: 1px solid #000; padding-top: 4px; font-size: 13px; }
.ticket-productos { width: 100%; border-collapse: collapse; margin: 4px 0 0; font-size: 11.5px; }
.ticket-productos th { font-weight: 400; text-align: left; border-top: 1px dashed #000; border-bottom: 1px dashed #000; padding: 1px 2px; }
.ticket-productos td { padding: 1px 2px; }
.ticket-productos .numero { text-align: right; }
.ticket-producto td { padding-top: 3px; }
.ticket-total { display: flex; justify-content: space-between; border-top: 1px dashed #000; border-bottom: 1px solid #000; margin-bottom: 4px; font-weight: 700; padding: 1px 2px 1px 18px; }
.ticket-impreso { display: flex; gap: 18px; }
.ticket-mensaje { margin-top: 4px; font-size: 9.5px; }
.menu-reportes { position: relative; display: inline-block; }
.menu-reportes-fondo { position: fixed; inset: 0; z-index: 49; }
.menu-reportes-lista { position: fixed; top: 0; left: 0; visibility: hidden; z-index: 50; display: flex; flex-direction: column; min-width: 240px; background: var(--ventana, #FFF); border: 1px solid #8A8A8A; box-shadow: 0 4px 12px rgb(0 0 0 / .2); }
.menu-reportes-lista button { text-align: left; background: none; border: 0; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.menu-reportes-lista button:hover:not(:disabled) { background: #E5F1FB; }
.menu-reportes-lista button:disabled { color: #999; cursor: default; }

/* Documento con el botón de consulta RENIEC/SUNAT (PicSunat) */
.campo-consulta { display: flex; gap: 4px; align-items: stretch; }
.campo-consulta input { flex: 1; min-width: 0; }
.campo-consulta .boton { padding: 0 6px; min-width: 0; line-height: 1; }

/* Movimientos de la cuenta (RptDetalleMovimientoCuentas / RptResumenMovimientoCuentas): cuenta y rango debajo del
   título, recuadros de ingresos y salidas con filas alternando gris, su total y el resumen a la derecha */
.hoja-reporte.caja-cuenta .reporte-subtitulo { white-space: pre-line; line-height: 1.4; }
.hoja-reporte.caja-cuenta .reporte-subtitulo::first-line { font-weight: 700; }
.hoja-reporte.caja-cuenta .reporte-bloque { border-bottom: 0; padding: 10px 0 0; }
.hoja-reporte.caja-cuenta .reporte-bloque-encabezado { font-size: 12px; margin: 0 0 3px; }
.hoja-reporte.caja-cuenta .reporte-seccion { margin-top: 0; }
.hoja-reporte.caja-cuenta .reporte-seccion .reporte-tabla th { font-weight: 400; padding: 1px 3px; }
.hoja-reporte.caja-cuenta tr.sombra td { background: #E4E4E4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hoja-reporte.caja-cuenta .reporte-bloque-total { font-weight: 400; align-items: baseline; }
.hoja-reporte.caja-cuenta .reporte-bloque-total b { border-bottom: 0; font-size: 13px; min-width: 90px; }
.hoja-reporte.caja-cuenta .reporte-seccion.resumen-caja { border: 0; width: 250px; margin: 8px 0 0 auto; }
/* RptPesada (Recepción de arroz cáscara): datos en tres columnas (la primera más ancha), cuadro de secuencias angosto
   y centrado, y la liquidación en cuatro columnas sin encabezado; firma "Conforme" a la derecha */
.hoja-reporte.recepcion .reporte-campos.fijas { grid-template-columns: 2.7fr 1.1fr 1.3fr !important; margin-bottom: 6px; }
.hoja-reporte.recepcion .reporte-campos.fijas span { min-width: 82px; }
.hoja-reporte.recepcion .reporte-campos.fijas > div:nth-child(3n+1) { overflow: visible; }   /* nombres largos sobre la columna del medio (vacía) */
.hoja-reporte.recepcion .reporte-campos.fijas > div:nth-child(3n+2) span { min-width: 72px; }
.hoja-reporte.recepcion > table.reporte-tabla:first-of-type { width: 290px; margin: 4px auto 8px; border: 1px solid #444; }
.hoja-reporte.recepcion > table.reporte-tabla:first-of-type th { background: none; text-align: center; }
.hoja-reporte.recepcion h3.reporte-anexo { display: none; }
.hoja-reporte.recepcion h3.reporte-anexo + .reporte-tabla { margin-top: 10px; }
.hoja-reporte.recepcion h3.reporte-anexo + .reporte-tabla thead { display: none; }
.hoja-reporte.recepcion h3.reporte-anexo + .reporte-tabla td { border: 0; padding: 1px 4px; background: none; }
.hoja-reporte.recepcion h3.reporte-anexo + .reporte-tabla td.numero { padding-right: 14px; }
.hoja-reporte.recepcion tr.destacado td:is(:nth-child(2), :nth-child(4)) { font-weight: 700; }
.hoja-reporte.recepcion .reporte-firmas { justify-content: flex-end; margin-top: 24px; }
/* RptSecado: datos en dos columnas, pesadas en un recuadro centrado y debajo los totales por tipo, alineados con él */
.hoja-reporte.secado-doc .reporte-campos.fijas span { min-width: 165px; }
.hoja-reporte.secado-doc .reporte-campos.fijas > div:first-child span { min-width: 80px; }
.hoja-reporte.secado-doc .reporte-campos.fijas > div:first-child { overflow: visible; }
.hoja-reporte.secado-doc > table.reporte-tabla:first-of-type { width: 540px; margin: 8px auto 2px; border: 1px solid #444; }
.hoja-reporte.secado-doc > table.reporte-tabla:first-of-type th { background: none; text-align: center; font-weight: 700; }
.hoja-reporte.secado-doc h3.reporte-anexo { display: none; }
.hoja-reporte.secado-doc h3.reporte-anexo + .reporte-tabla { width: 540px; margin: 0 auto; }
.hoja-reporte.secado-doc h3.reporte-anexo + .reporte-tabla thead tr { visibility: collapse; }   /* oculto, pero da los anchos */
.hoja-reporte.secado-doc h3.reporte-anexo + .reporte-tabla td { border: 0; padding: 1px 4px; background: none; }
.hoja-reporte.secado-doc h3.reporte-anexo + .reporte-tabla td:nth-child(2)::after { content: ":"; float: right; padding-right: 8px; }
.hoja-reporte.secado-doc tr.destacado td { font-weight: 700; }
.hoja-reporte.secado-doc .reporte-firmas { justify-content: flex-end; margin-top: 24px; }
.hoja-reporte.secado-doc .reporte-tabla { table-layout: fixed; }   /* anchos de diseño: los totales quedan debajo de sus columnas */
/* RptMaquilaMolino: el mismo formato, más ancho (con el beneficiario de cada pesada); después de los totales el almacén
   y vale de la producción (etiquetas en negrita) y la producción obtenida con su encabezado en un recuadro */
.hoja-reporte.secado-doc.maquila > table.reporte-tabla:first-of-type, .hoja-reporte.secado-doc.maquila h3.reporte-anexo + .reporte-tabla { width: 730px; }
.hoja-reporte.secado-doc.maquila .reporte-campos.fijas span { min-width: 90px; }
.hoja-reporte.secado-doc.maquila table.reporte-tabla:nth-of-type(3) { margin-top: 10px; border-top: 1px dashed #777; }
.hoja-reporte.secado-doc.maquila table.reporte-tabla:nth-of-type(3) td:nth-child(2) { font-weight: 700; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) { display: block; font-size: 12px; font-weight: 700; text-align: left; margin: 6px auto 2px; width: 690px; border: 0; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) + .reporte-tabla { width: 650px; border: 1px solid #444; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) + .reporte-tabla thead tr { visibility: visible; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) + .reporte-tabla th { background: none; font-weight: 700; text-align: center; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) + .reporte-tabla td:nth-child(2)::after { content: none; }
.hoja-reporte.secado-doc.maquila h3.reporte-anexo:not(:empty) + .reporte-tabla td:nth-child(n+5) { text-align: center; }
/* RptRetiroTerceroProductos: recuadro de productos centrado, sin totales */
.hoja-reporte.secado-doc.retiro-tercero > table.reporte-tabla:first-of-type { width: 620px; }
.hoja-reporte.secado-doc.retiro-tercero .reporte-campos.fijas span { min-width: 90px; }
.hoja-reporte.secado-doc.retiro-tercero .reporte-firmas { justify-content: flex-end; gap: 40px; }
/* RptRetiroSecado: el mismo formato con el recuadro más ancho (columna del secado) y las firmas del molino y del beneficiario */
.hoja-reporte.secado-doc.retiro > table.reporte-tabla:first-of-type, .hoja-reporte.secado-doc.retiro h3.reporte-anexo + .reporte-tabla { width: 620px; }
.hoja-reporte.secado-doc.retiro .reporte-campos.fijas span { min-width: 80px; }
.hoja-reporte.secado-doc.retiro .reporte-firmas { justify-content: space-around; }
/* Reportes de pesadas (RptRegistroPesadas, RptExistenciaPesada...): sin recuadro, encabezados en negrita entre rayas;
   "cuadricula" con recuadro y líneas en el encabezado (de dos niveles en la existencia de cáscara) */
.hoja-reporte.pesadas .reporte-subtitulo::first-line { font-weight: 400; }
.hoja-reporte.pesadas .reporte-bloque { padding-top: 4px; }
.hoja-reporte.pesadas .reporte-bloque-encabezado { font-size: 13px; margin-top: 4px; }
.hoja-reporte.pesadas .reporte-seccion { border: 0; }
.hoja-reporte.pesadas .reporte-seccion .reporte-tabla th { font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.hoja-reporte.pesadas .reporte-seccion.cuadricula:not(.totales) { border: 1px solid #444; }
.hoja-reporte.pesadas .reporte-seccion.cuadricula .reporte-tabla th { border: 1px solid #444; vertical-align: middle; text-align: center; font-size: 7px; overflow-wrap: normal; }
.hoja-reporte.pesadas .reporte-seccion.totales .reporte-total td:not(.numero) { font-weight: 700; white-space: nowrap; }
.hoja-reporte.pesadas .reporte-seccion.totales.cuadricula .reporte-total td.numero { font-weight: 400; }
/* RptListaSecado / RptListaRetiroSecado: cada registro con número, fecha y beneficiario en una línea, sus pesadas con
   sangría (en recuadro los secados) y una raya punteada entre secados */
.hoja-reporte:is(.secados, .retiros-secado) .reporte-bloque-campos { grid-template-columns: 170px 170px 1fr; margin: 0 0 3px; }
.hoja-reporte:is(.secados, .retiros-secado) .reporte-bloque-campos span { min-width: 0; margin-right: 6px; }
.hoja-reporte:is(.secados, .retiros-secado) .reporte-seccion { margin: 0 0 0 30px; }
.hoja-reporte.secados .reporte-bloque-campos > div:first-child span { font-weight: 700; }
.hoja-reporte.secados .reporte-bloque:not(:last-child) { border-bottom: 1px dashed #777; padding-bottom: 4px; }
.hoja-reporte.secados .reporte-seccion.recuadro:not(.totales) { border: 1px solid #444; }
.hoja-reporte.secados .reporte-seccion.recuadro:not(.totales) .reporte-tabla th { border-top: 0; font-weight: 400; }
.hoja-reporte.retiros-secado .reporte-subtitulo::first-line { font-weight: 700; }
.hoja-reporte.retiros-secado .reporte-bloque-campos > div:first-child { font-weight: 700; }
.hoja-reporte.retiros-secado .reporte-bloque-campos > div:first-child span { font-weight: 400; }
.hoja-reporte.retiros-secado .reporte-seccion .reporte-tabla th { font-weight: 400; }
.hoja-reporte.retiros-secado .reporte-seccion.totales.sin-raya .reporte-total td:not(.numero) { font-weight: 400; }
.hoja-reporte.retiros-secado .reporte-seccion.totales .reporte-total td[colspan] { text-align: right; padding-right: 24px; }
.hoja-reporte.retiros-secado .reporte-seccion.totales.general .reporte-total td.numero:not(:empty) { border-top: 1px solid #000; }
/* RptListaMaquila: como la lista de secados (recuadro por maquila) con número, fecha y estado; sin raya entre maquilas */
.hoja-reporte.maquilas .reporte-subtitulo::first-line { font-weight: 700; }
.hoja-reporte.maquilas .reporte-bloque-campos { grid-template-columns: 280px 220px 1fr; }
.hoja-reporte.maquilas .reporte-bloque-campos > div:first-child { font-weight: 700; }
.hoja-reporte.maquilas .reporte-bloque-campos > div:first-child span { font-weight: 400; }
.hoja-reporte.maquilas .reporte-bloque:not(:last-child) { border-bottom: 0; }
.hoja-reporte.maquilas .reporte-seccion.totales.sin-raya .reporte-total td:not(.numero) { font-weight: 400; }
.hoja-reporte.maquilas .reporte-seccion.totales .reporte-total td[colspan] { text-align: right; padding-right: 24px; }
.hoja-reporte.maquilas .reporte-seccion.totales.general .reporte-total td.numero:not(:empty) { border-top: 1px solid #000; }
/* RptProduccionObtenidaxMaquila / RptProduccionObtenida / RptProduccionMaquilaDetallada*: productos en recuadro con
   sangría, encabezados en negrita y raya punteada entre maquilas */
.hoja-reporte:is(.produccion-maquila, .resumen-produccion, .produccion-detallada) .reporte-seccion.recuadro { border: 1px solid #444; }
.hoja-reporte:is(.produccion-maquila, .resumen-produccion, .produccion-detallada) .reporte-seccion.recuadro .reporte-tabla th { border-top: 0; }
.hoja-reporte:is(.produccion-maquila, .produccion-detallada) .reporte-bloque:not(:last-child) { border-bottom: 1px dashed #777; padding-bottom: 6px; }
.hoja-reporte.produccion-maquila .reporte-bloque-campos { grid-template-columns: 1.7fr 0.9fr 1fr; }
.hoja-reporte.produccion-maquila .reporte-bloque-campos span { min-width: 0; margin-right: 6px; }
.hoja-reporte.produccion-maquila .reporte-bloque-campos > div:nth-child(4) { overflow: visible; }   /* beneficiario sobre la columna vacía */
.hoja-reporte.produccion-maquila .reporte-bloque-campos > div:nth-child(5) { visibility: hidden; }
.hoja-reporte.produccion-maquila .reporte-bloque-campos > div:first-child { font-weight: 700; }
.hoja-reporte.produccion-maquila .reporte-bloque-campos > div:first-child span { font-weight: 400; }
.hoja-reporte.produccion-maquila .reporte-seccion.recuadro { margin: 2px 70px 0 70px; }
.hoja-reporte.resumen-produccion .reporte-seccion.recuadro { margin: 4px 30px 0; }
.hoja-reporte.resumen-produccion .reporte-seccion.recuadro .reporte-total td { border-top: 1px solid #444; font-weight: 700; }
.hoja-reporte.resumen-produccion .reporte-seccion.recuadro .reporte-total td.numero { font-weight: 400; }
.hoja-reporte.produccion-detallada .reporte-bloque-encabezado { white-space: pre; font-size: 11px; }
.hoja-reporte.produccion-detallada .reporte-seccion.subtitulo { margin: 4px 0 0 20px; }
.hoja-reporte.produccion-detallada .reporte-seccion.subtitulo .reporte-seccion-titulo { font-size: 10px; }
.hoja-reporte.produccion-detallada .reporte-seccion.recuadro { margin: 2px 30px 0 70px; }
.reporte-seccion.resumen-caja .reporte-seccion-titulo { font-weight: 700; font-size: 12px; padding: 0 0 6px; }
.reporte-seccion.resumen-caja .reporte-seccion-titulo { text-decoration: underline; text-underline-offset: 5px; }
.reporte-seccion.resumen-caja thead tr { visibility: collapse; }
.reporte-seccion.resumen-caja .reporte-tabla td { padding: 2px 4px; font-size: 12px; }
.reporte-seccion.resumen-caja tr.egresos td.numero { color: #C00; }
.reporte-seccion.resumen-caja tr.nuevo td { padding-top: 10px; }
.reporte-seccion.resumen-caja tr.nuevo td.numero { border-top: 1px solid #000; border-bottom: 3px double #000; }
/* Caja ingresos y egresos (RptCajaIngresosEgresos): encabezado de cada recuadro en negrita, total en negrita y
   resumen centrado con raya simple sobre el saldo final */
.hoja-reporte.ingresos-egresos .reporte-bloque-encabezado { font-weight: 700; font-size: 13px; }
.hoja-reporte.ingresos-egresos .reporte-bloque-total span { margin-right: 60px; }
.hoja-reporte.ingresos-egresos .reporte-bloque-total b { font-weight: 700; }
.hoja-reporte:is(.ingresos-egresos, .centro-costo) .reporte-seccion.resumen-caja { width: 300px; margin: 8px auto 0; }
.hoja-reporte:is(.ingresos-egresos, .centro-costo) .reporte-seccion.resumen-caja .reporte-seccion-titulo { text-align: center; font-size: 13px; }
.hoja-reporte:is(.ingresos-egresos, .centro-costo) .reporte-seccion.resumen-caja tr.nuevo td { padding-top: 4px; }
.hoja-reporte:is(.ingresos-egresos, .centro-costo) .reporte-seccion.resumen-caja tr.nuevo td.numero { border-bottom: 0; }
/* Resumen por centro de costo (RptResumenCentroCosto): INGRESOS / EGRESOS, centralización y centro de costo en
   negrita con sangría creciente y su total a la derecha; el recuadro de cuentas con sangría y margen derecho */
.hoja-reporte.centro-costo .reporte-bloque { padding: 2px 0 0; }
.hoja-reporte.centro-costo .reporte-bloque-encabezado { font-weight: 700; font-size: 11px; margin: 0 0 2px; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-1 { padding-top: 12px; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-1 .reporte-bloque-encabezado { font-size: 13px; padding-left: 0; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-2 .reporte-bloque-encabezado { padding-left: 22px; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-3 { padding-top: 6px; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-3 .reporte-bloque-encabezado { padding-left: 44px; }
.hoja-reporte.centro-costo .reporte-bloque.nivel-3 .reporte-seccion { margin: 0 90px 4px 76px; }
/* Resumen por plan de cuentas (RptResumenPlanCuenta): el recuadro de cuentas con sangría a ambos lados */
.hoja-reporte.plan-cuentas .reporte-bloque-encabezado { padding-right: 90px; }
.hoja-reporte.plan-cuentas .reporte-seccion:not(.resumen-caja) { margin: 0 90px 6px 90px; }

/* Reparto (RptHojaRutaReparto, RptLiquidacionReparto, RptComisionReparto, RptPendientesReparto y resúmenes): número y
   estado bajo el título con raya, datos en dos columnas, las ventas en recuadros, el resumen de la liquidación a la
   derecha y los agrupados por repartidor / zona en un recuadro con la cabecera repetida en cada grupo */
.hoja-reporte.reparto .reporte-subtitulo { white-space: pre; border-bottom: 1px solid #000; padding-bottom: 2px; margin-bottom: 6px; }
.hoja-reporte.reparto .reporte-campos.fijas { grid-template-columns: 1.6fr 1fr; gap: 2px 12px; margin: 4px 0 6px; }
.hoja-reporte.reparto .reporte-campos.fijas span { min-width: 124px; color: #000; }
.hoja-reporte.reparto .reporte-campos b { font-weight: 400; }
.hoja-reporte.reparto .reporte-tabla { table-layout: fixed; }
.hoja-reporte.reparto > .reporte-tabla { border: 1px solid #000; }
.hoja-reporte.reparto .reporte-tabla th { background: none; text-align: center; border-top: 0; }
.hoja-reporte.reparto .reporte-tabla td { padding: 1px 4px; }
.hoja-reporte.reparto .reporte-total td { border-top: 1px solid #000; }
.hoja-reporte.reparto :is(.reporte-total, .reporte-subtotal) td[colspan] { text-align: right; padding-right: 12px; }
.hoja-reporte.reparto.resumen:not(.liquidacion, .pendientes-resumen) > .reporte-tabla { width: 660px; margin: 6px auto 0; }
.hoja-reporte.reparto.pendientes-resumen > .reporte-tabla { font-size: 11px; }
.hoja-reporte.reparto .reporte-firmas { margin-top: 70px; }
/* Hoja de ruta: cada venta en su recuadro; el total a cobrar con doble raya */
.hoja-reporte.reparto.hoja-ruta .reporte-bloque { border: 1px solid #000; padding: 2px 0 0; margin-top: 6px; }
.hoja-reporte.reparto.hoja-ruta .reporte-bloque-encabezado { font-size: 12px; margin: 0 4px 1px; }
.hoja-reporte.reparto.hoja-ruta .reporte-bloque-campos { grid-template-columns: 205px 150px 1fr; margin: 0 4px 2px; }
.hoja-reporte.reparto.hoja-ruta .reporte-bloque-campos span { min-width: 64px; }
.hoja-reporte.reparto.hoja-ruta .reporte-bloque-campos > div:first-child { overflow: visible; }
.hoja-reporte.reparto.hoja-ruta .reporte-seccion { border: 0; border-top: 1px solid #000; margin-top: 2px; }
.hoja-reporte.reparto.hoja-ruta .reporte-seccion th { border-bottom: 1px solid #000; font-weight: 400; }
.hoja-reporte.reparto.hoja-ruta > .reporte-bloque-total { justify-content: space-between; padding: 0 10px 0 120px; margin-top: 6px; }
.hoja-reporte.reparto.hoja-ruta > .reporte-bloque-total span { border-bottom: 3px double #000; }
/* Liquidación: nota y pesos a la izquierda, recuadro del resumen a la derecha */
.hoja-reporte.reparto .reporte-bloque.resumen-liquidacion { display: grid; grid-template-columns: 1fr 285px; column-gap: 24px; border: 0; padding-top: 10px; }
.hoja-reporte.reparto .resumen-liquidacion .reporte-bloque-encabezado { grid-column: 1; grid-row: 1; justify-content: center; font-style: italic; font-size: 12px; }
.hoja-reporte.reparto .resumen-liquidacion .reporte-bloque-campos { grid-column: 1; grid-row: 2; grid-template-columns: 180px 1fr; align-self: start; margin-left: 28px; }
.hoja-reporte.reparto .resumen-liquidacion .reporte-bloque-campos span { min-width: 76px; }
.hoja-reporte.reparto .resumen-liquidacion .reporte-seccion { grid-column: 2; grid-row: 1 / span 3; margin: 0; border: 1px solid #000; }
.hoja-reporte.reparto .resumen-reparto th { padding: 3px 4px; }
.hoja-reporte.reparto .resumen-reparto th span, .hoja-reporte.reparto .resumen-reparto th { background: #808080; color: #000; font-weight: 700; border: 2px solid #FFF; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hoja-reporte.reparto .resumen-reparto tr.destacado td { font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.hoja-reporte.reparto .resumen-reparto tr.separador td { border-top: 1px solid #000; }
.hoja-reporte.reparto .resumen-reparto tr.negrita td { font-weight: 700; }
.hoja-reporte.reparto.liquidacion:not(.resumen) > .reporte-tabla td:nth-child(2) { white-space: normal; }
/* Comisiones y pendientes: un recuadro continuo, el grupo en negrita sin raya y la cabecera repetida en cada grupo */
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-bloque { border: 0; padding: 0; }
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-seccion { margin: 0; border: 1px solid #000; }
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-bloque + .reporte-bloque .reporte-seccion { border-top: 0; }
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-seccion th { border-top: 1px solid #000; border-bottom: 1px solid #000; }
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-bloque:first-child .reporte-seccion th { border-top: 0; }
.hoja-reporte.reparto:is(.comisiones, .pendientes) .reporte-grupo td { border-bottom: 0; padding-top: 3px; }
.hoja-reporte.reparto .reporte-grupo.nivel-2 td { padding-left: 16px; font-weight: 700; }
.hoja-reporte.reparto .reporte-subtotal td { border-top: 1px solid #000; }
.hoja-reporte.reparto .reporte-subtotal td[colspan] { font-weight: 400; }
.hoja-reporte.reparto.pendientes .reporte-tabla td:not([colspan]):nth-child(-n+8) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoja-reporte.reparto:is(.pendientes, .pendientes-resumen) .reporte-tabla tr:not(.reporte-grupo) > :last-child { border-left: 1px dashed #000; }
.hoja-reporte.reparto.pendientes-resumen .reporte-pie { border-top: 0; gap: 4px 160px; padding-left: 60px; }
.hoja-reporte.reparto.pendientes-resumen .reporte-pie span { color: #000; font-weight: 700; margin-right: 20px; }
.hoja-reporte.reparto.pendientes-resumen .reporte-pie b { font-weight: 400; }

/* Registros de compras y ventas (RptRegistroCompras*, RptRegistroVentas*, RptComisionVentasPT*): recuadro negro con
   encabezado en negrita, filas alternando gris, totales en letra normal (el general en negrita con doble raya) */
.hoja-reporte.comercial .reporte-bloque.simple .reporte-bloque-encabezado { font-size: 12px; }
.hoja-reporte.comercial .reporte-bloque.simple.negrita .reporte-bloque-encabezado { font-weight: 700; }
.hoja-reporte.comercial .reporte-seccion:not(.totales, .sin-recuadro, .resumen, .nota-bloque, .detalle) { border-color: #000; }
.hoja-reporte.comercial .reporte-seccion.detalle .reporte-tabla { border-color: #000; }
.hoja-reporte.comercial .reporte-seccion .reporte-tabla th { font-weight: 700; border-bottom: 1px solid #000; }
.hoja-reporte.comercial .reporte-seccion:not(.totales, .sin-recuadro, .resumen) tbody tr:nth-child(odd):not(.reporte-total) td {
    background: #DDD; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.hoja-reporte.comercial .reporte-seccion.totales .reporte-total td { font-weight: 400; padding-top: 6px; }
.hoja-reporte.comercial .reporte-seccion.totales.estado { border-bottom: 1px solid #000; margin-bottom: 4px; }
.hoja-reporte.comercial .reporte-seccion.totales.estado .reporte-total td { font-weight: 700; }
.hoja-reporte.comercial .reporte-seccion.totales.estado .reporte-total td.numero { font-weight: 400; border-top: 0; }
.hoja-reporte.comercial .reporte-bloque:last-child .reporte-seccion.totales.general .reporte-total td:not(.numero) { font-weight: 700; }

/* Inventarios (RptInventario*, RptListaPrecios, RptEmbarques*, RptKardex...): encabezado de columnas en negrita entre
   rayas, filas alternando gris, Línea / SubLínea con su etiqueta en negrita, total de sublínea entre rayas, de línea con
   raya gruesa y total general con doble raya; recuadros negros */
.hoja-reporte.inventario .reporte-tabla th { background: none; font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.hoja-reporte.inventario .reporte-seccion .reporte-tabla th { border-top: 0; }
.hoja-reporte.inventario .reporte-seccion:not(.totales) { border-color: #000; }
.hoja-reporte.inventario tr.fila-gris td { background: #DDD; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hoja-reporte.inventario .reporte-grupo td { font-weight: 400; border: 0; padding: 5px 0 2px; }
.hoja-reporte.inventario .reporte-grupo td::before { font-weight: 700; display: inline-block; }
.hoja-reporte.inventario .reporte-grupo.nivel-1 td::before { content: "Línea"; width: 74px; }
.hoja-reporte.inventario .reporte-grupo.nivel-2 td { padding-left: 70px; }
.hoja-reporte.inventario .reporte-grupo.nivel-2 td::before { content: "SubLínea"; width: 96px; }
.hoja-reporte.inventario :is(.reporte-subtotal, .reporte-total) td { font-weight: 400; border-top: 0; padding-top: 6px; }
.hoja-reporte.inventario :is(.reporte-subtotal, .reporte-total) td[colspan] { text-align: right; padding-right: 24px; }
.hoja-reporte.inventario .reporte-subtotal.nivel-2 td { border-top: 1px solid #000; border-bottom: 1px solid #000; }
.hoja-reporte.inventario .reporte-subtotal.nivel-1 td { padding-top: 10px; }
.hoja-reporte.inventario .reporte-subtotal.nivel-1 td.numero:not(:empty) { border-bottom: 2px solid #000; }
.hoja-reporte.inventario .reporte-total td[colspan] { font-weight: 700; }
.hoja-reporte.inventario .reporte-total td.numero:not(:empty) { border-bottom: 3px double #000; }
.hoja-reporte.inventario .reporte-bloque.simple .reporte-bloque-encabezado { font-size: 12px; font-weight: 400; justify-content: flex-start; }
.hoja-reporte.inventario .reporte-bloque:is(.inv-linea, .inv-sublinea, .inv-producto, .inv-linea-mayus, .inv-estado) .reporte-bloque-encabezado span::before {
    font-weight: 700; display: inline-block;
}
.hoja-reporte.inventario .inv-linea .reporte-bloque-encabezado span::before { content: "Línea"; width: 74px; }
.hoja-reporte.inventario .inv-sublinea .reporte-bloque-encabezado { padding-left: 74px; }
.hoja-reporte.inventario .inv-sublinea .reporte-bloque-encabezado span::before { content: "SubLínea"; width: 104px; }
.hoja-reporte.inventario .inv-producto .reporte-bloque-encabezado { padding-left: 130px; }
.hoja-reporte.inventario .inv-producto .reporte-bloque-encabezado span::before { content: "Producto"; width: 80px; }
.hoja-reporte.inventario .reporte-bloque.inv-producto .reporte-seccion { margin: 2px 60px 0 210px; }
.hoja-reporte.inventario .inv-linea-mayus .reporte-bloque-encabezado { padding-left: 36px; }
.hoja-reporte.inventario .inv-linea-mayus .reporte-bloque-encabezado span::before { content: "LÍNEA"; width: 80px; }
.hoja-reporte.inventario .reporte-bloque.inv-linea-mayus .reporte-seccion { margin: 4px 30px 0 70px; }
.hoja-reporte.inventario .inv-estado .reporte-bloque-encabezado { padding-left: 30px; }
.hoja-reporte.inventario .inv-estado .reporte-bloque-encabezado span { font-weight: 700; text-decoration: underline; }
.hoja-reporte.inventario .inv-estado .reporte-bloque-encabezado span::before { content: "Estado Visita   :   "; font-weight: 400; white-space: pre; width: 130px; text-decoration: none; }
.hoja-reporte.inventario .reporte-bloque.inv-estado .reporte-seccion, .hoja-reporte.inventario .reporte-bloque.inv-kardex .reporte-seccion,
.hoja-reporte.inventario .reporte-bloque.inv-resumen .reporte-seccion { margin-left: 0; }
.hoja-reporte.inventario .reporte-bloque.inv-resumen .reporte-seccion { margin: 6px 90px 0; }
.hoja-reporte.inventario .inv-kardex .reporte-bloque-encabezado { font-weight: 700 !important; }
.hoja-reporte.inventario .reporte-bloque.inv-ficha { padding-top: 8px; }
.hoja-reporte.inventario .inv-ficha .reporte-bloque-campos { grid-template-columns: 1.6fr 1fr 1fr; }
.hoja-reporte.inventario .inv-ficha .reporte-bloque-campos span { font-weight: 700; min-width: 64px; }
.hoja-reporte.inventario .reporte-bloque.inv-ficha .reporte-seccion { margin: 4px 100px 0 120px; }
.hoja-reporte.inventario .reporte-bloque.inv-embarque { border-top: 1px dashed #777; border-bottom: 0; padding: 8px 8px 6px; }
.hoja-reporte.inventario .inv-embarque .reporte-bloque-campos { grid-template-columns: 1.2fr 1.2fr 0.9fr; }
.hoja-reporte.inventario .inv-embarque .reporte-bloque-campos span { min-width: 84px; }
.hoja-reporte.inventario .inv-embarque .reporte-bloque-campos > div:first-child { font-weight: 700; }
.hoja-reporte.inventario .reporte-bloque.inv-embarque .reporte-seccion { margin: 4px 10px 0 24px; }
.hoja-reporte.inventario .reporte-bloque.inv-embarque .reporte-seccion.totales { border: 0; }
.hoja-reporte.inventario .reporte-seccion.totales thead tr { visibility: collapse; }
.hoja-reporte.inventario .reporte-seccion.totales .reporte-total td { font-weight: 700; }
.hoja-reporte.inventario .reporte-seccion.totales .reporte-total td.numero { font-weight: 400; border-bottom: 0; }
.hoja-reporte.embarques .reporte-subtitulo { font-weight: 700; }

/* Balances (RptBalanceNormal): título y subtítulo centrados en negrita sin recuadro; cuadro con líneas verticales,
   cabecera INGRESOS / SALIDAS sobre dos columnas, conceptos con sangría y alternando gris; totales y saldo con raya */
.hoja-reporte.balance .reporte-titulo { border: 0; margin: 2px 0 0; padding: 0; font-size: 13px; }
.hoja-reporte.balance .reporte-titulo span { text-decoration: none; }
.hoja-reporte.balance .reporte-subtitulo { white-space: pre-line; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.hoja-reporte.balance .reporte-tabla thead tr { visibility: collapse; }
.hoja-reporte.balance .reporte-tabla td { padding: 1px 6px; }
.hoja-reporte.balance .reporte-tabla tr:not(.bal-saldo) td { border-left: 1px solid #000; }
.hoja-reporte.balance .reporte-tabla tr:not(.bal-saldo) td:last-child { border-right: 1px solid #000; }
.hoja-reporte.balance tr.bal-periodo td { text-align: center; font-weight: 700; font-size: 13px; border-top: 1px solid #000; }
.hoja-reporte.balance tr.bal-cabecera td { text-align: center; font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; padding-top: 2px; }
.hoja-reporte.balance tr.bal-origen td { font-weight: 700; padding-top: 6px; }
.hoja-reporte.balance tr.bal-concepto td:first-child { padding-left: 24px; }
.hoja-reporte.balance tr.bal-concepto.sombra td { background: #E4E4E4; }
.hoja-reporte.balance tr.bal-total-periodo td { border-top: 1px solid #000; padding-top: 4px; }
.hoja-reporte.balance tr.bal-total-periodo td:first-child { text-align: right; }
.hoja-reporte.balance tr.bal-totales td { font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 10px 6px 4px; }
.hoja-reporte.balance tr.bal-totales td:first-child { text-align: center; }
/* raya debajo de los importes de los totales (casi todo el ancho de la celda); doble en los totales con periodos y el saldo */
.hoja-reporte.balance tr.bal-total-periodo td.numero:not(:empty),
.hoja-reporte.balance tr.bal-totales td.numero:not(:empty) { font-weight: 700; background: linear-gradient(#000, #000) no-repeat center bottom 1px / calc(100% - 12px) 1px; padding-bottom: 4px; }
.hoja-reporte.balance tr.bal-totales.doble td.numero:not(:empty),
.hoja-reporte.balance tr.bal-saldo td:last-child { background: linear-gradient(#000, #000) no-repeat center bottom 3px / calc(100% - 12px) 1px,
                                                                linear-gradient(#000, #000) no-repeat center bottom 0 / calc(100% - 12px) 1px; padding-bottom: 6px; }
.hoja-reporte.balance tr.bal-saldo td { font-weight: 700; padding-top: 10px; }
.hoja-reporte.balance tr.bal-saldo td:nth-child(2) { text-align: center; white-space: pre; }

/* Asignar sueldos del mes: aviso con icono y el periodo en un recuadro, etiquetas sobre los campos */
.asignar-info { display: flex; gap: 10px; align-items: center; background: #EEF6EE; border-left: 4px solid var(--principal); border-radius: 4px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px; }
.asignar-info-icono { font-size: 22px; line-height: 1; }
.asignar-periodo { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; border: 1px solid var(--borde); border-radius: 4px; padding: 6px 12px 12px; margin: 0 0 4px; }
.asignar-periodo legend { padding: 0 6px; font-weight: 600; color: var(--principal); }
.asignar-periodo label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; }
.asignar-periodo input, .asignar-periodo select { width: 100%; height: 30px; box-sizing: border-box; font-weight: normal; font-size: 13px; }
.asignar-info.aviso { background: #FFF6E0; border-left-color: #E0A100; }
.asignar-omitidos { max-height: 300px; overflow-y: auto; margin: 0 0 4px; padding: 6px 10px 6px 36px; border: 1px solid var(--borde); border-radius: 4px; font-size: 13px; }
.asignar-omitidos li { padding: 2px 0; }
.asignar-omitidos li:nth-child(even) { background: #F2F2F2; }

/* ?embebido=1 (visor de reportes del escritorio): solo el área de trabajo */
.principal.embebido { grid-template-rows: 1fr; }

/* Formulario de reportes: panel lateral con los reportes del grupo; a la derecha los parámetros y debajo la hoja */
.formulario-reportes {
    display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    height: 100%; min-height: 420px; background: var(--ventana); border: 1px solid var(--borde);
}
.reportes-lateral {
    display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; overflow-y: auto;
    background: var(--secundario); color: var(--secundario-texto);
}
.reportes-lateral img { align-self: center; width: 72px; height: 72px; background: #FFF; clip-path: circle(50%); padding: 9px; object-fit: contain; }
.reportes-lateral-titulo { text-align: center; font-weight: 600; font-size: 15px; margin: 4px 0 12px; }
.reporte-opcion {
    display: flex; gap: 6px; align-items: flex-start; width: 100%; padding: 6px 8px; text-align: left;
    background: transparent; border: 0; border-radius: 4px; color: inherit; cursor: pointer;
}
.reporte-opcion:hover { background: rgba(255, 255, 255, .16); }
.reporte-opcion.activa, .reporte-opcion.activa:hover { background: #FFF; color: var(--secundario); font-weight: 600; }
.reportes-contenido { min-width: 0; overflow: auto; }
.reportes-contenido > .nota { padding: 16px; }
@media (max-width: 760px) {
    .formulario-reportes { grid-template-columns: 1fr; height: auto; }
}
@media print {
    .formulario-reportes { display: block; height: auto; border: 0; }
    .reportes-contenido { overflow: visible; }
}
