/* Quadrify CRM — visual (paleta Quadrify: índigo #2a1e78, violeta #6c4cf2, fundo #eff1f6) */
:root {
  --ink: #2a1e78; --ink-2: #4a4590; --texto: #1d1b3a; --muted: #6c6f8f; --muted-2: #9a9cb6;
  --violet: #6c4cf2; --violet-2: #8c7bff; --violet-claro: #efebff; --violet-borda: #d9d1ff;
  --blue: #2f64cc; --verde: #13996e; --verde-claro: #e3f6ee; --verm: #d64545; --verm-claro: #fdeceb; --amar: #c98a0b; --amar-claro: #fff6e0;
  --bg: #f4f5fa; --bg-2: #eff1f6; --card: #fff; --line: #e3e5ef; --line-2: #eceef5;
  --lat: #1d1557; --lat-2: #2a1e78;
  --r: 10px; --r-g: 14px;
  --sombra: 0 1px 2px rgba(29, 21, 87, .06), 0 1px 1px rgba(29, 21, 87, .04);
  --sombra-2: 0 10px 30px rgba(29, 21, 87, .14), 0 2px 6px rgba(29, 21, 87, .06);
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titulo: 'Raleway', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--fonte); font-size: 14px; color: var(--texto); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.suave { color: var(--muted); }
.verm { color: var(--verm); } .verde { color: var(--verde); } .amar { color: var(--amar); font-size: 13px; }
.maiusc { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; font-size: 11px; color: var(--ink-2); }
.link { color: var(--violet); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
code { background: var(--bg-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; color: var(--ink); }
[hidden] { display: none !important; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13.5px; color: var(--texto); white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: #f7f7fc; border-color: #cfd2e3; }
.btn .ic { width: 16px; height: 16px; }
.btn.prim { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.prim:hover { background: #5b3be0; }
.btn.prim.perigo { background: var(--verm); border-color: var(--verm); }
.btn.prim-suave { background: var(--violet-claro); border-color: var(--violet-borda); color: var(--violet); }
.btn.ganho { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.ganho:hover { background: #0e855f; }
.btn.perdido { background: var(--verm); border-color: var(--verm); color: #fff; }
.btn.perdido:hover { background: #bf3434; }
.btn.perigo-txt { color: var(--verm); }
.btn.peq { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.grande { height: 44px; font-size: 15px; justify-content: center; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); }
.btn-ic:hover { background: var(--bg-2); color: var(--ink); }
.btn-ic.peq { width: 26px; height: 26px; } .btn-ic.peq .ic { width: 15px; height: 15px; }
.btn-ic.redondo { border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn-ic.perigo:hover { color: var(--verm); background: var(--verm-claro); }
.linha { display: flex; gap: 8px; align-items: center; }
.linha.quebra { flex-wrap: wrap; }

/* ---------- Avatar, chips ---------- */
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; flex: none; }
.av.p { width: 24px; height: 24px; font-size: 10px; }
.av.g { width: 40px; height: 40px; font-size: 14px; }
.av-vazio { background: #d6d8e6; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.ganho { background: var(--verde-claro); color: var(--verde); }
.chip.perdido { background: var(--verm-claro); color: var(--verm); }
.chip.alerta { background: var(--amar-claro); color: var(--amar); }
.chip.grande { padding: 6px 12px; font-size: 13px; } .chip .ic { width: 15px; height: 15px; }
.temp { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.temp.quente { background: #fde8e1; color: #c2410c; } .temp.morno { background: var(--amar-claro); color: var(--amar); } .temp.frio { background: #e6effc; color: var(--blue); }

/* ---------- Casca ---------- */
#app { height: 100%; }
#app:has(.lateral) { display: grid; grid-template-columns: 232px 1fr; }
.lateral { background: linear-gradient(180deg, var(--lat) 0%, #241a6b 100%); color: #e6e3ff; display: flex; flex-direction: column; padding: 14px 10px; height: 100vh; position: sticky; top: 0; }
.lat-logo { display: flex; align-items: center; gap: 10px; padding: 8px 10px 20px; }
.lat-logo .logo { height: 24px; width: auto; }
.logo-ic { display: none; width: 30px; height: 30px; }
.lat-logo span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; background: rgba(255, 255, 255, .12); padding: 2px 6px; border-radius: 5px; color: #cfc7ff; }
.lateral nav { display: flex; flex-direction: column; gap: 2px; }
.lateral nav a, .lat-pe > a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-weight: 600; font-size: 14px; color: #dcd8fb; transition: background .15s; }
.lateral nav a:hover, .lat-pe > a:hover { background: rgba(255, 255, 255, .07); }
.lateral nav a.ativo, .lat-pe > a.ativo { background: var(--violet); color: #fff; box-shadow: 0 4px 14px rgba(108, 76, 242, .45); }
.lateral nav a .ic { width: 19px; height: 19px; }
.badge { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e5484d; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.badge.suave { background: rgba(255, 255, 255, .16); color: #e6e3ff; }
.lateral nav a.ativo .badge.suave { background: rgba(255, 255, 255, .25); }
.lat-pe { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.lat-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-align: left; color: #fff; }
.lat-user:hover { background: rgba(255, 255, 255, .07); }
.lat-user span { display: flex; flex-direction: column; min-width: 0; }
.lat-user b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lat-user small { font-size: 11.5px; color: #b8b1ec; }

.principal { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topo { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.topo h1 { font-family: var(--titulo); font-size: 17px; font-weight: 700; color: var(--ink); min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-global { position: relative; display: flex; align-items: center; gap: 8px; width: min(380px, 40vw); height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); }
.busca-global:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-claro); }
.busca-global input { flex: 1; border: 0; outline: 0; background: none; min-width: 0; color: var(--texto); }
.busca-global kbd { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted-2); font-family: var(--fonte); }
.busca-res { display: none; position: absolute; top: 44px; left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: var(--sombra-2); padding: 8px; z-index: 30; max-height: 70vh; overflow: auto; }
.busca-res.aberta { display: block; }
.busca-res p { padding: 10px; }
.br-grupo small { display: block; padding: 6px 10px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); letter-spacing: .04em; }
.br-grupo a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--texto); }
.br-grupo a:hover { background: var(--bg-2); }
.br-grupo a span { display: flex; flex-direction: column; }
.br-grupo em { font-style: normal; font-size: 12px; color: var(--muted); }
.topo-av { cursor: pointer; }
#tela { flex: 1; overflow: auto; padding: 20px 24px 40px; }
#tela.tela-inicio { padding: 0 0 48px; }
#tela.tela-negocios:has(.kanban) { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.baixo, .fab { display: none; }

/* ---------- Barra de ferramentas ---------- */
.barra-ferr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.filtro { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 28px 0 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236c6f8f' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-size: 13px; font-weight: 500; }
.busca-local { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); }
.busca-local input { border: 0; outline: 0; width: 130px; background: none; font-size: 13px; color: var(--texto); }
.busca-local .ic { width: 15px; height: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { display: grid; place-items: center; width: 36px; height: 32px; color: var(--muted); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.ativo { background: var(--violet-claro); color: var(--violet); }
.abas-chip { display: flex; gap: 4px; background: var(--bg-2); padding: 3px; border-radius: 9px; flex-wrap: wrap; }
.abas-chip > * { padding: 5px 11px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.abas-chip > .ativo { background: #fff; color: var(--ink); box-shadow: var(--sombra); }
.abas-chip em { font-style: normal; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.abas-chip .alerta em { color: var(--verm); }
.abas-chip.peq > * { padding: 3px 9px; font-size: 12px; }
.intro { color: var(--muted); font-size: 13px; margin: -4px 0 14px; }
.intro .ic { width: 16px; height: 16px; color: var(--violet); vertical-align: -3px; margin-right: 4px; }

/* ---------- Início ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 34px max(28px, calc((100% - 1080px) / 2)) 30px; background: linear-gradient(115deg, #f1eeff 0%, #ebe8fb 55%, #e3defb 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -60px; width: 420px; height: 420px; background: rgba(255, 255, 255, .35); transform: rotate(35deg); }
.hero-txt { max-width: 520px; position: relative; z-index: 1; }
.hero h1 { font-family: var(--titulo); font-weight: 600; font-size: 28px; line-height: 1.3; color: var(--texto); letter-spacing: -.01em; }
.hero h1 em, .hero p em { font-style: normal; color: var(--violet); }
.hero p { margin: 12px 0 22px; font-size: 15px; color: #3b3a5c; }
.barra-meta { position: relative; height: 8px; background: rgba(42, 30, 120, .12); border-radius: 99px; }
.barra-meta i { position: absolute; inset: 0 auto 0 0; background: var(--violet); border-radius: 99px; }
.marca-min { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); opacity: .35; border-radius: 2px; }
.hero small { display: block; text-align: right; margin-top: 8px; }
.hero-arte { width: 280px; position: relative; z-index: 1; flex: none; }
.hero-arte svg { width: 100%; height: auto; display: block; }
.conteudo.estreito { max-width: 1080px; margin: 0 auto; padding: 26px 28px 0; display: flex; flex-direction: column; gap: 22px; }
.sec-tit { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.sec-tit h2 { font-family: var(--titulo); font-size: 16px; font-weight: 700; color: var(--ink); }
.painel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); padding: 18px 20px; box-shadow: var(--sombra); min-width: 0; }
.duas-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.duas-col + .painel, .painel + .duas-col, .kpis + .duas-col, .duas-col + .duas-col { margin-top: 20px; }
.tela-insights .painel + .painel { margin-top: 20px; }

.guia .sec-tit { margin-bottom: 10px; }
.guia-grupo { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); margin-bottom: 10px; box-shadow: var(--sombra); overflow: hidden; }
.guia-cab { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; text-align: left; font-size: 14.5px; }
.guia-cab b { flex: 1; font-weight: 600; }
.guia-cab .suave { font-size: 13.5px; }
.bolinha { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #d4d6e3; display: grid; place-items: center; }
.completo .bolinha { background: var(--violet); border-color: var(--violet); color: #fff; }
.bolinha .ic { width: 12px; height: 12px; stroke-width: 3; }
.mini-barra { display: block; width: 68px; height: 6px; background: var(--line-2); border-radius: 9px; overflow: hidden; }
.mini-barra i { display: block; height: 100%; background: var(--violet); border-radius: 9px; }
.guia-item { display: flex; gap: 14px; padding: 16px 18px 18px; border-top: 1px solid var(--line-2); }
.guia-ic { color: var(--muted); padding-top: 2px; }
.guia-item.feito .guia-ic { color: var(--verde); }
.guia-item h4 { font-size: 14.5px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.guia-item.feito h4 { text-decoration: line-through; color: var(--muted); }
.guia-item p { color: #4b4d6b; font-size: 13.5px; margin: 3px 0 10px; }
.guia-item.feito p { margin-bottom: 0; color: var(--muted-2); }
.tempo { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; background: var(--bg-2); border-radius: 99px; padding: 1px 7px; color: var(--ink-2); }
.tempo .ic { width: 11px; height: 11px; }

.lista-ativ { display: flex; flex-direction: column; }
.linha-ativ { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.linha-ativ:last-child { border-bottom: 0; }
.caixa { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid #c6c8da; display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.caixa:hover { border-color: var(--verde); color: var(--verde); }
.caixa.marcada { background: var(--verde); border-color: var(--verde); color: #fff; }
.caixa .ic { width: 12px; height: 12px; stroke-width: 3; }
.tipo-ic { color: var(--muted); display: grid; } .tipo-ic .ic { width: 16px; height: 16px; }
.la-txt { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; }
.la-txt b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-txt:hover b { color: var(--violet); }
.linha-ativ.feita .la-txt b { text-decoration: line-through; color: var(--muted); }
.la-data { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.la-data.atrasada { color: var(--verm); } .la-data.hoje { color: var(--verde); }
.cartao-branco { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 2px 12px; }
.cartao-branco.grande .linha-ativ { padding: 11px 4px; }
.dia-tit { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; }
.dia-tit:first-of-type { margin-top: 0; }

.lista-atencao { display: flex; flex-direction: column; }
.linha-atencao { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.linha-atencao:last-child { border-bottom: 0; }
.linha-atencao div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.linha-atencao b { font-weight: 600; font-size: 13.5px; }
.linha-atencao small { font-size: 12px; color: var(--muted); }
.linha-atencao:hover b { color: var(--violet); }

.funil-linha { display: flex; align-items: stretch; gap: 6px; }
.funil-passo { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid transparent; }
.funil-passo.gargalo { border-color: #f3c9a5; background: #fff7ef; }
.funil-passo small { font-size: 12px; font-weight: 600; color: var(--muted); }
.funil-passo b { font-family: var(--titulo); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.funil-passo .suave { font-size: 12px; }
.funil-passo .mini-barra { width: 100%; margin-top: 6px; }
.seta { display: grid; place-items: center; color: var(--muted-2); }
.nota-funil { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; color: #3b3a5c; background: var(--violet-claro); border-radius: 9px; padding: 10px 12px; }
.nota-funil .ic { color: var(--violet); width: 17px; height: 17px; margin-top: 1px; }

.vazio { text-align: center; padding: 34px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vazio > .ic { width: 34px; height: 34px; color: var(--violet-2); margin-bottom: 4px; }
.vazio h3 { font-family: var(--titulo); color: var(--ink); font-size: 16px; }
.vazio p { max-width: 380px; font-size: 13.5px; margin-bottom: 8px; }

/* ---------- Kanban ---------- */
.resumo-funil { font-size: 13px; margin: -6px 0 10px; }
.kanban { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 0; overflow-x: auto; min-height: 0; margin: 0 -24px; padding: 0 24px; border-top: 1px solid var(--line); background: #fbfbfe; }
.coluna { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line-2); transition: background .15s; }
.coluna:first-child { border-left: 1px solid var(--line-2); }
.coluna.sobre { background: var(--violet-claro); }
.coluna header { position: relative; padding: 12px 22px 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.coluna h3 { font-size: 14px; font-weight: 700; color: var(--texto); }
.coluna header small { font-size: 12px; color: var(--muted); }
.seta-col { position: absolute; right: -8px; top: 0; bottom: 0; width: 16px; z-index: 1; background: #fff; clip-path: polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%); border-right: 0; }
.seta-col::before { content: ""; position: absolute; inset: 0; background: var(--line); clip-path: polygon(50% 0, 56% 0, 100% 50%, 56% 100%, 50% 100%, 94% 50%); }
.coluna:last-child .seta-col { display: none; }
.cartoes { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cartao { display: flex; flex-direction: column; gap: 1px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px 8px; box-shadow: var(--sombra); cursor: grab; transition: box-shadow .15s, transform .15s; position: relative; }
.cartao:hover { box-shadow: var(--sombra-2); border-color: #d6d2f0; }
.cartao.arrastando { opacity: .45; transform: rotate(2deg); }
.cartao b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cartao small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cartao .meta { color: var(--muted-2); }
.cartao.parado { border-left: 3px solid var(--verm); }
.cartao-pe { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.valor { font-weight: 700; font-size: 13px; color: var(--texto); }
.valor em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tag-parado { font-size: 11px; font-weight: 700; color: var(--verm); background: var(--verm-claro); padding: 0 6px; border-radius: 6px; }
.ativ-ind { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid; }
.ativ-ind .ic { width: 13px; height: 13px; }
.ativ-ind.futura { color: #6b6e88; border-color: #c9cbda; }
.ativ-ind.hoje { color: #fff; background: var(--verde); border-color: var(--verde); }
.ativ-ind.atrasada { color: #fff; background: var(--verm); border-color: var(--verm); }
.ativ-ind.nenhuma { color: var(--amar); border-color: #f0cf7e; background: var(--amar-claro); }
.ativ-ind:hover { transform: scale(1.1); }
.linha-atencao .ativ-ind { margin-left: 0; }
.add-col { border: 1px dashed transparent; border-radius: 8px; height: 34px; color: var(--muted-2); display: grid; place-items: center; }
.coluna:hover .add-col { border-color: #d6d8e6; }
.add-col:hover { color: var(--violet); border-color: var(--violet-borda) !important; background: #fff; }
.zonas-fim { position: fixed; left: 232px; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; transform: translateY(100%); transition: transform .2s; z-index: 20; }
.arrastando-neg .zonas-fim { transform: none; }
.zona { height: 74px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; color: #fff; }
.zona.perdido { background: #e06666; } .zona.ganho { background: #2bb37f; }
.zona.sobre { filter: brightness(.9); }
.zona .ic { width: 20px; height: 20px; }

/* ---------- Tabelas ---------- */
.tabela-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); overflow: auto; box-shadow: var(--sombra); }
.painel .tabela-wrap { box-shadow: none; border-radius: var(--r); }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: #fafafd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 13.5px; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr[data-href] { cursor: pointer; }
.tabela tbody tr:hover td { background: #fafaff; }
.tabela td b { font-weight: 600; }
.tabela td small { display: block; font-size: 12px; color: var(--muted); }
.tabela td.acoes { text-align: right; white-space: nowrap; }
.tabela td.acoes > * { vertical-align: middle; }
.tabela.num td:not(:first-child), .tabela.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tabela.num td .av { margin-left: -4px; border: 2px solid #fff; }
.tabela.precos td { min-width: 130px; }
.din { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; height: 32px; color: var(--muted); font-size: 12.5px; }
.din input { border: 0; outline: 0; width: 70px; font-weight: 600; color: var(--texto); background: none; }
.din:focus-within { border-color: var(--violet); }
.tabela.precos small { display: block; margin-top: 3px; }

/* ---------- Detalhe ---------- */
.det-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.voltar { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.voltar:hover { color: var(--violet); } .voltar .ic { width: 15px; height: 15px; }
.det-tit h1 { font-family: var(--titulo); font-size: 23px; font-weight: 700; color: var(--texto); display: flex; align-items: center; gap: 10px; }
.det-sub { margin-top: 4px; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.det-sub a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 500; }
.det-sub a:hover { color: var(--violet); }
.det-sub a .ic { width: 14px; height: 14px; }
.det-sub .valor { font-size: 14px; color: var(--texto); }
.det-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dono { display: flex; align-items: center; gap: 8px; margin-right: 6px; font-size: 13px; font-weight: 600; }
.dono span { display: flex; flex-direction: column; line-height: 1.2; }
.dono small { font-size: 11px; color: var(--muted); font-weight: 500; }
.etapas { display: flex; margin-bottom: 20px; gap: 3px; }
.etapas button { flex: 1; position: relative; height: 34px; background: #e7e8f1; color: var(--muted); font-size: 12.5px; font-weight: 600; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); padding: 0 14px 0 18px; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; transition: background .15s; }
.etapas button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 7px 0 0 7px; }
.etapas button:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 7px 7px 0; }
.etapas button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etapas button small { font-size: 11px; opacity: .85; font-weight: 500; white-space: nowrap; }
.etapas button.passou { background: #bfb2fb; color: #fff; }
.etapas button.atual { background: var(--violet); color: #fff; }
.etapas button:hover:not(.atual) { background: #d5cdfc; color: var(--ink); }
.etapas.fechado button.passou, .etapas.fechado button.atual { background: #b9bccd; }
.det-corpo { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.det-lado { display: flex; flex-direction: column; gap: 14px; }
.caixa-info { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); padding: 14px 16px; box-shadow: var(--sombra); }
.caixa-info h3 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.caixa-info h3 .ic { width: 15px; height: 15px; }
.caixa-info.destaque { background: linear-gradient(180deg, #faf8ff, #fff); border-color: var(--violet-borda); }
.caixa-info.destaque h3 { justify-content: flex-start; }
.caixa-info.destaque h3 .suave { margin-left: auto; }
.caixa-info p { font-size: 13px; margin-top: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; }
.kv span { color: var(--muted); flex: none; }
.kv b { font-weight: 600; text-align: right; }
.kv b a { color: var(--violet); }
.obs { white-space: pre-wrap; color: #4b4d6b; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.pessoa-mini { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.pessoa-mini span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pessoa-mini b { font-size: 13.5px; font-weight: 600; } .pessoa-mini small { font-size: 12px; color: var(--muted); }
a.pessoa-mini:hover b { color: var(--violet); }
.contato-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.neg-mini { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.neg-mini:last-of-type { border-bottom: 0; }
.neg-mini b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neg-mini:hover b { color: var(--violet); }
.det-principal { min-width: 0; }
.compositor { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); box-shadow: var(--sombra); margin-bottom: 18px; overflow: hidden; }
.abas-comp { display: flex; border-bottom: 1px solid var(--line); background: #fafafd; }
.abas-comp button { display: flex; align-items: center; gap: 6px; padding: 11px 16px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.abas-comp button .ic { width: 15px; height: 15px; }
.abas-comp button.ativo { color: var(--violet); border-bottom-color: var(--violet); background: #fff; }
.compositor textarea { display: block; width: 100%; border: 0; outline: 0; padding: 14px 16px; resize: vertical; min-height: 80px; background: #fffef6; }
.comp-pe { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 12px; }
.atalhos-ativ { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
h3.sub { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.hist-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.hist-cab h3.sub { margin: 0; }
.tempo-linha { list-style: none; position: relative; padding-left: 4px; }
.tempo-linha::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tempo-linha li { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.tl-ic { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: none; z-index: 1; }
.tl-ic .ic { width: 14px; height: 14px; }
.tempo-linha li > div { flex: 1; min-width: 0; font-size: 13.5px; padding-top: 4px; }
.tempo-linha small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.tempo-linha small a { color: var(--muted); text-decoration: underline; }
.tempo-linha li.nota > div { background: #fffbe8; border: 1px solid #f4e7b4; border-radius: 10px; padding: 10px 12px; }
.tempo-linha li.nota .tl-ic { background: #fff4c2; border-color: #f0dc8a; color: #8a6d00; }
.tempo-linha li.ganho .tl-ic { background: var(--verde-claro); border-color: #a9e2cb; color: var(--verde); }
.tempo-linha li.perdido .tl-ic { background: var(--verm-claro); border-color: #f4b9b9; color: var(--verm); }
.nota-txt { white-space: normal; color: #3d3c57; margin-top: 3px; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; }
.aviso .ic { flex: none; margin-top: 1px; }
.aviso.amarelo { background: var(--amar-claro); color: #6b4b00; } .aviso.amarelo .ic { color: var(--amar); }
.aviso.alerta { background: var(--verm-claro); color: #7a2323; } .aviso.alerta .ic { color: var(--verm); }
.aviso.azul { background: #e8f0fd; color: #1e3f7d; } .aviso.azul .ic { color: var(--blue); }
.aviso a { font-weight: 700; text-decoration: underline; }

/* ---------- Calendário ---------- */
.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.cal-nav b { margin-left: 8px; font-family: var(--titulo); font-size: 15px; color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); overflow: hidden; min-height: 460px; box-shadow: var(--sombra); }
.cal-dia { border-right: 1px solid var(--line-2); padding: 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal-dia:last-child { border-right: 0; }
.cal-dia header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cal-dia header small { font-size: 11.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cal-dia header b { font-family: var(--titulo); font-size: 18px; color: var(--texto); }
.cal-dia header .btn-ic { margin-left: auto; opacity: 0; }
.cal-dia:hover header .btn-ic { opacity: 1; }
.cal-dia.hoje { background: #faf8ff; }
.cal-dia.hoje header b { color: #fff; background: var(--violet); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px; }
.cal-ev { display: flex; align-items: flex-start; gap: 5px; text-align: left; font-size: 12px; padding: 5px 7px; border-radius: 6px; background: var(--violet-claro); color: var(--ink); border-left: 3px solid var(--violet); }
.cal-ev .ic { width: 13px; height: 13px; margin-top: 1px; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-ev em { font-style: normal; font-weight: 700; }
.cal-ev.atrasada { background: var(--verm-claro); border-left-color: var(--verm); }
.cal-ev.feita { background: #f1f2f6; border-left-color: #b9bccd; color: var(--muted); text-decoration: line-through; }

/* ---------- Insights ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); padding: 16px 18px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 4px; }
.kpi small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi b { font-family: var(--titulo); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.kpi b em { font-style: normal; font-size: 16px; color: var(--muted-2); font-weight: 600; }
.kpi .suave { font-size: 12px; }
.kpi .mini-barra { width: 100%; margin-top: 4px; }
.kpi.abaixo b { color: var(--amar); }
.funil-barras { display: flex; flex-direction: column; gap: 14px; }
.fb { display: grid; grid-template-columns: 112px 1fr 76px; align-items: center; gap: 4px 12px; }
.fb > span { font-size: 13px; font-weight: 600; }
.fb > b { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.fb > b em { font-style: normal; color: var(--muted-2); font-size: 12px; font-weight: 500; }
.fb small { grid-column: 2 / 4; font-size: 11.5px; margin-top: -2px; }
.fb-trilho { position: relative; height: 22px; }
.fb-trilho i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.fb-trilho i.plan { background: repeating-linear-gradient(135deg, #e8e5fb 0 6px, #f4f2fe 6px 12px); border: 1px dashed #c9bffa; }
.fb-trilho i.real { background: var(--violet); top: 4px; bottom: 4px; min-width: 3px; }
.legenda { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 14px; }
.legenda i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legenda i.real { background: var(--violet); margin-left: 0; } .legenda i.plan { background: #e8e5fb; border: 1px dashed #c9bffa; }
.barras-h { display: flex; flex-direction: column; gap: 9px; }
.barras-h > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 54px; gap: 10px; align-items: center; font-size: 13px; }
.barras-h > div > span, .barras-h > div > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barras-h > div > a:hover { color: var(--violet); }
.bh { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.bh i { display: block; height: 100%; background: var(--violet); border-radius: 5px; }
.barras-h b { text-align: right; font-variant-numeric: tabular-nums; }
.barras-h b em { font-style: normal; font-size: 11.5px; }

/* ---------- Configurações ---------- */
.config { display: grid; grid-template-columns: 220px 1fr; gap: 24px; max-width: 1120px; }
.config-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: start; }
.config-nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.config-nav a:hover { background: #fff; color: var(--ink); }
.config-nav a.ativo { background: #fff; color: var(--violet); box-shadow: var(--sombra); }
.config-corpo { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); padding: 22px 24px; box-shadow: var(--sombra); }
.config-corpo .sec-tit:not(:first-child) { margin-top: 30px; }
.config-corpo .texto { margin-bottom: 14px; }
.form-cfg + .form-cfg { margin-top: 24px; padding-top: 4px; border-top: 1px solid var(--line-2); }
.form-cfg .btn.prim, .form-cfg > .btn { margin-top: 14px; }
.etapas-lista { padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.importar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.importar .campo { margin: 0; min-width: 240px; }
.arquivo { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1.5px dashed var(--violet-borda); border-radius: 9px; color: var(--violet); font-weight: 600; cursor: pointer; background: var(--violet-claro); }
.arquivo input { display: none; }
#imp-previa .painel { margin-bottom: 10px; }
#imp-previa .btn { margin-top: 12px; }
.config-corpo .aviso { margin-top: 20px; }

/* ---------- Formulários e modal ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(23, 18, 61, .45); display: grid; place-items: center; padding: 20px; z-index: 50; animation: aparece .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 500px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(23, 18, 61, .35); animation: sobe .18s ease-out; }
@keyframes sobe { from { transform: translateY(12px); opacity: .6; } }
.modal.larga { max-width: 680px; }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal h2 { font-family: var(--titulo); font-size: 18px; font-weight: 700; color: var(--ink); }
.modal-corpo { padding: 18px 20px; overflow-y: auto; }
.modal footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-2); background: #fafafd; border-radius: 0 0 16px 16px; }
.texto { font-size: 14px; color: #3d3c57; margin-bottom: 14px; }
.texto.suave { color: var(--muted); font-size: 13px; }
.campo { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.campo > span { font-size: 12.5px; font-weight: 600; color: #4b4d6b; }
.campo input, .campo select, .campo textarea { width: 100%; height: 38px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 0 11px; background: #fff; outline: 0; transition: border-color .15s, box-shadow .15s; }
.campo select { appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236c6f8f' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center; }
.campo textarea { height: auto; padding: 9px 11px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-claro); }
.campo input[readonly], .campo input:disabled, .campo select:disabled, .campo textarea:disabled { background: var(--bg); color: var(--muted); }
.campo .erro, .campo input.erro { border-color: var(--verm); }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grade2.sem-margem { gap: 0 10px; }
.col2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 2px 0 12px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--violet); }
.dica-preco { font-size: 13px; color: var(--ink-2); background: var(--violet-claro); border-radius: 8px; padding: 9px 12px; margin-bottom: 4px; }
.modal h3.sub { margin: 14px 0 10px; font-size: 11.5px; color: var(--muted); }
.tipos-ativ { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tipos-ativ label { cursor: pointer; }
.tipos-ativ input { display: none; }
.tipos-ativ span { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 80px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.tipos-ativ em { font-style: normal; font-size: 11px; font-weight: 600; }
.tipos-ativ input:checked + span { border-color: var(--violet); background: var(--violet-claro); color: var(--violet); }
.cores { display: flex; gap: 8px; }
.cores input { display: none; }
.cores i { display: block; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.cores input:checked + i { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Menu flutuante e toast ---------- */
.menu-flutua { position: fixed; background: #fff; border-radius: 11px; box-shadow: var(--sombra-2); padding: 6px; min-width: 210px; z-index: 60; border: 1px solid var(--line-2); }
.menu-flutua button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; text-align: left; font-weight: 500; }
.menu-flutua button:hover { background: var(--bg-2); }
.menu-flutua button .ic { width: 16px; height: 16px; color: var(--muted); }
.menu-flutua button.perigo { color: var(--verm); } .menu-flutua button.perigo .ic { color: var(--verm); }
.menu-flutua hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 0; }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: #1d1b3a; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--sombra-2); animation: sobe .2s; transition: opacity .4s, transform .4s; max-width: 90vw; }
.toast .ic { color: #6ee7b7; width: 17px; height: 17px; }
.toast.erro .ic { color: #fca5a5; }
.toast.sai { opacity: 0; transform: translateY(6px); }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: #fff; }
.login-marca { position: relative; overflow: hidden; background: linear-gradient(150deg, #1d1557 0%, #2a1e78 55%, #4a33c9 100%); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.login-marca .logo { height: 34px; width: auto; position: relative; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); }
.blob.b1 { width: 520px; height: 420px; right: -160px; top: -140px; background: rgba(140, 123, 255, .55); }
.blob.b2 { width: 560px; height: 380px; left: -200px; bottom: -200px; background: rgba(135, 182, 240, .35); }
.login-frase { position: relative; }
.login-frase small { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c9c0ff; }
.login-frase h1 { font-family: var(--titulo); font-weight: 400; font-size: 34px; line-height: 1.25; margin-top: 14px; letter-spacing: -.01em; }
.login-frase h1 b { font-weight: 800; }
.login-rodape { position: relative; color: #c9c0ff; font-size: 13.5px; }
.login-form { align-self: center; justify-self: center; width: 100%; max-width: 380px; padding: 40px 24px; display: flex; flex-direction: column; }
.login-form h2 { font-family: var(--titulo); font-size: 26px; color: var(--ink); font-weight: 700; }
.login-form > .suave { margin: 6px 0 22px; }
.login-form .btn.grande { margin-top: 6px; }
.login-form .link { margin-top: 14px; align-self: center; }
.modo-info { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; font-size: 12px; color: var(--muted); }
.modo-info .ic { width: 14px; height: 14px; }
.so-movel { display: none; }
.carregando { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); text-align: center; }
.carregando .logo { height: 34px; width: auto; }
.carregando > span { width: 26px; height: 26px; border: 3px solid var(--violet-claro); border-top-color: var(--violet); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .det-corpo { grid-template-columns: 290px 1fr; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  #app:has(.lateral) { grid-template-columns: 64px 1fr; }
  .lateral { padding: 14px 8px; }
  .lat-logo { padding: 6px 4px 18px; justify-content: center; }
  .lat-logo .logo { display: none; }
  .lat-logo .logo-ic { display: block; }
  .lat-logo span, .lateral nav a span, .lat-pe > a span, .lat-user span { display: none; }
  .lateral nav a, .lat-pe > a, .lat-user { justify-content: center; padding: 10px 0; position: relative; }
  .lateral nav a .badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; }
  .zonas-fim { left: 64px; }
  .tabela td small { white-space: normal; }
}
@media (max-width: 900px) {
  .duas-col { grid-template-columns: 1fr; }
  .det-corpo { grid-template-columns: 1fr; }
  .config { grid-template-columns: 1fr; }
  .config-nav { flex-direction: row; overflow-x: auto; position: static; }
  .config-nav a { white-space: nowrap; }
  .hero-arte { width: 200px; }
}
@media (max-width: 760px) {
  #app:has(.lateral) { display: block; }
  .lateral { display: none; }
  .principal { height: 100vh; height: 100dvh; }
  .topo { padding: 0 12px; gap: 8px; height: 54px; }
  .topo h1 { font-size: 16px; }
  .busca-global { width: auto; flex: 0 1 170px; height: 36px; }
  .busca-global kbd, .topo > .btn-ic.redondo { display: none; }
  .busca-res { position: fixed; top: 58px; left: 10px; right: 10px; }
  #tela { padding: 14px 14px 90px; }
  #tela.tela-inicio { padding-bottom: 90px; }
  .baixo { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 25; }
  .baixo a, .baixo button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative; padding: 4px 0; }
  .baixo .ic { width: 22px; height: 22px; }
  .baixo a.ativo { color: var(--violet); }
  .baixo .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; }
  .baixo .badge.suave { display: none; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; background: var(--violet); color: #fff; box-shadow: 0 8px 24px rgba(108, 76, 242, .45); z-index: 24; }
  .fab .ic { width: 24px; height: 24px; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 22px; }
  .hero-arte { display: none; }
  .conteudo.estreito { padding: 16px 14px 0; gap: 16px; }
  .painel { padding: 14px; }
  .funil-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .funil-linha .seta { display: none; }
  .guia-cab .mini-barra { display: none; }
  .guia-cab { padding: 14px; font-size: 14px; }
  .guia-item { padding: 14px; }
  .barra-ferr { gap: 8px; }
  .filtros { margin-left: 0; width: 100%; }
  .filtros > * { flex: 1 1 140px; }
  .busca-local input { width: 100%; }
  .barra-ferr > .btn.prim { display: none; }
  .abas-chip { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .abas-chip > * { white-space: nowrap; }
  .kanban { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0; }
  .coluna { scroll-snap-align: start; }
  #tela.tela-negocios:has(.kanban) { padding-bottom: 72px; }
  .zonas-fim { left: 0; }
  .tabela-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .tabela thead { display: none; }
  .tabela, .tabela tbody, .tabela tr, .tabela td { display: block; width: 100%; }
  .tabela tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 4px; box-shadow: var(--sombra); }
  .tabela td { border: 0; padding: 4px 10px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tabela td::before { content: attr(data-r); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .tabela td:first-child { text-align: left; display: block; padding-top: 6px; }
  .tabela td:first-child::before { display: none; }
  .tabela td.acoes { justify-content: flex-end; padding-top: 8px; }
  .tabela.num td:not(:first-child) { text-align: right; }
  .painel .tabela tr { box-shadow: none; }
  .kpis { gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi b { font-size: 22px; }
  .fb { grid-template-columns: 90px 1fr 60px; gap: 4px 8px; }
  .cal { grid-template-columns: 1fr; min-height: 0; }
  .cal-dia { border-right: 0; border-bottom: 1px solid var(--line-2); flex-direction: column; }
  .cal-dia header .btn-ic { opacity: 1; }
  .det-cab { flex-direction: column; gap: 12px; }
  .det-tit h1 { font-size: 20px; }
  .dono { width: 100%; }
  .det-acoes .btn.ganho, .det-acoes .btn.perdido { flex: 1; justify-content: center; }
  .etapas { overflow-x: auto; }
  .etapas button { min-width: 112px; font-size: 11.5px; }
  .modal-fundo { padding: 0; place-items: end stretch; }
  .modal, .modal.larga { max-width: none; border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal footer { border-radius: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .grade2, .grade3 { grid-template-columns: 1fr; }
  .grade2.sem-margem { grid-template-columns: 1fr 1fr; }
  .tipos-ativ span { width: 62px; }
  .login { grid-template-columns: 1fr; }
  .login-marca { display: none; }
  .so-movel { display: block; margin-bottom: 30px; } .so-movel .logo { height: 30px; width: auto; }
  .config-corpo { padding: 16px; }
  #toasts { bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Prospecção ---------- */
.mini-barra.larga { width: 100%; }
.banner-prosp { display: flex; align-items: center; gap: 16px; background: linear-gradient(110deg, #2a1e78, #4a33c9); color: #fff; border-radius: var(--r-g); padding: 16px 20px; box-shadow: var(--sombra-2); }
.banner-prosp:hover { filter: brightness(1.05); }
.bp-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.bp-ic .ic { width: 22px; height: 22px; }
.bp-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bp-txt b { font-family: var(--titulo); font-size: 16px; }
.bp-txt small { color: #d6d0ff; font-size: 13px; }
.banner-prosp .mini-barra { max-width: 160px; background: rgba(255,255,255,.2); }
.banner-prosp .mini-barra i { background: #9dfbd0; }
.banner-prosp .btn.prim { background: #fff; color: var(--ink); border-color: #fff; }

.prosp-topo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.prosp-meta { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); padding: 12px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 3px; }
.prosp-meta small { font-size: 12px; font-weight: 600; color: var(--muted); }
.prosp-meta b { font-family: var(--titulo); font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.prosp-meta b em { font-style: normal; font-size: 15px; color: var(--muted-2); }
.prosp-meta b.verde { color: var(--verde); }
.prosp-meta .suave { font-size: 12px; }
.prosp { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.prosp-lista { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); box-shadow: var(--sombra); overflow: auto; max-height: calc(100vh - 290px); position: sticky; top: 0; }
.linha-prosp { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-2); }
.linha-prosp:hover { background: #fafaff; }
.linha-prosp.ativo { background: var(--violet-claro); box-shadow: inset 3px 0 0 var(--violet); }
.lp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lp-txt b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-canais { display: flex; gap: 3px; color: var(--muted-2); }
.lp-canais .ic { width: 14px; height: 14px; }
.pad { padding: 12px; }
.prosp-detalhe { background: #fff; border: 1px solid var(--line); border-radius: var(--r-g); box-shadow: var(--sombra); padding: 18px 20px; min-width: 0; }
.pd-cab { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pd-cab > div { flex: 1; min-width: 0; }
.pd-cab h2 { font-family: var(--titulo); font-size: 21px; color: var(--texto); }
.pd-cab p { font-size: 13px; }
.so-movel-ib { display: none; }
.pd-grade { display: grid; grid-template-columns: 250px 1fr; gap: 20px; }
.pd-dados h3.sub:first-child { margin-top: 2px; }
.pd-canais { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pd-canais > a, .canal-wa { display: flex; align-items: center; gap: 7px; color: var(--ink-2); word-break: break-all; }
.pd-canais > a:hover { color: var(--violet); }
.pd-canais .ic { width: 15px; height: 15px; flex: none; color: var(--muted); }
.canal-wa .link { font-size: 12.5px; }
.dica-pd { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 7px 9px; margin-top: 10px; }
.pd-msg { border: 1px solid var(--line); border-radius: var(--r-g); overflow: hidden; min-width: 0; }
.pd-msg-corpo { padding: 12px 14px; }
.pd-msg-tipo { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.pd-msg-tipo .link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.pd-msg-tipo .link .ic { width: 14px; height: 14px; }
.pd-assunto { width: 100%; height: 36px; border: 1px solid #d9dbe8; border-radius: 8px; padding: 0 10px; margin-bottom: 8px; font-weight: 600; outline: 0; }
#pd-texto { width: 100%; border: 1px solid #d9dbe8; border-radius: 10px; padding: 11px 12px; resize: vertical; line-height: 1.5; outline: 0; background: #fcfcff; font-size: 13.5px; }
#pd-texto:focus, .pd-assunto:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-claro); }
.pd-enviar { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-enviar .btn.prim { background: #1faa59; border-color: #1faa59; }
.pd-enviar .btn.prim:hover { background: #18914b; }
.pd-obs { font-size: 12px; margin-top: 8px; }
.pd-term, .pd-hist { border-top: 1px solid var(--line-2); margin-top: 18px; }
.termo { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.termo button { padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; border: 1.5px solid var(--line); background: #fff; display: inline-flex; gap: 5px; align-items: center; }
.termo button .ic { width: 14px; height: 14px; }
.termo .t-frio.ativo, .termo .t-frio:hover { border-color: #9fbdf0; background: #e6effc; color: var(--blue); }
.termo .t-morno.ativo, .termo .t-morno:hover { border-color: #f0cf7e; background: var(--amar-claro); color: var(--amar); }
.termo .t-quente.ativo, .termo .t-quente:hover { border-color: #f3b29a; background: #fde8e1; color: #c2410c; }
.termo .t-reuniao.ativo, .termo .t-reuniao:hover { border-color: #a9e2cb; background: var(--verde-claro); color: var(--verde); }
.termo .t-cinza.ativo, .termo .t-cinza:hover { border-color: #c6c8da; background: var(--bg-2); }
.termo .t-nao.ativo, .termo .t-nao:hover { border-color: #f4b9b9; background: var(--verm-claro); color: var(--verm); }
.termo .link { border: 0; background: none; padding: 0 4px; }
.pd-nota { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.pd-nota textarea { flex: 1; border: 1px solid #d9dbe8; border-radius: 8px; padding: 8px 10px; resize: vertical; outline: 0; background: #fffef6; }
.fonte { font-size: 11.5px; margin-top: 10px; }
@media (max-width: 1250px) { .pd-grade { grid-template-columns: 1fr; } .prosp-topo { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .prosp { grid-template-columns: 280px 1fr; } }
@media (max-width: 760px) {
  .prosp-topo { display: flex; overflow-x: auto; gap: 8px; margin: 0 -14px 12px; padding: 0 14px 2px; scrollbar-width: none; }
  .prosp-meta { min-width: 118px; padding: 8px 12px; flex: none; }
  .prosp-meta b { font-size: 19px; } .prosp-meta small { font-size: 11px; } .prosp-meta .suave { display: none; }
  #tela:has(.prosp.com-detalhe) .prosp-topo, #tela:has(.prosp.com-detalhe) .barra-ferr { display: none; }
  body:has(#tela.tela-prospeccao) .fab { display: none; }
  .pd-cab h2 { font-size: 18px; }
  .prosp { display: block; }
  .prosp-lista { max-height: none; position: static; }
  .prosp-detalhe { display: none; padding: 14px; }
  .prosp.com-detalhe .prosp-lista { display: none; }
  .prosp.com-detalhe .prosp-detalhe { display: block; }
  .so-movel-ib { display: inline-grid; margin-left: -8px; }
  .banner-prosp { flex-wrap: wrap; } .banner-prosp .mini-barra { order: 3; max-width: none; } .banner-prosp .btn { margin-left: auto; }
  .pd-enviar .btn { flex: 1; justify-content: center; }
}

@media (max-width: 760px) { .pd-msg .abas-comp button { padding: 10px 11px; white-space: nowrap; flex: 1; justify-content: center; } }
