/* Same account entry and popover geometry as UniDoc; colors follow UniCell's theme. */
#btn-account {
  width: 36px; min-width: 36px; max-width: 36px; height: 36px;
  padding: 0; gap: 0; justify-content: center; border: 0; background: transparent;
}
#btn-account:hover, #btn-account[aria-expanded="true"] { background: var(--m3-surface-container); }
#btn-account .rb-account-avatar {
  position: relative; width: 30px; height: 30px; flex: 0 0 30px; overflow: hidden;
  border: 1px solid var(--m3-outline-variant); background: var(--m3-surface-container-low);
  color: var(--m3-on-surface-muted); font: 600 13px/1 var(--font-ui);
}
#btn-account[data-authenticated="true"] .rb-account-avatar {
  border-color: transparent; background: #0b57d0; color: #fff;
}
#btn-account .rb-account-avatar::before, #btn-account .rb-account-avatar::after { content: none; }
#account-label, .account-menu[hidden], .account-menu [hidden], #account-avatar [hidden] { display: none; }
.account-guest-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-picture { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.account-menu {
  position: fixed; top: 56px; right: 8px; z-index: 1200; box-sizing: border-box;
  width: min(312px, calc(100vw - 16px)); padding: 10px;
  max-height: calc(100dvh - 72px); overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--m3-hairline); border-radius: 18px;
  background: color-mix(in srgb, var(--m3-surface) 98%, transparent);
  box-shadow: 0 2px 7px #1f293714, 0 18px 48px #1f293726;
  color: var(--m3-on-surface); font: 13px/1.4 var(--font-ui); backdrop-filter: blur(18px);
}
.account-menu:focus { outline: none; }
.account-menu-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 8px 12px; }
.account-menu-avatar {
  display: grid; place-items: center; box-sizing: border-box; width: 46px; height: 46px;
  overflow: hidden; border: 3px solid var(--m3-surface); border-radius: 50%;
  background: #315e8a; color: #fff; box-shadow: 0 0 0 2px var(--m3-primary-container); font: 600 18px/1 var(--font-ui);
}
.account-menu-guest { color: var(--m3-on-surface-muted); background: var(--m3-surface-container-low); }
.account-menu-copy { min-width: 0; display: grid; gap: 2px; text-align: left; }
.account-menu-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; font-weight: 600; }
.account-menu-copy small { color: var(--m3-on-surface-muted); font-size: 10.5px; line-height: 16px; overflow-wrap: anywhere; }
.account-menu-summary strong { font-size: 15px; line-height: 20px; font-weight: 700; }
.account-menu-summary small { font-size: 11.5px; }
.account-menu-connection { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center; margin: 0 2px 8px; padding: 9px 10px; border: 1px solid var(--m3-primary-container); border-radius: 12px; background: color-mix(in srgb, var(--m3-primary-container) 24%, var(--m3-surface)); }
.account-menu svg:not(.account-guest-icon) { width: 20px; height: 20px; justify-self: center; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-menu-connection > svg { color: var(--m3-primary); }
.account-menu-actions { display: grid; padding-top: 4px; border-top: 1px solid var(--m3-hairline); }
.account-menu-actions button { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 6px 9px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.account-menu-actions button:hover { background: var(--m3-surface-container); }
.account-menu button:disabled { opacity: .55; cursor: wait; }
.account-menu-privacy { display: block; padding: 9px 8px 2px; color: var(--m3-on-surface-muted); font-size: 10px; line-height: 16px; text-align: center; }
.account-menu-state { display: grid; gap: 10px; padding: 8px; }
.account-menu-state .account-menu-summary { padding: 0 0 6px; }
.account-menu-state p { margin: 0; color: var(--m3-on-surface-muted); font-size: 12px; line-height: 1.6; }
.account-menu-state .account-primary { justify-self: stretch; }
.account-menu .account-error { margin: 8px 2px 0; }
@media (max-width: 720px) {
  .account-menu { width: min(360px, calc(100vw - 16px)); }
  .account-menu-actions button { min-height: 52px; }
}
