/* Painel e backoffice do PlugueMeta, app shell estilo Supabase (replicado do
   PlugueZap), recolorido para a marca do PlugueMeta (azul Meta). */
:root {
  --accent: #0064e0;
  --accent-hover: #0052b8;
  --accent-soft: #e7f0ff;
  --lime: #8a2bff;
  --lime-soft: #efe9ff;
  --lime-ink: #6d28d9;
  --bg: #fbfbfb;
  --panel: #ffffff;
  --sidebar: #fcfcfc;
  --border: #ededed;
  --border-strong: #e0e0e0;
  --hov: #f1f1f1;
  --text: #1c1c1c;
  --text-2: #525252;
  --text-3: #8a8a8a;
  --danger: #d6453d;
  --danger-soft: #fdecea;
  --ok: #1fa855;
  --warn: #b88900;
  --warn-soft: #fff4d6;
  --radius: 9px;
  --topbar-h: 56px;
  --sidebar-w: 240px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.04);
  --shadow-pop: 0 10px 30px rgba(0,0,0,.12);
  --grad: linear-gradient(100deg,#19e3ff 0%,#2b5cff 48%,#8a2bff 100%);
  --fonte: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--fonte); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 14px; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.marca-m { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: inline-block; flex: none; }
.brand-logo { width: 27px; height: 27px; object-fit: contain; display: block; flex: none; }
.auth-logo .brand-logo { width: 32px; height: 32px; }

