/* sistema LIA  */

/* Reset e configurações base */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}




  /* Estilos para o Modal de Voucher */

.voucher-info {
    font-size: 0.85rem;
    margin-top: 1rem;
}

.voucher-info .text-muted {
    color: #6c757d !important;
}

.voucher-info .text-danger {
    color: #dc3545 !important;
}

.voucher-modal {
        display: none; /* Começa oculto */
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 31, 61, 0.85);
        align-items: center;
        justify-content: center;
        font-family: 'Inter', sans-serif;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

.voucher-modal.active {
        display: flex;
        opacity: 1;
    }

.voucher-modal-content {
        background-color: #ffffff;
        padding: 40px;
        width: 90%;
        max-width: 500px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        text-align: center;
        position: relative;
        transform: scale(0.95);
        transition: transform 0.3s ease;
    }

.voucher-modal.active .voucher-modal-content {
        transform: scale(1);
    }
    
.voucher-modal-header .icon {
        font-size: 48px;
        color: #003366;
    }
    
.voucher-modal-header h2 {
        color: #003366;
        margin-top: 15px;
        margin-bottom: 5px;
        font-weight: 700;
    }

.voucher-modal-header p {
        color: #555;
        margin-bottom: 30px;
    }

#voucherForm .form-group {
        margin-bottom: 20px;
        text-align: left;
    }

#voucherForm label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

#voucherForm input[type="text"] {
        width: 100%;
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 16px;
        text-transform: uppercase;
        box-sizing: border-box; /* Garante que o padding não afete a largura total */
        transition: border-color 0.2s, box-shadow 0.2s;
    }

#voucherForm input[type="text"]:focus {
        border-color: #003366;
        box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
        outline: none;
    }

#voucherForm button[type="submit"] {
        width: 100%;
        background-color: #003366;
        color: white;
        padding: 14px 20px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: background-color 0.2s;
    }
    
#voucherForm button[type="submit"]:hover {
        background-color: #004488;
    }

#voucherForm button[type="submit"]:disabled {
        background-color: #a0a0a0;
        cursor: not-allowed;
    }

#voucherError {
        color: #dc3545;
        margin-top: 15px;
        font-weight: bold;
        min-height: 20px;
    }

.close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        color: #aaa;
        cursor: pointer;
        transition: color 0.2s;
    }
    .close-btn:hover {
        color: #333;
    }




/* Header com gradiente */
.header-gradient {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem 0;
}

.header-gradient h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header-gradient p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

#lia-summary .card {
  background-color: #f8f9fa;
  border-left: 4px solid #0d6efd;
  padding: 1rem;
  margin-bottom: 1rem;
}

#lia-summary .card-title {
  font-weight: 600;
  color: #0d6efd;
}


/* Assistente de IA */
.ai-assistant {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
  animation: pulse-glow 2s infinite;
  font-size: 0.85rem;
  text-align: center;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
  }
}

