/* Origem: cópia de fabrica-apps/apps/crm-proprio/web/estilo.css em 30/11/2026. Até a linha
   "Camada c3" o arquivo é igual ao original; dali para baixo vêm os acréscimos das telas
   de campanha (selos de estado, resumo em cinco números, navegação e horas por mudança). */
/* Estilo das telas da F1, escrito do zero. Celular primeiro; tablet e computador
   usam a mesma coluna central. Origem: SPEC 3.2 (CR-34, uso no celular pelo
   navegador) e a referência visual do template (Q3), só no jeito: cartões,
   selos arredondados e um tom quente de destaque. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: #f5f1ea;
  color: #221d16;
}
[hidden] { display: none !important; }
a { color: #8a5a10; }

.pagina { max-width: 640px; margin: 0 auto; padding: 16px 16px 56px; }
.pagina.estreita { max-width: 420px; padding-top: 48px; }

.topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.acoes_topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.marca { margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #9a6a1c; font-weight: 700; }
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 4px; overflow-wrap: anywhere; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: #6c6253; font-size: 14px; margin: 0; }

.cartao { background: #fffdf9; border: 1px solid #e4dccd; border-radius: 14px; padding: 16px; margin: 0 0 12px; }
.cartao > p + p { margin-top: 8px; }

.resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.numero { background: #fffdf9; border: 1px solid #e4dccd; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.numero strong { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.numero span { font-size: 13px; color: #6c6253; }
.numero.alerta strong { color: #a3361f; }

.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item { display: block; text-decoration: none; color: inherit; background: #fffdf9; border: 1px solid #e4dccd; border-radius: 14px; padding: 14px 16px; }
.item:focus-visible, .botao:focus-visible, button:focus-visible { outline: 3px solid #e0a948; outline-offset: 2px; }
.item.atrasado { border-left: 6px solid #b4442f; }
.item_linha { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.item_detalhe { display: block; color: #6c6253; font-size: 14px; margin-top: 4px; }

.selo { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.selo.atrasado { background: #f7e1da; color: #8f2f1d; }
.selo.do_dia { background: #f4e7cc; color: #7a5313; }
.selo.neutro { background: #ece6db; color: #4f473b; }

.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
input, select, textarea {
  font: inherit; font-weight: 400; width: 100%; min-height: 44px; border-radius: 10px;
  border: 1px solid #d3c8b4; background: #ffffff; color: inherit; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c88a2c; outline-offset: 1px; }

fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 8px; }
.escolhas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.escolha {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid #d3c8b4; background: #ffffff; cursor: pointer; font-weight: 500;
}
.escolha input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: #9a6a1c; }
.escolha:has(input:checked) { border-color: #9a6a1c; background: #f6ead2; }
.painel { border-left: 3px solid #e4dccd; padding-left: 12px; margin: 8px 0 4px; }

button, .botao {
  font: inherit; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 44px; border-radius: 10px; padding: 10px 16px; border: 1px solid #d3c8b4;
  background: #fffdf9; color: inherit; cursor: pointer;
}
.botao.pequeno { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.botao.principal { background: #9a6a1c; border-color: #9a6a1c; color: #ffffff; font-weight: 700; width: 100%; }
.botao.sugestao { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 999px; }
button:disabled { opacity: 0.6; cursor: progress; }

.erro { color: #a3361f; font-weight: 600; margin: 0 0 12px; }
.aviso { background: #e6f0e3; color: #2c5a35; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.vazio { text-align: center; color: #6c6253; }

.retorno_marcado { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.linha_do_tempo { list-style: none; margin: 0; padding: 0; }
.linha_do_tempo li { border-top: 1px solid #ece4d6; padding: 10px 0; }
.linha_do_tempo li:first-child { border-top: 0; padding-top: 0; }
.linha_do_tempo .quando { display: block; font-size: 13px; color: #6c6253; margin-top: 2px; }
.linha_do_tempo .texto { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }

.tipo { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tipo .acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (min-width: 720px) {
  .pagina { padding-top: 32px; }
  h1 { font-size: 30px; }
}

@media (prefers-color-scheme: dark) {
  body { background: #14110d; color: #f1ece3; }
  a { color: #e8b866; }
  .marca { color: #e0a948; }
  .sub, .numero span, .item_detalhe, .vazio, .linha_do_tempo .quando { color: #a99f8c; }
  .cartao, .numero, .item { background: #1d1914; border-color: #352e24; }
  .numero.alerta strong, .erro { color: #f08f78; }
  .item.atrasado { border-left-color: #d2654c; }
  .selo.atrasado { background: #4a2219; color: #f6b7a6; }
  .selo.do_dia { background: #45361a; color: #f1d39a; }
  .selo.neutro { background: #2d271f; color: #d9cfbd; }
  input, select, textarea, .escolha { background: #120f0b; border-color: #3d3529; color: #f1ece3; }
  .escolha:has(input:checked) { background: #3a2d16; border-color: #e0a948; }
  button, .botao { background: #1d1914; border-color: #3d3529; color: #f1ece3; }
  .botao.principal { background: #e0a948; border-color: #e0a948; color: #1a1407; }
  .aviso { background: #1f3323; color: #bfe3c4; }
  .painel { border-left-color: #352e24; }
  .linha_do_tempo li { border-top-color: #2c261e; }
}

/* Camada c3: acréscimos do comunica-prefeitura. */
.navegacao { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.navegacao .botao[aria-current="page"] { border-color: #9a6a1c; background: #f6ead2; font-weight: 700; }
.resumo.cinco { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contagem { font-size: 20px; font-weight: 700; margin: 4px 0 12px; }
.modelo_texto { white-space: pre-wrap; overflow-wrap: anywhere; color: #4f473b; font-size: 14px; margin: 0 0 12px; }
.selo.na_fila { background: #ece6db; color: #4f473b; }
.selo.enviada { background: #e3ebf5; color: #24476e; }
.selo.entregue { background: #f4e7cc; color: #7a5313; }
.selo.lida { background: #e6f0e3; color: #2c5a35; }
.selo.falhou { background: #f7e1da; color: #8f2f1d; }
.selo.rascunho, .selo.agendada, .selo.cancelada { background: #ece6db; color: #4f473b; }
.selo.enviando { background: #e3ebf5; color: #24476e; }
.selo.concluida { background: #e6f0e3; color: #2c5a35; }
.mudancas { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: 14px; color: #6c6253; }
.item.falhou { border-left: 6px solid #b4442f; }
.botao.cheio { width: 100%; }

@media (min-width: 720px) {
  .resumo.cinco { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-color-scheme: dark) {
  .navegacao .botao[aria-current="page"] { background: #3a2d16; border-color: #e0a948; }
  .modelo_texto, .mudancas { color: #a99f8c; }
  .selo.na_fila, .selo.rascunho, .selo.agendada, .selo.cancelada { background: #2d271f; color: #d9cfbd; }
  .selo.enviada, .selo.enviando { background: #1c2a3b; color: #b5cdec; }
  .selo.entregue { background: #45361a; color: #f1d39a; }
  .selo.lida, .selo.concluida { background: #1f3323; color: #bfe3c4; }
  .selo.falhou { background: #4a2219; color: #f6b7a6; }
  .item.falhou { border-left-color: #d2654c; }
}
