/* Public styles for WooCommerce Parrainage */

/* ══════ ACCENT COLOR SYSTEM (overridden dynamically via inline CSS) ══════ */
:root {
	--jh-accent: #4f46e5;
	--jh-accent-light: #6366f1;
	--jh-accent-dark: #4338ca;
	--jh-accent-soft: #7c3aed;
	--jh-accent-vivid: #a855f7;
	--jh-accent-bg: #eef2ff;
	--jh-accent-bg-deep: #ede9fe;
	--jh-accent-rgb: 79, 70, 229;
}

/* === FORMULAIRE D'INSCRIPTION PARRAIN === */
.epa-registration-form {
	max-width: 500px;
	margin: 0 auto;
	padding: 2rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.epa-form-row {
	margin-bottom: 1.5rem;
}

.epa-form-row label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #374151;
}

.epa-form-row input[type="text"],
.epa-form-row input[type="email"],
.epa-form-row input[type="password"] {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
}

.epa-form-row input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.epa-form-actions {
	text-align: center;
	margin-top: 2rem;
}

/* === BOUTONS === */
.epa-btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-block;
}

.epa-btn--primary {
	background: #3b82f6;
	color: white;
}

.epa-btn--primary:hover {
	background: #2563eb;
	color: white;
	text-decoration: none;
}

/* === NOTICES === */
.epa-notice {
	padding: 1rem;
	margin: 1rem 0;
	border-radius: 4px;
}

.epa-notice--info {
	background: #dbeafe;
	border: 1px solid #93c5fd;
	color: #1e40af;
}

.epa-notice--warning {
	background: #fef3c7;
	border: 1px solid #fbbf24;
	color: #92400e;
}

.epa-notice--success {
	background: #d1fae5;
	border: 1px solid #34d399;
	color: #065f46;
}

/* === PAGE DE SUCCÈS === */
.epa-success-message {
	text-align: center;
	padding: 3rem 1rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	max-width: 600px;
	margin: 2rem auto;
}

.epa-success-message h2 {
	color: #374151;
	margin-bottom: 1rem;
}

.epa-success-message p {
	color: #6b7280;
	margin-bottom: 1rem;
}

/* === STATISTIQUES === */
.epa-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 2rem 0;
}

