/* Menu de contexto (botão direito) e cabeçalhos minimizáveis da barra lateral, herdando as variáveis do tema ativo. */
.nav-items { display: contents; }
.nav-group.collapsed .nav-items { display: none; }
.nav-caption {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-caption:hover, .nav-caption:focus-visible { color: var(--soft); background: rgba(255, 255, 255, .04); }
.nav-cap-right { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-chev { width: 12px; height: 12px; transition: transform .18s var(--ease); opacity: .75; }
.nav-group.collapsed .nav-chev { transform: rotate(-90deg); opacity: .95; }
.nav-group.collapsed.has-active .nav-caption { color: var(--accent-hover); }

/* ---------- Menu de contexto ---------- */
.ctx-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 9999;
  min-width: 230px;
  max-width: min(310px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 6px;
  color: var(--text);
  font: 13px/1.35 var(--ui);
  border: 1px solid var(--edge-strong);
  border-top: 1px solid rgba(255, 224, 170, .3);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28, 30, 66, .97) 0%, rgba(14, 15, 36, .98) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 56px -10px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform-origin: top left;
  animation: ctx-in .12s cubic-bezier(.2, .9, .3, 1);
}
@keyframes ctx-in { from { opacity: 0; transform: scale(.96); } }
.ctx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 8px;
  border-bottom: 1px solid var(--edge);
  margin-bottom: 4px;
}
.ctx-head b {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctx-head small {
  font-size: 11px;
  color: var(--accent-hover);
  font-weight: 600;
  white-space: nowrap;
}
.ctx-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--edge);
}
.ctx-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .12s, color .12s;
}
.ctx-item svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.ctx-item:hover:not(:disabled),
.ctx-item:focus-visible:not(:disabled) {
  outline: 0;
  background: rgba(240, 184, 92, .16);
  color: #fff6e0;
}
.ctx-item:hover:not(:disabled) svg,
.ctx-item:focus-visible:not(:disabled) svg { color: var(--accent-hover); }
.ctx-item:disabled { opacity: .4; cursor: not-allowed; }
.ctx-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-badge {
  flex: none;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid rgba(240, 184, 92, .25);
}
.ctx-item.is-accent .ctx-badge {
  color: #2a1904;
  background: var(--accent-hover);
  border-color: transparent;
}
.ctx-hint {
  padding: 5px 10px 4px;
  font-size: 10.5px;
  color: var(--faint);
  text-align: center;
}
