/* ==========================================
   PRODUCCIÓN (produccion.css)
   Usa paneles y patentes de flota.css
   ========================================== */
.produccion .prod-fecha { max-width: 220px; margin-bottom: 14px; }
.produccion .prod-fecha .calendario-wrap, .produccion .prod-fecha input { margin-bottom: 0; }
.prod-grupos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prod-grupo { background: #080808; border: 1px solid #1a1a1a; border-radius: 8px; padding: 10px 12px 12px; }
.prod-grupo-titulo { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #ddd; }
.prod-campos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prod-campos.dos { grid-template-columns: 1fr 1fr; }
.prod-campos input { margin-bottom: 0; height: 34px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.prod-acciones { display: flex; justify-content: flex-end; margin-top: 12px; }
.produccion .prod-btn { width: auto; margin: 0; height: 34px; padding: 0 18px; font-size: 12px; font-weight: 600; background: var(--accent-cyan); color: #000; border-color: var(--accent-cyan); }
.produccion .prod-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Camión ya recibido en la fecha: etiqueta verde arriba a la derecha */
.produccion .patente-card .prod-recibido { display: none; color: var(--ok); border-color: var(--ok); }
.produccion .patente-card.recibido .prod-recibido { display: block; }
#prod_camion { margin: -4px 0 12px; font-size: 12px; color: #bbb; }

.prod-tabla-wrap { margin: 14px 0 0; }
.prod-tabla th:nth-child(n+3), .prod-tabla td:nth-child(n+3) { text-align: right; }
.prod-tabla td { font-variant-numeric: tabular-nums; white-space: nowrap; color: #ddd; font-weight: normal; }
.prod-tabla tfoot td { font-weight: 600; color: var(--accent-cyan); border-top: 1px solid #333; }

@media (max-width: 760px) {
    .prod-grupos { grid-template-columns: 1fr; }
    .produccion .prod-btn { width: 100%; }
}
.prod-tabla tfoot td:not(:first-child) { text-align: right; }

/* Contenedor activo: el borde se ilumina cuando uno de sus campos tiene el foco */
.prod-grupo { transition: border-color .2s, box-shadow .2s; }
.prod-grupo:focus-within { border-color: var(--accent-cyan); box-shadow: 0 0 12px rgba(0, 210, 255, .35); }

/* Barra superior: fecha + botón de estadísticas */
.prod-barra { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.produccion .prod-barra .prod-fecha { margin-bottom: 0; }
.produccion .prod-btn-est { width: auto; margin: 0; height: 34px; padding: 0 14px; font-size: 12px; font-weight: 600; background: transparent; color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }
.produccion .prod-btn-est.activo { background: var(--accent-cyan); color: #000; }
.prod-oculto { display: none; }

/* Estadísticas */
#prod_meses { display: none !important; }
.prod-meses { width: 140px; }
.prod-meses .custom-select { margin-bottom: 0; }
.prod-meses .custom-select-trigger { height: 30px; padding: 6px 10px; }
.prod-meses .custom-options { max-height: 260px; }
.prod-grafico { margin-bottom: 10px; }
.prod-leyenda { display: flex; gap: 14px; font-size: 11px; color: #bbb; margin-bottom: 4px; }
.prod-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.prod-leyenda i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.prod-est-tabla { max-height: 260px; overflow: auto; margin: 0 0 16px; }
.prod-est-tabla thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 760px) {
    .prod-barra { flex-wrap: wrap; }
}
.prod-tabla-meses th:nth-child(2), .prod-tabla-meses td:nth-child(2) { text-align: right; }
.prod-tabla-meses tbody td:nth-child(2) { color: #ffd600; font-weight: 600; }
/* Cursor corporativo (cian) y etiqueta en blanco y negrita del campo con foco */
.produccion input { caret-color: var(--cursor-color); }
.prod-campos > div .flota-label { transition: color .2s; }
.prod-campos > div:focus-within .flota-label { color: #fff; font-weight: 700; }
/* Etiquetas largas (Botella Alcalina 350 ML): los campos quedan alineados abajo */
.prod-campos > div { display: flex; flex-direction: column; justify-content: flex-end; }
/* Tapas malas: un solo campo, a lo ancho bajo lavados y llenados */
.prod-grupo-tapas { grid-column: 1 / -1; }
.prod-campos.uno { grid-template-columns: minmax(0, calc((100% - 20px) / 3)); }

/* Vista previa de la planilla imprimible: fondo transparente, hoja A4 flotando */
.prod-barra-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.prod-preview { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px 16px 44px; background: transparent; }
.prod-preview.prod-oculto { display: none; }
.prod-preview-caja { width: min(820px, 100%); max-height: calc(100vh - 60px); display: flex; flex-direction: column; background: #050505; border: 1px solid var(--accent-cyan); border-radius: 10px; box-shadow: 0 0 24px rgba(0, 210, 255, .35); overflow: hidden; }
.prod-preview-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #1a1a1a; font-size: 12px; color: #ddd; }
.prod-preview-barra > div { display: flex; gap: 8px; }
.prod-preview-barra button { white-space: nowrap; width: auto; margin: 0; height: 32px; padding: 0 14px; font-size: 12px; font-weight: 600; border: 1px solid var(--accent-cyan); border-radius: 6px; }
.prod-preview-barra .prod-btn { background: var(--accent-cyan); color: #000; }
.prod-preview-barra .prod-btn-est { background: transparent; color: var(--accent-cyan); }
.prod-preview-hoja { flex: 1; overflow: auto; padding: 12px; }
.prod-preview-hoja iframe { display: block; width: 794px; height: 1123px; border: 0; background: #fff; transform-origin: top left; }
/* Cerrar vista previa: la X de la app, en la barra */
.prod-preview-barra > div { align-items: center; }
.prod-preview-barra .btn-cerrar-x { position: static; height: auto; padding: 4px 6px; border: none; background: transparent; color: #666; font-size: 18px; }
.prod-preview-barra .btn-cerrar-x:hover, .prod-preview-barra .btn-cerrar-x:focus-visible { color: var(--alert-red); }
