/* Claude SEO Agent — Admin Dashboard v2.1.0 */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
	--csa-navy:       #1e3a5f;
	--csa-navy-dark:  #162d4a;
	--csa-navy-light: #2a4f7c;
	--csa-gold:       #b8860b;
	--csa-green:      #16a34a;
	--csa-amber:      #d97706;
	--csa-red:        #dc2626;
	--csa-purple:     #7c3aed;

	--csa-g50:        #f9fafb;
	--csa-g100:       #f3f4f6;
	--csa-g200:       #e5e7eb;
	--csa-g300:       #d1d5db;
	--csa-g400:       #9ca3af;
	--csa-g500:       #6b7280;
	--csa-g600:       #4b5563;
	--csa-g900:       #111827;

	--csa-r:          10px;
	--csa-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
	--csa-shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
	--csa-shadow-lg:  0 10px 25px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);

	--csa-muted:      #6b7280;
	--csa-border:     #e5e7eb;
	--csa-text:       #111827;
	--csa-accent:     #2563eb;
	--csa-accent-faint: rgba(37,99,235,.12);
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */
.csa-wrap { margin: 0; padding: 0; }
.csa-wrap *,
.csa-wrap *::before,
.csa-wrap *::after { box-sizing: border-box; }
.csa-wrap p { margin: 0; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.csa-header {
	background: var(--csa-navy);
	color: #fff;
	padding: 0 24px;
	margin: -8px -12px 0;
}
.csa-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	max-width: 1300px;
}
.csa-header-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.csa-header-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* Logo */
.csa-logo { display: flex; align-items: center; gap: 8px; }
.csa-logo-mark {
	width: 28px;
	height: 28px;
	display: block;
	flex-shrink: 0;
	filter: brightness(0) invert(1) !important;
	opacity: 0.9;
}
.csa-logo-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.csa-version-pill {
	font-size: 10.5px;
	color: rgba(255,255,255,.5);
	background: rgba(255,255,255,.1);
	padding: 2px 8px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,.12);
}
.csa-header-sub {
	font-size: 11.5px;
	color: rgba(255,255,255,.45);
	padding-left: 36px;
}

/* Admin menu SVG icon */
#adminmenu .toplevel_page_claude-seo-agent img.wp-menu-image { opacity: 0.7; }
#adminmenu .toplevel_page_claude-seo-agent:hover img.wp-menu-image,
#adminmenu .toplevel_page_claude-seo-agent.current img.wp-menu-image,
#adminmenu .toplevel_page_claude-seo-agent.wp-has-current-submenu img.wp-menu-image { opacity: 1; }

/* Header connection badge */
.csa-header-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 500;
	border: 1px solid transparent;
	white-space: nowrap;
}
.csa-header-badge--connected {
	background: rgba(22,163,74,.18);
	border-color: rgba(22,163,74,.35);
	color: #86efac;
}
.csa-header-badge--disconnected {
	background: rgba(156,163,175,.12);
	border-color: rgba(156,163,175,.25);
	color: rgba(255,255,255,.45);
}
.csa-header-badge--checking {
	background: rgba(217,119,6,.18);
	border-color: rgba(217,119,6,.35);
	color: #fcd34d;
}
.csa-header-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
}
.csa-header-badge--connected    .csa-header-badge-dot { background: #22c55e; }
.csa-header-badge--disconnected .csa-header-badge-dot { background: rgba(156,163,175,.5); }
.csa-header-badge--checking     .csa-header-badge-dot { background: #f59e0b; animation: csa-pulse 1.1s infinite; }

/* Header buttons */
.csa-hdr-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255,255,255,.8);
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.15);
	cursor: pointer;
	text-decoration: none;
	transition: all .15s;
	white-space: nowrap;
}
.csa-hdr-btn:hover,
.csa-hdr-btn:focus {
	background: rgba(255,255,255,.16);
	color: #fff;
	border-color: rgba(255,255,255,.25);
	outline: none;
}
.csa-hdr-btn .dashicons { font-size: 14px; width: 14px; height: 14px; margin-top: 1px; }

