/* Sistema interno da agência
   Página clara, branco / cinza / preto, tipografia do sistema (SF no Mac) */

:root {
  --fundo: #f2f2f4;
  --branco: #ffffff;

  --preto: #1d1d1f;
  --cinza-texto: #6e6e73;
  --cinza-fraco: #8e8e93;
  --cinza-apagado: #c7c7cc;

  --borda: #e3e3e8;
  --borda-forte: #d2d2d7;
  --cinza-fundo: #f2f2f4;
  --cinza-fundo-2: #ebebef;

  /* alerta e sucesso saem da mesma paleta do Início: rosa avisa, verde confirma.
     As duas cores estão declaradas mais abaixo; o CSS resolve na hora de usar. */
  --alerta: var(--destaque-escuro);
  --alerta-fundo: var(--destaque-claro);
  --verde: var(--verde-texto);
  --verde-fundo: var(--verde-fundo-claro);

  --raio: 18px;
  --raio-p: 11px;
  --sombra: 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fundo);
  color: var(--preto);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.022em; font-weight: 600; margin: 0; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: 19px; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--cinza-fraco); font-weight: 600; }

a { color: var(--preto); text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- estrutura */

@font-face {
  font-family: 'Editors Note'; font-weight: 300; font-style: normal;
  src: url('fontes/EditorsNote-Light.otf') format('opentype'); font-display: swap;
}
@font-face {
  font-family: 'Editors Note'; font-weight: 400; font-style: normal;
  src: url('fontes/EditorsNote-Regular.otf') format('opentype'); font-display: swap;
}
@font-face {
  font-family: 'Pinyon Script'; font-weight: 400; font-style: normal;
  src: url('fontes/PinyonScript.woff2') format('woff2'); font-display: swap;
}

.app { display: flex; min-height: 100vh; align-items: stretch; }

.lateral {
  flex: 0 0 228px; background: var(--branco); border-right: 0.5px solid var(--borda-forte);
  display: flex; flex-direction: column; padding: 26px 18px 20px;
  position: sticky; top: 0; height: 100vh;
}

.logo {
  background: none; border: none; padding: 0 0 4px; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  color: #1b120d; margin-bottom: 30px; margin-left: 8px;
}
.logo-nome {
  font-family: 'Editors Note', serif; font-weight: 300; font-size: 22px;
  letter-spacing: 0.01em; color: #1b120d;
}

.menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu a, .menu > span {
  font-size: 14px; color: var(--cinza-texto); padding: 9px 12px; border-radius: 9px;
}
.menu a:hover { color: var(--preto); background: var(--cinza-fundo); }
.menu a.ativo { color: var(--preto); background: var(--cinza-fundo-2); font-weight: 500; }
.menu > span { color: var(--cinza-apagado); cursor: default; }
.menu > span::after { content: " · em breve"; font-size: 10px; color: #d8d8dd; }

.rodape-lateral { border-top: 0.5px solid var(--borda); padding-top: 14px; }
.usuario-lateral {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; border-radius: 10px; padding: 8px; text-align: left;
}
.usuario-lateral:hover, .usuario-lateral.ativo { background: var(--cinza-fundo); }
.usuario-textos { display: flex; flex-direction: column; min-width: 0; }
.usuario-nome { font-size: 13.5px; font-weight: 500; color: var(--preto);
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-funcao { font-size: 11px; color: var(--cinza-fraco);
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rodape-lateral .botao-texto { padding: 6px 8px; font-size: 13px; }

.conteudo { flex: 1; min-width: 0; }
.pagina { max-width: 1060px; margin: 0 auto; padding: 34px 40px 80px; }

.cabecalho-pagina {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px; flex-wrap: wrap;
}
.subtitulo { color: var(--cinza-texto); font-size: 14px; margin-top: 6px; }

.aviso {
  background: var(--verde-fundo-claro); color: var(--verde-texto); border-radius: var(--raio-p);
  padding: 10px 13px; font-size: 13px; margin-bottom: 15px;
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .lateral {
    flex: none; width: auto; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 18px;
    border-right: none; border-bottom: 0.5px solid var(--borda-forte); padding: 12px 18px;
  }
  .logo { margin: 0; }
  .logo-sub { display: none; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .rodape-lateral { border-top: none; padding: 0; display: flex; align-items: center; }
  .pagina { padding: 24px 20px 60px; }
}

/* ------------------------------------------------------------------ botões */

.botao {
  background: var(--preto); color: var(--branco); border: 1px solid var(--preto);
  border-radius: 980px; padding: 10px 22px; font-size: 14px; font-weight: 500;
  transition: opacity .15s ease, transform .1s ease;
}
.botao:hover { opacity: 0.85; }
.botao:active { transform: scale(0.98); }
.botao.secundario {
  background: var(--branco); color: var(--preto); border: 1px solid var(--borda-forte);
}
.botao.secundario:hover { background: var(--cinza-fundo); opacity: 1; }
.botao.perigo { background: var(--branco); color: var(--alerta); border: 1px solid var(--borda-forte); }
.botao.perigo:hover { background: var(--alerta-fundo); opacity: 1; }
.botao-texto { background: none; border: none; color: var(--cinza-texto); padding: 5px 0; font-size: 14px; }
.botao-texto:hover { color: var(--preto); }
.voltar { display: inline-block; color: var(--cinza-texto); font-size: 14px; margin-bottom: 16px; }
.voltar:hover { color: var(--preto); }

/* ------------------------------------------------------------------ cartões */

.cartao {
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 24px 26px; margin-bottom: 18px;
  box-shadow: var(--sombra);
}
.cartao h3 { margin-bottom: 16px; }

.resumo { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.resumo-item {
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 18px 22px; min-width: 160px; flex: 1; box-shadow: var(--sombra);
}
.resumo-item .rotulo { font-size: 11.5px; color: var(--cinza-fraco); text-transform: uppercase;
                       letter-spacing: 0.06em; }
.resumo-item .numero { font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }

/* ------------------------------------------------------------------ tabela */

.rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; min-width: 720px; }
/* nome e datas não quebram linha: é o que fazia as alturas dançarem */
.tabela td:first-child, .tabela th:first-child { white-space: nowrap; }
.tabela th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--cinza-fraco);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0 14px 12px; border-bottom: 1px solid var(--borda);
}
.tabela td {
  padding: 13px 14px; border-bottom: 1px solid var(--borda);
  font-size: 14px; color: var(--cinza-texto);
  vertical-align: middle; height: 52px;
}
/* data e etiqueta sempre na mesma linha, para as alturas não dançarem */
.celula-data { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabela tr:last-child td { border-bottom: none; }
.tabela tbody tr { cursor: pointer; transition: background .12s ease; }
.tabela tbody tr:hover { background: #fafafb; }
.tabela .direita, .direita { text-align: right; }
.nome-celula { font-weight: 500; color: var(--preto); }
.sem-valor { color: var(--cinza-apagado); }

/* ----------------------------------------------------------------- etiquetas */

.etiqueta {
  display: inline-block; font-size: 11.5px; font-weight: 500; padding: 3px 10px;
  border-radius: 8px; white-space: nowrap;
  background: var(--cinza-fundo); color: var(--cinza-texto);
}
.etiqueta.ativo { background: var(--verde-fundo); color: var(--verde); }
.etiqueta.pausado { background: var(--cinza-fundo-2); color: var(--preto); }
.etiqueta.encerrado { background: var(--cinza-fundo); color: var(--cinza-fraco); }
.etiqueta.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.etiqueta.servico { background: var(--cinza-fundo); color: var(--cinza-texto); margin-right: 7px; }

/* ------------------------------------------------------------------ detalhe */

.grade-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 26px; }
.dado .rotulo { font-size: 11.5px; color: var(--cinza-fraco); text-transform: uppercase; letter-spacing: 0.06em; }
.dado .valor { font-size: 15px; margin-top: 3px; }
.linha-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--borda);
  font-size: 14px; color: var(--cinza-texto);
}
.linha-item:last-child { border-bottom: none; }
.linha-total { display: flex; justify-content: space-between; padding-top: 14px;
               font-weight: 600; color: var(--preto); }
.texto-livre { white-space: pre-wrap; font-size: 14px; color: var(--cinza-texto); }
.vazio { color: var(--cinza-fraco); font-size: 14px; margin: 0; }

/* ----------------------------------------------------------------- formulário */

.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px 22px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.largo { grid-column: 1 / -1; }
.campo label { font-size: 12.5px; color: var(--cinza-texto); }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  font-family: inherit; font-size: 15px; color: var(--preto);
  background: var(--branco); border: 1px solid var(--borda-forte);
  border-radius: var(--raio-p); padding: 10px 12px; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--cinza-apagado); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--preto); box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}
