/* ============================================================
   NEXUS — plataforma: tela de login, menu de módulos e usuário conectado
   Usa os tokens de nexus.css (preto, gradiente laranja, glow)
   ============================================================ */

/* ---------- login ---------- */
body.nx-login-page::before {
  background:
    radial-gradient(760px 520px at 20% 30%, rgba(247, 81, 31, 0.20), transparent 62%),
    radial-gradient(620px 420px at 95% 105%, rgba(255, 162, 102, 0.10), transparent 60%);
}
.nx-login { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); }
.nx-login-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 48px clamp(28px, 5vw, 72px);
  border-right: 1px solid var(--line);
}
.nx-login-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 114, 40, 0.28), transparent 65%);
  filter: blur(10px); pointer-events: none;
}
.nx-login-logo { width: 190px; filter: drop-shadow(0 0 26px rgba(255, 114, 40, 0.42)); }
.nx-login-pitch { max-width: 560px; position: relative; z-index: 1; }
.nx-login-pitch h1 {
  font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.08; margin: 14px 0 16px;
  background: linear-gradient(100deg, #faede5 0%, #faede5 46%, #ffa266 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nx-login-pitch p { color: var(--ink-dim); font-size: 1rem; margin: 0; max-width: 46ch; }
.nx-login-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 1; }
.nx-login-feats li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(28, 26, 24, 0.6); backdrop-filter: blur(6px); }
.nx-login-feats b { display: block; font-family: var(--font-display); font-size: 0.95rem; }
.nx-login-feats span { display: block; color: var(--ink-mute); font-size: 0.78rem; margin-top: 2px; }
.nx-login-feats li::before { content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--grad); box-shadow: var(--glow-sm); margin-bottom: 10px; }

.nx-login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.nx-login-card {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px 30px 24px;
  background: linear-gradient(180deg, rgba(34, 31, 28, 0.92), rgba(26, 24, 22, 0.92));
  border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 114, 40, 0.06), 0 0 60px -20px rgba(255, 114, 40, 0.35);
  position: relative;
}
.nx-login-card::before {
  content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 2px; border-radius: 2px;
  background: var(--grad); box-shadow: var(--glow-md);
}
.nx-login-logo-sm { display: none; width: 132px; margin-bottom: 6px; }
.nx-login-card h2 { font-size: 1.55rem; }
.nx-login-sub { margin: -6px 0 4px; color: var(--ink-dim); font-size: 0.88rem; }
.nx-login-card .nx-input { padding: 11px 12px; font-size: 0.95rem; }
.nx-login-eye { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; background: transparent; border: 0; color: var(--ink-mute); cursor: pointer; border-radius: 0 10px 10px 0; }
.nx-login-eye:hover { color: var(--brand-soft); }
.nx-login-caps { color: var(--warn); font-size: 0.74rem; }
.nx-login-erro { margin: 0; min-height: 1.2em; color: var(--danger); font-size: 0.84rem; }
.nx-login-btn { width: 100%; padding: 12px 18px; font-size: 0.95rem; }
.nx-login-foot { margin: 4px 0 0; text-align: center; color: var(--ink-mute); font-size: 0.74rem; }
.nx-login-card.is-erro { animation: nx-shake .35s ease; }
@keyframes nx-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 900px) {
  .nx-login { grid-template-columns: 1fr; }
  .nx-login-brand { display: none; }
  .nx-login-logo-sm { display: block; }
  .nx-login-panel { min-height: 100vh; padding: 24px 16px; }
}
@media (max-width: 420px) { .nx-login-card { padding: 26px 18px 20px; } }
@media (prefers-reduced-motion: reduce) { .nx-login-card.is-erro { animation: none; } }

