.social-layout > .shared-social-sidebar {
  position: relative;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid #425058 !important;
  border-radius: 23px !important;
  background: linear-gradient(180deg, #171e22, #101619) !important;
  box-shadow: 0 28px 75px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .075) !important;
}

/* O painel acompanha a leitura da página sem ficar preso ao topo da janela. */
.social-layout > .shared-social-sidebar {
  position: sticky !important;
  top: 18px !important;
  align-self: start;
  overflow: visible !important;
}

.social-layout > .shared-social-sidebar::before {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 255, 0, .65), transparent);
  pointer-events: none;
}

.social-layout > .shared-social-sidebar .social-cover {
  height: 124px !important;
  background-color: #1b2821 !important;
  background-size: cover !important;
}

.social-layout > .shared-social-sidebar .social-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 11, .03), rgba(17, 24, 27, .88));
  pointer-events: none;
}

.social-layout > .shared-social-sidebar .community-private-status {
  top: 10px !important;
  min-height: 27px;
  padding: 0 9px !important;
  border-color: rgba(118, 143, 154, .58) !important;
  border-radius: 9px !important;
  background: rgba(12, 19, 23, .82) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45) !important;
}

.social-layout > .shared-social-sidebar .community-private-status b {
  letter-spacing: .11em !important;
}

.social-layout > .shared-social-sidebar .social-person {
  padding: 47px 15px 14px !important;
  background: linear-gradient(180deg, #181f23, #151c20) !important;
}

.social-layout > .shared-social-sidebar .social-person > .social-avatar {
  top: -36px !important;
  width: 72px !important;
  height: 72px !important;
  overflow: hidden;
  border: 4px solid #171e22 !important;
  border-radius: 21px !important;
  background: linear-gradient(145deg, #324149, #1b252a) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .58), 0 0 0 1px #56656c !important;
}

.social-layout > .shared-social-sidebar .social-person h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f3f6f7;
  font-size: 18px !important;
  letter-spacing: -.025em;
}

.social-layout > .shared-social-sidebar .social-person > p {
  margin-bottom: 13px !important;
  color: #7f8c92 !important;
}

.social-layout > .shared-social-sidebar .social-counts {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 165px;
  gap: 0 !important;
  padding: 5px 0;
}

.social-layout > .shared-social-sidebar .social-counts::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 50%;
  width: 1px;
  background: linear-gradient(transparent, #536068, transparent);
}

.social-layout > .shared-social-sidebar .social-counts b {
  min-width: 0 !important;
  padding: 6px 9px !important;
  color: #f3f6f7;
  font-size: 15px !important;
}

.social-layout > .shared-social-sidebar .social-counts small {
  color: #718087 !important;
  font-size: 7px !important;
  font-weight: 650;
}

.social-layout > .shared-social-sidebar .social-mini-badges {
  justify-content: center;
  min-height: 42px !important;
  padding: 7px 0 8px !important;
}

.social-layout > .shared-social-sidebar .social-mini-badges .badge-icon {
  width: 29px !important;
  height: 29px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: transform .2s ease, border-color .2s ease;
}

.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:hover .badge-icon {
  transform: translateY(-2px);
}

.social-layout > .shared-social-sidebar .social-mini-badges .badge-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .5));
}

/* Mantém o desenho original e apenas recolhe o último balão para dentro do painel. */
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip.badge-tooltip-modern,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip-replica.dash-badge-tip {
  transform: translate(calc(-50% - 23px), 8px) !important;
}

.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:hover .badge-tooltip,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:focus-visible .badge-tooltip,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:hover .badge-tooltip.badge-tooltip-modern,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:focus-visible .badge-tooltip.badge-tooltip-modern,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:hover .badge-tooltip-replica.dash-badge-tip,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child:focus-visible .badge-tooltip-replica.dash-badge-tip {
  transform: translate(calc(-50% - 23px), 0) !important;
}

.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip::after,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip.badge-tooltip-modern::after,
.social-layout > .shared-social-sidebar .social-mini-badges .user-badge:last-child .badge-tooltip-replica.dash-badge-tip::after {
  left: calc(50% + 23px) !important;
}

.social-layout > .shared-social-sidebar .social-profile-button {
  display: inline-flex !important;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  padding: 0 13px !important;
  border: 1px solid #48565e;
  border-radius: 10px !important;
  background: linear-gradient(145deg, #273139, #20282e) !important;
  color: #e8edef;
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
}

.social-layout > .shared-social-sidebar .social-profile-button:hover {
  border-color: #96c439;
  background: #293622 !important;
  color: #c9ff56;
}

.social-layout > .shared-social-sidebar .social-menu {
  position: relative;
  padding: 16px 12px 13px !important;
  border-top: 1px solid rgba(144, 161, 170, .12);
  background: #12191d;
}

.social-layout > .shared-social-sidebar .social-menu::before {
  content: "MENU" !important;
  display: block;
  padding: 0 8px 8px !important;
  color: #68777e;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .22em;
}

.social-layout > .shared-social-sidebar .social-menu a {
  position: relative;
  min-height: 45px !important;
  border: 1px solid transparent;
  color: #aab3b8;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.social-layout > .shared-social-sidebar .social-menu a:hover {
  border-color: #354249;
  background: #1b2429;
  color: #f3f6f7;
  transform: translateX(2px);
}

.social-layout > .shared-social-sidebar .social-menu a i {
  border: 1px solid #3e4b52;
  background: linear-gradient(145deg, #222d33, #192126);
  color: #aab6bc;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.social-layout > .shared-social-sidebar .social-menu a.active {
  border-color: #b8ff00 !important;
  background: linear-gradient(100deg, #b8ff00, #9ee300) !important;
  color: #10150b !important;
  box-shadow: 0 9px 24px rgba(184, 255, 0, .16), inset 0 1px rgba(255, 255, 255, .4);
}

.social-layout > .shared-social-sidebar .social-menu a.active i {
  border-color: rgba(20, 40, 0, .14);
  background: rgba(255, 255, 255, .22);
  color: #183000;
}

.social-layout > .shared-social-sidebar .social-menu a > b {
  color: #65737a;
  font-size: 20px;
  font-weight: 500;
  transition: transform .2s ease;
}

.social-layout > .shared-social-sidebar .social-menu a:hover > b { transform: translateX(2px); }
.social-layout > .shared-social-sidebar .social-menu a.active > b { color: #315600; }

.social-layout > .shared-social-sidebar .social-storage {
  position: relative;
  overflow: hidden;
  margin: 0 12px 12px !important;
  padding: 13px !important;
  border: 1px solid #44534b;
  border-radius: 15px;
  background: radial-gradient(circle at 100% 100%, rgba(184, 255, 0, .1), transparent 45%), linear-gradient(145deg, #202a25, #18201d);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
}

.social-layout > .shared-social-sidebar .social-storage > b {
  color: #c6ced0;
  font-size: 8px;
  letter-spacing: .04em;
}

.social-layout > .shared-social-sidebar .social-storage p {
  margin: 8px 0 !important;
}

.social-layout > .shared-social-sidebar .social-storage .progress {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #303a3f;
}

.social-layout > .shared-social-sidebar .social-storage .progress i {
  border-radius: inherit;
  background: linear-gradient(90deg, #7eaa34, #b8ff00);
  box-shadow: 0 0 10px rgba(184, 255, 0, .34);
}

@media (prefers-reduced-motion: no-preference) {
  .social-layout > .shared-social-sidebar { animation: shared-sidebar-enter .45s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes shared-sidebar-enter {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

@media (max-width: 750px) {
  .social-layout > .shared-social-sidebar {
    position: static !important;
  }
}