.epa-stat-card {
	padding: 1.5rem;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.epa-stat-card h3 {
	margin: 0;
	color: #374151;
	font-size: 1.5rem;
}

.epa-stat-card p {
	margin: 0.5rem 0 0 0;
	color: #6b7280;
	font-size: 0.9rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
	.epa-registration-form {
		margin: 1rem;
		padding: 1.5rem;
	}
	
	.epa-stats-grid {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
	
	.epa-stat-card {
		padding: 1rem;
	}
	
	.epa-success-message {
		margin: 1rem;
		padding: 2rem 1rem;
	}
}

/* === DASHBOARD PARRAIN === */
.epa-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem;
}

.epa-dashboard h1,
.epa-dashboard h2,
.epa-dashboard h3 {
	color: #374151;
}

.epa-dashboard-section {
	background: #fff;
	border-radius: 8px;
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* === TABLEAUX === */
.epa-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.epa-table th,
.epa-table td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
}

.epa-table th {
	background: #f9fafb;
	font-weight: 600;
	color: #374151;
}

.epa-table tbody tr:hover {
	background: #f9fafb;
}

/* === ÉTATS VIDES === */
.epa-empty-state {
	text-align: center;
	padding: 3rem 1rem;
	color: #6b7280;
}

.epa-empty-state h3 {
	margin: 0 0 0.5rem 0;
	color: #6b7280;
}

.epa-empty-state p {
	margin: 0;
	color: #9ca3af;
}

/* === DASHBOARD MODERNE === */
.jhdigishop-dashboard {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* En-tête du dashboard */
.epa-dashboard-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 2rem;
	border-radius: 12px;
	margin-bottom: 2rem;
	text-align: center;
}

.epa-dashboard-header h1 {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
}

.epa-dashboard-header p {
	margin: 0.5rem 0 0 0;
	opacity: 0.9;
}

/* Grille de statistiques moderne */
.epa-stats-grid-modern {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

/* Carte de statistique */
.epa-stat-card-modern {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.epa-stat-card-modern--blue {
	border-top: 4px solid #3b82f6;
}

.epa-stat-card-modern--green {
	border-top: 4px solid #10b981;
}

.epa-stat-card-modern--orange {
	border-top: 4px solid #f59e0b;
}

.epa-stat-card-modern--purple {
	border-top: 4px solid #8b5cf6;
}

/* Contenu de la carte */
.epa-stat-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.epa-stat-value h3 {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	color: #1f2937;
}

.epa-stat-value p {
	margin: 0;
	color: #6b7280;
	font-size: 0.9rem;
}

/* Icônes de statistiques */
.epa-stat-icon {
	padding: 0.75rem;
	border-radius: 50%;
	font-size: 1.5rem;
}

.epa-stat-icon--blue {
	background: #dbeafe;
	color: #3b82f6;
}

.epa-stat-icon--green {
	background: #d1fae5;
	color: #10b981;
}

.epa-stat-icon--orange {
	background: #fef3c7;
	color: #f59e0b;
}

.epa-stat-icon--purple {
	background: #ede9fe;
	color: #8b5cf6;
}

/* Section card (pour tableaux) */
.epa-section-card {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	margin-bottom: 2rem;
}

/* Titre de section */
.epa-section-title {
	margin: 0 0 1.5rem 0;
	color: #1f2937;
	font-size: 1.5rem;
	display: flex;
	align-items: center;
}

.epa-section-title span {
	margin-right: 0.5rem;
}

/* Wrapper pour tableaux */
.epa-table-wrapper {
	overflow-x: auto;
}

.epa-table-wrapper table {
	width: 100%;
}

/* État vide moderne */
.epa-empty-state-modern {
	text-align: center;
	padding: 3rem;
	background: #f9fafb;
	border-radius: 8px;
	border: 2px dashed #d1d5db;
}

.epa-empty-state-modern-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
	opacity: 0.5;
}

.epa-empty-state-modern h3 {
	margin: 0 0 0.5rem 0;
	color: #6b7280;
}

.epa-empty-state-modern p {
	margin: 0;
	color: #9ca3af;
}

/* === SUCCESS MESSAGE CONTENT === */
.epa-success-content {
	text-align: center;
	padding: 3rem 1rem;
}

.epa-success-icon {
	font-size: 4rem;
	margin-bottom: 1rem;
}

/* === SHORTCODE STATS === */
.epa-stat-icon-simple {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.epa-stat-card--gray {
	background: #f8fafc;
}

.epa-stat-card--light-green {
	background: #f0fdf4;
}

.epa-stat-card--green {
	background: #ecfdf5;
}

.epa-stat-card--yellow {
	background: #fef3c7;
}

/* === NOUVELLES COULEURS DE CARTES === */
.epa-stat-card-modern--yellow {
	border-top: 4px solid #eab308;
}

.epa-stat-card-modern--red {
	border-top: 4px solid #ef4444;
}

.epa-stat-card-modern--teal {
	border-top: 4px solid #14b8a6;
}

.epa-stat-card-modern--indigo {
	border-top: 4px solid #6366f1;
}

.epa-stat-icon--yellow {
	background: #fef3c7;
	color: #eab308;
}

.epa-stat-icon--red {
	background: #fee2e2;
	color: #ef4444;
}

.epa-stat-icon--teal {
	background: #ccfbf1;
	color: #14b8a6;
}

.epa-stat-icon--indigo {
	background: #e0e7ff;
	color: #6366f1;
}

/* === STATUTS DES COMMISSIONS === */
.epa-status {
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 500;
	display: inline-block;
}

.epa-status--paid {
	background: #dcfce7;
	color: #166534;
}

.epa-status--due {
	background: #fed7aa;
	color: #9a3412;
}

.epa-status--pending {
	background: #ddd6fe;
	color: #5b21b6;
}

.epa-status--cancelled {
	background: #fee2e2;
	color: #991b1b;
}

/* === GRIDS DE STATISTIQUES PAR STATUT === */
.epa-sponsor-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.epa-sponsor-stat {
	padding: 1.5rem;
	border-radius: 8px;
	text-align: center;
}

.epa-sponsor-stat h3 {
	margin: 0 0 0.5rem 0;
	font-size: 1.75rem;
}

.epa-sponsor-stat p {
	margin: 0;
	font-weight: 600;
	font-size: 0.9rem;
}

/* === SECTION BADGES === */
.epa-badges-section {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	border: 2px solid #fbbf24;
}

.epa-badges-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

.epa-badge-card {
	background: white;
	border-radius: 10px;
	padding: 1.5rem;
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: 2px solid transparent;
}

.epa-badge-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
	border-color: #fbbf24;
}

.epa-badge-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.epa-badge-info {
	flex: 1;
	min-width: 0;
}

.epa-badge-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #1f2937;
}

.epa-badge-description {
	margin: 0 0 0.75rem 0;
	font-size: 0.9rem;
	color: #6b7280;
	line-height: 1.4;
}

.epa-badge-date {
	display: inline-block;
	font-size: 0.75rem;
	color: #9ca3af;
	background: #f3f4f6;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-weight: 500;
}

/* Responsive badges */
@media (max-width: 768px) {
	.epa-badges-grid {
		grid-template-columns: 1fr;
	}
	
	.epa-badge-card {
		padding: 1rem;
	}
	
	.epa-badge-icon {
		width: 50px;
		height: 50px;
		font-size: 1.5rem;
	}
}

/* ═══════════════════════════════════════════════════════════════
   AFFILIATE MY ACCOUNT TAB  — Modern Design
   ═══════════════════════════════════════════════════════════════ */

@keyframes jh-aff-fadeUp {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.jh-aff-front {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	animation: jh-aff-fadeUp .4s ease;
}

/* ══════ HEADER ══════ */
.jh-aff-front__header {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 1.5rem;
}
.jh-aff-front__header-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--jh-accent) 0%, var(--jh-accent-soft) 50%, var(--jh-accent-vivid) 100%);
}
.jh-aff-front__header-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 50%, rgba(255,255,255,.12) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 40%);
}
.jh-aff-front__header-content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 2rem 2.25rem;
	color: #fff;
}
.jh-aff-front__header-icon {
	width: 56px;
	height: 56px;
	background: rgba(255,255,255,.15);
	backdrop-filter: blur(6px);
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.jh-aff-front__header-content h2 {
	margin: 0 0 .2rem;
	font-size: 1.45rem;
	font-weight: 700;
	color: #fff;
}
.jh-aff-front__header-content p {
	margin: 0;
	font-size: .92rem;
	opacity: .88;
	line-height: 1.4;
}

/* ══════ STAT CARDS ══════ */
.jh-aff-front__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-bottom: 1.75rem;
}
.jh-aff-front__stat {
	display: flex;
	align-items: center;
	gap: .85rem;
	background: #fff;
	border-radius: 14px;
	padding: 1.15rem 1.25rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.04);
	transition: transform .18s, box-shadow .18s;
}
.jh-aff-front__stat:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.jh-aff-front__stat-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.jh-aff-front__stat--purple .jh-aff-front__stat-icon { background: var(--jh-accent-bg-deep); color: var(--jh-accent-soft); }
.jh-aff-front__stat--blue .jh-aff-front__stat-icon   { background: #dbeafe; color: #2563eb; }
.jh-aff-front__stat--green .jh-aff-front__stat-icon  { background: #d1fae5; color: #059669; }
.jh-aff-front__stat-value {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.1;
}
.jh-aff-front__stat-label {
	display: block;
	font-size: .78rem;
	color: #6b7280;
	margin-top: .15rem;
}

/* ══════ SECTION HEADER ══════ */
.jh-aff-front__section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	padding-bottom: .75rem;
	border-bottom: 2px solid #f3f4f6;
}
.jh-aff-front__section-header h3 {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #111827;
}
.jh-aff-front__section-header h3 svg { color: var(--jh-accent); }
.jh-aff-front__count-badge {
	background: var(--jh-accent-bg);
	color: var(--jh-accent);
	font-size: .78rem;
	font-weight: 600;
	padding: .3rem .75rem;
	border-radius: 20px;
}

/* ══════ EMPTY STATE ══════ */
.jh-aff-front__empty {
	text-align: center;
	padding: 3.5rem 1.5rem;
	background: linear-gradient(180deg, #f9fafb 0%, #fff 100%);
	border: 2px dashed #d1d5db;
	border-radius: 16px;
}
.jh-aff-front__empty-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 1rem;
	background: #f3f4f6;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}
.jh-aff-front__empty h3 {
	margin: 0 0 .35rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: #6b7280;
}
.jh-aff-front__empty p {
	margin: 0;
	font-size: .9rem;
	color: #9ca3af;
}

/* ══════ TAGS ══════ */
.jh-aff-front__tag {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	font-size: .78rem;
	font-weight: 600;
	padding: .25rem .6rem;
	border-radius: 6px;
	white-space: nowrap;
}
.jh-aff-front__tag--price {
	background: #f0fdf4;
	color: #15803d;
}
.jh-aff-front__tag--price del { opacity: .5; }
.jh-aff-front__tag--price ins { text-decoration: none; }
.jh-aff-front__tag--comm {
	background: var(--jh-accent-bg);
	color: var(--jh-accent);
}

/* ══════ DATA TABLE WRAPPER ══════ */
.jh-aff-front__table-wrap {
	background: #fff;
	border-radius: 14px;
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.04);
	overflow: hidden;
}

/* DataTable overrides */
.jh-aff-front__table-wrap .dataTables_wrapper { font-family: inherit; }
.jh-aff-front__table-wrap .dataTables_filter input {
	border: 1.5px solid #e5e7eb !important;
	border-radius: 10px !important;
	padding: .5rem .85rem !important;
	font-size: .85rem !important;
	outline: none !important;
	transition: border-color .15s, box-shadow .15s;
	min-width: 220px;
}
.jh-aff-front__table-wrap .dataTables_filter input:focus {
	border-color: var(--jh-accent) !important;
	box-shadow: 0 0 0 3px rgba(var(--jh-accent-rgb),.1) !important;
}
.jh-aff-front__table-wrap .dataTables_length select {
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	padding: .35rem .5rem;
	font-size: .85rem;
}
.jh-aff-front__table-wrap .dataTables_info {
	font-size: .8rem;
	color: #6b7280;
	padding-top: 1rem !important;
}
.jh-aff-front__table-wrap .dataTables_paginate {
	padding-top: 1rem !important;
}
.jh-aff-front__table-wrap .dataTables_paginate .paginate_button {
	border-radius: 8px !important;
	border: 1px solid #e5e7eb !important;
	margin: 0 2px !important;
	font-size: .82rem !important;
	padding: 4px 10px !important;
	transition: all .15s !important;
}
.jh-aff-front__table-wrap .dataTables_paginate .paginate_button.current {
	background: linear-gradient(135deg, var(--jh-accent), var(--jh-accent-light)) !important;
	color: #fff !important;
	border-color: var(--jh-accent) !important;
}
.jh-aff-front__table-wrap .dataTables_paginate .paginate_button:hover {
	background: var(--jh-accent-bg) !important;
	color: var(--jh-accent) !important;
	border-color: var(--jh-accent) !important;
}

/* Table itself */
.jh-aff-front__table { border-collapse: collapse; }
.jh-aff-front__table thead th {
	background: #f8fafc;
	color: #374151;
	font-weight: 600;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: .85rem .75rem;
	border-bottom: 2px solid #e5e7eb;
}
.jh-aff-front__table tbody td {
	padding: .75rem;
	vertical-align: middle;
	border-bottom: 1px solid #f3f4f6;
	font-size: .88rem;
	color: #374151;
}
.jh-aff-front__table tbody tr:hover td {
	background: #faf5ff;
}

/* Product cell */
.jh-aff-front__td-product {
	display: flex;
	align-items: center;
	gap: .7rem;
}
.jh-aff-front__td-thumb {
	width: 42px;
	height: 42px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
}
.jh-aff-front__td-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.jh-aff-front__td-name {
	font-weight: 600;
	color: #111827;
}

/* Link cell */
.jh-aff-front__link-cell { max-width: 220px; }
.jh-aff-front__link-input {
	width: 100%;
	padding: .45rem .65rem;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: .75rem;
	color: #374151;
	background: #f9fafb;
	transition: border-color .15s, box-shadow .15s;
}
.jh-aff-front__link-input:focus {
	outline: none;
	border-color: var(--jh-accent);
	box-shadow: 0 0 0 3px rgba(var(--jh-accent-rgb),.1);
	background: #fff;
}

/* ══════ ACTION BUTTONS ══════ */
.jh-aff-front__actions {
	display: flex;
	gap: .4rem;
}
.jh-aff-front__action-btn {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .45rem .7rem;
	border: none;
	border-radius: 8px;
	font-size: .76rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all .18s ease;
}
.jh-aff-front__action-btn--copy {
	background: linear-gradient(135deg, var(--jh-accent), var(--jh-accent-light));
	color: #fff;
	box-shadow: 0 2px 6px rgba(var(--jh-accent-rgb),.25);
}
.jh-aff-front__action-btn--copy:hover {
	background: linear-gradient(135deg, var(--jh-accent-dark), var(--jh-accent));
	box-shadow: 0 4px 12px rgba(var(--jh-accent-rgb),.35);
	transform: translateY(-1px);
}
.jh-aff-front__action-btn--view {
	background: #f3f4f6;
	color: #374151;
}
.jh-aff-front__action-btn--view:hover {
	background: #e5e7eb;
	transform: translateY(-1px);
}
.jh-aff-front__copy-icon { display: inline-block; }
.jh-aff-front__check-icon { display: none; }
.jh-aff-front__action-btn--done {
	background: linear-gradient(135deg, #059669, #10b981) !important;
	box-shadow: 0 2px 8px rgba(5,150,105,.3) !important;
}
.jh-aff-front__action-btn--done .jh-aff-front__copy-icon { display: none; }
.jh-aff-front__action-btn--done .jh-aff-front__check-icon { display: inline-block; }

/* ══════ PRODUCT PREVIEW MODAL ══════ */
.jh-aff-front__modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.5);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}
.jh-aff-front__modal--open { display: flex; }
.jh-aff-front__modal-card {
	background: #fff;
	width: min(520px, 94vw);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.22);
	overflow: hidden;
	animation: jh-aff-fadeUp .25s ease;
	position: relative;
}
.jh-aff-front__modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: rgba(0,0,0,.06);
	border: none;
	font-size: 20px;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background .12s;
}
.jh-aff-front__modal-close:hover { background: rgba(0,0,0,.12); color: #111827; }
.jh-aff-front__modal-img {
	width: 100%;
	height: 240px;
	background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
	overflow: hidden;
}
.jh-aff-front__modal-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.jh-aff-front__modal-body {
	padding: 1.25rem 1.5rem 1.5rem;
}
.jh-aff-front__modal-body h3 {
	margin: 0 0 .5rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #111827;
}
.jh-aff-front__modal-desc {
	margin: 0 0 1rem;
	font-size: .9rem;
	color: #6b7280;
	line-height: 1.5;
}
.jh-aff-front__modal-meta {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}
.jh-aff-front__modal-link-row {
	display: flex;
	gap: .45rem;
	margin-bottom: .75rem;
}
.jh-aff-front__modal-link-row .jh-aff-front__link-input {
	flex: 1;
	font-size: .78rem;
}
.jh-aff-front__modal-visit {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--jh-accent);
	text-decoration: none;
	transition: color .12s;
}
.jh-aff-front__modal-visit:hover { color: var(--jh-accent-dark); text-decoration: underline; }

