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

/* ---- CSS Variables ---- */
:root {
	--brand:       #D4756B;
	--brand-light: #fdf0ee;
	--brand-dark:  #b05a51;
	--green:       #3a8c5a;
	--red:         #c83a3a;
	--yellow:      #c8941e;
	--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;
}

/* ---- 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;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}
.topbar-academy-img {
	height: 60px;
	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;
}
.topbar-plugin-version {
	font-size: 11px;
	color: var(--muted);
	font-weight: 500;
	letter-spacing: 0.3px;
	margin-top: 1px;
}

/* 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: var(--brand);
	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: 10px 14px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 15px;
	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-block;
	padding: 11px 24px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	text-decoration: none;
	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: 14px; right: 18px;
	background: none; border: none;
	font-size: 20px; cursor: pointer; color: var(--muted);
	width: 30px; height: 30px; 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; }
	.nav .nav-links { display: none; }
	.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; }
}

/* ── 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; }

	/* 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; }
}
