@charset "UTF-8";
/* ==========================================================================
   Người Đồng Hành — Tỷ giá ngoại tệ & biến động lãi suất (ndh_auto)
   ==========================================================================

   Phần bổ sung, nạp sau gold.css (DataPage css={['ndh-fx']}) hoặc sau saving.css
   (trang /gui-tiet-kiem/). Chỉ bù phần riêng: ô mã ngoại tệ, ô giá tốt nhất,
   ô quy đổi, dải "lãi suất cao nhất theo kỳ hạn", biểu đồ bậc thang lãi suất,
   bộ lọc bảng biến động. Màu lấy từ tokens.css.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Bảng tỷ giá
   -------------------------------------------------------------------------- */
.fx-table { min-width: 520px; }
.fx-table tbody th { min-width: 180px; }
.fx-cur { display: inline-flex; align-items: center; gap: 10px; }
.fx-cur__code {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 46px; padding: 3px 8px;
	border-radius: 6px;
	background: var(--c-brand-50);
	border: 1px solid var(--c-brand-200);
	font-size: 12.5px; font-weight: 800; letter-spacing: .4px; color: var(--c-brand-700);
	font-variant-numeric: tabular-nums;
}
.fx-cur a { color: var(--c-ink); font-weight: 600; }
.fx-cur a:hover { color: var(--c-brand-700); text-decoration: underline; }
.fx-cur > span { color: var(--c-text); font-weight: 500; }
.fx-table tbody th > a { color: var(--c-ink); font-weight: 700; }
.fx-table tbody th > a:hover { color: var(--c-brand-700); text-decoration: underline; }

/* Ô giá có lợi nhất cho người giao dịch */
.fx-best { background: var(--c-act-50, var(--c-brand-50)); }
.fx-best .gold-table__val { color: var(--c-act-800, var(--c-brand-700)); }
.fx-best .gold-table__val::after {
	content: "tốt nhất";
	display: inline-block; margin-left: 6px; padding: 1px 6px;
	border-radius: var(--r-pill, 999px);
	background: var(--c-up); color: #fff;
	font-size: 10.5px; font-weight: 700; vertical-align: 2px;
}

/* Bảng so sánh ngoại tệ × ngân hàng: mua CK (nhỏ, trên) / bán ra (đậm) */
.fx-compare thead a { color: inherit; }
.fx-compare thead a:hover { text-decoration: underline; }
.fx-pair__buy { display: block; font-size: 12.5px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.fx-na { color: var(--c-muted); }

.fx-more { margin-top: 12px; font-size: 14.5px; }
.fx-more a { display: inline-flex; align-items: center; gap: 4px; color: var(--c-brand-700); font-weight: 600; }
.fx-more a:hover { text-decoration: underline; }
.fx-more .ico { width: 14px; height: 14px; }

.fx-since { display: flex; align-items: center; gap: 8px; margin: -6px 0 6px; font-size: 13.5px; color: var(--c-muted); }
.fx-since .ico { width: 16px; height: 16px; flex: none; }

/* --------------------------------------------------------------------------
   Ô quy đổi (dựa trên .svcalc__panel của saving.css)
   -------------------------------------------------------------------------- */
.fx-conv__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.fx-conv__select { width: 100%; max-width: none; }
.fx-conv__select select { width: 100%; }
.fx-conv__pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; margin-top: 22px; }
.fx-conv__pair .svcalc__field + .svcalc__field { margin-top: 0; }
.fx-conv__eq { padding-bottom: 14px; font-size: 22px; font-weight: 700; color: var(--c-muted); }
.fx-conv .svcalc__term:disabled { opacity: .45; cursor: not-allowed; }
.fx-conv .svcalc__note { text-align: left; }

/* --------------------------------------------------------------------------
   Dải "Lãi suất cao nhất theo kỳ hạn hôm nay" (/gui-tiet-kiem/)
   -------------------------------------------------------------------------- */
.rtop { margin: 0 0 24px; }
.rtop__sub { width: 100%; margin-top: -2px; font-size: 13px; color: var(--c-muted); }
.rtop__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; margin-bottom: 12px; }
.rtop__title { font-size: 17px; font-weight: 800; color: var(--c-ink); }
.rtop__more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--c-brand-700); }
.rtop__more:hover { text-decoration: underline; }
.rtop__more .ico { width: 14px; height: 14px; }
.rtop__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.rtop__item {
	display: flex; flex-direction: column; gap: 2px;
	height: 100%;
	padding: 12px 14px;
	border: 1px solid var(--c-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color .2s, background-color .2s;
}
.rtop__item:hover { border-color: var(--c-brand-300, var(--c-brand-200)); background: var(--c-brand-50); }
.rtop__term { font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--c-muted); }
.rtop__rate { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--c-brand-700); font-variant-numeric: tabular-nums; }
.rtop__bank { font-size: 13px; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------------------
   Biến động lãi suất: biểu đồ bậc thang + bảng
   -------------------------------------------------------------------------- */
.rhist .gold-chart__legend i { height: 3px; }
.rhist__note { margin-top: -6px; margin-bottom: 14px; font-size: 13.5px; color: var(--c-muted); }
.rchg__arrow { color: var(--c-muted); padding: 0 4px; }
.rchg__to { font-weight: 700; color: var(--c-ink); }
.rchg--up .rchg__to { color: var(--c-up); }
.rchg--down .rchg__to { color: var(--c-down); }
.rchg__pts { display: block; font-size: 12.5px; }
.rchg--up .rchg__pts { color: var(--c-up); }
.rchg--down .rchg__pts { color: var(--c-down); }
.rchg-empty { padding: 16px 18px; border: 1px dashed var(--c-line); border-radius: 12px; font-size: 14.5px; color: var(--c-text); background: #fff; }

/* Bộ lọc bảng biến động */
.rflt { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.rflt .cfilter__sort { flex: 1 1 220px; max-width: 320px; }
.rflt__count { align-self: center; font-size: 13.5px; color: var(--c-muted); }

@media (max-width: 640px) {
	.fx-conv__row { grid-template-columns: 1fr; }
	.fx-conv__pair { grid-template-columns: 1fr; }
	.fx-conv__eq { display: none; }
	/* Màn hẹp: đủ 3 cột giá trong khung, không phải cuộn ngang mới thấy giá bán. */
	.fx-table:not(.fx-compare) { min-width: 0; }
	.fx-table:not(.fx-compare) th, .fx-table:not(.fx-compare) td { padding: 10px 6px; }
	.fx-table:not(.fx-compare) thead th { font-size: 11.5px; white-space: normal; }
	.fx-table tbody th { min-width: 0; width: 30%; }
	.fx-table .gold-table__val { font-size: 14px; }
	.fx-table tbody th > a { font-size: 14px; }
	.fx-table .gold-table__posted { font-size: 11.5px; }
	.fx-cur { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
	.fx-cur__code { min-width: 0; }
	.fx-page .gold-mini th, .fx-page .gold-mini td { padding: 10px 6px; font-size: 13.5px; }
	.fx-page .gold-mini thead th { white-space: normal; font-size: 11.5px; }
	.fx-best .gold-table__val::after { display: block; width: max-content; margin: 2px 0 0 auto; }
	.rtop__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rtop__rate { font-size: 20px; }
}

/* Biểu đồ bậc thang dùng trên trang ngân hàng (/gui-tiet-kiem/<ngân hàng>/) — ngoài khung .gold nên tự khai biến màu. */
.rhist { --gold-s1: var(--c-brand-600); --gold-s2: var(--c-muted); --gold-grid: var(--c-line-soft); }
.rhist-sec .gold-links { margin-top: 22px; }