/* ---------- navegação da plataforma e usuário conectado ---------- */
.nx-plat-nav { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.nx-home-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink-dim); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 500; }
.nx-home-link:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); background: rgba(250, 237, 229, 0.04); }
.nx-home-link.is-active { color: var(--ink); background: var(--brand-wash); border-color: rgba(247, 81, 31, 0.5); box-shadow: var(--glow-sm); }
.nx-home-link.is-active .nx-ico { color: var(--brand-bright); }
.nx-side-user { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.nx-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--grad); color: #1b0d06; font-family: var(--font-display); font-weight: 700; box-shadow: var(--glow-sm); }
.nx-side-user-id { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; color: var(--ink); }
.nx-side-user-id:hover { text-decoration: none; }
.nx-side-user-id:hover b { color: var(--brand-soft); }
.nx-side-user-id b { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-side-user-id small { font-size: 0.7rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-side-user .nx-sair { display: inline-flex; align-items: center; justify-content: center; align-self: center; margin: 0; }
.nx-side-user .nx-sair .nx-ico { width: 16px; height: 16px; }
.nx-top-sair { flex: none; }
.nx-top-sair .nx-ico { width: 15px; height: 15px; }

/* ---------- seletor de módulos (topo): separa os módulos e troca entre eles ---------- */
.nx-modswitch { flex: none; margin-left: auto; display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; border: 1px solid var(--line); background: rgba(21, 19, 17, 0.7); }
.nx-modswitch[hidden] { display: none; }
.nx-modswitch + .nx-top-slot { margin-left: 0; }
.nx-modswitch-opt { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border-radius: 12px; color: var(--ink-dim); font-size: 0.86rem; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.nx-modswitch-opt:hover, .nx-modswitch-opt:focus-visible { text-decoration: none; color: var(--ink); background: rgba(250, 237, 229, 0.05); }
.nx-modswitch-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(250, 237, 229, 0.06); color: var(--ink-mute); transition: background .25s, color .25s, box-shadow .25s; }
.nx-modswitch-ico .nx-ico { width: 16px; height: 16px; }
.nx-modswitch-opt:hover .nx-modswitch-ico, .nx-modswitch-opt:focus-visible .nx-modswitch-ico { background: var(--grad); color: #1b0d06; box-shadow: 0 0 16px rgba(255, 114, 40, 0.5); }
.nx-modswitch-opt.is-active { color: var(--ink); background: var(--brand-wash); box-shadow: inset 0 0 0 1px rgba(247, 81, 31, 0.45); }
.nx-modswitch-opt.is-active .nx-modswitch-ico { background: var(--grad); color: #1b0d06; box-shadow: var(--glow-sm); }

/* ---------- módulo fora do acesso do usuário: aparece em cinza, sem abrir ---------- */
.nx-modswitch-opt.is-bloqueado { cursor: not-allowed; opacity: .45; filter: grayscale(1); }
.nx-modswitch-opt.is-bloqueado:hover, .nx-modswitch-opt.is-bloqueado:focus-visible { background: none; color: var(--ink-dim); }
.nx-modswitch-opt.is-bloqueado .nx-modswitch-ico, .nx-modswitch-opt.is-bloqueado:hover .nx-modswitch-ico { background: rgba(250, 237, 229, 0.06); color: var(--ink-mute); box-shadow: none; }
.nx-mod.is-bloqueado .nx-mod-link { cursor: not-allowed; opacity: .5; filter: grayscale(1); }
.nx-mod.is-bloqueado .nx-mod-link:hover { background: none; }
.nx-mod.is-bloqueado .nx-mod-ico { background: rgba(250, 237, 229, 0.1); color: var(--ink-mute); box-shadow: none; }
.nx-mod-cadeado { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--ink-mute); }
.nx-modtile.is-bloqueado { cursor: not-allowed; filter: grayscale(1); opacity: .55; background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card)); }
.nx-modtile.is-bloqueado::before { background: var(--line); }
.nx-modtile.is-bloqueado:hover, .nx-modtile.is-bloqueado:focus-visible { transform: none; border-color: var(--line); box-shadow: none; }
.nx-modtile.is-bloqueado:focus-visible { outline: 2px solid var(--ink-mute); outline-offset: 3px; }
.nx-modtile.is-bloqueado .nx-modtile-marca, .nx-modtile.is-bloqueado:hover .nx-modtile-marca { color: var(--ink-mute); transform: none; opacity: .06; }
.nx-modtile.is-bloqueado .nx-modtile-ico, .nx-modtile.is-bloqueado:hover .nx-modtile-ico { background: rgba(250, 237, 229, 0.08); color: var(--ink-mute); box-shadow: none; transform: none; filter: none; }
.nx-modtile.is-bloqueado .nx-modtile-txt small { color: var(--ink-mute); }
.nx-modtile-bloq { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 600; color: var(--ink-mute); }
.nx-modtile-bloq .nx-ico { width: 16px; height: 16px; }
.nx-home.is-aberto .nx-modtile.is-bloqueado:not(.is-aberto), .nx-home.is-aberto .nx-modtile.is-bloqueado:not(.is-aberto):hover { opacity: .45; }
.nx-home.is-aberto .nx-modtile-bloq > span { display: none; }

/* ---------- menu de módulos: escolha do módulo (cartões grandes) → etapas do módulo (painel) ---------- */
.nx-home { display: flex; flex-direction: column; gap: 18px; min-height: calc(100vh - 205px); }
.nx-home-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.nx-home-hello { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--ink-dim); }
.nx-home-hello b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-home-sub { margin: 4px 0 0; color: var(--ink-mute); font-size: 0.92rem; }
.nx-home-sub b { color: var(--ink); font-weight: 600; }
.nx-home-date { margin: 0; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-mute); }
.nx-home-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); }
.nx-home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.nx-home.is-escolha .nx-home-grid { flex: 1; }

