/* Hitung Biaya Admin Core - Frontend Calculators Styles */
.hba-wrap {
	--hba-bg: #f8fafc;
	--hba-surface: #ffffff;
	--hba-border: #e2e8f0;
	--hba-border-strong: #cbd5e1;
	--hba-ink: #0f172a;
	--hba-muted: #475569;
	--hba-subtle: #64748b;
	--hba-accent: #0f6b4f;
	--hba-accent-soft: #ecfdf5;
	--hba-shopee: #ee4d2d;
	--hba-shopee-soft: #fff5f2;
	--hba-tiktok: #111827;
	--hba-tiktok-accent: #fe2c55;
	--hba-tokopedia: #03ac0e;
	--hba-tokopedia-soft: #f0fdf4;
	--hba-danger: #dc2626;
	--hba-danger-soft: #fef2f2;
	--hba-warn: #d97706;
	--hba-cost: #3b82f6;
	--hba-fee: #f59e0b;
	--hba-profit: #10b981;
	--hba-radius: 12px;
	--hba-radius-sm: 8px;
	--hba-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);

	box-sizing: border-box;
	container-type: inline-size;
	font-family: inherit;
	color: var(--hba-ink);
	background: var(--hba-bg);
	border: 1px solid var(--hba-border);
	border-radius: 16px;
	padding: 20px;
	margin: 24px auto;
	max-width: 1100px;
	line-height: 1.5;
	font-size: 15px;
}

.hba-wrap *,
.hba-wrap *::before,
.hba-wrap *::after {
	box-sizing: border-box;
}

.hba-wrap [hidden] {
	display: none !important;
}

/* Header */
.hba-header {
	margin-bottom: 20px;
}

.hba-header-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.hba-brand-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: var(--hba-accent-soft);
	color: var(--hba-accent);
}

.hba-brand-pill--shopee {
	background: var(--hba-shopee-soft);
	color: var(--hba-shopee);
}

.hba-brand-pill--roas {
	background: #eff6ff;
	color: #1d4ed8;
}

.hba-brand-pill--compare {
	background: #f1f5f9;
	color: #0f172a;
}

.hba-rule-badge {
	font-size: 12px;
	font-weight: 600;
	color: var(--hba-muted);
	background: var(--hba-surface);
	border: 1px solid var(--hba-border);
	padding: 4px 10px;
	border-radius: 999px;
}

.hba-title {
	margin: 0 0 6px;
	font-size: clamp(1.25rem, 2.4vw, 1.65rem);
	font-weight: 700;
	line-height: 1.25;
	color: var(--hba-ink);
}

.hba-subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--hba-muted);
}

/* Platform Switcher (TikTok / Tokopedia) */
.hba-platform-switcher {
	display: inline-flex;
	background: var(--hba-surface);
	border: 1px solid var(--hba-border);
	border-radius: 999px;
	padding: 3px;
	gap: 4px;
}

.hba-plat-btn {
	border: 0;
	background: transparent;
	color: var(--hba-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.hba-plat-btn.is-active[data-platform-btn="tiktok"] {
	background: var(--hba-tiktok);
	color: #ffffff;
}

.hba-plat-btn.is-active[data-platform-btn="tokopedia"] {
	background: var(--hba-tokopedia);
	color: #ffffff;
}

/* Tabs */
.hba-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin-top: 16px;
	padding: 4px;
	background: #e2e8f0;
	border-radius: 10px;
}

.hba-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--hba-muted);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	text-align: center;
}

.hba-tab.is-active {
	background: var(--hba-surface);
	color: var(--hba-ink);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.hba-theme-shopee .hba-tab.is-active {
	color: var(--hba-shopee);
}

.hba-theme-tokopedia .hba-tab.is-active {
	color: var(--hba-tokopedia);
}

/* Main Grid */
.hba-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: start;
}

@container (min-width: 780px) {
	.hba-grid {
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	}
	.hba-panel--results {
		position: sticky;
		top: 24px;
	}
}

@media (min-width: 960px) {
	.hba-grid {
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	}
}

/* Cards */
.hba-card,
.hba-result-card {
	background: var(--hba-surface);
	border: 1px solid var(--hba-border);
	border-radius: var(--hba-radius);
	padding: 18px;
	box-shadow: var(--hba-shadow);
}

.hba-panel--inputs {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.hba-card-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--hba-ink);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--hba-border);
}

