body { background: #f4f6f8; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.kpi .valor { font-size: 1.6rem; font-weight: 600; }
.kpi .rotulo { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table td, .table th { vertical-align: middle; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.barra { background: #0d6efd; border-radius: 3px 3px 0 0; min-height: 2px; }
.grafico-semana { height: 120px; display: flex; align-items: flex-end; gap: 6px; }
.grafico-semana > div { flex: 1; text-align: center; font-size: .75rem; color: #6c757d; }
.linhas-doc td { min-width: 90px; }
.linhas-doc td.col-produto { min-width: 220px; }
/* Raspadinhas: uma cor por preço de bilhete (ordem dos escalões) */
.preco-1 { --cor: #2b8a3e; } .preco-2 { --cor: #1971c2; } .preco-3 { --cor: #7048e8; }
.preco-4 { --cor: #e8590c; } .preco-5 { --cor: #c2255c; } .preco-6 { --cor: #343a40; }
.jogos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.jogo-botao { display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: .55rem .4rem; border: 2px solid var(--cor, #495057); border-radius: .6rem; background: #fff; color: #212529;
  text-decoration: none; text-align: center; line-height: 1.15; min-height: 5.2rem; cursor: pointer; }
.jogo-botao .numero { font-size: .8rem; color: #495057; font-variant-numeric: tabular-nums; }
.jogo-botao .nome { font-weight: 600; word-break: break-word; margin-top: .25rem; }
.jogo-botao .preco { font-size: 1.3rem; font-weight: 800; color: #fff; background: var(--cor, #495057); border-radius: .4rem; padding: .05rem .6rem; font-variant-numeric: tabular-nums; }
.jogo-botao .stock { font-size: .72rem; color: #6c757d; margin-top: .15rem; }
.jogo-botao.inativo { opacity: .5; border-style: dashed; }
.jogo-botao:hover { background: #f8f9fa; }
.ponto-preco { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--cor, #495057); margin-right: .4rem; }
.precos-jogo { display: flex; flex-wrap: wrap; gap: .35rem; }
.precos-jogo .btn { min-width: 3.6rem; font-weight: 600; }
.previa-jogo { background: #f1f3f5; border-radius: .4rem; padding: .4rem .6rem; font-size: .9rem; }
.jogo-botao.escolhido { background: var(--cor, #495057); color: #fff; }
.jogo-botao.escolhido .numero, .jogo-botao.escolhido .stock { color: #fff; }
.jogo-botao.escolhido .preco { background: #fff; color: var(--cor, #495057); }
.qtd-compra { width: 7.5rem; margin: 0 auto; }
/* Stock de um carro/armazém: lista compacta por preço (cabe no ecrã do telemóvel, sem arrastar para o lado) */
.stock-grupo { border-left: 5px solid var(--cor, #adb5bd); }
.stock-grupo + .stock-grupo { border-top: 1px solid #dee2e6; }
.stock-grupo header { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; background: #f8f9fa; }
.stock-grupo header .preco { font-size: 1.05rem; font-weight: 800; color: #fff; background: var(--cor, #495057);
  border-radius: .35rem; padding: 0 .5rem; font-variant-numeric: tabular-nums; }
.stock-grupo header .total { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-linha { display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; border-top: 1px solid #f1f3f5; }
.stock-linha .info { flex: 1; min-width: 0; line-height: 1.2; }
.stock-linha .nome { font-weight: 600; overflow-wrap: anywhere; }
.stock-linha .sub { font-size: .8rem; color: #6c757d; }
.stock-linha .qtd { font-size: 1.1rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock-linha .qtd small { font-size: .75rem; font-weight: 400; color: #6c757d; }
.stock-linha .acertar { color: #6c757d; padding: .25rem; }
.stock-linha.negativo { background: #f8d7da; }
.stock-rodape { display: flex; justify-content: space-between; padding: .6rem .75rem; border-top: 2px solid #dee2e6; }
@media (min-width: 768px) { .stock-lista { max-width: 720px; } }
.compra-resumo .custo { width: 6rem; margin-left: auto; }
@media (min-width: 1200px) { .compra-resumo { position: sticky; top: 4.5rem; } }
.perfil-gestor { background: #0d6efd; color: #fff; }
.perfil-rota { background: #198754; color: #fff; }
.perfil-cliente { background: #fd7e14; color: #fff; }
.perfil-papelaria { background: #6f42c1; color: #fff; }
.perfil-escritorio { background: #0b7285; color: #fff; }
.perfil-sem { background: #ffc107; color: #212529; }
.perfis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
@media (max-width: 420px) { .perfis { grid-template-columns: repeat(2, 1fr); } }
.perfil-opcao { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .6rem .3rem; font-weight: 600; }
.perfil-opcao .bi { font-size: 1.4rem; }
.navbar .nav-link { white-space: nowrap; }
@media print {
  nav, .no-print, .btn, form { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Sacos de prémios */
.resultado-certo { background: #2b8a3e; color: #fff; }
.resultado-falta { background: #c92a2a; color: #fff; }
.resultado-sobra { background: #f08c00; color: #fff; }
.foto-talao-grande { width: 100%; max-height: 14rem; object-fit: contain; background: #f8f9fa; border-radius: .4rem; border: 1px solid #dee2e6; }

/* Contas da empresa */
.tipos-lancamento { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .5rem; }
.tipo-opcao { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .6rem .3rem; font-weight: 600; font-size: .9rem; }
.tipo-opcao .bi { font-size: 1.4rem; }
.valor-grande { font-size: 1.5rem; font-weight: 700; }
.tipo-imposto { background: #c92a2a; color: #fff; } .tipo-ordenado { background: #1971c2; color: #fff; }
.tipo-conta { background: #e8590c; color: #fff; } .tipo-parcela { background: #7048e8; color: #fff; }
.tipo-despesa { background: #495057; color: #fff; } .tipo-retirada { background: #f08c00; color: #fff; }
.tipo-capital { background: #2b8a3e; color: #fff; }
.tabela-ano td, .tabela-ano th { white-space: nowrap; font-size: .85rem; }
.contas-tabela td.text-end { white-space: nowrap; padding-left: .5rem; }

/* Códigos dos prémios */
a.jogo-botao { text-decoration: none; color: inherit; }
.jogo-preco { font-size: 1.2rem; font-weight: 800; color: #fff; background: var(--cor, #495057); border-radius: .4rem; padding: .05rem .6rem; }
.codigo-letras { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 1.05rem; letter-spacing: .12em;
  background: #f1f3f5; border: 1px solid #dee2e6; border-radius: .35rem; padding: .05rem .45rem; }
.codigo-input { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .1em; }
/* As partes partilhadas com o portal (cartões) na versão completa */
.codigos-completa { max-width: 720px; margin: 0 auto; }
.codigos-completa .cartao { background: #fff; border-radius: .9rem; padding: 1rem; margin-bottom: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.codigos-completa .rotulo { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; }
.tipo-transferencia { background: #0b7285; color: #fff; }
