/* ============================================================================
   🆕 v39 — CORREÇÕES DE LANÇAMENTOS (estilos)
   ============================================================================ */

/* Tabela de correções */
#tabela-correcoes {
  font-size: 13px;
}

#tabela-correcoes th {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #7c2d12;
  font-weight: 700;
  padding: 10px 8px;
  position: sticky;
  top: 0;
  z-index: 2;
}

#tabela-correcoes td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

#tabela-correcoes tbody tr:hover {
  background: #fffbeb;
}

/* Linha com sugestão da IA — borda esquerda destacada */
#tabela-correcoes tr.corr-row-suggested {
  background: linear-gradient(90deg, #fef9c3 0%, #ffffff 80%);
  border-left: 4px solid #facc15;
}

#tabela-correcoes tr.corr-row-suggested:hover {
  background: linear-gradient(90deg, #fef08a 0%, #fef9c3 80%);
}

/* Célula com alteração sugerida pela IA (destaque amarelo + diff) */
.corr-cell-changed {
  background: #fef9c3 !important;
  border: 2px solid #facc15 !important;
  position: relative;
  animation: corrPulse 1.6s ease-in-out 1;
}

@keyframes corrPulse {
  0%   { background: #fef9c3; }
  35%  { background: #fde047; }
  100% { background: #fef9c3; }
}

.corr-cell-changed::before {
  content: "✨";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  opacity: 0.6;
}

.corr-cell-changed .corr-old {
  color: #991b1b;
  text-decoration: line-through;
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.corr-cell-changed .corr-new {
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
}

/* Badges de severidade */
.sev-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sev-alta {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.sev-media {
  background: #fef3c7;
  color: #854d0e;
  border: 1px solid #fcd34d;
}

.sev-baixa {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* Lista de motivos (details/summary) */
.corr-motivos details {
  cursor: pointer;
}

.corr-motivos summary {
  font-weight: 600;
  color: #7c2d12;
  font-size: 12px;
  padding: 2px 0;
}

.corr-motivos summary:hover {
  color: #dc2626;
}

.corr-motivos ul li {
  color: #374151;
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Botões de ação */
.corr-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.corr-acoes .btn {
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

/* Badge de contagem na sub-tab */
#badge-correcoes {
  background: #fbbf24;
  color: #7c2d12;
  margin-left: 4px;
  font-weight: 700;
}

#badge-correcoes[data-zero="1"] {
  background: #e5e7eb;
  color: #6b7280;
}

/* Estado vazio (sucesso) */
#tabela-correcoes .empty {
  background: #f0fdf4;
  font-size: 14px;
}

/* Responsivo */
@media (max-width: 768px) {
  #tabela-correcoes {
    font-size: 12px;
  }
  #tabela-correcoes th,
  #tabela-correcoes td {
    padding: 6px 4px;
  }
  .corr-acoes {
    flex-direction: column;
    align-items: stretch;
  }
}
