/* ── Account Menu ─────────────────────────────────────────────────────────── */

/* ── Trigger ─────────────────────────────────────────────────────────────── */
.acct-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.acct-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.85);
  transition: background .14s;
  line-height: 1;
}

.acct-trigger:hover,
.acct-trigger--open {
  background: rgba(255,255,255,.1);
}

/* Avatar circle */
.acct-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

.acct-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
  flex-shrink: 0;
}

.acct-trigger-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-chevron {
  flex-shrink: 0;
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  transition: transform .18s ease;
}

.acct-trigger--open .acct-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown card ────────────────────────────────────────────────────────── */
.acct-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 264px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pop);
  box-shadow: var(--shadow-menu);
  z-index: 70;
  display: none;
  opacity: 0;
}

.acct-dropdown--open {
  display: block;
  animation: menu-in .14s ease forwards;
}

/* ── Identity block ───────────────────────────────────────────────────────── */
.acct-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.acct-identity-text {
  flex: 1;
  min-width: 0;
}

.acct-display-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-role-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-email-line {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Organization (tenant) section ───────────────────────────────────────── */
.acct-org-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  padding: 10px 16px 6px;
}

.acct-org-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 8px;
}

.acct-tenant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}

.acct-tenant-row:hover { background: var(--bg); }

.acct-tenant-row--active {
  background: var(--teal-muted);
  color: var(--navy);
  font-weight: 600;
}

.acct-tenant-check {
  color: var(--teal);
  font-weight: 700;
  opacity: 0;
  flex-shrink: 0;
}

.acct-tenant-row--active .acct-tenant-check { opacity: 1; }

/* ── Compliance strip ─────────────────────────────────────────────────────── */
.acct-compliance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--teal);
}

.acct-compliance-dot { color: #ccc; }

/* ── Divider ──────────────────────────────────────────────────────────────── */
.acct-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Menu items ───────────────────────────────────────────────────────────── */
.acct-menu {
  padding: 4px 0;
}

.acct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  transition: background .12s;
}

.acct-item:hover {
  background: var(--bg);
  color: var(--navy);
}

.acct-item--danger {
  color: var(--expired);
}

.acct-item--danger:hover {
  background: #FEF0F0;
}

.acct-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-item--danger .acct-item-icon {
  color: var(--expired);
  opacity: .8;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* No dedicated mobile layout in this pass (design target is 1440px desktop —
   see CLAUDE_CODE_BUILD.md). The dropdown still works below 640px, just
   un-optimized; only the trigger's name label hides to save header space. */
@media (max-width: 640px) {
  .acct-trigger-name {
    display: none;
  }
}
