/*
 * Labforce Cloud — identidade visual do Control Plane local (BaseSalesforce_Labforce).
 * Referência: platform/control_plane/static (index.html, labforce_theme.css,
 * labforce_logo_surface.css, operations_hub_ui.css e labforce_brand.js).
 * Somente visual: APIs, permissões, rotas e contratos do portal permanecem intactos.
 */

:root {
  --lf-bg-950: #020c24;
  --lf-bg-900: #02081b;
  --lf-bg-850: #071027;
  --lf-bg-800: #102c55;
  --lf-sidebar-bg: #010b23;
  --lf-primary-600: #006af9;
  --lf-primary-500: #02a0fa;
  --lf-accent-500: #15c3fd;
  --lf-accent-300: #60d3fc;
  --lf-text-100: #f8f7f7;
  --lf-text-200: #dcdce0;
  --lf-muted: rgba(220, 220, 224, .68);
  --lf-line: rgba(2, 160, 250, .22);
  --lf-line-soft: rgba(2, 160, 250, .14);
  --lf-gradient-brand: linear-gradient(135deg, #006af9 0%, #02a0fa 56%, #15c3fd 100%);
  --lf-gradient-panel: linear-gradient(180deg, rgba(16, 44, 85, .38) 0%, rgba(1, 11, 35, .96) 100%);
  --lf-gradient-panel-soft: linear-gradient(180deg, rgba(16, 44, 85, .28) 0%, rgba(7, 16, 39, .92) 100%);
  --lf-glow-soft: 0 0 20px rgba(2, 160, 250, .16);
  --lf-panel-shadow: inset 0 1px 0 rgba(96, 211, 252, .055), 0 22px 66px rgba(1, 11, 35, .34);
  --lf-radius: 18px;

  /* Tokens legados do portal apontando para a mesma paleta. */
  --fundo: #020c24;
  --painel: #071027;
  --texto: #f8f7f7;
  --muted: rgba(220, 220, 224, .68);
  --borda: rgba(2, 160, 250, .22);
  --borda-forte: rgba(21, 195, 253, .48);
  --azul: #02a0fa;
  --ciano: #15c3fd;
  --gradiente: var(--lf-gradient-brand);
  --raio: 18px;
}

/* ---------- Base ---------- */
html {
  color-scheme: dark;
  background: #020c24 !important;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--lf-text-100) !important;
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background:
    radial-gradient(circle at 18% -4%, rgba(2, 160, 250, .13) 0, rgba(2, 160, 250, 0) 31%),
    radial-gradient(circle at 86% 0, rgba(21, 195, 253, .07) 0, rgba(21, 195, 253, 0) 27%),
    linear-gradient(145deg, #020c24 0%, #020c24 58%, #06142d 100%) !important;
  background-color: #020c24 !important;
}

body::before {
  content: "";
  display: block !important;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(96, 211, 252, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 211, 252, .018) 1px, transparent 1px) !important;
  background-size: 42px 42px !important;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .48), transparent 72%);
  opacity: 1 !important;
}

button, input, textarea, select { font: inherit; }

::selection { background: rgba(2, 160, 250, .34); color: var(--lf-text-100); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(1, 11, 35, .78); }
::-webkit-scrollbar-thumb { background: rgba(2, 160, 250, .30); border: 2px solid rgba(1, 11, 35, .95); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(21, 195, 253, .48); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.nav-item:focus-visible,
.botao:focus-visible,
.link-botao:focus-visible {
  outline: 2px solid var(--lf-accent-300) !important;
  outline-offset: 3px;
}

/* ---------- Shell ---------- */
.shell {
  display: grid !important;
  grid-template-columns: 292px minmax(0, 1fr) !important;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: transparent !important;
}

.shell.oculto { display: none !important; }

.barra-lateral {
  position: sticky !important;
  top: 0;
  height: 100vh;
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  overflow: hidden;
  padding: 21px 16px !important;
  border: 0 !important;
  border-right: 1px solid rgba(2, 160, 250, .19) !important;
  background: #010b23 !important;
  background-image: none !important;
  box-shadow: 14px 0 44px rgba(0, 0, 0, .18) !important;
  z-index: 4;
}

.barra-lateral::after { display: none !important; }

.barra-lateral .marca-sidebar {
  position: relative;
  display: block !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 2px 4px 24px !important;
  border: 0 !important;
}

.barra-lateral .marca-sidebar::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(2, 160, 250, .52), rgba(21, 195, 253, 0));
}

