/* css/funnel.css — edição inline de tabela, funil de etapas, tracker */
/* EDIÇÃO INLINE POR DUPLO CLIQUE NA TABELA */
tr.row-inline-editing { background: color-mix(in srgb, var(--accent) 10%, var(--panel)) !important; box-shadow: inset 0 0 0 2px var(--accent); }
tr.row-inline-editing td { padding: 4px 6px; }
.inline-edit-input, .inline-edit-select { width: 100%; padding: 5px 8px; border: 1px solid var(--accent); border-radius: 4px; background: var(--panel); color: var(--ink); font-size: 12.5px; }
.inline-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }
.btn-inline-save { background: var(--ext); color: #fff; border: none; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer; }
.btn-inline-save:hover { filter: brightness(1.15); }
.btn-inline-cancel { background: var(--soft); color: var(--muted); border: 1px solid var(--line); padding: 4px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; }
.btn-inline-cancel:hover { color: var(--ink); border-color: var(--muted); }
.tbl-hint-dblclick { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

/* FUNIL DE 9 ETAPAS DO DASHBOARD ESTRATÉGICO */
.func-funnel-9 { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin-bottom: 24px; }
.funnel-step-9 { border-radius: 8px; padding: 10px 6px; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: transform .15s ease, filter .15s ease; text-shadow: 0 1px 2px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.10); }
.funnel-step-9:hover { transform: translateY(-2px); filter: brightness(1.06); }
.funnel-step-9.selected { outline: 2px solid #fff; box-shadow: 0 0 0 3px var(--accent); }
.funnel-step-9 .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel-step-9 .val { font-size: 22px; font-weight: 700; line-height: 1.1; }
.funnel-step-9 .sub { font-size: 11px; color: #FFFFFF; opacity: 1; font-weight: 500; }
.badge-stage { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.22); }
.st-backlog { background: var(--st-backlog); }
.st-map { background: var(--st-map); }
.st-viab { background: var(--st-viab); }
.st-pdd { background: var(--st-pdd); }
.st-dev { background: var(--st-dev); }
.st-homolog { background: var(--st-homolog); }
.st-assist { background: var(--st-assist); }
.st-entregue { background: var(--st-entregue); }
.st-canc { background: var(--st-canc); }

.nc-tracker-bar { display: flex; align-items: center; gap: 16px; background: color-mix(in srgb, var(--mel) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--mel) 30%, var(--line)); border-radius: 8px; padding: 12px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.nc-tracker-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.nc-tracker-item b { font-size: 15px; color: var(--accent); }
/* Correção definitiva de alinhamento e largura da Descrição */
#tblFuncional th:nth-child(6),
#tblFuncional td:nth-child(6) {
  text-align: left;
}

.col-desc-clamp {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: var(--muted);
  text-align: left !important;
}

#tblFuncional td {
  padding: 8px 6px;
  vertical-align: middle;
}
/* Tabela funcional dinâmica e fluida */
#tblFuncional {
  width: 100%;
  table-layout: fixed; /* Força o navegador a respeitar as proporções do thead */
}

#tblFuncional th, #tblFuncional td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 6px;
}

/* Colunas específicas que podem expandir de forma fluida */
#tblFuncional td:nth-child(3), /* Iniciativa */
#tblFuncional td:nth-child(4), /* Área */
#tblFuncional td:nth-child(6)  { /* Descrição */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Campos de inputs durante a edição inline também adaptados */
.row-inline-editing td input, .row-inline-editing td select {
  width: 100%;
  box-sizing: border-box;
}