:root {
  --azul: #1e4fa3;
  --azul-escuro: #143a7b;
  --verde: #1f9d55;
  --vermelho: #c53030;
  --amarelo: #b7791f;
  --cinza-claro: #f4f6fa;
  --borda: #dbe2ee;
  --texto: #2a3342;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cinza-claro);
  color: var(--texto);
  font-size: 15px;
}

.topo {
  background: var(--azul);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 20px;
  gap: 10px;
}
.marca { font-weight: 700; font-size: 17px; }
.topo nav { display: flex; flex-wrap: wrap; gap: 4px; }
.topo nav a {
  color: #dce6ff;
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 14px;
}
.topo nav a:hover { background: var(--azul-escuro); color: #fff; }
.topo nav a.ativo { background: var(--azul-escuro); color: #fff; font-weight: 600; }
.topo nav a.sair { color: #ffd7d7; }

.conteudo { max-width: 1150px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 26px 0 10px; }

.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.cartao {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 16px;
}
.cartao .numero { font-size: 28px; font-weight: 700; color: var(--azul); }
.cartao .legenda { color: #64748b; font-size: 13px; margin-top: 4px; }

.painel {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

table { width: 100%; border-collapse: collapse; background: #fff; }
.tabela-caixa { overflow-x: auto; background: #fff; border: 1px solid var(--borda); border-radius: 10px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--borda); font-size: 14px; }
th { background: #eef2f9; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

.botao, button.botao {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.botao:hover { background: var(--azul-escuro); }
.botao-secundario { background: #64748b; }
.botao-perigo { background: var(--vermelho); }
.botao-mini { padding: 4px 9px; font-size: 12.5px; }

form.inline { display: inline; }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%;
  max-width: 520px;
  padding: 8px 10px;
  border: 1px solid var(--borda);
  border-radius: 7px;
  font-size: 14px;
  background: #fff;
}
textarea { font-family: monospace; }
input[type=file] { margin: 6px 0; }
.ajuda { color: #64748b; font-size: 12.5px; margin-top: 3px; }

.alerta { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alerta-sucesso { background: #e6f7ed; color: #166534; border: 1px solid #b7e4c7; }
.alerta-erro { background: #fdecec; color: #991b1b; border: 1px solid #f5b5b5; }
.alerta-aviso { background: #fdf6e3; color: #92600a; border: 1px solid #f0d894; }

.selo { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.selo-sucesso { background: #e6f7ed; color: #166534; }
.selo-erro { background: #fdecec; color: #991b1b; }
.selo-neutro { background: #eef2f9; color: #334155; }
.selo-aviso { background: #fdf6e3; color: #92600a; }

.corpo-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--azul);
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.cartao-login {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.cartao-login h1 { font-size: 20px; margin: 0 0 16px; color: var(--texto); }

.rodape { text-align: center; color: #8794a8; font-size: 12.5px; padding: 22px 10px 30px; }

pre.saida {
  background: #0f172a;
  color: #d8e3f5;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12.5px;
}