textarea { resize: vertical; min-height: 84px; }
.caixas { display: flex; gap: 22px; flex-wrap: wrap; }
.caixa { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cinza-texto); }
.caixa input { width: auto; accent-color: var(--preto); }

.linha-editavel { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.linha-editavel input, .linha-editavel select { width: auto; flex: 1; }
.linha-editavel .estreito { flex: 0 0 100px; }
.remover { background: none; border: none; color: var(--cinza-apagado); font-size: 20px;
           line-height: 1; padding: 0 5px; }
.remover:hover { color: var(--alerta); }
.acoes-form { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.acoes-form .espaco { flex: 1; }

/* -------------------------------------------------------------------- login */

.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.caixa-login {
  background: var(--branco); border: 1px solid var(--borda); border-radius: 22px;
  padding: 40px 36px; width: 100%; max-width: 350px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.caixa-login h1 { font-size: 23px; margin-bottom: 5px; }
.caixa-login p { color: var(--cinza-texto); font-size: 14px; margin: 0 0 26px; }
.caixa-login .campo { text-align: left; margin-bottom: 15px; }
.caixa-login .botao { width: 100%; padding: 11px; margin-top: 8px; }

/* -------------------------------------------------------------------- avisos */

.erro {
  background: var(--alerta-fundo); color: var(--alerta); border-radius: var(--raio-p);
  padding: 10px 13px; font-size: 13px; margin-bottom: 15px;
}
.filtros { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filtros input[type=text] {
  max-width: 250px; border-radius: 980px; background: var(--cinza-fundo-2);
  border-color: transparent; padding: 9px 16px;
}
.filtros input[type=text]:focus { background: var(--branco); border-color: var(--preto); }

.segmentado {
  display: inline-flex; gap: 2px; background: var(--cinza-fundo-2);
  border-radius: 980px; padding: 3px;
}
.segmentado .seg {
  background: none; border: none; border-radius: 980px;
  padding: 7px 18px; font-size: 13.5px; font-weight: 500; color: var(--cinza-texto);
  transition: background .15s ease, color .15s ease;
}
.segmentado .seg:hover { color: var(--preto); }
.segmentado .seg.ativo { background: var(--preto); color: var(--branco); }

/* ------------------------------------------------------ faixa de follow-up */

.faixa-wrap { max-width: 1100px; margin: 0 auto; padding: 16px 40px 0; }
.faixa {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: 14px; padding: 12px 18px; margin-bottom: 8px; font-size: 14px;
}
.faixa strong { font-weight: 600; }
.faixa-alerta {
  background: var(--alerta-fundo); color: var(--alerta);
  border: 1px solid hsl(var(--destaque-h) 60% 88%);
}
.faixa-neutra { background: var(--branco); color: var(--cinza-texto); border: 1px solid var(--borda); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--branco); border: 1px solid var(--borda-forte); border-radius: 980px;
  padding: 4px 12px; font-size: 13px; color: var(--preto);
}
.chip:hover { background: var(--cinza-fundo); }
.chip-dias { color: var(--alerta); font-weight: 600; }

/* -------------------------------------------------------------- quadro CRM */

.destaque-atraso { color: var(--alerta); font-weight: 500; }

.quadro { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: stretch; }
.coluna {
  flex: 0 0 218px; min-width: 0; background: transparent; padding: 0;
  display: flex; flex-direction: column;
}
.coluna.sobre .coluna-corpo { background: var(--cinza-fundo-2); border-radius: 12px; }
.coluna-topo {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--preto);
}
.coluna-nome { flex: 1; }
.ponto { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.coluna-topo .ponto { animation: pulsar 1.8s ease-in-out infinite; }
@keyframes pulsar {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.82); }
}
@media (prefers-reduced-motion: reduce) {
  .coluna-topo .ponto { animation: none; }
}
.coluna-resumo {
  font-size: 12px; color: var(--cinza-fraco); padding: 3px 0 12px 15px;
}
.coluna-perdido .coluna-nome { color: var(--cinza-texto); }
.coluna-corpo {
  display: flex; flex-direction: column; gap: 10px; flex: 1;
  padding: 2px; transition: background .15s ease;
}
.coluna-vazia {
  border: 1px dashed var(--borda-forte); border-radius: 12px;
  color: var(--cinza-apagado); font-size: 13px; text-align: center; padding: 22px 0;
}

.cartao-lead {
  background: var(--branco); border: 0.5px solid var(--borda-forte); border-radius: 12px;
  padding: 14px; cursor: grab;
}
.cartao-lead:active { cursor: grabbing; }
.cartao-lead.arrastando { opacity: 0.4; }
.cartao-lead:hover { border-color: var(--cinza-fraco); }
.cartao-lead.vencido { border-color: hsl(var(--destaque-h) 70% 80%); }

.lead-negocio-titulo { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.lead-contato-nome { font-size: 12.5px; color: var(--cinza-texto); margin-top: 1px; }
.lead-valor-grande {
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px;
}
.lead-estado { font-size: 12.5px; color: var(--cinza-texto); margin-top: 6px; }
.lead-estado.fraco { color: var(--cinza-apagado); }
.lead-estado.ganho { color: var(--verde); font-weight: 500; }
.lead-estado.atrasado {
  display: inline-block; color: var(--alerta); font-weight: 500;
  background: var(--alerta-fundo); border-radius: 7px; padding: 3px 9px; margin-top: 8px;
}
.lead-rodape {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding-top: 10px; border-top: 0.5px solid var(--borda);
}
.lead-origem { flex: 1; font-size: 11.5px; color: var(--cinza-fraco); line-height: 1.35; }
.lead-entrada { display: block; color: var(--cinza-apagado); }
.zap {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cinza-texto); background: var(--cinza-fundo);
}
.zap:hover { color: var(--verde-texto); background: var(--verde-fundo-claro); }

/* --------------------------------------------------------------- diálogos */

.fundo-dialogo {
  position: fixed; inset: 0; background: rgba(0,0,0,0.22);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 40;
}
.dialogo {
  background: var(--branco); border-radius: 22px; padding: 30px 32px;
  width: 100%; max-width: 460px; box-shadow: 0 10px 40px rgba(0,0,0,0.16);
  max-height: 88vh; overflow-y: auto;
}
.dialogo.largo { max-width: 620px; }
.dialogo h2 { margin-bottom: 6px; letter-spacing: -0.025em; }
.dialogo .acoes-form { margin-top: 26px; }
.motivos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.seg-motivo {
  background: var(--cinza-fundo); border: 1px solid transparent; border-radius: 980px;
  padding: 8px 16px; font-size: 13.5px; color: var(--cinza-texto);
}
.seg-motivo:hover { color: var(--preto); }
.seg-motivo.ativo { background: var(--preto); color: var(--branco); }

.nota { font-size: 12.5px; color: var(--cinza-fraco); margin: 12px 0 0; }
input[type=month] {
  font-family: inherit; font-size: 14px; color: var(--preto);
  background: var(--branco); border: 1px solid var(--borda-forte);
  border-radius: 980px; padding: 8px 16px;
}

/* ------------------------------------------------- menu de clique direito */

.menu-contexto {
  position: fixed; z-index: 50; width: 268px;
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: 14px; padding: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  max-height: 82vh; overflow-y: auto;
}
.menu-titulo {
  font-size: 13px; font-weight: 600; padding: 5px 9px 8px;
  border-bottom: 1px solid var(--borda); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-rotulo {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cinza-fraco); padding: 10px 9px 5px;
}
.menu-grupo { display: flex; flex-direction: column; }
.item-menu {
  background: none; border: none; border-radius: 8px; text-align: left;
  padding: 7px 9px; font-size: 13.5px; color: var(--preto);
}
.item-menu:hover { background: var(--cinza-fundo); }
.item-menu.ativo { font-weight: 600; }
.item-menu.ativo::after { content: " ✓"; color: var(--cinza-fraco); }
.menu-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 9px 4px; }
.chip-menu {
  background: var(--cinza-fundo); border: none; border-radius: 980px;
  padding: 4px 10px; font-size: 12px; color: var(--cinza-texto);
}
.chip-menu:hover { color: var(--preto); }
.chip-menu.ativo { background: var(--preto); color: var(--branco); }

