.avin-wrap {
	--avin-bg: #f4f7fb;
	--avin-card: #ffffff;
	--avin-card-soft: #f8fafc;
	--avin-text: #142033;
	--avin-muted: #607086;
	--avin-line: #dce4ef;
	--avin-blue: #2563eb;
	--avin-sky: #38bdf8;
	--avin-green: #16a34a;
	--avin-amber: #d97706;
	--avin-purple: #7c3aed;
	--avin-shadow: 0 18px 45px rgba(20, 32, 51, .08);
	box-sizing: border-box;
	max-width: 1360px;
	padding-right: 20px;
}

.avin-wrap,
.avin-wrap * {
	box-sizing: border-box;
}

.avin-theme-dark {
	--avin-bg: #07111f;
	--avin-card: #101b2d;
	--avin-card-soft: #0c1626;
	--avin-text: #edf4ff;
	--avin-muted: #9cafc7;
	--avin-line: rgba(190, 210, 235, .16);
	--avin-shadow: 0 24px 70px rgba(0, 0, 0, .24);
	color: var(--avin-text);
}

.avin-wrap h1 {
	color: var(--avin-text);
	font-size: 24px;
	font-weight: 750;
	margin: 20px 0 14px;
}

.avin-hero,
.avin-kpi,
.avin-card,
.avin-insight {
	background: var(--avin-card);
	border: 1px solid var(--avin-line);
	border-radius: 8px;
	box-shadow: var(--avin-shadow);
	color: var(--avin-text);
}

.avin-hero {
	align-items: center;
	background:
		linear-gradient(135deg, rgba(37, 99, 235, .18), transparent 36%),
		linear-gradient(110deg, var(--avin-card), var(--avin-card-soft));
	display: flex;
	gap: 24px;
	justify-content: space-between;
	margin: 14px 0 16px;
	padding: 24px;
}

.avin-hero-compact {
	margin-bottom: 16px;
}

.avin-hero h2,
.avin-card h2 {
	color: var(--avin-text);
	font-size: 20px;
	line-height: 1.2;
	margin: 0;
}

.avin-hero p {
	color: var(--avin-muted);
	font-size: 14px;
	margin: 8px 0 0;
	max-width: 720px;
}

.avin-eyebrow {
	color: var(--avin-sky);
	font-size: 11px;
	font-weight: 800;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.avin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.avin-actions .button {
	min-height: 36px;
}

.avin-executive-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	margin: 16px 0;
}

.avin-kpi {
	min-height: 132px;
	overflow: hidden;
	padding: 16px;
	position: relative;
}