.barra-lateral .logo-labforce {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

/* ---------- Navegação ---------- */
.navegacao {
  display: block !important;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 3px 12px !important;
  scrollbar-width: thin;
}

.nav-grupo-base {
  margin: 15px 0 3px !important;
  padding: 0 11px 5px;
  color: #6f8cac !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1.5;
  letter-spacing: .1em !important;
  text-transform: uppercase;
}

.navegacao > .nav-grupo-base:first-child { margin-top: 0 !important; }

.navegacao .nav-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100%;
  min-height: 39px !important;
  margin: 0 0 3px !important;
  padding: 11px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(220, 220, 224, .66) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5;
  text-align: left !important;
  cursor: pointer;
  transition: .18s;
}

.navegacao .nav-item > span:last-child {
  display: inline !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: inherit !important;
}

.navegacao .nav-item:hover {
  color: var(--lf-text-100) !important;
  background: rgba(16, 44, 85, .32) !important;
  border-color: rgba(2, 160, 250, .18) !important;
}

.navegacao .nav-item.ativo {
  color: var(--lf-text-100) !important;
  background: linear-gradient(90deg, rgba(0, 106, 249, .22) 0%, rgba(2, 160, 250, .13) 68%, rgba(21, 195, 253, .05) 100%) !important;
  border-color: rgba(21, 195, 253, .42) !important;
  box-shadow: inset 3px 0 0 var(--lf-accent-500), 0 0 24px rgba(2, 160, 250, .09) !important;
}

/* Ícones em glifo, iguais aos do Control Plane local. */
.navegacao .nav-item .icone {
  display: block !important;
  flex: 0 0 19px;
  width: 19px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 0 !important;
  line-height: 0;
  text-align: center;
}

.navegacao .nav-item .icone > * { display: none !important; }

.navegacao .nav-item .icone::before {
  content: "◇";
  display: block;
  font-size: 16px;
  line-height: 24px;
}

.navegacao .nav-item.ativo .icone,
.navegacao .nav-item:hover .icone { color: var(--lf-accent-300) !important; }

.navegacao .nav-item[data-rota="visao-geral"] .icone::before { content: "⌂"; }
.navegacao .nav-item[data-rota="organizacoes"] .icone::before { content: "◎"; }
.navegacao .nav-item[data-rota="projetos"] .icone::before { content: "◇"; }
.navegacao .nav-item[data-rota="conhecimento"] .icone::before { content: "⌁"; }
.navegacao .nav-item[data-rota="relatorios"] .icone::before { content: "◷"; }
.navegacao .nav-item[data-rota="base-local"] .icone::before { content: "◫"; }
.navegacao .nav-item[data-rota="equipe"] .icone::before { content: "◉"; }
.navegacao .nav-item[data-rota="contas-claude"] .icone::before { content: "⇄"; }

/* ---------- Cartão lateral (status + conta) ---------- */
.sidebar-rodape {
  position: static !important;
  display: block !important;
  flex: 0 0 auto;
  margin: 4px 0 0 !important;
  padding: 13px !important;
  border: 1px solid rgba(2, 160, 250, .20) !important;
  border-radius: 14px !important;
  background: rgba(6, 20, 45, .94) !important;
  box-shadow: inset 0 1px 0 rgba(96, 211, 252, .05), var(--lf-glow-soft) !important;
}

.sidebar-rodape .status-seguranca {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--lf-text-100) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 21px;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.sidebar-rodape .status-seguranca span {
  flex: 0 0 8px;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50%;
  background: var(--lf-accent-500) !important;
  box-shadow: 0 0 14px rgba(21, 195, 253, .78) !important;
}

.sidebar-rodape .usuario {
  display: block !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  text-align: left !important;
}

.sidebar-rodape .usuario > div { display: block !important; text-align: left !important; }

.sidebar-rodape .usuario strong,
.sidebar-rodape .usuario small {
  display: block;
  overflow: hidden;
  color: var(--lf-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-rodape .usuario .avatar { display: none !important; }

.sidebar-rodape #botao-sair {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  width: auto !important;
  min-height: 0 !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--lf-accent-300) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45;
  cursor: pointer;
}

