/* Web trade — giao diện theo skill webtrade-ui. Chỉ dùng var(--…) từ tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: var(--fs-base)/var(--lh-base) var(--font-ui);
  min-height: 100vh; display: flex; flex-direction: column;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1 { font: 600 var(--fs-lg)/var(--lh-tight) var(--font-display); margin: 0 0 var(--sp-3); }
h2 { font: 600 var(--fs-md)/var(--lh-tight) var(--font-display); margin: var(--sp-6) 0 var(--sp-2); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.up { color: var(--up); } .down { color: var(--down); } .ref { color: var(--ref); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--sp-2) 0 0; }
.empty { color: var(--text-muted); margin: 0; padding: var(--sp-6); }

button {
  font: inherit; color: var(--text); background: transparent; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--sp-1) var(--sp-3);
}
button:hover { background: var(--surface-2); }
button[disabled] { opacity: 0.45; cursor: not-allowed; }
select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: var(--sp-1) var(--sp-2);
}

/* Thanh trên */
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-4); padding: 0 var(--sp-4);
  background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); white-space: nowrap; }
/* Logo gốc nền trắng: đặt trong khung trắng nhỏ để nền tối không lộ viền */
.brand-logo { height: 40px; width: auto; background: var(--logo-bg); border-radius: var(--radius); padding: 0 var(--sp-1); }
.brand-text { display: grid; line-height: var(--lh-tight); padding-left: var(--sp-3); border-left: 2px solid var(--brand-gold); }
.brand-text b { font: 600 var(--fs-md) var(--font-display); letter-spacing: 0.02em; }
.brand-text .faint { font-size: var(--fs-xs); }
.pill { display: inline-block; margin-left: var(--sp-1); padding: 0 var(--sp-2); border: 1px solid var(--brand-gold); border-radius: var(--radius); font-size: var(--fs-xs); color: var(--text-muted); }
.tabs .stage { align-self: center; font-size: var(--fs-sm); }
.index { display: inline-flex; gap: var(--sp-2); align-items: baseline; font-size: var(--fs-sm); white-space: nowrap; }
.index b { font: 600 var(--fs-sm) var(--font-display); }
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2); white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: var(--fs-sm); color: var(--text-muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-faint); }
.dot.tuoi { background: var(--fresh); } .dot.cu { background: var(--stale); } .dot.dung, .dot.loi { background: var(--stopped); }
.spacer { flex: 1; }
.banner { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); font-weight: 600; background: var(--fake-bg); color: var(--fake-text); }
.banner.error { background: var(--surface-2); color: var(--down); }

/* Tab */
.tabs { display: flex; gap: var(--sp-1); padding: 0 var(--sp-4); overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface); }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: var(--sp-2) var(--sp-3); color: var(--text-muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand-gold); }
.count { color: var(--warn); font-size: var(--fs-xs); }

main { flex: 1; padding: var(--sp-4); }
.view-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.view-head h1 { margin: 0; }
footer { display: flex; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-sm); }

/* Dòng tổng */
.summary {
  display: flex; flex-wrap: wrap; gap: var(--sp-6); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.summary div { display: grid; }
.summary .label { font-size: var(--fs-xs); color: var(--text-muted); }
.summary .value { font-size: var(--fs-md); }
.summary button.link { border: 0; padding: 0; text-align: left; color: var(--warn); font-size: var(--fs-md); }

/* Bảng */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.grid { border-collapse: collapse; width: 100%; }
.grid th, .grid td { height: var(--row-h); padding: 0 var(--sp-3); border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.grid th { position: sticky; top: 0; background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-size: var(--fs-sm); }
.grid th.num, .grid td.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.grid thead tr.group th { height: 24px; font-size: var(--fs-xs); text-align: center; }
.grid thead tr.group th + th { border-left: 1px solid var(--line); }
.grid thead tr.cols th { top: 24px; }
.grid tbody tr:hover { background: var(--surface-2); }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid td.ticker { font: 600 var(--fs-base) var(--font-display); }
.grid td.note { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.grid tr.faint-row td { color: var(--text-faint); }
.grid.dense th, .grid.dense td { height: var(--row-h-dense); font-size: var(--fs-dense); }
.sub { display: block; font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.1; }
.sub.stale { color: var(--stale); }
.expander { border: 0; padding: 0 var(--sp-1) 0 0; color: var(--text-muted); font: inherit; }
.expander[aria-expanded="true"] .caret { display: inline-block; transform: rotate(90deg); }
.caret { display: inline-block; width: 12px; transition: transform 120ms; }
@media (prefers-reduced-motion: reduce) { .caret { transition: none; } }

.badge { display: inline-block; padding: 0 var(--sp-2); border-radius: var(--radius); font-size: var(--fs-xs); border: 1px solid currentColor; line-height: 18px; }
.badge.warn { color: var(--warn); } .badge.down { color: var(--down); } .badge.muted { color: var(--text-muted); }
.warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: var(--sp-1); vertical-align: middle; }

/* Thanh vị trí giá: vạch đỏ = stop, vạch chữ = giá vốn, chấm = giá hiện tại */
.range { position: relative; display: inline-block; width: 72px; height: 10px; vertical-align: middle; margin-left: var(--sp-2); }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--line-strong); }
.range i { position: absolute; top: 0; width: 2px; height: 10px; }
.range i.stop { background: var(--down); }
.range i.cost { background: var(--text); }
.range b { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; }
.range b.up { background: var(--up); } .range b.down { background: var(--down); } .range b.ref { background: var(--ref); }

/* Chi tiết vị thế */
tr.detail > td { background: var(--bg); padding: var(--sp-3) var(--sp-4); white-space: normal; height: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: var(--sp-4); }
.detail-block h3 { font: 600 var(--fs-sm) var(--font-display); margin: 0 0 var(--sp-2); }
.detail-block table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.detail-block th, .detail-block td { padding: 2px var(--sp-2); border-bottom: 1px solid var(--line); text-align: left; }
.detail-block th { color: var(--text-muted); font-weight: 600; }
.detail-block .num { text-align: right; font-variant-numeric: tabular-nums; }
.detail-block dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--sp-3); margin: var(--sp-2) 0 0; font-size: var(--fs-sm); }
.detail-block dt { color: var(--text-muted); }
.detail-block dd { margin: 0; }
.mono { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); }

.fold { margin-top: var(--sp-4); }
.fold summary { cursor: pointer; color: var(--text-muted); padding: var(--sp-2) 0; }
.fold .table-wrap { margin-top: var(--sp-2); }

/* Nút nhóm */
.segmented { display: inline-flex; }
.segmented button { border-radius: 0; margin-left: -1px; }
.segmented button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.segmented button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.segmented button[aria-pressed="true"], #dense[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: var(--brand-gold); }

/* Nháy ô giá khi đổi — chuyển động duy nhất */
@keyframes flash-up { from { background: color-mix(in srgb, var(--up) 30%, transparent); } to { background: transparent; } }
@keyframes flash-down { from { background: color-mix(in srgb, var(--down) 30%, transparent); } to { background: transparent; } }
.flash-up { animation: flash-up var(--flash-ms) ease-out; }
.flash-down { animation: flash-down var(--flash-ms) ease-out; }

/* Chart: trái thông tin vị thế · giữa chart · phải nhật ký của mã */
.chart-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; } /* Boss 14/10 20:00: chart chiếm trọn chiều ngang */
.chart-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); font-size: var(--fs-sm); }
.chart-side h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-base); }
.chart-side dl { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-1) var(--sp-3); margin: 0; }
.chart-side dt { color: var(--text-muted); }
.chart-side dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.chart-main { min-width: 0; }
.chart-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-2); }
.chart-head select { font: 600 var(--fs-lg) var(--font-display); }
.chart-price { display: grid; }
.chart-price .big { font: 600 var(--fs-xl) var(--font-display); font-variant-numeric: tabular-nums; }
.chart-price .when { font-size: var(--fs-xs); color: var(--text-faint); }
.chart-legend { font-size: var(--fs-xs); color: var(--chart-text); min-height: 36px; font-variant-numeric: tabular-nums; }
.chart-legend div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 3 ô theo sheet PLAN (37/41/22) cần cao hơn chart một ô */
.chart-box { position: relative; height: max(560px, calc(100vh - 250px)); background: var(--chart-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-box .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.chart-foot { display: flex; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-2); }
.chart-note { flex: 1; font-size: var(--fs-xs); color: var(--text-muted); }
.chart-note .stale-text { color: var(--stale); }
.chart-note details { margin-top: var(--sp-1); }
.chart-note summary { cursor: pointer; color: var(--warn); }
.chart-note ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }
.journal-item { border-bottom: 1px solid var(--line); padding: var(--sp-2) 0; }
.journal-item:last-child { border-bottom: 0; }
.journal-item .line1 { display: flex; gap: var(--sp-2); align-items: baseline; }
.journal-item .why { color: var(--text-muted); }
.journal-item.huy { opacity: 0.6; text-decoration: line-through; }
.journal-day h2 { margin-top: var(--sp-4); }
.inbox-item { border-left: 2px dashed var(--line-strong); padding-left: var(--sp-2); }
.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-4); align-items: start; }
.entry-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.entry-form label { display: grid; gap: 2px; color: var(--text-muted); }
.entry-form label[hidden] { display: none; }
.entry-form .wide { grid-column: 1 / -1; }
.entry-form input, .entry-form select { width: 100%; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
input {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: var(--sp-1) var(--sp-2); min-width: 0;
}
input:disabled { opacity: 0.5; }
button.primary { border-color: var(--brand-gold); }

/* Bảng sửa Danh mục */
.editor { margin-top: var(--sp-6); border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.editor .view-head { flex-wrap: wrap; }
.editor .view-head h2 { margin: 0; }
.editor .detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr)); gap: var(--sp-4); }
.editor .detail-block { min-width: 0; overflow-x: auto; }
.ed-table { width: 100%; }
.ed-table td:first-child { white-space: nowrap; }
.ed-table input { width: 7em; }
.ed-line input { min-width: 0; }
.ed-table { border-collapse: collapse; margin-bottom: var(--sp-2); }
.ed-table th, .ed-table td { padding: 2px var(--sp-2); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ed-table td.mono { font-size: var(--fs-xs); max-width: 260px; overflow-wrap: anywhere; }
.ed-table .actions { white-space: nowrap; }
.ed-table input { font-variant-numeric: tabular-nums; text-align: right; }
.ed-line { display: flex; gap: var(--sp-2); align-items: center; margin: var(--sp-1) 0; }
.ed-line.wrap { flex-wrap: wrap; }
.ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.ed-grid label { display: grid; gap: 2px; color: var(--text-muted); }
.ed-grid .wide { grid-column: 1 / -1; }
input.dirty { border-color: var(--brand-gold); }
tr.dirty-row td:first-child { box-shadow: inset 3px 0 0 var(--brand-gold); }
.chip-btn { font-size: var(--fs-sm); padding: 0 var(--sp-2); }
#ed-status.ok { color: var(--fresh); } #ed-status.warn { color: var(--warn); } #ed-status.down { color: var(--down); }

/* Cột phải màn Chart: nhật ký trên, chat Bee06 dưới */
.chart-right { display: grid; gap: var(--sp-3); }
.chat { background: var(--surface); border: 1px solid var(--brand-gold); border-radius: var(--radius); font-size: var(--fs-sm); }
.chat-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); }
.chat-head img { border-radius: 50%; }
.chat-head div { display: grid; flex: 1; line-height: var(--lh-tight); }
.chat-body { padding: var(--sp-3); }
.chat-body p { margin: 0 0 var(--sp-3); }
.chat-form { display: flex; gap: var(--sp-2); }
.chat-form input { flex: 1; }

/* Dữ liệu */
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-3); }
.source { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); font-size: var(--fs-sm); }
.source h3 { margin: 0 0 var(--sp-1); font: 600 var(--fs-base) var(--font-display); display: flex; gap: var(--sp-2); align-items: center; }
.source p { margin: var(--sp-1) 0 0; }

@media (max-width: 1365px) {
  .chart-right { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .journal-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; height: auto; padding: var(--sp-2) var(--sp-4); gap: var(--sp-2) var(--sp-4); }
  .chart-layout, .journal-layout, .chart-right { grid-template-columns: minmax(0, 1fr); }
  .tabs .stage { display: none; }
}
#entry-result.ok { color: var(--fresh); } #entry-result.warn { color: var(--warn); } #entry-result.down { color: var(--down); }
.detail-grid.editing { grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); } .detail-grid.editing .detail-block { min-width: 0; overflow-x: auto; }
.ed-line label.grow { flex: 1; display: flex; align-items: center; gap: var(--sp-1); min-width: 260px; } .ed-line label.grow input { flex: 1; text-align: left; }

