* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
--primary-color: #6366f1;
--secondary-color: #f8fafc;
--accent-color: #10b981;
--text-primary: #1f2937;
--text-secondary: #6b7280;
--border-color: #e5e7eb;
--hover-color: #f3f4f6;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--sidebar-width: 280px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: var(--secondary-color);
color: var(--text-primary);
line-height: 1.6;
}

.dashboard {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  width: var(--sidebar-width);
  background: white;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
  color: white;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sidebar-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
}

.nav-list {
  list-style: none;
  padding: 1rem;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-item:hover{
  background-color: var(--primary-color);
  opacity: 0.8;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  background-color: var(--hover-color);
  transform: translateX(4px);
}

.nav-link.active {
background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
color: white;
box-shadow: var(--shadow);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--accent-color);
}


.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-height: 100vh;
}

.header {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: var(--transition);
}

.hamburger:hover {
  background-color: var(--hover-color);
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

.content {
  padding: 2rem;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-change.positive {
  color: var(--accent-color);
}

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

.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.chart-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.chart-header {
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.chart-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.chart-container {
  padding: 0 1.5rem 1.5rem;
  position: relative;
  height: 300px;
}

.chart-summary {
  padding: 1rem 1.5rem;
  background-color: var(--secondary-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-secondary);
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
0% {
  transform: rotate(0deg);
}

100% {
  transform: rotate(360deg);
}
}

/* Mobile Styles */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .header {
    padding: 1rem;
  }

  .content {
    padding: 1rem;
  }

  .charts-container {
    grid-template-columns: 1fr;
  }

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

  .page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 250px;
  }

  .charts-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