/* Cards e seções */
.card {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none;
  padding: 1.5rem;
  background: linear-gradient(135deg, #026bd3 15%, #130686 100%);
}

.card-body {
  padding: 1.5rem;
}


/* Estilo customizado para o card de Pontos de Atenção */
.card-pontos-atencao {
  background-color: rgba(220, 53, 69, 0.05); /* Fundo vermelho MUITO claro */
  border-color: rgba(220, 53, 69, 0.3);
}

.card-pontos-atencao .card-header {
  background-color: #dc3545; /* Cor de perigo do Bootstrap para o cabeçalho */
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Estilo customizado para o card de Requisitos Atendidos (para manter a consistência) */
.card-requisitos-atendidos {
  background-color: rgba(25, 135, 84, 0.05); /* Fundo verde MUITO claro */
  border-color: rgba(25, 135, 84, 0.3);
}

.card-requisitos-atendidos .card-header {
  background-color: #198754; /* Cor de sucesso do Bootstrap para o cabeçalho */
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}


.risk-factor-item {
    border-left: 4px solid #ccc; /* Borda padrão cinza */
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.risk-factor-item.critical {
    border-left-color: #dc3545; /* Borda vermelha para 'critical' */
    background-color: rgba(220, 53, 69, 0.05);
}

.risk-factor-item.high {
    border-left-color: #ffc107; /* Borda amarela para 'high' */
    background-color: rgba(255, 193, 7, 0.05);
}

/* Adicione .medium e .low se você tiver esses tipos */
.risk-factor-item.medium {
    border-left-color: #0dcaf0; /* Borda azul claro para 'medium' */
     background-color: rgba(13, 202, 240, 0.05);
}

.score-bar-container {
  background-color: #e9ecef;
  border-radius: 0.25rem;
  height: 8px;
  width: 100%;
}
.score-bar {
  height: 100%;
  border-radius: 0.25rem;
  transition: width 0.5s ease-in-out;
}

/* Seções do formulário */
.form-section {
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-section:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
  color: #1e3c72;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid #e9ecef;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.form-section h3 .section-number {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
  font-size: 1.2rem;
}

.form-section .section-description {
  color: #6c757d;
  font-style: italic;
  margin-bottom: 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-left: 4px solid #2a5298;
  border-radius: 0 8px 8px 0;
}

/* Grupos de perguntas */
.question-group {
  background-color: #fff;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.question-group:hover {
  border-color: #2a5298;
  box-shadow: 0 2px 10px rgba(42, 82, 152, 0.1);
}

.question-group .question-number {
  position: absolute;
  top: -12px;
  left: 20px;
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.question-group .form-label {
  color: #495057;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.question-group .form-text {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #17a2b8;
}

/* Análise de IA integrada */

.ai-dynamic-suggestion-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ai-dynamic-suggestion-header i {
  font-size: 1.2rem;
  color: inherit;
  margin: 0;
}

.ai-dynamic-suggestion strong {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.ai-analysis {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border: 1px solid #2196f3;
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
  animation: slideInUp 0.5s ease;
}

.ai-analysis.loading {
  background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
  border-color: #ff9800;
}

.ai-analysis.success {
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
  border-color: #4caf50;
}

.ai-analysis.warning {
  background: linear-gradient(135deg, #fff8e1 0%, #fef7e0 100%);
  border-color: #ff9800;
}

.ai-analysis.danger {
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
  border-color: #f44336;
}

.ai-analysis .ai-header {
  display: flex;
  align-items: center;
  font-weight: 600;
  margin-bottom: 10px;
}

.ai-analysis .ai-header i {
  margin-right: 8px;
  animation: pulse 2s infinite;
}

.ai-suggestion {
  background-color: #e9f7fe;
  border-left: 4px solid #0dcaf0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #0c5460;
  margin-top: 8px;
}
.ai-suggestion i {
  color: #0dcaf0;
  margin-right: 6px;
}


.ai-dynamic-suggestion {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
  position: relative;
  border-left: 5px solid transparent;
}

.ai-dynamic-suggestion i {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  color: inherit;
}

.ai-dynamic-suggestion strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.ai-dynamic-suggestion small {
  display: block;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: #555;
  font-style: italic;
  font-size: 0.85rem;
}

/* Cores laterais por tipo */
.alert-danger.ai-dynamic-suggestion {
  border-left-color: #dc3545;
}

.alert-warning.ai-dynamic-suggestion {
  border-left-color: #ffc107;
}

.alert-info.ai-dynamic-suggestion {
  border-left-color: #17a2b8;
}




@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.ai-analysis .ai-content {
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-analysis .ai-section {
  margin-bottom: 15px;
}

.ai-analysis .ai-section h6 {
  color: #1e3c72;
  font-weight: 600;
  margin-bottom: 8px;
}

.ai-analysis .ai-list {
  margin-bottom: 0;
  padding-left: 20px;
}

.ai-analysis .ai-list li {
  margin-bottom: 5px;
}

.ai-analysis .severity-critical {
  color: #d32f2f;
  font-weight: 600;
}

.ai-analysis .severity-high {
  color: #f57c00;
  font-weight: 600;
}

.ai-analysis .severity-medium {
  color: #1976d2;
}

.ai-analysis .risk-high {
  color: #d32f2f;
  font-weight: 600;
}

.ai-analysis .risk-medium {
  color: #f57c00;
}

.ai-analysis .priority-critical {
  color: #d32f2f;
  font-weight: 600;
}

.ai-analysis .priority-high {
  color: #f57c00;
  font-weight: 600;
}

.ai-analysis .priority-medium {
  color: #1976d2;
}

/* Barra de progresso customizada */
.progress-container {
  background-color: #fff;
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-custom {
  height: 12px;
  border-radius: 10px;
  background-color: #e9ecef;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-custom .progress-bar {
  background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
}

.progress-custom .progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 50px 50px;
  animation: move 2s linear infinite;
}

@keyframes move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Formulários */
.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #2a5298;
  box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
  transform: translateY(-1px);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  animation: shake 0.5s ease-in-out;
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: #28a745;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Checkboxes e radios customizados */
.form-check {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-check:hover {
  background-color: #f8f9fa;
}

.form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.1em;
  border: 2px solid #dee2e6;
  transition: all 0.3s ease;
}

.form-check-input:checked {
  background-color: #2a5298;
  border-color: #2a5298;
  transform: scale(1.1);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

.form-check-label {
  margin-left: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  font-weight: 500;
}

.form-check:hover .form-check-label {
  color: #2a5298;
}

/* Opções críticas destacadas */
.form-check.critical-option {
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
  border: 2px solid #f44336;
  border-radius: 8px;
  padding: 15px;
}

.form-check.critical-option .form-check-label {
  color: #d32f2f;
  font-weight: 600;
}

/* Botões */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #198754 0%, #20c997 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #20c997 0%, #198754 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e55a00 0%, #fd7e14 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4);
}

.btn-info {
  background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
}

.btn-info:hover {
  background: linear-gradient(135deg, #0aa2c0 0%, #0dcaf0 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 202, 240, 0.4);
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
  background: transparent;
}

.btn-outline-secondary:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Alertas customizados */
.alert {
  border-radius: 10px;
  border: none;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: currentColor;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
}

.alert-dark {
  background: linear-gradient(135deg, #d6d8db 0%, #c6c8ca 100%);
  color: #383d41;
}

/* Indicadores de risco */
.risk-indicator {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-low {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.risk-medium {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.risk-high {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.risk-critical {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.risk-factor-item {
  background-color: #fff3cd;
  border-left: 4px solid #fd7e14;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 0 8px 8px 0;
}

.risk-factor-item.critical {
  background-color: #f8d7da;
  border-left-color: #dc3545;
}



/* Itens do plano de ação */
.action-item {
  background-color: #f8f9fa;
  border-left: 4px solid #1e3c72;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 0 8px 8px 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.action-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.action-item:hover::before {
  transform: translateX(100%);
}

.action-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-item.critical {
  border-left-color: #dc3545;
  background-color: #fff5f5;
  animation: pulse-critical 2s infinite;
}

.action-item.high {
  border-left-color: #fd7e14;
  background-color: #fff8f0;
}

.action-item.medium {
  border-left-color: #198754;
  background-color: #f0fff4;
}

.action-item.low {
  border-left-color: #6f42c1;
  background-color: #f8f5ff;
}

.action-item.high-priority {
  border-left-color: #dc3545;
  background-color: #fff5f5;
}

.action-item.medium-priority {
  border-left-color: #fd7e14;
  background-color: #fff8f0;
}

.action-item.low-priority {
  border-left-color: #198754;
  background-color: #f0fff4;
}

.action-item.critical-priority {
  border-left-color: #6f42c1;
  background-color: #f8f5ff;
  animation: pulse-critical 2s infinite;
}

@keyframes pulse-critical {
  0%,
  100% {
    background-color: #fff5f5;
  }
  50% {
    background-color: #f0e6e6;
  }
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 60, 114, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Estados de loading */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2a5298;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Tooltips customizados */
.tooltip-custom {
  position: relative;
  cursor: help;
}

.tooltip-custom::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

.tooltip-custom::after {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-custom:hover::before,
.tooltip-custom:hover::after {
  opacity: 1;
  visibility: visible;
}



/* AI Insights Preview */
.ai-insights-preview {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  z-index: 1000;
  animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tabelas */
.table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  padding: 1rem;
}

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

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background-color: rgba(42, 82, 152, 0.05);
  transform: scale(1.01);
  transition: all 0.3s ease;
}

/* Animações de entrada */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .header-gradient h1 {
    font-size: 1.8rem;
  }

  .header-gradient p {
    font-size: 1rem;
  }

  .form-section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .ai-assistant {
    padding: 12px;
    margin: 10px 0;
  }

  .action-item {
    padding: 15px;
    margin-bottom: 15px;
  }

  .question-group {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 10px;
  }

  .form-section h3 {
    font-size: 1.2rem;
  }

  .card-header h2,
  .card-header h3 {
    font-size: 1.3rem;
  }

  .d-flex.justify-content-between {
    flex-direction: column;
    gap: 1rem;
  }

  .d-flex.justify-content-between > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Impressão */
@media print {
  .header-gradient,
  #intro-section,
  #questionnaire-section,
  .btn,
  #ai-insights-preview,
  .loading-overlay {
    display: none !important;
  }

  #results-section {
    display: block !important;
  }

  .card {
    break-inside: avoid;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  body {
    background-color: white;
  }

  .page-break {
    break-before: page;
    page-break-before: always;
  }
}

/* Scrollbar customizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

/* Estados de validação melhorados */
.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.38 1.38 3.72-3.72.94.94-4.66 4.66z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4M8.6 7.4 7.2 6 5.8 7.4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}


/* --- Estilos Aprimorados para a Seção de Resultados LIA --- */

/* Card principal de análise qualitativa */
.card-summary-enhanced {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem; /* Bordas mais suaves */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    height: 100%; /* Garante que os cards na mesma linha tenham a mesma altura */
}

.card-summary-enhanced .card-title-enhanced {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057; /* Cor mais suave para o título */
    margin-bottom: 1rem;
}

.card-summary-enhanced .card-title-enhanced i {
    color: var(--bs-danger); /* Usa a cor de perigo do Bootstrap */
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Estilo para o parágrafo de introdução da pontuação */
.summary-intro-text {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Destaque para a análise principal (o texto "O cenário é inadequado...") */
.summary-analysis-text {
    background-color: #f8f9fa;
    border-left: 5px solid #e0e0e0;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #343a40; 
}

/* --- DESTAQUE PARA OS RISCOS CRÍTICOS --- */
.critical-risk-highlight {
    display: flex;
    align-items: center;
    background-color: rgba(220, 53, 69, 0.08); /* Fundo vermelho bem claro */
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-left: 5px solid #dc3545; /* Borda vermelha sólida */
    padding: 1rem;
    border-radius: 0.5rem;
}

.critical-risk-highlight i {
    font-size: 1.75rem;
    color: #dc3545;
    margin-right: 1rem;
}

.critical-risk-highlight p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #58151c;
}

.critical-risk-highlight strong {
    font-size: 1.25rem;
}


/* --- SCORE CARD COM GRÁFICO DE ROSCA (DONUT CHART) --- */
.score-card-enhanced {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.score-card-enhanced h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1rem;
    /* O gradiente será definido via JS */
}

/* Círculo interno para criar o efeito "donut" */
.score-circle::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: #fff;
    border-radius: 50%;
}

.score-text {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
    font-weight: 700;
    /* A cor será definida via JS */
}

.score-scale {
    color: #6c757d;
}


/* Melhorias de acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states melhorados */
*:focus {
  outline: 2px solid #2a5298;
  outline-offset: 2px;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.5);
}

/* Micro-interações */
.btn,
.card,
.form-control,
.form-select,
.alert {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados hover melhorados */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.form-control:hover:not(:focus) {
  border-color: #adb5bd;
}

/* Indicadores visuais para campos obrigatórios */
.form-label[required]::after,
.form-label .text-danger::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

/* resultado da IA */
.resultado-ia {
  background: #f9f9f9;
  padding: 12px;
  margin-top: 10px;
  border-left: 4px solid #007bff;
  font-size: 0.95rem;
}
.plano-acao {
  border-color: #28a745;
}
.fundamentos-legais {
  padding-left: 20px;
  list-style-type: disc;
}

/* Melhorias para dark mode (preparação futura) */
@media (prefers-color-scheme: dark) {
  :root {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #ffffff;
  }
}

/* alerta da IA - dados Sensíveis */
.lia-alert {
  background-color: #fff5f5;
  border: 1px solid #f5c2c7;
  padding: 14px;
  border-radius: 8px;
  font-family: sans-serif;
  color: #842029;
  font-size: 0.9rem; /* Reduzido */
}

.lia-header {
  font-size: 1rem; /* Reduzido */
  font-weight: bold;
  margin-bottom: 6px;
}

.lia-subheader {
  font-size: 0.95rem; /* Reduzido */
  font-weight: bold;
  margin-bottom: 4px;
}

.lia-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 8px;
  font-size: 0.94rem; /* Reduzido */
}

.lia-list li {
  margin-bottom: 4px;
}

.lia-footer {
  font-size: 0.92rem; /* Reduzido */
  color: #fa0202;
}
