.sidebar {
  display: flex;
  flex-direction: column;
  width: 16rem;
  background-color: var(--main-color);
  color: var(--white-color);
  transition: all 0.3s ease;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh; 
  max-height: 100vh;
  overflow: hidden;
  z-index: 1000;
}

.sidebar-logo{
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #ffffff2a;
  height: 5rem;
  max-height: 5rem;
  white-space: nowrap;
}

.sidebar-logo img{
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--border-radius);
}

.sidebar-title{
  font-size: 0.75rem;
  padding: 0.5rem;
  color: #cff4ffce;
  font-weight: 600;
}

.sidebar-logout{
  padding: 1rem 1.5rem;
  border-top: 1px solid #ffffff2a;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 0.5rem 1.5rem;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar.closed {
  width: 0rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  border-radius: var(--border-radius);
  padding: 0.5rem;
}

.sidebar .nav-link:hover{
  background-color: rgba(5, 37, 49, 0.1);
}

.sidebar .nav-link svg {
  fill: none;
  transition: all .3s ease;
  min-width: 16px;
  min-height: 16px;
}

.sidebar .nav-link span {
  margin-left: 0.7rem;
  transition: all 0.6s ease;
  font-size: 0.875rem;
}

.sidebar .nav-link:hover svg,
.sidebar .nav-link:hover span{
  transform: translateX(0.3rem);
  transition: all .3s ease;
}

.main-content{
  width: 100%;
  max-width: 100%;
  transition: all 0.3s ease;
  margin-left: 16rem;
  margin-top: 5rem;
  background-color: var(--background-color);
}

.sidebar.closed ~ .main-content {
  margin-left: 0rem;
}

#btn-logout .nav-link svg{
  fill: #ff3e3e !important;
}
#btn-logout .nav-link span{
  color: #ff3e3e !important;
}
#btn-logout .nav-link:hover{
  background-color: #ff24242a !important;
}

#MobileToggle{
  background-color: transparent;
  border: 0;
  display: none;
}

.off-canvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  visibility: hidden; 
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999; 
  cursor: pointer;
  display: none;
}

.off-canvas-overlay.show {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  .sidebar{
    width: 60%;
    left: -60%;
    z-index: 1000 !important;
    top: 0;
    height: 100%;
    transition: all 0.3s ease;
  }
  .sidebar.closed {
    left: -60%;
  }
  .sidebar:not(.closed) {
    left: 0;
  }
  .sidebar.closed ~ .main-content {
    margin-left: 0vw;
  }
  .main-content {
    margin-left: 0vw; 
  }
  .topbar{
    width: 100% !important;
    margin-left: 0 !important;
  }
  .off-canvas-overlay {
    display: block;
  }
}



/* =================== TOPBAR =================== */

.topbar{
  display: flex;
  align-items: center;
  background-color: var(--white-color);
  color: var(--text-color);
  padding: 1.3rem;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  height: 5rem;
  max-height: 5rem;
  position: fixed;
  width: calc(100% - 16rem);
  margin-left: 16rem;
  z-index: 100;
  top: 0;
  left: 0;
  transition: all 0.3s ease;
}

.topbar ul{
  margin: 0;
  list-style: none;
}

.btn-profile{
  background-color: var(--secondary-color);
  padding: 0.5rem;
  border: 0;
}
.btn-profile:hover{
  background-color: var(--main-color);
  border: 0;
  border-radius: 0.375rem;
}

.topbar-btn{
  padding: 0.5rem;
  background-color: transparent;
  border: 0;
}

.topbar-btn:hover{
  background-color: rgba(115, 215, 255, 0.384);
  border-radius: var(--border-radius);
}

#icon-profile{
  background-color: var(--main-color);
  padding: 0.3rem;
  border-radius: 100%;
}

#dropdown-profile .dropdown-item{
  display: flex;
  align-items: center;
}

#dropdown-profile li a{
  color: white;
}

.sidebar.closed ~ .topbar {
  margin-left: 0rem !important;
  width: 100% !important;
}