.menu-linha { display: flex; gap: 8px; padding: 2px 9px 4px; }
.menu-campo { flex: 1; min-width: 0; }
.menu-campo label { display: block; font-size: 11px; color: var(--cinza-fraco); margin-bottom: 2px; }
.menu-linha input {
  font-size: 13px; padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--borda-forte); width: 100%;
}
.menu-rodape {
  display: flex; gap: 14px; padding: 8px 9px 2px; margin-top: 8px;
  border-top: 1px solid var(--borda);
}
.menu-rodape .botao-texto { font-size: 13px; }
.menu-rodape .espaco { flex: 1; }
.botao-texto.perigo { color: var(--alerta); }
.botao-texto.perigo:hover { color: #8f1e17; }
.chip-menu .ponto { display: inline-block; margin-right: 5px; vertical-align: 0; }

/* --------------------------------------------------------------- início */

:root {
  /* rosa da marca: #EA075C */
  --destaque-h: 338;
  --destaque-s: 94%;
  --destaque: hsl(var(--destaque-h) var(--destaque-s) 47%);
  --destaque-claro: hsl(var(--destaque-h) var(--destaque-s) 96%);
  --destaque-escuro: hsl(var(--destaque-h) var(--destaque-s) 38%);
}

.tela-inicio .cartao { box-shadow: none; border: 0.5px solid var(--borda-forte); }
.tela-inicio h3 { margin-bottom: 18px; }

.seletor-mes {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--branco); border: 0.5px solid var(--borda-forte);
  border-radius: 980px; padding: 4px 6px;
}
.seletor-mes span {
  font-size: 14px; font-weight: 500; padding: 0 10px; min-width: 150px; text-align: center;
}
.seletor-mes button {
  background: none; border: none; border-radius: 50%; width: 28px; height: 28px;
  font-size: 17px; line-height: 1; color: var(--cinza-texto);
}
.seletor-mes button:hover { background: var(--cinza-fundo); color: var(--preto); }

/* 2. faixa de indicadores: sem cartão, só divisória */
/* quebra de linha sem colisão quando a área fica estreita */
/* a faixa se acomoda ao número de cartões: o Início tem 4, o Financeiro 5 */
.faixa-ind {
  display: grid; gap: 14px; margin: 4px 0 26px;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}
@media (max-width: 640px) { .faixa-ind { grid-template-columns: 1fr; } }

.ind {
  background: var(--branco); border: 0.5px solid var(--borda-forte);
  border-radius: var(--raio); padding: 15px 16px 14px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
/* fio de cor no topo diz o humor do número sem precisar de legenda */
.ind::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--cinza-apagado);
}
.ind.bom::before { background: var(--verde-grafico); }
.ind.fraco::before { background: var(--destaque); }
.ind.espera::before { background: var(--amarelo); }

