/* Painel — complementa style.css (mesmas variáveis/identidade do formulário) */

.painel-container { max-width: 1280px; }

.painel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.usuario { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.usuario-nome { font-weight: 600; }
.perfil {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.perfil-gestor { background: var(--escuro); }
.sair { color: #fff; font-weight: 600; text-decoration: underline; }

/* ---- Menu (abaixo do cabeçalho) ---- */
.menu {
  display: flex; gap: 4px;
  padding: 0 32px;
  background: var(--branco);
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;              /* celular: rola para o lado se não couber */
}
.menu a {
  padding: 14px 14px 12px;
  font-size: 14px; font-weight: 600;
  color: var(--cinza-sub); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.menu a:hover { color: var(--escuro); }
.menu a.ativo { color: var(--escuro); border-bottom-color: var(--vermelho); }

a { color: var(--vermelho); }
.voltar { font-size: 14px; font-weight: 600; text-decoration: none; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; white-space: nowrap; }

/* ---- Login ---- */
.login-caixa { max-width: 420px; margin: 24px auto; text-align: center; }
.login-caixa p { margin-bottom: 16px; }
.btn-google {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--branco); color: var(--texto);
  border: 1px solid var(--borda); border-radius: 6px;
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  text-decoration: none; margin-top: 8px;
}
.btn-google:hover { background: var(--fundo); }

.alerta { border-radius: 6px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; text-align: left; }
.alerta-erro { background: #fef2f2; border: 1px solid #fecaca; color: var(--vermelho-hover); }

/* ---- Cartões ---- */
.cartoes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.cartao {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--readonly-bg);
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--borda);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--texto);
  text-decoration: none;
}
a.cartao:hover { background: var(--fundo); }
.cartao.ativo { outline: 2px solid var(--vermelho); outline-offset: -1px; }
.cartao-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.cartao-rotulo { font-size: 12px; color: var(--cinza-sub); font-weight: 600; }
.cartao-total { border-left-color: var(--escuro); }
.cartao-pct { border-left-color: var(--vermelho); }
.barra { display: block; height: 6px; background: #e5e7eb; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.barra span { display: block; height: 100%; background: var(--vermelho); }

/* Cores por situação (cartão = borda; selo = fundo) */
.cartao.sit-sem_link      { border-left-color: #9ca3af; }
.cartao.sit-link_gerado   { border-left-color: #2563eb; }
.cartao.sit-link_enviado  { border-left-color: #d97706; }
.cartao.sit-link_expirado { border-left-color: #b91c1c; }
.cartao.sit-concluido     { border-left-color: #15803d; }

.sit {
  display: inline-block; white-space: nowrap;
  border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-weight: 700;
  background: #f3f4f6; color: #4b5563;
}
.sit.sit-link_gerado         { background: #dbeafe; color: #1e40af; }
.sit.sit-link_enviado        { background: #fef3c7; color: #92400e; }
.sit.sit-link_expirado       { background: #fee2e2; color: #991b1b; }
.sit.sit-aguardando_aprovacao{ background: #ede9fe; color: #5b21b6; }
.sit.sit-concluido           { background: #dcfce7; color: #166534; }

.tag { border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.tag-ativo   { background: #dcfce7; color: #166534; }
.tag-inativo { background: #fee2e2; color: #991b1b; }

/* só visual: quem garante as maiúsculas é o servidor */
.campo-maiusculo { text-transform: uppercase; }
.campo-maiusculo::placeholder { text-transform: none; }

/* Ícone de ação na linha da tabela (ex.: lápis = editar) */
.tabela .col-acao { width: 1%; text-align: center; white-space: nowrap; }
.tabela td.col-acao a.icone-acao + a.icone-acao { margin-left: 4px; }
.tabela td a.icone-acao {
  display: inline-flex; padding: 4px; border-radius: 4px;
  color: var(--cinza-sub);
}
.tabela td a.icone-acao:hover { color: var(--vermelho); background: #fee2e2; }

/* ---- Filtros ---- */
.filtros {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--readonly-bg);
  border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 14px; margin-bottom: 16px;
}
.filtro { display: flex; flex-direction: column; min-width: 140px; flex: 1; }
.filtro-busca { flex: 2; min-width: 200px; }
.filtro label { margin-bottom: 4px; }
.filtro select, .filtro input[type=text] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--borda); border-radius: 6px;
  font-size: 14px; background: var(--branco);
}
.filtro-botoes { flex-direction: row; gap: 8px; flex: 0 0 auto; min-width: 0; }
/* <a class="btn"> e <button class="btn"> com a mesma medida: fonte, altura e borda iguais */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: 40px;
  background: var(--vermelho); color: #fff;
  border: 1px solid var(--vermelho); border-radius: 6px;
  padding: 0 18px;
  font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--vermelho-hover); border-color: var(--vermelho-hover); }
.btn-sec { background: var(--branco); color: var(--texto); border-color: var(--borda); }
.btn-sec:hover { background: var(--fundo); }

/* ---- Tabela ---- */
.contagem { font-size: 13px; color: var(--cinza-sub); margin-bottom: 8px; }
.tabela-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 6px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th {
  background: var(--escuro); color: #fff;
  text-align: left; font-weight: 600; font-size: 13px;
  padding: 10px 12px; white-space: nowrap;
}
.tabela td { padding: 10px 12px; border-top: 1px solid #e5e7eb; vertical-align: top; }
.tabela tbody tr:nth-child(even) { background: var(--readonly-bg); }
.tabela tbody tr:hover { background: #fef2f2; }
.tabela td a { font-weight: 600; text-decoration: none; }
.tabela td a:hover { text-decoration: underline; }
.vazio { padding: 32px; text-align: center; color: var(--cinza-sub); border: 1px dashed var(--borda); border-radius: 6px; }

/* ---- Detalhe ---- */
.detalhe-topo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 24px; }
.detalhe-topo h2 { font-size: 24px; color: var(--escuro); }
.dados {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 24px;
}
.dados dt { font-size: 12px; font-weight: 600; color: var(--cinza-sub); }
.dados dd { font-size: 15px; }
.chip {
  display: inline-block; background: var(--fundo); border: 1px solid #e5e7eb;
  border-radius: 4px; padding: 1px 8px; margin: 0 4px 4px 0; font-size: 13px; font-weight: 600;
}
.lista-simples { list-style: none; }
.lista-simples li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.lista-tipo { display: inline-block; min-width: 110px; font-size: 12px; font-weight: 700; color: var(--cinza-sub); }

.tok { font-size: 12px; font-weight: 700; }
.tok-válido { color: #1e40af; }
.tok-usado { color: #166534; }
.tok-expirado { color: #6b7280; }
.tok-bloqueado { color: #991b1b; }

.envio { border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 14px; margin-bottom: 8px; }
.envio summary { cursor: pointer; font-weight: 600; }
.envio .dados { margin-top: 12px; }

/* ---- Ações / edição (gestor) ---- */
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.acoes form { display: flex; margin: 0; }
.btn:disabled { opacity: .6; cursor: wait; }
.alerta-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.barra-lista { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.barra-lista .contagem { margin-bottom: 0; }
.select-campo {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--borda); border-radius: 6px;
  font-size: 15px; background: var(--branco);
}
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check-envio { margin-bottom: 16px; }
.check {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: 14px; margin: 0;
  background: var(--readonly-bg); border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 6px 10px; cursor: pointer;
}

@media (max-width: 560px) {
  body.painel { padding: 0; }
  .painel-container { border-radius: 0; }
  .header { flex-direction: column; }
  .header-logo { min-width: 0; }
  .body { padding: 20px 16px; }
  .menu { padding: 0 8px; }
}

/* =============================================================
   app-admissao — acréscimos ao painel copiado do app-cadastro
   ============================================================= */
.faixa-dev-painel { max-width: 1280px; }

/* Status do processo: cartão = borda esquerda; selo = fundo */
.cartao.st-convite_criado           { border-left-color: #9ca3af; }
.cartao.st-aguardando_preenchimento { border-left-color: #2563eb; }
.cartao.st-em_preenchimento         { border-left-color: #0891b2; }
.cartao.st-aguardando_analise       { border-left-color: #7c3aed; }
.cartao.st-em_correcao              { border-left-color: #d97706; }
.cartao.st-aprovado                 { border-left-color: #15803d; }
.cartao.st-rejeitado                { border-left-color: #b91c1c; }
.cartao.st-expirado                 { border-left-color: #6b7280; }
.cartao.st-expurgado                { border-left-color: #1a1d29; }

.sit.st-aguardando_preenchimento { background: #dbeafe; color: #1e40af; }
.sit.st-em_preenchimento         { background: #cffafe; color: #155e75; }
.sit.st-aguardando_analise       { background: #ede9fe; color: #5b21b6; }
.sit.st-em_correcao              { background: #fef3c7; color: #92400e; }
.sit.st-aprovado                 { background: #dcfce7; color: #166534; }
.sit.st-rejeitado                { background: #fee2e2; color: #991b1b; }
.sit.st-expirado                 { background: #e5e7eb; color: #374151; }
.sit.st-expurgado                { background: #1a1d29; color: #fff; }

/* retenção (etapa 8): previsão de expurgo / aguardando download, embaixo do status */
.retencao { display: inline-block; margin-top: 4px; font-size: 12px; color: #6b7280; white-space: nowrap; }
.retencao-aguarda { color: #92400e; font-weight: 700; }

.tag-mod { background: var(--fundo); border: 1px solid #e5e7eb; color: var(--escuro); }

/* Texto longo (ex.: e-mail com +teste) quebra dentro da própria coluna, sem invadir a vizinha */
.dados > div { min-width: 0; }
.dados dd { overflow-wrap: anywhere; }

.alerta-aviso { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.form-estreito { max-width: 720px; }
.rodape-acoes { border-top: 1px solid #e5e7eb; padding-top: 20px; }
textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--borda); border-radius: 6px;
  font-family: inherit; font-size: 15px; resize: vertical;
}
textarea:focus { outline: 2px solid var(--vermelho); outline-offset: -1px; border-color: var(--vermelho); }
.btn-perigo { background: #991b1b; border-color: #991b1b; }
.btn-perigo:hover { background: #7f1d1d; border-color: #7f1d1d; }

/* ---- Etapa 7: análise ---- */
.bloco-dados { margin-bottom: 10px; }
.bloco-dados summary { color: var(--escuro); }
.dep-tabela { margin-top: 12px; }
.lista-pendencias { margin: 6px 0 0 20px; }
.grid-internos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 20px; margin-bottom: 8px;
}
.grid-internos > .campo { min-width: 0; }
.form-internos input[type=date] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 6px;
  font-family: inherit; font-size: 15px; background: var(--branco);
}
.form-internos input:disabled { background: var(--readonly-bg); color: var(--cinza-sub); }
.checklist { margin: 8px 0 24px; }
.checklist-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.checklist-topo h3 { font-size: 16px; color: var(--escuro); }
.btn-peq { min-height: 32px; padding: 0 12px; font-size: 13px; }
.tabela .col-sn { width: 1%; white-space: nowrap; }
.sn { display: inline-flex; align-items: center; gap: 4px; margin: 0 12px 0 0; font-size: 14px; font-weight: 500; color: var(--texto); cursor: pointer; }
.tabela tr.com-erro td { background: #fef2f2; }

/* ---- Etapa 7b: valor com "R$" fixo, aprovar, documentos ---- */
.campo-moeda { display: flex; align-items: stretch; }
.campo-moeda .prefixo {
  display: flex; align-items: center; padding: 0 10px;
  border: 1px solid var(--borda); border-right: 0; border-radius: 6px 0 0 6px;
  background: var(--readonly-bg); color: var(--cinza-sub); font-size: 15px;
}
.campo-moeda input { border-radius: 0 6px 6px 0 !important; min-width: 0; flex: 1; text-align: right; }
.btn-ok { background: #166534; border-color: #166534; }
.btn-ok:hover { background: #14532d; border-color: #14532d; }
.tabela-docs td { vertical-align: middle; }

/* ---- Histórico compacto: 5 mais recentes + "ver completo"; RH em destaque ---- */
.historico { list-style: none; margin: 0; padding: 0; }
.historico li {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid #eef0f3; font-size: 14px;
}
.hist-quando { font-variant-numeric: tabular-nums; color: var(--cinza-sub); font-size: 13px; white-space: nowrap; }
.hist-o-que { min-width: 0; overflow-wrap: anywhere; }
.hist-quem { color: var(--cinza-sub); }
.hist-vezes { font-weight: 600; }
.historico li.hist-rh .hist-o-que { color: var(--escuro); font-weight: 600; }
.historico li.hist-rh .hist-quem, .historico li.hist-rh .hint { font-weight: 400; }
.historico li.hist-profissional .hist-o-que,
.historico li.hist-sistema .hist-o-que { color: var(--cinza-sub); }
.hist-mais { margin-top: 6px; }
.hist-mais summary { cursor: pointer; color: var(--vermelho); font-size: 14px; padding: 6px 0; }
.hist-mais summary:hover { text-decoration: underline; }

/* ---- Decisão: aprovar / devolver / rejeitar (radio) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.opcoes-decisao { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.opcao-decisao {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0;
  border: 1px solid var(--borda); border-radius: 8px; background: var(--branco);
  cursor: pointer; font-weight: 400; color: var(--texto);
}
.opcao-decisao input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--vermelho); }
.opcao-decisao > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opcao-decisao strong { color: var(--escuro); }
.opcao-decisao:has(input:checked) { border-color: var(--vermelho); background: #fdf3f2; }
.opcao-decisao.desativada { cursor: not-allowed; background: var(--readonly-bg); }
.opcao-decisao.desativada strong { color: var(--cinza-sub); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.tabela-docs .hint { overflow-wrap: anywhere; }
