.tcp-affiliate-wrap {
	--tcp-blue: #123f78;
	--tcp-blue-soft: #eaf3ff;
	--tcp-gold: #c99a2e;
	--tcp-text: #17304f;
	--tcp-border: #d9e4f2;
	color: var(--tcp-text);
	font-family: inherit;
}

.tcp-affiliate-panel,
.tcp-affiliate-hero {
	background: #fff;
	border: 1px solid var(--tcp-border);
	border-radius: 8px;
	box-shadow: 0 14px 36px rgba(18, 63, 120, .08);
	margin: 0 0 22px;
	padding: 24px;
}

.tcp-affiliate-hero {
	align-items: center;
	background: linear-gradient(135deg, #f8fbff 0%, #fff 58%, #fff8e8 100%);
	display: flex;
	gap: 18px;
	justify-content: space-between;
}

.tcp-affiliate-hero p,
.tcp-affiliate-panel h2,
.tcp-affiliate-panel h3 {
	margin-top: 0;
}

.tcp-affiliate-hero p {
	color: var(--tcp-gold);
	font-weight: 700;
	margin-bottom: 6px;
}

.tcp-affiliate-hero h2,
.tcp-affiliate-panel h2,
.tcp-affiliate-panel h3 {
	color: var(--tcp-blue);
	line-height: 1.25;
}

.tcp-affiliate-form {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tcp-affiliate-form label,
.tcp-settings-form label {
	display: grid;
	gap: 7px;
}

.tcp-affiliate-form span {
	font-weight: 700;
}

.tcp-affiliate-form input,
.tcp-affiliate-form textarea,
.tcp-affiliate-link-box input {
	border: 1px solid var(--tcp-border);
	border-radius: 6px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 12px;
	width: 100%;
}

.tcp-wide {
	grid-column: 1 / -1;
}

.tcp-button,
.tcp-copy-button,
.login-submit input {
	background: var(--tcp-blue);
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	min-height: 44px;
	padding: 11px 18px;
}

.tcp-button:hover,
.tcp-copy-button:hover,
.login-submit input:hover {
	background: #0a2d59;
}

.tcp-affiliate-link-box {
	align-items: stretch;
	display: flex;
	gap: 8px;
	min-width: min(520px, 100%);
}

.tcp-stats-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 22px;
}

.tcp-stats-grid > div {
	background: var(--tcp-blue-soft);
	border: 1px solid var(--tcp-border);
	border-radius: 8px;
	padding: 16px;
}

.tcp-stats-grid span {
	display: block;
	font-size: 13px;
	margin-bottom: 8px;
}

.tcp-stats-grid strong {
	color: var(--tcp-blue);
	font-size: 22px;
}

.tcp-alert {
	border-radius: 6px;
	margin: 0 0 16px;
	padding: 12px 14px;
}

.tcp-alert-success {
	background: #edf8ef;
	border: 1px solid #bfe3c4;
}

.tcp-alert-error {
	background: #fff1f1;
	border: 1px solid #f0b8b8;
}

.tcp-table-scroll {
	overflow-x: auto;
}

.tcp-affiliate-table {
	border-collapse: collapse;
	min-width: 860px;
	width: 100%;
}

.tcp-affiliate-table th,
.tcp-affiliate-table td {
	border-bottom: 1px solid var(--tcp-border);
	padding: 12px;
	text-align: left;
	vertical-align: top;
}

.tcp-affiliate-table th {
	background: #f7faff;
	color: var(--tcp-blue);
	font-weight: 700;
}

.tcp-section-kicker {
	color: var(--tcp-gold);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	margin: 0 0 6px;
}

.tcp-link-generator-intro {
	background: linear-gradient(135deg, #f8fbff 0%, #fff 64%, #fff7df 100%);
}

.tcp-utm-builder,
.tcp-link-table-head,
.tcp-link-filters {
	display: grid;
	gap: 14px;
}

.tcp-utm-builder {
	grid-template-columns: minmax(180px, .5fr) 1fr;
	margin-top: 18px;
}

.tcp-utm-builder label {
	display: grid;
	gap: 7px;
}

.tcp-utm-builder span {
	color: var(--tcp-blue);
	font-weight: 700;
}

.tcp-utm-builder input,
.tcp-utm-builder select,
.tcp-link-filters input,
.tcp-link-filters select {
	border: 1px solid var(--tcp-border);
	border-radius: 6px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 12px;
	width: 100%;
}

.tcp-link-section {
	margin: 0 0 22px;
}

.tcp-link-section > h3,
.tcp-all-links-panel h3 {
	color: var(--tcp-blue);
	margin: 0 0 14px;
}

.tcp-featured-links {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tcp-featured-link-card {
	background: #fff;
	border: 1px solid var(--tcp-border);
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(18, 63, 120, .08);
	display: grid;
	gap: 11px;
	padding: 18px;
}

.tcp-featured-link-card h4 {
	color: var(--tcp-blue);
	font-size: 18px;
	line-height: 1.3;
	margin: 0;
}

.tcp-featured-link-card p {
	margin: 0;
}

.tcp-page-badge {
	align-self: start;
	background: #fff7e0;
	border: 1px solid #efd28e;
	border-radius: 999px;
	color: #8a640f;
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	padding: 4px 9px;
}

.tcp-affiliate-generated-url {
	border: 1px solid var(--tcp-border);
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 13px;
	min-height: 42px;
	padding: 9px 10px;
	width: 100%;
}

.tcp-link-actions {
	display: grid;
	gap: 8px;
	grid-template-columns: 1fr 1fr;
}

.tcp-preview-button {
	align-items: center;
	background: #fff;
	border: 1px solid var(--tcp-blue);
	border-radius: 6px;
	color: var(--tcp-blue);
	display: inline-flex;
	font-weight: 800;
	justify-content: center;
	min-height: 44px;
	padding: 10px 14px;
	text-align: center;
	text-decoration: none;
}

.tcp-preview-button:hover {
	background: var(--tcp-blue-soft);
	color: var(--tcp-blue);
}

.tcp-link-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tcp-link-stats span,
.tcp-mobile-link-stats {
	background: #f5f9ff;
	border: 1px solid var(--tcp-border);
	border-radius: 999px;
	color: #385a80;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 8px;
}

.tcp-link-table-head {
	align-items: end;
	grid-template-columns: 1fr minmax(280px, 520px);
	margin-bottom: 16px;
}

.tcp-link-filters {
	grid-template-columns: 1fr 170px;
}

.tcp-link-table td small {
	color: #637a96;
	display: block;
	font-size: 12px;
	margin-top: 4px;
	overflow-wrap: anywhere;
}

.tcp-mobile-link-stats {
	display: none;
	margin-top: 8px;
}

.tcp-copy-toast {
	background: var(--tcp-blue);
	border-radius: 6px;
	bottom: 22px;
	box-shadow: 0 12px 28px rgba(18, 63, 120, .24);
	color: #fff;
	font-weight: 800;
	left: 50%;
	opacity: 0;
	padding: 12px 16px;
	pointer-events: none;
	position: fixed;
	transform: translate(-50%, 12px);
	transition: opacity .18s ease, transform .18s ease;
	z-index: 99999;
}

.tcp-copy-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.tcp-register-link {
	color: var(--tcp-blue);
	display: inline-block;
	font-weight: 700;
	margin-top: 12px;
}

@media (max-width: 760px) {
	.tcp-affiliate-panel,
	.tcp-affiliate-hero {
		padding: 18px;
	}

	.tcp-affiliate-hero,
	.tcp-affiliate-link-box {
		align-items: stretch;
		flex-direction: column;
	}

	.tcp-affiliate-form,
	.tcp-stats-grid {
		grid-template-columns: 1fr;
	}

	.tcp-utm-builder,
	.tcp-featured-links,
	.tcp-link-table-head,
	.tcp-link-filters,
	.tcp-link-actions {
		grid-template-columns: 1fr;
	}

	.tcp-link-table,
	.tcp-link-table thead,
	.tcp-link-table tbody,
	.tcp-link-table tr,
	.tcp-link-table th,
	.tcp-link-table td {
		display: block;
		min-width: 0;
		width: 100%;
	}

	.tcp-link-table thead {
		display: none;
	}

	.tcp-link-table tr {
		border: 1px solid var(--tcp-border);
		border-radius: 8px;
		margin-bottom: 12px;
		padding: 12px;
	}

	.tcp-link-table td {
		border-bottom: 0;
		padding: 8px 0;
	}

	.tcp-link-table td::before {
		color: var(--tcp-blue);
		content: attr(data-label);
		display: block;
		font-size: 12px;
		font-weight: 800;
		margin-bottom: 4px;
	}

	.tcp-desktop-link-stats {
		display: none;
	}

	.tcp-mobile-link-stats {
		display: inline-block;
	}
}

/* Managed affiliate link cards */
.tcp-aff-link-generator {
	margin-top: 22px;
}

.tcp-aff-link-heading {
	background: #ffffff;
	border: 1px solid #d8e6f7;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(13, 42, 82, 0.06);
	margin-bottom: 18px;
	padding: 20px;
}

.tcp-aff-section-kicker {
	color: #c99a2e;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	margin: 0 0 6px;
}

.tcp-aff-link-heading h3 {
	color: #0d2a52;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 16px;
}

.tcp-aff-utm-builder {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tcp-aff-utm-builder label {
	display: grid;
	gap: 7px;
}

.tcp-aff-utm-builder span {
	color: #0d2a52;
	font-weight: 800;
}

.tcp-aff-utm-builder input,
.tcp-aff-utm-builder select {
	border: 1px solid #d8e6f7;
	border-radius: 10px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 12px;
	width: 100%;
}

.tcp-aff-link-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.tcp-aff-link-card {
	min-width: 0;
	overflow: hidden;
	border: 1px solid #d8e6f7;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(13, 42, 82, 0.06);
}

.tcp-aff-link-image-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f5f8fc;
	overflow: hidden;
}

.tcp-aff-link-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.tcp-aff-link-placeholder {
	align-items: center;
	color: #0d2a52;
	display: flex;
	font-size: 24px;
	font-weight: 800;
	height: 100%;
	justify-content: center;
	text-align: center;
}

.tcp-aff-link-body {
	padding: 16px;
}

.tcp-aff-page-badge {
	background: #f8efe0;
	border-radius: 999px;
	color: #9b6b10;
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	margin-bottom: 10px;
	padding: 5px 10px;
}

.tcp-aff-link-title {
	font-size: 20px;
	font-weight: 800;
	color: #0d2a52;
	line-height: 1.35;
	margin: 0;
}

.tcp-aff-link-desc {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.7;
	color: #4b5b70;
	overflow-wrap: anywhere;
}

.tcp-aff-url-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-top: 14px;
	padding: 12px;
	border: 1px solid #d8e6f7;
	border-radius: 10px;
	font-size: 13px;
	overflow-wrap: anywhere;
}

.tcp-aff-card-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 12px;
}

.tcp-aff-copy-btn,
.tcp-aff-open-btn {
	align-items: center;
	box-sizing: border-box;
	display: inline-flex;
	justify-content: center;
	min-height: 46px;
	border-radius: 10px;
	font-weight: 800;
	cursor: pointer;
	padding: 10px 12px;
	text-align: center;
	text-decoration: none;
}

.tcp-aff-copy-btn {
	background: #0d2a52;
	color: #ffffff;
	border: 1px solid #0d2a52;
}

.tcp-aff-open-btn {
	background: #ffffff;
	color: #0d2a52;
	border: 1px solid #0d2a52;
}

.tcp-aff-link-stats {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 14px;
}

.tcp-aff-link-stats span {
	background: #f5f8fc;
	border-radius: 10px;
	color: #4b5b70;
	font-size: 12px;
	font-weight: 700;
	padding: 8px;
	text-align: center;
}

.tcp-aff-empty-links {
	background: #ffffff;
	border: 1px solid #d8e6f7;
	border-radius: 18px;
	color: #0d2a52;
	font-weight: 800;
	padding: 18px;
}

@media (max-width: 1024px) {
	.tcp-aff-link-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.tcp-aff-link-grid,
	.tcp-aff-utm-builder {
		grid-template-columns: 1fr;
	}

	.tcp-aff-card-actions {
		grid-template-columns: 1fr;
	}

	.tcp-aff-link-title {
		font-size: 18px;
	}

	.tcp-aff-copy-btn,
	.tcp-aff-open-btn {
		width: 100%;
	}
}
/* Withdrawal summary notice */
.tcp-aff-withdraw-notice {
	border: 1px solid #f0d28a;
	background: #fff8e6;
	color: #6f4f00;
	padding: 16px 18px;
	border-radius: 14px;
	line-height: 1.7;
	font-size: 15px;
	margin-top: 12px;
}

.tcp-aff-withdraw-notice strong {
	display: block;
	color: #0d2a52;
	font-size: 16px;
	margin-bottom: 6px;
}

.tcp-aff-withdraw-notice p {
	margin: 4px 0;
}

.tcp-aff-withdraw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	background: #0d2a52;
	color: #ffffff !important;
	font-weight: 800;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(13, 42, 82, 0.18);
	margin-top: 12px;
}

.tcp-aff-withdraw-btn:hover {
	background: #123a77;
}

@media (max-width: 640px) {
	.tcp-aff-withdraw-btn {
		width: 100%;
	}
}
.tcp-aff-link-subtitle {
	color: #4b5b70;
	font-size: 15px;
	line-height: 1.7;
	margin: -6px 0 16px;
}
