/* 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;
  height: 100%;
  min-height: 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;
  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%;
}
.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%;
  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;
}
.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;
  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;
  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;
  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;
}

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

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

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

.filter-panel-resume {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 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 auto;
  min-height: 0;
  overflow-y: auto;
}

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

.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: 4px;
  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 {
  flex: 1 1 auto;
  min-height: 0;
}

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

/* 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: auto -2rem -2rem -2rem;
  padding: 12px 2rem;
  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;
}



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


/* ============================================================
   CostCenterDetailSideModal — estilos
   ============================================================ */

.cc-side-modal {
    font-family: "Ubuntu", sans-serif;
    color: #2E1956;
    padding: 0.5rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
}

/* Compactar o header do SideModal quando usado neste contexto */
.side-modal:has(.cc-side-modal) > .header {
    height: auto;
    min-height: 40px;
    padding: 0.6rem 1.25rem;
    font-size: 14px;
}
.side-modal:has(.cc-side-modal) > .body {
    height: calc(100vh - 100px);
    padding: 0 1.25rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.cc-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.cc-side-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-side-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: #2E1956;
    flex: 1 1;
}

.cc-side-pager {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}
.cc-side-pager-count {
    font-size: 11px;
    color: #6B7280;
    margin-right: 4px;
    -webkit-user-select: none;
    user-select: none;
}
.cc-side-pager-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 16px;
    line-height: 1;
    color: #2E1956;
    cursor: pointer;
    transition: background 120ms ease, opacity 120ms ease;
}
.cc-side-pager-btn:hover:not(:disabled) {
    background: #F0F2F8;
}
.cc-side-pager-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Sub-header — layout horizontal compacto */
.cc-sub-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #F0F2F8;
}

.cc-name-block {
    display: flex;
    flex-direction: column;
    flex: 1 1;
    min-width: 0;
    gap: 0;
}

.cc-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2E1956;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-meta {
    font-size: 0.65rem;
    color: #8B90A3;
    font-weight: 400;
    line-height: 1.2;
}

.cc-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 0.4rem;
    background: #F0F2F8;
    color: #6B6F7D;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    flex-shrink: 0;
}

.cc-rank-pill.top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
}

/* Mini-cards 2x2 */
.cc-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
}

.cc-mini-card {
    background: #FAFBFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    padding: 0.5rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 70px;
}