.sidebar-rodape #botao-sair::after { display: none !important; }
.sidebar-rodape #botao-sair .lf-icon { width: 13px; height: 13px; }
.sidebar-rodape #botao-sair:hover { color: var(--lf-text-100) !important; text-decoration: underline; }

/* ---------- Conteúdo ---------- */
.conteudo {
  position: relative;
  width: 100%;
  max-width: 1760px;
  min-width: 0;
  margin: 0 auto;
  padding: 25px 30px 60px !important;
  overflow: hidden;
}

/* Barra de título: título da rota + subtítulo e ações da página, como no topbar local. */
.topo {
  position: relative;
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 0 !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  backdrop-filter: none !important;
}

.topo .breadcrumb { display: none !important; }

.topo h2,
#titulo-pagina {
  margin: 0 !important;
  color: var(--lf-text-100) !important;
  font-size: 25px !important;
  font-weight: 700 !important;
  line-height: 37.5px !important;
  letter-spacing: -.35px !important;
}

.topo > .usuario { display: none !important; }

.pagina { padding: 0 !important; animation: none !important; }

.cabecalho-pagina,
.cabecalho-pagina.linha {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 16px;
  min-height: 61.5px;
  margin: -40.5px 0 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  pointer-events: none;
}

.cabecalho-pagina > * { pointer-events: auto; }
.cabecalho-pagina > div:first-child { padding-top: 40.5px; min-width: 0; pointer-events: none; }

.cabecalho-pagina .rotulo,
.cabecalho-pagina h3 { display: none !important; }

.cabecalho-pagina p {
  margin: 0 !important;
  color: var(--lf-muted) !important;
  font-size: 14px !important;
  line-height: 21px !important;
}

.cabecalho-pagina > .botao,
.cabecalho-pagina > button,
.cabecalho-pagina > div:not(:first-child) { flex: 0 0 auto; }

.cabecalho-pagina > div:not(:first-child) { display: flex; gap: 8px; }

.alerta {
  margin: 0 0 16px !important;
  padding: 11px 13px !important;
  border: 1px dashed rgba(96, 211, 252, .46) !important;
  border-radius: 12px !important;
  background: rgba(7, 16, 39, .96) !important;
  color: var(--lf-text-100) !important;
  box-shadow: var(--lf-glow-soft) !important;
}

.alerta.oculto { display: none !important; }

/* Rótulos auxiliares seguem o section-label local. */
.rotulo,
.lf-kicker {
  display: block;
  margin: 0 0 7px;
  color: rgba(220, 220, 224, .68) !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: .09em !important;
  text-transform: uppercase;
}

.lf-kicker::before { display: none !important; }

/* ---------- Métricas (stats) ---------- */
.metricas,
.equipe-resumo,
.conhecimento-resumo {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 12px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

.metricas .metrica,
.equipe-resumo article,
.conhecimento-resumo article {
  position: relative;
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
  padding: 15px 17px !important;
  border: 1px solid var(--lf-line) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: var(--lf-panel-shadow) !important;
  backdrop-filter: blur(16px);
}

.metricas .metrica::before,
.equipe-resumo article::before,
.conhecimento-resumo article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 76px !important;
  height: 2px !important;
  opacity: 1 !important;
  background: var(--lf-gradient-brand) !important;
  box-shadow: 0 0 16px rgba(21, 195, 253, .42);
}

.metricas .metrica:hover,
.equipe-resumo article:hover,
.conhecimento-resumo article:hover { border-color: rgba(21, 195, 253, .32) !important; }

.metricas .metrica strong,
.equipe-resumo strong,
.conhecimento-resumo strong {
  order: -1;
  margin: 0 !important;
  color: var(--lf-text-100) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
  font-size: 27px !important;
  font-weight: 780 !important;
  line-height: 40.5px !important;
  letter-spacing: -.6px !important;
  text-shadow: 0 0 18px rgba(2, 160, 250, .08);
}

