/* components/AIInsights/AIInsights.css */
#aiInsightsView .main-content {
  padding: 0 20px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.insights-header {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 150, 64, 0.1);
  padding-bottom: 15px;
}

.header-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #009640;
  background: white;
  color: #009640;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.action-btn:hover {
  background: #009640;
  color: white;
  transform: translateY(-1px);
}

.refresh-btn:hover {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.insights-header h1 {
  color: #009640;
  font-size: 1.8rem;
  margin-bottom: 10px;
  line-height: 1.2;
}

.insights-meta {
  color: #666;
  font-size: 0.9rem;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.last-updated {
  font-style: italic;
}

.data-status {
  font-weight: 600;
  color: #28a745;
}

/* Accessibility focus styles */
.insights-section:focus-within {
  outline: 2px solid #009640;
  outline-offset: 2px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.insights-grid > .insights-section:not(.full-width) {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.insights-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Improved accessibility */
  scroll-margin-top: 60px; /* Adjust based on your header height */
}

.insights-section:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.insights-section.full-width {
  grid-column: 1 / -1;
}

.section-header {
  padding: 20px 25px 15px 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-header h3 {
  margin: 0;
  color: #009640;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-content {
  padding: 20px 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chart-container {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex: 1;
  position: relative;
  /* Responsive adjustments */
  min-height: 200px;
  /* Fix for container overflow issues */
  overflow: hidden;
  width: 100%;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
}

.insights-text {
  background: rgba(0, 150, 64, 0.05);
  border-radius: 14px;
  padding: 15px;
  border: 1px solid rgba(0, 150, 64, 0.1);
  flex: 1;
  display: flex;
  align-items: center;
  /* Fix for text overflow issues */
  overflow: hidden;
}

/* Enhanced styles for AI insights */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(0, 150, 64, 0.15);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: #007d35;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.metric-label {
  font-size: 0.9rem;
  color: #555;
  display: block;
  font-weight: 500;
}

.performance-table {
  width: 100%;
  overflow-x: auto;
}

.table-section {
  margin-bottom: 20px;
}

.table-section:last-child {
  margin-bottom: 0;
}

.table-section h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #009640;
}

.performance-table table {
  width: 100%;
  border-collapse: collapse;
}

.performance-table th,
.performance-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.performance-table th {
  background-color: rgba(0, 150, 64, 0.1);
  font-weight: 600;
}

.performance-table tr:hover {
  background-color: rgba(0, 150, 64, 0.02);
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
}

.trend-indicator.up {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.trend-indicator.down {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.trend-indicator.neutral {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.recommendation-card {
  border-radius: 20px;
  padding: 25px;
  background: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #3b82f6;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.recommendation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.recommendation-card.urgent {
  border-left-color: #ef4444;
}

.recommendation-card.high {
  border-left-color: #f59e0b;
}

.recommendation-card.medium {
  border-left-color: #3b82f6;
}

.recommendation-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(0, 150, 64, 0.05);
  clip-path: circle(50% at 50% 50%);
  transition: all 0.3s ease;
}

.recommendation-card:hover::before {
  background: rgba(0, 150, 64, 0.1);
}

.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.recommendation-icon {
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.recommendation-card.urgent .recommendation-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.recommendation-card.high .recommendation-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.recommendation-priority {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.recommendation-priority.urgent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.recommendation-priority.high {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.recommendation-priority.medium {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.recommendation-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #111827;
  /* Fix for title overflow */
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommendation-description {
  color: #666;
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.recommendation-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.action-button {
  padding: 8px 15px;
  border-radius: 8px;
  border: none;
  background: #009640;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  min-height: 40px;
  /* Accessibility enhancements */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Fix for button overflow */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.action-button:hover {
  background: #007d35;
  transform: translateY(-2px);
}

.impact-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: #666;
  /* Fix for indicator overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendations-container {
  min-height: 150px;
  flex: 1;
  /* Fix for container overflow */
  overflow: hidden;
}

.recommendation-item {
  padding: 15px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  margin-bottom: 15px;
  transition: all 0.3s ease;
  /* Fix for item overflow */
  overflow: hidden;
}

.recommendation-item:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateX(5px);
}

.recommendation-item:last-child {
  margin-bottom: 0;
}

.recommendation-title {
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommendation-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  /* Fix for description overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.loading {
  color: #666;
  font-style: italic;
}

.error-message {
  color: #dc3545;
  text-align: center;
  padding: 20px;
}

.loading {
  color: #6b7280;
  background: rgba(255, 255, 255, 0.7);
}

.error-message {
  color: #ef4444;
  background: rgba(255, 255, 255, 0.85);
}

.no-recommendations {
  text-align: center;
  padding: 30px;
  color: #666;
  font-style: italic;
}

.error-message i {
  font-size: 48px;
  margin-bottom: 15px;
}

.error-message p {
  margin-bottom: 15px;
}

/* Chart styles */
.trend-chart {
  display: flex;
  align-items: end;
  height: 150px;
  gap: 10px;
  padding: 15px 0;
}

.trend-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.trend-bar-fill {
  width: 100%;
  background: linear-gradient(to top, #009640, #10b981);
  border-radius: 8px 8px 0 0;
  transition: height 0.5s ease;
  box-shadow: 0 4px 8px rgba(0, 150, 64, 0.2);
  position: relative;
}

.trend-bar-label {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

.trend-value {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  color: #009640;
  font-size: 12px;
  white-space: nowrap;
}

/* Responsive design */
@media (max-width: 768px) {
  .insights-header h1 {
    font-size: 1.8rem;
  }
  
  .insights-header::after {
    width: 50px;
    height: 2px;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .metric-value {
    font-size: 1.8rem;
  }
  
  .recommendations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .recommendation-card {
    padding: 20px;
  }
  
  .section-header h3 {
    font-size: 1.2rem;
  }
  
  .header-actions {
    justify-content: center;
    gap: 8px;
  }
  
  .action-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .section-summary {
    justify-content: center;
    gap: 10px;
  }
  
  .performance-tabs,
  .retention-tabs {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    flex: 1;
    min-width: 100px;
  }
  
  .forecast-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .forecast-visualization {
    height: 120px;
    gap: 8px;
  }
  
  .forecast-value {
    font-size: 0.7rem;
    top: -20px;
  }
  
  .forecast-label {
    font-size: 0.65rem;
  }
  
  .at-risk-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .risk-action-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
  
  .insights-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .insights-actions {
    align-self: stretch;
  }
  
  .insights-action {
    width: 100%;
    justify-content: center;
  }
  
  .table-action-btn {
    padding: 3px 6px;
    font-size: 0.8rem;
  }
}

/* Print styles */
@media print {
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .insights-section {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .recommendation-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .action-button {
    display: none;
  }
}

@media (max-width: 480px) {
  .insights-header h1 {
    font-size: 1.5rem;
  }
  
  .insights-header::after {
    width: 40px;
    height: 2px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .metric-value {
    font-size: 1.6rem;
  }
  
  .metric-label {
    font-size: 0.85rem;
  }
  
  .section-header {
    padding: 12px 16px 8px 16px;
  }
  
  .section-content {
    padding: 15px 16px;
  }
  
  .chart-container {
    height: 160px;
    min-height: 140px;
  }
  
  .insights-text {
    padding: 10px;
  }
  
  .performance-table th,
  .performance-table td {
    padding: 6px;
    font-size: 0.8rem;
  }
  
  .forecast-visualization {
    height: 100px;
  }
  
  .forecast-value {
    font-size: 0.6rem;
    top: -18px;
  }
  
  .forecast-label {
    font-size: 0.6rem;
  }
  
  .risk-count {
    font-size: 2rem;
  }
  
  .risk-action-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

/* Enhanced Section Styles */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-action-btn {
  padding: 6px;
  border-radius: 6px;
  border: none;
  background: rgba(0, 150, 64, 0.1);
  color: #009640;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.section-action-btn:hover {
  background: #009640;
  color: white;
  transform: scale(1.1);
}

.category-filter {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: white;
  font-size: 0.85rem;
  cursor: pointer;
}

.section-summary {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.summary-item {
  font-size: 0.9rem;
  color: #666;
  background: rgba(0, 150, 64, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 150, 64, 0.1);
}

/* Chart Wrapper and Legend */
.chart-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.chart-legend {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #666;
}

.legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.profit-up {
  background: #28a745;
}

.profit-down {
  background: #dc3545;
}

.profit-stable {
  background: #6c757d;
}

/* Tab Styles */
.performance-tabs,
.retention-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0, 150, 64, 0.1);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 15px;
  border: none;
  background: none;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.tab-btn:hover {
  color: #009640;
  background: rgba(0, 150, 64, 0.05);
}

.tab-btn.active {
  color: #009640;
  border-bottom-color: #009640;
  font-weight: 600;
}

.tab-content {
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Performance Table Enhancements */
.performance-table-container {
  overflow-x: auto;
  margin-bottom: 15px;
}

.table-responsive {
  min-width: 100%;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.performance-table th {
  background: rgba(0, 150, 64, 0.1);
  color: #009640;
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 2px solid rgba(0, 150, 64, 0.2);
}

.performance-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0, 150, 64, 0.1);
  vertical-align: middle;
}

.performance-table tr:hover {
  background: rgba(0, 150, 64, 0.05);
}

.loading-row {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

/* Forecast and At-Risk Containers */
.forecast-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.forecast-chart {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 150, 64, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(0, 150, 64, 0.1);
}

.forecast-insights {
  background: rgba(0, 150, 64, 0.05);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(0, 150, 64, 0.1);
}

.at-risk-container {
  text-align: center;
  padding: 20px;
  background: rgba(220, 53, 69, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(220, 53, 69, 0.1);
}

.at-risk-summary {
  margin-bottom: 20px;
}

.risk-count {
  font-size: 2rem;
  font-weight: 700;
  color: #dc3545;
  display: block;
  margin-bottom: 5px;
}

.risk-label {
  color: #666;
  font-size: 0.9rem;
}

.at-risk-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.risk-action-btn {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  background: #dc3545;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.risk-action-btn:hover {
  background: #c82333;
  transform: translateY(-2px);
}

/* Insights Actions */
.insights-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.insights-description {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.insights-actions {
  display: flex;
  gap: 8px;
}

.insights-action {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: #009640;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.insights-action:hover {
  background: #007d35;
  transform: scale(1.05);
}

/* Enhanced Loading States */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: #666;
  font-style: italic;
}

.loading i {
  font-size: 2rem;
  color: #009640;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Progress Bar Styles */
.progress-bar {
  width: 80%;
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  margin: 10px auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #009640, #00c853);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Table Action Buttons */
.table-action-btn {
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  background: rgba(0, 150, 64, 0.1);
  color: #009640;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-action-btn:hover {
  background: #009640;
  color: white;
  transform: scale(1.1);
}

/* Forecast Visualization */
.forecast-visualization {
  display: flex;
  align-items: end;
  justify-content: space-around;
  height: 150px;
  padding: 15px 0;
  gap: 10px;
}

.forecast-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: linear-gradient(to top, rgba(0, 150, 64, 0.3), rgba(0, 150, 64, 0.1));
  border-radius: 8px 8px 0 0;
  min-height: 20px;
  transition: all 0.3s ease;
}

.forecast-value {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  color: #009640;
  font-size: 0.8rem;
  white-space: nowrap;
}

.forecast-label {
  margin-top: 8px;
  text-align: center;
  font-size: 0.7rem;
  color: #666;
  font-weight: 600;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .header-actions {
    justify-content: center;
    gap: 8px;
  }

  .action-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-actions {
    order: -1;
    align-self: flex-end;
  }

  .section-summary {
    justify-content: center;
    gap: 10px;
  }

  .performance-tabs,
  .retention-tabs {
    flex-wrap: wrap;
    gap: 5px;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    flex: 1;
    min-width: 100px;
  }

  .forecast-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .forecast-visualization {
    height: 120px;
    gap: 8px;
  }

  .forecast-bar {
    min-height: 15px;
  }

  .forecast-value {
    font-size: 0.7rem;
    top: -20px;
  }

  .forecast-label {
    font-size: 0.65rem;
  }

  .at-risk-actions {
    flex-direction: column;
    align-items: center;
  }

  .risk-action-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }

  .insights-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .insights-actions {
    align-self: stretch;
  }

  .insights-action {
    width: 100%;
    justify-content: center;
  }

  .table-action-btn {
    padding: 3px 6px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-btn {
    justify-content: center;
  }
  
  .btn-text {
    display: none;
  }
  
  .section-actions {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .section-action-btn {
    width: 28px;
    height: 28px;
  }
  
  .category-filter {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
  
  .tab-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
    min-width: 80px;
  }
  
  .tab-btn span {
    display: none;
  }
  
  .tab-btn i {
    margin-right: 0;
  }
  
  .performance-table {
    font-size: 0.8rem;
  }
  
  .performance-table th,
  .performance-table td {
    padding: 6px 4px;
  }
  
  .risk-count {
    font-size: 1.5rem;
  }
  
  .risk-action-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}
