:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --border: #334155;
  --fg: #f8fafc;
  --accent: #22c55e;
  --muted: #94a3b8;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

.topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a.ativo {
  color: var(--fg);
  font-weight: 600;
}

.tela-login,
.tela-cadastro,
.tela-disparos {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.tela-mapa {
  padding: 1.25rem;
}

h1 {
  margin-top: 0;
}

p.subtitulo,
p.ajuda {
  color: var(--muted);
  font-size: 0.85rem;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

input,
select,
textarea {
  margin-top: 0.35rem;
  padding: 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

.botoes-opcao {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.opcao {
  flex: 1;
  margin-top: 0;
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
}

.opcao.selecionado {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

fieldset.tags {
  margin-top: 0.35rem;
  border: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 0;
  cursor: pointer;
  user-select: none;
}

.tag:has(input:checked) {
  background: var(--accent);
  color: #052e16;
  border-color: var(--accent);
}

.tag input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#mapa {
  height: calc(100vh - 130px);
  border-radius: 0.5rem;
  overflow: hidden;
}

.filtro-disparo {
  display: flex;
  gap: 0.75rem;
}

.filtro-disparo > div {
  flex: 1;
}

#disparo-contagem {
  color: var(--muted);
}

button {
  margin-top: 1.5rem;
  padding: 0.9rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #052e16;
  font-weight: 700;
  font-size: 1rem;
}

.erro {
  color: var(--danger);
  min-height: 1.2rem;
}

#cadastro-status {
  color: var(--muted);
  min-height: 1.2rem;
}
