/* Navbar module menu.
   Own file, not styles.css: styles.css is minified in place on the server at
   boot, so it is a build artefact there and cannot be patched.

   The panel is dark on purpose. The header runs on a near-black gradient and
   .header-nav-btn is styled for it; a white dropdown would have meant
   restyling all five moved buttons, and any button added later would have
   silently rendered light-on-light. Matching the header keeps them working
   exactly as they did in the bar. */

.nav-modules-wrap { position: relative; display: inline-flex; }

.nav-modules-caret {
  font-size: 9px;
  line-height: 1;
  opacity: 0.65;
  margin-left: -2px;
  transition: transform 0.14s ease;
}
.nav-modules-wrap.is-open .nav-modules-caret { transform: rotate(180deg); }

.nav-modules-menu[hidden] { display: none !important; }

.nav-modules-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 260;                 /* above .dashboard-header's own stacking (200) */
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  padding: 5px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.65);
}

/* The moved buttons keep their own look; the menu only makes them full-width
   rows instead of inline chips. */
.nav-modules-menu .header-nav-btn {
  width: 100%;
  justify-content: flex-start;
  white-space: nowrap;
}

/* A module the user may not open stays hidden here exactly as it did in the
   bar — the `hidden` class is what every access probe toggles. */
.nav-modules-menu .header-nav-btn.hidden { display: none !important; }
