/*
 * SiteAuditHub admin styles.
 * Every rule is scoped to .sah-wrap / body.sah-admin so other screens are untouched.
 */

body.sah-admin #wpcontent { background: #f3f6fb; }
body.sah-admin #wpbody-content { padding-bottom: 40px; }

.sah-wrap {
	--sah-blue: #1d8bff;
	--sah-blue-2: #0b63f6;
	--sah-green: #2fd158;
	--sah-green-2: #17b26a;
	--sah-navy: #0b1220;
	--sah-navy-2: #14213d;
	--sah-slate: #1e293b;
	--sah-text: #0f172a;
	--sah-muted: #5b6b82;
	--sah-border: #e3e9f2;
	--sah-card: #ffffff;
	--sah-soft: #f6f9fd;
	--sah-grad: linear-gradient(90deg, #1d8bff 0%, #22b8a6 55%, #2fd158 100%);
	--sah-critical: #d92d20;
	--sah-high: #e8590c;
	--sah-medium: #c98200;
	--sah-low: #1f6fe5;
	--sah-info: #64748b;
	--sah-radius: 16px;
	--sah-radius-sm: 10px;
	--sah-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
	--sah-focus: 0 0 0 3px rgba(29, 139, 255, .35);
	color: var(--sah-text);
	font-size: 14px;
	line-height: 1.55;
	margin: 16px 20px 0 2px;
	max-width: 1360px;
}

.sah-wrap *, .sah-wrap *::before, .sah-wrap *::after { box-sizing: border-box; }
.sah-wrap a { color: var(--sah-blue-2); text-decoration: none; }
.sah-wrap a:hover { text-decoration: underline; }
.sah-wrap a:focus-visible, .sah-wrap button:focus-visible, .sah-wrap summary:focus-visible,
.sah-wrap input:focus-visible, .sah-wrap select:focus-visible, .sah-wrap textarea:focus-visible {
	outline: 2px solid transparent;
	box-shadow: var(--sah-focus);
	border-radius: 8px;
}
.sah-wrap code, .sah-wrap .sah-code { background: #eef3fa; color: #1e3a5f; padding: 1px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
.sah-wrap .sah-muted { color: var(--sah-muted); }
.sah-wrap .sah-small { font-size: 12.5px; }
.sah-wrap .sah-text-danger { color: var(--sah-critical); }
.sah-wrap .sah-text-warn { color: var(--sah-medium); }
.sah-wrap .dashicons { line-height: 1; }

/* ---------- Brand header ---------- */
.sah-hero-bar {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding: 18px 24px;
	border-radius: var(--sah-radius);
	background:
		radial-gradient(600px 160px at 12% -20%, rgba(29, 139, 255, .35), transparent 70%),
		radial-gradient(500px 180px at 95% 120%, rgba(47, 209, 88, .25), transparent 70%),
		linear-gradient(135deg, var(--sah-navy) 0%, var(--sah-navy-2) 100%);
	box-shadow: 0 10px 30px rgba(11, 18, 32, .25);
}
.sah-brand { display: flex; align-items: center; gap: 14px; }
.sah-brand .sah-logo-icon { filter: drop-shadow(0 4px 10px rgba(29, 139, 255, .35)); flex: none; }
/* The wordmark sets the width; the tagline stretches to match it exactly. */
.sah-brand-text { display: inline-grid; grid-template-columns: max-content; gap: 4px; }
.sah-wordmark { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.sah-wm-site { color: #fff; }
.sah-wm-audit { background: linear-gradient(180deg, #38b6ff, #0b63f6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sah-wm-hub { background: linear-gradient(180deg, #6ff047, #17b26a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sah-tagline { display: flex; align-items: center; gap: 8px; width: 0; min-width: 100%; color: #dbe6f5; font-size: 11px; font-weight: 700; letter-spacing: .2em; white-space: nowrap; }
.sah-tagline-text { margin-right: -.2em; } /* cancel the trailing letter-spacing so both lines sit evenly */
.sah-tagline-line { flex: 1 1 0; min-width: 10px; height: 3px; border-radius: 3px; }
.sah-tl-blue { background: var(--sah-blue); }
.sah-tl-green { background: var(--sah-green); }
.sah-hero-actions { display: flex; align-items: center; gap: 12px; }
.sah-version-chip { color: #c7d4e8; font-size: 12px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; }
.sah-about .sah-wordmark .sah-wm-site, .sah-welcome .sah-wordmark .sah-wm-site { color: var(--sah-text); }

/* ---------- Navigation ---------- */
/* Always one row: items share the width; on narrow screens the row scrolls sideways. */
.sah-nav {
	display: flex;
	gap: 2px;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: thin;
	margin: 14px 0 18px;
	padding: 6px;
	background: var(--sah-card);
	border: 1px solid var(--sah-border);
	border-radius: 14px;
	box-shadow: var(--sah-shadow);
}
.sah-wrap .sah-nav-item {
	display: inline-flex;
	flex: 1 0 auto;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	white-space: nowrap;
	border-radius: 10px;
	color: #334155;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.sah-wrap .sah-nav-item .dashicons { font-size: 17px; width: 17px; height: 17px; color: #7a8aa3; }
.sah-wrap .sah-nav-item:hover { background: var(--sah-soft); }
.sah-wrap .sah-nav-item.is-active { background: linear-gradient(135deg, rgba(29, 139, 255, .12), rgba(47, 209, 88, .12)); color: var(--sah-blue-2); }
.sah-wrap .sah-nav-item.is-active .dashicons { color: var(--sah-blue-2); }
@media (max-width: 1440px) {
	.sah-wrap .sah-nav-item { padding: 8px 8px; gap: 5px; font-size: 12.5px; }
	.sah-wrap .sah-nav-item .dashicons { font-size: 16px; width: 16px; height: 16px; }
}

/* ---------- Layout ---------- */
.sah-main { display: flex; flex-direction: column; gap: 18px; }
.sah-grid { display: grid; gap: 18px; }
.sah-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sah-grid-3-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.sah-grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.sah-grid-help { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.sah-help-content { display: flex; flex-direction: column; gap: 18px; }
.sah-toc { position: sticky; top: 46px; }
.sah-toc ol { margin: 0 0 0 18px; }
.sah-toc li { margin: 6px 0; }

.sah-card {
	background: var(--sah-card);
	border: 1px solid var(--sah-border);
	border-radius: var(--sah-radius);
	box-shadow: var(--sah-shadow);
	padding: 20px 22px;
	min-width: 0;
}
.sah-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sah-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--sah-text); }
.sah-card-head .sah-card-title { margin-bottom: 2px; }
.sah-card-head p { margin: 0; }
.sah-subtitle { font-size: 14px; margin: 20px 0 8px; }
.sah-section-title { font-size: 15px; margin: 8px 0 -6px; color: #334155; }
.sah-hint { font-size: 12.5px; margin: 10px 0 0; }

/* ---------- Buttons ---------- */
.sah-wrap .sah-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .12s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.sah-wrap .sah-btn:hover { text-decoration: none; }
.sah-wrap .sah-btn:active { transform: translateY(1px); }
.sah-wrap .sah-btn[disabled], .sah-wrap .sah-btn.is-busy { opacity: .6; cursor: progress; }
.sah-wrap .sah-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.sah-wrap .sah-btn-primary { background: var(--sah-grad); color: #fff; box-shadow: 0 6px 16px rgba(29, 139, 255, .28); }
.sah-wrap .sah-btn-primary:hover { color: #fff; box-shadow: 0 8px 20px rgba(29, 139, 255, .36); }
.sah-wrap .sah-btn-secondary { background: #eaf3ff; color: var(--sah-blue-2); border-color: #cfe3ff; }
.sah-wrap .sah-btn-secondary:hover { background: #dcebff; color: var(--sah-blue-2); }
.sah-wrap .sah-btn-ghost { background: #fff; color: #334155; border-color: var(--sah-border); }
.sah-wrap .sah-btn-ghost:hover { background: var(--sah-soft); color: var(--sah-text); }
.sah-wrap .sah-btn-danger-ghost { background: #fff; color: var(--sah-critical); border-color: #f5c9c5; }
.sah-wrap .sah-btn-danger-ghost:hover { background: #fff3f2; color: var(--sah-critical); }
.sah-wrap .sah-btn-link { background: none; color: var(--sah-blue-2); padding: 0 6px; }
.sah-wrap .sah-btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.sah-wrap .sah-btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.sah-wrap .sah-btn-sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.sah-wrap .sah-btn-lg { min-height: 44px; padding: 0 22px; font-size: 14px; }
.sah-wrap .sah-btn-icon { min-height: 30px; width: 30px; padding: 0; background: transparent; color: var(--sah-muted); border-radius: 8px; }
.sah-wrap .sah-btn-icon:hover { background: #fff3f2; color: var(--sah-critical); }
.sah-btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sah-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sah-green); box-shadow: 0 0 0 0 rgba(47, 209, 88, .6); animation: sah-pulse 1.6s infinite; }
@keyframes sah-pulse { 70% { box-shadow: 0 0 0 10px rgba(47, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 209, 88, 0); } }

/* ---------- Badges & chips ---------- */
.sah-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; color: #fff; }
.sah-sev-critical { background: var(--sah-critical); }
.sah-sev-high { background: var(--sah-high); }
.sah-sev-medium { background: #f59f00; color: #3b2600; }
.sah-sev-low { background: #dbe8ff; color: #1546a8; }
.sah-sev-info { background: #e8edf3; color: #3d4b5f; }
.sah-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: #eef2f7; color: #3d4b5f; white-space: nowrap; }
.sah-chip-xs { font-size: 10.5px; padding: 1px 6px; }
.sah-chip-new { background: #e7f0ff; color: #0b4fc4; }
.sah-chip-recurring { background: #fff4de; color: #8a5200; }
.sah-chip-update { background: #fff4de; color: #8a5200; }
.sah-cls-confirmed, .sah-cls-integrity_mismatch, .sah-cls-signature_match { background: #fde8e7; color: #a01c12; }
.sah-cls-potential, .sah-cls-suspicious { background: #fff2dd; color: #8a5200; }
.sah-cls-manual, .sah-cls-unverified { background: #ecebff; color: #3c34a5; }
.sah-cls-failed, .sah-cls-inaccessible { background: #f1f5f9; color: #475569; }
.sah-cls-unsupported, .sah-cls-unavailable, .sah-cls-not_evaluated { background: #f1f5f9; color: #64748b; }
.sah-bg-critical { background: var(--sah-critical); }
.sah-bg-high { background: var(--sah-high); }
.sah-bg-medium { background: #f59f00; }
.sah-bg-low { background: #5b9bff; }
.sah-bg-info { background: #a3b1c2; }
.sah-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.sah-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef2f7; color: #475569; white-space: nowrap; }
.sah-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.sah-status-running, .sah-status-queued, .sah-istatus-processing { background: #e7f0ff; color: #0b4fc4; }
.sah-status-completed, .sah-istatus-done { background: #e3f8eb; color: #0d7a43; }
.sah-status-paused, .sah-istatus-pending { background: #fff4de; color: #8a5200; }
.sah-status-cancelled, .sah-istatus-skipped { background: #f1f5f9; color: #64748b; }
.sah-status-failed, .sah-istatus-failed, .sah-istatus-inaccessible { background: #fde8e7; color: #a01c12; }
.sah-http { font-variant-numeric: tabular-nums; font-weight: 700; }
.sah-http-2 { color: #0d7a43; }
.sah-http-3 { color: #8a5200; }
.sah-http-4, .sah-http-5 { color: var(--sah-critical); }

/* ---------- Alerts ---------- */
.sah-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid; margin: 0; }
.sah-alert p { margin: 0; }
.sah-alert .dashicons { margin-top: 2px; }
.sah-alert-info { background: #f0f7ff; border-color: #cfe3ff; color: #183a6b; }
.sah-alert-warning { background: #fff8eb; border-color: #fbe0a8; color: #6b4300; }
.sah-alert-error { background: #fff3f2; border-color: #f5c9c5; color: #8a1c14; }

/* ---------- Scan panel ---------- */
.sah-scan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sah-scan-sub { margin: 0; }
.sah-scan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sah-progress-wrap { margin-top: 16px; }
.sah-progress-meta { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.sah-progress-pct { font-variant-numeric: tabular-nums; color: var(--sah-blue-2); }
.sah-progress { height: 12px; border-radius: 999px; background: #e9eff7; overflow: hidden; }
.sah-progress-bar { height: 100%; border-radius: 999px; background: var(--sah-grad); background-size: 200% 100%; transition: width .5s ease; animation: sah-flow 2.4s linear infinite; }
.sah-scan-panel[data-status="paused"] .sah-progress-bar { animation: none; filter: grayscale(.6); }
@keyframes sah-flow { from { background-position: 0 0; } to { background-position: -200% 0; } }
.sah-progress-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; }
.sah-progress-wrap .sah-alert { margin-top: 10px; }
.sah-wrap [hidden] { display: none !important; }

/* ---------- Welcome ---------- */
.sah-welcome { display: flex; gap: 28px; align-items: center; padding: 32px; background: linear-gradient(135deg, #ffffff 0%, #f2f8ff 60%, #effcf3 100%); }
.sah-welcome h2 { font-size: 24px; margin: 0 0 8px; }
.sah-welcome p { font-size: 14.5px; max-width: 720px; }
.sah-welcome-art { flex: none; }
.sah-checklist { list-style: none; margin: 12px 0 18px; padding: 0; }
.sah-checklist li { position: relative; padding-left: 26px; margin: 8px 0; }
.sah-checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--sah-grad); -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%); }
.sah-checklist li::after { content: ""; position: absolute; left: 5px; top: 7px; width: 6px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Score ring & overview ---------- */
.sah-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.sah-ring svg { position: absolute; inset: 0; }
.sah-ring-track { fill: none; stroke: #e9eff7; stroke-width: 11; }
.sah-ring-value { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.sah-ring-good .sah-ring-value { stroke: #19b862; }
.sah-ring-fair .sah-ring-value { stroke: #f2a60c; }
.sah-ring-poor .sah-ring-value { stroke: #e5484d; }
.sah-ring-none .sah-ring-value { stroke: transparent; }
.sah-ring-number { position: relative; font-size: 1.9em; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sah-ring[style*="168px"] .sah-ring-number { font-size: 44px; }
.sah-ring[style*="84px"] .sah-ring-number { font-size: 22px; }

.sah-overview { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.sah-overview-score { display: flex; gap: 22px; align-items: center; }
.sah-overview-dates { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
.sah-overview-dates .dashicons { color: var(--sah-muted); margin-right: 6px; font-size: 16px; width: 16px; height: 16px; }
.sah-module-scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sah-wrap .sah-module-scores a { display: grid; grid-template-columns: 150px 1fr 80px; align-items: center; gap: 12px; color: var(--sah-text); text-decoration: none; padding: 6px 8px; border-radius: 10px; }
.sah-wrap .sah-module-scores a:hover { background: var(--sah-soft); }
.sah-ms-label { font-weight: 600; }
.sah-ms-bar { height: 8px; background: #e9eff7; border-radius: 999px; overflow: hidden; }
.sah-ms-fill { display: block; height: 100%; border-radius: 999px; }
.sah-tone-good { background: linear-gradient(90deg, #2fd158, #17b26a); }
.sah-tone-fair { background: linear-gradient(90deg, #ffc84a, #f29d0c); }
.sah-tone-poor { background: linear-gradient(90deg, #ff7b6b, #e5484d); }
.sah-ms-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: #334155; font-size: 13px; }

.sah-score-card { display: flex; align-items: center; gap: 22px; }
.sah-score-row { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0 4px; }
.sah-score-mini { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: #334155; }

/* ---------- Tiles ---------- */
.sah-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.sah-wrap .sah-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 18px;
	background: var(--sah-card);
	border: 1px solid var(--sah-border);
	border-radius: 14px;
	box-shadow: var(--sah-shadow);
	color: var(--sah-text);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
	overflow: hidden;
}
.sah-wrap a.sah-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .1); }
.sah-wrap .sah-tile::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #dbe3ee; }
.sah-wrap .sah-tile.sah-tone-blue::after { background: linear-gradient(90deg, #38b6ff, #0b63f6); }
.sah-wrap .sah-tile.sah-tone-green::after { background: linear-gradient(90deg, #6ff047, #17b26a); }
.sah-wrap .sah-tile.sah-tone-amber::after { background: linear-gradient(90deg, #ffc84a, #f29d0c); }
.sah-tile-icon { position: absolute; right: 14px; top: 14px; font-size: 22px; width: 22px; height: 22px; color: #b7c3d4; }
.sah-tile-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sah-tile-label { color: var(--sah-muted); font-size: 12.5px; font-weight: 600; }
.sah-tile-muted { opacity: .7; }

/* ---------- Severity bars ---------- */
.sah-module-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.sah-mb-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.sah-sevbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #e9eff7; gap: 2px; }
.sah-sevbar-seg { display: block; min-width: 4px; }
.sah-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--sah-muted); }
.sah-wrap .sah-legend a { color: inherit; }
.sah-legend strong { color: var(--sah-text); margin-left: 2px; }

.sah-integrity-card .dashicons { color: var(--sah-blue-2); }
.sah-int-verdict { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; margin: 6px 0 12px; font-weight: 600; }
.sah-int-verdict p { margin: 0; }
.sah-int-verdict.is-ok { background: #e9f9ef; color: #0d6b3b; }
.sah-int-verdict.is-ok .dashicons { color: #17b26a; }
.sah-int-verdict.is-alert { background: #fff1ef; color: #8a1c14; }
.sah-int-verdict.is-alert .dashicons { color: var(--sah-critical); }

.sah-kv { margin: 0 0 12px; display: grid; gap: 8px; }
.sah-kv > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--sah-border); }
.sah-kv dt { color: var(--sah-muted); }
.sah-kv dd { margin: 0; font-weight: 600; text-align: right; }
.sah-kv-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }

.sah-actions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sah-actions-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--sah-soft); }
.sah-actions-list a { font-weight: 600; }

/* ---------- Tables ---------- */
.sah-table-wrap { overflow-x: auto; border: 1px solid var(--sah-border); border-radius: 12px; }
.sah-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sah-table th, .sah-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.sah-table thead th { background: #f7f9fc; color: #475569; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.sah-table tbody tr:last-child td, .sah-table tbody tr:last-child th { border-bottom: 0; }
.sah-table tbody tr:hover { background: #fafcff; }
.sah-table tr.is-selected { background: #f0f7ff; }
.sah-table .sah-num { text-align: right; font-variant-numeric: tabular-nums; }
.sah-td-url { max-width: 520px; word-break: break-word; }
.sah-url { word-break: break-word; }
.sah-actions-cell { width: 40px; }

.sah-segments { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.sah-wrap .sah-segment { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--sah-soft); border: 1px solid var(--sah-border); color: #334155; font-weight: 600; font-size: 12.5px; text-decoration: none; }
.sah-wrap .sah-segment span { background: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; color: var(--sah-muted); }
.sah-wrap .sah-segment.is-active { background: #e7f0ff; border-color: #bcd6ff; color: var(--sah-blue-2); }

/* ---------- Filters & forms ---------- */
.sah-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px; margin-bottom: 14px; background: var(--sah-soft); border: 1px solid var(--sah-border); border-radius: 12px; }
.sah-filters-inline { background: none; border: 0; padding: 0; }
.sah-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #475569; }
.sah-wrap .sah-field input, .sah-wrap .sah-field select { min-height: 32px; border-radius: 8px; border-color: #cfd8e5; min-width: 150px; }
.sah-filter-actions { display: flex; gap: 6px; align-items: center; }
.sah-filter-note { margin: -6px 0 12px; font-size: 12.5px; }

.sah-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--sah-border); margin-bottom: 2px; flex-wrap: wrap; }
.sah-wrap .sah-tab { padding: 10px 14px; font-weight: 600; color: #475569; border-bottom: 3px solid transparent; text-decoration: none; margin-bottom: -1px; }
.sah-wrap .sah-tab.is-active { color: var(--sah-blue-2); border-image: var(--sah-grad) 1; border-bottom: 3px solid; }
.sah-settings-form { display: flex; flex-direction: column; gap: 18px; }
.sah-setting { padding: 12px 0; border-bottom: 1px solid #f0f3f8; max-width: 760px; }
.sah-setting:last-child { border-bottom: 0; }
.sah-setting > label, .sah-setting legend { display: block; font-weight: 600; margin-bottom: 6px; }
.sah-wrap .sah-setting input[type="number"] { width: 120px; }
.sah-wrap .sah-setting textarea { width: 100%; max-width: 560px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; border-radius: 10px; }
.sah-wrap .sah-setting input[type="text"], .sah-wrap .sah-setting select, .sah-wrap .sah-setting input[type="number"] { border-radius: 8px; border-color: #cfd8e5; min-height: 34px; }
.sah-input-suffix { display: inline-flex; align-items: center; gap: 8px; color: var(--sah-muted); }
.sah-help { margin: 6px 0 0; color: var(--sah-muted); font-size: 12.5px; max-width: 680px; }
.sah-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.sah-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.sah-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sah-switch-ui { display: inline-block; position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cfd8e5; transition: background .2s ease; flex: none; }
.sah-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.sah-switch input:checked + .sah-switch-ui { background: var(--sah-grad); }
.sah-switch input:checked + .sah-switch-ui::after { transform: translateX(18px); }
.sah-switch input:focus-visible + .sah-switch-ui { box-shadow: var(--sah-focus); }
.sah-save-bar { padding: 4px 0 14px; }
.sah-wrap .sah-save-bar .button.sah-btn { height: auto; min-height: 40px; padding: 0 22px; border: 0; text-shadow: none; }

/* ---------- Findings ---------- */
.sah-findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sah-finding { border: 1px solid var(--sah-border); border-radius: 12px; background: #fff; border-left: 4px solid #cbd5e1; transition: box-shadow .15s ease; }
.sah-finding:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.sah-finding-critical { border-left-color: var(--sah-critical); }
.sah-finding-high { border-left-color: var(--sah-high); }
.sah-finding-medium { border-left-color: #f59f00; }
.sah-finding-low { border-left-color: #5b9bff; }
.sah-finding.is-ignored { opacity: .65; }
.sah-finding summary { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 20px; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.sah-finding summary::-webkit-details-marker { display: none; }
.sah-finding-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sah-finding-title { font-weight: 700; }
.sah-finding-item { font-size: 12.5px; color: var(--sah-muted); word-break: break-word; }
.sah-finding-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sah-chevron { color: #94a3b8; transition: transform .2s ease; }
.sah-finding details[open] .sah-chevron { transform: rotate(180deg); }
.sah-finding-body { padding: 4px 18px 16px 136px; border-top: 1px dashed var(--sah-border); }
.sah-finding-body h4 { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #475569; }
.sah-evidence { margin: 0; padding: 10px 12px; max-height: 260px; overflow: auto; background: #0f172a; color: #dbeafe; border-radius: 10px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.sah-log { max-height: 360px; }
.sah-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 0; font-size: 12px; }
.sah-meta dt { color: var(--sah-muted); display: inline; }
.sah-meta dt::after { content: ":"; }
.sah-meta dd { display: inline; margin: 0 0 0 4px; font-weight: 600; }
.sah-finding-actions { margin-top: 14px; }

.sah-empty { text-align: center; padding: 40px 20px; }
.sah-empty h3 { margin: 12px 0 4px; font-size: 18px; }
.sah-empty p { color: var(--sah-muted); max-width: 560px; margin: 0 auto 14px; }
.sah-empty-sm { padding: 26px 10px; }
.sah-empty-sm .dashicons { font-size: 34px; width: 34px; height: 34px; color: #17b26a; }

.sah-pagination { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; }

/* ---------- Health ---------- */
.sah-health-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sah-health-item { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 14px 34px; border: 1px solid var(--sah-border); border-radius: 12px; background: #fff; }
.sah-h-dot { position: absolute; left: 14px; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: #a3b1c2; }
.sah-h-good .sah-h-dot { background: #17b26a; box-shadow: 0 0 0 4px rgba(23, 178, 106, .15); }
.sah-h-warning .sah-h-dot { background: #f59f00; box-shadow: 0 0 0 4px rgba(245, 159, 0, .15); }
.sah-h-critical .sah-h-dot { background: var(--sah-critical); box-shadow: 0 0 0 4px rgba(217, 45, 32, .15); }
.sah-h-notice .sah-h-dot { background: #5b9bff; }
.sah-h-label { font-size: 12px; color: var(--sah-muted); font-weight: 600; }
.sah-h-value { font-weight: 700; font-size: 15px; word-break: break-word; }
.sah-h-note { font-size: 12px; color: var(--sah-muted); }

.sah-optin { display: flex; gap: 20px; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #fff, #f2f8ff); }
.sah-optin p { margin: 0; max-width: 860px; }

.sah-compare { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sah-compare li { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; background: var(--sah-soft); }
.sah-compare strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.sah-compare span { color: var(--sah-muted); font-size: 12px; font-weight: 600; }
.sah-cmp-new strong { color: var(--sah-blue-2); }
.sah-cmp-rec strong { color: #b06a00; }
.sah-cmp-res strong { color: #0d7a43; }
.sah-report-brand { display: flex; gap: 12px; align-items: center; }

.sah-plain-list { margin: 8px 0 0; padding-left: 18px; }
.sah-plain-list li { margin: 4px 0; }
.sah-steps { margin: 0 0 0 20px; }
.sah-steps li { margin: 8px 0; }
.sah-collapsible { border: 1px solid var(--sah-border); border-radius: 12px; padding: 10px 14px; margin-top: 10px; }
.sah-collapsible summary { cursor: pointer; font-weight: 700; }
.sah-collapsible[open] summary { margin-bottom: 10px; }
.sah-glossary { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sah-glossary > div { display: flex; gap: 10px; align-items: center; }
.sah-glossary dt { min-width: 110px; }
.sah-glossary dd { margin: 0; }
.sah-faq dt { font-weight: 700; margin-top: 12px; }
.sah-faq dd { margin: 4px 0 0; color: #334155; }
.sah-about { display: flex; gap: 16px; align-items: center; }
.sah-about p { margin: 4px 0 0; }
.sah-about .sah-wordmark { font-size: 22px; }

/* ---------- Toasts & dialog ---------- */
.sah-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.sah-toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .3); font-size: 13px; animation: sah-in .2s ease; }
.sah-toast.is-error { background: #7f1d1d; }
.sah-toast.is-success { background: #064e3b; }
.sah-toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; }
@keyframes sah-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.sah-dialog { border: 0; border-radius: 16px; padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 30px 60px rgba(15, 23, 42, .35); }
.sah-dialog::backdrop { background: rgba(11, 18, 32, .55); }
.sah-dialog-body { padding: 22px 22px 8px; font-size: 14px; color: var(--sah-text); }
.sah-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }

.sah-footer { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 0; color: var(--sah-muted); font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.sah-grid-3-1, .sah-grid-1-2, .sah-overview { grid-template-columns: minmax(0, 1fr); }
	.sah-grid-help { grid-template-columns: minmax(0, 1fr); }
	.sah-toc { position: static; }
}
@media (max-width: 782px) {
	.sah-wrap { margin: 10px 10px 0 0; }
	.sah-grid-2, .sah-kv-2 { grid-template-columns: minmax(0, 1fr); }
	.sah-hero-bar { padding: 16px; }
	.sah-wordmark { font-size: 22px; }
	.sah-tagline { font-size: 9px; letter-spacing: .12em; gap: 6px; }
	.sah-tagline-text { margin-right: -.12em; }
	.sah-tagline-line { min-width: 8px; }
	.sah-nav-item span:not(.dashicons) { font-size: 12px; }
	.sah-welcome { flex-direction: column; text-align: left; padding: 22px; }
	.sah-overview-score, .sah-score-card { flex-direction: column; align-items: flex-start; }
	.sah-module-scores a { grid-template-columns: 110px 1fr 70px; }
	.sah-finding summary { grid-template-columns: minmax(0, 1fr) 20px; }
	.sah-finding-sev { grid-column: 1 / -1; }
	.sah-finding-tags { justify-content: flex-start; grid-column: 1 / 2; }
	.sah-finding-body { padding: 4px 14px 14px; }
	.sah-optin { flex-direction: column; align-items: flex-start; }
	.sah-compare { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.sah-wrap *, .sah-wrap *::before, .sah-wrap *::after { animation: none !important; transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
	body.sah-admin #adminmenumain, body.sah-admin #wpadminbar, body.sah-admin #wpfooter,
	body.sah-admin .notice, body.sah-admin .sah-nav, body.sah-admin .sah-hero-bar,
	body.sah-admin .sah-no-print, body.sah-admin .sah-toasts, body.sah-admin .sah-finding-actions,
	body.sah-admin .sah-pagination, body.sah-admin .sah-filters { display: none !important; }
	body.sah-admin #wpcontent, body.sah-admin #wpbody-content { margin: 0 !important; padding: 0 !important; background: #fff; }
	body.sah-admin .sah-wrap { margin: 0; max-width: none; }
	body.sah-admin .sah-card, body.sah-admin .sah-finding { box-shadow: none; break-inside: avoid; }
	body.sah-admin .sah-evidence { background: #f3f5f8; color: #111; max-height: none; }
	body.sah-admin .sah-badge, body.sah-admin .sah-ring-value, body.sah-admin .sah-dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Keep link-styled components free of the generic underline on hover. */
.sah-wrap .sah-nav-item:hover, .sah-wrap .sah-tile:hover, .sah-wrap .sah-segment:hover,
.sah-wrap .sah-tab:hover, .sah-wrap .sah-module-scores a:hover, .sah-wrap .sah-legend a:hover { text-decoration: none; }

/* Login address settings */
.sah-wrap .sah-slug-field { display: flex; align-items: stretch; max-width: 620px; border: 1px solid #cfd8e5; border-radius: 10px; overflow: hidden; background: #fff; }
.sah-wrap .sah-slug-field:focus-within { box-shadow: var(--sah-focus); }
.sah-wrap .sah-slug-prefix { display: flex; align-items: center; padding: 0 10px; background: var(--sah-soft); color: var(--sah-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; border-right: 1px solid #cfd8e5; }
.sah-wrap .sah-slug-field input[type="text"] { flex: 1; min-width: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 38px; }
.sah-wrap .sah-slug-field input[type="text"]:focus { box-shadow: none; outline: 0; }
.sah-wrap .sah-login-live { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, #f2fbf5, #eef6ff); border-color: #bfe8cf; }
.sah-wrap .sah-login-live > .dashicons { font-size: 28px; width: 28px; height: 28px; color: #17b26a; margin-top: 2px; }
.sah-wrap .sah-login-url { font-size: 18px; font-weight: 700; margin: 2px 0 6px; word-break: break-all; }
.sah-wrap .sah-setting > label.sah-switch { display: inline-flex; margin-bottom: 0; }

/* Login activity */
.sah-wrap .sah-login-login { background: #e3f8eb; color: #0d7a43; }
.sah-wrap .sah-login-failed { background: #fde8e7; color: #a01c12; }
.sah-wrap .sah-login-logout { background: #eef2f7; color: #475569; }
.sah-wrap .sah-user { display: flex; gap: 10px; align-items: center; }
.sah-wrap .sah-avatar { border-radius: 50%; flex: none; }

/* Settings: image pickers and colour fields. */
.sah-media-label { display: block; font-weight: 600; margin-bottom: 6px; }
.sah-media-preview { margin: 0 0 8px; padding: 8px; display: inline-block; max-width: 100%; border: 1px solid #dcdcde; border-radius: 8px; background: repeating-conic-gradient(#f6f7f7 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.sah-media-preview[hidden] { display: none; }
.sah-media-preview img { display: block; max-width: 240px; max-height: 120px; height: auto; }
.sah-color-field { display: flex; gap: 8px; align-items: center; }
.sah-color-field input[type="text"] { width: 110px; font-family: monospace; }
.sah-color-field input[type="color"] { width: 44px; height: 32px; padding: 2px; border: 1px solid #8c8f94; border-radius: 4px; background: #fff; cursor: pointer; }

/* Scan panel: latest severity tiles and "issues per scan" chart. */
.sah-trend { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--sah-border); }
.sah-trend-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.sah-trend-tile { margin: 0; padding: 10px 12px; border: 1px solid var(--sah-border); border-radius: 10px; background: #fbfcfe; }
.sah-trend-tile-label { display: flex; align-items: center; font-size: 12px; color: var(--sah-muted); }
.sah-trend-tile-value { display: block; margin-top: 2px; font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--sah-text); font-variant-numeric: tabular-nums; }
.sah-trend-change { display: flex; align-items: center; gap: 4px; margin: 10px 0 0; font-size: 12px; }
.sah-trend-change .dashicons { font-size: 16px; width: 16px; height: 16px; }
.sah-trend-empty { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 13px; }
.sah-trend-title { margin: 16px 0 0; font-size: 13px; font-weight: 700; color: var(--sah-text); }
.sah-trend-sub { margin: 2px 0 6px; font-size: 12px; }
.sah-trend-chart { position: relative; }
.sah-trend-chart { min-height: 200px; }
.sah-trend-chart svg { display: block; overflow: visible; }
.sah-trend-grid { stroke: #edf1f6; stroke-width: 1; }
.sah-trend-grid.is-base { stroke: #cfd8e3; }
.sah-trend-axis { fill: var(--sah-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sah-trend-axis.is-current { fill: var(--sah-text); font-weight: 700; }
.sah-trend-axis.is-small { font-size: 10px; }
.sah-trend-value { fill: var(--sah-text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sah-trend-bar { fill: var(--sah-blue-2); transition: opacity .12s ease; }
.sah-trend-hit { fill: transparent; }
.sah-trend-col { cursor: default; outline: none; }
.sah-trend-chart.is-hovering .sah-trend-col:not(.is-hover) .sah-trend-bar { opacity: .35; }
.sah-trend-col:focus-visible .sah-trend-hit { stroke: var(--sah-blue-2); stroke-width: 2; }
.sah-trend-tip { position: absolute; z-index: 5; min-width: 170px; padding: 10px 12px; background: #fff; border: 1px solid var(--sah-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); font-size: 12px; color: var(--sah-text); pointer-events: none; }
.sah-trend-tip[hidden] { display: none; }
.sah-trend-tip-title { display: block; color: var(--sah-muted); margin-bottom: 2px; }
.sah-trend-tip-total { display: block; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.sah-trend-tip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sah-trend-tip-row strong { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
	.sah-trend-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Malware page: one clear verdict. */
.sah-safe-verdict { display: flex; gap: 18px; align-items: center; padding: 24px 26px; border-width: 1px; border-style: solid; }
.sah-safe-verdict.is-ok { background: linear-gradient(135deg, #ecfbf2, #f7fdf9); border-color: #bfead0; }
.sah-safe-verdict.is-alert { background: linear-gradient(135deg, #fff1ef, #fff8f7); border-color: #f5c9c5; }
.sah-safe-icon.dashicons { flex: none; width: 56px; height: 56px; font-size: 56px; }
.sah-safe-verdict.is-ok .sah-safe-icon { color: #17b26a; }
.sah-safe-verdict.is-alert .sah-safe-icon { color: var(--sah-critical); }
.sah-safe-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.sah-safe-verdict.is-ok .sah-safe-title { color: #0d6b3b; }
.sah-safe-verdict.is-alert .sah-safe-title { color: #8a1c14; }
.sah-safe-text { margin: 6px 0 0; font-size: 14px; color: var(--sah-text); }
.sah-safe-meta { margin: 6px 0 0; font-size: 12px; color: var(--sah-muted); }
.sah-notes-toggle { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 2px 18px; font-size: 13px; }
.sah-readonly-note { display: flex; gap: 6px; align-items: center; margin: 8px 2px 0; }
.sah-readonly-note .dashicons { font-size: 15px; width: 15px; height: 15px; }
@media (max-width: 600px) {
	.sah-safe-verdict { flex-direction: column; align-items: flex-start; padding: 18px; }
	.sah-safe-icon.dashicons { width: 40px; height: 40px; font-size: 40px; }
}

.sah-safe-verdict.is-warn { background: linear-gradient(135deg, #fff8eb, #fffcf5); border-color: #fbe0a8; }
.sah-safe-verdict.is-warn .sah-safe-icon { color: #e8a200; }
.sah-safe-verdict.is-warn .sah-safe-title { color: #6b4300; font-size: 20px; }
.sah-safe-action { margin: 12px 0 0; }
