.page-title {
  background-color: #374151; /* cinza escuro */
  color: white;
  text-align: center;
  font-weight: 700;
  padding: 0.75rem 0;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.zebra-row:nth-child(even) {
  background-color: #f9fafb;
}
.zebra-row:nth-child(odd) {
  background-color: #ffffff;
}

.parcela-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0;
}

.parcela-editada {
  position: relative;
}

.parcela-editada::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #3b82f6; /* azul */
}

.cycle-title {
  background-color: #374151; /* cinza escuro */
  color: white;
  text-align: center;
  font-weight: 700;
  padding: 0.5rem 0;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  margin: -1rem -1rem 1rem -1rem; /* Estende até as bordas do container */
}
.cycle-title .toggle-icon {
  position: absolute;
  right: 1rem;
}
.cycle-container {
  border: 2px solid #374151;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 2rem;
  overflow: hidden;
}
.cycle-content {
  transition: max-height 0.3s ease-out;
  max-height: 1000px;
  overflow: hidden;
}
.cycle-content.collapsed {
  max-height: 0;
}
.cycle-summary {
  display: none;
  grid-template-columns: auto 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
  padding: 0.5rem;
  background-color: #f3f4f6;
  border-radius: 0.25rem;
}
.cycle-summary.visible {
  display: grid;
}
.cycle-summary .summary-label {
  text-align: center;
}
.cycle-summary .summary-anual,
.cycle-summary .summary-maximo {
  text-align: right;
}
.toggle-all-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.toggle-all-button {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toggle-all-button.open {
  background-color: #10b981; /* verde */
  color: white;
}
.toggle-all-button.close {
  background-color: #ef4444; /* vermelho */
  color: white;
}
.analise-sintetica {
  border: 2px solid #374151;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.analise-sintetica h2 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #374151;
  text-align: center;
}
.analise-sintetica .linha {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.5rem 0;
}
.analise-sintetica .linha.zebra:nth-child(even) {
  background-color: #f9fafb;
}
.analise-sintetica .linha.zebra:nth-child(odd) {
  background-color: #ffffff;
}
.analise-sintetica .titulo {
  text-align: left;
  font-weight: 600;
  padding-left: 0.5rem;
}
.analise-sintetica .valor {
  text-align: right;
  padding-right: 0.5rem;
  font-family: monospace;
}
label.dynamic-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.grafico-container {
  border: 2px solid #374151;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.grafico-container h2 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #374151;
  text-align: center;
}

/* Estilos para a tabela de parcelas */
.tabela-parcelas {
  width: 100%;
}

.tabela-header {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  font-weight: bold;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.tabela-header .parcela-num {
  text-align: center;
  padding: 0 0.5rem;
}

.tabela-header .valor-col {
  text-align: right;
  padding: 0 0.5rem;
}

.parcela-num {
  text-align: center;
  padding: 0 0.5rem;
  min-width: 3rem;
}

.valor-col {
  text-align: right;
  padding: 0 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.valor-col:hover {
  background-color: #e5e7eb;
}

.copy-icon {
  width: 30px;
  text-align: center;
  cursor: pointer;
  color: #3b82f6;
  transition: color 0.2s;
}

.copy-icon:hover {
  color: #1d4ed8;
}

.tabela-footer {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  border-top: 2px solid #e5e7eb;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  font-weight: bold;
}

.tabela-footer .total-label {
  padding: 0 0.5rem;
}

.tabela-footer .total-anual,
.tabela-footer .total-maximo {
  text-align: right;
  padding: 0 0.5rem;
}

.btn-outline {
  background-color: white;
  border: 1px solid #3b82f6;
  color: #3b82f6;
  transition: all 0.2s;
}

.btn-outline:hover {
  background-color: #eff6ff;
}

/* Estilos para destaques na análise sintética */
.destaque-positivo {
  background-color: #d1fae5 !important; /* verde claro */
}

.destaque-positivo .valor {
  color: #047857; /* verde escuro */
}

.destaque-negativo {
  background-color: #fee2e2 !important; /* vermelho claro */
}

.destaque-negativo .valor {
  color: #b91c1c; /* vermelho escuro */
}

/* Ajustes para telas pequenas */
@media (max-width: 640px) {
  .tabela-parcelas {
    font-size: 0.875rem;
  }
  
  .parcela-num {
    min-width: 2.5rem;
  }
}