/* Fields */
.hba-field {
	margin-bottom: 12px;
}

.hba-field:last-child {
	margin-bottom: 0;
}

.hba-row-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

.hba-row-2:last-child {
	margin-bottom: 0;
}

.hba-row-4 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@container (min-width: 460px) {
	.hba-row-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.hba-row-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (min-width: 760px) {
	.hba-row-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.hba-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hba-ink);
	margin-bottom: 6px;
}

.hba-hint {
	display: block;
	font-size: 12px;
	color: var(--hba-subtle);
	margin-top: 4px;
}

.hba-input-group {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--hba-border-strong);
	border-radius: var(--hba-radius-sm);
	background: var(--hba-surface);
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hba-input-group:focus-within {
	border-color: var(--hba-accent);
	box-shadow: 0 0 0 3px rgba(15, 107, 79, 0.12);
}

.hba-theme-shopee .hba-input-group:focus-within,
.hba-theme-shopee .hba-select:focus {
	border-color: var(--hba-shopee);
	box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.12);
}

.hba-addon {
	display: inline-flex;
	align-items: center;
	padding: 0 11px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hba-muted);
	background: #f1f5f9;
	border-color: var(--hba-border);
	user-select: none;
}

.hba-input-group--prefix .hba-addon {
	border-right: 1px solid var(--hba-border);
}

.hba-input-group--suffix .hba-addon {
	border-left: 1px solid var(--hba-border);
}

.hba-input,
.hba-select {
	width: 100%;
	min-width: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--hba-ink);
	background: var(--hba-surface);
	padding: 9px 11px;
	border: 0;
	outline: none;
}

.hba-select {
	border: 1px solid var(--hba-border-strong);
	border-radius: var(--hba-radius-sm);
	font-weight: 500;
	cursor: pointer;
}

.hba-input--compact {
	width: 78px;
	padding: 6px 8px;
	border: 1px solid var(--hba-border-strong);
	border-radius: 6px;
}

.hba-conditional {
	margin-top: 10px;
}

/* Switches & Toggles */
.hba-toggle-box {
	border: 1px solid var(--hba-border);
	border-radius: var(--hba-radius-sm);
	padding: 11px 12px;
	margin-bottom: 10px;
	background: #fcfcfd;
}

.hba-toggle-box:last-child {
	margin-bottom: 0;
}

.hba-switch {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.hba-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.hba-switch-slider {
	position: relative;
	flex: 0 0 38px;
	width: 38px;
	height: 22px;
	border-radius: 999px;
	background: #cbd5e1;
	transition: background-color 0.15s ease;
}

.hba-switch-slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease;
}

.hba-switch input:checked + .hba-switch-slider {
	background: var(--hba-accent);
}

.hba-theme-shopee .hba-switch input:checked + .hba-switch-slider {
	background: var(--hba-shopee);
}

.hba-theme-tokopedia .hba-switch input:checked + .hba-switch-slider {
	background: var(--hba-tokopedia);
}

.hba-switch input:checked + .hba-switch-slider::after {
	transform: translateX(16px);
}

.hba-switch input:focus-visible + .hba-switch-slider {
	outline: 2px solid var(--hba-ink);
	outline-offset: 2px;
}

.hba-switch-text {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	color: var(--hba-ink);
}

.hba-toggle-body {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--hba-border);
}

/* Tooltips */
.hba-tip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--hba-border-strong);
	background: #f1f5f9;
	color: var(--hba-muted);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	flex-shrink: 0;
}

.hba-tip:hover::after,
.hba-tip:focus-visible::after,
.hba-tip.is-open::after {
	content: attr(data-hba-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	width: 230px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #0f172a;
	color: #f8fafc;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
	z-index: 40;
	pointer-events: none;
}

/* Notices & Alerts */
.hba-notice {
	margin-top: 8px;
	padding: 9px 11px;
	border-radius: var(--hba-radius-sm);
	font-size: 12.5px;
}

.hba-notice--info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
}

