[hidden] { display: none !important; }
/* Plataforma MXR · visual conforme a maquete (TAX & LEGAL · MAPUTO). */
:root {
  --vermelho: #C8102E;
  --vermelho-escuro: #7F0A1D;
  --preto: #1A1A1A;
  --barra: #1B1B1B;
  --texto: #1A1A1A;
  --secundario: #5F5F5F;
  --atenuado: #8A8A8A;
  --borda: #E3DFD9;
  --fundo: #F4F3EF;
  --branco: #FFFFFF;
  --ambar: #B7791F;
  --verde: #2E7D32;
  --cinza: #C9C6C0;
  --ambar-fundo: #FFF6E0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Calibri, "Helvetica Neue", Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 14px;
  line-height: 1.45;
}
a { color: var(--vermelho); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -0.2px; }
h2 { font-size: 16px; margin: 0; font-weight: 700; }
p { margin: 0; }
.sub { color: var(--secundario); margin-top: 4px; }
.pequeno-texto { font-size: 12px; color: var(--atenuado); }

/* ---------- barra superior ---------- */
.topo {
  background: var(--barra);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.marca { color: var(--vermelho); font-weight: 800; font-size: 22px; letter-spacing: 0.5px; }
.menu { display: flex; gap: 16px; height: 100%; overflow: visible; flex: 1; align-items: stretch; }
.menu a {
  color: #d9d9d9;
  display: flex;
  align-items: center;
  padding: 0 2px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: 14px;
}
.menu a:hover { color: #fff; text-decoration: none; }
.menu a.activo { color: #fff; font-weight: 700; border-bottom-color: var(--vermelho); }
.utilizador { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--vermelho); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.sair { background: none; border: 0; color: #d9d9d9; cursor: pointer; font-size: 13px; padding: 0; font-family: inherit; }
.sair:hover { color: #fff; }
body.sem-sessao .topo { display: none; }

.principal { padding: 26px 28px 60px; max-width: 1280px; margin: 0 auto; }
.cabecalho { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.acoes-topo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.migalhas { font-size: 13px; color: var(--secundario); margin-bottom: 10px; }
.migalhas a { color: var(--secundario); }

/* ---------- botões, campos, chips ---------- */
button, .btn {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--vermelho);
  border-radius: 6px;
  background: var(--vermelho);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  text-decoration: none;
}
button:hover, .btn:hover { text-decoration: none; filter: brightness(0.96); }
button.sec, .btn.sec { background: #fff; color: var(--texto); border-color: #bdb8b0; }
button.preto { background: var(--barra); border-color: var(--barra); }
button.verde { background: var(--verde); border-color: var(--verde); }
button.pequeno { padding: 5px 10px; font-size: 12px; }
button:disabled { background: #e6e3de; color: #9b9b9b; border-color: #e6e3de; cursor: not-allowed; }
button.ligacao { background: none; border: 0; color: var(--vermelho); padding: 0; }
.exportar { display: inline-flex; gap: 6px; align-items: center; color: var(--secundario); font-size: 13px; }
.exportar button { padding: 5px 10px; font-size: 12px; }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid #cfcac3;
  border-radius: 6px;
  background: #fff;
  color: var(--texto);
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200,16,46,.25); border-color: var(--vermelho); }
label { font-size: 12px; color: var(--secundario); display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
form.grelha {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 14px;
  align-items: end;
}
form.grelha .acoes { display: flex; gap: 8px; align-items: center; }
.linha-acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 16px; }
.chip {
  border: 1px solid #cfcac3;
  background: #fff;
  color: var(--texto);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.chip.activo { background: var(--barra); border-color: var(--barra); color: #fff; }
.chip.urgente { color: var(--vermelho); border-color: var(--vermelho); }
.chip.atencao { color: var(--ambar); border-color: var(--ambar); }
.chip.urgente.activo { background: var(--vermelho); color: #fff; }
.chip.atencao.activo { background: var(--ambar); color: #fff; }
.chip.pequeno-chip { font-size: 12px; padding: 4px 10px; }
.chip-mostrar { color: var(--secundario); font-size: 12px; margin-right: 4px; }

/* ---------- cartões ---------- */
.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cartao {
  background: #fff;
  border: 1px solid var(--borda);
  border-top: 3px solid var(--cinza);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--texto);
  display: block;
}
.cartao:hover { text-decoration: none; }
.cartao.vermelho { border-top-color: var(--vermelho); }
.cartao.ambar { border-top-color: var(--ambar); }
.cartao.verde { border-top-color: var(--verde); }
.cartao.preto { border-top-color: var(--barra); }
.cartao .t { font-size: 13px; color: var(--secundario); }
.cartao .n { font-size: 30px; font-weight: 800; margin: 4px 0 2px; line-height: 1.1; }
.cartao.vermelho .n { color: var(--vermelho); }
.cartao.verde .n { color: var(--verde); }
.cartao .s { font-size: 12px; color: var(--secundario); }

.colunas { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }
.colunas.meio { grid-template-columns: 1fr 1fr; }
.painel-caixa {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.painel-caixa > .cab {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--borda);
}
.painel-caixa > .cab .dir { color: var(--secundario); font-size: 12px; }
.corpo { padding: 14px 16px; }

/* linhas com faixa lateral (alertas, pendências) */
.lista-linhas { display: flex; flex-direction: column; }
.linha {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #efece7;
  border-left: 3px solid transparent;
}
.linha:last-child { border-bottom: 0; }
.linha .txt { flex: 1 1 260px; min-width: 0; }
.linha .linha-acoes { flex: 0 0 auto; justify-content: flex-end; }
.linha .titulo { font-weight: 700; font-size: 14px; }
.linha .detalhe { color: var(--secundario); font-size: 12px; margin-top: 2px; }
.linha .meta { color: var(--secundario); font-size: 12px; margin-top: 3px; }
.linha.urgente { border-left-color: var(--vermelho); }
.linha.atencao { border-left-color: var(--ambar); }
.linha.em_falta { border-left-color: var(--cinza); }
.linha.verde { border-left-color: var(--verde); }
.linha.preto { border-left-color: var(--barra); }
.linha.sobreposto { border-left-color: var(--verde); }
.nivel { font-size: 13px; font-weight: 700; white-space: nowrap; }
.nivel.urgente { color: var(--vermelho); }
.nivel.atencao { color: var(--ambar); }
.nivel.em_falta, .nivel.neutro { color: var(--secundario); }
.nivel.verde { color: var(--verde); }
.nivel.preto { color: var(--barra); }

/* estados (texto colorido) */
.estado { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Sino de notificações */
.sino-wrap { position: relative; }
.topo .sino { background: none; border: 0; padding: 6px 8px; color: #fff; position: relative; line-height: 0; }
.topo .sino:hover { color: #f4b6b6; filter: none; }
.sino .envelope { display: block; }
.sino-contagem { position: absolute; top: 0; right: 0; background: var(--vermelho); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 9px; padding: 0 5px; line-height: 16px; min-width: 16px; text-align: center; }
.notificacoes { position: absolute; right: 0; top: 40px; width: min(380px, 92vw); max-height: 460px; overflow: auto;
  background: #fff; border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 20; padding: 8px; }
.notificacoes .item { display: block; width: 100%; text-align: left; background: none; color: var(--texto);
  border: 0; border-bottom: 1px solid #efece7; border-radius: 0; padding: 10px 8px; font-weight: 400; }
.notificacoes .item.nova { font-weight: 700; }
.notificacoes .item small { display: block; color: var(--secundario); font-weight: 400; margin-top: 2px; }
.notificacoes .cab-notif { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 8px; font-weight: 700; }
.notificacoes .cab-notif button { padding: 4px 8px; font-size: 12px; }

/* Processos: conclusão e datas previstas */
.data-atrasada { color: var(--vermelho); font-weight: 700; }
.colunas-pendentes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .colunas-pendentes { grid-template-columns: 1fr; } }
.grelha-marca { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
button small { display: block; font-weight: 400; font-size: 12px; opacity: .8; margin-top: 2px; }
.logo-previa { max-height: 56px; max-width: 220px; border: 1px solid var(--borda); border-radius: 6px; padding: 4px; }
.estado.urgente, .estado.vermelho { color: var(--vermelho); }
.estado.atencao, .estado.ambar { color: var(--ambar); }
.estado.verde, .estado.ok { color: var(--verde); }
.estado.preto { color: var(--barra); }
.estado.neutro, .estado.cinza { color: var(--secundario); font-weight: 600; }

/* barra de fases do cliente */
.fases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 6px; }
.fases span { height: 5px; border-radius: 3px; background: #e4e1dc; }
.fases span.feito { background: var(--verde); }
.fases span.actual { background: var(--ambar); }
.fases span.bloqueado { background: var(--vermelho); }
.fases-rotulos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; font-size: 10px; color: var(--atenuado); margin-top: 3px; }
.fases-rotulos span { text-align: left; }

/* ---------- tabelas ---------- */
.tabela-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--borda); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #efece7; vertical-align: middle; }
th {
  font-size: 11px; color: var(--secundario); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px; background: #f7f6f2;
}
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tr.grupo td { background: #f7f6f2; font-weight: 700; font-size: 13px; }
tr.linha-faixa td:first-child { border-left: 3px solid transparent; }
tr.urgente td:first-child { border-left-color: var(--vermelho); }
tr.atencao td:first-child { border-left-color: var(--ambar); }
tr.verde td:first-child { border-left-color: var(--verde); }
tr.preto td:first-child { border-left-color: var(--barra); }
tr.cinza td:first-child { border-left-color: var(--cinza); }
.sub-linha { display: block; font-size: 12px; color: var(--secundario); font-weight: 400; margin-top: 2px; }

/* barra escura de acções (selecção) */
.barra-acoes {
  background: var(--barra); color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px; margin-top: 12px; flex-wrap: wrap;
}
.barra-acoes .total { font-size: 13px; }

/* separadores */
.separadores { display: flex; gap: 22px; border-bottom: 1px solid var(--borda); margin: 0 0 16px; }
.separadores button {
  background: none; border: 0; color: var(--secundario); padding: 10px 0; font-size: 14px;
  border-bottom: 3px solid transparent; border-radius: 0; font-weight: 600;
}
.separadores button.activo { color: var(--texto); border-bottom-color: var(--vermelho); font-weight: 700; }

/* sequência (stepper) */
.sequencia { display: flex; align-items: flex-start; padding: 6px 4px 2px; }
.sequencia .passo { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; font-size: 12px; }
.sequencia .passo::before, .sequencia .passo::after {
  content: ""; position: absolute; top: 15px; height: 2px; background: #d9d6d0; width: 50%;
}
.sequencia .passo::before { left: 0; }
.sequencia .passo::after { right: 0; }
.sequencia .passo:first-child::before, .sequencia .passo:last-child::after { display: none; }
.sequencia .passo.feito::before, .sequencia .passo.feito::after { background: var(--verde); }
.sequencia .passo.actual::before { background: var(--verde); }
.sequencia .bola {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid #cfcac3; background: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--secundario); position: relative; z-index: 1;
}
.sequencia .passo.feito .bola { background: var(--verde); border-color: var(--verde); color: #fff; }
.sequencia .passo.actual .bola { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.sequencia .rotulo { margin-top: 6px; font-weight: 700; }
.sequencia .sub { font-size: 11px; color: var(--secundario); margin-top: 2px; }

/* detalhe: grelha de dados */
.dados-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dados-linha div { font-size: 12px; color: var(--secundario); }
.dados-linha strong { display: block; font-size: 16px; color: var(--texto); margin-top: 2px; }
.caixa-cinza { background: #f7f6f2; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: var(--secundario); }
.quadro-valores .linha-valor { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #efece7; }
.quadro-valores .linha-valor:last-child { border-bottom: 0; }
.quadro-valores .linha-valor strong { font-variant-numeric: tabular-nums; }

/* cliente: lista e ficha */
.duas-colunas { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.lista-cliente { background: #fff; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; }
.lista-cliente .pesquisa { padding: 12px; border-bottom: 1px solid var(--borda); }
.lista-cliente .pesquisa input { width: 100%; background: #f7f6f2; border-color: transparent; }
.lista-cliente a.item {
  display: block; padding: 12px 14px; border-bottom: 1px solid #efece7; border-left: 3px solid transparent; color: var(--texto);
}
.lista-cliente a.item:last-child { border-bottom: 0; }
.lista-cliente a.item:hover { background: #faf9f6; text-decoration: none; }
.lista-cliente a.item.activo { border-left-color: var(--vermelho); background: #fff; }
.lista-cliente a.item .nome { font-weight: 700; font-size: 14px; }
.lista-cliente a.item .info { font-size: 12px; color: var(--secundario); margin-top: 2px; }

.ficha-cab { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--borda); }
.sigla {
  width: 46px; height: 46px; border-radius: 8px; background: var(--barra); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: none;
}
.ficha-cab .titulo-cli { font-size: 20px; font-weight: 800; }
.ficha-cab .info { font-size: 12px; color: var(--secundario); }
.ficha-cab .direita { margin-left: auto; display: flex; gap: 8px; }
.bloco { padding: 16px 20px; border-bottom: 1px solid var(--borda); }
.bloco:last-child { border-bottom: 0; }
.bloco h2 { margin-bottom: 10px; }
.estatisticas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.estatisticas div { background: #f7f6f2; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--secundario); }
.estatisticas strong { display: block; color: var(--texto); font-size: 16px; margin-top: 2px; }
.margem { border: 1px solid var(--borda); border-radius: 10px; padding: 14px 16px; margin: 16px 20px 0; }
.margem .linha-valor { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #efece7; }
.margem .linha-valor:last-child { border-bottom: 0; font-weight: 800; background: #f7f6f2; margin: 0 -16px; padding: 10px 16px; }
.margem .linha-valor.negativo strong { color: var(--vermelho); }

/* horas: lista por cliente e painel lateral */
/* Totais lado a lado quando cabem; senão um por baixo do outro. Cada tabela tem a sua barra de rolagem e nunca sai cortada. */
.totais-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 900px), 1fr)); gap: 16px; align-items: start; margin-top: 8px; }
.totais-duas > div { min-width: 0; }
.totais-duas .wrap { overflow-x: auto; max-width: 100%; }
.duas-horas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.cartao-revisao { border: 1px solid var(--borda); border-left: 3px solid var(--vermelho); border-radius: 8px; padding: 12px; margin: 10px 0; background: #fff; }
.cartao-revisao.ambar { border-left-color: var(--ambar); }
.cartao-revisao .cab-revisao { font-size: 12px; color: var(--secundario); margin-bottom: 8px; }
.cartao-revisao .descricao { background: #f7f6f2; border-radius: 6px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
.cartao-revisao .acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* entrada */
body.sem-sessao .principal { max-width: none; padding: 0; }
.entrada-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.hero {
  background:
    radial-gradient(120% 90% at 0% 0%, #8b1224 0%, #3a1419 55%, #241b1b 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 44px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero .cartao-logo {
  background: #fff; border-radius: 10px; width: 150px; padding: 10px 14px; display: inline-block;
}
.hero .cartao-logo img { width: 100%; display: block; }
.hero .faixa { position: absolute; inset: 0; pointer-events: none; }
.hero .barra-decor { position: absolute; bottom: 0; background: rgba(255,255,255,0.06); border-top: 3px solid transparent; }
.hero .barra-decor.alta { border-top-color: var(--vermelho); }
/* Animação do painel de entrada: as barras crescem e depois sobem e descem de forma bem visível, os topos vermelhos brilham,
   e uma luz vermelha percorre o fundo. Tudo pára para quem prefere menos movimento. */
@keyframes hero-crescer { from { transform: scaleY(0.04); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes hero-respirar { 0%, 100% { transform: scaleY(0.9); } 50% { transform: scaleY(1.16); } }
@keyframes hero-luz { from { transform: translate(-14%, -10%) scale(1); } to { transform: translate(30%, 34%) scale(1.3); } }
@keyframes hero-brilho {
  0%, 100% { border-top-color: #c8102e; box-shadow: 0 -4px 14px rgba(200, 16, 46, 0.25); }
  50% { border-top-color: #ff5a73; box-shadow: 0 -10px 34px rgba(255, 70, 100, 0.7); }
}
.hero::before {
  content: ""; position: absolute; inset: -30%; pointer-events: none;
  background: radial-gradient(34% 34% at 32% 30%, rgba(225, 30, 62, 0.5), transparent 72%);
  animation: hero-luz 16s ease-in-out infinite alternate;
}
.hero .barra-decor {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03));
  transform-origin: bottom; animation: hero-crescer 1.7s cubic-bezier(0.2, 0.7, 0.2, 1) both, hero-respirar 7s ease-in-out 1.7s infinite;
}
.hero .barra-decor:nth-child(2) { animation-delay: 0.15s, 1.85s; animation-duration: 1.7s, 8.5s; }
.hero .barra-decor:nth-child(3) { animation-delay: 0.3s, 2s; animation-duration: 1.7s, 6.5s; }
.hero .barra-decor:nth-child(4) { animation-delay: 0.45s, 2.15s; animation-duration: 1.7s, 9s; }
.hero .barra-decor.alta { animation-name: hero-crescer, hero-respirar, hero-brilho; animation-iteration-count: 1, infinite, infinite;
  animation-duration: 1.7s, 8.5s, 4.5s; animation-delay: 0.15s, 1.85s, 2s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1), ease-in-out, ease-in-out; animation-fill-mode: both; }
.hero .barra-decor.alta:nth-child(4) { animation-delay: 0.45s, 2.15s, 3.2s; animation-duration: 1.7s, 9s, 5.5s; }
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero .barra-decor, .hero .barra-decor.alta { animation: none; }
}
.hero .rotulo-hero { font-size: 12px; letter-spacing: 3px; color: #e6c9cd; font-weight: 700; }
.hero h2 { font-size: 40px; line-height: 1.12; font-weight: 800; margin: 14px 0 0; letter-spacing: -0.5px; }
.hero .rodape-hero { font-size: 12px; color: #d9c7ca; position: relative; }
.hero .rodape-hero.discreto { font-size: 10px; opacity: 0.4; margin-top: 4px; }
.form-entrada { display: flex; align-items: center; justify-content: center; padding: 48px 56px; background: #fff; }
.form-entrada .conteudo { width: 100%; max-width: 380px; }
.passos-entrada { font-size: 12px; color: var(--atenuado); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.passos-entrada .actual { color: var(--vermelho); font-weight: 700; }
.passos-entrada .feito { color: var(--verde); font-weight: 700; }
.form-entrada h1 { font-size: 26px; }
.form-entrada .sub { margin: 8px 0 22px; }
.form-entrada form { display: flex; flex-direction: column; gap: 14px; }
.form-entrada form input { width: 100%; padding: 12px 12px; }
.campo-senha { position: relative; }
.campo-senha .mostrar { position: absolute; right: 10px; top: 36px; background: none; border: 0; color: var(--vermelho); padding: 0; font-size: 12px; font-weight: 700; }
.ajuda-entrada { background: #f7f6f2; border-radius: 8px; padding: 12px 14px; font-size: 12px; color: var(--secundario); }
.esqueci { align-self: flex-end; font-size: 12px; font-weight: 700; }
.canais { display: flex; gap: 8px; }
.canais button { border-radius: 999px; }
.canais button:not(.activo) { background: #fff; color: var(--texto); border-color: #cfcac3; }
.codigo-entrada { font-size: 22px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.linha-entrada { display: flex; justify-content: space-between; font-size: 13px; }

/* aviso */
.aviso {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--barra); color: #fff; padding: 11px 18px; border-radius: 8px;
  max-width: calc(100% - 32px); font-size: 14px; z-index: 30; box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
.aviso.erro { background: var(--vermelho); }
.segredo { font-family: Consolas, monospace; word-break: break-all; background: #f7f6f2; padding: 4px 6px; border-radius: 4px; }
.vazio { color: var(--secundario); padding: 18px 16px; }

/* telemóvel */
@media (max-width: 1100px) {
  .colunas, .colunas.meio, .duas-horas, .duas-colunas { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .entrada-split { grid-template-columns: 1fr; }
  .hero { min-height: 260px; padding: 28px; }
  .hero h2 { font-size: 28px; }
  .form-entrada { padding: 32px 24px; }
}
@media (max-width: 720px) {
  .topo { padding: 0 14px; gap: 14px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; }
  .menu { order: 3; width: 100%; gap: 16px; }
  .principal { padding: 18px 14px 60px; }
  h1 { font-size: 22px; }
  .sequencia .rotulo, .sequencia .sub { font-size: 10px; }
  table { font-size: 13px; }
  th, td { padding: 9px 8px; }
  .cartoes { grid-template-columns: 1fr 1fr; }
}

/* Folha de horas: área principal e caixas laterais */
.horas-folha { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.horas-lateral { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .horas-folha { grid-template-columns: 1fr; } }
.termos-cliente { padding: 10px 0; border-bottom: 1px solid #efece7; }
.termos-cliente:last-child { border-bottom: 0; }
.termos-nome { font-weight: 700; }
.termos-texto { margin: 4px 0 6px; padding: 8px 10px; background: #F4F2EE; border-left: 3px solid var(--vermelho); border-radius: 4px; font-size: 13px; line-height: 1.5; }
.termos-fase { font-size: 13px; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.subtitulo-caixa { font-size: 14px; margin: 14px 0 6px; }
.grelha-detalhe { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }

/* Campos obrigatórios */
.asterisco { color: var(--vermelho); font-weight: 700; }
.rotulo-obrig { display: inline; }

/* Menu: Gestão (Configuração, Comentários, Acessos) agrupado num menu */
.menu > * { flex-shrink: 0; white-space: nowrap; }
.menu-grupo { position: relative; display: flex; align-items: stretch; }
.menu-grupo[hidden] { display: none; }
.menu-grupo-botao { white-space: nowrap; background: none; border: 0; border-bottom: 3px solid transparent; color: #d9d9d9; font: inherit; cursor: pointer; padding: 0 2px; }
.menu-grupo-botao:hover, .menu-grupo.aberto .menu-grupo-botao, .menu-grupo.tem-activo .menu-grupo-botao { color: #fff; }
.menu-grupo.tem-activo .menu-grupo-botao { border-bottom-color: var(--vermelho); }
.menu-grupo-lista { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid #ddd;
  border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .15); padding: 6px; z-index: 60; flex-direction: column; }
.menu-grupo.aberto .menu-grupo-lista { display: flex; }
.menu-grupo-lista a { color: var(--preto); padding: 9px 10px; border-radius: 6px; display: block; }
.menu-grupo-lista a:hover { background: #f4f2ee; }
.menu-grupo-lista a.activo { color: var(--vermelho); font-weight: 700; }

/* Assistente: botão flutuante em todas as páginas, com painel de perguntas e pedido de manutenção */
.assistente-botao { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: var(--preto); color: var(--branco);
  border: 0; border-radius: 999px; padding: 10px 16px; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.assistente-painel { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(370px, calc(100vw - 32px)); max-height: 72vh;
  display: flex; flex-direction: column; background: #fff; border: 1px solid #ddd; border-radius: 12px; box-shadow: 0 8px 26px rgba(0, 0, 0, .2); }
.assistente-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--preto);
  color: #fff; border-radius: 12px 12px 0 0; }
.assistente-msgs { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.assistente-msgs .msg { max-width: 88%; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; }
.assistente-msgs .msg.bot { background: #f4f2ee; align-self: flex-start; }
.assistente-msgs .msg.eu { background: var(--preto); color: #fff; align-self: flex-end; }
.assistente-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.assistente-chips button { font-size: 12px; padding: 5px 9px; border-radius: 999px; border: 1px solid #ccc; background: #fff; color: var(--preto); cursor: pointer; }
.assistente-chips button:hover { background: #f4f2ee; }
.assistente-form button[type="submit"] { white-space: nowrap; }
.assistente-form { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #eee; }
.assistente-form textarea { flex: 1; resize: none; }

/* Calendário */
.cal-grelha { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cab { font-size: 12px; color: var(--secundario); text-align: center; padding: 4px 0; }
.cal-vazio { min-height: 92px; }
.cal-dia { min-height: 92px; border: 0.5px solid var(--borda); border-radius: 8px; padding: 4px; background: var(--branco); cursor: pointer; overflow: hidden; }
.cal-hoje { border: 2px solid var(--preto); }
.cal-num { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.cal-chip { display: block; width: 100%; text-align: left; font-size: 11px; border: 0; border-radius: 4px; padding: 2px 4px; margin: 2px 0; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .cal-grelha { gap: 2px; } .cal-dia { min-height: 60px; } .cal-chip { font-size: 10px; } }

/* Seletor de idioma no cabeçalho */
.idioma-topo { display: inline-flex; gap: 4px; margin-right: 8px; }
.idioma-topo button { font-size: 12px; padding: 4px 8px; }

/* Texto livre: os parágrafos mantêm-se */
.texto-livre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Caixa de seleção com o texto na mesma linha (ex.: "Depende de um terceiro") */
.caixa-linha { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.caixa-linha input[type="checkbox"] { width: auto; margin: 0; }

/* Secções coloridas na lista de processos (propostas, técnicos, pode facturar, cancelados) */
.painel-caixa.secao-ambar { border-top: 6px solid var(--ambar); }
.painel-caixa.secao-preto { border-top: 6px solid var(--preto); }
.painel-caixa.secao-verde { border-top: 6px solid var(--verde); }
.painel-caixa.secao-cinza { border-top: 6px solid var(--cinza, #8a8a8a); }
.painel-caixa.secao-vermelho { border-top: 6px solid var(--vermelho); }


/* Folha de horas no modelo do timesheet que o cliente recebe */
.modelo-ts { width: 100%; border-collapse: collapse; font-size: 13px; }
.modelo-ts th { background: #FBE4D5; color: #C00000; border: 1px solid #8a8a8a; padding: 5px 6px; text-align: center; font-weight: 600; }
.modelo-ts td { border: 1px solid #8a8a8a; padding: 4px 6px; vertical-align: middle; color: #222; background: #fff; }
.modelo-ts td.issue { font-weight: 700; text-align: center; min-width: 90px; }
.modelo-ts td.proj { font-weight: 700; color: #C00000; text-align: center; min-width: 90px; }
.modelo-ts td.num { text-align: right; white-space: nowrap; }
.modelo-ts tr.tot td { background: #FBE4D5; color: #C00000; font-weight: 700; text-align: right; }
.modelo-ts td.c { text-align: center; white-space: nowrap; }
.modelo-ts td.b { font-weight: 700; }
.modelo-ts tr.sep td { background: #d9d9d9; height: 5px; padding: 0; border-color: #8a8a8a; }
.modelo-ts tfoot td { background: #FBE4D5; color: #C00000; font-weight: 700; text-align: right; border: 1px solid #8a8a8a; }
.modelo-ts .mt-linha { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.modelo-ts form { background: #fff; color: #222; }

/* Calendário: filtro por tipo/cor */
.cal-filtros { display: grid; gap: 6px; margin: 8px 0 12px; }
.cal-filtros-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cal-filtro { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px 3px 7px; border-radius: 999px;
  border: 0.5px solid var(--borda); background: var(--branco); color: inherit; cursor: pointer; }
.cal-filtro.off { opacity: 0.45; text-decoration: line-through; }
.cal-filtro .cal-cor { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; display: inline-block; }
.cal-filtro .cal-n { font-size: 11px; color: var(--cinza-texto, #777); }

/* Reporte regulatório: cor própria, só em ecrãs internos (nunca nos documentos do cliente) */
tr.rep td { background: #FCEFF6; }
tr.rep td:first-child { border-left-color: #B0176B; }
.rep-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #B0176B; color: #fff; vertical-align: 1px; }
.rep-caixa { border: 0.5px solid var(--borda); border-radius: 10px; padding: 10px 14px; margin: 10px 0; background: var(--branco); }
.rep-caixa.activo { border-color: #B0176B; background: #FCEFF6; }
.rep-caixa h3 { margin: 0 0 6px; font-size: 14px; color: #8B1054; }

/* Perfil de manutenção: tudo a vermelho, para ninguém confundir um teste com trabalho real. */
.faixa-manutencao { background: var(--vermelho); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; display: flex;
  gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 60; letter-spacing: .02em; }
.faixa-manutencao[hidden] { display: none; }
.faixa-manutencao a, .faixa-manutencao button { background: #fff; color: var(--vermelho-escuro); border: 0; border-radius: 4px; padding: 3px 10px;
  font-weight: 700; font-size: 12px; text-decoration: none; cursor: pointer; }
body.manutencao .topo { background: var(--vermelho-escuro); }
body.manutencao .principal { box-shadow: inset 0 0 0 3px var(--vermelho); background: #FBEFF0; min-height: 80vh; }
body.manutencao .painel-caixa, body.manutencao .caixa, body.manutencao table { background: #FFF7F8; }
body.manutencao h1::before { content: "MANUTENÇÃO · "; color: var(--vermelho); font-size: .6em; letter-spacing: .08em; vertical-align: middle; }
body.manutencao h1[data-real]::before { content: ""; }

/* Notas de devolução (a Administração devolve com nota): a vermelho e a negrito para não passarem despercebidas */
.devolucao { color: var(--vermelho); font-weight: 700; }

/* Barra de filtros compacta: uma linha de campos pequenos que quebra quando falta largura */
.barra-filtros { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 12px; padding: 10px 12px; background: var(--superficie, #fff); border: 1px solid var(--borda, #e5e3dc); border-radius: 10px; }
.barra-filtros label { display: flex; flex-direction: column; gap: 3px; flex: 1 1 140px; min-width: 130px; max-width: 210px; font-size: 11.5px; font-weight: 600; color: var(--secundario, #666); text-transform: none; }
.barra-filtros select, .barra-filtros input { width: 100%; padding: 6px 8px; font-size: 13px; font-weight: 400; border-radius: 7px; height: 34px; box-sizing: border-box; }
.barra-filtros .acoes { display: flex; gap: 8px; align-items: center; margin: 0; }
.barra-filtros button { height: 34px; padding: 0 12px; font-size: 13px; }
.sel-todas { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 13px !important; font-weight: 600 !important; flex: 0 0 auto !important; max-width: none !important; min-width: 0 !important; cursor: pointer; }
.sel-todas input { width: auto !important; height: auto !important; }

/* Linha destacada ao chegar de um alerta ou atalho: pisca e fica realçada alguns segundos */
@keyframes piscar { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(224,168,0,0); } 50% { box-shadow: inset 0 0 0 4px rgba(224,168,0,.9); } }
.destacado { animation: piscar 1.1s ease-in-out 3; outline: 3px solid #E0A800; outline-offset: -2px; scroll-margin-top: 90px; }
tr.destacado > td { background: #FFF3C4 !important; }
div.destacado { background: #FFF3C4; border-radius: 6px; }

/* Veio do Correio e ainda não terminou: azul (o roxo é dos processos reportáveis), até o processamento acabar */
tr.do-correio > td:first-child { box-shadow: inset 5px 0 0 #1D6FB8; }
tr.do-correio > td { background-image: linear-gradient(rgba(29,111,184,.10), rgba(29,111,184,.10)); }
div.linha.do-correio { border-left: 5px solid #1D6FB8; background: rgba(29,111,184,.10); }
.estado.correio { background: #DCEBF9; color: #134F85; border-color: #B8D4F0; }
.cal-chip.do-correio-chip { border-left: 4px solid #1D6FB8; box-shadow: 0 0 0 1px #1D6FB8 inset; }
.lista-simples{list-style:none;margin:0;padding:6px 14px 12px}.lista-simples li{padding:6px 0;border-bottom:1px solid var(--linha,#e3e3e3)}

.faixa-plataforma { background: var(--ambar-fundo, #fff3d6); color: #6b4a00; border-bottom: 2px solid var(--ambar, #e0a100); font-size: 13px; padding: 8px 16px; }
.faixa-plataforma[hidden] { display: none; }
.modulos-grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin-top: 8px; }
.caixa-opcao { display: flex; align-items: center; gap: 8px; font-weight: 400; flex-direction: row; }
.caixa-opcao input { width: auto; margin: 0; }

/* ---------- visão geral do Dashboard ---------- */
.kpis-visao { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 14px 16px; color: var(--texto); display: block; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
a.kpi:hover { text-decoration: none; border-color: var(--vermelho); }
.kpi .t { font-size: 13px; color: var(--secundario); }
.kpi .n { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin: 4px 0 8px; }
.kpi .s { font-size: 12px; color: var(--secundario); display: block; margin-top: 8px; }
.kpi-barra { height: 7px; background: #EEEBE5; border-radius: 99px; overflow: hidden; }
.kpi-barra i { display: block; height: 100%; border-radius: 99px; }
.visao-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 14px; }
.visao-3 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 20px; }
@media (max-width: 900px) { .visao-2, .visao-3 { grid-template-columns: 1fr; } }
.titulo-seccao { margin: 8px 0 12px; font-size: 18px; }
.carga-colunas { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.carga-coluna { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; min-width: 0; }
.carga-coluna .pilha { position: relative; width: 100%; max-width: 64px; flex: 1; display: flex; align-items: flex-end; background: #F4F3EF; border-radius: 8px; overflow: hidden; }
.carga-coluna .pilha i { position: absolute; left: 0; right: 0; bottom: 0; display: block; border-radius: 8px 8px 0 0; }
.carga-coluna .reg { background: #D9D4CB; }
.carga-coluna .apr { background: var(--vermelho); }
.carga-coluna .valor { font-size: 12px; font-weight: 700; margin-bottom: 4px; min-height: 16px; }
.carga-coluna .rot { font-size: 13px; margin-top: 8px; color: var(--secundario); }
.leg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 8px; }
.leg.reg { background: #D9D4CB; } .leg.apr { background: var(--vermelho); }
.rosca-visao { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.rosca { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rosca > div { width: 98px; height: 98px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rosca strong { font-size: 30px; line-height: 1; } .rosca span { font-size: 11px; color: var(--secundario); }
.legenda-rosca { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.legenda-rosca i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; }
.legenda-rosca strong { margin-left: 6px; }
.linha-link { cursor: pointer; } .linha-link:hover { background: #FAF8F5; }
.caixa-correio { display: grid; gap: 8px; }
.mensagem-caixa { display: block; border: 1px solid var(--borda); border-radius: 8px; padding: 9px 12px; color: var(--texto); }
.mensagem-caixa:hover { text-decoration: none; border-color: var(--vermelho); background: #FFFBFB; }
.mensagem-caixa div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.mensagem-caixa .idade { color: var(--vermelho); font-size: 12px; font-weight: 700; flex: none; }
.mensagem-caixa p { font-size: 13px; color: var(--secundario); margin-top: 2px; }
.menu-grupo.dir .menu-grupo-lista { left: auto; right: 0; }
@media (hover: hover) { .menu-grupo:hover .menu-grupo-lista { display: flex; } .menu-grupo:hover .menu-grupo-botao { color: #fff; } }
.linha-link a { color: var(--texto); } .linha-link a:hover { color: var(--vermelho); }
.visao-2.so-uma, .visao-3.so-uma { grid-template-columns: 1fr; }
.botao { display: inline-block; padding: 7px 14px; background: var(--preto); color: #fff; border-radius: 6px; }
.botao:hover { text-decoration: none; background: #000; }
.decisao-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .decisao-inline select, .decisao-inline input { padding: 5px 7px; font-size: 13px; }
.tabela-marcos td input { width: 100%; } .tabela-marcos td input[name=outro_marco] { margin-top: 4px; } .negativo { color: var(--vermelho); font-weight: 700; }
.cartao.azul { border-top-color: #1D6FB8; }
.linha-total td { background: #FAF8F5; border-top: 2px solid var(--borda); }
.estado.azul { color: #1B4F8F; }
.cel-issue { vertical-align: top; min-width: 130px; } .cel-total { vertical-align: middle; color: var(--vermelho); }
.detalhe-aloc { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 6px 4px; font-size: 13px; color: var(--secundario); } .detalhe-aloc strong { color: var(--texto); }
.acoes-celula { white-space: normal; min-width: 210px; } .acoes-celula .pequeno { margin: 2px 4px 2px 0; }
.caixa-linha { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }

/* Horas alocadas: a tabela rola dentro da caixa, para o total e os botões ficarem sempre à vista */
.aloc-scroll .tabela-wrap { max-height: 330px; overflow: auto; }
.aloc-scroll thead th { position: sticky; top: 0; background: var(--branco); z-index: 1; box-shadow: 0 1px 0 var(--borda); }

/* ambiente fora da produção: faixa fina no topo */
#faixa-ambiente { background: #7a5200; color: #fff; text-align: center; font-size: 12px; letter-spacing: 1px; padding: 3px 8px; font-weight: 700; }

.campo-olho { position: relative; display: block; }
.campo-olho input { width: 100%; padding-right: 42px; }
.campo-olho .olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 4px 8px; font-size: 18px; line-height: 1; cursor: pointer; opacity: .55; color: inherit; }
.campo-olho .olho.ligado, .campo-olho .olho:hover { opacity: 1; }

.barra-tarefas { display: flex; min-width: 160px; height: 22px; background: var(--superficie-2, #EFEDE9); border-radius: 4px; overflow: hidden; }
.barra-tarefas i { display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 700; min-width: 18px; }
.leg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
