/* =========================
   A4 horizontal + densidad
   (Estilo consultador adaptado a tu pantalla)
   ========================= */

/* Aplica a clon PDF (#histPrintRoot) y a preview en pantalla (#screenHistoricos) */
#histPrintRoot .page,
#screenHistoricos .page {
  width: 277mm;
  margin: 0 auto 8mm auto;
  page-break-inside: avoid;
  break-inside: avoid;
}
#histPrintRoot .page + .page,
#screenHistoricos .page + .page {
  page-break-before: always;
  break-before: page;
}

/* Tabla base */
#histPrintRoot .table,
#screenHistoricos .table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background:#fff;
}
#histPrintRoot .table th, #histPrintRoot .table td,
#screenHistoricos .table th, #screenHistoricos .table td {
  border: 1px solid #bdbdbd;
  padding: 4px 6px;
  font-size: 11px;
  vertical-align: middle;
}
#screenHistoricos .table th,
#histPrintRoot .table th {
  background:#e9e9e9;
  font-weight: bold;
  text-align: center;
}

/* Encabezado */
#screenHistoricos .header,
#histPrintRoot .header { margin-bottom: 6px; }

#screenHistoricos .header .title,
#histPrintRoot .header .title {
  font-size: 20px;
  font-weight: bold;
  text-align:center;
  background:#efefef;
}
#screenHistoricos .header .meta th, #histPrintRoot .header .meta th { width: 18%; }
#screenHistoricos .header .meta td, #histPrintRoot .header .meta td { width: 32%; }

#screenHistoricos .logo-cell, #histPrintRoot .logo-cell { width: 26mm; text-align:center; }
#screenHistoricos .logo-cell img, #histPrintRoot .logo-cell img { max-width: 22mm; max-height: 22mm; }

#screenHistoricos .meta2 th, #histPrintRoot .meta2 th { background:#f2f2f2; text-align:left; width: 20%; }
#screenHistoricos .meta2 td, #histPrintRoot .meta2 td { background:#fff; text-align:left; }

/* Cabeceras/filas de la semana */
#screenHistoricos .week thead th, #histPrintRoot .week thead th { font-size: 11px; }
#screenHistoricos .week td,       #histPrintRoot .week td       { font-size: 11px; }

#screenHistoricos .right, #histPrintRoot .right { text-align: right; }
#screenHistoricos .center, #histPrintRoot .center { text-align: center; }

/* Marcadores JS para saltos de página (html2pdf) */
.html2pdf__page-break { page-break-before: always; break-before: page; height: 0; }
@media screen { .html2pdf__page-break { display:none; } }

/* ===== Anchos por columna (≈100%) ===== */
#screenHistoricos .col-dia,   #histPrintRoot .col-dia   { width: 4.5%; }
#screenHistoricos .col-hora,  #histPrintRoot .col-hora  { width: 5.5%; } /* 2x = 11% */
#screenHistoricos .col-horas, #histPrintRoot .col-horas { width: 4.5%; } /* 2x = 9%  */
#screenHistoricos .col-flujo, #histPrintRoot .col-flujo { width: 5.5%; }
#screenHistoricos .col-070,   #histPrintRoot .col-070   { width: 7.5%; }
#screenHistoricos .col-080,   #histPrintRoot .col-080   { width: 5.5%; }
#screenHistoricos .col-tarifa,#histPrintRoot .col-tarifa{ width: 5.5%; } /* 011/012 */
#screenHistoricos .col-041,   #histPrintRoot .col-041   { width: 5.5%; }
#screenHistoricos .col-012,   #histPrintRoot .col-012   { width: 5.5%; }
#screenHistoricos .col-042,   #histPrintRoot .col-042   { width: 5.5%; }
#screenHistoricos .col-001,   #histPrintRoot .col-001   { width: 6.5%; }
#screenHistoricos .col-005,   #histPrintRoot .col-005   { width: 5.5%; }
#screenHistoricos .col-090,   #histPrintRoot .col-090   { width: 4.5%; }
#screenHistoricos .col-gss,   #histPrintRoot .col-gss   { width: 3.5%; }
#screenHistoricos .col-obs,   #histPrintRoot .col-obs   { width: 14.5%; }

/* Preview en pantalla (sombreado, como consultador) */
@media screen {
  #screenHistoricos .page { box-shadow: 0 1px 3px rgba(0,0,0,.15); background:#fff; padding: 4mm; }
}