.hba-alert {
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 14px;
	font-size: 13.5px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.hba-alert--danger {
	background: var(--hba-danger-soft);
	border: 1px solid #fecaca;
	color: #991b1b;
}

.hba-alert--danger strong {
	color: var(--hba-danger);
	font-size: 14px;
}

.hba-alert--success {
	background: var(--hba-accent-soft);
	border: 1px solid #a7f3d0;
	color: #065f46;
}

/* Reverse Solver Hero */
.hba-reverse-hero {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #ffffff;
	border-radius: var(--hba-radius);
	padding: 16px;
	margin-bottom: 14px;
	text-align: center;
}

.hba-hero-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #cbd5e1;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hba-hero-value {
	font-size: clamp(1.6rem, 3vw, 2rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	margin: 4px 0 6px;
	color: #34d399;
}

.hba-hero-sub {
	margin: 0 0 12px;
	font-size: 12px;
	color: #cbd5e1;
}

/* KPI Grid */
.hba-kpi-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.hba-kpi {
	background: var(--hba-bg);
	border: 1px solid var(--hba-border);
	border-radius: 10px;
	padding: 12px;
}

.hba-kpi--primary {
	background: var(--hba-accent-soft);
	border-color: #a7f3d0;
}

.hba-kpi--primary.is-loss {
	background: var(--hba-danger-soft);
	border-color: #fecaca;
}

.hba-kpi-label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 600;
	color: var(--hba-muted);
	margin-bottom: 4px;
}

.hba-kpi-val {
	display: block;
	font-size: clamp(1.1rem, 2.2vw, 1.35rem);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--hba-ink);
	line-height: 1.2;
}

.hba-kpi--primary .hba-kpi-val {
	color: #065f46;
}

.hba-kpi--primary.is-loss .hba-kpi-val {
	color: var(--hba-danger);
}

.hba-kpi-meta {
	display: block;
	font-size: 12px;
	color: var(--hba-subtle);
	margin-top: 4px;
	font-variant-numeric: tabular-nums;
}

/* Stacked Visual Bar */
.hba-stack-section {
	margin-bottom: 16px;
}

.hba-stack-head {
	display: flex;
	justify-content: space-between;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hba-muted);
	margin-bottom: 6px;
}

.hba-stack-bar {
	display: flex;
	height: 12px;
	border-radius: 999px;
	overflow: hidden;
	background: #e2e8f0;
}

.hba-stack-seg {
	height: 100%;
	transition: width 0.25s ease;
}

.hba-stack-seg--cost {
	background: var(--hba-cost);
}

.hba-stack-seg--fee {
	background: var(--hba-fee);
}

.hba-stack-seg--profit {
	background: var(--hba-profit);
}

.hba-stack-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-top: 8px;
	font-size: 12px;
	color: var(--hba-muted);
}

.hba-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 5px;
}

.hba-dot--cost { background: var(--hba-cost); }
.hba-dot--fee { background: var(--hba-fee); }
.hba-dot--profit { background: var(--hba-profit); }

/* Breakdown List */
.hba-breakdown-title {
	margin: 0 0 8px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--hba-ink);
}

.hba-dl {
	margin: 0;
	padding: 0;
}

.hba-dl-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px dashed #e2e8f0;
	font-size: 13.5px;
}

.hba-dl-row:last-child {
	border-bottom: 0;
}

.hba-dl-row dt {
	margin: 0;
	color: var(--hba-muted);
	font-weight: 400;
}

.hba-dl-row dd {
	margin: 0;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--hba-ink);
	text-align: right;
	white-space: nowrap;
}

.hba-dl-row dd.is-minus {
	color: #b91c1c;
}

.hba-dl-row dd.is-positive {
	color: #047857;
}

.hba-dl-row--strong dt,
.hba-dl-row--strong dd {
	font-weight: 700;
	color: var(--hba-ink);
}

.hba-dl-row--total-fee dt,
.hba-dl-row--total-fee dd {
	font-weight: 700;
}

.hba-dl-sep {
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hba-subtle);
	margin-top: 10px;
	padding-top: 6px;
}

/* Buttons */
.hba-actions {
	margin-top: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hba-actions--center {
	justify-content: center;
}

.hba-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: 0;
	border-radius: var(--hba-radius-sm);
	padding: 11px 16px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.hba-btn:active {
	transform: scale(0.99);
}

.hba-btn--whatsapp {
	background: #16a34a;
	color: #ffffff;
}

.hba-btn--whatsapp:hover {
	background: #15803d;
}

.hba-btn--secondary {
	background: #ffffff;
	color: #0f172a;
	width: auto;
}

.hba-btn--sm {
	padding: 7px 14px;
	font-size: 12.5px;
}

/* Comparison Widget */
.hba-compare-controls {
	margin-bottom: 14px;
}

.hba-compare-toggles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--hba-border);
	font-size: 13px;
}

