/* ---------- Páginas de conta (entrar, palavra-passe) — sem MudBlazor ---------- */
.conta-fundo {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 16px;
}
.conta-cartao {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 24px rgba(0, 0, 0, .4);
    border-top: 6px solid transparent;
    border-image: linear-gradient(90deg, #B5D334, #2DBE8C) 1;
    padding: 32px;
}
.conta-marca { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 20px; color: #111; }
.conta-cartao h1 { font-size: 1.5rem; margin: 0 0 16px; color: #222; }
.conta-cartao label { display: block; font-size: .9rem; color: #444; margin: 12px 0 4px; }
.conta-cartao input[type=text], .conta-cartao input[type=password], .conta-cartao input:not([type]) {
    width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 1rem;
    border: 1px solid #c4ccd6; border-radius: 6px;
}
.conta-cartao input:focus { outline: 2px solid #0E7C5B; outline-offset: 0; border-color: #0E7C5B; }
.conta-botao {
    width: 100%; margin-top: 20px; padding: 11px; font-size: 1rem; font-weight: 600;
    color: #fff; background: #111111; border: 0; border-radius: 6px; cursor: pointer;
}
.conta-botao:hover { background: #0E7C5B; }
.conta-erro { background: #fdecea; color: #8a1c13; padding: 10px 12px; border-radius: 6px; }
.conta-aviso { background: #fff4e5; color: #663c00; padding: 10px 12px; border-radius: 6px; }
.conta-validacao { color: #b3261e; font-size: .85rem; }
.conta-nota { color: #555; font-size: .9rem; margin-top: 16px; }
.conta-nota a { color: #0E7C5B; }

/* ---------- Aplicação ---------- */
.form-sair { margin: 0; }
.botao-sair {
    display: block; width: 100%; text-align: left !important; padding: 10px 16px 10px 56px; background: none; border: 0;
    font: inherit; font-size: 1rem; cursor: pointer;
}
.botao-sair:hover { background: rgba(0, 0, 0, .04); }
.auditoria-json { font-size: .75rem; white-space: pre-wrap; word-break: break-all; }

#blazor-error-ui {
    background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 2000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Marca ---------- */
.marca-logo {
    display: inline-block; border: 2px solid currentColor; padding: 1px 10px;
    font-weight: 400; letter-spacing: .18em; font-size: 1.15rem; line-height: 1.5;
}
.marca-sub { font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; opacity: .8; }
.marca-app {
    display: flex; align-items: center; gap: 14px; margin-left: 8px;
    color: #fff; text-decoration: none;
}
.appbar-marca::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, #B5D334, #2DBE8C);
}
@media (max-width: 600px) { .marca-app .marca-sub { display: none; } }

.linha-atual td { background: rgba(14, 124, 91, .07); font-weight: 600; }

/* ---------- Impressão (fichas, mapas) ---------- */
.barra-impressao {
    display: flex; gap: 16px; align-items: center; padding: 10px 16px; background: #111; color: #fff;
    font-family: "Segoe UI", Roboto, Arial, sans-serif; font-size: .9rem;
}
.folha-a4 {
    width: 210mm; min-height: 297mm; margin: 16px auto; padding: 12mm; box-sizing: border-box;
    background: #fff; color: #000; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 10.5pt;
    box-shadow: 0 0 8px rgba(0, 0, 0, .15);
}
.ficha-cabecalho { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ficha-cabecalho h1 { font-size: 16pt; margin: 0; flex: 1; text-align: center; }
.ficha-cabecalho .marca-logo { font-size: 11pt; }
table.ficha { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.ficha td, table.ficha th { border: 1px solid #999; padding: 3px 6px; vertical-align: top; height: 30px; }
table.ficha th.banda { background: #e6e6e6; text-align: left; font-size: 10pt; height: auto; }
table.ficha td label { display: block; font-size: 7pt; color: #555; text-transform: uppercase; }
table.ficha td.alto { height: 60px; }
.ficha-rgpd { font-size: 8pt; margin-top: 10px; }
.ficha-assinaturas { display: flex; justify-content: space-between; margin-top: 40px; }
@media print {
    @page { size: A4; margin: 10mm; }
    body { background: #fff; }
    .barra-impressao { display: none; }
    .folha-a4 { margin: 0; padding: 0; width: auto; min-height: 0; box-shadow: none; }
    #components-reconnect-modal { display: none !important; }
}

/* ---------- Grelha do ponto ---------- */
.grelha-ponto-caixa { overflow: auto; max-height: calc(100vh - 290px); background: #fff; border: 1px solid #ddd; }
table.grelha-ponto { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.grelha-ponto th, .grelha-ponto td { border-right: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; padding: 0; text-align: center; }
.grelha-ponto thead th { position: sticky; top: 0; z-index: 2; background: #f4f4f4; font-weight: 600; padding: 2px 0; min-width: 30px; }
.grelha-ponto th.dia-descanso, .grelha-ponto th.dia-sabado { background: #e9e9e9; }
.grelha-ponto th.dia-feriado { background: #fde3cf; color: #9a4a10; }
.grelha-ponto .col-nome {
    position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; padding: 2px 8px; min-width: 210px; max-width: 260px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 2px solid #cfcfcf;
}
.grelha-ponto thead .col-nome { z-index: 3; background: #f4f4f4; }
.grelha-ponto .col-nome a { color: inherit; text-decoration: none; }
.grelha-ponto .col-nome a:hover { color: #0E7C5B; text-decoration: underline; }
.grelha-ponto .col-nome .grupo { font-size: .7rem; color: #777; }
.grelha-ponto .col-total { min-width: 42px; padding: 0 4px; background: #fafafa; border-bottom: 2px solid #cfcfcf; font-weight: 600; }
.grelha-ponto .col-total.aviso { color: #b3261e; }
.grelha-ponto tr.linha-horas td { border-bottom: 2px solid #cfcfcf; }
.grelha-ponto td.descanso { background: #f1f1f1; }
.grelha-ponto td.feriado { background: #fdf0e6; }
.grelha-ponto td.fora { background: repeating-linear-gradient(45deg, #f6f6f6, #f6f6f6 4px, #ececec 4px, #ececec 8px); color: #999; }
.grelha-ponto td span { display: inline-block; min-height: 20px; line-height: 20px; }
.grelha-ponto input {
    width: 30px; height: 22px; box-sizing: border-box; border: 0; background: transparent; text-align: center;
    font: inherit; text-transform: uppercase; padding: 0;
}
.grelha-ponto tr.linha-horas input { color: #555; font-size: .72rem; height: 18px; }
.grelha-ponto input:focus { outline: 2px solid #0E7C5B; background: #fff; }
.grelha-ponto input.alterada { background: #fff6c2; }
.grelha-ponto input.invalida { background: #fbd5d1; color: #8a1c13; font-weight: 700; }
.grelha-ponto input.c-folga { color: #555; }
.grelha-ponto input.c-ferias { color: #1565c0; font-weight: 600; }
.grelha-ponto input.c-falta { color: #b3261e; font-weight: 700; }

/* ---------- Pagamento de saldos ---------- */
.tabela-pagamentos-caixa { overflow: auto; max-height: calc(100vh - 300px); background: #fff; border: 1px solid #ddd; }
table.tabela-pagamentos { border-collapse: separate; border-spacing: 0; font-size: .85rem; width: 100%; }
.tabela-pagamentos th, .tabela-pagamentos td { border-bottom: 1px solid #e6e6e6; padding: 4px 8px; text-align: right; white-space: nowrap; }
.tabela-pagamentos thead th { position: sticky; top: 0; background: #f4f4f4; z-index: 1; font-weight: 600; }
.tabela-pagamentos tfoot td { position: sticky; bottom: 0; background: #f4f4f4; font-weight: 600; }
.tabela-pagamentos th:nth-child(-n+4), .tabela-pagamentos td:nth-child(-n+4), .tabela-pagamentos .obs { text-align: left; }
.tabela-pagamentos .nome { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.tabela-pagamentos .ent { background: #fbfdfc; }
.tabela-pagamentos input { width: 64px; box-sizing: border-box; border: 1px solid #ccd; border-radius: 4px; padding: 2px 4px; text-align: right; font: inherit; }
.tabela-pagamentos .obs input { width: 180px; text-align: left; }
.tabela-pagamentos input:focus { outline: 2px solid #0E7C5B; border-color: #0E7C5B; }
.tabela-pagamentos tr.alterada td { background: #fff9d6; }

/* Grelha do ponto no formato do Excel (dias na vertical, colunas Pr/Au/De/Fe/H por colaborador) */
.grelha-colunas thead { position: sticky; top: 0; z-index: 3; }
.grelha-colunas thead th { position: static; min-width: 0; }
.grelha-colunas .col-dia {
    position: sticky; left: 0; z-index: 2; background: #f4f4f4; min-width: 64px; padding: 0 6px; text-align: left;
    font-weight: 600; white-space: nowrap; border-right: 2px solid #cfcfcf;
}
.grelha-colunas thead .col-dia { z-index: 4; }
.grelha-colunas td.col-dia.descanso { background: #e4e4e4; }
.grelha-colunas td.col-dia.feriado { background: #fde3cf; color: #9a4a10; }
.grelha-colunas .col-colab {
    max-width: 150px; min-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 4px;
    border-right: 2px solid #9e9e9e; font-size: .75rem;
}
.grelha-colunas .col-colab a { color: inherit; text-decoration: none; }
.grelha-colunas .col-colab a:hover { color: #0E7C5B; text-decoration: underline; }
.grelha-colunas .col-colab .grupo { font-size: .68rem; color: #777; font-weight: 400; }
.grelha-colunas .fim-bloco { border-right: 2px solid #9e9e9e; }
.grelha-colunas input { width: 26px; }
.grelha-colunas input.horas { width: 34px; color: #555; font-size: .72rem; }
.grelha-colunas tfoot td { background: #fafafa; font-weight: 600; }
.grelha-colunas tfoot td.aviso { color: #b3261e; }

/* ---------- Saldos de dias e horas ---------- */
table.tabela-saldos { border-collapse: separate; border-spacing: 0; font-size: .82rem; width: 100%; }
.tabela-saldos th, .tabela-saldos td { border-bottom: 1px solid #e6e6e6; padding: 3px 6px; text-align: right; white-space: nowrap; }
.tabela-saldos thead th { position: sticky; top: 0; background: #f4f4f4; z-index: 1; font-weight: 600; line-height: 1.15; }
.tabela-saldos th.txt, .tabela-saldos td.txt { text-align: left; }
.tabela-saldos td.nome { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.tabela-saldos .final { background: #f3f8f5; font-weight: 700; }
.tabela-saldos .positivo { color: #0E7C5B; }
.tabela-saldos .negativo { color: #b3261e; }
.tabela-saldos tbody tr:hover td { background: rgba(14, 124, 91, .06); cursor: pointer; }
.tabela-saldos tfoot td { position: sticky; bottom: 0; background: #f4f4f4; font-weight: 700; }

/* ---------- Lista de Verificação ---------- */
.lista-verificacao-caixa { max-height: calc(100vh - 260px); }
table.tabela-lista { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.tabela-lista th, .tabela-lista td { border-bottom: 1px solid #e3e3e3; border-right: 1px solid #f0f0f0; padding: 2px 5px; text-align: right; white-space: nowrap; }
.tabela-lista thead th { position: sticky; background: #f4f4f4; z-index: 2; font-weight: 600; text-align: center; }
.tabela-lista thead tr:first-child th { top: 0; }
.tabela-lista thead tr:nth-child(2) th { top: 22px; }
.tabela-lista th.grupo { border-bottom: 1px solid #cfcfcf; }
.tabela-lista th.manual, .tabela-lista td.manual { background-color: #fbfaf0; }
.tabela-lista .txt { text-align: left; }
.tabela-lista .fixa { position: sticky; left: 0; background: #fff; z-index: 1; }
.tabela-lista .fixa.nome { left: 38px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; border-right: 2px solid #cfcfcf; }
.tabela-lista td.fixa:first-child { min-width: 38px; }
.tabela-lista thead .fixa { z-index: 3; background: #f4f4f4; }
.tabela-lista td a { color: inherit; text-decoration: none; }
.tabela-lista td a:hover { color: #0E7C5B; text-decoration: underline; }
.tabela-lista input { width: 52px; box-sizing: border-box; border: 1px solid #ccd; border-radius: 3px; padding: 1px 3px; text-align: right; font: inherit; background: #fff; }
.tabela-lista td.obs input { width: 160px; text-align: left; }
.tabela-lista tfoot td { position: sticky; bottom: 0; background: #e9e9e9; font-weight: 700; z-index: 1; }
.tabela-lista tfoot td.fixa { z-index: 2; background: #e9e9e9; }
.tabela-lista tr.estado-adm td, .legenda.estado-adm { background-color: #d9f2df; }
.tabela-lista tr.estado-cf td, .legenda.estado-cf { background-color: #fff0b8; }
.tabela-lista tr.estado-fantasma td, .legenda.estado-fantasma { background-color: #cfe9ee; }
.tabela-lista tr.alterada td { box-shadow: inset 0 0 0 9999px rgba(255, 220, 0, .18); }
.legenda { padding: 2px 6px; border-radius: 3px; margin-left: 6px; }
.tabela-lista .inicio-grupo { border-left: 2px solid #c8c8c8; }
.tabela-lista thead th { border-bottom: 1px solid #c8c8c8; }
.tabela-lista thead th.grupo { border-bottom: 1px solid #c8c8c8; }
.tabela-lista td.ligacao { cursor: pointer; }
.tabela-lista td.ligacao:hover { outline: 2px solid #0E7C5B; outline-offset: -2px; background-color: #e8f4ef; }

/* ---------- Mapa Real ---------- */
.tabela-mapa { font-size: .72rem; }
.tabela-mapa th, .tabela-mapa td { padding: 1px 3px; }
.tabela-mapa thead th { line-height: 1.1; }
.tabela-mapa .fixa.preparado { left: 0; min-width: 24px; width: 24px; text-align: center; }
.tabela-mapa .fixa.num { left: 24px; min-width: 32px; }
.tabela-mapa .fixa.nome { left: 56px; max-width: 150px; }
.tabela-mapa th.ordenavel { cursor: pointer; user-select: none; }
.tabela-mapa th.ordenavel:hover { background-color: #e8f4ef; }
.tabela-mapa .seta-ordem { font-size: .65rem; color: #0E7C5B; margin-left: 2px; }
.tabela-mapa td.laranja { background-color: #fbd3b5; }
.tabela-mapa th.pagar, .tabela-mapa td.pagar { background-color: #e3f1ea; font-weight: 700; font-size: .8rem; }
.tabela-mapa td.manual input { width: 54px; }
.tabela-mapa td.obs input { width: 120px; }
.tabela-mapa input[type=checkbox] { width: auto; accent-color: #0E7C5B; }
.tabela-mapa tr.preparado td { color: #6b8f80; }
.tabela-lista tbody tr { cursor: pointer; }
.tabela-lista tr.atual td { background-color: #ffe7a3 !important; color: #111; box-shadow: inset 0 2px 0 #d39e00, inset 0 -2px 0 #d39e00; }
.mapa-totais { text-align: right; font-size: .9rem; line-height: 1.4; }

.resumo-colaborador { position: fixed; right: 24px; bottom: 24px; z-index: 1200; min-width: 340px; max-width: 460px; border-left: 4px solid #d39e00; }
.resumo-colaborador .negativo { color: #b3261e; }
.resumo-colaborador .positivo { color: #0E7C5B; }

/* Contas finais e Subsídio de Natal */
.tabela-cf { border-collapse: collapse; width: 100%; font-size: .875rem; }
.tabela-cf th { font-weight: 500; color: #555; text-align: right; padding: 2px 8px; }
.tabela-cf td { padding: 2px 8px; border-bottom: 1px solid #eee; }
.tabela-cf td.valor, .tabela-cf td.sugestao { text-align: right; width: 110px; }
.tabela-cf td.valor input { width: 90px; text-align: right; border: 1px solid #ccc; border-radius: 3px; padding: 2px 4px; background: #fbfaf0; }
.tabela-cf td.sugestao { color: #555; }
.tabela-cf td.sugestao .diferente { color: #b26a00; font-weight: 600; }
.cf-real { border-left: 4px solid #d39e00; }
.cf-real .cf-pagar { font-size: 1.05rem; }
.tabela-lista td.corrigido { font-weight: 700; color: #b26a00; }
.tabela-lista td.estado-cf-ligacao { cursor: pointer; text-decoration: underline; }

/* Simulador de contas finais */
.simulador-cf { font-size: .85rem; }
.simulador-resumo { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.simulador-tabela { border-collapse: collapse; margin-bottom: 6px; }
.simulador-tabela th, .simulador-tabela td { padding: 2px 10px; text-align: right; border-bottom: 1px solid #e3e3e3; white-space: nowrap; }
.simulador-tabela th { font-weight: 500; color: #555; }
.simulador-tabela .txt { text-align: left; }
.simulador-tabela td.recebe { color: #0E7C5B; }
.simulador-tabela td.devolve { color: #b3261e; }
.simulador-meses summary { cursor: pointer; color: #555; margin: 4px 0; }
.simulador-meses .simulador-tabela { font-size: .8rem; }
.simulador-nota { color: #666; font-size: .75rem; }
@media print { .simulador-meses .simulador-tabela { columns: 2; } }
.historico-anterior input { width: 80px; text-align: right; border: 1px solid #ccc; border-radius: 3px; padding: 2px 4px; background: #fbfaf0; }
.historico-anterior th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
.mapa-totais .preparados { color: #0E7C5B; }

/* ---------- Mapas e consultas: o próprio ecrã imprime-se (sem menu nem filtros) ---------- */
.so-impressao { display: none; }
@media print {
    .mud-appbar, .mud-drawer, .nao-imprimir, .mud-snackbar-provider { display: none !important; }
    .mud-main-content { padding-top: 0 !important; margin-left: 0 !important; }
    .mud-main-content > .mud-container { padding: 0 !important; max-width: none !important; }
    .so-impressao { display: block; }
    .mapa-caixa { overflow: visible !important; max-height: none !important; box-shadow: none !important; }
}
.titulo-impressao { display: flex; align-items: baseline; gap: 16px; border-bottom: 2px solid #1f4e78; margin-bottom: 8px; padding-bottom: 4px; }
.titulo-impressao .marca-logo { font-size: 11pt; }
.titulo-impressao h1 { font-size: 14pt; margin: 0; }
.titulo-impressao span.sub { color: #555; font-size: 10pt; }

table.tabela-mapa-simples { border-collapse: collapse; width: 100%; font-size: .82rem; background: #fff; }
.tabela-mapa-simples th { background: #1f4e78; color: #fff; font-weight: 600; padding: 4px 6px; text-align: left; position: sticky; top: 0; z-index: 1; }
.tabela-mapa-simples td { padding: 3px 6px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.tabela-mapa-simples .num { text-align: right; white-space: nowrap; }
.tabela-mapa-simples .centro { text-align: center; }
.tabela-mapa-simples tr.subtotal td { background: #eef3f8; font-weight: 600; }
.tabela-mapa-simples tr.subtotal2 td { background: #f7f9fb; font-weight: 600; font-style: italic; }
.tabela-mapa-simples tr.total td { background: #1f4e78; color: #fff; font-weight: 700; }
.tabela-mapa-simples tr.destaque td { background: #fff3c4; }
.tabela-mapa-simples .falta { color: #c00000; }
.tabela-mapa-simples .negativo { color: #c00000; }
.tabela-mapa-simples .positivo { color: #0E7C5B; }
.tabela-mapa-simples td.clicavel { cursor: pointer; color: #0E7C5B; }
.tabela-mapa-simples td.marca-ok { color: #008000; font-weight: 700; text-align: center; cursor: pointer; }
.tabela-mapa-simples td.marca-nao { color: #bbb; text-align: center; cursor: pointer; }
.mapa-caixa { overflow: auto; max-height: calc(100vh - 250px); border: 1px solid #ddd; }
@media print {
    table.tabela-mapa-simples { font-size: 8pt; }
    .tabela-mapa-simples th { position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tabela-mapa-simples tr { page-break-inside: avoid; }
    .tabela-mapa-simples tr.subtotal td, .tabela-mapa-simples tr.total td, .tabela-mapa-simples tr.destaque td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Organigrama */
table.organigrama { border-collapse: collapse; font-size: .72rem; background: #fff; }
.organigrama th { background: #1f4e78; color: #fff; padding: 4px; min-width: 120px; text-align: center; position: sticky; top: 0; z-index: 1; }
.organigrama td { border: 1px solid #c8c8c8; padding: 1px 4px; white-space: nowrap; height: 18px; }
.organigrama td.banda { writing-mode: vertical-rl; transform: rotate(180deg); background: #d9e2f3; font-weight: 700; text-align: center; min-width: 22px; padding: 4px 2px; white-space: normal; }
.organigrama tr.inicio-banda td { border-top: 2px solid #1f4e78; }
.organigrama tfoot td { background: #1f4e78; color: #fff; font-weight: 700; text-align: center; }
.organigrama td.pessoa { cursor: pointer; }
.org-ListaNegra { background: #ffc7ce; color: #9c0006; }
.org-Fantasma { background: #00ffff; }
.org-Saiu { background: #fcd5b4; }
.org-Baixa { background: #fff2cc; }
.org-Gravidez { background: #ffcce5; }
.org-Nojo { background: #ccc0da; }
.org-Entrou { background: #c6efce; }
.org-Ferias { background: #bdd7ee; }
.legenda-org span { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border: 1px solid #ccc; font-size: .75rem; }
.resumo-org td { padding: 2px 10px; }
@media print {
    table.organigrama { font-size: 6.5pt; }
    .organigrama th, .organigrama td, .legenda-org span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .organigrama th { position: static; min-width: 0; }
}

.quadro-pessoal input { width: 46px; text-align: center; border: 1px solid #ccc; border-radius: 3px; padding: 2px; background: #fbfaf0; }
/* Organigrama: lugares previstos (verde-água), vagas, blocos da fábrica, condições */
.organigrama td.org-lugar, .legenda-org .org-lugar { background: #cdeee8; font-weight: 700; text-align: center; min-width: 18px; color: #0b5d52; }
.organigrama td.lugar-vazio { min-width: 18px; }
.organigrama td.vaga { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f1f1f1 4px, #f1f1f1 8px); min-width: 110px; }
.organigrama.com-condicoes td.pessoa { white-space: normal; min-width: 150px; vertical-align: top; }
.organigrama .condicoes { font-size: .64rem; color: #333; line-height: 1.15; }
.organigrama tfoot td { white-space: nowrap; }
.organigrama-blocos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.organigrama-blocos .bloco table { width: 100%; }
.organigrama-blocos th { text-align: left; }
.bloco-contagem { float: right; font-weight: 400; opacity: .85; }
@media print {
    .organigrama td.org-lugar, .organigrama td.vaga, .legenda-org .org-lugar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .organigrama-blocos { grid-template-columns: repeat(4, 1fr); }
    .organigrama-blocos .bloco { page-break-inside: avoid; }
    .organigrama.com-condicoes { font-size: 6pt; }
}
.resumo-colaborador .aumento-do-mes { background: #d32f2f; color: #fff; font-weight: 700; padding: 6px 10px; margin: 6px -12px; display: flex; align-items: center; gap: 6px; animation: piscar-aumento 1.2s ease-in-out 3; }
@keyframes piscar-aumento { 50% { background: #ff8f00; } }
.resumo-organigrama { width: auto; min-width: 420px; }
.resumo-organigrama td.recuo { padding-left: 22px; }

/* Contratos e cartas: aspeto do papel (igual ao Word) */
.documento { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; line-height: 1.25; color: #000; background: #fff; }
.documento p { margin: 0 0 6pt; white-space: pre-wrap; tab-size: 8; }
.documento.justificado p { text-align: justify; }
.documento p.vazio { margin: 0 0 3pt; line-height: 1; }
.documento p.titulo { text-align: center; font-weight: 700; font-size: 12pt; }
.documento.carta p.titulo { font-size: 13pt; }
.documento p.seccao { text-align: center; font-weight: 700; }
.documento-cabecalho { font-weight: 700; font-size: 12pt; line-height: 1.2; margin-bottom: 18pt; }
.documento-rodape { display: none; }
.folha-documento { width: 210mm; min-height: 297mm; padding: 20mm 27mm; margin: 0 auto; box-shadow: 0 1px 6px rgba(0,0,0,.25); background: #fff; }
.folha-documento.carta { padding: 30mm; }
.marcadores-lista code { background: #eef3f8; padding: 0 4px; border-radius: 3px; cursor: pointer; }
.editor-minuta textarea { font-family: Consolas, "Courier New", monospace !important; font-size: .85rem !important; line-height: 1.35 !important; }
.conta-botao.secundario { background: #fff; color: #222; border: 1px solid #999; }
.conta-botao.secundario:hover { background: #f1f1f1; }
.conta-botao[disabled] { opacity: .6; cursor: wait; }

/* Painel do que está por fazer (início) */
.cinzento { color: #666; }
.painel-pendencias { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.cartao-pendencia { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.12); border-top: 5px solid #d39e00; padding: 12px 14px; }
.cartao-pendencia.muitos { border-top-color: #c62828; }
.cartao-pendencia.ok { border-top-color: #2e7d32; opacity: .85; }
.cartao-pendencia.confidencial { background: #fffaf0; }
.cartao-topo { display: flex; align-items: flex-start; gap: 10px; }
.cartao-icone { color: #555; margin-top: 2px; }
.cartao-titulo { flex: 1; }
.cartao-titulo .nome { font-weight: 700; font-size: 1rem; }
.cartao-titulo .descricao { font-size: .78rem; color: #666; line-height: 1.25; }
.cartao-contagem { font-size: 2rem; font-weight: 700; line-height: 1; color: #d39e00; min-width: 40px; text-align: right; }
.cartao-pendencia.muitos .cartao-contagem { color: #c62828; }
.cartao-pendencia.ok .cartao-contagem { color: #2e7d32; }
.cartao-lista { list-style: none; margin: 10px 0 2px; padding: 0; }
.cartao-lista li { padding: 5px 6px; border-radius: 6px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; border-bottom: 1px solid #f0f0f0; }
.cartao-lista li:hover { background: #e8f4ef; }
.cartao-lista .pessoa { font-weight: 600; font-size: .86rem; color: #0E7C5B; }
.cartao-lista .empresa { font-size: .7rem; background: #eef3f8; border-radius: 10px; padding: 0 7px; color: #1f4e78; }
.cartao-lista .detalhe { flex-basis: 100%; font-size: .76rem; color: #555; }
.cartao-ok { font-size: .8rem; color: #2e7d32; margin-top: 6px; }
.custos td.percentagem { position: relative; min-width: 90px; }
.custos td.percentagem .barra { position: absolute; left: 4px; top: 5px; bottom: 5px; background: #cdeee8; border-radius: 3px; max-width: calc(100% - 8px); }
.custos td.percentagem .valor { position: relative; }
@media print { .custos td.percentagem .barra { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.lista-verificacao-caixa.com-resumo { padding-bottom: 190px; }

/* ---------------- busca do menu e ajuda */
.busca-menu { padding: 8px 12px 4px; }
.busca-item { display: flex; gap: 8px; align-items: flex-start; }
.busca-detalhe { font-size: .75rem; color: var(--mud-palette-text-secondary); }
.ajuda-tema h3 { margin: 0 0 4px; }
.ajuda-tema ol, .ajuda-tema ul { margin: 4px 0 8px 20px; padding: 0; }
.ajuda-tema li { margin-bottom: 3px; }
.ajuda-subtitulo { font-weight: 600; margin-top: 6px; }
.manual h1 { font-size: 22pt; margin: 0 0 4mm; }
.manual h2 { font-size: 14pt; margin: 8mm 0 2mm; border-bottom: 2px solid #2DBE8C; padding-bottom: 1mm; break-after: avoid; }
.manual h3 { font-size: 11pt; margin: 4mm 0 1mm; break-after: avoid; }
.manual p, .manual li { font-size: 9.5pt; line-height: 1.35; }
.manual ol, .manual ul { margin: 1mm 0 2mm 6mm; padding: 0; }
.manual .tema { break-inside: avoid; }
.manual .capa { margin-bottom: 6mm; }
.manual .indice { columns: 2; font-size: 9pt; }
.manual .indice li { break-inside: avoid; }
.manual .nota { font-size: 8.5pt; color: #555; }
.busca-popover { min-width: 360px !important; }

/* ---------------- conferência do dinheiro */
.conferencia { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.conferencia > :first-child { grid-column: 1 / -1; max-width: 760px; } /* as notas (início e restam) ocupam a linha toda */
.tabela-conferencia { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tabela-conferencia th, .tabela-conferencia td { padding: 4px 8px; border-bottom: 1px solid var(--mud-palette-lines-default); text-align: right; }
.tabela-conferencia th.txt, .tabela-conferencia td.txt, .tabela-conferencia td:first-child { text-align: left; }
.tabela-conferencia tfoot td { font-weight: 700; border-top: 2px solid var(--mud-palette-text-primary); }
.tabela-conferencia input.qtd { width: 70px; text-align: right; padding: 3px 6px; border: 1px solid var(--mud-palette-lines-inputs); border-radius: 4px; }
.tabela-conferencia tr.ligacao:hover td { background: var(--mud-palette-action-default-hover); }
.conferencia-resultado tfoot td { font-size: 1.1rem; }
@media print { .conferencia { grid-template-columns: 1fr 1fr; } }
.tabela-conferencia th.grupo { text-align: center; border-bottom: 1px solid var(--mud-palette-lines-default); }
.tabela-conferencia input.qtd { width: 60px; }

/* autenticação em dois passos */
.qr-dois-passos { display: block; width: 200px; height: 200px; margin: 8px 0; image-rendering: pixelated; }
.conta-passos { padding-left: 20px; }
.conta-passos li { margin-bottom: 8px; }
.codigos-recuperacao { columns: 2; font-size: 1.05rem; }
.codigos-recuperacao code { letter-spacing: .5px; }

/* ---------------- telemóvel */
@media (max-width: 600px) { .nome-utilizador { display: none; } }
.cartao-mapa { border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; margin-bottom: 8px; background: var(--mud-palette-surface); }
.cartao-mapa.preparado { background: #e8f5e9; border-color: #a5d6a7; }
.cartao-mapa-topo { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.cartao-mapa-visto input { width: 26px; height: 26px; accent-color: #0E7C5B; }
.cartao-mapa-nome { flex: 1; min-width: 0; cursor: pointer; }
.cartao-mapa-nome b { word-break: break-word; }
.cartao-mapa-valor { font-size: 1.15rem; font-weight: 700; white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 2px; }
.cartao-mapa-detalhe { border-top: 1px dashed var(--mud-palette-lines-default); padding: 6px 12px 10px 44px; font-size: .9rem; }
.cartao-mapa-detalhe > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.cartao-mapa-detalhe .nota { display: block; font-style: italic; }
.cartao-mapa-detalhe .aumento-do-mes { color: #b71c1c; font-weight: 700; }
.cartao-saldo { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.cartao-saldo-valores { text-align: right; white-space: nowrap; }
.ponto-telemovel-totais { padding: 6px 0 10px; font-size: .9rem; }
.dia-ponto { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.dia-ponto.descanso { background: #f5f5f5; }
.dia-ponto.feriado { background: #fff3e0; }
.dia-ponto.fora { opacity: .55; }
.dia-ponto.alterada { box-shadow: inset 4px 0 0 #f9a825; }
.dia-ponto-data { width: 64px; flex: none; text-transform: capitalize; }
.dia-ponto-botoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dia-ponto-botoes button { min-width: 42px; height: 36px; border: 1px solid #999; border-radius: 6px; background: #fff; font-weight: 700; }
.dia-ponto-botoes button.escolhido, .dia-ponto-botoes select.escolhido { background: #0E7C5B; color: #fff; border-color: #0E7C5B; }
.dia-ponto-botoes select { height: 36px; border: 1px solid #999; border-radius: 6px; max-width: 120px; }
.dia-ponto-botoes input { width: 52px; height: 36px; border: 1px solid #999; border-radius: 6px; text-align: center; }
.cartao-condicoes { border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; padding: 12px; margin-bottom: 12px; max-width: 560px; }
.cartao-condicoes-topo { margin-bottom: 10px; }
.linha-condicao { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dotted var(--mud-palette-lines-default); }
.linha-condicao.destaque b { font-size: 1.2rem; }
.pequeno { font-size: .85rem; }
.cartao-mapa-detalhe .bloco { display: block; font-weight: 700; margin-top: 8px; padding-bottom: 2px; border-bottom: 1px solid var(--mud-palette-lines-default);
    text-transform: uppercase; font-size: .75rem; color: var(--mud-palette-text-secondary); }
.cartao-mapa-detalhe .pago { font-size: 1.05rem; background: #e8f5e9; margin: 4px -6px 0; padding: 4px 6px; border-radius: 4px; }
.dia-ponto-botoes select { max-width: 104px; }
