:root {
  --bg: #f5f5f7;
  --fg: #1d1d1f;
  --panel: #ffffff;
  --muted: #6e6e73;
  --border: #e5e5ea;
  --sidebar: #f8f8fa;
  --sidebar-muted: #8f8f95;
  --sidebar-hover: #ececf1;
  --primary: #3d4f7c;
  --primary-glow: #53679b;
  --success: #2f9461;
  --danger: #c94e2c;
  /* Mesma família que a Apple usa no site: SF no Apple OS; Inter como espelho neutro noutros sistemas */
  --font-sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body.nx-body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font-sf);
  font-size: 16px;
  line-height: 1.47059;
  font-weight: 400;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nx-shell {
  display: flex;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
}

.nx-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nx-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 28px;
  container-type: inline-size;
  container-name: nx-page;
}

.nx-sidebar {
  width: 260px;
  background: var(--sidebar);
  color: var(--fg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}

.nx-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.nx-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  display: grid;
  place-items: center;
  font-family: var(--font-sf);
  font-weight: 700;
  color: #fff;
  font-size: 13px;
}

.nx-brand-title {
  font-family: var(--font-sf);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.022em;
}

.nx-brand-subtitle {
  margin-top: 2px;
  font-size: 8.8px;
  color: var(--sidebar-muted);
  letter-spacing: 0.12em;
  font-weight: 700;
}

.nx-search {
  display: none;
}

.nx-search input {
  width: 100%;
  border: 1px solid #4c5361;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  background: #3a414f;
  color: #fff;
}

.nx-nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 14px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b8b8c2 transparent;
}

.nx-nav::-webkit-scrollbar {
  width: 8px;
}

.nx-nav::-webkit-scrollbar-track {
  background: transparent;
}

.nx-nav::-webkit-scrollbar-thumb {
  background: #b8b8c2;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.nx-nav::-webkit-scrollbar-thumb:hover {
  background: #9c9ca8;
  background-clip: padding-box;
}

.nx-nav-title {
  display: block;
  padding: 10px 10px 8px;
  font-size: 8px;
  color: var(--sidebar-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.nx-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 8px;
  border-radius: 10px;
  color: #111827;
  text-decoration: none;
  font-size: 12.32px;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.nx-nav-item--solo {
  justify-content: flex-start;
}

details.nx-nav-group {
  margin-bottom: 4px;
}

details.nx-nav-group > summary.nx-nav-item {
  list-style: none;
  cursor: pointer;
}

details.nx-nav-group > summary.nx-nav-item::-webkit-details-marker {
  display: none;
}

details.nx-nav-group > summary.nx-nav-item::marker {
  content: "";
}

.nx-nav-item:hover,
.nx-nav-item.is-active {
  background: #fff;
  color: #111827;
  border-color: var(--border);
}

.nx-nav-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.2px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nx-nav-left svg {
  width: 13.6px;
  height: 13.6px;
  flex-shrink: 0;
  fill: none;
  stroke: #6b7280;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-nav-item em {
  font-style: normal;
  font-size: 8.8px;
  line-height: 1;
  color: #45537f;
  border: 1px solid #d7dbeb;
  background: #f1f4ff;
  border-radius: 4px;
  padding: 3px 6px;
  font-weight: 700;
}

.nx-nav-caret {
  width: 11.2px;
  height: 11.2px;
  flex-shrink: 0;
  stroke: #9ca3af;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

details.nx-nav-group[open] > summary .nx-nav-caret {
  transform: rotate(90deg);
}

.nx-subnav {
  margin: 2px 0 8px 14px;
  padding-left: 12px;
  border-left: 1px solid #d9dde4;
  display: grid;
  gap: 2px;
}

.nx-subnav-item {
  text-decoration: none;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 8px;
  padding: 7px 10px;
}

.nx-subnav-item:hover {
  background: #f2f4f8;
  color: #374151;
}

.nx-subnav-item.is-active {
  color: #111827;
  background: #eceff4;
}

.nx-upgrade {
  display: none;
}

.nx-upgrade h4 {
  margin: 0 0 4px;
  font-size: 13px;
}

.nx-upgrade p {
  margin: 0;
  color: #e9edf5;
  font-size: 11px;
}

.nx-upgrade button {
  margin-top: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
}

.nx-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #f3f3f6;
  flex-shrink: 0;
}

.nx-brand {
  flex-shrink: 0;
}

.nx-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4b6f89, #79a2be);
  border: 1px solid #d9d9df;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 8.8px;
  font-weight: 700;
}

.nx-user strong {
  display: block;
  font-size: 10.4px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nx-user span {
  color: #8c8c93;
  font-size: 8.8px;
  font-weight: 500;
}

.nx-topbar {
  height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 248, 250, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nx-topbar h1 {
  margin: 2px 0 0;
  font-family: var(--font-sf);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.nx-breadcrumb {
  font-size: 11px;
  color: var(--muted);
}

.nx-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filtro de período — pill, ícone calendário + chevron */
.nx-topbar-date {
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  padding: 0 16px 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid #e2e4ea;
  background: #fff;
  color: #1e293b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nx-topbar-date:hover {
  background: #fafbfc;
  border-color: #d4d8e0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.nx-topbar-date__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
  stroke-width: 2;
}

.nx-topbar-date__chev {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94a3b8;
  stroke-width: 2;
}

/* Notificações — quadrado bem arredondado + badge */
.nx-topbar-notify {
  position: relative;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid #e2e4ea;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nx-topbar-notify:hover {
  background: #fafbfc;
  border-color: #d4d8e0;
}

.nx-topbar-notify svg {
  width: 20px;
  height: 20px;
}

.nx-topbar-notify__dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

/* CTA principal — pill + gradiente teal */
.nx-topbar-cta {
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  padding: 0 18px 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(105deg, #0c3d4d 0%, #156b7a 42%, #1fa3a8 100%);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px -2px rgba(12, 61, 77, 0.45), 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.nx-topbar-cta:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px -2px rgba(12, 61, 77, 0.5), 0 2px 8px rgba(15, 23, 42, 0.1);
}

.nx-topbar-cta:active {
  transform: scale(0.98);
}

.nx-topbar-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2.25;
}

/* Sair — mesmo “card” da notificação */
.nx-topbar-iconbtn {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid #e2e4ea;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-iconbtn:hover {
  background: #fafbfc;
  border-color: #d4d8e0;
}

.nx-topbar-iconbtn svg {
  width: 18px;
  height: 18px;
}

.nx-topbar-actions .nx-btn {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nx-topbar-actions .nx-btn-icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.nx-topbar-actions .nx-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nx-topbar-logout-form {
  display: flex;
  margin: 0;
}

/* Menu hambúrguer (topo direito) */
.nx-topbar-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.nx-topbar-menu-btn.is-open {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.nx-topbar-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e2e4ea;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.nx-topbar-menu-panel[hidden] {
  display: none !important;
}

.nx-topbar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.nx-topbar-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #64748b;
}

.nx-topbar-menu-item:hover {
  background: #f1f5f9;
}

.nx-topbar-menu-item--danger {
  color: #b42318;
}

.nx-topbar-menu-item--danger svg {
  color: #dc2626;
}

.nx-topbar-menu-item--danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* Sidebar mobile + backdrop */
.nx-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nx-sidebar-backdrop.is-open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.nx-sidebar-open {
  overflow: hidden;
}

.nx-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  background: #fff;
  cursor: pointer;
}

.nx-btn-soft {
  font-size: 13px;
}

.nx-btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
}

.nx-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  border: 0;
}

.nx-btn-block {
  width: 100%;
}

.nx-grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.nx-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.nx-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
}

.nx-kpi--neutral::before {
  background: linear-gradient(140deg, rgba(59, 130, 246, 0.07), rgba(255, 255, 255, 0) 58%);
}

.nx-kpi--mint::before {
  background: linear-gradient(140deg, rgba(16, 185, 129, 0.1), rgba(255, 255, 255, 0) 58%);
}

.nx-kpi-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nx-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.86);
}