.hba-check {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	color: var(--hba-ink);
	font-weight: 500;
}

.hba-inline-num {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.hba-compare-banner {
	background: #0f172a;
	color: #f8fafc;
	border-radius: 10px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 14px;
	text-align: center;
}

.hba-compare-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@container (min-width: 720px) {
	.hba-compare-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.hba-cmp-card {
	background: var(--hba-surface);
	border: 2px solid var(--hba-border);
	border-radius: var(--hba-radius);
	padding: 16px;
	box-shadow: var(--hba-shadow);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.hba-cmp-card.is-winner {
	border-color: #10b981;
	background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 34%);
}

.hba-cmp-card.is-loss {
	border-color: #fca5a5;
}

.hba-cmp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.hba-cmp-name {
	font-size: 16px;
	font-weight: 800;
}

.hba-cmp-card--shopee .hba-cmp-name { color: var(--hba-shopee); }
.hba-cmp-card--tiktok .hba-cmp-name { color: var(--hba-tiktok); }
.hba-cmp-card--tokopedia .hba-cmp-name { color: var(--hba-tokopedia); }

.hba-win-badge {
	background: #059669;
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
}

.hba-win-badge.is-loss-badge {
	background: var(--hba-danger);
}

.hba-cmp-profit {
	padding: 12px;
	border-radius: 10px;
	background: var(--hba-bg);
	border: 1px solid var(--hba-border);
	margin-bottom: 12px;
}

.hba-cmp-profit-label {
	display: block;
	font-size: 12px;
	color: var(--hba-muted);
	font-weight: 600;
}

.hba-cmp-profit-val {
	display: block;
	font-size: 1.3rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	margin: 2px 0;
	color: var(--hba-ink);
}

.hba-cmp-card.is-winner .hba-cmp-profit-val {
	color: #065f46;
}

.hba-cmp-card.is-loss .hba-cmp-profit-val {
	color: var(--hba-danger);
}

.hba-cmp-margin {
	font-size: 12px;
	color: var(--hba-subtle);
	font-variant-numeric: tabular-nums;
}

.hba-dl--compact .hba-dl-row {
	font-size: 12.8px;
	padding: 5px 0;
}

/* ======================================================================
 * Editorial Guide, Tables, Worked Examples, FAQs & Tools Grid
 * ====================================================================== */

.hba-page-intro {
	max-width: 1100px;
	margin: 0 auto 16px;
	font-size: 16px;
	line-height: 1.65;
	color: #334155;
}

.hba-hero {
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	color: #f8fafc;
	border-radius: 16px;
	padding: 28px 24px;
	margin: 0 auto 24px;
	max-width: 1100px;
}

.hba-hero-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #34d399;
	margin-bottom: 8px;
}

.hba-hero h1 {
	margin: 0 0 10px;
	font-size: clamp(1.5rem, 3vw, 2.15rem);
	line-height: 1.2;
	font-weight: 800;
	color: #ffffff;
}

.hba-hero p {
	margin: 0 0 18px;
	font-size: 15.5px;
	line-height: 1.6;
	color: #cbd5e1;
	max-width: 780px;
}

.hba-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hba-hero-cta {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	background: #10b981;
	color: #06281e;
}

.hba-hero-cta--ghost {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.22);
}

.hba-article {
	max-width: 1100px;
	margin: 28px auto;
	color: #1e293b;
	line-height: 1.7;
	font-size: 15.5px;
}

.hba-article h2 {
	margin: 28px 0 12px;
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
	font-weight: 800;
	color: #0f172a;
	line-height: 1.3;
}

.hba-article h3 {
	margin: 22px 0 8px;
	font-size: 1.12rem;
	font-weight: 700;
	color: #0f172a;
}

.hba-article p {
	margin: 0 0 14px;
}

.hba-article ul,
.hba-article ol {
	margin: 0 0 16px;
	padding-left: 22px;
}

.hba-article li {
	margin-bottom: 6px;
}

.hba-table-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 16px 0 22px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #ffffff;
}

.hba-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: left;
}

.hba-table th {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 700;
	padding: 11px 14px;
	border-bottom: 1px solid #cbd5e1;
	white-space: nowrap;
}

.hba-table td {
	padding: 10px 14px;
	border-bottom: 1px solid #e2e8f0;
	color: #334155;
	font-variant-numeric: tabular-nums;
}

