/* mboard: tema escuro e dourado, grade compacta. */
:root {
  --bg: #0c0e13;
  --panel: #141619;
  --line: #202329;
  --line2: #34312b;
  --text: #e9eff8;
  --sym: #d5e1f0;
  --hdr: #c9c2b0;
  --muted: #a0b1c6;
  --m: #8495aa;
  --d: #53667f;
  --brand: #d4af37;
  --g: #47d7b3;
  --t: #8bded2;
  --c: #86b7ff;
  --o: #e4b367;
  --r: #ef8291;
  --star: #f5c542;
  --row: 28px;
}
* { box-sizing: border-box; }
:root { color-scheme: dark; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- topo ---------- */
.top { height: 46px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line2); margin-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; letter-spacing: .08em; font-size: 13px; }
.brand span { color: var(--text); }
.brand b { color: var(--brand); font-weight: 600; margin-left: 3px; }
.vsep { width: 1px; height: 18px; background: var(--line2); }
.exchange { font-size: 13px; letter-spacing: .05em; color: var(--sym); display: flex; align-items: center; gap: 8px; }
.badge { background: #20334e; color: var(--brand); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; letter-spacing: .04em; }
.status { margin-left: auto; display: flex; gap: 16px; align-items: center; color: var(--m); font-size: 12px; letter-spacing: .03em; white-space: nowrap; }
.dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--r); vertical-align: 1px; }
.dot.ok { color: var(--muted); }
.dot.ok::before { background: var(--g); }
.warn { color: var(--o); }

.bar2 { height: 42px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 14px 6px; }
.tabs, .seg { display: flex; gap: 2px; padding: 2px; border-bottom: 1px solid var(--line2); background: transparent; }
.tabs button { height: 28px; padding: 0 12px; display: flex; align-items: center; gap: 6px; background: transparent; border: 0;
  border-radius: 3px 3px 0 0; color: var(--m); font-size: 13px; letter-spacing: .05em; cursor: pointer; }
.tabs button:hover { color: var(--sym); }
.tabs { flex-shrink: 0; }
.tabs button.on { background: #2b2616; color: var(--brand); box-shadow: 0 2px 0 var(--brand); }
.seg { border: 0; background: transparent; padding: 0; gap: 3px; }
.seg button { height: 26px; min-width: 32px; padding: 0 8px; background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); font-size: 12px; letter-spacing: .05em; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--brand); border-color: #8c7530; background: #2b2616; }

