body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* Sidebar Styles */
#sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

#sidebar .sidebar-header {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

#sidebar .sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

#sidebar ul.components {
  padding: 1rem 0;
}

#sidebar ul li a {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  display: block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

#sidebar ul li a:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

#sidebar ul li.active > a {
  color: var(--primary-color);
  background-color: var(--primary-light);
  border-right: 3px solid var(--primary-color);
}

#sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Main Content Styles */
#content {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: all 0.3s;
}

/* Navbar Styles */
.navbar-custom {
  height: var(--navbar-height);
  background-color: var(--bg-navbar);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 0 2rem;
}

/* Cards */
.card-custom {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.card-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header-custom {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-body-custom {
  padding: 1.5rem;
}

/* Dashboard Stats Cards */
.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
}

.stat-icon.primary { background-color: var(--primary-light); color: var(--primary-color); }
.stat-icon.success { background-color: #d1fae5; color: var(--success-color); }
.stat-icon.warning { background-color: #fef3c7; color: var(--warning-color); }
.stat-icon.danger { background-color: #fee2e2; color: var(--danger-color); }

.stat-details h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.stat-details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-inverse);
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--text-inverse);
}

/* DataTables Overrides */
div.dataTables_wrapper div.dataTables_length select {
  width: auto !important;
  padding: 0.375rem 2rem 0.375rem 0.75rem !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

div.dataTables_wrapper div.dataTables_filter input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
}

table.dataTable.table-striped > tbody > tr.odd > * {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.02);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }
  #sidebar.active {
    margin-left: 0;
  }
  #content {
    width: 100%;
    margin-left: 0;
  }
  #content.active {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    position: absolute;
  }
}
