/* ═══════════════════════════════════════════════════════════════
   LEFT PANEL — grid dock · escala proporcional · resize lateral
   ═══════════════════════════════════════════════════════════════ */

#left {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  align-self: stretch;
  background: var(--bg1);
}

#left-shell {
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
  transform-origin: top left;
  will-change: transform;
}

#left-shell.left-shell-scaled {
  overflow: visible;
}

#left-shell.left-shell-scaled > * {
  max-width: 100%;
}

#left-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  z-index: 120;
  touch-action: none;
}

#left-resize-handle::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--border2);
  transition: width 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

#left-resize-handle:hover::after,
body.left-resize-active #left-resize-handle::after {
  width: 2px;
  background: rgba(74, 143, 160, 0.75);
  box-shadow: 0 0 10px rgba(74, 143, 160, 0.28);
}

body.left-resize-active {
  cursor: col-resize !important;
  user-select: none !important;
}

body.left-resize-active * {
  cursor: col-resize !important;
}

body.fs-mode #left-resize-handle,
body.fs-chart-only #left-resize-handle,
body.ih-hub-full #left-resize-handle,
body.chat-full #left-resize-handle,
body.report-full #left-resize-handle,
body.ordens-full #left-resize-handle,
body.tt-full #left-resize-handle,
body.ts-full #left-resize-handle,
body.tp-full #left-resize-handle {
  display: none !important;
}

#center {
  grid-column: 2;
  grid-row: 1;
  margin-left: 0 !important;
  min-width: 0;
}

#right {
  grid-column: 3;
  grid-row: 1;
}

body.fs-mode #left,
body.ih-hub-full #left,
body.ih-hub-full #left-resize-handle,
body.ih-hub-full.monitor-oms-dock #left,
body.ih-hub-full.monitor-oms-dock #left-resize-handle,
body.ih-hub-full.terminal-active.monitor-oms-dock #left,
body.ih-hub-full.terminal-active.monitor-oms-dock #left-resize-handle,
body.ih-hub-full.fs-oms-dock #left,
body.ih-hub-full.fs-oms-dock #left-resize-handle,
body.chat-full #left,
body.report-full #left,
body.ordens-full #left,
body.tt-full #left,
body.ts-full #left,
body.tp-full #left {
  display: none !important;
}

body.fs-mode #app,
body.ih-hub-full #app,
body.chat-full #app,
body.report-full #app,
body.ordens-full #app,
body.tt-full #app,
body.ts-full #app,
body.tp-full #app {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.fs-mode #center,
body.ih-hub-full #center,
body.fs-chart-only #center,
body.view-geral-active.fs-chart-only #center,
body.chat-full #center,
body.report-full #center,
body.ordens-full #center,
body.tt-full #center,
body.ts-full #center,
body.tp-full #center {
  grid-column: 1 !important;
}

body.fs-mode #right,
body.ih-hub-full #right,
body.ih-hub-full.monitor-oms-dock #right,
body.ih-hub-full.terminal-active #right,
body.chat-full #right,
body.report-full #right,
body.ordens-full #right,
body.tt-full #right,
body.ts-full #right,
body.tp-full #right {
  display: none !important;
}

/* Geral · tela cheia + OMS Mapper (Alt+S) — painel esquerdo rebatedor */
body.fs-mode.fs-oms-dock #left {
  display: flex !important;
  grid-column: 1;
  animation: fs-oms-dock-in 0.34s cubic-bezier(0.34, 1.35, 0.64, 1);
}

@keyframes fs-oms-dock-in {
  from {
    transform: translateX(-100%);
    opacity: 0.55;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

body.fs-mode.fs-oms-dock #left-resize-handle {
  display: block !important;
}

body.fs-mode.fs-oms-dock #app {
  grid-template-columns: var(--left-w) minmax(0, 1fr) !important;
}

body.fs-mode.fs-oms-dock #center {
  grid-column: 2 !important;
}

/* Brand — quase encostado nos botões OMS (dentro do left-shell) */
#left-shell .left-brand,
#left .left-brand {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  gap: 7px;
  justify-content: center;
  margin: 4px 0 10px;
  min-height: 0;
  overflow: visible;
  padding: 2px 10px 8px;
  pointer-events: none;
  user-select: none;
  width: 100%;
}

#left-shell .left-brand .left-brand-mark,
#left .left-brand .left-brand-mark {
  display: block;
  flex: 0 0 auto;
  height: 56px;
  object-fit: contain;
  width: 56px;
}

#left-shell .left-brand .left-brand-name,
#left .left-brand .left-brand-name {
  color: #00d4e0;
  font-family: var(--font-bloomberg, var(--mono), monospace);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

body.view-geral-active #left-shell .left-brand .left-brand-name,
body.view-geral-active #left .left-brand .left-brand-name {
  color: #00d4e0;
}

