/* ============================================================
   BatterSuite — Main Stylesheet
   Version: 2.1.0
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
	--brand:       #1e3f8a;
	--brand-light: #e8effa;
	--brand-dark:  #152d6b;
	--green:       #3a8c5a;
	--red:         #c83a3a;
	--yellow:      #c8941e;
	--warning:     #d97706;
	--dark:        #1e1e2e;
	--mid:         #4a4a5a;
	--muted:       #8a8a9a;
	--border:      #e8e8f0;
	--bg:          #f9f9f9;
	--white:       #ffffff;
	--radius:      10px;
	--shadow:      0 2px 12px rgba(0,0,0,0.08);
	--font:        'Inter', 'Segoe UI', system-ui, sans-serif;
	/* Fluid typography */
	--fs-xs:   clamp(11px, 2vw, 13px);
	--fs-sm:   clamp(12px, 2.5vw, 14px);
	--fs-base: clamp(14px, 3vw, 16px);
	--fs-lg:   clamp(16px, 4vw, 20px);
	--fs-xl:   clamp(20px, 5vw, 26px);
	--fs-2xl:  clamp(24px, 6vw, 32px);
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--dark);
	line-height: 1.6;
}

/* ── STICKY HEADER WRAPPER (topbar + nav move together) ── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 300;
	box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

/* ---- TOP BAR (SP-Cakes style: logo+identity left, welcome card right) ---- */
.topbar {
	background: var(--white);
	border-bottom: 1px solid var(--border);
	padding: 14px 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Left brand block */
.topbar-brand {
	display: flex;
	align-items: center;
	gap: 18px;
}
.topbar-academy-logo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex-shrink: 0;
	text-decoration: none;
	gap: 0px;
}
.topbar-academy-img {
	height: 100px;
	width: auto;
	display: block;
}
.topbar-plugin-identity {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-left: 18px;
	border-left: 2px solid var(--border);
}
.topbar-plugin-name {
	font-size: 26px;
	font-weight: 900;
	color: var(--dark);
	letter-spacing: -0.5px;
	line-height: 1.1;
}
.topbar-plugin-desc {
	font-size: 14px;
	color: var(--mid);
	font-weight: 400;
	line-height: 1.3;
	padding-left: 68px;
	margin-top: -18px;
}
.topbar-plugin-version {
	font-size: 11px;
	color: var(--muted);
	font-weight: 500;
	letter-spacing: 0.3px;
	margin-top: 1px;
	padding-left: 68px;
}

/* Right: welcome card + logout */
.topbar-right {
	display: flex;
	align-items: center;
	gap: 14px;
}
.topbar-welcome-card {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	background: var(--brand-light);
	border: 1px solid rgba(212,117,107,0.25);
	border-radius: 10px;
	padding: 8px 16px;
	line-height: 1.3;
}
.topbar-hello {
	font-size: 12px;
	color: var(--muted);
	font-weight: 400;
}
.topbar-username {
	font-size: 16px;
	font-weight: 800;
	color: var(--brand-dark);
}
.topbar-logout {
	color: var(--muted);
	text-decoration: none;
	font-size: 13px;
	padding: 7px 14px;
	border: 1px solid var(--border);
	border-radius: 7px;
	transition: all 0.15s;
	white-space: nowrap;
}
.topbar-logout:hover {
	color: var(--brand);
	border-color: var(--brand);
	background: var(--brand-light);
}

/* ---- NAV (sits directly below topbar, both sticky via .site-header) ---- */
.nav {
	background: #4a8fc2;
	color: #1a1a1a;
	padding: 0 28px;
	display: flex;
	align-items: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav .nav-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}
.nav .nav-links a {
	color: rgba(0,0,0,0.82);
	text-decoration: none;
	font-size: 14px;
	padding: 13px 16px;
	display: block;
	transition: background 0.15s, color 0.15s;
	border-bottom: 3px solid transparent;
}
.nav .nav-links a:hover {
	color: #1a1a1a;
	background: rgba(0,0,0,0.1);
}
.nav .nav-links a.active {
	color: #1a1a1a;
	font-weight: 700;
	border-bottom-color: rgba(0,0,0,0.5);
	background: rgba(0,0,0,0.08);
}

/* ---- NAV DROPDOWNS ---- */
.nav-group {
	position: relative;
	display: inline-block;
}
.nav-group-btn {
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	color: rgba(0,0,0,0.82);
	font-size: 14px;
	font-family: var(--font);
	cursor: pointer;
	padding: 13px 16px;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: background 0.15s, color 0.15s;
}
.nav-group-btn:hover,
.nav-group-btn.active { color: #1a1a1a; background: rgba(0,0,0,0.1); }
.nav-group-btn.active { font-weight: 700; border-bottom-color: rgba(0,0,0,0.5); }
.nav-caret {
	font-size: 10px;
	display: inline-block;
	transition: transform 0.2s;
}
.nav-group.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: white;
	border: 1px solid var(--border);
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: 0 6px 20px rgba(0,0,0,0.12);
	min-width: 170px;
	z-index: 400;
	overflow: hidden;
}
.nav-group.open .nav-dropdown { display: block; }
.nav-dropdown a {
	display: block;
	color: var(--dark) !important;
	text-decoration: none;
	padding: 10px 16px;
	font-size: 14px;
	border-bottom: 1px solid var(--border);
	transition: background 0.12s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: var(--brand-light); color: var(--brand) !important; }
.nav-dropdown a.active { color: var(--brand) !important; font-weight: 700; background: var(--brand-light); }

