:root {
  /* Horita Estúdio, paleta B (identidade/design-guide.md), a mesma do site */
  --bg: #0A0B0A;
  --card: #121412;
  --line: #232823;
  --line2: #3A4139;
  --tx: #E9ECE6;
  --tx2: #949B92;
  --acc: #9DB58A;
  --on-acc: #0C1309;
  --head: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--tx);
  font-family: var(--body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; }

input, select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line2);
  border-radius: 8px; padding: 11px 12px; min-height: 46px;
}
select option { background: var(--bg); color: var(--tx); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
label { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tx2); margin: 14px 0 6px; }
.aviso { color: var(--acc); font-size: 14px; margin: 10px 0 0; min-height: 1em; overflow-wrap: anywhere; }
.aviso.forte { border: 1px solid var(--acc); border-radius: 8px; padding: 12px 14px; margin: 0 0 18px; color: var(--tx); }

/* marca: símbolo B + Horita + ESTÚDIO, como no cabeçalho do site */
.marca { display: flex; align-items: center; gap: 10px; }
.marca-simbolo { width: 26px; height: 26px; flex: none; }
.marca b { font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: -0.025em; line-height: 1; }
.marca small { font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--tx2); margin-top: 3px; }

/* login */
.login { position: relative; max-width: 380px; margin: 14vh auto 0; padding: 32px 28px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(233, 236, 230, .06), 0 30px 60px -20px rgba(0, 0, 0, .7); }
.login::before { content: ""; position: absolute; z-index: -1; inset: -35% 0; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(157, 181, 138, .10), rgba(157, 181, 138, .04) 50%, rgba(157, 181, 138, 0) 100%); }
.login h1 { font-family: var(--head); font-weight: 700; font-size: 40px; letter-spacing: -0.025em; line-height: 1.05; margin: 34px 0 6px; }
.login .bt { margin-top: 18px; width: 100%; }