/* Thanh trên: dải vị thế (màn Chart) và nút Tư vấn Bee06 — Boss 14/10 20:00 */
.pos-strip { display: inline-flex; align-items: baseline; gap: var(--sp-3); padding: 2px var(--sp-3); border-left: 2px solid var(--brand-gold); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; min-width: 0; }
.pos-strip[hidden] { display: none; }
.pos-ticker { font: 600 var(--fs-base) var(--font-display); }
.pos-item { display: inline-flex; gap: var(--sp-1); align-items: baseline; }
.chat-btn { display: inline-flex; align-items: center; gap: var(--sp-1); border-color: var(--brand-gold); }
.chat-btn img { border-radius: 50%; }
.chat-btn[aria-expanded="true"] { background: var(--surface-2); }
.chat-pop { position: fixed; top: calc(var(--topbar-h) + var(--sp-2)); right: var(--sp-4); width: min(360px, calc(100vw - 2 * var(--sp-4))); z-index: 20; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
.chat-pop[hidden] { display: none; }
@media (max-width: 1365px) { .pos-strip .pos-item:nth-of-type(n+6) { display: none; } }.topbar button, #updated { white-space: nowrap; flex-shrink: 0; }
.topbar .pos-strip { flex: 0 1 auto; }
@media (max-width: 1599px) { .brand-text .faint, #updated { display: none; } .chat-btn .lbl-long { display: none; } }
.topbar .pos-strip { flex-wrap: wrap; height: 1.5em; line-height: 1.5em; column-gap: var(--sp-3); } /* mục không đủ chỗ rơi xuống dòng ẩn: không cắt giữa con số */
@media (max-width: 1599px) { #session-chip { display: none; } }
/* Boss 14/10 20:04: khung đầu chart gom về 1 dòng (tối đa 2 dòng chữ nhỏ), chừa chiều cao cho chart */
.chart-head { gap: var(--sp-3); margin-bottom: var(--sp-1); align-items: center; }
.chart-head select { font: 600 var(--fs-base) var(--font-display); padding: 2px var(--sp-1); }
.chart-price { display: flex; align-items: baseline; gap: var(--sp-2); white-space: nowrap; }
.chart-price .big { font-size: var(--fs-lg); }
.chart-head .chart-legend { flex: 1; min-width: 0; min-height: 0; line-height: 1.35; max-height: 2.7em; overflow: hidden; }
.chart-head .chart-legend div { display: inline; white-space: normal; }
.chart-head .chart-legend div + div::before { content: " · "; }
.chart-box { height: max(560px, calc(100vh - 175px)); }
.tf-switch button { padding: 2px var(--sp-3); font-weight: 600; } .tf-switch button[aria-pressed="true"] { background: var(--brand-gold); color: var(--brand-ink); border-color: var(--brand-gold); }

.flow-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-xs); margin-bottom: var(--sp-1); min-height: 18px; }
.flow-item { display: inline-flex; align-items: center; gap: var(--sp-1); }
.flow-buy { color: var(--chart-up); } .flow-sell { color: var(--chart-down); }
:root:not([data-theme="light"]) .flow-buy { color: var(--floor); } :root:not([data-theme="light"]) .flow-sell { color: var(--down); }
.flow-bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; }
.flow-bars i { display: block; width: 4px; background: var(--line-strong); }
.flow-bars i.buy { background: var(--chart-up); } .flow-bars i.sell { background: var(--chart-down); }
/* Boss 15/10 13:14: dải dòng tiền to gấp đôi */
.flow-strip { font-size: var(--fs-md); gap: var(--sp-2) var(--sp-8); min-height: 34px; margin-bottom: var(--sp-2); }
.flow-strip b { font-size: var(--fs-md); }
.flow-item { gap: var(--sp-2); }
.flow-item .num { font-size: var(--fs-lg); }
.flow-bars { height: 28px; gap: 2px; }
.flow-bars i { width: 8px; }
/* Boss 15/10 19:58: dòng tiền nằm chung dòng đầu chart (thay chỗ dãy số chỉ báo đã bỏ) */
.chart-head .flow-strip { flex: 1; min-width: 0; margin: 0 0 0 var(--sp-6); min-height: 0; flex-wrap: nowrap; }
.chart-head .chart-legend[hidden] { display: none; }
.chart-box { height: max(560px, calc(100vh - 130px)); }
/* Boss 15/10 20:04: ô mã gõ được */
.ticker-input input { width: 7.5em; font: 600 var(--fs-base) var(--font-display); padding: 2px var(--sp-2); text-transform: uppercase; background: var(--surface); color: inherit; border: 1px solid var(--line-strong); border-radius: 4px; }
.ticker-input input:focus { outline: 2px solid var(--brand-gold); outline-offset: 0; }
.ticker-input input[aria-invalid="true"] { border-color: var(--down); outline-color: var(--down); }
.ticker-input input { width: 5.5em; }
.chart-head .flow-strip, .chart-head .flow-strip * { white-space: nowrap; }
.chart-head .flow-strip { gap: var(--sp-2) var(--sp-6); overflow: hidden; }
/* Boss 18/10 14:14 #2463: dòng tiền đầu chart là 3 thẻ biểu đồ như dải Bảng giá. */
.chart-head .flow-strip:has(.mkt-card) { gap: var(--sp-2); flex-wrap: nowrap; overflow-x: auto; }
.chart-head .flow-strip .mkt-card { flex: 1 0 190px; max-width: 280px; padding: 4px 10px; }
.chart-head .flow-strip .mkt-value { font-size: 18px; }
/* Boss 18/10 15:40 #2532: thẻ dòng tiền thấp còn 2/3 (bỏ dòng chú thích nhỏ, cột thấp lại; chú thích vẫn hiện khi rê chuột). */
.chart-head .flow-strip .mkt-card { padding: 2px 10px; gap: 0; }
.chart-head .flow-strip .mkt-sub { display: none; }
.chart-head .flow-strip .mkt-value { font-size: 16px; }
.chart-head .flow-strip .mkt-spark { height: 20px; }
/* Boss #2396 18/10: điện thoại (390 px) đầu chart không tràn ngang; dòng tiền và chú giải xuống dòng riêng. */
@media (max-width: 760px) {
  .chart-head { flex-wrap: wrap; row-gap: var(--sp-1); }
  .chart-head .flow-strip, .chart-head .chart-legend { flex: 1 1 100%; margin-left: 0; }
}

.chart-box { position: relative; }
.chart-event-tip { position: absolute; z-index: 5; max-width: 330px; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); line-height: 1.4; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none; }
.chart-event-tip[hidden] { display: none; }

.pane-legend { position: absolute; left: 6px; z-index: 4; max-width: calc(100% - 90px); padding: 1px 5px; font-size: 11px; line-height: 1.35;
  color: var(--chart-text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--chart-bg) 78%, transparent); border-radius: 3px; pointer-events: none; }
