/* P/L por ativo — faixa abaixo do TF / toolbar de monitoramento */
.open-pl-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 14px 8px;
  flex-shrink: 0;
  background: var(--bg1, #0a0c0f);
  border-bottom: 1px solid var(--border2, rgba(255, 255, 255, 0.08));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  flex-wrap: nowrap;
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', monospace);
  position: relative;
  z-index: 45;
  pointer-events: auto;
}

.open-pl-bar--hidden {
  display: none !important;
}

.open-pl-bar::-webkit-scrollbar {
  height: 4px;
}

.open-pl-bar::-webkit-scrollbar-thumb {
  background: var(--border2, rgba(255, 255, 255, 0.12));
  border-radius: 2px;
}

.open-pl-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  min-height: 28px;
  border: 1px solid var(--border2, rgba(255, 255, 255, 0.1));
  background: var(--bg2, rgba(255, 255, 255, 0.04));
  color: var(--text-dim, #8a939c);
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', monospace);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.open-pl-chip:hover {
  border-color: var(--cyan, #00a8cc);
  color: var(--text, #d4dce4);
  background: rgba(0, 168, 204, 0.08);
}

.open-pl-chip-sym {
  color: var(--text, #d4dce4);
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0.04em;
}

.open-pl-chip-pl {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.08em;
}

.open-pl-chip-cnt {
  color: var(--text-faint, #6a7884);
  font-weight: 500;
  font-size: 0.92em;
}

.open-pl-chip--pos .open-pl-chip-pl {
  color: var(--green, #67E6C9);
}

.open-pl-chip--neg .open-pl-chip-pl {
  color: var(--red, #E77A7A);
}

.open-pl-chip--zero .open-pl-chip-pl {
  color: var(--text-dim, #8a939c);
}

body.view-geral-active .open-pl-bar {
  background: var(--inst-panel, #05070a);
  border-bottom-color: var(--inst-border-dim, rgba(255, 255, 255, 0.06));
  min-height: 46px;
  padding: 8px 14px 9px;
  gap: 9px;
}

body.view-geral-active .open-pl-chip {
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', monospace);
  font-size: 17.5px;
  font-weight: 600;
  padding: 6px 16px;
  min-height: 32px;
  gap: 9px;
  border-color: var(--inst-border-dim, rgba(255, 255, 255, 0.06));
  background: rgba(255, 255, 255, 0.03);
}

body.view-geral-active .open-pl-chip:hover {
  border-color: var(--inst-cyan, #00a8cc);
  background: rgba(0, 168, 204, 0.08);
}

body.view-geral-active .open-pl-chip-sym {
  color: var(--inst-cyan, #00a8cc);
  font-weight: 700;
}

body.view-geral-active .open-pl-chip-pl {
  font-weight: 700;
}

body.view-geral-active .open-pl-chip--pos .open-pl-chip-pl {
  color: var(--inst-green, #67E6C9);
}

body.view-geral-active .open-pl-chip--neg .open-pl-chip-pl {
  color: var(--inst-red, #E77A7A);
}

body.view-geral-active .open-pl-chip-cnt {
  color: var(--inst-text-dim, #6a7884);
}

/* Terminal / Chat — sem faixa open P/L (só Overview) */
body.terminal-active .imperium-desk-view > .open-pl-bar,
body.terminal-active #open-pl-bar-alertas,
body.view-alertas-active #open-pl-bar-alertas,
#view-chat .open-pl-bar,
.open-pl-bar[data-pl-mount="chat"],
.open-pl-bar[data-pl-mount="desk"],
.open-pl-bar[data-pl-mount="alertas"] {
  display: none !important;
}
