.analytics-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.analytics-header {
  margin-bottom: 30px;
}

.analytics-header h2 {
  color: #333;
  margin-bottom: 10px;
}

.analytics-header p {
  color: #666;
  font-size: 14px;
}

.analytics-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  flex-wrap: wrap;
}

.analytics-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.analytics-tab:hover {
  color: #333;
  background-color: #f5f5f5;
}

.analytics-tab.active {
  color: #28a745;
  border-bottom-color: #28a745;
  font-weight: 600;
}

.timeframe-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.timeframe-btn {
  padding: 8px 16px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.3s ease;
}

.timeframe-btn:hover {
  border-color: #28a745;
  color: #28a745;
}

.timeframe-btn.active {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

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

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #28a745;
  margin-bottom: 5px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: #999;
}

.charts-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.charts-section h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 20px;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  font-size: 18px;
  color: #666;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
}

@media (max-width: 768px) {
  .analytics-container {
    padding: 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card .stat-value {
    font-size: 28px;
  }

  .analytics-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .analytics-tab {
    padding: 10px 16px;
    font-size: 14px;
  }
}
