/* NCR Gestão v0.11.3 — corretivo visual e de navegação */

/* Cabeçalho de ecrã dos relatórios: marca visível no topo, antes dos filtros. */
.branded-page-head{align-items:flex-start!important}
.screen-brand{display:flex;align-items:center;gap:22px;min-width:0}
.screen-brand>img{width:250px;max-width:25vw;height:auto;flex:0 0 auto}
.screen-brand h1{margin:0 0 6px}
.screen-brand p{margin:0}
/* No ecrã, o cabeçalho interno dos resultados mostra o título, não duplica o logo. */
.print-report-header .report-logo{display:none!important}
.print-report-header{justify-content:flex-end!important}
.print-report-header .report-heading{text-align:right!important}

/* Assunto: apresentar apenas o nome final da pasta e evitar texto encavalitado. */
.pasta-resumo{overflow-wrap:anywhere}
.pasta-resumo span{font-weight:400}

/* Tarefas: caber integralmente no ecrã. */
.tarefas-table{table-layout:fixed!important;width:100%!important}
.tarefas-table th,.tarefas-table td{padding-left:7px!important;padding-right:7px!important}
.tarefas-table th:nth-child(1),.tarefas-table td:nth-child(1){width:92px}
.tarefas-table th:nth-child(2),.tarefas-table td:nth-child(2){width:auto;white-space:normal!important;overflow-wrap:break-word}
.tarefas-table th:nth-child(3),.tarefas-table td:nth-child(3){width:64px}
.tarefas-table th:nth-child(4),.tarefas-table td:nth-child(4){width:82px}
.tarefas-table th:nth-child(5),.tarefas-table td:nth-child(5){width:118px}
.tarefas-table th:nth-child(6),.tarefas-table td:nth-child(6){width:86px}
.tarefas-table th:nth-child(7),.tarefas-table td:nth-child(7){width:78px;white-space:nowrap}

