/* Sistema AIA - Análise de Riscos da IA - Estilos Profissionais */
/* Estilos gerais */
* Reset e configurações base */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}


/* 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 melhorado */
.header-gradient {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}

.header-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.header-gradient .container {
  position: relative;
  z-index: 1;
}

.header-gradient h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInDown 1s ease-out;
}

.header-gradient p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.2s both;
}


.footer-link:hover {
    text-decoration: underline;
    color: #d1e0ff;
}

.col-vertical-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Alternativa comum para abas de navegação */
.v-tabs .v-link {
  color: #FFFFFF; /* Define a cor do texto para branco */
}

.nav-tabs .nav-link {
  color: #FFFFFF; /* Define a cor do texto para branco */
}




/* 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:not([class*="bg-"]) {
  background: linear-gradient(135deg, #026bd3 30%, #130686 100%);
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none;
  padding: 1.5rem; 
}

.card-body {
  padding: 1.5rem;
}

/* 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;
}


.question-group .form-text::before {
  background-color: #e9f7fe;
  border-left: 4px solid #0dcaf0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #0c5460;
  margin-top: 8px;
}

/* Resultados */
#risk-level-alert {
    padding: 20px;
    border-radius: 8px;
}

#risk-level-alert.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

#risk-level-alert.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

#risk-level-alert.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

#risk-level-alert.alert-dark {
    background-color: #d3d3d4;
    border-color: #bcbebf;
    color: #141619;
}



/* 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: 24px;
  border-radius: 12px;
  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;
  height: 100%; 
}

.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;
  }
}


/* 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;
  }
}



/* 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;
  }
}

.action-item h5 {
    color: #0d6efd;
    margin-bottom: 10px;
}


/* 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;
}


/* Botões de navegação */
/* 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;
}



/* 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;
  }

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

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




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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}


@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    transform: scale(1.02);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(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;
}


@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 */
/* Impressão e Geração de PDF */
@media print {
  /* --- Elementos a serem Escondidos --- */
  .header-gradient,
  #intro-section,
  #questionnaire-section,
  .no-print, /* Classe genérica para botões e outros elementos não imprimíveis */
  #resultsTab, /* A barra de navegação das abas */
  #ai-insights-preview,
  .loading-overlay {
    display: none !important;
  }

  /* --- Layout Geral --- */
  body {
    background-color: white;
    font-size: 10pt; /* Reduz um pouco a fonte para caber mais conteúdo */
  }

  #results-section {
    display: block !important;
    box-shadow: none;
    border: none;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* --- Controle de Quebra de Página (Aprimoramento Principal) --- */
  
  /* Evita que um card ou uma linha de tabela seja cortado no meio */
  .card, .action-item, .question-group, tr {
    page-break-inside: avoid;
  }

  /* Evita que a página quebre logo depois de um título */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  

  /* Garante que o conteúdo das abas seja visível para impressão */
  .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

.rendering-pdf {
  background: white !important;
  color: black !important;
  font-size: 10pt;
}

.rendering-pdf .container {
  max-width: 100% !important;
  padding: 0 !important;
}

.rendering-pdf .card,
.rendering-pdf .question-group,
.rendering-pdf tr {
  page-break-inside: avoid;
  break-inside: avoid;
}

.rendering-pdf h1,
.rendering-pdf h2,
.rendering-pdf h3 {
  page-break-after: avoid;
}

.rendering-pdf .no-print,
.rendering-pdf .header-gradient,
.rendering-pdf #intro-section,
.rendering-pdf #questionnaire-section,
.rendering-pdf #resultsTab,
.rendering-pdf #ai-insights-preview,
.rendering-pdf .loading-overlay {
  display: none !important;
}



.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;
}


/* --- Controle de Quebra de Página para PDF --- */
.avoid-page-break {
    page-break-inside: avoid !important;
}

.force-page-break-before {
    page-break-before: always !important;
}

@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);
  }
}


/* COLE ESTE NOVO BLOCO NO SEU styles.css */

/* --- Estilos para os Itens de Recomendação Geral --- */
.recommendation-item {
    background-color: #f8f9fa;
    border-left: 5px solid #0d6efd; /* Azul primário */
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recommendation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left-color: #0b5ed7; /* Azul mais escuro no hover */
}

.recommendation-item .recommendation-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.recommendation-item .recommendation-title i {
    color: #0d6efd;
    margin-right: 0.75rem;
}

.recommendation-item .recommendation-description {
    margin-bottom: 0;
    padding-left: 1.75rem; /* Alinha com o texto do título */
    color: #495057;
    font-size: 0.95rem;
}

/* COLE ESTE NOVO BLOCO NO SEU styles.css */

/* --- Estilos para o Roadmap "Próximos Passos" --- */
.next-steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.next-step-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.next-step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.next-step-item .step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.next-step-item .step-content h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #212529;
}

.next-step-item .step-content p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* --- Estilos para os Cards de Prioridade (Responsáveis) --- */

.priority-card {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    overflow: hidden; /* Para o cabeçalho arredondado funcionar */
}

.priority-card .priority-header {
    padding: 1rem 1.5rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.priority-card .priority-header i {
    margin-right: 0.75rem;
}

.priority-card.priority-high .priority-header { background-color: #dc3545; }
.priority-card.priority-medium .priority-header { background-color: #fd7e14; }
.priority-card.priority-low .priority-header { background-color: #198754; }

.priority-card .list-group-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.priority-card .list-group-item:last-child {
    border-bottom: none;
}

.priority-card .action-title {
    font-weight: 500;
}

.priority-card .action-details {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 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;
}


/* COLE ESTE NOVO BLOCO NO SEU styles.css */

/* --- Estilos para a Caixa de Análise da IA em Tempo Real --- */
.ai-analysis-box {
    display: none; /* Começa oculto */
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid;
    animation: fadeIn 0.5s ease-out;
}

.ai-analysis-box.warning {
    background-color: #fff8e1; /* Amarelo claro */
    border-color: #ffc107; /* Amarelo */
}

.ai-analysis-box.critical {
    background-color: #fbe9e7; /* Vermelho claro */
    border-color: #dc3545; /* Vermelho */
}

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

.ai-analysis-box .ai-header .icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.ai-analysis-box.warning .ai-header {
    color: #b08800;
}

.ai-analysis-box.critical .ai-header {
    color: #dc3545;
}

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

.ai-analysis-box .ai-recommendations h6 {
    font-weight: bold;
    margin-bottom: 8px;
}

.ai-analysis-box .ai-recommendations ul {
    list-style-type: '✔  ';
    padding-left: 20px;
    margin-bottom: 0;
}

/* 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);
}

/* 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;
}