.auth-screen {
  height: 100%;
  display: flex;
  background: radial-gradient(circle at 20% 20%, #3b3d7a22, transparent 40%),
              radial-gradient(circle at 80% 80%, #23234522, transparent 45%),
              var(--bg-rail);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 0;
  box-sizing: border-box;
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.auth-blob.b1 { width: 420px; height: 420px; background: var(--brand); top: -120px; left: -100px; }
.auth-blob.b2 { width: 360px; height: 360px; background: #0891b2; bottom: -140px; right: -80px; }

.auth-card {
  position: relative;
  margin: auto;
  width: 420px;
  max-width: calc(100vw - 32px);
  background: var(--bg-modal);
  border-radius: var(--radius-lg);
  padding: 32px 32px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: pop-in var(--dur-slow) var(--ease-out);
}

.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 20px;
}
.auth-brand .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
}
.auth-brand .name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

/* a custom instance logo replaces the brand mark; the box keeps it from taking over the card */
.auth-logo { max-height: 64px; max-width: 200px; object-fit: contain; border-radius: 8px; }
.auth-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.auth-instance-desc { text-align: center; color: var(--text-secondary); font-size: 14px; margin: -8px 0 12px; overflow-wrap: anywhere; }
.auth-reg-badge { display: table; margin: 0 auto 16px; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--bg-tertiary, rgba(255,255,255,0.08)); color: var(--text-secondary); }
.auth-reg-badge.open { color: #23a55a; }
.auth-reg-badge.invite { color: #f0b232; }
.auth-reg-badge.closed { color: #f23f43; }
.auth-swarm { margin-top: 16px; border-top: 1px solid var(--border, rgba(255,255,255,0.08)); padding-top: 12px; }
.auth-swarm h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 0 0 8px; }
.swarm-scroll { max-height: 280px; overflow-y: auto; }
.swarm-row { display: flex; gap: 10px; padding: 6px 0; }
.swarm-icon { width: 36px; height: 36px; border-radius: 8px; flex: none; background: var(--bg-tertiary, rgba(255,255,255,0.08)); object-fit: cover; }
.swarm-main { min-width: 0; }
.swarm-name a { font-weight: 600; color: var(--header-primary); text-decoration: none; }
.swarm-name a:hover { text-decoration: underline; }
.swarm-desc, .swarm-meta { font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }

.auth-card h1 {
  font-size: 24px; text-align: center; margin: 0 0 8px;
  color: var(--header-primary);
}
.auth-card .sub {
  text-align: center; color: var(--text-secondary); font-size: 15px;
  margin: 0 0 24px;
}

.auth-switch {
  text-align: center; margin-top: 4px; font-size: 14px; color: var(--text-secondary);
}

.auth-card form { display: flex; flex-direction: column; }

.passport-existing { margin: 8px 0 12px; font-size: 13px; }
.passport-existing summary { cursor: pointer; color: var(--text-secondary); margin-bottom: 8px; }