/* cartão do módulo */
.nx-modtile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 18px; min-width: 0; min-height: 320px;
  padding: clamp(22px, 2.6vw, 34px); border-radius: 24px; border: 1px solid var(--line); color: var(--ink);
  background:
    radial-gradient(560px 320px at 0% 0%, rgba(247, 81, 31, 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  transition: border-color .25s, transform .25s, box-shadow .25s, opacity .25s;
}
.nx-modtile::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); opacity: .85; }
.nx-modtile:hover, .nx-modtile:focus-visible {
  text-decoration: none; border-color: rgba(247, 81, 31, 0.5); transform: translateY(-3px);
  box-shadow: 0 26px 60px -32px rgba(0, 0, 0, 0.85), 0 0 60px -26px rgba(255, 114, 40, 0.55);
}
.nx-modtile:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 3px; }
.nx-modtile-marca { position: absolute; z-index: -1; right: -46px; bottom: -56px; width: 270px !important; height: 270px !important; color: var(--brand); opacity: .06; stroke-width: 1.1; transition: opacity .35s, transform .45s; }
.nx-modtile:hover .nx-modtile-marca { opacity: .11; transform: rotate(-6deg) scale(1.04); }
.nx-modtile-ico {
  flex: none; width: 84px; height: 84px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #1b0d06; transition: box-shadow .25s, transform .25s, filter .25s;
}
.nx-modtile-ico .nx-ico { width: 40px; height: 40px; stroke-width: 1.6; }
.nx-modtile:hover .nx-modtile-ico, .nx-modtile:focus-visible .nx-modtile-ico, .nx-modtile.is-aberto .nx-modtile-ico {
  box-shadow: 0 0 28px rgba(255, 114, 40, 0.55), 0 0 64px rgba(247, 81, 31, 0.35); filter: saturate(1.15);
}
.nx-modtile:hover .nx-modtile-ico { transform: scale(1.04); }
.nx-modtile-txt { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nx-modtile-txt small { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-soft); }
.nx-modtile-txt strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 2.8vw, 2.35rem); line-height: 1.08; }
.nx-modtile-resumo { color: var(--ink-dim); font-size: 0.95rem; max-width: 58ch; }
.nx-modtile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nx-modtile-stats > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(21, 19, 17, 0.65); border: 1px solid var(--line); }
.nx-modtile-stats em { font-style: normal; font-size: 0.7rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-modtile-stats b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-modtile-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.nx-modtile-ultima { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.8rem; color: var(--ink-mute); }
.nx-modtile-ultima .nx-ico { width: 14px; height: 14px; }
.nx-modtile-ver { display: inline-flex; align-items: center; gap: 8px; flex: none; font-weight: 600; font-size: 0.9rem; color: var(--brand-soft); }
.nx-modtile-ver i { font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: var(--brand-wash); }
.nx-modtile-seta { width: 32px !important; height: 32px !important; padding: 7px; border-radius: 50%; border: 1px solid rgba(247, 81, 31, 0.45); transition: transform .25s, background .25s, color .25s, border-color .25s; }
.nx-modtile:hover .nx-modtile-seta, .nx-modtile.is-aberto .nx-modtile-seta { background: var(--grad); color: #1b0d06; border-color: transparent; }
.nx-modtile:hover .nx-modtile-seta { transform: translateY(2px); }
.nx-modtile.is-aberto .nx-modtile-seta { transform: rotate(180deg); }

/* módulo escolhido: os cartões viram uma faixa compacta */
.nx-home.is-aberto .nx-home-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.nx-home.is-aberto .nx-modtile { min-height: 0; flex-direction: row; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; }
.nx-home.is-aberto .nx-modtile:hover { transform: translateY(-2px); }
.nx-home.is-aberto .nx-modtile::before { left: 20px; right: 20px; }
.nx-home.is-aberto .nx-modtile-ico { width: 50px; height: 50px; border-radius: 15px; }
.nx-home.is-aberto .nx-modtile-ico .nx-ico { width: 25px; height: 25px; }
.nx-home.is-aberto .nx-modtile-txt { gap: 2px; }
.nx-home.is-aberto .nx-modtile-txt small { font-size: 0.62rem; }
.nx-home.is-aberto .nx-modtile-txt strong { font-size: 1.15rem; }
.nx-home.is-aberto .nx-modtile-resumo, .nx-home.is-aberto .nx-modtile-ultima, .nx-home.is-aberto .nx-modtile-ver-txt, .nx-home.is-aberto .nx-modtile-ver i { display: none; }
.nx-home.is-aberto .nx-modtile-cta { padding: 0; border: 0; }
.nx-home.is-aberto .nx-modtile-marca { width: 130px !important; height: 130px !important; right: -22px; bottom: -44px; }
.nx-home.is-aberto .nx-modtile:not(.is-aberto) { opacity: .7; }
.nx-home.is-aberto .nx-modtile:not(.is-aberto):hover, .nx-home.is-aberto .nx-modtile:not(.is-aberto):focus-visible { opacity: 1; }
.nx-modtile.is-aberto {
  border-color: rgba(247, 81, 31, 0.6);
  background: radial-gradient(420px 200px at 0% 0%, rgba(247, 81, 31, 0.24), transparent 70%), linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  box-shadow: 0 0 0 1px rgba(247, 81, 31, 0.18), var(--glow-sm);
}

/* painel com as etapas do módulo escolhido */
.nx-modpanel {
  container: modpanel / inline-size;
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: clamp(20px, 2.4vw, 30px); border-radius: 24px; border: 1px solid rgba(247, 81, 31, 0.28);
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(247, 81, 31, 0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  animation: nx-painel .35s ease both;
}
.nx-modpanel::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: var(--glow-sm); }
.nx-modpanel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.nx-modpanel-tit { flex: 1 1 380px; min-width: 0; }
.nx-modpanel-tit h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 6px 0 4px; }
.nx-modpanel-tit p { margin: 0; color: var(--ink-dim); font-size: 0.92rem; max-width: 76ch; }
.nx-modpanel-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-modpanel-acoes .nx-btn { padding: 10px 18px; }
.nx-modpanel-acoes .nx-ico { width: 16px; height: 16px; }
.nx-modpanel-acoes a:hover { text-decoration: none; }
.nx-modpanel-fechar { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; align-self: center; margin: 0; border-radius: 50%; }
.nx-modpanel-fechar:hover { color: var(--brand-soft); border-color: rgba(247, 81, 31, 0.6); }
.nx-modpanel-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.nx-modpanel-stats div { padding: 11px 14px; border-radius: 14px; background: var(--bg-input); border: 1px solid var(--line); min-width: 0; }
.nx-modpanel-stats dt { font-size: 0.72rem; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-modpanel-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nx-modpanel .nx-home-label { margin: 4px 0 -4px; }

/* trilha de etapas: nós numerados ligados por uma linha, cartão de cada etapa abaixo */
.nx-trilha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; }
.nx-trilha-item { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; animation: nx-etapa .4s ease both; animation-delay: calc(var(--i) * 45ms + 80ms); }
.nx-trilha-no {
  position: relative; z-index: 1; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--brand-soft);
  background: var(--bg-input); border: 1.5px solid rgba(247, 81, 31, 0.55);
  transition: background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.nx-trilha-no.is-inicio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.nx-trilha-item:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 42px; right: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(247, 81, 31, 0.65), rgba(247, 81, 31, 0.18)); }