/* topo */
.topo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 16px 20px 12px; }
.topo .onde { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tx2); line-height: 1.1; margin: 0; padding-left: 14px; border-left: 1px solid var(--line2); }
.menu { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.menu a, .menu button { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 8px 10px; color: var(--tx2); text-decoration: none; font-size: 14px; border-bottom: 1px solid transparent; white-space: nowrap; }
.menu a[aria-current="page"] { color: var(--tx); border-bottom-color: var(--acc); }
.topo .quando { margin-left: auto; color: var(--tx2); font-size: 13px; text-align: right; }

/* placar */
.placar { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.placar div { padding: 14px 16px 12px 0; }
.placar div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.placar .n { font-family: var(--head); font-variant-numeric: lining-nums; font-size: 40px; font-weight: 700; letter-spacing: -0.025em; line-height: 1; }
.placar .n small { font-family: var(--body); font-size: 13px; color: var(--tx2); font-weight: 400; margin-left: 4px; }
.placar .r { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tx2); }
.placar .s { display: block; font-size: 12px; color: var(--tx2); margin-top: 2px; }

/* funil */
/* quando não cabe numa linha, o funil quebra em mais linhas em vez de ser cortado na borda */
.funil { display: flex; flex-wrap: wrap; row-gap: 2px; margin: 14px 20px 0; }
.funil span { flex: 0 0 auto; padding: 6px 14px 6px 0; margin-right: 14px; border-right: 1px solid var(--line); font-size: 13px; color: var(--tx2); white-space: nowrap; }
.funil span b { color: var(--tx); font-weight: 600; margin-right: 5px; }
.funil span.fora { border-right: 0; font-style: italic; }

.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.barra label { margin: 0; white-space: nowrap; }
.barra select { flex: 0 1 260px; width: auto; min-width: 0; }
.barra input { flex: 1 1 220px; width: auto; min-width: 0; max-width: 420px; }
select:disabled { opacity: .5; }

.corpo { display: grid; grid-template-columns: 380px 1fr; margin-top: 18px; border-top: 1px solid var(--line); min-height: 70vh; }
.vazio { padding: 40px 20px; color: var(--tx2); }

/* fila */
.fila { border-right: 1px solid var(--line); padding: 6px 0 40px; min-width: 0; }
.fila h2 { margin: 22px 20px 6px; font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
.fila h2 span { display: block; margin-top: 2px; color: var(--tx2); letter-spacing: .02em; text-transform: none; font-size: 13px; font-weight: 400; }
.item { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: 12px 20px 12px 18px; overflow-wrap: anywhere; }
.item + .item { border-top: 1px solid var(--line); }
.item[aria-current="true"] { background: var(--card); border-left-color: var(--acc); }
.item:disabled { opacity: 1; }
.item .nome { font-weight: 600; font-size: 15px; }
.item .sub { color: var(--tx2); font-size: 13px; }
.item .acao { margin-top: 5px; font-size: 13px; }
.item .acao i { font-style: normal; color: var(--acc); margin-right: 6px; }

/* ficha */
.ficha { padding: 26px 34px 60px; max-width: 760px; min-width: 0; }
.voltar { display: none; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 12px 0 0; margin-bottom: 6px; color: var(--tx2); font-size: 14px; }
.ficha .titulo { font-family: var(--head); font-weight: 700; font-size: 38px; line-height: 1.05; margin: 0; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.ficha .sub { color: var(--tx2); margin-top: 6px; overflow-wrap: anywhere; }
.selo { display: inline-block; margin-top: 12px; padding: 4px 10px; border: 1px solid var(--acc); border-radius: 8px; color: var(--acc); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.bloco { margin-top: 26px; }
.rotulo { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tx2); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.rotulo em { font-style: normal; letter-spacing: .02em; text-transform: none; color: var(--acc); }
.rotulo.menor { margin-top: 18px; }
.dobra .dados { margin-top: 4px; }
.vi { font-family: var(--head); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; line-height: 1.4; border-left: 1px solid var(--acc); padding-left: 16px; overflow-wrap: anywhere; }
.editar { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 12px 0 0; color: var(--tx2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.edicao label { margin-top: 0; }

.sinais { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sinais div { padding: 10px 12px 10px 0; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.sinais div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.sinais b { display: block; font-size: 12px; font-weight: 400; color: var(--tx2); }

/* o que a pesquisa trouxe: rótulo pequeno à esquerda, valor à direita */
.dados { margin: 0; border-top: 1px solid var(--line); }
.dados div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dados dt { font-size: 12px; color: var(--tx2); padding-top: 2px; }
.dados dd { margin: 0; overflow-wrap: anywhere; min-width: 0; white-space: pre-line; }
.motivos { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.motivos li { padding: 7px 0 7px 14px; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; position: relative; }
.motivos li::before { content: ""; position: absolute; left: 0; top: 16px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }

.cadencia { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cadencia div { border-top: 2px solid var(--line2); padding-top: 7px; font-size: 12px; color: var(--tx2); overflow-wrap: anywhere; min-width: 0; }
.cadencia div b { display: block; color: var(--tx2); font-weight: 500; font-size: 13px; }
.cadencia .feito { border-top-color: var(--tx2); }
.cadencia .hoje { border-top-color: var(--acc); color: var(--tx); }
.cadencia .hoje b { color: var(--acc); }

.agir { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.agir .rotulo { color: var(--tx); }
.msg { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.nota { color: var(--tx2); font-size: 13px; margin-top: 10px; overflow-wrap: anywhere; }

.botoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bt { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 8px; padding: 12px 18px; font-weight: 600; font-size: 15px; border: 1px solid var(--line2); background: none; min-height: 46px; }
.bt.cheio { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.bt.cheio:hover { background: #B0C69E; border-color: #B0C69E; }
.bt:not(.cheio):hover { border-color: var(--tx2); }
.resultado { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.resultado .bt { font-weight: 500; font-size: 14px; justify-content: flex-start; text-align: left; }
.pedir { margin-top: 12px; padding: 14px; border: 1px solid var(--acc); border-radius: 8px; }
.pedir label { margin-top: 0; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.duas > div { min-width: 0; }
.linhas { border-top: 1px solid var(--line); margin-top: 16px; }
.linhas div { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.linhas div small { color: var(--tx2); display: block; white-space: normal; }

/* blocos que abrem e fecham (dados da pesquisa, editar contato): uma linha de 44 px, fechados até a pessoa abrir */
.dobra summary { cursor: pointer; min-height: 44px; margin-bottom: 0; align-items: center; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dobra summary::-webkit-details-marker { display: none; }
.dobra summary::after { content: "abrir"; margin-left: auto; letter-spacing: .02em; text-transform: none; color: var(--tx2); }
.dobra[open] summary::after { content: "fechar"; }
.dobra[open] summary { border-bottom-color: transparent; }
.dobra + .dobra { margin-top: 0; }
.dobra + .dobra summary { border-top: 0; }
.dobra[open] + .dobra summary { border-top: 1px solid var(--line); }
.dobra[open] { padding-bottom: 18px; }

/* link discreto ao lado de um valor */
.ligacao { color: var(--acc); font-size: 13px; letter-spacing: .02em; text-transform: none; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
  /* área de toque de 44 px sem empurrar a linha: o enchimento é devolvido pela margem */
  display: inline-block; padding: 13px 0; margin: -13px 0; }

/* páginas de formulário */
.painel { max-width: 720px; margin: 0 20px; padding: 6px 0 60px; border-top: 1px solid var(--line); }
.painel h2 { font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: -0.025em; margin: 26px 0 4px; }
.painel p { color: var(--tx2); margin: 0 0 6px; }
.painel p.aviso { color: var(--acc); margin-top: 10px; }
.retorno .nota { margin: 6px 0 0; }

/* Pesquisa IA */
.medidor { margin: 14px 0 18px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.medidor .valor { font-family: var(--head); font-variant-numeric: lining-nums; font-size: 44px; font-weight: 700; letter-spacing: -0.025em; line-height: 1; }
.medidor .sub { color: var(--tx2); margin-top: 6px; }
/* caixa de marcar com o texto ao lado, sem o estilo de rótulo de campo */
label.marcar { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--tx); cursor: pointer; overflow-wrap: anywhere; }
label.marcar input { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; margin: 1px 0 0; padding: 0; accent-color: var(--acc); }
.ramos { margin-top: 10px; max-height: 420px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ramos label.marcar + label.marcar { border-top: 1px solid var(--line); }
.fontes div { padding: 4px 0; }
.fontes .ligacao { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .topo { padding: 14px 16px 12px; }
  .topo .onde { font-size: 12px; padding-left: 12px; }
  .login { margin: 10vh 16px 0; padding: 28px 20px 22px; }
  .menu { order: 3; flex: 1 1 100%; margin-left: -10px; overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .topo .quando { order: 2; margin-left: auto; font-size: 12px; }
  .placar { margin: 0 16px; grid-template-columns: repeat(2, 1fr); }
  .placar div:nth-child(3) { padding-left: 0; border-left: 0; }
  .placar div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .funil, .barra, .painel { margin-left: 16px; margin-right: 16px; }
  .funil { margin-top: 12px; }
  .funil span { margin-right: 12px; padding-right: 12px; }
  .corpo { display: block; }
  .fila { border-right: 0; }
  .fila h2 { margin: 22px 16px 6px; }
  .item { padding: 14px 16px 14px 14px; }
  .ficha { display: none; padding: 10px 16px 60px; }
  .voltar { display: inline-flex; }
  body.na-ficha .fila, body.na-ficha .placar, body.na-ficha .funil, body.na-ficha .barra { display: none; }
  body.na-ficha .ficha { display: block; }
  .ficha .titulo { font-size: 31px; }
  .vi { font-size: 21px; }
  .sinais { grid-template-columns: repeat(2, 1fr); }
  .sinais div:nth-child(3) { padding-left: 0; border-left: 0; }
  .sinais div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .dados div { grid-template-columns: 1fr; gap: 0; }
  .cadencia { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .agir { padding: 16px; }
  .botoes .bt { flex: 1 1 100%; }
  .resultado, .duas { grid-template-columns: 1fr; }
}
