/* NFE — acabamento visual (painel e portal do cliente).
 * Só aparência: não muda telas, textos, dados nem comportamento. Carregado por último no <head>.
 * Cores seguem as variáveis do tema (claro/escuro) e o verde-limão da marca (#C7FF00). */
:root { --nfe-lime: 199 255 0; --nfe-ease: cubic-bezier(.2, .8, .2, 1); --nfe-shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.03); --nfe-shadow-lg: 0 18px 40px -18px rgba(0,0,0,.22), 0 4px 12px -6px rgba(0,0,0,.08); }
html[data-theme="dark"] { --nfe-shadow-sm: 0 1px 2px rgba(0,0,0,.4); --nfe-shadow-lg: 0 18px 40px -16px rgba(0,0,0,.7); }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.015em; }
h1.text-2xl, h1.text-3xl { letter-spacing: -.025em; }
.text-2xl.font-bold, .text-3xl.font-bold, .tabular-nums { font-variant-numeric: tabular-nums; }
::selection { background: rgb(var(--nfe-lime) / .55); color: #050505; }

/* Movimento: tudo que muda de cor, borda ou sombra muda suave */
button, a, input, select, textarea, .sidebar-link, .pl-link, .kanban-card, .card-hover, [role="button"] {
  transition: background-color .18s var(--nfe-ease), color .18s var(--nfe-ease), border-color .18s var(--nfe-ease), box-shadow .22s var(--nfe-ease), transform .16s var(--nfe-ease), opacity .18s var(--nfe-ease);
}
button:not(:disabled):active, a[class*="rounded"]:active, [role="button"]:active { transform: scale(.98); }

/* Telas entram com um deslize curto */
.fade-in { animation: nfeIn .38s var(--nfe-ease) both; }
@keyframes nfeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Cartões: borda mais leve, sombra discreta; os clicáveis levantam ao passar o mouse */
#main-content .bg-white.border.rounded-xl, #main-content .bg-white.border.rounded-2xl { box-shadow: var(--nfe-shadow-sm); }
#main-content button.bg-white.border.rounded-xl:hover, #main-content [onclick].bg-white.border.rounded-xl:hover, .card-hover:hover, #main-content .pl-quick:hover {
  transform: translateY(-2px); box-shadow: var(--nfe-shadow-lg); border-color: rgb(var(--nfe-300));
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--nfe-shadow-lg); }

/* Botões principais (pretos) ganham profundidade */
button.bg-nfe-900, a.bg-nfe-900 { box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 16px -8px rgba(0,0,0,.45); }
button.bg-nfe-900:hover, a.bg-nfe-900:hover { box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 10px 22px -10px rgba(0,0,0,.55); }
.nfe-lime, .nfe-portal-btn { box-shadow: 0 8px 20px -10px rgb(var(--nfe-lime) / .9); }
.nfe-lime:hover, .nfe-portal-btn:hover { box-shadow: 0 12px 26px -10px rgb(var(--nfe-lime)); }

/* Campos: foco com brilho verde-limão da marca */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, select:focus, textarea:focus {
  outline: none !important; border-color: rgb(var(--nfe-900)) !important; box-shadow: 0 0 0 3px rgb(var(--nfe-lime) / .45) !important;
}
input[type="checkbox"], input[type="radio"] { accent-color: rgb(var(--nfe-900)); }

/* Menu lateral do painel: passar o mouse fica suave; o item ativo tem a barrinha da marca */
.sidebar-link { position: relative; }
.sidebar-link:not(.active):hover { background: rgb(var(--nfe-100)); color: rgb(var(--nfe-900)); }
.sidebar-link:not(.active):hover i { color: rgb(var(--nfe-900)); }
.sidebar-link.active { box-shadow: var(--nfe-shadow-lg); }
.sidebar-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: rgb(var(--nfe-lime)); }
html:not([data-theme="dark"]) .sidebar-link.active i { color: rgb(var(--nfe-lime)); }
/* Portal do cliente */
.pl-link { position: relative; }
.pl-link.active { box-shadow: var(--nfe-shadow-lg); }
.pl-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: rgb(var(--nfe-lime)); }
html:not([data-theme="dark"]) .pl-link.active i { color: rgb(var(--nfe-lime)); }

