.auth-open { overflow: hidden; }
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(139, 92, 246, 0.32), rgba(109, 40, 217, 0.12) 38%, transparent 72%),
    rgba(7, 7, 9, 0.72);
  backdrop-filter: blur(10px);
}
.auth-gate[hidden] { display: none; }
.auth-modal-wrap {
  position: relative;
  width: min(920px, calc(100% - 32px));
}
.auth-modal {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121214;
  box-shadow: 0 0 80px rgba(139, 92, 246, 0.1), 0 30px 100px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  min-height: min(620px, calc(100vh - 48px));
}
.auth-close {
  position: absolute;
  right: -46px;
  top: 8px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(7, 7, 9, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(8px);
}
.auth-close:hover { border-color: #fff; }
.auth-modal-left {
  display: flex;
  flex-direction: column;
  padding: 40px 36px 28px;
  text-align: center;
}
.auth-logo {
  display: block;
  height: 28px;
  width: auto;
  margin: 0 auto;
  filter: brightness(0) saturate(100%) invert(42%) sepia(86%) saturate(2476%) hue-rotate(239deg) brightness(98%) contrast(96%);
}
.auth-welcome {
  margin: 18px 0 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.auth-welcome-logo {
  height: 0.82em;
  width: auto;
  filter: brightness(0) invert(1);
}
.auth-tagline {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
}
.email-auth-panel { margin-top: 28px; display: grid; gap: 14px; text-align: left; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-tab {
  min-height: 40px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.auth-tab:hover, .auth-tab.is-active { color: #fff; }
.auth-tab.is-active { background: #7c3aed; }
.auth-form { display: none; gap: 10px; }
.auth-form.is-active { display: grid; }
.auth-form[hidden] { display: none !important; }
.auth-form input {
  height: 44px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
}
.auth-form input:focus { outline: none; border-color: #a78bfa; }
.auth-form .primary {
  border-radius: 999px;
  min-height: 44px;
  margin-top: 4px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
}
.auth-form .primary:hover { background: #6d28d9; }
.auth-message { min-height: 18px; margin: 10px 0 0; color: #fb7185; font-size: 13px; }
.auth-workspace-btn {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 700;
}
.auth-workspace-btn:hover {
  border-color: #a78bfa;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.12);
}
.auth-footer { margin-top: auto; padding-top: 24px; }
.auth-hint { margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 13px; }
.auth-modal-right { min-height: 0; background: #0b0b0e; }
.auth-art { height: 100%; }
.auth-art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .auth-modal { grid-template-columns: 1fr; }
  .auth-modal-right { display: none; }
  .auth-close { right: 10px; top: -46px; }
}

.account-chip { position: relative; }
.account-chip > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.account-chip .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #7c3aed; font-size: 0.62rem; font-weight: 800;
}
.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 200px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 22, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.account-pop p { font-weight: 800; font-size: .86rem; color: #fff; padding: 4px 10px 0; }
.account-pop [data-account-email] {
  display: block; color: rgba(255,255,255,.45); font-size: .72rem;
  padding: 2px 10px 0; word-break: break-all;
}
.account-pop em {
  display: block; padding: 6px 10px 10px;
  font-style: normal; color: #86efac; font-size: .7rem; font-weight: 700;
}
.account-pop a, .account-pop button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: #ddd;
  font-size: 0.8rem;
  font-weight: 700;
}
.account-pop a:hover, .account-pop button:hover { background: rgba(255,255,255,.06); color: #fff; }
