:root {
  --paper: #fafbf9; --surface: #f1f4f1; --card: #fff; --ink: #1d2522;
  --muted: #57655f; --line: #dce3de; --accent: #177052; --accent-escuro: #0f5b41;
  --warn: #9a6a17; --warn-bg: #f7efdd; --erro: #a13030; --erro-bg: #f7e3e3;
  --ok-bg: #e4f0e9;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.55;
}
a { color: var(--accent-escuro); }
.topo {
  background: var(--accent); color: #fff; display: flex; align-items: center;
  gap: 1.5rem; padding: .65rem 1.4rem; flex-wrap: wrap;
}
.topo .marca { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.topo nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.topo nav a {
  color: #fff; text-decoration: none; padding: .35rem .8rem; border-radius: 6px; opacity: .85;
}
.topo nav a:hover, .topo nav a.ativo { background: rgba(255,255,255,.16); opacity: 1; }
.topo form { margin-left: auto; }
.topo button {
  background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff;
  border-radius: 6px; padding: .3rem .8rem; cursor: pointer;
}
main { max-width: 72rem; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }
h1 { font-size: 1.5rem; margin: 0 0 1.2rem; }
h2 { font-size: 1.1rem; margin: 1.8rem 0 .7rem; }

.flash { border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1.2rem; }
.flash.sucesso { background: var(--ok-bg); color: var(--accent-escuro); }
.flash.erro { background: var(--erro-bg); color: var(--erro); }

.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem; margin-bottom: 1.6rem; }
.cartao { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; }
.cartao .rotulo { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.cartao .numero { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cartao.atencao .numero { color: var(--warn); }

.tabela-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .85rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface); }
tr:last-child td { border-bottom: none; }
td { font-variant-numeric: tabular-nums; }

.selo { display: inline-block; padding: .05em .6em; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.selo.ok { background: var(--ok-bg); color: var(--accent-escuro); }
.selo.atencao { background: var(--warn-bg); color: var(--warn); }
.selo.erro { background: var(--erro-bg); color: var(--erro); }
.selo.neutro { background: var(--surface); color: var(--muted); }

form.painel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.4rem; max-width: 44rem; }
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .25rem; }
.campo input[type=text], .campo input[type=email], .campo input[type=password],
.campo select, .campo textarea, .campo input[type=file] {
  width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; background: var(--paper); color: var(--ink);
}
.campo .dica { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.campo .erro-campo { color: var(--erro); font-size: .84rem; margin-top: .2rem; }
.linha-campos { display: flex; gap: 1rem; flex-wrap: wrap; }
.linha-campos .campo { flex: 1 1 10rem; }

.botao {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  border-radius: 7px; padding: .55rem 1.2rem; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.botao:hover { background: var(--accent-escuro); }
.botao.secundario { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

.filtros { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: end; }
.filtros .campo { margin-bottom: 0; min-width: 9rem; }
.paginacao { margin-top: 1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.muted { color: var(--muted); }

.login-caixa { max-width: 24rem; margin: 6rem auto; }
.login-caixa .marca-login { text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--accent-escuro); margin-bottom: 1.2rem; }
.botao-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: .7rem 1rem; font-weight: 600; text-decoration: none;
}
.botao-google:hover { background: var(--surface); }
.divisor { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0; color: var(--muted); font-size: .8rem; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
