/* Reset básico para remover margens e paddings padrão */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilo geral do corpo */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to bottom right, #000000, #2739b1); /* Degradê de preto para azul */
  color: #333;
  min-height: 100vh; /* Garante que o fundo cubra toda a altura da página */
}

/* Overlay para escurecer a página */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* 40% de opacidade */
  z-index: 9999;
}

.overlay.active {
  display: block;
}

/* Container para os botões no topo */
.top-buttons {
  position: fixed;
  top: 10px; /* Reduced from 20px */
  right: 10px; /* Reduced from 20px */
  display: flex;
  flex-direction: column; /* Alinhamento vertical */
  gap: 6px; /* Reduced from 10px */
  z-index: 1000;
}

.top-buttons button {
  width: 80px; /* Reduced from 100px */
  padding: 6px; /* Reduced from 10px */
  background: #007bff;
  border: none;
  border-radius: 4px; /* Reduced from 6px */
  color: #ffffff;
  font-size: 0.8rem; /* Reduced from 0.9rem */
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  text-align: center;
}

.top-buttons button:hover {
  background: #0056b3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Estilo do cabeçalho */
header {
  background: url('https://rendaok.com.br/header.png') no-repeat center center;
  background-size: cover;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 15px; /* Reduced from -10px 20px */
  text-align: center;
  position: relative;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

header h1 {
  font-size: 2rem; /* Reduced from 2.5rem */
  margin-bottom: 8px; /* Reduced from 10px */
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

header p {
  font-size: 0.95rem; /* Reduced from 1.1rem */
  color: #ddd;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

/* Container principal */
.container {
  max-width: 1200px;
  margin: 20px auto; /* Reduced from 30px */
  background: #ffffff;
  padding: 20px; /* Reduced from 40px */
  border-radius: 8px; /* Reduced from 12px */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grupo de inputs */
.input-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* Reduced from 20px */
  margin-bottom: 20px; /* Reduced from 30px */
}

@media (max-width: 768px) {
  .input-group {
    grid-template-columns: 1fr;
    gap: 10px; /* Reduced from 15px */
  }
}

.input-field {
  flex: 1 1 200px; /* Reduced from 250px */
  position: relative;
}

.input-field label {
  display: block;
  margin-bottom: 6px; /* Reduced from 8px */
  font-weight: 600;
  color: #495057;
}

.input-field input {
  width: 100%;
  padding: 8px; /* Reduced from 12px */
  border: 1px solid #ced4da;
  border-radius: 4px; /* Reduced from 6px */
  font-size: 0.9rem; /* Reduced from 1rem */
  color: #495057;
  background: #ffffff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.conversion {
  font-size: 0.7rem; /* Reduced from 0.8rem */
  color: #6c757d;
  position: absolute;
  top: 55%;
  left: 55%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  
}
/* Ajuste específico para o campo Período */
.periodo-ajuste {
  top: 75%; /* ou ajuste conforme necessário: 74%, 76%, etc. */
}
/* Botões */
button {
  padding: 8px 15px; /* Reduced from 12px 20px */
  background: #007bff;
  border: none;
  border-radius: 4px; /* Reduced from 6px */
  color: #ffffff;
  font-size: 0.9rem; /* Reduced from 1rem */
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

button:hover {
  background: #0056b3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-full {
  width: 100%;
  padding: 12px; /* Reduced from 15px */
  background: #007bff;
  border: none;
  border-radius: 4px; /* Reduced from 6px */
  color: #ffffff;
  font-size: 1rem; /* Reduced from 1.2rem */
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px; /* Reduced from 15px */
  transition: background 0.3s, box-shadow 0.3s;
}

.btn-full:hover {
  background: #0056b3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Seções de aportes e saques */
.adicionais-section, .modificacoes-section, .saques-unicos-section, .saques-mensais-section {
  margin: 20px 0; /* Reduced from 30px */
  padding: 15px; /* Reduced from 20px */
  border: 1px solid #e0e0e0;
  border-radius: 6px; /* Reduced from 8px */
  background: #fafafa;
}

.adicionais-section h2, .modificacoes-section h2, .saques-unicos-section h2, .saques-mensais-section h2 {
  font-size: 1.3rem; /* Reduced from 1.5rem */
  margin-bottom: 10px; /* Reduced from 15px */
  color: #007bff;
}

.adicionais-group, .modificacoes-group, .saques-unicos-group, .saques-mensais-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Reduced from 20px */
  margin-bottom: 10px; /* Reduced from 15px */
}

.adicionais-group .input-field, .modificacoes-group .input-field,
.saques-unicos-group .input-field, .saques-mensais-group .input-field {
  flex: 1 1 180px; /* Reduced from 220px */
}

/* Títulos das seções */
.section-title {
  margin: 30px 0 15px; /* Reduced from 40px 0 20px */
  font-size: 1.5rem; /* Reduced from 1.8rem */
  font-weight: 600;
  text-align: center;
  color: #007bff;
}

/* Container do gráfico */
.chart-container {
  margin: 20px 0; /* Reduced from 30px */
  position: relative;
  background: #ffffff;
  padding: 15px; /* Reduced from 25px */
  border-radius: 8px; /* Reduced from 12px */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
}

/* Estilo do botão Congelar/Limpar Congelamento */
.freeze-btn {
  position: absolute;
  bottom: 8px; /* Reduced from 10px */
  left: 8px; /* Reduced from 10px */
  padding: 6px 10px; /* Reduced from 8px 12px */
  background: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 4px; /* Reduced from 6px */
  font-size: 0.8rem; /* Reduced from 0.9rem */
  cursor: pointer;
  transition: background 0.3s;
  display: inline-block;
  position: relative;
}

.freeze-btn:hover {
  background: #0056b3;
}

.dark-mode .freeze-btn {
  background: #007bff;
  color: #ffffff;
}

.dark-mode .freeze-btn:hover {
  background: #0056b3;
}

/* Estilo do ícone de ajuda (?) */
.freeze-btn .help-icon {
  position: absolute;
  top: 50%;
  right: -18px; /* Adjusted from -20px */
  transform: translateY(-50%);
  font-size: 12px; /* Reduced from 14px */
  cursor: pointer;
  color: #ffffff;
}

.dark-mode .freeze-btn .help-icon {
  color: #ffffff;
}

/* Estilo do contêiner da tabela */
#table-container {
  position: relative;
  margin-bottom: 15px; /* Reduced from 20px */
}

/* Estilo do cabeçalho fixo */
#sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: calc(1200px - 60px); /* Adjusted from 80px */
  background: #007bff;
  z-index: 1000;
  display: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
  opacity: 0;
  transform: translateY(-10px);
}

#sticky-header.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#sticky-header table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  border-radius: 6px 6px 0 0; /* Reduced from 8px */
  overflow: hidden;
  background: #007bff;
}

#sticky-header th {
  background: #007bff;
  color: #ffffff;
  font-weight: 600;
  padding: 8px; /* Reduced from 12px */
  text-align: center;
  font-size: 0.85rem; /* Reduced from 0.95rem */
  border: 1px solid #dee2e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 60px; /* Reduced from 80px */
}

/* Estilo da tabela principal */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px; /* Reduced from 30px */
  border-radius: 6px; /* Reduced from 8px */
  overflow: hidden;
}

