/* 15 named auth patterns */

/* ========== 1. Login ========== */
.auth-login .auth-title,
.auth-login .auth-lede {
  text-align: left;
}

.auth-login .auth-mark {
  margin-left: 0;
  margin-right: auto;
}

/* ========== 2. Signup ========== */
.auth-signup__legal {
  margin: 0.85rem 0 1rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.auth-signup__name {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 24rem) {
  .auth-signup__name {
    grid-template-columns: 1fr;
  }
}

/* ========== 3. Forgot ========== */
.auth-forgot .auth-mark {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ========== 4. Reset ========== */
.auth-reset__meter {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.auth-reset__meter span {
  flex: 1;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--border);
}

.auth-reset__meter[data-strength="1"] span:nth-child(1) {
  background: var(--danger);
}

.auth-reset__meter[data-strength="2"] span:nth-child(-n+2) {
  background: var(--warn);
}

.auth-reset__meter[data-strength="3"] span:nth-child(-n+3) {
  background: #f79009;
}

.auth-reset__meter[data-strength="4"] span {
  background: var(--success);
}

.auth-reset__rules {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.auth-reset__rules li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.auth-reset__rules li.is-met {
  color: var(--success);
  font-weight: 600;
}

.auth-reset__rules li::before {
  content: "○";
  font-size: 0.65rem;
}

.auth-reset__rules li.is-met::before {
  content: "●";
}

/* ========== 5. Magic link ========== */
.auth-magic .auth-mark {
  background: #15202b;
}

/* ========== 6. Check email ========== */
.auth-check-email {
  text-align: center;
}

.auth-check-email__inbox {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 1.35rem;
}

.auth-check-email__email {
  display: inline-block;
  margin: 0.15rem 0 1rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--surface);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.875rem;
}

.auth-check-email__resend {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* ========== 7. 2FA challenge ========== */
.auth-2fa__meta {
  margin: -0.5rem 0 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* ========== 8. 2FA setup ========== */
.auth-2fa-setup {
  width: min(100%, 28rem);
  max-width: 100%;
}

.auth-2fa-setup__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.15rem;
}

.auth-2fa-setup__qr {
  width: 7.5rem;
  height: 7.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, #1a2332 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, #1a2332 0 2px, transparent 2px 4px),
    #fff;
  background-size: 100% 100%, 100% 100%, auto;
  position: relative;
}

.auth-2fa-setup__qr::after {
  content: "";
  position: absolute;
  inset: 28%;
  background: var(--accent);
  border-radius: 4px;
}

.auth-2fa-setup__secret {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  word-break: break-all;
}

.auth-2fa-setup__backup {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: #fafbfc;
}

.auth-2fa-setup__backup h4 {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
}

.auth-2fa-setup__codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
}

@media (max-width: 32rem) {
  .auth-2fa-setup__grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .auth-2fa-setup__codes {
    grid-template-columns: 1fr;
  }
}

/* ========== 9. Locked ========== */
.auth-locked .auth-title {
  color: var(--danger);
}

.auth-locked__timer {
  margin: 0.85rem 0 1.15rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--danger-soft);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--danger);
}

.auth-locked__timer strong {
  display: block;
  font-size: 1.35rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ========== 10. Social ========== */
.auth-social__stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

/* ========== 11. Verify email ========== */
.auth-verify {
  text-align: center;
}

.auth-verify__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 800;
}

/* ========== 12. Session expired ========== */
.auth-session__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.auth-session__avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.auth-session__user strong {
  display: block;
  font-size: 0.875rem;
}

.auth-session__user span {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ========== 13. Passkey ========== */
.auth-passkey {
  text-align: center;
}

.auth-passkey__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 1.1rem;
  background: linear-gradient(145deg, #15202b, #0d7a6f);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-passkey__alt {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* ========== 14. Accept invite ========== */
.auth-invite__org {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9fb;
}

.auth-invite__org-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.auth-invite__org strong {
  display: block;
  font-size: 0.9375rem;
}

.auth-invite__org span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.auth-invite .auth-title,
.auth-invite .auth-lede {
  text-align: left;
}

/* ========== 15. SSO ========== */
.auth-sso__hint {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #eff8ff;
  border: 1px solid #b2ddff;
  color: #175cd3;
  font-size: 0.78rem;
  font-weight: 600;
}

.auth-sso-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 26rem;
  background: var(--surface-raised);
}

.auth-sso-split__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.75rem;
}

.auth-sso-split__brand {
  padding: 2rem 1.75rem;
  background:
    linear-gradient(160deg, #0d7a6f 0%, #1a4d5c 50%, #15202b 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-sso-split__brand h3 {
  margin: 0 0 0.45rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-sso-split__brand p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
  max-width: 20rem;
}

.auth-sso-split__brand ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.auth-sso-split__brand li {
  margin-bottom: 0.35rem;
}

.auth-sso-split__brand li::before {
  content: "✓ ";
  font-weight: 800;
}

@media (max-width: 40rem) {
  .auth-sso-split {
    grid-template-columns: 1fr;
  }

  .auth-sso-split__brand {
    order: -1;
    min-height: 10rem;
    padding: 1.35rem 1.25rem;
  }

  .auth-sso-split__panel {
    padding: 1.35rem 1.15rem;
  }
}
