.sidebar {
  position: relative;
  height: 100dvh;
  min-height: 0;
  overflow: visible;
}

.sidebar #nav {
  flex: 0 0 auto;
  overflow: visible;
}

.sidebar-bottom {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(115, 89, 232, .1);
}

.account-area { position: relative; }

.profile-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.profile-trigger:hover,
.account-area:has(.account-menu.open) .profile-trigger { background: rgba(255,255,255,.62); }
.profile-trigger b,.profile-trigger small { display: block; }
.profile-trigger b { font-size: .82rem; }
.profile-trigger small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.profile-trigger i { color: #77718a; font-style: normal; letter-spacing: .08em; }

.account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 80;
  padding: 8px;
  border: 1px solid rgba(93, 72, 176, .15);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 22px 55px rgba(38, 27, 80, .2);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
  transform-origin: bottom center;
  transition: .18s ease;
}

.account-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 11px;
}
.account-summary span:nth-child(2) { min-width: 0; }
.account-summary b,.account-summary small { display: block; }
.account-summary b { font-size: .82rem; }
.account-summary small { margin-top: 2px; color: var(--muted); font-size: .66rem; }

.account-menu > button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.account-menu > button:hover { background: #f1eff8; }
.account-menu > button span:nth-child(2) { min-width: 0; }
.account-menu > button b,.account-menu > button small { display: block; }
.account-menu > button b { font-size: .78rem; }
.account-menu > button small { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.account-menu > button i { color: #9690a4; font-style: normal; }
.menu-symbol { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #eeebf7; }
.brand-star,.brand-mark,.ai-orb { background: linear-gradient(145deg,#8f70f0,#5636bf)!important; color: #d7ff50!important; }
.brand-star { border-color: rgba(255,255,255,.24)!important; box-shadow: 0 10px 30px rgba(73,45,163,.28)!important; }
.ai-pill span { color: #d7ff50!important; }
.star-menu-symbol { color: #d7ff50; background: linear-gradient(145deg,#8f70f0,#5636bf); }
.account-menu-line { height: 1px; margin: 6px 4px; background: #ece9f2; }
.app-shell:not([data-role="admin"]) .admin-only { display: none; }

@media (max-width: 760px) {
  .sidebar { height: 100dvh; overflow: visible; }
}
