/* Free Utility Tools — Loan EMI Calculator */

.fut-loan-emi-calculator {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 920px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e1e5e9;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── Header ── */
.fut-lei-header {
	padding: 22px 28px 18px;
	background: linear-gradient(135deg, #1a5fa3 0%, #2271b1 100%);
}
.fut-lei-title {
	margin: 0 0 5px;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
}
.fut-lei-desc {
	margin: 0;
	font-size: 13px;
	color: rgba(255,255,255,.82);
}

/* ── Two-column layout ── */
.fut-lei-layout {
	display: flex;
	min-height: 480px;
}
.fut-lei-input-col {
	width: 300px;
	flex-shrink: 0;
	padding: 20px 18px 20px 24px;
	border-right: 1px solid #e1e5e9;
	background: #fafbfc;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.fut-lei-output-col {
	flex: 1;
	padding: 22px 24px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
@media (max-width: 680px) {
	.fut-lei-layout { flex-direction: column; }
	.fut-lei-input-col { width: 100%; border-right: none; border-bottom: 1px solid #e1e5e9; }
}

/* ── Input sections ── */
.fut-lei-section {
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.fut-lei-lbl {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #555d66;
}

/* ── Type tabs ── */
.fut-lei-type-tabs {
	display: flex;
	border: 1.5px solid #d0d5dd;
	border-radius: 7px;
	overflow: hidden;
}
.fut-lei-type-tab {
	flex: 1;
	padding: 7px 4px;
	border: none;
	background: #fff;
	font-size: 11.5px;
	font-weight: 600;
	color: #50575e;
	cursor: pointer;
	transition: background .15s, color .15s;
	white-space: nowrap;
}
.fut-lei-type-tab + .fut-lei-type-tab { border-left: 1.5px solid #d0d5dd; }
.fut-lei-type-tab.active { background: #2271b1; color: #fff; }
.fut-lei-type-tab:not(.active):hover { background: #f0f6fc; }
.fut-lei-type-desc {
	margin: 4px 0 0;
	font-size: 11px;
	color: #8a9ab0;
	line-height: 1.5;
}

/* ── Shared input ── */
.fut-lei-input {
	padding: 9px 11px;
	border: 1.5px solid #d0d5dd;
	border-radius: 7px;
	font-size: 14.5px;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
	width: 100%;
	transition: border-color .15s, box-shadow .15s;
}
.fut-lei-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34,113,177,.12);
}

/* ── Money row ── */
.fut-lei-money-row {
	display: flex;
	align-items: center;
	border: 1.5px solid #d0d5dd;
	border-radius: 7px;
	overflow: hidden;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.fut-lei-money-row:focus-within {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34,113,177,.12);
}
.fut-lei-sym {
	padding: 9px 10px;
	font-size: 14px;
	font-weight: 700;
	color: #2271b1;
	background: #f0f6fc;
	border-right: 1px solid #d0d5dd;
	flex-shrink: 0;
	min-width: 30px;
	text-align: center;
}
.fut-lei-money-row .fut-lei-input {
	border: none;
	border-radius: 0;
	box-shadow: none !important;
}

/* ── Rate row ── */
.fut-lei-rate-row {
	display: flex;
	align-items: center;
	gap: 6px;
}
.fut-lei-pct {
	font-size: 14px;
	font-weight: 700;
	color: #8a9ab0;
	flex-shrink: 0;
}
.fut-lei-rate-row .fut-lei-input { flex: 1; }

/* ── Term row ── */
.fut-lei-term-row {
	display: flex;
	align-items: center;
	gap: 5px;
}
.fut-lei-term-row .fut-lei-input { flex: 1; width: auto; }
.fut-lei-term-lbl {
	font-size: 12px;
	font-weight: 600;
	color: #8a9ab0;
	flex-shrink: 0;
}

/* ── Action buttons ── */
.fut-lei-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding-top: 16px;
}
.fut-lei-calc-btn,
.fut-lei-reset-btn {
	width: 100%;
	padding: 11px 0;
	border: none;
	border-radius: 7px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .08s;
}
.fut-lei-calc-btn {
	background: #2271b1;
	color: #fff;
}
.fut-lei-calc-btn:hover  { background: #135e96; }
.fut-lei-calc-btn:active { transform: scale(.98); }
.fut-lei-reset-btn {
	background: #f0f0f1;
	color: #3c434a;
	border: 1px solid #dcdcde;
}
.fut-lei-reset-btn:hover { background: #dcdcde; }

/* ── Placeholder ── */
.fut-lei-placeholder {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #c8d8ea;
	text-align: center;
	padding: 40px 20px;
}
.fut-lei-placeholder-icon { font-size: 42px; }
.fut-lei-placeholder p { margin: 0; font-size: 14px; color: #9ca3af; }

/* ── Result ── */
.fut-lei-result-title {
	font-size: 15px;
	font-weight: 700;
	color: #1d2327;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e1e5e9;
}
.fut-lei-result-type-lbl { color: #2271b1; }

/* ── Stat cards ── */
.fut-lei-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}
.fut-lei-stat {
	background: #f8f9fa;
	border: 1px solid #e1e5e9;
	border-radius: 9px;
	padding: 12px 10px;
	text-align: center;
}
.fut-lei-stat-emi {
	background: linear-gradient(135deg, #f0fdf4, #dcfce7);
	border-color: #86efac;
}
.fut-lei-stat-emi .fut-lei-stat-val { color: #16a34a; font-size: 20px; }
.fut-lei-stat-lbl {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: #8a9ab0;
	margin-bottom: 5px;
}
.fut-lei-stat-val {
	display: block;
	font-size: 15px;
	font-weight: 800;
	color: #1d2327;
	font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
	.fut-lei-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Principal vs Interest bar ── */
.fut-lei-bar-section { margin-bottom: 16px; }
.fut-lei-bar-track {
	display: flex;
	height: 20px;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 7px;
	background: #e5e7eb;
}
.fut-lei-bar-principal {
	background: #2271b1;
	transition: width .5s ease;
	height: 100%;
}
.fut-lei-bar-interest {
	background: #22c55e;
	transition: width .5s ease;
	height: 100%;
}
.fut-lei-bar-legend {
	display: flex;
	gap: 18px;
	font-size: 12px;
	color: #50575e;
}
.fut-lei-leg { display: flex; align-items: center; gap: 5px; }
.fut-lei-leg-dot {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	display: inline-block;
	flex-shrink: 0;
}
.fut-lei-leg strong { color: #1d2327; }

/* ── Amortization table ── */
.fut-lei-amort-section { flex: 1; }
.fut-lei-bk-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.fut-lei-bk-title {
	font-size: 13px;
	font-weight: 700;
	color: #1d2327;
}
.fut-lei-bk-tabs {
	display: flex;
	border: 1.5px solid #d0d5dd;
	border-radius: 6px;
	overflow: hidden;
}
.fut-lei-bk-tab {
	padding: 5px 14px;
	border: none;
	background: #fff;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.fut-lei-bk-tab + .fut-lei-bk-tab { border-left: 1.5px solid #d0d5dd; }
.fut-lei-bk-tab.active  { background: #2271b1; color: #fff; }
.fut-lei-bk-tab:not(.active):hover { background: #f0f0f1; }

.fut-lei-table-wrap {
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid #e1e5e9;
	border-radius: 8px;
}
.fut-lei-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.fut-lei-table thead {
	position: sticky;
	top: 0;
	z-index: 1;
}
.fut-lei-table th {
	padding: 9px 12px;
	background: #1d2327;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	text-align: right;
	white-space: nowrap;
}
.fut-lei-table th:first-child { text-align: left; }
.fut-lei-table td {
	padding: 8px 12px;
	text-align: right;
	color: #1d2327;
	font-variant-numeric: tabular-nums;
	border-bottom: 1px solid #f0f0f1;
}
.fut-lei-table td:first-child { text-align: left; font-weight: 600; color: #646970; }
.fut-lei-table tbody tr:last-child td { border-bottom: none; }
.fut-lei-table tbody tr:hover td { background: #f8f9fa; }
.fut-lei-table .fut-lei-row-hl td {
	background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
	font-weight: 700;
	color: #15803d;
}
