/* =====================================================================
   Barra do topo, comum ao ERP (index.html) e às telas em PHP
   (Análise de Resultado). Um arquivo só, para os dois lados ficarem
   sempre iguais — é a parte que o usuário vê em toda tela.

   Os tokens ficam aqui dentro de propósito: cada página tem o seu
   conjunto de variáveis (--gray-200 num lado, --borda no outro), e o
   menu não pode depender de qual delas existe.
   ===================================================================== */
.ltopo{background:#fff;border-bottom:1px solid #e7e7ea;position:sticky;top:0;z-index:50;
       font-family:'Varta','Montserrat',system-ui,Arial,sans-serif;color:#0F0F0F;}
/* mesmas medidas do cabeçalho do index.html (header.topbar) */
.ltopo-inner{max-width:1400px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;
             justify-content:space-between;gap:16px;flex-wrap:wrap;}
.ltopo-marca{display:flex;align-items:center;gap:14px;flex-shrink:0;}
.ltopo-marca img{height:38px;width:auto;display:block;background:none;padding:0;border-radius:0;}
.ltopo-dir{margin-left:auto;display:flex;align-items:center;gap:16px;flex-wrap:wrap;}

/* As telas antigas têm regras soltas para "header", "header nav", "header h1"…
   Estas desfazem o efeito delas sobre a barra padrão. */
header.ltopo{display:block;padding:0;margin:0;gap:0;background:#fff;color:#0F0F0F;box-shadow:none;flex-wrap:nowrap;}
header.ltopo nav.ltopo-menu{margin:0;gap:2px;font-size:inherit;width:auto;}
header.ltopo img{background:none;padding:0;border-radius:0;height:38px;}
header.ltopo .ltopo-user > span{color:#4a4a4a;font-size:12px;}
header.ltopo a{border-bottom:0;}

/* ---- menu ---- */
.ltopo-menu{display:flex;align-items:center;gap:2px;flex-wrap:wrap;}
.ltopo-menu > button,
.ltopo-menu .lmenu > button{
  border:0;background:transparent;padding:9px 14px;border-radius:9px;margin:0;
  font-family:inherit;font-weight:700;font-size:13.5px;color:#4a4a4a;letter-spacing:.2px;
  cursor:pointer;transition:.15s;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
}
.ltopo-menu > button:hover,
.ltopo-menu .lmenu > button:hover{background:#f4f4f6;color:#0F0F0F;}
.ltopo-menu > button.atual,
.ltopo-menu .lmenu.atual > button{background:#FF0000;color:#fff;}
.lmenu{position:relative;}
.lmenu > button::after{content:"";width:6px;height:6px;margin-left:2px;border-right:2px solid currentColor;
                       border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg);opacity:.75;}
.lmenu-pop{display:none;position:absolute;top:calc(100% + 6px);left:0;min-width:232px;z-index:60;
           background:#fff;border:1px solid #e7e7ea;border-radius:12px;padding:6px;
           box-shadow:0 10px 30px rgba(0,0,0,.13);}
.lmenu.aberto .lmenu-pop{display:block;}
.lmenu-pop a,.lmenu-pop button{
  display:block;width:100%;text-align:left;border:0;background:none;margin:0;
  padding:9px 12px;border-radius:8px;font-family:inherit;font-size:13.5px;font-weight:600;
  color:#222;text-decoration:none;cursor:pointer;white-space:nowrap;
}
.lmenu-pop a:hover,.lmenu-pop button:hover{background:#f4f4f6;}
.lmenu-pop a.atual,.lmenu-pop button.atual{color:#FF0000;background:#fdecee;}
.lmenu-pop .lmenu-sep{height:1px;background:#e7e7ea;margin:5px 4px;}
.lmenu-pop .lmenu-rot{font-size:10.5px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;
                      color:#8a8a8a;padding:8px 12px 4px;}

/* ---- ícones dos itens do menu (data-ic="…"); a cor segue o texto ---- */
.lmenu-pop [data-ic]{display:flex;align-items:center;gap:9px;}
.lmenu-pop [data-ic]::before{content:"";flex:0 0 16px;width:16px;height:16px;background:currentColor;opacity:.72;
  -webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;}
.lmenu-pop [data-ic]:hover::before,.lmenu-pop [data-ic].atual::before{opacity:1;}
.lmenu-pop [data-ic="boleto"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 9v6M10.5 9v6M14 9v6M17.5 9v6'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="consignado"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M12 11v6M10 12.5h3a1.2 1.2 0 0 1 0 2.4h-2a1.2 1.2 0 0 0 0 2.4h3'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="carga"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5'/%3E%3Cpath d='M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="chat"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-12.2 7.5L3 21l2-5.6A8.4 8.4 0 1 1 21 11.5z'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="changelog"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v4l3 2'/%3E%3Cpath d='M3.05 11a9 9 0 1 1 .5 4'/%3E%3Cpath d='M3 4v5h5'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="io"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m8 11 4 4 4-4'/%3E%3Cpath d='M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="usuarios"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='4'/%3E%3Cpath d='M2 21v-1a6 6 0 0 1 9.5-4.9'/%3E%3Crect x='14' y='15' width='8' height='6' rx='1'/%3E%3Cpath d='M16 15v-2a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="auditoria"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M19 8v2'/%3E%3Ccircle cx='16.5' cy='16.5' r='3'/%3E%3Cpath d='m21 21-2.2-2.2'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="acessos"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 9.9-1'/%3E%3Cpath d='M12 15v2'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="emails"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="ativos"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9'/%3E%3Cpath d='M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="entradas"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="saidas"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="mensalistas"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="novo"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="resultado"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 14 4-4 4 4 5-6'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="receber"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18l-2.5-1.5L14 21l-2-1.5L10 21l-2.5-1.5L5 21z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="fluxo"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3 4 7l4 4'/%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='m16 21 4-4-4-4'/%3E%3Cpath d='M20 17H4'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="inadimplencia"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6'/%3E%3Cpath d='M12 16.5v.5'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="painel"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="perdas"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 17-8.5-8.5-5 5L2 7'/%3E%3Cpath d='M16 17h6v-6'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="judicial"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M7 21h10'/%3E%3Cpath d='M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2'/%3E%3Cpath d='m2 16 3-8 3 8c-.9.7-1.9 1-3 1s-2.1-.3-3-1z'/%3E%3Cpath d='m16 16 3-8 3 8c-.9.7-1.9 1-3 1s-2.1-.3-3-1z'/%3E%3C/svg%3E");}
.lmenu-pop [data-ic="dashboard"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E");}

/* ---- identificação do usuário (igual ao .user-badge do index) ---- */
.ltopo-user{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;color:#4a4a4a;}
.ltopo-user .ltopo-sair{border:1px solid #e7e7ea;background:#f4f4f6;color:#222;font-family:inherit;
                        font-size:12px;font-weight:700;padding:7px 12px;border-radius:7px;cursor:pointer;transition:.15s;}
.ltopo-user .ltopo-sair:hover{background:#e7e7ea;}
.ltopo .versao-pilha{display:inline-flex;flex-direction:column;align-items:center;gap:2px;line-height:1;}
.ltopo .versao-badge{font-size:11px;font-weight:800;letter-spacing:.3px;padding:4px 9px;border-radius:20px;
  background:#f4f4f6;color:#4a4a4a;cursor:pointer;border:1px solid #e7e7ea;text-decoration:none;}
.ltopo .versao-badge:hover{background:#fdecee;color:#580000;border-color:#fdecee;}
.ltopo .versao-novidades{font-size:10.5px;font-weight:700;color:#FF0000;text-decoration:underline;
  text-underline-offset:2px;white-space:nowrap;}
.ltopo .versao-novidades:hover{color:#580000;}

/* ---- faixa de título da página (telas em PHP): igual ao h1.page-title do index ---- */
.ltopo-titulo{max-width:1400px;margin:0 auto;padding:24px 24px 0;}
.ltopo-titulo h1{font-size:22px;margin:0 0 4px;font-weight:800;color:#0F0F0F;letter-spacing:0;}
.ltopo-titulo p{margin:0;font-size:13px;color:#8a8a8a;font-weight:500;}
/* sub-abas: iguais às .subtabs do index */
.ltopo-sub{max-width:1352px;margin:16px auto 0;padding:0;display:flex;gap:6px;flex-wrap:wrap;
           border-bottom:2px solid #e7e7ea;align-items:flex-end;}
@media(max-width:1400px){.ltopo-sub{margin-left:24px;margin-right:24px;}}
.ltopo-sub a,.ltopo-sub > .lmenu > button{font-family:inherit;font-size:13px;font-weight:700;color:#8a8a8a;
             text-decoration:none;padding:10px 4px;margin-right:18px;border:0;background:none;cursor:pointer;
             border-bottom:3px solid transparent;margin-bottom:-2px;border-radius:0;white-space:nowrap;}
.ltopo-sub a:hover,.ltopo-sub > .lmenu > button:hover{color:#0F0F0F;}
.ltopo-sub a.atual,.ltopo-sub > .lmenu.atual > button{color:#FF0000;border-bottom-color:#FF0000;}
.ltopo-sub > .lmenu{margin-left:auto;}
.ltopo-sub > .lmenu > button{margin-right:0;display:inline-flex;align-items:center;gap:6px;}
.ltopo-sub > .lmenu .lmenu-pop{left:auto;right:0;min-width:300px;}
.ltopo-sub .lmenu-pop a{border-bottom:0;margin:0;padding:9px 12px;border-radius:8px;color:#222;font-weight:700;}
.ltopo-sub .lmenu-pop a.atual{color:#FF0000;background:#fdecee;}
.ltopo-sub .lmenu-pop a em{display:block;font-style:normal;font-weight:600;font-size:11.5px;color:#8a8a8a;
             margin-top:2px;white-space:normal;line-height:1.45;}

@media(max-width:760px){
  .ltopo-inner{padding:10px 14px;gap:10px;}
  .ltopo-dir{margin-left:0;width:100%;}
  .lmenu-pop{left:auto;right:0;}
}

/* =====================================================================
   Selos de origem da informação (ver /assets/fontes.js).
   Cada sistema tem a sua cor, sempre acompanhada do nome — a cor sozinha
   nunca é a única pista.
   ===================================================================== */
.fontes{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;vertical-align:middle;
        font-family:inherit;letter-spacing:0;text-transform:none;}
.fontes-rot{font-size:10.5px;font-weight:700;color:#8a8a8a;text-transform:uppercase;letter-spacing:.4px;}
.fonte{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;line-height:1.2;
       padding:2px 9px 2px 3px;border-radius:20px;border:1px solid;white-space:nowrap;cursor:help;
       letter-spacing:0;text-transform:none;vertical-align:middle;}
.fonte i{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;
         font-style:normal;font-size:8.5px;font-weight:800;color:#fff;letter-spacing:-.2px;}
.fonte.mini{padding:2px;border-width:0;background:none !important;}
.fonte.planilha{color:#17683a;border-color:#bfe3cc;background:#effaf3;}  .fonte.planilha i{background:#1e9e5a;}
.fonte.questor{color:#5b3a9e;border-color:#d9ccf2;background:#f5f1fd;}   .fonte.questor i{background:#6b46c1;}
.fonte.conexa{color:#9a4a07;border-color:#f3d2b0;background:#fdf4ea;}    .fonte.conexa i{background:#d97706;}
.fonte.contaazul{color:#1d4ed8;border-color:#c7d6fb;background:#eef3fe;} .fonte.contaazul i{background:#2563eb;}
h1 .fontes,.page-title .fontes{margin-left:12px;font-size:initial;font-weight:initial;}
