/**
 * ESTILOS DO MODAL DE CONFIGURAÇÃO DE EXPORTAÇÃO
 */

.export-config-modal {
    padding: 10px 0;
}

.export-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 30px;
    gap: 30px;
    margin-bottom: 20px;
}

.export-config-column {
    display: flex;
    flex-direction: column;
}

.export-config-section {
    margin-bottom: 20px;
}

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

.export-config-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2B304F;
    margin: 0 0 8px 0;
}

.export-config-description {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.export-config-checkbox {
    margin-top: 16px;
}

.export-config-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #2B304F;
}

.export-config-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.export-config-checkbox span {
    -webkit-user-select: none;
    user-select: none;
}

/* Informação sobre formato selecionado */
.export-format-info {
    margin-top: 12px;
    padding: 10px 12px;
    background-color: #f0f7ff;
    border-left: 3px solid #1976d2;
    border-radius: 4px;
}

.export-format-info small {
    color: #333;
    line-height: 1.5;
    display: block;
}

.export-format-info strong {
    color: #1976d2;
}

.export-config-info {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    border-top: 2px solid #EBEBEB;
}

.export-config-info p {
    margin: 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.export-config-info strong {
    color: #1F2937;
    font-weight: 600;
    margin-left: 4px;
}


/* Estilos para o painel de configura��o do Perspective */

.finops-perspective-dashboard .right-sidepanel {
    background: #fafafa;
    box-shadow: -10px 0 18px 0px rgba(58, 79, 135, 0.15);
    max-height: calc(100% + 1.5rem);
    grid-column-end: 13;
    grid-row-start: 1;
    grid-row-end: 1;
    z-index: 9;
     
    /* O conteudo (.right-sidepanel-content) tem min-width: 400px; com padding
       de 1rem em cada lado, o painel precisa de >= 432px. Sem isto, quando
       fixado o grid resolve width:25% para ~119px e o formulario transborda
       para fora do fundo colorido (form desalinhado / fundo ocupando so parte). */
  
    box-sizing: border-box;
    position: fixed;
    right: 0;
    padding: 1rem;
    margin-top: -0.75rem;
}

.finops-perspective-dashboard .right-sidepanel.pinned {
    position: relative;
   
}

.finops-perspective-dashboard .right-sidepanel.focused {
    position: fixed !important;
    top: 90px;
    width: 100%;
    left: 0;
    height: calc(100vh - 80px);
}

/* T�tulo do painel */
.finops-perspective-dashboard .right-sidepanel .title-sidebar {
    color: var(--text-dark);
    font-family: "Ubuntu", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    line-height: 160%;
}

/* Itens da lista de views */
.finops-perspective-dashboard .config-panel-item {
    font-size: 12px;
    height: 38px;
    width: 100%;
    padding-left: 10px;
    padding-right: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.finops-perspective-dashboard .config-panel-item:hover {
    background-color: #EBEBEB !important;
}

.finops-perspective-dashboard .config-panel-item.selected {
    border: 1px solid #FFBE15;
}

/* Bot�es de a��o nos itens */
.finops-perspective-dashboard .config-panel-item .functions {
    display: none;
    gap: 0.25rem;
}

.finops-perspective-dashboard .config-panel-item:hover .functions {
    display: flex;
}

/* Bot�o de reset */
.finops-perspective-dashboard .config-panel-reset {
    display: flex;
    font-size: 12.8px;
    font-family: "Ubuntu", sans-serif;
    color: #2E1956;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.finops-perspective-dashboard .config-panel-reset:hover {
    background-color: #EBEBEB;
}

/* Scrollbar customizada */
.finops-perspective-dashboard .scrollable-v::-webkit-scrollbar {
    width: 8px;
    height: 0;
}

.finops-perspective-dashboard .scrollable-v::-webkit-scrollbar-thumb {
    background: #cccccf;
    height: 8px;
    border-radius: 4px;
}

.finops-perspective-dashboard .scrollable-v::-webkit-scrollbar-thumb:hover {
    background: #ddd;
}

.finops-perspective-dashboard .scrollable-v::-webkit-scrollbar-track {
    border-radius: 4px;
}

/* Labels de view */
.finops-perspective-dashboard .view-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

/* Formul�rio de nova view */
.finops-perspective-dashboard .new-view-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

/* Ajustes para Material-UI components */
.finops-perspective-dashboard .MuiTextField-root {
    margin: 0 !important;
}

.finops-perspective-dashboard .MuiButton-root {
    text-transform: none;
}

/* Separadores */
.finops-perspective-dashboard hr {
    border: none;
    border-top: 1px solid #E2E6F3;
    margin: 0.5rem 0;
}
/**
 * CSS específico para o FinOps Analytics Dashboard com Perspective
 */

.finops-perspective-dashboard {
    height: 100%;
    width: 100%;
}

.finops-perspective-dashboard .card-frame {
    height: 100%;
}

.finops-perspective-dashboard .card-content-body {
    height: 100%;
}

.finops-perspective-dashboard .card-content-body-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Estilo para o card de informa??es da view */
.finops-perspective-dashboard .view-info-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Estilo para a lista de views com scroll */
.view-list {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Estilo para o card principal do Perspective */
.finops-perspective-dashboard .perspective-main-card {
    height: 100%;
    overflow: hidden;
}

.finops-perspective-dashboard .perspective-main-card>div {
    height: 100%;
}

/* Garantir que o perspective-viewer ocupe toda a altura dispon?vel */
.finops-perspective-dashboard perspective-viewer {
    height: 100% !important;
    width: 100% !important;
}

/* Ajustes para o loading sobreposto */
.finops-perspective-dashboard .lc-loading-container {
    height: 100%;
}

/* Garantir que o container principal tenha posi??o relativa */
.finops-perspective-dashboard {
    position: relative;
}

/* Estilo para o loading sobreposto */
.finops-perspective-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

/* Garantir que o Perspective n?o seja afetado pelo loading */
.finops-perspective-dashboard .perspective-main-card perspective-viewer {
    pointer-events: auto;
}
/* FinOps Perspective Components Styles */

/* Container principal */
.finops-perspective-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

/* ===== Z-INDEX MANAGEMENT ===== */

/* Garantir que split-panel-child sempre tenha z-index: 2 */
.split-panel-child {
  z-index: 2 !important;
}

/* Seletores específicos para diferentes contextos */
perspective-viewer .split-panel-child,
.perspective-viewer .split-panel-child,
.finops-perspective-container .split-panel-child,
.perspective-viewer-container .split-panel-child {
  z-index: 2 !important;
}

/* Elementos filhos dentro de split-panel-child */
.split-panel-child > *,
.split-panel-child .perspective-viewer,
.split-panel-child perspective-viewer {
  z-index: inherit;
}

/* Split panel principal com z-index menor */
.split-panel {
  z-index: 1 !important;
}

/* Settings panel com z-index menor */
#settings_panel {
  z-index: 1 !important;
}

/* ===== REGRAS ADICIONAIS PARA GARANTIR Z-INDEX: 2 ===== */

/* Seletores por atributo e classe */
[class*="split-panel-child"],
[class^="split-panel-child"],
[class$="split-panel-child"] {
  z-index: 2 !important;
}

/* Seletores por ID (caso existam) */
#split-panel-child,
[id*="split-panel-child"] {
  z-index: 2 !important;
}

/* Contextos específicos do Perspective FINOS */
perspective-viewer-datagrid .split-panel-child,
perspective-viewer-d3fc .split-panel-child,
perspective-viewer-openlayers .split-panel-child {
  z-index: 2 !important;
}

/* Elementos dentro de containers específicos */
.perspective-container .split-panel-child,
.pivot-container .split-panel-child,
.dashboard-container .split-panel-child {
  z-index: 2 !important;
}

/* Regra universal para qualquer elemento com split-panel-child */
*[class*="split-panel-child"] {
  z-index: 2 !important;
}

.finops-perspective-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Toolbar styles */
.perspective-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  gap: 8px;
  min-height: 40px;
}

.perspective-toolbar .toolbar-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perspective-toolbar .toolbar-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-right: auto;
}

