:root {
	--bds-mau-chinh: #0d6efd;
	--bds-mau-nhan: #198754;
	--bds-mau-canh-bao: #dc3545;
	--bds-bo-go-can: 12px;
	--bds-co-chu: 15px;
	--bds-do-rong-widget: 720px;
	--bds-do-rong-widget-wizard: 820px;
	--bds-khoang-cach: 24px;
	--bds-chieu-cao-input: 8px;
}

.bds-widget {
	font-size: var(--bds-co-chu);
	color: #222;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: var(--bds-bo-go-can);
	padding: var(--bds-khoang-cach);
	max-width: var(--bds-do-rong-widget);
	margin: 16px 0;
	box-sizing: border-box;
}
.bds-widget * { box-sizing: border-box; }

.bds-title {
	margin: 0 0 16px;
	font-size: 1.25em;
	font-weight: 700;
}

.bds-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
@media (max-width: 560px) {
	.bds-form-grid { grid-template-columns: 1fr; }
}

.bds-field { display: flex; flex-direction: column; gap: 4px; }
.bds-field label { font-size: 0.85em; font-weight: 600; color: #444; }
.bds-field-radio { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.bds-field-radio label { font-weight: 400; display: flex; align-items: center; gap: 4px; }
.bds-field-checkbox label { font-weight: 400; display: flex; align-items: center; gap: 6px; }

.bds-input {
	padding: var(--bds-chieu-cao-input) 10px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1em;
	width: 100%;
	background: #fff;
}
.bds-input:focus { outline: 2px solid var(--bds-mau-chinh); border-color: var(--bds-mau-chinh); }

.bds-money-wrap { display: flex; align-items: stretch; gap: 6px; }
.bds-money-wrap .bds-input { text-align: right; }
.bds-money-step {
	flex: 0 0 auto;
	width: 34px;
	border: 1px solid #ccc;
	background: #f1f3f5;
	border-radius: 8px;
	font-size: 1.1em;
	font-weight: 700;
	cursor: pointer;
	color: #444;
}
.bds-money-step:hover { background: #e2e6ea; }
.bds-field-phan-khuc,
.bds-field-noi-that,
.bds-field-so-tien-vay,
.bds-field-vay { display: none; }

.bds-money-hint { font-size: 0.75em; color: #888; margin-top: 2px; }

.bds-btn {
	margin-top: 18px;
	background: var(--bds-mau-chinh);
	color: #fff;
	border: none;
	padding: 10px 22px;
	border-radius: 8px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
}
.bds-btn:hover { filter: brightness(0.92); }
.bds-btn-secondary { background: #6c757d; }

.bds-result { margin-top: 22px; border-top: 1px dashed #ddd; padding-top: 18px; }

.bds-result-highlight { margin-bottom: 16px; }
.bds-result-label { font-size: 0.85em; color: #666; }
.bds-result-value { font-size: 1.6em; font-weight: 800; color: var(--bds-mau-chinh); }
.bds-result-sub { font-size: 0.9em; color: #444; margin-top: 4px; }

.bds-breakdown-chart {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	margin: 16px 0;
}
.bds-legend { display: flex; flex-direction: column; gap: 6px; font-size: 0.9em; }
.bds-legend-item { display: flex; align-items: center; gap: 8px; }
.bds-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.bds-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.92em; }
.bds-table th, .bds-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee; }
.bds-table th { color: #666; font-weight: 600; }
.bds-table td:last-child, .bds-table th:last-child { text-align: right; }

.bds-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 10px; }
@media (max-width: 700px) { .bds-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .bds-cards { grid-template-columns: 1fr; } }
.bds-card { background: #f8f9fa; border-radius: 10px; padding: 14px; }
.bds-card-label { font-size: 0.8em; color: #666; }
.bds-card-value { font-size: 1.35em; font-weight: 800; color: var(--bds-mau-chinh); margin-top: 2px; }

.bds-compare-block { margin-top: 22px; border-top: 1px dashed #ddd; padding-top: 16px; }
.bds-compare-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bds-compare-table { margin-top: 12px; font-size: 0.85em; }

.bds-badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.78em; font-weight: 700; }
.bds-badge-thap { background: #f8d7da; color: #842029; }
.bds-badge-tb { background: #fff3cd; color: #664d03; }
.bds-badge-tot { background: #d1e7dd; color: #0f5132; }

.bds-barchart { margin-top: 12px; overflow-x: auto; }

.bds-disclaimer { font-size: 0.8em; color: #888; margin-top: 14px; }
.bds-canh-bao { color: var(--bds-mau-canh-bao); font-weight: 600; }

/* Wizard 3 bước */
.bds-wizard { max-width: var(--bds-do-rong-widget-wizard); }
.bds-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.bds-tab {
	background: #f1f3f5; border: none; padding: 10px 16px; border-radius: 999px;
	cursor: pointer; font-size: 0.9em; font-weight: 600; color: #555;
}
.bds-tab.active { background: var(--bds-mau-chinh); color: #fff; }
.bds-tab-panel { display: none; }
.bds-tab-panel.active { display: block; }
.bds-tab-panel .bds-widget { border: none; padding: 0; margin: 0; max-width: none; }
.bds-wizard-nav { margin-top: 18px; text-align: right; }
