body.has-sidebar-v2 {
  padding-left: 260px;
}

.sidebar-v2 {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 260px;
  background: #054373;
  border-right: 1px solid #e5e5e5;
  padding: 1rem;
  overflow-y: auto;
  z-index: 1030;
}

.sidebar-v2 .nav {
  flex-direction: column;
}

.sidebar-v2 .nav-link {
  padding: .4rem 0;
}

.sidebar-brand img {
  max-height: 78px;
  width: auto;
  height: auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
}

/* Make topbar container a positioning context so the toggle can be
   aligned vertically inside the topbar */
.topbar .container {
  position: relative;
}

.main {
  background: #f5f7fb;
  padding-top: 24px;
  padding-bottom: 24px;
  min-height: calc(100vh - 140px);
}

.header-v2 {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.header-v2 h1 {
  margin-bottom: 8px;
}

.sidebar-v2 .nav-link,
.sidebar-v2 .nav-link:visited {
  color: #ffffff;
}

.sidebar-v2 .nav-link:hover,
.sidebar-v2 .nav-link:focus {
  color: #dbe7f5;
}

.sidebar-v2 hr {
  border-top: 1px solid #e6e9f9 !important;
  border-color: #e6e9f9 !important;
  opacity: 1 !important;
}

.sidebar-v2 #button-search {
  background: #e6e9f9;
  border-color: #e6e9f9;
  color: #054373;
}

.sidebar-v2 #button-search:hover,
.sidebar-v2 #button-search:focus {
  background: #e6eef9;
  border-color: #e6eef9;
  color: #054373;
}

.sidebar-toggle {
  display: none;
  /* position inside the topbar container and vertically centered */
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  z-index: 1040;
  background: #054373;
  border-color: #054373;
  /* make sure touch target is large enough */
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .6rem;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  background: #04365c;
  border-color: #04365c;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1025;
}

@media (max-width: 991.98px) {
  body.has-sidebar-v2 {
    padding-left: 0;
  }

  .sidebar-v2 {
    transform: translateX(-100%);
    transition: transform .2s ease-in-out;
  }

  body.sidebar-open .sidebar-v2 {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-flex;
    /* make the toggle fill the topbar height for easier tap targets */
    z-index: 1000;
    min-width: 25px;
    min-height: 25px;
    height: 100%;

  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

/* ===== Dropdown (menu do usuário / topbar) – UX visual ===== */
.topbar .dropdown .dropdown-toggle.accessibility-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  color: #1f2a37;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.topbar .dropdown .dropdown-toggle.accessibility-item:hover,
.topbar .dropdown .dropdown-toggle.accessibility-item:focus {
  background-color: #f0f4f9;
  color: #054373;
  text-decoration: none;
}

.topbar .dropdown .dropdown-toggle.accessibility-item[aria-expanded="true"] {
  background-color: #e8eef6;
  color: #054373;
}

/* Menu: não usar transform/animação para não conflitar com Popper.js */
.topbar .dropdown-menu {
  min-width: 200px;
  padding: 0.25rem;
  margin-top: 0.35rem;
  border: 1px solid rgba(5, 67, 115, 0.14);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.topbar .dropdown-menu .dropdown-item {
  padding: 0.15rem 0.65rem;
  border-radius: 6px;
  color: #1f2a37;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.topbar .dropdown-menu .dropdown-item:hover,
.topbar .dropdown-menu .dropdown-item:focus {
  background-color: #e8eef6;
  color: #054373;
}

.topbar .dropdown-menu .dropdown-item:active {
  background-color: #d4e0f2;
}

.topbar .dropdown-menu .dropdown-divider {
  margin: 0.2rem 0;
  border-top: 1px solid rgba(5, 67, 115, 0.1);
}
