/* Estilos propios de Solicitudes de Producción */
table.tabla-solicitudes { font-size: .9rem; }
table.tabla-solicitudes td, table.tabla-solicitudes th { vertical-align: top; }
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Etiqueta de etapa con el color del catálogo (clases porque la CSP no permite style=) */
.etapa { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
         color: #fff; white-space: nowrap; }
.et-PENDIENTE  { background: #64748b; }
.et-PROGRAMADO { background: #0ea5e9; }
.et-EN-PROCESO { background: #f59e0b; }
.et-PARCIAL    { background: #a855f7; }
.et-FINALIZADO { background: #16a34a; }
.et-ENTREGADO  { background: #0f766e; }
.et-CANCELADO  { background: #dc2626; }

/* Tablero de producción */
.prod-card { margin-bottom: 1rem; }
.prod-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.prod-head .folio-lg { font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.prod-head .cliente { color: var(--gris); margin-left: .5rem; }
.prod-head .entrega.late { color: #dc2626; font-weight: 600; }
.prod-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .4rem 0; font-size: .85rem; }
.prod-meta dt { color: var(--gris); display: inline; }
.prod-meta dd { display: inline; margin: 0 0 0 .3rem; font-weight: 600; }
table.prod td, table.prod th { font-size: .85rem; vertical-align: top; }
table.prod input, table.prod select { padding: .25rem .4rem; font-size: .85rem; }
table.prod input[type=number] { width: 6rem; }
tr.prow.vencida { background: #fff4f4; }
td.dif.late { color: #dc2626; font-weight: 700; }
td.dif.ontime { color: #16a34a; }
small.sem { display: block; color: var(--gris); font-size: .72rem; }
.filtros-prod { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.pager { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1rem 0; }
.pager a { padding: .3rem .6rem; border: 1px solid var(--borde); border-radius: 6px; text-decoration: none; }
.pager a.on { background: var(--azul); color: #fff; border-color: var(--azul); }

/* Formulario de solicitud: partidas */
table.partidas input { width: 100%; padding: .3rem .4rem; }
table.partidas td.num { text-align: center; color: var(--gris); }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--gris); font-size: 1rem; box-shadow: none; padding: .2rem .4rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: .2rem; }
input.ro { background: #f1f4f8; color: var(--gris); }
dl.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .3rem 1rem; }
dl.datos dt { color: var(--gris); font-size: .8rem; }
dl.datos dd { margin: 0 0 .4rem; font-weight: 600; }

/* Diálogo de historial */
dialog.dialog { border: 1px solid var(--borde); border-radius: 12px; max-width: 540px; width: 92%; padding: 0; }
dialog.dialog header { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--borde); }
dialog.dialog .cuerpo { padding: .8rem 1rem; max-height: 60vh; overflow: auto; }
.hist-item { border-left: 3px solid var(--borde); padding: .3rem .7rem; margin: .5rem 0; font-size: .85rem; }
.hist-item .meta { color: var(--gris); font-size: .78rem; }

label.en-linea { display: inline-flex; align-items: center; gap: .4rem; }
