:root {
  --navy: #1c2d4f;
  --navy-escuro: #14213c;
  --creme: #f3efe6;
  --cobre: #b8875f;
  --tinta: #2b2b2b;
  --borda: #d9d2c4;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--creme);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
}

.topo {
  background: var(--navy);
  color: var(--creme);
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.marca-nome {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.marca-nome::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--cobre);
  vertical-align: middle;
}

.marca-sub {
  font-size: 0.8rem;
  opacity: 0.75;
}

.container {
  height: calc(100% - 3.1rem);
  position: relative;
}

.mapa-wrap {
  position: absolute;
  inset: 0;
}

#mapa {
  position: absolute;
  inset: 0;
}

.painel {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  width: 20.5rem;
  max-width: calc(100% - 2rem);
  background: var(--creme);
  border: 1px solid var(--borda);
  border-top: 3px solid var(--cobre);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 24px rgba(28, 45, 79, 0.25);
  max-height: calc(100% - 2rem);
  overflow-y: auto;
}

.rotulo {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin: 0.2rem 0 0.35rem;
}

.linha {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--borda);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  color: var(--tinta);
}

input[type="text"]:disabled {
  background: #ece7db;
  color: #8a8578;
}

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--navy);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  background: var(--navy);
  color: var(--creme);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.principal {
  width: 100%;
  margin-top: 0.8rem;
  background: var(--cobre);
  border-color: var(--cobre);
  color: #fff;
  font-weight: 600;
}

button.principal:hover:not(:disabled) {
  background: #a3765f;
  border-color: #a3765f;
}

.botao-flutuante {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 2;
  background: rgba(28, 45, 79, 0.85);
  border-color: rgba(243, 239, 230, 0.4);
  font-size: 0.8rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: var(--cobre);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.dica {
  font-size: 0.74rem;
  color: #6f6a5e;
  margin: 0.4rem 0 0;
}

hr {
  border: none;
  border-top: 1px solid var(--borda);
  margin: 0.9rem 0;
}

.soltar-arquivo {
  border: 1px dashed var(--cobre);
  border-radius: 8px;
  background: #faf7ef;
  padding: 0.9rem;
  text-align: center;
  margin-top: 0.35rem;
  cursor: pointer;
}

.soltar-arquivo.destaque {
  background: #f0e3d3;
  border-color: var(--navy);
}

.soltar-arquivo p { margin: 0; font-size: 0.85rem; }

.resultado {
  margin-top: 0.8rem;
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}

.resultado p { margin: 0.15rem 0; overflow-wrap: anywhere; }

.resultado .dica { margin: 0.3rem 0 0; }

#resultado-car {
  border-left: 3px solid var(--navy);
}

#resultado-arquivo {
  border-left: 3px solid var(--cobre);
}

.campo { font-weight: 600; color: var(--navy); }

.aviso-arrasto {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 45, 79, 0.55);
  color: var(--creme);
  font-size: 1.1rem;
  font-weight: 600;
  border: 3px dashed var(--creme);
  pointer-events: none;
}

.erro {
  background: #fbe9e7;
  border: 1px solid #d8a49c;
  color: #7c2d22;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  margin: 0.6rem 0 0;
}

.painel-alca {
  display: none;
}

.alca-seta {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .painel {
    position: static;
    width: auto;
    max-height: none;
    border-radius: 0;
    margin: 0;
  }
  .painel-alca {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    border-bottom: 1px solid var(--borda);
    border-radius: 0;
    padding: 0.5rem 0.2rem;
    color: var(--navy);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .painel.recolhido .painel-corpo {
    display: none;
  }
  .container { height: auto; }
  .mapa-wrap { position: relative; height: 60vh; }
  .botao-flutuante { top: 0.6rem; right: 0.6rem; }
}
.faixa { background: #79543b; color: white; padding: .55rem 1.2rem; text-align: center; }
nav, .portal-painel, #portal-status { margin: 1rem; }
nav, .acoes { display: flex; flex-wrap: wrap; gap: .6rem; }
.portal-painel { max-width: 70rem; padding: 1rem; border: 1px solid var(--borda); border-top: 3px solid var(--cobre); background: #fff; border-radius: 8px; }
#mapa-portal { height: 65vh; min-height: 440px; }
#resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; }
#resumo .tag { margin-left: .5rem; display: inline-block; }
input[type=email], textarea { font: inherit; padding: .5rem; border: 1px solid var(--borda); border-radius: 6px; max-width: 100%; }
textarea { width: 100%; }
@media (max-width: 768px) {
  #mapa-portal { height: auto; min-height: 65vh; }
  #mapa-portal .mapa-wrap { height: auto; min-height: 65vh; padding-top: 45vh; }
  #mapa { height: 45vh; }
  .mapa-wrap .painel { max-width: 100%; }
  .marca-sub { display: block; }
  #form-login { display: grid; gap: .7rem; }
}

footer { padding: 1rem; text-align: center; }
a { color: var(--navy); }
.topo a { color: var(--creme); }
.legal { max-width: 900px; margin: 2rem auto; padding: 0 1rem; line-height: 1.65; }
.legal h1, .legal h2 { color: var(--navy); }
.tabela-legal { overflow-x: auto; }
.legal table { border-collapse: collapse; width: 100%; }
.legal th, .legal td { border: 1px solid var(--borda); padding: .5rem; text-align: left; }
.logo { display: inline-block; max-width: 220px; max-height: 64px; vertical-align: middle; }
.marca-nome:has(.logo)::after { display: none; }
