:root {
  --vermelho: #7a1723;
  --vermelho-claro: #a3202f;
  --creme: #faf6ef;
  --texto: #2a2320;
  --borda: #ddd2c4;
  --verde: #2f7d4f;
  --amarelo: #b8860b;
  --cinza: #6b6258;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--creme);
  color: var(--texto);
  margin: 0;
}

.topo {
  background: var(--vermelho);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.marca { font-weight: 700; font-size: 1.1rem; }

.topo nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.2rem;
  opacity: 0.9;
}
.topo nav a:hover { opacity: 1; text-decoration: underline; }
.usuario-logado {
  margin-left: 1.2rem;
  background: rgba(255,255,255,0.15);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

main {
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; margin-top: 2rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--borda);
  font-size: 0.92rem;
}
th { background: #f1e8db; font-weight: 600; }
tr:last-child td { border-bottom: none; }

.card {
  background: white;
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}

form.form-simples { display: flex; flex-direction: column; gap: 0.7rem; max-width: 420px; }
form.form-inline { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

label { font-size: 0.85rem; color: var(--cinza); font-weight: 600; }
input, select {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--borda);
  border-radius: 6px;
  font-size: 0.95rem;
}
input[type="file"] { border: none; padding: 0.2rem 0; }

button, .botao {
  background: var(--vermelho);
  color: white;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .botao:hover { background: var(--vermelho-claro); }
button.secundario { background: white; color: var(--vermelho); border: 1px solid var(--vermelho); }
button.grande { padding: 0.9rem 1.6rem; font-size: 1.05rem; }

.badge { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-pendente { background: #fbe6c8; color: var(--amarelo); }
.badge-ok { background: #dcf0e2; color: var(--verde); }

.flashes { margin-bottom: 1rem; }
.flash { padding: 0.7rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; font-size: 0.92rem; }
.flash-erro { background: #fbdada; color: #8a1f1f; }
.flash-sucesso { background: #dcf0e2; color: #205c37; }
.flash-info { background: #e4ecf5; color: #2a4d75; }

.campo-upload { border-bottom: 1px dashed var(--borda); padding-bottom: 0.7rem; margin-bottom: 0.7rem; }
.campo-upload:last-child { border-bottom: none; }
.obrigatorio { color: var(--vermelho); }

.resumo-totais { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.resumo-totais .card { flex: 1; min-width: 160px; text-align: center; }
.resumo-totais .valor { font-size: 1.4rem; font-weight: 700; }
.resumo-totais .rotulo { font-size: 0.8rem; color: var(--cinza); }
