.topbar {
  -webkit-transition: all 0.5s ease-in-out;
}

body:has(.sidebar.scrolled) .topbar {
  background: linear-gradient(90deg, rgba(247, 221, 180, 1) 0%, rgba(247, 195, 169, 1) 100%);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1200;
}

.navbar {
  align-items: start;
}

.right-area {
  margin-left: 100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Botão hamburguer fixo */
.menu-button {
  position: fixed;
  top: 7px;
  left: 15px;
  z-index: 1100;
  color: #222;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 4px;
}

@media (min-width: 992px) {
  .topbar {
    padding: 0 7rem;
  }

  .menu-button {
    margin-left: 7rem;
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  width: 350px;
  height: 100%;
  background: #fff;
  padding-top: 60px;
  transition: 0.3s ease;
  z-index: 1050;
}

.sidebar li {
  width: max-content;
}

.sidebar li .dropdown-toggle {
  padding-left: .5rem !important;
}

.sidebar li .dropdown-menu {
  width: max-content;
}

/* Abre usando transform (mais suave) */
#menuToggle:checked~.sidebar {
  left: 0;
}

/* Quando estiver aberto */
#menuToggle:checked+.topbar .menu-button {
  border: 1px solid #222;
}

/* Ícones */
.icon-close {
  display: none;
}

#menuToggle:checked+.topbar .menu-button .icon-open {
  display: none;
  width: 3rem;
}

#menuToggle:checked+.topbar .menu-button .icon-close {
  display: inline;
  width: 1.5rem;
}

/* Lista vertical */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-list a {
  display: block;
  padding: 15px;
  color: #222;
  text-decoration: none;
}

.menu-list a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1040;
}

#menuToggle:checked~.menu-overlay {
  opacity: 1;
  visibility: visible;
}

.dropdown {
  margin-left: -.5rem !important;
}