*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --s1: #0A0A0C;
  --s2: #111113;
  --s3: #181819;
  --s4: #202023;
  --bd: rgba(255,255,255,.07);
  --bd2: rgba(255,255,255,.12);
  --laranja: #FF6A00;
  --laranja-l: #FF8C42;
  --laranja-d: rgba(255,106,0,.12);
  --txt: #F2F2F4;
  --t2: #8A8A98;
  --t3: #4A4A55;
  --ok: #00E5A0;
  --ok-d: rgba(0,229,160,.1);
  --erro: #FF4D6A;
  --aviso: #FFC24A;
  --raio: 12px;
}

html, body { background: var(--bg); color: var(--txt); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; min-height: 100vh; }
a { color: inherit; }
.hidden { display: none !important; }
b { font-weight: 700; }

/* marca */
.marca { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; white-space: nowrap; }
.marca b { color: var(--laranja); font-weight: 800; }
.marca-icone { width: 32px; height: 32px; border-radius: 9px; background: var(--laranja); color: #000; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.marca-grande { font-size: 22px; justify-content: center; }

/* botões */
.btn { border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--laranja); color: #000; }
.btn-primario:hover:not(:disabled) { background: var(--laranja-l); }
.btn-secundario { background: var(--s3); border-color: var(--bd2); color: var(--txt); }
.btn-secundario:hover { border-color: var(--laranja); }
.btn-fantasma { background: transparent; color: var(--t2); border-color: var(--bd2); }
.btn-fantasma:hover { color: var(--txt); }
.btn-peq { padding: 7px 12px; font-size: 13px; }
.btn-bloco { width: 100%; }

/* formulários */
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--t2); }
input, select, textarea { background: var(--s2); border: 1px solid var(--bd2); border-radius: 10px; padding: 11px 12px; color: var(--txt); font: inherit; font-size: 14px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--laranja); box-shadow: 0 0 0 3px var(--laranja-d); }
select:disabled { opacity: .5; }
textarea { resize: vertical; line-height: 1.5; font-family: inherit; }
input[type="date"] { color-scheme: dark; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,106,0,.12), transparent); }
.login-card { width: 100%; max-width: 380px; background: var(--s1); border: 1px solid var(--bd2); border-radius: 18px; padding: 32px 26px; display: flex; flex-direction: column; gap: 16px; }
.login-sub { color: var(--t2); text-align: center; font-size: 13px; margin-top: -6px; }
#form-login { display: flex; flex-direction: column; gap: 14px; }
.login-ajuda { color: var(--t3); font-size: 12px; text-align: center; }
.erro { color: var(--erro); font-size: 13px; min-height: 18px; }

/* topo */
.topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px; background: rgba(0,0,0,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bd); flex-wrap: wrap; }
.abas { display: flex; gap: 4px; background: var(--s2); border: 1px solid var(--bd); padding: 4px; border-radius: 12px; }
.abas button { background: none; border: 0; color: var(--t2); font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.abas button.ativa { background: var(--s4); color: var(--txt); }
.topo-dir { display: flex; align-items: center; gap: 14px; }
.cota { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.cota-txt { font-size: 12px; color: var(--t2); }
.cota-txt span:first-child { color: var(--txt); font-weight: 700; }
.cota-barra { height: 6px; background: var(--s4); border-radius: 99px; overflow: hidden; }
#cota-fill { height: 100%; width: 0; background: var(--laranja); border-radius: 99px; transition: width .3s; }

/* conteúdo */
.conteudo { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
.card { background: var(--s1); border: 1px solid var(--bd); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.titulo { font-size: 16px; margin-bottom: 6px; }
.dica { color: var(--t2); font-size: 13px; line-height: 1.5; }
.dica b { color: var(--txt); }

.filtros-grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.filtros-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { flex-direction: row; align-items: center; gap: 8px; background: var(--s2); border: 1px solid var(--bd2); padding: 8px 12px; border-radius: 99px; font-size: 13px; color: var(--txt); cursor: pointer; font-weight: 500; }
.chip input { width: 15px; height: 15px; accent-color: var(--laranja); }
.chip:has(input:checked) { border-color: var(--laranja); background: var(--laranja-d); }
.filtros-acao { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }

.aviso { background: rgba(255,194,74,.08); border: 1px solid rgba(255,194,74,.3); color: var(--aviso); padding: 12px 14px; border-radius: var(--raio); margin-bottom: 14px; font-size: 13px; }
.aviso.erro-box { background: rgba(255,77,106,.08); border-color: rgba(255,77,106,.3); color: var(--erro); }

/* lista de empresas */
.lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.lista > * { min-width: 0; }
.emp { background: var(--s1); border: 1px solid var(--bd); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.emp:hover { border-color: var(--bd2); }
.emp-topo { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.emp-nome { font-size: 15px; font-weight: 700; line-height: 1.3; }
.emp-sub { color: var(--t2); font-size: 12px; margin-top: 3px; }
.score { flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: var(--s3); color: var(--t2); }
.score.alto { background: var(--ok-d); color: var(--ok); }
.sinais { display: flex; flex-wrap: wrap; gap: 6px; }
.sinal { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: var(--laranja-d); color: var(--laranja-l); }
.sinal.neutro { background: var(--s3); color: var(--t2); }
.contatos { display: flex; flex-direction: column; gap: 6px; }
.contato { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.contato .rot { width: 18px; text-align: center; flex-shrink: 0; }
.contato .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contato .val a { text-decoration: none; }
.contato .val a:hover { color: var(--laranja-l); text-decoration: underline; }
.contato .falta { color: var(--t3); }
.copiar { background: none; border: 1px solid var(--bd2); color: var(--t2); border-radius: 7px; font-size: 11px; padding: 3px 8px; cursor: pointer; flex-shrink: 0; font-family: inherit; }
.copiar:hover { color: var(--txt); border-color: var(--laranja); }
.emp-acoes { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.emp-acoes .btn { flex: 1; padding: 9px 10px; font-size: 13px; }

.vazio { text-align: center; padding: 60px 20px; color: var(--t2); }
.vazio h3 { color: var(--txt); font-size: 17px; margin-bottom: 8px; font-weight: 600; }
.vazio-icone { font-size: 42px; margin-bottom: 12px; }

.meus-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.meus-topo > label { max-width: 200px; }
.meus-exportar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.meus-exportar label { width: 160px; }

.passos { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--t2); line-height: 1.5; margin-top: 8px; }
.passos b { color: var(--txt); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-caixa { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--s1); border: 1px solid var(--bd2); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-topo { display: flex; align-items: center; justify-content: space-between; }
.modal-topo h3 { font-size: 16px; }
.modal-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--s4); border: 1px solid var(--bd2); padding: 11px 18px; border-radius: 10px; font-size: 13px; z-index: 60; }

.carregando { opacity: .6; pointer-events: none; }

@media (max-width: 900px) {
  .filtros-grade { grid-template-columns: 1fr 1fr; }
  .abas { order: 3; width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .topo { padding: 10px 14px; }
  .filtros-grade { grid-template-columns: 1fr; }
  .filtros-acao { flex-direction: column; align-items: stretch; }
  .lista { grid-template-columns: 1fr; }
  .abas button { padding: 8px 10px; font-size: 13px; }
  .cota { min-width: 90px; }
}