.tb { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb .grow1 { flex: 1; }
.tb input[type=search], .tb select, .btn {
  height: 32px; background: var(--panel); border: 1px solid var(--line2); border-radius: 5px; color: var(--sym);
  padding: 0 10px; font-size: 13px; letter-spacing: .03em; outline: none; }
.tb input[type=search] { width: 170px; }
.tb input[type=search]::placeholder { color: var(--m); }
.tb input[type=search]:focus, .tb select:focus, .btn:hover { border-color: #525252; }
.btn { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.btn.on { border-color: var(--brand); color: var(--brand); }
.btn:disabled, .seg button:disabled, .tb select:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, .gh:focus-visible { outline: 1px solid var(--brand); outline-offset: -1px; }
.pause-btn { flex-shrink: 0; min-width: 86px; justify-content: center; }
.result-count { color: var(--m); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-notice { padding: 8px 16px; color: var(--o); background: #211a0f; border-bottom: 1px solid #483118; font-size: 12px; }
.app-notice.error { color: var(--r); background: #200d13; }
.chk { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; letter-spacing: .03em; cursor: pointer; user-select: none; white-space: nowrap; }
.chk:hover { color: var(--text); }
.chk input { appearance: none; width: 15px; height: 15px; margin: 0; border: 1px solid #525252; border-radius: 4px; background: #0f0f0f; cursor: pointer; display: grid; place-content: center; }
.chk input:checked { background: var(--brand); border-color: var(--brand); }
.chk input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #000; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

.progress { height: 1px; flex: none; background: var(--line); }
.progress div { height: 100%; width: 0; background: var(--brand); transition: width .4s; }
.progress.done div { opacity: 0; transition: opacity 1.2s; }

main { flex: 1; min-height: 0; display: flex; }
main section { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }

/* ---------- grade do Live ---------- */
.gwrap { flex: 1; min-height: 0; overflow: auto; }
.ginner { min-width: max-content; padding-right: 16px; }
.gbody { overflow-anchor: none; }
.ghead, .grow { display: grid; grid-template-columns: var(--cols); }
.ghead { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.gh { height: var(--row); display: flex; align-items: center; font-size: 12px; letter-spacing: .05em; color: var(--hdr);
  white-space: nowrap; user-select: none; cursor: pointer; position: relative; }
.gh:hover { color: #fff; }
.gh.sorted { box-shadow: inset 0 -2px 0 var(--brand); }
.gh.sorted::after { content: "↓"; color: var(--c); font-size: 10px; margin-left: 2px; }
.gh.sorted.asc::after { content: "↑"; }
.gh.dragging { opacity: .35; }
.gh.drop-l::before, .gh.drop-r::before { content: ""; position: absolute; top: 3px; bottom: 3px; width: 2px; background: var(--brand); border-radius: 2px; }
.gh.drop-l::before { left: -1px; }
.gh.drop-r::before { right: -1px; }
.gh.fixed { cursor: default; }

.grow { height: var(--row); border-bottom: 1px solid var(--line); }
.grow:hover { background: #192638; border-bottom-color: #456080; }
.gc { display: flex; align-items: center; overflow: hidden; white-space: nowrap; min-width: 0; }
.gc { font-variant-numeric: tabular-nums; }
.a-r { justify-content: flex-end; }
.a-c { justify-content: center; }
.stick { position: sticky; z-index: 10; background: var(--bg); }
.gh.stick { z-index: 30; }
.grow:hover .stick { background: #192638; }
.c-pin { left: 0; justify-content: center; color: #2e2e2e; cursor: pointer; font-size: 13px; }
.c-pin:hover { color: #6b6b6b; }
.c-pin.on { color: var(--star); }
button.c-pin { border: 0; border-radius: 0; padding: 0; font-family: inherit; }
.c-fav, .c-fav-cell { left: 0; justify-content: center; }
.gh.c-fav { color: var(--muted); font-size: 17px; }
.favorite-icon { display: block; width: 17px; height: 17px; flex: none; }
.quick-filters button[data-favorite] { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 32px; color: var(--star); }
.quick-filters button[data-favorite] .favorite-icon { fill: currentColor; }
.quick-filters button[data-favorite]:not(.on) .favorite-icon { fill: none; stroke: currentColor; stroke-width: 1.5; }
button.c-fav { appearance: none; -webkit-appearance: none; background: transparent; border: 0; box-shadow: none;
  border-radius: 0; padding: 0; margin: 0; width: 28px; height: 100%; display: flex; align-items: center;
  color: var(--d); cursor: pointer; }
button.c-fav.on { color: var(--star); }
button.c-fav:not(:disabled):hover { color: var(--star); }
button.c-fav:disabled { opacity: .5; cursor: default; }
a.c-sym { text-decoration: none; }
.c-sym { left: 28px; color: var(--sym); cursor: pointer; }
.grow:hover .c-sym { color: #fff; }
.c-sym:hover { text-decoration: underline; text-decoration-color: #525252; text-underline-offset: 3px; }
.gc svg { display: block; }
.spark path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }

.g { color: var(--g); } .t { color: var(--t); } .c { color: var(--c); }
.o { color: var(--o); } .r { color: var(--r); } .m { color: var(--m); } .d { color: var(--d); }
/* valor neutro na tabela: bem apagado, para o olho ir direto em quem tem cor */
.gc.m { color: #434d5b; }
.gc.nx { text-shadow: none; font-weight: 400; } .gc.nx.nb { font-weight: 700; }
.gc.nx.nu { text-shadow: 0 0 9px rgba(71, 215, 179, .85); } .gc.nx.nd { text-shadow: 0 0 9px rgba(255, 70, 100, .9); }
/* força em degraus (página de vendas); no painel o gradiente contínuo é montado em js/live.js */
.sp1 { color: #86b7ff; } .sp2 { color: #5fc8d8; } .sp3 { color: #47d7b3; } .sp4 { color: #8dffe4; font-weight: 700; text-shadow: 0 0 9px rgba(71, 215, 179, .85); }
.sn1 { color: #d6cfa6; } .sn2 { color: #e89a5b; } .sn3 { color: #ef8291; } .sn4 { color: #ff8fa3; font-weight: 700; text-shadow: 0 0 9px rgba(255, 70, 100, .9); }

.empty { padding: 48px 16px; text-align: center; color: var(--m); }

/* ---------- seletor de colunas ---------- */
.pop-anchor { position: relative; }
.pop { position: absolute; right: 0; top: 38px; z-index: 50; width: min(340px, 94vw); max-height: min(70vh, 640px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; font-size: 11px; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.pop-head button { background: none; border: 0; color: var(--brand); font-size: 12px; cursor: pointer; padding: 0; letter-spacing: .03em; }
.pop-head button:hover { text-decoration: underline; }
.pop-list { overflow: auto; padding: 0 6px 6px; }
.pop-sep { margin: 6px 6px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--m); }
.pop-item { height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 6px; border-radius: 6px; font-size: 13px; color: var(--sym); position: relative; }
.pop-item:hover { background: #203049; }
.pop-item .grip { color: #525252; cursor: grab; font-size: 12px; letter-spacing: -2px; width: 10px; }
.pop-item.off { color: var(--m); }
.pop-item label { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.col-move { height: 23px; width: 25px; padding: 0; border: 1px solid var(--line2); border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.col-move:hover { color: var(--brand); border-color: #525252; }
.col-move:disabled { opacity: .2; cursor: default; }
.pop-item.dragging { opacity: .35; }
.pop-item.drop-l::before, .pop-item.drop-r::before { content: ""; position: absolute; left: 4px; right: 4px; height: 2px; background: var(--brand); border-radius: 2px; }
.pop-item.drop-l::before { top: -1px; }
.pop-item.drop-r::before { bottom: -1px; }

/* ---------- Session ---------- */
.session-grid .session-index { left: 0; color: var(--muted); }
.session-grid .session-time { left: 40px; color: var(--sym); font-size: 12px; letter-spacing: .02em; }
.session-grid .ghead .session-index, .session-grid .ghead .session-time { color: var(--hdr); }
.session-row.live-row, .session-row.live-row .stick { background: #15243a; }
.session-row.live-row .session-time { color: var(--brand); }
#ses-sort { margin-right: 8px; }
.session-body { overflow-anchor: none; }
.session-pager { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.session-page-count { margin-right: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.session-page-controls { display: flex; align-items: center; gap: 6px; }
.session-pager .btn, .session-page-select { height: 26px; padding: 0 8px; font-size: 12px; }
.session-page-select { border: 1px solid var(--line2); border-radius: 6px; color: var(--text); background: var(--bg); }
.session-note { color: var(--m); font-size: 11px; white-space: nowrap; }
.method { flex: none; color: var(--muted); background: #101a28; border-bottom: 1px solid var(--line2); font-size: 11px; }
.method summary { padding: 6px 16px; cursor: pointer; color: var(--brand); }
.method p { max-width: 1080px; margin: 4px 16px 10px; line-height: 1.5; font-size: 12px; }
.method summary:focus-visible { outline: 1px solid var(--brand); outline-offset: -1px; }
.screening { flex: none; padding: 3px 14px 7px; border-bottom: 1px solid var(--line2); }
.quick-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-filters button { border: 1px solid var(--line2); border-radius: 5px; padding: 6px 12px; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 12px; white-space: nowrap; }
.quick-filters button:hover { border-color: var(--brand); color: var(--text); }
/* selecionado: contorno dourado e texto dourado, sem preencher o botão */
.quick-filters button.on { background: var(--panel); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 0 10px rgba(212, 175, 55, .25); color: var(--brand); font-weight: 600; }
.quick-filters button:disabled { opacity: .5; cursor: default; }
.filter-caption { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; min-height: 14px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.ghead .header-metric { color: #e7bd68; font-weight: 600; }
.ghead .header-period { color: var(--hdr); font-weight: 400; margin-left: 3px; }
#marketcap-status { color: var(--o); }
.top { border-top: 2px solid var(--brand); height: 30px; background: var(--panel); }
.brand { gap: 9px; }
.brand-emblem { display: block; position: relative; width: 44px; height: 38px; overflow: hidden; }
.brand-emblem img { position: absolute; width: 92px; height: 62px; left: -24px; top: -11px; object-fit: contain; }
.brand .brand-name { color: var(--brand); font-size: 14px; letter-spacing: .14em; }
.brand b { color: var(--text); margin: 0; }
.brand small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .3em; font-weight: 400; color: var(--muted); }
.badge { background: #2b2616; }
.method { background: #141619; }
.session-row.live-row, .session-row.live-row .stick { background: #201e14; }

/* ---------- topo compacto: uma faixa de controles, uma de filtros, uma de legenda ---------- */
body { border-top: 2px solid var(--brand); }
.bar2 { height: 44px; padding: 6px 14px; background: var(--panel); }
.bar2 .status { margin-left: 4px; gap: 12px; }
.icon-btn { width: 32px; padding: 0; justify-content: center; position: relative; }
.icon-btn.armed { color: var(--brand); border-color: #8c7530; }
.icon-btn.armed::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.screening { padding: 6px 14px 5px; }
.quick-filters { gap: 3px; }
.quick-filters button { padding: 4px 7px; line-height: 16px; }
.quick-filters button[data-favorite] { min-width: 28px; }
.filter-caption { margin-top: 5px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.filter-caption span { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.filter-caption span:empty { display: none; }

/* luzes do Flush e do Pre-Flush: acendem em neon no período em que a referência está no evento */
.quick-filters .fl { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: 1px; }
.quick-filters .fl i { font-style: normal; font-size: 9.5px; font-weight: 700; line-height: 13px; padding: 0 4px; border-radius: 7px; background: #1a1d23; color: #566273; letter-spacing: .02em; }
.quick-filters .fl i.on { background: #0f2f28; color: #8dffe4; box-shadow: 0 0 8px rgba(71, 215, 179, .95); text-shadow: 0 0 6px rgba(71, 215, 179, .9); animation: fl 1s ease-in-out infinite; }
/* um traço separa o nome do filtro (e as luzes, quando há) do contador de ativos; é só estilo, sem elemento a mais no botão */
.quick-filters button[data-count] { display: inline-flex; align-items: center; }
.quick-filters button[data-count]::before { content: ""; order: 1; flex: none; width: 1px; height: 12px; margin-left: 7px; background: #3a3f4a; }
.quick-filters button[data-count]::after { order: 2; margin-left: 6px; }
/* squeeze: L e S com as mesmas luzes do Flush, separadas por um traço */
.quick-filters .fl { align-items: center; }
.quick-filters .fl .fs { width: 1px; height: 11px; margin: 0 3px; background: #3a3f4a; }
.quick-filters .fl i.fl-s.on { background: #3a1820; color: #ff9aac; box-shadow: 0 0 8px rgba(255, 70, 100, .95); text-shadow: 0 0 6px rgba(255, 70, 100, .9); }
/* período escolhido clicando de novo no botão */
.quick-filters .fl i.pick { outline: 1.5px solid #fff; outline-offset: 1px; animation: none; }
@keyframes fl { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .quick-filters .fl i.on { animation: none; } }

/* selo do contador nos critérios seletivos */
.quick-filters button[data-count]::after { content: attr(data-count); display: inline-block; margin-left: 5px; min-width: 16px; padding: 0 4px;
  border-radius: 8px; background: #2b2616; color: var(--brand); font-size: 11px; font-weight: 600; line-height: 16px; text-align: center;
  font-variant-numeric: tabular-nums; }
.quick-filters button.on[data-count]::after { background: #2b2616; color: var(--brand); }
.quick-filters button.fresh { border-color: var(--brand); color: var(--text); animation: fresh 1.2s ease-in-out infinite; }
@keyframes fresh { 50% { box-shadow: 0 0 0 2px rgba(212, 175, 55, .35); } }
@media (prefers-reduced-motion: reduce) { .quick-filters button.fresh { animation: none; box-shadow: 0 0 0 2px rgba(212, 175, 55, .35); } }

/* avisos */
.alerts-pop { width: min(300px, 94vw); }
.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; flex-direction: column; gap: 3px; max-width: min(360px, 90vw); padding: 9px 12px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid #8c7530; border-left: 3px solid var(--brand); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  animation: toast-in .18s ease-out; }
.toast b { color: var(--brand); font-size: 12px; letter-spacing: .04em; font-weight: 600; }
.toast span { color: var(--text); font-size: 13px; line-height: 1.35; }
.toast:hover { border-color: var(--brand); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 1050px) {
  .bar2 { height: auto; min-height: 42px; flex-wrap: wrap; gap: 6px 10px; }
  .tb { min-width: min(650px, 100%); order: 2; flex-basis: 100%; }
  .pause-btn { margin-left: auto; }
  .tb input[type=search] { min-width: 100px; flex-shrink: 1; }
  .result-count, .session-note { display: none; }
}
@media (max-width: 580px) {
  .top { padding: 0 10px; gap: 8px; }
  .brand span, .vsep, #status-load { display: none; }
  .status { gap: 6px; font-size: 11px; }
  .bar2 { padding-left: 8px; padding-right: 8px; }
  .tb { flex-wrap: wrap; gap: 6px; }
  .tb .grow1 { display: none; }
  .chk { font-size: 12px; }
  .pop { position: fixed; left: 8px; right: 8px; top: 114px; width: auto; max-width: none; max-height: calc(100dvh - 130px); }
  .pop-list { max-height: calc(100dvh - 178px); }
}

/* barras de rolagem discretas */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }
::-webkit-scrollbar-corner { background: transparent; }

/* conta do assinante */
.account { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.account-out { background: none; border: 1px solid var(--line2); border-radius: 5px; color: var(--muted); font-size: 11px; padding: 2px 8px; cursor: pointer; }
.account-out:hover { color: var(--text); border-color: #525252; }

/* marca: só no cabeçalho e no rodapé */
.brandmark { display: flex; align-items: center; gap: 8px; flex: none; margin-right: 6px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 16px; letter-spacing: .01em; }
.brandmark img { display: block; }
.app-foot { flex: none; height: 24px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-top: 1px solid var(--line); background: var(--panel); font-size: 11px; color: var(--m); white-space: nowrap; overflow: hidden; }
.app-foot b { color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.app-foot .grow1 { flex: 1; }
@media (max-width: 1050px) { .brandmark span { display: none; } }
@media (max-width: 720px) { .app-foot span:last-child { display: none; } }

/* no Histórico, o nome da moeda no cabeçalho abre o gráfico */
.session-grid .gh.session-link { cursor: pointer; }
.session-grid .gh.session-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* sessão não confirmada há muito tempo: cobre o painel até confirmar de novo */
.session-veil { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px; background: rgba(12, 14, 19, .96); }
.session-veil div { max-width: 420px; text-align: center; }
.session-veil b { display: block; color: var(--brand); font-size: 17px; margin-bottom: 8px; }
.session-veil span { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- ferramentas do painel: início, filtros próprios, cópia para IA ---------- */
a.btn { text-decoration: none; }
.tools-anchor { display: flex; gap: 6px; flex: none; }
.tools-pop { width: min(340px, 94vw); }
.tools-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.tools-hint { margin: 0; padding: 4px 12px 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tools-body .tools-hint { padding: 0; }
.tools-hint.foot { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--m); font-size: 11px; }
.tools-body .pop-sep { margin: 4px 0 0; }
.tools-body .seg button { border-color: var(--line2); }
.tools-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.tools-err { margin: 0; min-height: 15px; color: var(--r); font-size: 12px; }
.tools-err.ok { color: var(--g); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #0b0b0b; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.field input, .cond select, .cond input { height: 30px; min-width: 0; padding: 0 8px; background: var(--bg); border: 1px solid var(--line2); border-radius: 5px; color: var(--sym); font-size: 13px; outline: none; }
.cond { display: grid; grid-template-columns: 1fr 48px 78px 25px; gap: 5px; align-items: center; margin-bottom: 5px; }
.cond .col-move { height: 30px; }
.linkish { align-self: flex-start; padding: 0; background: none; border: 0; color: var(--brand); font-size: 12px; cursor: pointer; }
.linkish:disabled { opacity: .4; cursor: default; }
.pop-head button:disabled { opacity: .4; cursor: default; text-decoration: none; }
.cf-item label { min-width: 0; }
.cf-item label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- heatmap ---------- */
.heat-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.heat-wrap canvas { display: block; }
.heat-wrap .empty { position: absolute; inset: 0; display: grid; place-items: center; }
.heat-tip { position: absolute; z-index: 30; min-width: 150px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55); font-size: 12px; pointer-events: none; }
.heat-tip b { display: block; font-size: 14px; color: var(--text); }
.heat-tip dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 7px 0; font-variant-numeric: tabular-nums; }
.heat-tip dt { color: var(--m); } .heat-tip dd { margin: 0; text-align: right; color: var(--sym); }
.heat-tip a { color: var(--brand); text-decoration: none; pointer-events: auto; }
.heat-tip a:hover { text-decoration: underline; }

/* ---------- celular: tudo encaixa na tela; filtros em uma faixa que rola de lado ---------- */
@media (max-width: 720px) {
  .quick-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .quick-filters::-webkit-scrollbar { display: none; }
  .quick-filters button { flex: none; padding: 6px 9px; }
  .screening { padding: 6px 8px 5px; }
  .tabs button { padding: 0 9px; }
  .bar2 .status { margin-left: auto; }
  #sort-description, #activity-status { display: none; }
  .app-foot { display: none; }
  .tools-pop, .alerts-pop { position: fixed; left: 8px; right: 8px; top: 96px; width: auto; max-height: calc(100dvh - 110px); }
  .pause-btn { min-width: 0; }
  .pause-btn span { display: none; }
  .btn#live-cols { font-size: 0; gap: 0; }
  .tb input[type=search] { width: auto; flex: 1; }
}
.tb .session-note { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.tb .seg { flex: none; }

/* dado que passou da idade aceitável: continua visível, mas marcado */
.gc.stale { opacity: .42; text-decoration: underline dotted; text-underline-offset: 3px; }

/* a carga não aparece para o cliente: sem barra de progresso */
.progress { display: none; }
/* indicador "ao vivo" em destaque */
#status-ws { display: inline-flex; align-items: center; height: 26px; padding: 0 11px 0 9px; border-radius: 13px; border: 1px solid var(--line2); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--m); }
#status-ws.dot::before { margin-right: 7px; vertical-align: 0; }
#status-ws.dot.ok { color: #5cf2cb; border-color: rgba(71, 215, 179, .5); background: rgba(71, 215, 179, .1); box-shadow: 0 0 16px rgba(71, 215, 179, .28); }
#status-ws.dot.ok::before { background: #5cf2cb; box-shadow: 0 0 0 0 rgba(92, 242, 203, .7); animation: live-pulse 1.4s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(92, 242, 203, 0); } 100% { box-shadow: 0 0 0 0 rgba(92, 242, 203, 0); } }

/* heatmap: faixas que ligam e desligam; mapa ocupa o espaço sem depender do próprio tamanho */
#view-heatmap { position: relative; }
.heat-bands { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px 12px 2px; }
.heat-bands button { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border: 1px solid var(--line2); border-radius: 13px; background: var(--panel); color: var(--sym); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.heat-bands button::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--k); }
.heat-bands button:hover { border-color: var(--k); }
.heat-bands button.off { opacity: .4; text-decoration: line-through; }
.heat-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.heat-tip dt.on, .heat-tip dd.on { font-weight: 700; }
.heat-tip dt.on { color: var(--text); }
#tb-heatmap .seg { gap: 3px; }
#tb-heatmap #heat-scope button.on { color: var(--brand); }

.heat-tip-icon { float: right; margin: -2px 0 0 10px; border-radius: 50%; }
#tb-heatmap #heat-icons { height: 26px; flex: none; }

/* segunda aba do painel: tudo desfocado atrás do aviso */
body.dup > *:not(#dup-tab) { filter: blur(7px) saturate(.7); pointer-events: none; user-select: none; }
#dup-tab { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: rgba(8, 9, 12, .62); }
.dup-card { width: min(420px, 100%); padding: 30px 28px 26px; text-align: center; background: var(--panel); border: 1px solid #8c7530; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.dup-card img { display: block; margin: 0 auto 14px; }
.dup-card h2 { margin: 0; font-size: 19px; font-weight: 650; color: var(--text); }
.dup-card p { margin: 10px 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.dup-card .btn { display: inline-flex; justify-content: center; height: 38px; padding: 0 20px; border-radius: 8px; font-size: 14px; border: 1px solid var(--brand); }
.dup-card .btn:disabled { opacity: .75; background: none; color: var(--brand); cursor: default; }

/* heatmap: por padrão um quadro centralizado; "Expandir" devolve a tela inteira */
#view-heatmap:not(.wide) .heat-wrap { flex: 0 1 90%; max-height: 1000px; width: min(1720px, calc(100% - 72px)); margin: auto; border: 1px solid var(--line2); border-radius: 12px; background: #0e1014; }
@media (max-width: 760px) { #view-heatmap:not(.wide) .heat-wrap { flex: 1; width: 100%; margin: 0; border: 0; border-radius: 0; } .heat-wide { display: none; } }

.heat-wide { position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.heat-wide:hover, .heat-wide.on { color: var(--brand); border-color: #8c7530; }

/* ---------- dois mercados: cripto e TradFi ---------- */
.market-seg { flex: none; gap: 0; padding: 2px; border: 1px solid var(--line2); border-radius: 8px; }
.market-seg a { display: flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; color: var(--m); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-decoration: none; }
.market-seg a:hover { color: var(--text); }
.market-seg a.on { background: #2b2616; color: var(--brand); }
.screening-row { display: flex; align-items: center; gap: 10px; }
.screening-row .quick-filters { flex: 1; min-width: 0; }
.bench-seg { flex: none; align-items: center; gap: 3px; }
.bench-seg:empty { display: none; }
.bench-seg span { margin-right: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.bench-seg button { border-color: var(--line2); font-weight: 600; }
.screening-row .bench-seg { margin-right: 12px; }
@media (max-width: 720px) { .market-seg a { padding: 0 7px; } .screening-row { flex-wrap: wrap; } }

/* referência da força no heatmap de TradFi: botões grandes, logo abaixo das faixas de RSI */
.heat-bench { flex: none; justify-content: center; gap: 6px; padding: 8px 12px 0; }
.heat-bench span { margin-right: 6px; font-size: 12px; }
.heat-bench button { height: 34px; min-width: 76px; padding: 0 18px; border-radius: 9px; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.heat-bench button.on { box-shadow: 0 0 14px rgba(212, 175, 55, .35); }

/* ---------- cabeçalho do painel em duas faixas ---------- */
.bar2 > .grow1 { flex: 1; }
.bar-div { flex: none; width: 1px; height: 22px; background: var(--line2); }
.bar3 { flex: none; display: flex; align-items: center; min-height: 42px; padding: 6px 14px; background: var(--bg); border-bottom: 1px solid var(--line2); }
.bar3 .tb { gap: 10px; }
.tb-label { flex: none; color: var(--m); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tb .seg + .tb-label { margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line2); }
#tb-heatmap .btn, #tb-heatmap .result-count { margin-left: 8px; }
#tb-heatmap .seg button { height: 28px; padding: 0 11px; border: 1px solid var(--line2); }
#tb-heatmap .seg button.on { border-color: #8c7530; }
@media (max-width: 900px) { .bar3 { padding: 6px 8px; } .bar3 .tb { flex-wrap: wrap; gap: 6px 8px; } .bar-div { display: none; } .tb .seg + .tb-label { margin-left: 0; padding-left: 0; border-left: 0; } }

/* ---------- referência da força: chave deslizante SPY | BTC ---------- */
.bench-switch { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; }
.bench-switch .bs-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.bs-track { --i: 0; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border: 1px solid var(--line2); border-radius: 999px; background: #0e1014; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.bs-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 2); border-radius: 999px; background: linear-gradient(180deg, #3a3116, #2b2616); border: 1px solid #8c7530; box-shadow: 0 0 16px rgba(212, 175, 55, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: translateX(calc(var(--i) * 100%)); transition: transform .32s cubic-bezier(.3, 1.4, .5, 1); }
.bench-switch .bs-track button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; min-width: 132px; padding: 0 18px; border: 0 !important; border-radius: 999px; background: none !important; box-shadow: none !important; color: var(--muted); cursor: pointer; transition: color .2s, transform .15s; }
.bench-switch .bs-track button:hover { color: var(--text); }
.bench-switch .bs-track button:active { transform: scale(.96); }
.bench-switch .bs-track button.on { color: var(--text); }
.bench-switch .bs-track svg, .bench-switch .bs-track img { width: 22px; height: 22px; flex: none; border-radius: 50%; filter: grayscale(.25) opacity(.8); transition: filter .25s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.bench-switch .bs-track button:hover svg, .bench-switch .bs-track button:hover img { filter: none; transform: scale(1.08); }
.bench-switch .bs-track button.on svg, .bench-switch .bs-track button.on img { filter: none; transform: scale(1.12); }
.bench-switch .bs-track button span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.bench-switch .bs-track b { font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.bench-switch .bs-track small { margin-top: 2px; font-size: 10.5px; font-weight: 500; letter-spacing: .02em; color: var(--m); }
.bench-switch .bs-track button.on b { color: var(--brand); }
.heat-bench.bench-switch { justify-content: center; padding: 10px 12px 2px; }
/* versão compacta, na faixa de filtros do painel */
.screening-row .bench-switch { gap: 8px; margin-right: 12px; }
.screening-row .bs-track { padding: 3px; }
.screening-row .bs-thumb { top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 2); }
.screening-row .bench-switch .bs-track button { height: 28px; min-width: 74px; padding: 0 12px; gap: 7px; }
.screening-row .bench-switch .bs-track small { display: none; }
.screening-row .bench-switch .bs-track svg, .screening-row .bench-switch .bs-track img { width: 16px; height: 16px; }
.screening-row .bench-switch .bs-track b { font-size: 12px; }

/* no heatmap: "STR" em cima da chave, e a chave acima das faixas de RSI */
.heat-bench.bench-switch { flex-direction: column; gap: 8px; padding: 14px 12px 4px; }
.heat-bench.bench-switch .bs-label { font-size: 12px; letter-spacing: .22em; color: var(--brand); }

/* ---------- cabeçalho do painel: mais alto e com mais presença (telas largas) ---------- */
.tabs button svg { display: none; }
@media (min-width: 901px) {
  .bar2 { height: auto; min-height: 60px; padding: 9px 18px; gap: 14px; background: linear-gradient(180deg, #181b21 0%, #111317 100%); border-bottom: 1px solid var(--line2); box-shadow: 0 1px 0 rgba(212, 175, 55, .08), 0 8px 24px rgba(0, 0, 0, .25); position: relative; z-index: 100; }   /* acima do cabeçalho fixo da tabela: os menus de alertas e ferramentas abrem daqui */
  .bar2 .brandmark { gap: 10px; margin-right: 2px; font-size: 19px; font-weight: 700; letter-spacing: .01em; }
  .bar2 .brandmark img { width: 26px; height: 26px; }
  .bar2 .btn { height: 36px; border-radius: 9px; }
  .bar2 .icon-btn { width: 36px; }
  .bar2 .home-btn svg { width: 18px; height: 18px; }
  .market-seg { padding: 3px; border-radius: 999px; background: #0e1014; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
  .market-seg a { height: 32px; padding: 0 17px; border-radius: 999px; font-size: 13px; letter-spacing: .04em; transition: color .2s, background .2s, box-shadow .2s; }
  .market-seg a.on { background: linear-gradient(180deg, #3a3116, #2b2616); color: var(--brand); box-shadow: inset 0 0 0 1px #8c7530, 0 0 14px rgba(212, 175, 55, .28); }
  .bar-div { height: 28px; }
  .tabs { gap: 4px; padding: 0; border-bottom: 0; }
  .tabs button { height: 40px; padding: 0 15px; gap: 8px; border-radius: 10px; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; transition: color .2s, background .2s; }
  .tabs button svg { display: block; width: 17px; height: 17px; opacity: .75; }
  .tabs button:hover { background: rgba(255, 255, 255, .04); }
  .tabs button.on { background: #2b2616; box-shadow: inset 0 -2px 0 var(--brand); }
  .tabs button.on svg { opacity: 1; }
  .bar3 { min-height: 46px; padding: 7px 18px; }
}

/* chave liga/desliga (Ícones do heatmap) */
.switch { display: inline-flex; align-items: center; gap: 9px; height: 28px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; }
.switch i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #1b1e24; border: 1px solid var(--line2); transition: background .2s, border-color .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #6b7889; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1), background .2s; }
.switch:hover { color: var(--text); }
.switch.on { color: var(--text); }
.switch.on i { background: #2b2616; border-color: #8c7530; box-shadow: 0 0 10px rgba(212, 175, 55, .25); }
.switch.on i::after { transform: translateX(14px); background: var(--brand); }
#tb-heatmap .switch { margin-left: 12px; padding-left: 16px; border-left: 1px solid var(--line2); border-radius: 0; }

/* o quadro do heatmap não encosta no rodapé */
#view-heatmap:not(.wide) { padding-bottom: 26px; }
#view-heatmap:not(.wide) .heat-wrap { flex-basis: 88%; }
@media (max-width: 760px) { #view-heatmap:not(.wide) { padding-bottom: 0; } }

/* ---------- menu de ferramentas do painel: recolhido, abre por cima da tela ---------- */
.side-toggle { flex: none; }
.side-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(8, 9, 12, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
.side-backdrop.open { opacity: 1; pointer-events: auto; }
.hub-side.drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 141; width: 262px; max-width: 86vw; padding: 14px 10px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border-right: 1px solid var(--line2); border-top: 2px solid var(--brand); box-shadow: 22px 0 60px rgba(0, 0, 0, .55); transform: translateX(-104%); transition: transform .28s cubic-bezier(.2, .9, .25, 1); scrollbar-width: thin; }
.hub-side.drawer.open { transform: none; }
.side-head { display: flex; align-items: center; gap: 9px; padding: 4px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--text); }
.side-head b { font-weight: 700; }
.side-close { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.side-close:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.hub-side.drawer .side-group { margin: 14px 10px 6px; color: var(--m); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hub-side.drawer .side-item { display: flex; align-items: center; gap: 11px; padding: 10px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; transition: background .15s, color .15s, border-color .15s; }
.hub-side.drawer .side-item svg { width: 20px; height: 20px; flex: none; color: var(--a, #53667f); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.hub-side.drawer .side-item b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-side.drawer a.side-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.hub-side.drawer a.side-item:hover svg { transform: scale(1.18) rotate(-6deg); }
.hub-side.drawer .side-item.on { background: color-mix(in srgb, var(--a) 14%, transparent); border-color: color-mix(in srgb, var(--a) 45%, transparent); color: var(--text); }
.hub-side.drawer .side-item.on b { font-weight: 650; }
.hub-side.drawer .side-item.soon { opacity: .5; cursor: default; }

/* ---------- ferramentas do cabeçalho: uma cápsula só, com os botões dentro ---------- */
.bar-tools { flex: none; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line2); border-radius: 13px; background: #0e1014; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.bar-tools .tools-anchor { gap: 2px; }
.bar-tools #alerts-anchor { display: flex; position: relative; }
.bar-tools .btn { width: 38px; height: 34px; min-width: 0; padding: 0; justify-content: center; border: 0; border-radius: 10px; background: none; color: var(--muted); transition: background .18s, color .18s, box-shadow .18s; }
.bar-tools .btn svg { width: 18px; height: 18px; transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.bar-tools .btn:hover { background: rgba(212, 175, 55, .12); color: var(--brand); border: 0; }
.bar-tools .btn:hover svg { transform: scale(1.14); }
.bar-tools .btn:active svg { transform: scale(.92); }
.bar-tools .btn.on, .bar-tools .btn.armed, .bar-tools .btn[aria-expanded="true"] { background: #2b2616; color: var(--brand); box-shadow: inset 0 0 0 1px #8c7530, 0 0 12px rgba(212, 175, 55, .22); }
.bar-tools .icon-btn.armed::after { top: 6px; right: 7px; box-shadow: 0 0 6px var(--brand); }
.bar-tools-sep { width: 1px; height: 20px; margin: 0 3px; background: var(--line2); }
.bar-tools .pause-btn { width: auto; padding: 0 12px 0 9px; gap: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.bar-tools .pause-btn svg { width: 16px; height: 16px; }
.bar-tools .pause-btn.on { color: var(--brand); }
@media (max-width: 1100px) { .bar-tools .pause-btn { width: 38px; padding: 0; } .bar-tools .pause-btn span { display: none; } }
@media (max-width: 900px) { .bar-tools { margin-left: auto; } }

/* ---------- seletor de colunas: indicador à esquerda, períodos à direita ---------- */

/* ---------- alertas: últimos avisos ---------- */
.alerts-pop { width: min(380px, 94vw); }
.alerts-none { margin: 2px 6px 8px; color: var(--m); font-size: 12.5px; }
.alerts-log { display: flex; flex-direction: column; gap: 2px; max-height: 232px; overflow: auto; margin: 0 0 4px; }
.alerts-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 8px; width: 100%; padding: 7px 6px; border: 0; border-radius: 6px; background: none; color: var(--sym); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.alerts-row:hover { background: #203049; }
.alerts-row i { font-style: normal; color: var(--m); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.alerts-row b { color: var(--brand); font-weight: 600; white-space: nowrap; }
.alerts-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.alerts-clear { margin: 0 6px 6px; padding: 0; border: 0; background: none; color: var(--m); font: inherit; font-size: 11.5px; cursor: pointer; }
.alerts-clear:hover { color: var(--brand); }
#alerts-btn[data-unseen]::before { content: attr(data-unseen); position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--r); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
#alerts-btn { position: relative; }

/* seletor de colunas: linha de ordem */

/* ---------- heatmap no celular: controles em faixas que rolam de lado e mapa com altura estável ---------- */
/* Antes os controles quebravam em várias linhas e a contagem de moedas mudava de largura a cada leitura:
   a tela "andava" sozinha enquanto as moedas carregavam. Agora nada muda de tamanho depois de aberto. */
@media (max-width: 760px) {
  html, body { overscroll-behavior: none; }
  .bar3 .tb { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .bar3 .tb::-webkit-scrollbar, .heat-bands::-webkit-scrollbar { display: none; }
  .bar3 .tb > * { flex: none; }
  .tb-label, #heat-count { display: none; }
  #tb-heatmap .switch { margin-left: 4px; padding-left: 0; border-left: 0; }
  .heat-bench.bench-switch { flex-direction: row; gap: 10px; padding: 8px 10px 2px; }
  .heat-bench .bs-track button { height: 34px; min-width: 92px; padding: 0 12px; gap: 7px; }
  .heat-bench .bs-track small { display: none; }
  .heat-bench .bs-track svg, .heat-bench .bs-track img { width: 18px; height: 18px; }
  .heat-bands { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 8px 10px 4px; }
  .heat-bands button { flex: none; }
  #view-heatmap { overflow-y: auto; overscroll-behavior: contain; }
  #view-heatmap .heat-wrap, #view-heatmap:not(.wide) .heat-wrap { flex: none; width: 100%; height: max(400px, calc(100dvh - 300px)); margin: 0; border: 0; border-radius: 0; }
}
@media (max-width: 760px) { .screening-row .quick-filters { flex: 1 1 100%; } .screening-row .bench-switch { margin: 2px 0 2px auto; } }
/* plano só de cripto: TradFi com cadeado */
html.no-tradfi .market-seg a[data-m="tradfi"] { color: var(--brand, #d4af37); }
html.no-tradfi .market-seg a[data-m="tradfi"]::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: -1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9zm-8 0V7a3 3 0 0 1 6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9zm-8 0V7a3 3 0 0 1 6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat; }
html.no-tradfi .bench-switch button[data-b="SPYUSDT"] { opacity: .75; }
html.no-tradfi .bench-switch button[data-b="SPYUSDT"]::after { content: ""; flex: none; width: 11px; height: 11px; margin-left: 2px; background: var(--brand, #d4af37); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9zm-8 0V7a3 3 0 0 1 6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 9V7A5 5 0 0 0 7 7v2H5v12h14V9zm-8 0V7a3 3 0 0 1 6 0v2z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* ---------- seletor de colunas: presets, o que mostrar e a ordem, em três blocos ---------- */
#columns-pop { width: min(780px, 94vw); max-height: min(82vh, 640px); border-radius: 14px; border-color: #3a3320; box-shadow: 0 24px 70px rgba(0, 0, 0, .7); }
#columns-pop .pop-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
#columns-pop .cp-title { color: var(--text); font-size: 15px; font-weight: 650; letter-spacing: 0; }
#columns-pop .pop-list { padding: 12px 14px 14px; display: grid; gap: 10px; }
.cp-sec { padding: 12px 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: #101217; }
.cp-sec.cp-gold { border-color: #4a3f1c; background: linear-gradient(160deg, rgba(212, 175, 55, .09), transparent 60%), #101217; }
.cp-sec > h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cp-sec > h4 small { color: var(--m); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
/* presets */
.cp-presets { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.col-preset-wrap { display: inline-flex; }
.col-preset { height: 32px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.col-preset:hover { color: var(--text); border-color: #6b5a26; }
.col-preset.on { background: var(--brand); border-color: var(--brand); color: #0b0b0b; }
.col-preset-wrap .col-preset { border-radius: 999px 0 0 999px; padding-right: 10px; }
.col-preset-del { width: 28px; height: 32px; margin-left: -1px; border: 1px solid var(--line2); border-radius: 0 999px 999px 0; background: var(--bg); color: var(--m); font-size: 15px; line-height: 1; cursor: pointer; }
.col-preset-del:hover { color: var(--r); border-color: #6b3a42; }
.col-preset-new { display: flex; align-items: center; gap: 6px; }
.col-preset-new input { height: 32px; width: 150px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px; outline: none; }
.col-preset-new input:focus { border-color: #8c7530; }
.col-preset-new .btn { height: 32px; padding: 0 14px; border-radius: 999px; border-color: #5d4e22; color: var(--brand); font-size: 12.5px; white-space: nowrap; }
.col-preset-new .btn:hover { border-color: var(--brand); }
.col-preset-note { margin: 8px 0 0; color: var(--o); font-size: 12px; } .col-preset-note:empty { display: none; }
/* o que mostrar */
.col-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 0; }
.col-row + .col-row { border-top: 1px solid #1b1e24; }
.col-row > b { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.col-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.col-chip { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 28px; min-width: 42px; padding: 0 11px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); color: var(--m); font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; transition: border-color .12s, color .12s, background .12s, transform .08s; }
.col-chip input { position: absolute; opacity: 0; pointer-events: none; }
.col-chip:hover { color: var(--text); border-color: #525252; }
.col-chip:active { transform: scale(.95); }
.col-chip.on { background: #2b2616; border-color: #8c7530; color: var(--brand); }
.col-chip:focus-within { outline: 2px solid rgba(212, 175, 55, .5); outline-offset: 1px; }
.col-all { height: 24px; min-width: 62px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.col-all:hover { color: var(--brand); border-color: #5d4e22; }
/* ordem */
.col-order-move { display: flex; gap: 4px; margin-left: auto; }
.col-order-move button { width: 28px; height: 24px; border: 1px solid var(--line2); border-radius: 7px; background: none; color: var(--muted); font-size: 10px; cursor: pointer; }
.col-order-move button:hover:not(:disabled) { color: var(--brand); border-color: #8c7530; }
.col-order-move button:disabled { opacity: .3; cursor: default; }
.col-order-list { display: flex; flex-wrap: wrap; gap: 5px; }
.col-ord { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 4px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); color: var(--muted); font: inherit; font-size: 11.5px; cursor: grab; white-space: nowrap; }
.col-ord i { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; background: #1a1d23; color: var(--m); font-style: normal; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.col-ord:hover { color: var(--text); border-color: #525252; }
.col-ord.on { background: #2b2616; border-color: var(--brand); color: var(--brand); } .col-ord.on i { background: var(--brand); color: #0b0b0b; }
.col-ord.dragging { opacity: .35; }
.col-ord.drop-l::before, .col-ord.drop-r::before { content: ""; position: absolute; top: 2px; bottom: 2px; width: 2px; background: var(--brand); border-radius: 2px; }
.col-ord.drop-l::before { left: -4px; } .col-ord.drop-r::before { right: -4px; }
@media (max-width: 720px) {
  .col-row { grid-template-columns: 1fr auto; } .col-row .col-chips { grid-column: 1 / -1; grid-row: 2; }
  .cp-presets { justify-content: flex-start; } .col-preset-new { flex: 1 1 100%; } .col-preset-new input { flex: 1; width: auto; }
}
/* busca de símbolo e botão Colunas: os dois controles da barra da tabela, com mais presença */
#live-filter { height: 32px; width: 230px; padding: 0 12px 0 34px; border: 1px solid #4a4f5a; border-radius: 9px; color: var(--text); font-size: 13px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") 10px center / 16px 16px no-repeat;
  transition: border-color .15s, box-shadow .15s, width .15s; }
#live-filter::placeholder { color: var(--muted); }
#live-filter:hover { border-color: #8c7530; }
#live-filter:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 0 14px rgba(212, 175, 55, .28); width: 270px; }
.btn#live-cols { height: 32px; padding: 0 14px; gap: 7px; border: 1px solid #8c7530; border-radius: 9px; background: linear-gradient(180deg, #2f2913, #1c190e); color: var(--brand); font-weight: 600; font-size: 13px;
  transition: border-color .15s, box-shadow .15s, color .15s; }
.btn#live-cols:hover { border-color: var(--brand); color: #f1d67a; box-shadow: 0 0 12px rgba(212, 175, 55, .25); }
.btn#live-cols.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 0 14px rgba(212, 175, 55, .3); }
@media (max-width: 720px) { #live-filter, #live-filter:focus { width: auto; flex: 1; min-width: 100px; } .btn#live-cols { font-size: 0; gap: 0; padding: 0 10px; } }
/* Pre-Flush e Flush no meio da barra de cima, maiores e em dourado: são os filtros que mais importam */
.bar3 { position: relative; }
.hero-filters { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; display: flex; flex-wrap: nowrap; gap: 8px; }
.hero-filters:empty { display: none; }
.hero-filters[data-tab="heatmap"] { left: auto; right: 14px; transform: translateY(-50%); }
.hero-filters button { height: 32px; padding: 0 14px; border: 1px solid #8c7530; border-radius: 10px; background: var(--panel); color: #f1d67a; font-size: 13px; font-weight: 700; letter-spacing: .02em; line-height: 1; transition: border-color .15s, box-shadow .15s; }
.hero-filters button:hover { border-color: var(--brand); color: #fff; box-shadow: 0 0 14px rgba(212, 175, 55, .3); }
.hero-filters button.on, .hero-filters button.on:hover { background: var(--panel); color: #f1d67a; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), 0 0 14px rgba(212, 175, 55, .35); animation: none; }
.hero-filters .fl { gap: 3px; margin-left: 9px; }
.hero-filters .fl i { font-size: 10.5px; line-height: 16px; padding: 0 6px; border-radius: 8px; background: #0f1114; color: #6f7c8f; }
.hero-filters button[data-count]::after { font-size: 12px; line-height: 18px; min-width: 20px; }
/* os dois botões têm sempre a mesma aparência; quem diz que há evento são as luzes */
/* tela estreita: não cabe no meio da barra sem cobrir a busca; desce para uma faixa própria, ainda centralizada */
@media (max-width: 1240px) { .bar3 { flex-wrap: wrap; } .hero-filters, .hero-filters[data-tab="heatmap"] { position: static; transform: none; order: 9; width: 100%; justify-content: center; padding: 6px 0 2px; } }
@media (max-width: 720px) { .hero-filters { flex-wrap: wrap; gap: 6px; } .hero-filters button { height: 30px; padding: 0 8px; font-size: 12px; } .hero-filters .fl { margin-left: 6px; gap: 2px; } .hero-filters .fl i { padding: 0 4px; font-size: 10px; } }

/* ---------- Linguagem visual do Guia v2 (13/10/2026) na moldura do painel: aba aberta e filtro ligado com o dourado em degradê, filtros de
 * cantos de 8px, menu lateral com o ícone no quadrado e a barra dourada, janelas de cantos maiores. As cores dos dados (M-Score, RSI,
 * variação, escalas) ficam exatamente como estavam. ---------- */
.tabs button { transition: background .15s, color .15s, box-shadow .15s; }
.tabs button.on { background: linear-gradient(90deg, rgba(212, 175, 55, .24), rgba(212, 175, 55, .06)); box-shadow: inset 0 0 0 1px #5d4e22, 0 2px 0 var(--brand); color: #f1d67a; }
#quick-filters button { border-radius: 8px; font-weight: 600; transition: border-color .15s, color .15s, background .15s; }
#quick-filters button:hover { border-color: #8c7530; }
#quick-filters button.on { background: linear-gradient(180deg, rgba(212, 175, 55, .22), rgba(212, 175, 55, .06)); }
.tb input[type=search], .tb select { border-radius: 10px; transition: border-color .15s; }
.tb input[type=search]:focus, .tb select:focus { border-color: #8c7530; }
.pop { border-radius: 14px; }
.toast { border-radius: 12px; }

/* menu lateral do painel: o mesmo desenho das páginas internas */
.hub-side.drawer .side-group { margin: 18px 10px 6px; color: var(--brand); font-weight: 700; }
.hub-side.drawer .side-item { position: relative; gap: 10px; padding: 8px; border-radius: 11px; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.hub-side.drawer .side-item svg { box-sizing: content-box; width: 16px; height: 16px; padding: 5px; border-radius: 8px; background: #1a1d23; transition: background .15s, color .15s; }
.hub-side.drawer a.side-item:hover { background: #15181d; border-color: var(--line); transform: translateX(3px); }
.hub-side.drawer a.side-item:hover svg { transform: none; background: #2b2616; }
.hub-side.drawer .side-item.on { background: linear-gradient(90deg, rgba(212, 175, 55, .16), rgba(212, 175, 55, .03)); border-color: #5d4e22; color: #fff; }
.hub-side.drawer .side-item.on::before { content: ''; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand); }
.hub-side.drawer .side-item.on svg { background: var(--brand); color: #0b0b0b; }
@media (prefers-reduced-motion: reduce) { .hub-side.drawer a.side-item:hover { transform: none; } }
