.topright-pill{ position:relative; display:flex; align-items:center; }

.pill{
  display:flex;
  gap:10px;
  padding: 8px 10px;
  border-radius: 14px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);

  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.pill-btn{
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;

  display:flex;
  align-items:center;
  justify-content:center;

  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
  cursor:pointer;
}

.pill-btn:hover{ background: rgba(255,255,255,0.08); }
.pill-btn:disabled{ opacity: .55; cursor: default; }

.pill-icn{ width: 18px; height: 18px; display:block; opacity: .95; }

.pill-btn--profile{ width: 46px; gap: 6px; }
.pill-caret{ font-size: 12px; opacity: .7; margin-left: 2px; }

.pill-badge{
  position:absolute;
  top: -6px;
  right: -6px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.10);
}

/* Popover pane */
.pill-pane{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  width: 320px;
  z-index: 999;

  border-radius: 16px;
  background: rgba(18,18,18,0.92);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  overflow:hidden;
}

.pill-pane__head{ padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.pill-pane__title{ font-weight: 700; }
.pill-pane__sub{ font-size: 12px; opacity: .75; margin-top: 2px; }
.pill-pane__body{ padding: 10px 14px; display:flex; flex-direction:column; gap:8px; }

.kv{ display:flex; justify-content:space-between; }

.pill-item{
  display:block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration:none;
}
.pill-item:hover{ background: rgba(255,255,255,0.06); }
.pill-item--danger{
  color:#ff8b8b;
  background: transparent;
  border:none;
  text-align:left;
}
.pill-item--danger:hover{ background: rgba(255,139,139,0.10); }


/* Hard override: stop any global svg/img rules from blowing up the topbar */
.pill-btn > svg.pill-icn,
.pill-btn > img.pill-icn {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px !important;
}

.pill-btn {
  overflow: hidden; /* prevents any weird bleed */
}

.server-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: hidden;
}

.server-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.server-avatar--fallback {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
}