/* Topo: vidro fosco e avatar com o anel da marca */
header.sticky { backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
#header-user-avatar { box-shadow: 0 0 0 2px rgb(var(--nfe-white)), 0 0 0 4px rgb(var(--nfe-lime)); }

/* Menus suspensos, janelas e avisos */
#notifications-panel, #profile-menu, #search-results, #pl-notices { border-radius: 14px; box-shadow: var(--nfe-shadow-lg); overflow: hidden; }
.dropdown-menu, #pl-notices:not(.hidden) { animation: nfePop .18s var(--nfe-ease) both; transform-origin: top right; }
@keyframes nfePop { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: nfeFade .2s ease both; }
#modal-content { border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); animation: nfeModal .26s var(--nfe-ease) both; }
@keyframes nfeModal { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nfeFade { from { opacity: 0; } to { opacity: 1; } }
.toast { border-radius: 12px; box-shadow: var(--nfe-shadow-lg); backdrop-filter: blur(6px); }
#nfe-cmdk .box { animation: nfeModal .2s var(--nfe-ease) both; }

/* Tabelas: linhas com transição e cabeçalho mais limpo */
#main-content table tbody tr { transition: background-color .15s var(--nfe-ease); }
#main-content table thead th { letter-spacing: .04em; }

/* Abas */
.tab-active, .tab-inactive { transition: color .18s var(--nfe-ease), border-color .18s var(--nfe-ease); }
.tab-active { border-bottom-color: rgb(var(--nfe-900)); }

/* Carregando: brilho mais suave */
.skeleton { animation-duration: 1.2s; border-radius: 14px; }

/* Barras de progresso andam até o valor */
.pl-progress > i, .h-2.bg-nfe-900.rounded-full, .h-2.bg-nfe-900.rounded { transition: width .6s var(--nfe-ease); }

/* Tela de entrada do painel: luz verde-limão no canto */
#login-screen { background: radial-gradient(900px 520px at 100% 0%, rgb(var(--nfe-lime) / .16), transparent 60%), radial-gradient(700px 420px at 0% 100%, rgb(var(--nfe-lime) / .08), transparent 60%), rgb(var(--nfe-white)); }

/* Rolagem fina */
* { scrollbar-width: thin; }

/* Quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* WhatsApp do cliente (API oficial) — CRM e portal */
.nfe-wa-card { background: rgb(var(--nfe-white)); border: 1px solid rgb(var(--nfe-200)); border-radius: 14px; padding: 18px; }
.nfe-wa-box { display: grid; grid-template-columns: 280px 1fr; height: 460px; border: 1px solid rgb(var(--nfe-200)); border-radius: 12px; overflow: hidden; }
.nfe-wa-list { overflow-y: auto; border-right: 1px solid rgb(var(--nfe-100)); }
.nfe-wa-thread { display: flex; gap: 8px; width: 100%; padding: 10px 12px; border-bottom: 1px solid rgb(var(--nfe-100)); font-size: 13px; }
.nfe-wa-thread:hover, .nfe-wa-thread.on { background: rgb(var(--nfe-50)); }
.nfe-wa-unread { display: block; margin-top: 4px; margin-left: auto; min-width: 18px; padding: 0 5px; border-radius: 9999px; font-style: normal; font-weight: 700; text-align: center; background: rgb(var(--nfe-lime)); color: rgb(var(--nfe-900)); }
.nfe-wa-chat { display: flex; flex-direction: column; min-width: 0; background: rgb(var(--nfe-50)); }
.nfe-wa-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.nfe-wa-msg { max-width: 75%; padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.nfe-wa-msg span { display: block; margin-top: 2px; font-size: 10px; opacity: .65; text-align: right; }
.nfe-wa-msg.in { align-self: flex-start; background: rgb(var(--nfe-white)); border: 1px solid rgb(var(--nfe-200)); border-bottom-left-radius: 4px; }
.nfe-wa-msg.out { align-self: flex-end; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); border-bottom-right-radius: 4px; }
.nfe-wa-reply { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); }
.nfe-wa-reply textarea { flex: 1; resize: none; padding: 8px 12px; border: 1px solid rgb(var(--nfe-200)); border-radius: 10px; font-size: 14px; }
.nfe-wa-empty { margin: auto; color: rgb(var(--nfe-400)); font-size: 14px; }
@media (max-width: 768px) { .nfe-wa-box { grid-template-columns: 1fr; height: auto; } .nfe-wa-list { max-height: 220px; border-right: 0; border-bottom: 1px solid rgb(var(--nfe-200)); } .nfe-wa-chat { min-height: 360px; } }

/* Forma de pagamento do plano (cadastro do cliente) e aviso no portal */
.nfe-pay { margin-top: 16px; padding: 16px; border: 1px solid rgb(var(--nfe-200)); border-radius: 14px; background: rgb(var(--nfe-50)); }
.nfe-pay-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: rgb(var(--nfe-500)); margin-bottom: 10px; }
.nfe-pay-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .nfe-pay-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nfe-pay-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); font-size: 13px; font-weight: 600; color: rgb(var(--nfe-700)); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.nfe-pay-opt i { font-size: 18px; color: rgb(var(--nfe-500)); }
.nfe-pay-opt:hover { border-color: rgb(var(--nfe-400)); }
.nfe-pay-opt.on { border-color: rgb(var(--nfe-900)); background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5); }
.nfe-pay-opt.on i { color: rgb(var(--nfe-lime)); }
.nfe-pay-hint { margin-top: 10px; font-size: 13px; color: rgb(var(--nfe-600)); }
.nfe-pay-card { margin-top: 8px; font-size: 13px; font-weight: 600; color: rgb(21 128 61); }
.nfe-pay-notify { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: rgb(var(--nfe-700)); }
.nfe-pay-notify.hidden { display: none; }
@media (max-width: 520px) { .nfe-pay-opts { grid-template-columns: 1fr; } }
.pg-combined { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); }
.pg-combined i { margin-top: 3px; color: rgb(var(--nfe-lime)); font-size: 18px; }
.pg-combined p { margin-top: 2px; font-size: 13px; opacity: .8; }

/* Recebimentos (nfe-recebimentos.js): utilitários que o nfe.css compilado não tem */
#nfe-rcv .text-\[11px\], #modal-content .text-\[11px\] { font-size: 11px; line-height: 1.4; }
#nfe-rcv .bg-white\/20 { background: rgba(255,255,255,.2); }
#nfe-rcv table td, #nfe-rcv table th { vertical-align: middle; }
#modal-content .-left-\[9px\] { left: -9px; }
#modal-content .w-\[18px\] { width: 18px; } #modal-content .h-\[18px\] { height: 18px; }
#modal-content .max-h-\[60vh\] { max-height: 60vh; }
#modal-content .place-items-center { place-items: center; }
#modal-content .pr-2 { padding-right: .5rem; }
#nfe-rcv table { min-width: 640px; }
#nfe-rcv .rcv-tabs { overflow-x: auto; white-space: nowrap; }

/* ================================================================ WhatsApp do CRM (3.59.0)
 * Identidade NFE: preto (--nfe-900), verde-limão (--nfe-lime) e neutros quentes. Segue o tema claro/escuro pelas variáveis.
 * Movimento curto (até 220 ms) e só em transform/opacity. Marcação em nfe-platform.js (A.waInbox / A.waRenderChat). */
.wa2 { --wa2-r: 22px; position: relative; display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - 260px); min-height: 520px;
  background: rgb(var(--nfe-white)); border: 1px solid rgb(var(--nfe-200)); border-radius: var(--wa2-r); overflow: hidden; box-shadow: var(--nfe-shadow-sm); }