.nx-trilha-item:hover .nx-trilha-no, .nx-trilha-item:focus-within .nx-trilha-no, .nx-trilha-item.is-aqui .nx-trilha-no { background: var(--grad); color: #1b0d06; border-color: transparent; box-shadow: var(--glow-sm); }
.nx-trilha-item:hover .nx-trilha-no.is-inicio::after, .nx-trilha-item:focus-within .nx-trilha-no.is-inicio::after, .nx-trilha-item.is-aqui .nx-trilha-no.is-inicio::after { background: #1b0d06; }
.nx-etapa {
  flex: 1; position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(21, 19, 17, 0.6); color: var(--ink);
  transition: border-color .2s, background .2s, transform .2s;
}
.nx-etapa:hover, .nx-etapa:focus-visible { text-decoration: none; border-color: rgba(247, 81, 31, 0.55); background: var(--brand-wash); transform: translateY(-2px); }
.nx-trilha-item.is-aqui .nx-etapa { border-color: rgba(247, 81, 31, 0.45); }
.nx-etapa-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.nx-etapa-ico {
  flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #1b0d06; transition: box-shadow .25s, transform .25s, filter .25s;
}
.nx-etapa-ico .nx-ico { width: 21px; height: 21px; }
.nx-etapa:hover .nx-etapa-ico, .nx-etapa:focus-visible .nx-etapa-ico, .nx-extra:hover .nx-etapa-ico, .nx-extra:focus-visible .nx-etapa-ico {
  box-shadow: 0 0 20px rgba(255, 114, 40, 0.55), 0 0 44px rgba(247, 81, 31, 0.30); transform: scale(1.06); filter: saturate(1.15);
}
.nx-etapa-go { width: 16px !important; height: 16px !important; color: var(--brand-soft); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.nx-etapa:hover .nx-etapa-go, .nx-etapa:focus-visible .nx-etapa-go, .nx-extra:hover .nx-etapa-go, .nx-extra:focus-visible .nx-etapa-go { opacity: 1; transform: none; }
.nx-etapa em, .nx-extra-txt em { font-style: normal; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-bright); }
.nx-etapa b, .nx-extra-txt b { font-family: var(--font-display); font-size: 1rem; line-height: 1.25; }
.nx-etapa small, .nx-extra-txt small { color: var(--ink-mute); font-size: 0.78rem; line-height: 1.4; }
.nx-etapa-aqui { align-self: flex-start; margin-top: 8px; font-size: 0.68rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--brand-wash); color: var(--brand-soft); border: 1px solid rgba(247, 81, 31, 0.35); }
.nx-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.nx-extra {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; color: var(--ink);
  border: 1px dashed var(--line-strong); background: rgba(21, 19, 17, 0.45); transition: border-color .2s, background .2s;
}
.nx-extra:hover, .nx-extra:focus-visible { text-decoration: none; border-style: solid; border-color: rgba(247, 81, 31, 0.55); background: var(--brand-wash); }
.nx-extra-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* painel estreito: a trilha fica vertical (nó à esquerda, linha descendo entre as etapas) */
@container modpanel (max-width: 900px) {
  .nx-trilha { grid-template-columns: 1fr; gap: 10px; }
  .nx-trilha-item { flex-direction: row; align-items: stretch; gap: 14px; }
  .nx-trilha-no { margin-top: 20px; }
  .nx-trilha-item:not(:last-child)::after { top: 58px; bottom: -14px; left: 16px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, rgba(247, 81, 31, 0.65), rgba(247, 81, 31, 0.18)); }
  .nx-etapa { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-content: center; padding: 14px 44px 14px 14px; }
  .nx-etapa-top { grid-column: 1; grid-row: 1 / span 4; margin: 0; align-self: center; }
  .nx-etapa > em, .nx-etapa > b, .nx-etapa > small, .nx-etapa > .nx-etapa-aqui { grid-column: 2; }
  .nx-etapa-aqui { margin-top: 4px; }
  .nx-etapa-go { position: absolute; right: 16px; top: 50%; margin-top: -8px; }
}

