/* Bex Quant — /acoes (complementa mercados.css) */

.ac-quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ac-q { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.ac-q .l { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.ac-q .v { font-family: var(--mono); font-size: 19px; font-weight: 700; margin: 4px 0 2px; }
.ac-q .c { font-family: var(--mono); font-size: 12.5px; }
.up { color: var(--bull); } .dn { color: var(--bear); } .fl { color: var(--text-dim); }

.ac-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.ac-seg { display: inline-flex; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; scrollbar-width: none; }
.ac-seg button {
  background: var(--bg-2); border: 0; border-right: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 32px;
  white-space: nowrap; flex: none;
}
.ac-seg button:last-child { border-right: 0; }
.ac-seg button[aria-pressed="true"] { color: var(--text); background: rgba(74,158,255,.16); }
.ac-search {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  padding: 7px 10px; font: inherit; font-size: 13px; min-width: 200px;
}

.ac-map-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ac-map-head h2 { margin: 0; }
.ac-sub-h { margin-top: 18px; }
.ac-map { position: relative; width: 100%; height: 600px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.ac-map-adr { height: 300px; }
.ac-sec { position: absolute; box-sizing: border-box; }
.ac-sec > .h {
  position: absolute; left: 0; right: 0; top: 0; height: 17px; padding: 1px 5px; box-sizing: border-box;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-tile {
  position: absolute; box-sizing: border-box; border: 1px solid var(--bg); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  cursor: default; text-align: center; line-height: 1.1; font-family: var(--mono);
}
.ac-tile:hover, .ac-tile:focus-visible { outline: 2px solid #fff; outline-offset: -2px; z-index: 2; }
.ac-tile b { font-weight: 700; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.ac-tile span { opacity: .92; text-shadow: 0 1px 1px rgba(0,0,0,.35); }

.ac-legend { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.ac-legend .bar { width: 180px; height: 10px; border-radius: 3px; }

.ac-note { margin-top: 10px; line-height: 1.5; }

/* barras por setor */
.ac-bars { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 6px 10px; align-items: center; }
.ac-bars .nm { font-size: 13px; }
.ac-bars .nm small { color: var(--text-dim); margin-left: 6px; font-size: 11px; }
.ac-bars .tr { position: relative; height: 22px; }
.ac-bars .zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--border); }
.ac-bars .b { position: absolute; top: 3px; height: 16px; border-radius: 2px; }
.ac-bars .val { position: absolute; top: 2px; font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; }

/* tabelas */
.ac-table th { cursor: pointer; user-select: none; }
.ac-table th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
.ac-table th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
.ac-table td.tk { font-family: var(--mono); font-weight: 700; }
.ac-table td.nm2 { font-family: inherit; text-align: left; color: var(--text-dim); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ac-table td.sec { font-family: inherit; text-align: left; color: var(--text-dim); font-size: 12px; }
.ac-table th.l { text-align: left; }
.ac-tag { font-size: 9.5px; font-family: var(--mono); border: 1px solid var(--border); color: var(--text-dim); border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: 1px; }

.ac-static th { cursor: default; }
.ac-more {
  display: block; margin: 10px auto 0; background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
  border-radius: 7px; padding: 7px 14px; font: inherit; font-size: 12.5px; cursor: pointer;
}

/* matriz */
.ac-matrix { border-collapse: separate; border-spacing: 2px; font-family: var(--mono); font-size: 11.5px; }
.ac-matrix th { color: var(--text-dim); font-weight: 600; padding: 3px 6px; white-space: nowrap; }
.ac-matrix thead th { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; height: 92px; vertical-align: bottom; }
.ac-matrix tbody th { text-align: right; }
.ac-matrix td { width: 44px; min-width: 44px; height: 26px; text-align: center; color: #fff; border-radius: 3px; }
.ac-matrix td.self { color: var(--text-dim); background: var(--bg-3); }

.ac-tip { max-width: 290px; }
.ac-tip .hd { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ac-tip .hd b { font-size: 14px; }
.ac-tip .nm { color: var(--text); font-size: 12px; margin: 1px 0 6px; }
.ac-tip table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 11.5px; }
.ac-tip td { padding: 1px 0; }
.ac-tip td + td { text-align: right; }
.ac-tip svg { display: block; margin: 6px 0 2px; }

@media (max-width: 760px) {
  .ac-map { height: 520px; }
  .ac-map-adr { height: 340px; }
  .ac-bars { grid-template-columns: 110px 1fr; }
  .ac-table .c-hide { display: none; }
  .ac-search { flex: 1 1 100%; }
  .ac-legend .bar { width: 120px; }
}