.metricas .metrica > span,
.equipe-resumo span,
.conhecimento-resumo span {
  margin: 2px 0 0 !important;
  color: rgba(220, 220, 224, .68) !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 16.5px;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.metricas .metrica small,
.conhecimento-resumo small { display: none !important; }

/* ---------- Painéis ---------- */
.cartao,
.claude-painel,
.equipe-painel,
.conhecimento-painel,
.detalhe-bloco,
.lf-surface {
  min-height: 0 !important;
  overflow: hidden;
  padding: 0 0 12px !important;
  border: 1px solid var(--lf-line) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: var(--lf-panel-shadow) !important;
  backdrop-filter: blur(16px);
}

.cartao:hover,
.claude-painel:hover,
.equipe-painel:hover,
.conhecimento-painel:hover { border-color: rgba(21, 195, 253, .32) !important; }

.cartao > :not(.cartao-topo),
.claude-painel > :not(.claude-painel-topo),
.equipe-painel > :not(.equipe-painel-topo),
.conhecimento-painel > :not(.conhecimento-painel-topo) { margin-left: 12px !important; margin-right: 12px !important; }

.cartao-topo,
.claude-painel-topo,
.equipe-painel-topo,
.conhecimento-painel-topo {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 12px;
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 14px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(2, 160, 250, .18) !important;
  background: none !important;
}

.cartao-topo .rotulo,
.equipe-painel-topo .rotulo,
.conhecimento-painel-topo .rotulo,
.claude-painel-topo .rotulo { display: none !important; }

.cartao-topo h4,
.cartao h4,
.claude-painel-topo h4,
.equipe-painel-topo h4,
.conhecimento-painel-topo h4 {
  margin: 0 !important;
  color: var(--lf-text-100) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 21px !important;
  letter-spacing: 0 !important;
}

.claude-painel-topo p,
.conhecimento-painel-topo p,
.claude-contador {
  margin: 0 !important;
  color: rgba(220, 220, 224, .68) !important;
  font-size: 12px !important;
}

.grade-dashboard,
.claude-grade-principal,
.equipe-grade {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .86fr) !important;
  gap: 16px !important;
}

.detalhe-bloco { padding: 15px !important; }
.detalhe-bloco h4 { margin: 0 0 8px !important; }

/* Linhas de lista no padrão das linhas de card/tabela locais. */
.lista-compacta { display: grid; gap: 0 !important; }

.item-compacto,
.equipe-item,
.conhecimento-item,
.claude-conexao,
.claude-perfil {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lf-line-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px;
}

.item-compacto:last-child,
.equipe-item:last-child,
.conhecimento-item:last-child,
.claude-conexao:last-child,
.claude-perfil:last-child { border-bottom: 0 !important; }

.item-compacto:hover,
.conhecimento-item:hover,
.claude-conexao:hover,
.claude-perfil:hover { background: rgba(16, 44, 85, .30) !important; }

.item-compacto strong,
.equipe-item strong,
.conhecimento-item h4,
.claude-conexao-titulo strong,
.claude-perfil-titulo strong { color: var(--lf-text-100) !important; font-size: 13px !important; font-weight: 700; }

.item-compacto span,
.item-compacto small,
.equipe-item small,
.equipe-meta,
.conhecimento-item p,
.conhecimento-meta,
.claude-conexao-meta,
.claude-perfil-meta { color: rgba(220, 220, 224, .68) !important; font-size: 12px !important; }

/* ---------- Cards ---------- */
.grade-cards {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px !important;
}

.grade-cards .item-card,
.item-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: 0;
  padding: 15px !important;
  border: 1px solid var(--lf-line) !important;
  border-radius: 15px !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: var(--lf-panel-shadow) !important;
  backdrop-filter: blur(16px);
  transform: none !important;
}

.item-card::after { display: none !important; }
.item-card:hover { border-color: rgba(21, 195, 253, .32) !important; }

.item-card-topo {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 7px;
  width: 100%;
  margin: 0 0 4px;
}

.item-card-topo > div { min-width: 0; }

