/* Home Dashboard Styles */

.dashboard-container {
  padding: 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 0px;
}

/* Loading States */
.dashboard-loading,
.dashboard-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #68bbe3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dashboard-loading p {
  color: #676879;
  font-size: 1rem;
  font-weight: 500;
}

.dashboard-error {
  padding: 40px;
}

.dashboard-error .error-icon {
  width: 64px;
  height: 64px;
  color: #ff6b6b;
  margin-bottom: 20px;
}

.dashboard-error h3 {
  color: #2c3e50;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.dashboard-error p {
  color: #676879;
  margin-bottom: 24px;
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #68bbe3;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retry-btn:hover {
  background: #5aa8cf;
  transform: translateY(-1px);
}

/* Hero KPI Cards */
.hero-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.kpi-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #68bbe3, #5aa8cf);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(104, 187, 227, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #68bbe3;
  flex-shrink: 0;
}

.kpi-icon i,
.kpi-icon svg {
  width: 32px;
  height: 32px;
}

.kpi-success .kpi-icon {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.kpi-accent .kpi-icon {
  background: rgba(255, 152, 0, 0.1);
  color: #FF9800;
}

.kpi-content {
  flex: 1;
}

.kpi-label {
  font-size: 0.875rem;
  color: #676879;
  font-weight: 500;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 8px;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.kpi-trend i,
.kpi-trend svg {
  width: 16px;
  height: 16px;
}

.kpi-trend.positive {
  color: #4CAF50;
}

.kpi-trend.neutral {
  color: #676879;
}

.kpi-trend.negative {
  color: #ff6b6b;
}

.kpi-trend-grid {
  display: flex;
  gap: 16px;
}

.trend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
}

.trend-label {
  color: #676879;
  font-weight: 500;
}

.trend-value {
  color: #2c3e50;
  font-weight: 600;
}

/* Dashboard Sections */
.dashboard-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Activity Chart */
.chart-container {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.chart-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c3e50;
}

.chart-period {
  display: flex;
  gap: 8px;
  background: #f5f5f5;
  padding: 4px;
  border-radius: 8px;
}

.period-label {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #676879;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-label.active {
  background: white;
  color: #68bbe3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-wrapper {
  height: 280px;
  position: relative;
}

/* Quick Stats Grid */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #68bbe3;
  background: white;
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon i,
.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: #676879;
  font-weight: 500;
}

.stat-subtext {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Progress Bars */
.progress-bars {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #2c3e50;
}

.progress-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #676879;
}

.progress-bar-container {
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #68bbe3, #5aa8cf);
  border-radius: 6px;
  transition: width 1s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar-secondary {
  background: linear-gradient(90deg, #845EC2, #7450a8);
}

/* Team Engagement */
.team-engagement {
  min-height: 120px;
}

.team-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.team-stat {
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.team-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(132, 94, 194, 0.1);
  color: #845EC2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-stat-icon i,
.team-stat-icon svg {
  width: 24px;
  height: 24px;
}

.team-stat-content {
  flex: 1;
}

.team-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 4px;
}

.team-stat-label {
  font-size: 0.875rem;
  color: #676879;
  font-weight: 500;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: #9ca3af;
}

.empty-state i,
.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9375rem;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-container {
    padding: 24px;
  }
  
  .hero-kpis {
    grid-template-columns: 1fr;
  }
  
  .quick-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }
  
  .kpi-card {
    padding: 20px;
  }
  
  .kpi-value {
    font-size: 2rem;
  }
  
  .chart-wrapper {
    height: 220px;
  }
  
  .quick-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .kpi-card {
    flex-direction: column;
    text-align: center;
  }
  
  .kpi-trend {
    justify-content: center;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