.perspective-toolbar .record-count {
  font-size: 12px;
  color: #666;
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Perspective viewer customizations */
perspective-viewer {
  --plugin--background: #ffffff;
  --active--color: #1976d2;
  --inactive--color: #666666;
  --plugin--border: #e0e0e0;
  --select--background: #f5f5f5;
  --column--background: #fafafa;
  --row--background: #ffffff;
  --cell--background: #ffffff;
  --cell--color: #333333;
  --header--background: #f8f9fa;
  --header--color: #333333;
  --header--border: #e0e0e0;
  --button--background: #ffffff;
  --button--border: #d0d7de;
  --button--color: #24292f;
  --button--hover--background: #f3f4f6;
  --button--active--background: #e9ecef;
}

/* Tema escuro (opcional) */
perspective-viewer[theme="Pro Dark"] {
  --plugin--background: #1e1e1e;
  --active--color: #90caf9;
  --inactive--color: #999999;
  --plugin--border: #333333;
  --select--background: #2d2d2d;
  --column--background: #252525;
  --row--background: #1e1e1e;
  --cell--background: #1e1e1e;
  --cell--color: #ffffff;
  --header--background: #2d2d2d;
  --header--color: #ffffff;
  --header--border: #333333;
}

/* Configura��es espec�ficas para FinOps */
perspective-viewer .perspective-viewer-datagrid-container {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
}

perspective-viewer .perspective-viewer-datagrid-container th {
  background-color: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding: 8px 12px;
  text-align: left;
}

perspective-viewer .perspective-viewer-datagrid-container td {
  padding: 6px 12px;
  border-bottom: 1px solid #e9ecef;
}

/* Formata��o de n�meros */
perspective-viewer .perspective-viewer-datagrid-container td[data-type="float"],
perspective-viewer .perspective-viewer-datagrid-container td[data-type="integer"] {
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

/* Cores para valores negativos */
perspective-viewer .perspective-viewer-datagrid-container td[data-type="float"]:has-text("-"),
perspective-viewer .perspective-viewer-datagrid-container td[data-type="integer"]:has-text("-") {
  color: #dc3545;
}

/* Cores para valores positivos altos */
perspective-viewer .perspective-viewer-datagrid-container td[data-type="float"][data-value-high],
perspective-viewer .perspective-viewer-datagrid-container td[data-type="integer"][data-value-high] {
  color: #28a745;
  font-weight: 600;
}

/* Panel de views salvas */
.perspective-views-panel {
  position: absolute;
  top: 50px;
  right: 16px;
  width: 320px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
  z-index: 1000;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.perspective-views-panel-header {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.perspective-views-panel-header h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #24292f;
}

.perspective-views-panel-save {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.perspective-views-panel-save input {
  flex: 1 1;
  padding: 6px 12px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
}

.perspective-views-panel-save input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.perspective-views-panel-list {
  flex: 1 1;
  overflow-y: auto;
  padding: 8px;
}

.perspective-view-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f1f3f4;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.perspective-view-item:hover {
  background-color: #f8f9fa;
}

.perspective-view-item:last-child {
  border-bottom: none;
}

.perspective-view-item-name {
  flex: 1 1;
  font-size: 14px;
  color: #24292f;
  font-weight: 500;
}

.perspective-view-item-actions {
  display: flex;
  gap: 4px;
}

.perspective-view-item-meta {
  font-size: 12px;
  color: #656d76;
  margin-top: 4px;
}

/* Estados de loading */
.perspective-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #666;
  font-size: 14px;
}

.perspective-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #666;
  font-size: 16px;
}

.perspective-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #dc3545;
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

.perspective-error button {
  margin-top: 16px;
  padding: 8px 16px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.perspective-error button:hover {
  background: #1565c0;
}

/* Responsividade */
@media (max-width: 768px) {
  .perspective-views-panel {
    width: 280px;
    right: 8px;
  }

  .perspective-toolbar {
    padding: 6px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .perspective-toolbar .toolbar-title {
    font-size: 13px;
  }

  .perspective-toolbar .record-count {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .perspective-views-panel {
    width: calc(100vw - 16px);
    right: 8px;
    left: 8px;
  }

  .finops-perspective-container {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Anima��es */
.perspective-views-panel {
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.perspective-view-item {
  transition: all 0.2s ease;
}

.perspective-view-item:hover {
  transform: translateX(2px);
}

/* Customiza��es para gr�ficos */
perspective-viewer[plugin="d3_bar"] .chart-container,
perspective-viewer[plugin="d3_line"] .chart-container,
perspective-viewer[plugin="d3_area"] .chart-container {
  background: #ffffff;
}

/* Scrollbars customizadas */
.perspective-views-panel-list::-webkit-scrollbar {
  width: 6px;
}

.perspective-views-panel-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.perspective-views-panel-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.perspective-views-panel-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ===== CUSTOMIZAÇÃO DO LOADING DO PERSPECTIVE PIVOT ===== */

/* Personalizar cores do loading Orbit */
.perspective-pivot-loading .container-orbit {
  --uib-color: #2563eb; /* Azul moderno */
  --uib-size: 32px; /* Tamanho maior */
  --uib-speed: 1.2s; /* Velocidade mais rápida */
}

/* Personalizar cores do loading Helix */
.perspective-pivot-loading .container-helix {
  --uib-color: #059669; /* Verde esmeralda */
  --uib-size: 50px; /* Tamanho maior */
  --uib-speed: 2s; /* Velocidade personalizada */
}

/* Estilo do overlay de loading */
.perspective-pivot-loading {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Personalizar texto do loading */
.perspective-pivot-loading .title-loading {
  color: #374151;
  font-weight: 500;
  font-size: 16px;
  margin-top: 16px;
}

/* Animação de entrada suave */
.perspective-pivot-loading {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Variações de cores por tema */
.perspective-pivot-loading.theme-financial {
  --uib-color: #dc2626; /* Vermelho financeiro */
}

.perspective-pivot-loading.theme-success {
  --uib-color: #16a34a; /* Verde sucesso */
}

.perspective-pivot-loading.theme-warning {
  --uib-color: #ea580c; /* Laranja aviso */
}

.perspective-pivot-loading.theme-info {
  --uib-color: #0ea5e9; /* Azul informação */
}

/* ===== GARANTIR QUE MENU-BAR SEMPRE SEJA OCULTO ===== */

/* Ocultar menu-bar em todos os contextos especificados */
:host #main_column #status_bar #menu-bar,
:host #main_column #status_bar.titled #menu-bar {
  display: none !important;
}

/* ===== GARANTIR Z-INDEX DO SETTINGS PANEL ===== */

/* Forçar z-index do settings panel para sempre ser 1 */
:host {
  --settings-panel-z-index: 1 !important;
}

/* ===== CORREÇÕES PARA ERROS DE SVG/D3FC ===== */

/* Ocultar elementos SVG com transformações inválidas */
perspective-viewer g[transform*="NaN"],
perspective-viewer g[transform*="translate(0, NaN)"] {
  display: none !important;
}

/* Garantir que elementos SVG tenham valores válidos */
perspective-viewer svg g {
  transform: translate(0, 0) !important;
}

/* Corrigir problemas de renderização em gráficos D3FC */
perspective-viewer d3fc-svg,
perspective-viewer d3fc-canvas {
  overflow: hidden;
}

/* Prevenir erros de coordenadas inválidas */
perspective-viewer .d3fc-axis {
  transform: translate(0, 0) !important;
}

/* Ocultar elementos com valores NaN */
perspective-viewer [transform*="NaN"] {
  visibility: hidden !important;
}
.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);
    }
}


