/**
 * TrustLens Card-Testing Defense — consolidated admin page.
 *
 * Mirrors the visual system used by admin/css/chargeback-monitor.css so the
 * two Pro pages feel like siblings: Stripe-like tokens, 14px-radius cards,
 * ring-shadow elevation, pill badges with leading dot, soft surfaces.
 *
 * @since 1.2.2
 */

.wstl-ct-page {
	--ct-accent: #635bff;
	--ct-text: #0a2540;
	--ct-muted: #6b7280;
	--ct-line: #eff2f6;
	--ct-surface-soft: #f6f9fc;
	--ct-good: #10b981;
	--ct-warn: #f59e0b;
	--ct-danger: #e11d48;
	color: var(--ct-text);
}

.wstl-ct-page h1 {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ct-text);
}

.wstl-ct-page .sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	color: var(--ct-muted);
	font-size: 13px;
}

.wstl-ct-page .sub-text {
	color: var(--ct-muted);
	font-size: 13px;
}

/* --- Pills (identical to .wstl-cb-pill) ------------------------------- */

.wstl-ct-page .ct-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.wstl-ct-page .ct-pill::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.85;
}

.wstl-ct-page .ct-pill-good   { background: #d1fae5; color: #065f46; }
.wstl-ct-page .ct-pill-warn   { background: #fef3c7; color: #92400e; }
.wstl-ct-page .ct-pill-danger { background: #fee2e2; color: #991b1b; }
.wstl-ct-page .ct-pill-muted  { background: #f3f4f6; color: #6b7280; }

/* --- Cards (identical to .wstl-cb-card) ------------------------------- */

.wstl-ct-page .ct-card {
	background: #fff;
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(10,37,64,0.05);
	margin-bottom: 16px;
}

.wstl-ct-page .ct-card:last-child { margin-bottom: 0; }

.wstl-ct-page .ct-card h3 {
	margin: 0 0 14px;
	font-size: 12px;
	color: #425466;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

.wstl-ct-page .ct-pro-tag {
	display: inline-block;
	background: #ede9fe;
	color: #5b21b6;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 4px;
	margin-left: 8px;
	letter-spacing: 0.04em;
	vertical-align: 1px;
}

.wstl-ct-page .ct-link-right {
	float: right;
	font-weight: 500;
	color: var(--ct-accent);
	text-decoration: none;
	font-size: 12px;
	text-transform: none;
	letter-spacing: 0;
}

.wstl-ct-page .ct-link-right:hover { text-decoration: underline; }

/* --- Hero: state + panic + targeted feed ------------------------------ */

.wstl-ct-page .ct-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px 260px;
	gap: 24px;
	padding-top: 26px;
	padding-bottom: 26px;
}

@media (max-width: 1100px) {
	.wstl-ct-page .ct-hero { grid-template-columns: 1fr; }
}

.wstl-ct-page .ct-hero-l { min-width: 0; }

.wstl-ct-page .ct-hero-state {
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ct-text);
}

.wstl-ct-page .ct-state-targeted { color: #b45309; }
.wstl-ct-page .ct-state-panic    { color: var(--ct-danger); }
.wstl-ct-page .ct-state-idle     { color: var(--ct-good); }

.wstl-ct-page .ct-hero-sub {
	color: var(--ct-muted);
	font-size: 13px;
	margin-top: 8px;
	max-width: 520px;
	line-height: 1.5;
}

.wstl-ct-page .ct-hero-metrics {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--ct-line);
	flex-wrap: wrap;
}

.wstl-ct-page .ct-hero-metrics .m { min-width: 70px; }

.wstl-ct-page .ct-hero-metrics .v {
	font-size: 22px;
	font-weight: 700;
	color: var(--ct-text);
	letter-spacing: -0.01em;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.wstl-ct-page .ct-hero-metrics .l {
	font-size: 11px;
	color: var(--ct-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	margin-top: 4px;
}

.wstl-ct-page .ct-hero-r {
	border-left: 1px solid var(--ct-line);
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 10px;
}

@media (max-width: 1100px) {
	.wstl-ct-page .ct-hero-r {
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid var(--ct-line);
		padding-top: 18px;
	}
}

.wstl-ct-page .ct-hero-r h4 {
	margin: 0;
	font-size: 11px;
	color: var(--ct-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}

.wstl-ct-page .ct-hero-r p {
	margin: 0;
	color: var(--ct-muted);
	font-size: 12px;
	line-height: 1.4;
}

.wstl-ct-page .ct-panic-row {
	display: flex;
	gap: 6px;
	margin-top: auto;
	padding-top: 8px;
}

.wstl-ct-page .ct-panic-row select { flex: 1; min-width: 0; }

.wstl-ct-page .ct-hero-feed .ct-feed {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wstl-ct-page .ct-feed li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid var(--ct-line);
	border-left: 3px solid var(--ct-danger);
	border-radius: 8px;
	font-size: 12px;
}

.wstl-ct-page .ct-feed .hash {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	color: var(--ct-text);
	font-weight: 500;
}

.wstl-ct-page .ct-feed .ttl {
	color: var(--ct-muted);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
}

.wstl-ct-page .ct-empty {
	margin: 0;
	color: var(--ct-muted);
	font-size: 12.5px;
	font-style: italic;
}

/* --- Two-column row (settings + allowlists / intel tables) ---------- */

.wstl-ct-page .ct-two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: start;
	margin-bottom: 16px;
}

.wstl-ct-page .ct-two > .ct-card { margin-bottom: 0; }

@media (max-width: 900px) {
	.wstl-ct-page .ct-two { grid-template-columns: 1fr; }
}

.wstl-ct-page .ct-two-tables {
	margin-top: 18px;
	margin-bottom: 0;
	gap: 28px;
}

/* --- Settings form (uses WP .form-table inside card) ---------------- */

.wstl-ct-page .ct-form th {
	padding: 12px 10px 12px 0;
	width: 180px;
	font-weight: 500;
	color: var(--ct-text);
	font-size: 13px;
}

.wstl-ct-page .ct-form td { padding: 12px 0; }

.wstl-ct-page .ct-form tr + tr th,
.wstl-ct-page .ct-form tr + tr td { border-top: 1px solid var(--ct-line); }

.wstl-ct-page .ct-form .description {
	color: var(--ct-muted);
	font-size: 12px;
	margin: 4px 0 0;
}

.wstl-ct-page .ct-unit {
	color: var(--ct-muted);
	font-size: 12px;
	margin-left: 6px;
}

.wstl-ct-page .ct-sub-label {
	font-size: 11px;
	color: var(--ct-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	margin-bottom: 8px;
}

/* --- Allowlist chips ------------------------------------------------- */

.wstl-ct-page .ct-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.wstl-ct-page .ct-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 4px 5px 10px;
	background: var(--ct-surface-soft);
	border: 1px solid var(--ct-line);
	border-radius: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	color: var(--ct-text);
	margin: 0;
}

.wstl-ct-page .ct-chip button {
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9ca3af;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wstl-ct-page .ct-chip button:hover { background: #fee2e2; color: #991b1b; }

.wstl-ct-page .ct-allow-add {
	display: flex;
	gap: 8px;
	align-items: center;
}

.wstl-ct-page .ct-allow-add input[type="text"] {
	flex: 1;
	min-width: 0;
}

/* --- Pro upsell card (base tier) ------------------------------------ */

.wstl-ct-page .ct-upsell { background: linear-gradient(180deg, #fff 0%, #faf8ff 100%); }

.wstl-ct-page .ct-upsell p {
	color: var(--ct-muted);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 14px;
}

/* --- Intelligence: chart wrapper + tables -------------------------- */

.wstl-ct-page .ct-chart-wrap {
	position: relative;
	height: 220px;
	margin-bottom: 8px;
}

.wstl-ct-page .ct-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 13px;
}

.wstl-ct-page .ct-table td {
	padding: 10px 6px;
	border-bottom: 1px solid var(--ct-line);
	vertical-align: middle;
}

.wstl-ct-page .ct-table tr:last-child td { border-bottom: 0; }

.wstl-ct-page .ct-table .hash {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12.5px;
	color: var(--ct-text);
}

.wstl-ct-page .ct-table .num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: var(--ct-danger);
	font-weight: 600;
	width: 80px;
}
