/* advus — Marketing reestruturado (04/10/2026) · complementa af-escritorio-*.css; usa as variáveis do tema (claro/escuro) */
.afmkt-on > nav.afmkt-abas{margin-bottom:.35rem}
.afmkt-on > nav.aeu-abas:not(.afmkt-abas){margin-top:.25rem;font-size:.92em;opacity:.95}
.afmkt-fora-conteudo .aeu-topo-acoes > .aeu-bt-pri{display:none}
.afmkt-engr{min-width:2.4rem}
.afmkt-filtros{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.9rem}
.afmkt-pers{display:inline-flex;gap:.35rem;align-items:center}
.afmkt-periodo-rot{font-size:.8rem;color:hsl(var(--muted-foreground))}
.afmkt-area{display:flex;flex-direction:column;gap:1rem}
.afmkt-kpis8{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:.75rem}
.afmkt-kpi{position:relative}
.afmkt-kpi.afmkt-clic{cursor:pointer}
.afmkt-kpi.afmkt-clic:hover{border-color:hsl(var(--primary)/.6)}
.afmkt-var{display:block;font-size:.72rem;margin-top:.2rem;color:hsl(var(--muted-foreground))}
.afmkt-var-bom{color:#15803d}.afmkt-var-ruim{color:#dc2626}
:is(.dark *) .afmkt-var-bom{color:#4ade80}:is(.dark *) .afmkt-var-ruim{color:#f87171}
.afmkt-f-ok{box-shadow:inset 4px 0 0 #16a34a}.afmkt-f-atencao{box-shadow:inset 4px 0 0 #f59e0b}.afmkt-f-ruim{box-shadow:inset 4px 0 0 #dc2626}
td.afmkt-f-ok{background:rgba(22,163,74,.10)}td.afmkt-f-atencao{background:rgba(245,158,11,.12)}td.afmkt-f-ruim{background:rgba(220,38,38,.10)}td.afmkt-f-x{background:none}
.afmkt-alertas{display:flex;flex-direction:column;gap:.4rem}
.afmkt-alerta{border-radius:.6rem;padding:.55rem .8rem;font-size:.86rem;border:1px solid}
.afmkt-alerta-ruim{background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.35)}
.afmkt-alerta-atencao{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.4)}
.afmkt-painel .aeu-painel-cab{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.afmkt-acoes-cab{display:inline-flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.afmkt-acoes-linha{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.afmkt-chave{display:inline-flex;gap:.35rem;align-items:center;font-size:.82rem;font-weight:500;cursor:pointer}
.afmkt-nota{font-size:.78rem;color:hsl(var(--muted-foreground));margin:.5rem 0 0;line-height:1.45}
.afmkt-vazio{font-size:.85rem;color:hsl(var(--muted-foreground));padding:.75rem 0}
.afmkt-erro{background:rgba(220,38,38,.08);border:1px solid rgba(220,38,38,.35);border-radius:.6rem;padding:.7rem .9rem;font-size:.86rem}
.afmkt-carregando{display:flex;gap:.5rem;align-items:center;color:hsl(var(--muted-foreground));padding:1rem 0;font-size:.88rem}
.afmkt-spin{width:14px;height:14px;border:2px solid hsl(var(--border));border-top-color:hsl(var(--primary));border-radius:50%;animation:afmkt-g .8s linear infinite}
@keyframes afmkt-g{to{transform:rotate(360deg)}}
.afmkt-tab-wrap{overflow-x:auto}
.afmkt-tabela td.afmkt-n,.afmkt-tabela th.afmkt-n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.afmkt-tabela tfoot td{font-weight:700;border-top:2px solid hsl(var(--border))}
.afmkt-tabela td.afmkt-clic{cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px}
.afmkt-tabela td.afmkt-clic:hover{color:hsl(var(--primary))}
.afmkt-link{background:none;border:0;padding:0;color:hsl(var(--primary));cursor:pointer;font:inherit;text-decoration:underline;text-underline-offset:2px;text-align:left}
.afmkt-link-ruim{color:#dc2626}
.afmkt-sel-mini{padding:.2rem .4rem;font-size:.8rem;height:auto;min-width:8rem}
.afmkt-sel-alerta{border-color:#f59e0b;background:rgba(245,158,11,.10)}
.afmkt-in-mini{padding:.2rem .4rem;font-size:.8rem;min-width:9rem}
.afmkt-in-pri{width:4.5rem}
.afmkt-in-erro{border-color:#dc2626!important}
.afmkt-selo{font-size:.76rem;padding:.25rem .6rem;border-radius:999px;border:1px solid hsl(var(--border))}
.afmkt-selo-on{background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.4)}
.afmkt-selo-off{color:hsl(var(--muted-foreground))}
/* gráfico */
.afmkt-graf-box{width:100%}
.afmkt-graf{width:100%;height:auto;max-height:300px;display:block}
.afmkt-grade{stroke:hsl(var(--border));stroke-width:1}
.afmkt-eixo{fill:hsl(var(--muted-foreground));font-size:10px}
.afmkt-barA{fill:hsl(var(--primary)/.75)}
.afmkt-barB{fill:#16a34a;opacity:.8}
.afmkt-linha{fill:none;stroke:#f59e0b;stroke-width:2.2}
.afmkt-ponto{fill:#f59e0b}
.afmkt-leg{display:flex;gap:1rem;flex-wrap:wrap;font-size:.76rem;color:hsl(var(--muted-foreground));margin-top:.3rem}
.afmkt-leg span::before{content:"";display:inline-block;width:.7rem;height:.7rem;border-radius:2px;margin-right:.3rem;vertical-align:-1px}
.afmkt-leg-a::before{background:hsl(var(--primary)/.75)}.afmkt-leg-b::before{background:#16a34a}.afmkt-leg-l::before{background:#f59e0b;height:3px!important;vertical-align:3px!important}
/* funil */
.afmkt-funil{display:flex;flex-direction:column;gap:.35rem}
.afmkt-funil-l{display:grid;grid-template-columns:3.6rem 1fr;align-items:center;gap:.5rem}
.afmkt-funil-l.afmkt-clic{cursor:pointer}
.afmkt-funil-l.afmkt-clic:hover .afmkt-funil-b{filter:brightness(1.08)}
.afmkt-funil-p{font-size:.78rem;color:hsl(var(--muted-foreground));text-align:right;font-variant-numeric:tabular-nums}
.afmkt-funil-b{background:hsl(var(--primary)/.18);border-left:4px solid hsl(var(--primary));border-radius:.4rem;padding:.4rem .6rem;min-width:fit-content;white-space:nowrap}
.afmkt-funil-t{font-size:.86rem}
/* barras horizontais (perdas) */
.afmkt-hbars{display:flex;flex-direction:column;gap:.35rem}
.afmkt-hbar{display:grid;grid-template-columns:minmax(10rem,16rem) 1fr 7rem;gap:.6rem;align-items:center;font-size:.84rem}
.afmkt-hbar-t{background:hsl(var(--muted));border-radius:999px;height:.6rem;overflow:hidden}
.afmkt-hbar-b{display:block;height:100%;background:hsl(var(--primary)/.7)}
.afmkt-hbar-n{text-align:right;font-variant-numeric:tabular-nums;color:hsl(var(--muted-foreground))}
/* mapa de calor */
.afmkt-calor-w{overflow-x:auto}
.afmkt-calor{border-collapse:collapse;font-size:.74rem;font-variant-numeric:tabular-nums}
.afmkt-calor th{font-weight:600;padding:.15rem .4rem;color:hsl(var(--muted-foreground));text-align:center}
.afmkt-calor td{width:2.6rem;height:1.25rem;text-align:center;border:1px solid hsl(var(--border));background:hsl(var(--primary)/calc(var(--a,0)*.85))}
.afmkt-calor td.afmkt-fora{background-color:hsl(var(--muted))}
.afmkt-calor td.afmkt-fora[style]{background:linear-gradient(hsl(var(--primary)/calc(var(--a,0)*.85)),hsl(var(--primary)/calc(var(--a,0)*.85))),hsl(var(--muted))}
.afmkt-calor td.afmkt-n{border:0;text-align:right;padding-left:.4rem;background:none}
/* modal */
.afmkt-modal-fundo{position:fixed;inset:0;z-index:70;background:rgba(15,23,42,.45);display:flex;align-items:flex-start;justify-content:center;padding:5vh 1rem;overflow:auto}
.afmkt-modal{background:hsl(var(--card));color:hsl(var(--card-foreground));border:1px solid hsl(var(--border));border-radius:.9rem;width:min(560px,100%);box-shadow:0 20px 50px rgba(0,0,0,.25);display:flex;flex-direction:column;max-height:90vh}
.afmkt-modal-largo{width:min(980px,100%)}
.afmkt-modal-cab{display:flex;justify-content:space-between;align-items:center;padding:.9rem 1.1rem;border-bottom:1px solid hsl(var(--border))}
.afmkt-modal-cab h2{font-size:1.02rem;font-weight:700;margin:0}
.afmkt-x{background:none;border:0;font-size:1.4rem;line-height:1;cursor:pointer;color:hsl(var(--muted-foreground))}
.afmkt-modal-corpo{padding:1rem 1.1rem;overflow:auto;display:flex;flex-direction:column;gap:.6rem}
.afmkt-modal-pe{display:flex;justify-content:flex-end;align-items:center;gap:.6rem;padding:.75rem 1.1rem;border-top:1px solid hsl(var(--border))}
.afmkt-status{margin-right:auto;font-size:.8rem;color:hsl(var(--muted-foreground))}
.afmkt-campo{display:grid;grid-template-columns:minmax(12rem,1fr) minmax(10rem,14rem);gap:.6rem;align-items:center;font-size:.86rem}
.afmkt-campo-in{display:flex;gap:.35rem;align-items:center}
.afmkt-campo-in small{color:hsl(var(--muted-foreground));white-space:nowrap}
.afmkt-campo-chave{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.afmkt-campo-chave small{flex-basis:100%;color:hsl(var(--muted-foreground));padding-left:1.6rem}
.afmkt-sec{font-size:.9rem;font-weight:700;margin:.8rem 0 .1rem;padding-top:.6rem;border-top:1px solid hsl(var(--border))}
.afmkt-sec:first-child{border-top:0;padding-top:0;margin-top:0}
.afmkt-regras{display:flex;flex-direction:column;gap:.4rem}
.afmkt-regra{display:grid;grid-template-columns:auto 1fr 10rem 4.5rem auto;gap:.4rem;align-items:center}
textarea.afmkt-csv{min-height:9rem;font-family:ui-monospace,monospace;font-size:.78rem;width:100%}
.afmkt-prev{font-size:.84rem}
.afmkt-pipe-bt{margin-left:.75rem;font-size:.8rem;background:none;border:1px solid hsl(var(--border));border-radius:999px;padding:.2rem .7rem;color:hsl(var(--muted-foreground));cursor:pointer;vertical-align:middle}
.afmkt-pipe-bt:hover{color:hsl(var(--primary));border-color:hsl(var(--primary)/.5)}
.afmkt-toast{position:fixed;right:1rem;bottom:1rem;z-index:80;background:hsl(var(--foreground));color:hsl(var(--background));padding:.6rem .9rem;border-radius:.6rem;font-size:.86rem;box-shadow:0 10px 30px rgba(0,0,0,.25);transition:opacity .5s}
.afmkt-toast-ruim{background:#b91c1c;color:#fff}
.afmkt-toast-sai{opacity:0}
@media (max-width:640px){
  .afmkt-campo{grid-template-columns:1fr}
  .afmkt-hbar{grid-template-columns:1fr 5rem}.afmkt-hbar-t{display:none}
  .afmkt-regra{grid-template-columns:auto 1fr;}.afmkt-regra select,.afmkt-regra .afmkt-in-pri{grid-column:2}
}
