/**
 * «أثر السيو» v2 — screen styles (loaded on this screen only).
 * Palette: indigo/violet hero, amber call-to-action, emerald wins, rose declines.
 */
.rx-impact {
	--rx-ink: #0f172a;
	--rx-muted: #64748b;
	--rx-line: #e2e8f0;
	--rx-card: #ffffff;
	--rx-bg: #f8fafc;
	--rx-indigo: #312e81;
	--rx-violet: #7c3aed;
	--rx-emerald: #059669;
	--rx-emerald-soft: #ecfdf5;
	--rx-amber: #f59e0b;
	--rx-orange: #ea580c;
	--rx-orange-soft: #fff7ed;
	--rx-rose: #e11d48;
	--rx-rose-soft: #fff1f2;
	--rx-sky: #0284c7;
	--rx-gold: #d97706;
	--rx-radius: 14px;
	--rx-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
	color: var(--rx-ink);
	font-family: Tahoma, "Segoe UI", system-ui, sans-serif;
	direction: inherit;
	margin: 16px 0 40px;
	max-width: 1280px;
}
.rx-impact *, .rx-impact *::before, .rx-impact *::after { box-sizing: border-box; }
.rx-impact h2, .rx-impact h3 { margin: 0; color: var(--rx-ink); }
.rx-impact a { color: var(--rx-violet); }
.rx-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Account settings (collapsed) */
.rx-impact-account { margin: 12px 0 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 14px; max-width: 1280px; }
.rx-impact-account summary { cursor: pointer; font-weight: 600; color: #475569; }
.rx-impact-account .rankx-seo-impact-account-row { margin-top: 10px; }

/* Skeleton */
.rx-skeleton { display: grid; gap: 14px; }
.rx-skel { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: rx-shimmer 1.3s ease infinite; border-radius: var(--rx-radius); height: 96px; }
.rx-skel-hero { height: 190px; }
.rx-skel-chart { height: 260px; }
.rx-skel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rx-skel-note { color: var(--rx-muted); text-align: center; margin: 0; }
@keyframes rx-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Hero */
.rx-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px 22px; color: #fff; background: radial-gradient(circle at 12% 120%, rgba(16, 185, 129, .45), transparent 45%), linear-gradient(120deg, #1e1b4b 0%, var(--rx-indigo) 35%, var(--rx-violet) 100%); box-shadow: 0 12px 40px rgba(49, 46, 129, .35); }
.rx-hero::after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.rx-hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; position: relative; z-index: 1; }
.rx-hero h2 { color: #fff; font-size: 26px; line-height: 1.3; }
.rx-hero-sub { margin: 6px 0 0; color: rgba(255, 255, 255, .85); font-size: 14px; }
.rx-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: rgba(255, 255, 255, .8); }
.rx-hero-counters { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.rx-counter { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(4px); }
.rx-counter-value { font-size: 30px; font-weight: 800; line-height: 1.1; }
.rx-counter-label { font-size: 13px; color: rgba(255, 255, 255, .85); margin-top: 4px; }
.rx-counter.is-glow { background: rgba(16, 185, 129, .22); border-color: rgba(110, 231, 183, .55); box-shadow: 0 0 0 1px rgba(110, 231, 183, .25), 0 0 24px rgba(16, 185, 129, .35); }
.rx-hero-range { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; }
.rx-hero-range input[type="date"] { border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .95); padding: 3px 8px; min-height: 30px; }
.rx-btn { white-space: nowrap; justify-content: center; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; border: 1px solid transparent; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; line-height: 1.4; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; font-family: inherit; }
.rx-btn:hover { transform: translateY(-1px); }
.rx-btn:disabled { opacity: .55; cursor: default; transform: none; }
.rx-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.rx-btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.rx-btn-light { background: #fff; color: var(--rx-indigo); }
.rx-btn-cta { background: linear-gradient(90deg, var(--rx-amber), var(--rx-orange)); color: #fff; box-shadow: 0 6px 18px rgba(234, 88, 12, .35); }
.rx-btn-cta:hover { color: #fff; box-shadow: 0 10px 24px rgba(234, 88, 12, .45); }
/* wp-admin's link colour outranks a lone class — pin button text colours on links too. */
.rx-impact a.rx-btn-cta, .rx-impact a.rx-btn-cta:hover { color: #fff; }
.rx-impact a.rx-btn-soft { color: var(--rx-orange); }
.rx-impact a.rx-btn-line { color: #334155; }
.rx-impact a.rx-btn-light { color: var(--rx-indigo); }
.rx-btn-soft { background: var(--rx-orange-soft); color: var(--rx-orange); border-color: #fed7aa; }
.rx-btn-line { background: #fff; color: #334155; border-color: var(--rx-line); }
.rx-btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.rx-note-lens { background: rgba(255, 255, 255, .16); border-radius: 8px; padding: 2px 8px; }

/* Credits bar */
.rx-credits { position: sticky; top: 32px; z-index: 20; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 14px 0; padding: 12px 16px; border-radius: 16px; background: linear-gradient(90deg, #fffbeb, #fff7ed); border: 1px solid #fde68a; box-shadow: 0 6px 20px rgba(245, 158, 11, .18); }
.rx-credits-text { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 14px; }
.rx-credits-balance { font-weight: 800; color: var(--rx-orange); font-size: 16px; }
.rx-credits-pending strong { color: var(--rx-ink); }
.rx-credits.is-empty { background: linear-gradient(90deg, #fff1f2, #fff7ed); border-color: #fecdd3; }
.rx-credits-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Banners */
.rx-banner { border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.rx-banner-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.rx-banner-info { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; }
.rx-banner-error { background: var(--rx-rose-soft); border: 1px solid #fecdd3; color: #9f1239; }

/* Section card */
.rx-card { background: var(--rx-card); border: 1px solid var(--rx-line); border-radius: var(--rx-radius); box-shadow: var(--rx-shadow); padding: 18px 20px; margin: 14px 0; }
.rx-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.rx-card-head h3 { font-size: 17px; }
.rx-card-sub { color: var(--rx-muted); font-size: 13px; margin: 4px 0 0; }

/* Summary cards */
.rx-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rx-metric { position: relative; background: #fff; border: 1px solid var(--rx-line); border-top: 4px solid var(--rx-sky); border-radius: 12px; padding: 14px; }
.rx-metric.c-violet { border-top-color: var(--rx-violet); }
.rx-metric.c-gold { border-top-color: var(--rx-gold); }
.rx-metric.c-emerald { border-top-color: var(--rx-emerald); }
.rx-metric.c-orange { border-top-color: var(--rx-orange); }
.rx-metric-label { font-size: 13px; color: var(--rx-muted); display: flex; gap: 6px; align-items: center; }
.rx-metric-value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.rx-metric-sub { font-size: 12px; color: var(--rx-muted); margin-top: 4px; }
.rx-help { display: inline-flex; width: 17px; height: 17px; border-radius: 50%; background: #f1f5f9; color: var(--rx-muted); font-size: 11px; align-items: center; justify-content: center; cursor: help; position: relative; }
.rx-help:hover::after, .rx-help:focus::after { content: attr(data-tip); position: absolute; bottom: 130%; inset-inline-start: -8px; width: 240px; background: var(--rx-ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.6; z-index: 30; white-space: normal; box-shadow: var(--rx-shadow); }
.rx-delta { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; vertical-align: middle; }
.rx-delta.up { background: var(--rx-emerald-soft); color: var(--rx-emerald); }
.rx-delta.down { background: var(--rx-rose-soft); color: var(--rx-rose); }
.rx-delta.same { background: #f1f5f9; color: var(--rx-muted); }
.rx-inline-note { margin: 12px 0 0; font-size: 13px; color: #334155; }
.rx-ga4-cta { display: flex; gap: 12px; align-items: center; background: #f5f3ff; border: 1px dashed #c4b5fd; border-radius: 12px; padding: 12px 14px; color: #4c1d95; font-size: 13px; margin-top: 12px; }

/* Chart */
.rx-chart-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rx-toggle { display: inline-flex; flex-direction: column; gap: 2px; border: 1px solid var(--rx-line); border-radius: 12px; padding: 8px 12px; background: #fff; cursor: pointer; min-width: 140px; text-align: start; font-family: inherit; }
.rx-toggle-name { font-size: 12px; color: var(--rx-muted); display: flex; gap: 6px; align-items: center; }
.rx-toggle-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.rx-toggle-value { font-size: 18px; font-weight: 800; }
.rx-toggle-prev { font-size: 11px; color: var(--rx-muted); }
.rx-toggle.is-off { opacity: .45; }
.rx-toggle.is-on { box-shadow: 0 0 0 2px rgba(124, 58, 237, .18); }
.rx-chart-wrap { position: relative; }
.rx-chart-wrap { direction: ltr; }
.rx-chart-svg { width: 100%; height: 280px; display: block; direction: ltr; }
.rx-chart-svg text { font-size: 11px; fill: #94a3b8; font-family: Tahoma, sans-serif; }
.rx-tooltip { position: absolute; pointer-events: none; background: var(--rx-ink); color: #fff; border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.7; min-width: 170px; box-shadow: var(--rx-shadow); z-index: 5; }
.rx-tooltip[hidden] { display: none; }
.rx-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--rx-muted); margin-top: 8px; }
.rx-legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid #475569; vertical-align: middle; margin-inline-end: 4px; }
.rx-legend i.dash { border-top-style: dashed; opacity: .6; }
.rx-legend i.star { width: 3px; height: 12px; border: 0; background: var(--rx-gold); }

/* Recommendation map */
.rx-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.rx-board-card { text-align: start; border: 1px solid var(--rx-line); border-radius: 14px; background: #fff; padding: 12px 14px; cursor: pointer; font-family: inherit; transition: transform .12s ease, box-shadow .12s ease; display: flex; flex-direction: column; gap: 4px; }
.rx-board-card:hover { transform: translateY(-2px); box-shadow: var(--rx-shadow); }
.rx-board-card .rx-bc-top { display: flex; justify-content: space-between; align-items: center; }
.rx-board-card .rx-bc-emoji { font-size: 22px; }
.rx-board-card .rx-bc-count { font-size: 24px; font-weight: 800; }
.rx-board-card .rx-bc-label { font-weight: 700; font-size: 13px; }
.rx-board-card .rx-bc-desc { font-size: 12px; color: var(--rx-muted); line-height: 1.6; }
.rx-board-card .rx-bc-tag { align-self: flex-start; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--rx-orange-soft); color: var(--rx-orange); }
.rx-board-card.k-win { background: linear-gradient(160deg, #ecfdf5, #fff); border-color: #a7f3d0; box-shadow: 0 0 0 1px rgba(16, 185, 129, .08), 0 6px 18px rgba(16, 185, 129, .18); }
.rx-board-card.k-win .rx-bc-count { color: var(--rx-emerald); }
.rx-board-card.k-act { background: linear-gradient(160deg, #fff7ed, #fff); border-color: #fed7aa; }
.rx-board-card.k-act .rx-bc-count { color: var(--rx-orange); }
.rx-board-card.k-bad { background: linear-gradient(160deg, #fff1f2, #fff); border-color: #fecdd3; }
.rx-board-card.k-bad .rx-bc-count { color: var(--rx-rose); }
.rx-board-card.k-wait .rx-bc-count { color: #475569; }
.rx-board-card.is-active { outline: 3px solid var(--rx-violet); outline-offset: 1px; }
.rx-explain { margin-top: 12px; border: 1px solid var(--rx-line); border-radius: 12px; padding: 10px 14px; background: var(--rx-bg); }
.rx-explain summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.rx-explain ol, .rx-explain p { font-size: 13px; line-height: 1.8; color: #334155; margin: 8px 0 0; }

/* Table */
.rx-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--rx-line); margin-bottom: 12px; }
.rx-tab { border: 0; background: transparent; padding: 8px 14px; font-weight: 700; color: var(--rx-muted); cursor: pointer; border-bottom: 3px solid transparent; font-family: inherit; }
.rx-tab.is-active { color: var(--rx-violet); border-bottom-color: var(--rx-violet); }
.rx-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rx-tools input[type="search"], .rx-tools select { border-radius: 10px; border: 1px solid var(--rx-line); min-height: 34px; padding: 2px 10px; }
.rx-tools input[type="search"] { min-width: 220px; }
.rx-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.rx-table th { text-align: start; font-size: 12px; color: var(--rx-muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--rx-line); background: var(--rx-bg); position: sticky; top: 0; }
.rx-table td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; font-size: 13px; }
.rx-table tr.rx-row { cursor: pointer; }
.rx-table tr.rx-row:hover td { background: #fafaff; }
.rx-prod { display: flex; gap: 10px; align-items: flex-start; min-width: 260px; }
.rx-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--rx-line); flex: 0 0 44px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 12px; }
.rx-prod-title { font-weight: 700; color: var(--rx-ink); text-decoration: none; }
.rx-prod-title:hover { color: var(--rx-violet); }
.rx-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rx-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.rx-chip.v-win { background: var(--rx-emerald-soft); color: var(--rx-emerald); }
.rx-chip.v-act { background: var(--rx-orange-soft); color: var(--rx-orange); }
.rx-chip.v-bad { background: var(--rx-rose-soft); color: var(--rx-rose); }
.rx-chip.v-new { background: #eef2ff; color: #4338ca; }
.rx-chip.v-proof { background: #f0fdf4; color: #15803d; font-weight: 600; }
.rx-chip.v-kw { background: #fefce8; color: #a16207; }
.rx-chip.v-q { background: #f8fafc; color: #475569; font-weight: 500; border: 1px solid #e2e8f0; }
.rx-cell-main { font-weight: 700; font-size: 14px; }
.rx-cell-sub { font-size: 11px; color: var(--rx-muted); margin-top: 2px; }
.rx-up { color: var(--rx-emerald); font-weight: 700; }
.rx-down { color: var(--rx-rose); font-weight: 700; }
.rx-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 150px; }
.rx-reason td { background: #fafaff; font-size: 13px; color: #334155; line-height: 1.8; }
.rx-reason[hidden] { display: none; }
.rx-empty { text-align: center; color: var(--rx-muted); padding: 30px 10px; }
.rx-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--rx-muted); flex-wrap: wrap; gap: 8px; }
.rx-refreshing { position: relative; }
.rx-refreshing::before { content: attr(data-label); position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 50; background: var(--rx-ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--rx-shadow); }

@media (max-width: 1100px) {
	.rx-hero-counters, .rx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rx-col-secondary { display: none; }
	.rx-secondary-inline { display: block !important; }
}
@media (max-width: 640px) {
	.rx-hero { padding: 20px 16px; }
	.rx-hero h2 { font-size: 21px; }
	.rx-hero-counters, .rx-metrics { grid-template-columns: 1fr 1fr; }
	.rx-counter-value { font-size: 24px; }
	.rx-credits { top: 46px; }
	.rx-table thead { display: none; }
	.rx-table, .rx-table tbody, .rx-table tr, .rx-table td { display: block; width: 100%; }
	.rx-table td { border-bottom: 0; padding: 6px 4px; }
	.rx-table tr.rx-row { border-bottom: 1px solid var(--rx-line); padding: 8px 0; }
	.rx-prod { min-width: 0; }
	.rx-tools input[type="search"] { min-width: 0; width: 100%; }
}
.rx-secondary-inline { display: none; }
