.user-menu {
  position: relative;
  z-index: 140;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.topbar .user-menu-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  padding: 5px !important;
  flex: 0 0 44px !important;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.topbar .user-menu-trigger:disabled {
  opacity: 1;
  cursor: default;
}

.topbar .user-menu-trigger-copy {
  display: none !important;
}

.topbar .user-menu-trigger:focus-visible {
  outline: 2px solid rgba(239, 49, 36, 0.9);
  outline-offset: 3px;
}

.topbar .user-menu.is-enabled .user-menu-trigger:hover .user-avatar,
.topbar .user-menu.is-open .user-menu-trigger .user-avatar {
  box-shadow:
    0 0 0 2px #08090c,
    0 0 0 4px rgba(239, 49, 36, 0.72) !important;
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: min(286px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  background: #17181b;
  color: #f7f7f8;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.user-menu-popover.hidden {
  display: none !important;
}

.user-menu-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px 11px;
}

.user-menu-identity strong,
.user-menu-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-identity strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
}

.user-menu-identity span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 570;
  line-height: 1.3;
}

.user-menu-logout {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.user-menu-logout[hidden] {
  display: none !important;
}

.user-menu-logout:disabled {
  opacity: 0.58;
  cursor: wait;
}

.user-menu-logout:focus-visible {
  outline: 2px solid rgba(239, 49, 36, 0.9);
  outline-offset: 2px;
}

.user-menu-logout-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: rgba(239, 49, 36, 0.13);
  color: #ff655b;
}

.user-menu-logout-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .user-menu-logout:hover {
    background: rgba(255, 255, 255, 0.09);
  }
}

@media (max-width: 480px) {
  .user-menu-popover {
    top: calc(100% + 9px);
    width: min(272px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .user-menu-popover:not(.hidden) {
    animation: user-menu-enter 130ms ease-out;
    transform-origin: top right;
  }
}

@keyframes user-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
