.fourbp-aff-dashboard {
	max-width: 960px;
	margin: 2em auto;
	font-family: inherit;
	color: inherit;
}

.fourbp-aff-dashboard h2 { margin: 0 0 0.5em; font-size: 1.6em; }
.fourbp-aff-dashboard h3 { margin: 0 0 0.6em; font-size: 1.15em; }

.fourbp-aff-empty,
.fourbp-aff-section {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1.25em 1.5em;
	margin-bottom: 1em;
}

.fourbp-aff-header {
	padding: 1.25em 1.5em;
	margin-bottom: 1em;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.fourbp-aff-header-meta {
	display: flex;
	gap: 1em;
	align-items: center;
	flex-wrap: wrap;
}

.fourbp-aff-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 3px;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.fourbp-aff-status.status-active   { background: #d4edda; color: #155724; }
.fourbp-aff-status.status-paused   { background: #fff3cd; color: #856404; }
.fourbp-aff-status.status-disabled { background: #f8d7da; color: #721c24; }

.fourbp-aff-code-label code {
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 3px;
}

.fourbp-aff-notice {
	padding: 0.75em 1em;
	border-radius: 6px;
	margin-bottom: 1em;
	border-left: 4px solid #999;
}
.fourbp-aff-notice-info    { background: #e6f4fa; border-left-color: #2271b1; color: #0a4b6e; }
.fourbp-aff-notice-warning { background: #fff8e5; border-left-color: #dba617; color: #674d00; }
.fourbp-aff-notice-error   { background: #fcf0f1; border-left-color: #d63638; color: #5d1416; }

.fourbp-aff-link-row {
	display: flex;
	gap: 0.5em;
	align-items: center;
	margin-bottom: 0.5em;
	flex-wrap: wrap;
}
.fourbp-aff-link-row label {
	flex: 0 0 120px;
	font-weight: 600;
}
.fourbp-aff-link-row input {
	flex: 1 1 320px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-family: monospace;
	font-size: 0.9em;
	background: #f9fafb;
	min-width: 0;
}

.fourbp-aff-copy {
	background: #2271b1;
	color: white;
	border: none;
	padding: 6px 14px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9em;
	transition: background-color 0.15s ease;
}
.fourbp-aff-copy:hover { background: #135e96; }
.fourbp-aff-copy.is-copied { background: #38a169; }

.fourbp-aff-btn {
	display: inline-block;
	background: #2271b1;
	color: white;
	padding: 8px 18px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
}
.fourbp-aff-btn:hover { background: #135e96; color: white; }

.fourbp-aff-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1em;
}
.fourbp-aff-stat {
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1em;
	text-align: center;
}
.fourbp-aff-stat-value {
	font-size: 1.8em;
	font-weight: 700;
	color: #1f2937;
	line-height: 1.2;
}
.fourbp-aff-stat-label {
	font-size: 0.85em;
	color: #6b7280;
	margin-top: 0.25em;
}

.fourbp-aff-recent {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #f3f4f6;
}
.fourbp-aff-recent li {
	display: flex;
	gap: 1em;
	padding: 0.5em 0;
	border-bottom: 1px solid #f3f4f6;
	align-items: center;
	font-size: 0.9em;
}
.fourbp-aff-recent-date  { flex: 0 0 160px; color: #6b7280; }
.fourbp-aff-recent-source {
	flex: 0 0 70px;
	text-transform: uppercase;
	font-size: 0.7em;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 3px;
	text-align: center;
	letter-spacing: 0.04em;
}
.fourbp-aff-recent-source.src-route { background: #e0e7ff; color: #3730a3; }
.fourbp-aff-recent-source.src-query { background: #dcfce7; color: #166534; }
.fourbp-aff-recent-type { font-weight: 500; }
.fourbp-aff-recent-path {
	color: #4b5563;
	font-family: monospace;
	font-size: 0.85em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	flex: 1 1 auto;
}

.fourbp-aff-recent-total {
	margin-left: auto;
	font-weight: 600;
	white-space: nowrap;
}

.fourbp-aff-empty-row {
	color: #9ca3af;
	font-style: italic;
	margin: 0;
}

@media (max-width: 768px) {
	.fourbp-aff-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.fourbp-aff-stats-grid    { grid-template-columns: 1fr; }
	.fourbp-aff-link-row label { flex-basis: 100%; }
	.fourbp-aff-recent li     { flex-wrap: wrap; }
	.fourbp-aff-recent-date   { flex-basis: 100%; }
}
