/* Affiliate partner portal (marketing site) */
.aff-page #main-content {
	padding-bottom: 0;
}

/* Keep theme clearance under fixed header (do not collapse to ~1rem — kicker overlaps logo). */
.aff-page .inner-page-hero {
	padding-top: 140px !important;
	padding-bottom: 3.5rem !important;
}

/*
 * Affiliate pages are light (no dark hero). Theme only paints a sticky bar after
 * custom.js adds .scroll — these pages do not load custom.js, so force a solid bar.
 */
.aff-page #header.tra-menu .wsmainfull {
	padding: 0 !important;
	background-color: rgba(255, 255, 255, 0.96) !important;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	-webkit-box-shadow: 0 2px 3px rgba(96, 96, 96, 0.1);
	-moz-box-shadow: 0 2px 3px rgba(96, 96, 96, 0.1);
	box-shadow: 0 2px 3px rgba(96, 96, 96, 0.1);
}

.aff-page #header.tra-menu .wsmainfull .wsmenu > .wsmenu-list > li > a.h-link {
	color: #353f4f;
}

.aff-page #header.tra-menu .wsmainfull .desktoplogo .logo-white {
	display: none !important;
}

.aff-page #header.tra-menu .wsmainfull .desktoplogo .logo-black {
	display: inline-block !important;
}

.aff-page #header .wsmobileheader {
	background-color: #fff !important;
	box-shadow: 0 2px 3px rgba(96, 96, 96, 0.1);
}

/*
 * Theme/custom.css forces li.nl-simple { display:flex !important } with higher
 * specificity than [hidden], which showed Dashboard + Sign out for guests.
 * Match that selector chain and also use .aff-auth-hidden from JS.
 */
#header .wsmainfull.menu .wsmainwp.clearfix .wsmenu .wsmenu-list > li.nl-simple[hidden],
#header .wsmainfull.menu .wsmainwp.clearfix .wsmenu .wsmenu-list > li.nl-simple.aff-auth-hidden,
#header .wsmenu .wsmenu-list > li[hidden],
#header .wsmenu .wsmenu-list > li.nl-simple[hidden] {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Auth forms: vertically center the card in the viewport under the header */
.aff-page--auth {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.aff-page--auth #main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.aff-page--auth .inner-page-hero {
	flex: 1;
	display: flex;
	align-items: center;
	padding-top: 120px !important;
	padding-bottom: 2.5rem !important;
	min-height: calc(100vh - 0px);
}

.aff-page--auth .inner-page-hero > .container {
	width: 100%;
}

.aff-hero {
	padding: 0.35rem 0 1.15rem;
	max-width: 40rem;
}

.aff-kicker {
	margin: 0 0 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #64748b;
}

.aff-hero h1,
.aff-form-card h1,
.aff-dash-head h1,
.aff-page .aff-form-card h1,
.aff-page .aff-hero h1,
.aff-page .aff-dash-head h1 {
	margin: 0;
	letter-spacing: -0.02em;
	color: #0f172a;
	font-weight: 700;
	line-height: 1.22;
}

.aff-hero h1,
.aff-page .aff-hero h1 {
	font-size: clamp(1.7rem, 3.2vw, 2.35rem) !important;
	max-width: 22ch;
}

.aff-form-card h1,
.aff-page .aff-form-card h1 {
	font-size: 1.35rem !important;
}

.aff-dash-head h1,
.aff-page .aff-dash-head h1 {
	font-size: 1.45rem !important;
}

.aff-lead,
.aff-muted {
	color: #64748b;
	line-height: 1.5;
}

.aff-lead {
	max-width: 36rem;
	margin: 0.75rem 0 0;
	font-size: 1rem;
}

.aff-form-card .aff-muted {
	margin: 0.35rem 0 0;
	font-size: 0.88rem;
}

.aff-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7rem;
	margin-top: 1.35rem;
}

.aff-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.aff-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	padding: 1.25rem 1.2rem;
	box-shadow: 0 8px 22px rgba(15, 36, 63, 0.045);
}

.aff-card h3 {
	margin: 0.3rem 0;
	font-size: 1rem;
	color: #0f172a;
}

.aff-card p:last-child {
	margin: 0;
	color: #64748b;
	font-size: 0.9rem;
}

.aff-stat,
.aff-kpi {
	margin: 0.1rem 0 0;
	font-size: 1.35rem;
	font-weight: 800;
	color: #0b3d91;
	letter-spacing: -0.02em;
}

.aff-form-wrap {
	max-width: 420px;
	margin: 0 auto;
}

.aff-form-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	padding: 1.25rem 1.25rem 1.2rem;
	box-shadow: 0 10px 28px rgba(15, 36, 63, 0.05);
}

.aff-form {
	display: grid;
	gap: 0.65rem;
	margin-top: 0.85rem;
}

.aff-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}