/* ---- LAYOUT ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 32px 24px; }

/* ---- CARDS ---- */
.card {
	background: white;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
}
.card h2 { font-size: 20px; font-weight: 700; margin-bottom: 18px; color: var(--dark); }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--mid); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--mid);
	margin-bottom: 6px;
}
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=search],
input[type=url],
select,
textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 16px; /* 16px prevents iOS auto-zoom */
	min-height: 44px;
	color: var(--dark);
	background: white;
	font-family: var(--font);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
	outline: 2px solid var(--brand);
	border-color: var(--brand);
}
input[readonly] { background: #f5f5f8; cursor: default; }

/* ---- BUTTONS ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 24px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	text-decoration: none;
	min-height: 44px;
	transition: background 0.15s ease, transform 0.1s ease;
	font-family: var(--font);
}
.btn:active { transform: scale(0.98); }
.btn-primary  { background: var(--brand);  color: white; }
.btn-primary:hover  { background: var(--brand-dark); }
.btn-secondary { background: var(--bg); color: var(--mid); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger   { background: var(--red);   color: white; }
.btn-danger:hover   { background: #a02e2e; }
.btn-success  { background: var(--green); color: white; }
.btn-success:hover  { background: #2d7049; }
.btn-warning  { background: var(--yellow); color: white; }
.btn-outline  { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- ALERTS ---- */
.alert {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 18px;
	font-size: 14px;
}
.alert-error   { background: #fde0e0; color: var(--red);   border-left: 4px solid var(--red); }
.alert-success { background: #e6f4ec; color: var(--green); border-left: 4px solid var(--green); }
.alert-warning { background: #fef6e0; color: var(--yellow); border-left: 4px solid var(--yellow); }
.alert-info    { background: #f0eeff; color: #5046a8;      border-left: 4px solid #5046a8; }

/* ---- STAT CARDS ---- */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}
.stat-grid-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}
.stat-card {
	background: white;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	text-align: center;
	box-shadow: var(--shadow);
}
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--brand); }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---- TABLE ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
	background: var(--dark);
	color: white;
	padding: 11px 14px;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
}
th:first-child { border-radius: 6px 0 0 0; }
th:last-child  { border-radius: 0 6px 0 0; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--brand-light); }

/* ---- HERO ---- */
.hero {
	background: linear-gradient(135deg, #b39ddb, #7e57c2);
	color: white;
	border-radius: var(--radius);
	padding: 36px;
	margin-bottom: 28px;
	text-align: center;
}
.hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.hero p  { opacity: 0.9; font-size: 16px; }

/* ---- PAGE HEADER ---- */
.page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--border);
}
.page-header h1 {
	font-size: 24px;
	font-weight: 800;
	color: var(--dark);
}
.page-header p {
	font-size: 14px;
	color: var(--muted);
	margin-top: 2px;
}

