/* RotaCerta — folha de estilo única (mobile first) */
:root {
  --navy: #01003d;
  --navy-2: #0d0b5e;
  --azul: #1b15d1;
  --verde: #26d100;
  --verde-esc: #22850d;
  --oliva: #314d15;
  --terra: #853407;

  --fundo: #eef0f6;
  --superficie: #ffffff;
  --linha: #d9dce8;
  --texto: #01003d;
  --texto-2: #4a4a6a;
  --texto-3: #7a7a95;

  --frio: #2f6fe0;
  --morno: #e8a800;
  --quente: #e0322b;

  --perigo: #c62828;
  --raio-sm: 6px;
  --raio: 10px;
  --raio-lg: 16px;
  --sombra: 0 1px 2px rgba(1, 0, 61, .06), 0 4px 14px rgba(1, 0, 61, .05);
  --fonte: 'Figtree', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --menu-l: 248px;
  --topo-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--fonte); font-size: 15px; line-height: 1.5;
  color: var(--texto); background: var(--fundo);
}
img { max-width: 100%; height: auto; }
a { color: var(--azul); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estrutura ---------- */
.topo {
  position: sticky; top: 0; z-index: 45; height: var(--topo-h);
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--navy); color: #fff;
}
.topo .logo img { height: 34px; display: block; }
.topo .usuario-topo { margin-left: auto; text-align: right; font-size: .82rem; line-height: 1.25; }
.topo .usuario-topo small { color: #b9b8e6; display: block; }
.btn-menu {
  background: none; border: 0; color: #fff; padding: 8px; margin-left: -6px; cursor: pointer; border-radius: var(--raio-sm);
}
.btn-menu svg { display: block; }

.menu {
  position: fixed; top: var(--topo-h); bottom: 0; left: 0; width: var(--menu-l); z-index: 40;
  background: var(--navy); color: #fff; padding: 18px 12px 24px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .2s ease;
}
.menu.aberto { transform: none; }
.menu-fundo { display: none; position: fixed; inset: var(--topo-h) 0 0 0; background: rgba(1, 0, 61, .45); z-index: 35; }
.menu-fundo.aberto { display: block; }

/* Menu desenhado como paradas de uma rota pontilhada */
.menu nav { position: relative; }
.menu nav::before {
  content: ""; position: absolute; left: 21px; top: 14px; bottom: 14px;
  border-left: 3px dotted rgba(38, 209, 0, .35);
}
.menu a {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 9px 10px 9px 38px; border-radius: var(--raio); margin-bottom: 2px;
  color: #d8d7f5; text-decoration: none; font-weight: 600; font-size: .94rem;
}
.menu a::before {
  content: ""; position: absolute; left: 16px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--navy); border: 3px solid #4a49a0;
}
.menu a:hover { background: var(--navy-2); color: #fff; }
.menu a.ativo { background: var(--navy-2); color: #fff; }
.menu a.ativo::before { background: var(--verde); border-color: var(--verde); }
.menu .grupo { font-size: .75rem; color: #8988c4; padding: 14px 10px 4px 38px; font-weight: 600; }
/* Submenus (Gestão / Configurações) — só um aberto por vez */
.menu .submenu { margin-top: 6px; }
.menu .submenu-btn {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 10px 9px 38px; border: 0; border-radius: var(--raio); margin-bottom: 2px; cursor: pointer;
  background: none; color: #d8d7f5; font: inherit; font-weight: 600; font-size: .94rem; text-align: left;
}
.menu .submenu-btn::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px;
  border-radius: 4px; background: var(--navy); border: 3px solid #4a49a0;
}
.menu .submenu-btn:hover { background: var(--navy-2); color: #fff; }
.menu .submenu-btn.contem-ativo::before { border-color: var(--verde); }
.menu .submenu.aberto > .submenu-btn { color: #fff; }
.menu .submenu-btn .seta { flex: none; color: #8988c4; transition: transform .22s ease; }
.menu .submenu.aberto > .submenu-btn .seta { transform: rotate(90deg); color: #fff; }
.menu .submenu-itens { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.menu .submenu.aberto > .submenu-itens { grid-template-rows: 1fr; }
.menu .submenu-dentro { overflow: hidden; min-height: 0; }
.menu .submenu-dentro a { padding-left: 50px; font-size: .9rem; font-weight: 500; }
.menu .submenu-dentro a::before { left: 18px; width: 9px; height: 9px; border-width: 2px; }
.menu .submenu-dentro a.ativo { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .menu .submenu-itens, .menu .submenu-btn .seta { transition: none; }
}
.menu .rodape-menu { margin-top: 22px; padding: 12px 10px 0 12px; border-top: 1px solid #1d1b6e; font-size: .8rem; color: #8988c4; }
.menu .rodape-menu a { padding-left: 0; display: inline; color: #d8d7f5; }
.menu .rodape-menu a::before { display: none; }

.conteudo { padding: 18px 14px 90px; max-width: 1280px; margin: 0 auto; }

@media (min-width: 1000px) {
  .btn-menu { display: none; }
  .menu { transform: none; }
  .menu-fundo, .menu-fundo.aberto { display: none; }
  .conteudo { margin-left: var(--menu-l); padding: 26px 32px 48px; max-width: calc(1280px + var(--menu-l)); }
}

.cabecalho { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.cabecalho h1 { margin: 0; }
.cabecalho .acoes { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.subtitulo { color: var(--texto-2); margin: -10px 0 18px; }

/* ---------- Componentes ---------- */
.caixa {
  background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio-lg);
  padding: 18px; margin-bottom: 18px;
}
.caixa > h2:first-child { margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--raio); border: 1.5px solid transparent;
  background: var(--verde); color: var(--navy); font: inherit; font-weight: 700; text-decoration: none;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #2fe606; }
.btn-sec { background: var(--superficie); color: var(--navy); border-color: var(--linha); }
.btn-sec:hover { background: #f5f6fb; border-color: #b9bdd2; }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: #2a24e6; }
.btn-perigo { background: var(--superficie); color: var(--perigo); border-color: #f0c4c4; }
.btn-perigo:hover { background: #fdf1f1; }
.btn-pq { min-height: 34px; padding: 0 11px; font-size: .86rem; }
.btn-bloco { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Botão flutuante de nova visita (SDR no celular) */
.fab {
  position: fixed; right: 16px; bottom: 18px; z-index: 25; height: 56px; padding: 0 22px;
  border-radius: 28px; box-shadow: 0 6px 20px rgba(1, 0, 61, .3); font-size: 1rem;
}
@media (min-width: 1000px) { .fab { display: none; } }

/* Formulários */
.form-grade { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) {
  .form-grade { grid-template-columns: repeat(6, 1fr); }
  .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c6 { grid-column: span 6; }
}
.campo label, .rotulo { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--texto-2); }
.campo .ajuda { font-size: .8rem; color: var(--texto-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=month], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--linha);
  border-radius: var(--raio); background: #fff; color: var(--texto); font: inherit; font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(27, 21, 209, .15); }
.obrig { color: var(--quente); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--verde-esc); }

/* Seletor de temperatura: três botões grandes para usar com o polegar */
.seletor-temp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seletor-temp input { position: absolute; opacity: 0; pointer-events: none; }
.seletor-temp label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; border: 2px solid var(--linha); border-radius: var(--raio); cursor: pointer;
  font-weight: 700; color: var(--texto-2); background: #fff; margin: 0;
}
.seletor-temp label small { font-weight: 500; font-size: .74rem; color: var(--texto-3); }
.seletor-temp input:focus-visible + label { outline: 3px solid var(--azul); outline-offset: 2px; }
.seletor-temp input[value=frio]:checked + label { border-color: var(--frio); background: #eaf1fd; color: var(--frio); }
.seletor-temp input[value=morno]:checked + label { border-color: var(--morno); background: #fff7df; color: #8a6400; }
.seletor-temp input[value=quente]:checked + label { border-color: var(--quente); background: #fdecea; color: var(--quente); }

/* Selos */
.temp { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.temp-frio { background: #eaf1fd; color: var(--frio); }
.temp-morno { background: #fff3cc; color: #8a6400; }
.temp-quente { background: #fdecea; color: var(--quente); }
.selo { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .76rem; font-weight: 700; background: #eceef5; color: var(--texto-2); }
.selo-verde { background: #e3f8dc; color: var(--oliva); }
.selo-azul { background: #e9e8fd; color: var(--azul); }
.selo-terra { background: #f8ebe3; color: var(--terra); }
.selo-vermelho { background: #fdecea; color: var(--perigo); }

/* Alertas */
.alerta { padding: 12px 14px; border-radius: var(--raio); margin-bottom: 14px; border-left: 4px solid; background: #fff; }
.alerta-sucesso { border-color: var(--verde-esc); background: #effbea; }
.alerta-erro { border-color: var(--perigo); background: #fdf1f1; }
.alerta-aviso { border-color: var(--morno); background: #fff8e5; }
.alerta-info { border-color: var(--azul); background: #f0effe; }
.alerta ul { margin: 6px 0 0; padding-left: 18px; }

/* Tabelas: viram cartões no celular */
.tabela-rolagem { overflow-x: auto; }
table.tabela { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabela th { text-align: left; font-size: .8rem; color: var(--texto-3); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--linha); white-space: nowrap; }
.tabela td { padding: 11px 10px; border-bottom: 1px solid #eceef5; vertical-align: middle; }
.tabela tr:hover td { background: #fafbfe; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .tabela-cartoes thead { display: none; }
  .tabela-cartoes, .tabela-cartoes tbody, .tabela-cartoes tr, .tabela-cartoes td { display: block; width: 100%; }
  .tabela-cartoes tr { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 10px 12px; margin-bottom: 10px; }
  .tabela-cartoes td { border: 0; padding: 3px 0; display: flex; gap: 10px; justify-content: space-between; }
  .tabela-cartoes td::before { content: attr(data-r); color: var(--texto-3); font-size: .8rem; font-weight: 600; }
  .tabela-cartoes td:first-child { font-weight: 700; font-size: 1rem; }
  .tabela-cartoes td:first-child::before { content: none; }
}

/* Indicadores do painel */
.indicadores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 900px) { .indicadores { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.ind { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio-lg); padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.ind strong { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ind span { font-size: .85rem; color: var(--texto-2); }
.ind.destaque { background: var(--navy); color: #fff; border-color: var(--navy); }
.ind.destaque span { color: #c4c3ee; }
.ind.destaque strong { color: var(--verde); }
.grade-graficos { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .grade-graficos { grid-template-columns: 1fr 1fr; } }
.grafico { position: relative; height: 260px; }

/* Filtros */
.filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.filtros .campo label { font-size: .8rem; }
@media (min-width: 900px) { .filtros { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; align-items: flex-start; }
.k-coluna {
  flex: 0 0 86%; max-width: 320px; scroll-snap-align: start;
  background: #e4e7f1; border-radius: var(--raio-lg); padding: 10px; border-top: 4px solid var(--cor, var(--azul));
}
@media (min-width: 700px) { .k-coluna { flex-basis: 280px; } }
.k-titulo { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; font-weight: 700; }
.k-titulo .qtd { background: #fff; border-radius: 20px; padding: 0 9px; font-size: .8rem; }
.k-lista { min-height: 80px; display: flex; flex-direction: column; gap: 8px; }
.k-card {
  background: #fff; border-radius: var(--raio); padding: 11px 12px; border: 1px solid var(--linha);
  border-left: 5px solid var(--frio); cursor: grab; text-decoration: none; color: inherit; display: block;
}
.k-card.t-morno { border-left-color: var(--morno); }
.k-card.t-quente { border-left-color: var(--quente); }
.k-card:active { cursor: grabbing; }
.k-card .k-nome { font-weight: 700; display: block; }
.k-card .k-emp { font-size: .86rem; color: var(--texto-2); display: block; }
.k-card .k-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: .78rem; color: var(--texto-3); }
.k-card.expirando { box-shadow: 0 0 0 2px var(--quente); }
.k-card .novo { background: var(--verde); color: var(--navy); }
.sortable-ghost { opacity: .35; }
.sortable-drag { transform: rotate(2deg); }

/* ---------- Linha do tempo: o histórico do lead como uma rota ---------- */
.rota { list-style: none; margin: 0; padding: 0; position: relative; }
.rota::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; border-left: 3px dotted #b7c7b0; }
.rota li { position: relative; padding: 0 0 16px 30px; }
.rota li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 3px solid var(--verde-esc);
}
.rota li.t-atribuicao::before { border-color: var(--azul); }
.rota li.t-parecer::before { background: var(--verde); border-color: var(--verde); }
.rota li.t-coluna::before { border-color: var(--terra); }
.rota li.t-aguardando::before, .rota li.t-redistribuicao::before { border-color: var(--quente); }
.rota li:last-child { padding-bottom: 0; }
.rota .quando { font-size: .78rem; color: var(--texto-3); }
.rota .texto { white-space: pre-line; }

/* Detalhe do lead */
.detalhe { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 1000px) { .detalhe { grid-template-columns: 1.2fr 1fr; } }
dl.dados { display: grid; grid-template-columns: 1fr; gap: 10px 18px; margin: 0; }
@media (min-width: 600px) { dl.dados { grid-template-columns: 1fr 1fr; } }
dl.dados dt { font-size: .78rem; color: var(--texto-3); font-weight: 600; }
dl.dados dd { margin: 0; font-weight: 600; word-break: break-word; }
.foto-fachada { border-radius: var(--raio); max-height: 260px; object-fit: cover; width: 100%; }
.prazo { padding: 10px 14px; border-radius: var(--raio); background: #f0effe; margin-bottom: 14px; font-weight: 600; }
.prazo.urgente { background: #fdecea; color: var(--perigo); }

/* Paginação */
.paginacao { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.paginacao a, .paginacao span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--raio-sm); border: 1px solid var(--linha); background: #fff; text-decoration: none; color: var(--texto); }
.paginacao .atual { background: var(--navy); color: #fff; border-color: var(--navy); }

.vazio { text-align: center; padding: 40px 18px; color: var(--texto-2); }
.vazio h2 { color: var(--texto); }

/* Diálogo */
dialog { border: 0; border-radius: var(--raio-lg); padding: 22px; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(1, 0, 61, .35); }
dialog::backdrop { background: rgba(1, 0, 61, .5); }
dialog .botoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- Negociação ---------- */
.grade-2 { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 800px) { .grade-2 { grid-template-columns: 1fr 1fr; } }
.neg-itens { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.neg-item {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end;
  padding: 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: #fafbfe;
}
.neg-item .neg-prod { grid-column: 1 / -1; }
.neg-item .neg-remover { grid-column: 1 / -1; justify-self: start; }
.neg-item .neg-valores { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; color: var(--texto-2); }
.neg-item .neg-valores:empty { display: none; }
.neg-item .neg-valores s { color: var(--texto-3); }
.neg-item input:disabled { background: #f0f1f6; color: var(--texto-3); }
@media (min-width: 900px) {
  .neg-item { grid-template-columns: minmax(220px, 3fr) 80px 1fr 1fr auto; }
  .neg-item .neg-prod { grid-column: auto; }
  .neg-item .neg-remover { grid-column: auto; align-self: end; margin-bottom: 5px; }
}
input.neg-acima { border-color: var(--morno); background: #fff8e5; }
.neg-totais { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .neg-totais { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.neg-totais > div { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; }
.neg-totais span { display: block; font-size: .82rem; font-weight: 600; color: var(--texto-2); }
.neg-totais strong { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.neg-totais small { display: block; font-size: .78rem; color: var(--texto-3); }
.neg-totais .neg-comissao { border-color: #bfe9b1; background: #f3fdf0; }
.neg-totais .neg-comissao strong { color: var(--verde-esc); }
.neg-contadores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
@media (min-width: 700px) { .neg-contadores { grid-template-columns: repeat(6, 1fr); } }
.neg-contadores a { display: block; padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: #fff; text-decoration: none; color: var(--texto); }
.neg-contadores a strong { display: block; font-size: 1.3rem; }
.neg-contadores a span { font-size: .78rem; color: var(--texto-2); font-weight: 600; }
.neg-contadores a.ativo { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.neg-abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.neg-planos { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1100px) { .neg-planos { grid-template-columns: 1fr 1fr; } }
.neg-plano { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px 14px; margin: 0; background: #fafbfe; min-width: 0; }
.neg-plano legend { font-weight: 800; padding: 0 6px; }
.neg-matriz { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.neg-matriz th { text-align: left; font-size: .8rem; color: var(--texto-2); font-weight: 600; padding: 4px 6px; white-space: nowrap; }
.neg-matriz td { padding: 3px 4px; min-width: 110px; }
.neg-matriz input { min-height: 38px; padding: 6px 10px; text-align: right; }
.neg-resumo-precos td small { color: var(--texto-3); }
.neg-sem-preco { color: var(--perigo); font-weight: 600; }
.seletor-regime { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 700px) { .seletor-regime { grid-template-columns: repeat(4, 1fr); } }
.seletor-regime input { position: absolute; opacity: 0; pointer-events: none; }
.seletor-regime label {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: 6px 10px;
  border: 2px solid var(--linha); border-radius: var(--raio); cursor: pointer; font-weight: 700; color: var(--texto-2); background: #fff;
}
.seletor-regime input:focus-visible + label { outline: 3px solid var(--azul); outline-offset: 2px; }
.seletor-regime input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.neg-sistema { grid-template-columns: 1fr !important; }
.neg-adicional { grid-template-columns: 1fr 90px; }
.neg-adicional .neg-prod { grid-column: 1 / 2; }
@media (min-width: 900px) { .neg-adicional { grid-template-columns: minmax(220px, 1fr) 90px auto; } }
.neg-descontos { margin-top: 16px; }
.neg-desc-par { display: grid; grid-template-columns: 1fr auto 1.3fr auto; align-items: center; gap: 6px; }
.neg-desc-par span { font-weight: 700; color: var(--texto-2); }
.neg-desc-par input { text-align: right; }
.neg-detalhes summary { cursor: pointer; font-weight: 700; color: var(--texto-2); }
.menu .contador { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--morno); color: var(--navy); font-size: .74rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.menu .submenu-btn .contador { margin-left: 0; }
.menu .submenu-btn > span:first-child { flex: 1; }

/* ---------- Marca do cliente (white-label) ---------- */
.marca-topo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.marca-topo .marca-logo { height: 38px; width: auto; max-width: 120px; object-fit: contain; border-radius: 8px; display: block; }
.marca-topo .marca-inicial {
  width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--verde); color: var(--navy); font-weight: 800; font-size: 1.15rem; flex: none;
}
.marca-topo .marca-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.marca-topo .marca-txt strong { font-size: 1.02rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-topo .marca-txt small { font-size: .7rem; color: rgba(255,255,255,.7); display: inline-flex; align-items: center; gap: 3px; letter-spacing: .02em; }
.marca-topo .marca-txt small img { width: 12px; height: 12px; display: inline-block; }
.marca-previa { display: inline-flex; padding: 10px; border: 1px dashed var(--linha); border-radius: var(--raio); background: #fafbfe; margin-bottom: 6px; }
.marca-previa img { max-height: 64px; max-width: 220px; display: block; }
.marca-cor { display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.marca-cor input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1.5px solid var(--linha); border-radius: var(--raio); background: #fff; cursor: pointer; }

/* ---------- Recibos ---------- */
.rcb-tipos { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .rcb-tipos { grid-template-columns: repeat(5, 1fr); } }
.rcb-tipos label { min-height: 52px; font-size: .9rem; }
.rcb-anexo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.rcb-anexo img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha); background: #fff; }
.rcb-pdf { width: 44px; height: 44px; border-radius: 8px; background: #fdecea; color: var(--perigo); font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rcb-previa { margin-top: 8px; color: var(--texto-2); font-weight: 600; }
.rcb-previa img { max-height: 180px; border-radius: var(--raio); border: 1px solid var(--linha); }
.selo.rcb-recarga { background: #e9e8fd; color: var(--azul); }
.selo.rcb-combustivel { background: #fff3d6; color: #8a6400; }
.selo.rcb-zona_azul { background: #e3eefd; color: #1d5bbf; }
.selo.rcb-estacionamento { background: #e3f8dc; color: var(--oliva); }

/* ---------- Contadores ---------- */
.ctd-contadores { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .ctd-contadores { grid-template-columns: repeat(4, 1fr); } }
.sim-nao { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-nao input { position: absolute; opacity: 0; pointer-events: none; }
.sim-nao label {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0;
  border: 2px solid var(--linha); border-radius: var(--raio); cursor: pointer; font-weight: 700; color: var(--texto-2); background: #fff;
}
.sim-nao input:focus-visible + label { outline: 3px solid var(--azul); outline-offset: 2px; }
.sim-nao input[value="1"]:checked + label { border-color: var(--verde-esc); background: #effbea; color: var(--verde-esc); }
.sim-nao input[value="0"]:checked + label { border-color: var(--perigo); background: #fdf1f1; color: var(--perigo); }
.ctd-visitas, .ctd-hist { list-style: none; margin: 0; padding: 0; }
.ctd-visitas li { padding: 12px 0; border-bottom: 1px solid var(--linha); }
.ctd-visitas li:last-child { border-bottom: 0; }
.ctd-v-topo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.ctd-visitas p { margin: 0; color: var(--texto-2); }
.ctd-hist li { padding: 8px 0; border-bottom: 1px solid #eceef5; font-size: .9rem; }
.ctd-hist li small { color: var(--texto-3); }

.marca-topo.marca-empilhada { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
.marca-topo .marca-logo-topo { height: 26px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.marca-topo .marca-logo-branca { filter: brightness(0) invert(1); }
.marca-topo.marca-empilhada > small { font-size: .68rem; color: rgba(255,255,255,.72); display: inline-flex; align-items: center; gap: 3px; line-height: 1; padding-left: 2px; }
.marca-topo.marca-empilhada > small img { width: 11px; height: 11px; display: inline-block; }
.acesso-marca { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 26px; }
.acesso-marca .logo-cliente { max-height: 64px; max-width: 260px; width: auto; display: block; }
.acesso-marca .nome-cliente { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.acesso-marca small { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--texto-3); font-weight: 600; }
.acesso-marca small img { width: 13px; height: 13px; }

/* ---------- Clientes ---------- */
.neg-contadores-info { display: block; padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: #fff; }
.neg-contadores-info strong { display: block; font-size: 1.3rem; }
.neg-contadores-info span { font-size: .78rem; color: var(--texto-2); font-weight: 600; }
.cli-oport { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .cli-oport { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.cli-oport > div { border: 1px dashed var(--linha); border-radius: var(--raio); padding: 10px 12px; background: #fafbfe; display: flex; flex-direction: column; gap: 2px; }
.cli-oport small { color: var(--texto-3); font-size: .8rem; }
.cli-oport span { color: var(--verde-esc); font-weight: 700; font-size: .9rem; }
.cli-tipos { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .cli-tipos { grid-template-columns: repeat(4, 1fr); } }
.cli-nota { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 600px) { .cli-nota { grid-template-columns: repeat(11, 1fr); } }
.cli-nota input { position: absolute; opacity: 0; pointer-events: none; }
.cli-nota label { display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; border: 2px solid var(--linha); border-radius: var(--raio); font-weight: 800; cursor: pointer; background: #fff; }
.cli-nota input:focus-visible + label { outline: 3px solid var(--azul); outline-offset: 2px; }
.cli-nota input:checked + label.nr { background: #fdecea; border-color: var(--perigo); color: var(--perigo); }
.cli-nota input:checked + label.na { background: #fff3d6; border-color: var(--morno); color: #8a6400; }
.cli-nota input:checked + label.nv { background: #effbea; border-color: var(--verde-esc); color: var(--verde-esc); }
.cli-equip { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
@media (min-width: 800px) { .cli-equip { grid-template-columns: repeat(4, 1fr); } }
.cli-equip .check { font-weight: 500; }
.cli-urgente { color: var(--perigo); font-size: 1.02rem; }
.cli-backlog { white-space: pre-wrap; word-break: break-word; background: #f6f7fb; border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; line-height: 1.55; }
.cli-vendido { list-style: none; margin: 0; padding: 0; }
.cli-vendido li { padding: 6px 0; border-bottom: 1px solid #eceef5; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; }
.cli-vendido li span { color: var(--texto-2); }
.cli-in-num { max-width: 80px; min-height: 36px !important; padding: 4px 8px !important; text-align: right; }
.cli-in-valor { max-width: 120px; min-height: 36px !important; padding: 4px 8px !important; text-align: right; }
.selo.cli-oc-comercial { background: #e9e8fd; color: var(--azul); }
.selo.cli-oc-suporte { background: #e3eefd; color: #1d5bbf; }
.selo.cli-oc-financeiro { background: #fff3d6; color: #8a6400; }
.selo.cli-oc-segunda_via { background: #f8ebe3; color: var(--terra); }

/* ---------- Busca do topo e usuário ---------- */
.topo .busca-topo { margin: 0 auto; flex: 0 1 520px; min-width: 0; }
.topo details.unidade-topo { margin-left: 8px; }
.topo details.unidade-topo + details.usuario-topo { margin-left: 4px; }
.topo .busca-topo input { width: 100%; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: .9rem; }
.topo .busca-topo input::placeholder { color: rgba(255,255,255,.65); }
.topo .busca-topo input:focus { outline: 2px solid var(--verde); background: rgba(255,255,255,.18); }
.topo a.usuario-topo { margin-left: 12px; color: #fff; text-decoration: none; border-radius: var(--raio-sm); padding: 4px 8px; }
.topo a.usuario-topo:hover { background: rgba(255,255,255,.1); }
@media (max-width: 700px) { .topo .busca-topo { display: none; } .topo a.usuario-topo, .topo details.unidade-topo { margin-left: auto; } }

/* ---------- Listas com avatar (leads, clientes, contadores) ---------- */
.lista-av td:first-child { display: flex; align-items: center; gap: 12px; }
.lista-av .av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .88rem; letter-spacing: .02em; }
.lista-av .av-txt { display: flex; flex-direction: column; min-width: 0; }
.lista-av .av-txt a { color: var(--texto); text-decoration: none; }
.lista-av .av-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; display: block; }
.lista-av .av-txt small { color: var(--texto-3); font-size: .82rem; }
.lista-av .uf { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--texto-3); background: #f0f1f6; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.lista-av .doc { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lista-av .doc-rot { font-size: .68rem; letter-spacing: .08em; color: var(--texto-3); font-weight: 700; }
.lista-av .st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 8px; }
.lista-av .st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lista-av .st-ok { background: #effbea; color: var(--verde-esc); }
.lista-av .st-off { background: #fdf1f1; color: var(--perigo); }
.lista-av .st-and { background: #e9e8fd; color: var(--azul); }
.lista-av .st-base { background: #f0f1f6; color: var(--texto-2); }
.msg-modelo { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; margin-top: 10px; }
.msg-modelo summary { cursor: pointer; }
.msg-modelo code { background: #f0f1f6; border-radius: 4px; padding: 1px 4px; font-size: .8rem; }
.lista-av .ind { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: #f0f1f6; color: var(--texto-2); }
.lista-av .ind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c62828; }
.lista-av .ind-contabilidade::before, .lista-av .ind-parceiro::before, .lista-av .ind-landpage::before, .lista-av .ind-sdr::before, .lista-av .ind-bairrista::before { background: var(--verde-esc); }

/* ---------- Tá na RotaCerta (agenda) ---------- */
.ag-sobre { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-3); font-weight: 700; }
.ag-barra { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.ag-nova { font-size: 1rem; }
.ag-filtros { display: flex; gap: 10px; flex-wrap: wrap; }
.ag-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-3); font-weight: 700; }
.ag-filtros select { min-width: 190px; text-transform: none; letter-spacing: 0; }
.ag-datas { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ag-dia { text-align: center; min-width: 150px; font-family: ui-monospace, Consolas, monospace; }
.ag-dia small { display: block; color: var(--verde-esc); font-weight: 700; font-size: .7rem; letter-spacing: .1em; }
.ag-data-in { width: 44px; padding: 6px !important; min-height: 44px; }
.ag-quadro { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .ag-quadro { grid-template-columns: repeat(3, 1fr); } }
.ag-coluna { background: #fff; border: 1px solid var(--linha); border-radius: 18px; display: flex; flex-direction: column; min-height: 320px; max-height: calc(100vh - 260px); }
@media (max-width: 899px) { .ag-coluna { max-height: none; min-height: 0; } }
.ag-coluna > header { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--linha); }
.ag-coluna > header .ag-qtd { margin-left: auto; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; border: 1px solid var(--linha); border-radius: 999px; padding: 1px 9px; color: var(--texto-2); }
.ag-bola { width: 9px; height: 9px; border-radius: 50%; }
.ag-aberta { background: #d33a3a; } .ag-iniciada { background: #e6b400; } .ag-finalizada { background: #27a04a; }
.ag-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; }
.ag-coluna > footer { border-top: 1px solid var(--linha); padding: 10px; text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--texto-3); }
.ag-vazio { color: var(--texto-3); text-align: center; margin: 40px 0; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.ag-card { text-align: left; border: 1px solid var(--linha); background: #fafbfd; border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; font: inherit; color: var(--texto); width: 100%; }
.ag-card:hover { border-color: var(--navy); }
.ag-card[draggable="true"] { cursor: grab; }
.ag-card.ag-arrastando { opacity: .45; cursor: grabbing; }
.ag-coluna.ag-alvo { border-color: var(--verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--verde) 30%, transparent); }
.ag-coluna.ag-alvo .ag-cards { background: #fafbf3; }
.ag-card-demo { background: #2a1c17; border-color: #b5563a; color: #fff; }
.ag-card-demo .ag-desc { color: #f1e7e2; }
.ag-topo-card { display: flex; align-items: center; gap: 10px; }
.ag-av { width: 32px; height: 32px; border-radius: 8px; color: #fff; font-weight: 800; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ag-desc { font-size: .84rem; color: var(--texto-2); line-height: 1.4; }
.ag-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ag-tag { font-size: .68rem; font-weight: 800; letter-spacing: .06em; border-radius: 6px; padding: 2px 8px; }
.ag-t-lead { background: #dff3f1; color: #1f7a72; } .ag-t-cliente { background: #fbf0c8; color: #8a6400; }
.ag-t-contador { background: #e6e6f6; color: #4a4aa0; } .ag-t-demo { background: #6e2e1d; color: #ffd8c9; }
.ag-hora { font-size: .72rem; color: var(--texto-3); font-family: ui-monospace, Consolas, monospace; }
.ag-card-demo .ag-hora { color: #d9c7c0; }
.ag-dlg { width: min(640px, 94vw); }
.ag-dlg-nova { width: min(860px, 96vw); }
.ag-dlg-topo { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 12px; }
.ag-dlg-topo small { color: var(--texto-3); font-family: ui-monospace, Consolas, monospace; }
.ag-abas { display: flex; gap: 18px; border-bottom: 1px solid var(--linha); margin-bottom: 14px; }
.ag-abas button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 2px; font: inherit; font-weight: 600; color: var(--texto-2); cursor: pointer; }
.ag-abas button.ativo { color: var(--texto); border-bottom-color: var(--verde); }
.ag-result { margin-top: 12px; border: 1px dashed var(--linha); border-radius: 12px; min-height: 200px; max-height: 50vh; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ag-res { text-align: left; background: #fff; border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.ag-res:hover { border-color: var(--navy); background: #fafbfe; }
.ag-res small { color: var(--texto-3); }
.ag-escolhido { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f6f7fb; border-radius: 10px; padding: 10px 12px; }

/* ---------- Painel do colaborador ---------- */
.col-perfil { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; border-top: 3px solid var(--verde); }
@media (min-width: 900px) { .col-perfil { grid-template-columns: auto 1fr 1fr; } }
.col-foto { width: 96px; height: 96px; border-radius: 22px; background: var(--verde); color: var(--navy); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.col-id h2 { margin: 2px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col-id p { margin: 0 0 8px; color: var(--texto-2); }
.col-selos { display: flex; gap: 6px; flex-wrap: wrap; }
.col-selos span { font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, var(--verde) 25%, #fff); color: var(--navy); }
.col-contatos { display: grid; gap: 8px; grid-column: 1 / -1; }
@media (min-width: 900px) { .col-contatos { grid-column: auto; } }
.col-contatos div { border-bottom: 1px solid var(--linha); padding: 6px 0; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.col-contatos small { display: block; font-size: .68rem; letter-spacing: .12em; color: var(--texto-3); }
.col-indic { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .col-indic { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.col-desemp { display: flex; gap: 14px; align-items: center; border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px; }
.col-desemp strong { display: block; font-size: 1.1rem; }
.col-desemp small { color: var(--texto-3); }
.col-anel { width: 110px; height: 110px; flex: none; color: var(--texto); }
.col-meta { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.col-meta strong { font-size: 1.3rem; font-weight: 800; }
.col-meta strong small { font-size: .78rem; color: var(--texto-3); font-weight: 600; }
.col-meta > small { color: var(--texto-2); font-size: .82rem; }
.col-com { border-color: #bfe9b1; background: #f3fdf0; }
.col-com strong { color: var(--verde-esc); }
.col-barra { height: 8px; background: #eceef5; border-radius: 99px; overflow: hidden; }
.col-barra span { display: block; height: 100%; border-radius: 99px; }
.col-numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .col-numeros { grid-template-columns: repeat(6, 1fr); } }
.col-numeros div { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; background: #fafbfd; }
.col-numeros strong { display: block; font-size: 1.6rem; font-family: ui-monospace, Consolas, monospace; }
.col-numeros span { color: var(--texto-2); font-size: .86rem; }
.col-dash-botoes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.col-ideias { list-style: none; margin: 0; padding: 0; }
.col-ideias li { padding: 14px 0; border-bottom: 1px solid var(--linha); }
.col-ideias li p { margin: 6px 0; }
.col-feliz { width: 100%; max-width: 280px; display: block; margin: 0 auto; color: var(--texto); }
.col-valeu-box { margin: 10px 0; }
.col-clima h2 { margin-top: 0; }
.col-humor { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.col-humor button { border: 2px solid var(--linha); background: #fff; border-radius: 14px; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; }
.col-humor button:hover, .col-humor button:focus-visible { border-color: var(--verde); background: #fafbf3; }
.col-humor span { font-size: 2rem; line-height: 1; }
.col-humor small { font-size: .72rem; color: var(--texto-2); font-weight: 600; }

/* ---------- Ajustes gerais (topo, usuário, kanban, mobile) ---------- */
.topo details.usuario-topo { margin-left: 12px; position: relative; text-align: left; }
.topo details.usuario-topo summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px; border-radius: 12px; color: #fff; }
.topo details.usuario-topo summary::-webkit-details-marker { display: none; }
.topo details.usuario-topo summary:hover, .topo details.usuario-topo[open] summary { background: rgba(255,255,255,.1); }
.ut-av { width: 36px; height: 36px; border-radius: 10px; background: var(--verde); color: var(--navy); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ut-txt { display: flex; flex-direction: column; line-height: 1.2; font-size: .88rem; font-weight: 700; }
.ut-txt small { font-weight: 500; color: rgba(255,255,255,.72); font-size: .74rem; }
.ut-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--texto); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); min-width: 230px; padding: 6px; z-index: 50; display: flex; flex-direction: column; }
.ut-menu a { padding: 10px 12px; border-radius: 10px; color: var(--texto); text-decoration: none; font-weight: 600; }
.ut-menu a:hover { background: #f3f4f8; }
.ut-menu .ut-sair { color: var(--perigo); border-top: 1px solid var(--linha); margin-top: 4px; border-radius: 0 0 10px 10px; }
.topo .sair-topo { color: #fff; text-decoration: none; font-weight: 700; font-size: .85rem; padding: 8px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; margin-left: 4px; }
.topo .sair-topo:hover { background: rgba(255,255,255,.12); }
.topo details.unidade-topo { position: relative; }
.topo details.unidade-topo summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 12px 4px 8px; border-radius: 12px; color: #fff; }
.topo details.unidade-topo summary::-webkit-details-marker { display: none; }
.topo details.unidade-topo summary:hover, .topo details.unidade-topo[open] summary { background: rgba(255,255,255,.1); }
.un-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex: none; }
.un-txt { display: flex; flex-direction: column; line-height: 1.2; font-size: .88rem; font-weight: 700; white-space: nowrap; }
.un-txt small { font-weight: 500; color: rgba(255,255,255,.72); font-size: .74rem; }
.un-seta { opacity: .75; transition: transform .2s; }
.topo details.unidade-topo[open] .un-seta { transform: rotate(180deg); }
.un-menu { left: auto; right: 0; min-width: 260px; }
.un-menu button { display: flex; align-items: center; gap: 8px; }
.un-menu button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; }
.un-menu button:hover { background: #f3f4f8; }
.un-menu button.ativo { background: color-mix(in srgb, var(--verde) 22%, #fff); }
.topo .busca-topo input[type=search] { -webkit-appearance: none; appearance: none; }
.form-sem-obrig .obrig { display: none; }
.aniv { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fffbea; border-color: #f1df9b; }
.aniv-p { background: #fff; border: 1px solid #f1df9b; border-radius: 999px; padding: 3px 10px; font-size: .86rem; }
.aniv-hoje { background: var(--verde); border-color: var(--verde); color: var(--navy); font-weight: 700; }
/* Kanban no visual da agenda */
.kanban { gap: 14px; }
.k-coluna { background: #fff !important; border: 1px solid var(--linha); border-top: 4px solid var(--cor, var(--linha)) !important; border-radius: 18px !important; padding: 0 !important; box-shadow: none !important; }
.k-titulo { padding: 14px 16px !important; border-bottom: 1px solid var(--linha); gap: 8px; justify-content: flex-start !important; }
.k-titulo .k-bola { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, var(--texto-3)); flex: none; }
.k-titulo .k-nm { flex: 1; }
.k-titulo .qtd { background: #fff !important; border: 1px solid var(--linha); font-family: ui-monospace, Consolas, monospace; color: var(--texto-2); }
.k-lista { padding: 12px; min-height: 140px; }
.k-card { background: #fafbfd !important; border: 1px solid var(--linha) !important; border-left: 4px solid var(--frio, #5b8def) !important; border-radius: 12px !important; padding: 12px 14px !important; box-shadow: none !important; }
.k-card.t-frio { border-left-color: #5b8def !important; }
.k-card.t-morno { border-left-color: var(--morno) !important; }
.k-card.t-quente { border-left-color: var(--quente) !important; }
.k-card:hover { border-color: var(--navy) !important; }
.k-card .k-topo { display: flex; align-items: center; gap: 10px; }
.k-card .k-emp { margin: 6px 0 0 42px; }
.k-card .k-meta { margin-left: 42px; }
@media (max-width: 760px) {
  .topo .sair-topo, .ut-txt { display: none; }
  .topo details.usuario-topo summary { padding: 4px; }
  .topo { gap: 6px; padding: 0 10px; }
  .marca-topo { min-width: 0; flex: 1 1 auto; }
  .marca-topo .marca-logo-topo { height: 20px; max-width: 130px; }
  .marca-topo.marca-empilhada > small { font-size: .6rem; }
  .ut-av { width: 34px; height: 34px; }
  .un-txt small { display: none; }
  .un-txt { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .lista-av td:first-child { justify-content: flex-start; text-align: left; }
  .lista-av .av-txt { align-items: flex-start; text-align: left; }
  .lista-av .av-txt strong { max-width: none; white-space: normal; }
  .tabela-cartoes.lista-av td[data-r] { text-align: right; }
  .neg-contadores, .ctd-contadores { grid-template-columns: repeat(2, 1fr) !important; }
  .col-dash-botoes .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
  .cabecalho { flex-wrap: wrap; }
}

/* ---------- Painel: hoje / gestão / metas por tipo ---------- */
.ph-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-cont { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.ph-cont span { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.ph-a { background: #fdecea; color: #b42d2d; } .ph-i { background: #fff3d6; color: #8a6400; } .ph-f { background: #effbea; color: var(--verde-esc); }
.ph-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.ph-lista li a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 0; border-bottom: 1px solid #eceef5; color: var(--texto); text-decoration: none; }
.ph-lista li.ok a { opacity: .55; }
.ph-lista small { color: var(--texto-3); width: 100%; padding-left: 2px; }
.ph-pend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 900px) { .ph-pend { grid-template-columns: repeat(6, 1fr); } }
.ph-pend a { display: block; border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px; text-decoration: none; color: var(--texto-3); background: #fafbfd; }
.ph-pend a strong { display: block; font-size: 1.5rem; }
.ph-pend a span { font-size: .8rem; font-weight: 600; }
.ph-pend a.tem { color: var(--texto); border-color: var(--morno); background: #fffbea; }
.col-tipos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
@media (min-width: 900px) { .col-tipos { grid-template-columns: repeat(4, 1fr); } }
.painel-hoje .col-tipos { grid-template-columns: repeat(2, 1fr); }
.col-tipos > div { border: 1px solid var(--linha); border-radius: var(--raio); padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.col-tipos span { font-size: .78rem; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .04em; }
.col-tipos strong { font-size: 1.25rem; }
.col-tipos strong small { font-size: .78rem; color: var(--texto-3); font-weight: 600; }
.col-tipos > div > small { color: var(--texto-3); font-size: .78rem; }
.eq-metas-dia { display: grid; grid-template-columns: repeat(2, minmax(90px, 1fr)); gap: 4px 8px; }
.eq-metas-dia label { display: flex; flex-direction: column; font-size: .7rem; color: var(--texto-3); font-weight: 600; }
.eq-metas-dia input { max-width: 80px; }

.rel-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 900px) { .rel-cards { grid-template-columns: repeat(4, 1fr); } }
.rel-cards div { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; }
.rel-cards strong { display: block; font-size: 1.25rem; font-weight: 800; }
.rel-cards span { font-size: .8rem; color: var(--texto-2); font-weight: 600; display: block; }
.rel-cards .rel-alerta { border-color: var(--morno); background: #fffbea; }
.rel-cards .col-barra { margin-top: 6px; }
@media (max-width: 700px) { .painel-hoje .rel-cards { grid-template-columns: 1fr 1fr !important; } }
/* ---------- Painel do Marketing ---------- */
.mk-funil { display: flex; flex-direction: column; gap: 10px; }
.mk-funil > div { display: grid; grid-template-columns: 170px 1fr 40px 44px; align-items: center; gap: 8px; }
.mk-funil span { font-size: .86rem; color: var(--texto-2); font-weight: 600; }
.mk-funil small { color: var(--texto-3); text-align: right; }
.mk-barra { height: 14px; background: #eceef5; border-radius: 99px; overflow: hidden; }
.mk-barra i { display: block; height: 100%; background: var(--verde); border-radius: 99px; }
.mk-dias { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.mk-dias > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.mk-dias i { display: block; width: 100%; background: var(--navy); border-radius: 4px 4px 0 0; }
.mk-dias .hoje i { background: var(--verde); }
.mk-dias .fut { opacity: .35; }
.mk-dias small { font-size: .62rem; color: var(--texto-3); height: 14px; }
@media (max-width: 700px) { .mk-funil > div { grid-template-columns: 1fr 30px 38px; } .mk-funil > div > span { grid-column: 1 / -1; } }
/* ---------- Tela de acesso ---------- */
.acesso { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--navy); }
.acesso-arte { display: none; position: relative; overflow: hidden; color: #fff; padding: 48px; }
.acesso-arte svg.trajeto { position: absolute; inset: 0; width: 100%; height: 100%; }
.acesso-arte .frase { position: relative; max-width: 420px; margin-top: auto; }
.acesso-arte .frase h2 { font-size: 2.3rem; font-weight: 800; line-height: 1.1; margin-bottom: 14px; }
.acesso-arte .frase p { color: #c4c3ee; font-size: 1.05rem; }
.acesso-form { background: var(--fundo); display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.acesso-form .cartao { width: 100%; max-width: 400px; }
.acesso-form .logo-acesso { height: 46px; margin-bottom: 26px; }
.acesso-form h1 { font-size: 1.6rem; }
@media (min-width: 900px) {
  .acesso { grid-template-columns: 1.1fr 1fr; }
  .acesso-arte { display: flex; flex-direction: column; }
  .acesso-form { border-radius: 28px 0 0 28px; }
}

/* Impressão / PDF vertical */
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .topo, .menu, .menu-fundo, .fab, .nao-imprimir, .filtros { display: none !important; }
  .conteudo { margin: 0; padding: 0; max-width: none; }
  .caixa { border: 0; padding: 0; break-inside: avoid; }
  .tabela td, .tabela th { padding: 4px 6px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Destaque rápido em campos preenchidos automaticamente (GPS / Receita) */
.preenchido { background: #effbea !important; border-color: var(--verde-esc) !important; transition: background .6s; }

/* ---- White label: selo "Powered by RotaCerta" com a versão (não muda com a marca da empresa) ---- */
.by-rc { display: flex; flex-direction: column; gap: 2px; font-size: .76rem; line-height: 1.35; }
.by-rc a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.by-rc a img { display: block; border-radius: 4px; }
.by-rc span { opacity: .8; }
.menu .by-rc.menu-versao { margin: 22px 6px 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .62); }
.menu .by-rc.menu-versao a { color: rgba(255, 255, 255, .82); padding: 0; background: none; }
.menu .by-rc.menu-versao a::before { content: none; }
.menu .by-rc.menu-versao a:hover { color: #fff; background: none; }
.acesso-form { flex-direction: column; gap: 18px; }
.acesso-versao { align-items: center; text-align: center; color: var(--texto-2, #4a4a6a); }
.acesso-versao a { color: var(--navy, #01003d); }
@media print { .by-rc { display: none; } }
