/* Stats Page Styles */
.stats-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.stats-header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.stats-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

/* Stats Cards Grid */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stats-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  flex-shrink: 0;
}

.card-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.card-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Charts Grid */
.stats-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.stats-chart-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-chart-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.5rem 0;
}

/* Completion Chart - Line Chart */
.completion-chart {
  height: 350px;
  position: relative;
}

.line-chart-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.line-chart {
  width: 100%;
  height: 280px;
  flex: 1;
  min-height: 280px;
}

.data-point {
  cursor: pointer;
  transition: all 0.2s ease;
}

.data-point:hover {
  r: 6;
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.data-point:hover + .value-label {
  opacity: 1 !important;
}

.value-label {
  font-weight: 600;
  background: white;
  padding: 2px 4px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease;
}

.chart-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.no-data-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #64748b;
}

.no-data-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-data-chart p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.no-data-subtitle {
  font-size: 0.85rem !important;
  opacity: 0.7;
}

/* Project Progress */
.project-progress-list {
  max-height: 300px;
  overflow-y: auto;
}

.project-progress-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.project-progress-item:last-child {
  border-bottom: none;
}

.project-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.project-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-name {
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 120px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
}

/* Activity Grid */
.stats-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.stats-activity-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-activity-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.5rem 0;
}

.activity-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item.completed .activity-title {
  text-decoration: line-through;
  opacity: 0.7;
}

.activity-icon {
  font-size: 1.2rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 500;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.no-data {
  text-align: center;
  color: #64748b;
  font-style: italic;
  padding: 2rem;
}

.no-data a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.no-data a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-page {
    padding: 1rem 0.5rem;
  }

  .stats-header h1 {
    font-size: 2rem;
  }

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

  .stats-charts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-activity-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-card {
    padding: 1.5rem;
  }

  .chart-bars {
    gap: 2px;
  }

  .bar-label {
    font-size: 0.6rem;
  }

  .project-progress-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .project-stats {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-header h1 {
    font-size: 1.75rem;
  }

  .stats-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .card-value {
    font-size: 1.75rem;
  }
}
