/**
 * Personalización global de DataTables
 * Tamaño de fuente reducido para todas las tablas DataTable.
 * Fuente mono (JetBrains Mono) para alineación y aspecto ordenado.
 * Ajustar --dt-font-size aquí si se necesita cambiar en todo el admin.
 */
:root {
  --dt-font-size: 0.8125rem; /* 13px; cambiar a 0.875rem (14px) o 0.75rem (12px) si se desea */
  --dt-font-monospace: "JetBrains Mono", "SFMono-Regular", ui-monospace, menlo, monaco, consolas, "Liberation Mono", "Courier New", monospace;
}

/* Contenedor y tabla */
div.card-datatable .dataTables_wrapper,
div.card-datatable table.dataTable {
  font-size: var(--dt-font-size);
  font-family: var(--dt-font-monospace);
}

div.card-datatable table.dataTable thead th,
div.card-datatable table.dataTable thead td,
div.card-datatable table.dataTable tbody th,
div.card-datatable table.dataTable tbody td,
div.card-datatable table.dataTable tfoot th,
div.card-datatable table.dataTable tfoot td {
  font-size: inherit;
}

/* Cabecera de la tabla (opcional: un poco más pequeña que el body) */
div.card-datatable table.dataTable thead th,
div.card-datatable table.dataTable thead td {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* Celdas del body */
div.card-datatable table.dataTable tbody td,
div.card-datatable table.dataTable tbody th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* Info, selector de longitud y búsqueda */
div.card-datatable .dt-info,
div.card-datatable .dt-length,
div.card-datatable .dt-search,
div.card-datatable .dataTables_filter label,
div.card-datatable .dataTables_length label {
  font-size: var(--dt-font-size);
  font-family: var(--dt-font-monospace);
}

/* Paginación */
div.card-datatable .dt-paging {
  font-size: var(--dt-font-size);
  font-family: var(--dt-font-monospace);
}

div.card-datatable .pagination .page-link {
  padding: 0.25rem 0.5rem;
  font-size: var(--dt-font-size);
  font-family: var(--dt-font-monospace);
}

/* Cuadro de color (hex) en columna Color */
div.card-datatable .dt-color-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-inline-end: 0.35rem;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

/* Detalles de líneas OC: padding reducido en cabecera Y contenido (tbody) */
.oc-details-lines-page table.dataTable thead th,
.oc-details-lines-page table.dataTable thead td,
.oc-details-lines-page table.dataTable tbody th,
.oc-details-lines-page table.dataTable tbody td {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}
