/* Analytics Dashboard Styles */

:root {
  --color-primary: #2563eb;
  --color-success: #10b981;
  --color-warn: #f59e0b;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-600: #4b5563;
  --color-gray-900: #111827;
}

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kpi-card:nth-child(2) {
  background: linear-gradient(135deg, #0369a1 0%, #0c4a6e 100%);
}

.kpi-card:nth-child(3) {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
}

.kpi-card:nth-child(4) {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.kpi-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.kpi-meta {
  font-size: 0.8rem;
  opacity: 0.85;
}

.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-container {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--color-gray-900);
}

.chart {
  height: 250px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-600);
  font-size: 0.875rem;
}

.metrics-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-box {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-box h3 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--color-gray-900);
}

.metric-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  margin-bottom: 0.5rem;
}

.metric-bar {
  background: var(--color-gray-200);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.metric-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.metric-value {
  font-size: 0.8rem;
  color: var(--color-gray-600);
  font-weight: 500;
}

.activity-section {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.activity-section h3 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--color-gray-900);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  padding: 1rem;
  background: var(--color-gray-50);
  border-left: 3px solid var(--color-primary);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: var(--color-gray-900);
  margin-bottom: 0.25rem;
}

.activity-meta {
  font-size: 0.8rem;
  color: var(--color-gray-600);
}

.activity-time {
  font-size: 0.8rem;
  color: var(--color-gray-600);
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  background: var(--color-gray-900);
  color: white;
  border-radius: 4px;
  z-index: 2000;
}

.toast.success {
  background: var(--color-success);
}

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

  .charts-section {
    grid-template-columns: 1fr;
  }

  .kpi-value {
    font-size: 1.5rem;
  }
}
