/* FilterHelpModal - estilos do modal de ajuda ilustrado dos filtros */

.filter-help-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 45, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 24px;
}

.filter-help-modal {
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(20, 24, 45, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: "Ubuntu", sans-serif;
}

.filter-help-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eceef5;
}

.filter-help-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2b304f;
}

.filter-help-modal__close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8a90a6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: 0.2s all;
}

.filter-help-modal__close:hover {
    background: #f1f3f9;
    color: #2b304f;
}

.filter-help-modal__body {
    padding: 18px 20px;
    overflow-y: auto;
}

.filter-help-modal__intro {
    margin: 0 0 18px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5a6079;
}

.filter-help-step {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-help-step:last-child {
    margin-bottom: 0;
}

.filter-help-step__badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #273b85;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-help-step__content {
    flex: 1 1;
    min-width: 0;
}

.filter-help-step__title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2b304f;
}

.filter-help-step__text {
    margin: 0 0 10px 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #5a6079;
}

.filter-help-step__text strong {
    color: #2b304f;
}

/* Ilustracoes mimetizando o construtor de filtros */
.filter-help-illustration {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f7f8fc;
    border: 1px solid #e7eaf3;
    border-radius: 8px;
}

.filter-help-illustration--group {
    flex-direction: column;
    align-items: stretch;
}

.fhi-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fhi-chip {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.fhi-chip--field {
    background: #e7ecfb;
    color: #273b85;
    font-weight: 500;
}

.fhi-chip--op {
    background: #eceef5;
    color: #5a6079;
    font-weight: 600;
}

.fhi-chip--value {
    background: #e3f4ec;
    color: #1f7a4d;
    font-weight: 500;
}

.fhi-operator {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    color: #273b85;
    background: #fff;
    border: 1px solid #d7ddf0;
    border-radius: 12px;
    padding: 2px 10px;
    margin: 2px 0;
}

.filter-help-illustration--actions {
    justify-content: flex-end;
}

.fhi-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
}

.fhi-btn--secondary {
    background: #f1f3f9;
    color: #5a6079;
}

.fhi-btn--primary {
    background: #273b85;
    color: #fff;
}

.filter-help-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eceef5;
}

.filter-help-modal__btn {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: 0.2s all;
}

.filter-help-modal__btn--ghost {
    background: transparent;
    color: #5a6079;
}

.filter-help-modal__btn--ghost:hover {
    background: #f1f3f9;
}

.filter-help-modal__btn--primary {
    background: #273b85;
    color: #fff;
}

.filter-help-modal__btn--primary:hover {
    background: #1f2f6b;
}

/* Icone de ajuda ao lado do titulo "Filtros" */
.filter-panel-resume__help-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8a90a6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: 0.2s all;
    padding: 0;
}

.filter-panel-resume__help-btn:hover {
    background: #eef0f7;
    color: #273b85;
}

.filter-panel-resume__section-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ASSISTENTE DE FILTROS DO RESUME — estilos (prefixo rfa-)
   Mesma linguagem visual do Assistente da Pivot (PivotAssistantPanel.css):
   QuickSight-inspired, fundo branco, tipografia Ubuntu, paleta neutra
   navy/cinza, sem gradientes/roxo. Diferenca: aqui o painel vive DENTRO do
   scroll do painel de filtros (.filter-panel-resume__section-scroll), entao
   usamos height:100% do container pai em vez de um teto de viewport. */

.rfa-root {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  color: #232f3e;
}

.rfa-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 4px 4px 6px;
  border-bottom: 1px solid #e9ebed;
  background: #fff;
}
.rfa-header-clear {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #545b64;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rfa-header-clear:hover:not(:disabled) {
  background: #f2f3f3;
  color: #232f3e;
}
.rfa-header-clear:disabled { cursor: not-allowed; opacity: 0.35; }