.nx-kpi-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #1f2937;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-kpi small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nx-kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  font-family: var(--font-sf);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.nx-kpi span {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 0;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.nx-kpi .up {
  background: #e8f8ef;
  color: var(--success);
}

.nx-kpi .down {
  background: #fdeaea;
  color: var(--danger);
}

.nx-kpi-sparkline {
  width: calc(100% + 8px);
  height: 52px;
  margin: 8px -4px 0;
  display: block;
  position: relative;
  z-index: 1;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.nx-kpi-sparkline polyline {
  vector-effect: non-scaling-stroke;
}

.nx-kpi-sparkline.up {
  stroke: var(--success);
}

.nx-kpi-sparkline.down {
  stroke: var(--danger);
}

.nx-kpi-sparkline-fill {
  stroke: none;
}

.nx-kpi-sparkline.up .nx-kpi-sparkline-fill {
  fill: rgba(31, 157, 91, 0.18);
}

.nx-kpi-sparkline.down .nx-kpi-sparkline-fill {
  fill: rgba(209, 67, 67, 0.17);
}

.nx-grid-main {
  display: grid;
  grid-template-columns: 1.296fr 1.452fr;
  gap: 14px;
  margin-bottom: 14px;
  min-width: 0;
}

.nx-grid-main > * {
  min-width: 0;
}

.nx-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.nx-panel-head {
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.nx-panel h3 {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.25;
  color: #1a202c;
}

.nx-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.nx-funnel-demo {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.nx-funnel-bars {
  padding: 12px 16px 16px;
}

.nx-funnel-row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(10rem, 1fr) minmax(3.25rem, auto);
  align-items: center;
  gap: 10px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eff2f6;
  font-size: 14px;
}

.nx-funnel-row:last-child {
  border-bottom: 0;
}

.nx-funnel-label {
  color: #374151;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-funnel-bar-cell {
  position: relative;
  min-width: 10rem;
}

.nx-funnel-track {
  position: relative;
  height: 40px;
  border-radius: 10px;
  background: #e9edf2;
  overflow: hidden;
}

.nx-funnel-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 10px;
  min-width: 3px;
  transition: width 0.65s ease;
}

.nx-funnel-fill--1 {
  background: #0c2745;
}
.nx-funnel-fill--2 {
  background: #2563eb;
}
.nx-funnel-fill--3 {
  background: #5b7c99;
}
.nx-funnel-fill--4 {
  background: #9eb5e8;
}
.nx-funnel-fill--5 {
  background: #16a34a;
}

.nx-funnel-pct {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.nx-funnel-pct--t1,
.nx-funnel-pct--t2,
.nx-funnel-pct--t3,
.nx-funnel-pct--t5 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.nx-funnel-pct--t4 {
  color: #0f172a;
}

.nx-funnel-val {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.nx-funnel ul {
  margin: 0;
  padding: 14px 16px;
  list-style: none;
}

.nx-funnel li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #eff2f6;
  font-size: 14px;
}

.nx-funnel li:last-child {
  border-bottom: 0;
}

/* Painel Conversas Recentes (dashboard Blade) */
.nx-conversations.nx-rc-card {
  background: #fff;
  border-color: #e5e5ea;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.nx-rc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 20px;
  border-bottom: 1px solid #f0f0f3;
}

.nx-rc-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a202c;
  line-height: 1.25;
}

.nx-rc-head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #718096;
}

.nx-rc-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #2b6cb0;
  text-decoration: none;
  padding: 4px 2px;
  border-radius: 4px;
}

.nx-rc-link:hover {
  color: #2c5282;
  text-decoration: underline;
}

.nx-rc-list {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0 8px 8px;
  overflow-x: hidden;
}

.nx-rc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 8px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #f0f0f3;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
  overflow-x: hidden;
}

a.nx-rc-row {
  cursor: pointer;
}

.nx-rc-row:last-child {
  border-bottom: 0;
}

.nx-rc-row:hover {
  background: #f5f5f7;
}

.nx-rc-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.nx-rc-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e5e5ea;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.nx-rc-avatar__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.nx-rc-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.nx-rc-avatar--0 {
  background: #4a6984;
}
.nx-rc-avatar--1 {
  background: #43919b;
}
.nx-rc-avatar--2 {
  background: #4b86a8;
}
.nx-rc-avatar--3 {
  background: #38a169;
}
.nx-rc-avatar--4 {
  background: #d69e2e;
}

.nx-rc-status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-sizing: border-box;
}

.nx-rc-status-dot--0 {
  background: #e53e3e;
}
.nx-rc-status-dot--1 {
  background: #d69e2e;
}
.nx-rc-status-dot--2 {
  background: #a0aec0;
}

.nx-rc-body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.nx-rc-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

/* Conexoes */
.nx-connections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nx-connections-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a202c;
}

.nx-connections-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #718096;
}

.nx-connections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.nx-connection-card {
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 196px;
}

.nx-connection-card--whatsapp-business {
  background: #f0fdf4;
  border-color: #cdeed8;
}

