/* Identidade Nova Geração (igual ao vídeo demonstrativo): preto, ouro e creme. */
@font-face {
  font-family: "Montserrat";
  src: url("fontes/montserrat.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fontes/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --preto: #0a0a0a;
  --painel: #151515;
  --linha-escura: #2b2b2b;
  --ouro: #c9a227;
  --ouro-claro: #e8c862;
  --ouro-escuro: #8a6d12;
  --grad-ouro: linear-gradient(135deg, #e8c862 0%, #c9a227 55%, #8a6d12 100%);
  --fundo: #f7f5f0;
  --cartao: #ffffff;
  --texto: #141414;
  --suave: #6f6857;
  --linha: #e6e1d5;
  --ok: #1f7a45;
  --alerta: #8a6200;
  --erro: #b3412e;
  --fonte-titulo: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
}
.topo {
  background: var(--preto);
  color: #fff;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid var(--ouro);
}
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--painel);
  border: 1px solid var(--linha-escura);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo img { width: 30px; height: auto; display: block; }
.topo h1 {
  font: 800 19px/1.1 var(--fonte-titulo);
  margin: 0;
  display: flex;
  flex-direction: column;
}
.topo h1 small { font: 600 12px/1.3 "Inter", sans-serif; color: var(--ouro-claro); margin-top: 2px; }
.quem { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #ddd; }
.quem .link { color: var(--ouro-claro); }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
.cartao {
  background: var(--cartao);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
h2 { font: 800 18px/1.25 var(--fonte-titulo); margin: 0 0 10px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--suave); margin: 10px 0 4px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 2px solid var(--linha);
  border-radius: 12px;
  background: #fff;
  color: var(--texto);
}
input:focus, textarea:focus, select:focus, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ouro-claro);
  outline-offset: 1px;
  border-color: var(--ouro);
}
select { margin-bottom: 8px; }
button {
  font: 700 16px/1.2 "Inter", sans-serif;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 2px solid var(--linha);
  background: #fff;
  color: #333;
  cursor: pointer;
}
button.primario {
  background: var(--grad-ouro);
  color: #141414;
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(201, 162, 39, .35);
}
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; box-shadow: none; }
button.link {
  background: none;
  border: 0;
  padding: 4px;
  min-height: 0;
  text-decoration: underline;
  color: var(--ouro-escuro);
  font-weight: 600;
  box-shadow: none;
}
form > .primario { width: 100%; margin-top: 12px; }
.logo-grande { display: block; margin: 4px auto 10px; width: 80px; height: auto; }
#tela-login h2 { text-align: center; }
.botoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ajuda { color: var(--suave); font-size: 14px; margin: 6px 0; }
.erro { color: var(--erro); font-size: 14px; font-weight: 600; min-height: 1em; margin: 8px 0 0; }

/* Meta: cartão escuro com barra dourada, como no vídeo */
.meta { background: #0f0f0f; border-color: var(--linha-escura); color: #fff; }
.meta h2 { font: 600 15px/1.3 "Inter", sans-serif; color: #bbb; }
.meta .ajuda { color: #bbb; }
.meta-numero { font-size: 20px; margin: 0 0 8px; color: #ccc; }
.meta-numero strong { font: 800 44px/1 var(--fonte-titulo); color: var(--ouro-claro); margin-right: 6px; }
.barra { height: 10px; background: #e8e3d6; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.meta .barra { background: #333; }
.barra > div { height: 100%; width: 0; background: var(--grad-ouro); border-radius: 6px; transition: width .3s; }

.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-top: 1px solid var(--linha); padding: 12px 0; }
.lista li:first-child { border-top: 0; }
#lista-pendentes li {
  border: 0;
  background: #faf8f3;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.item-topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.codigo { font: 800 18px/1.2 var(--fonte-titulo); letter-spacing: .3px; }
.selo {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
  background: #ece8de;
  color: #5e574a;
}
.selo.ok { background: #e3f5e9; color: var(--ok); }
.selo.alerta { background: #fff3d6; color: var(--alerta); }
.selo.erro { background: #fde8e4; color: var(--erro); }
.manual { margin-top: 12px; }
.manual summary { cursor: pointer; color: var(--ouro-escuro); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
dialog {
  border: 0;
  border-radius: 24px;
  padding: 0;
  width: min(520px, calc(100vw - 24px));
  background: var(--cartao);
  color: var(--texto);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.dialogo { padding: 20px 18px; }
input[type=file] { padding: 10px; }
.abas {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  background: #ece8de;
  border-radius: 16px;
}
.aba { flex: 1; border: 0; background: transparent; color: #5e574a; box-shadow: none; }
.aba.ativa { background: var(--preto); color: var(--ouro-claro); }
.contador {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--grad-ouro);
  color: #141414;
  font: 800 13px/22px "Inter", sans-serif;
  vertical-align: 2px;
}
.contador:empty { display: none; }
.largo { width: 100%; margin-top: 12px; }
.lista a { color: var(--ouro-escuro); font-weight: 600; }
.mini-barra { height: 6px; margin: 6px 0 0; }

@media (min-width: 760px) {
  main { max-width: 760px; padding: 28px 16px; }
  .topo { padding-left: max(16px, calc(50% - 364px)); padding-right: max(16px, calc(50% - 364px)); }
}
input[type=file]::file-selector-button {
  font: 700 14px "Inter", sans-serif;
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--preto);
  color: var(--ouro-claro);
  cursor: pointer;
}

/* botao da Kenlo: chave verde (conectado) ou vermelha (reconectar) */
button.kenlo-botao { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; }
button.kenlo-botao .chave { position: relative; width: 34px; height: 20px; border-radius: 10px; flex: none; transition: background .2s; }
button.kenlo-botao .chave::after { content: ""; position: absolute; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s; }
button.kenlo-botao.conectado { background: #e8f4ec; color: var(--ok); border-color: var(--ok); }
button.kenlo-botao.conectado .chave { background: var(--ok); }
button.kenlo-botao.conectado .chave::after { left: 17px; }
button.kenlo-botao.desconectado { background: #fbecea; color: var(--erro); border-color: var(--erro); }
button.kenlo-botao.desconectado .chave { background: var(--erro); }
button.kenlo-botao.desconectado .chave::after { left: 3px; }
.marcar { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 15px; }
.marcar input { width: auto; margin: 0; }
.lista li.inativo .codigo { color: var(--suave); text-decoration: line-through; }
