/**
 * Zen Plugins admin design system.
 *
 * Reusable across all Zen Plugins products: scope everything under
 * .zen-admin and consume the tokens below. Layout patterns follow the
 * "full-bleed product page" convention (own header bar, card grid,
 * sidebar); visual identity is Zen Plugins only.
 */

.zen-admin {
	--zen-ink: #0F172A;
	--zen-muted: #475569;
	--zen-accent: #10B981;
	--zen-accent-hover: #059669;
	--zen-tint: #ECFDF5;
	--zen-red: #DC2626;
	--zen-red-tint: #FEF2F2;
	--zen-amber: #B45309;
	--zen-amber-tint: #FFFBEB;
	--zen-border: #E2E8F0;
	--zen-page-bg: #F8FAFC;
	--zen-card-r: 16px;

	color: var(--zen-ink);
	font-size: 14px;
	line-height: 1.55;
}

/* ---- Full-bleed shell (tuck WP chrome) ---- */
body.lgbf-zen #wpcontent { padding-left: 0; }
body.lgbf-zen #wpbody-content { padding-bottom: 0; }
body.lgbf-zen #wpfooter { display: none; }
.zen-shell { background: var(--zen-page-bg); min-height: calc(100vh - 32px); }
.zen-admin .notice { display: none; } /* other plugins' notices stay out of our page */
.zen-admin .notice.lgbf-own, .zen-admin .lgbf-undo-notice { display: block; }