.nx-connection-card--instagram {
  background: #fdf2f8;
  border-color: #f2d2e5;
}

.nx-connection-card--qrcode {
  background: #fffbeb;
  border-color: #f5e4a8;
}

.nx-connection-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.nx-connection-card__title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.nx-connection-card__mini-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  flex-shrink: 0;
}

.nx-connection-card__mini-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-connection-card__mini-icon--wa {
  background: #d4f5df;
}

.nx-connection-card__mini-icon--wa svg {
  stroke: #16a34a;
}

.nx-connection-card__mini-icon--ig {
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}

.nx-connection-card__mini-icon--ig svg {
  stroke: #fff;
}

.nx-connection-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #1a202c;
  font-family: var(--font-sf);
  font-weight: 700;
}

.nx-connection-card small {
  margin-top: 2px;
  font-size: 11px;
  color: #718096;
}

.nx-connection-card p {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #718096;
}

.nx-connection-tag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.nx-whatsapp-logout-policy {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.nx-whatsapp-logout-policy .nx-switch-track {
  width: 2rem;
  height: 1.1rem;
}

.nx-whatsapp-logout-policy .nx-switch-track::after {
  width: 0.8rem;
  height: 0.8rem;
  top: 0.15rem;
  left: 0.15rem;
}

.nx-whatsapp-logout-policy .nx-switch-input:checked + .nx-switch-track::after {
  transform: translateX(0.9rem);
}

.nx-whatsapp-logout-policy-label {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
  color: #64748b;
  font-weight: 700;
}

.nx-connection-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #f3cf84;
  background: #fff2cc;
  color: #946200;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
}

.nx-connection-warning {
  margin-top: 10px;
  border: 1px solid #f4e29d;
  background: #fff5d8;
  color: #8a6a00;
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.35;
}

.nx-connection-warning svg {
  width: 12px;
  height: 12px;
  stroke: #d97706;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

.nx-connection-btn {
  margin-top: auto;
  min-height: 34px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  line-height: 1;
}

.nx-connection-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-connection-btn--pink {
  background: #e11d8d;
  color: #fff;
}

.nx-connection-btn--pink svg {
  stroke: #fff;
}

.nx-connection-btn--pink:hover {
  background: #c9157a;
}

.nx-connection-btn--outline {
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
}

.nx-connection-btn--outline svg {
  stroke: #1f2937;
}

.nx-connection-btn--outline:hover {
  background: #f8fafc;
}

.nx-connection-btn--secondary {
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
}

.nx-connection-btn--secondary:hover {
  background: #f8fafc;
}

/* Conversas > WhatsApp */
.nx-whatsapp-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nx-whatsapp-page__header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a202c;
}

.nx-whatsapp-page__header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #718096;
}

/* Conversas > Instagram — título + selo de conta à direita */
.nx-ig-page__header .nx-ig-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
}

.nx-ig-page__header .nx-ig-header__titles {
  min-width: 0;
  flex: 1 1 auto;
}

.nx-ig-connected-badge {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nx-ig-connected-badge__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  border: none;
  box-shadow: none;
}

.nx-ig-connected-badge__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #166534;
}

.nx-ig-connected-badge__handle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #14532d;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .nx-ig-connected-badge {
    margin-left: 0;
    width: 100%;
  }

  .nx-ig-connected-badge__inner {
    align-items: flex-start;
    width: 100%;
  }

  .nx-ig-connected-badge__handle {
    max-width: 100%;
  }
}

.nx-whatsapp-alert {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.nx-whatsapp-alert--success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.nx-whatsapp-alert--info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.nx-connection-instagram-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.nx-connection-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-connection-form-field label {
  font-size: 11px;
  font-weight: 600;
  color: #4a5568;
}

.nx-connection-form-field input[type="email"],
.nx-connection-form-field input[type="password"] {
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}

.nx-connection-form-field input:focus {
  outline: none;
  border-color: #dd2a7b;
  box-shadow: 0 0 0 2px rgba(221, 42, 123, 0.12);
}

.nx-connection-form-error {
  font-size: 11px;
  color: #b91c1c;
}

.nx-connection-instagram-actions {
  margin-top: 10px;
}

/* Carregamento partilhado (WhatsApp + Instagram) — mesmo layout nos cartões e na página preparar */
.nx-connection-card--qrcode,
.nx-connection-card--instagram {
  position: relative;
}

.nx-conn-preparing-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: stretch;
  padding: 14px 12px;
  border-radius: inherit;
  background: rgba(255, 251, 235, 0.96);
  border: 1px solid #f5e4a8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nx-conn-preparing-shell {
  margin: 0 auto;
  max-width: 520px;
  padding: 22px 18px;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.96);
  border: 1px solid #f5e4a8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.nx-conn-connection-loading {
  width: 100%;
  padding: 8px 4px;
  display: grid;
  gap: 6px;
}

.nx-conn-connection-loading strong {
  font-size: 13px;
  color: #166534;
}

.nx-conn-connection-loading span {
  font-size: 12px;
  color: #4b5563;
}

.nx-conn-connection-loading__bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #d9f99d;
  overflow: hidden;
}

.nx-conn-connection-loading__bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.15s linear;
}

@keyframes nx-conn-bar-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

.nx-conn-connection-loading__bar--indeterminate {
  position: relative;
}

.nx-conn-connection-loading__bar--indeterminate i {
  width: 38%;
  max-width: 140px;
  transition: none;
  animation: nx-conn-bar-indeterminate 1.35s ease-in-out infinite;
}

.nx-conn-connection-loading__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}

.nx-conn-connection-loading__meta b {
  font-size: 12px;
  color: #15803d;
}

.nx-conn-connection-loading__meta em {
  font-style: normal;
}

.nx-whatsapp-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.nx-whatsapp-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  --nx-wa-panel-height: 620px;
}

.nx-whatsapp-chat-panel,
.nx-whatsapp-contacts-panel {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 25px -20px rgba(15, 23, 42, 0.45), 0 6px 14px -12px rgba(15, 23, 42, 0.25);
  padding: 14px;
  height: var(--nx-wa-panel-height);
  min-height: var(--nx-wa-panel-height);
  max-height: var(--nx-wa-panel-height);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nx-whatsapp-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.nx-whatsapp-chat-head h3 {
  margin: 0;
  font-size: 17px;
}

.nx-ig-chat-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -4px 0 10px;
  flex-shrink: 0;
}

.nx-ig-delete-chat-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
}

