.account-menu,
.account-menu * {
  box-sizing: border-box;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #abc2d6;
  font:
    400 14px/21px Inter,
    ui-sans-serif,
    system-ui,
    sans-serif;
  letter-spacing: normal;
  cursor: pointer;
  anchor-name: --account-menu-trigger;
}
.account-menu-trigger:hover,
.account-menu-trigger:has(+ :popover-open) {
  color: #e7eef5;
  background: #1b2b37;
  border-color: #2c4655;
}
.account-menu-trigger svg {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.account-menu-trigger > [role='img'] {
  display: flex;
  align-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.account-menu-name {
  max-width: min(40vw, 240px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-options {
  position: fixed;
  inset: 54px 16px auto auto;
  margin: 0;
  min-width: 200px;
  max-width: calc(100vw - 32px);
  padding: 4px;
  border: 1px solid #2c4655;
  border-radius: 8px;
  background: #121f28;
  color: #e7eef5;
  box-shadow: 0 12px 28px #0006;
  font:
    14px ui-sans-serif,
    system-ui,
    sans-serif;
}
@supports (top: anchor(bottom)) {
  .account-menu-options {
    position-anchor: --account-menu-trigger;
    top: anchor(bottom);
    right: anchor(right);
    margin-top: 6px;
  }
}
.account-menu-options nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-menu-options a,
.account-menu-options button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #abc2d6;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.account-menu-options a:hover,
.account-menu-options button:hover {
  color: #e7eef5;
  background: #1b2b37;
}
.account-menu-options form {
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px solid #2c4655;
}
.account-menu-trigger:focus-visible,
.account-menu-options a:focus-visible,
.account-menu-options button:focus-visible {
  outline: 2px solid #ffda65;
  outline-offset: 2px;
}

/* The shared dialog also renders outside the Tailwind-styled console, in API docs. */
.password-dialog {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 512px;
  max-height: 85vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #2c4655;
  border-radius: 16px;
  color: #e7eef5;
  background: #121f28;
  font:
    14px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
}
.password-dialog[open] {
  display: flex;
  flex-direction: column;
}
.password-dialog::backdrop {
  background: #0009;
}
.password-dialog > header {
  padding: 20px 24px;
  border-bottom: 1px solid #2c4655;
  flex-shrink: 0;
}
.password-dialog h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.password-dialog > div {
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.password-dialog p {
  margin: 0;
  color: #abc2d6;
}
.password-dialog form[data-password-form] {
  display: grid;
  gap: 16px;
}
.password-dialog form[data-password-form] > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.password-dialog input:not([type='hidden']) {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #2c4655;
  border-radius: 6px;
  color: #e7eef5;
  background: #0b161d;
  font: inherit;
}
.password-dialog > footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #2c4655;
  flex-shrink: 0;
  background: #0b161d40;
}
.password-dialog footer form {
  margin: 0;
}
.password-dialog footer button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #2c4655;
  border-radius: 6px;
  color: #e7eef5;
  background: #0b161d;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.password-dialog footer [data-password-save] {
  color: #121509;
  background: #ffda65;
  border-color: #ffda65;
}
.password-dialog button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.password-dialog [data-password-error] {
  color: #ff929c;
}
.password-dialog :focus-visible {
  outline: 2px solid #ffda65;
  outline-offset: 2px;
}
