/* Telas de perfil: lista e "Ajustes de perfil" (criar/editar em etapas).
   Cores e medidas tiradas das telas de referência: campos cinza-grafite com rótulo flutuante, azul claro nas ações. */
:root {
  --pf-campo: #272a2e;
  --pf-campo-hover: #2c2f34;
  --pf-rotulo: #a7aab0;
  --pf-texto: #f1f1f2;
  --pf-apagado: #8d9096;
  --pf-azul: #6b9bff;
  --pf-azul-escuro: #18202e;
  --pf-raio: 8px;
}

/* ---------- estrutura: coluna da esquerda (perfil + etapas) e conteúdo ---------- */
.pf { display: grid; grid-template-columns: 313px minmax(0, 562px); gap: 74px; align-items: start; padding-top: 6px; }
.pf-lado { position: sticky; top: 24px; display: flex; flex-direction: column; }
.pf-voltar { display: inline-flex; align-items: center; gap: 6px; color: var(--pf-apagado); text-decoration: none; font-size: 14px; margin-bottom: 14px; width: fit-content; }
.pf-voltar:hover { color: var(--pf-texto); }
.pf-voltar .icone { width: 16px; height: 16px; }

.pf-seletor-caixa { position: relative; }
.pf-seletor {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 63px; padding: 0 18px 0 12px;
  background: #2a2d31; border: 0; border-radius: 6px; color: var(--pf-texto); cursor: pointer; text-align: left;
}
.pf-seletor:hover { background: #303338; }
.pf-seletor strong { flex: 1; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-chev { width: 20px; height: 20px; color: #e6e6e6; flex: none; transition: transform .15s; }
.aberto > button .pf-chev, .pf-seletor[aria-expanded="true"] .pf-chev { transform: rotate(180deg); }

.pf-titulo { font-size: 23px; font-weight: 400; color: var(--pf-texto); margin: 42px 0 30px 19px; letter-spacing: -.2px; }
.pf-nav { display: grid; gap: 4px; padding-left: 10px; }
.pf-nav button {
  display: flex; align-items: center; gap: 12px; padding: 12px 8px; background: none; border: 0; border-radius: 8px;
  color: #a3a3a3; font-size: 16px; cursor: pointer; text-align: left;
}
.pf-nav button:hover { color: #d8d8d8; }
.pf-nav button .icone { width: 22px; height: 22px; }
.pf-nav button.ativo { color: #fff; }
.pf-nav button.ativo .icone { color: var(--pf-azul); }

/* ---------- avatar com as iniciais ---------- */
.pf-av {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(140deg, #5bb7ff, #2e8ef5); color: #1b5fae; font-weight: 700; font-size: 15px; letter-spacing: .3px;
}
.pf-av-g { width: 62px; height: 62px; font-size: 16px; }
.pf-av-p { width: 32px; height: 32px; font-size: 12.5px; }

/* ---------- conteúdo da etapa ---------- */
.pf-conteudo { display: grid; gap: 18px; min-width: 0; }
.pf-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.pf-cab h3, .pf-sub { font-size: 16px; font-weight: 500; color: var(--pf-texto); }
.pf-cab small { font-size: 13.5px; color: #d6d6d8; }
.pf-texto { font-size: 15.5px; color: var(--pf-texto); margin-top: -10px; }
.pf-linha { display: flex; gap: 18px; align-items: stretch; }
.pf-linha > .pf-campo { flex: 1; min-width: 0; }
.pf-duas > * { flex: 1 1 0; }
.pf-linha-av { align-items: center; }

/* Campo com rótulo flutuante: vazio, o rótulo fica no meio; com valor (ou em foco), sobe e diminui. */
.pf-campo {
  position: relative; display: block; height: 63px; background: var(--pf-campo); border-radius: var(--pf-raio);
  transition: background .15s, box-shadow .15s;
}
.pf-campo:hover { background: var(--pf-campo-hover); }
.pf-campo:focus-within { box-shadow: 0 0 0 1px rgba(107, 155, 255, .55); }
.pf-campo input {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 25px 19px 6px; background: none; border: 0; outline: 0;
  color: var(--pf-texto); font-size: 16px;
}
.pf-campo > span {
  position: absolute; left: 19px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--pf-texto); font-size: 16px; transition: top .15s, font-size .15s, color .15s;
}
.pf-campo input:focus + span, .pf-campo input:not(:placeholder-shown) + span, .pf-campo-fixo > span { top: 20px; font-size: 13.5px; color: var(--pf-rotulo); }
.pf-campo input::placeholder { color: #6f7277; }
/* Senha com o olhinho de mostrar/esconder à direita */
.pf-senha { position: relative; }
.pf-senha .pf-campo input { padding-right: 56px; }
.pf-olho { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--pf-rotulo); cursor: pointer; }
.pf-olho:hover { color: var(--pf-texto); background: rgba(255, 255, 255, .06); }
.pf-olho .icone { width: 20px; height: 20px; }
/* Observação: caixa de texto alta, com o rótulo sempre em cima */
.pf-campo-texto { height: auto; }
.pf-campo-texto > span { top: 20px; font-size: 13.5px; color: var(--pf-rotulo); }
.pf-campo-texto textarea { display: block; width: 100%; min-height: 110px; padding: 34px 19px 12px; background: none; border: 0; outline: 0; resize: vertical; color: var(--pf-texto); font: inherit; font-size: 15px; line-height: 1.5; }
.pf-campo-texto textarea::placeholder { color: #6f7277; }
.pf-obs textarea { min-height: 320px; }
.pf-campo-fixo .pf-valor { position: absolute; left: 19px; right: 19px; bottom: 9px; font-size: 16px; color: var(--pf-texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-campo-fixo .pf-valor.apagado { color: var(--pf-apagado); }

/* Campo desligado (proxy desativado): tudo esmaecido e sem clique */
.pf-off { opacity: .45; pointer-events: none; }
.pf-campo.pf-off { background: #1d1f22; opacity: 1; }
.pf-campo.pf-off > span, .pf-campo.pf-off .pf-rot, .pf-campo.pf-off .pf-valor { color: #6c6f75; }
.pf-campo.pf-off input::placeholder { color: #55585d; }

/* Lista de escolha (parece um select, com o menu próprio) */
.pf-select { cursor: pointer; }
.pf-select-btn { position: absolute; inset: 0; display: block; width: 100%; padding: 0 19px; background: none; border: 0; text-align: left; color: inherit; cursor: pointer; }
.pf-rot { position: absolute; left: 19px; top: 20px; transform: translateY(-50%); font-size: 13.5px; color: var(--pf-rotulo); }
.pf-select .pf-valor { position: absolute; left: 19px; right: 52px; bottom: 9px; display: flex; align-items: center; gap: 9px; font-size: 16px; color: var(--pf-texto); white-space: nowrap; }
.pf-select .pf-chev { position: absolute; right: 18px; top: 50%; margin-top: -10px; }
.pf-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; padding: 6px; display: grid; gap: 2px;
  background: #2a2d31; border: 1px solid #383b41; border-radius: var(--pf-raio); box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.pf-menu button, .pf-menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 6px; background: none;
  color: var(--pf-texto); font-size: 15px; text-align: left; text-decoration: none; cursor: pointer;
}
.pf-menu button:hover, .pf-menu a:hover { background: #34373c; }
.pf-menu .sel { background: #33363b; }
.pf-menu button:disabled { color: #6c6f75; cursor: default; background: none; }
.pf-menu em { margin-left: auto; font-style: normal; font-size: 12px; color: #6c6f75; }
.pf-menu-seletor { max-height: 340px; overflow: auto; }
.pf-menu-seletor a:last-child { color: var(--pf-azul); border-top: 1px solid #383b41; border-radius: 0 0 6px 6px; margin-top: 4px; }

/* Ícones pequenos ao lado do valor (plataforma, tag) */
.pf-marca { width: 19px; height: 19px; flex: none; }
.pf-letra { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 4px; background: #e8e8e8; color: #1c1c1c; font-size: 11.5px; font-weight: 800; flex: none; }

/* Quadradinho da cor da tag */
.pf-cor { flex: none; width: 63px; height: 63px; display: grid; place-items: center; background: var(--pf-campo); border: 0; border-radius: var(--pf-raio); cursor: pointer; }
.pf-cor:hover { background: var(--pf-campo-hover); }
.pf-cor i { width: 42px; height: 42px; border-radius: 3px; }

/* Barra de ajuda azul ("Adicione o seu token OTP") e resultado do teste do proxy */
.pf-dica {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 45px; padding: 10px 19px; margin-top: -10px;
  background: var(--pf-azul-escuro); border: 0; border-radius: var(--pf-raio); color: var(--pf-azul); font-size: 16px; text-align: left; cursor: pointer;
}
.pf-dica .icone { width: 22px; height: 22px; }
.pf-dica-texto { margin-top: -10px; padding: 0 4px; color: var(--pf-rotulo); font-size: 14px; }
.pf-resultado { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--pf-raio); font-size: 14.5px; margin-top: -4px; }
.pf-resultado .icone { width: 20px; height: 20px; }
.pf-resultado.ok { background: rgba(52, 211, 153, .1); color: #6ee7b7; }
.pf-resultado.erro { background: rgba(248, 113, 113, .1); color: #fca5a5; }
.pf-resultado.testando { background: var(--pf-azul-escuro); color: var(--pf-azul); }

/* Chave liga/desliga */
.pf-linha-chave { align-items: center; justify-content: space-between; }
.pf-chave { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; color: var(--pf-texto); font-size: 15px; width: fit-content; }
.pf-chave input { position: absolute; opacity: 0; pointer-events: none; }
.pf-chave i { position: relative; width: 50px; height: 26px; border-radius: 13px; background: #6b6b6b; transition: background .18s; flex: none; }
.pf-chave i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .18s; }
.pf-chave input:checked + i { background: var(--pf-azul); }
.pf-chave input:checked + i::after { transform: translateX(24px); }
.pf-chave input:focus-visible + i { outline: 2px solid var(--pf-azul); outline-offset: 2px; }
.pf-chave.pf-off { opacity: .55; }

/* Botões */
.pf-salvar {
  width: 100%; height: 45px; border: 0; border-radius: var(--pf-raio); background: var(--pf-azul); color: #16181c;
  font-size: 16px; cursor: pointer; transition: filter .15s;
}
.pf-salvar:hover { filter: brightness(1.08); }
.pf-salvar:disabled { opacity: .6; cursor: wait; }
.pf-salvar-escuro { background: #3a5182; color: #c4d2f2; }
.pf-testar { height: 37px; padding: 0 26px; border: 0; border-radius: 6px; background: #263354; color: #9db8ff; font-size: 15px; cursor: pointer; }
.pf-testar:hover { filter: brightness(1.12); }
.pf-testar:disabled { background: #1c2437; color: #4a5b85; cursor: default; filter: none; }

/* Cartões de ação (cookies) */
.pf-item {
  display: flex; align-items: center; gap: 18px; width: 100%; padding: 19px 24px; background: var(--pf-campo); border: 0;
  border-radius: var(--pf-raio); color: var(--pf-texto); text-align: left; cursor: pointer;
}
.pf-item:hover { background: var(--pf-campo-hover); }
.pf-item > .icone { width: 24px; height: 24px; color: #a7aab0; }
.pf-item div { flex: 1; display: grid; gap: 2px; }
.pf-item strong { font-size: 16px; font-weight: 500; }
.pf-item small { font-size: 14.5px; color: var(--pf-rotulo); }
.pf-item .pf-seta { width: 22px; height: 22px; color: #8a8d92; }

.pf-soltar {
  display: grid; place-content: center; gap: 14px; min-height: 186px; padding: 24px; background: var(--pf-campo);
  border-radius: var(--pf-raio); text-align: center; color: var(--pf-rotulo); font-size: 16px;
}
.pf-soltar small { font-size: 14.5px; }
.pf-soltar > .icone { width: 30px; height: 30px; margin: 0 auto; color: #6c6f75; }
.pf-soltar-cookies {
  display: block; position: relative; min-height: 186px; padding: 0;
  border: 1px solid transparent; transition: border-color 0.2s, background-color 0.2s;
}
.pf-soltar-cookies:focus-within { border-color: #2ea4ff; }
.pf-soltar-cookies.arrastando { border-color: #2ea4ff; background: rgba(46, 164, 255, 0.08); }
.pf-cookies-area {
  width: 100%; min-height: 186px; padding: 20px 24px; background: transparent; border: none; outline: none;
  color: var(--pf-texto); font-family: Consolas, "Cascadia Mono", monospace; font-size: 13.5px; line-height: 1.5;
  resize: vertical; box-sizing: border-box; border-radius: var(--pf-raio);
}
.pf-cookies-area::placeholder {
  color: var(--pf-rotulo); font-family: inherit; font-size: 15px; text-align: center; padding-top: 48px; line-height: 1.7;
}
.pf-nota { display: flex; align-items: center; gap: 8px; color: var(--pf-apagado); font-size: 14.5px; margin-top: -6px; }
.pf-nota .icone { width: 20px; height: 20px; }
.pf-nota-ok { color: #34d399 !important; }
.pf-nota-ok .icone { color: #34d399 !important; }
.pf-nota-erro { color: #ef4444 !important; }
.pf-nota-erro .icone { color: #ef4444 !important; }
.pf-breve { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 10px; background: #2f3237; color: #8d9096; font-size: 11.5px; vertical-align: 2px; font-weight: 500; }

/* ---------- lista de perfis ---------- */
.pf-celula { display: flex; align-items: center; gap: 12px; }
.pf-celula strong { display: block; }
.pf-celula small, .pf-sub-linha { display: block; color: var(--apagado); font-size: 12.5px; }
.pf-endereco { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; color: var(--tinta-2); }
.pf-acoes { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.pf-acoes .btn { min-width: 86px; justify-content: center; }

/* ---------- lista de perfis na sidebar ---------- */
.menu { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 6px 10px; }
.menu::-webkit-scrollbar { width: 8px; }
.menu::-webkit-scrollbar-thumb { background: #2c2c31; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
/* Pastas de grupo na sidebar: cabeçalho cinza arredondado que abre/fecha, perfis embaixo */
.sp-grupo { display: flex; flex-direction: column; gap: 3px; }
.sp-grupo + .sp-grupo { margin-top: 6px; }
.sp-pasta {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; flex: none;
  border: 1px solid transparent; border-radius: 11px; cursor: pointer; color: var(--tinta); text-align: left; font: inherit;
  background: linear-gradient(180deg, #38383d, #2e2e33); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .15s, filter .15s;
}
.sp-pasta:hover { filter: brightness(1.12); }
.sp-pasta:focus-visible { outline: none; border-color: var(--acento-forte); }
.sp-pasta.ativo { border-color: var(--acento-forte); box-shadow: 0 0 0 1px rgba(67, 128, 246, .25), inset 0 1px 0 rgba(255, 255, 255, .06); }
.sp-pasta-ico { display: grid; place-items: center; flex: none; width: 20px; color: var(--tinta-2); }
.sp-pasta-ico .icone { width: 18px; height: 18px; }
.sp-pasta-nome { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pasta-n { font-size: 11.5px; font-weight: 600; color: var(--apagado); font-variant-numeric: tabular-nums; }
.sp-pasta-on { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; font-size: 11px; font-weight: 700; color: #052e16; background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, .5); }
.sp-pasta-chev { width: 16px; height: 16px; flex: none; color: var(--tinta-2); transform: rotate(180deg); transition: transform .2s; }
.sp-grupo.fechado .sp-pasta-chev { transform: none; }
.sp-filhos { display: flex; flex-direction: column; gap: 3px; }
.sp-pasta-vazia { font-size: 12.5px; color: var(--apagado); padding: 6px 12px; }
/* Barra recolhida: a pasta vira só o ícone */
body.recolhida .sp-pasta { justify-content: center; padding: 0; height: 36px; }
body.recolhida .sp-pasta-nome, body.recolhida .sp-pasta-n, body.recolhida .sp-pasta-chev, body.recolhida .sp-pasta-vazia { display: none; }
body.recolhida .sp-pasta-on { position: absolute; transform: translate(12px, -10px); }
body.recolhida .sp-pasta { position: relative; }
/* Botão Start/Stop da tabela de perfis: contorno verde (fechado, abre) ou vermelho (aberto, fecha) */
.tp-ss {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 116px; height: 36px; padding: 0 16px;
  background: #1c1c1f; border: 1px solid; border-radius: 6px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; transition: background .15s, transform .15s;
}
.tp-ss .icone { width: 15px; height: 15px; stroke-width: 2; }
.tp-ss:active { transform: scale(.97); }
.tp-ss:disabled { opacity: .6; cursor: default; }
.tp-start { color: #4ade80; border-color: #22c55e; }
.tp-start:hover:not(:disabled) { background: rgba(34, 197, 94, .1); }
.tp-stop { color: #f04444; border-color: #dc2626; }
.tp-stop .icone { stroke-width: 2.6; }
.tp-stop:hover { background: rgba(220, 38, 38, .1); }
/* Cadeado 2FA na sidebar: clica e copia o código; pisca verde ao copiar */
.sp-2fa { display: grid; place-items: center; flex: none; width: 22px; height: 26px; border-radius: 6px; color: #fbbf24; transition: color .15s, background .15s; }
.sp-2fa .icone { width: 16px; height: 16px; stroke-width: 2; }
.sp-2fa:hover, .sp-2fa:focus-visible { background: rgba(251, 191, 36, .14); outline: none; }
.sp-2fa.copiado { color: #34d399; background: rgba(52, 211, 153, .16); animation: .35s cubic-bezier(.3, 1.6, .5, 1) both gpPulo; }
body.recolhida .sp-2fa { display: none; }
/* 3 pontinhos de cada perfil na sidebar e o menu que eles abrem */
.sp-mais { display: grid; place-items: center; flex: none; width: 22px; height: 26px; margin: 0 -4px 0 -2px; border-radius: 6px; color: var(--tinta-2); }
.sp-mais .icone { width: 18px; height: 18px; }
.sp-mais:hover, .sp-mais:focus-visible { color: var(--tinta); background: rgba(255, 255, 255, .09); outline: none; }
body.recolhida .sp-mais { display: none; }
.sp-menu {
  position: fixed; z-index: 80; min-width: 170px; padding: 5px; display: flex; flex-direction: column; gap: 1px;
  background: var(--superficie-2); border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  animation: .14s ease both surgir;
}
.sp-menu button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--tinta); font-size: 13.5px; text-align: left; cursor: pointer; }
.sp-menu button .icone { width: 16px; height: 16px; color: var(--tinta-2); }
.sp-menu button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
.sp-menu button:disabled { opacity: .45; cursor: default; }
.sp-menu .sp-menu-perigo, .sp-menu .sp-menu-perigo .icone { color: #f87171; }
.sp-vazio { color: var(--apagado); font-size: 13px; text-align: center; padding: 20px 10px; }
.sp-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px;
  background: none; border: 1px solid #3f3f46; border-radius: 11px; cursor: pointer; color: var(--tinta); text-align: left;
  transition: background .12s, border-color .12s;
}
.sp-item:hover { background: rgba(255, 255, 255, .045); }
/* Contorno: cinza=fechado, verde=aberto, vermelho=aberto E em foco agora */
.sp-item.aberto { border-color: #34d399; }
.sp-item.ativo { background: rgba(67, 128, 246, .1); }
.sp-item.aberto.ativo { border-color: #ef4444; box-shadow: 0 0 0 1px rgba(239, 68, 68, .25); }
.sp-av { position: relative; flex: none; }
.sp-on { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #34d399; border: 2px solid var(--lateral); box-shadow: 0 0 5px rgba(52, 211, 153, .6); }
.sp-nome { flex: 1; min-width: 0; font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-plat { display: flex; flex: none; }
.sp-plat svg, .sp-plat .pf-marca, .sp-plat .pf-letra { width: 16px; height: 16px; }
/* recolhida: só o avatar */
body.recolhida .sp-item { justify-content: center; padding: 7px 0; }
body.recolhida .sp-nome, body.recolhida .sp-plat { display: none; }

/* ---------- botão Novo perfil no rodapé da sidebar ---------- */
.lateral-pe { position: relative; z-index: 1; padding: 10px 14px 16px; }
.novo-perfil {
  position: relative; z-index: 1; width: 100%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 16px; border: 0; border-radius: 13px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 650; letter-spacing: .2px; color: #fff;
  background: linear-gradient(135deg, #5b96ff 0%, #3f74ef 55%, #3360d8 100%);
  box-shadow: 0 10px 24px -8px rgba(63, 116, 239, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .2s, filter .15s;
}
/* brilho que passa no hover, dá personalidade */
.novo-perfil::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 32%, rgba(255, 255, 255, .22) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .7s;
}
.novo-perfil:hover::before { transform: translateX(130%); }
.novo-perfil:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 30px -8px rgba(63, 116, 239, .78), inset 0 1px 0 rgba(255, 255, 255, .3); }
.novo-perfil:active { transform: translateY(0); }
.novo-perfil-mais { display: grid; place-items: center; width: 24px; height: 24px; flex: none; background: rgba(255, 255, 255, .2); border-radius: 7px; }
.novo-perfil-mais svg { width: 15px; height: 15px; }
body.recolhida .lateral-pe { padding: 10px 12px 16px; }
body.recolhida .novo-perfil { padding: 13px 0; gap: 0; }
body.recolhida .novo-perfil-txt { display: none; }

/* ---------- abas no topo (Chrome / Perfis / Grupos / Proxys) ---------- */
.abas-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--linha); }
.abas-topo-itens { display: flex; gap: 2px; flex: 1; min-width: 0; }
.abas-topo-acoes { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; min-width: 0; }
/* "Fechar" (e outros botões do topo) nunca encolhem nem cortam o texto; quem cede espaço é o nome/cidade do perfil */
.abas-topo-acoes .btn { flex: 0 0 auto; white-space: nowrap; }
.abas-topo-acoes .jn-info { flex: 0 1 auto; min-width: 0; }
.aba-topo { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 14px; margin-bottom: -1px; color: var(--apagado); text-decoration: none; font-size: 15px; font-weight: 550; border-bottom: 2px solid transparent; transition: color .15s; }
.aba-topo:hover { color: var(--tinta-2); }
.aba-topo.ativo { color: var(--tinta); border-bottom-color: var(--acento-forte); font-weight: 650; }
.aba-n { font-size: 11.5px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; background: var(--superficie-2); border-radius: 9px; color: var(--tinta-2); }
.aba-topo.ativo .aba-n { background: var(--acento-suave); color: var(--acento-forte); }

/* ---------- aba Chrome: cards dos perfis abertos ---------- */

/* ---------- tela de Perfis: cabeçalho enxuto + tabela densa (cara de multilogin) ---------- */
/* sobe o conteúdo pra liberar espaço embaixo */
.principal { padding-top: 18px !important; }
.topo-simples { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.topo-simples h1 { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; }
.topo-simples .topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tp-contador { font-size: 12.5px; font-weight: 600; color: var(--tinta-2); background: var(--superficie-2); border: 1px solid var(--linha-suave); border-radius: 20px; padding: 3px 11px; }
.tp-refresh { width: 40px; height: 40px; border: 1px solid var(--linha); border-radius: 10px; background: var(--superficie); color: var(--tinta-2); }
.tp-refresh:hover { color: var(--tinta); filter: brightness(1.3); }
/* Lixeira do topo: mesma cara do botão de atualizar; com perfis marcados ganha o número no canto */
.tp-lixo { position: relative; }
.tp-lixo-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 2px var(--fundo); }
.tp-refresh.girando svg { animation: girar .6s linear; }
@keyframes girar { to { transform: rotate(360deg); } }

.tp { background: var(--superficie); border: 1px solid var(--linha-suave); border-radius: 14px; overflow: hidden; }
.tp-tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tp-tabela thead th { text-align: left; padding: 13px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--apagado); background: rgba(255, 255, 255, .015); border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tp-tabela td { padding: 11px 16px; border-bottom: 1px solid var(--linha-suave); vertical-align: middle; }
.tp-tabela tbody tr:last-child td { border-bottom: 0; }
.tp-tabela tbody tr { transition: background .12s; }
.tp-tabela tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tp-tabela tbody tr.tp-on { background: rgba(67, 128, 246, .06); }
/* Quadradinhos de seleção (contorno azul) e barra de ações em lote */
.tp-tabela .tp-sel { width: 44px; padding-right: 0; text-align: center; }
.tp-check {
  appearance: none; width: 18px; height: 18px; margin: 0; display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer;
  border: 2px solid #3b6ff0; border-radius: 4px; background: transparent; transition: background .12s, border-color .12s;
}
.tp-check:hover { border-color: #5b8cff; background: rgba(67, 128, 246, .12); }
.tp-check:checked, .tp-check.parcial { background: #3b6ff0; border-color: #3b6ff0; }
.tp-check:checked::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tp-check.parcial:not(:checked)::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 1px; }
.tp-check:focus-visible { outline: 2px solid var(--acento-forte); outline-offset: 2px; }
.tp-tabela tbody tr.tp-marcado { background: rgba(67, 128, 246, .1); }
.tp-lote { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding: 10px 12px 10px 16px; background: var(--superficie); border: 1px solid #2f4a86; border-radius: 12px; animation: .16s ease both surgir; }
.tp-lote strong { margin-right: auto; font-size: 14px; font-weight: 600; }
.tp-lote .tp-ss { height: 34px; min-width: 100px; }
.tp-lote .btn-icone { width: 34px; height: 34px; }
.tp-x { transform: rotate(45deg); }
.tp-n { width: 48px; text-align: center; color: var(--apagado); font-variant-numeric: tabular-nums; }
/* Coluna Ação: só a largura dos botões, colada à direita; o título fica em cima do Start */
.tp-tabela .tp-acao { width: 1%; white-space: nowrap; text-align: left; padding-right: 20px; }
.tp-tabela td:last-child { width: 1%; white-space: nowrap; padding-right: 20px; }
.tp-tabela td:last-child .pf-acoes { justify-content: flex-start; }
.tp-perfil { display: flex; align-items: center; gap: 11px; }
.tp-perfil strong { display: block; font-weight: 600; }
.tp-perfil small { display: block; color: var(--apagado); font-size: 12px; margin-top: 1px; }
.tp-plat { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tp-plat svg, .tp-plat .pf-marca, .tp-plat .pf-letra { width: 17px; height: 17px; flex: none; }
/* ---------- Proxys: filtros + cartões ---------- */
.px-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.px-barra .btn .icone { width: 16px; height: 16px; }
.px-filtros { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--linha-suave); }
.px-filtro { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--tinta-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.px-filtro span { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 11.5px; background: var(--superficie-2); color: var(--tinta-2); }
.px-filtro:hover { color: var(--tinta); }
.px-filtro.ativo { background: var(--superficie-2); color: var(--tinta); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.px-filtro-ativas.ativo span { background: rgba(52, 211, 153, .18); color: #4ade80; }
.px-filtro-desativadas.ativo span { background: rgba(239, 68, 68, .18); color: #f87171; }
.px-filtro-todas.ativo span { background: var(--acento-suave); color: var(--acento-forte); }

.px-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.px-card {
  --px: #6b6b74; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; overflow: hidden;
  border-radius: 16px; background: linear-gradient(180deg, #1d1d21, #18181b); border: 1px solid var(--linha-suave);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.px-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--px); opacity: .8; }
.px-card:hover { border-color: #3a3a42; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.px-ativa { --px: #34d399; }
.px-falhou { --px: #ef4444; }
.px-testando { --px: #f59e0b; }
.px-topo { display: flex; align-items: center; gap: 7px; }
.px-status { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--px) 85%, #fff); background: color-mix(in srgb, var(--px) 14%, transparent); border: 1px solid color-mix(in srgb, var(--px) 35%, transparent); }
.px-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--px); box-shadow: 0 0 7px var(--px); }
.px-testando .px-status i { animation: piscar 1s ease-in-out infinite; }
.px-auth { display: grid; place-items: center; color: var(--apagado); }
.px-auth .icone { width: 14px; height: 14px; }
.px-espaco { flex: 1; }
.px-mini { width: 30px; height: 30px; border-radius: 8px; color: var(--apagado); }
.px-mini .icone { width: 15px; height: 15px; }
.px-mini:hover:not(:disabled) { color: var(--tinta); background: rgba(255, 255, 255, .07); }
.px-mini-perigo:hover:not(:disabled) { color: #f87171; background: rgba(239, 68, 68, .1); }
.px-mini:disabled { opacity: .3; cursor: default; }
.px-nome { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #a78bfa; margin-bottom: -6px; }
.px-host { font-family: Consolas, "Cascadia Mono", monospace; font-size: 17px; font-weight: 600; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-host span { color: var(--apagado); font-weight: 400; }
.px-geo { min-height: 40px; display: flex; align-items: center; }
.px-pais { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; border-radius: 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #4ade80; background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .3); }
.px-geo-txt { min-width: 0; font-size: 14px; font-weight: 550; }
.px-geo-txt small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--apagado); font-family: Consolas, "Cascadia Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-geo-vazio { font-size: 13px; color: var(--apagado); font-style: italic; }
.px-erro { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #f87171; line-height: 1.35; }
.px-erro .icone { width: 16px; height: 16px; flex: none; }
.px-metricas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--apagado); }
.px-ms { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.px-ms .icone { width: 13px; height: 13px; }
.px-ms-rapida { color: #4ade80; background: rgba(52, 211, 153, .12); }
.px-ms-media { color: #fbbf24; background: rgba(251, 191, 36, .12); }
.px-ms-lenta { color: #f87171; background: rgba(239, 68, 68, .12); }
.px-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--linha-suave); }
.px-perfis { display: flex; align-items: center; min-width: 0; }
.px-av { width: 26px; height: 26px; font-size: 10px; margin-right: -6px; border: 2px solid #1a1a1d; text-decoration: none; flex: none; }
.px-av-mais { margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--tinta-2); }
.px-perfis small { margin-left: 14px; font-size: 12.5px; color: var(--tinta-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-perfis .px-livre { margin-left: 0; color: var(--apagado); }
.px-testar { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #c4b5fd; background: rgba(124, 92, 240, .14); border: 1px solid rgba(124, 92, 240, .4); transition: background .15s; }
.px-testar .icone { width: 15px; height: 15px; }
.px-testar:hover:not(:disabled) { background: rgba(124, 92, 240, .26); }
.px-testar:disabled { opacity: .6; cursor: default; }
.px-testar:disabled .icone { animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
/* Janela Nova proxy */
.px-tipos { display: flex; gap: 6px; }
.px-tipo-btn { flex: 1; height: 36px; border-radius: 9px; border: 1px solid var(--linha); background: #141417; color: var(--tinta-2); font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .5px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.px-tipo-btn:hover { color: var(--tinta); }
.px-tipo-btn.sel { color: #c4b5fd; border-color: #7c5cf0; background: rgba(124, 92, 240, .16); }
.px-dica { font-size: 12.5px; color: var(--apagado); line-height: 1.5; }
.px-dica b { color: var(--tinta-2); font-weight: 600; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; }

/* ---------- Grupos ---------- */
.gp-emoji { display: inline-grid; place-items: center; flex: none; width: 18px; font-size: 15px; line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.gp-emoji-g { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; background: linear-gradient(145deg, #2a2a31, #1f1f24); border: 1px solid var(--linha-suave); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
/* Célula "Grupo" da tabela de perfis: botão discreto que vira pílula no hover */
.gp-cel { display: inline-flex; align-items: center; gap: 7px; max-width: 170px; height: 30px; padding: 0 8px 0 9px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--tinta); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; transition: background .15s, border-color .15s; }
.gp-cel:hover, .gp-cel[aria-expanded="true"] { background: var(--superficie-2); border-color: var(--linha); }
.gp-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-sem { color: var(--apagado); font-weight: 450; font-style: italic; }
.gp-chev { width: 13px; height: 13px; flex: none; color: var(--apagado); opacity: 0; transition: opacity .15s; }
.gp-cel:hover .gp-chev, .gp-filtro .gp-chev { opacity: 1; }
/* Filtro de grupo (barra de abas da aba Perfis) */
.gp-filtro { display: inline-flex; align-items: center; gap: 8px; height: 40px; max-width: 240px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie); color: var(--tinta-2); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.gp-filtro span:not(.gp-emoji) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-filtro .icone:first-child { width: 16px; height: 16px; }
.gp-filtro:hover { color: var(--tinta); border-color: #4a4a52; }
.gp-filtro.ativo { color: var(--tinta); border-color: #7c5cf0; background: linear-gradient(180deg, rgba(124, 92, 240, .16), rgba(124, 92, 240, .06)); box-shadow: 0 0 0 3px rgba(124, 92, 240, .1); }
.gp-filtro-x { width: 32px; height: 32px; margin-left: -4px; color: var(--apagado); }
.gp-filtro-x:hover { color: var(--tinta); }
/* Aba Grupos */
.gp-barra { display: flex; gap: 10px; margin-bottom: 14px; }
.gp-busca { display: flex; align-items: center; gap: 9px; width: min(340px, 100%); height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie); color: var(--apagado); transition: border-color .15s, box-shadow .15s; }
.gp-busca:focus-within { border-color: #7c5cf0; box-shadow: 0 0 0 3px rgba(124, 92, 240, .14); }
.gp-busca .icone { width: 17px; height: 17px; flex: none; }
.gp-busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--tinta); font: inherit; font-size: 14px; }
.gp-tabela td { padding-top: 13px; padding-bottom: 13px; }
.gp-titulo { display: flex; align-items: center; gap: 11px; }
.gp-titulo strong { font-weight: 600; font-size: 14.5px; letter-spacing: .2px; }
.gp-fixo { display: grid; place-items: center; color: #a78bfa; }
.gp-fixo .icone { width: 15px; height: 15px; }
.gp-qtd { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #c4b5fd; background: rgba(124, 92, 240, .14); border: 1px solid rgba(124, 92, 240, .35); transition: background .15s, transform .12s; }
.gp-qtd .icone { width: 14px; height: 14px; }
.gp-qtd:hover { background: rgba(124, 92, 240, .26); }
.gp-qtd.zero { color: var(--apagado); background: var(--superficie-2); border-color: var(--linha-suave); }
.gp-obs { max-width: 280px; color: var(--tinta-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-data { color: var(--apagado); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-tabela .pf-acoes .btn { height: 34px; }
.gp-tabela .pf-acoes .btn .icone { width: 15px; height: 15px; }
.gp-ops { width: 34px; height: 34px; border: 1px solid var(--linha); border-radius: 9px; }
/* Janela de criar/editar grupo */
.gp-janela { width: min(460px, calc(100vw - 32px)); }
.gp-janela .janela-corpo { display: flex; flex-direction: column; gap: 16px; }
.gp-form-topo { display: flex; align-items: flex-end; gap: 14px; }
.gp-preview { flex: none; width: 58px; height: 58px; display: grid; place-items: center; font-size: 30px; border-radius: 16px; background: radial-gradient(circle at 30% 25%, rgba(167, 139, 250, .28), rgba(124, 92, 240, .08) 70%); border: 1px solid rgba(167, 139, 250, .35); box-shadow: 0 6px 20px rgba(124, 92, 240, .18); font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.gp-preview.gp-pulo { animation: .3s cubic-bezier(.3, 1.6, .5, 1) both gpPulo; }
@keyframes gpPulo { from { transform: scale(.7) rotate(-8deg); } to { transform: none; } }
.gp-campo { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gp-campo > span { font-size: 12.5px; font-weight: 600; color: var(--tinta-2); }
.gp-campo em { font-style: normal; font-weight: 450; color: var(--apagado); }
.gp-campo input, .gp-campo textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--linha); background: #141417; color: var(--tinta); font: inherit; font-size: 14px; outline: none; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.gp-campo input:focus, .gp-campo textarea:focus { border-color: #7c5cf0; box-shadow: 0 0 0 3px rgba(124, 92, 240, .15); }
.gp-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 5px; padding: 8px; border-radius: 12px; background: #141417; border: 1px solid var(--linha-suave); }
.gp-emoji-btn { height: 36px; display: grid; place-items: center; font-size: 18px; border-radius: 9px; border: 1px solid transparent; background: none; cursor: pointer; transition: background .12s, transform .12s, border-color .12s; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.gp-emoji-btn:hover { background: rgba(255, 255, 255, .07); transform: scale(1.12); }
.gp-emoji-btn.sel { background: rgba(124, 92, 240, .2); border-color: #7c5cf0; }
/* Menu flutuante genérico (lista de grupos, opções) */
.pop { position: fixed; z-index: 80; min-width: 220px; max-width: 300px; padding: 6px; display: flex; flex-direction: column; gap: 1px; background: linear-gradient(180deg, #232328, #1d1d21); border: 1px solid var(--linha); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); animation: .14s ease both surgir; }
.pop hr { border: 0; border-top: 1px solid var(--linha-suave); margin: 4px 2px; }
.pop-rolagem { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow-y: auto; }
.pop-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--tinta); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.pop-item > span:not(.gp-emoji) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item .icone { width: 16px; height: 16px; flex: none; color: var(--tinta-2); }
.pop-item em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--apagado); background: var(--superficie); border-radius: 999px; padding: 1px 7px; }
.pop-item:hover { background: rgba(255, 255, 255, .07); }
.pop-item.sel { background: rgba(124, 92, 240, .14); }
.pop-item .pop-ok { color: #a78bfa; }
.pop-apagado { opacity: .6; }
.pop-novo, .pop-novo .icone { color: #a78bfa; font-weight: 600; }
.pop-perigo, .pop-perigo .icone { color: #f87171; }
/* Tags: pílulas coloridas (cor em --t) com bolinha brilhante; menu pra ligar/desligar e criar */
.tg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 250px; }
.tg-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 650; letter-spacing: .2px;
  color: color-mix(in srgb, var(--t) 78%, #fff); background: color-mix(in srgb, var(--t) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--t) 38%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tg-pill i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--t); box-shadow: 0 0 6px var(--t); }
.tg-mais { height: 24px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--tinta-2); background: var(--superficie-2); border: 1px solid var(--linha); cursor: default; }
.tg-add {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 7px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--apagado); background: none; border: 1px dashed #45454d; transition: color .15s, border-color .15s, background .15s;
}
.tg-add .icone { width: 13px; height: 13px; stroke-width: 2.2; }
.tg-add:hover { color: #c4b5fd; border-color: #a78bfa; background: rgba(167, 139, 250, .1); }
.tg-add-icone { width: 24px; padding: 0; justify-content: center; border-style: solid; border-color: transparent; color: #4f86f7; opacity: 0; }
.tp-tabela tr:hover .tg-add-icone, .tg-add-icone:focus-visible { opacity: 1; }
.tg-add-icone:hover { color: #7aa5ff; border-color: transparent; background: rgba(67, 128, 246, .14); }
.tg-menu {
  position: fixed; z-index: 80; width: 300px; padding: 12px; display: flex; flex-direction: column; gap: 11px;
  background: linear-gradient(180deg, #232328, #1d1d21); border: 1px solid var(--linha); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(167, 139, 250, .06); animation: .15s ease both surgir;
}
.tg-menu-cab { font-size: 12px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-menu-cab strong { color: var(--tinta); font-weight: 600; }
.tg-lista { display: flex; flex-wrap: wrap; gap: 7px; max-height: 180px; overflow-y: auto; }
.tg-opcao { cursor: pointer; opacity: .55; filter: saturate(.6); transition: opacity .15s, filter .15s, transform .12s; }
.tg-opcao:hover { opacity: .9; filter: none; }
.tg-opcao:active { transform: scale(.95); }
.tg-opcao.on { opacity: 1; filter: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--t) 55%, transparent), 0 0 12px color-mix(in srgb, var(--t) 28%, transparent); }
.tg-ok { width: 13px; height: 13px; margin-right: -3px; stroke-width: 2.4; }
.tg-nova { display: flex; gap: 7px; padding-top: 11px; border-top: 1px solid var(--linha-suave); }
.tg-nova input { flex: 1; min-width: 0; height: 34px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--linha); background: #141417; color: var(--tinta); font: inherit; font-size: 13.5px; outline: none; }
.tg-nova input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .15); }
.tg-criar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--t) 50%, transparent); background: color-mix(in srgb, var(--t) 20%, transparent); color: var(--t); transition: background .15s; }
.tg-criar:hover { background: color-mix(in srgb, var(--t) 32%, transparent); }
.tg-criar .icone { width: 17px; height: 17px; stroke-width: 2.4; }
.tg-cores { display: flex; justify-content: space-between; gap: 6px; }
.tg-cor { width: 22px; height: 22px; padding: 0; border-radius: 50%; cursor: pointer; background: var(--t); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); transition: transform .12s, box-shadow .12s; }
.tg-cor:hover { transform: scale(1.12); }
.tg-cor.sel { border-color: #1d1d21; box-shadow: 0 0 0 2px var(--t), 0 0 10px var(--t); }
/* Coluna Proxy: ⇄ cinza (normal), verde (funcionando/em uso), vermelho (falhou), âmbar piscando (testando) */
.tp-proxy { --cor-proxy: #6b6b74; display: flex; align-items: center; gap: 10px; max-width: 260px; }
.tp-proxy-ok { --cor-proxy: #4ade80; }
.tp-proxy-erro { --cor-proxy: #f05252; }
.tp-proxy-testando { --cor-proxy: #f59e0b; }
.tp-setas { display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--cor-proxy); cursor: pointer; transition: color .15s, background .15s; }
.tp-setas .icone { width: 18px; height: 18px; stroke-width: 2; }
.tp-setas:hover { background: rgba(255, 255, 255, .06); filter: brightness(1.2); }
.tp-proxy-testando .tp-setas { animation: piscar 1s ease-in-out infinite; }
.tp-proxy-txt { min-width: 0; }
.tp-proxy-linha { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tp-tipo { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; padding: 2px 5px; border-radius: 4px; color: #8fb4ff; background: rgba(67, 128, 246, .16); }
.tp-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--tinta); }
.tp-proxy-ok .tp-host { color: #6ee7a0; }
.tp-proxy-erro .tp-host { color: #f87171; }
.tp-lapis { display: grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: #4f86f7; cursor: pointer; opacity: .85; }
.tp-lapis .icone { width: 15px; height: 15px; }
.tp-lapis:hover { opacity: 1; background: rgba(67, 128, 246, .14); }
.tp-proxy-txt small { display: block; margin-top: 2px; color: var(--apagado); font-size: 12.5px; }
@keyframes piscar { 50% { opacity: .25; } }
.tp-ip { display: block; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.tp .pf-sub-linha { color: var(--apagado); font-size: 12px; }
.tp .pf-endereco { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.tp .pf-acoes { justify-content: flex-end; }

/* ---------- barra de título própria, fina (janela sem moldura do Windows) ---------- */
:root { --titulo-h: 34px; }
body { padding-top: var(--titulo-h); }
.titulo {
  position: fixed; top: 0; left: 0; right: 0; height: var(--titulo-h); z-index: 200;
  display: flex; align-items: center; background: #000; border-bottom: 1px solid #1a1a1d;
  -webkit-app-region: drag; user-select: none;
}
.titulo-marca { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; color: #83868c; white-space: nowrap; }
.titulo-marca img { width: 15px; height: 15px; filter: brightness(1.25); }
.titulo-arrasto { flex: 1; align-self: stretch; }
.titulo-botoes { display: flex; align-self: stretch; -webkit-app-region: no-drag; }
.titulo-btn { width: 46px; display: grid; place-items: center; background: none; border: 0; color: #c7c7cc; cursor: default; transition: background .12s; }
.titulo-btn svg { width: 12px; height: 12px; }
.titulo-btn:hover { background: rgba(255, 255, 255, .09); }
.titulo-fechar:hover { background: #e81123; color: #fff; }
.ic-rest { display: none; }
body.maximizada .ic-max { display: none; }
body.maximizada .ic-rest { display: block; }
/* a barra fica sempre no topo; o resto do app começa abaixo dela */
.lateral { top: var(--titulo-h) !important; height: calc(100vh - var(--titulo-h)) !important; }
.app { min-height: calc(100vh - var(--titulo-h)); }
.topo-celular { top: var(--titulo-h) !important; }

/* ---------- teste: navegador do perfil encaixado no app ---------- */
body.modo-janela .principal { max-width: none; height: calc(100vh - var(--titulo-h)); padding: 18px 24px 16px; display: flex; flex-direction: column; }
body.modo-janela .abas-topo { flex: none; margin-bottom: 12px; }

/* FirstMail: altura cheia isolada (não usa modo-janela, pra não afetar a tela do perfil).
   Toda rolagem é interna (painéis), então a janela em si não rola. */
body.tela-fm { overflow: hidden; }
body.tela-fm .principal { max-width: none; height: calc(100vh - var(--titulo-h)); padding: 18px 24px 16px; display: flex; flex-direction: column; overflow: hidden; }
body.tela-fm .abas-topo { flex: none; margin-bottom: 12px; }
.jn { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.jn-info { color: var(--apagado); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.jn-info strong { color: var(--tinta); font-weight: 600; }
.jn-area { flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 10px; background: #0e0f11 radial-gradient(circle at center, #16181c, #0e0f11); border: 1px solid #222226; }
.jn-espera { color: var(--apagado); font-size: 14px; padding: 20px; text-align: center; }

@media (max-width: 1100px) {
  .pf { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 860px) {
  .pf { grid-template-columns: 1fr; gap: 24px; }
  .pf-lado { position: static; }
  .pf-titulo { margin: 24px 0 12px 4px; }
  .pf-nav { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding-left: 0; }
  .pf-duas { flex-direction: column; }
}

/* ---------- BunnyIA (copiado da Planilha Gabriel; a altura acompanha a área do navegador) ---------- */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; max-width: 860px; margin: 0 auto; }
.chat-topo { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .05); margin-bottom: 8px; }
.chat-topo-lado { position: relative; }
.chat-topo-dir { justify-self: end; }
.chat-titulo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.chat-modelo { font-size: 11.5px; font-weight: 700; color: #8fb2ff; padding: 3px 10px; border-radius: 20px; background: rgba(77, 134, 255, .1); border: 1px solid rgba(77, 134, 255, .22); font-family: inherit; cursor: pointer; }
.chat-modelo:hover { background: rgba(77, 134, 255, .18); }
.chat-hist {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 320px; max-height: 420px; overflow-y: auto; padding: 6px;
  border-radius: 14px; background: #141417; border: 1px solid #2c2c33; box-shadow: 0 20px 50px rgba(0, 0, 0, .7);
}
.chat-hist > header { padding: 8px 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #8d8d95; }
.chat-hist-item { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.chat-hist-item:hover, .chat-hist-item.ativa { background: #1f1f24; }
.chat-hist-item > button:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 8px 10px; border: 0; background: transparent; color: var(--tinta); cursor: pointer; }
.chat-hist-item strong { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-hist-item small { font-size: 11.5px; color: var(--apagado); }
.chat-hist-item .btn-icone { opacity: 0; }
.chat-hist-item:hover .btn-icone { opacity: .7; }
.chat-hist-vazio { padding: 10px; font-size: 13px; color: var(--apagado); }

.chat-rolagem { flex: 1; overflow-y: auto; padding: 8px 4px 24px; scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }
.chat-msgs { display: flex; flex-direction: column; gap: 26px; }
.chat-msg { display: flex; gap: 14px; animation: subir .25s ease both; }
.chat-eu { justify-content: flex-end; }
.chat-balao { max-width: 75%; padding: 11px 17px; border-radius: 20px 20px 6px 20px; background: #26262c; border: 1px solid #303037; font-size: 15px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.chat-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #6b9bff, #3a5fd0); box-shadow: 0 6px 16px rgba(77, 134, 255, .3);
}
.chat-avatar .icone { width: 17px; height: 17px; }
.chat-corpo { flex: 1; min-width: 0; padding-top: 4px; }
.chat-texto { font-size: 15px; line-height: 1.7; color: #e8e8ec; overflow-wrap: anywhere; }
.chat-texto p + p { margin-top: 12px; }
.chat-texto strong { color: #fff; }
.chat-texto code { font: 13px Consolas, "Cascadia Mono", monospace; padding: 2px 6px; border-radius: 6px; background: #1c1c22; border: 1px solid #2a2a31; color: #b9cdff; }
.chat-texto pre { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: #101014; border: 1px solid #26262c; overflow-x: auto; }
.chat-texto pre code { padding: 0; border: 0; background: none; color: #dcdce2; }
.chat-acoes { display: flex; gap: 2px; margin-top: 8px; margin-left: -6px; }
.chat-acoes .btn-icone { width: 30px; height: 30px; color: #7d7d86; }
.chat-acoes .btn-icone:hover { color: #fff; }
.chat-digitando { display: flex; align-items: center; gap: 5px; padding-top: 12px; }
.chat-digitando i { width: 7px; height: 7px; border-radius: 50%; background: #8fb2ff; animation: chat-ponto 1.2s ease-in-out infinite; }
.chat-digitando i:nth-child(2) { animation-delay: .15s; } .chat-digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-ponto { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.chat-boas-vindas { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 9vh 0 0; }
.chat-logo {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 18px;
  background: linear-gradient(140deg, #6b9bff, #3a5fd0); box-shadow: 0 12px 32px rgba(77, 134, 255, .35);
}
.chat-logo .icone { width: 26px; height: 26px; }
.chat-boas-vindas h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.chat-boas-vindas p { margin-top: 6px; font-size: 16px; color: #a9a9b1; }
.chat-sugestoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 640px; margin-top: 32px; }
.chat-sugestoes button {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; padding: 13px 15px; border-radius: 14px; cursor: pointer;
  background: #121215; border: 1px solid #26262c; color: var(--tinta); transition: border-color .15s ease, background .15s ease;
}
.chat-sugestoes button:hover { background: #17171b; border-color: rgba(107, 155, 255, .45); }
.chat-sugestoes strong { font-size: 13.5px; font-weight: 700; }
.chat-sugestoes span { font-size: 12.5px; color: var(--apagado); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-caixa {
  display: flex; align-items: flex-end; gap: 10px; padding: 9px 9px 9px 10px; margin-bottom: 4px; border-radius: 28px;
  background: #141417; border: 1px solid #2c2c33; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: border-color .15s ease, box-shadow .15s ease;
}
.chat-caixa:focus-within { border-color: rgba(107, 155, 255, .55); box-shadow: 0 0 0 4px rgba(77, 134, 255, .1), 0 10px 30px rgba(0, 0, 0, .5); }
.chat-caixa textarea {
  flex: 1; min-height: 40px; max-height: 220px; padding: 9px 4px; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 15px; line-height: 1.5; color: var(--tinta);
}
.chat-caixa textarea:focus { outline: 0; border: 0; }
.chat-mais, .chat-enviar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; }
.chat-mais { background: #222227; color: #a9a9b1; }
.chat-mais:disabled { opacity: .5; cursor: default; }
.chat-enviar { color: #fff; background: linear-gradient(140deg, #6b9bff, #3a5fd0); box-shadow: 0 6px 16px rgba(77, 134, 255, .35); transition: transform .15s ease, opacity .15s ease; }
.chat-enviar:hover { transform: scale(1.06); }
.chat-enviar:disabled { opacity: .45; transform: none; cursor: default; }
.chat-enviar .icone, .chat-mais .icone { width: 19px; height: 19px; stroke-width: 2.2; }
@media (max-width: 860px) { .chat-sugestoes { grid-template-columns: 1fr; } .chat-balao { max-width: 88%; } }
/* Coelho da logo no lugar do quadrado azul: na abertura, grande, com um halo azul fraco atrás e uma luz leve;
   ao lado das respostas, pequeno, num círculo escuro com borda azul suave. */
.chat-logo { position: relative; width: 96px; height: 96px; margin-bottom: 14px; background: none; box-shadow: none; border-radius: 50%; }
.chat-logo::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle, rgba(77, 134, 255, .22), transparent 68%); filter: blur(6px); }
.chat-logo img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: brightness(1.2) drop-shadow(0 6px 18px rgba(77, 134, 255, .3)); animation: coelho-flutua 5s ease-in-out infinite; }
@keyframes coelho-flutua { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .chat-logo img { animation: none; } }
.chat-avatar { background: #050507; border: 1px solid rgba(107, 155, 255, .3); box-shadow: 0 0 12px rgba(77, 134, 255, .15); border-radius: 50%; overflow: hidden; }
.chat-avatar img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.15); filter: brightness(1.2); }
/* ---------- Fixados no topo da barra lateral: BunnyIA + perfis fixados ---------- */
.sp-fixados { display: flex; flex-direction: column; gap: 3px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--linha-suave); }
.sp-bunny { border-color: rgba(107, 155, 255, .35); background: linear-gradient(180deg, rgba(77, 134, 255, .08), rgba(77, 134, 255, .02)); }
.sp-bunny:hover { background: rgba(77, 134, 255, .12); }
.sp-bunny.ativo { border-color: var(--acento-forte); background: rgba(77, 134, 255, .16); }
.sp-bunny-av { background: #050507 !important; border: 1px solid rgba(107, 155, 255, .35); overflow: hidden; padding: 0; }
.sp-bunny-av img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.15); filter: brightness(1.2); }
.sp-fixo-ico { display: grid; place-items: center; flex: none; color: #8fb2ff; opacity: .8; }
.sp-fixo-ico .icone { width: 15px; height: 15px; }
body.recolhida .sp-fixo-ico { display: none; }
.ia-select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--linha); background: #141417; color: var(--tinta); font: inherit; font-size: 14px; outline: none; }

/* Telas da Planilha fixadas (Base CNPJ, CNPJ PDF, Garimpo) */
.sp-tela { border-color: #3f3f46; }
.sp-tela.ativo { border-color: var(--acento-forte); background: rgba(77, 134, 255, .12); }
.sp-tela-av { background: linear-gradient(145deg, #2a2a31, #1f1f24) !important; border: 1px solid var(--linha); color: #c4b5fd; overflow: hidden; padding: 0; }
.sp-tela-av img { width: 100%; height: 100%; object-fit: cover; }
.sp-tela-av .icone { width: 17px; height: 17px; }
.pl-area { background: #0b0a12; }
/* Ícones da Planilha: imagens no quadro escuro; a pastinha do Base CNPJ sobre fundo claro (igual ao menu de lá) */
.sp-tela-av { background: #000 !important; border-color: #2c2c31; }
.sp-tela-av.sp-tela-claro { background: linear-gradient(160deg, #fff, #f1eef8) !important; border-color: rgba(255, 255, 255, .5); }
.sp-tela-av.sp-tela-claro svg { width: 70%; height: 70%; }

/* ---------- Apps (WhatsApp, Telegram…) no rodapé da barra lateral ---------- */
.lateral-pe { flex-direction: column; align-items: stretch; gap: 10px; }
.apps-dock { display: flex; flex-direction: column; gap: 8px; }
.apps-cab { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.apps-cab > span { font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--apagado); }
.apps-mais { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; border: 1px dashed #45454d; background: none; color: var(--apagado); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.apps-mais .icone { width: 13px; height: 13px; stroke-width: 2.4; }
.apps-mais:hover { color: #c4b5fd; border-color: #a78bfa; background: rgba(167, 139, 250, .1); }
.apps-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.apps-item { position: relative; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; transition: transform .12s; }
.apps-item:hover { transform: translateY(-1px); }
.apps-item::after { content: ""; position: absolute; inset: -3px; border-radius: 14px; border: 2px solid transparent; transition: border-color .15s; }
.apps-item.ativo::after { border-color: var(--acento-forte); }
.app-ico { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .35); }
.app-ico svg { width: 62%; height: 62%; }
.apps-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800; box-shadow: 0 0 0 2px var(--lateral); font-style: normal; }
body.recolhida .apps-cab > span { display: none; }
body.recolhida .apps-cab { justify-content: center; }
body.recolhida .apps-lista { flex-direction: column; align-items: center; }
/* Barra de cima com o app aberto */
.apps-titulo { display: inline-flex; align-items: center; gap: 9px; }
.apps-titulo .app-ico { width: 24px; height: 24px; border-radius: 7px; }
.sv-area { background: #111114; }
/* Janela Adicionar app */
.apps-tipos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.apps-tipo { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 12px; border: 1px solid var(--linha); background: #141417; color: var(--tinta-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.apps-tipo .app-ico { width: 38px; height: 38px; }
.apps-tipo:hover { color: var(--tinta); border-color: #4a4a52; }
.apps-tipo.sel { color: var(--tinta); border-color: #7c5cf0; background: rgba(124, 92, 240, .14); }

/* Seção Ferramentas (BunnyIA, Base CNPJ, CNPJ PDF, Garimpo): uma linha fina que abre/fecha */
.sp-ferr { display: flex; flex-direction: column; gap: 3px; }
.sp-ferr-cab { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--apagado); font: inherit; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.sp-ferr-cab .icone { width: 14px; height: 14px; flex: none; }
.sp-ferr-cab span { flex: 1; text-align: left; }
.sp-ferr-cab:hover { color: var(--tinta-2); background: rgba(255, 255, 255, .04); }
.sp-ferr-cab.ativo { color: #8fb2ff; border-color: rgba(107, 155, 255, .35); }
.sp-ferr-chev { }
.sp-ferr.aberta .sp-ferr-chev { transform: rotate(180deg); }
.sp-ferr-lista { display: flex; flex-direction: column; gap: 3px; }
body.recolhida .sp-ferr-cab span, body.recolhida .sp-ferr-chev { display: none; }
body.recolhida .sp-ferr-cab { justify-content: center; padding: 0; }

/* Seção Apps na barra lateral: linha que abre/fecha com o + ao lado; cada app com ícone, nome e não lidas */
.sp-ferr-linha { display: flex; align-items: center; gap: 4px; }
.sp-ferr-linha .sp-ferr-cab { flex: 1; min-width: 0; }
.sp-ferr-mais { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px dashed #45454d; background: none; color: var(--apagado); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.sp-ferr-mais .icone { width: 13px; height: 13px; stroke-width: 2.4; }
.sp-ferr-mais:hover { color: #c4b5fd; border-color: #a78bfa; background: rgba(167, 139, 250, .1); }
.sp-apps-total { flex: none; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0; }
.sp-app { border-color: #2f2f35; }
.sp-app.ativo { border-color: var(--acento-forte); background: rgba(77, 134, 255, .12); }
.sp-app-av { width: 32px; height: 32px; flex: none; }
.sp-app-av .app-ico { width: 32px; height: 32px; border-radius: 50%; }
.sp-app-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 0 8px rgba(239, 68, 68, .45); }
.sp-app-vazio { padding: 9px 10px; border: 1px dashed #3a3a42; border-radius: 10px; background: none; color: var(--apagado); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.sp-app-vazio:hover { color: #c4b5fd; border-color: #a78bfa; }
/* Lixo de remover app direto na sidebar — aparece quando passa o mouse no app */
.sp-app-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px; color: var(--apagado); opacity: 0; cursor: pointer; border-radius: 6px; transition: opacity .15s, color .15s, background .15s; display: flex; align-items: center; pointer-events: none; }
.sp-ferr-lista { position: relative; }
.sp-ferr-lista .sp-app-del { position: relative; right: auto; top: auto; transform: none; display: none; }
/* wrapper por app pra posicionar o lixo corretamente */
.sp-app-wrap { position: relative; display: flex; align-items: center; }
.sp-app-wrap .sp-app { flex: 1; }
.sp-app-wrap .sp-app-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; opacity: 0; pointer-events: none; }
.sp-app-wrap:hover .sp-app-del { opacity: 1; pointer-events: auto; }
.sp-app-del:hover { color: #ef4444; background: rgba(239, 68, 68, .12); opacity: 1; }
body.recolhida .sp-app-del { display: none !important; }
body.recolhida .sp-ferr-mais, body.recolhida .sp-app-n { display: none; }
body.recolhida .sp-apps-total { position: absolute; transform: translate(10px, -8px); }
body.recolhida .sp-ferr-cab { position: relative; }

/* BunnyIA "black": coelho de olho vermelho, brilhos e bordas em vermelho em vez de azul */
.sp-bunny { border-color: rgba(239, 68, 68, .35); background: linear-gradient(180deg, rgba(239, 68, 68, .08), rgba(239, 68, 68, .02)); }
.sp-bunny:hover { background: rgba(239, 68, 68, .12); }
.sp-bunny.ativo { border-color: #ef4444; background: rgba(239, 68, 68, .14); }
.sp-bunny .sp-fixo-ico { color: #f87171; }
.sp-bunny-av { border-color: rgba(239, 68, 68, .45); box-shadow: 0 0 10px rgba(239, 68, 68, .25); }
.chat-logo::before { background: radial-gradient(circle, rgba(239, 68, 68, .26), transparent 68%); }
.chat-logo img { filter: brightness(1.15) drop-shadow(0 6px 18px rgba(239, 68, 68, .35)); }
.chat-avatar { border-color: rgba(239, 68, 68, .4); box-shadow: 0 0 12px rgba(239, 68, 68, .2); }
.chat-modelo { color: #fca5a5; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .28); }
.chat-modelo:hover { background: rgba(239, 68, 68, .18); }
.chat-digitando i { background: #f87171; }
.chat-caixa:focus-within { border-color: rgba(239, 68, 68, .5); box-shadow: 0 0 0 4px rgba(239, 68, 68, .1), 0 10px 30px rgba(0, 0, 0, .5); }
.chat-enviar { background: linear-gradient(140deg, #f05252, #b91c1c); box-shadow: 0 6px 16px rgba(239, 68, 68, .35); }
.chat-sugestoes button:hover { border-color: rgba(239, 68, 68, .45); }
.chat-texto code { color: #fca5a5; }

/* Barra de cima do navegador: bolinha da cor do perfil + nome | bandeira do país do proxy + cidade */
.jn-info { display: inline-flex; align-items: center; gap: 9px; max-width: 560px; color: var(--tinta-2); }
.jn-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-cor { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06), 0 0 10px rgba(255, 255, 255, .15); }
.jn-sep { flex: none; width: 1px; height: 16px; background: var(--linha); margin: 0 2px; }
.jn-geo { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--tinta-2); white-space: nowrap; cursor: default; }
/* Bandeiras */
.bandeira { flex: none; width: 20px; height: 14px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.bandeira-p { width: 16px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.px-pais .bandeira-g { width: 24px; height: 17px; }

/* Informações das BMs: campo + Adicionar; cada BM numa linha com copiar e remover */
.bm-add { display: flex; gap: 10px; align-items: stretch; }
.bm-add .pf-campo { flex: 1; min-width: 0; }
.bm-add-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; border-radius: var(--pf-raio); border: 1px solid rgba(107, 155, 255, .4); background: rgba(77, 134, 255, .14); color: #a9c4ff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.bm-add-btn .icone { width: 16px; height: 16px; stroke-width: 2.2; }
.bm-add-btn:hover { background: rgba(77, 134, 255, .24); }
.bm-lista { display: flex; flex-direction: column; gap: 6px; }
.bm-linha { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--pf-campo); border: 1px solid rgba(255, 255, 255, .04); }
.bm-linha:hover { background: var(--pf-campo-hover); }
.bm-n { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--pf-rotulo); font-size: 11.5px; font-weight: 700; }
.bm-rot { flex: none; font-size: 13px; font-weight: 700; color: var(--pf-rotulo); }
.bm-id { flex: 1; min-width: 0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 15px; letter-spacing: .3px; color: var(--pf-texto); overflow: hidden; text-overflow: ellipsis; }
.bm-acao { width: 32px; height: 32px; color: var(--pf-rotulo); }
.bm-acao .icone { width: 16px; height: 16px; }
.bm-acao:hover { color: var(--pf-texto); background: rgba(255, 255, 255, .07); }
.bm-tirar:hover { color: #f87171; background: rgba(239, 68, 68, .1); }

/* Aba Bms: uma linha por BM, com a bolinha da cor do perfil */
.bmt-perfil { display: flex; align-items: center; gap: 10px; }
.bmt-perfil strong { font-weight: 600; }
.bmt-perfil small { font-size: 11.5px; color: var(--apagado); padding: 2px 8px; border-radius: 999px; background: var(--superficie-2); }
.bmt-grupo { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.bmt-id { font-family: Consolas, "Cascadia Mono", monospace; font-size: 14.5px; letter-spacing: .3px; color: var(--tinta); padding: 4px 10px; border-radius: 8px; background: rgba(24, 119, 242, .1); border: 1px solid rgba(24, 119, 242, .28); }
.bmt-abrir { height: 34px; }
.bmt-abrir .icone { width: 15px; height: 15px; }
.bm-tabela .bm-acao { width: 34px; height: 34px; }
/* Perfil clicável na aba Bms: abre o perfil */
button.bmt-perfil { padding: 4px 10px 4px 4px; margin-left: -4px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--tinta); font: inherit; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
button.bmt-perfil:hover { background: rgba(255, 255, 255, .05); border-color: var(--linha); }
button.bmt-perfil:hover strong { color: #8fb2ff; }

/* Status das BMs: cinza (não verificada), verde (verificada), amarelo (em análise), vermelho (reprovada) */
.bms-st { --st: #8a8a94; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  color: color-mix(in srgb, var(--st) 80%, #fff); background: color-mix(in srgb, var(--st) 14%, transparent); border: 1px solid color-mix(in srgb, var(--st) 38%, transparent); }
.bms-st .icone { width: 15px; height: 15px; }
.bms-st-verificada { --st: #22c55e; }
.bms-st-analise { --st: #f5b40b; }
.bms-st-reprovada { --st: #ef4444; }
/* Verif/WabaOFF: verificada mas com WABA desligado — pílula metade verde, metade vermelha */
.bms-st-wabaoff { --st: #d08a2e; color: #fff;
  background: linear-gradient(105deg, rgba(34, 197, 94, .3) 0 46%, rgba(239, 68, 68, .3) 54% 100%);
  border-color: rgba(214, 170, 90, .55); }
.bms-st-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border: 0; border-radius: 999px; background: none; cursor: pointer; }
.bms-st-btn:hover .bms-st { filter: brightness(1.2); }
.bms-st-chev { width: 14px; height: 14px; color: var(--apagado); opacity: 0; transition: opacity .15s; }
.bms-st-btn:hover .bms-st-chev { opacity: 1; }
.bms-op { padding: 6px 8px; }

/* Disparos das BMs: uma cor por limite */
.bms-dp-250 { --st: #94a3b8; }
.bms-dp-2k { --st: #3b82f6; }
.bms-dp-10k { --st: #a855f7; }
.bms-dp-100k { --st: #f97316; }
.bms-dp-ilimitada { --st: #eab308; box-shadow: 0 0 10px rgba(234, 179, 8, .25); }
/* 250 em verde-água (destaca do resto) e Restrita em vermelho */
.bms-dp-250 { --st: #14b8a6; }
.bms-dp-restrita { --st: #ef4444; }

/* Início da verificação das BMs */
.bmi-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--tinta); font: inherit; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.bmi-btn:hover { background: rgba(255, 255, 255, .05); border-color: var(--linha); }
.bmi-data { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bmi-data .icone { width: 14px; height: 14px; color: #8fb2ff; }
.bmi-btn small { padding-left: 20px; font-size: 11.5px; color: var(--apagado); }
.bmi-vazio { display: inline-flex; align-items: center; gap: 4px; }
.bmi-marcar { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px dashed #4a4a52; background: none; color: var(--tinta-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.bmi-marcar .icone { width: 14px; height: 14px; }
.bmi-marcar:hover { color: #a9c4ff; border-color: rgba(107, 155, 255, .6); background: rgba(77, 134, 255, .1); }
.bmi-pop { display: flex; flex-direction: column; gap: 10px; padding: 6px; min-width: 260px; }
.bmi-pop-tit { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--apagado); }
.bmi-pop input { height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--linha); background: #141417; color: var(--tinta); font: inherit; font-size: 14px; color-scheme: dark; outline: none; }
.bmi-pop input:focus { border-color: #7c5cf0; box-shadow: 0 0 0 3px rgba(124, 92, 240, .15); }
.bmi-pop-btns { display: flex; gap: 6px; justify-content: flex-end; }
.bmi-pop-btns .btn { height: 32px; padding: 0 12px; }
.bmi-pop-btns .btn .icone { width: 14px; height: 14px; }

/* Aba Bms: barra com busca + períodos (+ datas no personalizado) e o resumo do período */
.bmf { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.bmf-busca { flex: 1 1 260px; width: auto; max-width: 380px; height: 42px; }
.bmf-busca-x { flex: none; width: 24px; height: 24px; border: 0; border-radius: 7px; background: var(--superficie-2); color: var(--tinta-2); font-size: 16px; line-height: 1; cursor: pointer; transition: background .12s, color .12s; }
.bmf-busca-x:hover { background: var(--linha-suave); color: var(--tinta); }
.bmf-periodos { flex: none; }
.bmf-periodos .px-filtro { height: 34px; padding: 0 13px; gap: 6px; }
.bmf-periodos .px-filtro .icone { width: 14px; height: 14px; }
.bmf-periodos .px-filtro.ativo { background: linear-gradient(180deg, rgba(77, 134, 255, .28), rgba(77, 134, 255, .14)); color: #dbe6ff; box-shadow: inset 0 0 0 1px rgba(107, 155, 255, .45); }
.bmf-datas { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; height: 42px; border-radius: 12px; background: var(--superficie); border: 1px solid rgba(107, 155, 255, .35); }
.bmf-datas label { display: inline-flex; align-items: center; gap: 7px; }
.bmf-datas span { font-size: 12px; font-weight: 700; color: var(--apagado); text-transform: uppercase; letter-spacing: .6px; }
.bmf-datas input { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--linha); background: #141417; color: var(--tinta); font: inherit; font-size: 13.5px; color-scheme: dark; outline: none; }
.bmf-datas input:focus { border-color: #7c5cf0; }
.bmf-resumo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bmf-total { font-size: 13.5px; color: var(--tinta-2); margin-right: 6px; }
.bmf-total b { font-size: 18px; color: var(--tinta); margin-right: 2px; }
.bmf-chip { --st: #8a8a94; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: color-mix(in srgb, var(--st) 75%, #fff); background: color-mix(in srgb, var(--st) 11%, transparent); border: 1px solid color-mix(in srgb, var(--st) 30%, transparent); }
.bmf-chip .icone { width: 14px; height: 14px; }
.bmf-chip b { font-size: 13.5px; }

/* Aba Bms: tabela à esquerda + card de resumo à direita */
.bm-grade { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.bm-esq { min-width: 0; }
.bm-esq .tp { overflow-x: auto; }
.bm-tabela td, .bm-tabela th { padding-left: 12px; padding-right: 12px; }
@media (max-width: 1180px) { .bm-grade { grid-template-columns: 1fr; } }
.bm-card {
  position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 70% at 100% 0%, rgba(77, 134, 255, .16), transparent 60%), linear-gradient(180deg, #1d1d22, #17171b);
  border: 1px solid #2c2c34; box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.bm-card-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bm-card-cab span { font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tinta-2); }
.bm-card-cab small { font-size: 11.5px; font-weight: 700; color: #a9c4ff; padding: 2px 9px; border-radius: 999px; background: rgba(77, 134, 255, .14); border: 1px solid rgba(107, 155, 255, .3); }
.bm-card-total { display: flex; align-items: baseline; gap: 8px; }
.bm-card-total b { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; background: linear-gradient(180deg, #fff, #b9cdff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bm-card-total span { font-size: 15px; font-weight: 600; color: var(--tinta-2); }
.bm-card-barra { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #26262c; gap: 2px; }
.bm-card-barra i { --st: #8a8a94; display: block; height: 100%; background: var(--st); box-shadow: 0 0 10px color-mix(in srgb, var(--st) 50%, transparent); }
.bm-card-lista { display: flex; flex-direction: column; gap: 6px; }
.bm-card-linha { --st: #8a8a94; display: grid; grid-template-columns: 30px 1fr auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 6px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--st) 8%, #151518); border: 1px solid color-mix(in srgb, var(--st) 22%, transparent); }
.bm-card-ico { grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--st); background: color-mix(in srgb, var(--st) 16%, transparent); }
.bm-card-ico .icone { width: 17px; height: 17px; }
.bm-card-nome { font-size: 13.5px; font-weight: 600; color: var(--tinta); }
.bm-card-pct { font-size: 11.5px; font-weight: 700; color: var(--apagado); }
.bm-card-linha b { font-size: 20px; font-weight: 800; color: color-mix(in srgb, var(--st) 75%, #fff); min-width: 22px; text-align: right; }
.bm-card-prog { grid-column: 2 / -1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bm-card-prog i { display: block; height: 100%; border-radius: 999px; background: var(--st); }
/* Verif/WabaOFF no resumo: também metade verde, metade vermelho */
.bm-card-barra i.bms-st-wabaoff { background: linear-gradient(90deg, #22c55e 0 50%, #ef4444 50% 100%); box-shadow: none; }
.bm-card-linha.bms-st-wabaoff .bm-card-ico { color: #fff; background: linear-gradient(105deg, rgba(34, 197, 94, .32) 0 50%, rgba(239, 68, 68, .32) 50% 100%); }
.bm-card-linha.bms-st-wabaoff .bm-card-prog i { background: linear-gradient(90deg, #22c55e, #ef4444); }
.bm-card-sub { font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--apagado); padding-top: 4px; border-top: 1px solid var(--linha-suave); padding-top: 12px; }
.bm-card-disp { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-card-dp { display: inline-flex; align-items: center; gap: 6px; }
.bm-card-dp b { font-size: 14px; color: var(--tinta); }

/* Aba Bms compacta: tudo menor pra caber sem rolar pro lado */
.bm-tabela { font-size: 13px; }
.bm-tabela thead th { padding: 10px 8px; font-size: 10.5px; }
.bm-tabela td { padding: 7px 8px; }
.bm-tabela .tp-n { width: 30px; font-size: 12px; }
.bm-tabela .pf-av-p { width: 28px; height: 28px; font-size: 10.5px; }
.bm-tabela button.bmt-perfil { gap: 8px; padding: 2px 8px 2px 2px; }
.bm-tabela .bmt-perfil strong { font-size: 13px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-tabela .bmt-perfil small { padding: 1px 6px; font-size: 10.5px; }
.bm-tabela .bmt-id { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 8px; cursor: pointer; font-family: Consolas, "Cascadia Mono", monospace; color: var(--tinta); transition: background .15s, border-color .15s; }
.bm-tabela .bmt-id .icone { width: 12px; height: 12px; opacity: .45; }
.bm-tabela .bmt-id:hover { background: rgba(24, 119, 242, .2); border-color: rgba(24, 119, 242, .5); }
.bm-tabela .bmt-id:hover .icone { opacity: 1; }
.bm-tabela .bms-st { height: 23px; padding: 0 9px 0 6px; gap: 5px; font-size: 11.5px; }
.bm-tabela .bms-st .icone { width: 13px; height: 13px; }
.bm-tabela .bms-st-chev { display: none; }
.bm-tabela .bmi-data { font-size: 12.5px; gap: 5px; }
.bm-tabela .bmi-data .icone { width: 12px; height: 12px; }
.bm-tabela .bmi-btn { padding: 2px 6px; margin-left: -6px; gap: 0; }
.bm-tabela .bmi-btn small { padding-left: 17px; font-size: 10.5px; }
.bm-tabela .bmi-marcar { height: 26px; padding: 0 9px; font-size: 11.5px; }
.bm-tabela .bm-acao { width: 26px; height: 26px; }

/* Situação das BMs: disponível (azul-claro) e vendida (rosa) */
.bms-si-disponivel { --st: #38bdf8; }
.bms-si-vendida { --st: #e879f9; }
/* Mais uma coluna sem rolar pro lado: colunas mais justas */
.bm-tabela td, .bm-tabela th { padding-left: 6px; padding-right: 6px; }
.bm-tabela .bmt-id { font-size: 12px; padding: 3px 7px; letter-spacing: 0; }
.bm-tabela .bmt-perfil strong { max-width: 130px; }
.bm-tabela .bms-st { padding: 0 8px 0 6px; }

/* Aba Sites: passo 1 (CNPJ e dados puxados), passo 2 (meta tag e criar site) e o resultado */
.st { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.st-card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 18px;
  background: radial-gradient(120% 70% at 100% 0%, rgba(147, 51, 234, .12), transparent 60%), linear-gradient(180deg, #1d1d22, #17171b);
  border: 1px solid #2c2c34; box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.st-cab { display: flex; align-items: flex-start; gap: 12px; }
.st-cab h2 { font-size: 16px; font-weight: 700; color: var(--tinta); }
.st-cab p { margin-top: 3px; font-size: 13px; color: var(--apagado); }
.st-cab p b { color: var(--tinta-2); }
.st-num { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; font-weight: 800; color: var(--acento-forte); background: var(--acento-suave); }
.st-num.st-ok { color: var(--bom); background: var(--bom-f); }
.st-num .icone { width: 17px; height: 17px; }
.st-busca { display: flex; align-items: flex-end; gap: 10px; max-width: 460px; }
.st-busca .btn { height: 41px; }
.st-busca .icone { width: 16px; height: 16px; }
.st-dica { font-size: 13px; color: var(--tinta-2); }
.st-campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.st-campos .st-largo { grid-column: 1 / -1; }
.st-campos textarea { min-height: 0; }
.st-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.st-acoes .icone { width: 16px; height: 16px; }
.st-criar { min-width: 140px; height: 40px; font-size: 14.5px; }
.st-andamento { font-size: 13px; color: var(--apagado); }
.st-pronto { border-color: rgba(52, 211, 153, .35); background: radial-gradient(120% 70% at 100% 0%, rgba(52, 211, 153, .12), transparent 60%), linear-gradient(180deg, #1d1d22, #17171b); }
.st-pronto .btn { text-decoration: none; color: inherit; }
.st-pronto .btn-primario { color: #fff; }
@media (max-width: 860px) { .st-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .st-campos { grid-template-columns: 1fr; } .st-busca { max-width: none; } }
.st .tp { overflow-x: auto; }
.st-tabela td { vertical-align: middle; }
.st-tabela td strong { font-weight: 600; color: var(--tinta); }
.st-tabela a { color: #c4a5ff; text-decoration: none; }
.st-tabela a:hover { text-decoration: underline; }
.st-tab-acoes { text-align: right; white-space: nowrap; }
.st-tab-acoes .btn { padding: 5px 10px; font-size: 12.5px; color: var(--tinta); }
.st-tab-acoes .btn:hover { text-decoration: none; }
.st-tab-acoes .icone { width: 14px; height: 14px; }

/* Logo de site "Outro" (buscada no próprio site): fundo claro, já que muitos ícones são feitos pra aba clara do navegador */
.app-ico-logo { background: #fff; overflow: hidden; }
.app-ico-logo img { width: 78%; height: 78%; object-fit: contain; }
.ap-site { display: flex; align-items: flex-start; gap: 12px; }
.ap-logo { flex: none; width: 46px; height: 46px; margin-top: 22px; }
.ap-logo .app-ico { border-radius: 12px; }
.ap-logo-info { font-size: 12px; color: var(--apagado); }

/* Barra lateral: arrastar apps, grupos e perfis (o arrastado fica apagado; uma linha mostra onde vai cair) */
[data-arrasta].arrastando { opacity: .4; }
[data-arrasta].solta-antes { box-shadow: 0 -3px 0 -1px var(--acento-forte); border-radius: 12px; }
[data-arrasta].solta-depois { box-shadow: 0 3px 0 -1px var(--acento-forte); border-radius: 12px; }
/* Arquivar grupo: aparece ao passar o mouse na pasta */
.sp-pasta-arq { display: none; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; color: var(--apagado); cursor: pointer; }
.sp-pasta:hover .sp-pasta-arq, .sp-pasta-arq:focus-visible { display: grid; }
.sp-pasta-arq:hover { color: var(--tinta); background: rgba(255, 255, 255, .08); }
.sp-pasta-arq .icone { width: 15px; height: 15px; }
.sp-pasta:hover .sp-pasta-n { display: none; }
/* Grupos arquivados: uma linha compacta no fim da barra */
.sp-arq { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--linha-suave); display: flex; flex-direction: column; gap: 6px; }
.sp-arq-cab { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 9px; background: none; color: var(--apagado); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.sp-arq-cab:hover { color: var(--tinta-2); background: rgba(255, 255, 255, .04); }
.sp-arq-cab .icone { width: 15px; height: 15px; }
.sp-arq-cab span:first-of-type { flex: 1; text-align: left; }
.sp-arq-cab .sp-ferr-chev { width: 15px; height: 15px; transition: transform .2s; }
.sp-arq.aberta .sp-arq-cab .sp-ferr-chev { transform: rotate(180deg); }
.sp-arq-lista { display: flex; flex-direction: column; gap: 6px; }
.sp-arquivado .sp-pasta { opacity: .75; }
body.recolhida .sp-pasta-arq, body.recolhida .sp-arq-cab span { display: none; }

/* Botão "Traduzir" do app (no topo, ao lado de recarregar): com texto, roxo quando ligado */
.tp-traduzir { display: inline-flex; align-items: center; width: auto; gap: 6px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 650; }
.tp-traduzir .icone { width: 17px; height: 17px; }
.tp-traduzir.ativo { color: #d8c8ff; background: rgba(147, 51, 234, .2); box-shadow: inset 0 0 0 1px rgba(168, 85, 247, .45); }
.tp-traduzir.ativo:hover { background: rgba(147, 51, 234, .3); color: #fff; }

/* ═══ Aba Financeiro ═══ */
.fn { display: flex; flex-direction: column; gap: 18px; max-width: none; }
/* Cabeçalho: título + filtro de período */
.fn-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.fn-cab-txt h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--tinta); }
.fn-cab-txt p { margin-top: 2px; font-size: 13.5px; color: var(--apagado); }
.fn-periodos { flex-wrap: wrap; }

/* KPIs: faturamento, gastos, lucro, clientes */
.fn-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fn-kpi { --kpi: var(--acento-forte); --kpi-f: var(--acento-suave); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 18px; background: #000; border: 1px solid var(--linha); transition: border-color .14s, box-shadow .14s; }
.fn-kpi:hover { border-color: color-mix(in srgb, var(--kpi) 50%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--kpi) 10%, transparent); }
.fn-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 2px 2px 0; background: var(--kpi); }
.fn-kpi::after { content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--kpi) 12%, transparent), transparent 70%); pointer-events: none; }
.fn-kpi-topo { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; color: var(--tinta-2); }
.fn-kpi-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--kpi-f); color: var(--kpi); }
.fn-kpi-ico .icone { width: 18px; height: 18px; }
.fn-kpi b { font-size: 28px; font-weight: 800; letter-spacing: -.6px; color: var(--tinta); font-variant-numeric: tabular-nums; line-height: 1; }
.fn-kpi small { font-size: 12px; color: var(--apagado); }
.fn-kpi-venda { --kpi: #37d07a; --kpi-f: rgba(55, 208, 122, .15); }
.fn-kpi-venda b { color: #4ade80; }
.fn-kpi-gasto { --kpi: #f26d6d; --kpi-f: rgba(242, 109, 109, .15); }
.fn-kpi-gasto b { color: #f87171; }
.fn-kpi-saldo b { color: #4ade80; }
.fn-kpi-saldo.neg { --kpi: #f26d6d; --kpi-f: rgba(242, 109, 109, .15); }
.fn-kpi-saldo.neg b { color: #f87171; }
.fn-kpi-cli { --kpi: #f5b84c; --kpi-f: rgba(245, 184, 76, .15); }
.fn-kpi-cli b { color: var(--tinta); }

/* Cartões do financeiro (tema preto, sem o roxo antigo) */
.fn-card { display: flex; flex-direction: column; gap: 15px; padding: 22px; border-radius: 18px; background: #000; border: 1px solid var(--linha); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); transition: border-color .14s; }
.fn-card:hover { border-color: var(--apagado); }
.fn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.fn-card .st-num { color: var(--acento-forte); background: var(--acento-suave); }
.fn-ico-cli { color: var(--acento-forte) !important; background: var(--acento-suave) !important; }
.fn-ico-venda { color: #4ade80 !important; background: rgba(55, 208, 122, .15) !important; }
.fn-ico-hist { color: var(--tinta-2) !important; background: rgba(255, 255, 255, .06) !important; }
.fn-ico-gasto { color: #f87171 !important; background: rgba(242, 109, 109, .15) !important; }

/* Ranking de clientes */
.fn-rank { list-style: none; display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; }
.fn-rank-item { display: flex; align-items: center; gap: 11px; }
.fn-rank-pos { flex: 0 0 auto; width: 18px; text-align: center; font-size: 13px; font-weight: 800; color: var(--apagado); font-variant-numeric: tabular-nums; }
.fn-rank-pos-1 { color: #f5b84c; } .fn-rank-pos-2 { color: #c7cad1; } .fn-rank-pos-3 { color: #e0915b; }
.fn-rank-av { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.fn-rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fn-rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fn-rank-top strong { font-size: 14px; font-weight: 600; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-rank-top b { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-rank-barra { height: 6px; border-radius: 4px; background: var(--superficie-2); overflow: hidden; }
.fn-rank-barra i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--acento), #4ade80); }
.fn-rank-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--apagado); }
.fn-rank-mais { margin: 13px 0 0; font-size: 12.5px; color: var(--apagado); text-align: center; }

/* Formulários */
.fn-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.fn-form .gp-campo { flex: 1 1 150px; }
.fn-form .fn-largo { flex: 1 1 100%; position: relative; }
.fn-form .fn-valor { flex: 0 1 150px; }
.fn-form .fn-data { flex: 0 1 160px; }
.fn-form .btn { height: 41px; }
.fn-btn-largo { flex: 1 1 100%; height: 42px; }
.fn-form .icone, .fn-cat-nova .icone { width: 16px; height: 16px; }
/* Venda de BM: aviso de qual perfil é o ID digitado (flutua abaixo, sem empurrar a linha) */
.fn-venda-achou { position: absolute; top: 100%; left: 2px; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fn-venda-achou.ok { color: #4ade80; }
.fn-venda-achou.erro { color: #f87171; }
.gp-campo select { width: 100%; height: 41px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie-2); color: var(--tinta); font: inherit; font-size: 14px; outline: none; }
.gp-campo select:focus { border-color: var(--acento-forte); box-shadow: 0 0 0 3px var(--acento-suave); }
.gp-campo input[type="date"] { color-scheme: dark; }

/* Busca no cabeçalho do histórico */
.fn-cab-busca { flex-wrap: wrap; }
.fn-cab-info { flex: 1 1 240px; }
.fn-busca { margin-left: auto; width: min(300px, 100%); height: 40px; }
.fn-busca:focus-within { border-color: var(--acento-forte); box-shadow: 0 0 0 3px var(--acento-suave); }

/* Categorias de gasto */
.fn-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fn-cat { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 12px; border-radius: 16px; background: var(--acento-suave); color: var(--acento-forte); font-size: 13px; }
.fn-cat b { font-weight: 650; }
.fn-cat small { color: var(--tinta-2); font-variant-numeric: tabular-nums; }
.fn-cat button { width: 24px; height: 24px; border: 0; border-radius: 12px; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; opacity: .6; }
.fn-cat button:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.fn-cat-nova { display: inline-flex; gap: 6px; }
.fn-cat-nova input { width: 160px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px dashed var(--linha); background: none; color: var(--tinta); font: inherit; font-size: 13px; outline: none; }
.fn-cat-nova input:focus { border-color: var(--acento-forte); border-style: solid; }
.fn-cat-nova .btn { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 16px; }

/* Tabelas */
.fn-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; background: var(--acento-suave); color: var(--acento-forte); font-size: 12.5px; font-weight: 600; }
.fn-cli-chip { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-weight: 600; color: var(--tinta); }
.fn-dim { color: var(--apagado); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-tabela .fn-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-vermelho { color: #f87171 !important; }
.fn-verde { color: #4ade80; }
.fn-tabela .bmt-id { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px; cursor: pointer; }
.fn-tabela .bmt-id .icone { width: 12px; height: 12px; opacity: .45; }
.fn-lixo .icone { width: 16px; height: 16px; }

/* Gastos minimalista */
.fn-form-gasto .gp-campo { flex: 1 1 120px; }
.fn-form-gasto .fn-valor { flex: 1 1 110px; }
.fn-form-gasto .fn-data { flex: 1 1 130px; }
.fn-gasto-resumo { margin: 2px 0 0; font-size: 12.5px; color: var(--apagado); }

/* Botão de categoria (abre o dropdown) — parece um select */
.fn-cat-sel { display: flex; align-items: center; gap: 8px; width: 100%; height: 41px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie-2); color: var(--tinta); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.fn-cat-sel:hover { border-color: var(--apagado); }
.fn-cat-sel span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-cat-sel-chev { width: 16px; height: 16px; flex: none; color: var(--tinta-2); }

/* Dropdown de categorias (popover) */
.fn-cat-pop { max-height: 240px; }
.fn-cat-pit.sel { background: var(--acento-suave); }
.fn-cat-pit .pop-ok { color: var(--acento-forte); }
.fn-cat-pit-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-cat-pit-tot { flex: none; }
.fn-cat-pit-del { flex: 0 0 auto !important; display: grid; place-items: center; width: 26px; height: 26px; margin: -4px -4px -4px 0; border-radius: 7px; opacity: 0; transition: opacity .12s, background .12s; }
.fn-cat-pit-del .icone { width: 15px; height: 15px; color: var(--apagado); }
.fn-cat-pit:hover .fn-cat-pit-del { opacity: 1; }
.fn-cat-pit-del:hover { background: rgba(248, 113, 113, .16); }
.fn-cat-pit-del:hover .icone { color: #f87171; }
.pop-vazio { padding: 10px; font-size: 12.5px; color: var(--apagado); text-align: center; }
.fn-cat-nova-pop { display: flex; gap: 6px; padding: 2px; }
.fn-cat-nova-pop input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--linha); background: var(--superficie-2); color: var(--tinta); font: inherit; font-size: 13px; outline: none; }
.fn-cat-nova-pop input:focus { border-color: var(--acento-forte); }
.fn-cat-nova-pop .btn { height: 34px; padding: 0 12px; font-size: 13px; }

/* Histórico unificado: coluna Tipo (venda verde / gasto vermelho) e detalhes */
.fn-tipo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.fn-tipo .icone { width: 13px; height: 13px; }
.fn-tipo-venda { color: #4ade80; background: rgba(55, 208, 122, .14); }
.fn-tipo-gasto { color: #f87171; background: rgba(242, 109, 109, .14); }
/* A célula continua sendo table-cell (vertical-align: middle, igual às outras).
   A grade vai num wrapper interno: a 1ª coluna (chip da BM / tag da categoria)
   tem largura fixa, então o texto ao lado começa no mesmo x em toda linha. */
.fn-det-in { display: grid; grid-template-columns: 196px 1fr; align-items: center; column-gap: 14px; }
.fn-det-in > :first-child { justify-self: start; }
.fn-det-sub { color: var(--tinta-2); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-det-sub b { color: var(--tinta); font-weight: 600; }
@media (max-width: 640px) { .fn-det-in { grid-template-columns: 1fr; row-gap: 4px; } }

@media (max-width: 860px) { .fn-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .fn-kpis { grid-template-columns: 1fr; } .fn-busca { margin-left: 0; width: 100%; } }
/* ─── FirstMail ─────────────────────────────────────────────────────────── */
.fm-tela { display: grid; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 18px; flex: 1 1 auto; min-height: 0; overflow: hidden; max-width: none; width: 100%; }
/* dá margem de leitura ao conteúdo do email mesmo num painel largo */
.fm-msg-meta, .fm-convite, .fm-links, .fm-corpo-txt { max-width: 860px; }
/* Barras de rolagem discretas, no tom do app */
.fm-emails::-webkit-scrollbar, .fm-msg-corpo::-webkit-scrollbar, .fm-convite-url::-webkit-scrollbar { width: 10px; }
.fm-emails::-webkit-scrollbar-thumb, .fm-msg-corpo::-webkit-scrollbar-thumb, .fm-convite-url::-webkit-scrollbar-thumb { background: var(--linha); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.fm-emails::-webkit-scrollbar-thumb:hover, .fm-msg-corpo::-webkit-scrollbar-thumb:hover, .fm-convite-url::-webkit-scrollbar-thumb:hover { background: var(--apagado); background-clip: content-box; }
.fm-emails::-webkit-scrollbar-track, .fm-msg-corpo::-webkit-scrollbar-track { background: transparent; }
/* ─── Lista esquerda ─── */
.fm-lista { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--linha-suave); border-radius: var(--raio); overflow: hidden; background: var(--superficie); box-shadow: var(--sombra); }
.fm-lista-topo { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--linha-suave); flex: 0 0 auto; }
.fm-titulo { display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 650; color: var(--tinta); }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: 10px; }
.fm-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--acento-suave); font-size: 11.5px; font-weight: 700; color: var(--acento-forte); margin-left: 7px; }
.fm-form-lote { display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--linha-suave); background: var(--superficie-2); flex: 0 0 auto; }
.fm-lote-dica { font-size: 12px; color: var(--tinta-2); margin: 0; line-height: 1.5; }
.fm-lote-dica code { background: var(--acento-suave); color: var(--acento-forte); padding: 1px 6px; border-radius: 6px; font-family: monospace; font-size: 11.5px; }
.fm-lote-txt { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--linha); background: var(--fundo); color: var(--tinta); font-size: 12.5px; font-family: monospace; line-height: 1.5; resize: vertical; outline: none; transition: border-color .15s; box-sizing: border-box; min-height: 92px; }
.fm-lote-txt:focus { border-color: var(--acento); }
.fm-lote-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-add-btn { height: 36px; border-radius: 10px; font-size: 12.5px; }
.fm-erro { font-size: 12px; color: var(--critico-t); margin: 0; }
/* Busca */
.fm-busca { display: flex; align-items: center; gap: 9px; padding: 13px 16px 10px; flex: 0 0 auto; }
.fm-busca-ico { display: inline-flex; color: var(--apagado); flex-shrink: 0; }
.fm-busca-ico svg { width: 16px; height: 16px; }
.fm-busca-inp { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linha); background: var(--superficie-2); color: var(--tinta); font: inherit; font-size: 13px; outline: none; transition: border-color .15s; }
.fm-busca-inp::placeholder { color: var(--apagado); }
.fm-busca-inp:focus { border-color: var(--acento); }
.fm-busca-x { flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--linha); border-radius: 8px; background: var(--superficie-2); color: var(--tinta-2); font-size: 16px; line-height: 1; cursor: pointer; transition: all .12s; }
.fm-busca-x:hover { background: var(--linha-suave); color: var(--tinta); }
/* Filtros de status */
.fm-filtros { display: flex; gap: 7px; padding: 4px 16px 12px; border-bottom: 1px solid var(--linha-suave); flex: 0 0 auto; }
.fm-filtro { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--linha); border-radius: 9px; background: var(--superficie-2); color: var(--tinta-2); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.fm-filtro:hover { color: var(--tinta); border-color: var(--apagado); }
.fm-filtro span { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 10.5px; font-weight: 700; }
.fm-filtro.ativo { color: #fff; border-color: var(--acento); background: var(--acento-suave); }
.fm-filtro.ativo span { background: rgba(255,255,255,.18); color: #fff; }
.fm-filtro-disponivel.ativo { border-color: var(--bom); color: var(--bom-t); background: var(--bom-f); }
.fm-filtro-disponivel.ativo span { background: rgba(52,211,153,.25); color: var(--bom-t); }
.fm-filtro-usado.ativo { border-color: var(--critico); color: var(--critico-t); background: var(--critico-f); }
.fm-filtro-usado.ativo span { background: rgba(239,68,68,.25); color: var(--critico-t); }
/* Itens da lista */
.fm-emails { flex: 1 1 auto; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.fm-vazio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; text-align: center; font-size: 13px; color: var(--apagado); }
.fm-email-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.fm-email-item:hover { background: var(--superficie-2); }
.fm-email-item.ativo { background: var(--acento-suave); border-color: var(--acento); }
.fm-email-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.fm-email-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fm-email-addr { font-size: 13px; font-weight: 600; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-del, .fm-edit { opacity: 0; width: 28px; height: 28px; transition: opacity .12s; flex-shrink: 0; }
.fm-email-item:hover .fm-del, .fm-email-item:hover .fm-edit, .fm-email-item.ativo .fm-del, .fm-email-item.ativo .fm-edit { opacity: .55; }
.fm-del:hover, .fm-edit:hover { opacity: 1 !important; }
.fm-del:hover { color: var(--critico-t); }
/* Badge de status (Disponível / Usado) */
.fm-badge { flex-shrink: 0; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: filter .12s; white-space: nowrap; }
.fm-badge:hover { filter: brightness(1.15); }
.fm-badge-disponivel { background: var(--bom-f); color: var(--bom-t); border-color: rgba(52,211,153,.4); }
.fm-badge-usado { background: var(--critico-f); color: var(--critico-t); border-color: rgba(239,68,68,.4); }
.fm-email-item.fm-st-usado .fm-email-dot { opacity: .5; }
.fm-email-item.fm-st-usado .fm-email-addr { opacity: .6; }
/* Campo de senha do modal de edição */
.fm-ed-senha { display: flex; align-items: center; gap: 8px; }
.fm-ed-senha input { flex: 1; min-width: 0; }
.fm-ed-ver { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--linha); border-radius: 10px; background: var(--superficie-2); color: var(--tinta-2); cursor: pointer; transition: color .12s, border-color .12s; }
.fm-ed-ver:hover { color: var(--tinta); border-color: var(--acento); }
.fm-ed-ver svg { width: 17px; height: 17px; }
/* Botão copiar email:senha no rodapé do modal */
.fm-copiar-cred { margin-right: auto; display: inline-flex; align-items: center; gap: 7px; }
.fm-copiar-cred svg { width: 15px; height: 15px; }
.fm-copiar-cred.copiado { border-color: var(--bom); color: var(--bom-t); }
/* Seletor de status no modal */
.fm-ed-status { display: flex; gap: 8px; }
.fm-st-btn { flex: 1; height: 40px; border: 1px solid var(--linha); border-radius: 10px; background: var(--superficie-2); color: var(--tinta-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s; }
.fm-st-btn:hover { color: var(--tinta); border-color: var(--apagado); }
.fm-st-btn-disponivel.sel { border-color: var(--bom); color: var(--bom-t); background: var(--bom-f); }
.fm-st-btn-usado.sel { border-color: var(--critico); color: var(--critico-t); background: var(--critico-f); }
/* ─── Painel detalhe direito ─── */
.fm-detalhe { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--linha-suave); border-radius: var(--raio); overflow: hidden; background: var(--superficie); box-shadow: var(--sombra); }
.fm-detalhe-vazio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--apagado); padding: 40px; text-align: center; }
.fm-detalhe-vazio svg { color: var(--linha); }
.fm-detalhe-vazio p { font-size: 14px; margin: 0; max-width: 280px; line-height: 1.5; }
.fm-detalhe-cab { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--linha-suave); gap: 14px; flex: 0 0 auto; background: var(--superficie-2); }
.fm-detalhe-cab .fm-email-addr { font-size: 14px; }
.fm-cab-email { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 650; color: var(--tinta); min-width: 0; overflow: hidden; }
.fm-cab-email svg { color: var(--acento-forte); flex-shrink: 0; }
.fm-cab-email span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-consultar-btn { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fm-aviso { margin: 14px 18px 0; padding: 11px 14px; font-size: 13px; border-radius: 10px; }
.fm-aviso-erro { color: var(--critico-t); background: var(--critico-f); border: 1px solid rgba(239,68,68,.3); }
.fm-msg { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.fm-msg-meta { display: flex; flex-direction: column; gap: 0; border-bottom: 1px solid var(--linha-suave); flex: 0 0 auto; }
.fm-msg-linha { display: flex; align-items: baseline; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--linha-suave); }
.fm-msg-linha:last-child { border-bottom: 0; }
.fm-label { font-size: 11px; font-weight: 700; color: var(--apagado); text-transform: uppercase; letter-spacing: .05em; width: 64px; flex-shrink: 0; }
.fm-valor { font-size: 13px; color: var(--tinta); min-width: 0; overflow-wrap: break-word; }
.fm-assunto { font-weight: 650; }
/* Link do convite (BM) destacado */
.fm-convite { margin: 16px 18px 0; padding: 14px 16px; border: 1px solid var(--acento); border-radius: 12px; background: linear-gradient(180deg, var(--acento-suave), rgba(168,85,247,.05)); flex: 0 0 auto; }
.fm-convite-cab { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--tinta); margin-bottom: 10px; }
.fm-convite-cab svg { width: 17px; height: 17px; color: var(--acento-forte); }
.fm-convite-url { font-family: monospace; font-size: 11.5px; color: var(--tinta-2); background: var(--fundo); border: 1px solid var(--linha); border-radius: 9px; padding: 9px 11px; word-break: break-all; margin-bottom: 11px; max-height: 64px; overflow-y: auto; line-height: 1.5; }
.fm-convite-acoes { display: flex; gap: 8px; }
.fm-convite-acoes .btn { display: inline-flex; align-items: center; gap: 6px; }
.fm-convite-acoes .btn svg { width: 14px; height: 14px; }
/* Lista de todos os links */
.fm-links { margin: 14px 18px 0; font-size: 12px; flex: 0 0 auto; }
.fm-links summary { cursor: pointer; color: var(--tinta-2); font-weight: 600; padding: 5px 0; user-select: none; }
.fm-links summary:hover { color: var(--tinta); }
.fm-links-lista { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 150px; overflow-y: auto; }
.fm-link-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--superficie-2); border: 1px solid var(--linha-suave); }
.fm-link-url { flex: 1; min-width: 0; font-family: monospace; font-size: 11px; color: var(--tinta-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-link-item .btn-icone { flex-shrink: 0; width: 26px; height: 26px; opacity: .65; }
.fm-link-item .btn-icone:hover { opacity: 1; }
/* Corpo da mensagem */
.fm-msg-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.fm-corpo-txt { font: 12.5px/1.65 var(--fonte-mono, 'Cascadia Code', 'Fira Code', monospace); color: var(--tinta-2); white-space: pre-wrap; overflow-wrap: break-word; margin: 0; }
.fm-detalhe-hint { padding: 26px 18px; }
/* Blocos extraídos: código / links / mensagem */
.fm-msg { overflow-y: auto; }
.fm-extra { margin: 16px 18px 0; }
.fm-extra:last-child { margin-bottom: 20px; }
.fm-extra-tit { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: var(--apagado); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 9px; }
.fm-extra-tit svg { width: 14px; height: 14px; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-chip-cod { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fonte-mono, 'Cascadia Code', monospace); font-size: 17px; font-weight: 700; letter-spacing: .1em; color: var(--tinta); background: var(--acento-suave); border: 1px solid var(--acento); border-radius: 10px; padding: 9px 15px; cursor: pointer; transition: .15s; }
.fm-chip-cod:hover { background: var(--acento); color: #fff; }
.fm-chip-cod svg { width: 13px; height: 13px; opacity: .65; }
.fm-chip-cod.copiado { background: rgba(22,163,74,.18); border-color: #16a34a; color: #16a34a; }
.fm-link-row { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; background: var(--superficie-2); border: 1px solid var(--linha-suave); margin-bottom: 7px; }
.fm-link-row .fm-link-url { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.fm-link-row .fm-link-url:hover { text-decoration: underline; color: var(--acento-forte); }
.fm-link-copiar { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.fm-link-copiar svg { width: 13px; height: 13px; }
.fm-link-copiar.copiado { color: #16a34a; border-color: #16a34a; }
.fm-carregando { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 16px; color: var(--apagado); font-size: 13px; }
.fm-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--acento-forte); border-radius: 50%; animation: giro .7s linear infinite; }
.fm-spin-lg { width: 26px; height: 26px; border-width: 3px; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .fm-tela { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } }
/* ─── Modal Automático (criação em lote) ─────────────────────────────────── */
.lote-passos {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--borda);
}
.lote-passo {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  color: var(--txt2);
  white-space: nowrap;
}
.lote-passo.ativo {
  color: var(--azul);
  border-bottom-color: var(--azul);
  font-weight: 600;
}

/* ─── Toggle Manual / Automático no Novo Perfil ─────────────────────────── */
.pf-modo-toggle {
  display: flex;
  background: var(--pf-campo);
  border-radius: var(--pf-raio);
  padding: 4px;
  gap: 4px;
}
.pf-modo-btn {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: calc(var(--pf-raio) - 2px);
  background: none;
  color: var(--pf-rotulo);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pf-modo-btn.ativo {
  background: var(--pf-azul);
  color: #16181c;
  font-weight: 600;
}
.pf-modo-btn:not(.ativo):hover {
  background: rgba(255,255,255,.06);
  color: var(--pf-texto);
}

/* ── Aba Apps ───────────────────────────────────────────────────────────────── */
.apps-tela {
  padding: 24px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}
.apps-grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.apps-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--apagado);
  font-size: 14px;
}
.apps-card {
  display: flex;
  align-items: center;
  gap: 0;
  background: #1a1d22;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.apps-card:hover { background: #1e2127; border-color: rgba(255,255,255,.13); }
.apps-card.apps-card-ativo { border-color: var(--roxo, #7c3aed); background: rgba(124,58,237,.08); }
.apps-card-abrir {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: none;
  border: none;
  color: var(--tinta);
  cursor: pointer;
  text-align: left;
  min-width: 0;
}
.apps-card-abrir:hover .apps-card-nome { color: var(--tinta); }
.apps-card-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.05);
}
.apps-card-ico img { width: 100%; height: 100%; object-fit: cover; }
.apps-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.apps-card-nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--tinta-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .12s;
}
.apps-card-tipo {
  font-size: 11px;
  color: var(--apagado);
  text-transform: capitalize;
}
.apps-card-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.apps-card-acoes {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px;
  border-left: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}
.apps-card-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: none;
  color: var(--apagado);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.apps-card-btn:hover { background: rgba(255,255,255,.07); color: var(--tinta); }
.apps-card-del:hover { background: rgba(239,68,68,.15); color: #f87171; }
.apps-card-btn .icone { width: 13px; height: 13px; }

/* Topo fixo sidebar esquerda: Lovable2kBunny + CNPJ PDF */
.sp-topo-fixo { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sp-topo-fixo .sp-item { width: 100%; }