.nx-ig-delete-chat-btn:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
}

.nx-ig-delete-chat-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nx-ig-context-menu {
  position: fixed;
  z-index: 12000;
  min-width: 180px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.35);
}

.nx-ig-context-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
}

.nx-ig-context-menu__item:hover {
  background: #fef2f2;
}

.nx-whatsapp-chat-body {
  border: 1px solid #edf1f5;
  border-radius: 14px;
  background: #efeae2;
  padding: 12px;
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-wa-bubble {
  align-self: flex-start;
  max-width: min(82%, 560px);
  min-width: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 7px 8px;
  box-shadow: 0 6px 16px -14px rgba(15, 23, 42, 0.45);
}

.nx-wa-bubble.is-me {
  align-self: flex-end;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
}

.nx-wa-bubble__who {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.nx-wa-bubble.is-me .nx-wa-bubble__who {
  color: #166534;
  text-align: right;
}

.nx-ig-media {
  margin-top: 6px;
  max-width: 100%;
}

.nx-ig-media img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: contain;
}

.nx-ig-media audio,
.nx-ig-media video {
  max-width: 100%;
}

.nx-ig-media__file {
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
}

.nx-ig-media--file.nx-ig-media--file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d8e2eb;
  border-radius: 8px;
  min-width: 0;
}

.nx-ig-media__fname {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-ig-media__dl {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nx-ig-media__dl:hover {
  background: rgba(13, 148, 136, 0.2);
  color: #0d5c54;
}

.nx-ig-media__dl svg {
  display: block;
}

button.nx-ig-media-lightbox-trigger {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  display: block;
  max-width: 100%;
  border-radius: 8px;
  appearance: none;
}

.nx-ig-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.nx-ig-media-lightbox[hidden] {
  display: none !important;
}

.nx-ig-media-lightbox__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.nx-ig-media-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: min(92vh, 900px);
  pointer-events: none;
}

.nx-ig-media-lightbox__frame img {
  pointer-events: auto;
  display: block;
  max-width: 100%;
  max-height: min(92vh, 900px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.nx-ig-media-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.nx-ig-link {
  margin-top: 6px;
  font-size: 12px;
}

.nx-ig-link a {
  color: #0f766e;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.nx-ig-placeholder {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

.nx-wa-bubble__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.nx-wa-bubble p {
  margin: 0;
  font-size: 12px;
  color: #1f2937;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.nx-wa-bubble .nx-wa-msg-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.nx-wa-bubble.is-me .nx-wa-msg-link {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nx-wa-bubble.is-me .nx-wa-msg-link:visited {
  color: #5b21b6;
}

.nx-wa-bubble.is-me .nx-wa-msg-link:hover {
  color: #1e3a8a;
}

.nx-wa-bubble.is-me .nx-wa-msg-link:active {
  color: #172554;
}

.nx-wa-bubble small {
  margin-top: 3px;
  display: block;
  font-size: 10px;
  color: #64748b;
  text-align: right;
}

.nx-wa-day-separator {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
}

.nx-wa-day-separator span {
  background: #dff5ff;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #ccecf9;
}

.nx-wa-media-link {
  display: inline-block;
  text-decoration: none;
  max-width: 100%;
}

button.nx-wa-media-link.nx-wa-media-lightbox-trigger {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  appearance: none;
  text-align: inherit;
}

.nx-wa-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.nx-wa-media-lightbox[hidden] {
  display: none !important;
}

.nx-wa-media-lightbox__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.nx-wa-media-lightbox__frame {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.nx-wa-media-lightbox__frame img {
  pointer-events: auto;
}

.nx-wa-media-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(92vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.nx-wa-media-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.nx-wa-media-lightbox__close:hover {
  background: #f1f5f9;
}

.nx-wa-media-wrap--video {
  width: fit-content;
  max-width: min(100%, 280px);
  align-self: flex-start;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

/** Bolha enviada: mídia centrada com respiro igual à esquerda e à direita (evita faixa vazia larga). */
.nx-wa-bubble.is-me .nx-wa-media-wrap--video {
  align-self: center;
  margin-inline: auto;
}

.nx-wa-bubble.is-me .nx-wa-media-link {
  align-self: center;
  margin-inline: auto;
}

.nx-wa-bubble.is-me .nx-wa-media--audio {
  align-self: center;
  margin-inline: auto;
}

.nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video) {
  padding: 5px 6px;
}

/** Bolha enviada com vídeo/imagem: largura ajusta à mídia (evita “bordas” vazias grandes nas laterais). */
.nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video),
.nx-wa-bubble.is-me:has(.nx-wa-media-link) {
  width: fit-content;
  max-width: min(82%, 560px);
}

.nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video) .nx-wa-media-wrap--video {
  max-width: 100%;
}

.nx-wa-media {
  display: block;
  max-width: min(100%, 280px);
  border-radius: 8px;
  background: #fff;
}

.nx-wa-media--image {
  max-height: 280px;
  object-fit: cover;
}

.nx-wa-media--video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  vertical-align: bottom;
  background: #0f172a;
}

.nx-wa-media--audio {
  width: 100%;
  min-width: 240px;
  max-width: 320px;
}

@media (orientation: landscape) {
  .nx-whatsapp-chat-body {
    padding: 10px 8px;
  }

  .nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video),
  .nx-wa-bubble.is-me:has(.nx-wa-media-link) {
    max-width: min(75vw, 420px);
    padding-inline: 5px;
  }

  .nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video) .nx-wa-media-wrap--video {
    max-width: min(72vw, 380px);
  }

  .nx-wa-bubble.is-me:has(.nx-wa-media-link) .nx-wa-media--image {
    max-width: min(72vw, 380px);
  }

  .nx-wa-bubble.is-me:has(.nx-wa-media-wrap--video) .nx-wa-media--video {
    max-height: min(48vh, 300px);
  }
}

.nx-wa-doc,
.nx-wa-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid #d8e2eb;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}

.nx-wa-doc__name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-wa-doc__download {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nx-wa-doc__download:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #1e3a8a;
}

.nx-wa-doc__icon {
  display: block;
}

.nx-wa-location strong {
  font-size: 11px;
  color: #2563eb;
}

.nx-whatsapp-compose {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nx-ig-compose {
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.nx-ig-compose.nx-ig-compose--wa-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-wa-voice-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.nx-wa-voice-status.is-recording {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.nx-wa-voice-status.is-sending {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/** Só durante envio — sem bolinha vermelha na gravação. */
.nx-wa-voice-status__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #93c5fd;
  border-top-color: #1d4ed8;
  flex-shrink: 0;
  animation: nx-wa-voice-spin 0.85s linear infinite;
}

.nx-wa-voice-status.is-sending .nx-wa-voice-status__spinner {
  display: block;
}

@keyframes nx-wa-voice-spin {
  to {
    transform: rotate(360deg);
  }
}

.nx-wa-voice-status__time {
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  font-weight: 700;
  opacity: 0.95;
}

.nx-wa-upload-status {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

/* display:grid no bloco anula o atributo [hidden] em vários browsers — força ocultar quando fechado */
.nx-wa-upload-status[hidden] {
  display: none !important;
}

.nx-wa-upload-status__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.nx-wa-upload-status__head strong {
  font-variant-numeric: tabular-nums;
}

.nx-wa-upload-status__bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #dbeafe;
}

.nx-wa-upload-status__bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
  transition: width 0.15s ease;
}

.nx-ig-action-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.nx-ig-window-cta {
  margin-top: 12px;
  border: 1px solid #fecaca;
  background: #fff7ed;
  border-radius: 10px;
  padding: 10px 12px;
  gap: 4px;
}

.nx-ig-window-cta strong {
  color: #b91c1c;
  font-size: 12px;
}

.nx-ig-window-cta span {
  color: #7f1d1d;
  font-size: 12px;
}

.nx-ig-compose__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.nx-ig-compose__row input[type="text"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  padding: 10px 8px;
  font-size: 13px;
  line-height: 1.25;
}

.nx-ig-compose__row input[type="text"]::placeholder {
  color: #6b7280;
  opacity: 1;
}

.nx-ig-compose__row input[type="text"]:focus {
  outline: none;
}

.nx-ig-compose__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nx-ig-action-btn,
.nx-ig-compose__send {
  height: 34px;
  width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
}

.nx-ig-action-btn svg,
.nx-ig-compose__send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nx-ig-action-btn:hover {
  background: rgba(148, 163, 184, 0.14);
  color: #334155;
}

/** Microfone: botão vermelho sólido (como “enviar”) para ser óbvio que é clicável. */
.nx-ig-action-btn.nx-wa-action-audio-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 14px -8px rgba(220, 38, 38, 0.65);
}

.nx-ig-action-btn.nx-wa-action-audio-btn:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: #fff;
  filter: brightness(1.02);
}

.nx-ig-action-btn.nx-wa-action-audio-btn svg {
  fill: currentColor;
}

/** Durante gravação: ondas animadas no lugar do ícone (efeito tipo equalizador). */
.nx-wa-audio-btn__mic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nx-wa-audio-btn__waves {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 18px;
  padding: 0 1px;
}

.nx-ig-action-btn.nx-wa-audio-btn--recording .nx-wa-audio-btn__mic {
  display: none;
}

.nx-ig-action-btn.nx-wa-audio-btn--recording .nx-wa-audio-btn__waves {
  display: flex;
}

.nx-ig-action-btn.nx-wa-audio-btn--recording {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(185, 28, 28, 0.75);
}

.nx-wa-audio-wave {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  animation: nx-wa-audio-wave-bar 0.85s ease-in-out infinite;
}

.nx-wa-audio-wave--2 {
  animation-delay: 0.1s;
}

.nx-wa-audio-wave--3 {
  animation-delay: 0.2s;
}

.nx-wa-audio-wave--4 {
  animation-delay: 0.3s;
}

@keyframes nx-wa-audio-wave-bar {
  0%,
  100% {
    height: 4px;
    opacity: 0.75;
  }

  50% {
    height: 16px;
    opacity: 1;
  }
}

.nx-ig-compose__send {
  flex: 0 0 auto;
  min-width: 34px;
  background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 16px -12px rgba(14, 165, 233, 0.7);
}

.nx-ig-compose__send:hover {
  filter: brightness(1.03);
}

.nx-ig-compose--wa-recording .nx-ig-compose__send {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 8px 16px -12px rgba(220, 38, 38, 0.72);
}

.nx-ig-compose-attach-wrap {
  position: relative;
}

.nx-ig-attach-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 188px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.2);
  padding: 6px;
  z-index: 40;
}

