/* Shared Account / user menu (app header + customer portal) */

.account-menu {
  margin-left: 0.35rem;
  flex-shrink: 0;
  position: relative;
  z-index: 60;
}

.account-menu-wrap {
  position: relative;
}

.account-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  appearance: none;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.28rem 0.65rem 0.28rem 0.28rem;
  cursor: pointer;
  font: inherit;
  max-width: min(16rem, 46vw);
}

.account-menu-btn:hover {
  border-color: #475569;
  background: #111827;
}

.account-menu-btn:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

.account-menu-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0d9488, #155e75);
  color: #ecfeff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.account-menu-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}

.account-menu-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
  max-width: 8.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.account-menu-notify {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  vertical-align: middle;
}

.account-menu-plan {
  font-size: 0.62rem;
  color: #94a3b8;
  max-width: 8.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-caret {
  color: #64748b;
  font-size: 0.7rem;
  margin-right: 0.1rem;
}

.account-menu-meta {
  padding: 0.35rem 0.7rem 0.45rem;
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 14.5rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.55rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-menu-dropdown[hidden] {
  display: none !important;
}

.account-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.7rem;
  border-radius: 0.4rem;
  color: #e2e8f0;
  text-decoration: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.account-menu-item:hover {
  background: #1e293b;
  color: #5eead4;
}

.account-menu-item.accent {
  color: #5eead4;
}

.account-menu-divider {
  height: 1px;
  background: #334155;
  margin: 0.25rem 0.35rem;
}

@media (max-width: 767px) {
  .account-menu-btn {
    padding: 0.28rem 0.55rem 0.28rem 0.28rem;
    max-width: min(11.5rem, 52vw);
  }
  .account-menu-plan {
    display: none;
  }
  .account-menu-name {
    font-size: 0.8rem;
  }
}