/* ---------------- Topbar ---------------- */
.topbar { height: var(--topbar-h); background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 0; position: sticky; top: 0; z-index: 30; }
.topbar .esq { display: flex; align-items: stretch; gap: 0; min-width: 0; height: 100%; position: relative; }
.brand { display: flex; align-items: center; gap: 9px; }
/* Célula do logo: mesma largura da sidebar, com divisória à direita (igual ao padrão da família) */
.topbar .brand { width: var(--sidebar-w); flex: none; height: 100%; padding: 0 16px; border-right: 1px solid var(--border); transition: width .18s ease, padding .18s ease; }
body.side-collapsed .topbar .brand { justify-content: center; padding: 0; }
body.side-collapsed .topbar .brand .nome { display: none; }
.brand .nome { font-weight: 700; font-size: 14px; letter-spacing: -.2px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; min-width: 0; padding-left: 24px; }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .atual { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb .tag-admin { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--accent-hover); background: var(--accent-soft); padding: 2px 8px; border-radius: 20px; }
.topbar .dir { display: flex; align-items: center; gap: 10px; position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 7px; border-radius: 8px; background: transparent; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background .12s, border-color .12s; }
.user-chip:hover { background: #f4f4f4; }
.user-chip.aberto { background: #f4f4f4; border-color: var(--border); }
.user-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.user-chip .uname { font-size: 13px; color: var(--text-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .chip-caret { width: 15px; height: 15px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.user-chip.aberto .chip-caret { transform: rotate(180deg); }

.user-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 196px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 38px rgba(10, 13, 31, .14); padding: 6px; display: none; z-index: 60; }
.user-menu.aberto { display: block; animation: um-pop .15s ease; }
@keyframes um-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.um-item { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; background: transparent; border: none; font-family: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; text-decoration: none; transition: background .1s; }
.um-item:hover { background: #f4f4f4; }
.um-item svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.um-item .svg-inline--fa { width: auto; height: 16px; flex: none; fill: currentColor; stroke: none; }
.um-item.perigo { color: var(--danger); }
.um-item.perigo:hover { background: var(--danger-soft); }
.um-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* Launcher (grade de apps da família Plugue) — padrão PlugueCRM */
/* Sino de notificações (antes do avatar) */
.sino { position: relative; background: transparent; border: none; cursor: pointer; color: var(--text-2); padding: 7px; border-radius: 8px; display: grid; place-items: center; }
.sino svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sino:hover { background: #f4f4f4; color: var(--text); }
.sino i { font-size: 18px; line-height: 1; }
.sino-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 10px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid var(--panel); }
.sino-pop { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-pop); display: none; overflow: hidden; }
.sino-pop.aberto { display: block; animation: um-pop .15s ease; }
.sino-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sino-head b { font-size: 14px; color: var(--text); }
.sino-head button { background: transparent; border: none; cursor: pointer; font-family: inherit; font-size: 12px; color: var(--accent); font-weight: 600; padding: 2px 4px; border-radius: 6px; }
.sino-head button:hover { background: var(--accent-soft); }
.sino-lista { max-height: 420px; overflow-y: auto; }
.sino-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; }
.sino-item:last-child { border-bottom: none; }
.sino-item:hover { background: #f7f9fc; }
.sino-item .si-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.sino-item.lida .si-dot { background: var(--border-strong); }
.sino-item.lida .si-tit { color: var(--text-2); font-weight: 500; }
.si-corpo { min-width: 0; flex: 1; }
.si-tit { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.si-msg { font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
.si-quando { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.sino-vazio { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.lnch-btn { background: transparent; border: none; cursor: pointer; color: var(--text-2); padding: 7px; border-radius: 8px; display: grid; place-items: center; }
.lnch-btn:hover { background: #f4f4f4; color: var(--text); }
.lnch-btn svg { width: 20px; height: 20px; }
.lnch-pop { position: fixed; z-index: 60; width: min(92vw, 396px); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 14px; display: none; }
.lnch-pop.aberto { display: block; animation: um-pop .15s ease; }
.lnch-head { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); padding: 0 2px 10px; }
.lnch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lnch-app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 12px; text-decoration: none; color: var(--text-2); position: relative; cursor: pointer; }
.lnch-ico { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; position: relative; }
.lnch-ico::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: #f4f4f4; opacity: 0; transition: opacity .12s; z-index: 0; }
.lnch-app.on:hover .lnch-ico::before { opacity: 1; }
.lnch-ico img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }
.lnch-ico.lnch-ini { font-size: 19px; font-weight: 800; color: #fff; background: var(--c, var(--accent)); border-radius: 12px; }
.lnch-nm { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--text-2); max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.lnch-app.aqui .lnch-ico { box-shadow: 0 0 0 2px var(--c, var(--accent)); }
.lnch-app.aqui .lnch-nm { color: var(--c, var(--accent)); font-weight: 700; }
.lnch-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; }
.lnch-app.lock, .lnch-app.off { cursor: default; }
.lnch-app.lock .lnch-ico img { filter: grayscale(1); opacity: .5; }
.lnch-app.off .lnch-ico img { filter: grayscale(1); opacity: .3; }
.lnch-app.lock .lnch-ico.lnch-ini, .lnch-app.off .lnch-ico.lnch-ini { filter: grayscale(1); opacity: .5; background: var(--border-strong); color: var(--text-3); }
.lnch-lock { position: absolute; top: 8px; right: calc(50% - 30px); width: 16px; height: 16px; background: var(--panel); border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); z-index: 2; }
.lnch-lock svg { width: 10px; height: 10px; stroke: var(--text-3); fill: none; stroke-width: 2.4; }
.btn-ghost { font-family: inherit; font-size: 13px; color: var(--text-2); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 7px; padding: 6px 12px; cursor: pointer; transition: background .12s; display: inline-flex; align-items: center; gap: 7px; }
.btn-ghost:hover { background: #f4f4f4; }
.btn-ghost svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------------- Modo suporte ---------------- */
.suporte-bar { display: none; align-items: center; justify-content: space-between; gap: 14px; background: #fff4d6; border-bottom: 1px solid #f0d98a; color: #6b5200; padding: 9px 16px; font-size: 13px; position: sticky; top: var(--topbar-h); z-index: 29; }
.suporte-bar.on { display: flex; }
.suporte-bar .sb-txt b { color: #5a4500; }
.suporte-bar .sb-sair { flex: none; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #6b5200; color: #fff; border: none; border-radius: 7px; padding: 6px 13px; }
.suporte-bar .sb-sair:hover { background: #594400; }

/* seletor de contas (backoffice) */
.sel-contas { display: none; position: fixed; z-index: 50; width: 320px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-pop); overflow: hidden; }
.sel-contas.aberto { display: block; }
.sel-contas .sc-busca { padding: 10px; border-bottom: 1px solid var(--border); }
.sel-contas .sc-busca input { width: 100%; font-family: inherit; font-size: 13px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; }
.sel-contas .sc-busca input:focus { border-color: var(--accent); }
.sel-contas .sc-lista { max-height: 320px; overflow-y: auto; }
.sel-contas .sc-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; cursor: pointer; border-bottom: 1px solid var(--border); }
.sel-contas .sc-item:last-child { border-bottom: none; }
.sel-contas .sc-item:hover { background: #f5f6f6; }
.sel-contas .sc-nome { font-size: 13.5px; color: var(--text); font-weight: 500; }
.sel-contas .sc-mail { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.sel-contas .sc-vazio { padding: 18px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------------- Layout corpo ---------------- */
.corpo { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh - var(--topbar-h)); transition: grid-template-columns .18s ease; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); padding: 14px 12px; display: flex; flex-direction: column; }
/* Botão circular de recolher/expandir, posicionado sobre a divisória do logo */
.topbar .side-toggle { position: absolute; left: var(--sidebar-w); top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer;
  box-shadow: var(--shadow); z-index: 32; transition: left .18s ease, background .12s, color .12s; }
.topbar .side-toggle:hover { background: #f1f1f1; color: var(--text); border-color: var(--border-strong); }
.topbar .side-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-toggle .ic-exp { display: none; }
body.side-collapsed .side-toggle .ic-col { display: none; }
body.side-collapsed .side-toggle .ic-exp { display: block; }
/* Toggle no modo inbox (topbar oculta): fica dentro da régua lateral, estilo discreto */
.sidebar .side-toggle { display: none; }
body.inbox-full .sidebar .side-toggle { display: flex; align-items: center; justify-content: center; width: 34px; height: 32px; margin: 0 2px 6px; padding: 0; border: none; background: transparent; color: var(--text-3); border-radius: 7px; cursor: pointer; align-self: flex-start; position: static; transform: none; box-shadow: none; }
body.inbox-full .sidebar .side-toggle:hover { background: #f1f1f1; color: var(--text-2); }
body.inbox-full .sidebar .side-toggle svg { width: 19px; height: 19px; stroke-width: 1.8; }
body.inbox-full.side-collapsed .sidebar .side-toggle { align-self: center; }
body.side-collapsed { --sidebar-w: 64px; }
body.side-collapsed .sidebar { padding: 14px 10px; }
body.side-collapsed .sidebar .nav-sec { display: none; }
body.side-collapsed .sidebar .voltar .lbl { display: none; }
body.side-collapsed .sidebar .voltar { justify-content: center; }
body.side-collapsed .nav-item { justify-content: center; gap: 0; padding: 8px; }
body.side-collapsed .nav-item .lbl, body.side-collapsed .nav-item .chip-breve { display: none; }
/* Cabeçalho de seção base */
.sidebar .nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); padding: 12px 10px 6px; font-weight: 600; }
/* Seção colapsável (acordeão) */
.sidebar .nav-sec.nav-sec-tgl { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; border-radius: 8px; margin-top: 12px; padding: 8px 10px; transition: color .12s, background .12s; }
.sidebar .nav-sec.nav-sec-tgl:hover { color: var(--text-2); background: var(--hov); }
/* +/- (Font Awesome light): + colapsado, - aberto */
.nav-chev { margin-left: auto; flex: none; display: inline-flex; align-items: center; color: var(--text-3); font-size: 11px; line-height: 1; }
.nav-chev .fa-minus { display: none; }
.nav-sec.nav-sec-tgl:not(.col) .nav-chev .fa-plus { display: none; }
.nav-sec.nav-sec-tgl:not(.col) .nav-chev .fa-minus { display: inline-block; }
/* Corpo da seção (submenu): linha-guia vertical + indentação */
.nav-grp-body { overflow: hidden; transition: max-height .24s ease; position: relative; }
.nav-grp-body::before { content: ''; position: absolute; left: 19px; top: 2px; bottom: 2px; width: 1px; background: var(--border); }
.sidebar .nav-grp-body .nav-item { padding-left: 30px; position: relative; }

/* Itens - pill arredondado */
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 12px; font-weight: 500; transition: background .12s, color .12s; }
.nav-item .lbl { flex: 1; }
.nav-item:hover { background: var(--hov); color: var(--text); }
.nav-item.ativo { background: var(--hov); color: var(--text); font-weight: 600; }
/* Ícones - cobre o kit em Web Font (<i>) E em SVG (<svg>) */
.nav-item svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.nav-item i[class*="fa-"] { font-size: 14px; line-height: 1; flex: none; text-align: center; color: var(--text-3); }
.nav-item:hover svg, .nav-item:hover i[class*="fa-"] { color: var(--text-2); }
.nav-item.ativo svg, .nav-item.ativo i[class*="fa-"] { color: var(--accent); }
/* Dot do item selecionado (na linha-guia do submenu) */
.sidebar .nav-grp-body .nav-item.ativo::before { content: ''; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
/* Modo sidebar só-ícone: grupos sempre abertos, sem guia/indent/dot */
body.side-collapsed .nav-grp-body { max-height: none !important; overflow: visible; }
body.side-collapsed .nav-grp-body::before { display: none; }
body.side-collapsed .sidebar .nav-grp-body .nav-item { padding-left: 9px; }
body.side-collapsed .sidebar .nav-grp-body .nav-item.ativo::before { display: none; }
.chip-breve { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; color: var(--text-3); background: #f0f0f0; padding: 1px 6px; border-radius: 20px; }
.sidebar .espaco { flex: 1; }
.voltar { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.voltar:hover { background: #f1f1f1; color: var(--text-2); }
.voltar svg { width: 15px; height: 15px; color: currentColor; flex: none; }
.voltar i[class*="fa-"] { font-size: 13px; line-height: 1; flex: none; }

/* ---------------- Conteúdo ---------------- */
.conteudo { padding: 30px 34px 60px; overflow: auto; }

/* ---- Tela em tabela com scroll interno + rodapé de paginação (padrão família) ---- */
/* Nessas telas o conteúdo não rola a página toda: a tabela ocupa a altura e rola por dentro. */
.conteudo:has(.tela-tabela) { padding-bottom: 22px; overflow: hidden; }
.tela-tabela { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 52px); min-height: 360px; }
.tela-tabela > .page-head { flex: none; margin-bottom: 16px; }
.tela-tabela .barra-filtros { flex: none; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lista-card { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lista-card > .lista-itens { flex: 1; min-height: 0; overflow-y: auto; }
.tela-tabela .page-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; font-size: 13px; color: var(--text-3); }

/* ---- Versões + Changelog (molde PlugueZap): tela cheia, só a lista rola; paginação fixa no rodapé ---- */
.cl-page { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 52px); min-height: 360px; }
.conteudo:has(.cl-page) { padding-bottom: 22px; overflow: hidden; }
.cl-page > .page-head, .cl-page .filtros-bar { flex: none; }
.cl-painel { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.cl-painel .lista-itens { flex: 1; min-height: 0; overflow-y: auto; }
.cl-rodape { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lista-itens .linha-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.lista-itens .linha-item:last-child { border-bottom: none; }
.lista-itens .li-tipo-col { width: 118px; flex: none; padding-top: 1px; }
.lista-itens .li-corpo { flex: 1; min-width: 0; }
.lista-itens .li-titulo { font-weight: 600; font-size: 14px; line-height: 1.35; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lista-itens .li-desc { font-size: 13px; color: var(--text-3); margin-top: 3px; line-height: 1.45; }
.lista-itens .li-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.li-hash { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 11px; color: var(--text-3); }
.pub-dot { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-hover); font-weight: 600; }
.pub-dot svg { width: 13px; height: 13px; }
.vstatus { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.vstatus.rascunho { color: #b88900; background: #fff4d6; }
.vstatus.liberada { color: #1fa855; background: #e7f7ee; }
.tipo { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.tipo.funcionalidade { color: #159a5c; background: #e7f7ef; }
.tipo.melhoria { color: #1d4ed8; background: #e7eefe; }
.tipo.correcao { color: #b88900; background: #fff4d6; }
.tipo.meta { color: #7c3aed; background: #f1e9fe; }
.tipo.interno { color: #525252; background: #eee; }
.origem { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.origem.manual { color: #159a5c; background: #e7f7ef; }
.origem.auto { color: #6b5b16; background: #fbf4dd; }
.filtros-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filtros-bar .filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }
.chip { font-size: 13px; padding: 7px 13px; border-radius: 20px; border: 1px solid var(--border-strong); background: var(--panel); cursor: pointer; color: var(--text-2); font-family: inherit; }
.chip.ativo { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; font-weight: 600; }
/* Combobox com busca (filtro de versão) */
.cbx { position: relative; display: inline-block; }
.cbx-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 200px; justify-content: space-between; font-size: 13px; font-family: inherit; padding: 9px 13px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cbx-btn:hover { border-color: var(--text-3); }
.cbx-btn.aberto { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cbx-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.cbx-btn.aberto .cbx-chev { transform: rotate(180deg); }
.cbx-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; width: 268px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 11px; box-shadow: var(--shadow-pop); overflow: hidden; }
.cbx-busca-wrap { position: relative; padding: 9px; border-bottom: 1px solid var(--border); }
.cbx-lupa { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.cbx-busca { width: 100%; font-size: 13px; font-family: inherit; padding: 8px 10px 8px 31px; border: 1px solid var(--border-strong); border-radius: 8px; outline: none; background: var(--bg); color: var(--text); }
.cbx-busca:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cbx-lista { max-height: 244px; overflow-y: auto; padding: 5px; }
.cbx-opt { font-size: 13px; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx-opt:hover { background: rgba(0,0,0,.045); }
.cbx-opt.sel { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.cbx-vazio { font-size: 13px; color: var(--text-3); padding: 14px 10px; text-align: center; }
@media (max-width: 760px) {
  .cl-page { height: auto; overflow: visible; }
  .cl-painel { overflow: visible; }
  .cl-painel .lista-itens { overflow-x: auto; }
}

.f-inp { padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 9px; outline: none; transition: border-color .12s, box-shadow .12s; }
.f-inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.f-inp::placeholder { color: var(--text-3); }
select.f-inp { -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
input[type="date"].f-inp { cursor: pointer; }
.atv-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atv-tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.atv-tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.atv-tbl tbody tr:last-child td { border-bottom: none; }
.atv-tbl .cel-sec { color: var(--text-3); font-size: 12.5px; }
.rx-chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: #f1f1f1; color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.aud-alvo { color: var(--text-3); }
.aud-td-seta { width: 30px; text-align: center; }
.aud-chevron { color: var(--text-3); font-size: 16px; line-height: 1; display: inline-block; transition: transform .14s; }
.aud-tbl .aud-row.tem-diff { cursor: pointer; }
.aud-tbl .aud-row.tem-diff:hover > td { background: var(--accent-soft); }
.aud-row.aberto .aud-chevron { transform: rotate(90deg); }
.aud-det > td { background: var(--bg); }
.aud-det-cel { padding: 10px 16px 16px !important; }
/* Diff antes × depois (2 painéis) */
.lg-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4px 2px 6px; }
.lg-diff.lg-diff-um { grid-template-columns: 1fr; max-width: 520px; }
.lg-col { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.lg-col-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--hov, #f3f4f6); }
.lg-field { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.lg-field:last-child { border-bottom: none; }
.lg-f-k { color: var(--text-3); font-size: 12px; flex: none; }
.lg-f-v { color: var(--text); text-align: right; word-break: break-word; }
.lg-field.lg-rem { background: var(--danger-soft, #fee2e2); }
.lg-field.lg-rem .lg-f-v { color: var(--danger, #dc2626); font-weight: 600; text-decoration: line-through; }
.lg-field.lg-add { background: var(--ok-soft, #dcfce7); }
.lg-field.lg-add .lg-f-v { color: var(--ok, #16a34a); font-weight: 600; }
@media (max-width: 640px) { .lg-diff { grid-template-columns: 1fr; } }
.dif-sem { color: var(--text-3); font-size: 13px; padding: 4px 0; }
/* Rodapé de paginação */
.pg-info { font-size: 13px; color: var(--text-3); }
.pg-info b { color: var(--text-2); font-weight: 600; }
.pg-dir { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pg-lbl { font-size: 12.5px; color: var(--text-3); }
.pg-chips { display: inline-flex; gap: 5px; }
.pg-chip { font-size: 12.5px; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2); cursor: pointer; font-family: inherit; }
.pg-chip.ativo { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; font-weight: 600; }
.pg-nav { display: inline-flex; align-items: center; gap: 10px; }
.pg-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 17px; line-height: 1; display: grid; place-items: center; }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-atual { font-size: 12.5px; color: var(--text-2); min-width: 52px; text-align: center; }
@media (max-width: 760px) {
  .tela-tabela { height: auto; overflow: visible; }
  .lista-card { overflow: visible; }
  .lista-card > .lista-itens { overflow-x: auto; }
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.page-head .desc { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.ph-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }

/* botões */
.btn-primary { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: #fff; border: none; font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 15px; border-radius: 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,100,224,.25); transition: background .12s; white-space: nowrap; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; fill: currentColor; }
.btn-sec { display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-2); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 15px; cursor: pointer; white-space: nowrap; }
.btn-sec:hover { background: #f4f4f4; }
.btn-sec svg { width: 16px; height: 16px; flex: none; }
.btn-sec[disabled] { opacity: .55; cursor: not-allowed; }
.btn-danger { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); color: var(--danger); border: 1px solid #f0cfcc; font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 15px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-perigo-solido { font-family: inherit; font-size: 13.5px; font-weight: 600; color: #fff; background: var(--danger); border: none; border-radius: 8px; padding: 9px 15px; cursor: pointer; }
.btn-perigo-solido:hover { background: #bf3a33; }
.btn-mini { padding: 6px 11px; font-size: 12.5px; }

/* banner (sem número / avisos) */
.plano-banner { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.plano-banner .pb-txt { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }

/* tabela */
.tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tab th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tab td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.tab tbody tr:last-child td { border-bottom: none; }
.tab tbody tr.clicavel { cursor: pointer; }
.tab tbody tr.clicavel:hover { background: #f7f7f7; }
.tab .cc-nome { color: var(--text); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.tab .cc-mail { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.tab .acoes { text-align: right; white-space: nowrap; }
.tab .acoes > * { vertical-align: middle; }
.tab .acoes > * + * { margin-left: 6px; }
.tab .seta { color: var(--text-3); text-align: right; font-size: 18px; }
.ic-acao { background: var(--panel); border: 1px solid var(--border-strong); cursor: pointer; color: var(--text-2); padding: 6px 12px; border-radius: 7px; font-family: inherit; font-size: 12.5px; font-weight: 600; transition: background .12s, border-color .12s, color .12s; }
.ic-acao:hover { background: #f4f4f4; border-color: var(--text-3); color: var(--text); }
.ic-acao.perigo { color: var(--danger); border-color: #f1cfcc; }
.ic-acao.perigo:hover { background: var(--danger-soft); border-color: var(--danger); }

/* Botões de ação só-ícone em listas (padrão da família, fonte: PlugueCRM .btn-ico).
   Quadrados, com borda. Tokens iguais aos do Meta, então o azul vem de graça.
   Suporta <svg> (CRM) e <i> do FontAwesome (kit do PlugueMeta). */
.btn-ico, .btn-lixeira { background: transparent; border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px; cursor: pointer; display: inline-grid; place-items: center; line-height: 0; transition: background .12s, color .12s, border-color .12s; }
.btn-ico { color: var(--text-2); }
.btn-lixeira { color: var(--text-3); }
.btn-ico:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.btn-lixeira:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.btn-ico:disabled, .btn-lixeira:disabled { opacity: .5; cursor: default; }
.btn-ico svg, .btn-lixeira svg { width: 15px; height: 15px; }
.btn-ico i, .btn-lixeira i { font-size: 15px; width: 17px; height: 17px; display: grid; place-items: center; }
.btn-ico.destaque { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.btn-ico.destaque:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* tags/badges */
.mini-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; color: var(--lime-ink); background: var(--lime-soft); padding: 1px 7px; border-radius: 20px; }
.pill { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.pill.ok { color: var(--ok); background: #e7f7ee; }
.pill.off { color: var(--text-3); background: #f0f0f0; }
.pill.azul { color: var(--accent-hover); background: var(--accent-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }

/* abas (usuários/grupos, etc.) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab-btn { padding: 9px 14px; font-size: 13.5px; font-weight: 500; color: var(--text-3); cursor: pointer; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-family: inherit; }
.tab-btn:hover { color: var(--text-2); }
.tab-btn.ativo { color: var(--accent-hover); border-bottom-color: var(--accent); }

/* grade de permissões */
.perms-box { max-height: 44vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.perm-cat { margin-bottom: 12px; }
.perm-cat:last-child { margin-bottom: 0; }
.perm-cat h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); margin: 4px 0 6px; display: flex; align-items: center; justify-content: space-between; }
.perm-cat .marcar-todas { font-size: 11px; color: var(--accent-hover); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 600; background: none; border: none; font-family: inherit; }
.perm-item { display: flex; align-items: center; gap: 9px; padding: 5px 2px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.visib-alvos { max-height: 26vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-top: 8px; background: var(--sidebar); }
/* aparência do checkbox: ver a regra global input[type="checkbox"] mais abaixo */

/* logs */
.log-filtros { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.log-cat { font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 20px; white-space: nowrap; margin-right: 5px; }
/* Linha de log com snapshot: expansível pro diff */
.tab tr.log-exp { cursor: pointer; }
.tab tr.log-exp:hover > td { background: var(--accent-soft); }
.log-ver { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--accent-hover); white-space: nowrap; }
.log-ver svg { width: 13px; height: 13px; transition: transform .15s; }
.tab tr.log-exp.aberto .log-ver svg { transform: rotate(180deg); }
.tab tr.log-det > td { padding: 0; background: var(--bg); border-top: none; }
.log-det-box { padding: 14px 16px; }
/* Diff antes × depois */
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-col { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.diff-col.antes { border-color: #f1c6c2; }
.diff-col.depois { border-color: #bfe3cd; }
.diff-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; padding: 7px 12px; color: var(--text-3); border-bottom: 1px solid var(--border); background: var(--sidebar); }
.diff-col.antes .diff-h { color: var(--danger); background: var(--danger-soft); }
.diff-col.depois .diff-h { color: var(--ok); background: #e9f8ef; }
.diff-row { display: flex; gap: 10px; padding: 6px 12px; font-size: 13px; align-items: baseline; }
.diff-row + .diff-row { border-top: 1px solid var(--border); }
.diff-row .dk { flex: none; width: 40%; color: var(--text-3); font-size: 12px; }
.diff-row .dv { flex: 1; color: var(--text); word-break: break-word; }
.diff-col.antes .diff-row.mud { background: var(--danger-soft); }
.diff-col.antes .diff-row.mud .dv { color: var(--danger); text-decoration: line-through; }
.diff-col.depois .diff-row.mud { background: #e9f8ef; }
.diff-col.depois .diff-row.mud .dv { color: #0d7a3d; font-weight: 600; }
.diff-vazio { padding: 12px; color: var(--text-3); text-align: center; }
@media (max-width: 640px) { .diff-cols { grid-template-columns: 1fr; } }
.inp-busca { font-family: inherit; font-size: 13px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--panel); color: var(--text); outline: none; }
.inp-busca { width: 260px; max-width: 42vw; }
.inp-busca:focus { border-color: var(--accent); }

/* painéis de info (Conta, Resumo) */
.painel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.painel .ph { padding: 16px 18px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.painel .pbody { padding: 16px 18px; }
.painel .phelp { color: var(--text-3); font-size: 12.5px; line-height: 1.55; margin: 2px 0 16px; }
.painel .linha { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.painel .linha:last-child { border-bottom: none; }
.painel .linha .rot { color: var(--text-3); }
.painel .linha .val { color: var(--text); font-weight: 500; }

/* cards de número / grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.info-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; }
.info-card .rot { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); font-weight: 600; margin-bottom: 8px; }
.info-card .val { font-size: 22px; font-weight: 700; color: var(--text); }
.info-card .val.mono { font-family: var(--mono); font-size: 13px; }

/* card do número conectado (grid) */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .06s; overflow: hidden; }
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:active { transform: translateY(1px); }
.card .card-top { padding: 16px 16px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card .inst-ident { display: flex; align-items: center; gap: 11px; min-width: 0; }
.card .inst-logo { width: 38px; height: 38px; border-radius: 9px; flex: none; background: var(--accent-soft); display: grid; place-items: center; }
.card .inst-logo svg { width: 20px; height: 20px; fill: var(--accent-hover); }
.card .inst-nome { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .inst-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; font-family: var(--mono); }
.card .card-foot { border-top: 1px solid var(--border); padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; background: #fcfcfc; }
.card-foot .abrir { font-size: 13px; font-weight: 600; color: var(--accent-hover); display: flex; align-items: center; gap: 5px; }
.card-foot .abrir svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
/* Card skeleton (enquanto conecta o número) */
.card-skeleton { cursor: default; pointer-events: none; }
.sk { background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%); background-size: 400% 100%; animation: skShimmer 1.4s ease infinite; border-radius: 6px; display: block; }
.sk-ava { width: 38px; height: 38px; border-radius: 9px; }
.sk-l1 { width: 60%; height: 13px; margin-bottom: 7px; }
.sk-l2 { width: 40%; height: 11px; }
.sk-badge { width: 92px; height: 20px; border-radius: 20px; }
@keyframes skShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* badge de status (card e visão geral) */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge.off { color: var(--text-3); background: #f0f0f0; } .badge.off .dot { background: #b5b5b5; }
.badge.warn { color: var(--warn); background: var(--warn-soft); } .badge.warn .dot { background: var(--warn); }
.badge.ok { color: var(--ok); background: #e7f7ee; } .badge.ok .dot { background: var(--ok); }

/* cabeçalho da tela do número */
.inst-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.inst-head .ident { display: flex; align-items: center; gap: 14px; }
.inst-head .ii-logo { width: 46px; height: 46px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; }
.inst-head .ii-logo svg { width: 24px; height: 24px; fill: var(--accent-hover); }
.inst-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; display: flex; align-items: center; gap: 12px; }
.inst-head .ii-sub { color: var(--text-3); font-size: 13px; margin-top: 3px; }

/* gráfico de mensagens */
.graf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.graf-head .ph-sub { font-weight: 400; color: var(--text-3); font-size: 12px; }
.graf-box { width: 100%; min-height: 150px; display: grid; place-items: center; color: var(--text-3); font-size: 13px; position: relative; }
.graf-box svg { width: 100%; height: auto; display: block; }
.legenda { display: flex; gap: 18px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.legenda .dot-env { background: var(--accent); }
.legenda .dot-rec { background: var(--accent); opacity: .38; }
.per { display: flex; gap: 6px; flex: none; }
.per button { font-family: inherit; font-size: 12px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text-2); cursor: pointer; transition: background .12s, color .12s; }
.per button.ativo { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; font-weight: 600; }
.painel .pbody { padding: 16px 18px; }
.painel .prow { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13.5px; }

/* chave de API */
.key-field { display: flex; align-items: center; gap: 8px; background: #f7f9f8; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.key-field code { flex: 1; font-family: var(--mono); font-size: 13px; color: var(--text-2); letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* estado vazio */
.vazio { text-align: center; padding: 60px 20px; background: var(--panel); border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--text-3); }
.vazio .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; margin: 0 auto 16px; }
.vazio .ico svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-hover); stroke-width: 1.8; }
.vazio h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.vazio p { margin-bottom: 18px; font-size: 13.5px; }

/* ---------------- Modal ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(10,13,31,.45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.overlay.aberto { display: flex; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 420px; box-shadow: var(--shadow-pop); animation: subir .2s ease both; max-height: 92vh; display: flex; flex-direction: column; }
.modal.lg { max-width: 580px; }
@keyframes subir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal .mh { padding: 18px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; }
.modal .mb { padding: 20px; overflow: auto; }
.modal label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.modal input, .modal textarea { width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 9px; outline: none; transition: border-color .12s, box-shadow .12s; }
.modal input:focus, .modal textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.modal .campo { margin-bottom: 14px; }
.modal .mf { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal .confirm-txt { color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* olhinho de revelar senha */
.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 44px !important; }
.olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-3); padding: 7px; line-height: 0; border-radius: 8px; }
.olho:hover { color: var(--text-2); background: #f1f1f1; }

/* ---------- Checkbox custom (todo o sistema) ---------- */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 18px; height: 18px; min-width: 18px; flex: none; margin: 0; padding: 0;
  border: 1.5px solid var(--border-strong); border-radius: 5px; background: #fff;
  cursor: pointer; display: inline-grid; place-content: center; vertical-align: middle;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
input[type="checkbox"]::after {
  content: ""; width: 5px; height: 9px; margin-top: -1px;
  border: solid #fff; border-width: 0 2px 2px 0; border-radius: 1px;
  transform: rotate(45deg); opacity: 0; transition: opacity .1s;
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { opacity: 1; }
input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }

/* Select bonito (estilizado) em todo o sistema, sem a caixinha padrão do navegador */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  font-family: inherit; font-size: 14px; color: var(--text);
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667781' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
  border: 1.5px solid var(--border-strong); border-radius: 9px;
  padding: 10px 38px 10px 13px; line-height: 1.3;
  cursor: pointer; outline: none; transition: border-color .12s, box-shadow .12s;
}
select:hover { border-color: var(--accent); }
select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select:disabled { opacity: .6; cursor: not-allowed; background-color: #f3f4f6; }
select::-ms-expand { display: none; }
select option { color: var(--text); }
.modal .campo select, .pbody .campo select, .modal > select, .campo select { width: 100%; }
/* Campo de telefone: DDI (select com bandeira) + número com máscara */
.tel-wrap { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; }
.tel-wrap .ddi-sel { width: auto; min-width: 104px; }

/* ---------------- Toast ---------------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1c1c1c; color: #fff; padding: 11px 18px; border-radius: 9px; font-size: 13.5px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 70; }
.toast.on { opacity: .96; }
.toast.erro { background: var(--danger); }

/* ---------------- Auth (entrar / criar-conta) ---------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 32px 30px; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-logo b { font-size: 19px; font-weight: 800; }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 4px; }
.auth-card .sub { color: var(--text-3); font-size: 13.5px; margin-bottom: 22px; }
.auth-rodape { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-3); }
.auth-rodape a { color: var(--accent-hover); font-weight: 600; }
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
/* Formulário dentro de painel (fora de modal): label em bloco + campos largura total */
.pbody .campo label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.pbody .campo input, .pbody .campo textarea { width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 9px; outline: none; transition: border-color .12s, box-shadow .12s; }
.pbody .campo input:focus, .pbody .campo textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pbody .campo textarea { resize: vertical; min-height: 70px; }
/* Nome de exibição (status + badges) */
.ne-status { margin-bottom: 4px; }
.ne-atual { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ne-atual .ne-rot { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.ne-atual .ne-nome { font-size: 16px; font-weight: 700; color: var(--text); }
.ne-dir { display: flex; align-items: center; gap: 8px; }
.ne-refresh { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text-2); cursor: pointer; display: grid; place-items: center; flex: none; transition: background .12s, color .12s; }
.ne-refresh:hover { background: #f1f1f1; color: var(--accent); }
.ne-refresh svg { width: 16px; height: 16px; }
.ne-badge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ne-badge.ne-ok { background: #e6f7ec; color: #1a7f45; }
.ne-badge.ne-pend { background: #fdf0e3; color: #b26a12; }
.ne-badge.ne-rej { background: #fdecec; color: #c0362c; }
.ne-badge.ne-off { background: #eef1f6; color: #5b6470; }
.ne-hint { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); background: var(--accent-soft); border-radius: 9px; padding: 10px 12px; }
.reg-msg { font-size: 13px; line-height: 1.5; border-radius: 9px; padding: 11px 13px; }
.reg-msg.ok { background: #e6f7ec; color: #1a7f45; border: 1px solid #bfe6cd; }
.reg-msg.erro { background: #fdecec; color: #c0362c; border: 1px solid #f3c6c2; }
.passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.passos li { font-size: 13.5px; line-height: 1.5; color: var(--text-2); padding-left: 4px; }
.modal-msg { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
/* Validador de template */
.tpl-check { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tpl-check.ok .tc-tit { color: #1a7f45; }
.tpl-check .tc-grupo { border-radius: 9px; padding: 10px 12px; }
.tpl-check .tc-grupo.erro { background: #fdecec; }
.tpl-check .tc-grupo.aviso { background: #fdf4e3; }
.tpl-check .tc-tit { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.tpl-check .tc-grupo.erro .tc-tit { color: #c0362c; }
.tpl-check .tc-grupo.aviso .tc-tit { color: #b26a12; }
.tpl-check .tc-item { font-size: 12.5px; line-height: 1.5; color: var(--text-2); padding: 2px 0 2px 14px; position: relative; }
.tpl-check .tc-item::before { content: "•"; position: absolute; left: 2px; }
.ia-row .campo input { width: 100%; }
.inp { width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 9px; outline: none; transition: border-color .12s, box-shadow .12s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-bloco { width: 100%; justify-content: center; padding: 12px; font-size: 14.5px; }
.erro-form { background: var(--danger-soft); color: var(--danger); border-radius: 9px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; display: none; }
.erro-form.on { display: block; }

/* ===== Preview de template ===== */
.tpl-preview { background: #d9fdd3; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.tpl-preview .tpl-h { font-weight: 700; margin-bottom: 6px; }
.tpl-preview .tpl-f { color: #667781; font-size: 12.5px; margin-top: 6px; }
.tpl-preview .tpl-btn { margin-top: 8px; text-align: center; color: var(--accent-hover); font-weight: 600; border-top: 1px solid rgba(0,0,0,.08); padding-top: 7px; }
.tpl-var { background: var(--accent-soft); color: var(--accent-hover); border-radius: 4px; padding: 0 4px; font-weight: 600; font-size: 12.5px; }
.tpl-ex { background: rgba(0,100,224,.08); border-radius: 3px; padding: 0 2px; }
.aviso-reg { background: var(--warn-soft); border: 1px solid #f0dca0; color: #7a5a00; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 20px; }
.aviso-reg a { color: var(--accent-hover); font-weight: 600; white-space: nowrap; }

/* ===== Inbox (Conversas), estilo WhatsApp, chrome azul ===== */
.inbox {
  --ibd: #e9edef; --itx: #111b21; --itx2: #667781; --bolha-eu: #d9fdd3; --bolha-outro: #fff;
  display: grid; grid-template-columns: 360px 1fr; height: calc(100vh - 134px); min-height: 440px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.inbox-lista { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--ibd); background: #fff; overflow: hidden; }
/* Inbox em tela cheia (grudado no conteúdo) + lista "flutuando" sobre a régua da sidebar */
body.inbox-full .conteudo { padding: 0; overflow: visible; }
body.inbox-full .inbox { height: 100vh; min-height: 0; border: none; border-radius: 0; overflow: visible; }
/* Em Conversas, cabeçalho único: esconde a topbar do sistema; logo e usuário vão para a régua lateral. */
body.inbox-full .topbar { display: none; }
body.inbox-full .corpo { min-height: 100vh; }
.sidebar .rail-logo { display: none; }
.sidebar .nav-sair { display: none; }
/* Logo da marca no topo do menu de Conversas */
body.inbox-full .sidebar .rail-logo { display: flex; align-items: center; justify-content: flex-start; gap: 9px; height: 54px; flex: none; margin-bottom: 4px; padding: 0 6px; text-decoration: none; }
body.inbox-full .sidebar .rail-logo img { width: 30px; height: 30px; border-radius: 7px; flex: none; }
body.inbox-full .sidebar .rail-nome { font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
/* Colapsado: só a marca, centralizada */
body.inbox-full.side-collapsed .sidebar .rail-logo { justify-content: center; padding: 0; }
body.inbox-full.side-collapsed .sidebar .rail-nome { display: none; }
/* Sair no rodapé do menu de Conversas */
body.inbox-full .sidebar .nav-sair { display: flex; margin-top: auto; }
body.inbox-full .inbox-lista { border-radius: 14px 0 0 14px; border-left: 1.5px solid rgba(0, 100, 224, .5); box-shadow: -5px 0 16px rgba(0, 0, 0, .10); position: relative; z-index: 2; }
body.inbox-full .sidebar { border-right: none; }
.inbox .side-head { height: 56px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f0f2f5; border-bottom: 1px solid var(--ibd); }
.inbox .side-head .titulo { font-size: 16px; font-weight: 700; color: var(--itx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .side-head .fab-nova { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; transition: background .12s; }
.inbox .side-head .fab-nova:hover { background: var(--accent-hover); }
.inbox .side-head .fab-nova svg { width: 20px; height: 20px; }
.inbox .filtros { display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--ibd); }
.inbox .chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: #f0f2f5; color: #3b4a54; cursor: pointer; border: none; font-family: inherit; }
.inbox .chip.ativo { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.inbox .busca-wrap { padding: 8px 12px; border-bottom: 1px solid var(--ibd); }
.inbox .busca-box { display: flex; align-items: center; background: #f0f2f5; border-radius: 8px; padding: 0 12px; height: 36px; }
.inbox .busca-box svg { width: 18px; height: 18px; fill: var(--itx2); flex: none; }
.inbox .busca-box input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; padding: 0 10px; color: var(--itx); font-family: inherit; }
.inbox .chats { flex: 1; overflow-y: auto; min-height: 0; }
.inbox .chat-item { display: flex; align-items: center; gap: 13px; padding: 0 14px; height: 72px; cursor: pointer; border-bottom: 1px solid var(--ibd); }
.inbox .chat-item:hover { background: #f5f6f6; }
.inbox .chat-item.sel { background: var(--accent-soft); }
.inbox .ib-avatar { width: 49px; height: 49px; border-radius: 50%; flex: none; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px; color: #fff; overflow: hidden; }
.inbox .chat-corpo { flex: 1; min-width: 0; }
.inbox .chat-corpo .linha { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inbox .chat-corpo .nome { font-size: 15.5px; color: var(--itx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .chat-corpo .hora { font-size: 12px; color: var(--itx2); flex: none; }
.inbox .chat-corpo .hora.nl { color: var(--accent); font-weight: 600; }
.inbox .chat-corpo .prev { font-size: 13px; color: var(--itx2); margin-top: 3px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.inbox .chat-corpo .prev .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .badge-nl { background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; min-width: 19px; height: 19px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; flex: none; }

.inbox-chat { position: relative; display: flex; flex-direction: column; min-width: 0; background: #efeae2; }
.inbox-chat::before { content: ""; position: absolute; inset: 0; background: url("/fundo.svg") repeat; opacity: .06; pointer-events: none; }
.inbox .conv-head { height: 59px; padding: 0 16px; display: flex; align-items: center; gap: 12px; background: #f0f2f5; border-bottom: 1px solid var(--ibd); position: relative; z-index: 1; }
.inbox .conv-head .ib-avatar { width: 40px; height: 40px; font-size: 15px; }
.inbox .conv-head .nome { font-size: 15px; font-weight: 600; color: var(--itx); }
.inbox .conv-head .sub { font-size: 12.5px; color: var(--itx2); margin-top: 1px; }
/* Badge do estado da janela de 24h (alinhado à direita, no cabeçalho) */
.inbox .conv-head .janela-badge { margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: default; white-space: nowrap; }
.inbox .conv-head .jb-ok { background: #e6f7ec; color: #1a7f45; }
.inbox .conv-head .jb-off { background: #fdf0e3; color: #b26a12; }
.inbox .conv-head .jb-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.inbox .conv-head .jb-ok .jb-dot { box-shadow: 0 0 0 3px rgba(26,127,69,.16); }
.inbox .conv-head .jb-extra { font-weight: 500; opacity: .82; }
.inbox .conv-head .jb-info { display: inline-flex; opacity: .7; margin-left: 1px; }
.inbox .conv-head .jb-info svg { width: 15px; height: 15px; }
.inbox .conv-head .janela-badge:hover .jb-info { opacity: 1; }
.inbox .conv-head .jb-tip { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 300px; max-width: 78vw; background: #111b21; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.5; padding: 11px 13px; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.24); z-index: 30; white-space: normal; text-align: left; }
.inbox .conv-head .jb-tip::before { content: ""; position: absolute; top: -5px; right: 15px; width: 10px; height: 10px; background: #111b21; transform: rotate(45deg); }
.inbox .conv-head .janela-badge:hover .jb-tip { display: block; animation: compPop .12s ease; }
@media (max-width: 560px) { .inbox .conv-head .jb-extra { display: none; } }
.inbox .msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 12px 24px 10px; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
/* rabicho (tail) das bolhas */
.inbox .msg.them::before, .inbox .msg.me::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.inbox .msg.them::before { left: -8px; background: radial-gradient(circle at top left, transparent 70%, var(--bolha-outro) 0); }
.inbox .msg.me::before { right: -8px; background: radial-gradient(circle at top right, transparent 70%, var(--bolha-eu) 0); }
.inbox .msg { max-width: 65%; padding: 6px 9px 8px; border-radius: 7.5px; font-size: 14.2px; line-height: 19px; position: relative; word-wrap: break-word; box-shadow: 0 1px .5px rgba(11,20,26,.13); margin-bottom: 2px; white-space: pre-wrap; }
.inbox .msg.them { background: var(--bolha-outro); align-self: flex-start; border-top-left-radius: 0; }
.inbox .msg.me { background: var(--bolha-eu); align-self: flex-end; border-top-right-radius: 0; }
.inbox .msg .hora { font-size: 11px; color: var(--itx2); float: right; margin: 7px 0 -4px 10px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.inbox .msg .hora .check { width: 16px; height: 11px; }
.inbox .msg.pendente { opacity: .65; }
.inbox .msg.falha { box-shadow: 0 0 0 1px var(--danger) inset, 0 1px .5px rgba(11,20,26,.13); }
/* Badge "Não entregue": vem ANTES da hora, clicável/hover mostra o motivo */
.inbox .msg .hora .badge-falha { display: inline-flex; align-items: center; gap: 4px; font-family: inherit; font-size: 10.5px; font-weight: 700;
  color: var(--danger); background: var(--danger-soft); border: none; border-radius: 20px; padding: 2px 8px 2px 6px; cursor: pointer; line-height: 1.4; }
.inbox .msg .hora .badge-falha:hover { filter: brightness(.96); }
.inbox .msg .hora .badge-falha svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.inbox .msg.com-midia { padding: 3px; width: min(330px, 72vw); max-width: 330px; }
.inbox .msg.com-midia .hora { padding: 0 6px 2px; }
/* álbum (imagens consecutivas) */
.inbox .msg.com-album { padding: 3px; width: min(330px, 72vw); max-width: 330px; }
.inbox .album { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.inbox .album .cel { position: relative; overflow: hidden; border-radius: 4px; cursor: pointer; aspect-ratio: 1/1; }
.inbox .album .cel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inbox .album .mais { position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 28px; font-weight: 300; display: flex; align-items: center; justify-content: center; }
/* separador de data */
.inbox .data-sep { align-self: center; background: #fff; color: #54656f; font-size: 12.5px; padding: 6px 13px; border-radius: 8px; margin: 12px 0 10px; box-shadow: 0 1px .5px rgba(11,20,26,.13); position: relative; z-index: 1; }
.inbox .midia-img { display: block; width: 100%; border-radius: 6px; cursor: pointer; }
.inbox .midia-img.fig { width: 130px; background: none; cursor: default; }
.inbox .msg .legenda { padding: 4px 6px 2px; font-size: 14px; }
.inbox .msg audio { max-width: 240px; height: 40px; }
.inbox .msg .doc { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 8px; background: rgba(0,0,0,.04); color: var(--itx); text-decoration: none; font-size: 13.5px; min-width: 180px; }
.inbox .msg .doc .ico { font-size: 24px; }
.inbox .msg .doc .doc-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .msg .loc { display: flex; align-items: center; gap: 10px; color: var(--itx); text-decoration: none; }
.inbox .msg .loc .loc-ico { font-size: 22px; }

/* Lightbox (imagem em tela cheia) com topo (baixar/zoom/fechar) e setas */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200; display: none; flex-direction: column; }
.lightbox.aberto { display: flex; }
.lightbox .lb-topo { height: 54px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 16px; }
.lightbox .lb-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: #e9edef; cursor: pointer; display: grid; place-items: center; text-decoration: none; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.14); }
.lightbox .lb-btn svg { width: 22px; height: 22px; }
.lightbox .lb-palco { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 60px 30px; }
.lightbox .lb-palco img { max-width: 92vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: zoom-in; transition: transform .18s; }
.lightbox .lb-palco img.zoom { transform: scale(2); cursor: zoom-out; }
.lightbox .lb-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-seta:hover { background: rgba(255,255,255,.22); }
.lightbox .lb-seta.esq { left: 18px; } .lightbox .lb-seta.dir { right: 18px; }

/* Compositor de mídia (envio múltiplo com legenda por item) */
.mc-wrap { display: flex; flex-direction: column; }
.mc-preview { height: 230px; background: #f0f2f5; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mc-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mc-doc { text-align: center; color: var(--text-3); } .mc-doc .mp-ico { font-size: 40px; }
.mc-film { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 4px 2px; }
.mc-th { position: relative; width: 56px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #f0f2f5; display: grid; place-items: center; }
.mc-th.sel { border-color: var(--accent); }
.mc-th img { width: 100%; height: 100%; object-fit: cover; }
.mc-th .mc-th-ic { font-size: 24px; }
.mc-th .mc-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.mc-th .mc-x svg { width: 11px; height: 11px; }
.mc-add { width: 56px; height: 56px; flex: none; border-radius: 8px; border: 1.5px dashed var(--border-strong); color: var(--text-3); font-size: 26px; cursor: pointer; display: grid; place-items: center; }
.mc-add:hover { border-color: var(--accent); color: var(--accent); }
.inbox .msg-sistema { align-self: center; background: #ffeecd; color: #54656f; font-size: 12.5px; text-align: center; padding: 7px 13px; border-radius: 8px; margin: 8px 0; position: relative; z-index: 1; }
.inbox .composer { padding: 10px 18px 14px; background: transparent; display: flex; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.inbox .comp-pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; background: #fff; border-radius: 24px; padding: 4px 6px; box-shadow: 0 1px 2px rgba(11,20,26,.1), 0 1px 1px rgba(11,20,26,.04); }
.inbox .composer textarea { flex: 1; border: none; outline: none; resize: none; font-family: inherit; font-size: 14.5px; line-height: 20px; padding: 8px 8px 8px 4px; border-radius: 10px; max-height: 120px; background: transparent; color: var(--itx); }
.inbox .composer .enviar { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); cursor: pointer; flex: none; display: grid; place-items: center; transition: background .12s; }
.inbox .composer .enviar:hover { background: var(--accent-hover); }
.inbox .composer .enviar svg { width: 20px; height: 20px; fill: #fff; }
.inbox .composer .anexar { width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: var(--itx2); cursor: pointer; flex: none; display: grid; place-items: center; }
.inbox .composer .anexar:hover { background: rgba(0,0,0,.06); color: var(--itx); }
.inbox .composer .anexar svg { width: 22px; height: 22px; }

/* Menu "+" de anexos */
.inbox .anexo-menu { position: absolute; bottom: 72px; left: 16px; background: #fff; border-radius: 16px; box-shadow: 0 6px 22px rgba(11,20,26,.18), 0 2px 8px rgba(11,20,26,.1); padding: 8px 0; z-index: 20; display: none; min-width: 230px; overflow: hidden; }
.inbox .anexo-menu.aberto { display: block; animation: compPop .13s ease; }
.inbox .anexo-item { display: flex; align-items: center; gap: 14px; margin: 0 8px; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-size: 14.5px; color: var(--itx); transition: background .12s; }
.inbox .anexo-item:hover { background: #f5f6f6; }
.inbox .anexo-ico { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.inbox .anexo-ico svg { width: 25px; height: 25px; fill: currentColor; }
/* Seletor de emoji */
.inbox .emoji-panel { position: absolute; bottom: 72px; left: 16px; width: 360px; max-width: calc(100% - 32px); height: 330px; background: #fff; border-radius: 16px; box-shadow: 0 6px 22px rgba(11,20,26,.18), 0 2px 8px rgba(11,20,26,.1); z-index: 20; display: none; flex-direction: column; overflow: hidden; }
.inbox .emoji-panel.aberto { display: flex; animation: compPop .13s ease; }
.inbox .emoji-tabs { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--borda); flex-wrap: wrap; }
.inbox .emoji-tab { border: none; background: transparent; font-size: 20px; padding: 4px 7px; cursor: pointer; border-radius: 6px; opacity: .55; line-height: 1; }
.inbox .emoji-tab.ativo { opacity: 1; position: relative; }
.inbox .emoji-tab.ativo::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -6px; height: 3px; background: var(--accent); border-radius: 3px; }
.inbox .emoji-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; align-content: start; }
.inbox .emoji-grid button { border: none; background: transparent; font-size: 23px; cursor: pointer; border-radius: 6px; padding: 3px; line-height: 1.1; }
.inbox .emoji-grid button:hover { background: #f0f2f5; }
@keyframes compPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Nota de voz (gravação), o microfone fica DENTRO da pílula, como ícone */
.inbox .composer .anexar.mic svg { width: 22px; height: 22px; }
.inbox .composer .anexar.mic:hover { color: var(--accent); }
.inbox .rec-bar { display: none; flex: 1; min-width: 0; align-items: center; gap: 10px; background: #fff; border-radius: 24px; padding: 6px 10px; box-shadow: 0 1px 2px rgba(11,20,26,.1), 0 1px 1px rgba(11,20,26,.04); }
.inbox .rec-bar.ativa { display: flex; }
.inbox .rec-x, .inbox .rec-ok { width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; flex: none; display: grid; place-items: center; }
.inbox .rec-x { background: transparent; color: var(--danger); }
.inbox .rec-x:hover { background: rgba(0,0,0,.06); }
.inbox .rec-x svg { width: 20px; height: 20px; }
.inbox .rec-ok { background: var(--accent); }
.inbox .rec-ok:hover { background: var(--accent-hover); }
.inbox .rec-ok svg { width: 18px; height: 18px; fill: #fff; }
.inbox .rec-wave { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 32px; overflow: hidden; }
.inbox .rec-wave span { display: block; width: 3px; border-radius: 3px; background: var(--accent); opacity: .85; animation: recPulse 1s ease-in-out infinite alternate; }
.inbox .rec-tempo { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--itx2); flex: none; min-width: 42px; text-align: right; }
@keyframes recPulse { from { transform: scaleY(.45); } to { transform: scaleY(1); } }

/* Cartão de contato (dentro da bolha) */
.inbox .contato-card { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.inbox .ct-linha { display: flex; align-items: center; gap: 10px; }
.inbox .ct-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.inbox .ct-info { min-width: 0; }
.inbox .ct-nome { font-weight: 600; font-size: 14px; }
.inbox .ct-tel { font-size: 12.5px; color: var(--itx2); }

/* Picker de localização (modal) */
.loc-picker .loc-busca { position: relative; margin-bottom: 8px; }
.loc-picker .loc-busca input { width: 100%; }
.loc-picker .loc-res { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: #fff; border: 1px solid var(--borda); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 200px; overflow: auto; margin-top: 3px; }
.loc-picker .loc-res-item { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f0f2f5; }
.loc-picker .loc-res-item:hover { background: #f5f6f6; }
.loc-picker .loc-res-vazio { padding: 10px 12px; color: var(--itx2); font-size: 13px; }
.loc-picker .loc-mapa { height: 280px; border-radius: 10px; overflow: hidden; background: #eef2f4; z-index: 0; }
.loc-picker .loc-mapa.leaflet-container { background: #eef2f4; }
.loc-picker .loc-barra { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; }
.loc-picker .loc-dica { font-size: 12px; color: var(--itx2); }
.loc-picker .loc-sem { padding: 20px; color: var(--itx2); text-align: center; }
.loc-picker input[type="text"] { width: 100%; }

/* citação dentro da bolha */
.inbox .msg-quote { border-left: 3px solid var(--accent); background: rgba(0,0,0,.05); border-radius: 5px; padding: 4px 8px; margin-bottom: 4px; font-size: 13px; max-width: 100%; overflow: hidden; }
.inbox .msg.me .msg-quote { background: rgba(0,0,0,.06); }
.inbox .msg-quote.q-me { border-left-color: var(--accent); } .inbox .msg-quote.q-them { border-left-color: #25d366; }
.inbox .msg-quote .q-txt { color: var(--itx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* reação na bolha */
.inbox .msg.tem-reacao { margin-bottom: 14px; }
.inbox .msg-reacao { position: absolute; bottom: -12px; right: 8px; background: #fff; border-radius: 12px; padding: 1px 4px; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.2); line-height: 1.3; }
.inbox .msg.me .msg-reacao { right: auto; left: 8px; }
/* botão de menu na bolha (hover) */
.inbox .msg-menu-btn { position: absolute; top: 2px; right: 2px; width: 24px; height: 22px; border: none; background: linear-gradient(225deg, var(--bolha-outro) 58%, rgba(255,255,255,0)); color: var(--itx2); cursor: pointer; opacity: 0; display: grid; place-items: center; border-radius: 0 7px 0 6px; transition: opacity .12s; }
.inbox .msg.me .msg-menu-btn { background: linear-gradient(225deg, var(--bolha-eu) 58%, rgba(217,253,211,0)); }
.inbox .msg.com-midia .msg-menu-btn, .inbox .msg.com-album .msg-menu-btn { background: linear-gradient(225deg, rgba(0,0,0,.45) 58%, rgba(0,0,0,0)); color: #fff; }
.inbox .msg:hover .msg-menu-btn { opacity: 1; }
.inbox .msg-menu-btn svg { width: 17px; height: 17px; }
/* menu de contexto da mensagem */
.msg-menu-ov { position: fixed; inset: 0; z-index: 150; }
.msg-menu { position: fixed; min-width: 212px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; }
.msg-menu .msg-emojis { display: flex; gap: 2px; justify-content: space-between; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.msg-menu .me-emoji { border: none; background: none; cursor: pointer; font-size: 22px; line-height: 1; padding: 5px; border-radius: 50%; transition: transform .1s, background .1s; }
.msg-menu .me-emoji:hover { transform: scale(1.2); background: #f1f1f1; }
.msg-menu .me-emoji.on { background: var(--accent-soft); }
.msg-menu .mm-item { width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13.5px; color: var(--text-2); padding: 9px 10px; border-radius: 7px; display: flex; align-items: center; gap: 10px; }
.msg-menu .mm-item:hover { background: #f4f4f4; color: var(--text); }
.msg-menu .mm-item.perigo { color: var(--danger); }
.msg-menu .mm-item.perigo:hover { background: var(--danger-soft); }
/* conversa: fixada + botão de menu */
.inbox .chat-corpo .prev .cv-dir { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.inbox .cv-pin { display: inline-flex; color: var(--itx2); } .inbox .cv-pin svg { width: 14px; height: 14px; }
.inbox .chat-item { position: relative; }
.inbox .cv-menu-btn { position: absolute; top: 14px; right: 8px; width: 24px; height: 22px; border: none; background: linear-gradient(225deg, #fff 55%, rgba(255,255,255,0)); color: var(--itx2); cursor: pointer; opacity: 0; display: grid; place-items: center; border-radius: 4px; transition: opacity .12s; }
.inbox .chat-item:hover .cv-menu-btn { opacity: 1; }
.inbox .chat-item.sel .cv-menu-btn { background: linear-gradient(225deg, var(--accent-soft) 55%, rgba(231,240,255,0)); }
.inbox .cv-menu-btn svg { width: 17px; height: 17px; }
.msg-menu .mm-item svg { width: 17px; height: 17px; flex: none; }
/* banner de resposta acima do composer */
.inbox .reply-banner { display: flex; align-items: center; gap: 10px; background: #f0f2f5; border-top: 1px solid var(--ibd); padding: 8px 16px; position: relative; z-index: 1; }
.inbox .reply-banner .rb-txt { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 10px; }
.inbox .reply-banner .rb-rot { font-size: 12.5px; font-weight: 600; color: var(--accent-hover); }
.inbox .reply-banner .rb-prev { font-size: 13px; color: var(--itx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox .reply-banner .rb-x { width: 30px; height: 30px; border: none; background: none; color: var(--itx2); cursor: pointer; flex: none; border-radius: 50%; display: grid; place-items: center; }
.inbox .reply-banner .rb-x:hover { background: rgba(0,0,0,.06); }
.inbox .reply-banner .rb-x svg { width: 16px; height: 16px; }
.inbox .composer.bloqueado { flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--itx2); font-size: 12.5px; padding: 14px 16px; margin: 0 16px 14px; line-height: 1.5; background: rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 1px 2px rgba(11,20,26,.1); }
.inbox-sem-conv { display: grid; place-items: center; height: 100%; color: var(--itx2); font-size: 13.5px; padding: 20px; text-align: center; position: relative; z-index: 2; background: linear-gradient(180deg, #f7f9fc, #eef1f6); border-bottom: 6px solid var(--accent); }
.inbox-sem-conv .sc-wrap { max-width: 440px; display: flex; flex-direction: column; align-items: center; animation: scFade .35s ease; }
.inbox-sem-conv .sc-ilu { width: 160px; height: auto; margin-bottom: 20px; filter: drop-shadow(0 10px 22px rgba(0,100,224,.12)); }
.inbox-sem-conv .sc-tit { font-size: 22px; font-weight: 700; color: var(--itx); margin: 0 0 10px; letter-spacing: -.2px; }
.inbox-sem-conv .sc-sub { font-size: 14px; line-height: 1.6; color: var(--itx2); margin: 0; }
.inbox-sem-conv .sc-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 12px; margin-top: 26px; }
.inbox-sem-conv .sc-feat { width: 98px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.inbox-sem-conv .sc-feat-ic { width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid var(--borda); display: grid; place-items: center; color: var(--accent); box-shadow: 0 3px 10px rgba(0,100,224,.08); transition: transform .14s ease, border-color .14s ease; }
.inbox-sem-conv .sc-feat-ic svg { width: 24px; height: 24px; }
.inbox-sem-conv .sc-feat:hover .sc-feat-ic { transform: translateY(-2px); border-color: var(--accent); }
.inbox-sem-conv .sc-feat-rot { font-size: 12px; color: var(--itx2); line-height: 1.3; text-align: center; }
.inbox-sem-conv .sc-rodape { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--borda); display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--itx2); }
.inbox-sem-conv .sc-rodape svg { width: 14px; height: 14px; }
@keyframes scFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.inbox .voltar-lista { display: none; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .inbox.aberta .inbox-lista { display: none; }
  .inbox:not(.aberta) .inbox-chat { display: none; }
  .inbox .voltar-lista { display: inline-flex; }
}

/* ---------------- Responsivo ---------------- */
@media (max-width: 760px) {
  .corpo { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 8px; border-right: none; border-bottom: 1px solid var(--border); gap: 6px; }
  .sidebar .nav-sec, .sidebar .espaco, .sidebar .voltar, .side-toggle { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-item .lbl { display: inline; }
  .conteudo { padding: 20px 16px 50px; }
  .user-chip .uname, .brand .nome { display: none; }
  .inp-busca { max-width: 100%; width: 100%; }
  .topbar { padding: 0 12px; }
  .topbar .brand { width: auto; border-right: none; padding: 0; }
  .breadcrumb { padding-left: 12px; }
}

/* ===== Tela Plano (molde PlugueCRM, herói no accent do Meta) ===== */
.plano-wrap { display: flex; flex-direction: column; gap: 18px; width: 100%; }
.plano-hero { position: relative; overflow: hidden; color: #fff; border-radius: 14px; background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #000) 100%); box-shadow: 0 18px 44px -16px color-mix(in srgb, var(--accent) 55%, transparent); padding: 26px 28px; }
.plano-hero::after { content: ''; position: absolute; top: -40%; right: -8%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 68%); pointer-events: none; }
.plano-hero > * { position: relative; z-index: 1; }
.plano-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.plano-hero-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.72); font-weight: 600; }
.plano-hero-nome { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 10px; }
.plano-hero-preco { font-size: 14px; color: rgba(255,255,255,.88); font-weight: 500; }
.plano-hero-preco b { font-size: 17px; font-weight: 800; color: #fff; }
.plano-hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(2px); }
.plano-hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #8ff0b8; box-shadow: 0 0 0 3px rgba(143,240,184,.25); }
.plano-hero-badge.warn .dot { background: #ffd27a; box-shadow: 0 0 0 3px rgba(255,210,122,.25); }
.plano-hero-badge.off .dot { background: rgba(255,255,255,.7); box-shadow: none; }
.plano-hero-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.plano-hero .btn-glass { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: background .14s, border-color .14s, transform .06s; }
.plano-hero .btn-glass:hover { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.45); }
.plano-hero .btn-glass:active { transform: translateY(1px); }
.plano-hero .tag-fim { font-size: 12px; color: rgba(255,255,255,.82); display: inline-flex; align-items: center; gap: 6px; }
.plano-meter { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); }
.plano-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 34px; }
.pm { min-width: 0; }
.pm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pm-top .pm-ic { font-size: 12.5px; color: rgba(255,255,255,.8); flex: none; width: 15px; text-align: center; }
.pm-top .pm-lbl { font-size: 12.5px; color: rgba(255,255,255,.82); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-top .pm-val { font-size: 12.5px; color: #fff; font-weight: 600; flex: none; }
.pm-top .pm-val b { font-size: 14px; font-weight: 800; }
.pm-track { height: 7px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.pm-fill { height: 100%; border-radius: 999px; background: #fff; min-width: 4px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.pm-fill.cheio { background: #ffd27a; }
.pm-ilim { font-size: 11.5px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 6px; padding-top: 1px; }
.pm-ilim.off { color: rgba(255,255,255,.6); }
.plano-faixa { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.plano-faixa .pf-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 17px; flex: none; }
.plano-faixa .pf-txt { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plano-faixa .pf-nome { font-size: 15px; font-weight: 700; color: var(--text); }
.plano-faixa .pf-sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.plano-up-tit { font-size: 13px; font-weight: 700; color: var(--text); margin: 6px 2px 0; }
.plano-up-sub { font-size: 13px; color: var(--text-3); margin: 2px 2px 2px; }
.plano-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plano-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 22px 20px; transition: border-color .16s, box-shadow .16s, transform .12s; }
.plano-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-3px); }
.plano-card.pop { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 12px 32px -14px color-mix(in srgb, var(--accent) 45%, transparent); }
.plano-card.atual { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.pc-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--accent); padding: 4px 11px; border-radius: 999px; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 50%, transparent); }
.pc-badge.atual { color: #fff; background: color-mix(in srgb, var(--accent) 72%, #000); box-shadow: none; }
.plano-card .pc-nome { font-size: 15px; font-weight: 700; color: var(--text); }
.plano-card .pc-preco { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--text); margin: 10px 0 0; }
.plano-card .pc-preco .ciclo { font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.pc-meta { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pc-meta .m { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.pc-meta .m i { color: var(--text-3); font-size: 13px; width: 16px; text-align: center; flex: none; }
.pc-meta .m b { font-weight: 700; color: var(--text); }
.pc-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.pc-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.pc-feats li i { font-size: 12px; margin-top: 2px; flex: none; width: 13px; text-align: center; }
.pc-feats li.on i { color: var(--ok, #16a34a); }
.pc-feats li.off { color: var(--text-3); }
.pc-feats li.off i { color: var(--danger, #dc2626); }
.plano-card .btn-primary, .plano-card .btn-atual { width: 100%; justify-content: center; margin-top: 18px; padding: 10px 15px; }
.plano-card .btn-atual { display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 8px; cursor: default; }
.plano-aviso { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 11px 14px; display: flex; align-items: center; gap: 9px; }
.plano-aviso i { font-size: 15px; }
@media (max-width: 560px) { .plano-hero { padding: 22px 18px; } .plano-hero-nome { font-size: 25px; } .plano-faixa .pf-txt { gap: 12px; } }

/* ===================== Dashboards (Visão geral + Relatórios) ===================== */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash-load { padding: 60px; text-align: center; color: var(--text-3); }
.dash-2col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.dash-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }

.dcard, .kpi, .cfg { background: var(--panel); border: 1px solid #e7eaf2; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.dcard:not(.cfg) { display: flex; flex-direction: column; }
.kpi { padding: 18px 18px 16px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-rot { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-rel .kpi-rot { font-size: 11.5px; letter-spacing: .4px; color: var(--text-3); font-weight: 600; }
.kpi-top i, .kpi-top svg { font-size: 16px; color: var(--accent); }
.kpi-val { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.05; letter-spacing: -.01em; }
.kpi-sub { font-size: 12.5px; color: var(--text-3); margin-top: 7px; }
.kdelta { font-weight: 700; } .kdelta.up { color: var(--ok); } .kdelta.down { color: var(--danger); }
.kvs { color: var(--text-3); font-weight: 400; }

.dcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.dcard-tit { font-size: 15px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 9px; }
.dcard-tit i, .dcard-tit svg { color: var(--accent); font-size: 15px; }
.dcard-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.dcard-body { padding: 16px 20px 20px; flex: 1; }
/* Corpo que estica para empurrar um elemento (ex.: botão) ao rodapé do card. */
.dcard-body.body-fill { display: flex; flex-direction: column; }
.dcard-body.body-fill .btn-bloco { margin-top: auto; }
.dcard-link { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* Configuração da conta */
.cfg { display: flex; gap: 34px; padding: 22px 24px; position: relative; align-items: center; flex-wrap: wrap; }
.cfg-l { min-width: 230px; } .cfg-tit { font-size: 15px; font-weight: 700; }
.cfg-eta { font-size: 12.5px; color: var(--text-3); margin: 3px 0 12px; }
.cfg-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; gap: 11px 34px; min-width: 300px; }
.cfg-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.cfg-item i, .cfg-item svg { font-size: 16px; } .cfg-item.ok i, .cfg-item.ok svg { color: var(--ok); } .cfg-item.ok { color: var(--text); }
.cfg-x { position: absolute; top: 14px; right: 16px; background: transparent; border: 0; color: var(--text-3); cursor: pointer; font-size: 15px; }

/* Barra de progresso genérica */
.pbar { height: 7px; border-radius: 6px; background: #eef1f7; overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }

/* Gráficos */
.graf-area, .graf-combo { width: 100%; }
.graf-area svg, .graf-combo svg { width: 100%; height: auto; display: block; }
.graf-vazio { padding: 48px; text-align: center; color: var(--text-3); font-size: 13px; }
.legenda .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.legenda .dot-line { display: inline-block; width: 14px; height: 3px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* Janela 24h */
.jan-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.jan-mini > div { background: #f6f8fc; border-radius: 11px; padding: 12px 8px; text-align: center; }
.jan-mini b { display: block; font-size: 22px; font-weight: 700; } .jan-mini span { font-size: 11.5px; color: var(--text-3); }
.c-dng { color: var(--danger); } .c-wrn { color: #e0871b; } .c-ok { color: var(--ok); } .c-mut { color: var(--text-3); }
.jan-lista { display: flex; flex-direction: column; }
.jan-row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-top: 1px solid var(--border); }
.jan-row:first-child { border-top: 0; }
.jan-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.jan-mid { flex: 1; min-width: 0; } .jan-nome { font-size: 13.5px; font-weight: 600; } .jan-prev { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jan-dir { display: flex; align-items: center; gap: 8px; flex: none; }
.jan-tempo { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.jan-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }

/* Saúde dos números */
.saude-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.saude-card { border: 1px solid var(--border); border-radius: 13px; padding: 16px; }
.saude-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.saude-nome { font-size: 14px; font-weight: 700; } .saude-tel { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.saude-tier { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.saude-tier b { font-weight: 700; color: var(--text); }
.saude-pico { font-size: 11.5px; color: var(--text-3); margin-top: 9px; }

/* Templates: barra empilhada + legenda */
.seg-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #eef1f7; margin-bottom: 14px; }
.seg-bar > span { display: block; height: 100%; }
.seg-legs { display: flex; flex-direction: column; gap: 9px; }
.seg-leg { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.seg-leg b { color: var(--text); font-weight: 700; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }

/* Disparos (card) */
.disp-row { padding: 11px 0; border-top: 1px solid var(--border); }
.disp-row:first-child { border-top: 0; padding-top: 2px; }
.disp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.disp-nome { font-size: 13.5px; font-weight: 600; } .disp-meta { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.pill.neutro { color: var(--text-2); background: #eef1f7; } .pill.mini { font-size: 10px; padding: 1px 7px; margin-left: 6px; }

/* Conversas por categoria */
.cat-row { padding: 11px 0; } .cat-row + .cat-row { border-top: 1px solid var(--border); }
.cat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.cat-top b { color: var(--text); } .cat-n { font-weight: 700; } .cat-val { font-size: 12px; color: var(--text-3); text-align: right; margin-top: 5px; }

/* Precisa da sua atenção (acento lateral, pedido no layout) */
.aten-row { border-left: 3px solid #e0871b; background: #fff8ef; border-radius: 8px; padding: 11px 13px; margin-bottom: 10px; }
.aten-tit { font-size: 13.5px; font-weight: 600; } .aten-det { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* Listas de contatos */
.lis-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border); }
.lis-row:first-child { border-top: 0; }
.lis-nome { font-size: 13.5px; } .lis-dir { text-align: right; } .lis-dir b { font-size: 14px; font-weight: 700; } .lis-dir small { display: block; font-size: 11px; color: var(--text-3); }

/* Plano */
.uso-row { margin-bottom: 15px; } .uso-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 7px; } .uso-top b { color: var(--text); font-weight: 700; }
.plano-acoes { display: flex; gap: 10px; margin-top: 4px; } .plano-acoes .btn-sec { flex: 1; justify-content: center; }

/* Relatórios: barra de ações */
.rel-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel-filtro { display: inline-flex; align-items: center; }
.rel-filtro .sel { min-width: 190px; }
.rel-filtro .sel-btn { justify-content: flex-start; gap: 8px; }
.rel-filtro .sel-chev { margin-left: auto; }
.rel-funnel { color: var(--text-3); font-size: 13px; flex: none; }
.rel-csv { padding: 7px 13px; }

/* Select da família (ui.js), tokens do painel. Sem select nativo. */
.sel { position: relative; display: inline-block; }
.sel-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; }
.sel-btn .sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-chev { width: 16px; height: 16px; flex: none; color: var(--text-3); transition: transform .15s; }
.sel.aberto .sel-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel.aberto .sel-chev { transform: rotate(180deg); }
.sel-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; max-width: 320px; z-index: 200; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(16,24,40,.14); overflow: hidden; display: none; padding: 5px; max-height: 300px; overflow-y: auto; }
.sel.aberto .sel-pop { display: block; }
.sel-opt { display: block; font-size: 13.5px; padding: 8px 11px; border-radius: 8px; cursor: pointer; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-opt:hover { background: #f4f4f4; color: var(--text); }
.sel-opt.sel { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.sel-opt.hl { background: #f4f4f4; color: var(--text); }
.sel-pop.com-busca { padding: 0; overflow: hidden; max-height: none; }
.sel-busca { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; background: var(--panel); color: var(--text); font-family: inherit; font-size: 13.5px; padding: 10px 12px; outline: none; }
.sel-busca::placeholder { color: var(--text-3); }
.sel-busca:focus { border-bottom-color: var(--accent); }
.sel-pop.com-busca .sel-lista { max-height: 252px; overflow-y: auto; padding: 5px; }
.sel-vazio { font-size: 13px; color: var(--text-3); text-align: center; padding: 12px 10px; }

/* Funil / Custo / Falhas */
.fun-row { margin-bottom: 15px; } .fun-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.fun-top b { color: var(--text); font-weight: 700; } .fun-top small { color: var(--text-3); font-weight: 400; }
.custo-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; } .custo-row + .custo-row { border-top: 1px solid var(--border); }
.custo-mid { flex: 1; } .custo-nome { font-size: 13.5px; font-weight: 600; } .custo-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; } .custo-val { font-weight: 700; }
.custo-nota { font-size: 12px; color: var(--accent-hover); background: var(--accent-soft); border-radius: 9px; padding: 11px 13px; margin-top: 14px; }
.falha-row { padding: 10px 0; } .falha-row + .falha-row { border-top: 1px solid var(--border); }
.falha-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 7px; } .falha-top b { color: var(--text); font-weight: 700; }
.falha-cod { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* Tabelas dos relatórios */
.rel-tab { width: 100%; border-collapse: collapse; }
.rel-tab th { text-align: left; font-size: 11px; letter-spacing: .4px; color: var(--text-3); font-weight: 600; padding: 0 14px 12px 0; border-bottom: 1px solid var(--border); }
.rel-tab td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text); vertical-align: middle; }
.rel-tab tr:last-child td { border-bottom: 0; }
.rel-tab code { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.tier-cell, .resp-cell, .prog-cell { display: flex; align-items: center; gap: 10px; } .tier-cell .pbar, .resp-cell .pbar, .prog-cell .pbar { width: 90px; }
.tier-cell span, .resp-cell span, .prog-cell span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.prog-cell { flex-direction: column; align-items: flex-start; gap: 4px; } .prog-cell .pbar { width: 130px; } .prog-cell span { font-size: 11.5px; color: var(--text-3); }

/* Heatmap */
.heat { display: flex; flex-direction: column; gap: 5px; }
.heat-row { display: grid; grid-template-columns: 38px repeat(12, 1fr); gap: 5px; align-items: center; }
.heat-lbl { font-size: 11.5px; color: var(--text-3); } .heat-cab { font-size: 10px; color: var(--text-3); text-align: center; }
.heat-cell { height: 30px; border-radius: 6px; }
.heat-nota { font-size: 12px; color: var(--text-3); margin-top: 14px; }

.vazio-min { padding: 24px 8px; text-align: center; color: var(--text-3); font-size: 13px; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); } .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-2col, .dash-3col { grid-template-columns: 1fr; } .saude-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid, .kpi-grid-4 { grid-template-columns: 1fr 1fr; } .saude-grid { grid-template-columns: 1fr; }
  .cfg-grid { grid-template-columns: 1fr; } .rel-tab { font-size: 12.5px; }
}


/* ===== Menu mobile (hamburguer + gaveta) — padrao da familia Pluguee ===== */
.menu-ham { display: none; width: 38px; height: 38px; align-self: center; margin-left: 2px; border: none; background: transparent; border-radius: 9px; color: var(--text-2); place-items: center; cursor: pointer; font-size: 18px; transition: background .12s, color .12s; }
.menu-ham:hover { background: var(--hov); color: var(--text); }
.menu-backdrop { display: none; }
@media (max-width: 820px) {
  .menu-ham { display: grid; }
  .breadcrumb { display: none; }
  .side-toggle, .side-toggle-top, .side-fab { display: none !important; }
  .brand .nome, .brand-box .nome { display: none; }
  .brand-box { width: auto; border-right: none; padding: 0; }
  .corpo { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: var(--topbar-h, 56px); left: 0; z-index: 41; width: min(82vw, 300px); max-width: 300px; height: calc(100vh - var(--topbar-h, 56px)); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 10px 40px rgba(0,0,0,.18); overflow-y: auto; overflow-x: hidden; flex-direction: column; gap: 0; border-right: none; padding: 10px; }
  body.menu-aberto .sidebar { transform: translateX(0); }
  body.side-collapsed .sidebar { width: min(82vw, 300px); padding: 10px; }
  body.side-collapsed .nav-item { justify-content: flex-start; gap: 10px; padding: 8px 10px; }
  body.side-collapsed .nav-item .lbl, body.side-collapsed .nav-item .soon { display: inline; }
  .sidebar .nav-sec, .sidebar .espaco, .sidebar .voltar { display: block; }
  .sidebar .espaco { flex: 1; }
  .sidebar .nav-sec.nav-sec-tgl { display: flex; }
  .nav-item { white-space: normal; }
  body.menu-aberto .menu-backdrop { display: block; position: fixed; inset: var(--topbar-h, 56px) 0 0 0; z-index: 40; background: rgba(0,0,0,.38); }
}

/* migalha: so o nome da tela (sem raiz nem barra) */
.breadcrumb .sep { display: none !important; }

/* ===== RODAPÉ MOBILE (barra de atalhos estilo app, com entalhe no centro) ===== */
.rodape-mobile { display: none; }
@media (max-width: 820px) {
  /* hambúrguer sai do topo e vira o "Menu" da barra de baixo */
  .menu-ham, #menu-btn { display: none !important; }
  .rodape-mobile {
    display: flex; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: transparent;   /* o visual da barra vai no ::before, pra poder recortar o entalhe do "+" */
  }
  /* a barra em si (fica no ::before). O topo tem uma ONDA suave no centro (ombros que sobem em S + vale),
     onde o losango se encaixa. A barra é a UNIÃO de: onda central (SVG) + laterais retas + base cheia. */
  .rodape-mobile::before {
    content: ''; position: absolute; left: 0; right: 0; top: -28px; bottom: 0; z-index: -1;
    background: var(--panel);
    --wv: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='150'%20height='62'%3E%3Cpath%20d='M0,28%20H26%20C42,28%2042,11%2056,11%20C66,11%2068,51%2075,51%20C82,51%2084,11%2094,11%20C108,11%20108,28%20124,28%20H150%20V62%20H0%20Z'%20fill='%23000'/%3E%3C/svg%3E");
    -webkit-mask:
      var(--wv) 50% 0 / 150px 62px no-repeat,
      linear-gradient(#000, #000) left bottom / calc(50% - 74px) calc(100% - 28px) no-repeat,
      linear-gradient(#000, #000) right bottom / calc(50% - 74px) calc(100% - 28px) no-repeat,
      linear-gradient(#000, #000) center bottom / 100% calc(100% - 51px) no-repeat;
    mask:
      var(--wv) 50% 0 / 150px 62px no-repeat,
      linear-gradient(#000, #000) left bottom / calc(50% - 74px) calc(100% - 28px) no-repeat,
      linear-gradient(#000, #000) right bottom / calc(50% - 74px) calc(100% - 28px) no-repeat,
      linear-gradient(#000, #000) center bottom / 100% calc(100% - 51px) no-repeat;
    filter: drop-shadow(0 -2px 9px rgba(0, 0, 0, .10));
  }
  .rodape-mobile .rb-item {
    flex: 1 1 0; min-width: 0; border: none; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 2px; color: var(--text-3); font: 600 10px/1 inherit;
    transition: color .12s;
  }
  .rodape-mobile .rb-item i { font-size: 19px; line-height: 1; }
  .rodape-mobile .rb-item span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rodape-mobile .rb-item:active { color: var(--text-2); }
  .rodape-mobile .rb-item.ativo { color: var(--accent); }
  /* botão "+" central em LOSANGO (quadrado arredondado girado 45°); encaixa no entalhe e sobe acima do texto */
  .rodape-mobile .rb-mais {
    flex: 0 0 auto; align-self: flex-start; position: relative; top: -24px;
    width: 44px; height: 44px; border-radius: 14px; border: none;
    background: var(--accent); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transform: rotate(45deg);
    box-shadow: 0 6px 15px color-mix(in srgb, var(--accent) 40%, transparent);
    transition: transform .1s;
  }
  /* o conteúdo do botão (ícone) volta à posição normal */
  .rodape-mobile .rb-mais i, .rodape-mobile .rb-mais svg { transform: rotate(-45deg); }
  .rodape-mobile .rb-mais i { font-size: 22px; line-height: 1; }
  .rodape-mobile .rb-mais:active { transform: rotate(45deg) scale(.92); }
  /* conteúdo não fica escondido atrás da barra */
  .conteudo { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}