.hba-table tr:last-child td {
	border-bottom: 0;
}

.hba-example-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #0f6b4f;
	border-radius: 10px;
	padding: 16px 18px;
	margin: 16px 0 22px;
}

.hba-example-box h3 {
	margin-top: 0;
}

.hba-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0 28px;
}

.hba-faq-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 16px;
}

.hba-faq-item summary {
	font-weight: 700;
	color: #0f172a;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.hba-faq-item summary::-webkit-details-marker {
	display: none;
}

.hba-faq-item summary::after {
	content: "+";
	font-size: 18px;
	font-weight: 700;
	color: #64748b;
}

.hba-faq-item[open] summary::after {
	content: "-";
}

.hba-faq-item p {
	margin: 10px 0 0;
	font-size: 14.5px;
	color: #475569;
}

.hba-tools-section {
	max-width: 1100px;
	margin: 32px auto 12px;
	padding: 22px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
}

.hba-tools-section h2 {
	margin: 0 0 6px;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f172a;
}

.hba-tools-section > p {
	margin: 0 0 16px;
	font-size: 14px;
	color: #475569;
}

.hba-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
}

.hba-tool-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px;
	text-decoration: none;
	color: #0f172a;
	transition: border-color 0.15s ease, transform 0.12s ease;
}

.hba-tool-card:hover {
	border-color: #0f6b4f;
	transform: translateY(-1px);
}

.hba-tool-card.is-current {
	border-color: #0f6b4f;
	background: #ecfdf5;
}

.hba-tool-card strong {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.hba-tool-card span {
	font-size: 12.5px;
	color: #475569;
	line-height: 1.45;
}

/* ======================================================================
 * UI v2: tactile micro-interactions (segmented tabs, chips, donut,
 * status pill, sticky result card, mobile summary bar, toast)
 * ====================================================================== */

.hba-wrap {
	--hba-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Segmented pill tab switcher */
.hba-tabs.hba-tabs--pill {
	position: relative;
	isolation: isolate;
	gap: 0;
	padding: 5px;
	border-radius: 14px;
	background: #e9eef5;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}
.hba-tabs--pill::before {
	content: "";
	position: absolute;
	z-index: 0;
	top: 5px;
	bottom: 5px;
	left: 5px;
	width: calc(50% - 5px);
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
	transform: translate3d(calc(var(--hba-tab-index, 0) * 100%), 0, 0);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}
.hba-tabs--pill .hba-tab {
	position: relative;
	z-index: 1;
	min-height: 42px;
	border-radius: 10px;
	transition: color 0.2s ease;
}
.hba-tabs--pill .hba-tab.is-active {
	background: transparent;
	box-shadow: none;
}
.hba-tabs--pill .hba-tab:not(.is-active):hover {
	color: var(--hba-ink);
}
.hba-tabs--pill .hba-tab:focus-visible {
	outline: 2px solid var(--hba-shopee);
	outline-offset: -2px;
}
.hba-pane-in {
	animation: hbaPaneIn 0.2s ease-out both;
}
@keyframes hbaPaneIn {
	from { opacity: 0; transform: translate3d(0, 6px, 0); }
	to { opacity: 1; transform: none; }
}

/* Cards, inputs, focus rings */
.hba-wrap .hba-card {
	border-radius: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hba-wrap .hba-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.28);
}
.hba-wrap .hba-input-group,
.hba-wrap .hba-select {
	min-height: 44px;
	border-radius: 10px;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.hba-wrap .hba-input-group:hover,
.hba-wrap .hba-select:hover {
	border-color: #94a3b8;
}
.hba-wrap .hba-input-group:focus-within,
.hba-wrap .hba-select:focus {
	border-color: var(--hba-shopee);
	box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.12);
}
.hba-theme-tokopedia .hba-input-group:focus-within,
.hba-theme-tokopedia .hba-select:focus {
	border-color: #03ac0e;
	box-shadow: 0 0 0 4px rgba(3, 172, 14, 0.12);
}
.hba-wrap .hba-select {
	padding-right: 34px;
	text-overflow: ellipsis;
}

/* XTRA / program sub-panels: stack fields so long select labels never truncate */
.hba-toggle-body .hba-row-2 {
	grid-template-columns: 1fr;
	gap: 10px;
}
.hba-toggle-box {
	border-radius: 12px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hba-toggle-box:hover {
	border-color: #cbd5e1;
	background: #ffffff;
}
.hba-toggle-box:has(input:checked) {
	border-color: #fed7cc;
	background: #fffaf8;
}

/* Toggle switch */
.hba-switch-slider {
	flex: 0 0 44px;
	width: 44px;
	height: 26px;
	background: #cbd5e1;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
	transition: background-color 0.25s ease;
}
.hba-switch-slider::after {
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.18s ease;
}
.hba-switch input:checked + .hba-switch-slider::after {
	transform: translateX(18px);
}
.hba-switch:active .hba-switch-slider::after {
	width: 24px;
}
.hba-switch input:checked:active + .hba-switch-slider::after {
	transform: translateX(14px);
}
.hba-switch input:focus-visible + .hba-switch-slider {
	outline: none;
	box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.18);
}

/* Quick nominal chips */
.hba-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}
.hba-chip {
	appearance: none;
	min-height: 32px;
	padding: 5px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #f8fafc;
	color: #334155;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.hba-chip:hover {
	border-color: #fdba9f;
	background: #fff4f0;
	color: #c2410c;
}
.hba-chip:active {
	transform: scale(0.95);
}
@media (max-width: 520px) {
	.hba-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding: 3px 2px 4px;
		margin-left: -2px;
		margin-right: -2px;
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
	}
	.hba-chips::-webkit-scrollbar {
		display: none;
	}
	.hba-chip {
		flex: 0 0 auto;
		scroll-snap-align: start;
		white-space: nowrap;
		padding: 5px 11px;
	}
	.hba-chip:last-child {
		margin-right: 18px;
	}
}
.hba-chip.is-active {
	border-color: var(--hba-shopee);
	background: var(--hba-shopee);
	color: #ffffff;
}
.hba-theme-tokopedia .hba-chip.is-active,
.hba-theme-roas .hba-chip.is-active,
.hba-theme-compare .hba-chip.is-active {
	border-color: #059669;
	background: #059669;
}
.hba-chip:focus-visible {
	outline: 2px solid var(--hba-shopee);
	outline-offset: 2px;
}