.avin-kpi::before,
.avin-insight::before {
	background: linear-gradient(90deg, var(--avin-blue), var(--avin-purple), var(--avin-green));
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.avin-kpi span,
.avin-insight span {
	color: var(--avin-muted);
	display: block;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.avin-kpi strong {
	color: var(--avin-text);
	display: block;
	font-size: 30px;
	line-height: 1.1;
	margin-top: 9px;
	overflow-wrap: anywhere;
}

.avin-kpi em {
	color: var(--avin-muted);
	display: block;
	font-size: 12px;
	font-style: normal;
	margin-top: 10px;
}

.avin-trend-up em {
	color: var(--avin-green);
}

.avin-trend-down em {
	color: #dc2626;
}

.avin-chart-card {
	margin: 16px 0;
	min-height: 390px;
}

.avin-card-head {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin-bottom: 14px;
}

.avin-chart-toggle {
	background: var(--avin-card-soft);
	border: 1px solid var(--avin-line);
	border-radius: 8px;
	display: flex;
	padding: 4px;
}

.avin-chart-toggle button {
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--avin-muted);
	cursor: pointer;
	font-weight: 750;
	min-height: 30px;
	padding: 0 12px;
}

.avin-chart-toggle button.is-active {
	background: var(--avin-blue);
	color: #fff;
}

.avin-chart-shell {
	background:
		linear-gradient(180deg, rgba(56, 189, 248, .08), transparent),
		var(--avin-card-soft);
	border: 1px solid var(--avin-line);
	border-radius: 8px;
	min-height: 316px;
	overflow: hidden;
	padding: 14px;
}

.avin-line-chart svg {
	display: block;
	height: auto;
	max-height: 300px;
	width: 100%;
}

.avin-chart-metrics {
	display: flex;
	gap: 16px;
	justify-content: flex-end;
	margin-bottom: 6px;
}

.avin-chart-metrics span {
	color: var(--avin-muted);
	font-size: 12px;
}

.avin-chart-metrics strong {
	color: var(--avin-text);
}

.avin-chart-area {
	fill: url("#avinArea");
}

.avin-chart-line {
	fill: none;
	stroke: url("#avinLine");
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 5;
}

.avin-chart-dots circle {
	fill: var(--avin-card);
	stroke: var(--avin-sky);
	stroke-width: 3;
}

.avin-chart-labels text {
	fill: var(--avin-muted);
	font-size: 12px;
	text-anchor: middle;
}

.avin-opportunities {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	margin: 16px 0;
}

.avin-insight {
	min-height: 142px;
	overflow: hidden;
	padding: 16px;
	position: relative;
	transition: transform .16s ease, box-shadow .16s ease;
}

.avin-insight:hover {
	box-shadow: 0 24px 70px rgba(20, 32, 51, .14);
	transform: translateY(-2px);
}

.avin-insight strong {
	color: var(--avin-text);
	display: block;
	font-size: 15px;
	line-height: 1.25;
	margin-top: 12px;
	min-height: 38px;
}

.avin-insight em {
	color: var(--avin-muted);
	display: block;
	font-size: 24px;
	font-style: normal;
	font-weight: 800;
	margin-top: 14px;
}

.avin-insight-blue::before {
	background: linear-gradient(90deg, var(--avin-blue), var(--avin-sky));
}

.avin-insight-green::before {
	background: linear-gradient(90deg, var(--avin-green), var(--avin-sky));
}

.avin-insight-amber::before {
	background: linear-gradient(90deg, var(--avin-amber), #facc15);
}

.avin-insight-purple::before {
	background: linear-gradient(90deg, var(--avin-purple), #ec4899);
}

.avin-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 16px;
}

.avin-pageview-grid .avin-kpi strong {
	font-size: 26px;
}

.avin-card {
	padding: 16px;
}

.avin-card h2 {
	font-size: 16px;
	margin-bottom: 12px;
}

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

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

.avin-table th,
.avin-table td {
	border-bottom: 1px solid var(--avin-line);
	color: var(--avin-text);
	padding: 10px 8px;
	text-align: left;
	vertical-align: middle;
}

.avin-table th {
	color: var(--avin-muted);
	font-size: 11px;
	text-transform: uppercase;
}

.avin-table tr:hover td {
	background: rgba(56, 189, 248, .06);
}

.avin-table a {
	color: var(--avin-text);
	font-weight: 650;
	text-decoration: none;
}

.avin-table a:hover {
	color: var(--avin-blue);
}

.avin-empty {
	color: var(--avin-muted);
}

.avin-pill {
	background: rgba(56, 189, 248, .12);
	border: 1px solid rgba(56, 189, 248, .28);
	border-radius: 999px;
	color: var(--avin-sky);
	display: inline-block;
	font-size: 11px;
	margin-left: 6px;
	padding: 1px 7px;
}

.avin-trend-pill {
	background: rgba(96, 165, 250, .12);
	border: 1px solid rgba(96, 165, 250, .25);
	border-radius: 999px;
	color: var(--avin-sky);
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	min-width: 54px;
	padding: 3px 8px;
	text-align: center;
}

.avin-trend-pill.is-up {
	background: rgba(22, 163, 74, .12);
	border-color: rgba(22, 163, 74, .28);
	color: var(--avin-green);
}

.avin-trend-pill.is-down {
	background: rgba(220, 38, 38, .12);
	border-color: rgba(220, 38, 38, .25);
	color: #dc2626;
}

.avin-device-bars {
	display: grid;
	gap: 14px;
}

.avin-device-row {
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(130px, 1fr) minmax(120px, 2fr) 56px;
	align-items: center;
}

.avin-device-meta strong,
.avin-device-meta span {
	display: block;
}

.avin-device-meta span {
	color: var(--avin-muted);
	font-size: 12px;
	margin-top: 3px;
}

.avin-device-track {
	background: var(--avin-card-soft);
	border: 1px solid var(--avin-line);
	border-radius: 999px;
	height: 12px;
	overflow: hidden;
}

.avin-device-track span {
	background: linear-gradient(90deg, var(--avin-blue), var(--avin-sky), var(--avin-green));
	border-radius: inherit;
	display: block;
	height: 100%;
	min-width: 4px;
}

.avin-device-row em {
	color: var(--avin-muted);
	font-style: normal;
	font-weight: 800;
	text-align: right;
}

.avin-section-head {
	margin: 22px 0 10px;
}

.avin-section-head h2 {
	color: var(--avin-text);
	font-size: 20px;
	margin: 0;
}

.avin-feed {
	display: grid;
	gap: 10px;
}

.avin-feed-item {
	border-bottom: 1px solid var(--avin-line);
	display: grid;
	gap: 3px;
	padding-bottom: 10px;
}

.avin-feed-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.avin-feed-item span,
.avin-feed-item em {
	color: var(--avin-muted);
	font-size: 12px;
	font-style: normal;
}

.avin-feed-item strong {
	color: var(--avin-text);
}

.avin-funnel {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.avin-funnel div {
	background: var(--avin-card-soft);
	border: 1px solid var(--avin-line);
	border-radius: 8px;
	padding: 12px;
}

.avin-funnel span {
	color: var(--avin-muted);
	display: block;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.avin-funnel strong {
	color: var(--avin-text);
	display: block;
	font-size: 22px;
	margin-top: 6px;
}

.avin-settings {
	max-width: 760px;
}

.avin-settings h2 {
	border-top: 1px solid var(--avin-line);
	margin-top: 18px;
	padding-top: 18px;
}

.avin-settings h2:first-of-type {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

.avin-form-row {
	display: grid;
	gap: 6px;
	margin: 14px 0;
	max-width: 420px;
}

.avin-form-row label {
	font-weight: 600;
}

@media (max-width: 1200px) {
	.avin-executive-grid,
	.avin-opportunities {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.avin-hero,
	.avin-card-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.avin-grid {
		grid-template-columns: 1fr;
	}

	.avin-executive-grid,
	.avin-opportunities {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.avin-wrap {
		padding-right: 10px;
	}

	.avin-executive-grid,
	.avin-opportunities {
		grid-template-columns: 1fr;
	}

	.avin-card,
	.avin-chart-card {
		overflow-x: auto;
	}

	.avin-chart-metrics {
		justify-content: flex-start;
	}

	.avin-device-row,
	.avin-funnel {
		grid-template-columns: 1fr;
	}

	.avin-device-row em {
		text-align: left;
	}
}

/* v0.3.1 RC visual polish: align Apex View Insights with Apex SEO Intelligence. */
#wpwrap,
#wpcontent,
#wpbody,
#wpbody-content {
	background: #0a0d1a;
}

.avin-wrap {
	--avin-bg: #0a0d1a;
	--avin-card: rgba(16, 21, 42, .92);
	--avin-card-soft: rgba(255, 255, 255, .035);
	--avin-text: #e0e6ff;
	--avin-muted: #7a8ab8;
	--avin-line: rgba(255, 255, 255, .075);
	--avin-blue: #00e5ff;
	--avin-sky: #5eeaff;
	--avin-green: #00ff9d;
	--avin-amber: #ffd600;
	--avin-purple: #9b6dff;
	--avin-shadow: 0 18px 52px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .035);
	background:
		radial-gradient(circle at 0 0, rgba(0, 229, 255, .12), transparent 34%),
		radial-gradient(circle at 100% 10%, rgba(155, 109, 255, .12), transparent 30%),
		linear-gradient(180deg, #0d1328 0%, #0a0d1a 48%, #080b16 100%);
	color: var(--avin-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 0 0 0 -20px;
	max-width: none;
	min-height: calc(100vh - 32px);
	padding: 22px 24px 36px;
}

.avin-wrap h1 {
	color: #fff;
	font-size: 24px;
	letter-spacing: .2px;
	margin: 0 0 18px;
}

.avin-theme-light {
	--avin-bg: #0a0d1a;
	--avin-card: rgba(16, 21, 42, .92);
	--avin-card-soft: rgba(255, 255, 255, .035);
	--avin-text: #e0e6ff;
	--avin-muted: #7a8ab8;
	--avin-line: rgba(255, 255, 255, .075);
	color: var(--avin-text);
}

.avin-hero,
.avin-kpi,
.avin-card,
.avin-insight {
	background: linear-gradient(145deg, rgba(20, 30, 60, .78), rgba(10, 15, 30, .94));
	backdrop-filter: blur(10px);
	border: 1px solid var(--avin-line);
	border-radius: 18px;
	box-shadow: var(--avin-shadow);
	transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.avin-hero {
	background:
		linear-gradient(135deg, rgba(0, 229, 255, .12), transparent 38%),
		linear-gradient(105deg, rgba(16, 24, 50, .96), rgba(13, 20, 44, .92));
	border-color: rgba(94, 234, 255, .14);
	margin: 0 0 20px;
	padding: 24px;
	position: relative;
	overflow: hidden;
}

.avin-hero::before {
	background:
		radial-gradient(circle at 18% 25%, rgba(0, 229, 255, .24), transparent 28%),
		radial-gradient(circle at 80% 35%, rgba(155, 109, 255, .18), transparent 32%);
	content: "";
	inset: -1px;
	pointer-events: none;
	position: absolute;
}

.avin-hero > div:first-child {
	flex: 1 1 auto;
	position: relative;
	z-index: 1;
}

.avin-hero h2 {
	color: #fff;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: .1px;
}

.avin-hero p {
	color: #93a4cf;
	font-size: 13px;
	line-height: 1.55;
}

.avin-eyebrow {
	color: var(--avin-blue);
	letter-spacing: .55px;
}

.avin-brand {
	align-items: center;
	display: flex;
	gap: 18px;
	min-width: 0;
}

.avin-brand-logo {
	background: linear-gradient(135deg, rgba(0, 229, 255, .12), rgba(155, 109, 255, .12));
	border: 1px solid rgba(255, 255, 255, .10);
	border-radius: 18px;
	box-shadow: 0 0 22px rgba(0, 229, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
	flex: 0 0 auto;
	height: 82px;
	padding: 8px;
	width: 82px;
}

.avin-brand-copy {
	min-width: 0;
}

.avin-brand-copy .avin-eyebrow {
	margin-bottom: 6px;
}

.avin-brand-copy p:not(.avin-eyebrow) {
	font-size: 15px;
	margin-top: 6px;
}

.avin-status-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.avin-status-badges span {
	align-items: center;
	background: rgba(0, 255, 157, .10);
	border: 1px solid rgba(0, 255, 157, .24);
	border-radius: 999px;
	box-shadow: 0 0 14px rgba(0, 255, 157, .10), inset 0 1px 0 rgba(255, 255, 255, .05);
	color: #8fffd1;
	display: inline-flex;
	font-size: 11px;
	font-weight: 850;
	letter-spacing: .5px;
	min-height: 30px;
	padding: 0 12px;
	text-transform: uppercase;
	white-space: nowrap;
}

.avin-status-badges span::before {
	background: #00ff9d;
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(0, 255, 157, .75);
	content: "";
	height: 7px;
	margin-right: 8px;
	width: 7px;
}

.avin-actions .button,
.avin-settings .button,
.avin-chart-toggle button {
	border-radius: 999px;
	font-weight: 750;
	transition: background .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.avin-actions .button-primary,
.avin-settings .button-primary {
	background: linear-gradient(135deg, #00ff9d, #00cfff) !important;
	border: 0 !important;
	box-shadow: 0 0 16px rgba(0, 255, 157, .32) !important;
	color: #041520 !important;
}

.avin-actions .button:hover,
.avin-settings .button:hover,
.avin-chart-toggle button:hover {
	transform: translateY(-1px);
}

.avin-actions .button:not(.button-primary) {
	background: rgba(255, 255, 255, .05);
	border-color: rgba(255, 255, 255, .09);
	color: #e6edf3;
}

.avin-executive-grid {
	gap: 16px;
	margin: 18px 0;
}

.avin-kpi {
	background: linear-gradient(180deg, rgba(12, 22, 52, .95), rgba(8, 15, 38, .96));
	border-color: rgba(84, 110, 170, .25);
	min-height: 136px;
	padding: 18px 18px 16px;
}

.avin-kpi:hover,
.avin-card:hover,
.avin-insight:hover {
	border-color: rgba(0, 229, 255, .2);
	box-shadow: 0 22px 64px rgba(0, 0, 0, .58), 0 0 24px rgba(0, 255, 200, .08), inset 0 1px 0 rgba(255, 255, 255, .045);
	transform: translateY(-2px);
}

.avin-kpi::before,
.avin-insight::before {
	background: linear-gradient(90deg, #00e5ff, #9b6dff, #00ff9d);
	height: 2px;
	opacity: .9;
}

.avin-kpi span,
.avin-insight span,
.avin-funnel span,
.avin-table th {
	letter-spacing: .55px;
}

.avin-kpi strong {
	color: #fff;
	font-size: 31px;
	font-weight: 850;
}

.avin-kpi em {
	color: #95a5cf;
}

.avin-trend-up em {
	color: var(--avin-green);
}

.avin-trend-down em {
	color: #ff4560;
}

.avin-chart-card {
	min-height: 408px;
	padding: 20px;
}

.avin-card h2,
.avin-card-head h2,
.avin-section-head h2 {
	color: #fff;
	font-weight: 800;
	letter-spacing: .1px;
}

.avin-chart-toggle {
	background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 999px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 8px 24px rgba(0, 0, 0, .28);
	gap: 2px;
	padding: 4px;
}

.avin-chart-toggle button {
	background: transparent;
	color: #93a4cf;
	min-height: 34px;
	padding: 0 16px;
	text-transform: uppercase;
}

.avin-chart-toggle button.is-active {
	background: linear-gradient(135deg, #00cfff, #00ff9d);
	box-shadow: 0 0 18px rgba(0, 255, 157, .24);
	color: #041520;
}

.avin-chart-shell {
	background:
		linear-gradient(180deg, rgba(0, 229, 255, .08), rgba(155, 109, 255, .04)),
		rgba(255, 255, 255, .025);
	border-color: rgba(94, 234, 255, .12);
	border-radius: 16px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
	min-height: 330px;
	padding: 16px;
}

.avin-chart-metrics {
	background: rgba(255, 255, 255, .035);
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 999px;
	display: inline-flex;
	float: right;
	padding: 7px 12px;
}

.avin-chart-grid line {
	stroke: rgba(147, 164, 207, .16);
	stroke-width: 1;
}

.avin-chart-line {
	filter: url("#avinGlow");
	stroke-width: 5;
}

.avin-chart-dots circle {
	fill: #10152a;
	stroke: var(--avin-blue);
	stroke-width: 3;
	transition: r .16s ease, stroke .16s ease, filter .16s ease;
}

.avin-chart-dots circle:hover,
.avin-chart-dots circle:focus {
	filter: drop-shadow(0 0 10px rgba(0, 229, 255, .65));
	outline: none;
	r: 7;
	stroke: var(--avin-green);
}

.avin-chart-labels text {
	fill: #7a8ab8;
}

.avin-opportunities {
	gap: 16px;
}

.avin-insight {
	min-height: 150px;
}

.avin-insight strong {
	color: #fff;
}

.avin-insight em {
	color: #dfe7ff;
}

.avin-card {
	padding: 18px;
}

.avin-table th,
.avin-table td {
	border-bottom-color: rgba(255, 255, 255, .075);
}

.avin-table th {
	color: #7a8ab8;
}

.avin-table a {
	color: #e8f1ff;
}

.avin-table tr:hover td {
	background: rgba(0, 229, 255, .045);
}

.avin-pill,
.avin-trend-pill {
	border-radius: 999px;
}

.avin-trend-pill {
	background: rgba(0, 229, 255, .10);
	border-color: rgba(0, 229, 255, .22);
	color: #5eeaff;
}

.avin-trend-pill.is-up {
	background: rgba(0, 255, 157, .12);
	border-color: rgba(0, 255, 157, .25);
	color: var(--avin-green);
}

.avin-trend-pill.is-down {
	background: rgba(255, 69, 96, .12);
	border-color: rgba(255, 69, 96, .25);
	color: #ff4560;
}

.avin-device-track {
	background: rgba(255, 255, 255, .035);
	border-color: rgba(255, 255, 255, .08);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}

.avin-device-track span {
	background: linear-gradient(90deg, #00e5ff, #9b6dff, #00ff9d);
	box-shadow: 0 0 12px rgba(0, 229, 255, .25);
}

.avin-feed-item,
.avin-funnel div {
	background: rgba(255, 255, 255, .03);
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 12px;
	padding: 12px;
}

.avin-feed-item {
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.avin-feed-item strong,
.avin-funnel strong {
	color: #fff;
}

.avin-settings input[type="number"],
.avin-settings select {
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .10);
	color: #e0e6ff;
}

@media (max-width: 782px) {
	.avin-wrap {
		margin-left: -10px;
		padding: 16px 14px 28px;
	}

	.avin-hero {
		padding: 18px;
	}

	.avin-brand {
		align-items: flex-start;
		flex-direction: column;
	}

	.avin-brand-logo {
		height: 64px;
		width: 64px;
	}

	.avin-status-badges span {
		white-space: normal;
	}

	.avin-chart-toggle {
		width: 100%;
	}

	.avin-chart-toggle button {
		flex: 1;
	}

	.avin-chart-metrics {
		float: none;
		flex-wrap: wrap;
	}
}