.zen-admin *:focus-visible { outline: 2px solid var(--zen-accent); outline-offset: 2px; border-radius: 4px; }
.zen-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---- Top bar ---- */
.zen-topbar {
	background: #fff; border-bottom: 1px solid var(--zen-border);
	display: flex; align-items: center; gap: 28px; padding: 0 28px; min-height: 64px; flex-wrap: wrap;
}
.zen-lockup { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--zen-ink); }
.zen-lockup svg { flex: none; }
.zen-tabs { display: flex; gap: 6px; align-self: stretch; }
.zen-tab {
	display: inline-flex; align-items: center; padding: 0 16px; text-decoration: none;
	color: var(--zen-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.zen-tab:hover { color: var(--zen-ink); }
.zen-tab.is-active { color: var(--zen-ink); border-bottom-color: var(--zen-accent); font-weight: 600; }
.zen-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.zen-doclink { color: var(--zen-muted); text-decoration: none; font-weight: 500; }
.zen-doclink:hover { color: var(--zen-ink); }

/* ---- Buttons ---- */
.zen-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 10px;
	font-weight: 600; font-size: 13.5px; text-decoration: none; border: 1px solid transparent;
	cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.zen-btn--primary { background: var(--zen-accent); color: #fff; }
.zen-btn--primary:hover { background: var(--zen-accent-hover); color: #fff; }
.zen-btn--ghost { background: #fff; color: var(--zen-ink); border-color: var(--zen-border); }
.zen-btn--ghost:hover { border-color: var(--zen-accent); color: var(--zen-accent-hover); }

/* ---- Layout grid ---- */
.zen-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px;
	padding: 24px 28px 48px; max-width: 1320px;
}
.zen-main, .zen-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ---- Cards ---- */
.zen-card { background: #fff; border: 1px solid var(--zen-border); border-radius: var(--zen-card-r); padding: 24px; }
.zen-card > h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--zen-ink); }
.zen-card .zen-card-sub { margin: 0 0 16px; color: var(--zen-muted); font-size: 13px; }

/* ---- Grade card ---- */
.zen-grade { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.zen-grade-letter {
	width: 112px; height: 112px; border-radius: 20px; flex: none;
	display: flex; align-items: center; justify-content: center;
	font-size: 64px; font-weight: 700; letter-spacing: -0.02em;
}
.zen-grade--good .zen-grade-letter { background: var(--zen-tint); color: var(--zen-accent-hover); }
.zen-grade--warn .zen-grade-letter { background: var(--zen-amber-tint); color: var(--zen-amber); }
.zen-grade--bad .zen-grade-letter { background: var(--zen-red-tint); color: var(--zen-red); }
.zen-grade--pending .zen-grade-letter { background: var(--zen-page-bg); color: var(--zen-muted); font-size: 40px; }
.zen-grade-body { flex: 1; min-width: 240px; }
.zen-grade-body h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.zen-grade-body p { margin: 0 0 14px; color: var(--zen-muted); }
.zen-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.zen-chip {
	display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px;
	border: 1px solid var(--zen-border); border-radius: 999px; font-size: 12.5px; font-weight: 500;
	color: var(--zen-muted); background: #fff;
}
.zen-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zen-border); }
.zen-chip--ok::before { background: var(--zen-accent); }
.zen-chip--bad::before { background: var(--zen-red); }
.zen-chip--warn::before { background: #F59E0B; }

/* ---- Issues card ---- */
.zen-issues { display: flex; flex-direction: column; }
.zen-issue { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--zen-border); }
.zen-issue:first-of-type { border-top: 0; }
.zen-sev {
	flex: none; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: 3px 9px; border-radius: 6px;
}
.zen-sev--red { background: var(--zen-red-tint); color: var(--zen-red); }
.zen-sev--amber { background: var(--zen-amber-tint); color: var(--zen-amber); }
.zen-sev--task { background: var(--zen-page-bg); color: var(--zen-muted); }
.zen-sev--done { background: var(--zen-tint); color: var(--zen-accent-hover); }
.zen-issue-label { flex: 1; min-width: 0; }
.zen-issue-label a { color: inherit; }
.zen-count {
	flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
	background: var(--zen-page-bg); border: 1px solid var(--zen-border);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 600; color: var(--zen-ink);
}
.zen-issue-actions { flex: none; display: flex; align-items: center; gap: 10px; }
.zen-issue-actions a { text-decoration: none; font-weight: 600; color: var(--zen-accent-hover); }
.zen-hide-task {
	background: none; border: 0; padding: 2px 6px; cursor: pointer; color: var(--zen-muted);
	font-size: 16px; line-height: 1; border-radius: 4px;
}
.zen-hide-task:hover { color: var(--zen-ink); background: var(--zen-page-bg); }

/* ---- Results table restyle ---- */
.zen-table-card { padding: 12px 24px 20px; }
.zen-admin .wp-list-table { border: 0; box-shadow: none; background: transparent; }
.zen-admin .wp-list-table th { color: var(--zen-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--zen-border); }
.zen-admin .wp-list-table td { border-bottom: 1px solid var(--zen-border); }
.zen-admin .wp-list-table tr:hover td { background: var(--zen-page-bg); }
.zen-admin .subsubsub a { color: var(--zen-muted); }
.zen-admin .subsubsub a.current { color: var(--zen-ink); font-weight: 600; }
.zen-admin .lgbf-badge { border-radius: 6px; font-weight: 600; }
.zen-admin .lgbf-badge-broken { background: var(--zen-red-tint); color: var(--zen-red); }
.zen-admin .lgbf-badge-redirect { background: var(--zen-amber-tint); color: var(--zen-amber); }
.zen-admin .lgbf-badge-ok { background: var(--zen-tint); color: var(--zen-accent-hover); }
.zen-admin .lgbf-badge-muted { background: var(--zen-page-bg); color: var(--zen-muted); }

/* ---- Sidebar cards ---- */
.zen-plugin-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--zen-border); }
.zen-plugin-row:first-of-type { border-top: 0; padding-top: 4px; }
.zen-plugin-ico {
	flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--zen-tint);
	display: flex; align-items: center; justify-content: center;
}
.zen-plugin-row h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.zen-plugin-row p { margin: 2px 0 0; font-size: 12.5px; color: var(--zen-muted); }
.zen-plugin-state { flex: none; font-size: 12px; font-weight: 600; }
.zen-plugin-state a { color: var(--zen-accent-hover); text-decoration: none; }
.zen-plugin-state .is-active-state { color: var(--zen-muted); }
.zen-plugin-row--ghost { opacity: .65; }

