/* Affiliate Statistik Dashboard */
.affwp-statistik {
	background: #f7f8f8;
	padding: 24px;
	border-radius: 20px;
}

.affwp-statistik-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
}

.affwp-statistik-header h2 {
	color: #71003d;
	font-weight: 700;
	font-size: 24px;
	margin-bottom: 6px;
}

.affwp-statistik-header p {
	color: #6b6f7a;
	font-size: 14px;
	margin: 0;
}

.affwp-statistik-range {
	display: flex;
	gap: 12px;
	background: #ffffff;
	padding: 10px 12px;
	border-radius: 12px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.affwp-statistik-range label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 11px;
	color: #6b6f7a;
	text-transform: uppercase;
	font-weight: 700;
}

.affwp-statistik-range input[type="date"] {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 13px;
	color: #1a1d2b;
}

.affwp-statistik-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

.stat-card {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}

.stat-card .stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #f2f3f8;
	margin-bottom: 20px;
}

.stat-card .stat-icon.stat-icon-revenue {
	background: linear-gradient(135deg, #7b2ff7, #f107a3);
}

.stat-card .stat-icon.stat-icon-clicks {
	background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-card .stat-icon.stat-icon-conversions {
	background: linear-gradient(135deg, #f857a6, #ff5858);
}

.stat-card .stat-icon.stat-icon-unpaid {
	background: linear-gradient(135deg, #f6d365, #fda085);
}

.stat-card .stat-change {
	position: absolute;
	top: 18px;
	right: 20px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.stat-card .stat-change.positive {
	background: #e6f7ef;
	color: #1f9254;
}

.stat-card .stat-change.negative {
	background: #fdecec;
	color: #c0392b;
}

.stat-card .stat-change.neutral {
	background: #f3f4f6;
	color: #7a7f8b;
}

.stat-card .stat-label {
	color: #7a7f8b;
	font-size: 14px;
	margin-bottom: 6px;
}

.stat-card .stat-value {
	font-size: 24px;
	font-weight: 700;
	color: #1a1d2b;
}

.stat-card .stat-background {
	position: absolute;
	right: -40px;
	bottom: -40px;
	width: 120px;
	height: 120px;
	background: rgba(113, 0, 61, 0.05);
	border-radius: 50%;
}

.stat-card-conversion {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stat-card-conversion .stat-value {
	margin-bottom: 4px;
}

.stat-conversion-chart {
	position: relative;
	width: 120px;
	height: 120px;
}

.stat-conversion-chart canvas {
	width: 120px !important;
	height: 120px !important;
}

.affwp-statistik-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
	margin-bottom: 24px;
}

.affwp-statistik-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
}

.affwp-statistik-card h3 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 4px;
	color: #1a1d2b;
}

.affwp-statistik-card p {
	margin: 0;
	color: #7a7f8b;
	font-size: 13px;
}

.affwp-statistik-export {
	border: 1px solid #e5e7eb;
	background: #ffffff;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	color: #5a5f6a;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.affwp-statistik-export-icon {
	font-size: 14px;
}

.affwp-statistik-chart {
	min-height: 260px;
}

.affwp-statistik-chart canvas {
	width: 100% !important;
	height: 260px !important;
}

.affwp-statistik-link {
	color: #71003d;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.affwp-statistik-table-wrapper {
	overflow-x: auto;
	position: relative;
}

.affwp-statistik-table {
	width: 100%;
	border-collapse: collapse;
}

.affwp-statistik-table thead th {
	text-align: left;
	color: #9aa0ad;
	font-size: 12px;
	font-weight: 700;
	padding-bottom: 12px;
	text-transform: uppercase;
}

.affwp-statistik-table tbody td {
	padding: 14px 0;
	border-top: 1px solid #eef0f3;
	font-size: 14px;
	color: #2c2f3a;
	vertical-align: middle;
}

.affwp-admin-tabs {
	display: flex;
	gap: 12px;
	margin: 16px 0;
}

.affwp-admin-tab {
	border: none;
	background: #f3f4f6;
	color: #5a5f6a;
	padding: 8px 16px;
	border-radius: 10px;
	font-weight: 600;
	cursor: pointer;
}

.affwp-admin-tab.is-active {
	background: #71003d;
	color: #ffffff;
}

.affwp-admin-panel {
	display: none;
}

.affwp-admin-panel.is-active {
	display: block;
}

.affwp-admin-controls {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.affwp-admin-controls label {
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
	color: #6b6f7a;
}

.affwp-admin-controls input,
.affwp-admin-controls select {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 13px;
	color: #1a1d2b;
}

.affwp-loading {
	position: relative;
}

.affwp-loading.is-loading .affwp-loader-overlay {
	opacity: 1;
	visibility: visible;
}

.affwp-loading.is-loading > :not(.affwp-loader-overlay) {
	filter: blur(2px);
	opacity: 0.6;
	pointer-events: none;
}

.affwp-loader-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
	z-index: 2;
}

.affwp-loader-overlay::after {
	content: "";
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #e5e7eb;
	border-top-color: #71003d;
	animation: affwpSpin 0.8s linear infinite;
}

@keyframes affwpSpin {
	to {
		transform: rotate(360deg);
	}
}

.affwp-admin-search,
.affwp-admin-filter {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.affwp-admin-table {
	width: 100%;
	border-collapse: collapse;
}

.affwp-admin-table thead th {
	text-align: left;
	color: #9aa0ad;
	font-size: 12px;
	font-weight: 700;
	padding-bottom: 12px;
	text-transform: uppercase;
	cursor: pointer;
}

.affwp-admin-table thead th.is-sorted-asc::after {
	content: " ▲";
	font-size: 10px;
}

.affwp-admin-table thead th.is-sorted-desc::after {
	content: " ▼";
	font-size: 10px;
}

.affwp-admin-table tbody td {
	padding: 14px 0;
	border-top: 1px solid #eef0f3;
	font-size: 14px;
	color: #2c2f3a;
	vertical-align: middle;
}

.admin-affiliate-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.affwp-admin-pagination {
	display: flex;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.affwp-admin-page {
	border: 1px solid #e5e7eb;
	background: #ffffff;
	padding: 6px 10px;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	color: #5a5f6a;
}

.affwp-admin-page.is-active {
	background: #71003d;
	color: #ffffff;
	border-color: #71003d;
}
.campaign-meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.campaign-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #f0f2f5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: #71003d;
}

.campaign-name {
	font-weight: 700;
}

.campaign-type {
	color: #7a7f8b;
	font-size: 12px;
}

.affwp-statistik-notice {
	background: #fff6e5;
	color: #9a6b1c;
	padding: 16px;
	border-radius: 12px;
	font-size: 14px;
}

@media (max-width: 768px) {
	.affwp-statistik-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.affwp-statistik-tabs {
		width: 100%;
		justify-content: space-between;
	}
}