.aff-form input {
	width: 100%;
	height: 42px;
	border: 1px solid #d8e0ea;
	border-radius: 0.65rem;
	padding: 0 0.8rem;
	font-size: 0.9rem;
	color: #0f172a;
	background: #fff;
}

.aff-form input:focus {
	outline: none;
	border-color: #0b3d91;
	box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.aff-form button,
.aff-code-row button,
.aff-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0 1.15rem;
	border: 0;
	border-radius: 0.7rem;
	background: #0b3d91;
	color: #fff;
	font-weight: 650;
	font-size: 0.92rem;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.aff-btn:hover {
	background: #093275;
	color: #fff;
}

.aff-form button.is-loading,
.aff-btn.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

.aff-btn-secondary {
	background: #fff;
	color: #0b3d91;
	border: 1px solid #cbd5e1;
}

.aff-btn-secondary:hover {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #0b3d91;
}

.aff-foot {
	margin: 0.85rem 0 0;
	font-size: 0.86rem;
	color: #64748b;
}

.aff-privacy {
	margin: 0.55rem 0 0;
	font-size: 0.72rem;
	line-height: 1.4;
	color: #94a3b8;
}

.aff-privacy a {
	color: #64748b;
	text-decoration: underline;
}

/* Honeypot — hidden from humans, bots that autofill get rejected client-side */
.aff-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aff-alert {
	margin: 0.7rem 0 0;
	padding: 0.6rem 0.8rem;
	border-radius: 0.65rem;
	font-size: 0.84rem;
	font-weight: 600;
}

.aff-alert-danger {
	background: #fef2f2;
	color: #b91c1c;
}

.aff-alert-success {
	background: #ecfdf5;
	color: #047857;
}

.aff-dash-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.1rem;
}

.aff-code-box {
	min-width: 240px;
	padding: 0.8rem 0.95rem;
	border-radius: 0.9rem;
	background: #fff;
	border: 1px solid #e2e8f0;
}

.aff-code-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	margin-top: 0.3rem;
}

.aff-code-row strong {
	font-size: 1.05rem;
	letter-spacing: 0.04em;
}

.aff-code-row button {
	min-height: 32px;
	padding: 0 0.75rem;
	font-size: 0.78rem;
	background: #e8eef8;
	color: #0b3d91;
}

.aff-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.aff-two-col {
	display: grid;
	grid-template-columns: 1.2fr 0.9fr;
	gap: 0.9rem;
}

.aff-two-col h2 {
	margin: 0 0 0.3rem;
	font-size: 1.05rem;
	color: #0f172a;
}

.aff-list {
	list-style: none;
	margin: 0.85rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.aff-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0;
	border-top: 1px solid #eef2f7;
}

.aff-list li:first-child {
	border-top: 0;
	padding-top: 0;
}

.aff-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 0.7rem;
	font-weight: 700;
	flex-shrink: 0;
}

.aff-pill-green {
	background: #dcfce7;
	color: #15803d;
}

.aff-pill-amber {
	background: #ffedd5;
	color: #c2410c;
}

.aff-loading {
	display: flex;
	justify-content: center;
	padding: 3rem 0;
	color: #64748b;
	font-weight: 600;
	font-size: 0.92rem;
}

.aff-nav-cta {
	padding: 0.35rem 0.8rem !important;
	border-radius: 999px !important;
	background: #0b3d91 !important;
	color: #fff !important;
}

/* Header action buttons (Program / Join / Sign out) */
.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 36px;
	margin: 0 0 0 0.35rem !important;
	padding: 0.4rem 0.95rem !important;
	line-height: 1.15 !important;
	border-radius: 0.55rem !important;
	border: 1px solid transparent;
	font-size: 0.82rem !important;
	font-weight: 700 !important;
	letter-spacing: 0;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn-ghost {
	background: #fff !important;
	color: #0b3d91 !important;
	border-color: #cbd5e1 !important;
}

.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn-ghost:hover {
	background: #f8fafc !important;
	border-color: #94a3b8 !important;
	color: #0b3d91 !important;
}

.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn-primary {
	background: #f5a623 !important;
	color: #0b3d91 !important;
	border-color: #f5a623 !important;
}

.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn-primary:hover {
	background: #0b3d91 !important;
	border-color: #0b3d91 !important;
	color: #fff !important;
}

@media (max-width: 991.98px) {
	.aff-page #header .wsmenu > .wsmenu-list > li > a.aff-nav-btn {
		width: calc(100% - 2rem);
		margin: 0.5rem 1rem !important;
		min-height: 44px;
	}
}

@media (max-width: 991.98px) {
	.aff-grid,
	.aff-kpi-grid,
	.aff-two-col {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575.98px) {
	.aff-form-row {
		grid-template-columns: 1fr;
	}

	.aff-form-card h1 {
		font-size: 1.25rem;
	}
}
