/* ===================================
   DASHBOARD STYLES
   =================================== */

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

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #64748b;
  font-size: 1.1rem;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.stat-content h3 {
  font-size: 2rem;
  color: #1e293b;
  margin: 0;
}

.stat-content p {
  color: #64748b;
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.card h2 {
  color: #1e293b;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.75rem;
}

/* Session List */
.session-list {
  max-height: 400px;
  overflow-y: auto;
}

.session-item {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border-left: 4px solid #667eea;
}

.session-item .session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.session-item .state-badge {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.session-item .score {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1e293b;
}

.session-item .score.high {
  color: #10b981;
}

.session-item .score.medium {
  color: #f59e0b;
}

.session-item .score.low {
  color: #ef4444;
}

.session-item .meta {
  font-size: 0.85rem;
  color: #64748b;
}

/* State Stats */
.state-stats {
  max-height: 400px;
  overflow-y: auto;
}

.state-item {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.state-item .state-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.state-item .progress-bar {
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.state-item .progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.state-item .stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
}

/* Leaderboard */
.leaderboard {
  overflow-x: auto;
}

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

.leaderboard th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.leaderboard td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.leaderboard tr:hover {
  background: #f8fafc;
}

.leaderboard .rank {
  font-weight: bold;
  color: #667eea;
  font-size: 1.1rem;
}

.leaderboard .rank-1 {
  color: #f59e0b;
}

.leaderboard .rank-2 {
  color: #94a3b8;
}

.leaderboard .rank-3 {
  color: #cd7f32;
}

/* Loading State */
.loading {
  text-align: center;
  color: #64748b;
  padding: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header h1 {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}