table th, table td {
  border: 1px solid #dee2e6;
  padding: 8px; /* Reduced from 12px */
  text-align: center;
  font-size: 0.85rem; /* Reduced from 0.95rem */
}

table th {
  background: #007bff;
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 60px; /* Reduced from 80px */
}

table tr:nth-child(even) {
  background-color: #f8f9fa;
}

table tr.achievement-green {
  background-color: #d4edda !important;
  color: #155724 !important;
}

table tr.achievement-red {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

.conquista-positiva {
  color: #155724;
}

.conquista-negativa {
  color: #721c24;
}

/* Disclaimer e Metodologia */
.disclaimer, .metodologia {
  margin-top: 30px; /* Reduced from 40px */
  font-size: 0.8rem; /* Reduced from 0.9rem */
  line-height: 1.5; /* Reduced from 1.6 */
  padding: 15px; /* Reduced from 20px */
  border-radius: 6px; /* Reduced from 8px */
  background: #e9ecef;
  color: #495057;
}

.disclaimer {
  border: 1px solid #ced4da;
}

.metodologia {
  border: 1px solid #ced4da;
}

/* Modo escuro */
.dark-mode {
  background: linear-gradient(to bottom right, #000000, #1a2a6c);
  color: #e0e0e0;
}

.dark-mode header {
  background: url('https://rendaok.com.br/header.png') no-repeat center center;
  background-size: cover;
  border-bottom: 1px solid #444;
}

.dark-mode header h1 {
  color: #fff;
}

.dark-mode header p {
  color: #ddd;
}

.dark-mode .container {
  background-color: #2c2e33;
  border: 1px solid #444;
  color: #e0e0e0;
}

.dark-mode .input-field label {
  color: #adb5bd;
}

.dark-mode .input-field input {
  background-color: #3a3d42;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .input-field input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dark-mode button {
  background: #007bff;
  color: #ffffff;
}

.dark-mode button:hover {
  background: #0056b3;
}

.dark-mode .btn-full {
  background: #007bff;
  color: #ffffff;
}

.dark-mode .btn-full:hover {
  background: #0056b3;
}

.dark-mode .adicionais-section, .dark-mode .modificacoes-section, 
.dark-mode .saques-unicos-section, .dark-mode .saques-mensais-section {
  background: #3a3d42;
  border-color: #555;
}

.dark-mode .adicionais-section h2, .dark-mode .modificacoes-section h2,
.dark-mode .saques-unicos-section h2, .dark-mode .saques-mensais-section h2 {
  color: #007bff;
}

.dark-mode .section-title {
  color: #007bff;
}

.dark-mode .chart-container {
  background: #3a3d42;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark-mode table {
  background-color: #2c2e33;
  color: #e0e0e0;
}

.dark-mode table th {
  background: #007bff;
  color: #ffffff;
}

.dark-mode table tr:nth-child(even) {
  background-color: #3a3d42;
}

.dark-mode table tr.achievement-green {
  background-color: #155724 !important;
  color: #d4edda !important;
}

.dark-mode table tr.achievement-red {
  background-color: #721c24 !important;
  color: #f8d7da !important;
}

.dark-mode .conquista-positiva {
  color: #d4edda;
}

.dark-mode .conquista-negativa {
  color: #f8d7da;
}

.dark-mode .disclaimer, .dark-mode .metodologia {
  background: #3a3d42;
  color: #adb5bd;
  border-color: #555;
}

.dark-mode #sticky-header {
  background: #007bff;
}

.dark-mode #sticky-header th {
  background: #007bff;
  color: #ffffff;
}

/* Legenda do gráfico */
.chart-legend {
  text-align: center;
  font-size: 0.85rem; /* Reduced from 0.95rem */
  color: #6c757d;
  margin-top: 15px; /* Reduced from 20px */
  font-style: italic;
}

/* Tooltip personalizado */
.custom-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px; /* Reduced from 8px 12px */
  border-radius: 4px; /* Reduced from 6px */
  z-index: 1000;
  font-size: 0.8rem; /* Reduced from 0.9rem */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-tooltip .tooltip-item {
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced from 8px */
  margin-bottom: 3px; /* Reduced from 4px */
}

.custom-tooltip .tooltip-item:last-child {
  margin-bottom: 0;
}

.custom-tooltip .tooltip-circle {
  width: 8px; /* Reduced from 10px */
  height: 8px; /* Reduced from 10px */
  border-radius: 50%;
}

.dark-mode .custom-tooltip {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

#customTooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px; /* Reduced from 8px 12px */
  border-radius: 4px; /* Reduced from 6px */
  z-index: 1000;
  font-size: 0.8rem; /* Reduced from 0.9rem */
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode #customTooltip {
  background: rgba(255, 255, 255, 0.9);
  color: #1c1e22;
}

