/* ACCOUNT MENU (2026-09-04, user's decision): the bare header links
 * (Admin / Password / Sign out) and the theme pill made a contrast - now
 * EVERYTHING lives in one dropdown styled like the pill: account name +
 * role, day/night modes, Admin, Change password, Sign out. On every page.
 * Looks and open/close only - no session logic. */

.acct {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 2000;
}

.acct-trigger {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 82%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.acct-trigger:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16); }
.acct-trigger img { width: 26px; height: 26px; display: block; }

/* Dropdown: the same card as the theme pill (blur + border + shadow).
   The animation is smooth - opacity + shift; we do not use [hidden] (it
   would kill the transition), the closed state is visibility. */
.acct-menu {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.acct.open .acct-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.acct-who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px;
  font-weight: 600;
  color: var(--text);
}
.acct-role {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--btn-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.acct-sep { height: 1px; margin: 4px 2px; background: var(--border); }

.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
}
.acct-label { color: var(--muted); font-size: 0.85rem; }

.acct-item {
  display: block;
  padding: 8px 8px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.12s ease;
}
.acct-item:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.acct-signout { font-weight: 600; }

/* The theme pill INSIDE the menu: the old look, but not fixed. */
.acct-menu .theme-switch {
  position: static;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 640px) {
  .acct { top: 8px; right: 8px; }
}
