/* Mesmo design system dos outros sistemas da Hope (Ponto/Secullum replica):
   tokens, sidebar colapsável, cabeçalho de página e cards de resumo com
   barra — copiado de marcador-ponto/public/style.css pra manter os produtos
   com a mesma cara. */
:root {
  --bg: #f5f7f7;
  --card: #ffffff;
  --texto: #111111;
  --muted: #6b7280;
  --hope: #2FE0C4;
  --hope-escuro: #14b89f;
  --verde: #22c55e;
  --vermelho: #ef4444;
  --borda: #e5e7eb;

  --sec-texto: #53565a;
  --sec-muted: #767e87;
  --sec-bg-pagina: #f7f8f9;
  --sec-borda: #dee0e4;
  --sec-borda-forte: #cdced3;
  --sec-track: #eff0f2;
  --sec-hover: #f3f5f7;
  --sec-ativo-texto: #33363a;
  --sec-amarelo: #ffc600;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sec-bg-pagina);
  color: var(--texto);
  font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.oculto { display: none !important; }

/* --- Login --- */
#tela-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 0%, #e4fbf6 0%, var(--bg) 45%);
}

.cartao-login {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 16px 32px -20px rgba(20,30,40,0.25), 0 2px 6px rgba(0,0,0,0.03);
}

.logo-login { display: flex; align-items: center; gap: 10px; }
.logo-login img { width: 36px; height: 36px; }
.logo-login h1 { margin: 0; font-size: 22px; font-weight: 800; }
.subtitulo { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  /* Sem isso, um <label> dentro de uma linha flex (ex: Número/Bairro lado a
     lado) nunca encolhe além da largura "natural" do input — cada <input>
     tem um min-width intrínseco do navegador que o flexbox respeita por
     padrão, e a soma das larguras mínimas estoura a modal pra fora,
     obrigando rolagem horizontal mesmo a modal tendo espaço de sobra. */
  min-width: 0;
}

input, select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--sec-borda);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--hope);
  box-shadow: 0 0 0 3px rgba(47,224,196,0.18);
}

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--hope);
  color: #06231e;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: var(--hope-escuro); color: #fff; }
button.secundario { background: #fff; color: var(--texto); border: 1px solid var(--sec-borda); }
button.secundario:hover { background: var(--sec-hover); color: var(--texto); }
button.perigo { background: var(--vermelho); color: #fff; }
button.perigo:hover { background: #d33; }

.erro { color: var(--vermelho); font-size: 13px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- Barra superior (réplica do Secullum) ---------- */
.barra-superior-dp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--sec-borda);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 50;
}
.barra-superior-marca { display: flex; align-items: center; gap: 14px; }
.barra-superior-marca img { width: 40px; height: 40px; }
.barra-superior-nome { font-weight: 800; font-size: 26px; color: var(--sec-ativo-texto); letter-spacing: 0.2px; }
.barra-superior-nome-rh { font-weight: 500; font-size: 15px; color: var(--sec-muted); margin-left: 4px; vertical-align: middle; }
.barra-superior-usuario { display: flex; align-items: center; gap: 16px; }
.barra-superior-usuario-texto { font-size: 13px; font-weight: 600; color: var(--sec-texto); }
.badge-perfil { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #fff3cd; color: #7a5b00; white-space: nowrap; text-transform: capitalize; }
.barra-superior-sair {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: transparent; color: var(--sec-muted); padding: 0;
}
.barra-superior-sair svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.barra-superior-sair:hover { background: var(--sec-hover); color: var(--sec-texto); }

/* ---------- Layout com sidebar ---------- */
.app-dp { display: flex; align-items: flex-start; min-height: calc(100vh - 72px); width: 100%; background: var(--sec-bg-pagina); }

.sidebar-dp {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--sec-borda);
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  box-sizing: border-box;
  position: sticky;
  top: 72px;
  transition: width 0.2s ease;
}
.sidebar-dp.colapsada { width: 64px; }
.sidebar-dp.colapsada .sidebar-dp-texto { display: none; }
.sidebar-dp.colapsada .sidebar-dp-nav button,
.sidebar-dp.colapsada .sidebar-dp-rodape button { justify-content: center; }
.sidebar-dp.colapsada .sidebar-dp-grupo, .sidebar-dp.colapsada .sidebar-dp-seta { display: none; }

.sidebar-dp-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--sec-borda);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.sidebar-dp-nav > button, .sidebar-dp-grupo-cabecalho {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  padding: 15px 18px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--sec-borda);
  background: transparent;
  color: var(--sec-texto);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}
