:root {
  --fundo: #f3efe6;
  --papel: #fffdf8;
  --tinta: #1d2421;
  --marca: #1f4d3a;
  --linha: #d9d1c3;
  --verde: #1f7a4d;
  --verde-fundo: #e5f4ea;
  --vermelho: #9f2d2d;
  --vermelho-fundo: #fde8e4;
  --neutro: #5c6560;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.45;
}

a { color: var(--marca); }

h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }

.topo {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--marca);
  color: #f7f3ea;
}

.marca {
  color: #f7f3ea;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  text-decoration: none;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.menu a {
  color: #f7f3ea;
  text-decoration: none;
}

.menu a.ativo { text-decoration: underline; }

.grupo {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.sair { margin: 0; }

.sair button,
button,
.botao {
  background: var(--marca);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.topo .sair button {
  background: transparent;
  border: 1px solid #f7f3ea;
}

button.perigo { background: var(--vermelho); }

.miolo { padding: 1.5rem; max-width: none; }

.miolo-estreito { max-width: 420px; margin: 8vh auto; }

.pagina-simples { background: #e7efe9; }

.cartao-login {
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 12px;
  padding: 1.5rem;
}

.olho { letter-spacing: 0.08em; text-transform: uppercase; color: var(--neutro); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 120px;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
}

.card-verde { background: var(--verde-fundo); color: var(--verde); }
.card-vermelho { background: var(--vermelho-fundo); color: var(--vermelho); }
.card-neutro { background: var(--papel); color: var(--neutro); border-color: var(--linha); }
.card.selecionado { border-color: currentColor; }

.numero { font-size: 2.4rem; font-family: Georgia, serif; line-height: 1; }

.numero .de-total { font-size: 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--papel);
}

th, td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--linha);
  vertical-align: top;
}

.url { word-break: break-all; }

.tabela-rolavel { overflow-x: auto; }

.tabela-rolavel .url {
  white-space: nowrap;
  word-break: normal;
}

.selo {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #ece7dc;
}

.selo-sucesso { background: var(--verde-fundo); color: var(--verde); }
.selo-falha { background: var(--vermelho-fundo); color: var(--vermelho); }

.formulario label,
.linha-parametro label { display: block; margin-top: 0.8rem; }

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
  width: 100%;
  max-width: 36rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--linha);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.formulario button,
.formulario-linha button { margin-top: 1rem; }

.erro, .errorlist { color: var(--vermelho); padding-left: 1rem; }

.mensagens { list-style: none; padding: 0; }
.mensagens li {
  background: var(--verde-fundo);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

.cabecalho-pagina, .acoes, .acoes form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.acoes { justify-content: flex-end; }

table form { margin: 0; }

.ajuda, .resumo, .migalha { color: var(--neutro); }

.lista-simples { padding-left: 1.1rem; }

.linha-parametro {
  border-top: 1px solid var(--linha);
  margin-top: 0.8rem;
  padding-top: 0.4rem;
}

.bloco { margin-top: 2rem; }

.periodos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.periodos a {
  text-decoration: none;
  color: var(--marca);
  border: 1px solid var(--linha);
  background: var(--papel);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.periodos a.ativo {
  background: var(--marca);
  color: #fff;
  border-color: var(--marca);
}

.filtro-topo {
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.grafico {
  width: 50%;
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0 1.5rem;
}

.grafico svg { width: 100%; height: auto; display: block; }

.legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.legenda li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}

.traco {
  width: 1.5rem;
  border-top: 3px solid;
  flex: none;
}

.traco-falha { border-top-style: dashed; }

.paginacao {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.8rem;
}

@media (max-width: 720px) {
  .topo { align-items: flex-start; }
  table { display: block; overflow-x: auto; }
  .grafico { width: 100%; }
}
