/* NexusTrack — "ERP limpo + fácil de achar".
 * Base AdminLTE 4 (Bootstrap 5, MIT) + estrutura no modelo da Plataforma FGR e do ERP do dono
 * (barra superior em degradê, menu grafite com relevo, blocos com barra de título, tabelas compactas).
 * Somente modo claro. Destaque Azul Meta. Sem estilos inline (a CSP bloqueia). */

@font-face {
  font-family: "Roboto Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../vendor/roboto/roboto-latin-wght-normal.woff2) format("woff2-variations");
}

:root, [data-bs-theme=light] {
  --nx-destaque: #1877F2;
  --nx-destaque-escuro: #0f5ccc;
  --nx-destaque-suave: #e8f1fe;
  --nx-barra-topo: #3b8ef5;
  --nx-barra-base: #1563d6;
  --nx-barra-borda: #0d4ea8;
  --nx-texto: #3a3a3a;
  --nx-texto-suave: #6b6b6b;
  --nx-borda: #cdcdcd;
  --nx-recolhido: 4.6rem;
  /* Tons de dados (para nada ficar todo azul) */
  --tom-verde: #12937f;  --tom-verde-suave: #e3f4f1;
  --tom-ambar: #d98e04;  --tom-ambar-suave: #fcf1dc;
  --tom-coral: #e4572e;  --tom-coral-suave: #fce8e2;
  --tom-violeta: #7a5af8; --tom-violeta-suave: #efebfe;
  --tom-cinza: #8a8a8a;  --tom-cinza-suave: #f0f0f0;
  --bs-font-sans-serif: "Roboto Variable", Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: .875rem;
  --bs-body-color: #4a4a4a;
  --bs-link-color: var(--nx-destaque);
  --bs-link-color-rgb: 24, 119, 242;
  --bs-primary: #1877F2;
  --bs-primary-rgb: 24, 119, 242;
}

