/* ===== SKEUOMORPHIC ANALYTICS UI DESIGN ===== */

.analytics-content {
  width: 100%;
  padding: 30px;
}

/* Skeuomorphic Analytics Header */
.analytics-header {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.25),
    0 5px 15px rgba(0, 0, 0, 0.12),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.15),
    inset 1px 0 2px rgba(255, 255, 255, 0.7),
    inset -1px 0 2px rgba(0, 0, 0, 0.1);
  border: 3px solid #c0c4c8;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.analytics-header::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
  border-radius: 18px 18px 0 0;
}

.analytics-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Baloo 2', cursive;
}

/* Skeuomorphic Time Range Buttons */
.time-range-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-btn {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed);
  color: #1e293b;
  border: 2px solid #b8bcc2;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.range-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 10px 10px 0 0;
}

/* Error and no-data states */
.error-message,
.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(145deg, #fef2f2, #fee2e2);
    border-radius: 12px;
    border: 2px solid #fecaca;
    color: #dc2626;
    margin: 20px 0;
}

.no-data-message {
    background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
    border-color: #bae6fd;
    color: #0369a1;
}

.no-data-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.error-message h3,
.no-data-message h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.error-message p,
.no-data-message p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

.range-btn:hover {
  background: linear-gradient(145deg, #e0e2e5, #d8dadd);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.range-btn.active {
  background: linear-gradient(145deg, #4CAF50, #45a049, #3d8b40);
  color: white;
  border-color: #2e7d32;
  box-shadow: 
    0 8px 20px rgba(76, 175, 80, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Skeuomorphic Stats Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef, #dee2e6);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 
    0 12px 25px rgba(0, 0, 0, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08),
    inset 1px 0 2px rgba(255, 255, 255, 0.6),
    inset -1px 0 2px rgba(0, 0, 0, 0.06);
  border: 2px solid #d0d4d8;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4), rgba(255,255,255,0.9));
  border-radius: 14px 14px 0 0;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 16px 35px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  font-size: 3rem;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.stat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1e293b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  font-family: 'Baloo 2', cursive;
}

.stat-label {
  font-size: 1rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Skeuomorphic Charts Section */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.chart-container {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef, #dee2e6);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.08),
    inset 2px 0 4px rgba(255, 255, 255, 0.6),
    inset -2px 0 4px rgba(0, 0, 0, 0.06);
  border: 2px solid #d0d4d8;
  position: relative;
  transition: all 0.3s ease;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 16px 16px 0 0;
}

.chart-container:hover {
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.18),
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.08);
}

.chart-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #1e293b;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-family: 'Baloo 2', cursive;
}

/* Skeuomorphic Top Projects Section */
.top-projects-section {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef, #dee2e6);
  border-radius: 18px;
  padding: 35px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.08),
    inset 2px 0 4px rgba(255, 255, 255, 0.6),
    inset -2px 0 4px rgba(0, 0, 0, 0.06);
  border: 2px solid #d0d4d8;
  position: relative;
}

.top-projects-section::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 16px 16px 0 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #1e293b;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-family: 'Baloo 2', cursive;
}

.top-projects-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-item {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.08),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  border: 2px solid #e0e4e8;
  position: relative;
}

.project-item::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 12px 12px 0 0;
}

.project-item:hover {
  transform: translateX(10px) translateY(-2px);
  border-color: #4CAF50;
  box-shadow: 
    0 12px 24px rgba(76, 175, 80, 0.2),
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.project-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 3px solid #d0d4d8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.project-info {
  flex: 1;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  font-family: 'Baloo 2', cursive;
}

.project-stats {
  display: flex;
  gap: 15px;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 600;
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.no-data-message {
  text-align: center;
  padding: 50px;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 12px;
  box-shadow: 
    inset 0 4px 8px rgba(0, 0, 0, 0.08),
    inset 0 -2px 4px rgba(255, 255, 255, 0.5);
}

/* Header Controls */
.header-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.filter-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed);
  color: #1e293b;
  border: 2px solid #b8bcc2;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: 'Baloo 2', cursive;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.filter-select:hover {
  background: linear-gradient(145deg, #e0e2e5, #d8dadd);
  transform: translateY(-1px);
}

.filter-select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 
    0 6px 12px rgba(76, 175, 80, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* Analytics Tabs */
.analytics-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  padding: 10px;
  border-radius: 16px;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  border: 2px solid #d0d4d8;
}

.tab-btn {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed);
  color: #1e293b;
  border: 2px solid #b8bcc2;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.tab-btn:hover {
  background: linear-gradient(145deg, #e0e2e5, #d8dadd);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(145deg, #4CAF50, #45a049, #3d8b40);
  color: white;
  border-color: #2e7d32;
  box-shadow: 
    0 6px 12px rgba(76, 175, 80, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stat Change Indicator */
.stat-change {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 5px;
}

.stat-change.positive {
  color: #4CAF50;
}

.stat-change.negative {
  color: #f44336;
}

/* Large Stat Cards */
.stat-card.large {
  grid-column: span 2;
  padding: 35px;
}

.stat-details {
  font-size: 1rem;
  color: #64748b;
  margin-top: 10px;
  font-weight: 500;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.projects-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Full Width Chart */
.chart-container.full-width {
  grid-column: 1 / -1;
  margin-bottom: 30px;
}

/* Metric Cards */
.metric-card {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef, #dee2e6);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  box-shadow: 
    0 12px 25px rgba(0, 0, 0, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  border: 2px solid #d0d4d8;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 16px 35px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.metric-card h4 {
  font-size: 1rem;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  font-family: 'Baloo 2', cursive;
}

.metric-value.positive {
  color: #4CAF50;
}

.metric-value.negative {
  color: #f44336;
}

.engagement-metrics,
.trend-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* Performance Table */
.performance-table-section {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef, #dee2e6);
  border-radius: 18px;
  padding: 35px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 3px 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px rgba(0, 0, 0, 0.08);
  border: 2px solid #d0d4d8;
  margin-top: 30px;
}

.performance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.performance-table th,
.performance-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 2px solid #e0e4e8;
}

.performance-table th {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed);
  font-weight: 700;
  color: #1e293b;
  font-family: 'Baloo 2', cursive;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.performance-table tr:hover {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
}

.performance-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-badge.rank-1 {
  background: linear-gradient(145deg, #FFD700, #FFA500);
  color: #1e293b;
}

.rank-badge.rank-2 {
  background: linear-gradient(145deg, #C0C0C0, #A0A0A0);
  color: #1e293b;
}

.rank-badge.rank-3 {
  background: linear-gradient(145deg, #CD7F32, #A0522D);
  color: white;
}

.rank-badge.rank-other {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  color: #64748b;
}

/* All Projects Section */
.all-projects-section {
  margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .analytics-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-controls {
    width: 100%;
    align-items: stretch;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .analytics-tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1;
    min-width: 100px;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card.large {
    grid-column: span 2;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .performance-table {
    font-size: 0.85rem;
  }
  
  .performance-table th,
  .performance-table td {
    padding: 10px;
  }
}