.item-card h4 {
  margin: 0 0 4px !important;
  color: var(--lf-text-100) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.item-card p {
  margin: 0 !important;
  padding: 7px 0;
  border-bottom: 1px solid var(--lf-line-soft);
  color: rgba(220, 220, 224, .68) !important;
  font-size: 11px !important;
}

.item-card p:last-of-type { border-bottom: 0; }
.item-card p,
.item-card > p:nth-of-type(1),
.item-card > p:nth-of-type(2) { width: auto !important; font-family: inherit !important; text-align: left !important; }
.item-card-topo .selo { margin-left: auto; }
.item-card-acoes { display: flex !important; width: 100%; justify-content: flex-start !important; }
.item-card p strong { color: var(--lf-text-100) !important; font-family: inherit !important; }
.item-card .item-card-topo + p { padding-top: 0; color: rgba(220, 220, 224, .68) !important; }
.item-card .item-card-acoes { justify-content: flex-start; margin-top: 12px !important; }

.item-card-acoes,
.acoes-tabela,
.conexao-acoes,
.claude-conexao-acoes,
.claude-perfil-acoes,
.claude-binding-acoes,
.equipe-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.acoes-tabela { margin-top: 0; justify-content: flex-end; }

/* ---------- Filtros e campos ---------- */
.barra-filtros,
.conhecimento-filtros {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  align-items: center;
  gap: 9px !important;
  margin: 0 0 12px !important;
  padding: 12px !important;
  border: 1px solid var(--lf-line) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: var(--lf-panel-shadow) !important;
}

.barra-filtros > *,
.conhecimento-filtros > * { min-width: 0; width: 100% !important; }

.barra-filtros .busca,
.conhecimento-filtros label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

.barra-filtros .busca > span:not(.sr-only),
.busca > span:not(.sr-only) { display: none !important; }

.conhecimento-filtros label > span,
.barra-filtros label:not(.busca):not(.toggle) > span:not(.sr-only) {
  display: block;
  margin-bottom: 5px;
  color: rgba(220, 220, 224, .68) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.barra-filtros label:not(.busca):not(.toggle) { display: block !important; margin: 0 !important; }
.barra-filtros > .botao { align-self: end; }

.toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: rgba(220, 220, 224, .68) !important;
  font-size: 12px !important;
}

.toggle input { accent-color: var(--lf-accent-500); }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea,
.busca input,
.lf-field :where(input, textarea, select) {
  width: 100%;
  min-height: 0;
  padding: 10px !important;
  border: 1px solid rgba(2, 160, 250, .26) !important;
  border-radius: 10px !important;
  outline: none;
  background: rgba(1, 11, 35, .80) !important;
  background-color: rgba(1, 11, 35, .80) !important;
  box-shadow: none;
  color: var(--lf-text-100) !important;
  font-size: 14px !important;
  line-height: 1.5;
}

select { padding-right: 28px !important; }

input::placeholder,
textarea::placeholder { color: rgba(220, 220, 224, .42) !important; }

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--lf-accent-500) !important;
  box-shadow: 0 0 0 3px rgba(21, 195, 253, .12), var(--lf-glow-soft) !important;
}

/* ---------- Botões ---------- */
.botao,
.lf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0 !important;
  padding: 9px 13px !important;
  border: 1px solid rgba(2, 160, 250, .25) !important;
  border-radius: 10px !important;
  background: rgba(16, 44, 85, .36) !important;
  box-shadow: inset 0 1px 0 rgba(96, 211, 252, .04) !important;
  color: var(--lf-text-100) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 21px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: .16s;
}

.botao:hover:not(:disabled),
.lf-button:hover:not(:disabled) {
  border-color: rgba(21, 195, 253, .52) !important;
  background: rgba(16, 44, 85, .54) !important;
  box-shadow: var(--lf-glow-soft) !important;
  filter: none !important;
  transform: translateY(-1px);
}

.botao.primario,
.lf-button.primary {
  border-color: transparent !important;
  background: var(--lf-gradient-brand) !important;
  box-shadow: inset 0 1px 0 rgba(248, 247, 247, .16), 0 10px 28px rgba(0, 106, 249, .22) !important;
  color: var(--lf-text-100) !important;
}

.botao.primario:hover:not(:disabled),
.lf-button.primary:hover:not(:disabled) {
  background: var(--lf-gradient-brand) !important;
  box-shadow: inset 0 1px 0 rgba(248, 247, 247, .20), 0 12px 34px rgba(21, 195, 253, .27) !important;
}

.botao.fantasma {
  background: rgba(1, 11, 35, .58) !important;
  border-color: rgba(2, 160, 250, .28) !important;
}

.botao.perigo,
.lf-button.danger {
  background: rgba(1, 11, 35, .58) !important;
  border: 1px dashed rgba(96, 211, 252, .46) !important;
  color: var(--lf-text-100) !important;
}