.sidebar-dp-nav > button:hover, .sidebar-dp-grupo-cabecalho:hover { background: var(--sec-hover); }
.sidebar-dp-nav > button.ativa, .sidebar-dp-grupo-cabecalho.ativa { color: var(--sec-ativo-texto); font-weight: 700; }

.sidebar-dp-icone { width: 20px; text-align: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-dp-icone svg { stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-dp-seta { margin-left: auto; color: var(--sec-muted); display: inline-flex; transition: transform 0.2s ease; }
.sidebar-dp-seta svg { stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-dp-grupo-cabecalho.aberto .sidebar-dp-seta { transform: rotate(180deg); }

.sidebar-dp-grupo { display: none; flex-direction: column; gap: 1px; margin-bottom: 1px; }
.sidebar-dp-grupo.aberto { display: flex; }
.sidebar-dp-grupo button {
  display: flex; align-items: center; gap: 14px; justify-content: flex-start; text-align: left;
  padding: 13px 18px 13px 40px; font-size: 14px; border: none; border-radius: 0;
  width: 100%; background: var(--sec-hover); color: var(--sec-texto); font-weight: 500;
}
.sidebar-dp-grupo button:hover { background: var(--sec-borda); }
.sidebar-dp-grupo button.ativa { color: var(--sec-ativo-texto); font-weight: 700; }

.sidebar-dp-rodape {
  display: flex; flex-direction: column; gap: 1px; padding-top: 10px;
  border: 1px solid var(--sec-borda); border-radius: 0 0 8px 8px; overflow: hidden; margin-top: auto;
}
.sidebar-dp-rodape button {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 0; border: none;
  border-bottom: 1px solid var(--sec-borda); background: transparent; color: var(--sec-muted);
  font-weight: 500; font-size: 14px; width: 100%; text-align: left;
}
.sidebar-dp-rodape button:last-child { border-bottom: none; }
.sidebar-dp-rodape button:hover { background: var(--sec-hover); color: var(--sec-texto); }

.conteudo-dp { flex: 1; min-width: 0; padding: 20px 24px 40px; box-sizing: border-box; }

/* ---------- Cabeçalho de página ---------- */
.cabecalho-pagina {
  display: flex; align-items: center; gap: 8px; padding: 0 0 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--sec-borda); font-weight: 700; font-size: 15px;
  letter-spacing: 0.2px; color: var(--sec-ativo-texto); text-transform: uppercase;
}
.cabecalho-pagina-icone { display: inline-flex; align-items: center; justify-content: center; color: var(--sec-texto); }
.cabecalho-pagina-icone svg { stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.secao-cabecalho { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }

/* ---------- Cards de resumo (KPI com barra) ---------- */
.grade-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 4px; }
.card-resumo { background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 20px -14px rgba(20,30,40,0.25); }
.card-resumo-titulo { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.card-resumo-numero { font-size: 34px; font-weight: 800; color: var(--texto); line-height: 1; margin-bottom: 14px; }
.card-resumo-barra { height: 6px; border-radius: 999px; background: var(--sec-track); overflow: hidden; }
.card-resumo-barra-preenchida { height: 100%; width: 0%; background: var(--sec-amarelo); border-radius: 999px; transition: width 0.4s ease; }
.card-resumo-percentual { margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- Card genérico / seletor de contexto ---------- */
.card { background: var(--card); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 8px 20px -14px rgba(20,30,40,0.25); }

/* ---------- Tabela ---------- */
.cartao-tabela { background: #fff; border: 1px solid var(--sec-borda); border-radius: 10px; overflow: hidden; }

/* Tabela dentro de um espaço estreito (ex: histórico de notas na modal de
   empresa) rola só ela por dentro, em vez de forçar a modal inteira a abrir
   rolagem horizontal — tabela não encolhe como texto. */
.tabela-scroll { overflow-x: auto; max-width: 100%; }
.tabela-scroll .tabela { font-size: 13px; }
.tabela-scroll .tabela th, .tabela-scroll .tabela td { padding: 8px 10px; white-space: nowrap; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th, .tabela td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--sec-borda); font-size: 14px; }
.tabela th { background: var(--sec-bg-pagina); font-weight: 700; color: var(--sec-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.tabela tr:last-child td { border-bottom: none; }
.tabela tbody tr:hover { background: var(--sec-hover); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ativo { background: rgba(47,224,196,0.18); color: var(--hope-escuro); }
.badge-inativo { background: rgba(239,68,68,0.15); color: var(--vermelho); }
.badge-ausente { background: var(--sec-track); color: var(--sec-muted); }
.badge-vencendo { background: rgba(255,198,0,0.22); color: #8a6d00; }
.badge-vencido { background: rgba(239,68,68,0.15); color: var(--vermelho); }
.badge-valido { background: rgba(47,224,196,0.18); color: var(--hope-escuro); }

.acoes-linha { display: flex; gap: 6px; }
.acoes-linha button { padding: 6px 10px; font-size: 13px; }

/* ---------- Barra de ações do cabeçalho / toolbar de filtros ---------- */
.cabecalho-acoes { display: flex; gap: 8px; }

.toolbar-filtros { display: flex; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.toolbar-filtros input[type="search"] { flex: 1; min-width: 220px; }
.toolbar-filtros select { min-width: 160px; }

.tabela-rodape {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-top: 1px solid var(--sec-borda); font-size: 13px;
}
.tabela-paginacao { display: flex; gap: 4px; }
.tabela-paginacao button {
  padding: 5px 10px; font-size: 13px; background: #fff; color: var(--sec-texto);
  border: 1px solid var(--sec-borda);
}
.tabela-paginacao button.ativa { background: var(--hope); color: #06231e; border-color: var(--hope); }
.tabela-paginacao button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Upload de certificado (dentro do modal de empresa) ---------- */
.certificado-status {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--sec-bg-pagina); border: 1px solid var(--sec-borda); border-radius: 8px;
  font-size: 13px;
}
.certificado-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ---------- Rodapé de assinatura ---------- */
.rodape-assinatura {
  text-align: center; padding: 18px 16px; font-size: 12.5px; color: var(--sec-muted);
  border-top: 1px solid var(--sec-borda); margin-top: 24px;
}
.rodape-assinatura img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ---------- Modal ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(15,23,30,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 300; }
.modal-caixa { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 14px; padding: 22px; }
.modal-caixa h3 { margin: 0; }
.modal-botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- Mobile ---------- */
.btn-menu-mobile { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; border-radius: 8px; background: transparent; color: var(--sec-texto); padding: 0; }
.btn-menu-mobile svg { stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.btn-menu-mobile:hover { background: var(--sec-hover); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,30,0.45); z-index: 150; }
.sidebar-backdrop.aberta-mobile { display: block; }

@media (max-width: 860px) {
  .app-dp { flex-direction: column; align-items: stretch; }
  .btn-menu-mobile { display: inline-flex; }
  .sidebar-dp {
    position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: 260px; max-width: 82vw;
    min-height: 0; max-height: none; transform: translateX(-100%); transition: transform .25s ease;
    z-index: 200; overflow-y: auto; box-shadow: 0 0 24px rgba(0,0,0,0.18);
  }
  .sidebar-dp > * { flex-shrink: 0; }
  .sidebar-dp.aberta-mobile { transform: translateX(0); }
  .sidebar-dp.colapsada { width: 260px; }
  .sidebar-dp.colapsada .sidebar-dp-texto { display: inline; }
  .conteudo-dp { padding: 16px 16px 40px; }
  .barra-superior-dp { padding: 0 14px; }
  .barra-superior-nome { display: none; }
}


/* ---------- Dashboard da Página Inicial ---------- */
.toolbar-dashboard { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.toolbar-dashboard label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.grade-dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 12px; }
.card-grafico { margin-bottom: 0; min-width: 0; }
.card-grafico.card-largo { grid-column: 1 / -1; }
.card-grafico h3 { margin: 0 0 12px; font-size: 15px; color: var(--texto); }
.subtitulo-card { margin: 18px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.grafico-svg { width: 100%; height: auto; display: block; }
.grafico-eixo { font-size: 10px; fill: var(--muted); }
.grafico-valor { font-size: 11px; font-weight: 700; fill: var(--texto); }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legenda-item { display: inline-flex; align-items: center; gap: 6px; }
.legenda-item i, .legenda-linha i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mini-kpi { background: var(--sec-hover); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.mini-kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-kpi b { font-size: 20px; }
.rosca-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rosca-svg { width: 140px; height: 140px; flex: none; }
.rosca-total { font-size: 24px; font-weight: 800; fill: var(--texto); }
.rosca-legenda { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 6px; }
.legenda-linha { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legenda-linha span { flex: 1; color: var(--sec-texto); }
.legenda-linha em { font-style: normal; color: var(--muted); font-size: 12px; width: 34px; text-align: right; }
.barra-h { display: grid; grid-template-columns: minmax(120px, 170px) 1fr minmax(34px, auto); align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.barra-h-rotulo { color: var(--sec-texto); }
.barra-h-trilho { height: 10px; border-radius: 999px; background: var(--sec-track); overflow: hidden; }
.barra-h-preenchida { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.barra-h b { text-align: right; }
.linha-lista { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sec-track); }
.linha-lista:last-child { border-bottom: 0; }
.linha-lista > div:first-child { min-width: 0; }
.linha-lista b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.linha-lista small { display: block; color: var(--muted); font-size: 12px; }
.linha-lista-direita { display: flex; align-items: center; gap: 8px; text-align: right; flex: none; }
@media (max-width: 520px) { .grade-dashboard { grid-template-columns: 1fr; } .barra-h { grid-template-columns: 110px 1fr 28px; } }

/* ---------- Documentos fiscais ---------- */
.filtros-documentos { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 8px; }
.filtros-documentos label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filtros-documentos label:first-child { min-width: 220px; }

/* ---------- Validador e relatórios ---------- */
.form-validador { display: flex; flex-direction: column; gap: 10px; }
.form-validador label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.form-validador textarea { font-family: monospace; font-size: 12px; }
.form-validador .linha-check { flex-direction: row; align-items: center; gap: 8px; }
.form-validador .linha-check input { width: auto; }
.par-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resultado-validador { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.resultado-validador li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.icone-nivel { font-weight: 800; width: 18px; flex: none; text-align: center; }
.nivel-ok .icone-nivel { color: #16a34a; }
.nivel-erro .icone-nivel { color: #dc2626; }
.nivel-aviso .icone-nivel { color: #d97706; }
.modelos-relatorio { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }

/* ---------- Certidões ---------- */
.botao-link { display: inline-block; padding: 6px 12px; border: 1px solid var(--borda, #d0d7de); border-radius: 8px; text-decoration: none; font-size: 13px; color: inherit; }
.botao-link:hover { background: rgba(47, 224, 196, 0.12); }

/* ---------- Tela de login no mesmo formato do Ponto: faixa branca no topo (logo + título),
   fundo cinza com o cartão centralizado e barra de copyright no rodapé. ---------- */
#tela-login.login-hope {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: #f7f8f9;
  color: #53565a;
}
#tela-login.login-hope.oculto { display: none; }
.login-hope .login-topo { background: #fff; text-align: center; padding: 22px 16px 24px; border-bottom: 1px solid #dee0e4; }
.login-hope .login-topo img { width: 130px; max-width: 40%; height: auto; }
.login-hope .login-titulo { font-size: clamp(22px, 3.4vw, 34px); font-weight: 400; line-height: 1.25; color: #53565a; margin: 16px auto 8px; max-width: 760px; }
.login-hope .login-chamada { font-size: clamp(14px, 1.8vw, 18px); color: #53565a; margin: 0; }
.login-hope .login-miolo { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 34px 16px 40px; box-sizing: border-box; }
.login-hope .login-card { background: #fff; border: 1px solid #dee0e4; border-radius: 4px; padding: 26px 24px; }
.login-hope .login-ajuda { color: #6b7280; font-size: 13px; margin: 0 0 14px; }
.login-hope label { display: block; color: #767e87; font-size: 13px; margin: 12px 0 6px; }
.login-hope input:not([type="checkbox"]) {
  width: 100%; box-sizing: border-box; border: 1px solid #bbbdc1; border-radius: 4px; background: #fff;
  padding: 11px 12px 11px 38px; font-size: 15px; color: #111;
  background-repeat: no-repeat; background-position: 11px center; background-size: 16px;
}
.login-hope input:focus { outline: none; border-color: #14b89f; box-shadow: none; }
.login-hope input[type="email"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767e87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 7l9 6 9-6'/></svg>");
}
.login-hope input[type="password"], .login-hope .campo-senha input[type="text"], .login-hope .campo-codigo {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767e87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='11' width='14' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>");
}
.login-hope .campo-codigo { letter-spacing: 4px; font-size: 20px; text-align: center; padding-left: 12px; background-image: none; }
.login-hope .campo-senha { position: relative; display: flex; }
.login-hope .campo-senha input { padding-right: 56px; }
.login-hope .alternar-senha { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: #14b89f; font-size: 12px; font-weight: 700; padding: 6px 8px; cursor: pointer; width: auto; margin: 0; }
.login-hope .opcao-lembrar { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: #6b7280; cursor: pointer; }
.login-hope .opcao-lembrar input { width: auto; }
.login-hope .erro { color: #ef4444; font-size: 13px; margin: 12px 0 0; }
.login-hope .erro.oculto { display: none; }
.login-hope button.primario {
  width: 100%; margin-top: 20px; padding: 15px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #2FE0C4, #14b89f); color: #06231e; font-weight: 700; font-size: 16px; cursor: pointer;
  box-shadow: 0 10px 20px -8px rgba(20, 184, 159, 0.55); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.login-hope button.primario:hover { transform: translateY(-1px); box-shadow: 0 14px 24px -8px rgba(20, 184, 159, 0.6); }
.login-hope button.primario:disabled { opacity: 0.5; cursor: default; box-shadow: none; transform: none; }
.login-hope .link-discreto { background: none; border: none; color: #6b7280; text-decoration: underline; font-size: 12px; margin: 14px 0 0; cursor: pointer; display: block; padding: 0; width: auto; }
.login-hope .link-discreto:hover { color: #111; }
.login-hope .login-rodape { background: #fff; border-top: 1px solid #dee0e4; text-align: center; padding: 12px 16px; font-size: 13px; color: #53565a; }
.login-hope .login-rodape img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.login-hope .opcao-lembrar { flex-direction: row; text-align: left; justify-content: flex-start; font-weight: 400; }
.login-hope .opcao-lembrar input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; flex: none; }

/* Cartões da Página Inicial que abrem a lista de empresas */
.card-resumo-clicavel { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-resumo-clicavel:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.25); }
.card-resumo-clicavel:focus-visible { outline: 2px solid var(--hope); outline-offset: 2px; }

/* ---------- Simples 2027 ---------- */
.s27-prazos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin: 12px 0; }
.s27-prazo { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; }
.s27-prazo small { display: block; color: #6b7280; }
.s27-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.s27-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.s27-card small { color: #6b7280; font-size: 12px; }
.s27-card b { font-size: 24px; }
.s27-ajuda { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }
.s27-ajuda summary { cursor: pointer; font-weight: 600; }
.s27-ajuda ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.5; }
.s27-in { width: 100%; min-width: 90px; padding: 6px 8px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; }

.mini-kpi-clicavel { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.mini-kpi-clicavel:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); transform: translateY(-1px); }
.modal-lista-fundo { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-lista { background: var(--card, #fff); color: inherit; border-radius: 12px; width: min(1100px, 100%); max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.modal-lista-topo { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(128,128,128,.25); }
.modal-lista-topo h3 { margin: 0; }
.modal-lista-fechar { background: none; border: 0; font-size: 26px; cursor: pointer; color: inherit; line-height: 1; }
.modal-lista-corpo { padding: 14px 18px; overflow: auto; }

.abas-paralegal { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; border-bottom: 1px solid var(--sec-borda); }
.aba-paralegal { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 600; color: var(--sec-muted); cursor: pointer; font-size: 14px; }
.aba-paralegal:hover { color: inherit; }
.aba-paralegal.ativa { color: inherit; border-bottom-color: var(--hope); }
.paralegal-card-filtro { cursor: pointer; }
.paralegal-card-filtro:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.form-paralegal label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.form-paralegal input, .form-paralegal select, .form-paralegal textarea { width: 100%; margin-top: 4px; box-sizing: border-box; }
.senha-oculta { font-family: ui-monospace, Consolas, monospace; }

.barra-lote { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: var(--sec-hover); border: 1px solid var(--hope); border-radius: 10px; }

.rolagem-topo { overflow-x: auto; overflow-y: hidden; height: 16px; max-width: 100%; margin-bottom: 4px; }
.rolagem-topo > div { height: 1px; }
#secao-paralegal, #paralegal-painel { min-width: 0; max-width: 100%; }
#secao-paralegal .filtros-linha select, #secao-paralegal .filtros-linha input[type="search"] { width: auto; max-width: 100%; }
#secao-paralegal .filtros-linha input[type="search"] { flex: 1 1 260px; }

/* Societário/Paralegal: texto quebra linha (a tabela cabe na tela); só os botões ficam juntos */
#secao-paralegal .tabela-scroll .tabela th, #secao-paralegal .tabela-scroll .tabela td { white-space: normal; vertical-align: top; }
#secao-paralegal .celula-senha { white-space: nowrap !important; }
#secao-paralegal .tabela button { padding: 5px 10px; font-size: 12px; }

.chip-etiqueta { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #0b1f1b; margin: 1px 3px 1px 0; white-space: nowrap; }
.chip-nota { font-size: 12px; color: var(--sec-muted); }
.celula-etiquetas { cursor: pointer; min-width: 120px; }
.celula-etiquetas:hover { background: var(--sec-hover); }
.linha-etiqueta { display: inline-flex; align-items: center; gap: 6px; margin: 3px 12px 3px 0; cursor: pointer; }
.nova-etiqueta { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.nova-etiqueta input[type="text"] { flex: 1; }
.nova-anotacao { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.nova-anotacao textarea { flex: 1; }
.anotacao { padding: 8px 10px; border-left: 3px solid var(--hope); background: var(--sec-hover); border-radius: 6px; margin-bottom: 8px; white-space: pre-wrap; }
.link-excluir { background: none; border: 0; color: var(--vermelho); cursor: pointer; font-size: 12px; text-decoration: underline; }

.bpo-perf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 12px; align-items: start; }
@media (max-width: 1000px) { .bpo-perf-grid { grid-template-columns: 1fr; } }
.bpo-perf-lateral { position: sticky; top: 8px; }
.abas-bpo { align-items: center; }
.seletor-empresas { margin-left: auto; position: relative; }
.painel-empresas { position: absolute; right: 0; top: 100%; z-index: 50; width: min(380px, 92vw); background: var(--card, #fff); border: 1px solid var(--sec-borda); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.2); padding: 10px; }
.painel-empresas input[type="search"] { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.painel-empresas-lista { max-height: 280px; overflow: auto; }
.painel-empresas-lista label { display: block; padding: 3px 2px; font-size: 13px; cursor: pointer; }
.painel-empresas-acoes { font-size: 12px; margin-bottom: 4px; }
#bpo-home-graficos svg { max-height: 280px; width: 100%; }

/* ===== Tabelas sempre cabem na tela (sem barra de rolagem horizontal) ===== */
.tabela-scroll { overflow-x: visible; }
.tabela-scroll .tabela { width: 100%; table-layout: auto; font-size: 12.5px; }
.tabela-scroll .tabela th, .tabela-scroll .tabela td { white-space: normal; overflow-wrap: anywhere; word-break: normal; padding: 7px 8px; vertical-align: middle; }
.tabela-scroll .tabela th { font-size: 11px; letter-spacing: 0; }
.tabela-scroll .tabela button { padding: 4px 9px; font-size: 12px; }
.tabela-scroll .tabela .badge { white-space: nowrap; font-size: 11px; padding: 2px 8px; }
.tabela-scroll .tabela small { overflow-wrap: anywhere; }
.tabela-scroll .tabela td.acoes-linha { white-space: nowrap; }
.tabela-scroll .tabela td input[type="text"], .tabela-scroll .tabela td input[type="number"], .tabela-scroll .tabela td select { max-width: 100%; box-sizing: border-box; min-width: 0; }
.rolagem-topo { display: none !important; }
/* o miolo nunca estoura a janela */
.conteudo-dp, .conteudo-dp > section { max-width: 100%; min-width: 0; }
.cabecalho-pagina.secao-cabecalho { flex-wrap: wrap; gap: 8px; }
.cabecalho-acoes { flex-wrap: wrap; }

/* seletor de empresas do BPO: caixinha ao lado do nome, sem rolagem lateral */
.painel-empresas-lista { overflow-x: hidden; }
.painel-empresas-lista label { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 8px; padding: 5px 4px; margin: 0; width: auto; cursor: pointer; border-radius: 6px; }
.painel-empresas-lista label:hover { background: var(--sec-hover); }
.painel-empresas-lista input[type="checkbox"] { width: 16px !important; height: 16px; min-width: 16px; margin: 2px 0 0; padding: 0; flex: none; }
.painel-empresas-lista label span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.painel-empresas input[type="search"] { width: 100%; box-sizing: border-box; }

/* ======================================================================
   Estilo de texto e layout inspirado na Qive (fonte Inter, tamanhos, cartões de 12px,
   menu lateral em painel cinza, títulos grandes) — com as CORES DA HOPE.
   ====================================================================== */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --txt: rgba(4, 14, 35, 0.64);
  --txt-forte: rgba(4, 14, 35, 0.86);
  --txt-fraco: rgba(4, 14, 35, 0.42);
  --linha: rgba(112, 116, 125, 0.2);
  --painel: #f5f5f6;
  --texto: rgba(4, 14, 35, 0.86);
  --muted: rgba(4, 14, 35, 0.5);
  --sec-texto: rgba(4, 14, 35, 0.64);
  --sec-muted: rgba(4, 14, 35, 0.5);
  --sec-ativo-texto: rgba(4, 14, 35, 0.86);
  --sec-borda: rgba(112, 116, 125, 0.2);
  --sec-borda-forte: rgba(112, 116, 125, 0.32);
  --sec-bg-pagina: #ffffff;
  --sec-hover: rgba(4, 14, 35, 0.04);
  --borda: rgba(112, 116, 125, 0.2);
  --hope-suave: rgba(47, 224, 196, 0.16);
  --hope-texto: #0a6b5c;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; color: var(--txt); background: #fff; -webkit-font-smoothing: antialiased; }
input, select, textarea, button { font-family: inherit; }
h1, h2, h3, h4, b, strong, th { color: var(--txt-forte); }
h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--txt-fraco); font-size: 13px; }

/* --- cabeçalho (48px) --- */
.barra-superior-dp { height: 48px; padding: 0 16px; box-shadow: none; border-bottom: 1px solid var(--linha); }
.barra-superior-marca { gap: 10px; }
.barra-superior-marca img { width: 26px; height: 26px; }
.barra-superior-nome { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; color: var(--txt-forte); }
.barra-superior-nome-rh { font-size: 12px; font-weight: 600; color: var(--hope-texto); background: var(--hope-suave); padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.barra-superior-usuario-texto { font-size: 12px; font-weight: 500; color: var(--txt); }
.badge-perfil { font-size: 11px; font-weight: 600; }
.app-dp { min-height: calc(100vh - 48px); background: #fff; }

/* --- menu lateral: painel flutuante cinza, itens de 32px --- */
.sidebar-dp { width: 244px; padding: 8px; background: #fff; border-right: 0; min-height: calc(100vh - 48px); top: 48px; }
.sidebar-dp.colapsada { width: 64px; }
.sidebar-dp-nav { background: var(--painel); border: 1px solid rgba(4, 14, 35, 0.08); border-radius: 8px; padding: 6px 8px 10px; gap: 2px; overflow: visible; }
.sidebar-dp-rodape { border: 1px solid rgba(4, 14, 35, 0.08); border-radius: 8px; background: var(--painel); margin-top: auto; padding-top: 0; }
.sidebar-dp-rodape button { padding: 8px 14px; border-bottom: 0; font-size: 14px; font-weight: 500; color: var(--txt); background: transparent; }
.sidebar-dp-nav > button, .sidebar-dp-grupo-cabecalho { padding: 6px 8px; min-height: 32px; border: 1px solid transparent; border-radius: 8px; gap: 10px; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--txt); background: transparent; }
.sidebar-dp-nav > button:hover, .sidebar-dp-grupo-cabecalho:hover { background: rgba(4, 14, 35, 0.05); }
.sidebar-dp-nav > button.ativa, .sidebar-dp-grupo-cabecalho.ativa { background: var(--hope-suave); color: var(--hope-texto); font-weight: 600; }
.sidebar-dp-icone { width: 18px; }
.sidebar-dp-grupo { gap: 2px; }
.sidebar-dp-grupo button { padding: 6px 8px 6px 34px; min-height: 32px; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 500; color: var(--txt); }
.sidebar-dp-grupo button:hover { background: rgba(4, 14, 35, 0.05); }
.sidebar-dp-grupo button.ativa { background: var(--hope-suave); color: var(--hope-texto); font-weight: 600; }
.sidebar-dp-secao { font-size: 12px; font-weight: 700; color: var(--txt-fraco); padding: 12px 8px 4px; line-height: 14px; }
.sidebar-dp-secao:first-child { padding-top: 6px; }
.sidebar-dp.colapsada .sidebar-dp-secao { display: none; }

/* --- título da página: grande, sem caixa alta --- */
.conteudo-dp { padding: 20px 28px 40px; }
.cabecalho-pagina { text-transform: none; font-size: 24px; line-height: 28px; font-weight: 700; letter-spacing: -0.6px; color: var(--txt-forte); border-bottom: 0; padding: 0; margin: 0 0 16px; gap: 10px; }
.cabecalho-pagina-icone svg { width: 20px; height: 20px; }
.secao-cabecalho { margin-bottom: 16px; }

/* --- cartões: 12px, borda fina, sem sombra --- */
.card, .card-resumo, .cartao-tabela, .s27-card, .mini-kpi { border-radius: 12px; border: 1px solid var(--linha); box-shadow: none; background: #fff; }
.card { padding: 16px; }
.card h3, .card-grafico h3 { font-size: 16px; font-weight: 700; color: var(--txt-forte); margin-bottom: 12px; }
.card-resumo { padding: 16px; }
.card-resumo-titulo { font-size: 13px; font-weight: 500; color: var(--txt); }
.card-resumo-numero { font-size: 30px; font-weight: 700; letter-spacing: -0.6px; color: var(--txt-forte); }
.card-resumo-percentual { font-weight: 500; color: var(--txt-fraco); }
.s27-card small { font-weight: 500; }
.s27-card b, .mini-kpi b { letter-spacing: -0.4px; color: var(--txt-forte); }
.cartao-tabela { border-radius: 12px; }

/* --- abas: faixa cinza arredondada --- */
.abas-paralegal { background: var(--painel); border: 1px solid rgba(4, 14, 35, 0.08); border-radius: 12px 12px 0 0; padding: 0 12px; margin: 12px 0 8px; gap: 2px; border-bottom: 1px solid var(--linha); }
.aba-paralegal { font-size: 14px; font-weight: 500; color: var(--txt); padding: 11px 12px; border-bottom-width: 2px; }
.aba-paralegal.ativa { color: var(--txt-forte); border-bottom-color: var(--hope-escuro); font-weight: 600; }

/* --- formulários e botões --- */
input, select, textarea { font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--linha); color: var(--txt-forte); background: #fff; }
input::placeholder, textarea::placeholder { color: var(--txt-fraco); }
input:focus, select:focus, textarea:focus { border-color: var(--hope-escuro); box-shadow: 0 0 0 3px rgba(47, 224, 196, 0.2); }
label { font-size: 13px; font-weight: 500; color: var(--txt); }
button { font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 8px; letter-spacing: 0; }
button.secundario, .btn-secundario { background: #fff; color: var(--txt-forte); border: 1px solid var(--linha); }
button.secundario:hover, .btn-secundario:hover { background: var(--sec-hover); color: var(--txt-forte); }

/* --- tabelas: cabeçalho discreto, linhas leves --- */
.tabela th { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--txt); background: var(--painel); border-bottom: 1px solid var(--linha); }
.tabela td { font-size: 13px; color: var(--txt); border-bottom: 1px solid rgba(112, 116, 125, 0.14); }
.tabela td b, .tabela td strong { color: var(--txt-forte); font-weight: 600; }
.tabela tbody tr:hover { background: rgba(4, 14, 35, 0.025); }
.tabela-scroll .tabela th { font-size: 12px; letter-spacing: 0; }
.badge { font-weight: 600; font-size: 11px; }

/* modais */
.modal-lista { border-radius: 12px; border: 1px solid var(--linha); }

/* celular: mantém o menu em gaveta */
@media (max-width: 860px) {
  .sidebar-dp { top: 0; width: 260px; min-height: 0; padding: 8px; }
  .sidebar-dp.colapsada { width: 260px; }
  .conteudo-dp { padding: 16px 16px 40px; }
  .cabecalho-pagina { font-size: 20px; }
}
.modal-lista-topo h3 { font-size: 18px; letter-spacing: -0.3px; }

/* datas, valores e cabeçalhos curtos não quebram no meio */
.tabela-scroll .tabela th { white-space: nowrap; }
.tabela-scroll .tabela td.nw { white-space: nowrap; }
.tabela-scroll .tabela td { overflow-wrap: break-word; }

/* sino de notificações */
.sino-wrap { position: relative; }
#btn-sino { position: relative; }
.sino-contador { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d93025; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.sino-painel { position: absolute; right: 0; top: 40px; width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--linha); border-radius: 12px; box-shadow: 0 12px 32px rgba(4, 14, 35, 0.16); z-index: 60; }
.sino-topo { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--linha); font-weight: 700; color: var(--txt-forte); }
.sino-topo button { font-size: 12px; padding: 4px 8px; }
.sino-item { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid rgba(112, 116, 125, 0.14); border-radius: 0; background: #fff; color: var(--txt); cursor: pointer; }
.sino-item:hover { background: rgba(4, 14, 35, 0.04); }
.sino-item b { display: block; font-size: 13px; color: var(--txt-forte); }
.sino-item small { color: var(--txt-fraco); }
.sino-item .ponto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #9aa0a6; }
.sino-item.alta .ponto { background: #d93025; } .sino-item.media .ponto { background: #f9ab00; }
.sino-item.lida { opacity: 0.55; } .sino-item.lida b { font-weight: 500; }
.sino-vazio { padding: 22px 14px; text-align: center; color: var(--txt-fraco); }

/* botões desativados têm que PARECER desativados */
button:disabled, button[disabled] { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }
.aviso-faltas { background: #fff7e6; border: 1px solid #f5d28a; border-radius: 10px; padding: 10px 14px; margin: 8px 0; font-size: 13px; color: #6b4a00; }
.aviso-faltas ul { margin: 6px 0 8px 18px; padding: 0; } .aviso-faltas li { margin: 2px 0; }

/* botões em formulários de coluna não esticam até a largura do cartão: ficam do tamanho do texto */
.form-validador > button, .certificado-form > button { align-self: flex-start; width: auto; padding: 7px 20px; }