/* ── Main content area ────────────────────────────────────────────────────── */
.csa-main {
	padding: 24px 0 40px;
	max-width: 1300px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.csa-main--narrow { max-width: 760px; }

/* ── Dashboard layout: two-column grid ────────────────────────────────────── */
.csa-dashboard {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 24px;
	align-items: start;
}
.csa-main-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}
.csa-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* ── Stats row: 3-column ──────────────────────────────────────────────────── */
.csa-stats-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.csa-card {
	background: #fff;
	border: 1px solid var(--csa-g200);
	border-radius: var(--csa-r);
	box-shadow: var(--csa-shadow);
	display: flex;
	flex-direction: column;
}
.csa-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--csa-g100);
	gap: 10px;
}
.csa-card__head h3 {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--csa-g900);
	letter-spacing: -.01em;
}
.csa-card__body { padding: 20px; flex: 1; }
.csa-card__body--flush { padding: 0; }
.csa-card__foot {
	padding: 14px 20px;
	border-top: 1px solid var(--csa-g100);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

/* card head group (title + subtitle stacked) */
.csa-card-head-group { display: flex; flex-direction: column; gap: 2px; }
.csa-card-head-group h3 { margin: 0; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.csa-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 15px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	border: none;
	text-decoration: none;
	line-height: 1.4;
	transition: all .14s;
	white-space: nowrap;
}
.csa-btn .dashicons { font-size: 14px; width: 14px; height: 14px; margin-top: 1px; }
.csa-btn--primary  {
	background: var(--csa-navy);
	color: #fff;
	box-shadow: 0 1px 2px rgba(30,58,95,.25);
}
.csa-btn--primary:hover { background: var(--csa-navy-light); color: #fff; }
.csa-btn--outline  {
	background: #fff;
	color: var(--csa-g600);
	border: 1px solid var(--csa-g300);
}
.csa-btn--outline:hover { background: var(--csa-g50); border-color: var(--csa-g400); color: var(--csa-g900); }
.csa-btn--agency {
	background: linear-gradient(135deg, var(--csa-navy), var(--csa-purple));
	color: #fff;
	box-shadow: 0 1px 2px rgba(124,58,237,.25);
}
.csa-btn--agency:hover { opacity: .9; }
.csa-btn--danger {
	background: #fef2f2;
	color: var(--csa-red);
	border: 1px solid #fecaca;
}
.csa-btn--danger:hover { background: #fee2e2; }
.csa-btn--ghost-dark {
	background: transparent;
	color: var(--csa-g500);
	border: 1px solid var(--csa-g200);
}
.csa-btn--ghost-dark:hover { background: var(--csa-g100); color: var(--csa-g900); }
.csa-btn--lg { padding: 11px 22px; font-size: 14px; border-radius: 9px; }
.csa-btn--sm { padding: 5px 11px; font-size: 12px; }
.csa-btn--full { width: 100%; justify-content: center; }
.csa-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Status dot ───────────────────────────────────────────────────────────── */
.csa-dot {
	width: 9px; height: 9px;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}
.csa-dot--checking { background: var(--csa-amber); animation: csa-pulse 1.1s infinite; }
.csa-dot--ok  { background: #22c55e; }
.csa-dot--err { background: var(--csa-red); }

@keyframes csa-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: .3; }
}

/* ── Badge ────────────────────────────────────────────────────────────────── */
.csa-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--csa-g100);
	color: var(--csa-g500);
}
.csa-badge--free   { background: #dbeafe; color: #1d4ed8; }
.csa-badge--pro    { background: #fef3c7; color: #92400e; }
.csa-badge--agency { background: #ede9fe; color: #6d28d9; }

/* ── KV list ──────────────────────────────────────────────────────────────── */
.csa-kv-list { display: flex; flex-direction: column; }
.csa-kv {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 7px 0;
	border-bottom: 1px solid var(--csa-g100);
	font-size: 12.5px;
}
.csa-kv:last-child { border-bottom: none; }
.csa-kv__k { color: var(--csa-g500); font-weight: 500; flex-shrink: 0; }
.csa-kv__v { color: var(--csa-g900); text-align: right; word-break: break-all; }
.csa-mono  { font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.csa-muted { color: var(--csa-g400); font-size: 12px; }
.csa-target-url { color: var(--csa-g600); font-weight: 600; }

/* ── Connection status hero text ──────────────────────────────────────────── */
.csa-status-hero {
	font-size: 14px;
	font-weight: 600;
	color: var(--csa-g900);
	margin: 0 0 12px;
}

/* ── Plan name in card ────────────────────────────────────────────────────── */
.csa-plan-name-lg {
	font-size: 22px;
	font-weight: 800;
	color: var(--csa-navy);
	margin-bottom: 12px;
	letter-spacing: -.02em;
}

/* ── Usage bars ───────────────────────────────────────────────────────────── */
.csa-usage-list { display: flex; flex-direction: column; gap: 16px; }
.csa-usage-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12.5px;
	margin-bottom: 6px;
}
.csa-usage-meta span:first-child { font-weight: 500; color: var(--csa-g900); }
.csa-usage-meta span:last-child  { color: var(--csa-g500); font-variant-numeric: tabular-nums; }
.csa-track {
	height: 6px;
	background: var(--csa-g100);
	border-radius: 999px;
	overflow: hidden;
}
.csa-bar {
	height: 100%;
	border-radius: 999px;
	transition: width .7s cubic-bezier(.4,0,.2,1);
	min-width: 2px;
}
.csa-bar--seo     { background: linear-gradient(90deg, #1e3a5f, #3b82f6); }
.csa-bar--content { background: linear-gradient(90deg, #16a34a, #34d399); }
.csa-bar--blog    { background: linear-gradient(90deg, #b8860b, #f59e0b); }

/* ── Tool cards ───────────────────────────────────────────────────────────── */
.csa-tool-cards {
	display: flex;
	flex-direction: column;
}
.csa-tool-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--csa-g100);
	transition: background .12s;
}
.csa-tool-card:last-child { border-bottom: none; }
.csa-tool-card:hover { background: var(--csa-g50); }
.csa-tool-card.is-running { background: #eff6ff; }
.csa-tool-card-icon {
	font-size: 22px;
	line-height: 1;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--csa-g50);
	border: 1px solid var(--csa-g200);
	border-radius: 10px;
	flex-shrink: 0;
}
.csa-tool-card-body { flex: 1; min-width: 0; }
.csa-tool-card-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--csa-g900);
	margin-bottom: 2px;
}
.csa-tool-card-desc {
	font-size: 12px;
	color: var(--csa-g500);
	line-height: 1.5;
}

/* ── Result viewer ────────────────────────────────────────────────────────── */
.csa-result-actions { display: flex; gap: 6px; }

.csa-result-loading {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 32px 20px;
	color: var(--csa-g500);
	font-size: 13px;
}

.csa-json-viewer {
	background: #0f172a;
	color: #cbd5e1;
	padding: 20px;
	border-radius: 8px;
	font-family: ui-monospace, Menlo, "Courier New", monospace;
	font-size: 11.5px;
	line-height: 1.7;
	overflow-x: auto;
	max-height: 480px;
	overflow-y: auto;
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
}

/* ── Plans section ────────────────────────────────────────────────────────── */
.csa-plans {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.csa-plan {
	border: 2px solid var(--csa-g200);
	border-radius: var(--csa-r);
	padding: 24px 20px 20px;
	position: relative;
	display: flex;
	flex-direction: column;
	transition: border-color .15s, box-shadow .15s;
}
.csa-plan:hover { border-color: var(--csa-g300); box-shadow: var(--csa-shadow-md); }
.csa-plan--pro    { border-color: #fde68a; }
.csa-plan--pro:hover { border-color: var(--csa-gold); }
.csa-plan--agency { border-color: #ddd6fe; }
.csa-plan--agency:hover { border-color: var(--csa-purple); }

/* Highlight active plan */
.csa-plan.is-current               { border-color: var(--csa-navy); box-shadow: 0 0 0 3px rgba(30,58,95,.08); }
.csa-plan--pro.is-current    { border-color: var(--csa-gold);   box-shadow: 0 0 0 3px rgba(184,134,11,.1); }
.csa-plan--agency.is-current { border-color: var(--csa-purple); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }

.csa-plan__popular {
	position: absolute;
	top: -11px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--csa-gold);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 12px;
	border-radius: 999px;
	white-space: nowrap;
	letter-spacing: .05em;
	text-transform: uppercase;
}
.csa-plan__name  { font-size: 16px; font-weight: 700; color: var(--csa-g900); margin-bottom: 4px; }
.csa-plan__price { font-size: 32px; font-weight: 800; color: var(--csa-navy); margin-bottom: 4px; line-height: 1; }
.csa-plan__price span { font-size: 14px; color: var(--csa-g400); font-weight: 400; }
.csa-plan__tagline { font-size: 12px; color: var(--csa-g400); margin-bottom: 16px; }
.csa-plan__features {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
	flex: 1;
}
.csa-plan__features li {
	font-size: 12.5px;
	padding: 4px 0 4px 18px;
	position: relative;
	color: var(--csa-g600);
}
.csa-plan__features li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--csa-green);
	font-weight: 700;
}
.csa-plan__cta { margin-top: auto; }
.csa-current-badge {
	display: inline-block;
	background: var(--csa-g100);
	color: var(--csa-g500);
	font-size: 12px;
	font-weight: 500;
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid var(--csa-g200);
}

/* ── Toast notifications ──────────────────────────────────────────────────── */
#csa-toasts {
	position: fixed;
	bottom: 28px;
	right: 28px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
}
.csa-toast {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	max-width: 360px;
	box-shadow: 0 4px 24px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1);
	pointer-events: all;
	animation: csa-toast-in .2s cubic-bezier(.34,1.56,.64,1);
	background: #1e293b;
	color: #f1f5f9;
	line-height: 1.45;
}
.csa-toast--success { background: #14532d; color: #dcfce7; }
.csa-toast--error   { background: #7f1d1d; color: #fee2e2; }
.csa-toast--warning { background: #78350f; color: #fef3c7; }
.csa-toast-icon     { font-size: 15px; line-height: 1.4; flex-shrink: 0; }

@keyframes csa-toast-in {
	from { opacity: 0; transform: translateY(10px) scale(.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes csa-toast-out {
	from { opacity: 1; transform: translateY(0) scale(1); }
	to   { opacity: 0; transform: translateY(6px) scale(.97); }
}

/* ── Spinner overlay ──────────────────────────────────────────────────────── */
#csa-spinner-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,.78);
	backdrop-filter: blur(2px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.csa-spinner-box { text-align: center; }
.csa-spinner {
	width: 34px; height: 34px;
	border: 3px solid var(--csa-g200);
	border-top-color: var(--csa-navy);
	border-radius: 50%;
	animation: csa-spin .7s linear infinite;
	margin: 0 auto 12px;
}
.csa-spinner-sm {
	width: 18px; height: 18px;
	border: 2px solid var(--csa-g200);
	border-top-color: var(--csa-navy);
	border-radius: 50%;
	animation: csa-spin .7s linear infinite;
	flex-shrink: 0;
}
@keyframes csa-spin { to { transform: rotate(360deg); } }
.csa-spinner-box p { color: var(--csa-g500); font-size: 13px; margin: 0; }

/* ── Onboarding ───────────────────────────────────────────────────────────── */
.csa-onboarding { display: flex; justify-content: center; padding: 60px 0; }
.csa-onboarding-card {
	background: #fff;
	border: 1px solid var(--csa-g200);
	border-radius: 14px;
	box-shadow: var(--csa-shadow-lg);
	padding: 48px 44px 40px;
	max-width: 460px;
	width: 100%;
	text-align: center;
}
.csa-ob-icon {
	font-size: 36px;
	margin-bottom: 16px;
	line-height: 1;
	color: #f0c040;
	text-shadow: 0 0 20px rgba(240,192,64,.35);
}
.csa-onboarding-card h2 {
	font-size: 22px;
	font-weight: 800;
	color: var(--csa-navy);
	margin: 0 0 10px;
	letter-spacing: -.02em;
}
.csa-onboarding-card > p {
	color: var(--csa-g500);
	font-size: 13.5px;
	margin: 0 0 24px;
	line-height: 1.65;
}

/* Onboarding field */
.csa-field { text-align: left; margin-bottom: 16px; }
.csa-field label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--csa-g900);
	margin-bottom: 6px;
}
.csa-field input {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--csa-g300);
	border-radius: 8px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--csa-g900);
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.csa-field input:focus {
	outline: none;
	border-color: var(--csa-navy);
	box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}

/* Free plan perks box */
.csa-ob-perks {
	margin: 20px 0 0;
	padding: 16px;
	background: var(--csa-g50);
	border: 1px solid var(--csa-g200);
	border-radius: 9px;
	text-align: left;
}
.csa-ob-perks-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--csa-g400);
	margin-bottom: 8px;
}
.csa-ob-perks ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.csa-ob-perks ul li {
	font-size: 12.5px;
	color: var(--csa-g600);
	padding-left: 18px;
	position: relative;
}
.csa-ob-perks ul li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--csa-green);
	font-weight: 700;
}

.csa-ob-hint { font-size: 12px; color: var(--csa-g400); margin-top: 16px; }
.csa-ob-hint a { color: var(--csa-navy); text-decoration: none; }
.csa-ob-hint a:hover { text-decoration: underline; }

/* ── Settings page ────────────────────────────────────────────────────────── */
.csa-settings-table th { font-size: 13px; padding: 14px 16px 14px 0; color: var(--csa-g900); }
.csa-settings-table td { padding: 10px 0; }
.csa-settings-table .description { font-size: 12px; color: var(--csa-g400); margin: 5px 0 0; }
.csa-key-field { display: flex; gap: 8px; align-items: center; }
.csa-key-field input { flex: 1; min-width: 0; }

/* ── GSC card ─────────────────────────────────────────────────────────────── */

.csa-gsc-property-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.csa-gsc-property-label {
	font-size: 13px;
	color: var(--csa-muted);
	white-space: nowrap;
}
.csa-select {
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--csa-border);
	border-radius: 6px;
	font-size: 13px;
	background: #fff;
	color: var(--csa-text);
	min-width: 200px;
	flex: 1;
}
.csa-select:focus { outline: none; border-color: var(--csa-accent); box-shadow: 0 0 0 2px var(--csa-accent-faint); }

.csa-gsc-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}
.csa-gsc-stat {
	background: var(--csa-bg);
	border: 1px solid var(--csa-border);
	border-radius: 8px;
	padding: 14px 16px;
	text-align: center;
}
.csa-gsc-stat__value {
	font-size: 22px;
	font-weight: 700;
	color: var(--csa-text);
	line-height: 1.2;
	letter-spacing: -0.5px;
}
.csa-gsc-stat__label {
	font-size: 11px;
	color: var(--csa-muted);
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.csa-gsc-chart-wrap {
	position: relative;
	height: 180px;
}
.csa-gsc-chart-wrap canvas { width: 100% !important; height: 100% !important; }

.csa-badge--neutral { background: #f0f0f0; color: #666; }
.csa-badge--connected { background: #d1fae5; color: #065f46; }

/* ── Lineicons in tool cards ──────────────────────────────────────────────── */
.csa-tool-card-icon i.lni {
	font-size: 19px;
	color: var(--csa-navy);
}
.csa-btn i.lni { font-size: 13px; line-height: 1; }

/* ── Sidebar card title group ─────────────────────────────────────────────── */
.csa-card-title-group {
	display: flex;
	align-items: center;
	gap: 8px;
}
.csa-card-title-group h3 { margin: 0; }
.csa-card-title-icon {
	font-size: 15px;
	color: var(--csa-navy);
	flex-shrink: 0;
}

/* ── Badge variants ───────────────────────────────────────────────────────── */
.csa-badge--warning  { background: #fef3c7; color: #92400e; }
.csa-badge--connected { background: #d1fae5; color: #065f46; }
.csa-badge--neutral  { background: #f3f4f6; color: #6b7280; }

/* ── Sidebar subtitle ─────────────────────────────────────────────────────── */
.csa-sidebar-sub {
	font-size: 11.5px;
	color: var(--csa-g400);
	margin: 0 0 14px;
	line-height: 1.5;
}

/* ── Ranking Snapshot: metric grid ───────────────────────────────────────── */
.csa-rank-metrics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}
.csa-rank-metric {
	background: var(--csa-g50);
	border: 1px solid var(--csa-g200);
	border-radius: 8px;
	padding: 10px 12px;
	text-align: center;
}
.csa-rank-metric__value {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: var(--csa-g400);
	letter-spacing: -0.5px;
	font-variant-numeric: tabular-nums;
}
.csa-rank-metric__label {
	display: block;
	font-size: 10px;
	color: var(--csa-g400);
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ── CSS-only sparkline ───────────────────────────────────────────────────── */
.csa-spark-wrap { margin-bottom: 14px; }
.csa-spark {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 56px;
	background: var(--csa-g50);
	border: 1px solid var(--csa-g200);
	border-radius: 8px;
	padding: 8px 12px;
	overflow: hidden;
}
.csa-spark span {
	flex: 1;
	background: var(--csa-navy);
	opacity: 0.18;
	border-radius: 2px 2px 0 0;
	min-height: 4px;
	transition: opacity .2s;
}
.csa-spark:hover span { opacity: 0.28; }
.csa-spark-label {
	font-size: 10.5px;
	color: var(--csa-g400);
	margin: 6px 0 0;
	text-align: center;
}

/* ── GSC stats in sidebar: 2-col ─────────────────────────────────────────── */
.csa-sidebar .csa-gsc-stats { grid-template-columns: repeat(2, 1fr); }

/* ── Task list ────────────────────────────────────────────────────────────── */
.csa-task-list { display: flex; flex-direction: column; }
.csa-task-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--csa-g100);
}
.csa-task-item:last-child { border-bottom: none; padding-bottom: 0; }
.csa-task-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}
.csa-task-dot--high   { background: #ef4444; }
.csa-task-dot--medium { background: #f59e0b; }
.csa-task-dot--low    { background: #10b981; }
.csa-task-body { flex: 1; min-width: 0; }
.csa-task-title {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--csa-g900);
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.csa-task-meta { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }

/* ── Pills (smaller than badges, no uppercase) ────────────────────────────── */
.csa-pill {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 1px 7px;
	border-radius: 999px;
	line-height: 1.6;
}
.csa-pill--high   { background: #fee2e2; color: #b91c1c; }
.csa-pill--medium { background: #fef3c7; color: #92400e; }
.csa-pill--low    { background: #d1fae5; color: #065f46; }
.csa-pill--cat    { background: var(--csa-g100); color: var(--csa-g500); }

/* ── Ghost xs button (for task view) ─────────────────────────────────────── */
.csa-btn--ghost {
	background: transparent;
	color: var(--csa-g400);
	border: none;
	padding: 4px;
}
.csa-btn--ghost:hover { color: var(--csa-navy); background: var(--csa-g100); border-radius: 6px; }
.csa-btn--xs { padding: 4px 6px; font-size: 12px; }
.csa-btn--ghost i.lni { font-size: 14px; }

/* ── Quick Wins list ──────────────────────────────────────────────────────── */
#csa-qw-list {
	display: flex;
	flex-direction: column;
}

/* ── Quick Wins widget ───────────────────────── */
.csa-qw-list-inner {
	display: flex;
	flex-direction: column;
}

.csa-qw-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--csa-g100);
}
.csa-qw-row:last-child { border-bottom: none; }

.csa-qw-num {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fef3c7;
	color: #b45309;
	font-size: 10.5px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.csa-qw-text {
	font-size: 13px;
	line-height: 1.45;
	color: var(--csa-g800);
	flex: 1;
}

/* ── Action Plan widget ──────────────────────── */
.csa-ap-list {
	display: flex;
	flex-direction: column;
}

.csa-ap-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--csa-g100);
}
.csa-ap-row:last-child { border-bottom: none; }

.csa-ap-num {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	font-size: 10.5px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}
.csa-ap-num--high   { background: #fee2e2; color: #b91c1c; }
.csa-ap-num--medium { background: #fef3c7; color: #b45309; }

.csa-ap-text {
	font-size: 13px;
	line-height: 1.45;
	color: var(--csa-g800);
	flex: 1;
	min-width: 0;
}

.csa-ap-tag {
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 2px 7px;
	border-radius: 999px;
}
.csa-ap-tag--high   { background: #fee2e2; color: #b91c1c; }
.csa-ap-tag--medium { background: #fef3c7; color: #b45309; }
/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
	.csa-dashboard { grid-template-columns: 1fr 320px; }
}
@media (max-width: 1060px) {
	/* Stack sidebar below main column */
	.csa-dashboard { grid-template-columns: 1fr; }
	.csa-sidebar {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
}
@media (max-width: 860px) {
	.csa-stats-row { grid-template-columns: 1fr; }
	.csa-plans     { grid-template-columns: 1fr; }
	.csa-sidebar   { grid-template-columns: 1fr; }
	.csa-gsc-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.csa-header-sub   { display: none; }
	.csa-header-badge { display: none; }
	.csa-onboarding-card { padding: 32px 24px; }
	.csa-tool-card-desc  { display: none; }
}

/* Layout width fix */
#wpcontent {
	padding-left: 0;
}

.csa-wrap {
	width: 100%;
}

.csa-header {
	margin: -8px 0 0;
	padding: 0 24px;
}

.csa-header-inner {
	max-width: none;
	width: 100%;
	margin: 0 auto;
}

.csa-main {
	max-width: none;
	width: 98%;
	margin: 0 auto;
	padding: 24px 0 40px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.csa-main--narrow {
	max-width: 760px;
}

/* Keep dashboard from feeling too stretched on very wide screens */
.csa-dashboard {
	grid-template-columns: minmax(0, 1fr) 360px;
}

/* Better fit for WP admin */
@media (max-width: 1200px) {
	.csa-header-inner,
	.csa-main {
		width: calc(100% - 32px);
	}

	.csa-dashboard {
		grid-template-columns: minmax(0, 1fr) 320px;
	}
}

@media (max-width: 1060px) {
	.csa-dashboard {
		grid-template-columns: 1fr;
	}
}

/* ── Report Panel ──────────────────────────────────────────────────────────── */

#csa-report-panel {
	display: none;
}

.csa-report-grid {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
	align-items: start;
}

.csa-report-left {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.csa-score-circle {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border: 6px solid var(--csa-g200);
	background: #fff;
	box-shadow: var(--csa-shadow-md);
}

.csa-score-circle.score-green  { border-color: var(--csa-green); }
.csa-score-circle.score-amber  { border-color: var(--csa-amber); }
.csa-score-circle.score-red    { border-color: var(--csa-red); }

.csa-score-number {
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
	color: var(--csa-g900);
}

.csa-score-label {
	font-size: 10px;
	color: var(--csa-g500);
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-top: 2px;
}

.csa-score-tag {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.csa-score-tag.score-green { background: #dcfce7; color: #15803d; }
.csa-score-tag.score-amber { background: #fef3c7; color: #b45309; }
.csa-score-tag.score-red   { background: #fee2e2; color: #b91c1c; }

.csa-report-summary {
	font-size: 13.5px;
	color: var(--csa-g600);
	line-height: 1.6;
	margin-bottom: 16px;
}

.csa-report-section {
	margin-bottom: 20px;
}

.csa-report-section h4 {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--csa-g500);
	margin: 0 0 10px;
	border-bottom: 1px solid var(--csa-g200);
	padding-bottom: 6px;
}

.csa-report-hero {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 26px;
	align-items: center;
	margin-bottom: 30px;
	padding: 28px;
	background:
		linear-gradient(135deg, rgba(30,58,95,.055), rgba(255,255,255,.95)),
		#fff;
	border: 1px solid rgba(148,163,184,.22);
	border-radius: 22px;
	box-shadow: 0 18px 45px rgba(15,23,42,.075);
}

.csa-report-hero .csa-score-circle {
	position: relative;
	width: 132px;
	height: 132px;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background:
		conic-gradient(var(--score-color) calc(var(--score, 0) * 1%), #e5e7eb 0);
	box-shadow: 0 18px 38px rgba(15,23,42,.13);
	flex: 0 0 132px;
}

.csa-report-hero .csa-score-circle::before {
	content: '';
	position: absolute;
	inset: 10px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(148,163,184,.18);
}

.csa-report-hero .csa-score-num,
.csa-report-hero .csa-score-lbl {
	position: relative;
	z-index: 1;
}

.csa-report-hero .csa-score-circle::after {
	content: '';
	position: absolute;
	inset: 12px;
	border-radius: 50%;
	border: 1px solid rgba(148,163,184,.16);
	pointer-events: none;
}

.csa-report-hero .csa-score-num {
	font-size: 36px;
	font-weight: 800;
	color: var(--csa-g900);
	line-height: 1;
	letter-spacing: -.04em;
}

.csa-report-hero .csa-score-lbl {
	font-size: 12px;
	font-weight: 700;
	color: var(--csa-g500);
	margin-top: 5px;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.csa-report-hero-copy h2 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
	color: var(--csa-navy);
	letter-spacing: -.02em;
}

.csa-report-hero-copy p {
	margin: 0;
	font-size: 14px;
	color: var(--csa-g700);
	line-height: 1.75;
	max-width: 980px;
}

.csa-report-markdown {
	max-width: 1080px;
	margin-top: 26px;
	color: var(--csa-g800);
	font-size: 14px;
	line-height: 1.72;
}

.csa-report-markdown h1 {
	margin: 0 0 22px;
	padding: 24px 28px;
	background: linear-gradient(135deg, var(--csa-navy), #315984);
	color: #fff !important;
	border-radius: 20px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.02em;
	box-shadow: 0 18px 40px rgba(30,58,95,.18);
}

.csa-report-markdown h2 {
	margin: 30px 0 14px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid rgba(148,163,184,.26);
	border-left: 5px solid var(--csa-navy);
	border-radius: 14px;
	font-size: 18px;
	font-weight: 800;
	color: var(--csa-navy);
	box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

.csa-report-markdown h3 {
	margin: 22px 0 10px;
	padding: 13px 16px;
	background: var(--csa-g50);
	border-radius: 12px;
	font-size: 15px;
	font-weight: 750;
	color: var(--csa-g900);
	border: 1px solid var(--csa-g200);
}

.csa-report-markdown p {
	margin: 0 0 14px;
}

.csa-report-markdown ul, .csa-report-markdown ol {
	margin: 10px 0 18px 22px;
	padding: 0;
}

.csa-report-markdown li {
	margin: 5px 0;
	line-height: 1.55;
}

.csa-report-markdown pre {
	margin: 12px 0 16px;
	background: #f1f5f9 !important;
	color: #1e293b !important;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	overflow: auto;
	font-size: 13px;
	line-height: 1.6;
}

.csa-report-markdown pre code {
	background: transparent !important;
	border: 0;
	color: inherit !important;
	padding: 0;
	font-size: inherit;
}

.csa-report-markdown strong {
	color: var(--csa-g900);
	font-weight: 800;
}

.csa-report-markdown table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 18px 0 24px;
	overflow: hidden;
	border: 1px solid var(--csa-g200);
	border-radius: 14px;
	box-shadow: 0 8px 22px rgba(15,23,42,.04);
}

.csa-report-markdown th,
.csa-report-markdown td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--csa-g200);
}

.csa-report-markdown th {
	background: #f8fafc;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--csa-g600);
}

.csa-report-markdown tr:last-child td {
	border-bottom: 0;
}

.csa-report-markdown blockquote {
	margin: 22px 0;
	padding: 16px 18px;
	background: #f8fafc;
	border-left: 5px solid #94a3b8;
	border-radius: 12px;
	color: var(--csa-g700);
}

.csa-report-markdown h4 {
	margin: 14px 0 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--csa-g600);
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* Issue-severity h3 headings */
.csa-report-markdown h3 {
	display: flex;
	align-items: center;
	gap: 10px;
}
.csa-report-markdown h3::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--csa-g300);
}
.csa-report-markdown h3.csa-issue-h--critical {
	background: #fff1f2 !important;
	border-left-color: #e11d48 !important;
	color: #9f1239 !important;
}
.csa-report-markdown h3.csa-issue-h--critical::before { background: #e11d48; }

.csa-report-markdown h3.csa-issue-h--high {
	background: #fff7ed !important;
	border-left-color: #ea580c !important;
	color: #9a3412 !important;
}
.csa-report-markdown h3.csa-issue-h--high::before { background: #ea580c; }

.csa-report-markdown h3.csa-issue-h--medium {
	background: #fefce8 !important;
	border-left-color: #ca8a04 !important;
	color: #854d0e !important;
}
.csa-report-markdown h3.csa-issue-h--medium::before { background: #ca8a04; }

.csa-report-markdown h3.csa-issue-h--win {
	background: #f0fdf4 !important;
	border-left-color: #16a34a !important;
	color: #14532d !important;
}
.csa-report-markdown h3.csa-issue-h--win::before { background: #16a34a; }

/* Alternating table rows */
.csa-report-markdown tr:nth-child(even) td {
	background: #f8fafc;
}

/* Ordered-list items (rendered as <li class="csa-ol-li">) */
.csa-report-markdown .csa-ol-li {
	list-style: decimal inside;
	padding-left: 2px;
}

#csa-report-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .42);
	z-index: 9998;
}

.csa-report-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 40vw;
	min-width: 520px;
	max-width: 760px;
	height: 100vh;
	background: #fff;
	z-index: 9999;
	box-shadow: -24px 0 60px rgba(15, 23, 42, .22);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--csa-g200);
}

.csa-report-drawer .csa-card__head {
	flex: 0 0 auto;
	border-bottom: 1px solid var(--csa-g200);
}

.csa-report-drawer .csa-card__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 24px;
}

@media (max-width: 900px) {
	.csa-report-drawer {
		width: 92vw;
		min-width: 0;
	}
}

body.admin-bar .csa-report-drawer,
body.admin-bar #csa-report-drawer-overlay {
	top: 32px;
	height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .csa-report-drawer,
	body.admin-bar #csa-report-drawer-overlay {
		top: 46px;
		height: calc(100vh - 46px);
	}
}

/* Issues list */
.csa-issues-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.csa-issues-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: var(--csa-g600);
	line-height: 1.5;
}

.csa-sev-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 5px;
}

.csa-sev-dot--high   { background: var(--csa-red); }
.csa-sev-dot--medium { background: var(--csa-amber); }
.csa-sev-dot--low    { background: var(--csa-green); }
.csa-sev-dot.sev-info   { background: var(--csa-g400); }

/* Recommendations + Quick Wins */
.csa-rec-list,
.csa-qw-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.csa-rec-list li,
.csa-qw-list li {
	font-size: 13px;
	color: var(--csa-g600);
	line-height: 1.5;
	padding-left: 16px;
	position: relative;
}

.csa-rec-list li::before { content: "→"; position: absolute; left: 0; color: var(--csa-navy-light); }
.csa-qw-list li::before  { content: "⚡"; position: absolute; left: 0; font-size: 11px; top: 1px; }

/* Tasks section inside report */
.csa-task-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 6px;
	background: var(--csa-g50);
	margin-bottom: 4px;
	font-size: 13px;
}

.csa-task-row:last-child { margin-bottom: 0; }

.csa-priority-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 2px 7px;
	border-radius: 999px;
	flex-shrink: 0;
}

.csa-priority-badge.priority-high   { background: #fee2e2; color: #b91c1c; }
.csa-priority-badge.priority-medium { background: #fef3c7; color: #b45309; }
.csa-priority-badge.priority-low    { background: #dcfce7; color: #15803d; }

.csa-task-title { flex: 1; color: var(--csa-g900); }

.csa-task-cat {
	font-size: 11px;
	color: var(--csa-g400);
	flex-shrink: 0;
}

.csa-task-done-btn {
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 5px;
	border: 1px solid var(--csa-g300);
	background: #fff;
	color: var(--csa-g500);
	cursor: pointer;
	flex-shrink: 0;
	transition: background .15s, color .15s;
}

.csa-task-done-btn:hover {
	background: var(--csa-green);
	color: #fff;
	border-color: var(--csa-green);
}

/* Cached badge in report panel */
.csa-cached-badge {
	display: none;
	font-size: 10.5px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e0f2fe;
	color: #0369a1;
	border: 1px solid #bae6fd;
	margin-left: 8px;
}

/* Loading state */
.csa-report-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px;
	color: var(--csa-g500);
	font-size: 13.5px;
}

/* Empty / error states */
.csa-empty-state {
	text-align: center;
	padding: 32px 16px;
	color: var(--csa-g400);
	font-size: 13px;
}

.csa-error-msg {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	padding: 10px 14px;
	color: #b91c1c;
	font-size: 13px;
}

@media (max-width: 820px) {
	.csa-report-grid {
		grid-template-columns: 1fr;
	}
	.csa-report-left {
		flex-direction: row;
		justify-content: flex-start;
	}
}

/* ── Content Workflow Card ─────────────────────────────────────────────────── */

#csa-content-card {
	display: none;
}

.csa-content-project-info {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 16px;
}

.csa-content-project-info h3 {
	font-size: 15px;
	font-weight: 700;
	color: var(--csa-g900);
	margin: 0;
}

.csa-content-project-info span {
	font-size: 12px;
	color: var(--csa-g400);
}

.csa-topic-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

.csa-topic-pill {
	font-size: 11.5px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--csa-g100);
	color: var(--csa-g600);
	border: 1px solid var(--csa-g200);
	font-weight: 500;
}

.csa-topic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
}

.csa-topic-card {
	border: 1px solid var(--csa-g200);
	border-radius: 8px;
	padding: 14px 16px;
	background: #fff;
	box-shadow: var(--csa-shadow);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.csa-topic-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.csa-topic-card-title {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--csa-g900);
	line-height: 1.35;
}

.csa-topic-meta {
	font-size: 11.5px;
	color: var(--csa-g400);
}

.csa-topic-keyword {
	font-size: 11.5px;
	font-weight: 500;
	color: var(--csa-navy-light);
	background: #eff6ff;
	padding: 2px 8px;
	border-radius: 4px;
}

.csa-topic-actions {
	display: flex;
	gap: 6px;
	margin-top: 4px;
}

.csa-topic-actions button {
	flex: 1;
	font-size: 11.5px;
	padding: 5px 8px;
	border-radius: 5px;
	border: 1px solid var(--csa-g300);
	background: #fff;
	color: var(--csa-g600);
	cursor: pointer;
	font-weight: 500;
	transition: background .15s, color .15s, border-color .15s;
}

.csa-topic-actions button:hover:not(:disabled) {
	background: var(--csa-navy);
	color: #fff;
	border-color: var(--csa-navy);
}

.csa-topic-actions button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.csa-topic-actions button.is-loading {
	opacity: .7;
	pointer-events: none;
}

/* Status badges */
.csa-status-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 2px 7px;
	border-radius: 999px;
	flex-shrink: 0;
	white-space: nowrap;
}

.csa-status--pending        { background: var(--csa-g100); color: var(--csa-g500); }
.csa-status--outline_ready  { background: #dbeafe; color: #1d4ed8; }
.csa-status--writing        { background: #fef3c7; color: #b45309; }
.csa-status--draft          { background: #ede9fe; color: #6d28d9; }
.csa-status--published      { background: #dcfce7; color: #15803d; }

.csa-outline-preview,
.csa-article-preview {
	font-size: 12px;
	color: var(--csa-g600);
	background: var(--csa-g50);
	border: 1px solid var(--csa-g200);
	border-radius: 5px;
	padding: 8px 10px;
	line-height: 1.55;
	max-height: 120px;
	overflow-y: auto;
	margin-top: 4px;
}

.csa-article-stats {
	display: flex;
	gap: 12px;
	font-size: 11.5px;
	color: var(--csa-g500);
	margin-top: 4px;
}

.csa-article-stats strong { color: var(--csa-g900); }

/* ── Reports History Card ──────────────────────────────────────────────────── */

.csa-reports-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.csa-reports-table th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--csa-g400);
	padding: 0 10px 8px;
	border-bottom: 1px solid var(--csa-g200);
}

.csa-reports-table td {
	padding: 9px 10px;
	color: var(--csa-g600);
	border-bottom: 1px solid var(--csa-g100);
	vertical-align: middle;
}

.csa-reports-table tr:last-child td { border-bottom: none; }

.csa-reports-table tr:hover td { background: var(--csa-g50); }

.csa-score-pill {
	padding: 5px;
    border-radius: 5px;
    color: white !important;
}

.csa-score-pill.score-red {
	background: #dc2626;
	color: #fff;
}

.csa-score-pill.score-amber {
	background: #d97706;
	color: #fff;
}

.csa-score-pill.score-green {
	background: #16a34a;
	color: #fff;
}

.csa-report-view-btn {
	background: var(--csa-navy);
	color: #fff;
	border: 1px solid var(--csa-navy);
}

.csa-report-view-btn:hover {
	background: var(--csa-navy-light);
	color: #fff;
}

.csa-report-markdown {
	max-width: 980px;
	line-height: 1.65;
	font-size: 14px;
	color: var(--csa-g900);
}

.csa-report-markdown h1,
.csa-report-markdown h2,
.csa-report-markdown h3 {
	margin: 24px 0 10px;
	color: var(--csa-navy);
}

.csa-report-markdown table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.csa-report-markdown th,
.csa-report-markdown td {
	border: 1px solid var(--csa-g200);
	padding: 10px 12px;
	text-align: left;
}

.csa-report-markdown th {
	background: var(--csa-g50);
	font-weight: 700;
}

.csa-report-markdown pre,
.csa-report-markdown code {
	background: var(--csa-g100);
	border-radius: 6px;
	padding: 2px 5px;
}

.csa-report-view-btn {
	font-size: 11.5px;
	padding: 4px 10px;
	border-radius: 5px;
	border: 1px solid var(--csa-g300);
	background: #fff;
	color: var(--csa-g600);
	cursor: pointer;
	font-weight: 500;
	transition: background .15s, color .15s;
}

.csa-report-view-btn:hover {
	background: var(--csa-navy);
	color: #fff;
	border-color: var(--csa-navy);
}

.csa-reports-loading {
	text-align: center;
	padding: 20px;
	color: var(--csa-g400);
	font-size: 13px;
}

/* Dynamic sidebar task/quick-win items */
.csa-task-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--csa-g100);
	font-size: 13px;
}

.csa-task-item:last-child { border-bottom: none; }

.csa-task-item-title { flex: 1; color: var(--csa-g700, #374151); line-height: 1.4; }

.csa-task-item-done {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid var(--csa-g200);
	background: #fff;
	color: var(--csa-g500);
	cursor: pointer;
	flex-shrink: 0;
}

.csa-task-item-done:hover {
	background: var(--csa-green);
	color: #fff;
	border-color: var(--csa-green);
}

.csa-qw-item {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding: 7px 0;
	border-bottom: 1px solid var(--csa-g100);
	font-size: 12.5px;
	color: var(--csa-g600);
	line-height: 1.4;
}

.csa-qw-item:last-child { border-bottom: none; }

/* Tasks count badge in sidebar card head */
#csa-tasks-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--csa-red);
	color: #fff;
	margin-left: 6px;
	vertical-align: middle;
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.csa-progress-wrap { margin: 8px 0 4px; }
.csa-progress-track {
	height: 4px;
	border-radius: 2px;
	background: var(--csa-border);
	overflow: hidden;
}
.csa-progress-bar {
	height: 100%;
	border-radius: 2px;
	background: var(--csa-blue);
	transition: width 0.4s ease;
}

/* ── Quick nav links (dashboard) ───────────────────────────────────────────── */
.csa-card--nav .csa-card__body { padding: 0; }
.csa-nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-radius: 8px;
	overflow: hidden;
}
.csa-nav-link {
	flex: 1 1 18%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 18px 12px;
	text-decoration: none;
	color: var(--csa-text);
	font-size: 12px;
	font-weight: 500;
	border-right: 1px solid var(--csa-border);
	transition: background .15s, color .15s;
}
.csa-nav-link:last-child { border-right: none; }
.csa-nav-link i { font-size: 20px; color: var(--csa-blue); }
.csa-nav-link:hover { background: var(--csa-surface); color: var(--csa-blue); text-decoration: none; }

/* ── Projects grid ──────────────────────────────────────────────────────────── */
.csa-projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}
.csa-project-card {
	border: 1px solid var(--csa-border);
	border-radius: 8px;
	padding: 14px;
	background: var(--csa-surface);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.csa-project-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.csa-project-title { font-weight: 600; font-size: 13px; }
.csa-project-meta { display: flex; gap: 12px; font-size: 11px; color: var(--csa-muted); }

/* ── Tools page URL input ────────────────────────────────────────────────────── */
.csa-url-row { display: flex; gap: 10px; align-items: center; }
.csa-input--url {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--csa-border);
	border-radius: 6px;
	font-size: 13px;
	background: var(--csa-surface);
	color: var(--csa-text);
}
.csa-input--url:focus { outline: 2px solid var(--csa-blue); outline-offset: 1px; }

/* Locked URL field */
.csa-url-locked-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	background: var(--csa-g50, #f8fafc);
	border: 1px solid var(--csa-border);
	border-radius: 6px;
}
.csa-url-locked-wrap .lni-lock {
	font-size: 13px;
	color: var(--csa-muted);
	flex-shrink: 0;
}
.csa-input--locked {
	flex: 1;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	padding: 0 !important;
	font-size: 13px;
	color: var(--csa-text);
	cursor: default;
}
.csa-input-hint {
	margin: 6px 0 0;
	font-size: 11.5px;
	color: var(--csa-muted);
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.csa-pagination { padding: 12px 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--csa-muted); }
.csa-page-info { flex: 1; }

/* ── Article preview ──────────────────────────────────────────────────────── */
.csa-article-preview { padding: 16px; font-size: 13px; line-height: 1.6; }

/* ── Select filter ───────────────────────────────────────────────────────── */
.csa-select--sm { font-size: 12px; padding: 4px 8px; }
.csa-card-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Job status badges ───────────────────────────────────────────────────── */
@keyframes csa-pulse { 0%,100% { opacity:1; } 50% { opacity:.6; } }
.csa-status--running    { background: #2563eb !important; color: #fff !important; animation: csa-pulse 1.5s infinite; }
.csa-status--queued     { background: #9ca3af !important; color: #fff !important; }
.csa-status--completed  { background: #16a34a !important; color: #fff !important; }
.csa-status--failed     { background: #dc2626 !important; color: #fff !important; }
.csa-status--rate_limited { background: #d97706 !important; color: #fff !important; }

/* ── Job history table ───────────────────────────────────────────────────── */
.csa-job-table td.csa-job-score  { font-weight: 600; }
.csa-job-table td.csa-job-url    { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csa-spinner-xs {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid var(--csa-g200);
	border-top-color: var(--csa-blue);
	border-radius: 50%;
	animation: csa-spin .7s linear infinite;
}

/* ── Audit History Table ───────────────────────────────────── */

.csa-job-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.csa-job-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--csa-g500);
    padding: 14px 18px;
    border-bottom: 1px solid var(--csa-g200);
    background: #fafafa;
}

.csa-job-table tbody td {
    padding: 16px 18px;
    vertical-align: middle;
    border-bottom: 1px solid var(--csa-g100);
    font-size: 13px;
    color: var(--csa-g900);
}

.csa-job-table tbody tr {
    transition: background .15s ease;
}

.csa-job-table tbody tr:hover {
    background: #fafcff;
}

/* Column sizing */
.csa-job-table th:nth-child(1),
.csa-job-table td:nth-child(1) {
    width: 180px;
}

.csa-job-table th:nth-child(2),
.csa-job-table td:nth-child(2) {
    width: 35%;
}

.csa-job-table th:nth-child(3),
.csa-job-table td:nth-child(3) {
    width: 90px;
    text-align: center;
}

.csa-job-table th:nth-child(4),
.csa-job-table td:nth-child(4) {
    width: 160px;
}

.csa-job-table th:nth-child(5),
.csa-job-table td:nth-child(5) {
    width: auto;
}

/* URL */
.csa-job-table td:nth-child(2) small {
    display: block;
    font-size: 12px;
    color: var(--csa-g600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Score */
.csa-job-score {
    font-weight: 700;
    font-size: 14px;
}

/* Status badge */
.csa-status--completed {
    background: #dcfce7;
    color: #166534;
}

.csa-status--running {
    background: #dbeafe;
    color: #1d4ed8;
}

.csa-status--queued {
    background: #fef3c7;
    color: #92400e;
}

.csa-status--failed,
.csa-status--rate_limited {
    background: #ffedd5;
    color: #c2410c;
}

/* Small spinner */
.csa-spinner-xs {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: csaSpin .7s linear infinite;
    margin-right: 4px;
}

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

/* ── Jobs filter row ─────────────────────────────────────────────────────── */
.csa-jobs-filter-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 10px 16px;
	border-bottom: 1px solid var(--csa-border);
	background: var(--csa-g50);
}
.csa-input--sm {
	padding: 4px 8px;
	border: 1px solid var(--csa-border);
	border-radius: 6px;
	font-size: 12px;
	background: #fff;
	color: var(--csa-text);
	min-width: 160px;
}
.csa-input--sm:focus { outline: 2px solid var(--csa-blue); outline-offset: 1px; }

/* ── Content Assessment empty state (full-page) ──────────────────────────── */
.csa-empty-state--page {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 24px;
	text-align: center;
	color: var(--csa-muted);
}
.csa-empty-state--page i { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.csa-empty-state--page h3 { font-size: 20px; font-weight: 600; color: var(--csa-text); margin-bottom: 8px; }
.csa-empty-state--page p  { font-size: 14px; max-width: 380px; }

/* ── Content Plan page ───────────────────────────────────────────────────────── */
.csa-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: var(--csa-navy);
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}
.csa-card-desc { font-size: 13px; color: var(--csa-muted); margin-bottom: 1rem; }

.csa-roadmap-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 1rem;
}
.csa-roadmap-phase {
	background: var(--csa-g50);
	border: 1px solid var(--csa-border);
	border-radius: var(--csa-r);
	padding: 16px;
}
.csa-roadmap-phase__label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--csa-navy);
	margin-bottom: 4px;
}
.csa-roadmap-phase__title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.csa-roadmap-phase__timeline { font-size: 11px; color: var(--csa-muted); margin-bottom: 10px; }
.csa-roadmap-phase__items { list-style: none; padding: 0; margin: 0; }
.csa-roadmap-phase__items li { font-size: 12px; color: var(--csa-g600); padding: 3px 0; border-bottom: 1px solid var(--csa-g100); }
.csa-roadmap-phase__items li:last-child { border-bottom: none; }

.csa-strategy-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 1rem; }
.csa-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.csa-field { display: flex; flex-direction: column; gap: 4px; }
.csa-field label { font-size: 12px; font-weight: 600; color: var(--csa-g600); }

.csa-calendar-controls { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 1rem; }
.csa-calendar-controls .csa-field { flex: 1; min-width: 140px; }

.csa-calendar-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 1rem; }
.csa-calendar-table th { background: var(--csa-g100); text-align: left; padding: 8px 12px; font-weight: 600; border-bottom: 2px solid var(--csa-border); }
.csa-calendar-table td { padding: 8px 12px; border-bottom: 1px solid var(--csa-g100); vertical-align: top; }
.csa-calendar-table tr:last-child td { border-bottom: none; }

.csa-strategy-result { margin-top: 1rem; }
.csa-strategy-pillar { background: var(--csa-g50); border: 1px solid var(--csa-border); border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; font-size: 13px; }
.csa-strategy-pillar strong { display: block; margin-bottom: 4px; color: var(--csa-navy); }

/* ── Content Roadmap ──────────────────────────── */
.csa-roadmap-preview {
	margin-top: 14px;
}

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

.csa-roadmap-preview-head h3 {
	margin: 0 0 3px;
	font-size: 15px;
	color: var(--csa-navy);
}

.csa-roadmap-preview-head p {
	margin: 0;
	font-size: 12px;
	color: var(--csa-g500);
}

.csa-roadmap-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

/* Phase card — base */
.csa-roadmap-phase-card {
	position: relative;
	border-radius: 16px;
	padding: 18px 16px 16px;
	background: #fff;
	border: 1px solid var(--csa-g200);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 2px 8px rgba(15,23,42,.045);
	transition: box-shadow .18s;
}
.csa-roadmap-phase-card:hover {
	box-shadow: 0 6px 20px rgba(15,23,42,.10);
}

/* Top colored accent strip */
.csa-roadmap-phase-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	border-radius: 16px 16px 0 0;
}
.csa-roadmap-phase-card[data-phase="1"]::before { background: #2563eb; }
.csa-roadmap-phase-card[data-phase="2"]::before { background: #7c3aed; }
.csa-roadmap-phase-card[data-phase="3"]::before { background: #059669; }
.csa-roadmap-phase-card[data-phase="4"]::before { background: #d97706; }

/* Large ghost phase number */
.csa-roadmap-phase-card::after {
	content: attr(data-phase);
	position: absolute;
	bottom: -10px; right: 8px;
	font-size: 88px;
	font-weight: 900;
	line-height: 1;
	opacity: .045;
	color: var(--csa-g900);
	pointer-events: none;
	user-select: none;
}

/* Header row: badge + timeframe */
.csa-roadmap-phase-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}

.csa-roadmap-phase-badge {
	display: inline-flex;
	align-items: center;
	font-size: 10.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	padding: 3px 9px;
	border-radius: 999px;
}
.csa-roadmap-phase-card[data-phase="1"] .csa-roadmap-phase-badge { background: #dbeafe; color: #1d4ed8; }
.csa-roadmap-phase-card[data-phase="2"] .csa-roadmap-phase-badge { background: #ede9fe; color: #6d28d9; }
.csa-roadmap-phase-card[data-phase="3"] .csa-roadmap-phase-badge { background: #d1fae5; color: #047857; }
.csa-roadmap-phase-card[data-phase="4"] .csa-roadmap-phase-badge { background: #fef3c7; color: #b45309; }

.csa-roadmap-phase-time {
	font-size: 11px;
	color: var(--csa-g500);
	white-space: nowrap;
}

.csa-roadmap-phase-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--csa-g900);
	line-height: 1.3;
}

/* Item list */
.csa-roadmap-mini-list {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.csa-roadmap-mini-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.csa-roadmap-check {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	margin-top: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.csa-roadmap-check::after {
	content: '✓';
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
}
.csa-roadmap-phase-card[data-phase="1"] .csa-roadmap-check { background: #dbeafe; color: #1d4ed8; }
.csa-roadmap-phase-card[data-phase="2"] .csa-roadmap-check { background: #ede9fe; color: #6d28d9; }
.csa-roadmap-phase-card[data-phase="3"] .csa-roadmap-check { background: #d1fae5; color: #047857; }
.csa-roadmap-phase-card[data-phase="4"] .csa-roadmap-check { background: #fef3c7; color: #b45309; }

.csa-roadmap-item-text {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--csa-g800);
}

.csa-roadmap-item-meta {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	font-style: normal;
	color: var(--csa-g500);
}

.csa-seo-health{
	display:flex;
	align-items:center;
	gap:24px;
}

.csa-score-ring{
	position:relative;
	width:120px;
	height:120px;
}

.csa-score-ring svg{
	width:120px;
	height:120px;
	transform:rotate(-90deg);
}

.csa-score-ring__bg{
	fill:none;
	stroke:#e5e7eb;
	stroke-width:10;
}

.csa-score-ring__progress{
	fill:none;
	stroke:#22c55e;
	stroke-width:10;
	stroke-linecap:round;
	transition: stroke-dashoffset .8s ease;
}

.csa-score-ring__label{
	position:absolute;
	inset:0;
	display:flex;
	align-items:center;
	justify-content:center;
	flex-direction:column;
}

.csa-score-ring__score{
	font-size:34px;
	font-weight:700;
	line-height:1;
}

.csa-score-ring__total{
	font-size:13px;
	color:#6b7280;
}

.csa-health-check{
	display:flex;
	justify-content:space-between;
	gap:12px;
	font-size:13px;
	padding:4px 0;
}

.csa-health-check.success strong{
	color:#16a34a;
}

.csa-health-check.warning strong{
	color:#f59e0b;
}

.csa-usage-upgrade {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
	text-align: right;
}

.csa-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .52);
	z-index: 99998;
}

.csa-modal {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(980px, calc(100vw - 48px));
	max-height: calc(100vh - 80px);
	overflow: auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
	z-index: 99999;
}

.csa-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
}

.csa-modal__head h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.csa-modal__body {
	padding: 24px;
}

.csa-seo-health-breakdown{
	display:flex;
	flex-direction:column;
	gap:8px;
	min-width:220px;
}

.csa-health-row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	font-size:13px;
	line-height:1.2;
}

.csa-health-row span{
	color:#475569;
}

.csa-health-row strong{
	font-size:13px;
	font-weight:700;
	min-width:32px;
	text-align:right;
}

.csa-health-row .good{
	color:#16a34a;
}

.csa-health-row .mid{
	color:#2563eb;
}

.csa-health-row .warn{
	color:#d97706;
}

.csa-health-row .bad{
	color:#dc2626;
}

.csa-plan-status-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.csa-plan-status--active,
.csa-plan-status--trialing {
	background: #dcfce7;
	color: #166534;
}

.csa-plan-status--past_due,
.csa-plan-status--unpaid,
.csa-plan-status--incomplete {
	background: #fef3c7;
	color: #92400e;
}

.csa-plan-status--canceled,
.csa-plan-status--free {
	background: #f1f5f9;
	color: #475569;
}