.botao.mini,
.lf-button.compact,
.item-card-acoes .botao,
.acoes-tabela .botao,
.conexao-acoes .botao {
  padding: 7px 10px !important;
  font-size: 11px !important;
  line-height: 16.5px !important;
}

.botao.icone-apenas {
  width: 33px;
  height: 33px;
  padding: 0 !important;
}

.botao .lf-icon,
.lf-button .lf-icon { width: 15px; height: 15px; }

.botao:disabled,
.lf-button:disabled {
  color: rgba(220, 220, 224, .44) !important;
  opacity: .58 !important;
  cursor: not-allowed;
  transform: none !important;
}

.botao.grande { padding: 11px 16px !important; }
.largura-total { width: 100%; }

.link-botao {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--lf-accent-300) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  cursor: pointer;
}

.link-botao:hover { color: var(--lf-text-100) !important; text-decoration: underline; }

/* ---------- Status / badges ---------- */
.selo,
.lf-badge,
.equipe-chip,
.claude-status,
.claude-contador {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px !important;
  border: 1px solid rgba(2, 160, 250, .34) !important;
  border-radius: 999px !important;
  background: rgba(16, 44, 85, .34) !important;
  color: rgba(248, 247, 247, .88) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1.5;
  letter-spacing: .65px !important;
  text-transform: uppercase;
}

.lf-badge::before,
.claude-status::before { display: none !important; }

.selo.ativo,
.selo.active,
.selo.connected,
.selo.completed,
.selo.running,
.lf-badge.success,
.claude-status.ready {
  color: var(--lf-accent-300) !important;
  background: rgba(21, 195, 253, .09) !important;
  border-color: rgba(21, 195, 253, .42) !important;
  box-shadow: 0 0 16px rgba(21, 195, 253, .05);
}

.selo.pending,
.selo.partial,
.selo.not_started,
.selo.unconfigured,
.lf-badge.info,
.claude-status.pending,
.claude-status.pending_trust {
  color: var(--lf-text-100) !important;
  background: rgba(0, 106, 249, .14) !important;
  border-color: rgba(0, 106, 249, .40) !important;
}

.selo.arquivado,
.selo.archived,
.selo.unknown,
.lf-badge.warning,
.claude-status.disabled {
  color: var(--lf-text-200) !important;
  background: rgba(96, 211, 252, .08) !important;
  border-color: rgba(96, 211, 252, .32) !important;
}

.selo.failed,
.selo.invalid,
.selo.revoked,
.lf-badge.danger,
.claude-status.verification_failed,
.claude-status.reauth_required {
  color: var(--lf-text-100) !important;
  background: rgba(0, 106, 249, .08) !important;
  border: 1px dashed rgba(96, 211, 252, .46) !important;
}

/* ---------- Tabelas ---------- */
.tabela-responsiva,
.lf-table-wrap {
  overflow: auto;
  border: 1px solid var(--lf-line) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: var(--lf-panel-shadow) !important;
}

.cartao .tabela-responsiva { border-radius: 12px !important; box-shadow: none !important; }

.tabela,
.lf-table { width: 100%; border-collapse: collapse; }
.tabela thead { background: transparent !important; }

.tabela th,
.lf-table th {
  padding: 10px 11px !important;
  border-bottom: 1px solid var(--lf-line-soft) !important;
  background: transparent !important;
  color: rgba(220, 220, 224, .68) !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .09em !important;
  text-align: left;
  text-transform: uppercase;
}

.tabela td,
.lf-table td {
  padding: 10px 11px !important;
  border-bottom: 1px solid var(--lf-line-soft) !important;
  color: var(--lf-text-100);
  font-size: 11px !important;
  vertical-align: top;
}

.tabela tbody tr,
.lf-table tbody tr { background: transparent !important; cursor: default; }

.tabela tbody tr:hover,
.lf-table tbody tr:hover { background: rgba(16, 44, 85, .30) !important; }

.tabela tr:last-child td { border-bottom: 0 !important; }
.tabela td strong { color: var(--lf-text-100) !important; font-size: 12px; }
.tabela td small { color: rgba(220, 220, 224, .68) !important; font-size: 11px; }

/* ---------- Estados vazios ---------- */
.vazio,
.lf-empty,
.equipe-vazio,
.conhecimento-vazio,
.claude-vazio {
  display: grid !important;
  place-items: center;
  align-content: center;
  min-height: 140px;
  padding: 30px !important;
  border: 0 !important;
  background: none !important;
  color: rgba(220, 220, 224, .68) !important;
  text-align: center;
}

