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

.stat-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 10px;
}

body.dark-mode .stat-card {
  background: var(--dark-card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode .stat-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 24px;
}

.stat-icon.blue {
  background: rgba(43, 76, 226, 0.1);
  color: var(--primary-color);
}

body.dark-mode .stat-icon.blue {
  background: rgba(43, 76, 226, 0.2);
  color: var(--accent-color);
}

.stat-icon.green {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

body.dark-mode .stat-icon.green {
  background: rgba(46, 204, 113, 0.2);
}

.stat-icon.orange {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

body.dark-mode .stat-icon.orange {
  background: rgba(243, 156, 18, 0.2);
}

.stat-icon.purple {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
}

body.dark-mode .stat-icon.purple {
  background: rgba(155, 89, 182, 0.2);
}

.stat-info h3 {
  font-size: 24px;
  margin-bottom: 5px;
}

body.dark-mode .stat-info h3 {
  color: var(--dark-text-color);
}

.stat-info p {
  color: #777;
  font-size: 14px;
}

body.dark-mode .stat-info p {
  color: #aaa;
}

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

body.dark-mode .chart-card {
  background: var(--dark-card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.chart-title {
  font-size: 18px;
  font-weight: 600;
}

body.dark-mode .chart-title {
  color: var(--dark-text-color);
}

.chart-actions button {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  margin-left: 10px;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.3s;
}

body.dark-mode .chart-actions button {
  color: #aaa;
}

.chart-actions button:hover {
  background: #f0f0f0;
}

body.dark-mode .chart-actions button:hover {
  background: var(--dark-sidebar-hover);
}

.chart-container {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
}

body.dark-mode .chart-container {
  background: #333;
}

.chart-placeholder {
  text-align: center;
  color: #777;
}

body.dark-mode .chart-placeholder {
  color: #aaa;
}

.chart-placeholder i {
  font-size: 48px;
  margin-bottom: 15px;
  color: #ddd;
}

body.dark-mode .chart-placeholder i {
  color: #555;
}

.recent-activity {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

body.dark-mode .recent-activity {
  background: var(--dark-card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.activity-item:last-child {
  border-bottom: none;
}

body.dark-mode .activity-item {
  border-bottom: 1px solid var(--dark-border-color);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.activity-icon.yellow {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

body.dark-mode .activity-icon.yellow {
  background: rgba(243, 156, 18, 0.2);
}

.activity-icon.purple {
  background: rgba(155, 89, 182, 0.1);
  color: #9b59b6;
}

body.dark-mode .activity-icon.purple {
  background: rgba(155, 89, 182, 0.2);
}

.activity-icon.red {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

body.dark-mode .activity-icon.red {
  background: rgba(231, 76, 60, 0.2);
}

.activity-icon.blue {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

body.dark-mode .activity-icon.blue {
  background: rgba(52, 152, 219, 0.2);
}

.activity-icon.green {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}

body.dark-mode .activity-icon.green {
  background: rgba(46, 204, 113, 0.2);
}

.activity-icon.orange {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

body.dark-mode .activity-icon.orange {
  background: rgba(243, 156, 18, 0.2);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  margin-bottom: 5px;
}

body.dark-mode .activity-title {
  color: var(--dark-text-color);
}

.activity-desc {
  color: #777;
  font-size: 14px;
  margin-bottom: 5px;
}

body.dark-mode .activity-desc {
  color: #bbb;
}

.activity-time {
  color: #aaa;
  font-size: 12px;
}

body.dark-mode .activity-time {
  color: #888;
}

.activity-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

body.dark-mode .activity-pagination {
  border-top: 1px solid var(--dark-border-color);
}

.pagination-info {
  color: #777;
  font-size: 14px;
}

body.dark-mode .pagination-info {
  color: #aaa;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-size-selector label {
  color: #777;
  font-size: 14px;
}

body.dark-mode .page-size-selector label {
  color: #aaa;
}

.page-size-selector select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
}

body.dark-mode .page-size-selector select {
  background: var(--dark-card-bg);
  border-color: var(--dark-border-color);
  color: var(--dark-text-color);
}

.pagination-buttons {
  display: flex;
  gap: 5px;
}

.pagination-btn {
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.dark-mode .pagination-btn {
  background: var(--dark-card-bg);
  border-color: var(--dark-border-color);
  color: var(--dark-text-color);
}

body.dark-mode .pagination-btn:hover:not(:disabled) {
  background: var(--dark-sidebar-hover);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    flex-direction: row;
  }

  .activity-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .pagination-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .pagination-controls {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .page-size-selector,
  .pagination-buttons {
    width: 100%;
  }

  .pagination-buttons {
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.chart-canvas-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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