@keyframes nx-painel { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes nx-etapa { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- cadastro de usuários ---------- */
.nx-usr-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 18px; align-items: start; }
.nx-usr-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nx-usr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-input); }
.nx-usr.is-sel { border-color: rgba(247, 81, 31, 0.55); background: var(--brand-wash); }
.nx-usr-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.nx-usr-id b { font-size: 0.95rem; }
.nx-usr-email { color: var(--ink-dim); font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-usr-id small { color: var(--ink-mute); font-size: 0.72rem; }
.nx-usr-semnome { color: var(--warn); font-style: normal; font-weight: 500; }
.nx-usr-voce { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; background: var(--brand-wash); color: var(--brand-soft); vertical-align: middle; }
.nx-usr-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nx-usr-campos { display: flex; flex-direction: column; gap: 14px; }
.nx-usr-ficha .nx-login-erro { margin: 10px 0 0; }
.nx-usr-ficha .nx-ficha-rodape { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.nx-usr-ficha .nx-input-wrap .nx-login-eye { border-radius: 0 10px 10px 0; }

/* módulos liberados por usuário: cartões marcáveis na ficha e etiquetas na lista */
.nx-usr-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 2px; }
.nx-usr-mod {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 40px 12px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-input); transition: border-color .2s, background .2s, box-shadow .2s;
}
.nx-usr-mod input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nx-usr-mod:hover { border-color: rgba(247, 81, 31, 0.45); }
.nx-usr-mod:has(input:checked) { border-color: rgba(247, 81, 31, 0.6); background: var(--brand-wash); box-shadow: 0 0 0 1px rgba(247, 81, 31, 0.15); }
.nx-usr-mod:has(input:focus-visible) { outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.nx-usr-mod-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgba(250, 237, 229, 0.06); color: var(--ink-mute); transition: background .2s, color .2s, box-shadow .2s; }
.nx-usr-mod-ico .nx-ico { width: 19px; height: 19px; }
.nx-usr-mod input:checked ~ .nx-usr-mod-ico { background: var(--grad); color: #1b0d06; box-shadow: var(--glow-sm); }
.nx-usr-mod-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nx-usr-mod-txt strong { font-size: 0.88rem; }
.nx-usr-mod-txt small { font-size: 0.72rem; color: var(--ink-mute); }
.nx-usr-mod-check { position: absolute; right: 12px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 6px; border: 1.5px solid var(--line-strong); }
.nx-usr-mod input:checked ~ .nx-usr-mod-check { border-color: transparent; background: var(--grad); }
.nx-usr-mod input:checked ~ .nx-usr-mod-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #1b0d06; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nx-usr-mods-adm { display: none; }
.nx-usr-mods-campo.is-admin .nx-usr-mods, .nx-usr-mods-campo.is-admin .nx-usr-mods-cli { display: none; }
.nx-usr-mods-campo.is-admin .nx-usr-mods-adm { display: block; }
.nx-usr-mods-campo.has-error .nx-usr-mod { border-color: rgba(255, 107, 91, 0.55); }
.nx-usr-modtag { font-size: 0.66rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: rgba(250, 237, 229, 0.06); color: var(--ink-dim); border: 1px solid var(--line); }

/* ---------- exclusão em lote e origem dos produtos (integração entre os módulos) ---------- */
.nx-lote { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-input); }
.nx-lote-conta { margin-right: auto; font-size: 0.82rem; color: var(--ink-mute); }
.nx-lote-conta b { color: var(--brand-soft); }
.nx-lote.is-off { justify-content: flex-end; padding: 0; border: 0; background: none; }
th.c-sel, td.c-sel { width: 34px; text-align: center; padding-left: 6px; padding-right: 6px; }
.nx-sel-caixa { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
tr.is-sel td { background: var(--brand-wash); }
.nx-origem-tag { display: inline-block; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 6px; vertical-align: middle; background: rgba(143, 184, 240, 0.12); color: var(--info); border: 1px solid rgba(143, 184, 240, 0.25); white-space: nowrap; }

.nx-usr.is-bloq { border-color: rgba(255, 107, 91, 0.35); background: rgba(255, 107, 91, 0.05); }
.nx-usr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.nx-usr-perfil { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: rgba(250, 237, 229, 0.06); color: var(--ink-dim); }
.nx-usr-perfil.is-admin { background: var(--brand-wash); color: var(--brand-soft); }
.nx-usr-bloq { color: var(--danger) !important; }
.nx-publicar.is-pendente { border-color: rgba(242, 184, 75, 0.55); box-shadow: 0 0 0 1px rgba(242, 184, 75, 0.12); }
.nx-publicar.is-pendente h2 { color: var(--warn); }
.nx-publicar.is-ok h2 { color: var(--ok); }
.nx-passos { margin: 0 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-dim); font-size: 0.88rem; }
.nx-passos code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brand-soft); }

