/* Tablas de REQUERIMIENTOS: el texto se adapta a la columna.
   Antes el N° («REQ-SST-003-2026») y el Área se partían en 4-5 renglones por columnas muy angostas.
   Regla: los datos cortos (N°, fechas, estado, acciones) no se parten; los textos largos (tipo, proyecto, área,
   empresa, descripción) tienen un ancho mínimo cómodo, alineados a la izquierda, y si no cabe todo el
   contenedor se desplaza en horizontal (no se aplasta). Solo diseño: no cambia ningún dato. */
#screen-log-requerimientos .seg-table-wrap,
#screen-requerimientos .calib-table-wrap, #screen-sst-requerimientos .calib-table-wrap,
#screen-lab-requerimientos .calib-table-wrap,
#screen-lab-req-compra .calib-table-wrap, #screen-rrhh-req-recibidos .calib-table-wrap,
#screen-req-aprobacion .calib-table-wrap { overflow-x: auto; }

/* Celdas: texto normal; los datos cortos en una línea */
:is(#screen-log-requerimientos,#screen-requerimientos,#screen-sst-requerimientos,#screen-lab-requerimientos,#screen-lab-req-compra,#screen-rrhh-req-recibidos,#screen-req-aprobacion) table td {
  white-space: normal; overflow-wrap: anywhere; word-break: normal; line-height: 1.3; vertical-align: middle; }

/* ── Logística › Requerimientos: N REQ | Tipo | Proyecto | Área | Fecha Sol. | Fecha Aten. | Items | Estado ── */
#screen-log-requerimientos .seg-table { min-width: 1500px !important; table-layout: auto; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(1) { min-width: 170px !important; width: 170px !important; white-space: nowrap; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(2) { min-width: 170px !important; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(3) { min-width: 220px !important; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(4) { min-width: 300px !important; width: 300px !important; text-align: left !important; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(n+5):nth-child(-n+9) { white-space: nowrap; }
#screen-log-requerimientos .seg-table :is(th,td):nth-child(5),
#screen-log-requerimientos .seg-table :is(th,td):nth-child(6) { min-width: 105px !important; }

/* ── Requerimientos (módulo): N° | Fecha | N° REQ | Envío y control | Área | Solicitante | Proveedor | Empresa | Situación | Acciones ── */
#screen-requerimientos table :is(th,td):nth-child(2) { white-space: nowrap; }
#screen-requerimientos table :is(th,td):nth-child(3) { white-space: nowrap; min-width: 150px !important; }
#screen-requerimientos table :is(th,td):nth-child(4) { min-width: 280px !important; text-align: left; }
#screen-requerimientos table :is(th,td):nth-child(5) { min-width: 200px !important; text-align: left; }
#screen-requerimientos table :is(th,td):nth-child(6) { min-width: 160px !important; }
#screen-requerimientos table :is(th,td):nth-child(8) { min-width: 200px !important; }
#screen-requerimientos table :is(th,td):nth-child(9) { min-width: 150px !important; }
#screen-requerimientos table td:nth-child(10) { white-space: nowrap; }

/* ── Seguridad › Requerimientos SST: N° | Fecha | N° REQ | Área | Solicitante | Proveedor | Empresa | Estado | Acciones ── */
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(2) { white-space: nowrap; }
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(3) { white-space: nowrap; min-width: 150px !important; }
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(4) { min-width: 220px !important; text-align: left; }
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(5) { min-width: 160px !important; }
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(7) { min-width: 200px !important; }
#screen-sst-requerimientos table:has(#sstreq-tbody) :is(th,td):nth-child(8) { white-space: nowrap; min-width: 120px !important; }
#screen-sst-requerimientos table:has(#sstreq-tbody) td:nth-child(9) { white-space: nowrap; }

/* ── Almacén › Requerimientos: Item | Fecha | Solicitante | Área | Descripción | Cant. | Estado | Acción ── */

/* ── Laboratorio › Requerimientos de equipos: N° | Fecha | N° REQ | Equipos | Proveedor | Empresa | Estado | Enviado a | Obs. | Acciones ── */
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(2) { white-space: nowrap; }
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(3) { white-space: nowrap; min-width: 150px !important; }
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(4) { min-width: 200px !important; text-align: left; }
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(6) { min-width: 200px !important; }
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(7),
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(8) { white-space: nowrap; }
#screen-lab-requerimientos table:has(#req-cal-tbody) :is(th,td):nth-child(9) { min-width: 180px !important; text-align: left; }
#screen-lab-requerimientos table:has(#req-cal-tbody) td:nth-child(10) { white-space: nowrap; }

/* ── Laboratorio › Requerimiento de compra: Fecha | N° REQ | Ítems | Proveedor | Empresa | Estado | Obs. | Acciones ── */
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(1) { white-space: nowrap; }
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(2) { white-space: nowrap; min-width: 150px !important; }
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(3) { min-width: 240px !important; text-align: left; }
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(5) { min-width: 200px !important; }
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(6) { white-space: nowrap; }
#screen-lab-req-compra table:has(#req-compra-tbody) :is(th,td):nth-child(7) { min-width: 180px !important; text-align: left; }
#screen-lab-req-compra table:has(#req-compra-tbody) td:nth-child(8) { white-space: nowrap; }

/* ── RR.HH. › Requerimientos recibidos: N° | Fecha | N° REQ | Solicitante | Área | Empresa | Estado | Enviado | Acciones ── */
#screen-rrhh-req-recibidos table :is(th,td):nth-child(2), #screen-rrhh-req-recibidos table :is(th,td):nth-child(3) { white-space: nowrap; }
#screen-rrhh-req-recibidos table :is(th,td):nth-child(3) { min-width: 150px !important; }
#screen-rrhh-req-recibidos table :is(th,td):nth-child(4) { min-width: 160px !important; }
#screen-rrhh-req-recibidos table :is(th,td):nth-child(5) { min-width: 220px !important; text-align: left; }
#screen-rrhh-req-recibidos table :is(th,td):nth-child(6) { min-width: 200px !important; }
#screen-rrhh-req-recibidos table :is(th,td):nth-child(7) { min-width: 150px !important; }

/* ── Aprobación de Requerimientos: N° | Fecha | N° REQ | Solicitante | Área | Empresa | Destinatario | Estado | Enviado | Acciones ── */
#screen-req-aprobacion table :is(th,td):nth-child(2), #screen-req-aprobacion table :is(th,td):nth-child(3) { white-space: nowrap; }
#screen-req-aprobacion table :is(th,td):nth-child(3) { min-width: 150px !important; }
#screen-req-aprobacion table :is(th,td):nth-child(4) { min-width: 160px !important; }
#screen-req-aprobacion table :is(th,td):nth-child(5) { min-width: 220px !important; text-align: left; }
#screen-req-aprobacion table :is(th,td):nth-child(6) { min-width: 200px !important; }
#screen-req-aprobacion table :is(th,td):nth-child(7) { white-space: nowrap; }
#screen-req-aprobacion table :is(th,td):nth-child(8) { min-width: 170px !important; }

/* Encabezados: nunca en vertical ni partidos a mitad de palabra */
:is(#screen-log-requerimientos,#screen-requerimientos,#screen-sst-requerimientos,#screen-lab-requerimientos,#screen-lab-req-compra,#screen-rrhh-req-recibidos,#screen-req-aprobacion) table th {
  overflow-wrap: normal; word-break: normal; white-space: nowrap; }