.nx-ig-attach-menu[hidden] {
  display: none !important;
}

.nx-ig-attach-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 13px;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
}

.nx-ig-attach-menu__item:hover {
  background: #f1f5f9;
}

.nx-ig-action-btn--stroke svg,
.nx-ig-action-btn--stroke svg path {
  fill: none;
}

.nx-whatsapp-contact-row {
  border-radius: 12px;
  padding: 11px 10px;
}

.nx-whatsapp-contact-row + .nx-whatsapp-contact-row {
  margin-top: 6px;
}

.nx-whatsapp-contact-row.is-active {
  border: 1px solid #bae6fd;
  background: linear-gradient(180deg, #f0f9ff 0%, #ecfeff 100%);
}

.nx-ig-contact-item {
  display: block;
}

.nx-ig-contact-item + .nx-ig-contact-item {
  margin-top: 6px;
}

.nx-whatsapp-compose-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
}

.nx-whatsapp-compose-row input[type="text"],
.nx-whatsapp-compose-row input[type="file"] {
  flex: 1;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  background: #fff;
  outline: none;
}

.nx-whatsapp-compose-row input[type="text"]:focus,
.nx-whatsapp-compose-row input[type="file"]:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.nx-wa-compose-hidden {
  display: none;
}

/**
 * Formulários só com inputs de ficheiro: `display:none` no antepassado
 * impede o diálogo nativo em vários browsers ao chamar input.click() desde um botão.
 */
.nx-wa-media-forms-offscreen {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nx-whatsapp-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  text-decoration: none;
  transition: all 0.16s ease;
}

.nx-whatsapp-row__main {
  flex: 1;
  min-width: 0;
}

.nx-wa-contact-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
  border: 1px solid #cbd5e1;
}

.nx-wa-contact-avatar__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  letter-spacing: -0.02em;
  z-index: 0;
}

.nx-wa-contact-avatar__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.nx-whatsapp-row__main strong {
  font-size: 13px;
  line-height: 1.2;
}

.nx-whatsapp-row__main small {
  font-size: 11px;
}

.nx-whatsapp-row__main p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.nx-whatsapp-contact-row:hover {
  border-color: #d6dee9;
  background: #f8fafc;
}

.nx-whatsapp-contact-row.is-active {
  border-color: #bfd3f7;
  background: #eff6ff;
}

