.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.8rem, 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;
	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;
}

/* Mode Selector */
.mode-selector {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.mode-btn {
	flex: 1;
	min-width: 140px;
	padding: 1rem;
	border-radius: 1rem;
	background: rgba(30, 41, 59, 0.5);
	border: 2px solid rgba(71, 85, 105, 0.5);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
}

.mode-btn:hover {
	border-color: rgba(6, 182, 212, 0.5);
}

.mode-btn.active {
	background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(8, 145, 178, 0.1) 100%);
	border-color: #06b6d4;
	color: #000;
}

.mode-btn-icon {
	font-size: 1.5rem;
	margin-bottom: 0.25rem;
}

.mode-btn-label {
	display: block;
}

.mode-btn-desc {
	font-size: 0.6875rem;
	color: #fff;
	font-weight: 400;
	margin-top: 0.25rem;
}

.mode-btn.active .mode-btn-desc {
	color: #000;
}

/* Main Grid */
.main-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

@media (max-width: 768px) {
	.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.cyan {
	background: #fff;
	border-color: rgba(6, 182, 212, 0.25);
}

.section.slate {
	background: #fff;
	border-color: rgba(71, 85, 105, 0.5);
}

.section.emerald {
	background: #fff;
	border-color: rgba(16, 185, 129, 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.cyan .section-icon {
	background: rgba(6, 182, 212, 0.2);
	color: #22d3ee;
}

.section.slate .section-icon {
	background: rgba(100, 116, 139, 0.2);
	color: #94a3b8;
}

.section.emerald .section-icon {
	background: rgba(16, 185, 129, 0.2);
	color: #34d399;
}

.section-title {
	font-weight: 600;
}

.section-content {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Inputs */
.input-group {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.input-label {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.input-label.large {
	font-size: 1rem;
}

.tooltip-trigger {
	color: #94a3b8;
	cursor: help;
	position: relative;
	display: inline-flex;
}

.tooltip-trigger:hover {
	color: #60a5fa;
}

.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: 240px;
	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;
}

.tooltip-content::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1e293b;
}

.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.75rem 1rem;
	border: 1px solid rgba(71, 85, 105, 0.5);
	border-radius: 0.75rem;
	font-size: 1rem;
	transition: all 0.2s;
}

.input-field:focus {
	outline: none;
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.input-field.has-prefix {
	padding-left: 2rem;
}

.input-field.has-suffix {
	padding-right: 2.5rem;
}

.input-field.large {
	font-size: 1.25rem;
	padding: 1rem 1.25rem;
}

.input-field.large.has-prefix {
	padding-left: 2.25rem;
}

.input-field.large.has-suffix {
	padding-right: 3rem;
}

.input-field:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.input-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

/* Result Hero */
.result-hero {
	text-align: center;
	padding: 1.5rem;
	background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(8, 145, 178, 0.08) 100%);
	border-radius: 1rem;
	margin-bottom: 1rem;
}

.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: 3.5rem;
	font-weight: 800;
	color: #60a5fa;
	line-height: 1;
}

.result-hero-value.currency {
	font-size: 2.75rem;
}

.result-hero-subtitle {
	font-size: 0.875rem;
	color: #cbd5e1;
	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: #34d399;
}

.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.low {
	background: rgba(244, 63, 94, 0.2);
	color: #fb7185;
}

/* Summary Cards */
.summary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
}

.summary-card {
	background: #3b82f61a;
	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;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}

.summary-card-value {
	font-size: 1.125rem;
	font-weight: 700;
}

.summary-card-value.positive {
	color: #34d399;
}

.summary-card-value.negative {
	color: #fb7185;
}

/* NOI Breakdown */
.noi-breakdown {
	margin-top: 0.5rem;
}

.noi-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	font-size: 0.875rem;
}

.noi-item+.noi-item {
	border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.noi-item-label {
	color: #94a3b8;
}

.noi-item-value {
	color: white;
	font-weight: 500;
}

.noi-item-value.positive {
	color: #60a5fa;
}

.noi-item-value.negative {
	color: #fb7185;
}

.noi-item.total {
	font-weight: 700;
}

.noi-item.total .noi-item-label {
	color: white;
}

.noi-item.total .noi-item-value {
	color: #60a5fa;
	font-size: 1rem;
}

/* Market Comparison */
.market-comparison {
	margin-top: 1rem;
}

.market-title {
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.market-bars {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.market-bar-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.market-bar-label {
	width: 100px;
	font-size: 0.75rem;
	color: #94a3b8;
	flex-shrink: 0;
}

.market-bar-container {
	flex: 1;
	height: 24px;
	background: rgba(30, 41, 59, 0.5);
	border-radius: 0.375rem;
	overflow: hidden;
	position: relative;
}

.market-bar-fill {
	height: 100%;
	border-radius: 0.375rem;
	transition: width 0.3s;
}

.market-bar-fill.low {
	background: linear-gradient(90deg, #f43f5e, #fb7185);
}

.market-bar-fill.fair {
	background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.market-bar-fill.good {
	background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.market-bar-fill.high {
	background: linear-gradient(90deg, #10b981, #34d399);
}

.market-bar-value {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.6875rem;
	font-weight: 600;
	color: white;
}

.market-bar-marker {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 3px;
	background: white;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
	z-index: 10;
}

.your-rate-label {
	font-size: 0.6875rem;
	color: #60a5fa;
	text-align: center;
	margin-top: 0.25rem;
}

/* Quick Reference */
.quick-ref {
	margin-top: 1rem;
}

.quick-ref-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: #94a3b8;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.quick-ref-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem;
}

.quick-ref-item {
	background: rgba(30, 41, 59, 0.3);
	border-radius: 0.5rem;
	padding: 0.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.quick-ref-item-label {
	font-size: 0.75rem;
}

.quick-ref-item-value {
	font-size: 0.75rem;
	font-weight: 600;
}

/* Formula Display */
.formula-display {
	background: #3b82f61a;
	border: 1px solid rgba(6, 182, 212, 0.2);
	border-radius: 0.75rem;
	padding: 1rem;
	margin-top: 1rem;
	text-align: center;
}

.formula-label {
	font-size: 0.6875rem;
	color: #94a3b8;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.formula-text {
	font-size: 0.9375rem;
	color: #60a5fa;
}

.formula-values {
	font-size: 0.8125rem;
	color: #94a3b8;
	margin-top: 0.5rem;
}

/* 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;
	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;
}

/* Full Width Results */
.full-width {
	grid-column: 1 / -1;
}