/* ============================================
   Dashboard Specific Styles
   ============================================ */

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

.stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 32px rgba(108, 62, 249, 0.3);
}

.stat-card.success {
  background: linear-gradient(135deg, var(--success) 0%, #34D669 100%);
}

.stat-card.warning {
  background: linear-gradient(135deg, var(--warning) 0%, #FFE066 100%);
  color: var(--text-primary);
}

.stat-card.danger {
  background: linear-gradient(135deg, var(--danger) 0%, #FF6B6B 100%);
}

.stat-card.info {
  background: linear-gradient(135deg, var(--accent-1) 0%, #4DD0E1 100%);
  color: var(--text-primary);
}

.stat-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.stat-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

.stat-card-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card-change {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-card-change.positive {
  color: rgba(255, 255, 255, 0.9);
}

.stat-card-change.negative {
  color: rgba(255, 255, 255, 0.7);
}

/* Chart Containers */
.chart-container {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.chart-container:hover {
  box-shadow: var(--shadow-md);
}

.chart-wrapper {
  position: relative;
  height: 300px;
  margin-top: 1rem;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-title i {
  color: var(--primary);
}

/* Progress Bars */
.progress-container {
  margin: 1rem 0;
}

.progress-container:last-child {
  margin-bottom: 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-bar-wrapper {
  height: 10px;
  background: var(--bg-light);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-1) 100%);
  border-radius: 10px;
  transition: width 1s ease-out;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Leaderboard */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  background: var(--bg-light);
}

.leaderboard-item:hover {
  background: rgba(108, 62, 249, 0.05);
  transform: translateX(5px);
}

.leaderboard-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 1rem;
  background: var(--primary);
  color: white;
}

.leaderboard-rank.top {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.leaderboard-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.leaderboard-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Activity Feed */
.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-left: 3px solid var(--border-color);
  margin-bottom: 1rem;
  transition: var(--transition);
  border-radius: 0 8px 8px 0;
}

.activity-item:hover {
  background: var(--bg-light);
  border-left-color: var(--primary);
  transform: translateX(5px);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 62, 249, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.activity-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

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

/* Widget Grid */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.widget {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.widget:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-action {
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.widget-action:hover {
  transform: scale(1.2);
}

/* Map Container */
.map-container {
  height: 400px;
  background: var(--bg-light);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.map-region {
  position: absolute;
  background: rgba(108, 62, 249, 0.1);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.map-region:hover {
  background: rgba(108, 62, 249, 0.2);
  transform: scale(1.1);
  z-index: 10;
}

/* Funnel Chart */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  flex: 1;
  justify-content: space-between;
}

.funnel-stage {
  position: relative;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-1) 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  animation: slideIn 0.5s ease-out;
  animation-fill-mode: both;
}

.funnel-stage:nth-child(1) { animation-delay: 0.1s; }
.funnel-stage:nth-child(2) { animation-delay: 0.2s; }
.funnel-stage:nth-child(3) { animation-delay: 0.3s; }
.funnel-stage:nth-child(4) { animation-delay: 0.4s; }
.funnel-stage:nth-child(5) { animation-delay: 0.5s; }

.funnel-stage:hover {
  transform: translateX(10px);
  box-shadow: 0 4px 12px rgba(108, 62, 249, 0.3);
}

.funnel-label {
  font-weight: 600;
}

.funnel-value {
  font-size: 1.1rem;
  font-weight: 700;
}