button.nx-whatsapp-contact-row.nx-whatsapp-archived-footer {
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  font: inherit;
  color: inherit;
  margin-top: 6px;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

button.nx-whatsapp-contact-row.nx-whatsapp-archived-footer .nx-whatsapp-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
}

button.nx-whatsapp-contact-row.nx-whatsapp-archived-footer .nx-whatsapp-row__main strong,
button.nx-whatsapp-contact-row.nx-whatsapp-archived-footer .nx-whatsapp-row__main small {
  display: block;
  width: 100%;
  text-align: left;
  line-height: 1.25;
}

button.nx-whatsapp-contact-row.nx-whatsapp-archived-footer .nx-whatsapp-row__meta {
  flex: 0 0 auto;
  align-self: center;
  opacity: 0.85;
}

.nx-whatsapp-list-separator {
  margin: 8px 0 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nx-whatsapp-connect-card,
.nx-whatsapp-inbox-card {
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 16px;
}

.nx-whatsapp-connect-card h3,
.nx-whatsapp-inbox-card h3 {
  margin: 0;
  font-size: 18px;
  color: #1a202c;
}

.nx-whatsapp-connect-card__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #718096;
  line-height: 1.45;
}

.nx-whatsapp-status {
  margin-top: 12px;
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

.nx-whatsapp-status--ok {
  background: #dcfce7;
  color: #166534;
}

.nx-whatsapp-status--pending {
  background: #fef3c7;
  color: #92400e;
}

.nx-whatsapp-phone {
  margin: 8px 0 0;
  font-size: 12px;
  color: #374151;
}

.nx-whatsapp-qr-wrap {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 10px;
}

.nx-whatsapp-qr {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.nx-whatsapp-qr-empty {
  margin-top: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  font-size: 12px;
}

.nx-whatsapp-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.nx-whatsapp-actions form {
  flex: 1;
}

.nx-whatsapp-btn {
  width: auto;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 12px;
  letter-spacing: -0.01em;
  transition: all 0.18s ease;
}

.nx-whatsapp-btn--primary {
  background: linear-gradient(135deg, #e11d8d, #be0f75);
  color: #fff;
  box-shadow: 0 6px 18px -10px rgba(225, 29, 141, 0.75);
}

.nx-whatsapp-btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(225, 29, 141, 0.8);
}

.nx-whatsapp-btn--secondary {
  background: #fff;
  color: #334155;
  border-color: #d5dde8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-whatsapp-btn--secondary:hover {
  background: #f8fafc;
  border-color: #c8d3e3;
  transform: translateY(-1px);
}

.nx-whatsapp-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nx-whatsapp-inbox-head span {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.nx-whatsapp-inbox-empty {
  margin: 12px 0 0;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  font-size: 12px;
  color: #64748b;
}

.nx-whatsapp-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.nx-whatsapp-list::-webkit-scrollbar,
.nx-whatsapp-chat-body::-webkit-scrollbar {
  width: 8px;
}

.nx-whatsapp-list::-webkit-scrollbar-thumb,
.nx-whatsapp-chat-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.nx-whatsapp-list::-webkit-scrollbar-thumb:hover,
.nx-whatsapp-chat-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.nx-whatsapp-archived {
  margin-top: 2px;
}

.nx-whatsapp-archived-toggle {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #d8e2eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
  cursor: pointer;
}

.nx-whatsapp-archived-toggle::-webkit-details-marker {
  display: none;
}

.nx-whatsapp-archived-toggle em {
  font-style: normal;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
}

.nx-whatsapp-archived-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-whatsapp-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.nx-whatsapp-row__main strong {
  display: block;
  font-size: 13px;
  color: #1a202c;
}

.nx-whatsapp-row__main small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #718096;
}

.nx-whatsapp-row__main p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4b5563;
}

.nx-whatsapp-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.nx-whatsapp-row__meta em {
  font-style: normal;
  font-size: 10px;
  color: #94a3b8;
}

.nx-whatsapp-row__meta span {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e11d8d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.nx-whatsapp-footnote {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.nx-whatsapp-footnote code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 4px;
}

.nx-wa-context-menu {
  position: fixed;
  z-index: 2000;
  min-width: 170px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.55), 0 8px 16px -14px rgba(15, 23, 42, 0.3);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-wa-context-menu[hidden] {
  display: none !important;
}

.nx-wa-context-menu button {
  border: 0;
  background: transparent;
  color: #1f2937;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.nx-wa-context-menu button:hover {
  background: #f1f5f9;
}

.nx-wa-context-menu button.is-danger {
  color: #b91c1c;
}

.nx-wa-context-menu button.is-danger:hover {
  background: #fee2e2;
}

@media (max-width: 1260px) {
  .nx-connections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nx-whatsapp-grid {
    grid-template-columns: 1fr;
  }

  .nx-whatsapp-chat-grid {
    grid-template-columns: 1fr;
  }

  .nx-whatsapp-chat-grid {
    --nx-wa-panel-height: 560px;
  }
}

@media (max-width: 840px) {
  .nx-connections-grid {
    grid-template-columns: 1fr;
  }
}

.nx-rc-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-rc-time {
  flex-shrink: 0;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: #718096;
}

.nx-rc-company {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nx-rc-msg {
  display: -webkit-box;
  margin-top: 4px;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.45;
  color: #4a5568;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nx-rc-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  min-width: 26px;
}

.nx-rc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2c5282;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nx-rc-check {
  width: 18px;
  height: 18px;
  color: #cbd5e0;
}

.nx-rc-empty {
  margin: 0;
  padding: 40px 16px;
  text-align: center;
  font-size: 14px;
  color: #718096;
}

.pill {
  background: #e8f8ef;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

/* Oportunidades prioritárias (card) */
.nx-prio-card {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  padding: 24px;
}

.nx-prio-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.nx-prio-card__head-left {
  min-width: 0;
}

.nx-prio-card__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #c94e2c;
  margin-bottom: 4px;
}

.nx-prio-card__flame {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.nx-prio-card__title {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.nx-prio-card__meta {
  font-size: 11px;
  color: #86868b;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nx-prio-card__meta-num {
  font-weight: 600;
  color: #6e6e73;
}

.nx-prio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nx-prio-lead {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: #fbfbfd;
  border: 1px solid #e5e5ea;
  border-radius: 6px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nx-prio-lead:hover {
  border-color: rgba(61, 79, 124, 0.4);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(29, 29, 31, 0.06);
}

.nx-prio-lead:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nx-prio-lead__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.nx-prio-lead__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e5e5ea;
  flex-shrink: 0;
}

.nx-prio-lead__main {
  flex: 1;
  min-width: 0;
}

.nx-prio-lead__name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.nx-prio-lead__name {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-prio-lead__urgency {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.nx-prio-lead__urgency--alta {
  color: #c94e2c;
  border-color: rgba(201, 78, 44, 0.3);
  background: rgba(201, 78, 44, 0.08);
}

.nx-prio-lead__urgency--media {
  color: #c47a0f;
  border-color: rgba(196, 122, 15, 0.3);
  background: rgba(196, 122, 15, 0.08);
}

.nx-prio-lead__company {
  font-size: 11px;
  color: #86868b;
  margin-bottom: 8px;
}

.nx-prio-lead__value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.nx-prio-lead__value {
  font-family: var(--font-sf);
  font-size: 16px;
  font-weight: 700;
  color: #3d4f7c;
}

.nx-prio-lead__stage {
  font-size: 10.5px;
  color: #6e6e73;
  flex-shrink: 0;
}

.nx-prio-lead__note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e5ea;
  font-size: 11.5px;
  line-height: 1.5;
  color: #6e6e73;
  padding-right: 28px;
}

.nx-prio-lead__arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 14px;
  height: 14px;
  color: #86868b;
  pointer-events: none;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.nx-prio-lead:hover .nx-prio-lead__arrow {
  color: #3d4f7c;
  transform: translateX(2px);
}

.nx-dashboard-with-ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(378px, 35.7%);
  gap: 16px;
  align-items: start;
}

.nx-dashboard-with-ai > .nx-module-main {
  grid-column: 1;
  min-width: 0;
}

.nx-dashboard-with-ai > .nx-ai-panel-slot {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 64px - 52px);
  max-height: calc(100dvh - 64px - 52px);
}

.nx-ai-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #eef3f6;
  padding: 0;
  height: 100%;
  max-height: inherit;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.nx-ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.nx-ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #177e8e, #2f99aa);
  box-shadow: 0 4px 14px rgba(23, 126, 142, 0.3);
}

.nx-ai-header h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nx-ai-header h4 span {
  font-size: 9px;
  font-weight: 700;
  color: #177e8e;
  margin-left: 5px;
  letter-spacing: 0.08em;
  vertical-align: 0.15em;
}

.nx-ai-header p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.nx-ai-focus {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.nx-ai-focus small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.nx-ai-focus p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.nx-ai-focus strong {
  color: #0c7894;
}

.nx-ai-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.nx-ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.nx-ai-card-head span {
  font-size: 10px;
  font-weight: 700;
  background: #e6f4f6;
  color: #0e6577;
  border-radius: 999px;
  padding: 3px 7px;
}

.nx-ai-card-head em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.nx-ai-card h5 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nx-ai-card p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.nx-ai-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nx-ai-actions button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a7f8f, #289aa9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  min-width: 132px;
}

.nx-ai-actions a {
  color: #3f434b;
  text-decoration: none;
  font-size: 11px;
}

.nx-ai-footnote {
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.nx-ai-input-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.nx-ai-input {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.nx-ai-input input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--fg);
  outline: none;
}

.nx-ai-input input::placeholder {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

.nx-ai-input-actions {
  padding: 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nx-ai-input-actions > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nx-ai-input-actions button {
  border: 0;
  background: transparent;
  color: #5d6671;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 7px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.nx-ai-input-actions > div:first-child button:hover {
  background: #edf2f6;
}

.nx-ai-input-right button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #69707c;
}

.nx-ai-input-right button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-ai-input-right button:hover {
  background: #edf2f6;
}

.nx-ai-input-right .is-send {
  background: linear-gradient(135deg, #1a7f8f, #289aa9);
  color: #fff;
  border-radius: 999px;
}

.nx-ai-input-right .is-send:hover {
  filter: brightness(1.05);
  background: linear-gradient(135deg, #1a7f8f, #289aa9);
}

.nx-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.nx-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 28px;
}

.nx-login-head h1 {
  margin: 0;
  font-family: var(--font-sf);
}

.nx-login-head p {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.nx-alert {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  color: #9f2222;
  background: #fff2f2;
  border: 1px solid #ffd4d4;
}

.nx-login-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.nx-login-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* Empilha o painel IA só quando a área útil do conteúdo é estreita (não a largura da janela). */
@container nx-page (max-width: 720px) {
  .nx-dashboard-with-ai {
    grid-template-columns: 1fr;
  }

  .nx-dashboard-with-ai > .nx-module-main,
  .nx-dashboard-with-ai > .nx-ai-panel-slot {
    grid-column: 1;
  }

  .nx-dashboard-with-ai > .nx-ai-panel-slot {
    position: static;
    max-height: none;
    order: 2;
  }

  .nx-dashboard-with-ai > .nx-module-main {
    order: 1;
  }
}

@media (max-width: 1024px) {
  .nx-grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .nx-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: min(280px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
  }

  .nx-sidebar.is-open {
    transform: translateX(0);
  }
  .nx-grid-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nx-prio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nx-grid-kpi {
    grid-template-columns: 1fr;
  }
  .nx-topbar {
    height: auto;
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nx-topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* —— Módulo Leads (formulário universal) —— */
.nx-h1,
.nx-h2,
.nx-h3,
.nx-h4 {
  font-family: var(--font-sf);
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #1a202c;
}
.nx-h1 { font-size: 1.875rem; font-weight: 600; margin: 0 0 0.5rem; line-height: 1.2; }
.nx-h2 { font-size: 1.5rem; font-weight: 600; margin: 0 0 0.4rem; line-height: 1.25; }
.nx-h3 { font-size: 1.1875rem; font-weight: 600; margin: 0 0 0.3rem; line-height: 1.3; }
.nx-h4 { font-size: 1.0625rem; font-weight: 600; margin: 0; line-height: 1.35; }
.nx-text-muted { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.nx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cadastro de lead: coluna principal + painel IA (como no dashboard) */
.nx-lead-wizard-with-ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: start;
}
.nx-lead-wizard-main {
  min-width: 0;
}

.nx-lead-wizard-root {
  min-width: 0;
}
.nx-lead-wizard-root:not(.nx-lead-wizard-root--errors) .nx-lead-step:not(.is-active) {
  display: none !important;
}
.nx-lead-wizard-root--errors .nx-lead-step {
  display: block !important;
}

.nx-lead-wizard-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.nx-lead-steps {
  flex: 1;
  min-width: 0;
}
.nx-lead-steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.5rem;
}
.nx-lead-steps__item {
  flex: 1 1 0;
  min-width: 4.5rem;
  max-width: 8rem;
}
.nx-lead-steps__btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #64748b;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nx-lead-steps__btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}
.nx-lead-steps__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nx-lead-steps__n {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid #cbd5e1;
  background: #fff;
  color: #475569;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.nx-lead-steps__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
}
.nx-lead-steps__item.is-active .nx-lead-steps__btn {
  color: var(--primary);
}
.nx-lead-steps__item.is-active .nx-lead-steps__n {
  border-color: var(--primary);
  background: rgba(23, 126, 142, 0.12);
  color: #0f766e;
}
.nx-lead-steps__item.is-done .nx-lead-steps__n {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.nx-lead-wizard-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.65rem 0;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  border-top: 1px solid var(--border);
}
.nx-lead-wizard-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.nx-lead-wizard-saves {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.nx-lead-actions-wizard {
  margin-bottom: 0;
}
.nx-btn-modern {
  min-width: 8.75rem;
  height: 2.5rem;
  padding: 0 1.05rem;
  border-radius: 13px;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.nx-btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
  filter: saturate(1.03);
}

.nx-ai-panel--lead {
  top: 0.5rem;
}
.nx-ai-card--muted {
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 1024px) {
  .nx-lead-wizard-with-ai {
    grid-template-columns: 1fr;
  }
  .nx-ai-panel--lead {
    position: static;
    max-height: none;
  }
}

.nx-lead-header { margin-bottom: 1.25rem; }
.nx-lead-header--row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.nx-btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nx-badge-soft {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  vertical-align: middle;
}
.nx-pill-ghost {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: #eef2f7;
  color: #64748b;
  margin-left: 0.25rem;
}
.nx-form-stack { display: flex; flex-direction: column; gap: 1.1rem; }
.nx-lead-form .nx-lead-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem;
  position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.nx-lead-wizard-footer--errors.nx-lead-actions {
  position: static;
  border-top: 0;
  margin-top: 0.5rem;
  padding-top: 0;
}
.nx-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1.15rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.nx-card-title { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.9rem; color: #0f172a; }
.nx-form-grid { display: grid; gap: 0.9rem 1rem; }
.nx-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nx-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .nx-form-grid--2, .nx-form-grid--3 { grid-template-columns: 1fr; }
}
.nx-field--2col { grid-column: 1 / -1; }
.nx-field--row-start { grid-column: 1; }
.nx-field { display: flex; flex-direction: column; gap: 0.35rem; }
.nx-field--inline-cta { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.nx-flex-grow { flex: 1; min-width: 12rem; }
.nx-label { font-size: 0.75rem; font-weight: 600; color: #334155; }
.nx-input,
.nx-select,
.nx-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  color: var(--fg);
}
.nx-textarea { min-height: 4.5rem; resize: vertical; }
.nx-cep-line { display: flex; flex-direction: column; gap: 0.25rem; }
.nx-hint { font-size: 0.72rem; color: #94a3b8; }
.nx-legal { font-size: 0.72rem; color: #94a3b8; margin: 0.5rem 0 0; }
.nx-legal code { background: #f1f5f9; padding: 0.05rem 0.2rem; border-radius: 4px; }
.nx-dialog { border: 1px solid var(--border); border-radius: 16px; padding: 0; max-width: 400px; width: calc(100% - 2rem); }
.nx-dialog::backdrop { background: rgba(15, 23, 42, 0.4); }
.nx-dialog__inner { padding: 1.1rem; }
.nx-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; margin-top: 0.6rem; }
.nx-campaign-placeholder { max-width: 32rem; }
.nx-filters { margin-bottom: 1.1rem; }
.nx-filters__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.nx-filters__toggle {
  font: inherit; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 0.45rem 0.7rem; cursor: pointer; color: var(--fg);
}
.nx-filters__download { font-size: 0.8rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.nx-filters__box { border: 1px solid var(--border); background: #fff; border-radius: 14px; padding: 0.9rem; }
.nx-filters__box[data-closed="1"] { display: none; }
.nx-filters__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nx-table-wrap { border: 1px solid var(--border); background: #fff; border-radius: 14px; overflow: auto; }
.nx-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.nx-table th { text-align: left; padding: 0.6rem 0.75rem; background: #f8fafc; color: #475569; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.nx-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.nx-td-nowrap { white-space: nowrap; }
.nx-td-empty { text-align: center; color: #94a3b8; padding: 1.5rem !important; }
.nx-th-sort { color: var(--primary); text-decoration: none; font-weight: 600; }
.nx-th-sort:hover { text-decoration: underline; }
.nx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.nx-form-inline { display: inline; margin: 0; }
.nx-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); font-weight: 600; font-size: 0.82rem; cursor: pointer; }
.nx-link.danger { color: var(--danger); }
.nx-toast { background: #e8f8ef; color: #166534; padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.9rem; margin: 0 0 0.8rem; }
.nx-toast--err { background: #fee2e2; color: #b91c1c; }
.nx-pager { margin-top: 0.75rem; }
.nx-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; }
.nx-pag-meta { color: var(--muted); }
.nx-pag-links { display: flex; align-items: center; gap: 0.5rem; }
.nx-pag-a { color: var(--primary); text-decoration: none; font-weight: 600; }
.nx-pag-ghost { color: #94a3b8; }
.nx-pag-page { color: #64748b; }
.nx-dl { display: grid; gap: 0.4rem; margin: 0; }
.nx-dl > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem; }
@media (max-width: 640px) { .nx-dl > div { grid-template-columns: 1fr; } }
.nx-dl dt { color: #64748b; font-size: 0.8rem; margin: 0; }
.nx-dl dd { margin: 0; font-weight: 500; }
.nx-dl--4 { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.nx-dl--4 > div { display: block; }
.nx-dl--4 dt { margin-bottom: 0.1rem; }
.nx-adr, .nx-p-note { line-height: 1.5; color: #334155; }

/* Interruptor ativo/inativo (origens) */
.nx-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  vertical-align: middle;
}
.nx-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.nx-switch-track {
  display: inline-block;
  width: 2.5rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
  position: relative;
  flex-shrink: 0;
}
.nx-switch-track::after {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}
.nx-switch-input:focus-visible + .nx-switch-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.nx-switch-input:checked + .nx-switch-track {
  background: var(--primary);
}
.nx-switch-input:checked + .nx-switch-track::after {
  transform: translateX(1.1rem);
}
