/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   JokerMix — Affiliate Program Styles
   Primary accent: #5B23FD  Secondary: #6600ff
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.aff-page {
	min-height: calc(100vh - 61px);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 48px 16px 80px;
}

.aff-wrap {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	max-width: 640px;
}

/* ── Card ── */
.aff-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(171, 171, 255, 0.12);
	border-radius: 20px;
	padding: 36px 40px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.aff-card__header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.aff-card__icon {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	background: rgba(91, 35, 253, 0.14);
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aff-card__icon--alt {
	background: rgba(255, 255, 255, 0.06);
}

.aff-card__title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 5px;
	font-family:
		Winter Sans Trial,
		sans-serif;
}

.aff-card__sub {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1.45;
}

/* ── How it works ── */
.aff-how {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: rgba(91, 35, 253, 0.07);
	border: 1px solid rgba(91, 35, 253, 0.15);
	border-radius: 14px;
	padding: 18px 20px;
}

.aff-how__step {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.aff-how__num {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #5b23fd;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.aff-how__text {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.5;
}

/* ── Form ── */
.aff-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.aff-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.aff-label {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.6);
	font-weight: 500;
	letter-spacing: 0.01em;
	display: flex;
	gap: 6px;
	align-items: center;
}

.aff-optional {
	color: rgba(255, 255, 255, 0.3);
	font-weight: 400;
}

.aff-required {
	color: #ff6b6b;
	font-weight: 700;
	font-size: 0.95rem;
}

.aff-input {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(171, 171, 255, 0.15);
	border-radius: 10px;
	padding: 11px 14px;
	color: #fff;
	font-size: 0.88rem;
	font-family: 'Courier New', Courier, monospace;
	outline: none;
	transition: border-color 0.18s;
	width: 100%;
	box-sizing: border-box;
}

.aff-input:focus {
	border-color: rgba(91, 35, 253, 0.6);
}

.aff-input--readonly {
	background: rgba(91, 35, 253, 0.08);
	border-color: rgba(91, 35, 253, 0.28);
	cursor: text;
	color: #b09eff;
}

.aff-error {
	min-height: 18px;
	font-size: 0.83rem;
	color: #ff6b6b;
}

/* ── Button ── */
.aff-btn {
	background: #5b23fd;
	border: none;
	border-radius: 10px;
	padding: 13px 20px;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition:
		background 0.18s,
		opacity 0.18s;
	font-family:
		Winter Sans Trial,
		sans-serif;
}

.aff-btn:hover:not(:disabled) {
	background: #6b33ff;
}

.aff-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.aff-btn--outline {
	background: transparent;
	border: 1px solid rgba(91, 35, 253, 0.55);
	color: #a78bff;
}

.aff-btn--outline:hover:not(:disabled) {
	background: rgba(91, 35, 253, 0.14);
	border-color: rgba(91, 35, 253, 0.9);
	color: #fff;
}

/* ── Result block ── */
.aff-result {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: rgba(91, 35, 253, 0.07);
	border: 1px solid rgba(91, 35, 253, 0.22);
	border-radius: 12px;
	padding: 18px;
}

.aff-result__label {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.5);
	font-weight: 500;
}

.aff-result__row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.aff-result__row .aff-input {
	flex: 1;
	min-width: 0;
}

.aff-copy-btn {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(171, 171, 255, 0.15);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.aff-copy-btn:hover {
	background: rgba(91, 35, 253, 0.2);
	border-color: rgba(91, 35, 253, 0.4);
}

.aff-result__note {
	font-size: 0.79rem;
	color: rgba(255, 255, 255, 0.35);
	line-height: 1.45;
}

.aff-result--stats {
	border-color: rgba(171, 171, 255, 0.1);
	background: rgba(255, 255, 255, 0.02);
}

/* ── Stats ── */
.aff-stats {
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-top: 1px solid rgba(171, 171, 255, 0.1);
	padding-top: 20px;
}

.aff-stats__title {
	font-size: 0.82rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.aff-stats__grid {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.aff-stats__tile {
	background: rgba(91, 35, 253, 0.1);
	border: 1px solid rgba(91, 35, 253, 0.2);
	border-radius: 12px;
	padding: 14px 18px;
	min-width: 130px;
	flex: 1;
}

.aff-stats__tile-val {
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	font-family: 'Courier New', Courier, monospace;
	margin-bottom: 4px;
}

.aff-stats__tile-lbl {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.4);
}

/* Session list */
.aff-stats__sessions-head,
.aff-stats__row {
	display: grid;
	grid-template-columns: 1.8fr 1fr 1.4fr 2fr;
	gap: 8px;
	font-size: 0.8rem;
	padding: 7px 4px;
}

.aff-stats__sessions-head {
	color: rgba(255, 255, 255, 0.35);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 1px solid rgba(171, 171, 255, 0.08);
	padding-bottom: 8px;
}

.aff-stats__row {
	color: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.aff-stats__row-id {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.55);
}

.aff-stats__row-earned {
	font-family: 'Courier New', Courier, monospace;
	color: #a78bff;
}

/* Status colors */
.aff-status--not-paid {
	color: rgba(255, 255, 255, 0.4);
}
.aff-status--pending-mix {
	color: #f0c040;
}
.aff-status--mixing {
	color: #7ec8e3;
}
.aff-status--mixed {
	color: #4caf50;
}
.aff-status--incorrect {
	color: #ff6b6b;
}

.aff-stats__empty {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.3);
	text-align: center;
	padding: 20px 0;
}

.aff-stats__code {
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.5);
	margin-top: 10px;
}

.aff-stats__code b {
	color: #a78bff;
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 0.04em;
}

/* ── Captcha Modal ── */
.aff-captcha-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.aff-captcha-modal.active {
	display: flex;
}

.aff-captcha-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
}

.aff-captcha-box {
	position: relative;
	background: #13121a;
	border: 1px solid rgba(91, 35, 253, 0.35);
	border-radius: 20px;
	padding: 36px 32px 32px;
	width: 320px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.aff-captcha-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.4);
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	transition: color 0.15s;
}

.aff-captcha-close:hover {
	color: rgba(255, 255, 255, 0.9);
}

.aff-captcha-icon {
	font-size: 2rem;
	text-align: center;
}

.aff-captcha-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	text-align: center;
	font-family:
		Winter Sans Trial,
		sans-serif;
}

.aff-captcha-sub {
	font-size: 0.83rem;
	color: rgba(255, 255, 255, 0.45);
	text-align: center;
	line-height: 1.4;
}

.aff-captcha-question {
	font-size: 1.5rem;
	font-weight: 700;
	color: #a78bff;
	text-align: center;
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 0.05em;
}

.aff-captcha-input {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(171, 171, 255, 0.2);
	border-radius: 10px;
	padding: 11px 14px;
	color: #fff;
	font-size: 1rem;
	text-align: center;
	outline: none;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.18s;
	font-family: 'Courier New', Courier, monospace;
}

.aff-captcha-input:focus {
	border-color: rgba(91, 35, 253, 0.7);
}

.aff-captcha-error {
	min-height: 16px;
	font-size: 0.82rem;
	color: #ff6b6b;
	text-align: center;
}

/* ── Responsive ── */
@media (max-width: 520px) {
	.aff-card {
		padding: 24px 20px;
	}

	.aff-stats__sessions-head,
	.aff-stats__row {
		grid-template-columns: 1.5fr 0.8fr 1.4fr 1.8fr;
		font-size: 0.74rem;
	}
}
