/* AuthKit neutral login shell.
 * Host applications can override these variables from AuthKit.branding.stylesheet. */
.authkit-guest-layout {
  --authkit-page: #f3f4f6;
  --authkit-surface: #fff;
  --authkit-text: #1f2937;
  --authkit-muted: #6b7280;
  --authkit-border: #d1d5db;
  --authkit-primary: #2563eb;
  --authkit-primary-hover: #1d4ed8;
  --authkit-primary-active: #1e40af;
  --authkit-danger: #b91c1c;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--authkit-page);
  color: var(--authkit-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.authkit-guest-layout *,
.authkit-guest-layout *::before,
.authkit-guest-layout *::after { box-sizing: border-box; }

.authkit-guest-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 32rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 1rem 1.25rem;
}

.authkit-guest-brand { margin-bottom: 1.25rem; text-align: center; }
.authkit-guest-brand a {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--authkit-text);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
.authkit-guest-logo { display: block; width: auto; max-width: 8rem; height: 2rem; object-fit: contain; }
.authkit-guest-content { width: 100%; }

.authkit-guest-layout .pa-auth-card,
.authkit-guest-layout .pa-auth-login-card {
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow: visible;
  background: var(--authkit-surface);
  border: 1px solid var(--authkit-border);
  border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}

.authkit-guest-layout .pa-auth-title,
.authkit-guest-layout .pa-auth-card h1,
.authkit-guest-layout .pa-auth-card h2 {
  color: var(--authkit-text);
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
}

.authkit-guest-layout .pa-auth-subtitle,
.authkit-guest-layout .pa-auth-help,
.authkit-guest-layout .pa-auth-footer { color: var(--authkit-muted); }
.authkit-guest-layout .pa-auth-logo {
  display: flex;
  width: 100%;
  justify-content: center;
}
.authkit-guest-layout .pa-auth-logo-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(3rem, 14vw, 5rem);
  object-fit: contain;
}
.authkit-guest-layout label { color: var(--authkit-text); font-weight: 600; }

.authkit-guest-layout .form-control,
.authkit-guest-layout input:not([type="checkbox"]):not([type="radio"]),
.authkit-guest-layout select {
  min-height: 44px;
  border: 1px solid var(--authkit-border);
  border-radius: .375rem;
  background: #fff;
  color: var(--authkit-text);
}

.authkit-guest-layout .form-control:focus,
.authkit-guest-layout input:not([type="checkbox"]):not([type="radio"]):focus,
.authkit-guest-layout select:focus {
  border-color: var(--authkit-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--authkit-primary) 16%, transparent);
  outline: 0;
}

.authkit-guest-layout .btn-primary,
.authkit-guest-layout button[type="submit"] {
  min-height: 44px;
  border-color: var(--authkit-primary) !important;
  border-radius: .375rem;
  background: var(--authkit-primary) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: none;
}
.authkit-guest-layout .btn-primary:hover,
.authkit-guest-layout button[type="submit"]:hover {
  border-color: var(--authkit-primary-hover) !important;
  background: var(--authkit-primary-hover) !important;
}
.authkit-guest-layout a,
.authkit-guest-layout summary { color: var(--authkit-primary); }
.authkit-guest-layout a:hover,
.authkit-guest-layout summary:hover { color: var(--authkit-primary-hover); }
.authkit-guest-layout details[open] { height: auto; overflow: visible; }

.authkit-guest-footer {
  margin-top: 1rem;
  color: var(--authkit-muted);
  font-size: .75rem;
  text-align: center;
}

@media (max-width: 479.98px) {
  .authkit-guest-shell { padding: 1rem .75rem; }
  .authkit-guest-layout .pa-auth-card,
  .authkit-guest-layout .pa-auth-login-card { padding: 1.125rem; border-radius: .375rem; }
}

/* Polished passkey-first login presentation.
 * Scoped to the AuthKit login route so password reset/registration pages keep
 * the neutral shared shell while every AuthKit consumer can reuse this design. */