.vazio strong,
.lf-empty strong,
.equipe-vazio strong,
.conhecimento-vazio strong,
.claude-vazio strong { color: var(--lf-text-100) !important; font-size: 14px; }

.vazio p,
.lf-empty p { margin: 4px 0 0 !important; color: rgba(220, 220, 224, .68) !important; font-size: 12px; }

/* ---------- Modais ---------- */
.modal {
  width: min(760px, calc(100% - 40px));
  max-height: 92vh;
  overflow: auto;
  padding: 19px !important;
  border: 1px solid rgba(21, 195, 253, .40) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: #0a1829 !important;
  color: var(--lf-text-100) !important;
  box-shadow: 0 40px 120px rgba(1, 11, 35, .72), 0 0 42px rgba(2, 160, 250, .10) !important;
}

.modal.modal-grande { width: min(1080px, calc(100% - 40px)); }

.modal::backdrop {
  background: rgba(1, 11, 35, .84) !important;
  backdrop-filter: blur(14px);
}

.modal > form,
.modal > div { padding: 0 !important; }

.modal-topo {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
}

.modal-topo .rotulo { display: none !important; }

.modal h3,
.modal-topo h3 {
  margin: 0 !important;
  color: var(--lf-text-100) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.modal p { color: rgba(220, 220, 224, .68); }

.fechar {
  min-height: 0;
  padding: 9px 13px !important;
  border: 1px solid rgba(2, 160, 250, .28) !important;
  border-radius: 10px !important;
  background: rgba(1, 11, 35, .58) !important;
  color: var(--lf-text-100) !important;
  cursor: pointer;
}

.campos {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px !important;
}

.campos label { display: grid !important; align-content: start; gap: 5px !important; }
.campos input:not([type="checkbox"]):not([type="radio"]),
.campos select { height: auto !important; min-height: 41px !important; }
.campos label > span {
  color: rgba(220, 220, 224, .68) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.campos label small { color: rgba(220, 220, 224, .55) !important; font-size: 10px; }
.campos textarea { min-height: 120px; resize: vertical; }
.campo-largo { grid-column: 1 / -1; }

.escolha-plataforma {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  padding: 11px !important;
  border: 1px solid rgba(2, 160, 250, .20) !important;
  border-radius: 12px !important;
  background: rgba(1, 11, 35, .72) !important;
}

.escolha-plataforma span strong { color: var(--lf-text-100); font-size: 13px; }
.escolha-plataforma span small { display: block; }

.modal-acoes {
  display: flex !important;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 15px !important;
  padding: 0 !important;
  border: 0 !important;
}

.detalhe-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.detalhe-lista > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0 !important;
  border-bottom: 1px solid var(--lf-line-soft) !important;
  font-size: 11px;
}
.detalhe-lista > div:last-child { border-bottom: 0 !important; }
.detalhe-lista span { color: rgba(220, 220, 224, .68) !important; }
.detalhe-lista strong { color: var(--lf-text-100) !important; overflow-wrap: anywhere; }

/* ---------- Toast ---------- */
.toast {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  left: auto !important;
  z-index: 40;
  max-width: 420px;
  padding: 11px 13px !important;
  border: 1px solid rgba(2, 160, 250, .42) !important;
  border-radius: 12px !important;
  background: rgba(7, 16, 39, .96) !important;
  color: var(--lf-text-100) !important;
  box-shadow: 0 22px 70px rgba(1, 11, 35, .58), var(--lf-glow-soft) !important;
  transform: none !important;
}

.toast.oculto { display: none !important; }

/* ---------- Carregamento e login (exclusivos do Cloud) ---------- */
.tela-carregamento { background: transparent !important; color: var(--lf-muted); }
.tela-carregamento .logo-labforce { width: 244px; max-width: 80vw; height: auto; }
.spinner { border-color: rgba(2, 160, 250, .22) !important; border-top-color: var(--lf-accent-500) !important; }

.login {
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center;
  min-height: 100vh;
  padding: 30px !important;
  background: transparent !important;
}

.login.oculto { display: none !important; }

.login-painel {
  display: block !important;
  width: min(510px, 100%);
  min-height: 0 !important;
  padding: 34px 38px !important;
  border: 1px solid rgba(21, 195, 253, .40) !important;
  border-radius: var(--lf-radius) !important;
  background: var(--lf-gradient-panel) !important;
  background-color: rgba(6, 20, 45, .92) !important;
  box-shadow: 0 40px 120px rgba(1, 11, 35, .72), 0 0 42px rgba(2, 160, 250, .10) !important;
}

.login .marca { display: flex; justify-content: center; margin-bottom: 28px; }
.login .logo-labforce { width: 360px; max-width: 100%; height: auto; }
.login-visual { display: none !important; }
.auth-shell { width: 100%; max-width: none; }
.login .rotulo { margin-bottom: 10px; }
.login h1 { margin: 0 0 12px !important; color: var(--lf-text-100) !important; font-size: 30px !important; line-height: 1.15 !important; letter-spacing: -.6px !important; }
.login h1::after { display: none !important; }
.login p { color: var(--lf-muted) !important; font-size: 13px !important; }
.login .botao.grande { margin-top: 10px; min-height: 46px !important; width: 100%; }
.auth-cabecalho h2 { margin: 0; color: var(--lf-text-100); font-size: 17px; }
.auth-rodape { display: flex; justify-content: space-between; margin-top: 24px; color: rgba(220, 220, 224, .5); font-size: 9px; letter-spacing: .09em; }
.nota-seguranca { color: var(--lf-muted) !important; font-size: 12px !important; }

/* ---------- Menu móvel ---------- */
.botao-menu-base,
.fundo-menu-base { display: none !important; }

@media (max-width: 1050px) {
  .shell { display: block !important; min-height: 100vh; }

  .barra-lateral {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(300px, 86vw) !important;
    height: 100dvh !important;
    padding: 18px 14px !important;
    border: 0 !important;
    border-right: 1px solid #294d73 !important;
    background: #050e1d !important;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 105 !important;
  }

  .menu-labforce-aberto .barra-lateral { transform: translateX(0); }
  .barra-lateral .marca-sidebar { padding: 0 8px 18px !important; }
  .barra-lateral .logo-labforce { width: 245px !important; max-height: 62px; }

  .botao-menu-base {
    display: inline-flex !important;
    position: fixed !important;
    left: 14px;
    top: 14px;
    z-index: 95;
    background: #0b1b2d !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .35) !important;
  }

  .menu-labforce-aberto .fundo-menu-base {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 4, 12, .7);
    backdrop-filter: blur(2px);
  }

  .conteudo { width: 100% !important; max-width: 100% !important; padding: 74px 18px 40px !important; }
  .grade-dashboard,
  .claude-grade-principal,
  .equipe-grade { grid-template-columns: 1fr !important; }
}

