.sm-auth-hub {
  --sm-auth-green: #72c936;
  --sm-auth-green-dark: #2f7f18;
  --sm-auth-bg: #080d0f;
  --sm-auth-card: #101719;
  --sm-auth-border: rgba(114, 201, 54, 0.34);
  position: relative;
  left: 50%;
  width: min(1240px, calc(100vw - 40px));
  max-width: none;
  margin: 28px 0 64px;
  padding: clamp(22px, 3vw, 42px);
  transform: translateX(-50%);
  border: 1px solid var(--sm-auth-border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 24, 25, 0.98), rgba(5, 9, 10, 0.99));
  color: #f8fafc;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: visible;
}

.sm-auth-hub *,
.sm-auth-hub *::before,
.sm-auth-hub *::after {
  box-sizing: border-box;
}

.sm-auth-hub-heading {
  max-width: 880px;
  margin-bottom: 26px;
}

.sm-auth-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--sm-auth-green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.sm-auth-hub h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
}

.sm-auth-hub-heading p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.6;
}

.sm-auth-methods {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(350px, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

.sm-account-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sm-auth-method {
  scroll-margin-top: 110px;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 26, 0.86);
  overflow: hidden;
}

.sm-auth-method:target,
.sm-auth-method-primary {
  border-color: var(--sm-auth-border);
  box-shadow: inset 0 0 0 1px rgba(114, 201, 54, 0.08);
}

.sm-auth-method-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #fff;
}

.sm-auth-method-label > span {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(114, 201, 54, 0.14);
  color: var(--sm-auth-green);
  font-size: 12px;
  font-weight: 900;
}

.sm-auth-method-label strong {
  font-size: 16px;
}

/* Remove inherited card/form shells so each sign-in method uses the same panel. */
.sm-auth-hub .marketdebates-passkey-card,
.sm-auth-hub .immutifi-wallet-card,
.sm-auth-hub .pmpro_login_wrap,
.sm-auth-hub .pmpro,
.sm-auth-hub .pmpro_card,
.sm-auth-hub .pmpro_card_content,
.sm-auth-hub #loginform,
.sm-auth-hub form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #e2e8f0 !important;
}

.sm-auth-hub .marketdebates-passkey-card h3,
.sm-auth-hub .immutifi-wallet-card h3,
.sm-auth-hub .pmpro h2,
.sm-auth-hub .pmpro h3,
.sm-auth-hub #loginform h2,
.sm-auth-hub #loginform h3 {
  margin: 0 0 10px !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
}

.sm-auth-hub .marketdebates-passkey-card p,
.sm-auth-hub .immutifi-wallet-card p,
.sm-auth-hub .pmpro p,
.sm-auth-hub #loginform p {
  color: #b9c4d1 !important;
  line-height: 1.55 !important;
}

.sm-auth-hub label {
  display: block;
  margin: 0 0 7px;
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.35;
}

.sm-auth-hub .pmpro_form_field,
.sm-auth-hub .login-username,
.sm-auth-hub .login-password,
.sm-auth-hub .login-remember,
.sm-auth-hub .login-submit {
  width: 100%;
  margin: 0 0 16px !important;
}

.sm-auth-hub input[type="text"],
.sm-auth-hub input[type="email"],
.sm-auth-hub input[type="password"] {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: 48px;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.42) !important;
  border-radius: 11px !important;
  background: #080d0f !important;
  color: #fff !important;
  font-size: 16px !important;
  box-shadow: none !important;
}

.sm-auth-hub input[type="checkbox"] {
  width: auto !important;
  min-height: 0 !important;
  margin-right: 8px !important;
}

/* PMPro's password reveal control is moved below the input so it cannot overlap. */
.sm-auth-hub .pmpro_form_field-password,
.sm-auth-hub .pmpro_form_field-password-input,
.sm-auth-hub .pmpro_form_field-password-toggle {
  width: 100% !important;
  max-width: none !important;
}

.sm-auth-hub .pmpro_btn-password-toggle,
.sm-auth-hub button.pmpro_btn-password-toggle,
.sm-auth-hub .pmpro_form_field-password-toggle button,
.sm-auth-hub .pmpro_form_field-password button:not([type="submit"]) {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  width: auto !important;
  min-height: 34px !important;
  margin: 8px 0 0 !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(114, 201, 54, 0.6) !important;
  border-radius: 9px !important;
  background: rgba(114, 201, 54, 0.14) !important;
  color: #c9f5ad !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  transform: none !important;
}

.sm-auth-hub button:not(.pmpro_btn-password-toggle),
.sm-auth-hub input[type="submit"],
.sm-auth-hub .marketdebates-passkey-button,
.sm-auth-hub .immutifi-wallet-button {
  width: 100% !important;
  min-height: 46px;
  padding: 10px 14px !important;
  border: 1px solid var(--sm-auth-green) !important;
  border-radius: 11px !important;
  background: linear-gradient(180deg, #7bd93d, #55aa25) !important;
  color: #071006 !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  cursor: pointer;
}

.sm-auth-hub a {
  color: #8ee14f;
}

.sm-auth-hub .pmpro_actions_nav,
.sm-auth-hub .pmpro_actions_nav-left,
.sm-auth-hub .pmpro_actions_nav-right {
  width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 14px 0 0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
  text-align: left !important;
  float: none !important;
}

.sm-auth-signup,
.sm-account-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.sm-auth-signup a,
.sm-account-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(114, 201, 54, 0.45);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
}

.sm-auth-menu {
  position: relative;
  z-index: 1000;
}

.sm-auth-menu > summary,
.sm-auth-account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid rgba(114, 201, 54, 0.72);
  border-radius: 999px;
  background: rgba(7, 13, 15, 0.9);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
  list-style: none;
}

.sm-auth-menu > summary::-webkit-details-marker {
  display: none;
}

.sm-auth-menu > summary::after {
  content: "⌄";
  margin-left: 8px;
  color: #72c936;
}

.sm-auth-menu[open] > summary::after {
  content: "⌃";
}

.sm-auth-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  padding: 8px;
  border: 1px solid rgba(114, 201, 54, 0.36);
  border-radius: 16px;
  background: #0b1113;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

.sm-auth-menu-panel a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
  border-radius: 11px;
  color: #fff !important;
  text-decoration: none !important;
}

.sm-auth-menu-panel a:hover,
.sm-auth-menu-panel a:focus-visible {
  background: rgba(114, 201, 54, 0.12);
}

.sm-auth-menu-panel span {
  color: #94a3b8;
  font-size: 12px;
}

.sm-auth-menu-panel strong {
  font-size: 14px;
}

@media (max-width: 1040px) {
  .sm-auth-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm-auth-methods > .sm-auth-method:last-child {
    grid-column: 1 / -1;
  }

  .sm-account-methods > .sm-auth-method:last-child {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .sm-auth-hub {
    width: calc(100vw - 20px);
    margin-top: 18px;
    padding: 20px;
    border-radius: 18px;
  }

  .sm-auth-methods,
  .sm-account-methods {
    grid-template-columns: 1fr;
  }

  .sm-auth-methods > .sm-auth-method:last-child,
  .sm-account-methods > .sm-auth-method:last-child {
    grid-column: auto;
  }

  .sm-auth-menu-panel {
    right: 0;
    width: min(250px, calc(100vw - 28px));
  }
}
