/* ==========================================================================
   4ADVS — Estilos da Página Funil (v1.1)
   Layout de 3 Áreas: 100% Fixo (Sem rolagem vertical de página)
   Colunas com linhas e contornos em Azul Escuro (#1a3354)
   ========================================================================== */

/* Bloqueio absoluto de rolagem vertical da página para o Funil */
body[data-page="funil"] {
  overflow: hidden !important;
}

body[data-page="funil"] .main-wrapper {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

body[data-page="funil"] .main-content {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #070c18 !important;
  box-sizing: border-box !important;
}

/* Layout Principal Fixo */
.funil-layout {
  display: flex;
  width: 100%;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  background: var(--bg-body, #070c18);
  box-sizing: border-box !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Área B: Painel Lateral de Funis (largura fixa 240px) */
.funil-panel {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 100% !important;
  max-height: 100% !important;
  background: linear-gradient(180deg, rgba(10, 18, 35, 0.95) 0%, rgba(6, 12, 25, 0.98) 100%);
  border-right: 1.5px solid #162a45;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.funil-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 14px 6px;
  border-bottom: 1px solid #162a45;
  margin-bottom: 12px;
}

.funil-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Botão dourado de recolher no header do painel de funis */
.funil-panel-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.funil-panel-toggle-btn:hover {
  transform: scale(1.08);
}

.funil-panel-toggle-btn .funil-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FDE047 0%, #EAB308 50%, #CA8A04 100%);
  color: #1a1405;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(234, 179, 8, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.funil-panel-toggle-btn:hover .funil-arrow {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.65);
}

.funil-panel-toggle-btn .funil-arrow svg {
  width: 12px;
  height: 12px;
  stroke: #1a1405;
  display: block;
}

/* Quando o painel está colapsado */
.funil-layout.funil-panel-collapsed .funil-panel {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-right: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Botão disparador de expandir (aparece na toolbar do funil quando colapsado) */
.funil-expand-trigger {
  align-items: center;
  gap: 8px;
  background: rgba(15, 26, 46, 0.85);
  border: 1px solid #1a3354;
  border-radius: 20px;
  padding: 4px 12px 4px 5px;
  cursor: pointer;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  outline: none;
  user-select: none;
}

.funil-expand-trigger:hover {
  background: rgba(26, 51, 84, 0.85);
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.funil-expand-trigger .funil-arrow-expand {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FDE047 0%, #EAB308 50%, #CA8A04 100%);
  color: #1a1405;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.funil-expand-trigger .funil-arrow-expand svg {
  width: 12px;
  height: 12px;
  stroke: #1a1405;
  display: block;
}

.funil-expand-trigger .funil-expand-text {
  font-size: 12px;
  font-weight: 700;
  color: #d9aa58;
}

.funil-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.funil-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  user-select: none;
}

.funil-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}

.funil-item.active {
  background: rgba(217, 170, 88, 0.12);
  border-color: rgba(217, 170, 88, 0.35);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.funil-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.funil-radio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #64748b;
  background: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.funil-item.active .funil-radio-dot {
  background: #d9aa58;
  border-color: #d9aa58;
  box-shadow: 0 0 10px rgba(217, 170, 88, 0.65);
}

.funil-item-label {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funil-item-count {
  background: rgba(22, 42, 69, 0.7);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.funil-item.active .funil-item-count {
  background: rgba(217, 170, 88, 0.25);
  color: #d9aa58;
}

/* Ações extras no painel lateral */
.funil-panel-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #162a45;
}

.funil-btn-add {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: rgba(22, 42, 69, 0.25);
  border: 1px dashed #1a3354;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.funil-btn-add:hover {
  background: rgba(26, 51, 84, 0.4);
  border-color: rgba(217, 170, 88, 0.5);
  color: #ffffff;
}

/* Área C: Conteúdo Principal do Kanban */
.funil-content {
  flex: 1;
  min-width: 0;
  height: 100% !important;
  max-height: 100% !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  padding: 16px 20px 14px 20px;
  box-sizing: border-box;
}

/* Toolbar Superior */
.funil-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.funil-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.funil-title-wrap i,
.funil-title-wrap svg {
  color: #d9aa58;
  width: 22px;
  height: 22px;
}

.funil-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.funil-tools-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.funil-search-box {
  position: relative;
  width: 220px;
}

.funil-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #64748b;
  pointer-events: none;
}

.funil-search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  background: rgba(12, 23, 42, 0.85);
  border: 1px solid #1a3354;
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.funil-search-input:focus {
  border-color: rgba(217, 170, 88, 0.6);
  box-shadow: 0 0 0 2px rgba(217, 170, 88, 0.15);
}

.funil-select-box {
  position: relative;
}

.funil-select {
  height: 38px;
  padding: 0 30px 0 12px;
  background: rgba(12, 23, 42, 0.85);
  border: 1px solid #1a3354;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.funil-select:focus {
  border-color: rgba(217, 170, 88, 0.6);
}

.funil-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #64748b;
  pointer-events: none;
}

.funil-btn-followup {
  height: 38px;
  padding: 0 14px;
  background: rgba(12, 23, 42, 0.85);
  border: 1px solid #1a3354;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  outline: none;
}

.funil-btn-followup:hover {
  background: rgba(26, 51, 84, 0.85);
  border-color: rgba(217, 170, 88, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

.funil-btn-cta {
  height: 38px;
  padding: 0 16px;
  background: linear-gradient(135deg, #d9aa58 0%, #eab308 100%);
  color: #0b1329;
  font-weight: 700;
  font-size: 13px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(217, 170, 88, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.funil-btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 170, 88, 0.45);
  filter: brightness(1.05);
}

/* Área do Board Kanban: 100% contido no viewport */
.funil-board-container {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: calc(100% - 52px) !important;
  max-height: calc(100% - 52px) !important;
  display: flex;
  gap: 16px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 6px;
  box-sizing: border-box;
}

/* ==========================================================================
   COLUNAS DO KANBAN: LINHAS E BORDAS EM AZUL ESCURO (#1a3354)
   ========================================================================== */
.funil-content .crm-kanban-column,
.funil-layout .crm-kanban-column,
.funil-content .kanban-column {
  flex: 0 0 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  background: linear-gradient(180deg, #0b1426 0%, #080f1e 100%) !important;
  border: 1.5px solid #1a3354 !important; /* Linha azul escura desenhando a coluna */
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Header da coluna com borda sutil azul */
.funil-content .crm-col-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #14243b;
  position: relative;
  flex-shrink: 0;
}

/* Botão adicionar lead na coluna */
.funil-content .crm-col-add-btn {
  background: rgba(22, 42, 69, 0.45) !important;
  border: 1px solid #1e3a5f !important; /* Borda azul escura */
  border-radius: 10px !important;
  color: #93c5fd !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px !important;
  margin: 10px 14px 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.funil-content .crm-col-add-btn:hover {
  background: rgba(30, 58, 95, 0.75) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

/* Zona de rolagem dos cards dentro de cada coluna */
.funil-content .crm-col-cards-zone {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px 14px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* Botão Adicionar Coluna ao final do Board */
.funil-content button[data-action="crm-add-column"] {
  width: 100% !important;
  height: 100% !important;
  min-height: 200px !important;
  border: 2px dashed #1a3354 !important;
  background: rgba(14, 26, 47, 0.25) !important;
  color: #64748b !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.funil-content button[data-action="crm-add-column"]:hover {
  border-color: #2563eb !important;
  color: #93c5fd !important;
  background: rgba(26, 51, 84, 0.35) !important;
}

/* Responsividade */
@media (max-width: 900px) {
  .funil-layout {
    flex-direction: column;
    height: auto !important;
    overflow-y: auto !important;
  }
  .funil-panel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto !important;
    border-right: none;
    border-bottom: 1.5px solid #162a45;
  }
  .funil-list {
    flex-direction: row;
    overflow-x: auto;
  }
  .funil-item {
    flex-shrink: 0;
  }
}

/* Botão de excluir/remover funil no painel lateral */
.funil-item-del {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.funil-item:hover .funil-item-del,
.funil-item.active .funil-item-del,
.funil-item-del:focus-visible { opacity: 0.75; }
.funil-item-del:hover { color: #ef4444; opacity: 1; }
@media (hover: none) { .funil-item-del { opacity: 0.75; } }

/* Soltar um lead num funil da lista lateral (área do SortableJS sobre cada funil) */
.funil-item { position: relative; }
.funil-item-dropzone { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.funil-item-dropzone > * { display: none !important; }
body:has(.kanban-card.sortable-chosen) .funil-item-dropzone,
body:has(.kanban-card.sortable-drag) .funil-item-dropzone { pointer-events: auto; }
body:has(.kanban-card.sortable-chosen) .funil-item,
body:has(.kanban-card.sortable-drag) .funil-item { outline: 1px dashed rgba(217, 170, 88, 0.35); outline-offset: -2px; }
.funil-item:has(.funil-item-dropzone > .sortable-ghost) { background: rgba(217, 170, 88, 0.18); outline: 2px solid #d9aa58; outline-offset: -2px; }

/* Card aberto a partir das Conversas ("Abrir no Kanban"): pulsa por alguns segundos */
.kanban-card.kanban-card-destaque {
  position: relative;
  z-index: 2;
  animation: kanban-card-pulsar 1s ease-in-out 4;
  border-color: #eab308 !important;
}
@keyframes kanban-card-pulsar {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.0); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(234, 179, 8, 0.35), 0 0 24px rgba(234, 179, 8, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .kanban-card.kanban-card-destaque { animation: none; box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.7); }
}

/* ===== Filtro único (Responsável / Urgência / Origem) ===== */
.funil-filtro { position: relative; flex-shrink: 0; }
.funil-btn-filtro {
  height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(12, 23, 42, 0.85); border: 1px solid #1a3354; border-radius: 10px;
  color: #cbd5e1; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all .2s ease;
}
.funil-btn-filtro:hover, .funil-btn-filtro[aria-expanded="true"] { border-color: rgba(217,170,88,.6); color: #fff; }
.funil-btn-filtro.ativo { border-color: rgba(217,170,88,.7); color: #f5d38a; }
.funil-filtro-qtd {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d9aa58; color: #0b1329;
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.funil-filtro-qtd[hidden] { display: none; }
.funil-filtro-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 270px; max-width: calc(100vw - 32px);
  background: #0f1a2e; border: 1px solid #1a3354; border-radius: 12px; padding: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 10px;
}
.funil-filtro-pop[hidden] { display: none; }
.funil-filtro-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 4px; }
.funil-filtro-head strong { color: #fff; font-size: 13.5px; }
.funil-filtro-limpar { background: none; border: none; color: #d9aa58; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.funil-filtro-item { display: flex; flex-direction: column; gap: 5px; }
.funil-filtro-item > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #94a3b8; }
.funil-filtro-item > span svg { width: 13px; height: 13px; }
.funil-filtro-item .funil-select { width: 100%; height: 36px; padding: 0 10px; appearance: auto; -webkit-appearance: auto; }
.funil-filtro-item .funil-select option { background: #0f172a; color: #f1f5f9; }
body.light-theme .funil-btn-filtro { background: #fff; border-color: #cbd5e1; color: #334155; }
body.light-theme .funil-filtro-pop { background: #fff; border-color: #e2e8f0; box-shadow: 0 16px 40px rgba(15,23,42,.15); }
body.light-theme .funil-filtro-head strong { color: #0f172a; }
body.light-theme .funil-filtro-item .funil-select option { background: #fff; color: #0f172a; }

/* Telas menores (notebooks de 13" e abaixo): a barra quebra em vez de cortar */
@media (max-width: 1440px) {
  .funil-toolbar { flex-wrap: wrap; row-gap: 10px; }
  .funil-tools-right { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .funil-search-box { width: 190px; }
}
@media (max-width: 900px) {
  .funil-tools-right { width: 100%; justify-content: flex-start; margin-left: 0; }
  .funil-search-box { flex: 1 1 160px; width: auto; }
}

/* ===== Funil comercial: R$ por coluna e no card ===== */
.crm-col-total { font-size: 12.5px; font-weight: 700; color: #94a3b8; margin: 2px 0 6px; padding-left: 2px; }
.crm-card-name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.crm-card-name-row .crm-card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-card-valor { flex-shrink: 0; font-size: 12px; font-weight: 800; color: #34d399; }
body.light-theme .crm-col-total { color: #475569; }
body.light-theme .crm-card-valor { color: #059669; }

/* ===== Lista de funis mais limpa: sem cabeçalho, recolher no rodapé ===== */
.funil-panel-footer { display: flex; align-items: center; gap: 8px; }
.funil-panel-footer .funil-btn-add { flex: 1; }
.funil-panel { padding-top: 14px; }

/* ===== Modal Novo funil: Comercial x Operacional ===== */
.fn-tipo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.fn-tipo-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 12px; border-radius: 10px; cursor: pointer; background: rgba(12,23,42,.8);
  border: 1px solid rgba(40,75,120,.5); color: #cbd5e1; transition: all .15s ease;
}
.fn-tipo-card svg { width: 20px; height: 20px; color: #64748b; }
.fn-tipo-card strong { font-size: 13.5px; color: #fff; }
.fn-tipo-card span { font-size: 11.5px; line-height: 1.35; color: #94a3b8; }
.fn-tipo-card:hover { border-color: rgba(217,170,88,.5); }
.fn-tipo-card.ativo { border-color: #d9aa58; background: rgba(217,170,88,.08); box-shadow: 0 0 0 1px #d9aa58 inset; }
.fn-tipo-card.ativo[data-tipo="comercial"] svg { color: #34d399; }
.fn-tipo-card.ativo[data-tipo="operacional"] svg { color: #60a5fa; }

/* ===== "Novo funil" em destaque enquanto o escritório não tem funis próprios ===== */
.funil-cta-novo {
  width: 100%; height: 38px; border: none; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #d9aa58 0%, #eab308 100%); color: #0b1329;
  font-size: 13px; font-weight: 800; box-shadow: 0 4px 14px rgba(217,170,88,.3);
  transition: transform .15s ease, filter .15s ease;
}
.funil-cta-novo:hover { transform: translateY(-1px); filter: brightness(1.05); }
.funil-cta-dica { margin: 6px 2px 12px; font-size: 11px; line-height: 1.35; color: #94a3b8; }

/* ===== Setinha de recolher na borda da lista de funis ===== */
.funil-panel-edge { position: relative; width: 0; flex-shrink: 0; z-index: 30; }
.funil-edge-btn {
  position: absolute; top: 18px; left: -14px; width: 28px; height: 28px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: linear-gradient(135deg, #FDE047 0%, #EAB308 50%, #CA8A04 100%); color: #1a1405;
  border: 1.5px solid rgba(255,255,255,.6); box-shadow: 0 3px 10px rgba(234,179,8,.45);
  transition: filter .2s ease;
}
.funil-edge-btn:hover { filter: brightness(1.12); }
.funil-edge-btn svg { width: 12px; height: 12px; transition: transform .25s ease; }
.funil-layout.funil-panel-collapsed .funil-edge-btn { left: 4px; }
.funil-layout.funil-panel-collapsed .funil-edge-btn svg { transform: rotate(180deg); }
.funil-layout.funil-panel-collapsed .funil-content { padding-left: 42px; }
.funil-cta-novo { margin-bottom: 12px; }

/* Título da página alinhado com a lista de funis */
body[data-page="funil"] .main-header { padding-left: 22px; }

body[data-page="funil"] .main-header { padding-left: 16px; }
body[data-page="funil"] .header-left { padding-left: 0 !important; }

/* Lápis discreto para renomear o funil */
.funil-title-edit {
  width: 26px; height: 26px; border-radius: 7px; border: none; background: transparent; color: #64748b;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: .55;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.funil-title-wrap:hover .funil-title-edit, .funil-title-edit:focus-visible { opacity: 1; }
.funil-title-edit:hover { background: rgba(148,163,184,.12); color: #e2e8f0; }
.funil-title-input {
  font-size: 18px; font-weight: 800; color: #fff; background: rgba(12,23,42,.85);
  border: 1px solid rgba(217,170,88,.6); border-radius: 8px; padding: 4px 10px; outline: none; width: 260px;
}
body.light-theme .funil-title-input { color: #0f172a; background: #fff; }

/* Modal Novo funil mais largo: cartões de tipo na horizontal */
.fn-tipo-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.fn-tipo-card svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.fn-tipo-card > div { display: flex; flex-direction: column; gap: 3px; }
.fn-tipo-card strong { font-size: 14.5px; }
.fn-tipo-card span { font-size: 12px; }
@media (max-width: 560px) { .fn-tipo-grid { grid-template-columns: 1fr; } }

/* Modal Novo funil: cartões centralizados (ícone, título, tipo de valor e descrição) */
.fn-tipo-card { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 6px !important; padding: 18px 16px 16px !important; position: relative; }
.fn-tipo-card::after { content: ''; position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #334155; box-sizing: border-box; }
.fn-tipo-card.ativo::after { border-color: #3b82f6; background: radial-gradient(circle, #3b82f6 0 3px, transparent 4px); }
.fn-tipo-icone { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.fn-tipo-card[data-tipo="comercial"] .fn-tipo-icone { background: rgba(34,197,94,.12); color: #22c55e; }
.fn-tipo-card[data-tipo="operacional"] .fn-tipo-icone { background: rgba(59,130,246,.12); color: #60a5fa; }
.fn-tipo-icone svg { width: 24px !important; height: 24px !important; color: inherit !important; margin: 0 !important; }
.fn-tipo-card strong { font-size: 15px !important; }
.fn-tipo-card em { font-style: normal; font-size: 12.5px; font-weight: 600; }
.fn-tipo-card[data-tipo="comercial"] em { color: #22c55e; }
.fn-tipo-card[data-tipo="operacional"] em { color: #60a5fa; }
.fn-tipo-card .fn-tipo-desc { font-size: 12px !important; line-height: 1.4; color: #94a3b8; }
