/* v19: celdas de valor grises completas, texto negro normal.
   Mantiene la etiqueta verde a la izquierda y evita que el texto quede flotando. */
:root{
  --sp-v19-label:#d6e9e5;
  --sp-v19-value:#e9e9e9;
  --sp-v19-text:#111111;
}

/* Página del certificado */
html body #pageMain,
html body .page{
  color:var(--sp-v19-text) !important;
}

/* Filas: etiqueta + celda de datos */
html body #pageMain .vehicle-row,
html body .page .vehicle-row,
html body #pageMain .owner-row,
html body .page .owner-row,
html body #pageMain .merchandise-row,
html body .page .merchandise-row,
html body #pageMain .vehicle-dates .date-row,
html body .page .vehicle-dates .date-row,
html body #pageMain .full-row,
html body .page .full-row,
html body #pageMain .row,
html body .page .row{
  display:grid !important;
  grid-template-columns:150px minmax(0, 1fr) !important;
  align-items:stretch !important;
  gap:0 !important;
  width:100% !important;
  min-height:25px !important;
  margin-bottom:5px !important;
  background:transparent !important;
  border:0 !important;
  color:var(--sp-v19-text) !important;
  font-family:Arial, Helvetica, sans-serif !important;
}

/* Etiquetas izquierdas */
html body #pageMain .code-label,
html body .page .code-label,
html body #pageMain .vehicle-label,
html body .page .vehicle-label,
html body #pageMain .owner-label,
html body .page .owner-label,
html body #pageMain .merchandise-label,
html body .page .merchandise-label,
html body #pageMain .date-label,
html body .page .date-label,
html body #pageMain .label,
html body .page .label,
html body #pageMain .prod-label,
html body .page .prod-label{
  background:var(--sp-v19-label) !important;
  color:var(--sp-v19-text) !important;
  display:flex !important;
  align-items:center !important;
  box-sizing:border-box !important;
  min-height:25px !important;
  height:auto !important;
  padding:0 9px !important;
  font-family:Arial, Helvetica, sans-serif !important;
  font-size:12px !important;
  font-weight:400 !important;
  line-height:1.12 !important;
  text-shadow:none !important;
  letter-spacing:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* Celdas derechas: bloque gris SIEMPRE visible, incluso vacío */
html body #pageMain .code-value,
html body .page .code-value,
html body #pageMain .vehicle-value,
html body .page .vehicle-value,
html body #pageMain .owner-value,
html body .page .owner-value,
html body #pageMain .merchandise-value,
html body .page .merchandise-value,
html body #pageMain .date-value,
html body .page .date-value,
html body #pageMain .value,
html body .page .value,
html body #pageMain .prod-box,
html body .page .prod-box,
html body #pageMain .vehicle-row > div:nth-child(2),
html body .page .vehicle-row > div:nth-child(2),
html body #pageMain .owner-row > div:nth-child(2),
html body .page .owner-row > div:nth-child(2),
html body #pageMain .merchandise-row > div:nth-child(2),
html body .page .merchandise-row > div:nth-child(2),
html body #pageMain .date-row > div:nth-child(2),
html body .page .date-row > div:nth-child(2),
html body #pageMain .full-row > div:nth-child(2),
html body .page .full-row > div:nth-child(2),
html body #pageMain .row > div:nth-child(2),
html body .page .row > div:nth-child(2){
  background:var(--sp-v19-value) !important;
  color:var(--sp-v19-text) !important;
  display:flex !important;
  align-items:center !important;
  box-sizing:border-box !important;
  min-width:0 !important;
  width:100% !important;
  min-height:25px !important;
  height:auto !important;
  padding:0 9px !important;
  font-family:Arial, Helvetica, sans-serif !important;
  font-size:12px !important;
  font-weight:400 !important;
  line-height:1.15 !important;
  text-shadow:none !important;
  letter-spacing:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* Contenedores: que no se encojan al contenido */
html body #pageMain .vehicle-left,
html body .page .vehicle-left,
html body #pageMain .owner-rows,
html body .page .owner-rows,
html body #pageMain .vehicle-dates,
html body .page .vehicle-dates{
  min-width:0 !important;
  width:100% !important;
}

html body #pageMain .owner-rows,
html body .page .owner-rows,
html body #pageMain .merchandise-row,
html body .page .merchandise-row,
html body #pageMain .vehicle-dates,
html body .page .vehicle-dates{
  width:calc(100% - 62px) !important;
}

/* Campo de productos/mercancía: gris ancho completo */
html body #pageMain .merchandise-row,
html body .page .merchandise-row{
  grid-template-columns:150px minmax(0, 1fr) !important;
}
html body #pageMain .prod-box,
html body .page .prod-box{
  margin-left:4px !important;
  width:calc(100% - 4px) !important;
}

/* Código de verificación: conservar tamaño compacto */
html body #pageMain .code-box,
html body .page .code-box{
  display:grid !important;
  grid-template-columns:160px 82px 46px !important;
  align-items:stretch !important;
}
html body #pageMain .code-box .code-label,
html body .page .code-box .code-label{
  justify-content:center !important;
  font-size:12px !important;
}
html body #pageMain .code-box .code-value,
html body .page .code-box .code-value{
  justify-content:center !important;
  font-size:13px !important;
}

/* En impresión se mantiene el mismo color de celdas. */
@media print{
  html body #pageMain .vehicle-value,
  html body .page .vehicle-value,
  html body #pageMain .owner-value,
  html body .page .owner-value,
  html body #pageMain .merchandise-value,
  html body .page .merchandise-value,
  html body #pageMain .date-value,
  html body .page .date-value,
  html body #pageMain .value,
  html body .page .value{
    background:#e9e9e9 !important;
    color:#111 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}