/* ---- BADGE ---- */
.badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.badge-green  { background: #d4f0e0; color: var(--green); }
.badge-red    { background: #fde0e0; color: var(--red); }
.badge-yellow { background: #fef6e0; color: var(--yellow); }
.badge-brand  { background: var(--brand-light); color: var(--brand-dark); }
.badge-gray   { background: #eeeef5; color: var(--muted); }
.badge-purple { background: #f0eeff; color: #5046a8; }
.badge-blue   { background: #e6eeff; color: #2a5cbf; }

/* ---- PROGRESS BAR ---- */
.progress-wrap { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar  { background: var(--brand); height: 100%; border-radius: 20px; transition: width 0.3s ease; }
.progress-bar.green  { background: var(--green); }
.progress-bar.yellow { background: var(--yellow); }
.progress-bar.red    { background: var(--red); }

/* ---- TABS ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	border: none;
	background: none;
	cursor: pointer;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	border-radius: 6px 6px 0 0;
	transition: color 0.15s ease;
	font-family: var(--font);
}
.tab-btn:hover { color: var(--brand); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); background: var(--brand-light); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- MODAL ---- */
.modal-backdrop {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.45);
	display: flex; align-items: center; justify-content: center;
	z-index: 9999;
}
.modal-box {
	background: white;
	border-radius: var(--radius);
	padding: 32px;
	max-width: 580px;
	width: 92%;
	box-shadow: 0 8px 40px rgba(0,0,0,0.18);
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}
.modal-box h2 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}
.modal-close {
	position: absolute; top: 10px; right: 14px;
	background: none; border: none;
	font-size: 20px; cursor: pointer; color: var(--muted);
	width: 44px; height: 44px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s;
}
.modal-close:hover { background: var(--bg); }

/* ---- TOOLTIP ---- */
.tooltip-wrap { position: relative; display: inline-block; }
.tooltip-icon { color: var(--muted); font-size: 13px; cursor: help; }
.tooltip-text {
	visibility: hidden; opacity: 0;
	background: var(--dark); color: white;
	font-size: 12px; padding: 6px 10px;
	border-radius: 5px; white-space: nowrap;
	position: absolute; bottom: 125%; left: 50%;
	transform: translateX(-50%);
	transition: opacity 0.2s;
	z-index: 100;
	pointer-events: none;
}
.tooltip-wrap:hover .tooltip-text { visibility: visible; opacity: 1; }

/* ---- EMPTY STATE ---- */
.empty-state {
	text-align: center;
	padding: 56px 24px;
	color: var(--muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--mid); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; margin-bottom: 20px; }

/* ---- INGREDIENT ROW (calculator) ---- */
.ingredient-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr auto;
	gap: 12px;
	margin-bottom: 8px;
	align-items: end;
}

/* ---- TIER CARDS (cookie calculator) ---- */
.tier-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}
.tier-card {
	border: 2px solid var(--border);
	border-radius: var(--radius);
	padding: 18px;
	cursor: pointer;
	transition: all 0.15s;
	background: white;
}
.tier-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.tier-card.selected { border-color: var(--brand); background: var(--brand-light); }
.tier-card .tier-name { font-weight: 700; font-size: 15px; color: var(--dark); margin-bottom: 4px; }
.tier-card .tier-price { font-size: 20px; font-weight: 800; color: var(--brand); }
.tier-card .tier-min { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tier-card .tier-desc { font-size: 13px; color: var(--mid); margin-top: 6px; line-height: 1.4; }

.mode-btns { display: flex; gap: 10px; margin-bottom: 20px; }
.mode-btn {
	flex: 1; padding: 12px; border: 2px solid var(--border); border-radius: 8px;
	background: white; cursor: pointer; text-align: center; font-family: var(--font);
	transition: all 0.15s;
}
.mode-btn:hover { border-color: var(--brand); }
.mode-btn.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); font-weight: 700; }
.mode-btn .mode-label { font-size: 14px; font-weight: 600; }
.mode-btn .mode-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---- ADDON GROUPS (cookie calculator) ---- */
.addon-group { margin-bottom: 18px; }
.addon-group-title { font-size: 13px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.addon-item {
	display: flex; align-items: center; gap: 10px; padding: 8px 12px;
	border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px;
	cursor: pointer; transition: background 0.12s;
}
.addon-item:hover { background: var(--brand-light); }
.addon-item.selected { background: var(--brand-light); border-color: var(--brand); }
.addon-item label { flex: 1; cursor: pointer; font-size: 14px; font-weight: 500; margin: 0; }
.addon-item .addon-price { font-weight: 700; color: var(--brand); font-size: 13px; }

/* ---- PRICING SUMMARY BOX ---- */
.price-summary {
	background: var(--dark);
	color: white;
	border-radius: var(--radius);
	padding: 20px 24px;
}
.price-summary .summary-row {
	display: flex; justify-content: space-between; align-items: center;
	padding: 6px 0; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.price-summary .summary-row:last-child { border-bottom: none; }
.price-summary .summary-total {
	font-size: 22px; font-weight: 800; color: var(--brand-light);
	padding-top: 10px; margin-top: 4px;
}
.price-summary .summary-sub { font-size: 12px; opacity: 0.6; margin-top: 4px; }

/* ---- LOW STOCK INDICATOR ---- */
.stock-ok     { color: var(--green); font-weight: 700; }
.stock-low    { color: var(--yellow); font-weight: 700; }
.stock-out    { color: var(--red); font-weight: 700; }

/* ---- WORKFLOW PIPELINE ---- */
.pipeline {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	background: white;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.pipeline-step {
	flex: 1;
	padding: 14px 18px;
	text-align: center;
	border-right: 1px solid var(--border);
	position: relative;
	font-size: 13px;
}
.pipeline-step:last-child { border-right: none; }
.pipeline-step.active { background: var(--brand-light); }
.pipeline-step .step-label { font-weight: 700; color: var(--mid); }
.pipeline-step.active .step-label { color: var(--brand-dark); }
.pipeline-step .step-arrow {
	position: absolute; right: -10px; top: 50%;
	transform: translateY(-50%);
	color: var(--muted); font-size: 16px; z-index: 1;
}

/* ---- SUPPORT PAGE ---- */
.bp-support-section {
	border: 1px solid var(--border);
	border-radius: 8px;
	margin-bottom: 12px;
	background: #fff;
	overflow: hidden;
}
.bp-support-section + .bp-support-section {
	margin-top: 0;
}
.bp-support-summary {
	display: flex;
	align-items: center;
	padding: 14px 18px;
	font-size: 15px;
	font-weight: 600;
	color: var(--dark);
	cursor: pointer;
	list-style: none;
	user-select: none;
	background: #fafafa;
	transition: background 0.15s;
}
.bp-support-summary::-webkit-details-marker { display: none; }
.bp-support-summary::before {
	content: '▶';
	font-size: 11px;
	margin-right: 10px;
	color: var(--muted);
	transition: transform 0.2s;
	flex-shrink: 0;
}
.bp-support-section[open] > .bp-support-summary::before {
	transform: rotate(90deg);
}
.bp-support-summary:hover {
	background: var(--brand-light);
}
.bp-support-body {
	padding: 18px 22px 20px 22px;
	border-top: 1px solid var(--border);
	color: var(--mid);
	line-height: 1.65;
}
.bp-support-body p { margin: 0 0 10px; }
.bp-support-body p:last-child { margin-bottom: 0; }
.bp-support-body h4 {
	margin: 16px 0 6px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dark);
}
.bp-support-body ul,
.bp-support-body ol {
	margin: 0 0 10px 20px;
	padding: 0;
}
.bp-support-body li { margin-bottom: 4px; }

.bp-resource-section {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 22px 24px 20px;
	margin-bottom: 18px;
}
.bp-resource-section h2 {
	margin: 0 0 10px;
	font-size: 17px;
	color: var(--dark);
	border-bottom: 2px solid var(--brand-light);
	padding-bottom: 8px;
}
.bp-resource-section h3 {
	margin: 16px 0 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--dark);
}
.bp-resource-section p {
	margin: 0 0 10px;
	color: var(--mid);
	line-height: 1.65;
}
.bp-resource-section p:last-child { margin-bottom: 0; }
.bp-resource-section ul,
.bp-resource-section ol {
	margin: 0 0 10px 20px;
	padding: 0;
	color: var(--mid);
	line-height: 1.65;
}
.bp-resource-section li { margin-bottom: 4px; }
.bp-resource-section a { color: var(--brand); }
.bp-resource-section a:hover { text-decoration: underline; }

/* ---- FOOTER ---- */
.footer-menu {
	background: #f5f5f8;
	border-top: 1px solid var(--border);
	padding: 12px 24px;
	display: flex;
	gap: 24px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 48px;
}
.footer-menu a {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--muted);
	text-decoration: none;
	font-size: 13px;
	transition: color 0.15s;
}
.footer-menu a:hover { color: var(--brand); }
.footer-bottom {
	background: #ececf2;
	text-align: center;
	padding: 9px 24px;
	font-size: 12px;
	color: var(--muted);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); text-decoration: underline; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
	.stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
	.tier-cards  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.stat-grid   { grid-template-columns: 1fr; }
	.stat-grid-4 { grid-template-columns: 1fr; }
	.ingredient-row { grid-template-columns: 1fr 1fr; }
	.container { padding: 20px 16px; }
	.tier-cards { grid-template-columns: 1fr; }
	.mode-btns  { flex-direction: column; }
	.footer-menu { gap: 14px; }
	.topbar-right .logout-link { display: none; }
	.tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
	.tab-btn { flex-shrink: 0; }
}

/* ── CALCULATOR ──────────────────────────────────────────────────────────── */
.calc-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}
.calc-panel {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
}
.calc-section { margin-bottom: 24px; }
.calc-section:last-child { margin-bottom: 0; }
.calc-section-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--mid);
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
}
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Result card */
.calc-result-card {
	text-align: center;
	padding: 24px 16px;
	background: var(--brand-light);
	border-radius: var(--radius);
	border: 1px solid var(--brand);
	margin-bottom: 20px;
}
.calc-result-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mid); margin-bottom: 6px; }
.calc-result-price { font-size: 42px; font-weight: 700; color: var(--brand); line-height: 1; }
.calc-result-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Breakdown table */
.calc-breakdown-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.calc-breakdown-table th {
	text-align: left; font-size: 12px; text-transform: uppercase;
	letter-spacing: .05em; color: var(--mid); padding: 6px 0;
	border-bottom: 1px solid var(--border);
}
.calc-breakdown-table td { padding: 5px 0; }
.calc-breakdown-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bd-sub td { color: var(--muted); font-size: 13px; }
.bd-total td { font-weight: 700; border-top: 1px solid var(--border); padding-top: 8px; }

