.account-menu { position: relative; display: inline-flex; align-items: center; }
.account-menu-trigger {
  width: 40px; height: 40px; border: 1px solid rgba(148, 163, 184, .55);
  border-radius: 999px; background: #fff; color: #1f2937; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.account-menu-trigger:hover, .account-menu-trigger[aria-expanded="true"] { border-color: #93a4d8; background: #f8fafc; }
.account-menu-icon { font-size: 18px; line-height: 1; }
.account-menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; min-width: 168px;
  padding: 8px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .18);
}
.account-menu-panel[hidden] { display: none; }
.account-menu-item {
  width: 100%; min-height: 38px; display: flex; align-items: center; border: 0; border-radius: 10px;
  padding: 9px 10px; background: transparent; color: #25324b; font-size: 13px; font-weight: 800;
  text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.account-menu-item:hover { background: #f1f5ff; color: #2446a8; }
.account-menu-logout { color: #b42318; }
.account-menu-logout:hover { background: #fff1f1; color: #991b1b; }
.topbar .account-menu-trigger, .sidebar .account-menu-trigger { box-shadow: none; }
@media (max-width: 480px) { .account-menu-panel { right: 0; min-width: 154px; } }

.auth-actions { display: inline-flex; align-items: center; gap: 8px; }
.auth-actions[hidden], .account-menu[hidden], .login-modal[hidden] { display: none !important; }
.auth-action {
  min-height: 38px; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 900;
  text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.auth-action-login { border: 1px solid #c7d2fe; background: #fff; color: #233876; }
.auth-action-signup { border: 1px solid #2643c4; background: #2643c4; color: #fff; }
.auth-action:hover { transform: translateY(-1px); }
.login-modal {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  width: 100vw; min-height: 100dvh; padding: 24px; overflow-y: auto; background: rgba(15, 23, 42, .48);
  box-sizing: border-box;
}
.login-modal-card {
  position: relative; width: min(420px, 100%); max-height: calc(100dvh - 48px); margin: auto; padding: 28px;
  overflow-y: auto; border-radius: 24px; background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  box-sizing: border-box;
}
.login-modal-card h2 { margin: 0 0 6px; color: #111827; font-size: 24px; }
.login-modal-subtitle { margin: 0 0 20px; color: #64748b; font-size: 14px; }
.login-modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 26px; cursor: pointer; color: #64748b; }
.login-modal-card label { display: grid; gap: 7px; margin-bottom: 14px; color: #334155; font-size: 13px; font-weight: 800; }
.login-modal-card input { min-height: 44px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 12px; font-size: 15px; }
.login-modal-message { margin: 0 0 12px; font-size: 13px; color: #334155; }
.login-modal-message.is-error { color: #b42318; }
.login-modal-reset { display: inline-flex; margin: -4px 0 14px; color: #64748b; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.login-modal-reset:hover { color: #2643c4; }
.login-modal-submit { width: 100%; min-height: 46px; border: 0; border-radius: 14px; background: #2643c4; color: #fff; font-weight: 900; cursor: pointer; }
.login-modal-submit:disabled { opacity: .6; cursor: wait; }
.login-modal-signup { margin-top: 12px; min-height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #2643c4; font-weight: 900; text-decoration: none; background: #eef2ff; }
.login-modal-social { margin-top: 20px; }
.login-modal-divider {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: #94a3b8; font-size: 12px; font-weight: 800;
}
.login-modal-divider::before, .login-modal-divider::after {
  content: ""; flex: 1; height: 1px; background: #e2e8f0;
}
.login-modal-social-list { display: flex; justify-content: center; gap: 12px; }
.login-modal-social-placeholder {
  width: 46px; height: 46px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #f8fafc;
  display: inline-flex; align-items: center; justify-content: center;
}
.login-modal-social-placeholder::before {
  content: ""; width: 16px; height: 16px; border-radius: 999px; background: #cbd5e1;
}
@media (max-height: 640px) {
  .login-modal { align-items: flex-start; }
  .login-modal-card { max-height: none; }
}
