/* ZeraCRM 2 (rodada 2, parte 2) — as telas de vendas no sistema do ZeraSync 2 (DESIGN do CRM §4):
   Painel, Negócios (quadro e lista), Negócio em detalhe, Leads, Pessoas, Empresas e Atividades.
   Prefixo vd-. Só tokens do kit (claro e escuro do mesmo desenho). O corte Zera (3 de avanço por 5 de descida, na
   quina de cima à direita) entra nos cartões de negócio, nos KPIs, nos ícones de pendência e na trilha de etapas;
   a sombra de quem leva o corte mora no pai (o clip-path cortaria a sombra junto). */

.vd-tela { max-width: 1500px; margin: 0 auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vd-tela [hidden], .vd-gav [hidden] { display: none !important; }
.vd-tela.vd-larga { max-width: none; }
@media (max-width: 767px) { .vd-tela { padding: 14px 16px 32px; gap: 14px; } }

/* ------------------------------------------------------------------ o corte Zera */
.vd-corte { --cl: 12px; --ca: 20px; position: relative; clip-path: polygon(0 0, calc(100% - var(--cl)) 0, 100% var(--ca), 100% 100%, 0 100%); }
.vd-corte::after { content: ""; position: absolute; top: 0; right: 0; width: var(--cl); height: var(--ca); pointer-events: none; z-index: 2;
  background: linear-gradient(to bottom left, transparent calc(50% - 0.7px), var(--vd-fio, var(--linha)) calc(50% - 0.7px), var(--vd-fio, var(--linha)) calc(50% + 0.7px), transparent calc(50% + 0.7px)); }
.vd-corte-p { --cl: 6px; --ca: 10px; }
.vd-sombra { filter: drop-shadow(0 1px 2px rgba(22, 32, 43, 0.07)) drop-shadow(0 2px 6px rgba(22, 32, 43, 0.05)); }
html[data-theme="dark"] .vd-sombra { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }

/* ------------------------------------------------------------------ cabeçalho da tela */
.vd-cab { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.vd-cab-txt { flex: 1 1 260px; min-width: 0; }
.vd-cab-txt h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.vd-resumo { color: var(--txt-3); font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.vd-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vd-acoes .entrada { width: auto; height: 36px; }
.vd-voltar { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--txt-3); text-decoration: none; }
.vd-voltar:hover { color: var(--txt); text-decoration: none; }
.vd-alternador.abas { flex: none; }
.vd-alternador .aba { height: 30px; gap: 6px; }
@media (max-width: 767px) {
  .vd-cab-txt h1 { font-size: 18px; }
  .vd-acoes { width: 100%; }
  .vd-acoes > .btn:not(.btn-icone) { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ seções (cartão com título) */
.vd-sec { background: var(--sup); border: 1px solid var(--linha); border-radius: var(--raio-c); box-shadow: var(--sombra-1); min-width: 0; }
.vd-sec-cab { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; min-width: 0; }
.vd-sec-cab > div { flex: 1; min-width: 0; }
.vd-sec-cab h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.vd-sec-cab p { font-size: 12.5px; color: var(--txt-3); margin-top: 1px; }
.vd-sec-corpo { padding: 12px 16px 16px; min-width: 0; }
.vd-sec-corpo.sem-pad { padding: 8px 0 0; }
.vd-grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vd-grade3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .vd-grade3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .vd-grade2 { grid-template-columns: minmax(0, 1fr); } }
.vd-semdado { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--afundado); color: var(--txt-2); font-size: 13px; }
.vd-semdado svg { flex: none; margin-top: 1px; color: var(--txt-3); }
.vd-aviso { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--alerta-bg); color: var(--alerta-forte); font-size: 13px; font-weight: 500; }
.vd-aviso.erro { background: var(--erro-bg); color: var(--erro-forte); }
.vd-aviso svg { flex: none; margin-top: 1px; }
.vd-dica-txt { font-size: 12.5px; color: var(--txt-3); }

/* ------------------------------------------------------------------ KPIs */
.vd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; }
.vd-kpi-casca { min-width: 0; }
.vd-kpi { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 14px 16px; background: var(--sup); border: 1px solid var(--linha); border-radius: var(--raio-c); }
.vd-kpi-rot { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--txt-3); }
.vd-kpi-rot svg { flex: none; }
.vd-kpi-val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-kpi-det { font-size: 12px; color: var(--txt-2); }
.vd-kpi.sem .vd-kpi-val { font-size: 15px; font-weight: 600; color: var(--txt-3); letter-spacing: 0; padding: 6px 0 3px; }
.vd-kpi.ok .vd-kpi-val { color: var(--ok-forte); }
.vd-kpi.alerta .vd-kpi-val { color: var(--alerta-forte); }
.vd-meta { height: 6px; margin-top: 4px; border-radius: 3px; background: var(--afundado); overflow: hidden; }
.vd-meta i { display: block; height: 100%; background: var(--zera); clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 0 100%); transition: width var(--t-entrada); }
.vd-meta.batida i { background: var(--ok); }
.vd-nota { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.vd-nota-barra { width: 54px; height: 6px; border-radius: 3px; background: var(--afundado); overflow: hidden; flex: none; }
.vd-nota-barra i { display: block; height: 100%; background: var(--ok); }
.vd-nota.media .vd-nota-barra i { background: var(--alerta); }
.vd-nota.baixa .vd-nota-barra i { background: var(--erro); }
.vd-nota b { font-size: 12.5px; font-weight: 700; }

/* ------------------------------------------------------------------ Painel */
.vd-saudacao { color: var(--txt-2); font-size: 14px; margin-top: 2px; }
.vd-precisa .vd-sec-cab h2 { display: flex; align-items: center; gap: 8px; }
.vd-precisa-grupos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 1100px) { .vd-precisa-grupos { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.vd-grupo-tit { display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--txt-3); }
.vd-grupo-tit .vd-cont { margin-left: auto; }
.vd-cont { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--afundado); color: var(--txt-2); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.vd-cont.erro { background: var(--erro-bg); color: var(--erro-forte); }
.vd-cont.alerta { background: var(--alerta-bg); color: var(--alerta-forte); }
.vd-pend { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 0; border-top: 1px solid var(--linha); }
.vd-pend-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: var(--erro-bg); color: var(--erro-forte); border-radius: 8px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 11px, 100% 100%, 0 100%); }
.vd-pend-ic.alerta { background: var(--alerta-bg); color: var(--alerta-forte); }
.vd-pend-ic.info { background: var(--info-bg); color: var(--info-forte); }
.vd-pend-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--txt); }
.vd-pend-txt:hover { text-decoration: none; }
.vd-pend-txt:hover b { text-decoration: underline; }
.vd-pend-txt b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-pend-txt small { font-size: 12px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-pend .btn { flex: none; }
.vd-pend-vazio { display: flex; align-items: center; gap: 8px; padding: 10px 0; color: var(--txt-3); font-size: 13px; border-top: 1px solid var(--linha); }
.vd-pend-vazio svg { color: var(--ok); flex: none; }
.vd-tudo-certo { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.vd-tudo-certo .vd-pend-ic { background: var(--ok-bg); color: var(--ok-forte); }

.vd-barras { display: flex; flex-direction: column; gap: 10px; }
.vd-barra-l { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.vd-barra-nome { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vd-barra-nome span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-barra-t { height: 10px; border-radius: 2px; background: var(--afundado); overflow: hidden; }
.vd-barra-t i { display: block; height: 100%; background: var(--zera); clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 100%, 0 100%); }
.vd-barra-v { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.vd-barra-v small { display: block; font-size: 11.5px; font-weight: 500; color: var(--txt-3); }
@media (max-width: 480px) { .vd-barra-l { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; } }

.vd-gargalo { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--alerta-bg); color: var(--alerta-forte); font-size: 13px; }
.vd-gargalo svg { flex: none; margin-top: 1px; }
.vd-gargalo small { display: block; color: var(--txt-2); font-size: 12px; margin-top: 2px; }
.vd-conv-l { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linha); min-width: 0; font-size: 13px; }
.vd-conv-l .cresce { min-width: 0; }
.vd-conv-l .cresce b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-conv-l .cresce small { color: var(--txt-3); font-size: 12px; }
.vd-funil .funil-zera { gap: 7px; }
.vd-funil .funil-linha .fraco { min-width: 64px; text-align: right; }
@media (max-width: 480px) { .vd-funil .funil-etapa { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 10px; } }

/* ------------------------------------------------------------------ filtros (pílulas) */
.vd-filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.vd-filtros .vd-busca { position: relative; flex: 0 1 280px; min-width: 180px; }
.vd-filtros .vd-busca svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--txt-3); pointer-events: none; }
.vd-filtros .vd-busca .entrada { height: 34px; padding-left: 34px; border-radius: 999px; }
.vd-filtro { height: 34px; width: auto; max-width: 220px; padding: 0 30px 0 13px; border-radius: 999px; border: 1px solid var(--linha-forte); background-color: var(--sup); color: var(--txt-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-overflow: ellipsis;
  appearance: none; -webkit-appearance: none; background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235a6877' stroke-width='1.6'/%3E%3C/svg%3E"); }
.vd-filtro:hover { border-color: var(--txt-3); color: var(--txt); }
.vd-filtro:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.vd-filtro.ativo { background-color: var(--zera-suave); border-color: var(--zera); color: var(--zera-txt); }
html[data-theme="dark"] .vd-filtro { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aebac6' stroke-width='1.6'/%3E%3C/svg%3E"); }
.vd-filtros .btn { height: 34px; border-radius: 999px; }
@media (max-width: 767px) {
  .vd-filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .vd-filtros::-webkit-scrollbar { display: none; }
  .vd-filtros > * { flex: none; }
  .vd-filtros .vd-busca { flex: 0 0 200px; min-width: 0; }
}
.vd-cond { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vd-cond .entrada { width: auto; flex: 1 1 130px; min-width: 0; height: 36px; }
.vd-cond .vd-cond-junc { flex: 0 0 64px; }
.vd-cond-onde { flex: 0 0 64px; font-size: 12.5px; font-weight: 600; color: var(--txt-3); }

/* ------------------------------------------------------------------ chips, pílulas e avatares */
.vd-origem { max-width: 100%; }
.vd-origem span { overflow: hidden; text-overflow: ellipsis; }
.vd-pilula-etq { --p-cor: var(--zera); --p-bg: color-mix(in srgb, var(--p-cor) 14%, transparent); --p-txt: color-mix(in srgb, var(--p-cor) 62%, var(--txt)); }
html[data-theme="dark"] .vd-pilula-etq { --p-txt: color-mix(in srgb, var(--p-cor) 72%, white); --p-bg: color-mix(in srgb, var(--p-cor) 20%, transparent); }
.vd-sit-aberto { --p-cor: var(--zera); --p-bg: var(--zera-suave); --p-txt: var(--zera-txt); }
.vd-sit-ganho { --p-cor: var(--ok); --p-bg: var(--ok-bg); --p-txt: var(--ok-forte); }
.vd-sit-perdido { --p-cor: var(--erro); --p-bg: var(--erro-bg); --p-txt: var(--erro-forte); }
.vd-st-novo { --p-cor: var(--info); --p-bg: var(--info-bg); --p-txt: var(--info-forte); }
.vd-st-trabalhando { --p-cor: var(--alerta); --p-bg: var(--alerta-bg); --p-txt: var(--alerta-forte); }
.vd-st-qualificado, .vd-st-convertido { --p-cor: var(--ok); --p-bg: var(--ok-bg); --p-txt: var(--ok-forte); }
.vd-st-descartado { --p-cor: var(--txt-3); --p-bg: var(--afundado); --p-txt: var(--txt-2); }
.vd-quem { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; }
.vd-quem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-quem .avatar { flex: none; font-size: 9.5px; }
.vd-fraco { color: var(--txt-3); }
.vd-num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ quadro (Kanban), o das Demandas do ZeraSync 2 */
.vd-quadro { min-width: 0; }
.vd-quadro .kanban { gap: 14px; padding: 2px 2px 16px; min-height: 380px; align-items: stretch; }
.vd-quadro .kanban-coluna { flex: 0 0 286px; width: 286px; background: var(--afundado); border: 1px solid transparent; border-radius: var(--raio-c); max-height: calc(100vh - var(--topo) - 196px); max-height: calc(100dvh - var(--topo) - 196px); min-height: 300px; }
html[data-theme="dark"] .vd-quadro .kanban-coluna { background: var(--sup-2); border-color: var(--linha); }
.vd-quadro .kanban-coluna::before { height: 4px; background: var(--cor-etapa); }
.vd-quadro .kanban-coluna.alvo { background: var(--zera-suave); border-color: var(--zera); box-shadow: inset 0 0 0 1px var(--zera); }
.vd-quadro .kanban-coluna-topo { position: static; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; padding: 14px 14px 10px; background: transparent; border-bottom: 0; border-radius: 0; }
.vd-quadro .kanban-coluna-topo > .linha-flex { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vd-quadro .kanban-bolinha { width: 9px; height: 9px; border-radius: 2px; box-shadow: none; }
.vd-quadro .kanban-titulo { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-quadro .tag-etapa { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--sup); color: var(--txt-2); border: 0; box-shadow: inset 0 0 0 1px var(--linha); font-size: 12px; font-weight: 700; }
.vd-quadro .kanban-total { font-size: 13px; font-weight: 700; color: var(--txt); }
.vd-col-info { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.vd-col-info svg { flex: none; }
.vd-col-info .kanban-total { margin-right: auto; }
.vd-quadro .kanban-cards { padding: 2px 10px 12px; gap: 8px; }
.vd-quadro .kanban-vazio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 16px; border: 1.5px dashed var(--linha-forte); border-radius: var(--raio-c); color: var(--txt-3); font-size: 13px; font-weight: 600; }
.vd-quadro .kanban-card, .kanban-card-arrastando:has(.vd-cn) { background: none; border: 0; border-left: 0; padding: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 1px 2px rgba(22, 32, 43, 0.07)) drop-shadow(0 2px 6px rgba(22, 32, 43, 0.05)); }
html[data-theme="dark"] .vd-quadro .kanban-card { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.vd-quadro .kanban-card:hover { transform: translateY(-1px); box-shadow: none; border: 0; }
.vd-quadro .kanban-card:hover .vd-cn { border-color: var(--linha-forte); --vd-fio: var(--linha-forte); }
.vd-quadro .kanban-card:focus-visible { outline: none; }
.vd-quadro .kanban-card:focus-visible .vd-cn { border-color: var(--zera); --vd-fio: var(--zera); }
.vd-quadro .kanban-card-salvando { opacity: 0.6; }
.vd-quadro .kanban-card-salvo .vd-cn { border-color: var(--ok); --vd-fio: var(--ok); }
.kanban-card-arrastando:has(.vd-cn) { filter: drop-shadow(0 18px 30px rgba(9, 14, 20, 0.28)); transform: rotate(-1.2deg) scale(1.02); }
.vd-quadro .kanban-placeholder { border: 1.5px dashed var(--zera); border-radius: var(--raio-c); background: var(--zera-suave); }
.vd-quadro .etapa-ganho { --cor-etapa: var(--ok); }
.vd-quadro .etapa-perda { --cor-etapa: var(--erro); }
.vd-col-mais { display: block; padding: 8px 4px 2px; font-size: 12.5px; font-weight: 650; text-align: center; }

.vd-cn { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px 10px; background: var(--sup); border: 1px solid var(--linha); border-radius: var(--raio-c); cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color var(--t-rapido); }
.vd-cn-tit { font-size: 14px; font-weight: 650; line-height: 1.32; color: var(--txt); padding-right: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.vd-cn-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vd-cn-valor { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.vd-cn-l2 .vd-quem { flex: 1; justify-content: flex-end; font-size: 12.5px; color: var(--txt-2); }
.vd-cn-chips { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.vd-cn-chips > .chip { height: 22px; padding: 0 7px; font-size: 11.5px; flex: 0 1 auto; min-width: 0; }
.vd-cn-chips .pilula { flex: 0 1 auto; min-width: 0; }
.vd-cn-chips .pilula .cortar { max-width: 96px; }
.vd-cn-pe { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 22px; }
.vd-cn-pe .espera { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.vd-cn-pe .espera span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-cn-dias { font-size: 11.5px; font-weight: 600; color: var(--txt-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vd-cn-dias.alerta { color: var(--alerta-forte); }
.vd-cn-pe .avatar { margin-left: auto; flex: none; font-size: 9px; }
.vd-cn-acoes { display: flex; gap: 6px; margin-top: 1px; }
.vd-cn-acoes .btn { flex: 1; height: 28px; font-size: 12px; }
.vd-cn.ganho { border-color: color-mix(in srgb, var(--ok) 40%, var(--linha)); }
.vd-cn.perdido .vd-cn-valor { color: var(--txt-3); text-decoration: line-through; }
@media (hover: hover) and (pointer: fine) {
  .vd-cn-acoes { max-height: 0; opacity: 0; overflow: hidden; margin-top: -7px; transition: max-height var(--t-estado), opacity var(--t-estado), margin var(--t-estado); }
  .kanban-card:hover .vd-cn-acoes, .kanban-card:focus-within .vd-cn-acoes { max-height: 36px; opacity: 1; margin-top: 1px; }
}
.vd-quadro-esq { display: flex; gap: 14px; overflow: hidden; }
.vd-quadro-esq > div { flex: 0 0 286px; display: flex; flex-direction: column; gap: 8px; padding: 14px 10px; border-radius: var(--raio-c); background: var(--afundado); }
@media (max-width: 767px) {
  .vd-quadro .kanban { margin: 0 -16px; padding: 2px 16px 16px; scroll-snap-type: x mandatory; }
  .vd-quadro .kanban-coluna { flex-basis: min(286px, calc(100vw - 56px)); width: min(286px, calc(100vw - 56px)); scroll-snap-align: start; }
}

/* ------------------------------------------------------------------ tabela densa */
.vd-tabela .tabela-wrap { background: var(--sup); border: 1px solid var(--linha); border-radius: var(--raio-c); box-shadow: var(--sombra-1); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vd-tabela .tabela { min-width: 720px; font-size: 13.5px; }
.vd-tabela .tabela th:first-child { border-top-left-radius: var(--raio-c); }
.vd-tabela .tabela th:last-child { border-top-right-radius: var(--raio-c); }
.vd-tabela .tabela td { padding: 9px 12px; white-space: nowrap; }
.vd-tabela .tabela tbody tr:last-child td { border-bottom: 0; }
.vd-tabela .tabela td .vd-quem span, .vd-tabela .tabela td .vd-cel span { max-width: 240px; }
.vd-tabela .tabela tr.selecionada td { background: var(--zera-suave); }
.vd-tabela .tabela tr.vd-frio td:first-child { box-shadow: inset 3px 0 0 var(--alerta); }
.vd-tabela .tabela tr.vd-frio { background: color-mix(in srgb, var(--alerta) 5%, transparent); }
.vd-tabela .vazio { background: var(--sup); }
.vd-cel { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.vd-cel b { font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; }
.vd-cel small { font-size: 12px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; }
.vd-cel-pessoa { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vd-cel-pessoa .avatar { flex: none; }
.vd-frio-txt { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; color: var(--alerta-forte); }
.vd-tabela .tabela-acoes-lote { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: var(--zera-suave); color: var(--zera-txt); }
.vd-tabela .paginacao { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 2px 0; font-size: 13px; color: var(--txt-3); font-variant-numeric: tabular-nums; }
.vd-acoes-linha { display: flex; align-items: center; gap: 6px; }
.vd-tabela .celula-editavel { border-bottom: 1px dashed var(--linha-forte); cursor: text; }

/* ------------------------------------------------------------------ detalhe (negócio, pessoa, empresa) */
.vd-det { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.vd-det-lado { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vd-det-centro { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1100px) { .vd-det { grid-template-columns: minmax(0, 1fr); } }
.vd-det-cab { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.vd-det-id { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vd-det-tit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vd-det-tit h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.018em; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.vd-det-tit .entrada { font-size: 18px; font-weight: 650; height: 40px; }
.vd-det-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--txt-2); }
.vd-det-valor { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--txt); }
.vd-det-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vd-btn-ganhar { --b-bg: var(--ok); --b-hover: var(--ok-forte); --b-borda: transparent; --b-txt: #fff; }
.vd-avatar-g { flex: none; }
.vd-det-pessoa { display: flex; align-items: center; gap: 14px; min-width: 0; }

.vd-trilha { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.vd-trilha::-webkit-scrollbar { display: none; }
.vd-trilha button { flex: 1 0 auto; min-width: 104px; max-width: 220px; height: 36px; padding: 0 16px 0 18px; border: 0; background: var(--afundado); color: var(--txt-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); transition: background var(--t-rapido), color var(--t-rapido); }
.vd-trilha button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 10px 0 0 10px; padding-left: 14px; }
.vd-trilha button:hover { background: var(--ativo); color: var(--txt); }
.vd-trilha button.feita { background: var(--zera-suave); color: var(--zera-txt); }
.vd-trilha button.atual { background: var(--zera-forte); color: #fff; }
.vd-trilha button:focus-visible { outline: none; background: var(--zera-brilho); color: var(--txt); }

.vd-pares { display: flex; flex-direction: column; }
.vd-par { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--linha); font-size: 13px; min-width: 0; }
.vd-par:first-child { border-top: 0; }
.vd-par > span:first-child { color: var(--txt-3); font-weight: 600; font-size: 12.5px; }
.vd-par > .vd-par-v { min-width: 0; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.vd-par > .vd-par-v > a, .vd-par > .vd-par-v > span { min-width: 0; }
.vd-par .botao-icone { width: 26px; height: 26px; margin-left: auto; flex: none; }
.vd-editavel { cursor: pointer; border-bottom: 1px dashed var(--linha-forte); }
.vd-editavel:hover { color: var(--zera-txt); border-bottom-color: var(--zera); }

.vd-abas-cab { padding: 10px 12px 0; border-bottom: 1px solid var(--linha); overflow-x: auto; scrollbar-width: none; }
.vd-abas-cab::-webkit-scrollbar { display: none; }
.vd-abas-cab .abas-linha { border-bottom: 0; gap: 16px; }
.vd-abas-cab .aba { gap: 6px; white-space: nowrap; }
.vd-painel-aba { padding: 14px 16px 16px; min-width: 0; }
.vd-compositor { display: flex; flex-direction: column; gap: 8px; }
.vd-compositor textarea { min-height: 74px; }
.vd-compositor-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vd-compositor-acoes .cresce { flex: 1; }

.vd-tl { display: flex; flex-direction: column; }
.vd-tl-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; }
.vd-tl-item::before { content: ""; position: absolute; left: 14.5px; top: 30px; bottom: 0; width: 1px; background: var(--linha); }
.vd-tl-item:last-child::before { display: none; }
.vd-tl-ic { width: 30px; height: 30px; display: grid; place-items: center; background: var(--afundado); color: var(--txt-2); border-radius: 8px; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 11px, 100% 100%, 0 100%); }
.vd-tl-ic.nota { background: var(--nota-bg); color: var(--nota-txt); }
.vd-tl-ic.etapa { background: var(--zera-suave); color: var(--zera-txt); }
.vd-tl-ic.conversao { background: var(--ok-bg); color: var(--ok-forte); }
.vd-tl-corpo { min-width: 0; padding-top: 2px; }
.vd-tl-topo { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--txt-3); }
.vd-tl-topo b { color: var(--txt); font-size: 13px; font-weight: 650; }
.vd-tl-texto { font-size: 13.5px; color: var(--txt); margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }
.vd-tl-desc { font-size: 12.5px; color: var(--txt-2); margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }

.vd-nota-card { padding: 10px 12px; border-radius: 10px; background: var(--nota-bg); color: var(--nota-txt); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vd-nota-card + .vd-nota-card { margin-top: 8px; }
.vd-nota-card small { display: block; margin-top: 6px; font-size: 12px; opacity: 0.8; white-space: normal; }

.vd-itens { display: flex; flex-direction: column; }
.vd-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linha); font-size: 13.5px; }
.vd-item:first-child { border-top: 0; }
.vd-item .cresce { min-width: 0; }
.vd-item b { font-variant-numeric: tabular-nums; }

.vd-proximo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--afundado); }
.vd-proximo.atrasado { background: var(--erro-bg); color: var(--erro-forte); }
.vd-proximo.vazio { background: var(--alerta-bg); color: var(--alerta-forte); }
.vd-proximo .cresce { min-width: 0; display: flex; flex-direction: column; }
.vd-proximo b { font-size: 13.5px; }
.vd-proximo small { font-size: 12px; }

.vd-conv-item { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; border-top: 1px solid var(--linha); }
.vd-conv-item:first-child { border-top: 0; padding-top: 0; }
.vd-conv-item .vd-conv-l1 { display: flex; align-items: center; gap: 8px; }
.vd-conv-item .vd-conv-l1 b { font-size: 13.5px; }
.vd-conv-item .vd-conv-l1 .pilula { margin-left: auto; }
.vd-conv-erro { font-size: 12.5px; color: var(--erro-forte); }

.vd-ligado { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linha); text-decoration: none; color: var(--txt); min-width: 0; }
.vd-ligado:first-child { border-top: 0; }
.vd-ligado:hover { text-decoration: none; }
.vd-ligado:hover b { text-decoration: underline; }
.vd-ligado .cresce { min-width: 0; display: flex; flex-direction: column; }
.vd-ligado b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ligado small { font-size: 12px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ligado strong { font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }

.vd-jornada { display: flex; flex-direction: column; }
.vd-jor { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 12px; }
.vd-jor::before { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--linha); }
.vd-jor:last-child::before { display: none; }
.vd-jor-ponto { width: 10px; height: 10px; margin: 4px 0 0 4px; background: var(--zera); }
.vd-jor:first-child .vd-jor-ponto { background: var(--ok); }
.vd-jor b { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; }
.vd-jor small { display: block; font-size: 12px; color: var(--txt-3); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ gaveta do lead */
.vd-gav { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.vd-gav-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vd-gav-id .cresce { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vd-gav-id b { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.vd-gav-id small { font-size: 13px; color: var(--txt-3); overflow-wrap: anywhere; }
.vd-gav-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vd-gav-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.vd-gav-tit { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 4px; }
.vd-gav-msg { padding: 10px 12px; border-radius: 10px; background: var(--afundado); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ atividades e agenda */
.vd-grupos { display: flex; flex-direction: column; gap: 16px; }
.vd-grupo .vd-sec-cab h2 { display: flex; align-items: center; gap: 8px; }
.vd-grupo.atrasadas { border-color: color-mix(in srgb, var(--erro) 35%, var(--linha)); }
.vd-grupo.atrasadas .vd-sec-cab h2 { color: var(--erro-forte); }
.vd-ativ { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linha); min-width: 0; }
.vd-ativ:first-child { border-top: 0; }
.vd-ativ > input[type="checkbox"] { flex: none; width: 18px; height: 18px; }
.vd-ativ-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; background: var(--zera-suave); color: var(--zera-txt); border-radius: 8px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 10px, 100% 100%, 0 100%); }
.vd-ativ-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; padding: 0; text-align: left; color: var(--txt); font: inherit; cursor: pointer; }
.vd-ativ-txt b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ativ-txt small { font-size: 12px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ativ-txt:hover b { text-decoration: underline; }
.vd-ativ.feita .vd-ativ-txt b { text-decoration: line-through; color: var(--txt-3); }
.vd-ativ .espera { flex: none; }
.vd-ativ .btn-icone, .vd-ativ .botao-icone { flex: none; }
@media (max-width: 560px) { .vd-ativ { flex-wrap: wrap; } .vd-ativ .espera { margin-left: 28px; } }

.vd-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.vd-dia { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 180px; padding: 10px 8px; border-radius: var(--raio-c); background: var(--afundado); }
html[data-theme="dark"] .vd-dia { background: var(--sup-2); }
.vd-dia.hoje { background: var(--zera-suave); box-shadow: inset 0 0 0 1px var(--zera); }
.vd-dia-cab { display: flex; align-items: baseline; gap: 6px; padding: 0 4px 4px; font-size: 12px; font-weight: 700; color: var(--txt-3); text-transform: capitalize; }
.vd-dia-cab b { font-size: 18px; color: var(--txt); font-variant-numeric: tabular-nums; }
.vd-dia.hoje .vd-dia-cab b { color: var(--zera-txt); }
.vd-dia-vazio { font-size: 12px; color: var(--txt-3); padding: 0 4px; }
.vd-ev { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; background: var(--sup); border: 1px solid var(--linha); border-radius: 10px; text-align: left; font: inherit; color: var(--txt); cursor: pointer; min-width: 0; border-left: 3px solid var(--zera); }
.vd-ev:hover { border-color: var(--linha-forte); border-left-color: var(--zera-forte); }
.vd-ev b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ev small { font-size: 11.5px; color: var(--txt-3); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-ev.feita { opacity: 0.6; border-left-color: var(--ok); }
.vd-ev.feita b { text-decoration: line-through; }
.vd-ev.atrasada { border-left-color: var(--erro); }
@media (max-width: 1023px) {
  .vd-semana { grid-template-columns: minmax(0, 1fr); }
  .vd-dia { min-height: 0; }
  .vd-dia-cab b { font-size: 15px; }
}

/* ------------------------------------------------------------------ editor de atividade (modal) */
.vd-form { display: flex; flex-direction: column; gap: 14px; }
.vd-form .campo { margin-bottom: 0 !important; }
.vd-form-l2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vd-form-l3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .vd-form-l2, .vd-form-l3 { grid-template-columns: minmax(0, 1fr); } }
.vd-form .erro-msg { font-size: 12px; color: var(--erro-forte); font-weight: 500; }
.vd-form .invalido { border-color: var(--erro) !important; }
.vd-avulso { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 640px) { .vd-avulso { grid-template-columns: minmax(0, 1fr); } }
.vd-part { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--linha); min-width: 0; }
.vd-part:first-child { border-top: 0; }
.vd-part .cresce { min-width: 0; display: flex; flex-direction: column; }
.vd-part .cresce b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-part .cresce small { font-size: 12px; color: var(--txt-3); }
.vd-part .entrada { width: auto; height: 32px; flex: none; }
.vd-part-marca { width: 8px; height: 8px; flex: none; background: var(--ia); }
.vd-part-marca.interno { background: var(--zera); }

/* ------------------------------------------------------------------ reuniões do negócio */
.vd-reu { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); min-width: 0; }
.vd-reu:first-child { border-top: 0; }
.vd-reu .cresce { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vd-reu-tit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vd-reu-tit b { font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.vd-reu-meta { font-size: 12px; color: var(--txt-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vd-reu-acoes { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.vd-reu.atrasada .vd-ativ-ic { background: var(--erro-bg); color: var(--erro-forte); }
.vd-reu.feita .vd-ativ-ic { background: var(--ok-bg); color: var(--ok-forte); }
.vd-parts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.vd-parts .chip { height: 22px; font-size: 11.5px; }
@media (max-width: 560px) { .vd-reu { flex-wrap: wrap; } .vd-reu-acoes { width: 100%; padding-left: 38px; } }
