/* NHỊP V2.99 — Hài hoà nút · canh giữa chữ trong nhãn · AI Khối ngoại dựng theo mẫu "AI phân tích tin"
   Nạp CUỐI CÙNG. Chỉ dùng biến giao diện của ứng dụng (--brand, --line, --surface, --text, --muted) nên tự theo:
   Light Pro / Dark Pro / Soft Comfort / Blue Finance · màu nhận diện · mật độ (data-den) · cỡ chữ · tương phản cao (data-hc) · giảm chuyển động (data-rm). */
:root{--fx-bh:36px;--fx-acc:var(--brand,var(--green,#0eb889))}
html[data-den="compact"]{--fx-bh:32px}

/* ===== 1. Mọi nút .btn: chữ canh giữa cả hai chiều (sửa "Mở trợ lý AI đầy đủ" bị dính mép trên) ===== */
a.btn,button.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-align:center;line-height:1.2;text-decoration:none;box-sizing:border-box}

/* ===== 2. Nút của module Khối ngoại: một bộ duy nhất (mặc định · chính · chuyển tiếp →) ===== */
html body .fx .fx-btn,html body .fx a.fx-btn{
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:var(--fx-bh);min-height:var(--fx-bh)!important;padding:0 14px;margin:0;
  border:1px solid var(--line2,var(--line));border-radius:10px;background:var(--surface2,var(--surface));color:var(--text);
  font:inherit;font-size:13px;font-weight:700;line-height:1;text-align:center;text-decoration:none;white-space:nowrap;cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,transform .1s}
html body .fx .fx-btn:hover{border-color:var(--fx-acc);color:var(--fx-acc)}
html body .fx .fx-btn:active{transform:scale(.98)}
html body .fx .fx-btn:focus-visible{outline:2px solid var(--fx-acc);outline-offset:2px}
html body .fx .fx-btn:disabled,html body .fx .fx-btn.busy{opacity:.6;cursor:default;pointer-events:none}
html body .fx .fx-btn.pri{background:var(--fx-acc);border-color:var(--fx-acc);color:#fff}
html body .fx .fx-btn.pri:hover{filter:brightness(.95);color:#fff}
html body .fx .fx-btn.go{color:var(--fx-acc);background:color-mix(in srgb,var(--fx-acc) 8%,transparent);border-color:color-mix(in srgb,var(--fx-acc) 38%,transparent)}
html body .fx .fx-btn.go::after{content:"→";font-weight:800;transition:transform .15s}
html body .fx .fx-btn.go:hover{background:color-mix(in srgb,var(--fx-acc) 16%,transparent)}
html body .fx .fx-btn.go:hover::after{transform:translateX(2px)}
html[data-rm="1"] .fx .fx-btn,html[data-rm="1"] .fx .fx-btn.go::after{transition:none!important}
html[data-hc="1"] .fx .fx-btn{border-width:2px}
html[data-hc="1"] .fx .fx-btn.go{border-color:currentColor}
@media(prefers-reduced-motion:reduce){html body .fx .fx-btn,html body .fx .fx-btn.go::after{transition:none}}

/* Chân thẻ: nút luôn nằm đáy thẻ, các thẻ cùng hàng thẳng hàng với nhau */
.fx-card.fx-col{display:flex;flex-direction:column}
.fx-ft{margin-top:auto;padding-top:12px;display:flex;gap:8px;flex-wrap:wrap}
.fx-ft .fx-btn{flex:1 1 auto;width:100%}
.fx-ft.c{justify-content:center}.fx-ft.c .fx-btn{width:auto;flex:0 0 auto;min-width:150px}
.fx-ft.l{justify-content:flex-start}.fx-ft.l .fx-btn{width:auto;flex:0 0 auto}
.fx-card.fx-col>.fx-ul{margin-bottom:0}

/* Hàng ô nhập + nút: nút cao bằng ô nhập */
html body .fx .fx-f{align-items:stretch}
html body .fx .fx-f .fx-btn{height:auto;min-height:40px!important;flex:0 0 auto}

/* Đầu trang: nhãn "Sàn HNX" và nút "Làm mới" cùng chiều cao, chữ giữa */
html body .fx .fx-hr{align-items:center;gap:8px}
html body .fx .fx-hr .fx-exn{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--fx-bh);padding:0 14px;font-size:13px;line-height:1;margin:0}
html body .fx .fx-card h3 .fx-exn{height:auto;padding:3px 9px;font-size:12px;line-height:1.2}

/* ===== 3. AI phân tích khối ngoại (cùng khung với "AI phân tích tin") ===== */
.fx-aip .row{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}.fx-aip .row>.btn{flex:1 1 auto}
.fx-aip .row>.btn{min-height:38px}
.fx-aip #fx-ai{margin-top:12px}.fx-aip #fx-ai:empty{display:none}
.fx-aip .nhc{margin:0}
.fx-aip .fx-sg{margin-top:14px}
.fx-aip .fx-lb{display:block;font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.fx-aip .fx-chips{margin:0}
.fx-aip .nhc-comp{margin-top:14px}

/* ===== 4. Canh giữa chữ trong mọi nhãn · chip · tab · nút nhỏ ===== */
.nhc-ex,.nhc-kind,.nhc-chip,.nhc-tag,.nhc-pill,.fx-tag,.fx-exn,.nwd-imp,.nwd-snt,.nwd-badge,.nwd-chip,.nw-tag,
.nhc-links a,.nhc-links button,.nhc-syms button,.aix-acts button,.aix-fu button,.aix-stop,.aix-al .btn,
.fx-seg button,.fx-chips button,.fx-rng button,.fx-tabs button{
  display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.25}
.fx-chips button{height:auto;padding:7px 12px;line-height:1.3}
.fx-tabs button,.fx-seg button,.fx-rng button{line-height:1}
.fx-tabs button{justify-content:center}
.nhc-top{align-items:center}
.nhc-kind{padding:0}