body.authkit-login-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(86, 92, 255, .10), transparent 34rem),
    radial-gradient(circle at 82% 88%, rgba(236, 72, 153, .08), transparent 30rem),
    #f7f8fc;
}
body.authkit-login-page .authkit-guest-shell {
  width: min(100%, 43rem);
  padding: clamp(1.25rem, 5vh, 3rem) 1rem 1.5rem;
  justify-content: center;
}
body.authkit-login-page .authkit-guest-brand { display: none; }
body.authkit-login-page .pa-auth-login-card {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(99, 102, 241, .10);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(45, 55, 90, .13);
}
body.authkit-login-page .pa-auth-header { margin-bottom: 1.6rem; }
body.authkit-login-page .pa-auth-logo { min-height: 0; margin-bottom: 1rem; }
body.authkit-login-page .pa-auth-logo-img { max-width: 12rem; max-height: 4.5rem; }
body.authkit-login-page .pa-auth-title {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  color: #111827;
}
body.authkit-login-page .pa-auth-subtitle {
  max-width: 31rem;
  margin: .55rem auto 0;
  font-size: .98rem;
  color: #667085;
}
body.authkit-login-page .pa-auth-returning-user {
  min-height: 58px;
  padding: .7rem .85rem;
  margin-bottom: 1rem;
  border-color: rgba(99, 102, 241, .18);
  border-radius: 14px;
  background: #fafaff;
}
body.authkit-login-page .pa-auth-returning-avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
}
body.authkit-login-page .pa-auth-returning-email { font-size: .9rem; }
body.authkit-login-page .pa-auth-returning-swap { font-size: .78rem; }
body.authkit-login-page #passkeyLoginButton {
  width: 100%;
  min-height: 54px;
  border: 0 !important;
  border-radius: 13px;
  background: linear-gradient(135deg, #315cf3, #1d4ed8) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -.01em;
}
body.authkit-login-page #passkeyLoginButton:hover,
body.authkit-login-page #passkeyLoginButton:focus {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(37, 99, 235, .28);
}
body.authkit-login-page .pa-auth-local-passkey-hint {
  min-height: 48px;
  margin-top: .65rem;
  padding: .65rem .8rem;
  border-color: rgba(99, 102, 241, .18);
  background: linear-gradient(135deg, #fafaff, #f6f8ff);
  font-size: .8rem;
}
body.authkit-login-page #devicePasskeyButton {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  font-size: .84rem;
}
body.authkit-login-page #devicePasskeyButton:hover,
body.authkit-login-page #devicePasskeyButton:focus {
  background: #f4f6ff;
  color: var(--authkit-primary);
}
body.authkit-login-page .pa-auth-divider {
  margin: 1.35rem 0 1rem;
  color: #98a2b3;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.authkit-login-page .pa-auth-password-panel {
  padding: 1rem 1rem .15rem;
  border: 1px solid #e6e9f0;
  border-radius: 14px;
  background: #fbfcfe;
}
body.authkit-login-page .pa-auth-password-panel label {
  margin-bottom: .4rem;
  font-size: .78rem;
}
body.authkit-login-page .pa-auth-password-panel .form-control,
body.authkit-login-page .pa-auth-password-panel .input-group-text {
  min-height: 46px;
  border-color: #dfe3eb;
  background: #fff;
}
body.authkit-login-page .pa-auth-password-panel .input-group-text { color: #667085; }
body.authkit-login-page #passwordLoginButton {
  width: 100%;
  min-height: 44px;
  color: #315cf3 !important;
  border-color: rgba(49, 92, 243, .38) !important;
}
body.authkit-login-page .pa-auth-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eceef3;
  font-size: .82rem;
}
body.authkit-login-page .authkit-guest-footer { opacity: .72; }

@media (max-width: 575.98px) {
  body.authkit-login-page .authkit-guest-shell {
    padding: .65rem;
    justify-content: flex-start;
  }
  body.authkit-login-page .pa-auth-login-card {
    padding: 1.3rem 1rem;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(45, 55, 90, .11);
  }
  body.authkit-login-page .pa-auth-header { margin-bottom: 1.15rem; }
  body.authkit-login-page .pa-auth-logo-img { max-width: 9rem; max-height: 3.5rem; }
  body.authkit-login-page .pa-auth-title { font-size: 2rem; }
  body.authkit-login-page .pa-auth-subtitle { font-size: .86rem; }
  body.authkit-login-page .pa-auth-password-panel { padding: .85rem .75rem .05rem; }
}
