/* PBN Autopilot — client portal: clean light theme, deep indigo accent. */
.pbna-app {
	/* Full-width breakout: escape the theme's content column so the
	   portal spans the full browser width on any theme. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	--pbna-accent: #4338ca;
	--pbna-accent-dark: #3730a3;
	--pbna-bg: #f8fafc;
	--pbna-panel: #ffffff;
	--pbna-border: #e2e8f0;
	--pbna-text: #0f172a;
	--pbna-muted: #64748b;
	--pbna-danger: #b42318;
	--pbna-success: #067647;
	display: flex;
	gap: 20px;
	background: var(--pbna-bg);
	color: var(--pbna-text);
	border: 1px solid var(--pbna-border);
	border-radius: 12px;
	padding: 16px;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}
.pbna-app *, .pbna-modal * { box-sizing: border-box; }

/* Sidebar */
.pbna-sidebar {
	flex: 0 0 220px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.pbna-brand {
	font-size: 19px;
	font-weight: 800;
	color: var(--pbna-accent);
}
.pbna-balance-card {
	background: var(--pbna-accent);
	color: #fff;
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.pbna-balance-card span { font-size: 12px; opacity: .85; }
.pbna-balance-card strong { font-size: 22px; }
.pbna-balance-card a { color: #e0e7ff; font-size: 12px; }
.pbna-nav { display: flex; flex-direction: column; gap: 2px; }
.pbna-nav a {
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--pbna-text);
	text-decoration: none;
	font-weight: 600;
}
.pbna-nav a:hover { background: #eef2ff; }
.pbna-nav a.active { background: var(--pbna-accent); color: #fff; }
.pbna-side-user { color: var(--pbna-muted); font-size: 12px; margin-top: auto; }

/* Main */
.pbna-main { flex: 1 1 auto; min-width: 0; }
.pbna-h { margin: 4px 0 14px; font-size: 22px; }
.pbna-h3 { margin: 22px 0 8px; font-size: 16px; }
.pbna-muted { color: var(--pbna-muted); font-size: 12.5px; }
.pbna-err { color: var(--pbna-danger); }
.pbna-error-cell { color: var(--pbna-danger); font-size: 12.5px; max-width: 260px; }

.pbna-notice {
	background: #ecfdf3; border: 1px solid #a6f4c5; color: #067647;
	padding: 9px 12px; border-radius: 8px; margin-bottom: 12px;
}
.pbna-notice-error { background: #fef3f2; border-color: #fecdca; color: var(--pbna-danger); }

.pbna-grid-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pbna-stat {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 10px; padding: 12px 16px; min-width: 150px;
	display: flex; flex-direction: column; gap: 2px;
}
.pbna-stat span { color: var(--pbna-muted); font-size: 12px; }
.pbna-stat strong { font-size: 20px; }
.pbna-stat-wide { max-width: 300px; margin-bottom: 10px; }

.pbna-paybox {
	background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
	border-radius: 10px; padding: 12px 14px; margin: 10px 0; white-space: normal;
}
.pbna-pack-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.pbna-pack {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 10px; padding: 14px; min-width: 180px;
	display: flex; flex-direction: column; gap: 4px;
}
.pbna-pack strong { font-size: 15px; }

/* Tables */
.pbna-table { width: 100%; border-collapse: collapse; background: var(--pbna-panel); border: 1px solid var(--pbna-border); border-radius: 8px; overflow: hidden; }
.pbna-table th, .pbna-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--pbna-border); vertical-align: top; }
.pbna-table th { background: #eef2ff; font-size: 12.5px; }
.pbna-table tr:last-child td { border-bottom: none; }

.pbna-pill {
	display: inline-block; padding: 1px 8px; border-radius: 999px;
	border: 1px solid var(--pbna-border); font-size: 12px; font-weight: 600;
	background: #f1f5f9; color: #334155;
}
.pbna-pill-completed, .pbna-pill-published, .pbna-pill-approved { color: var(--pbna-success); border-color: #a6f4c5; background: #ecfdf3; }
.pbna-pill-failed, .pbna-pill-rejected { color: var(--pbna-danger); border-color: #fecdca; background: #fef3f2; }
.pbna-pill-processing, .pbna-pill-queued, .pbna-pill-scheduled, .pbna-pill-pending { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.pbna-pill-partial { color: #b54708; border-color: #fedf89; background: #fffaeb; }
.pbna-pill-cancelled { color: #667085; }

/* Buttons + forms */
.pbna-btn {
	display: inline-block; background: var(--pbna-accent); color: #fff !important;
	border: none; border-radius: 8px; padding: 8px 14px; font-weight: 600;
	cursor: pointer; text-decoration: none; font-size: 13.5px;
}
.pbna-btn:hover { background: var(--pbna-accent-dark); }
.pbna-btn:disabled { opacity: .55; cursor: not-allowed; }
.pbna-btn-small { padding: 4px 10px; font-size: 12.5px; }
.pbna-btn-ghost { background: #e2e8f0; color: var(--pbna-text) !important; }
.pbna-btn-danger { background: var(--pbna-danger); }
.pbna-btn-run { width: 100%; padding: 12px; font-size: 15px; background: #067647; }
.pbna-btn-run:hover { background: #05603a; }
.pbna-x { background: none; border: none; color: var(--pbna-danger); cursor: pointer; font-size: 15px; padding: 0 2px; }

.pbna-app label { display: block; font-weight: 600; margin: 10px 0 4px; }
.pbna-app input[type="text"], .pbna-app input[type="number"], .pbna-app input[type="date"],
.pbna-app input[type="url"], .pbna-app input[type="password"], .pbna-app select, .pbna-app textarea {
	width: 100%; max-width: 520px; padding: 8px 10px; margin-top: 3px;
	border: 1px solid var(--pbna-border); border-radius: 8px; background: #fff; color: var(--pbna-text);
	font: inherit;
}
.pbna-app label.pbna-check, .pbna-check { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.pbna-app label.pbna-check input, .pbna-check input { width: auto; }
.pbna-panel {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.pbna-inline-form { display: inline-block; margin-left: 6px; }
.pbna-checklist { max-height: 260px; overflow: auto; border: 1px solid var(--pbna-border); border-radius: 8px; padding: 8px 10px; background: #fff; }
.pbna-checklist label { font-weight: 500; margin: 4px 0; display: flex; gap: 7px; align-items: center; }
.pbna-checklist input { width: auto; }

/* Campaign layout */
.pbna-campaign { display: flex; gap: 18px; align-items: flex-start; }
.pbna-campaign-main { flex: 1 1 auto; min-width: 0; }
.pbna-campaign-side { flex: 0 0 280px; display: flex; flex-direction: column; gap: 12px; }
.pbna-block {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
.pbna-block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pbna-list { list-style: none; margin: 6px 0; padding: 0; }
.pbna-list li { padding: 5px 8px; border: 1px solid var(--pbna-border); border-radius: 7px; margin-bottom: 5px; background: #f8fafc; word-break: break-all; }
.pbna-list small { color: var(--pbna-muted); }
.pbna-total-box { display: flex; flex-direction: column; gap: 2px; }
.pbna-total-box span { color: var(--pbna-muted); font-size: 12px; }
.pbna-total-box strong { font-size: 24px; color: var(--pbna-accent); }
.pbna-run-result { font-size: 13px; }
.pbna-disabled-note {
	background: #fef3f2; border: 1px dashed #fecdca; color: var(--pbna-danger);
	padding: 8px 10px; border-radius: 8px; margin-top: 8px; font-weight: 600;
}
fieldset.pbna-gated { border: none; padding: 0; margin: 0; }
fieldset.pbna-gated[disabled] { opacity: .55; }

/* Modal + dialogs */
.pbna-modal-backdrop {
	position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
	display: flex; align-items: flex-start; justify-content: center;
	padding: 40px 12px; z-index: 99999; overflow: auto;
}
/* The backdrop is shown/hidden via the `hidden` attribute; the display:flex
   rule above would otherwise override it and leave an empty dialog stuck
   on screen. Never remove this rule. */
.pbna-modal-backdrop[hidden] { display: none !important; }
/* The dialog is a flex column capped at the viewport height: header and
   footer (which carries every dialog's confirm button) never scroll
   away — only the body scrolls internally. */
.pbna-modal {
	background: #fff; color: var(--pbna-text, #0f172a); border-radius: 12px;
	width: 100%; max-width: 760px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
	display: flex; flex-direction: column; max-height: calc(100vh - 80px);
}
.pbna-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex: none; }
.pbna-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; line-height: 1; }
.pbna-modal-body { overflow-y: auto; min-height: 0; }
.pbna-modal-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	border-top: 1px solid #e2e8f0; padding-top: 12px; margin-top: 12px; flex: none;
}
/* Same hidden-attribute guard as the backdrop: display:flex would
   otherwise override `hidden` and leave an empty footer bar visible. */
.pbna-modal-foot[hidden] { display: none !important; }
.pbna-foot-status { color: #64748b; font-size: 13px; }
.pbna-foot-actions { white-space: nowrap; }
.pbna-modal label { display: block; font-weight: 600; margin: 10px 0 4px; }
.pbna-modal input[type="text"], .pbna-modal input[type="number"], .pbna-modal select, .pbna-modal textarea {
	width: 100%; padding: 8px 10px; margin-top: 3px; border: 1px solid #e2e8f0; border-radius: 8px; font: inherit;
}
.pbna-modal label.pbna-check { display: flex; gap: 7px; align-items: center; font-weight: 500; }
.pbna-modal label.pbna-check input { width: auto; }
.pbna-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.pbna-tabs button {
	background: #eef2ff; border: 1px solid #e2e8f0; border-radius: 8px;
	padding: 6px 12px; cursor: pointer; font-weight: 600;
}
.pbna-tabs button.active { background: #4338ca; color: #fff; }
.pbna-pick { display: block; font-weight: 500 !important; padding: 4px 0; }
.pbna-pick input { width: auto; margin-right: 6px; }
.pbna-url-row { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.pbna-bulk { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pbna-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.pbna-filters label { margin: 0; }

.pbna-login-box {
	background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
	padding: 22px; text-align: center; color: #0f172a;
}

@media (max-width: 900px) {
	.pbna-app { flex-direction: column; }
	.pbna-sidebar { flex: none; width: 100%; }
	.pbna-nav { flex-direction: row; flex-wrap: wrap; }
	.pbna-campaign { flex-direction: column; }
	.pbna-campaign-side { flex: none; width: 100%; }
	.pbna-bulk { grid-template-columns: 1fr; }
}

/* Landing page (logged-out visitors) */
.pbna-landing {
	/* Same full-width breakout as .pbna-app (see top of file), so the
	   landing spans the full browser width on any theme. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	--pbna-accent: #4338ca;
	--pbna-accent-dark: #3730a3;
	--pbna-bg: #f8fafc;
	--pbna-panel: #ffffff;
	--pbna-border: #e2e8f0;
	--pbna-text: #0f172a;
	--pbna-muted: #64748b;
	--pbna-danger: #b42318;
	--pbna-success: #067647;
	background: var(--pbna-bg);
	color: var(--pbna-text);
	border: 1px solid var(--pbna-border);
	border-radius: 12px;
	padding: 30px 22px 38px;
	font-size: 14.5px;
	line-height: 1.55;
	box-sizing: border-box;
}
.pbna-landing * { box-sizing: border-box; }
.pbna-hero { text-align: center; max-width: 760px; margin: 0 auto 26px; }
.pbna-hero .pbna-brand { font-size: 22px; }
.pbna-hero h1 { font-size: 30px; line-height: 1.25; margin: 10px 0; color: var(--pbna-text); }
.pbna-hero-sub { color: var(--pbna-muted); font-size: 15.5px; margin: 0 0 16px; }
.pbna-hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0; }
.pbna-btn-big { padding: 11px 20px; font-size: 15px; }
.pbna-benefits {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px; max-width: 1080px; margin: 0 auto 28px;
}
.pbna-benefit {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 10px; padding: 14px 16px;
}
.pbna-benefit strong { display: block; font-size: 15px; margin-bottom: 5px; color: var(--pbna-accent-dark); }
.pbna-benefit p { margin: 0; color: var(--pbna-muted); font-size: 13.5px; }
.pbna-pricing { max-width: 1080px; margin: 0 auto 28px; text-align: center; }
.pbna-pricing h2, .pbna-auth-card h2 { margin: 0 0 8px; font-size: 20px; color: var(--pbna-text); }
.pbna-pricing .pbna-muted { font-size: 13.5px; max-width: 640px; margin: 0 auto 12px; }
.pbna-pricing .pbna-pack-grid { justify-content: center; }
.pbna-pricing .pbna-pack { text-align: left; }
.pbna-auth {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 14px; max-width: 900px; margin: 0 auto; align-items: start;
}
.pbna-auth-card {
	background: var(--pbna-panel); border: 1px solid var(--pbna-border);
	border-radius: 12px; padding: 18px 20px;
}
.pbna-auth-card label { display: block; font-weight: 600; margin: 10px 0 4px; }
.pbna-auth-card input[type="text"], .pbna-auth-card input[type="email"], .pbna-auth-card input[type="password"] {
	width: 100%; padding: 8px 10px; margin-top: 3px;
	border: 1px solid var(--pbna-border); border-radius: 8px; background: #fff; color: var(--pbna-text);
	font: inherit;
}
.pbna-auth-card label.pbna-check { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.pbna-auth-card label.pbna-check input { width: auto; }
.pbna-auth-card .pbna-btn { margin-top: 12px; }
.pbna-auth-note { color: var(--pbna-muted); font-size: 13px; margin: 10px 0 0; }
.pbna-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
	.pbna-landing { padding: 22px 14px 30px; }
	.pbna-hero h1 { font-size: 24px; }
}

/* Clickable domain rows in the Select Domains dialog (v1.2.0) */
.pbna-modal label.pbna-pick-inline { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; margin: 0; cursor: pointer; }
.pbna-pick-inline input { width: auto; }
.pbna-pick-row { cursor: pointer; }
.pbna-pick-row:hover td { background: #eef2ff; }