.ind-topo {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; min-height: 18px;
}
.ind-rotulo {
  font-size: 11px; color: var(--cinza-fraco); line-height: 1.3;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ind-corpo { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.ind-texto { flex: 1; min-width: 0; }
.ind-visual { flex: 0 0 auto; display: flex; align-items: flex-end; }
.ind-valor .campo-caixa { font: inherit; }
.ind-valor {
  font-size: 21px; font-weight: 600; letter-spacing: -0.035em;
  line-height: 1.15; margin-bottom: 4px; white-space: nowrap;
}
.ind-apoio { font-size: 11.5px; color: var(--cinza-fraco); line-height: 1.35; }
.variacao { color: var(--cinza-texto); font-weight: 500; }

/* 3 e 4 lado a lado */
/* os dois cartões da linha terminam na mesma altura */
.dois-blocos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.dois-blocos .cartao { margin-bottom: 18px; display: flex; flex-direction: column; }
.dois-blocos .bloco-rosquinha { flex: 1; }
.dois-blocos .legenda { grid-template-columns: 1fr; }
.dois-blocos .bloco-rosquinha { gap: 20px; }
@media (max-width: 900px) { .dois-blocos { grid-template-columns: 1fr; } }

/* 3. rosquinha */
.bloco-rosquinha { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.rosquinha { flex: 0 0 150px; }
.fatia { fill: none; stroke-width: 17; }
.rosca-numero {
  font-size: 26px; font-weight: 600; fill: var(--preto);
  text-anchor: middle; letter-spacing: -0.03em;
}
.rosca-texto { font-size: 11px; fill: var(--cinza-fraco); text-anchor: middle; }
.legenda { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 7px 22px; }
.legenda-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legenda-nome { flex: 1; color: var(--cinza-texto); }
.legenda-valor { color: var(--preto); font-weight: 500; }
.quadro-cor { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.quadro-cor.cinza { background: var(--cinza-apagado); }
.quadro-cor.roxo { background: var(--roxo); }

.rodape-bloco {
  font-size: 12.5px; color: var(--cinza-fraco); margin: 18px 0 0;
  padding-top: 14px; border-top: 0.5px solid var(--borda);
}

/* 4. barras agrupadas */
.grafico-barras { display: flex; gap: 10px; height: 170px; align-items: flex-end; }
.grupo-mes { flex: 1; display: flex; flex-direction: column; height: 100%; }
.par-barras { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.barra-vertical {
  position: relative; width: 26px; min-height: 2px;
  border-radius: 4px 4px 0 0; background: var(--cinza-apagado);
}
.barra-vertical.fechados { background: var(--roxo); }
.barra-vertical span {
  position: absolute; top: -17px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--cinza-texto);
}
.rotulo-mes {
  text-align: center; font-size: 11.5px; color: var(--cinza-fraco);
  padding-top: 8px; border-top: 0.5px solid var(--borda); margin-top: 6px;
}
.grupo-mes.atual .rotulo-mes { color: var(--preto); font-weight: 600; }
.legenda-linha { display: flex; gap: 20px; margin-top: 16px; font-size: 12.5px; color: var(--cinza-texto); }

/* 5. funil */
.linha-funil {
  display: grid; grid-template-columns: 150px 1fr 34px 58px;
  align-items: center; gap: 12px; margin-bottom: 10px;
}
.funil-nome { font-size: 13.5px; color: var(--cinza-texto); }
.funil-trilho { background: var(--cinza-fundo); border-radius: 6px; height: 26px; }
.funil-barra { background: var(--roxo); border-radius: 6px; height: 100%; min-width: 2px; }
.funil-valor { font-size: 14px; font-weight: 600; }
.funil-passagem { font-size: 12.5px; color: var(--cinza-fraco); text-align: right; }

/* 6. precisa de você */
.linha-pendencia {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 11px 0; border-bottom: 0.5px solid var(--borda);
}
.linha-pendencia:last-of-type { border-bottom: none; }
.linha-pendencia:hover .pend-nome { color: var(--destaque); }
.iniciais {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: var(--cinza-fundo); color: var(--cinza-texto);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
}
.pend-nome { font-size: 14px; font-weight: 500; min-width: 150px; }
.pend-motivo { flex: 1; font-size: 13px; color: var(--cinza-texto); }
.pend-tempo { font-size: 12.5px; color: var(--cinza-fraco); white-space: nowrap; }
.pend-tempo.atrasado { color: var(--alerta); font-weight: 500; }

@media (max-width: 700px) {
  .linha-funil { grid-template-columns: 110px 1fr 30px 50px; }
  .legenda { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- menu de clique direito */

.menu-contexto {
  position: fixed; z-index: 50; width: 268px;
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: 14px; padding: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  max-height: 82vh; overflow-y: auto;
}
.menu-titulo {
  font-size: 13px; font-weight: 600; padding: 5px 9px 8px;
  border-bottom: 1px solid var(--borda); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-rotulo {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cinza-fraco); padding: 10px 9px 5px;
}
.menu-grupo { display: flex; flex-direction: column; }
.item-menu {
  background: none; border: none; border-radius: 8px; text-align: left;
  padding: 7px 9px; font-size: 13.5px; color: var(--preto);
}
.item-menu:hover { background: var(--cinza-fundo); }
.item-menu.ativo { font-weight: 600; }
.item-menu.ativo::after { content: " ✓"; color: var(--cinza-fraco); }
.menu-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 9px 4px; }
.chip-menu {
  background: var(--cinza-fundo); border: none; border-radius: 980px;
  padding: 4px 10px; font-size: 12px; color: var(--cinza-texto);
}
.chip-menu:hover { color: var(--preto); }
.chip-menu.ativo { background: var(--preto); color: var(--branco); }

.menu-linha { display: flex; gap: 8px; padding: 2px 9px 4px; }
.menu-campo { flex: 1; min-width: 0; }
.menu-campo label { display: block; font-size: 11px; color: var(--cinza-fraco); margin-bottom: 2px; }
.menu-linha input {
  font-size: 13px; padding: 6px 9px; border-radius: 8px;
  border: 1px solid var(--borda-forte); width: 100%;
}
.menu-rodape {
  display: flex; gap: 14px; padding: 8px 9px 2px; margin-top: 8px;
  border-top: 1px solid var(--borda);
}
.menu-rodape .botao-texto { font-size: 13px; }
.chip-menu .ponto { display: inline-block; margin-right: 5px; vertical-align: 0; }

/* --------------------------------------------------------------- início */

.seletor-mes {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: 980px; padding: 4px 6px; box-shadow: var(--sombra);
}
.seletor-mes span {
  font-size: 14px; font-weight: 500; padding: 0 10px; min-width: 150px; text-align: center;
}
.seletor-mes button {
  background: none; border: none; border-radius: 50%; width: 28px; height: 28px;
  font-size: 17px; line-height: 1; color: var(--cinza-texto);
}
.seletor-mes button:hover { background: var(--cinza-fundo); color: var(--preto); }

.painel-inicio {
  display: grid; grid-template-columns: 260px 1fr; gap: 16px; margin-bottom: 18px;
}
@media (max-width: 820px) { .painel-inicio { grid-template-columns: 1fr; } }

.cartao-anel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; margin-bottom: 0; padding: 26px 20px;
}
.anel { display: block; }
.anel-trilho { fill: none; stroke: var(--cinza-fundo-2); stroke-width: 12; }
.anel-valor {
  fill: none; stroke: var(--preto); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dasharray .4s ease;
}
.anel-texto {
  font-size: 27px; font-weight: 600; fill: var(--preto);
  text-anchor: middle; dominant-baseline: central; letter-spacing: -0.03em;
}
.anel-rotulo { font-size: 14px; font-weight: 500; margin-top: 14px; }
.anel-nota { font-size: 12.5px; color: var(--cinza-fraco); margin-top: 3px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 18px 20px; box-shadow: var(--sombra);
  display: flex; flex-direction: column; justify-content: center;
}
.tile .rotulo {
  font-size: 11.5px; color: var(--cinza-fraco);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tile .numero { font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }

.barra {
  height: 5px; background: var(--cinza-fundo-2); border-radius: 980px;
  margin-top: 10px; overflow: hidden;
}
.barra span { display: block; height: 100%; background: var(--preto); border-radius: 980px; }
.barra.larga { flex: 1; margin: 0 14px; }
/* dinheiro saindo é rosa em toda a tela, inclusive aqui */
.barra.saida span { background: var(--destaque); }

/* pastilha estática, quando a categoria não é editável */
.tag-lanc {
  font-size: 12px; font-weight: 500; border-radius: 980px;
  padding: 4px 11px; white-space: nowrap; min-width: 118px; text-align: center;
}

.linha-origem {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--borda); font-size: 14px;
}
.linha-origem:last-of-type { border-bottom: none; }
.origem-nome { width: 130px; color: var(--preto); }
.origem-numero { font-size: 13px; color: var(--cinza-texto); width: 110px; text-align: right; }

/* ---------------------------------------------- tentativa, trilha, perdidos */

.linha-perdido {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 10px 0; border-bottom: 1px solid var(--borda); font-size: 14px;
}
.linha-perdido:last-of-type { border-bottom: none; }
.linha-perdido:hover .perdido-nome { color: var(--preto); }
.perdido-nome { flex: 1; color: var(--cinza-texto); }
.perdido-valor { font-size: 13px; color: var(--cinza-fraco); }

/* ------------------------------------------------------------ aba Clientes */

:root {
  --grade-clientes: 16px 30px 1fr 92px 108px 140px 72px;
  --verde-forte: hsl(66 34% 52%);          /* variação viva de #D5DA90 */
  --verde-texto: hsl(66 40% 28%);
  --verde-fundo-claro: hsl(66 42% 92%);
  --verde-grafico: #D5DA90;
  --amarelo: #E4C752;
  /* roxo dos blocos abaixo do gráfico de faturamento: #9E69AF */
  --roxo-h: 285;
  --roxo: hsl(var(--roxo-h) 30% 55%);
  --roxo-escuro: hsl(var(--roxo-h) 32% 42%);
  --vermelho-forte: var(--destaque);        /* o rosa é o alerta da paleta */
  --ambar-forte: hsl(45 68% 52%);           /* variação viva de #E4C752 */
  --ambar-texto: hsl(38 80% 26%);
  --ambar-fundo-claro: hsl(45 88% 86%);
}

.botao.contorno {
  background: transparent; color: var(--preto); border: 0.5px solid var(--borda-forte);
}
.botao.contorno:hover { background: var(--cinza-fundo); opacity: 1; }

.barra-filtros {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.filtros-servico { display: flex; gap: 8px; }
.filtro {
  background: var(--branco); border: 0.5px solid var(--borda-forte); border-radius: 980px;
  padding: 7px 16px; font-size: 13.5px; color: var(--cinza-texto);
}
.filtro:hover { color: var(--preto); }
.filtro.ativo { border: 1.5px solid var(--preto); color: var(--preto); font-weight: 500; }
.ordenacao {
  display: flex; align-items: center; gap: 6px; background: var(--branco);
  border: 0.5px solid var(--borda-forte); border-radius: 980px; padding: 3px 12px;
}
.icone-ordenar { color: var(--cinza-texto); display: flex; }
.ordenacao select {
  border: none; background: none; width: auto; font-size: 13.5px; padding: 4px 0;
  color: var(--preto);
}
.ordenacao select:focus { box-shadow: none; }

.grade-clientes {
  background: var(--branco); border: 0.5px solid var(--borda-forte);
  border-radius: 18px; overflow: hidden;
}
.cabecalho-grade, .linha-cliente {
  display: grid; grid-template-columns: var(--grade-clientes);
  gap: 12px; align-items: center; padding: 0 18px;
}
.cabecalho-grade {
  height: 42px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cinza-fraco); border-bottom: 0.5px solid var(--borda);
}
.linha-cliente {
  height: 64px; border-bottom: 0.5px solid var(--borda); cursor: pointer;
  transition: background .12s ease;
}
.linha-cliente:last-child { border-bottom: none; }
.linha-cliente:hover { background: var(--cinza-fundo); }
.linha-cliente.arrastando { opacity: 0.4; }
.linha-cliente.alvo { box-shadow: inset 0 2px 0 var(--preto); }
.linha-vencida { box-shadow: inset 2px 0 0 0 var(--vermelho-forte); }
.linha-rescindida { opacity: 0.55; }

.celula { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.celula.direita { align-items: flex-end; }
.linha1 {
  font-size: 14px; color: var(--preto); display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px;
}
.linha2 {
  font-size: 11px; color: var(--cinza-texto); min-height: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nome-cliente { font-weight: 500; display: block; }

.alca { color: var(--cinza-apagado); cursor: grab; display: flex; }
/* o ícone não intercepta o gesto: quem arrasta é a linha */
.alca svg { pointer-events: none; }
.alca:active { cursor: grabbing; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: var(--cinza-fundo-2); color: var(--cinza-texto);
  font-size: 10.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* o corte de texto longo vale para o nome, não aqui: o status é curto e o
   anel pulsante precisa passar da linha para não sair pela metade */
.status-cliente { font-size: 12px; color: var(--cinza-texto); overflow: visible; }
.bolinha { width: 8px; height: 8px; border-radius: 50%; position: relative; flex: 0 0 8px; }
.bolinha.ativo { background: var(--verde-forte); }
.bolinha.pausado { background: var(--ambar-forte); }
.bolinha.encerrado { background: var(--vermelho-forte); }
.bolinha.ativo::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid var(--verde-forte); animation: anel 2.2s ease-out infinite;
}
@keyframes anel {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bolinha.ativo::after { animation: none; opacity: 0; }
}

.tags-servico {
  display: flex; flex-wrap: wrap; gap: 3px; align-content: center;
  max-height: 40px; overflow: hidden;
}
.tag-servico {
  font-size: 10px; border: 0.5px solid var(--borda-forte); background: var(--cinza-fundo);
  color: var(--cinza-texto); border-radius: 5px; padding: 2px 6px; white-space: nowrap;
}
/* fundo claro da mesma cor e texto escuro: o contraste sobe sem sair da paleta */
.tag-contrato {
  font-size: 10px; border-radius: 5px; padding: 3px 8px; font-weight: 600;
  letter-spacing: 0.01em;
}
.tag-contrato.andamento { background: var(--verde-fundo-claro); color: var(--verde-texto); }
.tag-contrato.vencido { background: var(--destaque-claro); color: var(--destaque-escuro); }
.tag-contrato.acabando { background: var(--ambar-fundo-claro); color: var(--ambar-texto); }
.tag-contrato.encerrado {
  background: var(--cinza-fundo); border: 0.5px solid var(--borda-forte); color: var(--cinza-texto);
}
.clipe {
  background: none; border: none; padding: 2px; display: inline-flex;
  color: var(--cinza-apagado);
}
.clipe.cheio { color: var(--preto); }
.clipe:hover { color: var(--preto); }

.menu-contexto.estreito { width: 216px; }
.menu-contexto .item-menu { display: block; text-decoration: none; }

.historico-contrato {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 0.5px solid var(--borda); font-size: 14px;
}
.historico-contrato:last-of-type { border-bottom: none; }
.hc-versao { font-weight: 500; width: 74px; }
.hc-nome { flex: 1; color: var(--cinza-texto); overflow: hidden; text-overflow: ellipsis;
           white-space: nowrap; }
.hc-data { font-size: 12px; color: var(--cinza-fraco); }

/* -------------------------------------------------- ficha: dados e acessos */

.abas { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.aba {
  background: none; border: none; border-radius: 980px; padding: 7px 15px;
  font-size: 13.5px; color: var(--cinza-texto);
}
.aba:hover { color: var(--preto); }
.aba.ativa { background: var(--preto); color: var(--branco); font-weight: 500; }
.aba.desativada { color: var(--cinza-apagado); cursor: default; }

.linha-dado {
  display: grid; grid-template-columns: 190px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 0.5px solid var(--borda); font-size: 14px;
}
.linha-dado:last-of-type { border-bottom: none; }
.rotulo-dado { font-size: 12px; color: var(--cinza-fraco); }
.valor-dado { min-width: 0; overflow-wrap: anywhere; }
.valor-dado.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.acoes-dado { display: flex; align-items: center; gap: 8px; }
.nota-inline { font-size: 11.5px; color: var(--cinza-fraco); margin-left: 8px; }
.variacao-seg { color: var(--cinza-texto); }

.mini {
  background: none; border: 0.5px solid var(--borda-forte); border-radius: 7px;
  padding: 3px 9px; font-size: 11.5px; color: var(--cinza-texto); text-decoration: none;
}
.mini:hover { color: var(--preto); background: var(--cinza-fundo); }
.mini.perigo { color: var(--alerta); border-color: var(--alerta-fundo); }

.linha-crescimento {
  margin-top: 14px; padding-top: 12px; border-top: 0.5px solid var(--borda);
  font-size: 13px; color: var(--cinza-texto);
}
.nova-medicao { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.nova-medicao input { width: auto; flex: 1; min-width: 130px; }

.linha-link { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.linha-link input, .linha-link select { width: auto; flex: 1; min-width: 120px; }

.item-acesso {
  border: 0.5px solid var(--borda-forte); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.acesso-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.acesso-nome { font-size: 14px; font-weight: 500; }
.acesso-topo .espaco { flex: 1; }
.tag-servico.ok {
  background: var(--verde-fundo-claro); color: var(--verde-texto);
  border-color: hsl(66 40% 82%);
}
.acesso-obs { font-size: 13px; color: var(--cinza-texto); margin-top: 8px; }
.acesso-rodape { font-size: 11.5px; color: var(--cinza-apagado); margin-top: 10px; }

/* ------------------------------------------------------ produção de conteúdo */

.acoes-topo-aba { display: flex; justify-content: flex-end; margin-bottom: 14px; }

.coluna-peca {
  flex: 0 0 208px; min-width: 0; display: flex; flex-direction: column;
}
.coluna-peca .coluna-corpo { padding: 2px; border-radius: 12px; transition: background .15s ease; }
.coluna-peca.sobre .coluna-corpo { background: var(--cinza-fundo-2); }
.ponto.pulsando { animation: pulsar 1.8s ease-in-out infinite; }

.cartao-peca {
  background: var(--branco); border: 0.5px solid var(--borda-forte); border-radius: 11px;
  padding: 11px 13px; cursor: grab;
}
.cartao-peca:hover { border-color: var(--cinza-fraco); }
.cartao-peca.arrastando { opacity: 0.4; }
.cartao-peca.com-atraso.agencia {
  border-color: hsl(var(--destaque-h) 70% 80%);
  background: hsl(var(--destaque-h) 80% 98%);
}
.cartao-peca.com-atraso.cliente { border-color: #f0cf99; background: #fdf8ef; }
.peca-titulo { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.peca-meta { font-size: 11.5px; color: var(--cinza-fraco); margin-top: 4px; }

/* dois problemas diferentes, duas cores diferentes */
.atraso {
  display: inline-block; margin-top: 8px; font-size: 10.5px; font-weight: 600;
  border-radius: 6px; padding: 2px 7px;
}
.atraso.agencia { background: var(--alerta-fundo); color: var(--alerta); }
.atraso.cliente { background: #fdf1dd; color: #8a5a00; }

/* ---- calendário */

.topo-calendario {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.contagem-calendario { flex: 1; font-size: 13.5px; color: var(--cinza-texto); }

.calendario {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  background: var(--branco); border: 0.5px solid var(--borda-forte);
  border-radius: 18px; padding: 14px;
}
.nome-dia {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cinza-fraco); text-align: center; padding-bottom: 4px;
}
.dia {
  min-height: 86px; border: 0.5px solid var(--borda); border-radius: 10px;
  padding: 6px; transition: background .12s ease;
}
.dia.vazio { border: none; }
.dia.hoje { border-color: var(--preto); }
.dia.sobre { background: var(--cinza-fundo-2); }
.numero-dia { font-size: 11.5px; color: var(--cinza-texto); margin-bottom: 5px; }
.faixa {
  font-size: 10.5px; color: #1c1c1c; border-radius: 5px; padding: 3px 6px;
  margin-bottom: 4px; cursor: grab; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.faixa.arrastando { opacity: 0.4; }
.legenda-etapas {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px;
  font-size: 12px; color: var(--cinza-texto);
}

/* ---- lista de tarefas */

.linha-peca {
  display: grid; grid-template-columns: 8px 130px 1fr 90px 130px 90px 84px auto;
  gap: 12px; align-items: center; cursor: pointer;
  padding: 12px 0; border-bottom: 0.5px solid var(--borda); font-size: 13.5px;
}
.linha-peca:last-of-type { border-bottom: none; }
.linha-peca:hover .peca-nome { color: var(--destaque); }
.peca-cliente, .peca-formato, .peca-etapa, .peca-resp, .peca-data {
  color: var(--cinza-texto); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.peca-nome {
  font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .linha-peca { grid-template-columns: 8px 1fr auto; }
  .peca-formato, .peca-etapa, .peca-resp { display: none; }
}

/* ------------------------------------------------------------ foto do cliente */

.titulo-com-foto { display: flex; align-items: center; gap: 16px; }
.avatar.grande {
  width: 56px; height: 56px; flex: 0 0 56px; font-size: 16px;
  border: none; padding: 0; cursor: pointer; position: relative;
}
.avatar.grande .marca-foto {
  position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 0; opacity: 0; transition: opacity .15s ease;
}
.avatar.grande:hover .marca-foto { opacity: 1; }

/* --------------------------------------------------------- ajustes: Trello */

.topo-quadro { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.topo-quadro .espaco { flex: 1; }
.topo-quadro select { width: auto; max-width: 220px; }

.listas { display: flex; flex-direction: column; }
.linha-lista {
  display: grid; grid-template-columns: 1fr 190px 140px 150px; gap: 10px;
  align-items: center; padding: 8px 0; border-bottom: 0.5px solid var(--borda);
}
.linha-lista:last-child { border-bottom: none; }
.linha-lista.pendente { background: #fdf8ef; }
.nome-lista { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha-lista select { width: 100%; font-size: 13px; padding: 6px 9px; }
.linha-lista .caixa { font-size: 12px; }
@media (max-width: 820px) {
  .linha-lista { grid-template-columns: 1fr; gap: 6px; }
}

/* ------------------------------------------------------------- financeiro */

.ind-valor.negativo { color: var(--alerta); }
.total-grupo { font-size: 15px; font-weight: 600; }

.cabecalho-lanc, .linha-lanc {
  display: grid;
  grid-template-columns: 16px 24px minmax(120px, 1.6fr) 132px 108px 124px 94px 24px;
  gap: 8px; align-items: center;
}
.cabecalho-lanc {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cinza-fraco); padding-bottom: 6px; border-bottom: 0.5px solid var(--borda);
}
.linha-lanc { padding: 5px 0; border-bottom: 0.5px solid var(--borda); }
.linha-lanc:last-of-type { border-bottom: none; }
.linha-lanc.arrastando { opacity: 0.4; }
.linha-lanc.alvo { box-shadow: inset 0 2px 0 var(--preto); }
.linha-lanc .alca { color: var(--cinza-apagado); cursor: grab; display: flex; }
.linha-lanc .alca svg { pointer-events: none; }
.linha-lanc input, .linha-lanc select { font-size: 13px; padding: 6px 9px; width: 100%; }
.linha-lanc .valor-lanc { text-align: right; }
.linha-lanc.quitado input, .linha-lanc.quitado select { color: var(--cinza-fraco); }
.linha-lanc .caixa { justify-content: center; }

/* categoria e meio viram pastilha colorida: a cor sai do próprio nome */
.linha-lanc select.seletor-tag {
  border: none; border-radius: 980px; font-weight: 500; font-size: 12px;
  padding: 6px 8px; text-align: center; text-align-last: center;
  background-color: var(--cinza-fundo-2); color: var(--cinza-texto);
}
.linha-lanc select.seletor-tag:focus { box-shadow: 0 0 0 2px var(--borda-forte); }
.linha-lanc.quitado select.seletor-tag { opacity: 0.55; }



.linha-lanc.entrada { grid-template-columns: 26px 1fr 110px 108px 26px; }
.nome-receb { font-size: 13.5px; }
.data-receb { font-size: 12.5px; color: var(--cinza-fraco); }
.linha-lanc.entrada.quitado .nome-receb { color: var(--verde); }

/* some a data, sobram seis colunas */
@media (max-width: 1080px) {
  .cabecalho-lanc, .linha-lanc {
    grid-template-columns: 16px 24px minmax(110px, 1.4fr) 124px 104px 96px 24px;
  }
  .cabecalho-lanc span:nth-child(5), .linha-lanc input[type=date] { display: none; }
}
@media (max-width: 820px) {
  .cabecalho-lanc { display: none; }
  .linha-lanc { grid-template-columns: 16px 24px 1fr 96px 24px; }
  .linha-lanc select { display: none; }
}

.campo-caixa {
  font-size: 21px; font-weight: 600; letter-spacing: -0.035em; color: var(--preto);
  border: none; background: none; padding: 0; width: 100%;
  border-bottom: 1px dashed var(--borda-forte); border-radius: 0;
}
.campo-caixa:focus { box-shadow: none; border-bottom-color: var(--preto); }

.ind.destaque::before { background: var(--verde-grafico); }
.ind.destaque .ind-valor { color: var(--verde-texto); }
.ind .ind-valor.negativo { color: var(--destaque); }

/* ------------------------------------------------- faturamento mês a mês */

.grafico-barras.alto { height: 190px; gap: 6px; }
.barra-vertical.faturamento { width: 100%; max-width: 46px; background: var(--destaque); }
.variacao-mes {
  text-align: center; font-size: 10.5px; color: var(--cinza-fraco); margin-top: 3px;
  white-space: nowrap;
}
.variacao-mes.subiu { color: var(--destaque); font-weight: 600; }
.variacao-mes.caiu { color: var(--alerta); font-weight: 600; }

/* a cor da barra é o patamar do mês, não a origem do dado */
.barra-vertical.faturamento.positivo { background: var(--verde-grafico); }
.barra-vertical.faturamento.neutro { background: var(--cinza-apagado); }
.barra-vertical.faturamento.neutro span { color: var(--cinza-texto); }

/* mês ainda não fechado: mesma cor do patamar, em listra */
.barra-vertical.faturamento.previsao.positivo {
  background: repeating-linear-gradient(135deg,
    var(--verde-grafico) 0 5px, rgba(255,255,255,0.72) 5px 10px);
}
.barra-vertical.faturamento.previsao.neutro {
  background: repeating-linear-gradient(135deg,
    var(--cinza-apagado) 0 5px, rgba(255,255,255,0.62) 5px 10px);
}
.barra-vertical.faturamento.previsao span { color: var(--cinza-texto); }

.barra-vertical.faturamento.vazia {
  width: 100%; max-width: 46px; height: 100%; background: none;
  border-bottom: 1px dashed var(--borda-forte);
}

.legenda-fonte {
  display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 0;
  font-size: 11.5px; color: var(--cinza-fraco);
}
.legenda-fonte span { display: flex; align-items: center; gap: 5px; }
.legenda-fonte .amostra {
  width: 9px; height: 9px; border-radius: 2px; display: inline-block;
}
.legenda-fonte .amostra.positivo {
  background: var(--verde-grafico); box-shadow: inset 0 0 0 0.5px var(--borda-forte);
}
.legenda-fonte .amostra.neutro { background: var(--cinza-apagado); }
.legenda-fonte .amostra.previsao {
  background: repeating-linear-gradient(135deg,
    var(--cinza-texto) 0 3px, rgba(255,255,255,0.62) 3px 6px);
}

/* avisos de coerência: contrato encerrando ou vencido */
.aviso-contrato {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 10px;
  padding: 9px 11px; border-radius: 8px; background: var(--cinza-fundo-2);
  font-size: 12px; color: var(--cinza-texto); line-height: 1.45;
}
.aviso-contrato b { color: var(--preto); font-weight: 600; }
.aviso-contrato.atencao { background: var(--alerta-fundo); color: var(--alerta); }
.aviso-contrato.atencao b { color: var(--alerta); }

/* ------------------------------------------------------ dashboard clicável */

.clicavel { cursor: pointer; }
.grupo-mes.clicavel:hover .barra-vertical { filter: brightness(0.88); }
.grupo-mes.clicavel:hover .rotulo-mes { color: var(--preto); }
.legenda-item.clicavel:hover .legenda-nome { color: var(--roxo-escuro); }
.fatia.clicavel:hover { stroke-width: 20; }
.linha-funil.clicavel:hover .funil-nome { color: var(--roxo-escuro); }

.dica {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--preto); color: var(--branco); font-size: 12px;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ------------------------------------------------------------- faturamento */

/* extrato dentro da caixa do mês */
.bloco-extrato-mes {
  margin-top: 16px; padding-top: 14px; border-top: 0.5px solid var(--borda);
}
.bloco-extrato-mes .topo-quadro { align-items: center; margin-bottom: 6px; }
.bloco-extrato-mes strong { font-size: 13px; }

.botao-linha {
  font: inherit; font-size: 12px; padding: 4px 11px; cursor: pointer;
  border-radius: 980px; border: 0.5px solid var(--borda-forte);
  background: var(--branco); color: var(--cinza-texto);
  transition: border-color 0.15s, color 0.15s;
}
.botao-linha:hover { border-color: var(--preto); color: var(--preto); }
.botao-linha:disabled { opacity: 0.5; cursor: progress; }

.resumo-upload {
  margin-top: 12px; padding: 11px 13px; border-radius: var(--raio-p);
  background: var(--cinza-fundo); font-size: 12.5px;
}
.resumo-upload.entrou { background: var(--verde-fundo); }
.resumo-upload .linha-item { border-bottom: none; padding: 3px 0; }

.aviso-extrato {
  margin-top: 10px; padding: 9px 11px; border-radius: 8px;
  background: var(--cinza-fundo-2); font-size: 12px; color: var(--cinza-texto);
  line-height: 1.45;
}

@media (max-width: 1040px) {
  .linha-fat { grid-template-columns: 1fr 108px 120px 116px; }
  .linha-fat .fat-apoio { display: none; }
  .linha-fat .fat-num:nth-of-type(2) { display: none; }
}

.aviso-extrato.atencao {
  background: var(--alerta-fundo); color: var(--alerta);
}
.fat-acao { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------------------------------------- cartões de indicador, mais visuais */


/* pastilha de variação contra o mês anterior */
.chip-var {
  font-size: 10.5px; font-weight: 600; letter-spacing: -0.01em;
  padding: 2px 7px; border-radius: 980px; white-space: nowrap;
}
.chip-var.subiu { background: var(--verde-grafico); color: #4c5316; }
.chip-var.caiu { background: var(--destaque-claro); color: var(--destaque-escuro); }
.chip-var.igual { background: var(--cinza-fundo-2); color: var(--cinza-fraco); }

/* anel: o percentual desenhado, para quem já nasce em escala de 0 a 100 */
.anel-ind { width: 48px; height: 48px; flex: 0 0 48px; }
.anel-ind circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.anel-ind-trilho { stroke: var(--cinza-fundo-2); }
.anel-ind-parte.bom { stroke: var(--verde-grafico); }
.anel-ind-parte.fraco { stroke: var(--destaque); }
.anel-ind-parte.espera { stroke: var(--amarelo); }

/* linha dos últimos meses: o traço já conta a história */
.linha-ind { width: 62px; height: 34px; flex: 0 0 62px; overflow: visible; }
.linha-ind.vazia { background: none; }
.linha-ind polyline { fill: none; }
.linha-ind .linha-area { fill: var(--cinza-fundo-2); stroke: none; }
.linha-ind .linha-traco { stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.linha-ind.bom .linha-traco { stroke: var(--verde-grafico); }
.linha-ind.fraco .linha-traco { stroke: var(--destaque); }
.linha-ind.bom .linha-ponta { fill: var(--verde-grafico); }
.linha-ind.fraco .linha-ponta { fill: var(--destaque); }
.linha-ind.espera .linha-traco { stroke: var(--cinza-apagado); }
.linha-ind.espera .linha-ponta { fill: var(--cinza-apagado); }
.linha-ind.espera .linha-area { fill: var(--cinza-fundo-2); }
.linha-ind.bom .linha-area { fill: rgba(213, 218, 144, 0.28); }
.linha-ind.fraco .linha-area { fill: rgba(234, 7, 92, 0.08); }

/* uma pastilha por proposta aberta */
.ind-pastilhas {
  display: grid; grid-template-columns: repeat(4, 7px); gap: 4px;
  align-content: center; height: 34px;
}
.pastilha {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amarelo);
  display: inline-block;
}
.pastilha-resto { font-size: 11px; color: var(--cinza-fraco); margin-left: 2px; }


/* ------------------------------------------- financeiro: a faixa do caixa */

.faixa-ind.tres { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .faixa-ind.tres { grid-template-columns: 1fr; } }

.faixa-caixa {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  background: var(--branco); border: 0.5px solid var(--borda-forte);
  border-radius: var(--raio); padding: 18px 24px; margin: -14px 0 26px;
  position: relative; overflow: hidden;
}
.faixa-caixa::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--cinza-apagado);
}
.faixa-caixa.bom::before { background: var(--verde-grafico); }
.faixa-caixa.fraco::before { background: var(--destaque); }

.caixa-ponta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.caixa-ponta.direita { align-items: flex-end; text-align: right; }
.caixa-valor {
  font-size: 24px; font-weight: 600; letter-spacing: -0.035em; color: var(--preto);
}
.caixa-valor.negativo { color: var(--destaque); }
.faixa-caixa .campo-caixa {
  font-size: 24px; width: auto; max-width: 200px;
  border-bottom: 1px solid var(--borda-forte);
}

/* o caminho entre um caixa e o outro, com a diferença no meio dele */
.caixa-meio { display: flex; align-items: center; gap: 10px; }
.caixa-trilho {
  flex: 1; height: 1px; min-width: 24px; background: var(--borda-forte);
}

@media (max-width: 760px) {
  .faixa-caixa { grid-template-columns: 1fr; gap: 14px; }
  .caixa-ponta.direita { align-items: flex-start; text-align: left; }
  .caixa-meio { justify-content: flex-start; }
  .caixa-trilho { display: none; }
}

/* ícones dos cartões do financeiro */
.icone-ind { width: 46px; height: 46px; flex: 0 0 46px; display: block; }
