
/* === CAPTSE PADRÃO CSS === */

/* Reset básico */
body {
  background-color: #dcdcdc; /* cinza claro */
  color: #000;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}


/* =========================================================
   Container principal (10% menor e mais refinado)
========================================================= */

.container-captse {
  max-width: 900px;              /* 1000 → 900 */
  margin: 36px 18px;             /* levemente menor */
  padding: 18px;                 /* 20 → 18 */
  background-color: #f5f5f5;
  border-radius: 10px;           /* 12 → 10 */
  box-shadow: 0 0 8px #00ff66;   /* glow mais sutil */
  color: #000;
  font-size: 0.95rem;            /* reduz escala geral */
}


/* =========================================================
   Labels (sem bold e mais elegantes)
========================================================= */

label,
.form-label {
  color: #333333;
  font-weight: 500;              /* remove bold pesado */
  margin-bottom: 5px;
  display: block;
  font-size: 0.9rem;             /* 10% menor */
}


/* =========================================================
   Inputs e textareas (proporcionalmente menores)
========================================================= */

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 9px;                  /* 10 → 9 */
  margin-bottom: 13px;           /* 15 → 13 */
  background-color: #fff;
  color: #000;
  border: 1.8px solid #ccc;      /* levemente mais fino */
  border-radius: 7px;            /* 8 → 7 */
  box-sizing: border-box;
  font-size: 0.95rem;            /* 1rem → 0.95rem */
  transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #00ff66;
  outline: none;
}
/* Grupo de Botões */
.grupo-botoes-captse {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

/* Estilo base para todos os botões */
.botao-captse,
.botao-secundario-captse,
.botao-ia-captse,
.botao-doc-captse,
.botao-proximo-captse,
.botao-voltar-captse {
  background-color: #555;
  color: #fff;
  border: none;
  padding: 15px 30px; /* aumento de 50% */
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem; /* maior legibilidade */
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

/* Hover e Focus para todos os botões */
.botao-captse:hover,
.botao-secundario-captse:hover,
.botao-ia-captse:hover,
.botao-doc-captse:hover,
.botao-proximo-captse:hover,
.botao-voltar-captse:hover,
.botao-captse:focus,
.botao-secundario-captse:focus,
.botao-ia-captse:focus,
.botao-doc-captse:focus,
.botao-proximo-captse:focus,
.botao-voltar-captse:focus {
  background-color: #00e65c; /* verde neon escuro */
  color: #000;
}

/* Diferenciações opcionais se quiser refinar mais futuramente */
/* .botao-secundario-captse { background-color: #444; }
   .botao-ia-captse { background-color: #004d2d; }
   .botao-doc-captse { background-color: #336666; }
   .botao-voltar-captse { background-color: #777; }
   etc...
*/

/* Card padrão */
.card-captse {
  background-color: #ffffff;     /* fundo branco */
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid #dcdcdc;     /* borda cinza padrão */
  box-shadow: none;              /* remove glow verde */
}
/* Tabela */
.tabela-captse {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  background-color: #222;
  color: #fff;
  font-size: 0.95rem;
}

.tabela-captse th,
.tabela-captse td {
  padding: 12px;
  border: 1px solid #444;
}

.tabela-captse th {
  background-color: #00ff66;
  color: #000;
}

/* Painel de dica assistente */
#painel-dica-assistente {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 260px;
  max-height: 400px;
  overflow-y: auto;
  background-color: #1c1c1c;
  color: #fff;
  border: 2px solid #00ff66;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 8px #00ff66;
  z-index: 9998;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Mensagem de sucesso flutuante no topo direito */
.mensagem-sucesso-captse {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #00cc55; /* Verde neon mais escuro */
  color: #000;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 0 12px #00ff66;
  z-index: 9999;
  font-weight: bold;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.mensagem-sucesso-captse .fechar-msg {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #000;
  font-weight: 400 !important;
  margin-left: auto;
}

/* Mensagens do sistema (bloco interno da tela) */
.mensagem-sucesso,
.mensagem-erro {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: bold;
}

.mensagem-sucesso {
  background-color: #00ff66;
  color: #000;
}

.mensagem-erro {
  background-color: #ff4444;
  color: #fff;
}


/* Scrollbar custom */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #00ff66;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background-color: #222;
}
/* === Campos padrão Captse explícitos === */
.campo-captse {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  background-color: #fff;
  color: #000;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
  transition: border-color .3s ease;
}
.campo-captse:focus { border-color: #00ff66; outline: none; }

.select-captse { /* se quiser granularidade para selects */
  appearance: none;
  background-image: none; /* espaço p/ ícone custom no futuro */
}

/* Ações na tabela Concorrentes */
.tabela-captse td.acoes-captse {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;          /* evita quebra em duas linhas */
  padding-top: 6px;             /* pequeno respiro vertical */
  padding-bottom: 6px;
}

/* Botão compacto para ícones (somente nesta coluna) */
.tabela-captse td.acoes-captse .botao-captse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  height: 28px;                 /* menor */
  padding: 0 8px;               /* compacto */
  font-size: 12px;              /* menor */
  border-radius: 8px;
}

/* Se quiser ainda menor/só quadradinho, use botao-icone */
.tabela-captse td.acoes-captse .botao-icone {
  width: 28px;                  /* quadrado */
  padding: 0;                   /* só o ícone */
}

/* coloque este override no FINAL do captse.css */
.botao-captse,
.botao-secundario-captse,
.botao-ia-captse,
.botao-doc-captse,
.botao-proximo-captse,
.botao-voltar-captse {
  padding: 12px 24px;   /* 15→12px e 30→24px (−20%) */
  font-size: 0.88rem;   /* 1.1rem → 0.88rem (−20%) */
}

/* Textareas altas – uso pontual em telas de redação longa */
.textarea-alta-captse--grande { min-height: 420px; }   /* Referencial Teórico */
.textarea-alta-captse--media  { min-height: 320px; }   /* Bibliografia */

#painel-dica-assistente .bloco-dica-captse { padding: 10px 12px; }

/* Ajuste do balão de dica dentro do painel lateral */
#painel-dica-assistente .bloco-dica-captse {
  max-width: 240px !important;      /* reduz largura total do balão */
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  font-size: 0.9rem !important;     /* mantém o texto menor */
  line-height: 1.4 !important;
  background-color: #1c1c1c !important;
  color: #fff !important;
  border: 2px solid #00ff66 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  box-shadow: 0 0 8px #00ff66 !important;
  box-sizing: border-box;
}
/* ===== Correção das bordas duplas no painel de dicas ===== */

/* Remove a borda interna do balão */
#painel-dica-assistente .bloco-dica-captse {
  border: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
  padding: 10px 14px !important;
}