/* Result card: sticky glass on desktop */
@media (min-width: 960px) {
	.hba-panel--results {
		position: sticky;
		top: 92px;
		align-self: start;
	}
}
.hba-wrap .hba-result-card {
	border-radius: 16px;
	border-color: rgba(226, 232, 240, 0.95);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 40px -24px rgba(15, 23, 42, 0.3), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
}

/* KPI cards + count-up */
.hba-kpi {
	position: relative;
	border-radius: 12px;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}
.hba-kpi-val.hba-bump {
	animation: hbaBump 0.32s ease-out;
}
@keyframes hbaBump {
	0% { transform: scale(1); }
	40% { transform: scale(1.035); }
	100% { transform: scale(1); }
}
.hba-kpi-val {
	transform-origin: left center;
}

/* Dynamic status pill */
.hba-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.3;
	animation: hbaPillIn 0.25s ease-out;
}
.hba-status-pill[hidden] {
	display: none;
}
.hba-status-pill--good {
	background: #d1fae5;
	color: #065f46;
}
.hba-status-pill--thin {
	background: #fef3c7;
	color: #92400e;
}
.hba-status-pill--loss {
	background: #fee2e2;
	color: #b91c1c;
	animation: hbaPillIn 0.25s ease-out, hbaLossPulse 1.6s ease-in-out infinite;
}
@keyframes hbaPillIn {
	from { opacity: 0; transform: translate3d(0, 3px, 0); }
	to { opacity: 1; transform: none; }
}
@keyframes hbaLossPulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
	50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* Donut + gliding composition bar */
