.ha-body-container {
	background: #d8e6f4;
	min-height: 100vh;
	padding: 1rem;
	line-height: 1.5;
	padding-top: 36px;
	padding-bottom: 36px;
}

@media (max-width: 480px) {
	.ha-body-container {
		padding-top: 70px;
	}
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
}

.calculator-container {
	max-width: 1170px;
	margin: 0 auto;
}

.calculator-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.brand-icon {
	padding: 0.625rem;
	border-radius: 0.75rem;
	background: #3c82f6;
}

.brand-icon svg {
	width: 30px;
	height: 30px;
	stroke: white;
}

.brand-text h1 {
	font-size: clamp(1.2rem, 4vw, 2rem);
	font-weight: 700;
	line-height: 1;
}

.brand-text h1 .highlight {
	background: #3c82f6;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.brand-text p {
	font-size: 0.75rem;
	color: #94a3b8;
}

.header-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 0.75rem;
	background: #1e293b;
	border: 1px solid #334155;
	color: white;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.2s;
}

.header-btn:hover {
	background: #334155;
}

.header-btn svg {
	width: 16px;
	height: 16px;
}

.header-btn .ha-blk-wht-frst,
.header-btn .ha-blk-wht-scnd {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Main Grid */
.main-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

@media (max-width: 900px) {
	.main-grid {
		grid-template-columns: 1fr;
	}
}

/* Sections */
.section {
	border-radius: 1.25rem;
	border: 1px solid;
	overflow: hidden;
	backdrop-filter: blur(8px);
	margin-bottom: 1rem;
}

.section.amber {
	background: #fff;
	border-color: rgba(245, 158, 11, 0.25);
}

.section.emerald {
	background: #fff;
	border-color: rgba(16, 185, 129, 0.25);
}

.section.rose {
	background: #fff;
	border-color: rgba(244, 63, 94, 0.25);
}

.section.slate {
	background: #fff;
	border-color: rgba(71, 85, 105, 0.5);
}

.section.blue {
	background: #fff;
	border-color: rgba(59, 130, 246, 0.25);
}

.section-header {
	padding: 1rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.section-icon {
	padding: 0.5rem;
	border-radius: 0.5rem;
}

.section-icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

.section.amber .section-icon {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

.section.emerald .section-icon {
	background: rgba(16, 185, 129, 0.2);
	color: #3c82f6;
}

.section.rose .section-icon {
	background: rgba(244, 63, 94, 0.2);
	color: #fb7185;
}

.section.slate .section-icon {
	background: rgba(100, 116, 139, 0.2);
	color: #94a3b8;
}

.section.blue .section-icon {
	background: rgba(59, 130, 246, 0.2);
	color: #60a5fa;
}

.section-title {
	font-weight: 600;
}

.section-content {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Inputs */
.input-group {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.input-label {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.8125rem;
	font-weight: 500;
}

.tooltip-trigger {
	color: #94a3b8;
	cursor: help;
	position: relative;
	display: inline-flex;
}

.tooltip-trigger:hover {
	color: #3c82f6;
}

.tooltip-trigger svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.tooltip-content {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 0.5rem;
	padding: 0.75rem;
	background: #1e293b;
	border: 1px solid #334155;
	border-radius: 0.5rem;
	font-size: 0.75rem;
	font-weight: 400;
	color: white;
	width: 220px;
	line-height: 1.5;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	z-index: 100;
	display: none;
}

.tooltip-trigger:hover .tooltip-content {
	display: block;
}

.input-wrapper {
	position: relative;
}

.input-prefix,
.input-suffix {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 0.875rem;
	pointer-events: none;
}

.input-prefix {
	left: 0.75rem;
}

.input-suffix {
	right: 0.75rem;
}

.input-field {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.625rem;
	font-size: 0.9375rem;
	font-family: inherit;
	transition: all 0.2s;
}

.input-field:focus {
	outline: none;
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.input-field.has-prefix {
	padding-left: 1.75rem;
}

.input-field.has-suffix {
	padding-right: 2.5rem;
}

.input-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

/* Result Hero */
.result-hero {
	text-align: center;
	padding: 1.5rem;
	border-radius: 1rem;
	margin-bottom: 1rem;
	position: relative;
}

.result-hero-label {
	font-size: 0.75rem;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
}

.result-hero-value {
	font-size: 4rem;
	font-weight: 800;
	line-height: 1;
}

.result-hero-value.positive {
	color: #3c82f6;
}

.result-hero-value.negative {
	color: #fb7185;
}

.result-hero-value.neutral {
	color: #fbbf24;
}

.result-hero-subtitle {
	font-size: 0.875rem;
	color: #a6afba;
	margin-top: 0.5rem;
}

/* Rating Badge */
.rating-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-top: 0.75rem;
}

.rating-badge.excellent {
	background: rgba(16, 185, 129, 0.2);
	color: #3c82f6;
}

.rating-badge.good {
	background: rgba(59, 130, 246, 0.2);
	color: #60a5fa;
}

.rating-badge.fair {
	background: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}

.rating-badge.poor {
	background: rgba(244, 63, 94, 0.2);
	color: #fb7185;
}

/* Comparison Cards */
.comparison-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.comparison-card {
	border: 1px solid rgba(71, 85, 105, 0.3);
	border-radius: 0.75rem;
	padding: 1rem;
	text-align: center;
}

.comparison-card.highlight {
	border-color: #f59e0b;
	background: rgba(245, 158, 11, 0.1);
}

.comparison-card-label {
	font-size: 0.6875rem;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}

.comparison-card-value {
	font-size: 1.5rem;
	font-weight: 700;
}

.comparison-card-value.positive {
	color: #3c82f6;
}

.comparison-card-value.negative {
	color: #fb7185;
}

.comparison-card-sublabel {
	font-size: 0.625rem;
	color: #64748b;
	margin-top: 0.25rem;
}

/* Cash Flow Waterfall */
.waterfall {
	margin-top: 0.5rem;
}

.waterfall-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(71, 85, 105, 0.2);
}

.waterfall-item:last-child {
	border-bottom: none;
}

.waterfall-item-icon {
	font-size: 1rem;
	width: 24px;
	text-align: center;
}

.waterfall-item-label {
	flex: 1;
	font-size: 0.8125rem;
}

.waterfall-item-value {
	font-size: 0.875rem;
	font-weight: 600;
}

.waterfall-item-value.positive {
	color: #3c82f6;
}

.waterfall-item-value.negative {
	color: #fb7185;
}

.waterfall-item.total {
	background: rgba(245, 158, 11, 0.1);
	margin: 0.5rem -1.25rem -1.25rem;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 1rem 1rem;
}

.waterfall-item.total .waterfall-item-label {
	font-weight: 600;
}

.waterfall-item.total .waterfall-item-value {
	color: #fbbf24;
	font-size: 1rem;
}

.waterfall-item.subtotal {
	background: rgba(30, 41, 59, 0.5);
	margin: 0.25rem -1.25rem;
	padding: 0.5rem 1.25rem;
}

.waterfall-item.subtotal .waterfall-item-label {
	font-weight: 600;
	color: white;
}

/* Summary Grid */
.summary-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
}

@media (max-width: 500px) {
	.summary-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.summary-card {
	background: #fff;
	border: 1px solid rgba(71, 85, 105, 0.3);
	border-radius: 0.75rem;
	padding: 0.75rem;
	text-align: center;
}

.summary-card-label {
	font-size: 0.6875rem;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}

.summary-card-value {
	font-size: 1rem;
	font-weight: 700;
}

/* Gauge */
.gauge-container {
	display: flex;
	justify-content: center;
	margin: 1rem 0;
}

.gauge {
	position: relative;
	width: 200px;
	height: 100px;
}

.gauge-bg {
	position: absolute;
	width: 200px;
	height: 100px;
	border-radius: 100px 100px 0 0;
	background: linear-gradient(90deg, #f43f5e 0%, #f59e0b 50%, #10b981 100%);
	overflow: hidden;
}

.gauge-mask {
	position: absolute;
	bottom: 0;
	left: 10px;
	right: 10px;
	height: 80px;
	background: #0f172a;
	border-radius: 80px 80px 0 0;
}

.gauge-needle {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 4px;
	height: 80px;
	background: white;
	transform-origin: bottom center;
	transform: rotate(-90deg);
	border-radius: 2px;
	transition: transform 0.5s ease-out;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.gauge-center {
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
}

.gauge-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.625rem;
	color: #64748b;
}

/* Target Comparison */
.target-section {
	margin-top: 1rem;
}

.target-bar-container {
	background: rgba(30, 41, 59, 0.5);
	border-radius: 0.5rem;
	height: 32px;
	position: relative;
	overflow: hidden;
}

.target-bar {
	height: 100%;
	border-radius: 0.5rem;
	transition: width 0.3s;
}

.target-bar.low {
	background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.target-bar.fair {
	background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.target-bar.good {
	background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.target-bar.excellent {
	background: linear-gradient(90deg, #10b981, #3c82f6);
}

.target-marker {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: white;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.target-marker::before {
	content: attr(data-label);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.5625rem;
	color: #94a3b8;
	white-space: nowrap;
	margin-bottom: 2px;
}

.target-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 0.25rem;
	font-size: 0.625rem;
	color: #64748b;
}

/* Full Width */
.full-width {
	grid-column: 1 / -1;
}

/* Modal */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.modal-overlay.open {
	display: flex;
}

.modal-content {
	background: #fff;
	border: 1px solid #334155;
	border-radius: 1.5rem;
	max-width: 600px;
	width: 100%;
	max-height: 85vh;
	overflow: hidden;
}

.modal-header {
	position: sticky;
	top: 0;
	background: #fff;
	border-bottom: 1px solid #334155;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-header h2 {
	font-size: 1.25rem;
	font-weight: 700;
}

.modal-close {
	padding: 0.5rem;
	border-radius: 0.75rem;
	background: transparent;
	border: none;
	color: #94a3b8;
	cursor: pointer;
}

.modal-close:hover {
	background: #1e293b;
	color: white;
}

.modal-close svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
}

.modal-body {
	overflow-y: auto;
	max-height: calc(85vh - 70px);
	padding: 1.5rem;
}

.glossary-term {
	background: #d8e6f4;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.75rem;
	padding: 1rem;
	margin-bottom: 1rem;
}

.glossary-term h3 {
	font-weight: 600;
	color: #000;
	margin-bottom: 0.5rem;
}

.glossary-term p {
	font-size: 0.875rem;
	color: #72767a;
	line-height: 1.6;
}

.glossary-formula {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding-top: 0.5rem;
}

.glossary-formula span {
	font-size: 0.75rem;
	color: #64748b;
	flex-shrink: 0;
}

.glossary-formula code {
	font-size: 0.75rem;
	background: #3c82f6;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	color: #fff;
}