.pane-legend:empty { display: none; }
.pane-legend b { font-weight: 600; }
/* Boss #3651 21/10: đầu chart cân tỉ lệ, chữ to hơn: ô mã, nút khung, giá cùng cao 36px; dòng chỉ báo trong chart 13px. */
.pane-legend { font-size: 13px; padding: 2px 7px; }
.chart-head .ticker-input input { font-size: 16px; height: 36px; width: 5.2em; padding: 0 var(--sp-2); box-sizing: border-box; }
.chart-head .tf-switch button { font-size: 15px; height: 36px; padding: 0 var(--sp-4); }
.chart-price .big { font-size: 24px; }
.chart-price { font-size: 15px; }
.chart-event-tip div + div { margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
/* Báo cáo tài chính các mã đang giữ (Bee02, Boss 16/10) */
.bctc-source { font-size: var(--fs-sm); margin: 0 0 var(--sp-3); }
.bctc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--sp-3); }
.bctc-card { border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-3); background: var(--surface); display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-sm); }
.bctc-card header { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.bctc-ticker { font: 700 var(--fs-lg) var(--font-display); }
.bctc-bars { display: flex; gap: var(--sp-3); align-items: flex-end; }
.bctc-bar { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--fs-xs); min-width: 56px; }
.bctc-bar i { display: block; width: 22px; background: var(--chart-up); border-radius: 2px 2px 0 0; }
.bctc-bar i.neg { background: var(--chart-down); }
.bctc-ratios { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.bctc-card ul { margin: 0; padding-left: 1.1em; }
.bctc-good li::marker { content: '+ '; color: var(--chart-up); }
.bctc-warn li::marker { content: '⚠ '; color: var(--chart-down); }
/* Nhật ký = việc trên danh mục theo ngày (Boss 16/10 09:59) */
.action-item .journal-line { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.action-item .pill.up { color: var(--chart-up); border-color: var(--chart-up); } .action-item .pill.down { color: var(--chart-down); border-color: var(--chart-down); }
.action-item .pill.warn { color: var(--chart-event); border-color: var(--chart-event); }
/* Học cùng Bee04 (Boss 16/10) */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-4); align-items: start; }
.lesson { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
.lesson summary { cursor: pointer; display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.lesson.draft { border-style: dashed; }
.lesson .pill.warn { color: var(--chart-event); border-color: var(--chart-event); }
.lesson-body { max-width: 860px; line-height: 1.6; font-size: var(--fs-base); }
.lesson-body h3 { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--fs-md); } .lesson-body h4 { margin: var(--sp-3) 0 var(--sp-1); }
.lesson-body p { margin: var(--sp-1) 0; } .lesson-body ul { margin: var(--sp-1) 0; padding-left: 1.3em; }
.lesson-fig { margin: var(--sp-3) 0; } .lesson-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.lesson-fig figcaption { font-size: var(--fs-sm); margin-top: var(--sp-1); }
.lesson-topic { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-md); }
.lesson-topic:first-child { margin-top: 0; }
.lesson-table { overflow-x: auto; margin: var(--sp-2) 0; }
.lesson-table table { border-collapse: collapse; font-size: .92em; }
.lesson-table th, .lesson-table td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; vertical-align: top; }
.lesson-table th { background: var(--surface); }
.lesson-summary { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-strong); border-left: 4px solid var(--accent, #d4a017); border-radius: 6px; background: var(--surface); }
.lesson-summary h3:first-child { margin-top: 0; }
.lesson-more { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--line-strong); border-radius: 6px; }
.lesson-more > summary { cursor: pointer; font-weight: 600; color: var(--muted, inherit); }
.lesson-more[open] > summary { margin-bottom: var(--sp-2); }
/* Quiz bấm chọn (Bee04 #1706): chọn một lần, hiện đúng/sai và nguồn; xanh = đáp án đúng, đỏ = chọn sai. */
.quiz { display: grid; gap: var(--sp-3); margin: var(--sp-2) 0; }
.quiz-q { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.quiz-opts { display: grid; gap: 6px; margin-top: var(--sp-1); }
.quiz-opt { text-align: left; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent, #d4a017); }
.quiz-opt:disabled { cursor: default; opacity: .75; }
.quiz-opt.ok { border-color: var(--up, #1a9e4b); background: color-mix(in srgb, var(--up, #1a9e4b) 16%, transparent); opacity: 1; }
.quiz-opt.bad { border-color: var(--down, #d6232a); background: color-mix(in srgb, var(--down, #d6232a) 16%, transparent); opacity: 1; }
.quiz-note { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); font-weight: 600; }
.quiz-note[hidden] { display: none; }
.quiz-foot { display: flex; align-items: center; gap: var(--sp-3); }
.lesson-plan { padding-left: 1.6em; line-height: 1.6; font-size: var(--fs-sm); }
@media (max-width: 1100px) { .lesson-layout { grid-template-columns: 1fr; } }

/* Nút tắt mở bản online cho khách (Boss 16/10 17:26) */
.online-ctl { display: inline-flex; align-items: center; gap: var(--sp-2); }
#online-btn[aria-pressed="true"] { border-color: var(--up); color: var(--up); }
#online-url { font-size: var(--fs-sm); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bản khách online: nút Đăng xuất là form POST nằm trên thanh trên (Boss 16/10 18:55) */
.topbar .logout { display: contents; }
.topbar .logout[hidden], .login-link[hidden] { display: none; }
/* Bản khách công khai (Boss 17/10 16:35): mục riêng của Leader hiện khung mời đăng nhập. */
.login-link { display: inline-flex; align-items: center; padding: 4px var(--sp-3); border: 1px solid var(--brand-gold); border-radius: var(--radius);
  background: var(--brand-gold); color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.view.locked > :not(.lock-card) { display: none !important; }
.lock-card { display: grid; justify-items: center; gap: var(--sp-2); max-width: 560px; margin: var(--sp-5, 32px) auto; padding: var(--sp-5, 32px) var(--sp-4, 24px);
  text-align: center; background: var(--surface); border: 1px solid var(--line-strong); border-top: 3px solid var(--brand-gold); border-radius: 12px; }
.lock-card .lock-art { color: var(--brand-gold); line-height: 0; }
.lock-card h2 { margin: var(--sp-2) 0 0; font-size: 1.25rem; color: var(--text); }
.lock-card p { margin: 0; color: var(--text-muted); max-width: 44ch; }
.lock-card .btn.primary { margin-top: var(--sp-2); padding: 8px 28px; border-radius: 999px; background: var(--brand-gold); color: var(--brand-ink);
  font-weight: 700; text-decoration: none; }
.lock-card .faint { font-size: var(--fs-sm); }
.tabs .tab-locked::after { content: "🔒"; margin-left: 5px; font-size: .75em; opacity: .7; }
.brand-logo.bee-logo { background: transparent; padding: 0; } /* logo ong nét vàng, nền trong (Boss 16/10 19:37) */
.bctc-group { grid-column: 1 / -1; margin: var(--sp-2) 0 0; font-size: var(--fs-md, 1rem); color: var(--text); }
/* Tab Tin tức (Boss 16/10 20:21): tin Bee01 kèm link nguồn. */
.news-source { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); }
.news-block { margin-bottom: var(--sp-4); }
.news-block h2 { font-size: var(--fs-md, 1rem); margin: 0 0 var(--sp-2); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--sp-3); }
.news-item { border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-3); background: var(--surface); display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-sm); }
.news-item header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.news-item p { margin: 0; }
.news-title { font-size: var(--fs-md, 1rem); line-height: 1.35; }
.news-ticker { font-weight: 700; margin-right: var(--sp-1); }
.news-meta { color: var(--text-faint); font-size: var(--fs-xs); }
.news-meta a { color: var(--accent, inherit); }
.news-cal { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.news-cal p { margin: 2px 0 0; }
.news-date { min-width: 52px; text-align: center; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--warn-bg, rgba(240,190,60,.18)); color: var(--warn, inherit); }
.news-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: var(--sp-3); }
.news-board { display: flex; flex-direction: column; gap: var(--sp-2); }
/* Giá vàng SJC, USD trong nước (Bee01, Boss 16/10 20:51) trên bảng Thế giới. */
.vn-quotes { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.vn-quote { border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-2) var(--sp-3); background: var(--surface); font-size: var(--fs-sm); }

/* Dải tổng quan thị trường trên Bảng giá (Boss 17/10 21:55 #2295): thẻ nhỏ kèm sparkline, kiểu thẻ số liệu tối. */
#view-bang-gia .view-head { flex-wrap: wrap; }
.mkt-strip { flex: 1 1 640px; min-width: 0; display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 2px; }
.mkt-card { flex: 1 0 168px; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(160deg, #18202b, #10151d); border: 1px solid rgba(255,255,255,.08); color: #e8edf3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.mkt-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.mkt-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9aa7b6; white-space: nowrap; }
.mkt-badge { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.06); white-space: nowrap; }
.mkt-mid { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); }
.mkt-value { font-size: 20px; font-weight: 700; line-height: 1.1; white-space: nowrap; color: #f2f5f8; }
.mkt-card .up { color: #2fd18b; } .mkt-card .down { color: #ff5d6c; } .mkt-card .ref { color: #f0be3c; }
.mkt-value.up, .mkt-value.down, .mkt-value.ref { color: #f2f5f8; }
.mkt-sub { font-size: 11px; color: #8592a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-spark { width: 96px; height: 30px; flex: 0 0 auto; overflow: visible; }
.mkt-wait { display: block; border-bottom: 1px dashed rgba(255,255,255,.18); }
.mkt-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.mkt-line.up { stroke: #2fd18b; filter: drop-shadow(0 0 3px rgba(47,209,139,.6)); }
.mkt-line.down { stroke: #ff5d6c; filter: drop-shadow(0 0 3px rgba(255,93,108,.6)); }
.mkt-line.ref { stroke: #f0be3c; }
.mkt-area { stroke: none; opacity: .16; } .mkt-area.up { fill: #2fd18b; } .mkt-area.down { fill: #ff5d6c; } .mkt-area.ref { fill: #f0be3c; }
.mkt-dot.up { fill: #2fd18b; } .mkt-dot.down { fill: #ff5d6c; } .mkt-dot.ref { fill: #f0be3c; }
.mkt-base { stroke: rgba(255,255,255,.22); stroke-dasharray: 2 3; stroke-width: 1; }
.mkt-bar.up { fill: #2fd18b; opacity: .85; } .mkt-bar.down { fill: #ff5d6c; opacity: .85; }
/* Boss 18/10 06:10 #2322: nền sáng thì thẻ vàng kem nhẹ cùng tone vàng Bee; nền đen giữ thẻ tối. */
/* Boss #2324: gradient chuyển nhạt — trắng gần trong suốt sang kem rất nhạt, thoáng vàng Bee ở góc. */
:root[data-theme="light"] .mkt-card { background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(255,250,238,.8) 55%, rgba(255,238,196,.55) 100%);
  border-color: rgba(236,217,168,.6); color: #3a2f17; box-shadow: 0 1px 3px rgba(150,110,20,.06); backdrop-filter: blur(2px); }
:root[data-theme="light"] .mkt-title { color: #8a6d2c; }
:root[data-theme="light"] .mkt-value, :root[data-theme="light"] .mkt-value.up, :root[data-theme="light"] .mkt-value.down, :root[data-theme="light"] .mkt-value.ref { color: #2b2210; }
:root[data-theme="light"] .mkt-sub { color: #8c7a55; }
:root[data-theme="light"] .mkt-badge { background: rgba(200,150,40,.12); }
:root[data-theme="light"] .mkt-card .up { color: #12935a; } :root[data-theme="light"] .mkt-card .down { color: #d63447; }
:root[data-theme="light"] .mkt-line.up { stroke: #12935a; filter: none; } :root[data-theme="light"] .mkt-line.down { stroke: #d63447; filter: none; }
:root[data-theme="light"] .mkt-area.up, :root[data-theme="light"] .mkt-dot.up, :root[data-theme="light"] .mkt-bar.up { fill: #12935a; }
:root[data-theme="light"] .mkt-area.down, :root[data-theme="light"] .mkt-dot.down, :root[data-theme="light"] .mkt-bar.down { fill: #d63447; }
:root[data-theme="light"] .mkt-base { stroke: rgba(120,90,30,.35); }
:root[data-theme="light"] .mkt-wait { border-bottom-color: rgba(120,90,30,.3); }
.mkt-asia { flex: 2 0 320px; padding-bottom: 0; }

/* Bản đồ nhiệt & dòng tiền ngành (Boss 18/10 06:16 #2328). */
/* Boss #2342: bản đồ nhiệt là tab riêng; bản đồ to, dòng tiền ngành cột phải. */
.heat-mode { display: inline-flex; vertical-align: middle; margin-left: var(--sp-2); }
.heat-mode button { font-size: 11px; padding: 0 8px; }
.heat { margin-bottom: var(--sp-3); }
.heat summary { cursor: pointer; font-weight: 600; padding: var(--sp-1) 0; }
.heat summary .faint { font-weight: 400; font-size: var(--fs-sm); }
.heat-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-3); }
.heat-map { position: relative; height: max(520px, calc(100vh - 230px)); border-radius: 8px; overflow: hidden; background: #10151d; }
.heat-group { position: absolute; box-sizing: border-box; border: 1px solid rgba(0,0,0,.55); overflow: hidden; }
.heat-head { height: 18px; display: flex; justify-content: space-between; gap: 4px; padding: 0 4px; font-size: 11px; line-height: 18px;
  background: rgba(10,14,20,.85); color: #e8edf3; white-space: nowrap; overflow: hidden; }
.heat-head span { overflow: hidden; text-overflow: ellipsis; }
.heat-head .up { color: #2fd18b; } .heat-head .down { color: #ff5d6c; } .heat-head .ref { color: #f0be3c; }
.heat-cells { position: absolute; top: 18px; left: 0; right: 0; bottom: 0; }
.heat-cell { position: absolute; box-sizing: border-box; border: 1px solid rgba(0,0,0,.35); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); overflow: hidden; cursor: default; }
.heat-cell:hover { outline: 2px solid #ffd36b; outline-offset: -2px; z-index: 1; }
.heat-cell b { font-size: 12px; line-height: 1.1; } .heat-cell b.sm { font-size: 9px; } .heat-cell span { font-size: 10px; opacity: .9; }
.heat-flow { border: 1px solid var(--line); border-radius: 8px; padding: var(--sp-2) var(--sp-3); background: var(--surface); font-size: var(--fs-sm); }
.heat-flow-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--sp-2); }
.heat-flow-row { display: grid; grid-template-columns: 1fr 70px auto auto; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line); }
.heat-flow-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat-flow-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.heat-flow-bar i { display: block; height: 100%; border-radius: 4px; background: #f0be3c; }
.heat-flow-bar i.up { background: #2fd18b; } .heat-flow-bar i.down { background: #ff5d6c; }
:root[data-theme="light"] .heat-flow { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,250,238,.8) 55%, rgba(255,238,196,.55)); border-color: rgba(236,217,168,.6); }
@media (max-width: 900px) { .heat-body { grid-template-columns: 1fr; } .heat-map { height: 420px; } }
.mkt-asia iframe { width: 100%; height: 52px; border: 0; display: block; overflow: hidden; background: transparent; color-scheme: normal; }

/* Nút liên hệ bản khách (Boss 17/10 18:00): góc phải dưới, nổi trên trang, không che bảng nhờ chỉ chiếm cột 48px. */
.contact-dock { position: fixed; right: 8px; bottom: 64px; z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; } /* Boss #3031 19/10 qua trái; #3137 19/10 21:35: "cho phần liên hệ qua hết bên phải đi, che bảng giá rồi... phần chart thì ko hiện liên hệ" */
.contact-dock[hidden], .contact-dock .cd-btn[hidden] { display: none; }
.contact-dock .cd-btn {
  display: flex; align-items: center; flex-direction: row-reverse; gap: 8px;
  height: 40px; padding: 0; border-radius: 20px; text-decoration: none;
  color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.12) inset;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.contact-dock .cd-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: -.2px; }
.contact-dock .cd-ico svg { width: 20px; height: 20px; }
.contact-dock .cd-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 160ms ease, padding 160ms ease; }
.contact-dock .cd-btn:hover .cd-label, .contact-dock .cd-btn:focus-visible .cd-label { max-width: 180px; padding-left: 16px; }
/* Chừa lề phải cho cột nút liên hệ để không đè số; màn Chart không hiện nút liên hệ. */
body:has(.contact-dock:not([hidden])):not([data-view="chart"]) main { padding-right: 56px; }
body[data-view="chart"] .contact-dock { display: none; }
.contact-dock .cd-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.18) inset; }
.contact-dock .cd-btn:focus-visible { outline: 2px solid var(--brand-gold, #e6c77a); outline-offset: 2px; }
.contact-dock .cd-zalo { background: #0068ff; }
.contact-dock .cd-fb { background: #1877f2; }
.contact-dock .cd-phone { background: linear-gradient(#ffe8a0, #e6c77a); color: var(--brand-ink, #1b1405); }
.contact-dock .cd-phone .cd-ico { animation: cd-ring 4s ease-in-out infinite; }
@keyframes cd-ring { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-14deg); } 92% { transform: rotate(12deg); } 95% { transform: rotate(-8deg); } }
@media (max-width: 760px) {
  .contact-dock { right: 6px; bottom: 58px; gap: 8px; }
  .contact-dock .cd-btn { height: 42px; }
  .contact-dock .cd-ico { width: 42px; height: 42px; }
  .contact-dock .cd-btn:hover .cd-label { max-width: 0; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .contact-dock .cd-phone .cd-ico { animation: none; } .contact-dock .cd-btn { transition: none; } }
@media print { .contact-dock { display: none; } }

/* Lượt khách beestock.vn (Boss 17/10 18:07), chỉ bản riêng: khung nổi dưới nút "Khách". */
.online-ctl { position: relative; }
.visits-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 340px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28); font-size: 13px; color: var(--text);
}
.visits-panel[hidden] { display: none; }
/* Boss #2357: nút Khách là biểu đồ 7 ngày nhỏ. */
#visits-btn { display: inline-flex; align-items: center; gap: 6px; }
#visits-btn .vb-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
#visits-btn .vb-bars i { display: block; width: 6px; border-radius: 1px; background: rgba(230,199,122,.55); }
#visits-btn .vb-bars i.today { background: var(--brand-gold); }
.visits-panel .vp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.visits-panel .vp-table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.visits-panel .vp-table th, .visits-panel .vp-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.visits-panel .vp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.visits-panel .vp-table thead th { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.visits-panel .vp-bars { display: flex; align-items: flex-end; gap: 3px; height: 42px; margin: 8px 0; padding: 0 2px; border-bottom: 1px solid var(--line); }
.visits-panel .vp-bars span { flex: 1; min-height: 2px; background: var(--brand-gold, #e6c77a); border-radius: 2px 2px 0 0; }
.visits-panel .vp-sub { margin: 10px 0 4px; font-weight: 600; font-size: 12px; }
.visits-panel .vp-hours { display: flex; gap: 2px; height: 46px; padding: 0 2px 12px; border-bottom: 1px solid var(--line); }
.visits-panel .vp-hours span { flex: 1; position: relative; display: flex; align-items: flex-end; }
.visits-panel .vp-hours i { width: 100%; min-height: 1px; background: var(--brand-gold, #e6c77a); border-radius: 2px 2px 0 0; }
.visits-panel .vp-hours em { position: absolute; bottom: -13px; left: 0; font-style: normal; font-size: 10px; color: var(--muted, #8a93a6); }
.visits-panel .vp-note { margin: 6px 0 0; font-size: 11.5px; line-height: 1.4; }

/* Bee Universe: quỹ đạo 3D như Bản đồ Bee (Boss 17/10 18:15, 18:33, 21:09 "y chang luôn từ tinh vân, vệt sáng, mây tri thức, Skill").
   Tinh vân, vệt sáng, dây và xung điện vẽ trên canvas .bu-fx (app.js); mây tri thức và mây Skill là SVG .bu-sky. Không tên, không nút. */
.view-universe { padding: 0; }
.bu-stage {
  position: relative; height: calc(100vh - 118px); min-height: 520px; overflow: hidden; border-radius: 10px;
  background: #070b1a url('/static/img/universe/nen.jpg') center / cover no-repeat;
}
/* Boss #3650 21/10: phủ kín, không khoảng hở quanh khung (--bu-top do app.js đo = mép dưới thanh tab). */
body.uni-full main { padding: 0; }
body.uni-full > footer, body.uni-full .leader-site > footer { display: none; }
body.uni-full .bu-stage { height: calc(100dvh - var(--bu-top, 94px)); min-height: 420px; border-radius: 0; }
.bu-stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(8,12,30,0), rgba(8,12,30,.35) 80%); pointer-events: none; }
/* Boss 18/10 06:45 #2350: tiêu đề ra giữa, "Welcome Bee Universe, hệ thống trading A.I Agent". */
.bu-title { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 2000; pointer-events: none; display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
.bu-title .bu-welcome { font-size: 13px; letter-spacing: .45em; text-transform: uppercase; color: #f3e2ae; opacity: .85; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.bu-title small { margin-top: 2px; font-size: 13px; letter-spacing: .12em; color: #cfe2ff; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
.bu-title b { font-size: 34px; line-height: 1.15; letter-spacing: .3px; background: linear-gradient(#fff3c4, #e6c77a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.7)); }
.bu-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 0; }
.bu-stage::before { z-index: 0; }
.bu-fx, .bu-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bu-sky { z-index: 0; overflow: visible; }
.bu-fx { z-index: 1; }
.bu-nodes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bu-n { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.bu-n img, .bu-n .bu-dot { position: absolute; left: calc(var(--d) / -2); top: calc(var(--d) / -2); width: var(--d); height: var(--d); border-radius: 50%; }
.bu-n img { object-fit: cover; background: rgba(8,12,30,.7); box-shadow: 0 0 0 1.5px var(--c), 0 0 12px var(--c); }
.bu-boss img { box-shadow: 0 0 0 2px #e6c77a, 0 0 22px #e6c77a; filter: brightness(1.25) saturate(1.15); animation: bu-boss-glow 4.2s ease-in-out infinite; }
@keyframes bu-boss-glow { 0%, 100% { box-shadow: 0 0 0 2px #e6c77a, 0 0 18px #e6c77a; } 50% { box-shadow: 0 0 0 2px #fff1c4, 0 0 30px #ffd76a; } }
/* Skill vệ tinh như Bản đồ Bee: vòng rỗng viền màu Bee mẹ, lõi tròn 38 %. */
.bu-skill .bu-dot { background: radial-gradient(circle, var(--c) 0 38%, #0b1426 39%); box-shadow: inset 0 0 0 1.8px var(--c); }
/* Mây tri thức (trái trên) và mây Skill (phải trên): mây phồng, sét, lấp lánh, vệt sao chổi xuống Bee; không chữ. */
.bu-puffs { opacity: .5; }
.bu-skill-cloud .bu-puffs { opacity: .6; }
.bu-bolt { opacity: 0; animation: bu-bolt 7.5s linear infinite; }
.bu-bolt:nth-of-type(2) { animation-duration: 9s; animation-delay: 2.6s; }
.bu-bolt:nth-of-type(3) { animation-duration: 8.2s; animation-delay: 5.1s; }
@keyframes bu-bolt { 0%, 86%, 100% { opacity: 0; } 87% { opacity: .95; } 88.5% { opacity: .15; } 90% { opacity: .8; } 92% { opacity: 0; } }
.bu-spark { opacity: 0; animation: bu-spark 3s ease-in-out infinite; }
@keyframes bu-spark { 0%, 62%, 100% { opacity: 0; } 74% { opacity: 1; } 84% { opacity: .25; } }
.bu-kdot { opacity: .85; }
/* Mây ý tưởng như Bản đồ Bee (07a): cụm mây trôi, đang bàn nhấp nháy, mây bụi tím – xanh dương, hạt bụi lấp lánh. */
.bu-idea-drift { animation: bu-idea-drift 16s ease-in-out infinite alternate; }
/* nền web sáng hơn bản đồ (dải thành phố) nên cụm mây đậm hơn bản đồ ~1,5 lần */
.bu-idea-puff { opacity: min(1, calc(var(--o, .55) * 1.5)); filter: drop-shadow(0 0 6px rgba(205,185,255,.55)); }
.bu-idea.s-dang-ban .bu-idea-puff { animation: bu-idea-blink 3.6s ease-in-out infinite; }
.bu-idea-spark { fill: #fff; animation: bu-idea-twinkle 2.8s ease-in-out infinite; }
.bu-mote { fill: #c9b8ff; animation: bu-idea-twinkle 4s ease-in-out infinite; }
.bu-dust { animation: bu-dust-drift 40s ease-in-out infinite alternate; }
.bu-dust ellipse { mix-blend-mode: screen; }
@keyframes bu-idea-drift { from { transform: translate(-7px, 2px); } to { transform: translate(7px, -4px); } }
@keyframes bu-idea-blink { 0%, 100% { opacity: calc(var(--o, .55) * 1.05); } 50% { opacity: 1; } }
@keyframes bu-idea-twinkle { 0%, 100% { opacity: 0; } 45%, 55% { opacity: .95; } }
@keyframes bu-dust-drift { from { transform: translate(-14px, 3px) scale(1); } to { transform: translate(16px, -5px) scale(1.06); } }
.bu-streak { fill: none; stroke-width: .8; stroke-linecap: round; stroke-dasharray: 1.8 110; animation: bu-streak 3.6s linear infinite; }
@keyframes bu-streak { 0% { stroke-dashoffset: 2.2; opacity: 0; } 8% { opacity: .8; } 88% { opacity: .8; } 100% { stroke-dashoffset: -100; opacity: 0; } }
@media (max-width: 760px) { .bu-stage { height: calc(100vh - 150px); } .bu-title b { font-size: 24px; } .bu-title .bu-welcome, .bu-title small { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .bu-bolt, .bu-spark, .bu-streak, .bu-boss img, .bu-idea-drift, .bu-idea-puff, .bu-idea-spark, .bu-mote, .bu-dust { animation: none; } .bu-spark { opacity: .5; } }
.contact-dock .cd-yt { background: #ff0000; }
/* Boss 18/10 06:33 #2345: tone màu bản đồ nhiệt hợp giao diện Bee — nền tối xanh đêm + viền vàng mờ, nền sáng kem. */
:root { --hm-base: #141b26; --hm-up: #1fd68e; --hm-down: #ff4d6a; --hm-ref: #4d4a3c; } /* Boss #2348: tươi sáng hơn */
:root[data-theme="light"] { --hm-base: #f7f1e3; --hm-up: #0fbf72; --hm-down: #f03e5c; --hm-ref: #e8dcbf; }
.heat-map { background: var(--hm-base); border: 1px solid rgba(230,199,122,.25); padding: 0; }
.heat-group { border: 1px solid rgba(8,12,18,.9); }
.heat-head { background: linear-gradient(90deg, rgba(20,27,38,.95), rgba(36,32,22,.9)); color: #e6c77a; }
.heat-head span { color: #e6c77a; font-weight: 600; }
.heat-cell { border: 1px solid rgba(8,12,18,.55); color: #f6f8fb; text-shadow: 0 1px 1px rgba(0,0,0,.45); }
.heat-cell.hc-soft { color: #e7ecf2; }
.heat-cell:hover { outline-color: #e6c77a; }
:root[data-theme="light"] .heat-map { border-color: rgba(200,160,70,.35); }
:root[data-theme="light"] .heat-group { border-color: rgba(255,255,255,.95); }
:root[data-theme="light"] .heat-head { background: linear-gradient(90deg, #fffaf0, #f6ead0); color: #6b5320; }
:root[data-theme="light"] .heat-head span { color: #6b5320; }
:root[data-theme="light"] .heat-head .up { color: #12935a; } :root[data-theme="light"] .heat-head .down { color: #d63447; } :root[data-theme="light"] .heat-head .ref { color: #8c7a55; }
:root[data-theme="light"] .heat-cell { border-color: rgba(255,255,255,.85); }
:root[data-theme="light"] .heat-cell.hc-soft { color: #2b2210; text-shadow: none; }
:root[data-theme="light"] .heat-cell:hover { outline-color: #c9a24a; }
.heat-flow-bar i { background: var(--hm-ref); } .heat-flow-bar i.up { background: var(--hm-up); } .heat-flow-bar i.down { background: var(--hm-down); }
/* Boss 18/10 06:53 #2352: tiêu đề Bee Universe to 1,5 lần, logo chuyển động, chữ lấp lánh có viền. */
.bu-title .bu-welcome { font-size: 20px; }
.bu-title small { font-size: 20px; margin-top: 0; }
.bu-title-row { position: relative; display: flex; align-items: center; gap: 14px; }
/* Boss #2365: bỏ nền và quầng vàng, chỉ logo; khung lục giác đứng yên, con ong xoay trục dọc như logo phòng chat (be-core-logo). */
.bu-title-logo { position: relative; width: 72px; height: 72px; flex: none; perspective: 400px; }
.bu-title-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bu-logo-frame { clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 8.8%, 14.3% 29.5%, 14.3% 70.7%, 50% 91.2%, 85.9% 70.7%, 85.9% 29.5%, 50% 8.8%, 0 0); }
.bu-logo-bee { clip-path: polygon(50% 8.8%, 85.9% 29.5%, 85.9% 70.7%, 50% 91.2%, 14.3% 70.7%, 14.3% 29.5%); animation: bu-logo-spin-y 16s linear infinite; }
.bu-title b { position: relative; font-size: 51px; line-height: 1.1; background: linear-gradient(100deg, #e6c77a 0%, #fff6d6 18%, #e6c77a 32%, #ffd36b 50%, #fff3c4 66%, #e6c77a 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.2px rgba(255,236,170,.55);
  animation: bu-title-shine 4.5s linear infinite; filter: drop-shadow(0 0 6px rgba(255,200,80,.55)) drop-shadow(0 2px 8px rgba(0,0,0,.7)); }
.bu-title-star { position: absolute; width: 14px; height: 14px; background: radial-gradient(circle, #fff 0 18%, rgba(255,240,190,.9) 30%, transparent 62%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; animation: bu-title-star 2.6s ease-in-out infinite; }
.bu-title-star.s0 { left: 96px; top: 2px; } .bu-title-star.s1 { left: 46%; top: -6px; animation-delay: -.7s; }
.bu-title-star.s2 { right: 18%; bottom: 0; animation-delay: -1.4s; } .bu-title-star.s3 { right: -10px; top: 8px; animation-delay: -2s; }
@keyframes bu-title-shine { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@keyframes bu-title-star { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes bu-logo-spin { to { transform: rotate(360deg); } }
/* Boss #2357: logo xoay lật quanh trục dọc như logo phòng chat (be-spin-y), không xoay tròn. */
@keyframes bu-logo-spin-y { to { transform: rotateY(360deg); } }
@keyframes bu-logo-pulse { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255,214,107,.55)); } 50% { filter: drop-shadow(0 0 16px rgba(255,214,107,.95)); } }
@media (max-width: 760px) { .bu-title b { font-size: 32px; } .bu-title-logo { width: 40px; height: 40px; } .bu-title .bu-welcome, .bu-title small { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .bu-title b, .bu-logo-bee, .bu-title-star { animation: none; } }
/* Khung Bee06 "đang xây dựng, chờ ra mắt" (Boss #2352). */
.chat-soon { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; text-align: center; }
.chat-soon-msg { display: flex; flex-direction: column; gap: 6px; }
.chat-soon-msg[hidden], .chat-soon.ready .chat-spin, .chat-soon.ready .chat-soon-load { display: none; }
.chat-soon-msg span { color: var(--text-muted); font-size: var(--fs-sm); }
.chat-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(230,199,122,.25); border-top-color: #e6c77a; animation: bu-logo-spin 1s linear infinite; }

/* Boss #3035 19/10: vạch kẻ giữa các nhóm mã ở Bảng giá > Tất cả, như bảng giá Boss gửi. */
#board tr.grp-start > td { border-top: 2px solid #c9a227; }

/* Boss #3039 19/10: bảng giá đủ cột như bảng Boss gửi; chữ gọn, màu TC vàng, trần tím, sàn xanh lơ. */
#board.board-full th, #board.board-full td { padding: 4px 8px; font-size: 13px; white-space: nowrap; }
#board.board-full th { font-size: 12px; }
#board.board-full td.c-ref, #board.board-full .ticker.c-ref { color: #d9a400; }
#board.board-full td.c-ceil, #board.board-full .ticker.c-ceil { color: #c05ce8; }
#board.board-full td.c-floor, #board.board-full .ticker.c-floor { color: #2aa6d8; }
#board.board-full th.match, #board.board-full td.match { background: color-mix(in srgb, var(--surface, #1b2130) 70%, #3a3f52); font-weight: 600; }
/* Boss #3277/#3282 20/10: cột: 1 Mã, 2 TC, 3 Trần, 4 Sàn, 5 Giá, 6 +/−, 7 %, 8 Cao, 9 Thấp, 10 T.KL, 11 GT, 12 KL/TB20, 13 Tự doanh, 14 Nước ngoài */
#board.board-full td:nth-child(4), #board.board-full th:nth-child(4),
#board.board-full td:nth-child(7), #board.board-full th:nth-child(7),
#board.board-full td:nth-child(12), #board.board-full th:nth-child(12) { border-right: 1px solid var(--line-strong, #555); }
#board td.vol-hot, .mover-box .vol-hot { color: #f5c04a; font-weight: 700; }
#board td.vol-warm, .mover-box .vol-warm { color: #e6c77a; }
/* Boss #3409 20/10: ô Danh mục trade T+ + 3 khung tăng/giảm/KL thu gọn. */
.tplus { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.tplus[hidden] { display: none; }
.tplus h3 { margin: 0 0 8px; font-size: 14px; color: #e6c77a; }
.tplus h3 .faint { font-weight: 400; font-size: 12px; }
.tplus .table-wrap { margin-bottom: 8px; }
.tplus-table th, .tplus-table td { padding: 5px 10px; font-size: 13px; white-space: nowrap; }
.tplus-table td.note { white-space: normal; min-width: 240px; }
.tplus-table td.ticker .link { font-weight: 700; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.tplus-table tr.editing td { background: color-mix(in srgb, #e6c77a 12%, transparent); }
.tplus-act button { padding: 1px 8px; margin-left: 4px; font-size: 12px; }
.tplus-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tplus-form input[name="ticker"] { text-transform: uppercase; width: 80px; }
.tplus-form input[name="gia"] { width: 90px; }
.tplus-form input.grow { flex: 1; min-width: 220px; }
.movers-fold { margin-top: 12px; }
.movers-fold > summary { cursor: pointer; font-size: 13px; color: var(--text-muted); padding: 4px 0; }
.movers-fold > summary:hover { color: #e6c77a; }
.board-movers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.board-movers[hidden] { display: none; }
.mover-box { border: 1px solid var(--line-strong, #3a3f52); border-radius: 8px; padding: 8px 12px; background: var(--surface, #161b26); }
.mover-box h3 { margin: 0 0 6px; font-size: 14px; color: #e6c77a; }
.mover-box ol { margin: 0; padding-left: 22px; display: grid; gap: 3px; font-size: 13px; }
.mover-box li { display: grid; grid-template-columns: 64px 72px 72px; gap: 12px; align-items: baseline; }
.mover-box li .link { font-weight: 700; text-align: left; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.mover-box li .link:hover { color: #f5c04a; text-decoration: underline; }
.mover-box li > .num { text-align: right; }
.mover-box li > .num:nth-of-type(1) { text-align: right; }
:root[data-theme="light"] :is(#board td, .mover-box) :is(.vol-hot, .vol-warm), :root[data-theme="light"] #board td:is(.vol-hot, .vol-warm) { color: #8a5a00; }
@media (max-width: 760px) { .board-movers { grid-template-columns: 1fr; } }
/* Boss #3057: dòng tên nhóm ngành */
#board tr.grp-head > td { padding: 6px 8px 3px; border-top: 2px solid #c9a227; color: #e6c77a; font-weight: 700; font-size: 12px; letter-spacing: .3px; text-transform: uppercase; background: transparent; }
/* Boss #3066 19/10: Theo dõi gọn bề ngang (ẩn Trần, Sàn, 3 bước mua/bán, KL khớp, TB) + khung tự doanh / nước ngoài gom mua bên cạnh. */
#board.board-compact tr > :is(td, th):is([data-col="2"], [data-col="3"]) { display: none; }
#board.board-compact tr.grp-head > td { display: table-cell; }
/* Boss #3370 20/10: Boss tự co kéo cột (kéo mép phải tiêu đề), ẩn/hiện và đổi thứ tự cột ở nút "Sửa cột". */
#board th { position: relative; }
#board th .col-grip { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
#board th:last-child .col-grip { right: 0; } /* không lòi ra ngoài bảng (gây thanh kéo ngang 3px) */
#board th .col-grip:hover, #board th.resizing .col-grip { background: color-mix(in srgb, var(--brand-gold, #e6c77a) 55%, transparent); }
#board .col-hide { display: none; }
/* Boss #3404 21:41 "kéo rộng lại như cũ tránh để khoảng trống, bảng đang trade cũng vậy": cột đã kéo hẹp vẫn giữ tỷ lệ,
   bảng giãn đủ khung (Đang trade, Tất cả); Theo dõi khung ôm bảng nên không dư. */
#board.board-sized { table-layout: fixed; min-width: 100%; }
#board.board-sized :is(th, td) { overflow: hidden; text-overflow: ellipsis; }
.board-cols-panel { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); max-width: 520px; }
.board-cols-panel[hidden] { display: none; }
.board-cols-panel p { margin: 0 0 8px; font-size: 12px; }
.board-cols-panel ol { margin: 0 0 8px; padding-left: 22px; columns: 2; column-gap: 18px; font-size: 13px; }
.board-cols-panel li { display: flex; align-items: center; gap: 4px; break-inside: avoid; padding: 1px 0; }
.board-cols-panel li label { flex: 1; }
.board-cols-panel li button { min-width: 26px; padding: 0 6px; line-height: 20px; }
/* Boss #3372 20/10: Theo dõi = bảng giá bên trái + bảng sức mạnh ngành bên phải; thanh thêm/bỏ mã theo dõi. */
/* Boss #3386 21:25 "kéo chỉnh lại đường màu vàng vảng theo dõi, các bảng khác vẫn rộng như cũ": ở Theo dõi khung bảng ôm vừa bề rộng
   các cột Boss đã kéo, bảng sức mạnh ngành lấy phần còn lại; Đang trade, Tất cả giữ rộng cả màn hình. */
.board-split.with-strength { display: grid; grid-template-columns: minmax(0, max-content) minmax(320px, 1fr); gap: 12px; align-items: start; }
.board-split.with-strength > .flow-side { min-width: 0; }
@media (max-width: 1100px) { .board-split.with-strength { grid-template-columns: 1fr; } }
.board-watch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.board-watch-bar[hidden] { display: none; }
.board-watch-bar input { width: 80px; text-transform: uppercase; }
#board td.ticker .row-x { margin-left: 6px; padding: 0 5px; border: 0; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 14px; line-height: 1; visibility: hidden; }
#board tr:hover td.ticker .row-x, #board td.ticker .row-x:focus-visible { visibility: visible; }
#board td.ticker .row-x:hover { color: var(--down, #f05a6a); }
.strength { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.strength h3 { margin: 0 0 8px; font-size: 14px; color: #e6c77a; }
.strength ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.strength .st-head { display: grid; grid-template-columns: minmax(0, 1fr) 70px 58px; gap: 8px; align-items: center; font-size: 12px; }
.strength .st-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.strength .st-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; }
.strength .st-bar i { display: block; height: 100%; background: var(--hm-up, #2ecc8a); }
.strength .st-bar i.down { background: var(--hm-down, #f05a6a); }
.strength .st-bar i.ref { background: var(--text-faint); }
.strength .st-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.strength .st-chip { border: 1px solid rgba(8,12,18,.45); border-radius: 4px; padding: 1px 5px; font-size: 11px; line-height: 16px; color: #f6f8fb; cursor: pointer; }
.strength .st-chip.st-watch { outline: 1px dashed rgba(230,199,122,.7); outline-offset: -1px; }
/* Boss #3742 22/10: mã đang nắm giữ viền vàng gold. */
.strength .st-chip.st-held { outline: 2px solid #f2b705; outline-offset: 0; box-shadow: 0 0 6px rgba(242,183,5,.55); }
:root[data-theme="light"] .strength .st-chip.hc-soft { color: #2b2210; }
.strength .flow-note { margin: 8px 0 0; font-size: 11px; }
/* Boss #3402 20/10: 7 phiên + khung chuyển biến dòng tiền. */
.strength .st-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.strength .st-title h3 { margin: 0; }
.strength .st-title .segmented button { padding: 2px 10px; font-size: 12px; }
.strength .st-mark { font-style: normal; font-size: 10px; }
.st-flow { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.st-flow-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-flow h4 { margin: 0 0 4px; font-size: 12px; }
.st-flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.st-flow li { display: grid; grid-template-columns: 42px minmax(0, 1fr) 54px 92px; gap: 6px; align-items: center; }
.st-flow li .link { font-weight: 700; text-align: left; padding: 0; }
.st-flow li .num { font-size: 11px; white-space: nowrap; }
.st-tags { display: flex; gap: 2px; overflow: hidden; }
.st-tag { font-style: normal; font-size: 10px; padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.st-tag.t-vao, .st-tag.t-nn-mua { color: var(--hm-up, #2ecc8a); }
.st-tag.t-ra, .st-tag.t-nn-ban { color: var(--hm-down, #f05a6a); }
.st-tag.t-kl-tang { color: #e6c77a; }
@media (max-width: 1300px) { .st-flow-cols { grid-template-columns: 1fr; } }
/* Boss #3742 22/10: chuyển biến dòng tiền dạng dashboard (ô tổng + thanh ngang). */
.st-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.st-kpi { display: grid; gap: 1px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.st-kpi > span { font-size: 11px; }
.st-kpi > b { font-size: 18px; line-height: 1.2; }
.st-kpi > small { font-size: 11px; }
.st-flow-col { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.st-flow-col h4 .faint { font-weight: 400; font-size: 11px; }
.st-flow li { padding: 1px 0; }
.st-fbar { position: relative; height: 16px; border-radius: 3px; background: color-mix(in srgb, var(--line) 45%, transparent); overflow: hidden; }
.st-fbar > i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; opacity: .55; }
.st-fbar > i.up { background: var(--hm-up, #2ecc8a); }
.st-fbar > i.down { background: var(--hm-down, #f05a6a); }
.st-fbar > b { position: relative; display: block; padding: 0 5px; font-size: 11px; line-height: 16px; color: var(--text, #f6f8fb); }
@media (max-width: 1300px) { .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.board-split.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.flow-side { display: grid; gap: 12px; }
.flow-side[hidden] { display: none; }
.flow-box { border: 1px solid var(--line-strong, #3a3f52); border-radius: 8px; padding: 8px 12px; background: var(--surface, #161b26); }
.flow-box h3 { margin: 0 0 6px; font-size: 14px; color: #e6c77a; }
.flow-box ol { margin: 0; padding-left: 22px; display: grid; gap: 3px; font-size: 13px; }
.flow-box li { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: baseline; }
.flow-box li .faint { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-box .flow-note { margin: 6px 0 0; font-size: 11px; }
.flow-who { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line-strong, #3a3f52); }
.flow-who h4 { margin: 0 0 4px; font-size: 12px; color: #e6c77a; font-weight: 600; }
.flow-who p { margin: 0; font-size: 12px; }
.flow-who ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12px; }
.flow-who li { display: grid; grid-template-columns: 40px 1fr auto 36px; gap: 6px; align-items: baseline; }
.flow-who li > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .board-split.with-side { grid-template-columns: 1fr; } }
/* Boss #3103 19/10: 2 khung gom mua toàn bộ mã dưới Bản đồ nhiệt, xếp cạnh nhau. */
.heat-gom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.heat-gom:empty { display: none; }
@media (max-width: 760px) { .heat-gom { grid-template-columns: 1fr; } }
/* Boss #3368 20/10: tự doanh / khối ngoại thành bản đồ ô (dùng chung kiểu ô .heat-cell của bản đồ nhiệt). */
.flow-heat { position: relative; height: 300px; border-radius: 6px; overflow: hidden; background: var(--hm-base, #10151d); margin-top: 4px; }
.flow-heat-sum { margin: 0; font-size: 12px; }
@media (max-width: 760px) { .flow-heat { height: 240px; } }
.chart-head .flow-strip .mkt-value { font-size: 18px; } /* Boss #3651: số dòng tiền đầu chart to hơn chút */
/* Boss #3654 21/10: chữ mã CP to lên cho hợp. #3661: máy Boss cắt chữ VNINDEX → rộng 7.6em, không co, ẩn mũi tên gợi ý chiếm chỗ. */
.chart-head .ticker-input { flex: none; }
.chart-head .ticker-input input { font-size: 22px; font-weight: 700; letter-spacing: .02em; width: 7.6em; height: 36px; }
.chart-head .ticker-input input::-webkit-calendar-picker-indicator { display: none !important; }
/* Boss #3753/#3779 22/10: đồng hồ Sợ hãi – Tham lam (thử nghiệm) đầu tab Bảng giá. */
.senti { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; margin: 10px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.senti h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.senti-beta { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 9px; border: 1px solid #e6c77a; color: #e6c77a; }
.senti-main { display: grid; justify-items: center; align-content: start; gap: 2px; }
.senti-gauge { width: 220px; height: auto; }
.senti-needle { stroke: var(--text, #f6f8fb); stroke-width: 3.5; stroke-linecap: round; }
.senti-hub { fill: var(--text, #f6f8fb); }
.senti-score { display: flex; align-items: baseline; gap: 8px; margin-top: -6px; }
.senti-score b { font-size: 34px; line-height: 1; }
.senti-score span { font-size: 15px; font-weight: 700; }
.senti-side { display: grid; gap: 8px; align-content: start; min-width: 0; }
.senti-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.senti-tile { display: grid; gap: 1px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; cursor: help; }
.senti-tile > span { font-size: 11px; }
.senti-tile > b { font-size: 20px; line-height: 1.15; }
.senti-tile > small { font-size: 11px; }
.senti-bar { display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; }
.senti-bar > i { display: block; height: 100%; }
.senti-trend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11px; }
.senti-spark { width: 100%; height: 44px; }
.senti-line { fill: none; stroke: #e6c77a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.senti-ref { stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.senti-ref.lo { stroke: #d9363e; } .senti-ref.mid { stroke: var(--line); } .senti-ref.hi { stroke: #1fa35c; }
.senti-note { margin: 0; font-size: 11px; }
@media (max-width: 1100px) { .senti { grid-template-columns: 1fr; } .senti-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.senti-hint { font-size: 12px; font-weight: 600; color: #e6c77a; }
/* Boss #3792: hướng dẫn sử dụng dưới đồng hồ tâm lý; nền sáng tăng tương phản chữ vàng. */
.senti-guide { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 10px; }
.senti-guide h3 { margin: 0 0 6px; font-size: 14px; }
.senti-guide ol { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13px; line-height: 1.5; }
:root[data-theme="light"] .senti-hint, :root[data-theme="light"] .senti-beta { color: #8a5a00; border-color: #8a5a00; }
:root[data-theme="light"] .senti-line { stroke: #a87400; }
/* Boss #3798: cách đọc cho nhà đầu tư, lời thường. */
.senti-guide p { margin: 4px 0; font-size: 13.5px; line-height: 1.55; }
.senti-guide h4 { margin: 12px 0 4px; font-size: 13.5px; }
.senti-guide ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; }
.senti-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.senti-steps > div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.senti-steps ul { gap: 1px; }
.senti-today { padding: 8px 10px; border-left: 3px solid #e6c77a; background: color-mix(in srgb, #e6c77a 10%, transparent); border-radius: 4px; }
@media (max-width: 900px) { .senti-steps { grid-template-columns: 1fr; } }
/* Boss #3800: bố cục mới — hàng 1 đồng hồ + biểu đồ, hàng 2 tám ô, hàng 3 hướng dẫn. */
.senti { grid-template-columns: 280px minmax(0, 1fr); }
.senti > .senti-tiles, .senti > .senti-note, .senti > .senti-guide { grid-column: 1 / -1; }
.senti-trend { display: block; min-width: 0; }
.senti-trend h3 { margin: 0 0 4px; font-size: 14px; }
.senti-trend h3 .faint { font-weight: 400; font-size: 11px; }
.senti-chart { width: 100%; height: auto; max-height: 300px; display: block; }
.senti-grid { stroke: var(--line); stroke-width: .6; opacity: .6; }
.senti-axis { font-size: 10px; fill: var(--muted, #9aa4b2); }
.senti-axis.vni { fill: #7aa7ff; }
.senti-zone-label { font-size: 9.5px; font-weight: 600; opacity: .85; }
.senti-chart .senti-line { stroke-width: 2.5; }
.senti-vni { fill: none; stroke: #8a96a8; stroke-width: 1.2; opacity: .75; stroke-dasharray: 4 3; }
.senti-dot { stroke: var(--surface, #0d1622); stroke-width: 1; cursor: help; }
.senti-last { font-size: 13px; font-weight: 700; fill: var(--text, #f6f8fb); }
@media (max-width: 1100px) { .senti { grid-template-columns: 1fr; } }
.senti-chart { max-height: none; }

/* Boss #3806: đường từng bên + chú thích bấm ẩn/hiện + ô tâm lý từng bên */
.senti-pline { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; opacity: .9; }
.senti-pdot { opacity: .9; }
.senti-party.off { display: none; }
.senti-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 6px; }
.senti-leg { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px 0; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; flex: none; }
.senti-leg i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.senti-leg.main i { height: 4px; }
.senti-leg.vni i { background: repeating-linear-gradient(90deg, #8a96a8 0 4px, transparent 4px 7px) !important; }
.senti-leg.main, .senti-leg.vni { cursor: default; }
.senti-leg.off { opacity: .4; text-decoration: line-through; }
.senti-parties { grid-column: 1 / -1; }
.senti-parties h3 { margin: 0 0 6px; }
.senti-ptiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.senti-pplain { color: var(--muted, #9aa6b5); line-height: 1.35; }
@media (max-width: 1100px) { .senti-ptiles { grid-template-columns: 1fr; } }
/* Boss #3827: Phân tích 360 (bản thử) trên ô BCTC */
.p360 { border-top: 1px dashed var(--line); padding-top: 6px; display: grid; gap: 6px; }
.p360-head { display: flex; align-items: center; gap: 8px; }
.p360-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.p360-chip { display: grid; gap: 1px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); cursor: help; min-width: 0; }
.p360-chip small { font-size: 11px; color: var(--muted, #9aa6b5); line-height: 1.2; }
.p360-chip b { font-size: 12.5px; white-space: nowrap; }
.p360-chip.good { border-color: #1fa35c; } .p360-chip.good b { color: #1fa35c; }
.p360-chip.warn { border-color: #e0703a; } .p360-chip.warn b { color: #e0703a; }
.p360-chip.mid b { color: #c9a227; }
.p360-chip.none { opacity: .55; }
.p360-more summary { cursor: pointer; font-size: 12.5px; color: var(--accent, #e6c77a); }
.p360-part { margin-top: 6px; }
.p360-part ul { margin: 2px 0 0; padding-left: 1.1em; }
.p360-good::marker { content: '✔ '; color: #1fa35c; }
.p360-warn::marker { content: '⚠ '; color: #e0703a; }
.p360-mid::marker { content: '• '; color: #c9a227; }
.p360-none::marker { content: '– '; color: var(--muted, #9aa6b5); }
.p360-note { font-size: 11.5px; margin: 6px 0 0; }
.p360-err { color: #e0703a; font-size: 12px; }
:root[data-theme="light"] .p360-chip.good b { color: #137a43; }

/* Boss #3828: tab Chỉ số */
.idx-soon { margin: 0 0 8px; font-size: 13px; }
.idx-h2 { font-size: 17px; margin: 4px 0 8px; }
.idx-h2 .faint { font-size: 13px; font-weight: 400; }


/* Boss #3836: ô chỉ số (P/E P/B VN-Index, không Vin, lãi suất, lạm phát) */
.idx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.idx-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; align-content: start; background: var(--surface); }
.idx-card h3 { margin: 0; font-size: 14px; }
.idx-card.wait { opacity: .7; border-style: dashed; }
.idx-vals { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.idx-val { display: grid; }
.idx-val small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted, #9aa6b5); font-size: 11.5px; flex: none; }
.idx-val small i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.idx-val b { font-size: 18px; white-space: nowrap; }
.idx-spark { width: 100%; height: 60px; }
.idx-line { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
@media (max-width: 1100px) { .idx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .idx-grid { grid-template-columns: 1fr; } }
.idx-val b, .idx-val small { text-align: left; justify-self: start; }


/* Boss #3850: 4 chỉ số chia đều 4 khu (lưới 2×2), biểu đồ to */
.idx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.idx-card { min-height: 330px; overflow: hidden; padding: 10px 12px; }
.idx-card h3 { font-size: 16px; }
.idx-spark { height: auto; aspect-ratio: 640 / 230; display: block; }
.idx-card.wait { display: flex; flex-direction: column; }
@media (max-width: 900px) { .idx-grid { grid-template-columns: 1fr; } }

/* Boss #3900 22/10 "chỉnh cái này giữ nguyên khi mình lăn chuột xuống bảng dưới đi": dòng tiêu đề Bảng giá đứng yên khi cuộn
   (trước bị #board th { position: relative } của nút kéo cột ghi đè mất sticky). Nền đặc để hàng dưới không lộ qua. */
#board th, .leader-site #board.board-full th, .leader-site #board.board-full th.match { position: sticky !important; top: 0; z-index: 30 !important; background: var(--surface-2) !important; }
#board thead tr.cols th { top: 24px; }
.table-wrap:has(> #board) { max-height: calc(100vh - 110px); overflow: auto; } /* #3900: bảng cuộn trong khung cao vừa màn để dòng tiêu đề đứng yên */


/* Boss #3904: khung Hỏi Bee06 bản thử B+ (chỉ bản riêng) */
#chat .b6-log { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 8px 2px; }
#chat .b6-msg { padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
#chat .b6-bot { background: var(--surface-2); align-self: flex-start; }
#chat .b6-me { background: rgba(59, 157, 255, .18); align-self: flex-end; }
#chat .b6-wait { opacity: .75; font-style: italic; }
#chat .b6-err { color: #ff6b6b; }

/* Boss #3939: Thế giới = chart đường (trái) + bảng giá (phải); màn hẹp xếp chồng */
.world-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
@media (max-width: 1100px) { .world-split { grid-template-columns: minmax(0, 1fr); } }

/* Boss #3941: thanh công cụ vẽ dọc bên phải chart */
.chart-row { display: flex; gap: 6px; align-items: stretch; }
.chart-row > .chart-box { flex: 1 1 auto; min-width: 0; }
.draw-bar { flex: 0 0 38px; display: flex; flex-direction: column; gap: 3px; padding: 4px 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-y: auto; }
.draw-btn { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; font-size: 15px; line-height: 1; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.draw-btn:hover { background: var(--surface-2); }
.draw-btn[aria-pressed="true"] { background: var(--accent, #f5a623); color: #111; }
.draw-btn[data-tool="fib"] { font-size: 11px; font-weight: 700; }
.draw-color i { width: 16px; height: 16px; border-radius: 50%; background: var(--draw-c); border: 2px solid var(--line); }
.draw-danger:hover { background: rgba(229, 57, 53, .2); }
.draw-sep { height: 1px; margin: 3px 2px; background: var(--line); }
.chart-box.drawing { cursor: crosshair; }
.chart-box.erasing { cursor: not-allowed; }
@media (max-width: 700px) { .chart-row { flex-direction: column; } .draw-bar { flex-direction: row; flex-wrap: wrap; flex-basis: auto; } }

/* Boss #3945: chart tràn hết bề ngang, không khoảng hở hai bên (bỏ lề trang ở hàng chart, chart sát thanh công cụ vẽ) */
#view-chart .chart-row { margin-left: calc(-1 * var(--sp-4)); margin-right: calc(-1 * var(--sp-4)); gap: 0; }
#view-chart .chart-row > .chart-box { border-radius: 0; border-left: 0; border-right: 0; }
#view-chart .draw-bar { border-radius: 0; border-right: 0; border-top: 0; border-bottom: 0; flex-basis: 36px; padding: 4px 2px; }

/* Boss #4157 23/10: khung bảng giá mã có thể trade T+ cho khách */
.tplus-khach { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.tplus-khach[hidden] { display: none; }
.tplus-khach h3 { margin: 0 0 8px; font-size: 14px; color: #e6c77a; }
.tplus-khach h3 .faint { font-weight: 400; font-size: 12px; }
.tpk-table td.ticker .link { font-weight: 700; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.tpk-note { margin: 6px 0 0; font-size: 12px; }
.tpk-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.tpk-add input { text-transform: uppercase; width: 90px; }
/* Boss #4168: điểm mua bán cho khách trong khung T+ */
.tpk-table .tpk-plan { white-space: nowrap; font-weight: 600; }
.tpk-table td.tpk-plan.buy { color: #e6c77a; }
.tpk-table td.tpk-plan.stop { color: var(--down, #f05a5a); }
.tpk-table td.tpk-plan.target { color: var(--up, #2fc46b); }
.tpk-table td.tpk-plan.state { font-weight: 400; }
/* Boss #4172: sửa thẳng 4 ô điểm mua bán trên web riêng */
.tpk-table input.tpk-edit { width: 96px; padding: 2px 4px; border: 1px dashed transparent; border-radius: 4px; background: transparent; color: inherit; font: inherit; font-weight: inherit; }
.tpk-table input.tpk-edit:hover { border-color: var(--line); }
.tpk-table input.tpk-edit:focus { border-style: solid; border-color: #e6c77a; background: var(--surface); outline: none; }
.tpk-table td.tpk-plan.state input.tpk-edit { width: 120px; }
.tpk-table input.tpk-edit { width: 68px; }
.tpk-table td.tpk-plan.stop input.tpk-edit, .tpk-table td.tpk-plan.target input.tpk-edit { width: 52px; }
.tpk-table td.tpk-plan.state input.tpk-edit { width: 100px; }
.tpk-table th, .tpk-table td { padding-left: 6px; padding-right: 6px; }
/* Boss #4178: cột "Ghi chú" (trước là Trạng thái) hiện đủ chữ, tự xuống dòng */
.tpk-table td.tpk-plan.state { white-space: normal; min-width: 150px; max-width: 220px; overflow-wrap: anywhere; }
.tpk-table td.tpk-plan.state textarea.tpk-edit { width: 100%; min-width: 150px; resize: none; field-sizing: content; min-height: 1.6em; line-height: 1.35; white-space: pre-wrap; overflow: hidden; }
.tpk-table textarea.tpk-edit { padding: 2px 4px; border: 1px dashed transparent; border-radius: 4px; background: transparent; color: inherit; font: inherit; font-weight: 400; }
.tpk-table textarea.tpk-edit:hover { border-color: var(--line); }
.tpk-table textarea.tpk-edit:focus { border-style: solid; border-color: #e6c77a; background: var(--surface); outline: none; }
@media (max-width: 1400px) {
  .tpk-table th, .tpk-table td { padding-left: 4px; padding-right: 4px; font-size: 12px; }
  .tpk-table input.tpk-edit { width: 56px; }
  .tpk-table td.tpk-plan.stop input.tpk-edit, .tpk-table td.tpk-plan.target input.tpk-edit { width: 44px; }
  .tpk-table td.tpk-plan.state, .tpk-table td.tpk-plan.state textarea.tpk-edit { min-width: 120px; }
}

/* Boss #4187 23/10: Bee06 nổi trên cột nút liên hệ, bong bóng lời nhắn */
.b6-float { position: fixed; right: 8px; bottom: 64px; z-index: 41; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; }
.b6-float[hidden], .b6-bubble[hidden] { display: none; }
body[data-view="chart"] .b6-float { display: none; }
.b6-float > * { pointer-events: auto; }
.b6-ico { width: 56px; height: 56px; padding: 2px; border-radius: 50%; border: 2px solid #e6c77a; background: radial-gradient(circle at 50% 40%, #fff6d8, #e6c77a 75%); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); animation: b6-bob 3.2s ease-in-out infinite; }
.b6-ico img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.b6-ico:hover { transform: scale(1.06); }
.b6-ico:focus-visible { outline: 2px solid #e6c77a; outline-offset: 3px; }
.b6-bubble { position: relative; max-width: 260px; margin-bottom: 14px; padding: 10px 28px 10px 12px; border-radius: 14px 14px 4px 14px; background: #fffaf0; color: #1b1405; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.28); border: 1px solid #e6c77a; animation: b6-pop 220ms ease-out; }
.b6-say { cursor: pointer; display: block; }
.b6-bubble.go .b6-say { font-weight: 600; }
.b6-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #7a6a40; font-size: 14px; line-height: 1; cursor: pointer; }
.b6-x:hover { background: rgba(0,0,0,.08); }
@keyframes b6-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes b6-pop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .b6-ico, .b6-bubble { animation: none; } }
@media (max-width: 640px) { .b6-ico { width: 48px; height: 48px; } .b6-ico img { width: 40px; height: 40px; } .b6-bubble { max-width: 200px; font-size: 12px; } }
@media print { .b6-float { display: none; } }
.b6-note { display: block; margin-top: 4px; font-size: 11px; color: #7a6a40; } .b6-note[hidden] { display: none; }
/* Boss #4262 23/10: chuông thông báo ngay trên Bee06 nổi; chấm đỏ đếm tin chưa xem; khung danh sách mở sang trái. */
.b6-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bell-btn { position: relative; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 2px solid #e6c77a; background: #fffaf0; color: #8a6510; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.28); display: grid; place-items: center; }
.bell-btn svg { width: 22px; height: 22px; }
.bell-btn:hover { transform: scale(1.06); }
.bell-btn:focus-visible { outline: 2px solid #e6c77a; outline-offset: 3px; }
.bell-btn.ring svg { animation: bell-ring 900ms ease-in-out 2; transform-origin: 50% 10%; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e5322d; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fffaf0; }
.bell-dot[hidden] { display: none; }
.bell-panel { position: absolute; right: 70px; bottom: 0; width: min(320px, calc(100vw - 96px)); max-height: 60vh; display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: #fffaf0; color: #1b1405; border: 1px solid #e6c77a; box-shadow: 0 8px 26px rgba(0,0,0,.32); animation: b6-pop 180ms ease-out; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; align-items: center; gap: 8px; padding-right: 22px; margin-bottom: 6px; font-size: 14px; }
.bell-head b { flex: 1 1 auto; }
.bell-head .b6-x { top: 8px; right: 8px; }
.bell-mute { flex: none; padding: 3px 10px; border-radius: 12px; border: 1px solid #e6c77a; background: #fff3d1; color: #5a4310; font-size: 12px; cursor: pointer; white-space: nowrap; }
.bell-mute:hover { background: #ffe9a8; }
.bell-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.bell-list li { padding: 7px 9px; border-radius: 10px; background: #fff; border: 1px solid #f0e2b8; font-size: 13px; line-height: 1.45; cursor: pointer; overflow-wrap: anywhere; }
.bell-list li:hover { background: #fff6dc; }
.bell-list li.moi { border-color: #e6c77a; font-weight: 600; }
.bell-list li time { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: #7a6a40; }
.bell-list li .b6-note { margin-top: 2px; font-weight: 400; }
.bell-list li.trong { cursor: default; background: transparent; border: 0; color: #7a6a40; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 35% { transform: rotate(-14deg); } 55% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .bell-btn.ring svg { animation: none; } }
@media (max-width: 640px) { .bell-btn { width: 38px; height: 38px; } .bell-panel { right: 58px; } }
/* Boss #4429 24/10: "khung chat xuống trên đầu nhé, bỏ chat cũ, khung chat bo cong cho đẹp" — bỏ nút Hỏi Bee06 trên thanh trên;
   khung chat mở ngay trên đầu Bee06 nổi (góc phải dưới), bo tròn. Vị trí bottom/max-height do placeChat() trong app.js đặt. */
#chat-toggle { display: none !important; }
.chat-pop { top: auto; right: 8px; bottom: 140px; width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - var(--topbar-h) - 160px);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; z-index: 42; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38); transform-origin: 90% 100%; animation: b6-pop 180ms ease-out; }
.chat-pop[hidden] { display: none; }
.chat-pop .chat-head { border-radius: 22px 22px 0 0; padding: 10px 14px; }
.chat-pop .chat-head button { border-radius: 999px; }
.chat-pop .chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 14px; }
.chat-pop .chat-form input { border-radius: 999px; padding-left: 14px; }
.chat-pop .chat-form button { border-radius: 999px; }
#chat .b6-msg { border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .chat-pop { animation: none; } }
/* Boss #4444 24/10: độ khó quiz theo thang 5 sao (Bee04 #4443 chấm 3/5). */
.quiz-level { margin: 0 0 8px; font-size: 13px; color: var(--text-muted, #a9a28c); }
.quiz-stars { color: #f5b301; letter-spacing: 2px; font-size: 16px; }
.quiz-stars i { font-style: normal; color: rgba(160, 150, 120, .35); }
/* Boss #4684: nút Đăng nhập trong khung Bee06 cho khách chưa đăng nhập. */
.chat-soon .chat-login { align-self: center; margin: 4px 0; padding: 6px 22px; border-radius: 999px; background: #f5b301; color: #1b1405; font-weight: 700; text-decoration: none; }
/* Boss #4730 24/10: "Danh mục của tôi" — mỗi thành viên tự điền, so với danh mục Leader (chỉ bản khách, đã đăng nhập). */
.my-pf { margin-top: 24px; padding: 16px; border: 1px solid var(--brand-gold, #e6c77a); border-radius: 16px; background: var(--surface, #141b2d); }
.my-pf .mp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.my-pf .mp-head h2 { margin: 0; font-size: 18px; }
.my-pf input { width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 6px; border-radius: 8px; }
.my-pf input.num { text-align: right; }
.my-pf .mp-ma { text-transform: uppercase; font-weight: 700; }
.my-pf .mp-yes { color: #2fbf71; font-weight: 600; }
.my-pf .mp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.my-pf .mp-save { border-radius: 999px; padding: 6px 18px; }
.my-pf .mp-save.dirty { background: #f5b301; color: #1b1405; border-color: #f5b301; font-weight: 700; }
.my-pf .mp-compare h3 { margin: 6px 0; font-size: 15px; }
.my-pf .mp-compare ul { margin: 0; padding-left: 18px; line-height: 1.8; }
.my-pf .mp-same b { color: #2fbf71; }
.my-pf .mp-note { margin: 10px 0 0; font-size: 12px; }
/* Boss #4738: lô trong Danh mục của tôi. */
.my-pf .mp-open { margin-right: 6px; font-size: 16px; text-decoration: none; }
.my-pf .mp-row td:first-child { display: flex; align-items: center; }
.my-pf .mp-lots > td { padding: 8px 12px 12px 36px; background: rgba(230, 199, 122, .05); }
.my-pf .mp-lot-table { width: auto; min-width: 420px; }
.my-pf .mp-lot-table input { width: 110px; }
.my-pf .mp-lot-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
/* Boss #4771: web mẹ chọn thành viên để xem danh mục khách tự điền. */
.my-pf .mp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(230, 199, 122, .08); }
.my-pf .mp-pick select { min-width: 260px; padding: 4px 8px; border-radius: 8px; }
.my-pf input:disabled { opacity: 1; background: transparent; border-color: transparent; color: inherit; }
.my-pf input:disabled::placeholder { color: transparent; }
/* Boss #4965/Bee13 #4969: lọc loại việc + tóm tắt ngày ở Leader giao dịch. */
.journal-types { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 12px; vertical-align: middle; }
.journal-types .chip { cursor: pointer; border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.journal-types .chip[aria-pressed="true"] { background: var(--brand-gold, #e6c77a); color: #1b1405; border-color: var(--brand-gold, #e6c77a); font-weight: 600; }
.journal-sum { margin: 2px 0 8px; padding: 0 20px; font-size: 13px; }
/* Boss #4907: đường "SL tỷ trọng" trên chart, xanh nhạt. */
:root { --chart-stop-weight: #6cc4f5; }
:root[data-theme="light"] { --chart-stop-weight: #2f9be0; }
.pos-item .stop-weight { color: var(--chart-stop-weight); }
/* Boss #4895: 3 màu nhẹ để khỏi lộn ghi chú — HOLD vàng mật, Theo dõi xanh dương, Ghi chú chung xanh lá. */
.tone-hold { --tone: 214, 163, 51; } .tone-watch { --tone: 68, 140, 190; } .tone-note { --tone: 47, 170, 120; }
.detail-block:is(.tone-hold, .tone-watch, .tone-note) { background: rgba(var(--tone), .07) !important; border-left: 4px solid rgba(var(--tone), .75) !important; border-radius: 10px; padding-left: 12px; }
.detail-block:is(.tone-hold, .tone-watch, .tone-note) > h3 { color: rgb(var(--tone)); }
.note-chip { padding: 1px 6px; border-radius: 6px; background: rgba(var(--tone), .13); border-left: 3px solid rgba(var(--tone), .8); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
/* Boss #4888/#4892: Thế giới một khung, thẻ theo khu vực, bấm mã mới hiện biểu đồ (ít khung để khỏi lag). */
.world-overview { display: block; width: 100%; height: 780px; border: 0; border-radius: 12px; }
/* Boss #5150: khung có điểm số; nút khu vực của web ở trên khung. */
.world-panel .world-overview { height: 560px; }
.world-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.world-chip { flex: none; padding: 5px 14px; border-radius: 8px; border: 1px solid rgba(214, 163, 51, .45); background: transparent;
  color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.world-chip:hover { background: rgba(214, 163, 51, .12); }
.world-chip.on { background: #d6a333; border-color: #d6a333; color: #1a1406; font-weight: 600; }
.world-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .world-split { grid-template-columns: minmax(0, 1fr); } }
/* Boss #4836: lịch sự kiện chia 2 phần Trong nước / Vĩ mô. */
.news-calendar .news-cal-part { margin: 14px 0 6px; padding: 6px 10px; font-size: 14px; border-left: 3px solid var(--brand-gold, #e6c77a); background: rgba(230, 199, 122, .08); border-radius: 6px; }/* Boss #4744 24/10 19:55 "thử cho danh mục KH bên cạnh song song": màn rộng thì bảng Leader bên trái, Danh mục của tôi bên phải;
   màn hẹp hơn giữ xếp dưới. dense để khối của tôi lấp ô cạnh bảng Leader, các khối khác vẫn trải hết bề ngang. */
@media (min-width: 1700px) {
  #view-danh-muc:not([hidden]):has(> #my-pf) { display: grid; grid-template-columns: minmax(1040px, 1.45fr) minmax(0, 1fr); column-gap: 16px; grid-auto-flow: row dense; align-items: start; }
  #view-danh-muc:has(> #my-pf) > * { grid-column: 1 / -1; }
  #view-danh-muc:has(> #my-pf) > .table-wrap { grid-column: 1; }
  #view-danh-muc > #my-pf { grid-column: 2; margin-top: 0; padding: 12px; }
  #view-danh-muc > #my-pf .mp-table th, #view-danh-muc > #my-pf .mp-table td { padding: 6px 6px; font-size: 13px; }
  #view-danh-muc > #my-pf .mp-lots > td { padding-left: 18px; }
  #view-danh-muc > #my-pf .mp-lot-table { min-width: 0; }
  #view-danh-muc > #my-pf .mp-lot-table input { width: 84px; }
}

/* Bee04 #4983 + Boss #4987 25/10: đồng hồ "Mức quan tâm của nhỏ lẻ" dưới đồng hồ Sợ hãi – Tham lam, dòng "hai đồng hồ". */
.senti-col { display: grid; align-content: start; gap: 14px; min-width: 0; }
.senti-retail { padding-top: 12px; border-top: 1px dashed var(--line); }
.senti-wait { color: var(--muted, #8a96a8); font-style: italic; text-align: center; }
.senti-rparts { list-style: none; margin: 4px 0 2px; padding: 0; width: 100%; display: grid; gap: 3px; font-size: 12px; }
.senti-rparts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.senti-rparts li small { grid-column: 1 / -1; font-size: 10.5px; }
.senti-rparts b { white-space: nowrap; }
.senti-quad { display: grid; gap: 3px; padding: 8px 10px; border-left: 3px solid #e6c77a; border-radius: 6px; background: color-mix(in srgb, #e6c77a 9%, transparent); font-size: 12.5px; line-height: 1.45; }
.senti-quad small { font-size: 11px; }
.senti-rnote { text-align: left; line-height: 1.4; }
/* #4994: khối nhỏ lẻ nằm ngang dưới biểu đồ 30 phiên (cột 2); cột trái giữ đồng hồ thị trường + dòng "hai đồng hồ". */
.senti > .senti-col { grid-row: span 2; }
.senti-retail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; padding-top: 12px; border-top: 1px dashed var(--line); min-width: 0; }
.senti-rbody { display: grid; gap: 6px; min-width: 0; }
.senti-rparts { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); column-gap: 18px; row-gap: 6px; }
.senti-rparts li { align-content: start; }
@media (max-width: 1100px) { .senti > .senti-col { grid-row: auto; } .senti-retail { grid-template-columns: 1fr; } }
.senti-retail { grid-template-columns: 280px minmax(0, 1fr); } .senti-retail h3 { flex-wrap: wrap; justify-content: center; } .senti-retail .senti-beta { flex: none; white-space: nowrap; }
@media (max-width: 1100px) { .senti-retail { grid-template-columns: 1fr; } }

/* Boss #5030 26/10: ngày bản tin và ngày từng tin rõ ràng để NĐT biết tin mới hay cũ. */
.news-dayline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; }
.news-daychip { font-size: 15px; padding: 4px 12px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent, #e6c77a) 55%, transparent); background: color-mix(in srgb, var(--accent, #e6c77a) 12%, transparent); }
.news-daychip b { font-size: 16px; }
.news-ago { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted, #8a96a8); white-space: nowrap; }
.news-ago.today { color: #1fa35c; border-color: color-mix(in srgb, #1fa35c 60%, transparent); background: color-mix(in srgb, #1fa35c 12%, transparent); font-weight: 600; }
.news-item header .news-itemdate { flex: none; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: color-mix(in srgb, var(--line) 55%, transparent); white-space: nowrap; }
.news-item header .news-itemdate small { font-weight: 400; opacity: .8; }
.news-item header .news-itemdate.today { color: #1fa35c; background: color-mix(in srgb, #1fa35c 13%, transparent); }
.news-board .news-item > header > .news-itemdate { font-size: 13.5px; padding: 2px 9px; } .news-board .news-item > header > .news-itemdate small { font-size: 12px; }

/* Boss #5044 26/10: nút "Update danh mục" cạnh Update — viền mật ong, nền trong, để phân biệt với Update cả web. */
.leader-site #push-pf-btn { background: transparent; color: var(--tone-honey, #e6c77a); border-color: var(--tone-honey-2, #c9a24a); font-weight: 600; white-space: nowrap; flex: none; }
.leader-site #push-pf-btn:hover { background: color-mix(in srgb, var(--tone-honey, #e6c77a) 14%, transparent); }
.leader-site #push-pf-btn:disabled { opacity: .6; }
.senti-rwhat { font-size: 11.5px; color: var(--muted, #8a96a8); text-align: center; line-height: 1.4; max-width: 260px; }

/* Boss #5067 26/10: Đánh giá hiệu suất danh mục khách (số web tự tính + nhận xét Bee06). */
.mp-review { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--surface) 70%, transparent); display: grid; gap: 10px; }
.mp-review h3 { margin: 0; font-size: 15px; }
.mp-review h3 .faint { font-weight: 400; font-size: 12px; }
.mp-rv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.mp-rv-kpis > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--line) 30%, transparent); }
.mp-rv-kpis small { font-size: 11.5px; color: var(--text-muted, #8a96a8); }
.mp-rv-kpis b { font-size: 17px; }
.mp-rv-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.mp-rv-checks li { display: flex; gap: 8px; align-items: baseline; }
.mp-rv-checks i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }
.mp-rv-checks li.ok i { background: color-mix(in srgb, var(--up) 22%, transparent); color: var(--up); }
.mp-rv-checks li.mid i { background: color-mix(in srgb, var(--warn, #e0a800) 22%, transparent); color: var(--warn, #e0a800); }
.mp-rv-checks li.warn i { background: color-mix(in srgb, var(--down) 22%, transparent); color: var(--down); }
.mp-rv-table td, .mp-rv-table th { font-size: 12.5px; }
.mp-rv-bee06 { padding: 10px 12px; border-left: 3px solid #e6c77a; border-radius: 6px; background: color-mix(in srgb, #e6c77a 8%, transparent); display: grid; gap: 6px; font-size: 13px; line-height: 1.5; }
.mp-rv-bee06 h4 { margin: 0; font-size: 14px; }
.mp-rv-bee06 p { margin: 0; }
.mp-rv-bee06.wait { border-left-color: var(--line); background: transparent; }
.mp-rv-stale { color: var(--warn, #e0a800); font-size: 12px; }
.mp-rv-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.mp-rv-list ul, .mp-rv-ma { margin: 2px 0 0; padding-left: 18px; }
.mp-rv-list.good b { color: var(--up); } .mp-rv-list.warn b { color: var(--down); } .mp-rv-list.tip b { color: #e6c77a; }
/* #5068: khối theo đặc tả Bee06 — tiêu đề phần, thanh lãi/lỗ từng mã, so Leader, bảng điểm 4 mặt. */
.mp-review h4.mp-rv-h { margin: 6px 0 0; font-size: 13.5px; }
.mp-review h4.mp-rv-h .faint { font-weight: 400; font-size: 11.5px; }
.mp-rv-best { margin: 0; font-size: 13px; }
.mp-rv-bars { display: grid; gap: 4px; }
.mp-rv-bar { display: grid; grid-template-columns: 56px minmax(80px, 1fr) 76px 92px; gap: 8px; align-items: center; font-size: 12.5px; }
.mp-rv-bar .num { text-align: right; }
.mp-rv-track { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--line) 45%, transparent); overflow: hidden; }
.mp-rv-track i { display: block; height: 100%; border-radius: 4px; }
.mp-rv-track i.pos { background: var(--up); } .mp-rv-track i.neg { background: var(--down); }
.mp-rv-cmp { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; }
.mp-rv-cmp li.near { color: var(--warn, #e0a800); }
.mp-rv-cmp .badge { margin-left: 6px; }
.mp-rv-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.mp-rv-scores > div { display: grid; gap: 3px; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--line) 30%, transparent); }
.mp-rv-scores small { font-size: 11.5px; color: var(--text-muted, #8a96a8); }
.mp-rv-scores b { font-size: 17px; }
.mp-rv-meter { display: block; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--line) 50%, transparent); overflow: hidden; }
.mp-rv-meter i { display: block; height: 100%; background: #e6c77a; }

/* Boss #5250 27/10: tab Bee Universe dùng theme "Hai ngân hà" của Bản đồ Bee (ảnh mẫu 03 + canvas .bu-space); phần còn lại của web giữ nguyên.
   Như Bản đồ khi bật Ngân hà (#5219): bỏ lớp mây + tia sét của mây tri thức góc trái (giữ chấm tri thức), mây Skill mờ hòa vào nền. */
.bu-stage { background: #030407 url('/static/img/universe/nen-ngan-ha.jpg') center / cover no-repeat; }
.bu-stage::before { background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(0,0,0,.33), transparent 75%); }
.bu-space { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.bu-know-cloud .bu-puffs, .bu-know-cloud .bu-bolt { display: none; }
.bu-skill-cloud .bu-puffs { opacity: .42; mix-blend-mode: screen; }
/* Như Bản đồ #5223/#5226/#5228: mây ý tưởng góc dưới trái bỏ bụi tím–xanh và cụm mây, chỉ còn chấm sáng đứng yên theo trạng thái. */
.bu-idea-cloud .bu-dust, .bu-idea-cloud .bu-idea-puff { display: none; }
.bu-idea-cloud .bu-idea-drift { animation: none; }
.bu-idea-cloud .bu-idea-spark { cx: 0; cy: 0; r: 3.2px; opacity: 1; animation: none; fill: #e8eefc; filter: drop-shadow(0 0 3px currentColor); }
.bu-idea.s-dang-ban .bu-idea-spark { fill: #73ddff; color: #73ddff; animation: bu-idea-dot 3.6s ease-in-out infinite; }
.bu-idea.s-chot .bu-idea-spark { fill: #ffcd68; color: #ffcd68; }
.bu-idea.s-da-hop-nhat .bu-idea-spark { fill: #ecd38f; color: #ecd38f; r: 2.4px; }
.bu-idea-cloud .bu-mote { fill: #ffe7a6; opacity: .5; }
@keyframes bu-idea-dot { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bu-idea.s-dang-ban .bu-idea-spark { animation: none; } }
/* Boss #5323 28/10: lớp sao bay Galaxy (WebGL) như Bản đồ Bee; ảnh nền bản WebP nhẹ hơn, JPG dự phòng. */
.bu-stage { background: #030407 image-set(url('/static/img/universe/nen-ngan-ha.webp') type('image/webp'), url('/static/img/universe/nen-ngan-ha.jpg') type('image/jpeg')) center / cover no-repeat; }
.bu-galaxy { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; mix-blend-mode: screen; }
/* Boss #5327 28/10: tab Bee Universe nhúng đúng trang Bản đồ Bee (app/static/ban-do), phủ kín khung. */
.bu-map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #030407; }