.hba-viz {
	display: flex;
	align-items: center;
	gap: 16px;
}
.hba-viz-side {
	flex: 1 1 auto;
	min-width: 0;
}
.hba-donut {
	position: relative;
	flex: 0 0 92px;
	width: 92px;
	height: 92px;
}
.hba-donut svg {
	width: 100%;
	height: 100%;
	transform: rotate(0deg);
}
.hba-donut-track {
	stroke: #e2e8f0;
}
.hba-donut-arc {
	transition: stroke-dasharray 0.5s cubic-bezier(0.22, 1, 0.36, 1), stroke-dashoffset 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hba-donut-arc--cost { stroke: #3b82f6; }
.hba-donut-arc--fee { stroke: #f59e0b; }
.hba-theme-shopee .hba-donut-arc--fee { stroke: #ee4d2d; }
.hba-donut-arc--profit { stroke: #10b981; }
.hba-donut-center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.1;
	pointer-events: none;
}
.hba-donut-center strong {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
}
.hba-donut-center span {
	font-size: 10px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.hba-stack-bar {
	height: 14px;
	gap: 2px;
	background: #eef2f7;
}
.hba-stack-seg {
	transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hba-stack-seg:first-child { border-radius: 999px 0 0 999px; }
.hba-stack-seg:last-child { border-radius: 0 999px 999px 0; }
.hba-theme-shopee .hba-stack-seg--fee,
.hba-theme-shopee .hba-dot--fee { background: #ee4d2d; }
@media (max-width: 420px) {
	.hba-donut { flex-basis: 76px; width: 76px; height: 76px; }
	.hba-viz { gap: 12px; }
}

/* WhatsApp button + toast */
.hba-btn--whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	border-radius: 12px;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	box-shadow: 0 10px 22px -12px rgba(22, 163, 74, 0.75);
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}
.hba-btn--whatsapp:hover {
	background: linear-gradient(135deg, #16a34a, #15803d);
	transform: translateY(-1px);
	box-shadow: 0 14px 26px -12px rgba(22, 163, 74, 0.85);
}
.hba-btn--whatsapp:active {
	transform: scale(0.97);
}
.hba-btn--whatsapp.is-copied {
	background: #15803d;
}
.hba-btn-icon {
	flex: none;
}
.hba-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 10000;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px 12px 12px;
	border-radius: 14px;
	background: #0f172a;
	color: #f8fafc;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.55);
	opacity: 0;
	visibility: hidden;
	transform: translate3d(-50%, 16px, 0) scale(0.96);
	transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.35s;
	pointer-events: none;
}
.hba-toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate3d(-50%, 0, 0) scale(1);
	transition-delay: 0s;
}
.hba-toast-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #22c55e;
	color: #ffffff;
}
.hba-toast.is-visible .hba-toast-check {
	animation: hbaCheckPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}
@keyframes hbaCheckPop {
	from { transform: scale(0.3) rotate(-20deg); }
	to { transform: scale(1) rotate(0); }
}

/* Mobile floating summary bar */
.hba-mbar {
	display: none;
}
@media (max-width: 779.98px) {
	.hba-mbar {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		z-index: 998;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 10px 10px 16px;
		border-radius: 16px;
		background: rgba(15, 23, 42, 0.94);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		color: #f8fafc;
		box-shadow: 0 18px 36px -16px rgba(15, 23, 42, 0.6);
		opacity: 0;
		visibility: hidden;
		transform: translate3d(0, 130%, 0);
		transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, visibility 0s linear 0.35s;
	}
	.hba-mbar.is-visible {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
	.hba-mbar-info {
		display: flex;
		flex-direction: column;
		min-width: 0;
		line-height: 1.2;
	}
	.hba-mbar-info span {
		font-size: 11.5px;
		font-weight: 600;
		color: #94a3b8;
	}
	.hba-mbar-info strong {
		font-size: 18px;
		font-weight: 800;
		color: #34d399;
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}
	.hba-mbar.is-loss .hba-mbar-info strong {
		color: #f87171;
	}
	.hba-mbar-btn {
		flex: none;
		min-height: 44px;
		padding: 0 16px;
		border: 0;
		border-radius: 12px;
		background: #10b981;
		color: #ffffff;
		font-family: inherit;
		font-size: 14px;
		font-weight: 700;
		line-height: 1;
		cursor: pointer;
		transition: transform 0.15s ease, background-color 0.15s ease;
	}
	.hba-mbar-btn:active {
		transform: scale(0.96);
	}
	.hba-toast {
		bottom: calc(88px + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.hba-tabs--pill::before,
	.hba-stack-seg,
	.hba-donut-arc,
	.hba-switch-slider::after,
	.hba-chip,
	.hba-mbar,
	.hba-toast {
		transition: none !important;
	}
	.hba-pane-in,
	.hba-kpi-val.hba-bump,
	.hba-status-pill,
	.hba-status-pill--loss,
	.hba-toast.is-visible .hba-toast-check {
		animation: none !important;
	}
}
