/* BootStrap Overrides */
.btn {
  font-size: 0.875rem;
}

.btn-primary{
  background-color: #0376a3;
  border-color: #0376a3;
}

.btn-primary:hover,
.btn-primary:active, 
.btn-primary:focus {
  background-color: rgba(3,118,163,0.85) !important;
  border-color: rgba(3,118,163,0.85) !important;
}

.toast-primary {
  background-color: #0376a3 !important;
}

/* Login Styles */
/* Full-page gradient background */
body.login {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(to right, #5aa6c3, #0376a3); 
  font-family: 'Lato', Arial, sans-serif;
  color: white;
  text-align: center;
}

/* Centered content box */
.login-container {
  background: #ffffff;
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  margin-top: -50px;
}

h1 {
  color: #ec982c;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 36px;
  margin-bottom: 40px;
  
}

/* Microsoft Sign-In Button */
.sign-in-btn {
  display: inline-block;
  background: rgba(179, 179, 179, 0.5);
  color: #333;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 6px rgba(179, 179, 179, 0.8);
  transition: all 0.3s ease;
}

.sign-in-btn:hover {
  background: rgba(179, 179, 179, 0.9);
  box-shadow: 0 4px 6px rgba(179, 179, 179, 0.8);
  /* transform: translateY(-2px); */
}

/* Microsoft Logo */
.sign-in-btn img {
  width: 20px;
  height: 20px;
}

/******************** Main View **********************/

body {
  font-family: 'Poppins', 'Open Sans', Arial, sans-serif;
  background: #edf2f9;
  font-size: 0.875rem;
  
}
.wrapper {
  display: flex;
}

#sidebar {
  width: 15rem;
  height: 100vh;
  background: #edf2f9;
  color: #2f2f2f;
  /* transition: width 0.3s; */
  transition: all 0.3s ease-in-out; 
  position: fixed; /* Sidebar remains fixed */
  top: 0;
  left: 0;
  overflow: hidden; /* Prevents entire sidebar from scrolling */
  display: flex;
  flex-direction: column;
}

#sidebar.collapsed {
  width: 4rem;
}
#sidebar .sidebar-header {
  padding: 1rem;
  text-align: center;

  flex-shrink: 0; 
}
#sidebar .logo-full {
  max-height: 40px;
}
#sidebar.collapsed .logo-full {
  display: none;
}
#sidebar .logo-icon {
  width: 2.5rem;
  display: none;
}
#sidebar.collapsed .logo-icon {
  display: block;
}

#sidebar .application-title-container {
  height: 30px;
}

#sidebar .application-title {
  font-size: 2rem;
  font-weight: bold;
  color: #0376a3;
  display: block;  
}
#sidebar.collapsed .application-title {
  font-size: 2rem;
  display: none;
}


/* Scrollable Menu Items */
#sidebar .menu-container {
  flex-grow: 1; /* Allows the menu container to take remaining space */
  overflow-y: auto; /* Enables vertical scrolling */
  padding: 0.5rem 0;
}

/* Ensuring a nice scroll */
#sidebar .menu-container::-webkit-scrollbar {
  width: 0.5rem;
}

#sidebar .menu-container::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 0.25rem;
}

#sidebar .menu-container::-webkit-scrollbar-track {
  background: #2f2f2f;
}

#sidebar ul {
  padding-left: 0;
}
#sidebar ul li {
  list-style: none;
}
#sidebar ul li a {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.1rem 0.4rem 1.2rem;
  text-decoration: none;
  transition: 0.3s;
  color: #5e6e82;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: 'Poppins', 'Open Sans', Arial, sans-serif;
}
#sidebar ul li a:hover, #sidebar ul li a.active {
  color: #363636;
}
#sidebar ul li a .material-icons {
  margin-right: 1rem;
}

#sidebar ul li a .menu-text {
  padding-left: 1rem;
}

#sidebar.collapsed ul li a .menu-text {
  display: none;
}
.navbar {
  background: #edf2f9;
  padding: 1rem;
  /* width: 100%;
  position: sticky;
  top: 0; */
  width: calc(100% - 15rem); /* Top bar only covers content area */
  position: fixed;
  top: 0;
  left: 15rem; /* Prevents overlapping sidebar */
  z-index: 999; /* Below sidebar */
  z-index: 1000;
  display: flex;
  align-items: center;
}

#sidebar.collapsed + #content .navbar {
  left: 4rem; /* Adjust position when sidebar collapses */
  width: calc(100% - 4rem);
}

#sidebarToggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.topbar-title {
  color: #0376a3;
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  padding-left: 10px;
  margin-right: 5px;
  height:45px !important;
  /* border: 1px solid red; */
  padding-top: 3px !important;
}

.topbar-icon {
  color: #0376a3;
  margin-left: 15px;
  /* margin-right: 5px; */
  /* border: 1px solid red; */
  height:45px !important;
  padding-top: 6px !important;
}

/* Content Section */
#content {
  margin-left: 15rem;
  width: calc(100% - 15rem);
  padding-top: 4rem; /* Push down to avoid top bar overlap */
  transition: margin-left 0.3s, width 0.3s;
}

#sidebar.collapsed + #content {
  margin-left: 4rem;
  width: calc(100% - 4rem);
}


.profile-pic {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
}
.dropdown-menu {
  display: none;
  position: absolute;
  margin-top: -1rem;
  right: 1rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dropdown-menu a {
  text-decoration: none;
  /* transition: 0.3s; */
  color: #5e6e82;
  font-weight: 500;
  font-size: 0.8rem;
}

.profile-pic:hover + .dropdown-menu, .dropdown-menu:hover {
  display: block;
}
.content-area {
  padding: 1rem;
}

.loading {
  display: flex; /* Enable Flexbox */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  height: 100vh; /* Make the container cover the full viewport height */
}


/* Desktop: Ensure it collapses correctly */
@media (min-width: 992px) {
  #sidebar.collapsed {
      width: 4.5rem; /* Adjust width for collapsed state */
      overflow: hidden;
  }
}

/* Mobile Media CSS */
@media (max-width: 991px) {
  #sidebar {
    position: fixed;
    left: -250px; /* Hide sidebar initially */
    top: 0;
    width: 250px; /* Full expanded menu width */
    height: 100vh;
    background: #edf2f9; /* Keep full menu styling */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease-in-out;
    z-index: 1050;
  }

  /* When active, the sidebar should be fully visible */
  #sidebar.active {
      left: 0;
  }

  /* Ensure content width remains full */
  #content {
      width: 100%;
      margin-left: 0 !important;
  }

  /* Navbar to remain full width */
  .navbar {
      width: 100%;
      left: 0;
  }
}