/* Notas de Honorários: uma única caixa de ações e colunas compactas. */
.notas-table{table-layout:fixed!important;width:100%!important}
.notas-table th,.notas-table td{padding-left:6px!important;padding-right:6px!important}
.notas-table th:nth-child(1),.notas-table td:nth-child(1){width:112px}
.notas-table th:nth-child(2),.notas-table td:nth-child(2){width:auto;white-space:normal!important;overflow-wrap:break-word}
.notas-table th:nth-child(3),.notas-table td:nth-child(3){width:92px}
.notas-table th:nth-child(4),.notas-table td:nth-child(4),
.notas-table th:nth-child(5),.notas-table td:nth-child(5),
.notas-table th:nth-child(6),.notas-table td:nth-child(6){width:86px}
.notas-table th:nth-child(7),.notas-table td:nth-child(7){width:112px}
.notas-table th:nth-child(8),.notas-table td:nth-child(8){width:96px}
.acoes-nota{display:table-cell!important;white-space:nowrap;position:relative}
.acoes-menu{position:relative;display:inline-block}
.acoes-menu summary{list-style:none;cursor:pointer;border:1px solid #c9d4db;border-radius:7px;padding:6px 9px;background:#fff;color:#123f59;font-weight:600;white-space:nowrap}
.acoes-menu summary::-webkit-details-marker{display:none}
.acoes-menu-lista{position:absolute;z-index:50;right:0;top:calc(100% + 4px);min-width:205px;padding:6px;background:#fff;border:1px solid #c9d4db;border-radius:8px;box-shadow:0 6px 20px #0002}
.acoes-menu-lista a,.acoes-menu-lista button{display:block;width:100%;border:0;background:transparent;color:#123f59;text-align:left;padding:8px 10px;border-radius:5px;text-decoration:none;font:inherit;cursor:pointer}
.acoes-menu-lista a:hover,.acoes-menu-lista button:hover{background:#eef4f7}
.acoes-menu-lista .danger-link{color:#a51f1f}

/* Relatório geral: garantir a última coluna visível. */
.relatorio-geral-printable .report-table{table-layout:fixed!important;width:100%!important}
.relatorio-geral-printable .report-table th,.relatorio-geral-printable .report-table td{font-size:12px!important;padding-left:5px!important;padding-right:5px!important}
.relatorio-geral-printable .report-table th:nth-child(1),.relatorio-geral-printable .report-table td:nth-child(1){width:39%;white-space:normal!important}
.relatorio-geral-printable .report-table th:nth-child(n+2),.relatorio-geral-printable .report-table td:nth-child(n+2){width:8.714%;white-space:nowrap!important}

/* Tempo por utilizador: larguras finais de ecrã. */
.tempo-report{table-layout:fixed!important;width:100%!important}
.tempo-report th,.tempo-report td{font-size:11px!important;line-height:1.2!important;text-align:left!important;vertical-align:top!important}
.tempo-report th:nth-child(1),.tempo-report td:nth-child(1){width:86px!important;white-space:nowrap}
.tempo-report th:nth-child(2),.tempo-report td:nth-child(2){width:68px!important;white-space:nowrap;text-align:right!important}
.tempo-report th:nth-child(3),.tempo-report td:nth-child(3){width:36%!important;white-space:normal!important;overflow-wrap:break-word}
.tempo-report th:nth-child(4),.tempo-report td:nth-child(4){width:25%!important;white-space:normal!important;overflow-wrap:break-word}
.tempo-report th:nth-child(5),.tempo-report td:nth-child(5){width:auto!important;white-space:normal!important;overflow-wrap:break-word}

@media print{
  /* Ecrã/filtros desaparecem; o documento começa num cabeçalho próprio. */
  .branded-page-head,.report-filters{display:none!important}
  .printable-report{padding:0!important;border:0!important;box-shadow:none!important}
  .print-report-header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12mm;border-bottom:1.5px solid #b8c3ca;padding:0 0 4mm!important;margin:0 0 4mm!important}
  .print-report-header .report-logo{display:block!important;width:72mm!important;max-width:72mm!important;height:auto!important;margin:0!important}
  .print-report-header .report-heading{margin-left:auto!important;text-align:right!important;align-self:flex-end!important}
  .print-report-header .report-heading h2{font-size:17pt!important;margin:0 0 2mm!important}
  .print-report-header .report-heading p{font-size:9pt!important;margin:0!important}

  /* Página numerada pelo motor moderno de impressão Chromium/Edge. */
  @page{
    size:A4 portrait;
    margin:12mm 10mm 16mm;
    @bottom-right{content:"Página " counter(page) " de " counter(pages);font-size:8pt;color:#65727a}
  }
  @page tempoLandscape{
    size:A4 landscape;
    margin:10mm 10mm 14mm;
    @bottom-right{content:"Página " counter(page) " de " counter(pages);font-size:8pt;color:#65727a}
  }
  .tempo-printable{page:tempoLandscape}

  .relatorio-geral-printable .report-table th,.relatorio-geral-printable .report-table td{font-size:7.5pt!important;padding:1.6mm 1.2mm!important}
  .relatorio-geral-printable .report-table th:nth-child(1),.relatorio-geral-printable .report-table td:nth-child(1){width:38%!important}
  .relatorio-geral-printable .report-table th:nth-child(n+2),.relatorio-geral-printable .report-table td:nth-child(n+2){width:8.857%!important}

  .tempo-printable .tempo-report th,.tempo-printable .tempo-report td{font-size:8pt!important;padding:1.4mm 1.1mm!important;line-height:1.15!important}
  .tempo-printable .tempo-report th:nth-child(1),.tempo-printable .tempo-report td:nth-child(1){width:23mm!important}
  .tempo-printable .tempo-report th:nth-child(2),.tempo-printable .tempo-report td:nth-child(2){width:18mm!important;text-align:right!important}
  .tempo-printable .tempo-report th:nth-child(3),.tempo-printable .tempo-report td:nth-child(3){width:92mm!important}
  .tempo-printable .tempo-report th:nth-child(4),.tempo-printable .tempo-report td:nth-child(4){width:70mm!important}
  .tempo-printable .tempo-report th:nth-child(5),.tempo-printable .tempo-report td:nth-child(5){width:auto!important}
  .tempo-printable thead,.relatorio-geral-printable thead,.conta-corrente-printable thead{display:table-header-group}
  .tempo-printable tr,.relatorio-geral-printable tr,.conta-corrente-printable tr{break-inside:avoid}
}

@media (max-width:1100px){
 .screen-brand>img{width:190px}
 .notas-table th,.notas-table td,.tarefas-table th,.tarefas-table td{font-size:12px!important}
}
