.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-nav {
  position: relative;
}

.account-icon-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #9aa3b2;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.account-icon-btn svg,
.account-icon-btn img {
  width: 22px;
  height: 22px;
}

.account-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-icon-btn span {
  font: 600 0.78rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
}

.account-icon-btn:hover,
.account-icon-btn:focus-visible {
  color: #f4f6f8;
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.account-icon-btn.signed-in {
  color: #1f8f4e;
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.14);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.16);
}

.account-icon-btn.signed-in:hover,
.account-icon-btn.signed-in:focus-visible {
  color: #19c463;
  border-color: #4ae08a;
}

.account-status-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2ecc71;
  border: 2px solid #050608;
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.4);
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(20.5rem, calc(100vw - 2rem));
  background: #fff;
  color: #1b212b;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(15, 23, 32, 0.08);
  padding: 0.45rem;
  z-index: 40;
}

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

.account-menu-identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem 0.75rem;
}

.account-menu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.16);
  color: #1f8f4e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.account-menu-avatar svg {
  width: 20px;
  height: 20px;
}

.account-menu-identity strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.account-menu-identity span {
  display: block;
  font-size: 0.78rem;
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 15rem;
}

.account-menu-sep {
  height: 1px;
  background: #eef0f3;
  margin: 0.15rem 0.35rem;
}

.account-menu button,
.account-menu a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  padding: 0.62rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.account-menu button:hover,
.account-menu a:hover {
  background: #f4f6f8;
}

.account-menu .account-menu-signout {
  color: #c43131;
}

.account-menu .account-menu-signout:hover {
  background: #fff1f1;
}

.account-menu-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.account-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.55);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.account-overlay[hidden] {
  display: none;
}

.account-dialog {
  width: min(26rem, 100%);
  background: #151a22;
  color: #f4f6f8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 1.25rem;
}

.account-dialog h2 {
  margin: 0 0 0.35rem;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-dialog p {
  margin: 0 0 1rem;
  color: #9aa3b2;
  font-size: 0.9rem;
}

.account-dialog label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #9aa3b2;
}

.account-dialog input {
  width: 100%;
  border: 0;
  padding: 0.75rem 0.8rem;
  font: inherit;
  color: #111;
  background: #fff;
}

.account-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.account-dialog .btn {
  border: none;
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.1rem;
}

.account-dialog .btn-primary {
  background: #1e4b8f;
  color: #fff;
}

.account-dialog .btn-ghost {
  background: transparent;
  color: #c8d0db;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.clerk-mount {
  min-height: 12rem;
}