@keyframes jh-aff-fadeUp {
	from { opacity: 0; transform: translateY(24px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════ NOTICE (pending / inactive) ══════ */
.jh-aff-front__notice {
	padding: 2.5rem 2rem;
	border-radius: 16px;
	text-align: center;
}
.jh-aff-front__notice h3 {
	margin: 0 0 .5rem;
	font-size: 1.15rem;
	font-weight: 700;
}
.jh-aff-front__notice p {
	margin: 0;
	font-size: .95rem;
	line-height: 1.5;
}
.jh-aff-front__notice--warning {
	background: linear-gradient(135deg, #fffbeb, #fef3c7);
	border: 1px solid #fbbf24;
	color: #92400e;
	box-shadow: 0 4px 16px rgba(251,191,36,.15);
}
.jh-aff-front__notice--info {
	background: linear-gradient(135deg, #eff6ff, #dbeafe);
	border: 1px solid #93c5fd;
	color: #1e40af;
	box-shadow: 0 4px 16px rgba(59,130,246,.1);
	text-align: left;
	padding: 1rem 1.25rem;
	border-radius: 12px;
}

/* ══════ 4-COLUMN STATS GRID ══════ */
.jh-aff-front__stats--4 {
	grid-template-columns: repeat(4, 1fr);
}

/* ══════ ORANGE STAT VARIANT ══════ */
.jh-aff-front__stat--orange .jh-aff-front__stat-icon { background: #ffedd5; color: #ea580c; }

/* ══════ REF CODE BOX ══════ */
.jh-aff-front__ref-box {
	display: flex;
	align-items: center;
	gap: .75rem;
	background: #f8fafc;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	padding: .7rem 1rem;
	margin-bottom: 1.75rem;
}
.jh-aff-front__ref-label {
	font-size: .85rem;
	color: #6b7280;
	font-weight: 500;
}
.jh-aff-front__ref-sep {
	width: 1px;
	height: 20px;
	background: #d1d5db;
	flex-shrink: 0;
}
.jh-aff-front__ref-code {
	background: linear-gradient(135deg, var(--jh-accent), var(--jh-accent-light));
	color: #fff;
	padding: .3rem .75rem;
	border-radius: 6px;
	font-size: .88rem;
	font-weight: 700;
	letter-spacing: .06em;
}

/* ══════ BADGES (front) ══════ */
.jh-aff-front__badge {
	display: inline-block;
	padding: .2rem .6rem;
	border-radius: 20px;
	font-size: .75rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
}
.jh-aff-front__badge--pending    { background: #f59e0b; }
.jh-aff-front__badge--paid       { background: #10b981; }
.jh-aff-front__badge--processing { background: #3b82f6; }
.jh-aff-front__badge--rejected   { background: #ef4444; }

/* ══════ AMOUNT HIGHLIGHT ══════ */
.jh-aff-front__amount {
	color: #059669;
	font-weight: 700;
}

/* ══════ BANK INFO FORM ══════ */
.jh-aff-front__bank-form {
	background: #f8fafc;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}
.jh-aff-front__form-row {
	margin-bottom: 1rem;
}
.jh-aff-front__form-row label {
	display: block;
	font-size: .82rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: .35rem;
}
.jh-aff-front__form-input {
	width: 100%;
	padding: .55rem .75rem;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	font-size: .9rem;
	color: #111827;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}
.jh-aff-front__form-input:focus {
	border-color: var(--jh-accent);
	box-shadow: 0 0 0 3px rgba(var(--jh-accent-rgb), .1);
	outline: none;
}
select.jh-aff-front__form-input {
	appearance: auto;
	cursor: pointer;
}
.jh-aff-front__form-actions {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-top: 1.25rem;
}

/* ══════ SMALL EMPTY STATE ══════ */
.jh-aff-front__empty--small {
	padding: 1.5rem 1rem;
	border-radius: 10px;
	border: 1.5px dashed #d1d5db;
	background: #f9fafb;
	margin-bottom: 1rem;
}
.jh-aff-front__empty--small p {
	margin: 0;
	font-size: .88rem;
	color: #9ca3af;
	text-align: center;
}

/* ══════ RESPONSIVE ══════ */
@media (max-width: 768px) {
	.jh-aff-front__stats,
	.jh-aff-front__stats--4 { grid-template-columns: repeat(2, 1fr); }
	.jh-aff-front__header-content { flex-direction: column; text-align: center; padding: 1.5rem; }
	.jh-aff-front__section-header { flex-direction: column; gap: .5rem; align-items: flex-start; }
	.jh-aff-front__actions { flex-direction: column; }
	.jh-aff-front__link-cell { max-width: 100%; }
	.jh-aff-front__ref-box { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
	.jh-aff-front__stats,
	.jh-aff-front__stats--4 { grid-template-columns: 1fr; }
	.jh-aff-front__modal-img { height: 160px; }
	.jh-aff-front__modal-link-row { flex-direction: column; }
}
