
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 20px 0;
  border-bottom: 2px solid #f1f5f9;
}

.dashboard-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
}

.dashboard-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid #d4af37;
  color: #d4af37;
}

.btn-outline:hover {
  background: #d4af37;
  color: white;
  transform: translateY(-2px);
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.premium-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #b8860b, #daa520);
  border-radius: 16px 16px 0 0;
}

.premium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #d4af37;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.stat-trend {
  opacity: 0.7;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 16px;
}

.stat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.stat-change.positive {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.stat-change.negative {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.stat-change.neutral {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
}

.stat-period {
  color: #9ca3af;
  font-style: italic;
}


.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.chart-wide {
  grid-column: 1 / -1;
}

.premium-chart {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.premium-chart:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.chart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.chart-btn:hover {
  background: #f3f4f6;
  border-color: #d4af37;
  color: #d4af37;
}

.chart-period-select {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-period-select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.chart-content {
  position: relative;
  min-height: 300px;
}

.chart-content canvas {
  max-width: 100%;
  height: auto;
}


.produtos-chart-fallback,
.clientes-chart-fallback {
  display: none;
}

.produtos-list,
.clientes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.produto-item,
.cliente-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.produto-item:hover,
.cliente-item:hover {
  transform: translateX(4px);
  border-color: #d4af37;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.produto-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  min-width: 32px;
}

.produto-info,
.cliente-info {
  flex: 1;
}

.produto-nome,
.cliente-nome {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.produto-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #64748b;
}

.cliente-email {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.cliente-ultimo-pedido {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}


.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.text-success { color: #10b981; }


.loading-message,
.empty-message {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

.empty-message {
  color: #059669;
}


.dark-theme .premium-card,
.dark-theme .premium-chart {
  background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
  border-color: #475569;
}

.dark-theme .dashboard-title {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark-theme .stat-number,
.dark-theme .chart-title,
.dark-theme .produto-nome,
.dark-theme .cliente-nome {
  color: #f1f5f9;
}

.dark-theme .stat-label,
.dark-theme .cliente-email {
  color: #cbd5e1;
}

.dark-theme .produto-item,
.dark-theme .cliente-item {
  background: linear-gradient(145deg, #374151 0%, #4b5563 100%);
  border-color: #6b7280;
}

.dark-theme .chart-header {
  border-bottom-color: #475569;
}

.dark-theme .chart-btn {
  border-color: #6b7280;
  color: #9ca3af;
}

.dark-theme .chart-btn:hover {
  background: #374151;
  border-color: #fbbf24;
  color: #fbbf24;
}


@media (max-width: 1200px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-wide {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .dashboard-title {
    font-size: 24px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .premium-card {
    padding: 16px;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .chart-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .chart-period-select {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .produto-stats {
    flex-direction: column;
    gap: 4px;
  }
  
  .stat-footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}


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

.premium-card,
.premium-chart {
  animation: fadeInUp 0.6s ease forwards;
}

.premium-card:nth-child(1) { animation-delay: 0.1s; }
.premium-card:nth-child(2) { animation-delay: 0.2s; }
.premium-card:nth-child(3) { animation-delay: 0.3s; }
.premium-card:nth-child(4) { animation-delay: 0.4s; }