.cc-mini-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.cc-mini-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.cc-mini-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-edit-icon {
    cursor: pointer;
    color: #471FCC;
    transition: color 0.15s ease;
}
.cc-edit-icon:hover { color: #6B3FE8; }

.cc-mini-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-mini-delta.up { color: #DC291E; }
.cc-mini-delta.down { color: #2e7d32; }

.cc-mini-progress {
    height: 4px;
    background: #F0F2F8;
    border-radius: 2px;
    overflow: hidden;
}
.cc-mini-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.cc-mini-progress-bar.good    { background: linear-gradient(90deg, #2e7d32, #66BB6A); }
.cc-mini-progress-bar.normal  { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.cc-mini-progress-bar.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.cc-mini-progress-bar.over    { background: linear-gradient(90deg, #DC291E, #FF5C5C); }

.cc-mini-sub {
    font-size: 0.7rem;
    color: #6B6F7D;
}
.cc-mini-sub.over { color: #DC291E; font-weight: 500; }

/* ===== Summary cards (2 cards agrupados) ===== */
.cc-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
}

.cc-summary-card {
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 8px;
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.cc-summary-card:hover {
    border-color: #C5CAE0;
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.08);
}

.cc-summary-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.cc-summary-header svg { color: #471FCC; }

.cc-summary-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.4rem;
    background: #F0EBFF;
    color: #471FCC;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cc-summary-badge svg { color: #471FCC; }

.cc-summary-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cc-summary-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.cc-summary-compare {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-weight: 400;
    line-height: 1.3;
    margin-top: -0.15rem;
}
.cc-summary-compare strong {
    color: #2E1956;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-summary-divider {
    height: 1px;
    background: #F0F2F8;
    margin: 0.1rem 0;
}

.cc-summary-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cc-summary-sub-label {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-weight: 400;
}

.cc-summary-sub-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-summary-sub-value.good    { color: #2e7d32; }
.cc-summary-sub-value.normal  { color: #471FCC; }
.cc-summary-sub-value.warning { color: #E07817; }
.cc-summary-sub-value.over    { color: #DC291E; }

/* Resources & trend */
.cc-resources-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
    padding: 0.625rem;
    background: #FFFFFF;
    border: 1px solid #F0F2F8;
    border-radius: 6px;
}

.cc-resources-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-resources-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F2F8;
    color: #471FCC;
    border-radius: 6px;
}

.cc-resources-label {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cc-resources-value {
    font-size: 1rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-trend-block {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cc-trend-label {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cc-trend-pct {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.cc-trend-pct.up { color: #DC291E; }
.cc-trend-pct.down { color: #2e7d32; }
.cc-trend-pct.neutral { color: #8B90A3; }

.cc-mini-sparkline {
    width: 100%;
    height: 30px;
}
.cc-mini-sparkline.loading,
.cc-mini-sparkline.empty {
    font-size: 0.7rem;
    color: #8B90A3;
    display: flex;
    align-items: center;
}

/* Charts */
.cc-charts-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 0.5rem;
    gap: 0.5rem;
    flex: 1 1;
    min-height: 0;
}

/* Body grid: em expanded vira 2 colunas (esquerda = KPIs+charts, direita = insight full-height) */
.cc-body-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1;
    min-height: 0;
    gap: 0.75rem;
}
.cc-body-grid.expanded {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
    grid-gap: 0.75rem;
    gap: 0.75rem;
    align-items: stretch;
}
.cc-body-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
    flex: 1 1;
}
.cc-insight-aside {
    margin-top: 0 !important;
    align-self: stretch;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.cc-insight-aside .cc-insight-body {
    flex: 1 1;
}
@media (max-width: 1199px) {
    .cc-body-grid.expanded {
        grid-template-columns: 1fr;
    }
}

/* Em fullscreen / sidepanel expandido, charts lado a lado */
.cc-side-modal-expanded .cc-charts-row,
.cc-charts-row.expanded {
    grid-template-columns: 1fr 1fr;
}
@media (min-width: 1100px) {
    .cc-charts-row { grid-template-columns: 1fr 1fr; }
}

.cc-chart-block {
    background: #FFFFFF;
    border: 1px solid #F0F2F8;
    border-radius: 6px;
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.cc-chart-block .react-loading,
.cc-chart-block > div[class*="loading"] {
    flex: 1 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.cc-chart-block .echarts-for-react {
    flex: 1 1;
    min-height: 0 !important;
    height: 100% !important;
}

.cc-chart-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cc-chart-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #2E1956;
}

.cc-chart-subtitle {
    font-size: 0.7rem;
    color: #6B6F7D;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.cc-window-select {
    border: 1px solid #E2E6F3;
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
    font-size: 0.7rem;
    color: #2E1956;
    background: #FFFFFF;
    cursor: pointer;
}

.cc-empty {
    padding: 1rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8B90A3;
}

.cc-link {
    background: none;
    border: none;
    color: #471FCC;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-align: left;
    align-self: flex-start;
}
.cc-link:hover:not(:disabled) { text-decoration: underline; }
.cc-link:disabled { color: #C5CAE0; cursor: not-allowed; }

.cc-legend {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.cc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #6B6F7D;
}
.cc-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.cc-legend-dot.consumo { background: #9FA3FF; }
.cc-legend-dot.anterior { background: #255A4B; }
.cc-legend-dot.budget { background: #E07817; }

/* Insight */
.cc-insight {
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    border: 1px solid #E2E6F3;
    border-left: 3px solid #471FCC;
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cc-insight-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #471FCC;
}

.cc-insight-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(90deg, #471FCC, #6B3FE8);
    padding: 0.15rem 0.45rem;
    border-radius: 8px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.cc-insight-body {
    font-size: 0.875rem;
    color: #2E1956;
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.cc-insight-footer {
    font-size: 0.7rem;
    color: #8B90A3;
    text-align: right;
}

/* Footer actions */
.cc-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #F0F2F8;
    flex-wrap: wrap;
}

.cc-action {
    flex: 1 1;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid #E2E6F3;
}

.cc-action.secondary {
    background: #FFFFFF;
    color: #2E1956;
}
.cc-action.secondary:hover { background: #F0F2F8; border-color: #471FCC; color: #471FCC; }

.cc-action.primary {
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    color: #FFFFFF;
    border-color: #471FCC;
}
.cc-action.primary:hover { box-shadow: 0 2px 8px rgba(71, 31, 204, 0.35); transform: translateY(-1px); }


/* ===== Variantes de tamanho (size=normal | wide | full) =====
   - normal : layout 1 coluna (sem aside)
   - wide   : 2 colunas (main + insight aside) com aside ~28%
   - full   : 2 colunas mais espa\u00e7osas e mini-cards 4 col fixas */
.cc-body-grid.size-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    grid-gap: 0.75rem;
    gap: 0.75rem;
    align-items: stretch;
}
.cc-body-grid.size-full {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    grid-gap: 1rem;
    gap: 1rem;
    align-items: stretch;
}
.cc-body-main.size-full .cc-mini-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cc-body-main.size-wide .cc-mini-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cc-charts-row.size-full,
.cc-charts-row.size-wide {
    grid-template-columns: 1fr 1fr;
}
.cc-insight-aside.size-full {
    background: linear-gradient(180deg, #F7F5FF 0%, #FFFFFF 100%);
    border-left: 3px solid #471FCC;
    padding: 1rem;
}
.cc-insight-aside.size-wide {
    padding: 0.75rem;
}
@media (max-width: 1199px) {
    .cc-body-grid.size-wide,
    .cc-body-grid.size-full {
        grid-template-columns: 1fr;
    }
}

/* ===== Compactação para telas pequenas (≤ 1366×768) ===== */
@media (max-width: 1366px) {
    .cc-side-modal {
        padding: 0.35rem 0.75rem 0.75rem 0.75rem;
        gap: 0.5rem;
        font-size: 0.82rem;
    }
    .cc-name { font-size: 0.8rem; }
    .cc-meta { font-size: 0.6rem; }
    .cc-sub-header { padding-bottom: 0.35rem; gap: 0.35rem; }

    /* Mini-cards */
    .cc-mini-cards { gap: 0.35rem; }
    .cc-mini-card {
        padding: 0.35rem 0.5rem;
        gap: 0.15rem;
        min-height: 56px;
    }
    .cc-mini-label { font-size: 0.58rem; }
    .cc-mini-value { font-size: 0.82rem; }
    .cc-mini-delta { font-size: 0.62rem; }
    .cc-mini-sub { font-size: 0.62rem; }

    /* Summary cards */
    .cc-summary-cards { gap: 0.4rem; }
    .cc-summary-card { padding: 0.45rem 0.55rem; gap: 0.25rem; }
    .cc-summary-header { font-size: 0.58rem; }
    .cc-summary-value { font-size: 0.95rem; }
    .cc-summary-sub-label { font-size: 0.62rem; }
    .cc-summary-sub-value { font-size: 0.75rem; }
    .cc-summary-compare { font-size: 0.6rem; }

    /* Resources & trend */
    .cc-resources-row {
        padding: 0.4rem 0.5rem;
        gap: 0.35rem;
    }
    .cc-resources-icon { width: 26px; height: 26px; }
    .cc-resources-label { font-size: 0.58rem; }
    .cc-resources-value { font-size: 0.85rem; }
    .cc-trend-label { font-size: 0.58rem; }
    .cc-trend-pct { font-size: 0.75rem; }

    /* Charts */
    .cc-charts-row { gap: 0.35rem; }
    .cc-chart-block {
        padding: 0.4rem 0.5rem;
        gap: 0.25rem;
    }
    .cc-chart-title { font-size: 0.68rem; }
    .cc-chart-subtitle { font-size: 0.62rem; }
    .cc-legend-item { font-size: 0.62rem; }
    .cc-legend-dot { width: 6px; height: 6px; }

    /* Insight */
    .cc-insight-title { font-size: 0.82rem; }
    .cc-insight-body { font-size: 0.82rem; line-height: 1.5; }
    .cc-link { font-size: 0.68rem; }

    /* Body grid gap */
    .cc-body-main { gap: 0.5rem; }
    .cc-body-grid.expanded { gap: 0.5rem; }
}

@media (max-height: 768px) {
    .side-modal:has(.cc-side-modal) > .header {
        min-height: 32px;
        padding: 0.4rem 1rem;
        font-size: 13px;
    }
    .side-modal:has(.cc-side-modal) > .body {
        height: calc(100vh - 80px);
        padding: 0 1rem 0.5rem 1rem;
    }
    .cc-side-modal {
        padding: 0.25rem 0.5rem 0.5rem 0.5rem;
        gap: 0.4rem;
    }
    .cc-mini-card { min-height: 48px; padding: 0.25rem 0.4rem; }
    .cc-chart-block { padding: 0.3rem 0.4rem; }
    .cc-resources-row { padding: 0.3rem 0.4rem; }
    .cc-mini-sparkline { height: 22px; }
}

/* Container principal do drill-down */
.budget-drilldown-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #F8F9FD 0%, #FAFBFF 100%);
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
}

/* Header com estatísticas */
.drilldown-header {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FD 100%);
    border-bottom: 1px solid #E2E6F3;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.03);
}

.innerLCGrid {
    display: contents;
}
.header-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: stretch;
}

.stat-card {
    background: #FFFFFF;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    box-shadow: 0 1px 3px rgba(46, 25, 86, 0.05);
    transition: all 0.2s ease;
    min-height: 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    justify-content: space-between;
    flex: 1 1;
    min-width: 0;
    white-space: nowrap;
}

.stat-card:hover {
    box-shadow: 0 1px 4px rgba(46, 25, 86, 0.08);
    border-color: #471FCC;
}

.stat-card.alert {
    background: linear-gradient(90deg, #FFF5F5 0%, #FFFFFF 100%);
    border-color: #FFE0E0;
}

.stat-card.alert:hover {
    border-color: #DC291E;
}

.stat-card.growth {
    background: linear-gradient(90deg, #F0FFF4 0%, #FFFFFF 100%);
    border-color: #D4F4DD;
}

.stat-card.growth:hover {
    border-color: #38A169;
}

.stat-card.highlight {
    background: linear-gradient(90deg, #F0F4FF 0%, #FFFFFF 100%);
    border-color: #D4E0FF;
}

.stat-card.highlight:hover {
    border-color: #471FCC;
}

.stat-label {
    font-size: 0.55rem;
    font-weight: 300;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 300;
    color: #2E1956;
    line-height: 1.1;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: auto;
}

.stat-value-small {
    font-size: 0.7rem;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.stat-count {
    font-size: 0.65rem;
    font-weight: 300;
    color: #471FCC;
}

.stat-card.alert .stat-value {
    color: #DC291E;
}

.stat-card.growth .stat-value {
    color: #38A169;
}

.stat-card.highlight .stat-value {
    color: #471FCC;
}

/* Barra de ferramentas */
.drilldown-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E6F3;
}

/* Campo de busca */
.search-box {
    position: relative;
    flex: 1 1;
    max-width: 350px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #8B90A3;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.75rem;
    border: 2px solid #E2E6F3;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: "Ubuntu", sans-serif;
    transition: all 0.3s ease;
    background: #FAFBFF;
    color: #2E1956;
    font-weight: 300;
}

.search-input:hover {
    border-color: #C5CAE0;
    background: #FFFFFF;
}

.search-input:focus {
    outline: none;
    border-color: #471FCC;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(71, 31, 204, 0.1);
}

.search-input::placeholder {
    color: #8B90A3;
    font-weight: 400;
}

.clear-search {
    position: absolute;
    right: 8px;
    background: #E2E6F3;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #6B6F7D;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: #471FCC;
    color: #FFFFFF;
    transform: scale(1.05);
}

/* Info da toolbar */
.toolbar-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: #2E1956;
    white-space: nowrap;
    font-weight: 300;
    padding: 0.5rem 1rem;
    background: #F0F2F8;
    border-radius: 6px;
    border: 1px solid #E2E6F3;
}



/* Wrapper da tabela */
.budget-detail-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    flex: 1 1;
    margin: 0 1.25rem 1.25rem 1.25rem;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.06);
}

/* Tabela */
.budget-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 0.875rem;
    font-family: "Ubuntu", sans-serif;
    table-layout: fixed;
}

/* Larguras específicas das colunas */
.budget-detail-table thead th:nth-child(1) {
    width: 25%;
    min-width: 200px;
}

.budget-detail-table thead th:nth-child(2) {
    width: 10%;
    min-width: 100px;
}

.budget-detail-table thead th:nth-child(3) {
    width: 12%;
    min-width: 110px;
}

.budget-detail-table thead th:nth-child(4) {
    width: 13%;
    min-width: 120px;
}

.budget-detail-table thead th:nth-child(5) {
    width: 15%;
    min-width: 130px;
}

.budget-detail-table thead th:nth-child(6) {
    width: 15%;
    min-width: 130px;
}

.budget-detail-table thead th:nth-child(7) {
    width: 10%;
    min-width: 100px;
}

/* Cabeçalho da tabela */
.budget-detail-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
}

.budget-detail-table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 300;
    font-size: 0.6875rem;
    color: #2E1956;
    border-bottom: 2px solid #E2E6F3;
    white-space: nowrap;
    font-family: "Ubuntu", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-detail-table thead th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
}

.budget-detail-table thead th.sortable:hover {
    background: linear-gradient(135deg, #E8EAFF 0%, #F0F2F8 100%);
    color: #471FCC;
}

.budget-detail-table thead th.sortable:active {
    transform: scale(0.98);
}

.budget-detail-table thead th.text-center {
    text-align: center;
}

.budget-detail-table thead th.text-right {
    text-align: right;
}

/* Corpo da tabela */
.budget-detail-table tbody tr {
    border-bottom: 1px solid #F0F2F8;
    transition: all 0.2s ease;
}

.budget-detail-table tbody tr.even-row {
    background: #FAFBFF;
}

.budget-detail-table tbody tr.odd-row {
    background: #FFFFFF;
}

.budget-detail-table tbody tr:hover {
    background: linear-gradient(90deg, #F0F2F8 0%, #F8F9FD 100%);
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(46, 25, 86, 0.08);
}

.budget-detail-table tbody tr.over-budget {
    background: linear-gradient(90deg, rgba(220, 41, 30, 0.04) 0%, rgba(220, 41, 30, 0.02) 100%);
    border-left: 3px solid #DC291E;
}

.budget-detail-table tbody tr.over-budget:hover {
    background: linear-gradient(90deg, rgba(220, 41, 30, 0.08) 0%, rgba(220, 41, 30, 0.04) 100%);
}

.budget-detail-table tbody td {
    padding: 0.875rem 1rem;
    color: #2E1956;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-detail-table tbody td.text-center {
    text-align: center;
}

.budget-detail-table tbody td.text-right {
    text-align: right;
}

/* Célula de nome com ranking */
.cell-name {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    color: #2E1956;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    overflow: hidden;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 0.4rem;
    background: linear-gradient(135deg, #F0F2F8 0%, #E2E6F3 100%);
    color: #6B6F7D;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 5px;
    border: 1px solid #E2E6F3;
    flex-shrink: 0;
}

.rank-badge.rank-top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.3);
}

.name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    color: #2E1956;
    flex: 1 1;
    min-width: 0;
}

/* Badge de novos recursos */
.resource-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
}

.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    color: #FFFFFF;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(71, 31, 204, 0.3);
}

/* Indicador de tendência - Design Profissional */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.625rem;
    border-radius: 5px;
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    min-width: 70px;
}

.trend-indicator.growth {
    background: linear-gradient(135deg, rgba(220, 41, 30, 0.1) 0%, rgba(220, 41, 30, 0.05) 100%);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.2);
}

.trend-indicator.growth .trend-icon {
    color: #DC291E;
}

.trend-indicator.decline {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(46, 125, 50, 0.05) 100%);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.trend-indicator.decline .trend-icon {
    color: #2e7d32;
}

.trend-indicator.neutral {
    background: #F0F2F8;
    color: #6B6F7D;
    border: 1px solid #E2E6F3;
}

.trend-percent {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Valores de variação */
.variation-value {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.variation-value.negative {
    color: #DC291E;
}

.variation-value.positive {
    color: #2e7d32;
}

/* Valores de custo e orçamento */
.cost-value {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    color: #2E1956;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.budget-value {
    font-family: "Ubuntu", sans-serif;
    color: #6B6F7D;
    font-weight: 400;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.text-muted {
    font-family: "Ubuntu", sans-serif;
    color: #8B90A3;
    font-weight: 400;
    font-size: 0.8125rem;
}

/* Indicador de uso de orçamento - Design Profissional */
.budget-usage-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.625rem;
    border-radius: 5px;
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    min-width: 70px;
}

.budget-usage-indicator.good {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(46, 125, 50, 0.05) 100%);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.budget-usage-indicator.good .status-icon {
    color: #2e7d32;
}

.budget-usage-indicator.normal {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #F57C00;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.budget-usage-indicator.normal .status-icon {
    color: #F57C00;
}

.budget-usage-indicator.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    color: #E65100;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.budget-usage-indicator.warning .status-icon {
    color: #E65100;
}

.budget-usage-indicator.over-budget {
    background: linear-gradient(135deg, rgba(220, 41, 30, 0.15) 0%, rgba(220, 41, 30, 0.08) 100%);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.3);
    animation: pulse-alert 2s ease-in-out infinite;
}

.budget-usage-indicator.over-budget .status-icon {
    color: #DC291E;
}

@keyframes pulse-alert {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 41, 30, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 41, 30, 0);
    }
}

.usage-percent {
    font-family: "Ubuntu", sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Responsividade */
@media (max-width: 1400px) {
    .header-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .budget-detail-table {
        font-size: 0.8125rem;
        table-layout: auto;
    }

    .budget-detail-table thead th,
    .budget-detail-table tbody td {
        padding: 0.75rem 0.875rem;
    }

    .budget-detail-table thead th:nth-child(1) {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .drilldown-header {
        padding: 1rem;
    }

    .header-stats {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .stat-card {
        padding: 0.875rem 1rem;
        min-height: 75px;
    }

    .stat-label {
        font-size: 0.625rem;
        font-weight: 300;
    }

    .stat-value {
        font-size: 1.5rem;
        font-weight: 300;
    }

    .drilldown-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
        padding: 1rem;
    }

    .search-box {
        max-width: 100%;
    }

    .toolbar-info {
        justify-content: center;
    }

    .results-count {
        text-align: center;
        width: 100%;
        font-weight: 300;
    }

    .budget-detail-table-wrapper {
        margin: 0 1rem 1rem 1rem;
    }

    .budget-detail-table {
        font-size: 0.75rem;
        table-layout: auto;
    }

    .budget-detail-table thead th,
    .budget-detail-table tbody td {
        padding: 0.625rem 0.5rem;
    }

    .budget-detail-table thead th {
        font-size: 0.625rem;
        font-weight: 300;
    }

    .rank-badge {
        min-width: 26px;
        height: 20px;
        font-size: 0.625rem;
        padding: 0 0.3rem;
        font-weight: 300;
    }

    .trend-indicator,
    .budget-usage-indicator {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
        min-width: 60px;
        font-weight: 300;
    }

    .cost-value,
    .budget-value,
    .variation-value {
        font-size: 0.75rem;
        font-weight: 300;
    }
}

/* Scrollbar customizada */
.budget-detail-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.budget-detail-table-wrapper::-webkit-scrollbar-track {
    background: #F0F2F8;
    border-radius: 6px;
}

.budget-detail-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #C5CAE0 0%, #8B90A3 100%);
    border-radius: 6px;
    border: 2px solid #F0F2F8;
}

.budget-detail-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
}

/* ===== NAVEGAÇÃO E BOTÕES ===== */
.header-navigation {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 300;
    color: #495057;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #F8F9FD;
    border-color: #471FCC;
    transform: translateX(-2px);
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 300;
    color: #2E1956;
    margin: 0;
}

/* ===== TOOLBAR ACTIONS ===== */
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: #6B6F7D;
    font-weight: 300;
}

/* ===== FILTROS ===== */
.filters-panel {
    padding: 1rem 1.25rem;
    background: #F8F9FD;
    border-bottom: 1px solid #E2E6F3;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 300;
    color: #2E1956;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 300;
    color: #495057;
    transition: all 0.2s ease;
}

.filter-button:hover {
    background: #F8F9FD;
    border-color: #471FCC;
}

.filter-button.active {
    background: #471FCC;
    border-color: #471FCC;
    color: #FFFFFF;
}

/* ===== SELETOR DE COLUNAS ===== */
.column-selector-panel {
    padding: 1rem 1.25rem;
    background: #F8F9FD;
    border-bottom: 1px solid #E2E6F3;
}

.column-selector-title {
    font-size: 0.875rem;
    font-weight: 300;
    color: #2E1956;
    margin-bottom: 0.75rem;
}

.column-selector-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== COLUNA DE AÇÕES ===== */
.actions-column {
    width: 120px;
    min-width: 120px;
}

.actions-cell {
    padding: 0.5rem !important;
}

.details-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #471FCC 0%, #6B3FE8 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 300;
    color: #FFFFFF;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.details-button:hover {
    background: linear-gradient(135deg, #3A18A8 0%, #5632C4 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(71, 31, 204, 0.3);
}

/* ===== DETALHES DO CENTRO DE CUSTO ===== */
.cost-center-details {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.details-summary {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.summary-card {
    background: #FFFFFF;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    box-shadow: 0 1px 2px rgba(46, 25, 86, 0.04);
    flex: 1 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-label {
    font-size: 0.45rem;
    font-weight: 300;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.summary-value {
    font-size: 0.75rem;
    font-weight: 300;
    color: #2E1956;
    white-space: nowrap;
}

.details-info {
    background: #F8F9FD;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.375rem;
    flex-shrink: 0;
}

.details-info p {
    margin: 0.15rem 0;
    font-size: 0.65rem;
    color: #495057;
}

.status-over {
    color: #DC291E;
    font-weight: 300;
}

.status-ok {
    color: #28A745;
    font-weight: 300;
}

.details-note {
    padding: 1rem;
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    border-radius: 6px;
}

.details-note p {
    margin: 0;
    font-size: 0.875rem;
    color: #856404;
    font-style: italic;
}

/* ===== SEÇÃO DE RECURSOS ===== */
.resources-section {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.resources-title {
    font-size: 0.75rem;
    font-weight: 300;
    color: #2E1956;
    margin-bottom: 0.375rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid #E2E6F3;
    flex-shrink: 0;
}

.resources-table-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
    background: #FFFFFF;
    max-height: calc(100vh - 280px);
    position: relative;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.resources-table thead {
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
    border-bottom: 2px solid #E2E6F3;
    position: sticky;
    top: 0;
    z-index: 10;
}

.resources-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 300;
    color: #2E1956;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #F8F9FD 0%, #FFFFFF 100%);
}

.resources-table tbody tr {
    border-bottom: 1px solid #F0F2F8;
    transition: background-color 0.2s ease;
}

.resources-table tbody tr:hover {
    background: linear-gradient(135deg, #F8F9FD 0%, #FAFBFF 100%);
}

.resources-table tbody tr:last-child {
    border-bottom: none;
}

.resources-table td {
    padding: 0.5rem 0.75rem;
    color: #495057;
    font-size: 0.75rem;
}

.resource-name {
    font-weight: 300;
    color: #2E1956;
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-cost {
    font-weight: 300;
    color: #471FCC;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.no-resources {
    padding: 2rem;
    text-align: center;
    background: #F8F9FD;
    border-radius: 10px;
    border: 1px dashed #E2E6F3;
}

.no-resources p {
    margin: 0;
    color: #6B6F7D;
    font-size: 0.9375rem;
}



/* ===== CARDS CLICAVEIS COM FILTRO ===== */
.card-filter-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-filter-clickable:hover {
    transform: scale(1.02);
}

/* ===== ESTILOS DE SELEÇÃO DE CARDS - Padrão card-fade/card-active ===== */

/* Card selecionado/ativo - destaque total */
.budget-drilldown-card-active {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 4px 4px 18px 0px rgba(58, 79, 135, 0.25);
    transition: all 0.3s ease;
}

.budget-drilldown-card-active .card-filter-clickable {
    background: rgba(46, 25, 86, 0.08);
}

/* Indicador visual "balão" para card ativo */
.budget-drilldown-card-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #fff;
    box-shadow: 2px 2px 4px rgba(58, 79, 135, 0.15);
    z-index: 1;
}

/* Cards não selecionados - fade/dim */
.budget-drilldown-card-fade {
    opacity: 0.35;
    transition: all 0.3s ease;
}

.budget-drilldown-card-fade:hover {
    opacity: 0.6;
}

/* Estado neutro - nenhum filtro ativo */
.budget-drilldown-card-neutral {
    opacity: 1;
    transition: all 0.3s ease;
}

.budget-drilldown-card-neutral:hover {
    box-shadow: 4px 4px 18px 0px rgba(58, 79, 135, 0.15);
}
/* ============================================================
   v2 — Filter bar, KPI row, status pills, sparkline, progress
   ============================================================ */
.bd-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.375rem 0;
}
.bd-filter-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.bd-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.bd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #E2E6F3;
    border-radius: 16px;
    background: #FFFFFF;
    font-size: 0.7rem;
    color: #2E1956;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    font-family: "Ubuntu", sans-serif;
}
.bd-chip.readonly { cursor: default; background: #FAFBFF; }
.bd-chip.select select {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; appearance: none;
}
.bd-chip:hover:not(.readonly) { border-color: #471FCC; }
.bd-chip-label { color: #6B6F7D; font-weight: 400; }
.bd-chip-value { color: #2E1956; font-weight: 500; }
.bd-link-btn {
    background: none;
    border: none;
    color: #471FCC;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    font-family: "Ubuntu", sans-serif;
}
.bd-link-btn:hover { background: #F0F2F8; }
.bd-icon-btn {
    background: #FFFFFF;
    border: 1px solid #E2E6F3;
    color: #2E1956;
    font-size: 0.7rem;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: "Ubuntu", sans-serif;
}
.bd-icon-btn:hover:not(:disabled) { border-color: #471FCC; color: #471FCC; }
.bd-icon-btn:disabled { color: #C5CAE0; cursor: not-allowed; }

/* KPI row (legacy - mantido caso seja reutilizado) */
.bd-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 0.5rem;
    gap: 0.5rem;
}
@media (max-width: 1100px) {
    .bd-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* KpiCard renderiza o conteúdo direto dentro do card-frame da LCDashboard
   (sem wrapper extra) — modificadores de tom/click vão no cssClass do Card. */
.bd-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    font-family: "Ubuntu", sans-serif;
}
.bd-card-kpi.clickable,
.bd-card-kpi.clickable .card-frame { cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.bd-card-kpi.clickable:hover .bd-kpi-value { color: #471FCC; }
.bd-card-kpi.tone-alert .bd-kpi-value { color: #DC291E; }
.bd-card-kpi.tone-growth .bd-kpi-value { color: #E07817; }
.bd-card-kpi.tone-alert .card-frame { border-left: 3px solid #DC291E; }
.bd-card-kpi.tone-growth .card-frame { border-left: 3px solid #E07817; }

/* Cards LCDashboard usados nesta página: remove padding/centralização padrão
   para que filterbar, searchbar e tabela ocupem todo o card-frame. */
.bd-card-flush .card-content-body,
.bd-card-flush .card-content-body-content {
    padding: 0 !important;
    width: 100%;
    height: 100%;
}
.bd-card-flush .card-content-body.centered { justify-content: stretch; }
.bd-card-kpi .card-content-body,
.bd-card-kpi .card-content-body-content {
    padding: 0.5rem 0.625rem !important;
    width: 100%;
    height: 100%;
}
.bd-kpi-title {
    font-size: 0.65rem;
    color: #6B6F7D;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 400;
}
.bd-kpi-value {
    font-size: 1rem;
    font-weight: 500;
    color: #2E1956;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.bd-kpi-progress {
    height: 4px;
    background: #F0F2F8;
    border-radius: 2px;
    overflow: hidden;
}
.bd-kpi-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}
.bd-kpi-progress-bar.normal { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.bd-kpi-progress-bar.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.bd-kpi-progress-bar.over { background: linear-gradient(90deg, #DC291E, #FF5C5C); }
.bd-kpi-sub {
    font-size: 0.65rem;
    color: #6B6F7D;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.bd-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}
.bd-kpi-delta.up { color: #DC291E; }
.bd-kpi-delta.down { color: #2e7d32; }

/* Search bar */
.bd-searchbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.25rem 0;
}
.bd-search-input-wrap {
    position: relative;
    flex: 1 1;
    max-width: 320px;
}
.bd-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B90A3;
    pointer-events: none;
}
.bd-search-input {
    width: 100%;
    padding: 0.4rem 0.5rem 0.4rem 1.875rem;
    border: 1px solid #E2E6F3;
    border-radius: 16px;
    font-size: 0.75rem;
    background: #FAFBFF;
    color: #2E1956;
    font-family: "Ubuntu", sans-serif;
    transition: all 0.15s ease;
}
.bd-search-input:focus {
    outline: none;
    border-color: #471FCC;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(71, 31, 204, 0.1);
}
.bd-search-count {
    font-size: 0.7rem;
    color: #6B6F7D;
}

/* Table cells v2 */
.bd-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 0.35rem;
    background: #F0F2F8;
    color: #6B6F7D;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #E2E6F3;
}
.bd-rank-badge.top {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FFA500;
}
.bd-name-text {
    font-size: 12px;
    color: #2E1956;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.bd-cost-value, .bd-budget-value, .bd-variation-value {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.bd-cost-value { color: #2E1956; font-weight: 500; }
.bd-budget-value { color: #6B6F7D; font-weight: 400; }
.bd-text-muted { color: #C5CAE0; }
.bd-variation-value.negative { color: #DC291E; font-weight: 500; }
.bd-variation-value.positive { color: #2e7d32; font-weight: 500; }
.bd-variation-value.neutral { color: #8B90A3; }

.bd-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
}
.bd-status-pill.within {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}
.bd-status-pill.over {
    background: rgba(220, 41, 30, 0.1);
    color: #DC291E;
    border: 1px solid rgba(220, 41, 30, 0.25);
}

.bd-progress-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.bd-progress-track {
    flex: 1 1;
    height: 6px;
    background: #F0F2F8;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}
.bd-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 3px;
}
.bd-progress-fill.good { background: linear-gradient(90deg, #2e7d32, #66BB6A); }
.bd-progress-fill.normal { background: linear-gradient(90deg, #471FCC, #6B3FE8); }
.bd-progress-fill.warning { background: linear-gradient(90deg, #E07817, #FFB347); }
.bd-progress-fill.over { background: linear-gradient(90deg, #DC291E, #FF5C5C); }
.bd-progress-percent {
    font-size: 11px;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: right;
}
.bd-progress-percent.good { color: #2e7d32; }
.bd-progress-percent.normal { color: #471FCC; }
.bd-progress-percent.warning { color: #E07817; }
.bd-progress-percent.over { color: #DC291E; }

.bd-sparkline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}
.bd-sparkline-percent {
    font-size: 11px;
    font-weight: 500;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   RevoGrid override (mant\u00e9m visual da tabela legada)
   ============================================================ */
.bd-revogrid {
    font-family: 'Ubuntu', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #2E1956;
    cursor: pointer;
}
.bd-revogrid revogr-header {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6B7280;
    background: #FAFBFD;
}
.bd-revogrid .rgRow:hover {
    background: #F5F7FB !important;
}
.bd-revogrid .rgRow.bd-row-over .rgCell:first-child {
    box-shadow: inset 3px 0 0 0 #E53935;
}
.bd-revogrid .rgCell.bd-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
}
.bd-revogrid .rgCell.bd-cell-right {
    justify-content: flex-end;
}
.bd-revogrid .rgCell.bd-cell-center {
    justify-content: center;
}


/* Status pill mais compacto dentro do RevoGrid */
.bd-revogrid .bd-status-pill {
    padding: 1px 8px;
    font-size: 11px;
    line-height: 16px;
    border-radius: 10px;
    border-width: 0;
    gap: 4px;
    white-space: nowrap;
}
.bd-revogrid .bd-status-pill svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}
.bd-revogrid .rgRow {
    line-height: 1;
}


/* Wrapper da tabela: ocupa 100% da altura do card e mede largura para colunas flex */
.bd-revogrid-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bd-revogrid-wrap > revo-grid,
.bd-revogrid-wrap > .bd-revogrid {
    flex: 1 1 auto;
    min-height: 0;
}


/* Garante que LcLoading e wrapper preencham o card sem extrapolar —
   overflow hidden apenas no card da tabela (que contém .bd-revogrid-wrap),
   não no card do filter bar. */
.bd-card-flush .card-content-body,
.bd-card-flush .card-content-body-content {
    min-height: 0;
}
.bd-card-flush:has(.bd-revogrid-wrap) .card-content-body,
.bd-card-flush:has(.bd-revogrid-wrap) .card-content-body-content {
    overflow: hidden;
}
.bd-card-flush .lc-loading,
.bd-card-flush .lc-loading-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.bd-revogrid-wrap revo-grid {
    display: block;
    width: 100%;
    height: 100% !important;
    min-height: 0;
}


/* KPI cards precisam de altura minima para nao cortar conteudo.
   Override do grid-template-rows do LCDashboard para esta pagina:
   row 1 = filter bar (auto), rows 2-3 = KPIs (auto), rows 4-12 = tabela (1fr). */
.budget-drilldown .lcdashboard-cards-panel-body {
    grid-template-rows: auto auto auto 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr !important;
}
.bd-card-kpi .card-frame {
    min-height: 80px;
    overflow: visible;
}
.bd-card-kpi .card-content-body,
.bd-card-kpi .card-content-body-content {
    overflow: visible !important;
}

.budget-drilldown {
    width: 100%;
    height: 100%;
}


/* ===== Column Config Panel (popover) ===== */
.bd-col-config-panel {
    position: fixed;
    z-index: 1200;
    width: 320px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(46, 25, 86, 0.18), 0 2px 8px rgba(0,0,0,0.08);
    font-family: "Ubuntu", sans-serif;
    overflow: hidden;
}
.bd-col-config-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2E1956;
    border-bottom: 1px solid #F0F2F8;
}
.bd-col-config-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #8B90A3;
    padding: 2px;
    border-radius: 4px;
}
.bd-col-config-close:hover { color: #2E1956; background: #F0F2F8; }
.bd-col-config-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    max-height: 360px;
    overflow-y: auto;
}
.bd-col-config-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    color: #2E1956;
    transition: background 0.1s;
}
.bd-col-config-item:hover { background: #F5F7FB; }
.bd-col-config-item.hidden { color: #C5CAE0; }
.bd-col-config-item.fixed { opacity: 0.5; }
.bd-col-config-vis {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
.bd-col-config-vis:disabled { cursor: default; }
.bd-col-config-vis:hover:not(:disabled) { background: #EDE8FF; }
.bd-col-config-label {
    flex: 1 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bd-col-config-arrows {
    display: flex;
    gap: 2px;
}
.bd-col-config-arrows button {
    background: none;
    border: none;
    cursor: pointer;
    color: #8B90A3;
    padding: 2px;
    border-radius: 3px;
    display: flex;
    align-items: center;
}
.bd-col-config-arrows button:hover:not(:disabled) { background: #EDE8FF; color: #471FCC; }
.bd-col-config-arrows button:disabled { color: #E0E2EE; cursor: default; }
.bd-col-config-footer {
    border-top: 1px solid #F0F2F8;
    padding: 0.5rem 1rem;
    text-align: center;
}
.bd-col-config-reset {
    background: none;
    border: 1px solid #E0E2EE;
    border-radius: 6px;
    padding: 0.3rem 1rem;
    font-size: 0.72rem;
    color: #471FCC;
    cursor: pointer;
    font-family: inherit;
}
.bd-col-config-reset:hover { background: #F5F0FF; border-color: #471FCC; }

