.orgchart-container {
  height: calc(100% - 120px) !important;
}

.oc-hierarchy:hover {
  cursor: pointer;
}
.analytical > .webix_ss_body > .webix_ss_center >
.webix_ss_center_scroll >.webix_last > .webix_cell:not(.r-align) {
  text-align: right;
}
/* ASSISTENTE DA PIVOT — estilos (prefixo pa-)
   Visual alinhado ao painel de IA do Dashboard Builder / "Meu Dashboard"
   (AIChatPanel.css) — QuickSight-inspired clean design: fundo branco,
   tipografia Ubuntu, paleta neutra navy/cinza, sem gradientes/roxo. */

.pa-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* O painel lateral do LCDashboard fica com `height:auto` quando fixado
     (pinned), entao `height:100%` aqui resolve para a altura do CONTEUDO e nada
     limita a coluna — o chat cresce e vaza no fim da tela. Este teto por
     viewport garante que .pa-root NUNCA ultrapasse a area visivel; combinado
     com o flex de .pa-messages (flex:1 1 auto; min-height:0; overflow-y:auto),
     a lista de mensagens passa a rolar dentro do espaco disponivel.
     O offset (~170px) cobre o header do portal + barra de titulo + paddings. */
  max-height: calc(100vh - 170px);
  overflow: hidden;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  color: #232f3e;
}

.fadp-toolbox .pa-root {
  max-height: none;
  min-height: 0;
}

/* Cabecalho: linha slim so com a acao de limpar (o titulo "Assistente da
   Pivot" ja vem da barra do painel lateral do LCDashboard — nao repetir). */
.pa-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 6px 12px;
  border-bottom: 1px solid #e9ebed;
  background: #fff;
}
.pa-header-clear {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #545b64;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pa-header-clear:hover:not(:disabled) {
  background: #f2f3f3;
  color: #232f3e;
}
.pa-header-clear:disabled { cursor: not-allowed; opacity: 0.35; }

