:root {
  --bg-color: #f4f4f4;
  --text-color: #333;
  --card-bg: white;
  --sidebar-bg: #2f3542;
  --sidebar-text: #f1f1f1;
}

body.dark {
  --bg-color: #1e1e1e;
  --text-color: #f1f1f1;
  --card-bg: #2b2b2b;
  --sidebar-bg: #111;
  --sidebar-text: #ccc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

.container {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  height: 100vh;
  padding: 20px;
  position: fixed;
}

.sidebar h2 {
  margin-bottom: 30px;
}

.sidebar nav a {
  display: block;
  color: var(--sidebar-text);
  text-decoration: none;
  margin: 15px 0;
  font-size: 16px;
}

.sidebar nav a i {
  margin-right: 10px;
}

/* Main Content */
.main-content {
  margin-left: 220px;
  padding: 20px;
  flex: 1;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.navbar input {
  padding: 8px;
  width: 200px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.toggle-dark {
  cursor: pointer;
  font-size: 20px;
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Table */
.user-table table {
  width: 100%;
  background: var(--card-bg);
  border-collapse: collapse;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.user-table th, .user-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.user-table th {
  background: #555;
  color: white;
}

.user-table button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
}

.delete {
  color: red;
}

.form {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.form input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form button {
  padding: 8px 12px;
  background: #2f3542;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

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

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
.chart-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .chart-section {
    padding: 10px;
  }

  .form {
    flex-direction: column;
  }

  .form input, .form button {
    width: 100%;
  }
}
