:root {
  --verde: #17723d;
  --verde2: #0f572d;
  --claro: #edf8f0;
  --texto: #17231b;
  --suave: #65736a;
  --borda: #dce6df;
  --fundo: #f4f7f5;
  --branco: #fff;
}

* {
  box-sizing: border-box;
}

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

.pagina {
  width: min(1160px, calc(100% - 32px));
  margin: auto;
  padding: 30px 0;
}

.pagina.estreita {
  width: min(720px, calc(100% - 32px));
  padding-top: 58px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.marca.compacta {
  margin: 0;
}

.logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--claro);
  font-size: 30px;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
}

.marca p, .suave {
  color: var(--suave);
  margin-bottom: 0;
}

.cartao {
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--borda);
  border-radius: 16px;
  background: var(--branco);
  box-shadow: 0 8px 26px rgba(33, 64, 44, 0.06);
}

.upload {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  margin: 20px 0;
  padding: 24px;
  border: 2px dashed #9db7a6;
  border-radius: 14px;
  background: #fbfdfb;
  cursor: pointer;
  text-align: center;
}

.upload:hover {
  border-color: var(--verde);
  background: var(--claro);
}

.upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload strong {
  font-size: 20px;
}

.upload span {
  color: var(--suave);
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.primario {
  width: 100%;
  color: #fff;
  background: var(--verde);
}

.primario:hover {
  background: var(--verde2);
}

.secundario {
  color: var(--verde2);
  border: 1px solid #aac7b3;
  background: #fff;
}

.pequeno {
  width: auto;
  min-height: 40px;
  padding: 9px 13px;
  font-size: 13px;
}

.botao:disabled {
  opacity: 0.65;
  cursor: wait;
}

.alerta {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
}

.alerta.erro {
  color: #9e2929;
  border: 1px solid #edc3c3;
  background: #fff2f2;
}

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.indicadores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.indicador {
  text-align: center;
  display: grid;
  gap: 3px;
}

.indicador strong {
  color: var(--verde);
  font-size: 34px;
}

.indicador span {
  color: var(--suave);
}

.acoes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.acoes .botao {
  width: 100%;
}

details summary {
  cursor: pointer;
  font-weight: 800;
}

.loja {
  padding-top: 22px;
}

.loja + .loja {
  margin-top: 24px;
  border-top: 1px solid var(--borda);
}

.tabela {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--borda);
  text-align: left;
}

th {
  background: #f5f8f6;
  color: #425348;
  font-size: 13px;
}

/* ==========================================
   Validação de Erros dos Pedidos via WhatsApp
   ========================================== */
.bloco-whatsapp.com-erro {
  border: 1px solid #fca5a5;
  background-color: #fef2f2;
  padding: 0.75rem;
  border-radius: 6px;
}

.campo-erro {
  border-color: #dc2626 !important;
  border-width: 2px !important;
}

.mensagem-erro-whatsapp {
  color: #dc2626;
  font-weight: bold;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .topo {
    align-items: flex-start;
    flex-direction: column;
  }
  .indicadores, .acoes {
    grid-template-columns: 1fr;
  }
}