/* EHR */
.calc-ehr-panel {
	display: flex; justify-content: space-between; align-items: center;
	background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
	padding: 10px 14px; margin-bottom: 16px; font-size: 14px;
}
.calc-ehr-label { color: #15803d; font-weight: 600; }
.calc-ehr-value { color: #15803d; font-weight: 700; font-size: 16px; }

/* Break-even */
.calc-breakeven {
	background: var(--bg); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 16px;
}
.calc-breakeven h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mid); }
.calc-be-result { font-size: 13px; color: var(--dark); margin-top: 10px; }

@media (max-width: 768px) {
	.calc-layout { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   COOKIE QUOTE BUILDER
   ══════════════════════════════════════════════════════════════ */

/* Section divider */
.bp-section-divider {
	display: flex; align-items: center; margin: 32px 0 20px;
	gap: 12px;
}
.bp-section-divider::before,
.bp-section-divider::after {
	content: ''; flex: 1; height: 1px; background: var(--border);
}
.bp-section-divider span {
	font-size: 11px; font-weight: 700; text-transform: uppercase;
	letter-spacing: .1em; color: var(--muted); white-space: nowrap;
}

/* Layout */
.cqb-layout {
	display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start;
}

/* Mode tabs */
.cqb-mode-tabs {
	display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap;
}
.cqb-mode-btn {
	padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px;
	background: #fff; color: var(--mid); font-size: 13px; font-weight: 600;
	cursor: pointer; transition: all .15s;
}
.cqb-mode-btn:hover { border-color: var(--brand); color: var(--brand); }
.cqb-mode-btn.active {
	background: var(--brand); border-color: var(--brand); color: #fff;
}

/* Tier cards */
.cqb-tier-cards {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px; margin-top: 8px;
}
.cqb-tier-card {
	border: 2px solid var(--border); border-radius: var(--radius);
	padding: 12px 14px; cursor: pointer; transition: all .15s;
	background: #fff;
}
.cqb-tier-card:hover { border-color: var(--brand); background: var(--brand-light); }
.cqb-tier-card.selected {
	border-color: var(--brand); background: var(--brand-light);
	box-shadow: 0 0 0 3px rgba(212,117,107,.15);
}
.cqb-tier-card-name  { font-weight: 700; font-size: 13px; color: var(--dark); margin-bottom: 4px; }
.cqb-tier-card-price { font-size: 20px; font-weight: 700; color: var(--brand); }
.cqb-tier-card-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.cqb-tier-card-desc  { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.cqb-tier-card-min   { font-size: 11px; color: var(--muted); margin-top: 6px; }
.cqb-no-tiers        { font-size: 13px; color: var(--muted); grid-column: 1/-1; }

/* Addons */
.cqb-addons-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.cqb-addon-group-title {
	font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
	color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.cqb-addon-item {
	display: flex; align-items: center; gap: 8px;
	padding: 6px 8px; border-radius: var(--radius); cursor: pointer; font-size: 13px;
	transition: background .1s;
}
.cqb-addon-item:hover { background: var(--brand-light); }
.cqb-addon-item input[type=checkbox] { margin: 0; accent-color: var(--brand); }
.cqb-addon-item span { flex: 1; color: var(--dark); }
.cqb-addon-item em   { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 768px) {
	.cqb-layout { grid-template-columns: 1fr; }
	.cqb-tier-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ══════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet / narrow desktop (≤ 960px) ─────────────────────── */
@media (max-width: 960px) {

	/* Shrink nav dropdowns */
	.nav-group:hover .nav-dropdown { min-width: 160px; font-size: 13px; }

	/* Dashboard stats */
	.stat-grid, .stat-grid-3 { grid-template-columns: repeat(2, 1fr); }

	/* Reports two-col panels */
	.reports-grid,
	.reports-two-col { grid-template-columns: 1fr; }

	/* Form two-col rows to single col */
	.form-row-3col { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile (≤ 768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

	/* Layout wrapper */
	.container { padding: 16px 12px; }

	/* Topbar */
	.topbar { padding: 8px 14px; }
	.topbar-logo { font-size: 17px; }
	.topbar-right { font-size: 13px; gap: 10px; }
	.topbar-academy-img { height: 60px; }
	.topbar-plugin-name { font-size: 18px; }
	.topbar-plugin-desc,
	.topbar-plugin-version { display: none; }

	/* Nav: collapse to hamburger-style stacked links */
	.nav { padding: 0 14px; }
	.nav-links { flex-wrap: wrap; gap: 0; }
	.nav-links > .nav-group,
	.nav-links > a { flex: 0 0 auto; }
	.nav-group:hover .nav-dropdown { position: static; box-shadow: none; border-radius: 0; border: none; padding: 0 0 0 12px; background: transparent; }
	.nav-dropdown a { color: var(--dark); font-size: 12px; }

	/* Page header */
	.bp-page-header h1 { font-size: 22px; }
	.bp-page-header { margin-bottom: 20px; }

	/* Tables — horizontal scroll */
	.bp-table-wrap,
	table.bp-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

	/* Action bars */
	.bp-action-bar { flex-direction: column; align-items: stretch; gap: 10px; }
	.bp-action-bar .button,
	.bp-action-bar input[type=text],
	.bp-action-bar select { width: 100%; }

	/* Cards / panels */
	.bp-card-grid { grid-template-columns: 1fr; }

	/* Forms */
	.form-row-2col,
	.form-row-3col { grid-template-columns: 1fr; }

	/* Modal dialogs */
	.bp-modal-content {
		width: 95vw !important;
		max-width: 95vw !important;
		padding: 20px 16px;
		margin: 20px auto;
	}

	/* Stat cards */
	.stat-grid,
	.stat-grid-3,
	.stat-grid-4 { grid-template-columns: 1fr; }
	.stat-card { padding: 16px; }

	/* Dashboard quick links */
	.quick-links-grid { grid-template-columns: repeat(2, 1fr); }

	/* Overhead dashboard */
	.overhead-summary-grid { grid-template-columns: 1fr; }

	/* Reports */
	.report-stat-row { flex-direction: column; gap: 12px; }

	/* Calendar */
	.bp-calendar-grid th,
	.bp-calendar-grid td { font-size: 11px; padding: 4px 2px; }

	/* Footer */
	.footer-menu { flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 14px 16px; }
}

/* ── Small mobile (≤ 480px) ────────────────────────────────── */
@media (max-width: 480px) {

	/* Nav — hide group labels, keep icons/text minimal */
	.nav-links a,
	.nav-group > a { font-size: 12px; padding: 10px 8px; }

	/* Topbar — hide welcome text, keep only logo + logout */
	.topbar-right .welcome-text { display: none; }

	/* Page titles */
	.bp-page-header h1 { font-size: 18px; }

	/* Buttons */
	.button, button.button-primary { font-size: 13px; padding: 7px 14px; }

	/* Calculator */
	.calc-layout,
	.cqb-layout { grid-template-columns: 1fr; }
	.calc-result-price { font-size: 32px; }

	/* Tier cards in cookie builder */
	.cqb-tier-cards { grid-template-columns: repeat(2, 1fr); }

	/* Tables — key columns only on very small screens */
	.bp-table-wrap { font-size: 12px; }

	/* Modals full screen */
	.bp-modal-content {
		width: 100vw !important;
		max-width: 100vw !important;
		min-height: 100vh;
		margin: 0;
		border-radius: 0;
		padding: 16px;
	}
	.bp-modal-overlay { padding: 0; align-items: flex-start; }

	/* Quick links — single col */
	.quick-links-grid { grid-template-columns: 1fr; }

	/* Settings tabs */
	.bp-settings-tabs { flex-direction: column; }
	.bp-settings-tab  { border-radius: var(--radius); border-bottom: 1px solid var(--border) !important; }
}

/* ── Print styles ──────────────────────────────────────────── */
@media print {
	.nav, .topbar, .footer-menu, .footer-bottom,
	.bp-action-bar, .bp-modal-overlay,
	.button, button { display: none !important; }
	.container { padding: 0; }
	body { background: #fff; font-size: 12pt; }
	.bp-page-header h1 { font-size: 18pt; }
	table { page-break-inside: avoid; }
}

/* ── Topbar user avatar dropdown ───────────────────────────── */
.topbar-user-btn {
	display: flex; align-items: center; gap: 8px;
	background: none; border: none; cursor: pointer; color: inherit; padding: 6px 10px; border-radius: 8px;
}
.topbar-user-btn:hover { background: rgba(255,255,255,0.08); }
.topbar-user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.topbar-user-initials { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-howdy { font-size: 13px; }
.topbar-caret { font-size: 10px; transition: transform 0.18s; }
.topbar-user-btn[aria-expanded="true"] .topbar-caret { transform: rotate(180deg); }
.topbar-user-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; background: #1d2327; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.28); z-index: 9999; overflow: hidden; }
.topbar-user-dropdown.open { display: block; }
.topbar-dropdown-header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; }
.topbar-dropdown-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.15); }
.topbar-dropdown-initials { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-dropdown-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-dropdown-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-dropdown-email { font-size: 12px; color: #9ba4af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-dropdown-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0; }
.topbar-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: #c3c4c7; text-decoration: none; font-size: 13px; transition: background 0.12s, color 0.12s; }
.topbar-dropdown-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.topbar-dropdown-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.topbar-dropdown-logout { color: #f87171; }
.topbar-dropdown-logout:hover { background: rgba(248,113,113,0.12); color: #fca5a5; }

/* ── Dark Mode ─────────────────────────────────────────────── */
body.bp-dark {
	--bg:          #0f1117;
	--white:       #1a1d27;
	--dark:        #e8e9f0;
	--mid:         #b0b3c0;
	--muted:       #7a7d8a;
	--border:      #2a2d3a;
	--shadow:      0 2px 12px rgba(0,0,0,0.4);
	--brand-light: #1f2133;
}

body.bp-dark body { background: var(--bg); color: var(--dark); }

/* Cards, panels, inputs */
body.bp-dark .card,
body.bp-dark .bp-card { background: var(--white); border-color: var(--border); }

body.bp-dark input,
body.bp-dark select,
body.bp-dark textarea {
	background: #1a1d27 !important;
	color: #e8e9f0 !important;
	border-color: #2a2d3a !important;
}
body.bp-dark input[disabled],
body.bp-dark input[readonly] {
	background: #12151f !important;
	color: #6b7280 !important;
}
body.bp-dark input::placeholder,
body.bp-dark textarea::placeholder { color: #6b7280 !important; }
/* Override Chrome autofill background */
body.bp-dark input:-webkit-autofill,
body.bp-dark input:-webkit-autofill:hover,
body.bp-dark input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #1a1d27 inset !important;
	-webkit-text-fill-color: #e8e9f0 !important;
	caret-color: #e8e9f0;
}

/* Tables */
body.bp-dark table { background: transparent; }
body.bp-dark th { background: #1a1d27; color: var(--mid); border-color: var(--border); }
body.bp-dark td { border-color: var(--border); }
body.bp-dark tr:hover td { background: #1e2130; }

/* Nav bar */
body.bp-dark .nav { background: #12151f; border-color: var(--border); }
body.bp-dark .nav-link,
body.bp-dark .nav .nav-links a,
body.bp-dark .nav-group-btn { color: #c3c4c7 !important; }
body.bp-dark .nav-link:hover,
body.bp-dark .nav-link.active,
body.bp-dark .nav .nav-links a:hover,
body.bp-dark .nav .nav-links a.active,
body.bp-dark .nav-group-btn:hover,
body.bp-dark .nav-group-btn.active { color: #ffffff !important; background: #1e2130; }
body.bp-dark .nav-dropdown { background: #1a1d27; border-color: var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
body.bp-dark .nav-dropdown a { color: #c3c4c7; border-color: var(--border); }
body.bp-dark .nav-dropdown a:hover { background: #1e2130; color: #ffffff !important; }
body.bp-dark .nav-dropdown a.active { background: #1e2130; color: var(--brand) !important; }

/* Topbar */
body.bp-dark .topbar { background: #0c0e16; border-color: var(--border); }

/* Alerts / notices */
body.bp-dark .alert-error { background: #2a1010; border-color: #7f1d1d; color: #fca5a5; }

/* Badges */
body.bp-dark .badge { background: #1e2130; color: var(--mid); }

/* Empty states */
body.bp-dark .empty-state { background: var(--white); }

/* Action bar */
body.bp-dark .bp-action-bar { background: #12151f; border-color: var(--border); }

/* Main content area */
body.bp-dark .main-content { background: var(--bg); }
body.bp-dark .container { background: transparent; }

/* ═══════════════════════════════════════════════════════════════════════
   Form Builder — bp_fb_* pages
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────────────── */
.bp-fb-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 20px;
	align-items: flex-start;
}
@media (max-width: 820px) {
	.bp-fb-layout { grid-template-columns: 1fr; }
}

/* ── Sidebar (palette + form meta) ─────────────────────────────────── */
.bp-fb-sidebar { display: flex; flex-direction: column; gap: 16px; }

.bp-fb-palette {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 14px;
}
.bp-fb-palette h4 {
	margin: 0 0 10px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--mid);
	font-weight: 700;
}
.bp-fb-palette-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
.bp-fb-add-field {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 7px;
	padding: 7px 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--dark);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: background .12s, border-color .12s;
	width: 100%;
	text-align: left;
}
.bp-fb-add-field:hover {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}
.bp-fb-add-field .bp-fb-icon { font-size: 14px; line-height: 1; }

/* ── Canvas ──────────────────────────────────────────────────────────── */
.bp-fb-canvas-wrap {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 16px;
	min-height: 320px;
}
.bp-fb-canvas-wrap h4 {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--dark);
}
.bp-fb-canvas {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 200px;
}
.bp-fb-empty-canvas {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	color: var(--mid);
	font-size: 13px;
	border: 2px dashed var(--border);
	border-radius: 8px;
}

/* ── Field row ──────────────────────────────────────────────────────── */
.bp-fb-field-row {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 9px 10px;
	cursor: default;
	transition: box-shadow .12s, border-color .12s;
	position: relative;
}
.bp-fb-field-row:hover { border-color: var(--brand); }
.bp-fb-field-row.bp-fb-dragging {
	opacity: .5;
	box-shadow: 0 4px 18px rgba(0,0,0,.15);
}
.bp-fb-field-row.bp-fb-drag-over { border-color: var(--brand); background: #fdf0ee; }

.bp-fb-drag-handle {
	cursor: grab;
	color: var(--mid);
	font-size: 16px;
	line-height: 1;
	padding: 2px 4px;
	flex-shrink: 0;
}
.bp-fb-drag-handle:active { cursor: grabbing; }

.bp-fb-field-info { flex: 1; min-width: 0; }
.bp-fb-field-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bp-fb-field-meta {
	font-size: 11px;
	color: var(--mid);
	margin-top: 1px;
}
.bp-fb-field-badge {
	font-size: 11px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 1px 6px;
	color: var(--mid);
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
}
.bp-fb-field-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}
.bp-fb-field-btn {
	background: none;
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 3px 8px;
	font-size: 12px;
	cursor: pointer;
	color: var(--mid);
	transition: background .12s, color .12s, border-color .12s;
}
.bp-fb-field-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.bp-fb-field-btn.bp-fb-del:hover { background: #dc2626; border-color: #dc2626; }

/* ── Field Settings Modal ───────────────────────────────────────────── */
.bp-fb-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0,0,0,.5);
	display: flex;
	align-items: center;
	justify-content: center;
}
.bp-fb-modal {
	background: #fff;
	border-radius: 12px;
	width: min(540px, 96vw);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 48px rgba(0,0,0,.25);
	overflow: hidden;
}
.bp-fb-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}
.bp-fb-modal-header strong { font-size: 15px; }
.bp-fb-modal-close {
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: var(--mid);
	line-height: 1;
	padding: 0 4px;
}
.bp-fb-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.bp-fb-modal-footer {
	padding: 12px 18px;
	border-top: 1px solid var(--border);
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-shrink: 0;
}

/* required toggle */
.bp-fb-toggle-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.bp-fb-toggle-row label { font-size: 13px; font-weight: 600; }
.bp-fb-switch {
	position: relative;
	display: inline-block;
	width: 38px;
	height: 22px;
	flex-shrink: 0;
}
.bp-fb-switch input { opacity: 0; width: 0; height: 0; }
.bp-fb-slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 22px;
	cursor: pointer;
	transition: background .2s;
}
.bp-fb-slider:before {
	content: '';
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
}
.bp-fb-switch input:checked + .bp-fb-slider { background: var(--brand); }
.bp-fb-switch input:checked + .bp-fb-slider:before { transform: translateX(16px); }

/* choices list inside modal */
.bp-fb-choices-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 6px;
}
.bp-fb-choice-row {
	display: flex;
	align-items: center;
	gap: 6px;
}
.bp-fb-choice-row input[type="text"] { flex: 1; }
.bp-fb-choice-del {
	background: none;
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 3px 7px;
	cursor: pointer;
	font-size: 13px;
	color: var(--mid);
	transition: background .12s;
}
.bp-fb-choice-del:hover { background: #fee2e2; border-color: #dc2626; color: #dc2626; }

/* ── Shortcode chip ─────────────────────────────────────────────────── */
.bp-fb-shortcode {
	font-family: monospace;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 2px 8px;
	font-size: 12px;
	color: var(--mid);
	cursor: pointer;
	user-select: all;
}

/* ── Entry list table tweaks ────────────────────────────────────────── */
.bp-entry-unread .bp-entry-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--brand);
	margin-right: 5px;
}

/* ── Dark mode overrides ────────────────────────────────────────────── */
body.bp-dark .bp-fb-palette,
body.bp-dark .bp-fb-canvas-wrap { background: var(--white); border-color: var(--border); }
body.bp-dark .bp-fb-add-field { background: #1e2130; border-color: var(--border); color: var(--dark); }
body.bp-dark .bp-fb-add-field:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
body.bp-dark .bp-fb-field-row { background: #1e2130; border-color: var(--border); }
body.bp-dark .bp-fb-field-row.bp-fb-drag-over { background: #2a1e28; }
body.bp-dark .bp-fb-modal { background: #1a1d27; }
body.bp-dark .bp-fb-modal-header,
body.bp-dark .bp-fb-modal-footer { border-color: var(--border); }


/* ── Login page — 50/50 split-screen ───────────────────────────────── */
.bp-login-page {
	display: flex;
	width: 100%;
	min-height: 100vh;
	background: #fff;
}

/* ── Left panel (form) */
.bp-login-panel {
	flex: 1 1 50%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 20px 32px;
	background: #fff;
	box-sizing: border-box;
}

.bp-login-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}
.bp-login-brand-logo {
	height: 100px;
	width: auto;
	display: block;
}

.bp-login-title {
	font-size: 32px;
	font-weight: 800;
	color: #111;
	margin: 0 0 8px;
	line-height: 1.15;
}
.bp-login-subtitle {
	font-size: 15px;
	color: #6b7280;
	margin: 0 0 32px;
}

.bp-login-notice {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 16px;
}
.bp-login-notice--warn {
	background: #fef3c7;
	border: 1px solid #fcd34d;
	color: #92400e;
}
.bp-login-notice--error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}
.bp-login-notice--success {
	background: #d1fae5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

/* Inner content wrapper inside the left panel */
.bp-login-inner {
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
}

.bp-login-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.bp-login-field { display: flex; flex-direction: column; gap: 7px; }
.bp-login-label { font-size: 14px; font-weight: 700; color: #111; }

.bp-login-input {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid #d1d5db;
	border-radius: 10px;
	font-size: 15px;
	color: #111;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
.bp-login-input::placeholder { color: #9ca3af; }
.bp-login-input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.bp-login-pass-wrap { position: relative; }
.bp-login-pass-wrap .bp-login-input { padding-right: 48px; }
.bp-login-eye {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 18px;
	padding: 4px;
	line-height: 1;
	color: #6b7280;
}
.bp-login-eye:hover { color: var(--brand); }

.bp-login-row { display: flex; align-items: center; }
.bp-login-row--between { justify-content: space-between; }

.bp-login-check-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #111;
	cursor: pointer;
	font-weight: normal;
}
.bp-login-check {
	width: 16px;
	height: 16px;
	accent-color: var(--brand);
	cursor: pointer;
	flex-shrink: 0;
}

.bp-login-link { font-size: 14px; color: var(--brand); text-decoration: none; font-weight: 500; }
.bp-login-link:hover { text-decoration: underline; }
.bp-login-link--muted { color: #6b7280; font-weight: normal; }
.bp-login-link--muted:hover { color: var(--brand); text-decoration: underline; }

.bp-login-btn {
	width: 100%;
	max-width: 400px;
	padding: 14px;
	background: var(--brand);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, transform .1s;
	letter-spacing: .3px;
	margin-top: 4px;
}
.bp-login-btn:hover { background: var(--brand-dark, #5a3073); transform: translateY(-1px); }
.bp-login-btn:active { transform: translateY(0); }

.bp-login-footer-text {
	margin-top: 28px;
	font-size: 14px;
	color: #6b7280;
	max-width: 400px;
}

/* ── Right panel (decorative) */
.bp-login-art {
	flex: 1 1 50%;
	background:
		linear-gradient(135deg, rgba(30,63,138,.55) 0%, rgba(21,45,107,.65) 100%),
		url('https://battersuite.com/wp-content/uploads/2026/03/Screenshot-2026-03-03-at-5.04.52-PM.png') top center / cover no-repeat;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 60px 64px;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
}
.bp-login-art::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 65% 55% at 75% 25%, rgba(255,255,255,.12) 0%, transparent 70%),
		radial-gradient(ellipse 45% 45% at 25% 80%, rgba(255,255,255,.08) 0%, transparent 70%);
}
.bp-login-art-inner {
	position: relative;
	z-index: 1;
	color: #fff;
	max-width: 440px;
}
.bp-login-art-headline {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
}
.bp-login-art-icon { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.bp-login-art-headline > span:last-child {
	font-size: 38px;
	font-weight: 800;
	letter-spacing: -.5px;
	text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.bp-login-art-tagline {
	font-size: 17px;
	line-height: 1.65;
	opacity: .9;
	margin: 0 0 36px;
}
.bp-login-art-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bp-login-art-pill {
	background: rgba(255,255,255,.18);
	border: 1px solid rgba(255,255,255,.3);
	color: #fff;
	padding: 7px 16px;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 500;
	backdrop-filter: blur(4px);
}

/* ── Responsive: stack on narrow screens */
@media (max-width: 860px) {
	.bp-login-page { flex-direction: column; }
	.bp-login-art {
		order: -1;
		padding: 40px 32px 32px;
		min-height: 240px;
		align-items: flex-end;
	}
	.bp-login-art-icon { font-size: 36px; }
	.bp-login-art-headline > span:last-child { font-size: 26px; }
	.bp-login-art-tagline { font-size: 14px; margin-bottom: 16px; }
	.bp-login-art-pill { font-size: 11px; padding: 5px 12px; }
	.bp-login-panel { padding: 32px 24px 52px; }
	.bp-login-form,
	.bp-login-btn,
	.bp-login-footer-text { max-width: 100%; }
}
body.bp-dark .bp-fb-field-badge { background: #1e2130; border-color: var(--border); }

/* ══════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS v1.0
   Touch targets, hamburger nav, iOS fixes
   ══════════════════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	margin-left: auto;
	width: 44px;
	height: 44px;
	border-radius: 6px;
	flex-shrink: 0;
	transition: background 0.15s;
}
.nav-hamburger:hover { background: rgba(0,0,0,0.1); }
.nav-hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: rgba(0,0,0,0.75);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}
/* X animation when open */
.nav.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ── */
@media (max-width: 768px) {

	/* Show hamburger, hide nav links by default */
	.nav {
		flex-wrap: wrap;
		padding: 0 14px;
		position: relative;
	}
	.nav-hamburger { display: flex; }

	.nav .nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		padding: 8px 0 12px;
		border-top: 1px solid rgba(0,0,0,0.12);
		gap: 0;
	}
	.nav.nav-open .nav-links { display: flex; }

	/* Direct links */
	.nav-links > a {
		padding: 12px 8px;
		font-size: 14px;
		border-bottom: 1px solid rgba(0,0,0,0.08);
		border-bottom-width: 1px;
	}
	.nav-links > a:last-child { border-bottom: none; }

	/* Nav groups */
	.nav-group {
		width: 100%;
		display: block;
	}
	.nav-group-btn {
		width: 100%;
		padding: 12px 8px;
		font-size: 14px;
		border-bottom: 1px solid rgba(0,0,0,0.08);
		justify-content: space-between;
		min-height: 44px;
	}

	/* Dropdowns become inline accordions */
	.nav-dropdown {
		position: static;
		display: none;
		box-shadow: none;
		border: none;
		border-radius: 0;
		background: rgba(0,0,0,0.04);
		min-width: 0;
	}
	.nav-group.open .nav-dropdown { display: block; }
	.nav-dropdown a {
		padding: 11px 24px;
		font-size: 14px;
		border-bottom: 1px solid rgba(0,0,0,0.06);
		min-height: 44px;
		display: flex;
		align-items: center;
	}
	.nav-dropdown a:last-child { border-bottom: none; }
}

/* ── Small mobile touch target fixes ── */
@media (max-width: 480px) {

	/* Ensure all interactive elements meet 44px minimum */
	.btn-sm { min-height: 40px; padding: 9px 14px; }
	.btn-xs { min-height: 36px; padding: 6px 10px; }

	/* Checkbox/radio — larger tap area via wrapper */
	.form-check {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 44px;
		padding: 4px 0;
		cursor: pointer;
	}
	input[type="checkbox"],
	input[type="radio"] {
		width: 20px;
		height: 20px;
		accent-color: var(--brand);
		cursor: pointer;
		flex-shrink: 0;
	}

	/* Page header stacks on very small screens */
	.page-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.page-header .btn { width: 100%; }

	/* Topbar: hide description, shrink logo further */
	.topbar-academy-img { height: 48px; }
	.topbar-plugin-identity { padding-left: 10px; }
	.topbar-welcome-card { display: none; }

	/* Modal: full screen */
	.modal-box {
		width: 100vw !important;
		max-width: 100vw !important;
		min-height: 100dvh;
		margin: 0;
		border-radius: 0;
		padding: 20px 16px;
	}
	.modal-backdrop { align-items: flex-start; }
}

/* ── Safe area insets (iPhone notch / home indicator) ── */
@supports (padding: env(safe-area-inset-bottom)) {
	.footer-bottom {
		padding-bottom: calc(9px + env(safe-area-inset-bottom));
	}
	.modal-box {
		padding-bottom: calc(32px + env(safe-area-inset-bottom));
	}
}