.zen-tips { list-style: none; margin: 4px 0 0; padding: 0; }
.zen-tips li { border-top: 1px solid var(--zen-border); }
.zen-tips li:first-child { border-top: 0; }
.zen-tips a {
	display: flex; justify-content: space-between; align-items: center; gap: 8px;
	padding: 11px 2px; text-decoration: none; color: var(--zen-ink); font-weight: 500; font-size: 13px;
}
.zen-tips a::after { content: "→"; color: var(--zen-accent); flex: none; }
.zen-tips a:hover { color: var(--zen-accent-hover); }

/* ---- Settings shell ---- */
.zen-admin .form-table th { color: var(--zen-ink); }
.zen-admin .form-table { margin-top: 0; }

/* ---- Responsive (782px admin breakpoint + tablets) ---- */
@media (max-width: 1100px) {
	.zen-layout { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
	.zen-topbar { padding: 10px 16px; gap: 14px; }
	.zen-tabs { order: 3; width: 100%; border-top: 1px solid var(--zen-border); }
	.zen-tab { padding: 10px 14px; }
	.zen-layout { padding: 16px 12px 40px; gap: 16px; }
	.zen-card { padding: 18px; }
	.zen-grade-letter { width: 88px; height: 88px; font-size: 48px; }
	body.lgbf-zen #wpcontent { padding-left: 0; }
}

/* ---- Opt-in card ---- */
.lgbf-optin-card { position: relative; }
.lgbf-optin-card .lgbf-optin-close { position: absolute; top: 14px; right: 14px; }
.lgbf-optin-form { display: flex; flex-direction: column; gap: 8px; }
.lgbf-optin-form .lgbf-optin-email { width: 100%; }
.lgbf-optin-note { color: var(--zen-muted); font-size: 12px; margin: 8px 0 0; }

/* ---- Pricing page ---- */
.zen-offer { display: flex; justify-content: center; }
.zen-offer span { display: inline-flex; gap: 8px; align-items: center; background: var(--zen-tint); color: var(--zen-accent-hover); border: 1px solid #A7F3D0; font-weight: 600; font-size: 13.5px; padding: 8px 18px; border-radius: 999px; }
.zen-offer code { background: #fff; border: 1px solid #A7F3D0; border-radius: 6px; padding: 1px 8px; }
.zen-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.zen-plan { position: relative; display: flex; flex-direction: column; gap: 12px; }
.zen-plan--popular { border-color: var(--zen-accent); box-shadow: 0 8px 24px rgba(16,185,129,.12); }
.zen-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--zen-accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.zen-plan h3 { margin: 0; font-size: 14px; color: var(--zen-muted); font-weight: 600; }
.zen-price { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.zen-price small { font-size: 13px; color: var(--zen-muted); font-weight: 500; }
.zen-plan ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.zen-plan li { font-size: 13.5px; color: var(--zen-muted); padding-left: 20px; position: relative; }
.zen-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--zen-accent); font-weight: 700; }
.zen-moneyback { text-align: center; color: var(--zen-muted); font-size: 13.5px; }
.zen-compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.zen-compare td { padding: 10px 8px; border-top: 1px solid var(--zen-border); }
.zen-compare tr:first-child td { border-top: 0; }
.zen-compare td:nth-child(2) { color: var(--zen-accent-hover); font-weight: 700; text-align: center; }
.zen-mut { color: var(--zen-muted); text-align: right; }
.zen-faq { border-top: 1px solid var(--zen-border); padding: 10px 0; }
.zen-faq:first-of-type { border-top: 0; }
.zen-faq summary { font-weight: 600; cursor: pointer; }
.zen-faq p { color: var(--zen-muted); margin: 8px 0 0; }

/* ---- v1.1 polish: inline opt-in, harm cards, big comparison, promo card ---- */
.lgbf-optin-inline .lgbf-optin-form--row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.lgbf-optin-form--row .lgbf-optin-email { width: auto; flex: 1; min-width: 220px; }
.zen-harm { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.zen-harm h3 { margin: 0 0 6px; font-size: 14.5px; }
.zen-harm p { margin: 0; font-size: 13px; color: var(--zen-muted); }
.zen-compare--big th { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--zen-muted); padding: 8px; }
.zen-compare--big .zen-lgcol { background: var(--zen-tint); text-align: center; font-weight: 700; color: var(--zen-accent-hover); }
.zen-compare--big th.zen-lgcol { border-radius: 10px 10px 0 0; }
.zen-lifetime { margin: -6px 0 0; font-size: 12.5px; color: var(--zen-accent-hover); font-weight: 600; }
.zen-promo { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.zen-promo img { border: 1px solid var(--zen-border); }
.zen-promo h3 { margin: 0; font-size: 15px; }
.zen-promo p { margin: 0 0 4px; font-size: 13px; color: var(--zen-muted); }

/* ---- Checklist progress ---- */
.zen-progress { height: 8px; border-radius: 999px; background: var(--zen-page-bg); border: 1px solid var(--zen-border); overflow: hidden; margin-bottom: 12px; }
.zen-progress span { display: block; height: 100%; background: var(--zen-accent); border-radius: 999px; transition: width .3s ease; }
.zen-lifetime .lgbf-buy { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--zen-accent-hover); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ==== v1.1 design-merge (Claude Design delivery, mapped to zen tokens) ==== */
.zen-admin { --zen-card-r: 18px; --zen-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04); }
.zen-card { border-radius: var(--zen-card-r); box-shadow: var(--zen-shadow); }
.zen-btn { border-radius: 999px; }
.zen-btn--dark { background: var(--zen-ink); color: #fff; }
.zen-btn--dark:hover { background: #1E293B; color: #fff; }

/* Grade ring (was square tile) */
.zen-grade-letter { border-radius: 50%; background: #fff !important; border: 8px solid var(--zen-border); }
.zen-grade--good .zen-grade-letter { border-color: var(--zen-accent); color: var(--zen-accent-hover); }
.zen-grade--warn .zen-grade-letter { border-color: #F59E0B; color: var(--zen-amber); }
.zen-grade--bad .zen-grade-letter { border-color: var(--zen-red); color: var(--zen-red); }
.zen-grade--pending .zen-grade-letter { border-color: var(--zen-border); color: var(--zen-muted); }

/* Filter pills (WP subsubsub DOM, restyled) */
.zen-admin .subsubsub { margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; float: none; }
.zen-admin .subsubsub li { margin: 0; }
.zen-admin .subsubsub li a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px; border: 1px solid var(--zen-border); border-radius: 999px; text-decoration: none; font-size: 12.5px; font-weight: 600; background: #fff; }
.zen-admin .subsubsub li a.current { background: var(--zen-ink); border-color: var(--zen-ink); color: #fff; }
.zen-admin .subsubsub .count { color: inherit; opacity: .65; }
.zen-admin .search-box input[type="search"] { border-radius: 999px; border-color: var(--zen-border); }

/* Always-visible per-row action pills (WP row-actions DOM, restyled) */
.zen-admin .row-actions { position: static; visibility: visible; opacity: 1; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.zen-admin .row-actions span { padding: 0; }
.zen-admin .row-actions span a { display: inline-block; padding: 3px 11px; border: 1px solid var(--zen-border); border-radius: 999px; background: #fff; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--zen-ink); }
.zen-admin .row-actions span a:hover { border-color: var(--zen-accent); color: var(--zen-accent-hover); }
.zen-admin .row-actions .sep, .zen-admin .row-actions span::after { display: none; content: none; }

/* Checklist circle markers */
.zen-admin section[aria-label*="checklist"] .zen-sev,
.zen-admin section[aria-label*="Checkliste"] .zen-sev {
	width: 20px; height: 20px; padding: 0; border-radius: 50%; display: inline-flex;
	align-items: center; justify-content: center; font-size: 11px; letter-spacing: 0;
	border: 2px solid var(--zen-border); background: #fff; color: transparent;
}
.zen-admin section[aria-label*="checklist"] .zen-sev--done { background: var(--zen-accent); border-color: var(--zen-accent); color: #fff; }
.zen-admin section[aria-label*="checklist"] .zen-sev--red { border-color: var(--zen-red); }
.zen-admin section[aria-label*="checklist"] .zen-sev--amber { border-color: #F59E0B; }

/* ==== Polish r3 ==== */
/* 1: AA contrast on active pill counts */
.zen-admin .subsubsub li a.current .count { color: #fff; opacity: .82; }
/* 4: protection-framed Go Pro */
.zen-btn--pro { flex-direction: column; gap: 1px; padding: 8px 20px; line-height: 1.25; align-items: center; }
.zen-btn--pro .zen-pro-main { font-size: 13.5px; font-weight: 700; }
.zen-btn--pro .zen-pro-sub { font-size: 10.5px; font-weight: 500; opacity: .92; }
.zen-btn--pro:hover { box-shadow: 0 4px 16px rgba(16,185,129,.35); }
/* 5: two-zone status panel */
.zen-grade { position: relative; overflow: hidden; padding: 0; align-items: stretch; gap: 0; }
.zen-grade::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.zen-grade--good::before { background: var(--zen-accent); }
.zen-grade--warn::before { background: #F59E0B; }
.zen-grade--bad::before { background: var(--zen-red); }
.zen-grade--pending::before { background: var(--zen-border); }
.zen-grade-panel { display: flex; align-items: center; justify-content: center; padding: 32px 36px; flex: none; }
.zen-grade--good .zen-grade-panel { background: var(--zen-tint); }
.zen-grade--warn .zen-grade-panel { background: var(--zen-amber-tint); }
.zen-grade--bad .zen-grade-panel { background: var(--zen-red-tint); }
.zen-grade--pending .zen-grade-panel { background: var(--zen-page-bg); }
.zen-grade .zen-grade-letter { width: 128px; height: 128px; font-size: 68px; }
.zen-grade-body { padding: 24px 28px; }
.zen-grade-body h2 { font-size: 20px; font-weight: 700; }
.zen-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.zen-stat { display: flex; flex-direction: column; gap: 1px; min-width: 96px; padding: 9px 14px; background: #fff; border: 1px solid var(--zen-border); border-left-width: 3px; border-radius: 10px; }
.zen-stat--bad { border-left-color: var(--zen-red); }
.zen-stat--warn { border-left-color: #F59E0B; }
.zen-stat--ok { border-left-color: var(--zen-accent); }
.zen-stat-n { font-size: 18px; font-weight: 700; line-height: 1.1; }
.zen-stat-l { font-size: 11.5px; color: var(--zen-muted); }
.zen-grade-doclink { display: inline-block; margin-left: 14px; font-size: 12.5px; color: var(--zen-muted); }
.zen-grade-doclink:hover { color: var(--zen-accent-hover); }
@media (max-width: 782px) { .zen-grade { flex-direction: column; } .zen-grade-panel { width: 100%; padding: 24px; } }

/* ==== Portfolio promo lockup + proof row (r4) ==== */
.zen-admin { --zen-gold: #F59E0B; }
.zen-promo-head { display: flex; gap: 12px; align-items: center; }
.zen-promo-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--zen-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.zen-promo-ico img { border-radius: 8px; display: block; }
.zen-promo-id h3 { margin: 0 0 2px; font-size: 14.5px; }
.zen-proof { display: inline-flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--zen-muted); font-weight: 600; line-height: 1; }
.zen-stars { color: var(--zen-gold); letter-spacing: 1px; font-size: 11px; }
.zen-proof-num { color: var(--zen-ink); }
.zen-promo-line { margin: 2px 0 4px; font-size: 13px; color: var(--zen-muted); }
.zen-review-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 12px 0 0; padding: 9px 14px; background: var(--zen-tint); border-radius: 10px; font-size: 13px; color: var(--zen-accent-hover); font-weight: 500; }
.zen-review-ask a { color: var(--zen-accent-hover); font-weight: 700; }
.zen-footer-ask { margin: 4px 0 0; font-size: 12px; color: var(--zen-muted); }
.zen-footer-ask a { color: var(--zen-muted); text-decoration: underline; }
.zen-footer-ask a:hover { color: var(--zen-accent-hover); }
