/* Flux CRM 5.4.3 · cards e áreas redimensionáveis com a página acompanhando o conteúdo */
body[data-theme="crm-premium"] .content{overflow:visible}
.flux-card-resizable{position:relative!important;min-width:0;box-sizing:border-box;transition:box-shadow .18s ease}
.flux-card-resizable.flux-card-resizing{z-index:35!important;user-select:none!important;transition:none!important;box-shadow:0 0 0 3px rgba(31,132,235,.13),0 18px 45px rgba(25,55,91,.16)!important}
.flux-card-resize-handle{position:absolute;z-index:45;display:grid;place-items:center;border:1px solid #cbd9e7;background:#fff;color:#4e7398;opacity:0;transition:opacity .16s,border-color .16s,background .16s,color .16s;touch-action:none;box-shadow:0 3px 10px rgba(27,53,82,.10)}
.flux-card-resizable:hover>.flux-card-resize-handle,.flux-card-resizable:focus-within>.flux-card-resize-handle,.flux-card-resizing>.flux-card-resize-handle{opacity:1}
.flux-card-resize-handle:hover,.flux-card-resize-handle:focus-visible{outline:0;border-color:#58a3e9;background:#edf6ff;color:#176fc8}
.flux-card-resize-handle[data-resize-axis="x"]{top:50%;right:-7px;width:14px;height:52px;transform:translateY(-50%);border-radius:999px;cursor:ew-resize}
.flux-card-resize-handle[data-resize-axis="y"]{left:50%;bottom:-7px;width:52px;height:14px;transform:translateX(-50%);border-radius:999px;cursor:ns-resize}
.flux-card-resize-handle[data-resize-axis="both"]{right:-7px;bottom:-7px;width:19px;height:19px;border-radius:7px;cursor:nwse-resize}
.flux-card-resize-handle[data-resize-axis="x"]::before{content:"⋮";font-size:15px;line-height:1}
.flux-card-resize-handle[data-resize-axis="y"]::before{content:"⋯";font-size:15px;line-height:1}
.flux-card-resize-handle[data-resize-axis="both"]::before{content:"⌟";font-size:12px;line-height:1;transform:translate(-1px,-1px)}
.flux-layout-reset-all{margin-left:auto!important;white-space:nowrap}
.flux-layout-reset-all::before{content:"↺";margin-right:6px;font-size:15px}

/* O tamanho aumenta o fluxo do documento; tabelas e listas continuam com sua rolagem própria. */
.flux-card-resizable:not([data-resizable-box]){height:auto!important;max-height:none!important;overflow:visible!important}
.flux-card-resizable>.table-wrap,.flux-card-resizable>.crm-drilldown-table-wrap{max-width:100%}

/* Inbox: altura redimensionável e rolagem da página acompanhando o painel. */
body[data-route="inbox"].inbox-focus-layout{height:auto!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important}
body[data-route="inbox"].inbox-focus-layout main.main{height:auto!important;min-height:100dvh!important;overflow:visible!important}
body[data-route="inbox"].inbox-focus-layout .content{height:auto!important;min-height:calc(100dvh - var(--n4-topbar,60px))!important;overflow:visible!important}
body[data-route="inbox"].inbox-focus-layout .inbox-layout{
  height:var(--flux-inbox-height,calc(100dvh - var(--n4-topbar,60px)))!important;
  min-height:620px!important;
  max-height:none!important;
  overflow:visible!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-channel-rail,
body[data-route="inbox"].inbox-focus-layout .inbox-workspace{height:100%!important;min-height:0!important}
body[data-route="inbox"].inbox-focus-layout .inbox-layout>.flux-card-resize-handle[data-resize-axis="x"]{display:none!important}
body[data-route="inbox"].inbox-focus-layout .inbox-layout>.flux-card-resize-handle[data-resize-axis="y"]{bottom:5px;z-index:80}
body[data-route="inbox"].inbox-focus-layout .inbox-layout>.flux-card-resize-handle[data-resize-axis="both"]{right:7px;bottom:5px;z-index:80}

/* Cards pequenos de indicadores preservam proporção compacta. */
body[data-route="link-tracking"] .tracking-metrics>.metric-card{min-height:82px}

@media(max-width:850px){
  .flux-card-resize-handle[data-resize-axis="x"],.flux-card-resize-handle[data-resize-axis="both"]{display:none!important}
  .flux-card-resize-handle[data-resize-axis="y"]{opacity:.72}
  .flux-layout-reset-all{width:100%;justify-content:center}
  .flux-card-resizable{grid-column:auto!important;width:auto!important;flex-basis:auto!important}
  body[data-route="inbox"].inbox-focus-layout .inbox-layout{min-height:560px!important}
}
@media(pointer:coarse){.flux-card-resize-handle{opacity:.7}}

/* Flux CRM 5.4.4 · Inbox clara, chat verticalmente ampliável e rolagem da página sincronizada. */
html:has(body[data-route="inbox"].inbox-focus-layout){
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable;
}
body[data-route="inbox"].inbox-focus-layout{
  height:auto!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
}
body[data-route="inbox"].inbox-focus-layout main.main,
body[data-route="inbox"].inbox-focus-layout .content{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
body[data-route="inbox"].inbox-focus-layout .content{
  min-height:calc(100dvh - var(--n4-topbar,60px))!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-layout{
  height:var(--flux-inbox-height,calc(100dvh - var(--n4-topbar,60px)))!important;
  min-height:620px!important;
  max-height:none!important;
  overflow:visible!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-channel-rail,
body[data-route="inbox"].inbox-focus-layout .inbox-workspace{
  height:100%!important;
  max-height:none!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-workspace,
body[data-route="inbox"].inbox-focus-layout .conversation-list,
body[data-route="inbox"].inbox-focus-layout .chat-panel{
  overflow:hidden!important;
}
body[data-route="inbox"].inbox-focus-layout .chat-panel{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}

body[data-route="inbox"].inbox-focus-layout .message-view-tools{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  padding:10px 16px!important;
  border-top:1px solid #edf2f7!important;
  border-bottom:1px solid #dfe8f1!important;
  background:#f8fbfe!important;
  color:#4e6075!important;
}
body[data-route="inbox"].inbox-focus-layout .message-view-tools>span{
  color:#536983!important;
  font-size:11px!important;
  font-weight:900!important;
}
body[data-route="inbox"].inbox-focus-layout .message-view-tools button{
  min-height:34px!important;
  padding:7px 13px!important;
  border:1px solid #c9d8e7!important;
  border-radius:999px!important;
  background:#ffffff!important;
  color:#29445f!important;
  font-size:11px!important;
  font-weight:800!important;
  box-shadow:0 2px 7px rgba(28,58,91,.06)!important;
}
body[data-route="inbox"].inbox-focus-layout .message-view-tools button:hover,
body[data-route="inbox"].inbox-focus-layout .message-view-tools button:focus-visible{
  outline:0!important;
  border-color:#6da9e4!important;
  background:#edf6ff!important;
  color:#125fae!important;
  box-shadow:0 0 0 3px rgba(35,132,225,.10)!important;
}
body[data-route="inbox"].inbox-focus-layout .message-view-tools button.is-active,
body[data-route="inbox"].inbox-focus-layout .message-view-tools button[aria-pressed="true"]{
  border-color:#438fe0!important;
  background:#e8f3ff!important;
  color:#0d65b9!important;
  box-shadow:inset 0 0 0 1px rgba(67,143,224,.08)!important;
}

body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle{
  position:relative!important;
  z-index:70!important;
  flex:0 0 24px!important;
  display:grid!important;
  grid-template-columns:minmax(24px,1fr) auto minmax(24px,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-height:24px!important;
  margin:0!important;
  padding:0 14px!important;
  border:0!important;
  border-top:1px solid #dce6ef!important;
  border-bottom:1px solid #e5edf4!important;
  border-radius:0!important;
  background:#f6f9fc!important;
  color:#55718e!important;
  cursor:ns-resize!important;
  touch-action:none!important;
  user-select:none!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.01em!important;
  box-shadow:none!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle i{
  display:block!important;
  width:100%!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,#b9c9d9,transparent)!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle:hover,
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle:focus-visible,
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle.is-dragging{
  outline:0!important;
  background:#eaf4ff!important;
  color:#176fc8!important;
}
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle:hover i,
body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle.is-dragging i{
  background:linear-gradient(90deg,transparent,#5b9ddd,transparent)!important;
}
body[data-route="inbox"].inbox-focus-layout.flux-inbox-height-dragging,
body[data-route="inbox"].inbox-focus-layout.flux-inbox-height-dragging *{
  cursor:ns-resize!important;
  user-select:none!important;
}

/* Gráfico operacional: cada barra deixa claro que abre os registros reais. */
body[data-route="dashboard"] .live-chart-bars i[data-dashboard-operation-point]{
  cursor:pointer!important;
  transform-origin:bottom center;
}
body[data-route="dashboard"] .live-chart-bars i[data-dashboard-operation-point]:hover,
body[data-route="dashboard"] .live-chart-bars i[data-dashboard-operation-point]:focus-visible{
  outline:2px solid rgba(31,132,235,.38)!important;
  outline-offset:3px!important;
  filter:brightness(1.08)!important;
  transform:scaleX(1.12)!important;
}
body[data-route="dashboard"] .live-chart-click-hint{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  margin:10px 0 0!important;
  color:#60748b!important;
  font-size:11px!important;
  font-weight:700!important;
}
body[data-route="dashboard"] .live-chart-click-hint::before{
  content:"↗";
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#e8f3ff;
  color:#176fc8;
}

@media(max-width:850px){
  html:has(body[data-route="inbox"].inbox-focus-layout),
  body[data-route="inbox"].inbox-focus-layout{overflow-y:auto!important}
  body[data-route="inbox"].inbox-focus-layout .inbox-layout{min-height:620px!important}
  body[data-route="inbox"].inbox-focus-layout .message-view-tools{padding:8px!important;gap:6px!important}
  body[data-route="inbox"].inbox-focus-layout .message-view-tools button{min-height:32px!important;padding:6px 10px!important}
  body[data-route="inbox"].inbox-focus-layout .inbox-chat-height-handle span{font-size:9px!important}
}
