/**
 * MÓDULO: Entregas de Indumentaria y EPP
 * Estilos principales
 */

/* ============================================
   VISTAS GENERALES
============================================ */

.modulo-indumentaria {
  padding: 20px;
}

.indumentaria-titulo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.indumentaria-subtitulo {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #555;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

.indumentaria-filtros {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.indumentaria-filtro-item {
  display: flex;
  flex-direction: column;
}

.indumentaria-filtro-item label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.indumentaria-filtro-item input,
.indumentaria-filtro-item select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.indumentaria-filtro-item input:focus,
.indumentaria-filtro-item select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ============================================
   VISTA: CARGA DE ENTREGA
============================================ */

.carga-entrega-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 900px;
}

.carga-seccion {
  margin-bottom: 30px;
}

.carga-seccion-titulo {
  font-size: 16px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #007bff;
}

.carga-form-group {
  margin-bottom: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.carga-form-item {
  display: flex;
  flex-direction: column;
}

.carga-form-item label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.carga-form-item input,
.carga-form-item select,
.carga-form-item textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.carga-form-item input:focus,
.carga-form-item select:focus,
.carga-form-item textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.carga-form-item textarea {
  grid-column: 1 / -1;
  min-height: 100px;
  resize: vertical;
}

/* Tabla de items */
.carga-items-tabla {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background: white;
  border: 1px solid #ddd;
}

.carga-items-tabla thead {
  background: #f8f9fa;
  font-weight: bold;
}

.carga-items-tabla th,
.carga-items-tabla td {
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
}

.carga-items-tabla tbody tr:nth-child(odd) {
  background: #fafafa;
}

.carga-items-tabla tbody tr:hover {
  background: #f0f0f0;
}

.carga-items-tabla input,
.carga-items-tabla select {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  font-size: 13px;
}

.carga-items-btn-remover {
  background: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.carga-items-btn-remover:hover {
  background: #c82333;
}

.carga-items-btn-agregar {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}

.carga-items-btn-agregar:hover {
  background: #218838;
}

/* Firma */
.carga-firma-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.carga-firma-checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.carga-firma-checkbox label {
  cursor: pointer;
  margin: 0;
}

/* Botones */
.carga-botones {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 30px;
}

.btn-primario,
.btn-secundario {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primario {
  background: #007bff;
  color: white;
}

.btn-primario:hover {
  background: #0056b3;
}

.btn-secundario {
  background: #6c757d;
  color: white;
}

.btn-secundario:hover {
  background: #5a6268;
}

/* ============================================
   VISTA: HISTORIAL POR OPERARIO
============================================ */

.historial-operario-container {
  max-width: 900px;
}

.historial-tarjeta {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.historial-tarjeta-encabezado {
  background: #f8f9fa;
  padding: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.historial-tarjeta-encabezado:hover {
  background: #e9ecef;
}

.historial-tarjeta-fecha {
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.historial-tarjeta-resumen {
  color: #666;
  font-size: 13px;
  margin-top: 5px;
}

.historial-tarjeta-icono {
  color: #007bff;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.historial-tarjeta-contenido {
  padding: 15px;
  display: none;
  border-top: 1px solid #ddd;
}

.historial-tarjeta-contenido.activo {
  display: block;
}

.historial-items-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}

.historial-items-tabla thead {
  background: #e9ecef;
}

.historial-items-tabla th,
.historial-items-tabla td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.historial-items-tabla tbody tr:nth-child(odd) {
  background: #fafafa;
}

.historial-firma {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  font-size: 13px;
}

.historial-firma-label {
  font-weight: bold;
  color: #333;
}

.historial-firma-valor {
  color: #666;
  font-style: italic;
}

/* ============================================
   VISTA: REPORTE GENERAL
============================================ */

.reporte-container {
  max-width: 1200px;
}

.reporte-tabla {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #ddd;
  font-size: 13px;
  margin-top: 20px;
}

.reporte-tabla thead {
  background: #007bff;
  color: white;
  font-weight: bold;
}

.reporte-tabla th {
  padding: 12px;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.reporte-tabla th:hover {
  background: #0056b3;
}

.reporte-tabla td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
}

.reporte-tabla tbody tr:hover {
  background: #f5f5f5;
}

.reporte-tabla-vacio {
  text-align: center;
  padding: 30px;
  color: #999;
  font-style: italic;
}

/* ============================================
   BOTONES Y ACCIONES
============================================ */

.btn-exportar-csv {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 15px;
}

.btn-exportar-csv:hover {
  background: #138496;
}

.btn-ver-detalles,
.btn-descargar-recibo {
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
}

.btn-ver-detalles:hover,
.btn-descargar-recibo:hover {
  background: #0056b3;
}

/* ============================================
   ALERTAS Y MENSAJES
============================================ */

.alerta {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alerta-exito {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alerta-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alerta-advertencia {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* ============================================
   RESPONSIVO
============================================ */

@media (max-width: 768px) {
  .indumentaria-filtros {
    grid-template-columns: 1fr;
  }

  .carga-form-group {
    grid-template-columns: 1fr;
  }

  .carga-botones {
    flex-direction: column;
  }

  .btn-primario,
  .btn-secundario {
    width: 100%;
  }

  .reporte-tabla {
    font-size: 12px;
  }

  .reporte-tabla th,
  .reporte-tabla td {
    padding: 8px;
  }
}
