/* Advanced Product Analysis Styles */

.advanced-product-analysis {
  padding: 20px;
  background: #f8f9fa;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border-left: 4px solid #218d8d;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.kpi-card.kpi-success {
  border-left-color: #28a745;
}

.kpi-card.kpi-warning {
  border-left-color: #ffc107;
}

.kpi-card.kpi-info {
  border-left-color: #17a2b8;
}

.kpi-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.kpi-content {
  flex: 1;
}

.kpi-label {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #133452;
  line-height: 1.2;
}

.kpi-small {
  font-size: 1rem;
  font-weight: 400;
  color: #6c757d;
}

.kpi-subtitle {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 3px;
}

/* Charts Section */
.charts-section {
  margin-bottom: 30px;
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #133452;
  font-weight: 600;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.chart-card canvas {
  max-height: 350px;
}

/* Tables Section */
.tables-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.table-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.table-card h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #133452;
  font-weight: 600;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
  background: #f8f9fa;
}

.data-table .text-center {
  text-align: center;
}

.data-table .text-right {
  text-align: right;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background: #218d8d;
  color: white;
}

.badge-success {
  background: #28a745;
  color: white;
}

.badge-warning {
  background: #ffc107;
  color: #212529;
}

.badge-danger {
  background: #dc3545;
  color: white;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

/* Error Message */
.error-message {
  background: white;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.error-message h3 {
  color: #dc3545;
  margin-bottom: 10px;
}

.error-message p {
  color: #6c757d;
}

/* Module Header */
.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.module-header h2 {
  margin: 0;
  color: #133452;
  font-size: 1.5rem;
}

.filters {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 8px 15px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
  color: #495057;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:hover {
  border-color: #218d8d;
}

.filter-select:focus {
  outline: none;
  border-color: #218d8d;
  box-shadow: 0 0 0 3px rgba(33, 141, 141, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }

  .tables-section {
    grid-template-columns: 1fr;
  }

  .module-header {
    flex-direction: column;
    gap: 15px;
  }

  .filters {
    width: 100%;
  }

  .filter-select {
    flex: 1;
  }
}