.rfa-messages {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rfa-messages::-webkit-scrollbar { width: 4px; }
.rfa-messages::-webkit-scrollbar-track { background: transparent; }
.rfa-messages::-webkit-scrollbar-thumb { background: #d5d9d9; border-radius: 4px; }

.rfa-empty {
  margin: 8px 0 0;
  text-align: center;
  color: #687078;
  padding: 16px 4px;
}
.rfa-empty-title {
  font-weight: 600;
  color: #232f3e;
  margin: 0 0 6px;
  font-size: 13px;
}
.rfa-empty-hint {
  font-size: 11.5px;
  line-height: 1.4;
  margin: 0;
}

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

.rfa-bubble {
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 96%;
}
.rfa-msg-user .rfa-bubble {
  background: #f2f3f3;
  color: #232f3e;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e9ebed;
}
.rfa-msg-assistant .rfa-bubble {
  background: transparent;
  color: #232f3e;
  padding: 4px 0;
}

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

.rfa-agents {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
}
.rfa-agent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #687078;
  transition: color 0.2s ease;
}
.rfa-agent-start { color: #232f3e; font-weight: 600; }
.rfa-agent-done { color: #545b64; }
.rfa-agent-skipped { opacity: 0.55; }
.rfa-agent-error { color: #d13212; }
.rfa-agent-ico {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #545b64;
}
.rfa-agent-done .rfa-agent-ico { color: #16a34a; }
.rfa-agent-spin {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #e9ebed;
  border-top-color: #232f3e;
  animation: rfa-spin 0.7s linear infinite;
}
@keyframes rfa-spin { to { transform: rotate(360deg); } }
.rfa-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 */
.rfa-preview {
  margin-top: 6px;
  width: 96%;
  max-width: 96%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #e9ebed;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.rfa-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.rfa-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;
}
.rfa-preview-ai {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #232f3e;
  border-radius: 4px;
  padding: 2px 6px;
}
.rfa-preview-status {
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
}
.rfa-preview-status-applied {
  color: #0d7a4f;
  background: #dff5ea;
}
.rfa-preview-status-dismissed {
  color: #687078;
  background: #f2f3f3;
}
.rfa-preview-done {
  opacity: 0.82;
}
.rfa-preview-done:hover {
  opacity: 1;
}

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

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

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

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

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

/* O container pai (.principal-filters) por padrao rola tudo junto (body + footer).
   Aqui desligamos esse scroll para que o scroll passe a ser interno (body) e o
   footer (acoes) fique fixo no fim do painel. */
.right-sidepanel-filters .principal-filters:has(.filter-panel-resume) {
  overflow: hidden;
  max-height: none;
  padding-right: 0;
}

/* A .page do Layout tem `overflow-x: auto`, virando um container de rolagem
   horizontal. O SideModal dos filtros (position: absolute) contribui para essa
   area rolavel e acaba "escapando" para fora da tela nesta pagina (que tem
   dashboard largo), gerando barra de rolagem horizontal. Ancorando o painel na
   viewport com position: fixed, ele nao soma ao overflow do ancestral e fica
   sempre totalmente dentro da tela. Escopo restrito ao modal de filtros do
   Resume (via :has do host) para nao afetar outros SideModals. */
.side-modal:has(.finops-filters-host) {
  position: fixed;
  top: 45px;
  bottom: 0;
  height: auto;
  max-height: 100dvh;
}

/* Quando os filtros sao renderizados dentro do SideModal (em vez do rightSidePanel
   do LCDashboard), montamos a cadeia flex para que o body role internamente e o
   footer (Aplicar/Limpar) fique fixo no fim do painel. Escopado por
   .finops-filters-host (exclusivo deste modal, presente nos 3 estagios -
   Informar/Otimizar/Operar) em vez de :has(.filter-panel-resume) para que a
   altura/rodape fixo funcione igual nos 3, independente de qual painel de
   estagio esta montado. */
.side-modal > .body:has(.finops-filters-host) {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  overflow: hidden;
}

.side-modal .finops-filters-host {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
  overflow: hidden;
}

.side-modal .finops-filters-host > .right-sidepanel-filters,
.side-modal .finops-filters-host .principal-filters {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
  gap: 0.5rem;
  overflow: hidden;
}

.filter-panel-resume {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  gap: 8px;
}

/* Header da view ativa */
.filter-panel-resume__view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 1px solid #dee2e6;
  border: 1px solid var(--border-default, #dee2e6);
  margin-bottom: 4px;
  flex-shrink: 0;
}

.filter-panel-resume__view-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1;
  min-width: 0;
}

.filter-panel-resume__view-label {
  font-size: 11px;
  color: #6c757d;
  color: var(--text-secondary, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.filter-panel-resume__view-name {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  color: var(--text-default, #212529);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-panel-resume__view-edited {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  flex-shrink: 0;
  animation: pulse-edited 2s ease-in-out infinite;
}

@keyframes pulse-edited {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.filter-panel-resume__view-public {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #1890ff;
  flex-shrink: 0;
}

.filter-panel-resume__save-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  border: 1px solid var(--border-default, #dee2e6);
  background-color: #fff;
  color: #6c757d;
  color: var(--text-secondary, #6c757d);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-panel-resume__save-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.filter-panel-resume__save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-panel-resume__save-btn.has-changes {
  background-color: #2E1956;
  background-color: var(--color-primary-purple, #2E1956);
  color: #fff;
  border-color: #2E1956;
  border-color: var(--color-primary-purple, #2E1956);
}

.filter-panel-resume__save-btn.has-changes:hover:not(:disabled) {
  background-color: #1a0f33;
  background-color: var(--color-primary-purple-dark, #1a0f33);
}

/* Body: bloco rolável que ocupa o espaço disponível */
.filter-panel-resume__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.filter-panel-resume__display-options {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.filter-panel-resume__display-options .lc-tooltip {
  flex: 1 1;
  display: flex;
  justify-content: center;
}

.filter-panel-resume__section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.filter-panel-resume__section-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.filter-panel-resume__section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-default);
  margin: 0;
  flex-shrink: 0;
}

/* Alterna entre o construtor manual de filtros e o Assistente de IA (chat).
   So aparece quando o caller informa clientGroupId (feature restrita ao
   FinOps Resume). */
.filter-panel-resume__mode-toggle {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
  background: #f2f3f3;
  border-radius: 6px;
  padding: 2px;
}

.filter-panel-resume__mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  font-family: "Ubuntu", sans-serif;
  color: #545b64;
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.filter-panel-resume__mode-btn:hover:not(:disabled) {
  color: #232f3e;
}

.filter-panel-resume__mode-btn.active {
  background: #fff;
  color: #232f3e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.filter-panel-resume__mode-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-panel-resume__section-scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
  max-height: min(520px, calc(100dvh - 220px));
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.filter-panel-resume__section-scroll:has(> .rfa-root) {
  overflow: hidden;
}

.filter-panel-resume__icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  color: #666;
}

.filter-panel-resume__icon-btn:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #d0d0d0;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #333;
}

.filter-panel-resume__icon-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-panel-resume__icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-panel-resume__icon-btn.active {
  background: #e6f2ff;
  border-color: #2E1956;
  box-shadow: 0 0 0 2px rgba(46, 25, 86, 0.1);
  color: #2E1956;
}

.filter-panel-resume__icon-btn.active:hover:not(:disabled) {
  background: #d9ebff;
  border-color: #2E1956;
}

/* Footer: bloco fixo no fim com os botões de ação */
.filter-panel-resume__actions {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
  background: transparent;
}

.filter-panel-resume__validation {
  flex-shrink: 0;
  padding: 8px 10px;
  border: 1px solid #e0a4a4;
  border-radius: 6px;
  background: #fff4f4;
  color: #8a1c1c;
  font-size: 12px;
  line-height: 1.35;
}

/* Dentro do SideModal, o body tem padding de 2rem. O footer precisa vazar esse
   padding para colar nas bordas do painel (full-bleed) e ficar rente ao fundo,
   eliminando o "bloco branco" flutuante e desalinhado. */
.side-modal .filter-panel-resume__actions {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 12px 0 0;
  background: #fafafa;
}

.filter-panel-resume__btn {
  flex: 1 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.filter-panel-resume__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-panel-resume__btn--primary {
  background-color: var(--color-primary-purple);
  color: white;
}

.filter-panel-resume__btn--primary:hover:not(:disabled) {
  background-color: var(--color-primary-purple-dark);
}

.filter-panel-resume__btn--secondary {
  background-color: transparent;
  color: var(--text-default);
  border: 1px solid var(--border-default);
}

.filter-panel-resume__btn--secondary:hover:not(:disabled) {
  background-color: var(--background-hover);
}


.lcdashboard .lc-selectLabel {
    position: static;
    width: 55px;
    height: 18px;
    left: 0px;
    top: 0px;
    font-family: "Ubuntu", sans-serif;
    font-style: normal;
    line-height: 150%;
    font-size: 12px;
    line-height: 150%;
    margin: 3px 0px;
}

.lcdashboard .lc-fixedFilter {
    align-items: center;
    margin-left: 15px;
    margin-top: 10px;
    width: 100%;
    top: 110px;
    background-color: #fafafa;
    overflow-x: hidden;
    overflow-y: auto;
    display: inline-block;
    position: fixed;
    z-index: 99;
}

.lcdashboard .echarts-for-react text[fill="#2B304F"] {
    font-feature-settings: "tnum" on, "lnum" on;
    letter-spacing: -0.05em;
}

/* .lcdashboard .lc-title {
} */

/* .lcdashboard .lc-segment-title-row { */
/* display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-height: 27px;*/
/* } */

.lcdashboard .tooltip-custom {
    max-width: 300px;
    word-break: break-word;
}

.lcdashboard .text-custom-resize {
    font-size: 5vw;
    word-break: break-word;
}

.lcdashboard .text-custom-resize-baseline {
    font-size: 1.5vw;
    word-break: break-word;
    font-family: "Ubuntu", sans-serif;
    font-weight: 600;
    line-height: 22px;
    letter-spacing: 0em;
    text-align: center;
}

.lcdashboard .text-cc {
    font-family: "Ubuntu", sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    letter-spacing: 0em;
    text-align: left;
}

.lcdashboard .grid {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 1fr;
    grid-gap: 0px;
}

.finops-ai-chat-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: calc(100vh - 175px);
}

/* .lcdashboard .cell {
    max-height: 90%;
    max-height: 50px;
    display: grid;
    grid-column-end: span 1;
    grid-template-rows: 1fr;
    display: grid;
    grid-column-end: span 1;
    grid-template-rows: 1fr;
    grid-row-start: 1;
    grid-row-end: span 1;
}

    .lcdashboard .cell > .fullrow {
        display: grid;
        grid-auto-flow: column;
        grid-column-start: 1;
        grid-column-end: span 12;
        grid-row-start: 1;
        grid-row-end: span 1;
    } */



.lcdashboard .grid-column {
    display: grid;
    flex-direction: column;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 9fr 1fr 1fr;
    grid-column-start: 1;
    grid-column-end: span 1;
    grid-row-end: span 12;
}

.lcdashboard .subtitle-dash {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    letter-spacing: -0.04em;
    text-align: right;
    padding: 0px;
    color: #8b90a3;
}

.lcdashboard .subtitle-dash-bold {
    font-weight: 700;
}

.lcdashboard .projecao-container {
    display: flex;
    flex-direction: column;
    align-self: end;
    min-height: 100%;
    justify-content: space-around;
    min-width: 100%;
}

.lcdashboard .projecao-content {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-width: 100%;
    flex-wrap: nowrap;
}

.lcdashboard .projecao-content.r-align {
    justify-content: space-between;
}

.lcdashboard .projecao-content>.icon {
    font-size: 2.2vw;
    font-weight: bold;
    flex-shrink: 0;
}

.lcdashboard .projecao-content>.icon.red {
    color: var(--status-red);
}

.lcdashboard .projecao-content>.icon.green {
    color: var(--status-green);
}

.lcdashboard .projecao-content>.value {
    font-size: 1.6vw;
    font-weight: 400;
    flex-shrink: 0;
    white-space: nowrap;
}

.lcdashboard .projecao-content>.value.red {
    color: var(--status-red);
}

.lcdashboard .projecao-content>.value.green {
    color: var(--status-green);
}

.lcdashboard .otimizacoes-text-number {
    font-size: xx-large;
    display: flex;
}

.lcdashboard .otimizacoes-text {
    font-size: 1.6vw;
    font-weight: normal;
}

.lcdashboard .otimizacoes-symbol {
    color: white;
    font-weight: bold;
    display: flex;
    min-width: 50%;
}


.lcdashboard .alerta-container {
    display: flex;
    flex-direction: column;
}


.lcdashboard .alerta-container .alerta-content {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    display: flex;
    min-width: 100%;
}

.lcdashboard .alerta-container .alerta-content>.icon {
    color: var(--status-red);
    font-size: 2.2vw;
    font-weight: bold;
}


.lcdashboard .alerta-container .alerta-content>.alerta-chart {
    color: var(--status-red);
    font-weight: bold;
    max-width: 75%;
    min-width: 75%;
}

.lcdashboard .comparativo-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.lcdashboard .comparativo-container.last {
    min-height: 180px;
    transition: transform 0.3s ease-out;
}

.lcdashboard .comparativo-container .comparativo-content {
    min-width: 160px;
    display: flex;
    flex-direction: column;
    flex: 1 1;
    align-items: center;
    justify-content: center;
    width: 50%;
}



.lcdashboard .comparativo-container.last .comparativo-content {
    min-width: 120px;
    width: 50%;
}

.lcdashboard .comparativo-container .comparativo-content .row-title {
    text-align: center;
    color: var(--text-default);
}

.lcdashboard .comparativo-container.last .comparativo-content .row-title {
    font-size: 0.75rem;
}

.lcdashboard .comparativo-container .comparativo-content .row-content {
    position: relative;
    min-height: 140px;
    width: 100%;
}

.lcdashboard .comparativo-container.last .comparativo-content .row-content {
    max-height: 120px;
    height: 120px;
    min-height: 120px;
}


.lcdashboard .comparativo-container .comparativo-content .row-subtitle {
    position: absolute;
    bottom: 35px;
    text-align: center;
    color: var(--color-secondary-green-dark);
    width: 100%;
}

.lcdashboard .comparativo-container.last .comparativo-content .row-subtitle {
    bottom: 33px;
    font-size: 0.75rem;
}

.lcdashboard .comparativo-container .comparativo-content .row-subsubtitle {
    position: absolute;
    bottom: 15px;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.04em;
    text-align: center;
    width: 100%;
    color: var(--text-default);
}

.lcdashboard .comparativo-container.last .comparativo-content .row-subsubtitle {
    bottom: 18px;
    font-size: 0.625rem;
}

.lcdashboard .card-content-body:has(.maiores-consumos-full) {
    justify-content: flex-start;
}

/* Faixas de KPI (Informar/Otimizar/Operar): corpo do card sem padding vertical
   para eliminar o espaço sobrando acima/abaixo da faixa. Altura fixa e igual nos
   3 stages (cada stage tem nº de linhas diferente no grid, então sem isto a
   linha 1 teria altura absoluta distinta). */
.lcdashboard .card-frame.finops-kpi-strip-card {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    justify-content: center;
    align-self: stretch;
}

/* Primeira linha do grid (faixa de KPIs) com altura fixa; as demais linhas
   distribuem o restante (1fr), fazendo o dashboard subir e ocupar o espaço
   que sobrava abaixo da faixa. */
.finops-stage-grid--7 .lcdashboard-cards-panel-body {
    grid-template-rows: 64px repeat(6, 1fr) !important;
}

.finops-stage-grid--8 .lcdashboard-cards-panel-body {
    grid-template-rows: 64px repeat(7, 1fr) !important;
}

/* Painel de Filtros (right side panel) — o LCDashboard aplica `width:auto`
   inline (shrink-to-fit) ao overlay não fixado, deixando o painel fino demais
   no FinOps. Restauramos uma largura confortável (escopo só nas etapas FinOps
   via :has da grid). Mantém AI em foco a 100% (:not(.focused)) e o modo
   fixado intacto (:not(.pinned)). */
.lcdashboard:has(.finops-stage-grid) .right-sidepanel:not(.pinned):not(.focused) {
    width: 32% !important;
    min-width: 440px;
    max-width: 600px;
}

/* Elemento pai que envolve o conteúdo dos filtros (Informar/Otimizar/Operar).
   Quando o painel lateral é fixado (pinned), o LCDashboard o expande para 100%
   da tela. Em vez de forçar o width do painel/componente, limitamos a largura
   pelo container pai do filtro — mantém a UI bem dimensionada em ambos os modos. */
.finops-filters-host {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.lcdashboard .card-frame.finops-kpi-strip-card .card-content-body,
.lcdashboard .card-frame.finops-kpi-strip-card .card-content-body-content {
    padding-top: 0;
    padding-bottom: 0;
    height: 100%;
}

/* Card "Maiores consumos": título só no foco (à esquerda) e ícone voltar/ampliar à direita */
.lcdashboard .card-frame.maiores-consumos-card .block-icons {
    margin-left: auto;
}

.lcdashboard .finops-resume-card-title {
    font-size: 14px !important;
    font-weight: 400;
    line-height: 1.4;
}



.chart-container-home {
    position: relative;
    left: -12px;
    right: -12px;
    width: calc(100% + 24px) !important;
    height: 100% !important;
}

.consumo-mes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    gap: 1vw;
}

.consumo-mes .consumo {
    display: flex;
    align-items: center;
    gap: 0.5vh;
}

.consumo-mes .consumo .value {
    color: var(--text-default);
    font-family: "Ubuntu", sans-serif;
    font-size: 4.5vh;
    font-style: normal;
    font-weight: 400;
}

.consumo-mes .consumo .variation {
    padding: 2px 8px;
    border-radius: 4px;
    background: #D35555;
    color: #fff;
    font-family: "Ubuntu", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.consumo-mes .budget {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.consumo-mes .budget .value {
    color: var(--status-red);
    text-align: right;
    font-family: "Ubuntu", sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.consumo-mes .budget .label {
    color: var(--text-light);
    text-align: right;
    font-family: "Ubuntu", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    line-height: 160%;
    /* 19.2px */
    letter-spacing: -0.48px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.subtitle-dash-ishome {
    font-size: 1.7vh !important;
    color: #fff !important;
}

/* Big Numbers - Análise de Crescimento - Responsivo */
.growth-bignumber-main {
    font-size: clamp(0.95rem, 2.2vw, 1.4rem);
    font-weight: 700;
    line-height: 1;
}

.growth-bignumber-label {
    font-size: clamp(7px, 1.3vw, 10px);
    color: #888;
    margin-top: 2px;
}

.growth-counter-label {
    font-size: clamp(8px, 1.4vw, 11px);
    color: #666;
}

.growth-counter-value {
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    font-weight: 700;
}

/* Media queries para ajustes finos em diferentes resoluções */
@media (max-width: 768px) {
    .growth-bignumber-main {
        font-size: 1.1rem;
    }

    .growth-bignumber-label {
        font-size: 8px;
    }

    .growth-counter-label {
        font-size: 9px;
    }

    .growth-counter-value {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .growth-bignumber-main {
        font-size: 1rem;
    }

    .growth-bignumber-label {
        font-size: 7px;
    }

    .growth-counter-label {
        font-size: 8px;
    }

    .growth-counter-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .growth-bignumber-main {
        font-size: 0.9rem;
    }

    .growth-bignumber-label {
        font-size: 6px;
    }

    .growth-counter-label {
        font-size: 7px;
    }

    .growth-counter-value {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .growth-bignumber-main {
        font-size: 1.3rem;
    }

    .growth-bignumber-label {
        font-size: 9.5px;
    }

    .growth-counter-label {
        font-size: 10.5px;
    }

    .growth-counter-value {
        font-size: 0.95rem;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .growth-bignumber-main {
        font-size: 1.35rem;
    }

    .growth-bignumber-label {
        font-size: 10px;
    }

    .growth-counter-label {
        font-size: 11px;
    }

    .growth-counter-value {
        font-size: 0.975rem;
    }
}

@media (min-width: 1441px) {
    .growth-bignumber-main {
        font-size: 1.4rem;
    }

    .growth-bignumber-label {
        font-size: 10px;
    }

    .growth-counter-label {
        font-size: 11px;
    }

    .growth-counter-value {
        font-size: 1rem;
    }
}

/* Fix: Impedir que SVG do ECharts intercepte cliques em botoes de paginacao */
.chart-container .echarts-for-react svg {
    pointer-events: none;
}

/* Manter interatividade nos elementos do grafico que precisam de clique */
.chart-container .echarts-for-react svg rect,
.chart-container .echarts-for-react svg path,
.chart-container .echarts-for-react svg text {
    pointer-events: auto;
}
/* Monthly Consumption Card - Estilos baseados no mock */

.monthly-consumption-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%; 
}

/* Seção de KPIs no Topo */
.monthly-consumption-kpi-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 5px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Sempre quebrar header em duas linhas quando exibido na Home */
.card-home .kpi-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.card-home .kpi-main-value-section {
    width: 100%;
    justify-content: space-between;
}

.card-home .kpi-metrics-group {
    width: 100%;
    justify-content: flex-end;
}

/* Em telas estreitas / Home, o "vs. mês anterior" é omitido para poupar espaço */
.card-home .kpi-vs-label {
    display: none;
}

.kpi-metrics-group {
    display: flex;
    gap: 18px;
    align-items: center;
}

.kpi-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* Divisória vertical entre Projeção e Orçamento (padrão do mockup) */
.kpi-metric-divider {
    width: 1px;
    align-self: stretch;
    min-height: 28px;
    background: rgba(58, 79, 135, 0.14);
}

.kpi-metric-label {
    font-size: 11px;
    font-weight: 400;
    color: #8a90a6;
    color: var(--text-light, #8a90a6);
}

.kpi-metric-value {
    font-size: 16px;
    font-weight: 400;
    color: #2b304a;
    color: var(--text-dark, #2b304a);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.kpi-metric-value div {
    display: inline;
}

/* Valor Principal e Badge de Variação */
.kpi-main-value-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-main-value {
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    color: #2b304a;
    color: var(--text-dark, #2b304a);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.kpi-main-value div {
    display: inline;
}

/* Valor principal segue o padrão do mockup: sempre azul-escuro.
   A cor semântica (verde/vermelho) fica apenas na pill de variação. */
.kpi-main-value-section.positive .kpi-main-value,
.kpi-main-value-section.negative .kpi-main-value {
    color: #2b304a;
    color: var(--text-dark, #2b304a);
}

/* Texto "vs. mês anterior" ao lado da pill */
.kpi-vs-label {
    font-size: 11.5px;
    font-weight: 400;
    color: #8a90a6;
    color: var(--text-light, #8a90a6);
    white-space: nowrap;
}

.kpi-variation-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
}

.kpi-variation-badge.positive {
    background-color: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.kpi-variation-badge.negative {
    background-color: rgba(220, 41, 30, 0.1);
    color: #DC291E;
}

.kpi-variation-badge svg {
    width: 13px;
    height: 13px;
}

.kpi-variation-badge .subtitle-dash-bold {
    font-size: 12px;
    font-weight: 400;
}

/* Período */
.kpi-period {
    font-size: 11px;
    font-weight: 300;
    color: #6b7280;
    color: var(--text-secondary, #6b7280);
}

/* Container do Gráfico */
.monthly-consumption-chart-container {
    flex: 1 1;
    display: flex;
    flex-direction: column;
    min-height: 0;     
}

.monthly-consumption-chart-container > div:last-child {
    flex: 1 1;
    min-height: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .kpi-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-metrics-group {
        width: 100%;
        justify-content: flex-end;
    }

    .kpi-main-value {
        font-size: 26px;
    }

    .kpi-vs-label {
        display: none;
    }

    .monthly-consumption-legend {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .monthly-consumption-card { 
        gap: 12px;
    }

    .kpi-main-title {
        font-size: 13px;
    }

    .kpi-main-value {
        font-size: 22px;
    }

    .kpi-metrics-group {
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
    }

    .kpi-metric {
        align-items: flex-end;
    }

    .kpi-metric-divider {
        display: none;
    }
}

/* ===== Foco: grade com TODOS os charts das opções do dropdown ===== */
.monthly-all-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-gap: 16px;
    gap: 16px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 4px 8px 8px 4px;
    box-sizing: border-box;
}

.monthly-all-charts-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 320px;
    border: 1px solid #E2E6F3;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    box-sizing: border-box;
}

.monthly-all-charts-cell-title {
    font-size: 12px;
    font-weight: 500;
    color: #2b304a;
    color: var(--text-dark, #2b304a);
    font-family: 'Ubuntu';
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monthly-all-charts-cell-body {
    flex: 1 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Os componentes internos preenchem a célula da grade */
.monthly-all-charts-cell-body .monthly-consumption-card,
.monthly-all-charts-cell-body .chart-container,
.monthly-all-charts-cell-body .monthly-consumption-chart-container {
    flex: 1 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

/* Uma só coluna em telas estreitas */
@media (max-width: 900px) {
    .monthly-all-charts-grid {
        grid-template-columns: 1fr;
    }
}


/* RecommendationsSummaryCard — compact + focused (drilldown) */

.rec-summary {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 6px;
    padding: 4px 2px 0;
    box-sizing: border-box;
}

.rec-summary__list {
    flex: 1 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.rec-summary__row {
    display: grid;
    grid-template-columns: 28px 1fr auto 16px;
    align-items: center;
    grid-gap: 8px;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-height: 0;
}

.rec-summary__row:hover {
    background-color: rgba(140, 64, 227, 0.06);
}

.rec-summary__row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.rec-summary__row-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rec-summary__row-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #2D3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.rec-summary__row-desc {
    font-size: 0.68rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.rec-summary__row-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4A5568;
    min-width: 18px;
    text-align: right;
}

.rec-summary__row-chevron {
    color: #A0AEC0;
}

.rec-summary__footer {
    margin-top: auto;
    padding: 6px 8px;
    background: transparent;
    border: none;
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    border-radius: 4px;
}

.rec-summary__footer:hover {
    background-color: rgba(140, 64, 227, 0.06);
}

/* ───────── Focused (drilldown) ───────── */

.rec-summary-focus {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: 12px;
    padding: 8px 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.rec-summary-focus__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.rec-summary-focus__totals {
    display: flex;
    gap: 24px;
}

.rec-summary-focus__total-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rec-summary-focus__total-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2D3748;
    line-height: 1.1;
}

.rec-summary-focus__total-label {
    font-size: 0.7rem;
    color: #718096;
    line-height: 1.1;
}

.rec-summary-focus__cta {
    background: #8C40E3;
    background: var(--color-primary-purple, #8C40E3);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rec-summary-focus__cta:hover {
    filter: brightness(0.95);
}

.rec-summary-focus__buckets-grid {
    flex: 1 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-auto-rows: minmax(220px, auto);
    grid-gap: 12px;
    gap: 12px;
    overflow: auto;
    min-height: 0;
    align-content: start;
    padding-right: 4px;
}

.rec-summary-focus__bucket-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    height: 100%;
    min-height: 220px;
}

.rec-summary-focus__bucket-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: rgba(140, 64, 227, 0.25);
    transform: translateY(-1px);
}

.rec-summary-focus__bucket-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #2D3748;
}

.rec-summary-focus__bucket-titlewrap {
    flex: 1 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rec-summary-focus__bucket-desc {
    font-size: 0.68rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.rec-summary-focus__bucket-icon {
    display: inline-flex;
    align-items: center;
}

.rec-summary-focus__bucket-label {
    flex: 1 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-summary-focus__bucket-count {
    font-weight: 700;
    color: #4A5568;
}

.rec-summary-focus__bucket-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.rec-summary-focus__bucket-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.rec-summary-focus__bucket-savings {
    font-size: 0.72rem;
    color: #34c38f;
    font-weight: 600;
}

.rec-summary-focus__bucket-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.rec-summary-focus__bucket-cta {
    background: transparent;
    border: 1px solid rgba(140, 64, 227, 0.25);
    color: #8C40E3;
    color: var(--color-primary-purple, #8C40E3);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rec-summary-focus__bucket-cta:hover {
    background: rgba(140, 64, 227, 0.06);
}

.rec-summary-focus__bucket-samples {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    padding-top: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.rec-summary-focus__bucket-sample {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-gap: 0 6px;
    gap: 0 6px;
    align-items: center;
}

.rec-summary-focus__bucket-sample-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.72rem;
    font-weight: 600;
    color: #2D3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-summary-focus__bucket-sample-sub {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.66rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-summary-focus__bucket-sample-value {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 0.74rem;
    font-weight: 700;
    color: #34c38f;
    white-space: nowrap;
}

.view-manager-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: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);
}

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

.view-form-header h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    color: var(--color-text-primary, #333);
}

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

.view-form-actions button {
    flex: 1 1;
    height: 32px !important;
    min-width: 80px !important;
    padding: 0.25rem 0.8rem !important;
    font-size: 13px !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;
}

.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);
}

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

.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;
}

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

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

/* 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;
    }
}

/* Estilos para loading de view */
.view-item {
    position: relative;
}

.view-item.loading {
    pointer-events: none;
    opacity: 0.7;
}

.view-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    border-radius: 8px;
    font-size: 12px;
    color: #1976d2;
    color: var(--color-primary, #1976d2);
    font-weight: 500;
}

.view-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border: 3px solid var(--color-border, #e0e0e0);
    border-top-color: #1976d2;
    border-top-color: var(--color-primary, #1976d2);
    border-radius: 50%;
    animation: view-spinner-rotate 0.8s linear infinite;
}

@keyframes view-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.operation-queue-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-family: var(--font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
}

.queue-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.queue-status.processing {
    background: #EFF6FF;
    border: 1px solid #3B82F6;
    color: #1E40AF;
}

.queue-status.pending {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    color: #92400E;
}

.queue-status.failed {
    background: #FEE2E2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

.queue-status.success {
    background: #D1FAE5;
    border: 1px solid #10B981;
    color: #065F46;
    animation: fadeOut 2s ease-in-out 1s forwards;
}

.queue-status .icon {
    font-size: 18px;
    flex-shrink: 0;
}

.queue-status .text {
    white-space: nowrap;
}

.queue-status.processing .icon.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}