@media (max-width: 680px) {
  .conteudo { padding: 70px 12px 30px !important; }
  .topo h2, #titulo-pagina { font-size: 22px !important; line-height: 33px !important; }

  .cabecalho-pagina,
  .cabecalho-pagina.linha {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    margin: 0 0 20px !important;
    pointer-events: auto;
  }

  .cabecalho-pagina > div:first-child { padding-top: 0; }
  .cabecalho-pagina > .botao,
  .cabecalho-pagina > button { width: 100%; }

  .metricas,
  .equipe-resumo,
  .conhecimento-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }

  .metricas .metrica,
  .equipe-resumo article,
  .conhecimento-resumo article { padding: 12px !important; }

  .metricas .metrica strong,
  .equipe-resumo strong,
  .conhecimento-resumo strong { font-size: 22px !important; line-height: 33px !important; }

  .barra-filtros,
  .conhecimento-filtros { grid-template-columns: 1fr !important; }

  .grade-cards { grid-template-columns: minmax(0, 1fr) !important; }
  .campos, .detalhe-grade { grid-template-columns: 1fr !important; }
  .campo-largo { grid-column: auto; }
  .item-card p, .detalhe-lista > div { flex-direction: column; gap: 2px; }
  .cartao, .item-card, .metrica, .modal, .barra-filtros { border-radius: 15px !important; }
  .login { padding: 16px !important; }
  .login-painel { padding: 28px 22px !important; }
}

@media (max-width: 420px) {
  .metricas,
  .equipe-resumo,
  .conhecimento-resumo { grid-template-columns: 1fr 1fr !important; }
}

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