:root {
  --screen-width: 1200px;
}

/* Reset */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* =================== DESKTOP HEADER =================== */
.desktop-header {
  display: none; /* hidden by default; shown below in media query */
  background-color: #212529; /* dark background */
  color: #fff;
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%;
  z-index: 999;
  padding: 0.5rem 1rem;
}


/* Adjust the HR lines if you want less/more spacing */
.desktop-header hr {
  margin: 0.5rem 0;
  border-color: rgba(255, 255, 255, 0.2);
}

/* The brand/logo area inside the desktop header */
.desktop-header div > img {
  /* The <img> inside the first div */
  /* You can keep "width:4.9rem" or change it here. */
}
.desktop-header h3 {
  margin: 0;
}

/* Horizontal nav links inside the desktop header */
.desktop-header .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
  border-radius: 4px;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
}

.desktop-header .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.desktop-header .nav-link.active {
  background-color: #0d6efd;
  color: #fff !important;
}

.icon_title {
  display: flex;
  align-items: center;
  gap: 5px; /* small spacing between icon and text */
}

/* =================== MOBILE HEADER =================== */
.mobile-header {
  display: none; /* shown in mobile media query */
  background-color: #212529;
  padding: 10px 15px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  color: white;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-menu-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 5px 10px;
}

/* =================== SIDEBAR (mobile) =================== */
.sidebar {
  background-color: #212529;
  color: white;
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 1rem;
  z-index: 1020;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  transform: translateX(-100%); /* hidden by default on mobile */
}

/* When open on mobile, slide it in */
.sidebar.sidebar-mobile-open {
  transform: translateX(0);
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.sidebar-header {
  text-align: center;
  margin-bottom: 1rem;
}
.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 6px 8px;
}
.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}
.sidebar .nav-link.active {
  background-color: #0d6efd;
  color: #fff !important;
}

/* =================== MAIN CONTENT =================== */
.content {
  padding: 1rem;
  margin-top: 60px; /* space for fixed desktop header or mobile header */
  transition: margin-left 0.3s ease-in-out;
}

/* If the sidebar is open on mobile, shift content to the right (optional) */
.sidebar.sidebar-mobile-open ~ .content {
  margin-left: 250px;
}

/* =================== MEDIA QUERIES =================== */
/* MOBILE (max-width: 767px) */
@media (max-width: 767px) {
  /* Hide desktop header, show mobile header */
  .desktop-header {
      display: none;
  }
  .mobile-header {
      display: flex;
  }
}

/* DESKTOP (min-width: 768px) */
@media (min-width: 768px) {
  /* Show desktop header, hide mobile header & sidebar */
  .desktop-header {
      display: block; /* or flex, but you have stacked elements so block is fine */
  }
  .mobile-header {
      display: none;
  }
  .sidebar {
      display: none;
  }
  .content {
      margin-left: 0; /* no sidebar on desktop */
      margin-top: 180px; /* adjust if you need more space below the header */
  }
}