/* Marcadores de eventos no gráfico */
.chart-event-marker {
  position: absolute;
  width: 0;
  height: 0;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chart-event-marker.arrow-up {
  border-left: 6px solid transparent; /* Reduced from 7px */
  border-right: 6px solid transparent; /* Reduced from 7px */
  border-bottom: 8px solid #44ff44; /* Reduced from 10px */
}

.chart-event-marker.arrow-down {
  border-left: 6px solid transparent; /* Reduced from 7px */
  border-right: 6px solid transparent; /* Reduced from 7px */
  border-top: 8px solid #ff4444; /* Reduced from 10px */
}

.chart-event-marker:hover {
  transform: scale(1.2);
  opacity: 1;
}

.chart-event-marker:hover .event-tooltip {
  display: block;
}

.event-tooltip {
  display: none;
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 10px; /* Reduced from 8px 12px */
  border-radius: 4px; /* Reduced from 6px */
  white-space: nowrap;
  font-size: 0.8rem; /* Reduced from 0.85rem */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.arrow-up .event-tooltip {
  bottom: 12px; /* Reduced from 15px */
  left: 50%;
  transform: translateX(-50%);
}

.arrow-down .event-tooltip {
  top: 12px; /* Reduced from 15px */
  left: 50%;
  transform: translateX(-50%);
}

.event-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  margin-left: -4px; /* Reduced from 5px */
  border-width: 4px; /* Reduced from 5px */
  border-style: solid;
}

.arrow-up .event-tooltip::after {
  top: 100%;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.arrow-down .event-tooltip::after {
  bottom: 100%;
  border-color: transparent transparent rgba(0, 0, 0, 0.9) transparent;
}

.dark-mode .chart-legend {
  color: #adb5bd;
}

.dark-mode .event-tooltip {
  background: rgba(255, 255, 255, 0.9);
  color: #1c1e22;
}

.dark-mode .arrow-up .event-tooltip::after {
  border-color: rgba(255, 255, 255, 0.9) transparent transparent transparent;
}

.dark-mode .arrow-down .event-tooltip::after {
  border-color: transparent transparent rgba(255, 255, 255, 0.9) transparent;
}

/* Estilo para o ícone de interrogação */
.help-icon {
  display: inline-block;
  width: 14px; /* Reduced from 16px */
  height: 14px; /* Reduced from 16px */
  background: #007bff;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 10px; /* Reduced from 12px */
  line-height: 14px; /* Adjusted from 16px */
  margin-left: 4px; /* Reduced from 5px */
  cursor: pointer;
  vertical-align: middle;
}

/* Estilo para o tooltip de ajuda */
.help-tooltip {
  display: none;
  position: absolute;
  background: #fff;
  border: 2px solid #007bff;
  border-radius: 4px; /* Reduced from 6px */
  padding: 8px; /* Reduced from 10px */
  width: 350px; /* Reduced from 400px */
  max-width: 90vw;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  color: #333;
  font-size: 0.8rem; /* Reduced from 0.9rem */
}

.help-tooltip.active {
  display: block !important;
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

.help-tooltip .tooltip-text ul {
  margin: 0;
  padding-left: 15px; /* Reduced from 20px */
  list-style-type: disc;
}

.help-tooltip .tooltip-text li {
  margin-bottom: 6px; /* Reduced from 8px */
}

.help-tooltip .tooltip-text ul ul {
  padding-left: 15px; /* Reduced from 20px */
  list-style-type: circle;
}

/* Modo escuro */
.dark-mode .help-tooltip {
  background: #3a3d42;
  color: #e0e0e0;
  border-color: #007bff;
}

.dark-mode .help-tooltip .tutorial-controls button {
  background: #007bff;
  color: #fff;
}

.dark-mode .help-tooltip .tutorial-controls button:hover {
  background: #0056b3;
}

.help-tooltip .tooltip-text ul {
  margin: 0;
  padding-left: 15px; /* Reduced from 20px */
  list-style-type: disc;
}

.help-tooltip .tooltip-text li {
  margin-bottom: 6px; /* Reduced from 8px */
}

.help-tooltip .tooltip-text ul ul {
  padding-left: 15px; /* Reduced from 20px */
  list-style-type: circle;
}

/* Estilo para os botões do tutorial */
.tutorial-controls button {
  padding: 4px 8px; /* Reduced from 5px 10px */
  font-size: 0.7rem; /* Reduced from 0.8rem */
  margin: 0 4px; /* Reduced from 5px */
  min-width: 60px; /* Reduced from 70px */
  border: 1px solid #007bff;
  background: #007bff;
  color: #fff;
  border-radius: 3px; /* Reduced from 4px */
  cursor: pointer;
}

.tutorial-controls button:hover {
  background: #0056b3;
}

/* Modo escuro */
.dark-mode .tutorial-controls button {
  background: #0056b3;
  border-color: #0056b3;
}

.dark-mode .tutorial-controls button:hover {
  background: #003d82;
}

/* FAQ Section */
.faq-section {
  margin: 30px 0; /* Reduced from 40px */
  padding: 15px; /* Reduced from 20px */
  background: #ffffff;
  border-radius: 8px; /* Reduced from 12px */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
  font-size: 1.5rem; /* Reduced from 1.8rem */
  color: #007bff;
  text-align: center;
  margin-bottom: 15px; /* Reduced from 20px */
}

.faq-note {
  font-size: 0.8rem; /* Reduced from 0.9rem */
  line-height: 1.5; /* Reduced from 1.6 */
  background: #e9ecef;
  padding: 12px; /* Reduced from 15px */
  border-radius: 6px; /* Reduced from 8px */
  margin-bottom: 20px; /* Reduced from 25px */
  color: #495057;
}

.faq-item {
  margin-bottom: 10px; /* Reduced from 15px */
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 12px; /* Reduced from 15px */
  background: #f1f3f5;
  border: none;
  border-radius: 4px; /* Reduced from 6px */
  font-size: 1rem; /* Reduced from 1.1rem */
  color: #333;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}

.faq-question:hover {
  background: #e9ecef;
}

.faq-question::after {
  content: '\25BC';
  position: absolute;
  right: 12px; /* Reduced from 15px */
  font-size: 0.8rem; /* Reduced from 0.9rem */
  transition: transform 0.3s;
}

.faq-question.active::after {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 12px; /* Reduced from 15px */
  font-size: 0.9rem; /* Reduced from 1rem */
  line-height: 1.5; /* Reduced from 1.6 */
  color: #333;
  background: #fafafa;
  border-radius: 0 0 4px 4px; /* Reduced from 6px */
}

.faq-answer.active {
  display: block;
}

/* Modo escuro para FAQ */
.dark-mode .faq-section {
  background: #2c2e33;
  color: #e0e0e0;
}

.dark-mode .faq-section h2 {
  color: #007bff;
}

.dark-mode .faq-note {
  background: #3a3d42;
  color: #adb5bd;
}

.dark-mode .faq-question {
  background: #3a3d42;
  color: #e0e0e0;
}

.dark-mode .faq-question:hover {
  background: #454850;
}

.dark-mode .faq-answer {
  background: #35373c;
  color: #e0e0e0;
}

/* Estilo do rodapé */
footer {
  flex-shrink: 0;
  background: #000;
  padding: 15px; /* Reduced from 20px */
  text-align: center;
  border-top: 1px solid #333;
  color: #ccc;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

footer nav a {
  color: #4CAF50;
  margin: 0 8px; /* Reduced from 10px */
  text-decoration: none;
}

footer nav a:hover {
  text-decoration: underline;
}

/* Estilo para simulações de exemplo */
.simulacao-exemplo {
  background-color: #e6f7ff;
  border-left: 4px solid #1890ff;
}

/* Estilo para simulações de exemplo */
.simulacao-exemplo {
  border-left: 4px solid #1890ff !important;
  font-weight: 500 !important;
}

/* Cor de fundo para modo light */
body:not(.dark-mode) .simulacao-exemplo {
  background-color: #e6f7ff !important;
}

/* Cor de fundo para modo dark */
body.dark-mode .simulacao-exemplo {
  background-color: #153450 !important;
}

/* Estilo para destacar o gráfico quando uma simulação é carregada */
.highlight-container {
  animation: pulse-highlight 2s ease-in-out;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.8);
}

@keyframes pulse-highlight {
  0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
  50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
  100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
}

.dark-mode .highlight-container {
  animation: pulse-highlight-dark 2s ease-in-out;
}

@keyframes pulse-highlight-dark {
  0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
  100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
}

/* Estilo para layout compacto */
body.compact-layout .container {
  padding: 10px !important; /* Further reduced from 20px */
  max-width: 100% !important; /* Maximize width */
}

body.compact-layout .input-group {
  gap: 8px !important; /* Further reduced from 10px */
  margin-bottom: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .top-buttons {
  top: 5px !important; /* Further reduced from 10px */
  right: 5px !important; /* Further reduced from 10px */
  gap: 4px !important; /* Further reduced from 6px */
}

body.compact-layout .top-buttons button {
  width: 70px !important; /* Further reduced from 80px */
  padding: 4px !important; /* Further reduced from 6px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout .header {
  padding: 15px !important; /* Reduced from 30px */
}

body.compact-layout .content {
  padding: 20px !important; /* Reduced from 40px */
}

body.compact-layout .form-row {
  padding: 10px 0 !important; /* Reduced from 18px */
  gap: 10px !important; /* Reduced from 20px */
}

body.compact-layout .section {
  margin-bottom: 20px !important; /* Reduced from 40px */
}

body.compact-layout .section h3 {
  font-size: 1.2rem !important; /* Reduced from 20px */
  margin-bottom: 15px !important; /* Reduced from 25px */
  padding-bottom: 8px !important; /* Reduced from 12px */
}

body.compact-layout .form-control,
body.compact-layout .input-field {
  margin-bottom: 8px !important; /* Further reduced from 10px */
}

body.compact-layout .adicionais-group,
body.compact-layout .modificacoes-group,
body.compact-layout .saques-unicos-group,
body.compact-layout .saques-mensais-group {
  gap: 8px !important; /* Further reduced from 10px */
  margin-bottom: 8px !important; /* Further reduced from 10px */
}

body.compact-layout .adicionais-section,
body.compact-layout .modificacoes-section,
body.compact-layout .saques-unicos-section,
body.compact-layout .saques-mensais-section {
  margin: 15px 0 !important; /* Further reduced from 20px */
  padding: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .adicionais-section h2,
body.compact-layout .modificacoes-section h2,
body.compact-layout .saques-unicos-section h2,
body.compact-layout .saques-mensais-section h2 {
  font-size: 1.1rem !important; /* Further reduced from 1.3rem */
  margin-bottom: 8px !important; /* Further reduced from 10px */
}

body.compact-layout .section-title {
  margin: 20px 0 10px !important; /* Further reduced from 30px 0 15px */
  font-size: 1.3rem !important; /* Further reduced from 1.5rem */
}

body.compact-layout .chart-container {
  margin: 15px 0 !important; /* Further reduced from 20px */
  padding: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .freeze-btn {
  padding: 4px 8px !important; /* Further reduced from 6px 10px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout table {
  margin-top: 15px !important; /* Further reduced from 20px */
}

body.compact-layout table th,
body.compact-layout table td {
  padding: 6px !important; /* Further reduced from 8px */
  font-size: 0.8rem !important; /* Further reduced from 0.85rem */
}

body.compact-layout #sticky-header th {
  padding: 6px !important; /* Further reduced from 8px */
  font-size: 0.8rem !important; /* Further reduced from 0.85rem */
}

body.compact-layout .disclaimer,
body.compact-layout .metodologia {
  margin-top: 20px !important; /* Further reduced from 30px */
  padding: 10px !important; /* Further reduced from 15px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout .faq-section {
  margin: 20px 0 !important; /* Further reduced from 30px */
  padding: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .faq-section h2 {
  font-size: 1.3rem !important; /* Further reduced from 1.5rem */
  margin-bottom: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .faq-note {
  padding: 8px !important; /* Further reduced from 12px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout .faq-question {
  padding: 8px !important; /* Further reduced from 12px */
  font-size: 0.9rem !important; /* Further reduced from 1rem */
}

body.compact-layout .faq-answer {
  padding: 8px !important; /* Further reduced from 12px */
  font-size: 0.85rem !important; /* Further reduced from 0.9rem */
}

body.compact-layout .help-icon {
  width: 12px !important; /* Further reduced from 14px */
  height: 12px !important; /* Further reduced from 14px */
  font-size: 9px !important; /* Further reduced from 10px */
  line-height: 12px !important; /* Adjusted from 14px */
}

body.compact-layout .help-tooltip {
  padding: 6px !important; /* Further reduced from 8px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
  width: 300px !important; /* Further reduced from 350px */
}

body.compact-layout .tutorial-controls button {
  padding: 3px 6px !important; /* Further reduced from 4px 8px */
  font-size: 0.65rem !important; /* Further reduced from 0.7rem */
  min-width: 50px !important; /* Further reduced from 60px */
}

body.compact-layout .chart-legend {
  font-size: 0.8rem !important; /* Further reduced from 0.85rem */
  margin-top: 10px !important; /* Further reduced from 15px */
}

body.compact-layout .custom-tooltip {
  padding: 4px 8px !important; /* Further reduced from 6px 10px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout #customTooltip {
  padding: 4px 8px !important; /* Further reduced from 6px 10px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

body.compact-layout .event-tooltip {
  padding: 4px 8px !important; /* Further reduced from 6px 10px */
  font-size: 0.75rem !important; /* Further reduced from 0.8rem */
}

/* CSS PARA O CAMPO DE SOMA TOTAL */

.soma-total-container {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.soma-total-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.soma-total-valor {
  font-size: 24px;
  font-weight: 700;
  color: #28a745;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.soma-total-valor.valor-atualizado {
  transform: scale(1.05);
  color: #007bff;
}

/* Modo escuro */
.dark-mode .soma-total-container {
  background: #3a3d42;
  border-color: #555;
}

.dark-mode .soma-total-label {
  color: #adb5bd;
}

.dark-mode .soma-total-valor {
  color: #28a745;
}

.dark-mode .soma-total-valor.valor-atualizado {
  color: #007bff;
}

/* Responsivo */
@media (max-width: 768px) {
  .soma-total-valor {
    font-size: 20px;
  }
  
  .soma-total-container {
    padding: 12px;
    margin-top: 12px;
  }
}

/* CSS CORRIGIDO PARA LAYOUT NATURAL - SUBSTITUA NO STYLES.CSS */

.soma-total-container {
  margin-top: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.soma-total-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.soma-total-valor {
  font-size: 28px;
  font-weight: 700;
  color: #28a745;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.soma-total-valor.valor-atualizado {
  transform: scale(1.05);
  color: #007bff;
}

.btn-enviar-calculadora {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  font-family: 'Poppins', sans-serif;
  min-width: 200px;
}

.btn-enviar-calculadora:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.btn-enviar-calculadora:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* REMOVER ESTILOS QUE CAUSAM DEFORMAÇÃO - NÃO FORÇAR DIMENSÕES */
/* O gráfico deve usar o comportamento natural do Chart.js */

/* Modo escuro */
.dark-mode .soma-total-container {
  background: #3a3d42;
  border-color: #555;
}

.dark-mode .soma-total-label {
  color: #adb5bd;
}

.dark-mode .soma-total-valor {
  color: #28a745;
}

.dark-mode .soma-total-valor.valor-atualizado {
  color: #007bff;
}

.dark-mode .btn-enviar-calculadora {
  background: linear-gradient(135deg, #0056b3, #004085);
  box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

.dark-mode .btn-enviar-calculadora:hover {
  background: linear-gradient(135deg, #004085, #002752);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.4);
}

/* Responsivo */
@media (max-width: 768px) {
  .soma-total-valor {
    font-size: 24px;
  }
  
  .soma-total-container {
    padding: 16px;
    margin-top: 12px;
  }
  
  .btn-enviar-calculadora {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .soma-total-valor {
    font-size: 20px;
  }
  
  .btn-enviar-calculadora {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 160px;
  }
}


/* Gráfico institucional ocupar todo espaço lateral */
.grafico-institucional-wrapper .chart-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.grafico-institucional-wrapper {
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
}
/* CSS PARA BOTÃO E TOTAL LADO A LADO */

.soma-total-container {
  margin-top: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.soma-total-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1;
}

.soma-total-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.soma-total-valor {
  font-size: 28px;
  font-weight: 700;
  color: #28a745;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.soma-total-valor.valor-atualizado {
  transform: scale(1.05);
  color: #007bff;
}

.btn-enviar-calculadora {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  font-family: 'Poppins', sans-serif;
  min-width: 200px;
  height: fit-content;
  flex-shrink: 0;
}

.btn-enviar-calculadora:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.btn-enviar-calculadora:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Modo escuro */
.dark-mode .soma-total-container {
  background: #3a3d42;
  border-color: #555;
}

.dark-mode .soma-total-label {
  color: #adb5bd;
}

.dark-mode .soma-total-valor {
  color: #28a745;
}

.dark-mode .soma-total-valor.valor-atualizado {
  color: #007bff;
}

.dark-mode .btn-enviar-calculadora {
  background: linear-gradient(135deg, #0056b3, #004085);
  box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

.dark-mode .btn-enviar-calculadora:hover {
  background: linear-gradient(135deg, #004085, #002752);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.4);
}

/* Responsivo */
@media (max-width: 768px) {
  .soma-total-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .soma-total-info {
    align-items: center;
  }
  
  .soma-total-valor {
    font-size: 24px;
  }
  
  .btn-enviar-calculadora {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 180px;
    order: -1; /* Botão fica em cima no mobile */
  }
}

@media (max-width: 480px) {
  .soma-total-valor {
    font-size: 20px;
  }
  
  .btn-enviar-calculadora {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 160px;
  }
}


.instituicao-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.instituicao-container select {
  flex: 1;
}

.btn-editar-instituicoes {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.btn-editar-instituicoes:hover {
  background: #0056b3;
}


/* CSS ATUALIZADO PARA PÁGINA DE MANUTENÇÃO

/* Header actions - botão voltar no topo direito */
.header-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dee2e6;
}

.btn-voltar {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  font-family: 'Poppins', sans-serif;
  min-width: 200px;
}

.btn-voltar:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.btn-voltar:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Seções da página */
.section-header {
  margin: 40px 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #007bff;
}

.section-header h2 {
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.section-header p {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

/* Container da tabela */
.table-container {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

/* Estilo da tabela */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table thead {
  background: #f8f9fa;
}

.data-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

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

/* Células específicas */
.instituicao-nome {
  font-weight: 500;
  color: #333;
}

.data-lancamento {
  color: #666;
  font-family: 'Courier New', monospace;
}

.valor-lancamento {
  font-weight: 600;
  color: #28a745;
  text-align: right;
}

.no-data {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 30px;
}

/* Botões de ação */
.acoes {
  text-align: center;
  white-space: nowrap;
}

.btn-edit, .btn-delete {
  padding: 6px 12px;
  margin: 0 3px;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit {
  background: #007bff;
  color: white;
}

.btn-edit:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-delete {
  background: #dc3545;
  color: white;
}

.btn-delete:hover {
  background: #c82333;
  transform: translateY(-1px);
}

/* Mensagens de erro */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Modais */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 15px;
  top: 15px;
  cursor: pointer;
}

.close:hover {
  color: #333;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}

.modal-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-buttons button[type="button"] {
  background: #6c757d;
  color: white;
}

.modal-buttons button[type="button"]:hover {
  background: #545b62;
}

.modal-buttons button[type="submit"] {
  background: #007bff;
  color: white;
}

.modal-buttons button[type="submit"]:hover {
  background: #0056b3;
}

/* MODO ESCURO */
.dark-mode .header-actions {
  border-bottom-color: #6c757d;
}

.dark-mode .btn-voltar {
  background: linear-gradient(135deg, #0056b3, #004085);
  box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

.dark-mode .btn-voltar:hover {
  background: linear-gradient(135deg, #004085, #002752);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.4);
}

.dark-mode .section-header {
  border-bottom-color: #007bff;
}

.dark-mode .section-header h2 {
  color: #e0e0e0;
}

.dark-mode .section-header p {
  color: #adb5bd;
}

.dark-mode .table-container {
  background: #3a3d42;
}

.dark-mode .data-table thead {
  background: #495057;
}

.dark-mode .data-table th {
  color: #e0e0e0;
  border-bottom-color: #6c757d;
}

.dark-mode .data-table td {
  border-bottom-color: #6c757d;
  color: #e0e0e0;
}

.dark-mode .data-table tbody tr:hover {
  background-color: #495057;
}

.dark-mode .instituicao-nome {
  color: #e0e0e0;
}

.dark-mode .data-lancamento {
  color: #adb5bd;
}

.dark-mode .no-data {
  color: #adb5bd;
}

.dark-mode .error-message {
  background: #721c24;
  color: #f8d7da;
  border-color: #c82333;
}

.dark-mode .modal-content {
  background-color: #3a3d42;
  color: #e0e0e0;
}

.dark-mode .modal-content h3 {
  color: #e0e0e0;
}

.dark-mode .close {
  color: #adb5bd;
}

.dark-mode .close:hover {
  color: #e0e0e0;
}

/* Responsivo */
@media (max-width: 768px) {
  .header-actions {
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .btn-voltar {
    min-width: 180px;
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .data-table {
    font-size: 0.85rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }
  
  .btn-edit, .btn-delete {
    padding: 4px 8px;
    font-size: 0.8rem;
    margin: 1px;
  }
  
  .modal-content {
    margin: 5% auto;
    padding: 20px;
    width: 95%;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .btn-voltar {
    min-width: 160px;
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* LAYOUT COMPACTO - CORRIGIDO */
body.compact-layout .container {
  max-width: 1200px !important;
  margin: 10px auto !important;
  padding: 15px !important;
}

body.compact-layout .header-actions {
  margin-bottom: 15px !important;
}

body.compact-layout .section-header {
  margin: 20px 0 10px 0 !important;
}

body.compact-layout .table-container {
  margin-bottom: 15px !important;
}




/* TAMANHOS DE FONTE - CORRIGIDO */
body.font-small {
  font-size: 14px !important;
}

body.font-small h1 { font-size: 1.8rem !important; }
body.font-small h2 { font-size: 1.5rem !important; }
body.font-small h3 { font-size: 1.3rem !important; }
body.font-small .data-table { font-size: 0.8rem !important; }
body.font-small .btn-voltar { font-size: 12px !important; }

body.font-medium {
  font-size: 16px !important;
}

body.font-medium h1 { font-size: 2rem !important; }
body.font-medium h2 { font-size: 1.7rem !important; }
body.font-medium h3 { font-size: 1.4rem !important; }
body.font-medium .data-table { font-size: 0.95rem !important; }
body.font-medium .btn-voltar { font-size: 14px !important; }

body.font-large {
  font-size: 18px !important;
}

body.font-large h1 { font-size: 2.3rem !important; }
body.font-large h2 { font-size: 2rem !important; }
body.font-large h3 { font-size: 1.6rem !important; }
body.font-large .data-table { font-size: 1.1rem !important; }
body.font-large .btn-voltar { font-size: 16px !important; }




/* CSS PARA ANÁLISE DOS RECURSOS */

/* Modal responsivo e mobile-friendly */
.modal-analise-recursos {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  padding: 10px;
}

.modal-analise-recursos .modal-analise-content {
  background-color: #ffffff;
  margin: 20px auto;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-analise-recursos .modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-analise-recursos .modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.modal-analise-recursos .modal-close:hover {
  color: #000;
}

.modal-analise-recursos .modal-body {
  padding: 20px;
}

.btn-fechar {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-fechar:hover {
  background: #5a6268;
}

/* Botão Análises dos Recursos */
.btn-analise-recursos {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  min-width: 200px;
}

.btn-analise-recursos:hover {
  background: #138496;
}

/* Container dos botões lado a lado */
.botoes-total-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

/* Componentes da análise */
.analise-recursos {
  font-family: inherit;
}

.analise-recursos h3 {
  color: #495057;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.analise-recursos h4 {
  color: #6c757d;
  margin: 25px 0 15px 0;
  font-size: 1.2rem;
}

.analise-recursos h5 {
  color: #495057;
  margin: 10px 0 5px 0;
  font-size: 1rem;
}

/* Resumo geral */
.resumo-geral {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #007bff;
}

.metricas-principais {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.metrica {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.metrica .label {
  font-weight: 500;
  color: #6c757d;
}

.metrica .valor {
  font-weight: 600;
  color: #495057;
}

.metrica .valor.destaque {
  color: #007bff;
  font-size: 1.1rem;
}

/* Análise por instituição */
.lista-instituicoes {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}

.instituicao-item {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.3s ease;
}

.instituicao-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.instituicao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.instituicao-header h5 {
  margin: 0;
  color: #495057;
}

.tendencia {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(108, 117, 125, 0.1);
}

.instituicao-dados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.dado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.dado .label {
  font-size: 0.9rem;
  color: #6c757d;
}

.dado .valor {
  font-weight: 500;
  color: #495057;
}

/* Tendências */
.tendencias-resumo {
  display: grid;
  gap: 10px;
  margin: 15px 0;
}

.tendencia-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  font-weight: 500;
}

.tendencia-item.positiva {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-left: 4px solid #28a745;
}

.tendencia-item.negativa {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.tendencia-item.neutra {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border-left: 4px solid #6c757d;
}

.tendencia-item .icone {
  font-size: 1.2rem;
}

.insights-periodo {
  background: #e7f3ff;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #007bff;
  margin-top: 15px;
}

/* Recomendações */
.lista-recomendacoes {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}

.recomendacao-item {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  border-left: 4px solid #6c757d;
}

.recomendacao-item.alta {
  border-left-color: #dc3545;
  background: rgba(220, 53, 69, 0.02);
}

.recomendacao-item.media {
  border-left-color: #ffc107;
  background: rgba(255, 193, 7, 0.02);
}

.recomendacao-item.baixa {
  border-left-color: #28a745;
  background: rgba(40, 167, 69, 0.02);
}

.recomendacao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.recomendacao-header h5 {
  margin: 0;
  font-size: 1rem;
}

.prioridade {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.prioridade.alta {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.prioridade.media {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
}

.prioridade.baixa {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.recomendacao-item p {
  margin: 0;
  color: #6c757d;
  line-height: 1.5;
}

/* Análise vazia */
.analise-recursos.vazia {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.analise-recursos.erro {
  text-align: center;
  padding: 40px 20px;
  color: #dc3545;
}

/* Modo escuro */
.dark-mode .modal-analise-content {
  background-color: #3a3d42;
  color: #e0e0e0;
}

.dark-mode .modal-analise-content .modal-footer {
  background-color: #495057;
  border-top-color: #6c757d;
}

.dark-mode .btn-fechar {
  background: #6c757d;
}

.dark-mode .btn-fechar:hover {
  background: #5a6268;
}

.dark-mode .btn-analise-recursos {
  background: #17a2b8;
}

.dark-mode .btn-analise-recursos:hover {
  background: #138496;
}

.dark-mode .botoes-total-container {
  background: #495057;
  border-color: #6c757d;
}

.dark-mode .resumo-geral {
  background: #495057;
  border-left-color: #007bff;
}

.dark-mode .metrica {
  background: #3a3d42;
  border-color: #6c757d;
}

.dark-mode .metrica .label {
  color: #adb5bd;
}

.dark-mode .metrica .valor {
  color: #e0e0e0;
}

.dark-mode .instituicao-item {
  background: #495057;
  border-color: #6c757d;
}

.dark-mode .dado {
  background: #3a3d42;
}

.dark-mode .dado .label {
  color: #adb5bd;
}

.dark-mode .dado .valor {
  color: #e0e0e0;
}

.dark-mode .insights-periodo {
  background: rgba(0, 123, 255, 0.1);
  border-left-color: #007bff;
}

.dark-mode .recomendacao-item {
  background: #495057;
  border-color: #6c757d;
}

.dark-mode .recomendacao-item p {
  color: #adb5bd;
}

/* Responsivo */
@media (max-width: 768px) {
  .modal-analise-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .modal-analise-content .modal-body {
    padding: 15px 20px;
  }
  
  .botoes-total-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-analise-recursos {
    min-width: 100%;
  }
  
  .metricas-principais {
    grid-template-columns: 1fr;
  }
  
  .instituicao-dados {
    grid-template-columns: 1fr;
  }
  
  .recomendacao-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* Container principal */
.analise-recursos-inteligente {
  font-family: inherit;
}

.analise-recursos-inteligente h3 {
  color: #495057;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
  font-size: 1.4rem;
  text-align: center;
}

/* Cards principais */
.cards-analise {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.card-analise {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  min-height: 180px;
}

.card-analise h4 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #6c757d;
  font-weight: 600;
}

/* Card Patrimônio */
.card-analise.patrimonio {
  border-left: 4px solid #007bff;
}

.valor-principal {
  font-size: 1.8rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 15px;
  text-align: center;
}

.metricas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metrica {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.metrica .label {
  color: #6c757d;
  font-weight: 500;
}

.metrica .valor {
  color: #495057;
  font-weight: 600;
}

.metrica .valor.positivo {
  color: #28a745;
}

.metrica .valor.negativo {
  color: #dc3545;
}

/* Card Perfil */
.card-analise.perfil {
  border-left: 4px solid #ffc107;
}

.perfil-badge {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.perfil-nome {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.perfil-desc {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 8px;
}

.perfil-confianca {
  font-size: 0.8rem;
  color: #495057;
  font-weight: 500;
}

.justificativas {
  font-size: 0.85rem;
  color: #6c757d;
}

.justificativa {
  margin-bottom: 4px;
  line-height: 1.3;
}

/* Card Recomendações */
.card-analise.recomendacoes {
  border-left: 4px solid #28a745;
}

.recomendacoes-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recomendacao {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.recomendacao.alta {
  background: #f8d7da;
  border-left: 3px solid #dc3545;
}

.recomendacao.media {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
}

.recomendacao.baixa {
  background: #d4edda;
  border-left: 3px solid #28a745;
}

.recomendacao .icone {
  font-size: 0.8rem;
  margin-top: 2px;
}

.recomendacao .texto {
  flex: 1;
  color: #495057;
}

/* Seção de Feedback */
.secao-feedback {
  border-top: 2px solid #dee2e6;
  padding-top: 25px;
  margin-top: 20px;
}

.pergunta-feedback h4 {
  color: #495057;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.pergunta-feedback p {
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.5;
}

.botoes-feedback {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.btn-feedback {
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-feedback:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.btn-feedback.atual {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.btn-feedback.ativo {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

/* Recomendações Alternativas */
.recomendacoes-alternativas {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.recomendacoes-alternativas h5 {
  color: #495057;
  margin-bottom: 15px;
  font-size: 1rem;
}

.lista-alternativas {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.recomendacao-alternativa {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.recomendacao-alternativa .icone {
  font-size: 1.2rem;
  margin-top: 2px;
}

.recomendacao-alternativa .conteudo {
  flex: 1;
}

.recomendacao-alternativa .titulo {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.recomendacao-alternativa .descricao {
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Análise vazia */
.analise-recursos-inteligente.vazia {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.analise-recursos-inteligente.vazia h3 {
  border-bottom: none;
}

/* ===== MODO ESCURO - ANÁLISE INTELIGENTE ===== */

.dark-mode .modal-analise-recursos .modal-analise-content {
  background-color: #3a3d42;
}

.dark-mode .modal-analise-recursos .modal-header {
  background: #3a3d42;
  border-bottom-color: #6c757d;
}

.dark-mode .modal-analise-recursos .modal-close {
  color: #adb5bd;
}

.dark-mode .modal-analise-recursos .modal-close:hover {
  color: #ffffff;
}

.dark-mode .card-analise {
  background: #495057;
  border-color: #6c757d;
}

.dark-mode .card-analise h4 {
  color: #adb5bd;
}

.dark-mode .valor-principal {
  color: #17a2b8;
}

.dark-mode .metrica .label {
  color: #adb5bd;
}

.dark-mode .metrica .valor {
  color: #e0e0e0;
}

.dark-mode .perfil-desc,
.dark-mode .justificativa {
  color: #adb5bd;
}

.dark-mode .recomendacao .texto {
  color: #e0e0e0;
}

.dark-mode .pergunta-feedback h4 {
  color: #e0e0e0;
}

.dark-mode .pergunta-feedback p {
  color: #adb5bd;
}

.dark-mode .btn-feedback {
  background: #495057;
  border-color: #6c757d;
  color: #e0e0e0;
}

.dark-mode .btn-feedback:hover {
  border-color: #17a2b8;
  background: #5a6268;
}

.dark-mode .recomendacoes-alternativas {
  background: #495057;
  border-color: #6c757d;
}

.dark-mode .recomendacao-alternativa {
  background: #5a6268;
  border-color: #6c757d;
}

.dark-mode .recomendacao-alternativa .titulo {
  color: #e0e0e0;
}

.dark-mode .recomendacao-alternativa .descricao {
  color: #adb5bd;
}

/* ===== RESPONSIVO - ANÁLISE INTELIGENTE ===== */

/* Tablet */
@media (max-width: 768px) {
  .modal-analise-recursos {
    padding: 5px;
  }
  
  .modal-analise-recursos .modal-analise-content {
    margin: 10px auto;
    width: 98%;
    max-height: 95vh;
  }
  
  .modal-analise-recursos .modal-body {
    padding: 15px;
  }
  
  .cards-analise {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
  }
  
  .card-analise {
    padding: 15px;
    min-height: auto;
  }
  
  .valor-principal {
    font-size: 1.5rem;
  }
  
  .botoes-feedback {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .btn-feedback {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .modal-analise-recursos {
    padding: 0;
  }
  
  .modal-analise-recursos .modal-analise-content {
    margin: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .modal-analise-recursos .modal-header {
    padding: 12px 15px;
  }
  
  .modal-analise-recursos .modal-body {
    padding: 15px;
  }
  
  .analise-recursos-inteligente h3 {
    font-size: 1.2rem;
  }
  
  .card-analise {
    padding: 12px;
  }
  
  .card-analise h4 {
    font-size: 1rem;
  }
  
  .valor-principal {
    font-size: 1.3rem;
  }
  
  .metrica {
    font-size: 0.8rem;
  }
  
  .botoes-feedback {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .btn-feedback {
    padding: 12px;
    font-size: 0.85rem;
  }
  
  .recomendacao-alternativa {
    padding: 12px;
  }
  
  .recomendacao-alternativa .titulo {
    font-size: 0.9rem;
  }
  
  .recomendacao-alternativa .descricao {
    font-size: 0.8rem;
  }
}

/* Correção específica para garantir visibilidade em mobile */
@media (max-width: 768px) {
  .modal-analise-recursos {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
  }
  
  .modal-analise-recursos .modal-analise-content {
    position: relative !important;
    transform: none !important;
  }
}

/* ===== CSS CORRIGIDO PARA SEÇÃO DE RECURSOS ===== */

/* Container principal para os campos de recursos */
.recursos-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  align-items: start;
}

/* Estilo melhorado para input-field */
.input-field {
  flex: 1 1 200px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.input-field input,
.input-field select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #495057;
  background: #ffffff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-field input:focus,
.input-field select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

/* Container para instituição - select e botão lado a lado */
.instituicao-container {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.instituicao-container select {
  flex: 1;
  min-width: 0; /* Permite que o select encolha */
}

/* Botão de editar instituições */
.btn-editar-instituicoes {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: background 0.3s;
  flex-shrink: 0; /* Impede que o botão encolha */
}

.btn-editar-instituicoes:hover {
  background: #0056b3;
}

/* Campo de nova instituição - aparece acima do select */
#novaInstituicaoInput {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border: 2px solid #007bff; /* Destaque para mostrar que é um campo especial */
  border-radius: 4px;
  font-size: 0.9rem;
  background: #f8f9ff; /* Fundo levemente azulado */
  transition: all 0.3s;
}

#novaInstituicaoInput:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  background: #ffffff;
}

/* Ícone de ajuda */
.help-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #007bff;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 16px;
  font-size: 0.7rem;
  margin-left: 5px;
  cursor: help;
  font-weight: bold;
}

.help-icon:hover {
  background: #0056b3;
}

/* Botão "Hoje" para data */
.btn-hoje {
  margin-top: 5px;
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-hoje:hover {
  background: #218838;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .recursos-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .instituicao-container {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .btn-editar-instituicoes {
    width: 100%;
    text-align: center;
  }
  
  .input-field {
    margin-bottom: 15px;
  }
}

/* Modo escuro */
.dark-mode .input-field label {
  color: #adb5bd;
}

.dark-mode .input-field input,
.dark-mode .input-field select {
  background-color: #3a3d42;
  border-color: #555;
  color: #e0e0e0;
}

.dark-mode .input-field input:focus,
.dark-mode .input-field select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dark-mode #novaInstituicaoInput {
  background: #2a2d35;
  border-color: #007bff;
  color: #e0e0e0;
}

.dark-mode #novaInstituicaoInput:focus {
  background: #3a3d42;
}

.dark-mode .btn-editar-instituicoes {
  background: #007bff;
}

.dark-mode .btn-editar-instituicoes:hover {
  background: #0056b3;
}

.dark-mode .help-icon {
  background: #007bff;
}

.dark-mode .help-icon:hover {
  background: #0056b3;
}

/* ===== CSS ADICIONAL PARA LAYOUT FINAL DOS RECURSOS ===== */

/* Container para data e botão "Hoje" */
.data-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.data-container input[type="date"] {
  flex: 1;
}

/* Botão "Hoje" melhorado */
.btn-hoje {
  padding: 8px 12px;
  font-size: 0.8rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-hoje:hover {
  background: #218838;
}

/* Botão adicionar recurso */
.btn-adicionar-recurso {
  width: 100%;
  padding: 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  margin-top: 10px;
}

.btn-adicionar-recurso:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-adicionar-recurso:active {
  transform: translateY(0);
}

/* Organização dos campos em grid responsivo */
.recursos-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  align-items: start;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .recursos-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .data-container {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .btn-hoje {
    width: 100%;
    text-align: center;
  }
}

/* Modo escuro */
.dark-mode .btn-hoje {
  background: #28a745;
}

.dark-mode .btn-hoje:hover {
  background: #218838;
}

.dark-mode .btn-adicionar-recurso {
  background: #007bff;
}

.dark-mode .btn-adicionar-recurso:hover {
  background: #0056b3;
}

/* Estilos para as novas conquistas azuis */

/* Classe para linhas com conquistas informativas (fundo azul) */
.achievement-yellow {
  background-color: #4784a4 !important;
  border-left: 4px solid #3a6b85 !important;
}

/* Classe para linhas com início dos saques mensais (fundo verde) */
.achievement-green-info {
  background-color: #47a486 !important;
  border-left: 4px solid #3a8a6b !important;
}

/* Classe para o texto das conquistas informativas (texto branco) */
.conquista-informativa {
  color: #ffffff;
  font-weight: 600;
  display: inline;
  margin: 0;
}

/* Classe para o texto do início dos saques mensais (texto branco) */
.conquista-saque-mensal {
  color: #ffffff;
  font-weight: 600;
  display: inline;
  margin: 0;
}

/* Hover effect para linhas azuis */
.achievement-yellow:hover {
  background-color: #3a6b85 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(71, 132, 164, 0.3);
  transition: all 0.2s ease;
}

/* Hover effect para linhas verdes informativas */
.achievement-green-info:hover {
  background-color: #3a8a6b !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(71, 164, 134, 0.3);
  transition: all 0.2s ease;
}

/* Estilos existentes mantidos para compatibilidade */
.achievement-green {
  background-color: #d4edda !important;
  border-left: 4px solid #28a745 !important;
}

.achievement-red {
  background-color: #f8d7da !important;
  border-left: 4px solid #dc3545 !important;
}

.conquista-positiva {
  color: #155724;
  font-weight: 600;
  display: inline;
  margin: 0;
}

.conquista-negativa {
  color: #721c24;
  font-weight: 600;
  display: inline;
  margin: 0;
}

/* Hover effects para linhas existentes */
.achievement-green:hover {
  background-color: #c3e6cb !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  transition: all 0.2s ease;
}

.achievement-red:hover {
  background-color: #f5c6cb !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  transition: all 0.2s ease;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
  .conquista-informativa,
  .conquista-positiva,
  .conquista-negativa {
    font-size: 0.85em;
  }
}

/* Modal de login premium */
.premium-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 10000;
  display: none;
  animation: fadeIn 0.3s ease;
}

.premium-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  z-index: 10001;
  text-align: center;
  max-width: 450px;
  width: 90%;
  display: none;
  animation: slideIn 0.3s ease;
}

.premium-modal h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 22px;
  font-weight: 600;
}

.premium-modal p {
  margin: 0 0 25px 0;
  color: #666;
  line-height: 1.6;
  font-size: 16px;
}

.premium-modal p:last-of-type {
  font-weight: 600;
  color: #333;
  font-size: 18px;
  margin-bottom: 30px;
}

.premium-modal-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.premium-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.premium-btn.sim {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.premium-btn.sim:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.premium-btn.nao {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e9ecef;
}

.premium-btn.nao:hover {
  background: #e9ecef;
  border-color: #ddd;
  transform: translateY(-1px);
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to { 
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Modo escuro */
body.dark-mode .premium-modal {
  background: #2d3748;
  color: white;
}

body.dark-mode .premium-modal h3 {
  color: white;
}

body.dark-mode .premium-modal p {
  color: #cbd5e0;
}

body.dark-mode .premium-modal p:last-of-type {
  color: white;
}

body.dark-mode .premium-btn.nao {
  background: #4a5568;
  color: #e2e8f0;
  border-color: #718096;
}

body.dark-mode .premium-btn.nao:hover {
  background: #718096;
}

/* Responsivo */
@media (max-width: 480px) {
  .premium-modal {
    padding: 25px;
    margin: 20px;
  }
  
  .premium-modal-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .premium-btn {
    width: 100%;
  }
}
