:root {
  --teal: #2d7a90;
  --teal-escuro: #1f5a6b;
  --verde: #abcd30;
  --fundo: #f2f5f6;
  --texto: #1c2b30;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fundo);
  color: var(--texto);
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--teal);
  color: #fff;
  padding: 10px 20px;
  flex-wrap: wrap;
}
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.logo span { font-weight: 400; opacity: .8; font-size: 14px; }
.logo-cc { height: 26px; display: block; }
nav { display: flex; gap: 14px; flex: 1; }
nav a { color: #fff; text-decoration: none; opacity: .9; padding: 6px 10px; border-radius: 6px; }
nav a:hover { background: rgba(255,255,255,.15); }
.sair { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sair button { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
main { max-width: 1200px; margin: 24px auto; padding: 0 20px; }

.barra { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; }
input, select, button { font: inherit; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=search], select {
  padding: 8px 10px; border: 1px solid #c6d3d8; border-radius: 8px; background: #fff;
}
button, .botao {
  background: var(--teal); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .botao:hover { background: var(--teal-escuro); }
.contagem { color: #5a7078; font-size: 14px; }
.vazio { background: #fff; border-radius: 12px; padding: 40px; text-align: center; }

.grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.selo { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.selo img { width: 100%; height: 260px; object-fit: contain; background: #fff; padding: 12px; }
.selo .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.selo .info span { font-size: 13px; color: #46595f; }
.selo .meta { color: #8aa0a7; }
.acoes { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.acoes a { font-size: 13px; font-weight: 600; color: var(--teal); text-decoration: none; border: 1px solid #c6d3d8; padding: 3px 8px; border-radius: 6px; }
.acoes a:hover { background: var(--teal); color: #fff; }
.acoes form { margin-left: auto; }
.apagar { background: transparent; color: #b33; border: 1px solid #d8b6b6; padding: 3px 8px; font-size: 13px; }
.apagar:hover { background: #b33; color: #fff; }

.cartao { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 14px; }
.cartao h2 { margin: 0 0 4px; }
.cartao label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.cartao.estreito { max-width: 640px; }
.duascolunas { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.colunas-iguais { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .colunas-iguais { grid-template-columns: 1fr; } }
.config-unica { max-width: 640px; }
.config-unica .coluna { display: flex; flex-direction: column; gap: 20px; }
.previa { background: #fff; border-radius: 12px; padding: 16px; text-align: center; }
.previa img { max-width: 100%; max-height: 70vh; }
@media (max-width: 800px) { .duascolunas { grid-template-columns: 1fr; } }

.erro { color: #b33; }
.sucesso { color: #2c7a2c; font-weight: 600; }
.errolista { font-size: 13px; color: #b33; }

.nomarca { color: inherit; text-decoration: none; }
.nomarca:hover { color: var(--teal); }
.acoes a.destaque { background: var(--teal); color: #fff; border-color: var(--teal); }
.coluna { display: flex; flex-direction: column; gap: 20px; }
.copiavel { display: flex; gap: 6px; }
.copiavel input { flex: 1; font-size: 13px; color: #46595f; }
textarea { padding: 8px 10px; border: 1px solid #c6d3d8; border-radius: 8px; font: inherit; font-size: 13px; width: 100%; resize: vertical; }
.listaficheiros { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #e4ebee; padding-top: 10px; }
.listaficheiros form { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.previa h3 { margin: 0 0 10px; text-align: left; }
label small { font-weight: 400; color: #8aa0a7; }

body.publica { background: var(--fundo); }
.pub-topo { background: var(--teal); color: #fff; text-align: center; padding: 36px 20px; }
.pub-topo h1 { margin: 0 0 6px; }
.pub-topo p { margin: 0 0 16px; opacity: .85; }
.pub-topo .botao { background: var(--verde); color: #1c2b30; font-weight: 700; }
.pub-main { max-width: 900px; margin: 24px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.pub-selo { max-width: 260px; display: block; }
.pub-story { max-width: 220px; display: block; border-radius: 8px; }
.pub-fotos { display: flex; flex-direction: column; gap: 6px; }
.pub-fotos a { color: var(--teal); }
.pub-fundo { text-align: center; color: #8aa0a7; font-size: 13px; padding: 24px; }

.galeria { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 8px; scrollbar-width: none; }
.galeria::-webkit-scrollbar { display: none; }
.galeria img { width: 100%; flex-shrink: 0; scroll-snap-align: start; }
.galeria-nav { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.galeria-nav .botao { margin-left: auto; }
#galeria-pos { color: #5a7078; font-size: 14px; }
.form-materiais { display: flex; flex-direction: column; gap: 12px; }
.form-materiais h3 { margin: 12px 0 0; }
.form-materiais label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.form-materiais label small { font-weight: 400; color: #8aa0a7; }
.tabela-scroll { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e4ebee; white-space: nowrap; }
td:nth-child(5) { white-space: normal; min-width: 180px; }
th { background: #f7fafb; color: #46595f; }

.barra-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.tabela-selos .thumb { width: 44px; cursor: zoom-in; display: block; }
.linha-principal td { border-bottom: 0; }
.linha-estado td { padding-top: 0; border-bottom: 1px solid #dbe6ea; }
/* Zebra por marca: cada marca ocupa 2 linhas, alternamos os pares */
.tabela-selos:not(.tabela-simples) tbody tr:nth-child(4n+3) td,
.tabela-selos:not(.tabela-simples) tbody tr:nth-child(4n) td { background: #e9f1f3; }
/* Versão sem módulos extra: uma linha por marca */
.tabela-simples tbody tr:nth-child(even) td { background: #e9f1f3; }
.tabela-simples .linha-principal td { border-bottom: 1px solid #dbe6ea; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-right: 4px; }
.chip.ok { background: #e3f2e0; color: #2c7a2c; }
.chip.falta { background: #fbe9e7; color: #b33; }
.chip.neutro { background: #eef3f4; color: #5a7078; }
.form-email { display: flex; flex-direction: column; gap: 10px; }
.tabela-selos td { vertical-align: middle; }
.tabela-selos td:nth-child(4) { white-space: normal; min-width: 200px; }
.centrado { text-align: center; }
.acoes-linha a { font-size: 12px; font-weight: 600; color: var(--teal); text-decoration: none; border: 1px solid #c6d3d8; padding: 2px 6px; border-radius: 5px; margin-right: 3px; }
.acoes-linha a:hover { background: var(--teal); color: #fff; }
.botao.pequeno { padding: 4px 10px; font-size: 13px; }
button.mini { background: transparent; color: var(--teal); border: 1px solid #c6d3d8; padding: 2px 8px; font-size: 12px; font-weight: 600; border-radius: 5px; }
#pa-preview { width: 100%; height: 640px; border: 1px solid #e4ebee; border-radius: 8px; background: #eef3f4; }
button.mini:hover { background: var(--teal); color: #fff; }
dialog#modal-selo { border: 0; border-radius: 12px; padding: 16px; text-align: center; cursor: zoom-out; max-width: 480px; }
dialog#modal-selo::backdrop { background: rgba(10, 30, 36, .6); }
dialog#modal-selo img { width: 420px; max-width: 80vw; }
dialog#modal-selo p { margin: 8px 0 0; font-weight: 700; color: var(--texto); }
.selecao-caixa { display: block; padding: 8px 12px 0; }
.selecao-todos { font-weight: 400; cursor: pointer; }
.premio-bloco { border: 1px solid #e4ebee; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.premio-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.premio-identidade { display: flex; align-items: center; gap: 12px; }
.premio-selo { width: 52px; flex-shrink: 0; }
.premio-topo .meta { display: block; font-size: 13px; color: #8aa0a7; font-weight: 400; }
.premio-arte { display: flex; gap: 14px; align-items: flex-start; }
.premio-arte img { max-width: 160px; border: 1px solid #e4ebee; border-radius: 6px; }
.premio-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pergunta-bloco { border: 1px solid #e4ebee; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pergunta-linha { display: flex; gap: 10px; }
.pergunta-acoes { display: flex; justify-content: space-between; }
.barra > div { display: flex; gap: 8px; }
hr { border: 0; border-top: 1px solid #e4ebee; margin: 8px 0; }

.pv-grelha { display: flex; gap: 14px; flex-wrap: wrap; }
.pv-grelha figure { margin: 0; text-align: center; }
.pv-grelha img { height: 130px; background: #eef3f4; border-radius: 6px; padding: 6px; display: block; }
.pv-grelha figcaption { font-size: 11px; color: #5a7078; margin-top: 3px; }
.ver-aplicado { color: var(--teal); font-weight: 600; }
#modal-mockup { border: 0; border-radius: 12px; padding: 14px; max-width: 680px; text-align: center; }
#modal-mockup::backdrop { background: rgba(10, 30, 36, .6); }
.mockup-caixa { position: relative; display: inline-block; }
.mockup-fundo { max-height: 74vh; max-width: 100%; display: block; border-radius: 8px; }
.mockup-selo { position: absolute; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .25)); }
#mockup-titulo { margin: 10px 0 6px; font-weight: 700; color: var(--texto); }

/* Editor de timelines */
.tabela-timeline { border-collapse: collapse; font-size: 11px; width: auto; }
.tabela-timeline .celula { min-width: 18px; max-width: 22px; }
.tabela-timeline th, .tabela-timeline td { padding: 2px; border: 1px solid #dbe6ea; white-space: nowrap; }
.th-mes { background: var(--teal); color: #fff; font-size: 10px; padding: 4px 2px; }
.th-sem { background: #eef3f4; color: #46595f; font-size: 9px; font-weight: 600; min-width: 18px; text-align: center; }
.th-acao { background: var(--teal); color: #fff; text-align: left; padding: 4px 8px; }
.td-acao { min-width: 220px; max-width: 260px; padding: 4px 6px; white-space: normal; }
.td-acao input { display: block; border: 0; background: transparent; width: 100%; padding: 1px 2px; font-size: 12.5px; }
.td-acao .in-nome { font-weight: 700; }
.td-acao .in-detalhe { font-size: 10.5px; color: #5a7078; }
.td-acao input:focus { outline: 1px solid #c6d3d8; border-radius: 3px; background: #fff; }
.celula { width: 20px; height: 26px; cursor: pointer; }
.celula:hover { background: #cfe3e8; }
.celula.marcada { background: var(--teal); }
.celula.marcada:hover { background: var(--teal-escuro); }
.td-fim { padding: 2px 6px; }
.td-fim .apagar { padding: 1px 7px; margin-left: 4px; }
.linha-ongoing { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.linha-ongoing .in-nome { padding: 6px 8px; border: 1px solid #c6d3d8; border-radius: 6px; }
.mini-link { color: var(--teal); font-weight: 600; font-size: 13px; }

body.login { display: grid; place-items: center; min-height: 100vh; background: var(--teal); }
body.login .cartao { width: 340px; }
body.login h1 { margin: 0; font-size: 26px; color: var(--teal); }
body.login h1 small { font-size: 15px; color: #5a7078; font-weight: 400; }

/* Escolha do projeto na página pública de PLV (29/10/2026) */
.escolha-projetos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.botao-projeto { display: block; text-align: center; padding: 26px 18px; border-radius: 12px; font-size: 19px; font-weight: 700; text-decoration: none; transition: transform .1s; }
.botao-projeto:hover { transform: scale(1.02); }
.faixa-projeto { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 10px; margin: 0 0 4px; }
.faixa-projeto strong { font-size: 18px; }
.faixa-projeto a { color: inherit; font-size: 13px; opacity: .9; }

/* Pedidos PLV: escrita livre + "Não aplicável" (29/10/2026) */
.campo-material { display: flex; flex-direction: column; gap: 4px; }
.campo-material-nome { font-weight: 600; font-size: 14px; }
.campo-material-nome small { font-weight: 400; color: #8aa0a7; }
.opcao-material { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.opcao-material .na-opcao { display: flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; white-space: nowrap; cursor: pointer; }
.opcao-material input[type="checkbox"] { width: auto; margin: 0; }
.opcao-material input[type="text"] { flex: 1; min-width: 200px; width: auto; }
