/* Bảng tính mua nhà — CityHome (chỉ tải ở trang dùng mẫu "Bảng tính mua nhà"). Mọi class bắt đầu bằng bt-. */
.bt{--bt-out:var(--accent);--bt-in:var(--ok);--bt-line:var(--navy);--bt-grid:var(--line);--bt-axis:var(--muted)}
.bt-head h1{font-size:clamp(28px,3.4vw,40px)}
.bt-head .eyebrow{margin-top:4px}
.bt-tabs{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px;margin-top:22px;flex-wrap:wrap}
.bt-tabs button{padding:10px 22px;border-radius:999px;font-weight:600;font-size:14px;color:var(--muted);line-height:1.35}
.bt-tabs button.is-on{background:var(--navy);color:#fff}
.bt-tabs small{display:block;font-weight:400;font-size:11.5px;opacity:.85}

.bt{display:flex;flex-direction:column;gap:20px;padding-top:28px;padding-bottom:64px}
.bt>*,.bt-main>*{min-width:0}
.bt-main{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:28px;align-items:start;margin-bottom:8px}
.bt-inputs{display:flex;flex-direction:column;gap:16px}
.bt-card{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:20px 22px}
.bt-card h3{font-size:16.5px;display:flex;align-items:center;gap:10px;margin-bottom:4px;color:var(--navy)}
.bt-card h3 .bt-n{width:26px;height:26px;border-radius:50%;background:var(--accent-l);color:var(--accent-d);font-size:13px;display:grid;place-items:center;flex-shrink:0}
.bt-sub{font-size:13px;color:var(--muted);margin:0 0 14px 36px}
.bt-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 14px}
.bt-f label{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--muted);margin-bottom:5px;line-height:1.35}
.bt-in{position:relative}
.bt-f input,.bt-f select{width:100%;height:42px;border:1px solid var(--line);border-radius:10px;padding:0 12px;background:#fff;font-size:14.5px;font-weight:600;color:var(--navy);outline:none;transition:border .2s}
.bt-f input:focus,.bt-f select:focus{border-color:var(--navy)}
.bt-u{position:absolute;right:11px;top:50%;transform:translateY(-50%);font-size:12.5px;color:var(--muted);pointer-events:none}
.bt-hint{font-size:11.5px;color:var(--accent-d);margin-top:3px;min-height:16px}
.bt-s2{grid-column:span 2}
.bt-tip{width:16px;height:16px;border-radius:50%;background:var(--sky);color:var(--navy);font-size:10.5px;font-weight:700;display:inline-grid;place-items:center;cursor:help;position:relative;flex-shrink:0}
@media (hover:hover){.bt-tip:hover::after{content:attr(data-t);position:absolute;left:50%;bottom:22px;transform:translateX(-50%);width:240px;background:var(--navy);color:#fff;font-size:12px;font-weight:400;line-height:1.45;padding:9px 11px;border-radius:8px;z-index:30;white-space:normal;text-transform:none;letter-spacing:0}}
.bt-tipx{font-size:12px;line-height:1.45;color:var(--navy);background:var(--sky);border-radius:8px;padding:7px 10px;margin:0 0 6px}
.bt-sw{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--navy);cursor:pointer;margin-left:auto;font-size:13px}
.bt-sw input{display:none}
.bt-sw i{width:40px;height:23px;border-radius:99px;background:var(--line);position:relative;transition:.2s;flex-shrink:0}
.bt-sw i::after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;transition:.2s}
.bt-sw input:checked+i{background:var(--navy)}
.bt-sw input:checked+i::after{left:20px}
.bt-hide{display:none!important}

.bt-sched{width:100%;border-collapse:collapse;font-size:14px}
.bt-sched th{text-align:left;font-size:12px;font-weight:500;color:var(--muted);padding:6px;border-bottom:1px solid var(--line)}
.bt-sched td{padding:5px 6px;border-bottom:1px dashed var(--line)}
.bt-sched input{width:100%;height:36px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font-weight:600;color:var(--navy);outline:none;background:#fff}
.bt-sched input:focus{border-color:var(--navy)}
.bt-sched .bt-amt{color:var(--muted);font-size:13px;white-space:nowrap}
.bt-sched .bt-del{width:30px;height:30px;border-radius:8px;color:var(--muted)}
.bt-sched .bt-del:hover{background:var(--warn-l);color:var(--warn)}
.bt-sfoot{display:flex;justify-content:space-between;align-items:center;margin-top:10px;gap:10px;flex-wrap:wrap}
.bt-btn{height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--navy);color:var(--navy);font-size:13px;font-weight:600}
.bt-btn:hover{background:var(--navy);color:#fff}
.bt-tot{font-size:13px;font-weight:600}
.bt-tot.bad{color:var(--warn)}.bt-tot.good{color:var(--ok)}

.bt-res{position:sticky;top:calc(var(--hdr) + 16px);display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - var(--hdr) - 32px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;border-radius:14px}
.bt-res::-webkit-scrollbar{width:6px}.bt-res::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
.bt-res .bt-card{padding:18px 20px}
.bt-res h4{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-d);margin-bottom:6px;font-weight:700}
.bt-big{background:var(--navy);color:#fff;border:0}
.bt-big .bt-bl{font-size:14px;opacity:.85;margin-bottom:6px}
.bt-big .bt-bv{font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1.2}
.bt-big .bt-bv small{font-size:14px;font-weight:500;opacity:.8}
.bt-big .bt-bs{font-size:13px;opacity:.85;margin-top:4px}
.bt-kv{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:14px;line-height:1.45}
.bt-kv:last-child{border-bottom:0}
.bt-kv span{color:var(--muted)}
.bt-kv span small{color:var(--muted);font-size:11.5px}
.bt-kv b{color:var(--navy);text-align:right;white-space:nowrap}
.bt-kv b.pos{color:var(--ok)}.bt-kv b.neg{color:var(--warn)}
.bt-al{font-size:13px;padding:10px 12px;border-radius:10px;margin-top:6px;line-height:1.45}
.bt-al-warn{background:var(--warn-l);color:var(--warn)}
.bt-al-ok{background:var(--ok-l);color:var(--ok)}
.bt-al-info{background:var(--sky);color:var(--navy)}

.bt-cta{text-align:center}
.bt-zbtn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:48px;border-radius:999px;background:#0068FF;color:#fff!important;font-weight:600;font-size:15px;text-decoration:none!important;transition:.2s}
.bt-zbtn:hover{background:#0052cc}
.bt-zbtn:disabled{opacity:.6;cursor:wait}
.bt-zbtn .bt-zi{width:24px;height:24px;border-radius:7px;background:#fff;color:#0068FF;font-size:9.5px;font-weight:800;display:grid;place-items:center}
.bt-cta p{font-size:12.5px;color:var(--muted);margin:8px 0 0}
.bt-copy{margin-top:10px;font-size:13px;font-weight:600;color:var(--navy);text-decoration:underline;text-underline-offset:3px}

.bt-note{font-size:12.5px;color:var(--muted);line-height:1.6;margin:4px 0 10px}
.bt-chart{width:100%;height:280px;display:block}
.bt-legend{display:flex;gap:18px;font-size:12.5px;color:var(--muted);flex-wrap:wrap;margin-top:8px}
.bt-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.bt-tw{overflow:auto;max-height:520px;border:1px solid var(--line);border-radius:10px}
.bt-yr{width:100%;border-collapse:collapse;font-size:13px;min-width:820px}
.bt-yr th{position:sticky;top:0;background:var(--sky);text-align:right;padding:9px 10px;font-weight:600;color:var(--navy);font-size:12px}
.bt-yr th:first-child,.bt-yr td:first-child{text-align:left}
.bt-yr td{text-align:right;padding:8px 10px;border-top:1px solid var(--line);white-space:nowrap}
.bt-yr td.neg{color:var(--warn)}.bt-yr td.pos{color:var(--ok)}
.bt-yr tr.ev td{background:#F8FBFF}
.bt-t2{display:flex;gap:8px;margin:0 0 12px}
.bt-t2 button{height:32px;padding:0 14px;border-radius:999px;border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--muted)}
.bt-t2 button.is-on{background:var(--navy);border-color:var(--navy);color:#fff}
.bt-notes{font-size:13.5px;line-height:1.65;color:var(--muted)}
.bt-notes h2,.bt-notes h3{font-size:15px;color:var(--navy);margin:0 0 8px}
.bt-notes p{margin:0 0 .6em}
.bt-notes strong{color:var(--text)}

/* Kịch bản tăng giá (trong ô IRR) và bảng giá trị nhà theo thời gian */
.bt-sens{margin-top:14px;padding-top:12px;border-top:1px solid rgba(255,255,255,.2)}
.bt-sh{font-size:12.5px;opacity:.8;margin-bottom:4px}
.bt-sens table{width:100%;border-collapse:collapse;font-size:13.5px}
.bt-sens td{padding:4px 0;opacity:.8;white-space:nowrap}
.bt-sens td+td{text-align:right;padding-left:10px}
.bt-sens tr.cur td{opacity:1;font-weight:700}
.bt-sens small,.bt-asset small{font-weight:500;font-size:10.5px;border-radius:99px;padding:1px 7px;margin-left:6px;vertical-align:1px}
.bt-sens small{background:rgba(255,255,255,.2)}
.bt-cnote{font-size:12px;color:var(--muted);margin:-2px 0 8px;line-height:1.5}
.bt-asset{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:4px}
.bt-asset th{font-size:11.5px;font-weight:500;color:var(--muted);text-align:right;padding:4px 0 6px}
.bt-asset th:first-child,.bt-asset td:first-child{text-align:left}
.bt-asset td{padding:7px 0 7px 8px;border-top:1px dashed var(--line);text-align:right;white-space:nowrap;color:var(--text)}
.bt-asset td:first-child{padding-left:0;color:var(--muted)}
.bt-asset td.eq{font-weight:700;color:var(--ok)}
.bt-asset small{background:var(--ok-l);color:var(--ok)}

/* Hộp nhận bảng tính */
.bt-modal{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:16px}
.bt-modal[hidden]{display:none}
.bt-mbg{position:absolute;inset:0;background:rgba(28,47,94,.5)}
.bt-mpanel{position:relative;background:#fff;border-radius:18px;padding:26px 24px 24px;width:100%;max-width:440px;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 30px 60px -20px rgba(28,47,94,.4)}
.bt-mpanel h3{font-size:21px;color:var(--navy);margin:0 30px 6px 0}
.bt-msub{font-size:14px;color:var(--muted);margin:0 0 16px}
.bt-mx{position:absolute;top:12px;right:12px;width:36px;height:36px;border-radius:50%;font-size:24px;line-height:1;color:var(--muted)}
.bt-mx:hover{background:var(--sky)}
.bt-mpanel .fld{margin-bottom:12px}
.bt-mpanel .fld label{margin-left:2px}
.bt-merr{font-size:13px;color:var(--warn);background:var(--warn-l);border-radius:10px;padding:9px 12px;margin:0 0 12px}
.bt-mok{width:52px;height:52px;border-radius:50%;background:var(--ok-l);color:var(--ok);font-size:26px;font-weight:700;display:grid;place-items:center;margin-bottom:12px}

/* Thanh kết quả trên điện thoại */
.bt-mbar{display:none}

@media (max-width:1100px){
	.bt-main{grid-template-columns:1fr}
	.bt-res{position:static;max-height:none;overflow:visible}
	.bt-grid{grid-template-columns:1fr 1fr}
	.bt-mbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--navy);color:#fff;padding:10px 16px calc(10px + env(safe-area-inset-bottom));align-items:center;gap:12px;box-shadow:0 -6px 20px rgba(28,47,94,.18)}
	.bt-ml{font-size:12px;opacity:.8;line-height:1.3}
	.bt-mv{font-size:18px;font-weight:700}
	.bt-mbar button{margin-left:auto;height:38px;padding:0 16px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-weight:600;font-size:13.5px;white-space:nowrap}
	body.bt-page{padding-bottom:64px}
	body.bt-page .float{bottom:78px}
	body.bt-page .totop{bottom:78px}
}
@media (max-width:640px){
	.bt-grid{gap:10px}
	.bt-s2{grid-column:1/-1}
	.bt-card{padding:16px}
	.bt-sub{margin-left:0}
	.bt-tabs{display:flex;width:100%}
	.bt-tabs button{flex:1;padding:9px 10px;font-size:13px}
	.bt-big .bt-bv{font-size:26px}
	.bt-chart{height:230px}
	.bt-sw{font-size:12.5px}
}