body { font-family: var(--bs-body-font-family); background: #eef0f3; }
.num, table, .erp-indicador-valor { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.boot { display: grid; place-items: center; min-height: 100vh; color: #888; }
.nx-ico { line-height: 1; }

/* ============================================================ barra superior */
.nx-navbar {
  background: linear-gradient(var(--nx-barra-topo), var(--nx-barra-base));
  border-bottom: 1px solid var(--nx-barra-borda);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  min-height: 3.5rem;
}
.nx-navbar .nav-link, .nx-navbar .navbar-text { color: #fff; }
.nx-navbar .nav-link:hover { color: #fff; opacity: .85; }
.nx-navbar .navbar-nav.nx-direita > .nav-item { border-left: 1px solid rgba(0,0,0,.2); box-shadow: -1px 0 0 rgba(255,255,255,.12); }
.nx-navbar .navbar-nav.nx-direita > .nav-item > .nav-link { padding-inline: .9rem; display: flex; align-items: center; gap: .5rem; }
.nx-navbar-centro { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; padding-inline: .5rem; }
.nx-seletor {
  display: flex; align-items: center; gap: .5rem; width: 440px; max-width: 100%; height: 1.9rem;
  padding: 0 .6rem; background: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: 3px;
  color: #495057; font-size: .8125rem; overflow: hidden;
}
.nx-seletor select { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font: inherit; outline: none; }
.nx-seletor .nx-ico { color: var(--nx-destaque); }
.nx-avatar {
  display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: #fff; color: var(--nx-barra-base); font-size: .72rem; font-weight: 700; border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); flex-shrink: 0;
}
.nx-usuario-menu { min-width: 15rem; padding: 0; overflow: hidden; border-radius: 3px; }
.nx-usuario-menu .nx-usuario-topo { background: var(--nx-destaque); color: #fff; padding: .8rem 1rem; }
.nx-usuario-menu .nx-usuario-topo small { color: rgba(255,255,255,.85); display: block; }
.nx-usuario-menu .dropdown-item { padding: .55rem 1rem; font-size: .82rem; display: flex; gap: .6rem; align-items: center; }
.nx-usuario-menu .dropdown-item .nx-ico { width: 1rem; color: #888; }

/* ============================================================ menu lateral grafite */
.nx-sidebar {
  background: linear-gradient(180deg, #36434d 0, #2b353d 14rem, #262f36 100%);
  box-shadow: 1px 0 0 #1c252b;
  --lte-sidebar-color: #efefef;
  --lte-sidebar-hover-color: #fff;
  --lte-sidebar-hover-bg: transparent;
  --lte-sidebar-menu-active-bg: transparent;
  --lte-sidebar-menu-active-color: #fff;
}
.nx-sidebar .sidebar-brand {
  height: auto; min-height: 3.5rem; padding-block: .55rem; justify-content: center;
  background: linear-gradient(var(--nx-barra-topo), var(--nx-barra-base));
  border-bottom: 1px solid var(--nx-barra-borda);
}
.nx-sidebar .brand-link { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
.nx-marca { width: 2rem; height: 2rem; border-radius: 7px; background: #fff; color: var(--nx-destaque); display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex-shrink: 0; }
.nx-marca-texto { font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.nx-perfil {
  display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; color: #cecece; font-size: .75rem;
  line-height: 1.25; white-space: nowrap; border-bottom: 1px solid #1c252b; box-shadow: 0 1px 0 #3e4a54;
}
.nx-perfil strong { color: #fff; }
.nx-perfil small { display: block; color: #8b97a2; font-size: .68rem; }
.nx-perfil .nx-avatar { width: 2.2rem; height: 2.2rem; background: #4a5762; color: #fff; border-color: #5a6772; }
.nx-sidebar .sidebar-wrapper { padding: 0; }
.nx-sidebar .sidebar-menu { padding: 0; }
.nx-sidebar .sidebar-menu > .nav-item > .nav-link {
  margin: 0; padding: .72rem 1rem; border-radius: 0; display: flex; align-items: center; gap: .1rem;
  border-top: 1px solid #3e4a54; border-bottom: 1px solid #1c252b;
  background: linear-gradient(#323e48, #2a343c); color: #efefef;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.nx-sidebar .sidebar-menu > .nav-item > .nav-link:hover { background: linear-gradient(#3a4752, #303b44); border-top-color: #516271; color: #fff; }
.nx-sidebar .sidebar-menu > .nav-item > .nav-link.active {
  background: linear-gradient(#3e4b56, #333f49); border-top-color: #657d92; color: #fff;
  box-shadow: inset 3px 0 0 var(--nx-destaque);
}
.nx-sidebar .sidebar-menu .nav-icon { width: 1.6rem; color: #aeb8c1; font-size: .9rem; text-align: center; margin-right: .45rem; }
.nx-sidebar .sidebar-menu .nav-link.active > .nav-icon { color: #8fbcfb; }
.nx-sidebar .sidebar-menu .nav-header {
  padding: .9rem 1rem .3rem; font-size: .64rem; font-weight: 600; letter-spacing: .08em; color: #8b97a2; text-transform: uppercase;
}
.nx-sidebar .sidebar-menu .nav-link p { margin: 0; }
/* recolhido: só ícones (abre ao passar o mouse) */
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .nx-marca-texto,
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .nx-perfil-texto,
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .nav-header { display: none; }
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .nx-perfil { justify-content: center; padding-inline: 0; }
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .sidebar-menu > .nav-item > .nav-link { justify-content: center; padding-inline: 0; }
.sidebar-mini.sidebar-collapse .nx-sidebar:not(:hover) .nav-icon { margin: 0; }

/* ============================================================ faixa de título */
.nx-cabecalho {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1.25rem; background: #fff; border-bottom: 1px solid #dcdcdc;
}
.nx-cabecalho h1 { margin: 0; font-size: 1.1rem; font-weight: 500; color: #333; }
.nx-trilha { display: flex; align-items: center; gap: .35rem; margin: .15rem 0 0; padding: 0; list-style: none; font-size: .75rem; color: #8a8a8a; }
.nx-trilha a { color: #8a8a8a; text-decoration: none; }
.nx-trilha a:hover { color: var(--nx-destaque); }
.nx-trilha li + li::before { content: "›"; margin-right: .35rem; color: #b5b5b5; }
.nx-acoes { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.app-content { padding: 1.25rem; }
.nx-pagina { display: grid; gap: 1.25rem; max-width: 1400px; }

/* ============================================================ blocos do ERP */
.erp-widget { border: 1px solid var(--nx-borda); border-radius: 3px; background: #f9f9f9; box-shadow: 0 1px 0 #fff; min-width: 0; }
.erp-widget-titulo {
  display: flex; align-items: center; min-height: 2.4rem; border-bottom: 1px solid var(--nx-borda);
  border-radius: 3px 3px 0 0; background: linear-gradient(#fdfdfd, #ececec);
}
.erp-widget-icone { display: grid; place-items: center; align-self: stretch; width: 2.6rem; border-right: 1px solid #d5d5d5; color: #6b6b6b; font-size: .85rem; flex-shrink: 0; }
.erp-widget-titulo h2 { margin: 0; padding: 0 .9rem; color: var(--nx-texto); font-size: .8rem; font-weight: 700; }
.erp-widget-titulo .erp-widget-sub { color: #8a8a8a; font-size: .72rem; font-weight: 400; }
.erp-widget-ferramentas { display: flex; align-items: center; gap: .5rem; margin-left: auto; padding: .3rem .75rem .3rem 0; flex-wrap: wrap; }
.erp-widget-corpo { padding: 1rem; }
.erp-widget-corpo.p-0 { padding: 0; }
.erp-widget-rodape { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .9rem; border-top: 1px solid #e0e0e0; color: #878787; font-size: .75rem; flex-wrap: wrap; }

/* botões em caixa alta com degradê */
.erp-botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.1rem; padding: 0 1.1rem;
  border: 1px solid; border-radius: 2px; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.erp-botao:hover { color: #fff; filter: brightness(1.06); }
.erp-botao:active { filter: brightness(.94); }
.erp-botao:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.erp-botao:focus-visible { outline: 2px solid var(--nx-destaque); outline-offset: 2px; }
.erp-botao--azul { border-color: var(--nx-barra-borda); background: linear-gradient(#4a97f7, var(--nx-barra-base)); }
.erp-botao--verde { border-color: #6d8737; background: linear-gradient(#9cbd5c, #78953e); }
.erp-botao--vermelho { border-color: #a5302a; background: linear-gradient(#e0665f, #c0392b); }
.erp-botao--cinza { border-color: #b9b9b9; background: linear-gradient(#fdfdfd, #e4e4e4); color: #555; box-shadow: inset 0 1px 0 #fff; }
.erp-botao--cinza:hover { color: #333; }
.erp-botao-mini { height: 1.65rem; padding: 0 .6rem; font-size: .64rem; }
.erp-icone-botao { display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem; border: 1px solid #d0d0d0; border-radius: 2px; background: #fff; color: #6b6b6b; cursor: pointer; }
.erp-icone-botao:hover { color: var(--nx-destaque); border-color: var(--nx-destaque); }
.erp-icone-botao--perigo:hover { color: #c0392b; border-color: #c0392b; }

/* tabela compacta zebrada */
.erp-tabela-wrap { overflow-x: auto; }
.erp-tabela { width: 100%; border-collapse: collapse; background: #fff; font-size: .8125rem; }
.erp-tabela thead th {
  padding: .5rem .75rem; border-bottom: 1px solid #d5d5d5; background: linear-gradient(#fafafa, #ececec);
  color: #6b6b6b; font-size: .7rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; text-align: left;
}
.erp-tabela tbody td { padding: .55rem .75rem; border-bottom: 1px solid #e7e7e7; color: #4a4a4a; vertical-align: middle; }
.erp-tabela tbody tr:nth-child(even) td { background: #f7f7f7; }
.erp-tabela tbody tr:hover td { background: var(--nx-destaque-suave); }
.erp-tabela tbody tr.clicavel { cursor: pointer; }
.erp-tabela th.text-end, .erp-tabela td.text-end { text-align: right; }
.erp-tabela td.acoes { text-align: right; white-space: nowrap; }
.erp-tabela .sub { display: block; color: #8a8a8a; font-size: .72rem; }
.erp-tabela tr.total td { font-weight: 700; background: #f0f0f0 !important; border-top: 1px solid #d5d5d5; }
.erp-vazio { padding: 1.75rem; text-align: center; color: #8a8a8a; background: #fff; }
.erp-vazio .nx-ico { display: block; font-size: 1.5rem; margin-bottom: .5rem; color: #c4c4c4; }

/* selos */
.erp-selo {
  display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .45rem; border: 1px solid;
  border-radius: 2px; font-size: .64rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
  color: var(--tom); border-color: var(--tom); background: var(--tom-suave);
}
.tom-verde { --tom: var(--tom-verde); --tom-suave: var(--tom-verde-suave); }
.tom-ambar { --tom: var(--tom-ambar); --tom-suave: var(--tom-ambar-suave); }
.tom-coral { --tom: var(--tom-coral); --tom-suave: var(--tom-coral-suave); }
.tom-violeta { --tom: var(--tom-violeta); --tom-suave: var(--tom-violeta-suave); }
.tom-cinza { --tom: var(--tom-cinza); --tom-suave: var(--tom-cinza-suave); }
.tom-azul { --tom: var(--nx-destaque); --tom-suave: var(--nx-destaque-suave); }

/* períodos em botões colados */
.erp-segmentos { display: inline-flex; flex-wrap: wrap; border: 1px solid #c4c4c4; border-radius: 2px; overflow: hidden; background: #fff; }
.erp-segmentos button { padding: .25rem .7rem; border: 0; border-right: 1px solid #c4c4c4; background: linear-gradient(#fff, #f0f0f0); color: #555; font-size: .72rem; font-weight: 600; cursor: pointer; }
.erp-segmentos button:last-child { border-right: 0; }
.erp-segmentos button.active { background: linear-gradient(#4a97f7, var(--nx-barra-base)); color: #fff; }
.nx-datas { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.nx-datas input { height: 1.85rem; width: auto; font-size: .75rem; border-radius: 2px; }

/* indicadores lado a lado com divisórias */
.erp-indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: #fff; }
.erp-indicador { padding: .9rem 1rem; border-right: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; border-top: 3px solid var(--tom, var(--nx-destaque)); min-width: 0; }
.erp-indicador-rotulo { display: flex; align-items: center; gap: .4rem; color: #777; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.erp-indicador-rotulo .nx-ico { color: var(--tom, var(--nx-destaque)); }
.erp-indicador-valor { margin-top: .3rem; font-size: 1.35rem; font-weight: 600; color: #2f2f2f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erp-indicador-nota { margin-top: .1rem; font-size: .72rem; color: #8a8a8a; }
.valor-positivo { color: var(--tom-verde) !important; }
.valor-negativo { color: #c0392b !important; }

/* funil em fita (estilo Gerenciador de Anúncios) */
.nx-funil { display: flex; overflow-x: auto; background: #fff; padding: .9rem; gap: 2px; }
.nx-funil-etapa { flex: 1 0 130px; min-width: 130px; }
.nx-funil-faixa {
  padding: .6rem .9rem .6rem 1.4rem; color: #fff; background: var(--nx-destaque);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}
.nx-funil-etapa:first-child .nx-funil-faixa { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); padding-left: .9rem; }
.nx-funil-etapa:nth-child(2) .nx-funil-faixa { background: #2f7fe6; }
.nx-funil-etapa:nth-child(3) .nx-funil-faixa { background: #3f86d6; }
.nx-funil-etapa:nth-child(4) .nx-funil-faixa { background: #4f8bc4; }
.nx-funil-etapa:nth-child(5) .nx-funil-faixa { background: var(--tom-verde); }
.nx-funil-rotulo { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .9; }
.nx-funil-valor { font-size: 1.2rem; font-weight: 600; }
.nx-funil-taxa { padding: .35rem .2rem 0 1.4rem; font-size: .72rem; color: #777; }
.nx-funil-taxa b { color: #333; }

/* barras horizontais (origens, campanhas) */
.nx-barras { display: grid; gap: .55rem; padding: 1rem; background: #fff; }
.nx-barra-linha { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: .6rem; font-size: .78rem; }
.nx-barra-trilho { height: .6rem; background: #eee; border-radius: 1px; overflow: hidden; }
.nx-barra-trilho span { display: block; height: 100%; background: var(--tom, var(--nx-destaque)); }
.fonte-facebook { --tom: #1877F2; } .fonte-instagram { --tom: #E1306C; } .fonte-google { --tom: #F4B400; }
.fonte-tiktok { --tom: #111; } .fonte-direto { --tom: #94a3b8; } .fonte-outros { --tom: #7a5af8; } .fonte-nao_atribuida { --tom: #cbd5e1; }

/* gráfico de barras diário (SVG gerado no JS) */
.nx-grafico { padding: .75rem 1rem 1rem; background: #fff; }
.nx-grafico svg { width: 100%; height: 190px; display: block; }
.nx-grafico .barra { fill: var(--nx-destaque); }
.nx-grafico .barra:hover { fill: var(--nx-barra-base); }
.nx-grafico .eixo { stroke: #e3e3e3; }
.nx-grafico text { fill: #8a8a8a; font-size: 10px; }

/* formulário em linhas (rótulo à esquerda) */
.erp-campo { display: grid; grid-template-columns: 13rem 1fr; gap: .4rem 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid #e6e6e6; }
.erp-campo:last-child { border-bottom: 0; }
.erp-campo > label, .erp-campo > .erp-campo-rotulo { color: #555; font-size: .8rem; font-weight: 600; margin: 0; }
.erp-campo .form-text { grid-column: 2; margin: 0; font-size: .72rem; }
.erp-form { background: #fff; padding: .25rem 1rem; }
.form-control, .form-select { border-radius: 2px; font-size: .8125rem; border-color: #c9c9c9; }
.form-control:focus, .form-select:focus { border-color: var(--nx-destaque); box-shadow: 0 0 0 .15rem rgba(24,119,242,.2); }
@media (max-width: 767.98px) { .erp-campo { grid-template-columns: 1fr; } .erp-campo .form-text { grid-column: 1; } }

/* caixas utilitárias */
.nx-copiar { display: flex; align-items: center; gap: .5rem; padding: .35rem .35rem .35rem .7rem; background: #fff; border: 1px solid #d0d0d0; border-radius: 2px; }
.nx-copiar code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: #333; font-size: .78rem; }
.nx-aviso { display: flex; gap: .7rem; padding: .7rem .9rem; border: 1px solid; border-left-width: 4px; border-radius: 2px; font-size: .8rem; background: #fff; }
.nx-aviso .nx-ico { margin-top: .15rem; }
.nx-aviso--info { border-color: #b9d4fb; border-left-color: var(--nx-destaque); color: #1d4f91; }
.nx-aviso--alerta { border-color: #f3d9a6; border-left-color: var(--tom-ambar); color: #7a5300; background: #fffaf0; }
.nx-aviso--perigo { border-color: #f1bdb7; border-left-color: #c0392b; color: #8a2a20; }
.nx-codigos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.nx-codigos code { padding: .45rem; background: #fff; border: 1px solid #d0d0d0; text-align: center; font-size: .9rem; color: #333; }
.nx-grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.nx-grade-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
@media (max-width: 991.98px) { .nx-grade-2, .nx-grade-3 { grid-template-columns: 1fr; } }
.nx-linha { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nx-espaco { flex: 1; }
.nx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; }
.nx-json { max-height: 360px; overflow: auto; margin: 0; padding: .75rem; background: #1f272d; color: #d7e0e8; font-size: .72rem; border-radius: 2px; }
.nx-campos-lista { max-height: 320px; overflow: auto; background: #fff; border: 1px solid #e0e0e0; }
.nx-campos-lista button { display: grid; grid-template-columns: 1fr auto; gap: .5rem; width: 100%; padding: .35rem .6rem; border: 0; border-bottom: 1px solid #eee; background: #fff; text-align: left; font-size: .74rem; cursor: pointer; }
.nx-campos-lista button:hover { background: var(--nx-destaque-suave); }
.nx-campos-lista .amostra { color: #8a8a8a; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* integrações em cartões (vitrine) */
.nx-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; padding: 1rem; background: #fff; }
.nx-app { display: flex; gap: .7rem; align-items: center; padding: .8rem; border: 1px solid #dcdcdc; border-radius: 2px; background: #fff; text-align: left; cursor: pointer; }
.nx-app:hover { border-color: var(--nx-destaque); background: var(--nx-destaque-suave); }
.nx-app-icone { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 3px; background: var(--nx-destaque-suave); color: var(--nx-destaque); flex-shrink: 0; }
.nx-app strong { display: block; font-size: .82rem; color: #333; }
.nx-app small { color: #8a8a8a; font-size: .72rem; }

/* ============================================================ telas de acesso */
.nx-acesso { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; background: linear-gradient(160deg, #eef3fb 0, #e3e8ef 100%); }
.nx-acesso-caixa { width: 100%; max-width: 400px; }
.nx-acesso-caixa.largo { max-width: 470px; }
.nx-acesso-marca { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.1rem; font-size: 1.35rem; font-weight: 700; color: #263238; }
.nx-acesso-marca .nx-marca { background: var(--nx-destaque); color: #fff; width: 2.4rem; height: 2.4rem; }
.nx-acesso .erp-widget-corpo { background: #fff; display: grid; gap: .9rem; }
.nx-codigo-input { letter-spacing: .35em; text-align: center; font-size: 1.35rem; height: 3rem; font-family: ui-monospace, monospace; }
.nx-qr { display: block; width: 200px; height: 200px; margin: 0 auto; padding: 6px; background: #fff; border: 1px solid #ddd; }

/* ============================================================ janela (modal) e mensagens */
.nx-janela-fundo { position: fixed; inset: 0; z-index: 1060; display: grid; place-items: center; padding: 1rem; background: rgba(20,28,36,.55); }
.nx-janela { width: 100%; max-width: 520px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: #f9f9f9; border: 1px solid #b9b9b9; border-radius: 3px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.nx-janela.larga { max-width: 860px; }
.nx-janela .erp-widget-corpo { overflow: auto; background: #fff; display: grid; gap: .8rem; }
.nx-janela-rodape { display: flex; justify-content: flex-end; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid #ddd; background: #f3f3f3; }
@media (max-width: 575.98px) { .nx-janela-fundo { place-items: end stretch; padding: 0; } .nx-janela { max-width: none; border-radius: 12px 12px 0 0; } }
.nx-mensagens { position: fixed; top: 4.2rem; right: 1rem; z-index: 1080; display: grid; gap: .4rem; justify-items: end; max-width: calc(100% - 2rem); }
.nx-mensagem { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .8rem; border-radius: 3px; color: #fff; font-size: .8rem; font-weight: 500; box-shadow: 0 4px 14px rgba(0,0,0,.2); animation: nx-entra .2s ease-out; }
.nx-mensagem--sucesso { background: #12937f; } .nx-mensagem--erro { background: #d63c2f; } .nx-mensagem--info { background: #33495e; }
@keyframes nx-entra { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-gira { animation: nx-gira 1s linear infinite; }
@keyframes nx-gira { to { transform: rotate(360deg); } }

/* ============================================================ celular: barra inferior */
.nx-barra-inferior { display: none; }
@media (max-width: 991.98px) {
  .nx-barra-inferior {
    position: fixed; left: .5rem; right: .5rem; bottom: .5rem; z-index: 1035; display: flex; justify-content: space-around;
    padding: .35rem; background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.18);
  }
  .nx-barra-inferior a, .nx-barra-inferior button {
    display: grid; justify-items: center; gap: .15rem; padding: .3rem .5rem; border: 0; background: none;
    color: #8a8a8a; font-size: .6rem; font-weight: 700; text-transform: uppercase; text-decoration: none;
  }
  .nx-barra-inferior .nx-ico { font-size: 1.05rem; }
  .nx-barra-inferior .ativo { color: var(--nx-destaque); }
  .app-main { padding-bottom: 5rem; }
  .nx-seletor { width: auto; }
}

/* ============================================================ dashboard principal (resumo em cartões) */
.nx-resumo { background: #fff; border: 1px solid #dcdcdc; border-radius: 4px; }
.nx-resumo-topo { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid #ececec; flex-wrap: wrap; }
.nx-resumo-topo h2 { margin: 0; font-size: 1rem; font-weight: 600; color: #333; }
.nx-resumo-topo .nx-atualizado { margin-left: auto; color: #8a8a8a; font-size: .78rem; }
.nx-filtros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; padding: .9rem 1.1rem 1.1rem; }
.nx-filtros label { display: block; margin-bottom: .3rem; color: #666; font-size: .72rem; font-weight: 600; }
.nx-filtros .nx-datas { margin-top: .4rem; }
.nx-cartoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.nx-cartao { position: relative; min-width: 0; padding: .95rem 1.05rem 1.05rem; background: #fff; border: 1px solid #dcdcdc; border-radius: 4px; }
.nx-cartao-titulo { display: flex; align-items: center; gap: .5rem; color: #555; font-size: .8rem; font-weight: 600; }
.nx-cartao-titulo .nx-info { margin-left: auto; color: #a3a3a3; cursor: help; }
.nx-cartao-valor { margin-top: .4rem; font-size: 1.45rem; font-weight: 700; color: #3a3a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nx-cartao-nota { margin-top: .15rem; color: #9a9a9a; font-size: .7rem; }
.nx-cartao.positivo .nx-cartao-titulo, .nx-cartao.positivo .nx-cartao-valor { color: var(--tom-verde); }
.nx-cartao.negativo .nx-cartao-titulo, .nx-cartao.negativo .nx-cartao-valor { color: #c0392b; }
.nx-cartao.vazio .nx-cartao-valor { color: #b5b5b5; }
.nx-cartao--rosca { grid-column: 1; grid-row: 2 / span 3; display: flex; flex-direction: column; }
.nx-cartao--rosca .nx-cartao-titulo { font-size: .95rem; color: #333; }
.nx-rosca { flex: 1; display: grid; place-items: center; padding: .5rem 0; }
.nx-rosca svg { width: 100%; max-width: 230px; height: auto; }
.nx-rosca .fatia { fill: none; stroke-width: 22; }
.nx-rosca .pct { fill: #fff; font-size: 7px; font-weight: 700; }
.nx-rosca .centro-rotulo { fill: #666; font-size: 10px; }
.nx-rosca .centro-valor { fill: #333; font-size: 12px; font-weight: 600; }
.nx-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1rem; font-size: .75rem; color: #555; }
.nx-legenda span::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .35rem; border-radius: 50%; background: var(--cor); vertical-align: middle; }
.pg-pix { --cor: #1877F2; stroke: #1877F2; } .pg-cartao { --cor: #4cc3f0; stroke: #4cc3f0; }
.pg-boleto { --cor: #e8b923; stroke: #e8b923; } .pg-outros { --cor: #e4572e; stroke: #e4572e; }
@media (max-width: 1199.98px) { .nx-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
  .nx-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-cartao--rosca { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 575.98px) { .nx-filtros, .nx-cartoes { grid-template-columns: 1fr; } }
