/* ========== ESTILOS ESPECÍFICOS PARA STATS ========== */
/* Los estilos de header, sidebar, tablas, botones generales están en global.css */

/* Ajustes específicos del layout de stats */
.contentDashboard {
  margin-left: 10%; /* Ajuste específico para stats */
  padding-top: 2%;
}

.contentDash {
  max-width: 1200px;
  margin: 0 auto;

}

/* Sección superior - Layout compacto tipo barra */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1%;
  min-height: 80px;
}

/* Lado izquierdo - Layout horizontal compacto */
.left-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.left-section h2 {
  font-size: 1.5rem;
  margin: 0;
  color: #001D3D;
  white-space: nowrap;
}

.right-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.activeProducts {
  background-color: transparent;
  padding: 0;
  margin: 0;
}

.activeProducts h2 {
  margin-bottom: 1rem;
  color: #001D3D;
  font-size: 1.5rem;
  text-align: right;
}

.products-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.activeProducts label {
  font-family: Arial, Helvetica, sans-serif;
  color: #001D3D;
  margin-left: 0.5rem;
  font-weight: 500;
}

.activeProducts input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.activeProducts button {
  background-color: #001D3D;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.activeProducts button:hover {
  background-color: #fff;
  color: #001D3D;
  border: 2px solid #001D3D;
}

/* Layout de contenedores superiores lado a lado */
.top-row {
  display: flex;
  gap: 3%;
  margin-bottom: 2rem;
}

/* Contenedor 1 - Resumen (más pequeño) */
.summaryContainer {
  background-color: #fff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 29, 61, 0.1);
  border: 1px solid #001d3d20;
  flex: 0 0 30%; /* Flex basis específico */
}

.summaryContainer h2 {
  margin-bottom: 1rem;
  color: #001D3D;
  font-size: 1.6rem;
  text-align: center;
}

.summaryContainer h4 {
  color: #001D3D;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Contenedor 2 - Recomendaciones (más grande) */
.suggestionsContainer {
  background-color: #fff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 29, 61, 0.1);
  border: 1px solid #001d3d20;
  flex: 1; /* Toma el resto del espacio */
}

.suggestionsContainer h2 {
  margin-bottom: 1.5rem;
  color: #001D3D;
  font-size: 1.6rem;
  text-align: center;
}

/* Contenedor 3 - Estadísticas (layout horizontal) */
.keystatsContainer {
  background-color: #fff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 29, 61, 0.1);
  border: 1px solid #001d3d20;
  margin-bottom: 2rem;
}

.keystatsContainer h2 {
  margin-bottom: 2rem;
  color: #001D3D;
  font-size: 1.8rem;
  text-align: center;
  border-bottom: 2px solid #EBF4FF;
  padding-bottom: 0.5rem;
}

.stats-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.summary,
.graphics,
.historical {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 4px solid #001D3D;
  height: 100%;
}

.summary h2,
.graphics h2,
.historical h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #001D3D;
  border: none;
  padding: 0;
  text-align: center;
}

/* Botones específicos de cada contenedor */


/* Botón generar reporte */
.generate-report {
  text-align: center;
  margin-top: 2rem;
}

.generate-report button {
  background-color: #001D3D;
  padding: 15px 30px;
  font-size: 1.1rem;
}

.generate-report button:hover {
  background-color: #fff;
  color: #001D3D;
  border: 2px solid #001D3D;
}

/* ========== RESPONSIVE ESPECÍFICO PARA STATS ========== */
@media (max-width: 1024px) {
  .top-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  
  .right-section {
    align-items: center;
  }
  
  .activeProducts h2 {
    text-align: center;
  }
  
  .products-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .top-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .summaryContainer,
  .suggestionsContainer {
    flex: none;
    width: 100%;
  }
  
  .stats-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .contentDashboard {
    margin-left: 0;
    padding: 1rem;
  }
  
  .top-header {
    padding: 1rem;
  }
  
  .left-section h2 {
    font-size: 1.5rem;
  }
  
  .activeProducts h2 {
    font-size: 1.3rem;
  }
  
  .products-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .checkbox-group {
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .summaryContainer,
  .suggestionsContainer,
  .keystatsContainer {
    padding: 1rem;
  }
}

/* Estilos para selector avanzado */
.period-selector-advanced {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.period-selector-advanced h3 {
  font-family: Anton;
  font-size: 0.9rem;
  color: #001D3D;
  margin: 0;
  white-space: nowrap;
}

/* Botones rápidos - todos en línea */
.quick-period-buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.quick-btn {
  padding: 6px 12px;
  background-color: #fff;
  color: #001D3D;
  border: 2px solid #001d3d30;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.quick-btn:hover {
  background-color: #001D3D;
  color: white;
  border-color: #001D3D;
}

.quick-btn.active {
  background-color: #001D3D;
  color: white;
  border-color: #001D3D;
  font-weight: bold;
}

/* Input de rango - compacto sin label visible */
.date-range-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.date-range-input label {
  display: none; /* Ocultar label para ahorrar espacio */
}

.date-range-input input {
  width: 220px;
  padding: 6px 10px;
  border: 2px solid #001d3d30;
  border-radius: 8px;
  background-color: #fff;
  color: #001D3D;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
}

.date-range-input input:focus {
  outline: none;
  border-color: #001D3D;
  box-shadow: 0 0 0 3px rgba(0, 29, 61, 0.1);
}

/* Botón aplicar - compacto */
.apply-period-btn {
  padding: 6px 16px;
  background-color: #001D3D;
  color: white;
  border: none;
  border-radius: 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.apply-period-btn:hover {
  background-color: #003566;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 29, 61, 0.2);
}

/* Display del periodo - oculto por defecto para ahorrar espacio */
.selected-period-display {
  display: none;
}

.selected-period-display.active {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #e8f4f8;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  color: #001D3D;
  text-align: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 29, 61, 0.1);
}

/* Personalización de Flatpickr */
.flatpickr-calendar {
    font-family: Arial, Helvetica, sans-serif;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 29, 61, 0.2);
}

.flatpickr-day.selected {
    background-color: #001D3D;
    border-color: #001D3D;
}

.flatpickr-day.selected:hover {
    background-color: #003566;
    border-color: #003566;
}


/* Estilos para el selector de productos */
.products-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.products-selector label {
    font-family: Anton;
    font-size: 0.9rem;
    color: #001D3D;
    white-space: nowrap;
    margin: 0;
}

.product-dropdown {
    min-width: 180px;
    padding: 6px 12px;
    border: 2px solid #001d3d30;
    border-radius: 8px;
    background-color: #fff;
    color: #001D3D;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-dropdown:focus {
    outline: none;
    border-color: #001D3D;
    box-shadow: 0 0 0 3px rgba(0, 29, 61, 0.1);
}

.product-dropdown:hover {
    border-color: #001D3D;
}

.apply-product-btn {
    padding: 6px 16px;
    background-color: #001D3D;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.apply-product-btn:hover {
    background-color: #003566;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 29, 61, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-selector {
        width: 100%;
        justify-content: flex-start;
    }
    
    .product-dropdown {
        flex: 1;
    }
}

/* Tabla de resumen */

.marca-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.marca-selector label {
    font-weight: bold;
}

.marca-selector select {
    flex: 1;
    padding: 0.5rem;
}

.input-fecha, .input-resumen, .input-tipo {
    width: 100%;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.add-row-btn, .save-btn {
    margin: 1rem 0.5rem 0 0;
}

.save-btn {
    background-color: #28a745;
}