.wa2 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa2-conn-slot:empty { display: none; }
.wa2-conn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid rgb(var(--nfe-200)); color: rgb(var(--nfe-700)); background: rgb(var(--nfe-white)); }
.wa2-conn i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgb(22 163 74 / .18); }
.wa2-conn.off i { background: #dc2626; box-shadow: 0 0 0 3px rgb(220 38 38 / .18); }

/* lista de conversas */
.wa2-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid rgb(var(--nfe-100)); background: rgb(var(--nfe-white)); }
.wa2-side-head { padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.wa2-side-title { display: flex; align-items: center; gap: 8px; }
.wa2-side-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.wa2-count { font-size: 11px; font-weight: 700; color: rgb(var(--nfe-500)); background: rgb(var(--nfe-100)); border-radius: 999px; padding: 2px 8px; }
.wa2-count:empty { display: none; }
.wa2-search { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 999px; background: rgb(var(--nfe-50)); border: 1px solid rgb(var(--nfe-200)); color: rgb(var(--nfe-400)); }
.wa2-search:focus-within { border-color: rgb(var(--nfe-900)); background: rgb(var(--nfe-white)); }
.wa2-search input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; font-size: 14px; color: rgb(var(--nfe-900)); box-shadow: none !important; padding: 0; }
.wa2-chips { display: flex; gap: 6px; }
.wa2-chips button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: rgb(var(--nfe-600)); background: rgb(var(--nfe-100)); border: 0; display: inline-flex; align-items: center; gap: 6px; }
.wa2-chips button:hover { color: rgb(var(--nfe-900)); }
.wa2-chips button[aria-selected="true"] { background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); }
.wa2-chips button span:not(:empty) { background: rgb(var(--nfe-lime)); color: #050505; border-radius: 999px; padding: 0 6px; font-size: 10px; line-height: 16px; }
.wa2-notify { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; font-size: 12px; font-weight: 600; text-align: left;
  background: rgb(var(--nfe-lime) / .18); color: rgb(var(--nfe-900)); border: 1px solid rgb(var(--nfe-lime) / .5); }
.wa2-notify:hover { background: rgb(var(--nfe-lime) / .3); }
#wa2-notify:empty { display: none; }
.wa2-threads { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.wa2-thread { position: relative; width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 11px 10px; border-radius: 16px; border: 0; background: transparent; }
.wa2-thread:hover { background: rgb(var(--nfe-50)); }
.wa2-thread.on { background: rgb(var(--nfe-100)); }
.wa2-thread.on::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: rgb(var(--nfe-900)); }
.wa2-thread-body { flex: 1; }
.wa2-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wa2-name { font-size: 14px; font-weight: 600; color: rgb(var(--nfe-900)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa2-time { font-size: 11px; color: rgb(var(--nfe-500)); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wa2-thread.unread .wa2-time { color: rgb(var(--nfe-900)); font-weight: 700; }
.wa2-sub { font-size: 12px; color: rgb(var(--nfe-500)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa2-last { font-size: 13px; color: rgb(var(--nfe-500)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.wa2-last i { font-size: 10px; margin-right: 2px; }
.wa2-thread.unread .wa2-last { color: rgb(var(--nfe-800)); font-weight: 500; }
.wa2-badge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgb(var(--nfe-lime)); color: #050505; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.wa2-av { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  background: rgb(var(--nfe-900)); color: rgb(var(--nfe-lime)); }
.wa2-av i { font-size: 15px; color: rgb(var(--nfe-white) / .8); }
.wa2-av.lg { width: 42px; height: 42px; }
.wa2-thread .nfe-wa-del { bottom: auto; top: 50%; right: 8px; transform: translateY(-50%); }
.wa2-empty-list { padding: 40px 20px; text-align: center; color: rgb(var(--nfe-500)); font-size: 13px; }
.wa2-empty-list i { font-size: 28px; color: rgb(var(--nfe-300)); margin-bottom: 10px; display: block; }

/* conversa */
.wa2-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: rgb(var(--nfe-50)); }
.wa2-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgb(var(--nfe-white)); border-bottom: 1px solid rgb(var(--nfe-100)); }
.wa2-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wa2-who-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.wa2-who-sub { font-size: 12px; color: rgb(var(--nfe-500)); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 0; }
.wa2-pending { color: #b45309; }
.wa2-window { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wa2-window i { width: 7px; height: 7px; border-radius: 50%; }
.wa2-window.ok { color: rgb(var(--nfe-800)); }
.wa2-window.ok i { background: #16a34a; }
.wa2-window.late { color: #b45309; }
.wa2-window.late i { background: #f59e0b; }
.wa2-back { display: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: rgb(var(--nfe-900)); }
.wa2-back:hover { background: rgb(var(--nfe-100)); }
.wa2-actions { flex-shrink: 0; }
.wa2-act { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); font-size: 12px; font-weight: 600; color: rgb(var(--nfe-800)); display: inline-flex; align-items: center; gap: 7px; }
.wa2-act:hover { border-color: rgb(var(--nfe-900)); }
.wa2-actions .nfe-wa-del-top { height: 36px; border-radius: 999px !important; padding: 0 14px !important; }
.wa2-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 18px clamp(12px, 3vw, 40px);
  background-color: rgb(var(--nfe-50)); background-image: radial-gradient(rgb(var(--nfe-900) / .055) 1px, transparent 1.2px); background-size: 18px 18px; }
html[data-theme="dark"] #wa-body #wa-msgs.wa2-msgs { background: rgb(var(--nfe-50)) radial-gradient(rgb(var(--nfe-900) / .07) 1px, transparent 1.2px) 0 0 / 18px 18px !important; }
.wa2-day { text-align: center; margin: 14px 0 10px; position: sticky; top: 0; z-index: 1; }
.wa2-day span { display: inline-block; font-size: 11px; font-weight: 600; color: rgb(var(--nfe-600)); background: rgb(var(--nfe-white) / .92); border: 1px solid rgb(var(--nfe-200)); border-radius: 999px; padding: 4px 12px; backdrop-filter: blur(6px); }
.wa2-msg { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 6px; animation: wa2In .2s var(--nfe-ease) both; }
.wa2-msg.out { justify-content: flex-end; }
.wa2-bubble { max-width: min(72%, 560px); padding: 9px 12px 6px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.wa2-msg.in .wa2-bubble { background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); border: 1px solid rgb(var(--nfe-200)); border-radius: 18px 18px 18px 6px; }
.wa2-msg.out .wa2-bubble { background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); border-radius: 18px 18px 6px 18px; }
.wa2-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa2-text:empty { display: none; }
.wa2-meta { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 2px; font-size: 10.5px; opacity: .62; font-variant-numeric: tabular-nums; }
.wa2-meta .wa2-read { color: rgb(var(--nfe-lime)); }
.wa2-fail { color: #f87171; }
.wa2-err { margin-top: 4px; font-size: 11px; color: #fca5a5; }
.wa2-quote { font-size: 12px; padding: 4px 8px; margin-bottom: 6px; border-left: 3px solid rgb(var(--nfe-lime)); border-radius: 6px; background: rgb(var(--nfe-900) / .06); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa2-msg.out .wa2-quote { background: rgb(var(--nfe-white) / .12); }
.wa2-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .6; margin-bottom: 2px; }
.wa2-media { display: block; max-height: 280px; max-width: 100%; border-radius: 12px; margin-bottom: 4px; }
.wa2-audio { max-width: 100%; margin-bottom: 4px; }
.wa2-doc { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgb(var(--nfe-900) / .06); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.wa2-msg.out .wa2-doc { background: rgb(var(--nfe-white) / .12); }
.wa2-reply-btn { opacity: 0; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(var(--nfe-white)); color: rgb(var(--nfe-500)); box-shadow: var(--nfe-shadow-sm); font-size: 12px; }
.wa2-msg:hover .wa2-reply-btn, .wa2-reply-btn:focus-visible { opacity: 1; }
@media (hover: none) { .wa2-reply-btn { opacity: .7; } }
.wa2-nomsg { text-align: center; font-size: 13px; color: rgb(var(--nfe-500)); margin-top: 30px; }
.wa2-closed { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; font-size: 12px; line-height: 1.45; background: #fffbeb; color: #92400e; border-top: 1px solid #fde68a; }
html[data-theme="dark"] .wa2-closed { background: rgb(120 53 15 / .25); color: #fcd34d; border-color: rgb(120 53 15 / .5); }
.wa2-closed i { margin-top: 2px; }
.wa2-replying { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; font-size: 12px; background: rgb(var(--nfe-white)); border-top: 1px solid rgb(var(--nfe-100)); border-left: 3px solid rgb(var(--nfe-lime)); }
.wa2-replying.hidden { display: none; }
.wa2-replying button { border: 0; background: transparent; color: rgb(var(--nfe-500)); width: 28px; height: 28px; border-radius: 50%; }
.wa2-composer { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgb(var(--nfe-white)); border-top: 1px solid rgb(var(--nfe-100)); }
.wa2-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: rgb(var(--nfe-600)); background: transparent; border: 0; cursor: pointer; }
.wa2-icon:hover { background: rgb(var(--nfe-100)); color: rgb(var(--nfe-900)); }
.wa2-icon.hl { background: rgb(var(--nfe-lime)); color: #050505; }
.wa2-composer textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 140px; resize: none; padding: 10px 16px; border-radius: 22px; font-size: 14px; line-height: 1.45;
  background: rgb(var(--nfe-50)) !important; border: 1px solid rgb(var(--nfe-200)); color: rgb(var(--nfe-900)); outline: 0; }
.wa2-composer textarea:focus { border-color: rgb(var(--nfe-900)); background: rgb(var(--nfe-white)) !important; }
.wa2-composer textarea:disabled { opacity: .7; }
.wa2-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgb(var(--nfe-lime)); color: #050505; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.wa2-send:not(:disabled):hover { transform: scale(1.05); }
.wa2-send:disabled { opacity: .35; }

/* tela inicial (nenhuma conversa aberta) */
.wa2-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 8px;
  background-color: rgb(var(--nfe-50)); background-image: radial-gradient(rgb(var(--nfe-900) / .055) 1px, transparent 1.2px); background-size: 18px 18px; }
.wa2-welcome-mark { width: 76px; height: 76px; border-radius: 24px; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-lime)); display: flex; align-items: center; justify-content: center; font-size: 36px; margin-bottom: 10px; box-shadow: var(--nfe-shadow-lg); }
.wa2-welcome h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.wa2-welcome p { font-size: 14px; color: rgb(var(--nfe-500)); max-width: 340px; margin: 0; }
.wa2-welcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
@keyframes wa2In { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wa2-msg, .wa2-dev-ok i { animation: none; } }

/* dispositivos conectados (janela) */
.wa2-dev { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; }
.wa2-dev-pair { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wa2-dev-qr { position: relative; width: 240px; height: 240px; padding: 12px; border-radius: 22px; background: #fff; border: 1px solid rgb(var(--nfe-200)); display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 24px; box-shadow: var(--nfe-shadow-lg); }
.wa2-dev-qr svg { width: 100%; height: 100%; transition: opacity .2s var(--nfe-ease), filter .2s var(--nfe-ease); }
.wa2-dev-qr.expired svg { opacity: .12; filter: blur(2px); }
.wa2-dev-renew { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); height: 42px; border-radius: 999px; border: 0; background: #050505; color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wa2-dev-qr.done { flex-direction: column; }
.wa2-dev-qr.done .wa2-dev-renew { position: static; transform: none; margin-top: 14px; padding: 0 16px; height: 38px; }
.wa2-dev-ok { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #050505; text-align: center; }
.wa2-dev-ok i { width: 56px; height: 56px; border-radius: 50%; background: #c7ff00; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 6px; animation: wa2Pop .22s var(--nfe-ease) both; }
.wa2-dev-ok b { font-size: 16px; }
.wa2-dev-ok span { font-size: 12px; color: #6b7280; }
@keyframes wa2Pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.wa2-dev-timer { font-size: 12px; color: rgb(var(--nfe-500)); min-height: 18px; margin: 0; font-variant-numeric: tabular-nums; }
.wa2-dev-how h4, .wa2-dev-list h4 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 12px; }
.wa2-dev-how ol { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.wa2-dev-how li { counter-increment: s; display: flex; gap: 10px; font-size: 14px; color: rgb(var(--nfe-700)); line-height: 1.4; }
.wa2-dev-how li::before { content: counter(s); flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-lime)); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wa2-dev-note { display: flex; gap: 8px; font-size: 12px; color: rgb(var(--nfe-500)); margin: 0 0 6px; line-height: 1.45; }
.wa2-dev-note i { margin-top: 2px; color: rgb(var(--nfe-700)); }
.wa2-dev-list { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgb(var(--nfe-100)); }
.wa2-dev-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.wa2-dev-item + .wa2-dev-item { border-top: 1px solid rgb(var(--nfe-100)); }
.wa2-dev-ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: rgb(var(--nfe-100)); color: rgb(var(--nfe-800)); display: flex; align-items: center; justify-content: center; }
.wa2-dev-item .min-w-0 { flex: 1; }
.wa2-dev-name { font-size: 14px; font-weight: 600; margin: 0; }
.wa2-dev-this { white-space: nowrap; display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: rgb(var(--nfe-lime)); color: #050505; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 2px; }
.wa2-dev-seen { font-size: 12px; color: rgb(var(--nfe-500)); margin: 1px 0 0; }
.wa2-dev-off { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #fecaca; color: #b91c1c; background: transparent; font-size: 12px; font-weight: 600; }
.wa2-dev-off:hover { background: #fef2f2; }
.wa2-dev-empty { font-size: 13px; color: rgb(var(--nfe-500)); margin: 0; }
.wa2-dev-err { font-size: 13px; color: #b91c1c; text-align: center; margin: 0; }

/* celular: uma coluna (lista ou conversa), ocupando a tela */
@media (max-width: 767px) {
  .wa2-page > div:first-child { margin-bottom: 12px !important; gap: 10px !important; }
  .wa2-page > div:first-child p { display: none; }
  .wa2-page > div:first-child h1 { font-size: 22px; }
  .wa2-page > div:first-child > div:last-child { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .wa2-page > div:first-child > div:last-child > * { flex-shrink: 0; }
  .wa2 { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 150px); min-height: 400px; border-radius: 18px; }
  .wa2-page, .wa2-page > div:first-child, .wa2-page > div:first-child > div:last-child { min-width: 0; max-width: 100%; }
  .wa2-side { border-right: 0; }
  .wa2 .wa2-chat { display: none; }
  .wa2.wa2-open .wa2-side { display: none; }
  .wa2.wa2-open .wa2-chat { display: flex; }
  .wa2-back { display: inline-flex; align-items: center; justify-content: center; margin-left: -8px; }
  .wa2-act span { display: none; }
  .wa2-chat-head { padding: 10px 12px; gap: 8px; }
  .wa2-who { gap: 10px; }
  .wa2-av.lg { width: 36px; height: 36px; font-size: 13px; }
  .wa2-who-name { font-size: 14px; }
  .wa2-page:has(.wa2-open) > div:first-child { display: none; }
  .wa2-actions .nfe-wa-del-top { font-size: 0 !important; width: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
  .wa2-actions .nfe-wa-del-top i { font-size: 13px; margin: 0 !important; }
  .wa2-act { width: 36px; padding: 0; justify-content: center; }
  .wa2-bubble { max-width: 86%; }
  .wa2-msgs { padding: 14px 10px; }
  .wa2-thread { padding: 12px 8px; }
  .wa2-dev { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .wa2-dev-qr { width: 220px; height: 220px; }
}
/* modo escuro: o preto da marca vira claro nas variáveis; avatar e números ficam em grafite com o verde-limão */
html[data-theme="dark"] .wa2-av, html[data-theme="dark"] .wa2-welcome-mark, html[data-theme="dark"] .wa2-dev-how li::before { background: #1f1f1d; color: rgb(var(--nfe-lime)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
html[data-theme="dark"] .wa2-av i { color: rgb(255 255 255 / .75); }
html[data-theme="dark"] .wa2-msg.out .wa2-meta .wa2-read { color: #4d7c0f; }
/* áudio do WhatsApp (nfe-wa-audio.js): campo vazio mostra o microfone, com texto mostra o Enviar (como no WhatsApp) */
.wa2-composer { position: relative; }
.wa2-composer:has(.wa2-mic):has(textarea:placeholder-shown) #wa-send-btn { display: none; }
.wa2-composer:not(:has(textarea:placeholder-shown)) .wa2-mic { display: none; }
.wa2-rec { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: inherit; background: rgb(var(--nfe-white)); animation: nfeFade .18s ease both; }
.wa2-rec-cancel { color: #b91c1c !important; }
.wa2-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; flex-shrink: 0; animation: wa2Pulse 1.2s ease-in-out infinite; }
.wa2-rec-time { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: rgb(var(--nfe-900)); }
.wa2-rec-hint { flex: 1; min-width: 0; font-size: 13px; color: rgb(var(--nfe-500)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes wa2Pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .wa2-rec, .wa2-rec-dot { animation: none; } }

/* Notificações push (nfe-push.js, 3.65.0): faixa de convite, linha no sininho e ajuda do iPhone */
.nfe-push-bar { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top) + 68px); transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #050505; color: #fff; border-radius: 16px; box-shadow: var(--nfe-shadow-lg);
  font-size: 13px; line-height: 1.35; animation: nfePushIn .32s var(--nfe-ease) both; }
.nfe-push-bar > i { color: rgb(var(--nfe-lime)); flex: none; }
.nfe-push-bar > span { flex: 1; min-width: 0; }
.nfe-push-go { flex: none; background: rgb(var(--nfe-lime)); color: #050505; font-weight: 700; border-radius: 10px; padding: 8px 14px; min-height: 36px; transition: transform .16s var(--nfe-ease); }
.nfe-push-go:active { transform: scale(.97); }
.nfe-push-x { flex: none; width: 36px; height: 36px; border-radius: 10px; color: rgba(255,255,255,.6); }
.nfe-push-x:hover { color: #fff; background: rgba(255,255,255,.08); }
@keyframes nfePushIn { from { opacity: 0; transform: translate(-50%, -12px); } }
@media (prefers-reduced-motion: reduce) { .nfe-push-bar { animation: none; } }
.nfe-push-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid rgb(var(--nfe-100, 240 240 240)); font-size: 12px; color: #444; }
.nfe-push-row > span { flex: 1; min-width: 0; }
.nfe-push-row > i { color: #050505; }
.nfe-push-row button { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; border: 1px solid #e5e5e5; background: #fff; }
.nfe-push-row button.hl { background: rgb(var(--nfe-lime)); border-color: transparent; color: #050505; }
.nfe-push-help p { font-size: 14px; color: #333; margin-bottom: 10px; }
.nfe-push-help ol { list-style: decimal; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }

/* Listas do WhatsApp (nfe-wa-listas.js, 3.66.0): "Adicionar à lista", etiquetas e filtro */
.wl-wrap { position: relative; }
.wl-btn .wl-caret { font-size: 10px; opacity: .7; }
.wl-btn.has > i:first-child { color: rgb(var(--nfe-900)); }
.wl-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 240px; max-width: calc(100vw - 32px); padding: 6px; border-radius: 14px;
  background: rgb(var(--nfe-white)); border: 1px solid rgb(var(--nfe-200)); box-shadow: var(--nfe-shadow-lg); transform-origin: top right; animation: wlIn .16s var(--nfe-ease) both; }
@keyframes wlIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .wl-menu { animation: none; } }
.wl-items { max-height: 280px; overflow-y: auto; }
.wl-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13px; font-weight: 500; color: rgb(var(--nfe-900)); text-align: left; background: none; border: 0; }
.wl-item:hover, .wl-item:focus-visible { background: rgb(var(--nfe-100)); outline: none; }
.wl-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-dot { width: 10px; height: 10px; border-radius: 999px; flex: none; display: inline-block; }
.wl-ic { width: 14px; text-align: center; color: rgb(var(--nfe-600)); font-size: 12px; }
.wl-check { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid rgb(var(--nfe-400, 160 160 160)); display: grid; place-items: center; font-size: 10px; color: #050505; transition: background .12s; }
.wl-item[aria-checked="true"] .wl-check { background: rgb(var(--nfe-lime)); border-color: rgb(var(--nfe-lime)); }
.wl-sep { height: 1px; background: rgb(var(--nfe-200)); margin: 6px 4px; }
.wl-empty { font-size: 12px; color: rgb(var(--nfe-500)); padding: 8px 10px; }
.wl-new { display: flex; gap: 6px; padding: 4px; }
.wl-new input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); font-size: 13px; }
.wl-new button { height: 34px; padding: 0 12px; border-radius: 9px; background: rgb(var(--nfe-lime)); color: #050505; font-weight: 700; font-size: 12px; border: 0; }
.wl-new-lg { padding: 12px 0 0; }
.wl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wl-tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: rgb(var(--nfe-700)); background: rgb(var(--nfe-100)); }
.wl-tag .wl-dot { width: 7px; height: 7px; }
.wa2-chips { overflow-x: auto; scrollbar-width: none; }
.wa2-chips::-webkit-scrollbar { display: none; }
.wa2-chips button { flex: none; }
.wa2-chips .wl-chip[aria-pressed="true"] { background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); }
.wl-manage { display: grid; gap: 8px; }
.wl-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px 10px; padding: 10px; border: 1px solid rgb(var(--nfe-200)); border-radius: 12px; }
.wl-row input { height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); font-size: 13px; min-width: 0; }
.wl-colors { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.wl-colors button { width: 22px; height: 22px; border-radius: 999px; border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgb(var(--nfe-white)); }
.wl-colors button[aria-checked="true"] { border-color: rgb(var(--nfe-900)); }
.wl-count { font-size: 11px; color: rgb(var(--nfe-500)); white-space: nowrap; }
.wl-del { width: 34px; height: 34px; border-radius: 9px; color: #b91c1c; }
.wl-del:hover { background: rgb(254 226 226); }
@media (max-width: 767px) { .wl-btn .wl-caret { display: none; } }

/* Player de áudio (nfe-wa-voz.js, 3.67.0): botão redondo, ondas que se preenchem, tempo e velocidade */
.wa2-voice { display: flex; align-items: center; gap: 10px; width: min(300px, 64vw); padding: 2px 0 4px; }
.wa2-vplay { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; font-size: 14px; border: 0;
  background: rgb(var(--nfe-900)); color: rgb(var(--nfe-lime)); transition: transform .16s var(--nfe-ease); }
.wa2-vplay .fa-play { margin-left: 2px; }
.wa2-vplay:active { transform: scale(.94); }
.wa2-msg.out .wa2-vplay { background: rgb(var(--nfe-lime)); color: #050505; }
.wa2-vbody { flex: 1; min-width: 0; display: grid; gap: 5px; }
.wa2-vwave { height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; touch-action: none; border-radius: 6px; }
.wa2-vwave:focus-visible { outline: 2px solid rgb(var(--nfe-lime)); outline-offset: 2px; }
.wa2-vwave i { flex: 1; min-width: 2px; border-radius: 999px; background: rgb(var(--nfe-900) / .22); transition: background .12s linear; }
.wa2-vwave i.on { background: rgb(var(--nfe-900)); }
.wa2-msg.out .wa2-vwave i { background: rgb(var(--nfe-white) / .3); }
.wa2-msg.out .wa2-vwave i.on { background: rgb(var(--nfe-lime)); }
.wa2-vmeta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .75; }
.wa2-vspeed { height: 20px; min-width: 34px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 0;
  background: rgb(var(--nfe-900) / .08); color: inherit; }
.wa2-msg.out .wa2-vspeed { background: rgb(var(--nfe-white) / .14); }
.wa2-voice.playing .wa2-vmeta, .wa2-voice.started .wa2-vmeta { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .wa2-vwave i { transition: none; } }

/* Enviar para o cliente (nfe-wa-modelos.js, 3.68.0): Cobrança, Treinamento e Outros modelos */
.wm { display: grid; gap: 16px; }
.wm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgb(var(--nfe-100)); }
.wm-tabs button { height: 38px; border-radius: 10px; border: 0; background: none; font-size: 13px; font-weight: 600; color: rgb(var(--nfe-600)); display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .16s var(--nfe-ease), color .16s; }
.wm-tabs button[aria-selected="true"] { background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); box-shadow: var(--nfe-shadow-sm); }
.wm-tabs button[aria-selected="true"] i { color: rgb(var(--nfe-900)); }
.wm-pane { display: grid; gap: 14px; }
.wm-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--nfe-500)); margin-bottom: 6px; }
.wm-label-s { text-transform: none; letter-spacing: 0; font-weight: 500; }
.wm-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid rgb(var(--nfe-200)); }
.wm-av { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-lime)); }
.wm-card-t { font-weight: 700; font-size: 14px; color: rgb(var(--nfe-900)); }
.wm-card-s { font-size: 12px; color: rgb(var(--nfe-500)); }
.wm-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wm-chips.one { grid-template-columns: 1fr; margin-bottom: 8px; }
.wm-chips button, .wm-list button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); display: grid; gap: 2px; transition: border-color .16s, box-shadow .16s; }
.wm-chips b, .wm-list b { font-size: 13px; color: rgb(var(--nfe-900)); }
.wm-chips span, .wm-list span { font-size: 11px; color: rgb(var(--nfe-500)); }
.wm-chips button[aria-pressed="true"], .wm-list button[aria-pressed="true"] { border-color: rgb(var(--nfe-900)); box-shadow: 0 0 0 3px rgb(var(--nfe-lime) / .45); }
.wm-list { display: grid; gap: 6px; max-height: 190px; overflow-y: auto; }
.wm-select, .wm-text, .wm-vars input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); font-size: 14px; }
.wm-text { resize: vertical; line-height: 1.45; }
.wm-vars { display: grid; gap: 8px; }
.wm-vars label { display: grid; gap: 4px; }
.wm-vars label > span { font-size: 11px; font-weight: 700; color: rgb(var(--nfe-500)); }
.wm-chat { padding: 14px; border-radius: 14px; background: rgb(var(--nfe-100)) radial-gradient(rgb(var(--nfe-900) / .06) 1px, transparent 1.2px) 0 0 / 16px 16px; display: flex; justify-content: flex-end; }
.wm-bubble { max-width: 92%; padding: 9px 12px 6px; border-radius: 16px 16px 6px 16px; background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.wm-bubble mark { background: rgb(var(--nfe-lime)); color: #050505; border-radius: 4px; padding: 0 3px; }
.wm-bubble u { color: rgb(var(--nfe-lime)); text-decoration: none; }
.wm-time { display: block; text-align: right; font-size: 10.5px; opacity: .6; margin-top: 3px; }
.wm-hint { font-size: 12px; color: rgb(var(--nfe-500)); margin-top: 6px; }
.wm-media { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: rgb(var(--nfe-600)); }
.wm-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; }
.wm-note i { margin-top: 2px; }
.wm-note.ok { background: rgb(22 163 74 / .1); color: #166534; }
.wm-note.warn { background: rgb(245 158 11 / .12); color: #92400e; }
html[data-theme="dark"] .wm-note.ok { color: #86efac; }
html[data-theme="dark"] .wm-note.warn { color: #fcd34d; }
.wm-actions { display: grid; gap: 8px; }
.wm-btn { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .16s var(--nfe-ease), opacity .16s; }
.wm-btn:active { transform: scale(.98); }
.wm-btn:disabled { opacity: .6; }
.wm-btn.primary { background: rgb(var(--nfe-900)); color: rgb(var(--nfe-white)); border-color: transparent; }
.wm-btn.primary.green { background: #16a34a; color: #fff; }
.wm-btn.ghost { border-color: transparent; min-height: 38px; font-size: 13px; color: rgb(var(--nfe-600)); }
.wm-empty { font-size: 13px; color: rgb(var(--nfe-500)); padding: 18px 4px; text-align: center; }
@media (max-width: 480px) { .wm-tabs button span { font-size: 12px; } .wm-chips { grid-template-columns: 1fr; } }

/* WhatsApp em tela cheia (3.70.0): ícone discreto no topo da conversa */
.wa2-full-btn { width: 32px; height: 36px; flex: none; border: 0; background: none; border-radius: 10px; color: rgb(var(--nfe-400, 160 160 160)); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; transition: color .16s, background .16s; }
.wa2-full-btn:hover, .wa2-full-btn:focus-visible { color: rgb(var(--nfe-900)); background: rgb(var(--nfe-100)); outline: none; }
body.wa2-fullscreen { overflow: hidden; }
body.wa2-fullscreen .wa2-page { transform: none !important; animation: none !important; } /* o fade-in deixa transform e prenderia o position: fixed */
body.wa2-fullscreen #wa2 { position: fixed; left: 0; right: 0; top: 0; z-index: 65; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
body.wa2-fullscreen #wa2 .wa2-chat-head { padding-top: max(10px, env(safe-area-inset-top)); }
body.wa2-fullscreen #wa2 .wa2-side-head { padding-top: max(14px, env(safe-area-inset-top)); }
@media (max-width: 767px) { .wa2-full-btn { width: 30px; } }
.wa2-side-title .wa2-full-btn { margin-left: auto; height: 30px; }

/* ===== Ficha do cliente › NFE Plataforma (identidade NFE: preto, branco e verde-limão, com o "n" da marca) ===== */
.nfp { --nfp-ink: #050505; --nfp-lime: rgb(var(--nfe-lime)); border-radius: 20px; overflow: hidden; background: rgb(var(--nfe-white)); border: 1px solid rgb(var(--nfe-200)); box-shadow: var(--nfe-shadow-sm); }
.nfp-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 26px 26px 24px; color: #fff; background:
  radial-gradient(520px 260px at 100% 120%, rgb(var(--nfe-lime) / .22), transparent 70%),
  linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
  var(--nfp-ink); }
@media (min-width: 1024px) { .nfp-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 30px 32px 28px; } }
.nfp-mark { position: absolute; z-index: -1; right: -70px; top: -30px; width: 380px; height: auto; fill: rgb(var(--nfe-lime) / .04); stroke: var(--nfp-lime); stroke-width: 1.1; opacity: .38; filter: drop-shadow(0 0 18px rgb(var(--nfe-lime) / .35)); pointer-events: none; }
.nfp-brand { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid rgb(var(--nfe-lime) / .45); border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--nfp-lime); }
.nfp-brand svg { width: 22px; height: 22px; display: block; }
.nfp-title { margin: 14px 0 4px; font-size: 26px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: #fff; overflow-wrap: anywhere; }
.nfp-sub { font-size: 13px; color: rgba(255,255,255,.62); max-width: 46ch; }
.nfp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nfp-cta, .nfp-ghost { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.nfp-cta { background: var(--nfp-lime); color: var(--nfp-ink); box-shadow: 0 10px 24px -12px rgb(var(--nfe-lime) / .95); }
.nfp-cta:hover { box-shadow: 0 14px 30px -12px rgb(var(--nfe-lime)); transform: translateY(-1px); }
.nfp-ghost { color: #fff; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); }
.nfp-ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.09); }
.nfp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .nfp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nfp-title { font-size: 22px; } .nfp-hero { padding: 22px 18px; } }
.nfp-stat { min-width: 84px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nfp-stat b { display: block; font-size: 24px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; }
.nfp-stat span { display: block; margin-top: 6px; font-size: 11px; color: rgba(255,255,255,.55); }
.nfp-stat:first-child b { color: var(--nfp-lime); }

.nfp-body { padding: 22px 26px 24px; display: grid; gap: 22px; }
@media (min-width: 1024px) { .nfp-body { padding: 24px 32px 28px; } }
@media (max-width: 520px) { .nfp-body { padding: 18px; } .nfp .nfp-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .nfp .nfp-mark { width: 230px; top: auto; bottom: 120px; right: -110px; opacity: .3; } .nfp .nfp-feat .nfp-select { font-size: 16px; height: 36px; } }
.nfp-groups { display: grid; gap: 18px; }
@media (min-width: 1280px) { .nfp-groups { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 28px; } }
.nfp-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--nfe-500)); }
.nfp-label::before { content: ""; width: 14px; height: 3px; border-radius: 3px; background: var(--nfp-lime); }
.nfp-label a { letter-spacing: 0; text-transform: none; font-weight: 600; color: rgb(var(--nfe-700)); text-decoration: underline; text-underline-offset: 3px; }
.nfp-label a i { font-size: 9px; margin-left: 2px; }
.nfp-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.nfp-tile, .nfp-tiles > button:not(.nfp-tile) { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px 0 6px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); font-size: 13.5px; font-weight: 600; }
.nfp-tiles > button:not(.nfp-tile) svg, .nfp-tiles > button:not(.nfp-tile) > i { flex: none; box-sizing: border-box; width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: rgb(var(--nfe-100)); color: currentColor !important; transition: background-color .18s var(--nfe-ease), color .18s var(--nfe-ease); }
.nfp-tiles > button:not(.nfp-tile) > i { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 13px; }
.nfp-tiles > button:not(.nfp-tile):not(:has(span, svg)) { padding: 0 5px; }
.nfp-tiles > button:not(.nfp-tile):hover svg, .nfp-tiles > button:not(.nfp-tile):hover > i { background: var(--nfp-lime); color: var(--nfp-ink) !important; }
.nfp-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--nfe-100)); font-size: 13px; transition: background-color .18s var(--nfe-ease), color .18s var(--nfe-ease); }
.nfp-tile:hover, .nfp-tiles > button:not(.nfp-tile):hover { border-color: rgb(var(--nfe-900)); background: rgb(var(--nfe-white)); transform: translateY(-1px); box-shadow: var(--nfe-shadow-lg); }
.nfp-tile:hover .nfp-ico { background: var(--nfp-lime); color: var(--nfp-ink); }
.nfp-tile:focus-visible, .nfp-tiles > button:focus-visible, .nfp-cta:focus-visible, .nfp-ghost:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(var(--nfe-lime) / .6); }

.nfp-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.nfp-feat { position: relative; padding: 12px 12px 11px; border-radius: 14px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-50)); overflow: hidden; }
.nfp-feat[data-state="ativado"] { background: rgb(var(--nfe-white)); border-color: rgb(var(--nfe-300)); }
.nfp-feat[data-state="ativado"]::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--nfp-lime); }
.nfp-feat-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nfp-feat-name { font-size: 12.5px; font-weight: 700; color: rgb(var(--nfe-900)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nfp-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--nfe-300)); }
.nfp-feat[data-state="ativado"] .nfp-dot { background: var(--nfp-lime); box-shadow: 0 0 0 3px rgb(var(--nfe-lime) / .25), 0 0 0 1px #050505 inset; }
.nfp-feat[data-state="em_configuracao"] .nfp-dot { background: #f59e0b; }
.nfp-feat[data-state="com_falha"] .nfp-dot, .nfp-feat[data-state="suspenso"] .nfp-dot { background: #ef4444; }
.nfp-feat[data-state="desativado"] .nfp-dot { background: transparent; box-shadow: 0 0 0 1.5px rgb(var(--nfe-400)) inset; }
.nfp-select { width: 100%; height: 32px; padding: 0 28px 0 10px; border-radius: 9px; border: 1px solid rgb(var(--nfe-200)); font-size: 12.5px; font-weight: 600; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-color: rgb(var(--nfe-white)); color: rgb(var(--nfe-900));
  background-image: linear-gradient(45deg, transparent 50%, rgb(var(--nfe-500)) 50%), linear-gradient(135deg, rgb(var(--nfe-500)) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.nfp-select:hover { border-color: rgb(var(--nfe-400)); }
.nfp-note { margin-top: 6px; font-size: 10.5px; color: rgb(var(--nfe-400)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nfp-users { padding-top: 18px; border-top: 1px solid rgb(var(--nfe-100)); }
.nfp-user { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgb(var(--nfe-200)); background: rgb(var(--nfe-white)); }
.nfp-user + .nfp-user { margin-top: 8px; }
.nfp-user.is-off { opacity: .7; }
.nfp-avatar { flex: none; width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: #050505; color: var(--nfp-lime); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.nfp-user-id { display: flex; flex-direction: column; min-width: 180px; line-height: 1.25; }
.nfp-user-id b { font-size: 13.5px; }
.nfp-user-id span { font-size: 12.5px; color: rgb(var(--nfe-500)); overflow-wrap: anywhere; }
.nfp-user-perms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-left: auto; }
.nfp-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: rgb(var(--nfe-700)); cursor: pointer; user-select: none; }
.nfp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nfp-switch span { position: relative; flex: none; width: 32px; height: 19px; border-radius: 999px; background: rgb(var(--nfe-200)); transition: background-color .2s var(--nfe-ease); }
.nfp-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s var(--nfe-ease), background-color .2s var(--nfe-ease); }
.nfp-switch input:checked + span { background: var(--nfp-lime); }
.nfp-switch input:checked + span::after { transform: translateX(13px); background: #050505; }
.nfp-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgb(var(--nfe-lime) / .5); }
.nfp-link { font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: rgb(var(--nfe-700)); }
.nfp-link.is-danger { color: #dc2626; }
.nfp-hint { margin-top: 10px; font-size: 11.5px; color: rgb(var(--nfe-400)); }
html[data-theme="dark"] .nfp-hero { box-shadow: inset 0 -1px 0 rgb(var(--nfe-lime) / .15); }
@media (prefers-reduced-motion: reduce) { .nfp *, .nfp *::after { transition: none !important; } .nfp-tile:hover, .nfp-cta:hover { transform: none; } }

/* ---------------------------------------------------------------- tema escuro: telas com cores próprias (29/11/2026)
 * Menu lateral fica preto nos dois temas (no escuro, um tom acima do fundo, com contorno); faixas e cartões que tinham
 * branco fixo passam a seguir a escala --nfe-* (fundo escuro, texto claro). */
html[data-theme="dark"] { --nfe-rail-bg: #191919; }
html[data-theme="dark"] #sidebar { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07), 0 18px 50px -12px rgba(0, 0, 0, .7) !important; }
#sidebar img.nfe-logo-custom { filter: none !important; }
#sidebar img.nfe-logo-custom[data-tone="dark"] { filter: invert(1) hue-rotate(180deg) !important; }
.nfe-strip { background: #111111 !important; color: #fff !important; }
html[data-theme="dark"] .nfe-strip { background: #191919 !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07); }
.nfe-strip i { color: rgb(var(--nfe-lime)); }
html[data-theme="dark"] .nfe-appbar.ins { background: #191919; color: #f5f5f5; border-color: #2e2e2e; }
html[data-theme="dark"] .nfe-appbar.ins .go { background: #f5f5f5; color: #111; }
/* Marketing e Publicar nas redes */
html[data-theme="dark"] :is(.mk-kpi, .mk-card, .pb-kind, .pb-scr, .pb-chip, .nt-chip, .nt-card, .nt-view, .nt-menu, .wn-card, .wn-pill, .wn-btn, .ncf-card) { background: rgb(var(--nfe-white)) !important; border-color: rgb(var(--nfe-200)) !important; color: rgb(var(--nfe-900)); }
html[data-theme="dark"] .mk-ch { background: rgb(var(--nfe-white)); border-color: rgb(var(--nfe-200)); }
html[data-theme="dark"] :is(.mk-kpi .v, .mk-card h3, .mk-ch .nums b) { color: rgb(var(--nfe-900)); }
html[data-theme="dark"] :is(.mk-kpi .t, .mk-kpi .s, .ncf-sub) { color: rgb(var(--nfe-500)); }
html[data-theme="dark"] :is(.mk-kpi .t i, .mk-tag) { background: rgb(var(--nfe-100)); color: rgb(var(--nfe-900)); }
html[data-theme="dark"] :is(.mk-empty, .pb-day.out, .ncf-note) { background: rgb(var(--nfe-50)); border-color: rgb(var(--nfe-200)); color: rgb(var(--nfe-600)); }
html[data-theme="dark"] .mk-bar > span { background: rgb(var(--nfe-lime)); }
html[data-theme="dark"] :is(.pb-net, .pb-when, .pb-drop) { border-color: rgb(var(--nfe-200)); }
html[data-theme="dark"] .wn-btn:hover, html[data-theme="dark"] .nt-view:hover { background: rgb(var(--nfe-100)) !important; }
/* Cloudflare */
html[data-theme="dark"] .ncf-bar { background: rgb(var(--nfe-100)); }
html[data-theme="dark"] .ncf-t :is(th, td) { border-bottom-color: rgb(var(--nfe-100)); }
html[data-theme="dark"] .ncf-ok { color: #86efac; } html[data-theme="dark"] .ncf-warn { color: #fcd34d; } html[data-theme="dark"] .ncf-bad { color: #fca5a5; }
html[data-theme="dark"] .ncf :is(button, a)[style*="#111827"] { background: #f5f5f5 !important; color: #111 !important; }
html[data-theme="dark"] .ncf [style*="#d1d5db"] { border-color: rgb(var(--nfe-300)) !important; }
html[data-theme="dark"] .ncf code { background: rgb(var(--nfe-100)) !important; }
/* Contabilidade */
html[data-theme="dark"] .nct { --g1: #202020; --g2: #2e2e2e; --mut: #9a9a9a; color: #f5f5f5; }
html[data-theme="dark"] :is(.nct-card, .nct-reg, .nct-btn) { background: rgb(var(--nfe-white)); color: rgb(var(--nfe-900)); }
html[data-theme="dark"] .nct-hero, html[data-theme="dark"] .nct-lockcard { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07); }
html[data-theme="dark"] .nct-skel { background: linear-gradient(90deg, #1c1c1c, #262626, #1c1c1c); background-size: 200% 100%; }