/* Mantém o contorno verde apenas no painel */
#painel-dica-assistente {
  border: 2px solid #00ff66 !important;
  box-shadow: 0 0 8px #00ff66 !important;
  background-color: #1c1c1c !important;
  border-radius: 12px !important;
}

/* ===========================================
   Proteção da Barra de Etapas sem quebrar hover
   =========================================== */

/* Remove apenas o que conflita (não usa all:unset) */
.barra-etapas-captse,
.barra-etapas-captse .etapa {
    font-family: Arial, sans-serif !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

/* Restaura estilo base */
.barra-etapas-captse {
    position: sticky !important;
    top: 50px !important;
    z-index: 999 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    padding: 10px 15px !important;
    background-color: #fff !important;
    border-bottom: 2px solid #00ff66 !important;
}

.barra-etapas-captse .etapa {
    display: inline-block !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 11px !important;

    border-width: 2px !important;
    border-style: solid !important;

    transition: all .2s ease-in-out !important;
}

/* Reforça cores das etapas */
.etapa-atual {
    background: #00ff66 !important;
    color: #000 !important;
    font-weight: bold !important;
    border-color: #00ff66 !important;
    box-shadow: 0 0 12px rgba(0,255,102,0.6) !important;
}

.etapa-concluida {
    background: #ccffcc !important;
    color: #000 !important;
    border-color: #00ff66 !important;
}

.etapa-bloqueada {
    background: #f8f8f8 !important;
    border-color: #ccc !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Hover preservado */
.barra-etapas-captse .etapa:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 0 10px #00ff66 !important;
}

/* =========================================================
   CAPTSE - COMPLEMENTOS PARA METODOLOGIA + MENSAGENS
   Cole no FINAL do captse.css
========================================================= */

/* Título padrão das telas */
.titulo-captse {
  margin: 0 0 18px 0;
  font-size: 1.35rem;
  font-weight: 500;
  color: #000;
}

/* Compatibilidade com classes "bootstrap-like" sem Bootstrap */
.form-group { margin-bottom: 16px; }
.mb-3 { margin-bottom: 1rem; }

/* Corrige cor inválida no card (faltava #) */
/* .card-captse { background-color: #c9c3c3; } */
.card-captse { background-color: #ffffff; }

/* ==========================
   Toast Captse (JS)
   ========================== */

/* Container do toast (substitui inline do #mensagem-topo) */
#mensagem-topo.captse-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: none; /* controlado por JS */
  width: auto;
  max-width: 740px;
  padding: 0;
}

/* Caixa do toast */
.captse-toast {
  padding: 12px 16px;
  border-radius: 12px;
  min-width: 280px;
  max-width: 740px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-weight: 700;
  text-align: center;
  white-space: pre-wrap;
  box-sizing: border-box;
}

/* Tipos */
.captse-toast--sucesso { background: #00ff66; color: #000; }
.captse-toast--erro    { background: #ff4d4d; color: #000; }
.captse-toast--aviso   { background: #ffcc00; color: #000; }

/* ==========================
   Componente mensagens.php
   ========================== */

.mensagem-captse {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0 18px 0;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0,0,0,.15);
}

.mensagem-captse button {
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
}

.accordion-captse{
  background:#ffffff;
  border:1px solid #dcdcdc;
  border-radius:12px;
  padding:12px 14px;
}

.accordion-captse > summary{
  cursor:pointer;
  font-weight:700;
  list-style:none;
}

.accordion-captse > summary::-webkit-details-marker{
  display:none;
}

/* Tipos do mensagens.php ( imprime mensagem-sucesso/mensagem-erro) */
.mensagem-captse.mensagem-sucesso { background: #00ff66; color: #000; }
.mensagem-captse.mensagem-erro    { background: #ff4444; color: #fff; }
.mensagem-captse.mensagem-aviso   { background: #ffcc00; color: #000; }

.documento-cientifico {
    font-family: "Times New Roman", serif;
    line-height: 1.6;
    font-size: 15px;
    color: #222;
}

.titulo-projeto {
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
    margin-top: 10px;
}

.secao-documento {
    margin-top: 35px;
    margin-bottom: 35px;
}

.secao-documento h4 {
    font-weight: bold;
    margin-bottom: 15px;
}

.secao-documento p {
    text-align: justify;
    margin-bottom: 15px;
}

.secao-documento ul {
    margin-left: 20px;
    margin-top: 10px;
}

.secao-documento li {
    margin-bottom: 8px;
}

/* TESTSE DE MELHORIA NOS BOTÕES */

/* =========================================================
   CAPTSE – Toolbar de botões (UI comercial)
   - botões menos largos
   - texto longo com reticências (...)
   - sem negrito pesado
   - Opção B: Gravar primário / Próximo neutro
   - Voltar + Próximo na linha de baixo (à direita)
========================================================= */

.grupo-botoes-captse{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:18px;
}

/* Base unificada só dentro do grupo */
.grupo-botoes-captse .botao-captse,
.grupo-botoes-captse .botao-secundario-captse,
.grupo-botoes-captse .botao-ia-captse,
.grupo-botoes-captse .botao-doc-captse,
.grupo-botoes-captse .botao-proximo-captse,
.grupo-botoes-captse .botao-voltar-captse{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:40px;
  padding:0 14px;
  border-radius:12px;

  font-size:0.84rem;
  font-weight:500 !important;
  letter-spacing:.2px;

  background:#4a4a4a;
  color:#fff;

  border:none;
  box-shadow:0 6px 16px rgba(0,0,0,.14);
  transition:transform .12s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  text-decoration:none;

  width:165px;
  max-width:200px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Hover/Focus (verde no hover para todos) */
.grupo-botoes-captse .botao-captse:hover,
.grupo-botoes-captse .botao-secundario-captse:hover,
.grupo-botoes-captse .botao-ia-captse:hover,
.grupo-botoes-captse .botao-doc-captse:hover,
.grupo-botoes-captse .botao-proximo-captse:hover,
.grupo-botoes-captse .botao-voltar-captse:hover,
.grupo-botoes-captse .botao-captse:focus,
.grupo-botoes-captse .botao-secundario-captse:focus,
.grupo-botoes-captse .botao-ia-captse:focus,
.grupo-botoes-captse .botao-doc-captse:focus,
.grupo-botoes-captse .botao-proximo-captse:focus,
.grupo-botoes-captse .botao-voltar-captse:focus{
  background:#00e65c;
  color:#000;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.22);
  outline:none;
}

/* Estado ativo */
.grupo-botoes-captse .botao-captse:active,
.grupo-botoes-captse .botao-secundario-captse:active,
.grupo-botoes-captse .botao-ia-captse:active,
.grupo-botoes-captse .botao-doc-captse:active,
.grupo-botoes-captse .botao-proximo-captse:active,
.grupo-botoes-captse .botao-voltar-captse:active{
  transform:translateY(0);
  box-shadow:0 6px 16px rgba(0,0,0,.14);
}

/* ===== Opção B: Gravar primário / Próximo neutro ===== */

/* Gravar (submit) primário */
.grupo-botoes-captse button[type="submit"].botao-captse{
  background:#00ff66 !important;
  color:#000 !important;
}
.grupo-botoes-captse button[type="submit"].botao-captse:hover,
.grupo-botoes-captse button[type="submit"].botao-captse:focus{
  background:#00e65c !important;
  color:#000 !important;
}

/* Exportar como outline (texto cinza escuro) */
.grupo-botoes-captse .botao-doc-captse{
  background:transparent !important;
  border:2px solid #00ff66 !important;
  color:#2f2f2f !important;   /* cinza escuro refinado */
  box-shadow:0 6px 16px rgba(0,0,0,.10);
}

.grupo-botoes-captse .botao-doc-captse:hover,
.grupo-botoes-captse .botao-doc-captse:focus{
  background:#00ff66 !important;
  color:#000 !important;
}

/* Voltar um pouco mais claro/leve */
.grupo-botoes-captse .botao-voltar-captse{
  background:#5a5a5a !important;
}

/* Próximo neutro por padrão + levemente maior */
.grupo-botoes-captse .botao-proximo-captse{
  background:#4a4a4a !important;
  color:#fff !important;
  width:178px;         /* ~+13px */
  max-width:210px;
}

/* ===== Navegação na linha de baixo, alinhada à direita =====
   (empurra Voltar para a direita e Próximo fica ao lado) */
.grupo-botoes-captse .botao-voltar-captse{
  margin-left:auto;
}
.grupo-botoes-captse .botao-proximo-captse{
  margin-left:0;
}

/* Responsivo: no mobile, botões ocupam a largura disponível */
@media (max-width: 720px){
  .grupo-botoes-captse .botao-captse,
  .grupo-botoes-captse .botao-secundario-captse,
  .grupo-botoes-captse .botao-ia-captse,
  .grupo-botoes-captse .botao-doc-captse,
  .grupo-botoes-captse .botao-proximo-captse,
  .grupo-botoes-captse .botao-voltar-captse{
    width:100%;
    max-width:100%;
    margin-left:0; /* no mobile não empurra pra direita */
  }
}
/* =========================================================
   Refinamento DEFINITIVO:
   Voltar + Próximo SEMPRE na linha de baixo (à direita)
   usando order (sem mexer no HTML)
========================================================= */

/* por padrão, tudo é "linha 1" */
.grupo-botoes-captse > a,
.grupo-botoes-captse > button{
  order: 1;
}

/* cria um "quebra linha" ENTRE linha 1 e linha 2 */
.grupo-botoes-captse::after{
  content:"";
  flex: 0 0 100%;   /* ocupa uma linha inteira */
  order: 2;         /* fica depois dos botões da linha 1 */
  height: 0;
}

/* navegação vai para a linha 2 */
.grupo-botoes-captse .botao-voltar-captse,
.grupo-botoes-captse .botao-proximo-captse{
  order: 3;
}

/* alinha a navegação à direita */
.grupo-botoes-captse .botao-voltar-captse{
  margin-left: auto !important;
}

/* Próximo levemente maior */
.grupo-botoes-captse .botao-proximo-captse{
  width: 178px;      /* mantém seu ajuste */
  max-width: 210px;
}

/* Mobile: volta para empilhar tudo (sem quebra forçada) */
@media (max-width: 720px){
  .grupo-botoes-captse::after{ display:none; }
  .grupo-botoes-captse .botao-voltar-captse{ margin-left:0 !important; }
}
/* =========================================
   Restaura hover de Voltar e Próximo
========================================= */

.grupo-botoes-captse .botao-voltar-captse:hover,
.grupo-botoes-captse .botao-proximo-captse:hover,
.grupo-botoes-captse .botao-voltar-captse:focus,
.grupo-botoes-captse .botao-proximo-captse:focus{
  background:#00e65c !important;
  color:#000 !important;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.22);
}

/* =========================================================
   CAPTSE – Ajuste: Voltar/Próximo menores (refino visual)
   Cole no FINAL do captse.css
========================================================= */

/* Base já existe: .grupo-botoes-captse ... width:165px etc.
   Aqui só reduz a navegação (Voltar/Próximo) */
.grupo-botoes-captse .botao-voltar-captse,
.grupo-botoes-captse .botao-proximo-captse{
  width: 140px;        /* menor que os demais */
  max-width: 160px;
  padding: 0 12px;     /* menos "gordo" */
  height: 38px;        /* levemente menor */
  font-size: 0.82rem;  /* um tiquinho menor */
}

/* Se o Próximo você quer “levemente maior” que Voltar */
.grupo-botoes-captse .botao-proximo-captse{
  width: 150px;
  max-width: 170px;
}

/* No mobile continua 100% (mantém sua regra) */
@media (max-width: 720px){
  .grupo-botoes-captse .botao-voltar-captse,
  .grupo-botoes-captse .botao-proximo-captse{
    width: 100%;
    max-width: 100%;
    height: 40px;
    font-size: 0.88rem;
  }
}
.grupo-botoes-captse .botao-voltar-captse,
.grupo-botoes-captse .botao-proximo-captse{
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}