/* Lista de mensagens */
.pa-messages {
  flex: 1 1 auto;
  /* min-height:0 e necessario para que o flex item ENCOLHA e o overflow-y
     funcione — sem isso a lista cresce com o conteudo e empurra a barra de
     entrada para fora da tela. */
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pa-messages::-webkit-scrollbar { width: 4px; }
.pa-messages::-webkit-scrollbar-track { background: transparent; }
.pa-messages::-webkit-scrollbar-thumb { background: #d5d9d9; border-radius: 4px; }

.pa-empty {
  margin: 12px 0 0;
  text-align: center;
  color: #687078;
  padding: 20px 8px;
}
.pa-empty-title {
  font-weight: 600;
  color: #232f3e;
  margin: 0 0 6px;
}
.pa-empty-hint {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.pa-msg {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.pa-msg-user { align-items: flex-end; }
.pa-msg-assistant { align-items: flex-start; }

.pa-bubble {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 92%;
}
.pa-msg-user .pa-bubble {
  background: #f2f3f3;
  color: #232f3e;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e9ebed;
}
.pa-msg-assistant .pa-bubble {
  background: transparent;
  color: #232f3e;
  padding: 4px 0;
}

/* Indicador "pensando" */
.pa-thinking {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: #687078;
}
.pa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aab7b8;
  animation: pa-blink 1.2s infinite ease-in-out both;
}
.pa-dot:nth-child(2) { animation-delay: 0.2s; }
.pa-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pa-blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* Progresso ao vivo dos agentes (varios niveis de LLM) */
.pa-thinking { flex-direction: column; align-items: stretch; }
.pa-agent-boot { display: inline-flex; gap: 4px; align-items: center; }
.pa-agents {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
}
.pa-agent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #687078;
  transition: color 0.2s ease;
}
.pa-agent-start { color: #232f3e; font-weight: 600; }
.pa-agent-done { color: #545b64; }
.pa-agent-skipped { opacity: 0.55; }
.pa-agent-error { color: #d13212; }
.pa-agent-ico {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #545b64;
}
.pa-agent-done .pa-agent-ico { color: #16a34a; }
.pa-agent-spin {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #e9ebed;
  border-top-color: #232f3e;
  animation: pa-spin 0.7s linear infinite;
}
@keyframes pa-spin { to { transform: rotate(360deg); } }
.pa-agent-llm {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
  background: #232f3e;
}

/* Previa da sugestao */
.pa-preview {
  margin-top: 8px;
  width: 92%;
  border: 1px solid #e9ebed;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.pa-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.pa-preview-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #687078;
  background: #f2f3f3;
  border-radius: 4px;
  padding: 2px 6px;
}
.pa-preview-ai {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #232f3e;
  border-radius: 4px;
  padding: 2px 6px;
}
.pa-preview-warn {
  font-size: 11px;
  color: #92580a;
  background: #fdf1d6;
  border-radius: 4px;
  padding: 2px 6px;
}
.pa-preview-status {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
}
.pa-preview-status-applied {
  color: #0d7a4f;
  background: #dff5ea;
}
.pa-preview-status-dismissed {
  color: #687078;
  background: #f2f3f3;
}
/* Previa ja resolvida (aplicada/descartada): permanece visivel no historico,
   levemente atenuada para diferenciar de uma decisao ainda pendente. */
.pa-preview-done {
  opacity: 0.82;
}
.pa-preview-done:hover {
  opacity: 1;
}

.pa-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.pa-preview-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.pa-preview-label {
  flex: 0 0 58px;
  font-size: 11px;
  font-weight: 600;
  color: #687078;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pa-preview-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pa-tag {
  font-size: 12px;
  background: #fff;
  border: 1px solid #e9ebed;
  border-radius: 4px;
  padding: 2px 7px;
  color: #232f3e;
}

.pa-preview-actions {
  display: flex;
  gap: 8px;
}
.pa-btn {
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: "Ubuntu", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pa-btn-apply {
  background: #232f3e;
  color: #fff;
}
.pa-btn-apply:hover { background: #37475a; }
.pa-btn-ghost {
  background: transparent;
  color: #545b64;
  border: 1px solid #d5d9d9;
}
.pa-btn-ghost:hover { background: #f2f3f3; color: #232f3e; }

/* Sugestoes rapidas */
.pa-suggestions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  max-height: 84px;
  overflow-y: auto;
  border-top: 1px solid #e9ebed;
}
.pa-chip {
  font-size: 12px;
  background: #fff;
  border: 1px solid #d5d9d9;
  color: #545b64;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: "Ubuntu", sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pa-chip:hover:not(:disabled) { background: #f2f3f3; border-color: #aab7b8; color: #232f3e; }
.pa-chip:disabled { opacity: 0.5; cursor: default; }

/* Undo */
.pa-undo-bar {
  flex: 0 0 auto;
  padding: 6px 16px;
  border-top: 1px solid #e9ebed;
}
.pa-undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: transparent;
  border: none;
  color: #232f3e;
  cursor: pointer;
  padding: 2px 0;
}
.pa-undo-btn:hover { text-decoration: underline; }

/* Entrada (QuickSight style: label + textarea + footer com botao a direita) */
.pa-input-area {
  flex: 0 0 auto;
  padding: 16px;
  border-top: 1px solid #e9ebed;
  background: #fff;
}
.pa-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #232f3e;
  margin-bottom: 8px;
}
.pa-input-wrapper {
  border: 1px solid #aab7b8;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.pa-input-wrapper:focus-within { border-color: #232f3e; }
.pa-input {
  display: block;
  width: 100%;
  resize: none;
  border: none;
  padding: 10px 12px;
  font-size: 13px;
  font-family: "Ubuntu", sans-serif;
  outline: none;
  background: transparent;
  color: #232f3e;
  line-height: 1.5;
  box-sizing: border-box;
}
.pa-input::placeholder { color: #aab7b8; }
.pa-input:disabled { background: #f5f5f5; }
.pa-input-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.pa-send {
  background: #232f3e;
  color: #fff;
  border: none;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  font-family: "Ubuntu", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.pa-send:hover:not(:disabled) { background: #37475a; }
.pa-send:disabled {
  background: #d5d9d9;
  color: #aab7b8;
  cursor: not-allowed;
}
.pa-icon-spin {
  animation: pa-icon-spin-rotate 0.8s linear infinite;
}
@keyframes pa-icon-spin-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.view-sharing-info {
    padding: 8px 0;
}

.sharing-section {
    padding: 16px;
    margin-bottom: 12px;
    background-color: #F5F5F5;
    background-color: var(--background-light, #F5F5F5);
    border-radius: 8px;
    border: 1px solid #E2E6F3;
    border: 1px solid var(--line-default, #E2E6F3);
}

.sharing-section:last-child {
    margin-bottom: 0;
}

.sharing-section.sharing-public {
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

.sharing-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sharing-icon {
    font-size: 18px;
    color: #471FCC;
    color: var(--color-primary-blue, #471FCC);
}

.sharing-public .sharing-icon {
    color: #1890ff;
}

.sharing-title {
    font-weight: 600;
    font-size: 14px;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.sharing-description {
    margin: 0;
    color: #8B90A3;
    color: var(--text-light, #8B90A3);
    font-size: 13px;
}

.sharing-list {
    background: transparent;
}

.sharing-list .ant-list-item {
    padding: 8px 0;
    border-bottom: 1px solid #E2E6F3;
    border-bottom: 1px solid var(--line-default, #E2E6F3);
}

.sharing-list .ant-list-item:last-child {
    border-bottom: none;
}

.sharing-list .ant-list-item-meta-title {
    font-size: 13px;
    font-weight: 500;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    margin-bottom: 2px;
}

.sharing-list .ant-list-item-meta-description {
    font-size: 12px;
    color: #8B90A3;
    color: var(--text-light, #8B90A3);
}

.sharing-list-item {
    display: flex;
    align-items: center;
}

.sharing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sharing-tags .ant-tag {
    margin: 0;
    font-size: 12px;
}


.view-manager-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    gap: 16px;
}

.view-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    border-bottom: 1px solid var(--color-border, #e0e0e0);
}

.view-manager-header .ppdropdown {
    flex: 1 1;
    margin-bottom: 0;
}

.view-manager-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    color: var(--color-text-primary, #333);
}

.view-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.view-search {
    width: 100%;
    height: 30px;
    border: 1px solid #d7dce8;
    border: 1px solid var(--color-border, #d7dce8);
    border-radius: 6px;
    padding: 0 34px 0 9px;
    background: #fff;
    background: var(--color-background, #fff);
    color: #333;
    color: var(--color-text-primary, #333);
    font: inherit;
    font-size: 12px;
}

.view-search:focus {
    outline: 2px solid color-mix(in srgb, #471FCC 28%, transparent);
    outline: 2px solid color-mix(in srgb, var(--color-primary, #471FCC) 28%, transparent);
    border-color: #471FCC;
    border-color: var(--color-primary, #471FCC);
}

.view-search-count {
    position: absolute;
    right: 8px;
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 10px;
    background: #f1f3f8;
    background: var(--color-background-secondary, #f1f3f8);
    color: #666;
    color: var(--color-text-secondary, #666);
    font-size: 11px;
    text-align: center;
}

/* Formulário de criação/edição */
.view-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: #f5f5f5;
    background-color: var(--color-background-secondary, #f5f5f5);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    border: 1px solid var(--color-border, #e0e0e0);
}

/* Reduz altura dos inputs no formulário de criação */
.view-form input {
    height: 28px !important;
    min-height: 28px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
}

.view-form label {
    font-size: 11px !important;
    margin-bottom: 2px !important;
}

.view-form-header h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #2E1956;
    color: var(--text-default, #2E1956);
}

.view-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.view-form-actions button {
    flex: 1 1;
    height: 28px !important;
    min-width: 80px !important;
    padding: 0.25rem 0.8rem !important;
    font-size: 12px !important;
}

/* Lista de views */
.view-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1 1;
    max-height: calc(100vh - 280px);
}

/* Quando o formulário de criação está aberto, reduz a altura da lista */
.view-list.view-list-with-form {
    max-height: calc(100vh - 550px);
}

.view-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: #666;
    color: var(--color-text-secondary, #666);
}

.view-empty-state p {
    margin: 4px 0;
}

.view-empty-hint {
    font-size: 12px;
    color: #999;
    color: var(--color-text-tertiary, #999);
}

/* Item de view */
.view-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background-color: #fff;
    background-color: var(--color-background, #fff);
    border: 1px solid #e0e0e0;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.view-item:hover {
    border-color: #1976d2;
    border-color: var(--color-primary, #1976d2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-item.active {
    border-color: #6B6F7D;
    border-color: var(--color-secondary-lime, #6B6F7D);
    background-color: #f0f9ff;
    background-color: var(--color-background-active, #f0f9ff);
}

.view-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1;
}

.view-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.view-item-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    color: var(--color-text-primary, #333);
    flex: 1 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #6B6F7D;
    background-color: var(--color-secondary-lime, #6B6F7D);
    color: #333;
    color: var(--color-text-primary, #333);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.view-description {
    margin: 0;
    font-size: 12px;
    color: #666;
    color: var(--color-text-secondary, #666);
    line-height: 1.4;
}

.view-metadata {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #999;
    color: var(--color-text-tertiary, #999);
    flex-wrap: wrap;
}

.view-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-ownership-label,
.view-author {
    display: inline-flex;
    align-items: center;
}

.view-ownership-label {
    color: #8f4b00;
    font-weight: 600;
}

.view-config-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background-color: #f5f5f5;
    background-color: var(--color-background-secondary, #f5f5f5);
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    color: var(--color-text-secondary, #666);
}

.view-config-summary span {
    display: block;
}

/* Toggle de auto-salvar */
.view-autosave-toggle {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    border-top: 1px solid var(--color-border, #e0e0e0);
}

.view-autosave-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    color: var(--color-text-secondary, #666);
    -webkit-user-select: none;
            user-select: none;
}

.view-autosave-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6B6F7D;
    accent-color: var(--color-secondary-lime, #6B6F7D);
}

.view-autosave-text {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.view-item-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    border-top: 1px solid var(--color-border, #e0e0e0);
    margin-top: 8px;
}

.view-delete-confirmation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    padding: 8px;
    border: 1px solid #f1c6c6;
    border-radius: 4px;
    background: #fff7f7;
    color: #8f1d1d;
    font-size: 12px;
}

.view-delete-confirmation button {
    border: 1px solid #d7dce8;
    border-radius: 4px;
    padding: 3px 7px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.view-delete-confirmation button:first-of-type {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

/* Formulário de edição inline */
.view-edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

/* Reduz altura dos inputs no formulário de edição */
.view-edit-form input {
    height: 28px !important;
    min-height: 28px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
}

.view-edit-form label {
    font-size: 11px !important;
    margin-bottom: 2px !important;
}

.view-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

/* Botões do formulário de edição */
.view-edit-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: "Ubuntu", "Segoe UI", sans-serif;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.view-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.view-edit-btn-primary {
    background-color: #471FCC;
    background-color: var(--color-primary-blue, #471FCC);
    color: white;
    border-color: #471FCC;
    border-color: var(--color-primary-blue, #471FCC);
}

.view-edit-btn-primary:hover:not(:disabled) {
    background-color: #3a18a8;
    border-color: #3a18a8;
}

.view-edit-btn-secondary {
    background-color: transparent;
    color: #2E1956;
    color: var(--text-default, #2E1956);
    border-color: #E2E6F3;
    border-color: var(--line-default, #E2E6F3);
}

.view-edit-btn-secondary:hover:not(:disabled) {
    background-color: #F5F5F5;
    background-color: var(--background-light, #F5F5F5);
    border-color: #8B90A3;
    border-color: var(--text-light, #8B90A3);
}

/* Fix para tooltip nao ser cortado pelo overflow da sidebar */
.view-item-actions .lc-iconlink > .tooltip {
    z-index: 10001;
}

/* Ajusta o tooltip inline-left para aparecer mais a esquerda */
.view-item-actions .lc-iconlink > .tooltip > .body.inline-left {
    transform: translate(-100%, -50%) translateX(-10px);
}

.view-item-actions .lc-iconlink > .tooltip > .body.inline-left > .arrow {
    display: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .view-manager-panel {
        padding: 12px;
    }

    .view-item {
        padding: 10px;
    }

    .view-item-header h4 {
        font-size: 13px;
    }

    .view-description {
        font-size: 11px;
    }
}