@media (max-width: 1180px) {
  .nx-usr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .nx-top-sair span { display: none; }
  .nx-top-sair { padding: 8px; width: 40px; height: 40px; }
  .nx-home { min-height: calc(100vh - 170px); }
  .nx-modswitch-txt { display: none; }
  .nx-modswitch-opt { padding: 4px; }
}
@media (max-width: 560px) {
  .nx-home.is-escolha .nx-home-grid { flex: none; }
  .nx-modtile { min-height: 0; gap: 14px; border-radius: 20px; }
  .nx-modtile-ico { width: 60px; height: 60px; border-radius: 18px; }
  .nx-modtile-ico .nx-ico { width: 30px; height: 30px; }
  .nx-modtile-resumo { font-size: 0.86rem; }
  .nx-modpanel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-modtile-stats { display: none; } /* no celular os números aparecem no painel, depois do clique */
  .nx-home.is-aberto .nx-modtile-txt small { display: none; }
  .nx-modpanel-acoes { flex: 1 1 100%; }
  .nx-modpanel-acoes .nx-btn { flex: 1; }
  .nx-usr { flex-wrap: wrap; }
  .nx-usr-acoes { flex: 1 1 100%; justify-content: flex-start; padding-left: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-modtile, .nx-modtile-ico, .nx-modtile-marca, .nx-modtile-seta, .nx-etapa, .nx-etapa-ico, .nx-etapa-go, .nx-trilha-no { transition: none; }
  .nx-modtile:hover, .nx-modtile:hover .nx-modtile-ico, .nx-modtile:hover .nx-modtile-marca, .nx-modtile:hover .nx-modtile-seta, .nx-etapa:hover, .nx-etapa:hover .nx-etapa-ico, .nx-extra:hover .nx-etapa-ico { transform: none; }
  .nx-modpanel, .nx-trilha-item { animation: none; }
}
@media print {
  .nx-top-sair, .nx-plat-nav, .nx-side-user, .nx-modswitch { display: none !important; }
}

/* Situação do salvamento na nuvem e link "Esqueci minha senha" */
#nx-persist[data-estado="offline"], #nx-persist[data-estado="erro"], #nx-persist[data-estado="negado"], #nx-persist[data-estado="conflito"] { color: #ffa266; font-weight: 600; }
.nx-login-esqueci { margin-top: .5rem; width: 100%; background: transparent; border-color: transparent; text-decoration: underline; }
