: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%;
  /* Escala global ~90%: equivale ao zoom 90% do Chrome (base anterior era 100%). */
  zoom: 0.9;
  /* Zoom no root + 100vh deixa ~10% de área vazia rolável abaixo do layout. */
  overflow: hidden;
}

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;
  overflow: auto;
}

/* App autenticado: a rolagem fica só em .nx-content (evita barra dupla / faixa branca). */
body.nx-body:has(.nx-shell) {
  overflow: hidden;
}

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

.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;
}

.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-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  text-decoration: none;
}

.nx-brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 53px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.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-left svg path,
.nx-nav-left svg circle,
.nx-nav-left svg rect,
.nx-nav-caret path {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

.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-comm-page {
  margin-top: 14px;
}

.nx-comm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.nx-comm-compose {
  display: grid;
  gap: 14px;
}

.nx-comm-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem 0;
}

.nx-comm-panel__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #eef2f8, #e0e7f1);
  color: #3d4f7c;
  flex-shrink: 0;
}

.nx-comm-panel__icon svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nx-comm-panel__body {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.2rem 1.2rem;
}

.nx-comm-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.nx-comm-field-head .nx-label {
  margin: 0;
}

.nx-comm-char-count {
  font-size: 0.78rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.nx-comm-panel__textarea {
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.55;
}

.nx-comm-preview {
  padding-top: 0.25rem;
}

.nx-comm-preview__label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nx-comm-preview__card {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nx-comm-preview__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.nx-comm-preview__card-head strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.nx-comm-preview__card-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #475569;
  white-space: pre-wrap;
}

.nx-comm-preview__card-meta {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.nx-comm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
}

.nx-comm-actions__sender {
  display: grid;
  gap: 0.1rem;
}

.nx-comm-actions__sender-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nx-comm-actions__sender strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.nx-comm-actions__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding-inline: 1.1rem;
}

.nx-comm-actions__submit svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.nx-comm-recipients-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 11rem);
  position: sticky;
  top: 0.75rem;
}

.nx-comm-recipients-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 0.75rem;
  border-bottom: 1px solid #eef2f6;
}

.nx-comm-recipients-panel__badge {
  flex-shrink: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.nx-comm-recipients-panel__badge.has-selection {
  background: #eef2f8;
  color: #3d4f7c;
}

.nx-comm-recipients-panel__toolbar {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid #eef2f6;
}

.nx-comm-search {
  position: relative;
  display: block;
}

.nx-comm-search svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  stroke: #94a3b8;
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.nx-comm-search .nx-input {
  width: 100%;
  padding-left: 2.35rem;
}

.nx-comm-recipients-panel__quick {
  justify-content: flex-end;
}

.nx-comm-recipients-panel__list {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1.15rem 1.1rem;
  overflow: auto;
  min-height: 0;
}

.nx-comm-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid #e8ecf1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nx-comm-user:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.nx-comm-user.is-selected {
  border-color: #3d4f7c;
  background: #f8faff;
  box-shadow: 0 4px 16px rgba(61, 79, 124, 0.1);
}

.nx-comm-user__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nx-comm-user__avatar {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(145deg, #dbe4f3, #c7d2e5);
  color: #3d4f7c;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nx-comm-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nx-comm-user__info {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.nx-comm-user__info strong {
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-comm-user__info span {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-comm-user__check {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nx-comm-user__check svg {
  width: 0.8rem;
  height: 0.8rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.nx-comm-user.is-selected .nx-comm-user__check {
  background: #3d4f7c;
  border-color: #3d4f7c;
  color: #fff;
}

.nx-comm-empty {
  grid-column: 1 / -1;
  padding: 1.5rem 0.75rem;
  text-align: center;
}

.nx-comm-empty p {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
}

@media (max-width: 980px) {
  .nx-comm-layout {
    grid-template-columns: 1fr;
  }

  .nx-comm-recipients-panel {
    position: static;
    max-height: none;
  }

  .nx-comm-recipients-panel__list {
    max-height: 360px;
  }
}

@media (max-width: 640px) {
  .nx-comm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nx-comm-actions__submit {
    justify-content: center;
    width: 100%;
  }
}

.nx-comm-history {
  margin-top: 14px;
  padding: 1.1rem 1.15rem 1.15rem;
}

.nx-comm-history__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e8edf4;
}

.nx-comm-history__hint {
  margin: 0;
  max-width: 22rem;
  font-size: 0.82rem;
  text-align: right;
}

.nx-comm-history__list {
  display: grid;
  gap: 0.65rem;
}

.nx-comm-history__item {
  padding: 0.9rem 1rem;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  background: #fbfcfe;
}

.nx-comm-history__item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.nx-comm-history__item-title {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.nx-comm-history__item-title strong {
  font-size: 0.92rem;
  color: #0f172a;
  line-height: 1.35;
}

.nx-comm-history__item-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.nx-comm-history__item-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
}

.nx-comm-history__item-body {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.nx-comm-history__item-foot {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
}

.nx-comm-history__item-recipients {
  font-size: 0.78rem;
  color: #64748b;
}

.nx-comm-history__empty {
  padding: 1.25rem 0.5rem;
}

@media (max-width: 768px) {
  .nx-comm-history__head {
    flex-direction: column;
  }

  .nx-comm-history__hint {
    max-width: none;
    text-align: left;
  }

  .nx-comm-history__item-head {
    flex-direction: column;
    gap: 0.35rem;
  }
}

.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-user-avatar-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.nx-user-avatar-upload {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  border: 1px dashed #c7ccda;
  background: #f6f8ff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.nx-user-avatar-upload__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nx-user-avatar-upload__ph {
  color: #52618e;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nx-user-avatar-upload__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nx-user-avatar-upload__hint {
  width: 100%;
  text-align: center;
  margin: 2px 0 0;
}

.nx-avatar-crop-dialog {
  max-width: min(520px, calc(100vw - 2rem));
  width: min(520px, calc(100vw - 2rem));
}

.nx-avatar-crop-dialog__inner {
  display: flex;
  flex-direction: column;
}

.nx-avatar-crop-stage {
  width: 100%;
  height: min(60vh, 420px);
  min-height: 280px;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}

.nx-avatar-crop-stage .nx-avatar-crop-image,
.nx-avatar-crop-stage .cropper-container,
.nx-avatar-crop-stage .cropper-wrap-box,
.nx-avatar-crop-stage .cropper-canvas,
.nx-avatar-crop-stage .cropper-drag-box,
.nx-avatar-crop-stage .cropper-crop-box,
.nx-avatar-crop-stage .cropper-view-box {
  max-width: none;
}

.nx-avatar-crop-image {
  display: block;
  max-width: none;
}

.nx-input.is-invalid {
  border-color: #c94e2c;
  box-shadow: 0 0 0 2px rgba(201, 78, 44, 0.12);
}

.nx-select.is-invalid,
.nx-quota-form .nx-input.is-invalid,
.nx-quota-form .nx-select.is-invalid {
  border-color: #c94e2c !important;
  box-shadow: 0 0 0 2px rgba(201, 78, 44, 0.14);
}

.nx-quota-form .nx-field.is-required-error .nx-input,
.nx-quota-form .nx-field.is-required-error .nx-select {
  border-color: #c94e2c;
  box-shadow: 0 0 0 2px rgba(201, 78, 44, 0.14);
}

.nx-quota-form .nx-field.is-required-error .nx-input-prefix-wrap .nx-input {
  border-color: #c94e2c;
}

.nx-topbar {
  position: relative;
  z-index: 100;
  min-height: 64px;
  flex-shrink: 0;
  border-bottom: 1px solid #e6e9ef;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
}

.nx-topbar__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.nx-topbar-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-menu-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.nx-topbar-menu-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.nx-topbar-menu-toggle svg line {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

.nx-topbar__page {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.nx-topbar__page-icon {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
}

.nx-topbar__page-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-topbar__lead {
  min-width: 0;
}

.nx-topbar__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.nx-topbar__title {
  margin: 0.15rem 0 0;
  font-family: var(--font-sf);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

.nx-topbar h1 {
  margin: 0.15rem 0 0;
  font-family: var(--font-sf);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

@media (min-width: 1025px) {
  .nx-topbar__title,
  .nx-topbar h1 {
    color: var(--primary);
  }
}

.nx-breadcrumb {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.nx-topbar__tools,
.nx-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.nx-topbar-chip,
.nx-topbar-date {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-chip:hover,
.nx-topbar-date:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.nx-topbar-google {
  position: relative;
}

.nx-topbar-chip--google.is-active {
  border-color: #4285f4;
  color: #1a73e8;
  background: #e8f0fe;
}

.nx-topbar-google__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  min-width: 240px;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.nx-topbar-google__status {
  margin: 0;
  padding: 0.25rem 0.4rem 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
}

.nx-topbar-google__action {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

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

.nx-topbar-google__action--danger {
  color: #b91c1c;
}

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

.nx-topbar-chip__icon,
.nx-topbar-date__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #64748b;
  stroke-width: 2;
}

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

.nx-topbar-icon,
.nx-topbar-notify {
  position: relative;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-icon:hover,
.nx-topbar-notify:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.nx-topbar-icon svg,
.nx-topbar-notify svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.nx-topbar-icon svg path,
.nx-topbar-icon svg circle,
.nx-topbar-icon svg line,
.nx-topbar-notify svg path,
.nx-topbar-notify svg circle {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

.nx-topbar__page-icon svg path,
.nx-topbar__page-icon svg circle,
.nx-topbar__page-icon svg rect {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

.nx-topbar-icon__dot,
.nx-topbar-notify__dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #fff;
}

.nx-topbar-icon--notifications {
  position: relative;
  text-decoration: none;
}

.nx-topbar-icon__count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.nx-topbar-icon__count[hidden],
.nx-topbar-icon__dot[hidden] {
  display: none !important;
}

.nx-notification-banner[hidden],
.nx-notification-banner.is-dismissed {
  display: none !important;
}

.nx-notification-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 1.25rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  color: #1e3a5f;
  font-size: 0.88rem;
}

.nx-notification-banner__link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.nx-notification-banner__link:hover {
  text-decoration: underline;
}

.nx-notification-banner__close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem;
}

.nx-push-permission-prompt {
  margin: 0 1.25rem 0.75rem;
}

.nx-push-permission-prompt[hidden] {
  display: none !important;
}

.nx-push-permission-prompt__inner {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  color: #713f12;
}

.nx-push-permission-prompt__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nx-push-permission-prompt__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fde68a;
  color: #92400e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nx-push-permission-prompt__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nx-push-permission-prompt__title {
  display: block;
  font-size: 0.92rem;
  color: #78350f;
  margin-bottom: 0.2rem;
}

.nx-push-permission-prompt__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #92400e;
}

.nx-push-permission-prompt__steps,
.nx-push-permission-prompt__hint {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #92400e;
}

.nx-push-permission-prompt__hint {
  list-style: none;
  padding-left: 0;
}

.nx-push-permission-prompt__steps li + li {
  margin-top: 0.3rem;
}

.nx-push-permission-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.nx-push-permission-prompt__btn {
  appearance: none;
  border: 1px solid #fbbf24;
  background: #fff;
  color: #92400e;
  border-radius: 10px;
  padding: 0.58rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.nx-push-permission-prompt__btn--primary {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.nx-push-permission-prompt__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 1025px) {
  .nx-push-permission-prompt {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .nx-notification-banner,
  .nx-push-permission-prompt {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }
}

.nx-notifications-page {
  padding-bottom: 0.5rem;
}

.nx-notifications-list {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}

.nx-notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.nx-notification-item__main {
  flex: 1 1 auto;
  min-width: 0;
}

.nx-notification-item.is-unread {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.nx-notification-item__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nx-notification-item__head strong {
  line-height: 1.35;
}

.nx-notification-item__body {
  margin: 0.35rem 0 0;
  color: #475569;
  line-height: 1.45;
}

.nx-notification-item__meta {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.nx-notification-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nx-notification-item__actions .nx-btn-primary {
  min-width: 5.5rem;
}

.nx-notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.nx-notification-action__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.nx-notification-action__icon path,
.nx-notification-action__icon circle {
  fill: none;
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: inherit;
  stroke-linejoin: inherit;
}

@media (max-width: 900px) {
  .nx-notifications-page .nx-table-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .nx-notifications-page .nx-table-card__header .nx-btn-row {
    width: 100%;
  }

  .nx-notifications-page .nx-table-card__header .nx-btn-row .nx-btn {
    width: 100%;
    justify-content: center;
  }

  .nx-notifications-list {
    padding: 0 0.75rem 0.75rem;
    gap: 0.75rem;
  }

  .nx-notification-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    overflow: hidden;
  }

  .nx-notification-item__main {
    width: 100%;
  }

  .nx-notification-item__head {
    align-items: flex-start;
    gap: 0.4rem;
  }

  .nx-notification-item__head strong {
    display: block;
    width: 100%;
    font-size: 0.98rem;
  }

  .nx-notification-item__body {
    margin-top: 0.55rem;
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 100%;
  }

  .nx-notification-item__meta {
    margin-top: 0.65rem;
  }

  .nx-notification-item__actions {
    width: 100%;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .nx-notification-item.is-unread .nx-notification-item__actions {
    border-top-color: #dbeafe;
  }

  .nx-notification-item__actions .nx-notification-action {
    min-width: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    flex-shrink: 0;
    border-radius: 10px;
  }

  .nx-notification-item__actions .nx-notification-action__label {
    display: none;
  }

  .nx-notification-item__actions .nx-btn-primary.nx-notification-action {
    min-width: 2.5rem;
  }

  .nx-notification-action__icon {
    width: 1.1rem;
    height: 1.1rem;
  }
}

.nx-btn-sm {
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
}

.nx-topbar-cta {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 0 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-cta:hover {
  background: #53679b;
  border-color: #53679b;
}

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

.nx-topbar-cta__label--mobile {
  display: none;
}

.nx-topbar-divider {
  width: 1px;
  height: 28px;
  margin: 0 0.15rem;
  background: #e2e8f0;
}

.nx-topbar-user {
  position: relative;
}

.nx-topbar-user__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.2rem 0.2rem 0.2rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-user__trigger:hover,
.nx-topbar-user__trigger[aria-expanded="true"] {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.nx-topbar-user__copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  text-align: right;
}

.nx-topbar-user__copy strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.nx-topbar-user__copy span {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.nx-topbar-user__avatar,
.nx-topbar-user__menu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
  background: #eef2f8;
}

.nx-topbar-user__avatar img,
.nx-topbar-user__menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nx-topbar-user__initials {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.nx-topbar-user__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 110;
  min-width: 240px;
  padding: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.nx-topbar-user__menu-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 0.35rem;
}

.nx-topbar-user__menu-head strong {
  display: block;
  font-size: 0.86rem;
  color: #0f172a;
}

.nx-topbar-user__menu-head span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.76rem;
  color: #64748b;
  word-break: break-word;
}

.nx-topbar-user__menu-link {
  display: block;
  width: 100%;
  padding: 0.6rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nx-topbar-user__menu-link:hover {
  background: #f8fafc;
}

.nx-topbar-user__menu-link--danger {
  color: #b91c1c;
}

.nx-topbar-user__logout {
  margin: 0;
}

.nx-topbar-iconbtn {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-topbar-iconbtn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.nx-topbar-iconbtn svg {
  width: 1rem;
  height: 1rem;
}

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

.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(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.nx-kpi {
  display: flex;
  flex-direction: column;
  min-height: 148px;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 16px;
  padding: 14px 12px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.nx-kpi:hover {
  border-color: #dbe3ec;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

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

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

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

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

.nx-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e8edf2;
  display: grid;
  place-items: center;
  background: #f8fafc;
  flex-shrink: 0;
}

.nx-kpi-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #334155;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-kpi-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.nx-kpi small {
  display: block;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  white-space: pre-line;
  min-height: 2.5em;
}

.nx-kpi strong {
  display: block;
  font-family: var(--font-sf);
  font-size: clamp(0.91rem, 1.07vw, 1.11rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-kpi-delta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.nx-kpi-delta.up {
  background: #ecfdf3;
  color: #15803d;
}

.nx-kpi-delta.down {
  background: #fef2f2;
  color: #dc2626;
}

.nx-kpi-delta.up::before {
  content: "↗";
  font-size: 10px;
  margin-right: 1px;
}

.nx-kpi-delta.down::before {
  content: "↘";
  font-size: 10px;
  margin-right: 1px;
}

.nx-kpi span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.nx-kpi .up {
  background: #ecfdf3;
  color: #15803d;
}

.nx-kpi .down {
  background: #fef2f2;
  color: #dc2626;
}

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

.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--funnel-only {
  grid-template-columns: 1fr;
}

.nx-grid-main--funnel-only .nx-funnel-bars {
  padding: 20px 24px 28px;
}

.nx-grid-main--funnel-only .nx-funnel-row {
  grid-template-columns: minmax(0, 9rem) minmax(12rem, 1fr) minmax(4rem, auto);
  gap: 12px 16px;
  padding: 14px 0;
}

.nx-grid-main--funnel-only .nx-funnel-track {
  height: 52px;
}

.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: 14px;
}

.nx-connections-header h2 {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nx-connections-header p {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: #64748b;
  max-width: 40rem;
  line-height: 1.4;
}

.nx-connections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.nx-connection-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nx-connection-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.nx-connection-card--whatsapp-business {
  background: linear-gradient(180deg, #f7fdf9, #fff);
  border-color: #d8efe2;
}

.nx-connection-card--instagram {
  background: linear-gradient(180deg, #fdf7fb, #fff);
  border-color: #f0d7e6;
}

.nx-connection-card--tiktok {
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-color: #d8dde8;
}

.nx-connection-card--qrcode {
  background: linear-gradient(180deg, #fffbeb, #fff);
  border-color: #f0e0a8;
}

/* Integrações (settings) — layout compacto no padrão Leads/Preferências */
.nx-integrations-page {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.nx-integrations-alert {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.45;
}

.nx-integrations-alert code {
  font-size: 0.72rem;
}

.nx-integrations-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nx-integrations-block__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.1rem;
}

.nx-integrations-block__title {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nx-integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.nx-integrations-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-integrations-card--wa {
  background: linear-gradient(180deg, #f7fdf9, #fff);
  border-color: #d8efe2;
}

.nx-integrations-card--ig {
  background: linear-gradient(180deg, #fdf7fb, #fff);
  border-color: #f0d7e6;
}

.nx-integrations-card--diag {
  background: linear-gradient(180deg, #f5f9ff, #fff);
  border-color: #d7e6f8;
}

.nx-integrations-card--smtp {
  background: linear-gradient(180deg, #f7f8fb, #fff);
  border-color: #d8dde8;
}

.nx-integrations-card--callix {
  background: linear-gradient(180deg, #f3faf7, #fff);
  border-color: #cfe8dc;
}

.nx-integrations-card--google {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, #fff), #fff);
  border-color: color-mix(in srgb, var(--primary) 18%, #e2e8f0);
}

.nx-integrations-card--facebook {
  background: linear-gradient(180deg, #f0f5ff, #fff);
  border-color: #d6e0f5;
}

.nx-integrations-card--wide {
  max-width: 44rem;
}

.nx-integrations-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.nx-integrations-card__identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nx-integrations-card__icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.nx-integrations-card__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-integrations-card__icon--wa {
  background: #dcfce7;
}

.nx-integrations-card__icon--wa svg {
  stroke: #16a34a;
}

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

.nx-integrations-card__icon--ig svg {
  stroke: #fff;
}

.nx-integrations-card__icon--diag {
  background: #dbeafe;
}

.nx-integrations-card__icon--diag svg {
  stroke: #2563eb;
}

.nx-integrations-card__icon--smtp {
  background: #e8eef8;
}

.nx-integrations-card__icon--smtp svg {
  stroke: #334155;
  fill: none;
}

.nx-integrations-card__icon--callix {
  background: #d1fae5;
}

.nx-integrations-card__icon--callix svg {
  stroke: #047857;
}

.nx-integrations-card__icon--google {
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  color: var(--primary);
}

.nx-integrations-card__icon--google svg {
  fill: currentColor;
  stroke: none;
  width: 1rem;
  height: 1rem;
}

.nx-integrations-card__icon--facebook {
  background: #dbe7ff;
}

.nx-integrations-card__icon--facebook svg {
  fill: #1877f2;
  stroke: none;
  width: 1rem;
  height: 1rem;
}

.nx-fb-leads__page {
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
}

.nx-fb-leads__page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.nx-fb-leads__identity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.nx-fb-leads__avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbe7ff;
  color: #1877f2;
  font-weight: 700;
  flex-shrink: 0;
}

.nx-fb-leads__disconnect,
.nx-fb-leads__page-toggle {
  color: #b42318;
  border-color: #f0b4ae;
}

.nx-fb-leads__count {
  display: inline-flex;
  min-width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.72rem;
  align-items: center;
  justify-content: center;
}

.nx-fb-leads__status {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
}

.nx-fb-leads__status.is-on {
  background: #dcfce7;
  color: #166534;
}

.nx-fb-leads__status.is-off {
  background: #f1f5f9;
  color: #475569;
}

.nx-fb-leads__status.is-ok {
  background: #dcfce7;
  color: #166534;
}

.nx-fb-leads__status.is-err {
  background: #fee2e2;
  color: #b42318;
}

.nx-fb-leads__status.is-warn {
  background: #fef3c7;
  color: #b45309;
}

.nx-fb-leads__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nx-fb-leads__icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.nx-fb-leads__icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nx-fb-leads [hidden] {
  display: none !important;
}

.nx-fb-leads__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nx-fb-leads__filter-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.nx-fb-leads__filter-btn.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.nx-fb-leads__filter-badge {
  display: inline-flex;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

.nx-fb-leads-filter {
  margin: 0 0 1rem;
}

.nx-fb-leads-filter .nx-leads-filter__primary {
  align-items: flex-end;
}

.nx-fb-leads-filter__field {
  min-width: 11.5rem;
  flex: 1 1 11.5rem;
  margin: 0;
}

.nx-fb-leads-filter__field--integracao {
  min-width: 16rem;
  flex: 1 1 16rem;
}

.nx-fb-leads-filter__field .nx-label {
  margin-bottom: 0.28rem;
}

.nx-fb-leads-filter__field .nx-select,
.nx-fb-leads-filter__field .nx-leads-filter__select {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
}

.nx-fb-leads-filter__radios {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.25rem;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.nx-fb-leads-filter__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

.nx-fb-leads-filter__radio input {
  margin: 0;
  accent-color: #1d4ed8;
}

.nx-fb-leads-filter__radio:has(input:checked) {
  background: #eff6ff;
  color: #1d4ed8;
}

.nx-fb-leads-filter__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.05rem;
}

.nx-fb-leads__meta-status {
  display: inline-flex;
  align-items: center;
  margin-top: 0.2rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nx-fb-leads__meta-status.is-on {
  background: #dbeafe;
  color: #1d4ed8;
}

.nx-fb-leads__meta-status.is-off {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 720px) {
  .nx-fb-leads-filter__field,
  .nx-fb-leads-filter__field--integracao {
    min-width: 100%;
    flex: 1 1 100%;
  }
}

.nx-fb-form-config__block {
  margin-bottom: 1.35rem;
}

.nx-fb-form-config__destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 0.4rem 0 1rem;
}

.nx-fb-form-config__radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.nx-fb-form-config__radio.is-disabled {
  opacity: 0.55;
}

.nx-fb-form-config__questions {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.nx-fb-form-config__questions li {
  margin: 0.35rem 0;
}

.nx-integrations-card__title {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.nx-integrations-card__meta {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.3;
}

.nx-integrations-card__hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}

.nx-integrations-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.nx-gcal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, #e2e8f0);
}

.nx-gcal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-sf);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.nx-gcal-action[hidden] {
  display: none !important;
}

.nx-gcal-action svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-gcal-action--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(61, 79, 124, 0.22);
}

.nx-gcal-action--primary:hover {
  background: linear-gradient(135deg, var(--primary-glow), var(--primary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(61, 79, 124, 0.28);
  transform: translateY(-1px);
}

.nx-gcal-action--soft {
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
}

.nx-gcal-action--soft:hover {
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(61, 79, 124, 0.1);
}

.nx-gcal-action--danger {
  background: color-mix(in srgb, var(--danger) 8%, #fff);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 22%, transparent);
  margin-left: auto;
}

.nx-gcal-action--danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(201, 78, 44, 0.22);
}

.nx-gcal-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.nx-gcal-action--danger:focus-visible {
  outline-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

@media (max-width: 640px) {
  .nx-gcal-actions {
    flex-direction: column;
  }

  .nx-gcal-action,
  .nx-gcal-action--danger {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
}

/* Página Integrações → Google */
.nx-gcal-page {
  gap: 1.1rem;
  max-width: 68rem;
}

.nx-gcal-hero {
  margin-bottom: 0;
}

.nx-gcal-hero__copy {
  min-width: 0;
  flex: 1;
}

.nx-gcal-hero__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nx-gcal-hero__icon {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d2e3fc;
  box-shadow: 0 1px 2px rgba(26, 115, 232, 0.12);
}

.nx-gcal-hero__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.nx-gcal-hero .nx-h1 {
  margin-bottom: 0;
}

.nx-gcal-hero .nx-leads-hero__subtitle {
  max-width: 40rem;
  margin-top: 0.55rem;
}

.nx-gcal-hero .nx-integrations-badge {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.72rem;
  gap: 0.35rem;
}

.nx-gcal-hero .nx-integrations-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: currentColor;
}

.nx-gcal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16.5rem, 0.85fr);
  gap: 0.95rem;
  align-items: start;
}

.nx-gcal-status {
  gap: 0.75rem;
  padding: 1.15rem 1.2rem 1.05rem;
}

.nx-gcal-status__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.nx-gcal-status .nx-integrations-card__icon--google {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
}

.nx-gcal-status .nx-integrations-card__icon--google svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nx-gcal-status .nx-integrations-card__title {
  font-size: 1rem;
}

.nx-gcal-status .nx-integrations-card__meta {
  font-size: 0.78rem;
  color: #475569;
}

.nx-gcal-status.is-connected {
  border-color: color-mix(in srgb, var(--success) 28%, #e2e8f0);
  background: linear-gradient(180deg, color-mix(in srgb, var(--success) 7%, #fff), #fff);
}

.nx-gcal-status .nx-integrations-card__hint {
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 42rem;
}

.nx-gcal-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, #e2e8f0);
}

.nx-gcal-toolbar:not(:has(.nx-gcal-action:not([hidden]))) {
  display: none;
}

.nx-gcal-page .nx-gcal-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.nx-gcal-page .nx-gcal-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.nx-gcal-actions--footer {
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--primary) 10%, #e2e8f0);
  justify-content: flex-end;
}

.nx-gcal-page .nx-gcal-action--danger {
  margin-left: 0;
}

.nx-gcal-diag {
  display: none;
  margin: 0.15rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

.nx-gcal-howto {
  margin-top: 0.15rem;
}

.nx-gcal-aside {
  padding: 1.1rem 1.15rem 1.05rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-gcal-aside__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nx-gcal-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.nx-gcal-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.nx-gcal-benefit__icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}

.nx-gcal-benefit__icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-gcal-benefit__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

.nx-gcal-benefit__text {
  margin: 0.18rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #64748b;
}

@media (max-width: 900px) {
  .nx-gcal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nx-gcal-hero .nx-leads-hero__top {
    align-items: flex-start;
  }

  .nx-gcal-actions--footer {
    justify-content: stretch;
  }
}

.nx-integrations-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
}

.nx-integrations-badge.is-on {
  background: #dcfce7;
  color: #166534;
}

.nx-integrations-badge.is-off {
  background: #f1f5f9;
  color: #64748b;
}

.nx-integrations-switch {
  margin: 0;
  flex-shrink: 0;
}

.nx-integrations-creds {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.nx-integrations-cred {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nx-integrations-cred__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.nx-integrations-cred__row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nx-integrations-input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  background: #f8fafc;
}

.nx-integrations-cred__actions {
  margin: 0.15rem 0 0;
}

.nx-integrations-howto {
  margin-top: 0.25rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.55rem;
}

.nx-integrations-howto > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  user-select: none;
}

.nx-integrations-howto > summary::-webkit-details-marker {
  display: none;
}

.nx-integrations-howto > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  color: #64748b;
  transition: transform 0.12s ease;
}

.nx-integrations-howto[open] > summary::before {
  transform: rotate(90deg);
}

.nx-integrations-howto__body {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.nx-integrations-env {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.68rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

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

  .nx-integrations-cred__row {
    flex-wrap: wrap;
  }

  .nx-integrations-cred__row .nx-btn {
    width: 100%;
    justify-content: center;
  }
}

.nx-connection-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0;
}

.nx-connection-card__title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.nx-connection-card__identity {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.nx-wa-open-pref {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.nx-wa-open-pref__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nx-wa-open-pref__btn:hover {
  color: #334155;
}

.nx-wa-open-pref__btn.is-active {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.25);
}

.nx-wa-open-pref-hint {
  display: block;
  margin-top: 0;
}

.nx-connection-card__mini-icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.nx-connection-card__mini-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.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__mini-icon--tt {
  background: #0f172a;
}

.nx-connection-card__mini-icon--tt svg {
  stroke: none;
  fill: #fff;
}

.nx-connection-card__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.nx-connection-card__badge--ok {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.nx-connection-card__badge--alt {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.nx-connection-card__badge--meta {
  color: #9d174d;
  background: #fce7f3;
  border-color: #fbcfe8;
}

.nx-connection-card h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-family: var(--font-sf);
  font-weight: 650;
}

.nx-connection-card small {
  margin-top: 0;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.35;
}

.nx-connection-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}

.nx-connection-card .nx-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #94a3b8;
}

.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: 32px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.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%;
  }
}

/* Instagram inbox — estado sem conexão (mesmo padrão do TikTok) */
.nx-ig-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 22px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  max-width: 520px;
}

.nx-ig-empty__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}

.nx-ig-empty__icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.nx-ig-empty h3 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.nx-ig-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.nx-whatsapp-alert {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  line-height: 1.4;
}

.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: auto;
  padding-top: 0.35rem;
}

.nx-connection-card__cta {
  margin-top: auto;
  padding-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nx-connection-btn:disabled,
.nx-connection-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* TikTok inbox (Conversas > TikTok) */
.nx-tt-page__header .nx-tt-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.nx-tt-page__header .nx-tt-header__titles {
  min-width: 0;
}

.nx-tt-connected-badge {
  flex-shrink: 0;
}

.nx-tt-connected-badge__inner {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
}

.nx-tt-connected-badge__label {
  font-size: 11px;
  font-weight: 650;
}

.nx-tt-connected-badge__handle {
  font-size: 12px;
  opacity: 0.9;
}

.nx-tt-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 22px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  max-width: 520px;
}

.nx-tt-empty__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.nx-tt-empty__icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.nx-tt-empty h3 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.nx-tt-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.nx-connections-grid--wa-qr-visible .nx-connection-card--instagram .nx-connection-instagram-actions,
.nx-connections-grid--wa-qr-visible .nx-connection-card--whatsapp-business .nx-connection-card__cta,
.nx-connections-grid--wa-qr-visible .nx-connection-card--tiktok .nx-connection-card__cta {
  flex: 1;
  display: flex;
  align-items: center;
  margin-top: 0;
}

.nx-connections-grid--wa-qr-visible .nx-connection-card--instagram .nx-connection-instagram-actions .nx-connection-btn,
.nx-connections-grid--wa-qr-visible .nx-connection-card--whatsapp-business .nx-connection-card__cta .nx-connection-btn,
.nx-connections-grid--wa-qr-visible .nx-connection-card--tiktok .nx-connection-card__cta .nx-connection-btn {
  margin-top: 0;
  width: 100%;
}

/* Carregamento partilhado (WhatsApp + Instagram + TikTok) — mesmo layout nos cartões e na página preparar */
.nx-connection-card--qrcode,
.nx-connection-card--instagram,
.nx-connection-card--tiktok {
  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(315px, 28fr) minmax(0, 81fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  --nx-wa-panel-height: min(720px, calc(100dvh - 140px));
}

/* Conversas: painel Nexus IA na mesma linha da grade de chat */
.nx-whatsapp-chat-with-ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
  --nx-wa-panel-height: min(720px, calc(100dvh - 140px));
}

.nx-whatsapp-chat-with-ai > .nx-whatsapp-chat-grid {
  min-width: 0;
}

/* WhatsApp / tablet: Nexus IA oculto por padrão, aberto via FAB (como Leads ativos) */
.nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-fab,
.nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer-backdrop {
  display: none;
}
.nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  width: auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  gap: 0;
}
.nx-whatsapp-chat-with-ai--tablet-drawer .nx-lead-ai-drawer__close {
  display: none;
}
.nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer .nx-ai-panel--live {
  height: var(--nx-wa-panel-height, 620px);
  min-height: var(--nx-wa-panel-height, 620px);
  max-height: var(--nx-wa-panel-height, 620px);
}

@media (max-width: 1260px), ((min-width: 769px) and (max-width: 2200px) and (max-height: 1400px) and ((any-hover: none) or (pointer: coarse))) {
  .nx-whatsapp-chat-with-ai--tablet-drawer {
    grid-template-columns: 1fr;
    --nx-wa-panel-height: min(calc(100dvh - 120px), 820px);
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer .nx-whatsapp-chat-grid {
    grid-template-columns: minmax(200px, 39fr) minmax(0, 61fr);
    align-items: start;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer .nx-whatsapp-contacts-panel {
    height: min(560px, calc(100dvh - 160px));
    min-height: min(480px, calc(100dvh - 180px));
    max-height: min(560px, calc(100dvh - 160px));
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer .nx-whatsapp-chat-panel {
    height: var(--nx-wa-panel-height);
    min-height: var(--nx-wa-panel-height);
    max-height: var(--nx-wa-panel-height);
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-fab {
    display: inline-flex;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer-backdrop.is-open {
    display: block;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer {
    position: fixed;
    top: 50%;
    right: 1rem;
    bottom: auto;
    z-index: 61;
    width: min(360px, calc(100vw - 2rem));
    max-height: min(calc(100dvh - 2rem), 820px);
    height: auto;
    grid-column: auto;
    grid-row: auto;
    transform: translate(calc(100% + 2rem), -50%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer[data-open="1"] {
    transform: translate(0, -50%);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer[data-open="0"] {
    transform: translate(calc(100% + 2rem), -50%);
    pointer-events: none;
    visibility: hidden;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer .nx-lead-ai-drawer__close {
    display: inline-flex;
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer .nx-ai-panel--live {
    height: auto;
    min-height: min(480px, calc(100dvh - 5rem));
    max-height: min(calc(100dvh - 5rem), 780px);
    flex: 1 1 auto;
  }
}

.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__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nx-whatsapp-chat-head__titles {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nx-whatsapp-chat-head h3 {
  margin: 0;
  font-size: 17px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-whatsapp-chat-head__phone {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

.nx-wa-create-lead-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
}

.nx-wa-create-lead-btn:hover:not(:disabled) {
  background: #d1fae5;
  border-color: #4ade80;
}

.nx-wa-create-lead-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.nx-wa-create-lead-btn.is-done {
  border-color: #a7f3d0;
  background: #f0fdf4;
  color: #065f46;
}

.nx-wa-lead-match {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.nx-wa-lead-match.is-confirm {
  border-color: #fde68a;
  background: #fffbeb;
}

.nx-wa-lead-match__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
}

.nx-wa-lead-match__text {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #14532d;
  line-height: 1.35;
}

.nx-wa-lead-match.is-confirm .nx-wa-lead-match__text {
  color: #92400e;
}

.nx-wa-lead-match__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.nx-wa-lead-match__btn {
  font-size: 0.78rem !important;
  padding: 0.4rem 0.75rem !important;
  line-height: 1.2 !important;
}

.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 #d9f0de;
  border-radius: 14px;
  background: #e7f6ea;
  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;
  font-family: inherit, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.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__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.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__import {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary, #3d4f7c), var(--primary-glow, #53679b));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(61, 79, 124, 0.22);
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nx-wa-doc__import:hover {
  filter: brightness(1.06);
  box-shadow: 0 2px 8px rgba(61, 79, 124, 0.28);
}

.nx-wa-doc__import:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(61, 79, 124, 0.18);
}

.nx-wa-doc__import:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary, #3d4f7c) 45%, #fff);
  outline-offset: 2px;
}

.nx-wa-doc__import:disabled {
  opacity: 0.65;
  cursor: wait;
  filter: none;
  box-shadow: none;
  transform: none;
}

.nx-wa-doc__import-icon {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.nx-wa-doc--vcf {
  flex-wrap: wrap;
}

.nx-wa-muted {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.72;
}

.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-send-feedback {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #166534;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
}

.nx-wa-send-feedback--error {
  color: #9f1239;
  border-color: #fecaca;
  background: #fff1f2;
}

.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;
}

.nx-wa-voice-status[hidden],
.nx-wa-send-feedback[hidden],
.nx-ig-compose--wa-stack > [hidden] {
  display: none !important;
}

@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-ig-page .nx-whatsapp-row__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nx-ig-list-preview {
  display: block;
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-ig-list-preview__text {
  color: #718096;
  font-weight: 400;
}

.nx-ig-list-preview__text--unread {
  color: #1a202c;
  font-weight: 600;
}

.nx-ig-list-preview__text--muted {
  color: #718096;
  font-weight: 400;
}

.nx-ig-list-preview__sep,
.nx-ig-list-preview__time {
  color: #718096;
  font-weight: 400;
}

.nx-ig-page .nx-whatsapp-contact-row.has-unread .nx-whatsapp-row__main strong {
  font-weight: 700;
}

.nx-ig-unread-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2b6cb0;
  box-shadow: 0 0 0 2px #fff;
}

.nx-ig-avatar-online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #fff;
  z-index: 4;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.nx-ig-page .nx-wa-contact-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-block;
}

.nx-ig-page .nx-wa-contact-avatar-wrap .nx-wa-contact-avatar {
  width: 100%;
  height: 100%;
}

.nx-ig-page .nx-whatsapp-contact-row .nx-whatsapp-row__meta {
  flex: 0 0 auto;
  align-self: center;
  min-width: 12px;
}

.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;
}

.nx-whatsapp-inbox-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.nx-whatsapp-inbox-nav .nx-whatsapp-inbox-nav__btn {
  margin-top: 0;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-nav__btn,
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-inbox-nav__btn {
  margin-top: 0;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer .nx-whatsapp-row__main,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-nav__btn .nx-whatsapp-row__main,
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-inbox-footer .nx-whatsapp-row__main strong,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer .nx-whatsapp-row__main small,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-nav__btn .nx-whatsapp-row__main strong,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-nav__btn .nx-whatsapp-row__main small,
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-inbox-footer .nx-whatsapp-row__meta,
button.nx-whatsapp-contact-row.nx-whatsapp-inbox-nav__btn .nx-whatsapp-row__meta,
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: 0.15rem;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.3;
}

.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: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px;
}

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

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

.nx-whatsapp-actions {
  margin-top: auto;
  padding-top: 0.35rem;
  display: flex;
  gap: 0.4rem;
}

.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-contacts-panel .nx-whatsapp-inbox-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}

.nx-whatsapp-contacts-panel .nx-whatsapp-inbox-head__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.nx-whatsapp-contacts-panel .nx-whatsapp-inbox-head__meta h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  white-space: nowrap;
}

.nx-whatsapp-contacts-panel #nx-wa-contact-count {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab:hover {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab--personal.is-active {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab--lost.is-active {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: none;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab--groups.is-active {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
  box-shadow: none;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab.is-active .nx-wa-inbox-tab__badge {
  background: rgba(29, 78, 216, 0.12);
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab--lost.is-active .nx-wa-inbox-tab__badge {
  background: rgba(185, 28, 28, 0.12);
}

.nx-whatsapp-contacts-panel .nx-wa-inbox-tab--groups.is-active .nx-wa-inbox-tab__badge {
  background: rgba(180, 83, 9, 0.12);
}

@media (min-width: 520px) {
  .nx-whatsapp-contacts-panel .nx-wa-inbox-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Instagram: título e contagem como filhos diretos do cabeçalho */
.nx-whatsapp-contacts-panel .nx-whatsapp-inbox-head:has(> h3) {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.nx-whatsapp-contacts-panel .nx-whatsapp-inbox-head > h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.nx-whatsapp-contacts-panel .nx-whatsapp-inbox-head > span,
.nx-whatsapp-contacts-panel #nx-ig-contact-count {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.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: min(640px, calc(100dvh - 160px));
  }

  .nx-dashboard-with-ai:has(.nx-ai-panel--live) {
    --nx-wa-panel-height: min(640px, calc(100dvh - 160px));
  }

  .nx-whatsapp-chat-with-ai {
    grid-template-columns: 1fr;
    --nx-wa-panel-height: min(640px, calc(100dvh - 160px));
  }
}

@media (max-width: 1260px), ((min-width: 769px) and (max-width: 2200px) and (max-height: 1400px) and ((any-hover: none) or (pointer: coarse))) {
  .nx-whatsapp-chat-with-ai--tablet-drawer .nx-whatsapp-chat-grid {
    grid-template-columns: minmax(200px, 39fr) minmax(0, 61fr);
  }
}

@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;
}

.pill--down {
  background: #feecec;
  color: #dc2626;
}

.nx-funnel-empty {
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  color: #718096;
  font-size: 0.875rem;
}

/* ── Funil de Vendas (layout horizontal) ── */
.nx-sales-funnel-panel__head {
  align-items: center;
}

.nx-sales-funnel-panel__title-wrap {
  min-width: 0;
}

.nx-sales-funnel-panel__title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nx-sales-funnel-panel__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: help;
}

.nx-sales-funnel-panel__info svg {
  display: block;
  width: 1rem;
  height: 1rem;
  max-width: 1rem;
  max-height: 1rem;
  flex-shrink: 0;
}

.nx-sales-funnel-panel__info--sm svg {
  width: 0.875rem;
  height: 0.875rem;
}

.nx-sales-funnel-panel__subtitle {
  margin: 0.25rem 0 0;
}

.nx-sales-funnel-panel__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.nx-funnel-period {
  position: relative;
}

.nx-funnel-period__trigger {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.nx-funnel-period__trigger:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.nx-funnel-period__icon,
.nx-funnel-period__chev {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #64748b;
}

.nx-funnel-period__chev {
  width: 0.875rem;
  height: 0.875rem;
}

.nx-funnel-period__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  min-width: 15rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.nx-funnel-period__presets {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nx-funnel-period__option {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: #334155;
  font-size: 0.8125rem;
  text-decoration: none;
}

.nx-funnel-period__option:hover,
.nx-funnel-period__option.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.nx-funnel-period__divider {
  height: 1px;
  margin: 0.45rem 0;
  background: #e2e8f0;
}

.nx-funnel-period__custom-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.nx-funnel-period__custom-fields {
  display: grid;
  gap: 0.45rem;
}

.nx-funnel-period__field {
  display: grid;
  gap: 0.2rem;
}

.nx-funnel-period__field span {
  font-size: 0.6875rem;
  color: #64748b;
}

.nx-funnel-period__field input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  padding: 0 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8125rem;
}

.nx-funnel-period__apply {
  width: 100%;
  margin-top: 0.55rem;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.nx-funnel-period__apply:hover {
  background: #1d4ed8;
}

.nx-sales-funnel {
  padding: 0 0 1rem;
}

.nx-sales-funnel__scroll,
.nx-sales-funnel__accumulated-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.nx-sales-funnel__scroll {
  padding: 1.25rem 1.5rem 0.75rem;
}

.nx-sales-funnel__track {
  min-width: max(100%, calc(var(--nx-funnel-stages, 6) * 9.5rem));
}

.nx-sales-funnel__stages {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 8.5rem;
}

.nx-sales-funnel__stage {
  position: relative;
  flex: 1 1 0;
  min-width: 9.5rem;
  padding: 1rem 1.35rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  color: var(--nx-funnel-accent, #2563eb);
  background: var(--nx-funnel-bg, #dbeafe);
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 50%, calc(100% - 1.1rem) 100%, 0 100%, 1.1rem 50%);
  border: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.nx-sales-funnel__stage:hover:not(:disabled),
.nx-sales-funnel__stage:focus-visible:not(:disabled) {
  filter: brightness(0.97);
  outline: none;
  z-index: 1;
}

.nx-sales-funnel__stage:focus-visible:not(:disabled) {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--nx-funnel-accent, #2563eb) 55%, transparent);
}

.nx-sales-funnel__stage:disabled {
  cursor: default;
  opacity: 0.85;
}

.nx-sales-funnel__stage.is-first {
  padding-left: 1rem;
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 50%, calc(100% - 1.1rem) 100%, 0 100%);
  border-radius: 14px 0 0 14px;
}

.nx-sales-funnel__stage.is-last {
  padding-right: 1rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 1.1rem 50%);
  border-radius: 0 14px 14px 0;
}

.nx-sales-funnel__stage.is-first.is-last {
  clip-path: none;
  border-radius: 14px;
}

.nx-sales-funnel__stage--c1 { --nx-funnel-bg: #dbeafe; --nx-funnel-accent: #2563eb; }
.nx-sales-funnel__stage--c2 { --nx-funnel-bg: #ede9fe; --nx-funnel-accent: #7c3aed; }
.nx-sales-funnel__stage--c3 { --nx-funnel-bg: #fef3c7; --nx-funnel-accent: #d97706; }
.nx-sales-funnel__stage--c4 { --nx-funnel-bg: #dcfce7; --nx-funnel-accent: #16a34a; }
.nx-sales-funnel__stage--c5 { --nx-funnel-bg: #ecfccb; --nx-funnel-accent: #65a30d; }
.nx-sales-funnel__stage--c6 { --nx-funnel-bg: #ccfbf1; --nx-funnel-accent: #0d9488; }

.nx-sales-funnel__stage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--nx-funnel-accent);
}

.nx-sales-funnel__stage-icon svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  max-width: 1.125rem;
  max-height: 1.125rem;
  flex-shrink: 0;
}

.nx-sales-funnel__stage-name {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--nx-funnel-accent);
}

.nx-sales-funnel__stage-count {
  margin: 0.15rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.nx-sales-funnel__stage-unit {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.nx-sales-funnel__step-conv {
  margin-top: 1.35rem;
}

.nx-sales-funnel__section-label {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.nx-sales-funnel__step-grid {
  display: grid;
  gap: 0;
  margin-left: calc(100% / var(--nx-funnel-stages, 6) / 2);
  margin-right: calc(100% / var(--nx-funnel-stages, 6) / 2);
}

.nx-sales-funnel__step-cell {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
}

.nx-sales-funnel__step-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.65rem;
  transform: translateX(-50%);
  background: #cbd5e1;
}

.nx-sales-funnel__step-line::before {
  content: "";
  position: absolute;
  top: -0.2rem;
  left: 50%;
  width: 0.35rem;
  height: 0.35rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #94a3b8;
}

.nx-sales-funnel__step-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  max-width: 7.5rem;
}

.nx-sales-funnel__step-badge strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--nx-step-accent, #2563eb);
  background: var(--nx-step-bg, #dbeafe);
}

.nx-sales-funnel__step-badge span {
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #64748b;
}

.nx-sales-funnel__step-badge--c1 { --nx-step-bg: #dbeafe; --nx-step-accent: #2563eb; }
.nx-sales-funnel__step-badge--c2 { --nx-step-bg: #ede9fe; --nx-step-accent: #7c3aed; }
.nx-sales-funnel__step-badge--c3 { --nx-step-bg: #fef3c7; --nx-step-accent: #d97706; }
.nx-sales-funnel__step-badge--c4 { --nx-step-bg: #dcfce7; --nx-step-accent: #16a34a; }
.nx-sales-funnel__step-badge--c5 { --nx-step-bg: #ecfccb; --nx-step-accent: #65a30d; }
.nx-sales-funnel__step-badge--c6 { --nx-step-bg: #ccfbf1; --nx-step-accent: #0d9488; }

.nx-sales-funnel__accumulated {
  margin: 0.5rem 1.5rem 0;
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.nx-sales-funnel__accumulated-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.nx-sales-funnel__accumulated-head h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.nx-sales-funnel__accumulated-track {
  position: relative;
  min-width: max(100%, calc(var(--nx-funnel-stages, 6) * 9.5rem));
  padding-top: 0.35rem;
}

.nx-sales-funnel__timeline {
  position: absolute;
  top: 0.55rem;
  left: calc(100% / var(--nx-funnel-stages, 6) / 2);
  right: calc(100% / var(--nx-funnel-stages, 6) / 2);
  height: 0;
  pointer-events: none;
}

.nx-sales-funnel__timeline-line {
  display: block;
  border-top: 2px dotted #cbd5e1;
}

.nx-sales-funnel__accumulated-points {
  display: grid;
  gap: 0.5rem;
}

.nx-sales-funnel__accumulated-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1rem;
}

.nx-sales-funnel__accumulated-dot {
  width: 0.55rem;
  height: 0.55rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  background: var(--nx-acc-accent, #2563eb);
  box-shadow: 0 0 0 3px var(--nx-acc-bg, #dbeafe);
}

.nx-sales-funnel__accumulated-point--c1 { --nx-acc-bg: #dbeafe; --nx-acc-accent: #2563eb; }
.nx-sales-funnel__accumulated-point--c2 { --nx-acc-bg: #ede9fe; --nx-acc-accent: #7c3aed; }
.nx-sales-funnel__accumulated-point--c3 { --nx-acc-bg: #fef3c7; --nx-acc-accent: #d97706; }
.nx-sales-funnel__accumulated-point--c4 { --nx-acc-bg: #dcfce7; --nx-acc-accent: #16a34a; }
.nx-sales-funnel__accumulated-point--c5 { --nx-acc-bg: #ecfccb; --nx-acc-accent: #65a30d; }
.nx-sales-funnel__accumulated-point--c6 { --nx-acc-bg: #ccfbf1; --nx-acc-accent: #0d9488; }

.nx-sales-funnel__accumulated-pct {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--nx-acc-accent, #2563eb);
  font-variant-numeric: tabular-nums;
}

.nx-sales-funnel__accumulated-desc,
.nx-sales-funnel__accumulated-leads {
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #64748b;
}

.nx-sales-funnel__leaks {
  margin: 1.25rem 1.5rem 0;
  padding-top: 1.15rem;
  border-top: 1px solid #e2e8f0;
}

.nx-sales-funnel__leaks-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.nx-sales-funnel__leaks-head h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.nx-sales-funnel__leaks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.nx-sales-funnel__leak {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.nx-sales-funnel__leak--lost {
  border-color: #fecaca;
  background: #fef2f2;
}

.nx-sales-funnel__leak--future {
  border-color: #fde68a;
  background: #fffbeb;
}

.nx-sales-funnel__leak-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.nx-sales-funnel__leak-count {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.nx-sales-funnel__leak-unit {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.nx-sales-funnel__info {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 1.5rem 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
}

.nx-sales-funnel__info svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  max-width: 1.125rem;
  max-height: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.nx-sales-funnel__info p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #1e3a8a;
}

@media (max-width: 768px) {
  .nx-sales-funnel-panel__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .nx-sales-funnel-panel__tools {
    flex-wrap: wrap;
  }

  .nx-sales-funnel__stage-count {
    font-size: 1.5rem;
  }
}

.nx-topbar-period {
  position: relative;
}

.nx-topbar-consultant {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nx-topbar-consultant__field {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding: 0 0.65rem 0 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.nx-topbar-consultant__field .nx-topbar-chip__icon,
.nx-topbar-consultant__field .nx-topbar-date__chev {
  pointer-events: none;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nx-topbar-consultant__field:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.nx-topbar-consultant__select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  /* Estende o clique sobre a seta e o padding direito do chip. */
  margin-right: calc(-1 * (0.45rem + 0.9rem + 0.65rem));
  padding: 0 calc(0.45rem + 0.9rem + 0.65rem) 0 0;
  min-width: 7.5rem;
  max-width: 14rem;
  background: transparent;
  color: #334155;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

.nx-topbar-consultant__select:focus {
  outline: none;
}

.nx-topbar-consultant__select:focus-visible + .nx-topbar-date__chev,
.nx-topbar-consultant__field:focus-within {
  outline: none;
}

.nx-topbar-consultant__field:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.nx-topbar-period__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  min-width: 16.5rem;
  padding: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.nx-topbar-period__presets {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nx-topbar-period__divider {
  height: 1px;
  margin: 0.45rem 0;
  background: #e2e8f0;
}

.nx-topbar-period__custom {
  padding: 0.35rem 0.45rem 0.5rem;
  border-radius: 10px;
}

.nx-topbar-period__custom.is-active {
  background: #f8fafc;
}

.nx-topbar-period__custom-title {
  margin: 0 0 0.55rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nx-topbar-period__custom-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.nx-topbar-period__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.nx-topbar-period__field span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.nx-topbar-period__field input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.78rem;
}

.nx-topbar-period__field input[type="date"]:focus {
  outline: 2px solid rgba(59, 130, 246, 0.25);
  border-color: #93c5fd;
}

.nx-topbar-period__apply {
  width: 100%;
  margin-top: 0.55rem;
  height: 2.1rem;
  border: 0;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.nx-topbar-period__apply:hover {
  background: #1e293b;
}

.nx-topbar-period__option {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.nx-topbar-period__option:hover,
.nx-topbar-period__option.is-active {
  background: #f1f5f9;
  color: #0f172a;
}

/* 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-empty {
  margin: 0;
  padding: 8px 2px 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #86868b;
}

.nx-prio-lead {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px;
  text-align: left;
  text-decoration: none;
  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,
.nx-prio-lead__origin {
  font-size: 11px;
  color: #86868b;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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) 292px;
  gap: 12px;
  align-items: start;
}

/* Conversas: painel IA ao vivo acompanha altura útil da página */
.nx-dashboard-with-ai:has(.nx-ai-panel--live) {
  --nx-wa-panel-height: min(720px, calc(100dvh - 140px));
}

.nx-dashboard-with-ai:has(.nx-whatsapp-chat-with-ai) {
  grid-template-columns: 1fr;
  align-items: start;
}

.nx-ai-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #eef3f6;
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 0;
  max-height: calc(100dvh - 64px - 48px);
  overflow: auto;
  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-list {
  margin: 10px 0 0;
  padding-left: 1rem;
  color: #475569;
  font-size: 11.5px;
  line-height: 1.45;
}
.nx-ai-list li + li {
  margin-top: 0.35rem;
}
.nx-ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
  margin-bottom: 0.7rem;
}
.nx-ai-quick-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 600;
}

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

.nx-ai-actions--suggestions {
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 4px;
}

.nx-ai-actions--suggestions #nx-nexusia-use-suggestion {
  flex: 1 1 auto;
  min-width: 0;
}

.nx-ai-actions button.nx-nexusia-suggestion-nav {
  flex: 0 0 auto;
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.nx-ai-actions button.nx-nexusia-suggestion-nav:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #1e293b;
}

.nx-ai-actions button.nx-nexusia-suggestion-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.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-page {
  min-height: 100vh;
  background: #0f172a;
  overflow-x: hidden;
}

.nx-login-root {
  display: flex;
  min-height: 100vh;
}

.nx-login-panel {
  flex: 0 0 50%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.nx-login-panel--form {
  background: #ffffff;
  position: relative;
  z-index: 2;
}

.nx-login-panel--visual {
  position: relative;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(61, 79, 124, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(31, 163, 168, 0.35), transparent 50%),
    linear-gradient(145deg, #0c1f33 0%, #0f172a 45%, #132a3d 100%);
  color: rgba(255, 255, 255, 0.96);
}

.nx-login-visual__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, #000 20%, transparent 75%);
}

.nx-login-form-inner {
  width: 100%;
  max-width: 400px;
  animation: nxLoginFadeIn 0.45s ease;
}

@keyframes nxLoginFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nx-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
}

.nx-login-brand__logo {
  width: auto;
  max-width: min(280px, 100%);
  height: 56px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.nx-login-brand__fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  margin-bottom: 0.75rem;
}

.nx-login-brand__name {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.nx-login-brand__title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.nx-login-brand__subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: #64748b;
}

.nx-login-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: #9f2222;
  background: #fff2f2;
  border: 1px solid #ffd4d4;
}

.nx-login-alert--success {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.nx-login-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  color: #64748b;
}

.nx-login-footer--secondary {
  margin-top: 0.55rem;
}

.nx-login-footer a {
  color: var(--primary, #1fa3a8);
  font-weight: 600;
  text-decoration: none;
}

.nx-login-footer a:hover {
  text-decoration: underline;
}

.nx-register-form-inner {
  max-width: 440px;
}

.nx-register-brand {
  margin-bottom: 1.5rem;
}

.nx-reg-wizard {
  width: 100%;
}

.nx-reg-progress {
  height: 4px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.nx-reg-progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary, #3d4f7c), var(--primary-glow, #1fa3a8));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-reg-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.nx-reg-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  cursor: default;
}

.nx-reg-steps__item.is-done {
  cursor: pointer;
}

.nx-reg-steps__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  transition: all 0.25s ease;
}

.nx-reg-steps__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
  line-height: 1.2;
}

.nx-reg-steps__item.is-active .nx-reg-steps__dot {
  color: #fff;
  background: linear-gradient(135deg, var(--primary, #3d4f7c), var(--primary-glow, #1fa3a8));
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(61, 79, 124, 0.35);
}

.nx-reg-steps__item.is-active .nx-reg-steps__label {
  color: #334155;
}

.nx-reg-steps__item.is-done .nx-reg-steps__dot {
  color: #047857;
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.nx-reg-step {
  display: none;
  animation: nxRegStepIn 0.35s ease;
}

.nx-reg-step.is-active {
  display: block;
}

@keyframes nxRegStepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nx-reg-step__head {
  margin-bottom: 1.25rem;
}

.nx-reg-step__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.nx-reg-step__desc {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.nx-reg-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #dc2626;
}

.nx-reg-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
}

.nx-login-field input.is-invalid {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nx-reg-password-rules {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e8edf4;
}

.nx-reg-password-rules__item {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.nx-reg-password-rules__item::before {
  content: "○";
  position: absolute;
  left: 0;
  color: #cbd5e1;
}

.nx-reg-password-rules__item.is-valid {
  color: #047857;
}

.nx-reg-password-rules__item.is-valid::before {
  content: "✓";
  color: #10b981;
  font-weight: 700;
}

.nx-reg-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.nx-reg-btn {
  flex: 1;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.nx-reg-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.nx-reg-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary, #3d4f7c) 0%, #2d3f64 100%);
  box-shadow: 0 4px 16px rgba(12, 61, 77, 0.28);
}

.nx-reg-btn--primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(12, 61, 77, 0.36);
}

.nx-reg-btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.nx-reg-btn--ghost {
  flex: 0 0 auto;
  min-width: 6.5rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.nx-reg-btn--ghost:hover {
  background: #e8edf4;
  color: #334155;
}

@media (max-width: 480px) {
  .nx-reg-steps__label {
    font-size: 0.625rem;
  }

  .nx-reg-actions {
    flex-direction: column-reverse;
  }

  .nx-reg-btn--ghost {
    flex: 1;
    min-width: 0;
  }
}

.nx-register-errors {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.nx-login-field {
  margin-bottom: 1.25rem;
}

.nx-login-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

.nx-login-field input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--fg);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nx-login-field input::placeholder {
  color: #94a3b8;
}

.nx-login-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 79, 124, 0.14);
}

.nx-login-password {
  position: relative;
}

.nx-login-password input {
  padding-right: 3rem;
}

.nx-login-password__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}

.nx-login-password__toggle:hover {
  color: #334155;
  background: #f1f5f9;
}

.nx-login-password__icon {
  width: 18px;
  height: 18px;
}

.nx-login-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #0c3d4d 0%, #156b7a 48%, #1fa3a8 100%);
  box-shadow: 0 4px 14px -2px rgba(12, 61, 77, 0.4);
  transition: transform 0.15s, filter 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.nx-login-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px -2px rgba(12, 61, 77, 0.48);
}

.nx-login-submit:active {
  transform: scale(0.99);
}

.nx-login-submit__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: nx-login-spin 0.7s linear infinite;
}

.nx-login-submit.is-loading,
.nx-login-submit:disabled {
  cursor: wait;
  opacity: 0.88;
  filter: none;
  pointer-events: none;
}

.nx-login-submit.is-loading .nx-login-submit__spinner {
  display: inline-block;
}

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

.nx-login-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.nx-login-modal[hidden] {
  display: none !important;
}

.nx-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 36, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nx-login-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.75rem 1.5rem 1.6rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px -16px rgba(12, 24, 36, 0.45);
  text-align: center;
}

.nx-login-modal__spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 1rem;
  border: 3px solid rgba(21, 107, 122, 0.2);
  border-top-color: #156b7a;
  border-radius: 50%;
  animation: nx-login-spin 0.75s linear infinite;
}

.nx-login-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0c1824;
}

.nx-login-modal__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5b6b7c;
}

body.nx-login-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .nx-login-modal__card {
    width: min(100%, 20.5rem);
    padding: 1.6rem 1.25rem 1.45rem;
  }
}

.nx-login-visual__content {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.nx-login-visual__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.nx-login-visual__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 2.4vw, 2.125rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.nx-login-visual__dynamic {
  display: inline-block;
  background: linear-gradient(90deg, #7dd3fc, #1fa3a8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nx-login-visual__quote {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.92);
  font-style: italic;
}

.nx-login-visual__rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.95);
}

.nx-login-visual__stars {
  color: #fbbf24;
  letter-spacing: 0.05em;
}

.nx-login-visual__features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nx-login-visual__features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.88);
}

.nx-login-visual__features li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1fa3a8, #7dd3fc);
  box-shadow: 0 0 12px rgba(31, 163, 168, 0.55);
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .nx-login-root {
    flex-direction: column;
  }

  .nx-login-panel {
    flex: none;
    min-height: auto;
    width: 100%;
  }

  .nx-login-panel--form {
    min-height: 100vh;
    padding: 2rem 1.25rem;
  }

  .nx-login-panel--visual {
    display: none;
  }

  .nx-login-form-inner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .nx-login-brand__title {
    font-size: 1.375rem;
  }

  .nx-login-field input,
  .nx-login-submit {
    font-size: 0.9375rem;
  }
}

.nx-pwa-install {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid #d7deea;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.nx-pwa-install[hidden] {
  display: none !important;
}

.nx-pwa-install__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.nx-pwa-install__badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nx-pwa-install__badge svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nx-pwa-install__copy {
  flex: 1;
  min-width: 0;
}

.nx-pwa-install__copy strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.nx-pwa-install__copy p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
}

.nx-pwa-install__close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
}

.nx-pwa-install__steps {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.5;
}

.nx-pwa-install__steps li + li {
  margin-top: 0.35rem;
}

.nx-pwa-install__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.nx-pwa-install__btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.nx-pwa-install__btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.nx-pwa-install__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 961px) {
  .nx-pwa-install {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .nx-dashboard-with-ai {
    grid-template-columns: 1fr;
  }
  .nx-dashboard-with-ai:has(.nx-ai-panel--live) {
    grid-template-columns: 1fr;
  }
  .nx-ai-panel {
    position: static;
  }
  .nx-dashboard-with-ai > .nx-ai-panel--live,
  .nx-whatsapp-chat-with-ai > .nx-ai-panel--live {
    width: 100%;
    height: auto;
    min-height: min(420px, 55dvh);
    max-height: min(560px, 72dvh);
  }
  .nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer .nx-ai-panel--live {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
  }
  .nx-grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .nx-sidebar {
    display: none;
  }

  .nx-topbar-menu-toggle {
    display: inline-flex;
  }

  .nx-topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    min-height: 56px;
  }

  .nx-topbar__head {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
  }

  .nx-topbar__page-icon {
    display: inline-flex;
  }

  .nx-topbar__lead {
    min-width: 0;
  }

  .nx-topbar__eyebrow {
    display: none;
  }

  .nx-topbar__title {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nx-topbar__tools,
  .nx-topbar-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .nx-topbar-chip span,
  .nx-topbar-date span {
    display: none;
  }

  .nx-topbar-chip,
  .nx-topbar-date {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .nx-topbar-consultant__field {
    position: relative;
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .nx-topbar-consultant__select {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
  }

  .nx-topbar-consultant__field .nx-topbar-date__chev {
    display: none;
  }

  .nx-topbar-period__trigger .nx-topbar-date__chev {
    display: none;
  }

  .nx-topbar-period__trigger {
    justify-content: center;
    gap: 0;
  }

  .nx-topbar-period {
    position: static;
  }

  .nx-topbar-period__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    left: auto;
    min-width: min(16.5rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
  }

  .nx-topbar-period__custom-fields {
    grid-template-columns: 1fr;
  }

  .nx-topbar-cta {
    padding: 0 0.65rem;
    font-size: 0.78rem;
  }

  .nx-topbar-cta__label--desktop {
    display: none;
  }

  .nx-topbar-cta__label--mobile {
    display: inline;
  }

  .nx-topbar-user__copy {
    display: none;
  }

  .nx-topbar-user__trigger {
    padding: 0.15rem;
  }

  .nx-topbar-divider {
    display: none;
  }

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

@media (max-width: 1180px) {
  .nx-grid-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 640px) {
  .nx-grid-kpi {
    grid-template-columns: 1fr;
  }
  .nx-topbar {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }
  .nx-topbar__title {
    font-size: 0.9rem;
  }
  .nx-topbar-cta {
    padding: 0 0.55rem;
  }
}

/* —— Menu mobile (drawer) —— */
body.nx-mobile-nav-open {
  overflow: hidden;
}

.nx-mobile-nav[hidden] {
  display: none;
}

.nx-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.nx-mobile-nav.is-open {
  pointer-events: auto;
}

.nx-mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.nx-mobile-nav.is-open .nx-mobile-nav__backdrop {
  opacity: 1;
}

.nx-mobile-nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, calc(100vw - 3rem));
  max-width: 100%;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
}

.nx-mobile-nav.is-open .nx-mobile-nav__panel {
  transform: translateX(0);
}

.nx-mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.65rem 0.85rem 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.nx-mobile-nav__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 1;
  gap: 0.65rem;
  min-width: 0;
}

.nx-mobile-nav__brand img {
  display: block;
  max-width: 100%;
  max-height: 46px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.nx-mobile-nav__brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}

.nx-mobile-nav__brand-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.022em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
}

.nx-mobile-nav__close:hover {
  background: #f8fafc;
}

.nx-mobile-nav__close svg {
  width: 1rem;
  height: 1rem;
}

.nx-mobile-nav__nav {
  flex: 1;
  min-height: 0;
  padding-bottom: 1.25rem;
}

/* —— 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;
}

/* Lista de leads: coluna + drawer IA */
.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-with-ai--drawer {
  grid-template-columns: minmax(0, 1fr);
}
.nx-lead-wizard-main {
  min-width: 0;
}

/* Página de edição de lead — painel único compacto */
.nx-lead-edit {
  max-width: 56rem;
  margin: 0 auto;
}
.nx-lead-edit__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}
.nx-lead-edit__heading {
  min-width: 0;
  flex: 1;
}
.nx-lead-edit__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nx-lead-edit__import {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 1.7rem;
  padding: 0 0.7rem 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-sf, inherit);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.nx-lead-edit__import svg {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}
.nx-lead-edit__import:hover {
  background: rgba(61, 79, 124, 0.06);
  border-color: rgba(61, 79, 124, 0.28);
  transform: translateY(-1px);
}
.nx-lead-edit__import:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}
.nx-lead-edit__import:focus-visible {
  outline: 2px solid rgba(61, 79, 124, 0.4);
  outline-offset: 2px;
}
.nx-lead-edit__import-status {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.78rem;
  color: #166534;
}
.nx-lead-edit__import-status.is-error {
  color: #b91c1c;
}
.nx-lead-edit__back {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nx-lead-edit__back:hover {
  color: var(--primary);
}
.nx-lead-edit__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.nx-lead-edit__body {
  min-width: 0;
}

.nx-lead-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.nx-lead-block {
  padding: 0.85rem 1rem;
}
.nx-lead-block + .nx-lead-block {
  border-top: 1px solid var(--border);
}
.nx-lead-block__title {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8f8f95;
}

.nx-lead-form .nx-lead-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}
.nx-lead-form .nx-lead-span-2 {
  grid-column: span 2;
}
.nx-lead-form .nx-lead-span-full {
  grid-column: 1 / -1;
}
.nx-lead-form .nx-field {
  gap: 0.15rem;
  min-width: 0;
}
.nx-lead-form .nx-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #636366;
}
.nx-lead-form .nx-input,
.nx-lead-form .nx-select,
.nx-lead-form .nx-textarea {
  font-size: 0.8rem;
  line-height: 1.25;
  border-radius: 7px;
  border-color: #e2e2e7;
  background: #fafafa;
  padding: 0.28rem 0.5rem;
  min-height: 1.85rem;
  height: 1.85rem;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.nx-lead-form .nx-input:hover,
.nx-lead-form .nx-select:hover,
.nx-lead-form .nx-textarea:hover {
  border-color: #d0d0d6;
  background: #fff;
}
.nx-lead-form .nx-input:focus,
.nx-lead-form .nx-select:focus,
.nx-lead-form .nx-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 79, 124, 0.12);
}
.nx-lead-form .nx-textarea {
  height: auto;
  min-height: 2.75rem;
  padding: 0.4rem 0.5rem;
}
.nx-lead-form .nx-hint {
  font-size: 0.64rem;
  margin-top: 0.1rem;
}
.nx-lead-form .nx-cep-line {
  gap: 0.1rem;
}
.nx-lead-form .nx-phone-input__ddi {
  width: 5.25rem;
  min-width: 5rem;
  max-width: 5.75rem;
  font-size: 0.72rem;
  padding-left: 0.3rem;
  padding-right: 0.15rem;
  background: #f3f3f5;
}
.nx-lead-form .nx-btn-modern {
  min-width: 6.5rem;
  height: 2rem;
  padding: 0 0.85rem;
  border-radius: 9px;
  font-size: 0.8rem;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}

.nx-lead-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0 0.2rem;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(to top, var(--bg) 68%, rgba(245, 245, 247, 0));
}

@media (max-width: 960px) {
  .nx-lead-form .nx-lead-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nx-lead-form .nx-lead-span-2 {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .nx-lead-edit__title {
    font-size: 1.05rem;
  }
  .nx-lead-block {
    padding: 0.75rem 0.8rem;
  }
  .nx-lead-form .nx-lead-grid {
    grid-template-columns: 1fr;
  }
  .nx-lead-form .nx-lead-span-2,
  .nx-lead-form .nx-lead-span-full {
    grid-column: 1;
  }
}

/* Cotas do lead (comercial — separado de commissions) */
.nx-lead-quotas {
  margin-top: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.nx-lead-quotas__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}
.nx-lead-quotas__head .nx-lead-block__title {
  margin: 0;
  color: var(--primary);
}
.nx-lead-quotas__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  height: 1.55rem;
  padding: 0 0.55rem 0 0.4rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  font-family: var(--font-sf, inherit);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.nx-lead-quotas__add svg {
  width: 0.78rem;
  height: 0.78rem;
  flex-shrink: 0;
}
.nx-lead-quotas__add:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
}
.nx-lead-quotas__add:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.nx-lead-quotas__add:focus-visible {
  outline: 2px solid rgba(61, 79, 124, 0.4);
  outline-offset: 2px;
}
.nx-lead-quotas__table-wrap {
  overflow-x: auto;
}
.nx-lead-quotas__table {
  width: 100%;
  font-size: 0.78rem;
}
.nx-lead-quotas__table th,
.nx-lead-quotas__table td {
  padding: 0.4rem 0.45rem;
  white-space: nowrap;
}
.nx-lead-quotas__row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}
.nx-lead-quotas__row-actions .nx-form-inline {
  display: inline-flex;
  margin: 0;
}
.nx-lead-quotas__row-actions .nx-table-icon-btn {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
}
.nx-lead-quotas__row-actions .nx-table-icon-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}
.nx-dialog--quota {
  max-width: min(760px, calc(100vw - 1.25rem));
  width: calc(100% - 1.25rem);
  max-height: min(94vh, 920px);
}
.nx-dialog__inner--quota {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
  padding: 0;
  overflow: hidden;
}
.nx-quota-form__header {
  padding-bottom: 0.95rem;
}
.nx-quota-form__header .nx-dialog__subtitle {
  max-width: 28rem;
}
.nx-quota-form__body {
  overflow-y: auto;
  padding: 1rem 1.15rem 0.35rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.nx-quota-form__section {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
}
.nx-quota-form__section-title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
.nx-quota-form__grid {
  gap: 0.65rem 0.75rem;
}
.nx-quota-form__grid--id {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nx-quota-form__grid--id .nx-quota-form__credit {
  grid-column: 1 / -1;
  max-width: 16rem;
}
.nx-quota-form__grid--cond {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.nx-quota-form__grid--det {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.nx-quota-form__adhesion {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
}
/* display:flex em .nx-field anula [hidden] — força ocultar */
.nx-quota-form .nx-field[hidden],
#nxQuotaAdhesionAmountField[hidden],
#nxQuotaPurposeField[hidden] {
  display: none !important;
}
.nx-quota-form__credit .nx-input-prefix-wrap {
  max-width: 16rem;
}
.nx-quota-form__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.85rem 1.15rem 1.05rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, #fff 28%);
}
.nx-lead-quotas__toggle {
  display: inline-flex;
  gap: 0.4rem;
}
.nx-lead-quotas__toggle-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 4.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nx-lead-quotas__toggle-opt input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.nx-lead-quotas__toggle-opt:hover {
  border-color: #c5cddb;
  background: #f8fafc;
}
.nx-lead-quotas__toggle-opt:has(input:checked) {
  border-color: var(--primary);
  background: rgba(61, 79, 124, 0.08);
  color: var(--primary);
  font-weight: 600;
}
.nx-lead-quotas__toggle-opt:has(input:focus-visible) {
  outline: 2px solid rgba(61, 79, 124, 0.35);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .nx-quota-form__grid--id,
  .nx-quota-form__grid--cond,
  .nx-quota-form__grid--det {
    grid-template-columns: 1fr;
  }
  .nx-quota-form__grid--id .nx-quota-form__credit,
  .nx-quota-form__credit .nx-input-prefix-wrap {
    max-width: none;
  }
  .nx-quota-form__section {
    padding: 0.75rem 0.8rem;
  }
  .nx-quota-form__footer {
    justify-content: stretch;
  }
  .nx-quota-form__footer .nx-btn {
    flex: 1;
  }
}

/* Legado: wizard ainda referenciado na lista / CSS compartilhado */
.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-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  padding: 0.85rem 0 0.35rem;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(to top, var(--bg) 72%, rgba(245, 245, 247, 0));
}
.nx-lead-wizard-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
  min-width: 0;
}
.nx-lead-wizard-saves {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.nx-lead-wizard-footer-actions [hidden],
.nx-lead-wizard-saves[hidden] {
  display: none !important;
}
.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-lead-ai-fab {
  position: fixed;
  right: 0.9rem;
  top: 8.4rem;
  z-index: 60;
  width: 2.05rem;
  height: 4.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #198a97 0%, #0f7c8a 100%);
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 118, 131, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.nx-lead-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(15, 118, 131, 0.34);
}
.nx-lead-ai-fab.is-open {
  animation: none;
  opacity: 0.96;
}
.nx-lead-ai-fab__pulse {
  position: absolute;
  inset: -0.2rem;
  border-radius: inherit;
  background: rgba(25, 138, 151, 0.34);
  z-index: -1;
  animation: nxLeadAiPulse 1.35s ease-out infinite;
}
.nx-lead-ai-fab.is-open .nx-lead-ai-fab__pulse {
  animation: none;
  opacity: 0;
}
.nx-lead-ai-fab__icon {
  width: 1.38rem;
  height: 1.38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.nx-lead-ai-fab__icon svg {
  width: 0.82rem;
  height: 0.82rem;
  fill: currentColor;
}
.nx-lead-ai-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(15, 23, 42, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.nx-lead-ai-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nx-lead-ai-drawer-backdrop[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.nx-lead-ai-drawer {
  position: fixed;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 61;
  width: min(360px, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nx-lead-ai-drawer[data-open="1"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.nx-lead-ai-drawer .nx-ai-panel--lead,
.nx-lead-ai-drawer > .nx-ai-panel {
  position: static;
  top: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: auto;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}
.nx-lead-ai-drawer__close {
  align-self: flex-end;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}
.nx-lead-ai-drawer__close svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.nx-lead-ai-drawer__close:hover {
  background: #fff;
}
.nx-lead-wizard-with-ai--drawer > .nx-ai-panel--lead {
  display: none;
}
.nx-ai-card--muted {
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.55);
}

@keyframes nxLeadAiPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.82;
  }
  75% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.24);
    opacity: 0;
  }
}

@media (max-width: 1024px) {
  .nx-lead-wizard-with-ai {
    grid-template-columns: 1fr;
  }
  .nx-ai-panel--lead {
    position: static;
    max-height: none;
  }
  .nx-lead-ai-fab,
  .nx-lead-ai-drawer-backdrop {
    display: none;
  }
  .nx-lead-ai-drawer {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nx-lead-ai-drawer .nx-ai-panel--lead,
  .nx-lead-ai-drawer > .nx-ai-panel {
    box-shadow: none;
  }
  .nx-lead-ai-drawer__close {
    display: none;
  }
}

.nx-nexusia-alerts {
  margin: 0;
  padding-left: 1.1rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.nx-nexusia-alerts li + li {
  margin-top: 0.35rem;
}

.nx-ai-panel--live .nx-nexusia-metrics strong {
  color: #0f172a;
}

.nx-dashboard-with-ai > .nx-ai-panel--live,
.nx-whatsapp-chat-with-ai > .nx-ai-panel--live,
.nx-whatsapp-chat-with-ai--tablet-drawer > .nx-lead-ai-drawer .nx-ai-panel--live {
  position: static;
  top: auto;
  align-self: stretch;
  width: 100%;
  height: var(--nx-wa-panel-height, 620px);
  min-height: var(--nx-wa-panel-height, 620px);
  max-height: var(--nx-wa-panel-height, 620px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 14px;
}

.nx-ai-panel--live > .nx-ai-header {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.nx-ai-panel--live .nx-ai-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

.nx-ai-panel--live .nx-ai-panel__body::-webkit-scrollbar {
  width: 5px;
}

.nx-ai-panel--live .nx-ai-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.nx-ai-panel--live .nx-ai-panel__body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.nx-ai-panel--live .nx-ai-panel__body::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

.nx-ai-panel--live > .nx-ai-input-wrap {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 12px;
}

.nx-ai-panel--live.is-sleeping {
  opacity: 0.98;
}

.nx-nexusia-sleeping-card {
  border-color: rgba(180, 83, 9, 0.25);
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.nx-nexusia-sleeping-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #92400e;
  font-weight: 500;
}

.nx-ai-panel--live.is-sleeping .nx-ai-input input:disabled,
.nx-ai-panel--live.is-sleeping .nx-ai-input-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#nx-nexusia-ask-answer,
.nx-nexusia-ask-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.nx-nexusia-ask-bubble {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
}

.nx-nexusia-ask-bubble small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.72;
}

.nx-nexusia-ask-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.nx-nexusia-ask-bubble--user {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  align-self: flex-end;
  max-width: 92%;
}

.nx-nexusia-ask-bubble--ai {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
  max-width: 92%;
}

.nx-nexusia-ask-bubble--ai.is-loading p {
  opacity: 0.7;
  font-style: italic;
}

.nx-nexusia-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.nx-nexusia-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.nx-nexusia-badge--cache {
  background: #e0f2fe;
  color: #0369a1;
}

.nx-nexusia-badge--fallback {
  background: #fef3c7;
  color: #92400e;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer--non-lead.is-active {
  background: #f1f5f9;
  border-color: #94a3b8;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer--non-lead .nx-whatsapp-row__main strong {
  color: #475569;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer--lost-lead.is-active {
  background: #fff7ed;
  border-color: #fdba74;
}

button.nx-whatsapp-contact-row.nx-whatsapp-inbox-footer--lost-lead .nx-whatsapp-row__main strong {
  color: #9a3412;
}

.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--lead-wizard {
  max-width: min(720px, calc(100vw - 1.25rem));
  width: calc(100% - 1.25rem);
  max-height: min(94vh, 920px);
}
.nx-dialog--import {
  max-width: min(580px, calc(100vw - 1.25rem));
  width: calc(100% - 1.25rem);
  max-height: min(92vh, 720px);
}
.nx-dialog::backdrop { background: rgba(15, 23, 42, 0.4); }
.nx-dialog__inner { padding: 1.1rem; }
.nx-dialog__inner--lead {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
  padding: 0;
  overflow: hidden;
}
.nx-dialog__inner--import {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 720px);
  padding: 0;
  overflow: hidden;
}
.nx-dialog__header--lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nx-dialog__header--lead .nx-h4 {
  margin: 0;
}
.nx-dialog__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  max-width: 36rem;
}
.nx-dialog__body--lead {
  overflow: hidden;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nx-dialog__body--import {
  overflow-y: auto;
  padding: 1rem 1.15rem 1.15rem;
  flex: 1;
  min-height: 0;
}
.nx-dialog__close {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.nx-dialog__close svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}
.nx-dialog__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.nx-dialog--lead-wizard .nx-lead-wizard-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, #fff 28%);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.nx-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; margin-top: 0.6rem; }

.nx-dialog--funnel-leads {
  max-width: min(640px, calc(100vw - 1.25rem));
  width: calc(100% - 1.25rem);
  max-height: min(88vh, 720px);
}

.nx-dialog__inner--funnel-leads {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 720px);
  padding: 0;
  overflow: hidden;
}

.nx-funnel-leads-body {
  padding: 0.75rem 1.15rem 1.15rem;
  overflow: auto;
}

.nx-funnel-leads-status {
  margin: 0.35rem 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.45;
}

.nx-funnel-leads-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.nx-funnel-leads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nx-funnel-leads-item__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nx-funnel-leads-item__link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.nx-funnel-leads-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.nx-funnel-leads-item__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.nx-funnel-leads-item__meta {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.nx-funnel-leads-item__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}

.nx-funnel-leads-item__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.nx-funnel-leads-item__phone {
  font-size: 0.75rem;
  color: #64748b;
}

.nx-funnel-leads-item__arrow {
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .nx-funnel-leads-item__link {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nx-funnel-leads-item__side {
    display: none;
  }
}
.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 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 0.42rem 0.68rem; cursor: pointer; color: var(--fg);
}
.nx-filters__toggle-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  transition: transform 0.18s ease;
}
.nx-filters__toggle[aria-expanded="true"] .nx-filters__toggle-icon {
  transform: rotate(180deg);
}
.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--leads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
}
.nx-pag-meta-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.nx-pager__per-page {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.nx-pager__per-page-label {
  font-size: 0.8rem;
  line-height: 1.2;
}
.nx-pager__per-page .nx-pager__per-page-select,
.nx-pager__per-page-select {
  width: 2.85rem;
  min-width: 2.85rem;
  max-width: 3rem;
  flex: 0 0 auto;
  padding: 0.1rem 1.2rem 0.1rem 0.35rem;
  font-size: 0.75rem;
  line-height: 1.15;
  border-radius: 6px;
  min-height: 0;
  height: 1.6rem;
}
.nx-pag-meta {
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1.2;
}
.nx-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; }
.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; }
.nx-section-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}
.nx-leads-hero,
.nx-lead-show-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.15rem;
  padding: 1.2rem;
  border-color: #dbe6f5;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}
.nx-leads-hero::before,
.nx-lead-show-hero::before {
  content: "";
  position: absolute;
  inset: auto -48px -48px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 68%);
  pointer-events: none;
}
.nx-leads-hero__top,
.nx-lead-show-hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.nx-lead-show-hero__top {
  flex-direction: column;
  align-items: stretch;
}
.nx-lead-show-hero__actions {
  width: 100%;
  margin-left: 0;
  align-self: stretch;
  justify-content: center;
}
.nx-lead-show-hero__action-btn {
  display: inline-flex;
  align-items: center;
  min-width: 9.5rem;
  min-height: 2.5rem;
  padding: 0.62rem 1rem;
  font-family: var(--font-sf);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  justify-content: center;
}
.nx-lead-show-hero__action-btn--compact {
  min-width: 7.7rem;
  padding-left: 0.81rem;
  padding-right: 0.81rem;
}
.nx-leads-hero__actions {
  margin-left: auto;
  align-self: flex-start;
  justify-content: flex-end;
}
.nx-leads-hero__action-btn {
  min-width: 9.5rem;
  min-height: 2.5rem;
  padding: 0.62rem 1rem;
  font-family: var(--font-sf);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  justify-content: center;
}
.nx-leads-hero--compact {
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem 0.95rem;
}
.nx-leads-hero--compact .nx-h1 {
  margin: 0;
}
.nx-leads-hero__subtitle {
  margin: 0.45rem 0 0;
}
.nx-table-card__meta {
  margin: 0;
}
.nx-leads-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nx-leads-table-actions__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nx-leads-table-actions__icon-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--accent, #e85d4a);
}
.nx-leads-table-actions__icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-leads-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.nx-leads-hero__title-row .nx-h1 {
  margin: 0;
}
.nx-hero-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}
.nx-hero-metrics--compact {
  padding: 0.22rem 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.nx-hero-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  padding: 0.12rem 0.72rem;
  font-size: 0.76rem;
  line-height: 1.2;
  color: #94a3b8;
  white-space: nowrap;
}
.nx-hero-metric:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}
.nx-hero-metric strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: -0.02em;
}
.nx-hero-metric span {
  font-weight: 500;
}
.nx-leads-hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
  align-items: stretch;
}
.nx-stat-card {
  display: grid;
  gap: 0.28rem;
  justify-items: center;
  align-content: center;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(219, 230, 245, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  text-align: center;
}
.nx-stat-card__label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.nx-stat-card__value {
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.nx-stat-card__value--sm {
  font-size: 1.08rem;
  line-height: 1.35;
}
.nx-stat-card__hint {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 19rem;
}
.nx-chip-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}
.nx-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #dbe6f5;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.nx-chip--neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.nx-chip--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.nx-chip--accent {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.nx-chip--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.nx-filters-panel {
  padding: 1rem;
  margin-bottom: 1.1rem;
}
.nx-filters__bar--rich {
  margin-bottom: 0.9rem;
}
.nx-filters__box--soft {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.nx-form-grid--filters {
  margin-bottom: 12px;
}
.nx-filters-panel--compact {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}
.nx-filters-panel--compact .nx-filters__box {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.nx-import-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1.15rem;
}
.nx-import-panel .nx-table-card__header {
  margin-bottom: 0.75rem;
}
.nx-import-form__hint {
  margin: 0 0 1rem;
  line-height: 1.5;
}
.nx-import-form__requirements {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}
.nx-import-form__requirements ul {
  margin: 0;
  padding-left: 1.1rem;
}
.nx-import-form__requirements li + li {
  margin-top: 0.35rem;
}
.nx-import-form__requirements code {
  background: #eef2f7;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  font-size: 0.92em;
}
.nx-form-grid--import {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.nx-import-form__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}
.nx-import-origin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.nx-import-origin-head .nx-label {
  margin-bottom: 0;
}
.nx-import-form #nxImportOriginField .nx-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}
.nx-import-form__origins-panel {
  margin: 0;
}
.nx-import-form__origins-panel[hidden] {
  display: none !important;
}
.nx-import-form__pair.is-optional-origin #nxImportOriginLabel::after {
  content: ' (opcional)';
  font-weight: 400;
  color: #64748b;
}
.nx-import-form__pair.is-required-origin #nxImportOriginLabel::after {
  content: ' *';
  color: inherit;
}
.nx-import-form .nx-input--file {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.84rem;
}
.nx-import-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.nx-import-form__actions-end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}
@media (max-width: 520px) {
  .nx-import-form__pair {
    grid-template-columns: 1fr;
  }

  .nx-import-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nx-import-form__actions > .nx-btn {
    width: 100%;
    justify-content: center;
  }

  .nx-import-form__actions-end {
    width: 100%;
    margin-left: 0;
  }

  .nx-import-form__actions-end .nx-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
.nx-dialog--import-progress {
  max-width: 440px;
  width: calc(100% - 2rem);
  border: none;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.nx-dialog--import-progress::backdrop {
  background: rgba(15, 23, 42, 0.55);
}
.nx-import-progress {
  padding: 1.35rem 1.25rem 1.2rem;
  text-align: center;
}
.nx-import-progress__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: var(--primary, #3d4f7c);
}
.nx-import-progress__spinner {
  width: 2.5rem;
  height: 2.5rem;
  animation: nx-import-spin 0.9s linear infinite;
}
@keyframes nx-import-spin {
  to { transform: rotate(360deg); }
}
.nx-import-progress .nx-h4 {
  margin: 0 0 0.35rem;
}
.nx-import-progress__desc {
  margin: 0 0 1rem;
  line-height: 1.5;
  font-size: 0.92rem;
}
.nx-import-progress__track {
  height: 8px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.nx-import-progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary, #3d4f7c), var(--primary-glow, #1fa3a8));
  transition: width 0.25s ease;
}
.nx-dialog--import-progress.is-success .nx-import-progress__bar {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}
.nx-dialog--import-progress.is-error .nx-import-progress__bar {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}
.nx-import-progress__percent {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-foreground, #64748b);
}
.nx-import-progress__actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}
.nx-dialog--import-skip-log {
  max-width: min(860px, calc(100vw - 1.25rem));
  width: calc(100% - 1.25rem);
  max-height: min(90vh, 820px);
}
.nx-dialog__inner--skip-log {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: hidden;
}
.nx-skip-log__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.9rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.nx-skip-log__header-copy {
  min-width: 0;
}
.nx-skip-log__header .nx-section-kicker {
  margin: 0 0 0.2rem;
}
.nx-skip-log__header .nx-h4 {
  margin: 0;
}
.nx-skip-log__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.nx-skip-log__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-skip-log__chip--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.nx-skip-log__chip--accent {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.nx-skip-log__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.nx-skip-log__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.nx-skip-log__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  flex-shrink: 0;
}
.nx-skip-log__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.nx-skip-log__stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.nx-skip-log__stat-label {
  font-size: 0.75rem;
  color: #64748b;
}
.nx-skip-log__stat--ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.nx-skip-log__stat--ok .nx-skip-log__stat-value {
  color: #15803d;
}
.nx-skip-log__stat--info {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.nx-skip-log__stat--info .nx-skip-log__stat-value {
  color: #1d4ed8;
}
.nx-skip-log__stat--warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.nx-skip-log__stat--warn .nx-skip-log__stat-value {
  color: #b45309;
}
.nx-skip-log__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.nx-skip-log__search {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
}
.nx-skip-log__search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: inline-grid;
  place-items: center;
  pointer-events: none;
}
.nx-skip-log__search-input {
  width: 100%;
  padding-left: 2.15rem;
}
.nx-skip-log__count {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}
.nx-skip-log__list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nx-skip-log__table-wrap {
  flex: 1;
  min-height: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.nx-skip-log__table {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.nx-skip-log__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  padding: 0.65rem 0.75rem;
}
.nx-skip-log__table tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.nx-skip-log__table tbody tr:last-child td {
  border-bottom: 0;
}
.nx-skip-log__table tbody tr:hover td {
  background: #f8fafc;
}
.nx-skip-log__col-line {
  width: 4.5rem;
  white-space: nowrap;
}
.nx-skip-log__col-phone {
  width: 9.5rem;
  white-space: nowrap;
}
.nx-skip-log__col-reason {
  min-width: 14rem;
}
.nx-skip-log__line {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.nx-skip-log__phone {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: #334155;
}
.nx-skip-log__reason {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.nx-skip-log__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}
.nx-skip-log__badge--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.nx-skip-log__badge--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.nx-skip-log__badge--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.nx-skip-log__badge--muted,
.nx-skip-log__badge--neutral {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.nx-skip-log__reason-detail {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}
.nx-skip-log__loading,
.nx-skip-log__empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  flex: 1;
  min-height: 10rem;
}
.nx-skip-log__loading p,
.nx-skip-log__empty p {
  margin: 0;
}
.nx-skip-log__empty-title {
  font-weight: 600;
  color: #0f172a;
}
.nx-skip-log__empty--error {
  border-color: #fecaca;
  background: #fef2f2;
}
.nx-skip-log__spinner {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  border-top-color: #2563eb;
  animation: nx-skip-log-spin 0.7s linear infinite;
}
@keyframes nx-skip-log-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 640px) {
  .nx-skip-log__stats {
    grid-template-columns: 1fr;
  }
  .nx-skip-log__col-phone {
    width: auto;
  }
}
.nx-dialog--import-chooser {
  max-width: min(520px, calc(100vw - 1.25rem));
}
.nx-import-chooser {
  display: grid;
  gap: 0.75rem;
}
.nx-import-chooser__card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.85rem;
  align-items: start;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nx-import-chooser__card:hover,
.nx-import-chooser__card:focus-visible {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.nx-import-chooser__icon {
  grid-row: 1 / span 2;
  font-size: 1.5rem;
  line-height: 1;
}
.nx-import-chooser__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
}
.nx-import-chooser__desc {
  grid-column: 2;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
}
.nx-dialog--import-crm {
  max-width: min(760px, calc(100vw - 1.25rem));
  max-height: min(94vh, 860px);
}
.nx-dialog--import-crm .nx-dialog__inner--import {
  max-height: min(94vh, 860px);
}
.nx-crm-import {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}
.nx-crm-import__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.nx-crm-import__steps > span {
  flex: 1 1 0;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: #64748b;
  background: #f1f5f9;
}
.nx-crm-import__steps > span.is-active {
  color: #fff;
  background: var(--primary, #2563eb);
}
.nx-crm-import__steps > span.is-done {
  color: #0f766e;
  background: #ccfbf1;
}
.nx-crm-import__panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}
.nx-crm-import__panel[hidden] {
  display: none !important;
}
.nx-crm-import__preview-meta {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
}
.nx-crm-import__preview .nx-table-wrap {
  max-height: 12rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.nx-crm-import__mapping {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding-right: 0.25rem;
}
.nx-crm-import__mapping-group {
  display: grid;
  gap: 0.65rem;
}
.nx-crm-import__mapping-group .nx-field {
  margin: 0;
}
.nx-crm-import__subheading {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
}
.nx-crm-import__hint {
  margin: 0;
}
.nx-crm-import__stage-map {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  max-height: 14rem;
  overflow: auto;
}
.nx-crm-import__stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem);
  gap: 0.65rem;
  align-items: center;
}
.nx-crm-import__stage-label {
  font-size: 0.82rem;
  color: var(--fg);
  word-break: break-word;
}
.nx-crm-import__summary-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}
.nx-crm-import__lead-field {
  margin-bottom: 1rem;
}
.nx-crm-import__destination {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}
.nx-crm-import__destination-options {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.nx-crm-import__destination-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.02));
  cursor: pointer;
}
.nx-crm-import__destination-option:has(input:checked) {
  border-color: var(--accent, #3b82f6);
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, transparent);
}
.nx-crm-import__destination-option input {
  margin-top: 0.15rem;
}
.nx-crm-import__destination-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nx-crm-import__destination-copy strong {
  font-size: 0.88rem;
  font-weight: 600;
}
.nx-crm-import__destination-copy span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.nx-crm-import__origins-panel {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.02));
}
.nx-crm-import__origins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.nx-crm-import__origins-header .nx-h4 {
  margin: 0;
}
.nx-btn--compact {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}
.nx-crm-import__conflicts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.65rem;
}
.nx-crm-import__conflicts-wrap {
  max-height: min(42vh, 22rem);
  overflow: auto;
}
.nx-crm-import__conflicts-wrap .nx-table td,
.nx-crm-import__conflicts-wrap .nx-table th {
  vertical-align: top;
}
.nx-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.nx-check input {
  margin: 0;
}
.nx-crm-import__origin-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--surface, transparent);
}
.nx-crm-import__origin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}
.nx-field--inline {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9rem;
}
.nx-field--inline .nx-label {
  font-size: 0.72rem;
}
.nx-td-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.nx-crm-import__origin-item.is-missing {
  border-color: color-mix(in srgb, #f59e0b 45%, var(--border));
  background: color-mix(in srgb, #f59e0b 8%, transparent);
}
.nx-crm-import__origin-item.is-ready {
  border-color: color-mix(in srgb, #22c55e 35%, var(--border));
}
.nx-crm-import__origin-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.nx-crm-import__origin-meta strong {
  font-size: 0.86rem;
}
.nx-crm-import__origin-meta span {
  font-size: 0.76rem;
  color: var(--muted);
}
.nx-crm-import__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .nx-crm-import__stage-row {
    grid-template-columns: 1fr;
  }
  .nx-crm-import__steps > span {
    min-width: calc(50% - 0.2rem);
    flex: 1 1 calc(50% - 0.2rem);
  }
}
.nx-leads-filter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nx-leads-filter__primary,
.nx-leads-filter__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
}
.nx-leads-filter__search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 18rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nx-leads-filter__search:focus-within {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.nx-leads-filter__search svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  color: #94a3b8;
}
.nx-leads-filter__search .nx-input {
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
  flex: 1;
  height: auto;
  font-size: 0.8125rem;
  box-shadow: none;
}
.nx-leads-filter__search .nx-input:focus {
  outline: none;
  box-shadow: none;
}
.nx-leads-filter__select {
  flex: 0 1 7rem;
  min-width: 6rem;
  max-width: 9rem;
  height: 2.25rem;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.8125rem;
  border-radius: 10px;
  color: #334155;
}
.nx-leads-filter__select:has(option[value=""]:checked) {
  color: #64748b;
}
.nx-leads-filter__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 0;
}
.nx-leads-filter .nx-leads-filter__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nx-leads-filter .nx-leads-filter__btn:visited {
  color: #475569;
}
.nx-leads-filter .nx-leads-filter__btn--primary,
.nx-leads-filter .nx-leads-filter__btn--primary:visited {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
}
.nx-leads-filter .nx-leads-filter__btn--primary:hover {
  filter: brightness(1.04);
  color: #fff;
}
.nx-leads-filter .nx-leads-filter__btn--ghost:hover,
.nx-leads-filter .nx-leads-filter__btn--ghost:visited:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--primary);
}
.nx-leads-filter .nx-leads-filter__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nx-leads-filter .nx-leads-filter__icon-btn[hidden] {
  display: none;
}
.nx-leads-filter__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.nx-leads-filter__icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nx-leads-filter .nx-leads-filter__icon-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--primary);
}
.nx-leads-filter .nx-leads-filter__icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nx-leads-filter .nx-leads-filter__icon-btn:disabled:hover {
  border-color: #e2e8f0;
  background: #fff;
  color: #475569;
}
.nx-leads-filter__period,
.nx-leads-filter__cadastro {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.nx-leads-filter__period-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nx-leads-filter__date {
  width: 6.75rem;
  max-width: 6.75rem;
  height: 2.25rem;
  padding: 0 0.3rem;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.8125rem;
  border-radius: 10px;
}
.nx-leads-filter__period-sep {
  color: #94a3b8;
  font-size: 0.875rem;
  user-select: none;
}
@media (max-width: 1280px) {
  .nx-leads-filter__primary > .nx-leads-filter__actions {
    flex-basis: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}
@media (max-width: 900px) {
  .nx-leads-filter__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
  .nx-leads-filter__period,
  .nx-leads-filter__cadastro {
    width: 100%;
  }
}
.nx-leads-filter__primary {
  flex-wrap: wrap;
}
.nx-leads-filter__select {
  flex: 1 1 6.5rem;
  min-width: 5.75rem;
  max-width: 8.5rem;
}
.nx-leads-filter__search {
  flex: 1 1 11rem;
  max-width: 16rem;
}
.nx-filters__box--inline {
  padding: 0.75rem 0.9rem;
}
.nx-filters__inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
}
.nx-filters__actions--leading,
.nx-filters__actions--trailing {
  flex-shrink: 0;
  padding-bottom: 0.05rem;
}
.nx-filters__inline-field {
  flex: 1 1 0;
  min-width: 0;
}
.nx-filters__inline-field--compact {
  flex: 0 1 11rem;
  max-width: 11rem;
}
@media (max-width: 720px) {
  .nx-filters__inline {
    flex-wrap: wrap;
  }
  .nx-filters__actions--leading,
  .nx-filters__actions--trailing {
    width: 100%;
    padding-bottom: 0;
  }
  .nx-filters__inline-field--compact {
    flex: 1 1 8rem;
    max-width: none;
  }
}
.nx-table-card {
  padding: 1rem;
}
.nx-table-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.nx-table--leads tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.nx-table--leads tbody tr:hover {
  background: #fafcff;
}
.nx-table--leads tbody tr.is-selected {
  background: #fff7f5;
}
.nx-table-wrap--fit {
  overflow-x: hidden;
  max-width: 100%;
}
.nx-table--leads-fit {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  font-size: 0.78rem;
}
.nx-table--leads-fit th,
.nx-table--leads-fit td {
  padding: 0.4rem 0.4rem;
  vertical-align: middle;
}
.nx-table--leads-fit th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
}
.nx-table--leads-fit .nx-col-check {
  width: 2.1rem;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}
.nx-table--leads-fit .nx-col-lead {
  width: 16%;
}
.nx-table--leads-fit .nx-col-contact {
  width: 11%;
}
.nx-table--leads-fit .nx-col-origin,
.nx-table--leads-fit .nx-col-credit,
.nx-table--leads-fit .nx-col-captador,
.nx-table--leads-fit .nx-col-consultant,
.nx-table--leads-fit .nx-col-stage {
  width: 9.5%;
}
.nx-table--leads-fit .nx-col-credit {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nx-table--leads-fit .nx-col-motivo {
  width: 12%;
}
.nx-table--leads-fit .nx-col-cadastro {
  width: 5.75rem;
}
.nx-table--leads-fit .nx-col-actions {
  width: 8.75rem;
}
/* Admin/gestor/supervisor: só Captador e Consultor um pouco menores para caber o último botão de Ações */
.nx-table--leads-fit.nx-table--leads-mgmt .nx-col-captador,
.nx-table--leads-fit.nx-table--leads-mgmt .nx-col-consultant {
  width: 7.5%;
}
/* Vendedores: Lead / Contato / Origem / Crédito dividem o espaço */
.nx-table--leads-fit.nx-table--leads-operator .nx-col-lead,
.nx-table--leads-fit.nx-table--leads-operator .nx-col-contact,
.nx-table--leads-fit.nx-table--leads-operator .nx-col-origin,
.nx-table--leads-fit.nx-table--leads-operator .nx-col-credit {
  width: 17%;
}
.nx-table--leads-fit.nx-table--leads-operator .nx-col-stage {
  width: 12%;
}
.nx-table--leads-fit.nx-table--leads-operator .nx-col-cadastro {
  width: 5.75rem;
}
.nx-table--leads-fit.nx-table--leads-operator .nx-col-actions {
  width: 8.75rem;
}
.nx-table--leads-fit .nx-table-person,
.nx-table--leads-fit .nx-meta-stack {
  min-width: 0;
}
.nx-table--leads-fit .nx-table-person strong,
.nx-table--leads-fit .nx-table-person span,
.nx-table--leads-fit .nx-meta-stack strong,
.nx-table--leads-fit .nx-meta-stack span,
.nx-table--leads-fit .nx-cell-clamp {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.nx-table--leads-fit .nx-table-person span,
.nx-table--leads-fit .nx-meta-stack span {
  font-size: 0.7rem;
}
.nx-table--leads-fit .nx-chip {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 1.45rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.7rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-table--leads-fit .nx-actions--table {
  flex-wrap: nowrap;
  gap: 0.2rem;
  justify-content: flex-start;
}
.nx-table--leads-fit .nx-table-icon-btn {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.nx-table--leads-fit .nx-table-icon-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}
@media (max-width: 1100px) {
  .nx-table--leads-fit .nx-col-stage {
    width: 8%;
  }
  .nx-table--leads-fit .nx-col-actions {
    width: 7.5rem;
  }
  .nx-table--leads-fit.nx-table--leads-mgmt .nx-col-captador,
  .nx-table--leads-fit.nx-table--leads-mgmt .nx-col-consultant {
    width: 7%;
  }
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-lead,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-contact,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-origin,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-credit {
    width: 16%;
  }
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-stage {
    width: 11%;
  }
}
/* Mobile: deslizar horizontalmente até o fim da linha */
@media (max-width: 900px) {
  .nx-table-wrap--fit {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }
  .nx-table--leads-fit {
    table-layout: auto;
    width: max-content;
    min-width: 52rem;
    font-size: 0.8rem;
  }
  .nx-table--leads-fit th,
  .nx-table--leads-fit td {
    padding: 0.5rem 0.55rem;
  }
  .nx-table--leads-fit .nx-col-check {
    width: 2.4rem;
  }
  .nx-table--leads-fit .nx-col-lead {
    width: 11rem;
    min-width: 10rem;
  }
  .nx-table--leads-fit .nx-col-contact {
    width: 8.5rem;
    min-width: 8rem;
  }
  .nx-table--leads-fit .nx-col-origin,
  .nx-table--leads-fit .nx-col-credit,
  .nx-table--leads-fit .nx-col-captador,
  .nx-table--leads-fit .nx-col-consultant,
  .nx-table--leads-fit .nx-col-stage,
  .nx-table--leads-fit .nx-col-motivo {
    width: 7.5rem;
    min-width: 7rem;
  }
  .nx-table--leads-fit.nx-table--leads-mgmt .nx-col-captador,
  .nx-table--leads-fit.nx-table--leads-mgmt .nx-col-consultant {
    width: 6.5rem;
    min-width: 6rem;
  }
  .nx-table--leads-fit.nx-table--leads-operator {
    min-width: 44rem;
  }
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-lead,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-contact,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-origin,
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-credit {
    width: 9rem;
    min-width: 8.5rem;
  }
  .nx-table--leads-fit.nx-table--leads-operator .nx-col-stage {
    width: 8rem;
    min-width: 7.5rem;
  }
  .nx-table--leads-fit .nx-col-cadastro {
    width: 5.5rem;
    min-width: 5.25rem;
  }
  .nx-table--leads-fit .nx-col-actions {
    width: 9.5rem;
    min-width: 9rem;
  }
  .nx-table--leads-fit .nx-chip {
    width: auto;
    max-width: 7.25rem;
    display: inline-block;
  }
  .nx-table--leads-fit .nx-table-icon-btn {
    width: 1.85rem;
    height: 1.85rem;
  }
}
.nx-td-check {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}
.nx-lead-check,
.nx-lead-check-all {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent, #e85d4a);
  cursor: pointer;
}
.nx-leads-bulk-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.95rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, #fff) 0%, #fff 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(61, 79, 124, 0.06);
  animation: nx-bulk-bar-in 180ms ease-out;
}
.nx-leads-bulk-bar[hidden] {
  display: none !important;
}
.nx-leads-bulk-bar__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 0 auto;
}
.nx-leads-bulk-bar__badge {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
  flex-shrink: 0;
}
.nx-leads-bulk-bar__badge svg {
  width: 0.9rem;
  height: 0.9rem;
}
.nx-leads-bulk-bar__count {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
  line-height: 1.2;
}
.nx-leads-bulk-bar__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}
.nx-leads-bulk-bar__group {
  display: contents;
}
.nx-leads-bulk-bar__group--end {
  display: contents;
}
.nx-bulk-action {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1 1 0;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.35rem 0.3rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--fg);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}
.nx-bulk-action__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.15;
  max-width: 100%;
}
.nx-bulk-action__label > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-bulk-action svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-bulk-action:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  background: #fff;
  box-shadow: 0 2px 8px rgba(61, 79, 124, 0.1);
  transform: translateY(-1px);
}
.nx-bulk-action:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}
.nx-bulk-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}
.nx-bulk-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.nx-bulk-action--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(61, 79, 124, 0.22);
}
.nx-bulk-action--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-glow), var(--primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(61, 79, 124, 0.28);
}
.nx-bulk-action--soft {
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
}
.nx-bulk-action--soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 14%, #fff);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary);
}
.nx-bulk-action--warn {
  background: #fff8f1;
  color: #9a3412;
  border-color: #fed7aa;
}
.nx-bulk-action--warn:hover:not(:disabled) {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}
.nx-bulk-action--ghost {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
  color: var(--muted);
}
.nx-bulk-action--ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--fg);
  border-color: color-mix(in srgb, var(--fg) 18%, var(--border));
  box-shadow: none;
}
.nx-bulk-action--danger {
  background: color-mix(in srgb, var(--danger) 8%, #fff);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 22%, transparent);
}
.nx-bulk-action--danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
@keyframes nx-bulk-bar-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nx-btn--danger {
  border-color: #fca5a5;
  background: #fff;
  color: var(--danger, #c94e2c);
}
.nx-btn--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

@media (max-width: 900px) {
  .nx-leads-bulk-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem;
  }
  .nx-leads-bulk-bar__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
  }
  .nx-bulk-action {
    flex: none;
    width: 100%;
    min-height: 2.85rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.74rem;
  }
}
.nx-user-list-cell {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.nx-user-list-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #4b6f89, #79a2be);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nx-user-list-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nx-user-list-avatar__initial {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  user-select: none;
}

.nx-table-person,
.nx-meta-stack {
  display: grid;
  gap: 0.18rem;
}
.nx-table-person strong,
.nx-meta-stack strong {
  color: #0f172a;
}
.nx-table-person span,
.nx-meta-stack span {
  font-size: 0.79rem;
  line-height: 1.4;
  color: #64748b;
}
.nx-id-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}
.nx-actions--table {
  gap: 0.55rem;
}
.nx-actions--icons {
  align-items: center;
}
.nx-table-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nx-table-icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-table-icon-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--primary);
}
.nx-table-icon-btn--danger:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}
.nx-table-icon-btn--accent:hover {
  border-color: #6ee7b7;
  background: #ecfdf5;
  color: #047857;
}
.nx-table-icon-btn--warning:hover {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}
.nx-table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
  color: #047857;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nx-table-action-btn--activate:hover {
  border-color: #34d399;
  background: #d1fae5;
  color: #065f46;
}
.nx-actions--table .nx-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.1rem;
}
.nx-show-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: flex-start;
}
.nx-show-grid__full {
  grid-column: 1 / -1;
}
.nx-card--feature {
  border-color: #dbe6f5;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}
.nx-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.nx-btn-row--compact {
  gap: 0.45rem;
}
.nx-btn-row--compact .nx-btn {
  min-height: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}
.nx-pipeline-hero,
.nx-pipeline-card {
  margin-bottom: 1rem;
}
.nx-pipeline-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}
.nx-pipeline-column {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 100%;
  padding: 0.95rem;
  border: 1px solid #dbe6f5;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.nx-pipeline-column__header {
  display: grid;
  gap: 0.55rem;
}
.nx-pipeline-column__title[title] {
  cursor: help;
}
.nx-pipeline-column__body {
  display: grid;
  gap: 0.75rem;
}
.nx-pipeline-lead-card {
  border: 1px solid rgba(219, 230, 245, 0.95);
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.nx-pipeline-lead-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.nx-pipeline-lead-card__top h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #0f172a;
}
.nx-pipeline-lead-card__top p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}
.nx-pipeline-lead-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.nx-pipeline-lead-meta > div {
  display: grid;
  gap: 0.12rem;
}
.nx-pipeline-lead-meta dt {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}
.nx-pipeline-lead-meta dd {
  margin: 0;
  font-size: 0.84rem;
  color: #334155;
}
.nx-pipeline-lead-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.85rem;
}
.nx-pipeline-empty {
  display: grid;
  place-items: center;
  min-height: 8rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
  color: #64748b;
  font-size: 0.86rem;
  text-align: center;
}
.nx-pipeline-empty-state {
  display: grid;
  gap: 0.8rem;
  justify-items: start;
}
.nx-stage-config-stack {
  display: grid;
  gap: 1rem;
}
.nx-stage-config-list {
  display: grid;
  gap: 0.9rem;
}
.nx-stage-config-item {
  padding: 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nx-stage-config-item.is-dragging {
  opacity: 0.72;
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
}
.nx-stage-config-item__row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.nx-stage-config-item__handle {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  cursor: grab;
}
.nx-stage-config-item__handle svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.nx-stage-config-item__main {
  flex: 1;
  min-width: 0;
}
.nx-stage-config-item__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}
.nx-stage-config-item__position {
  min-width: 5.8rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}
.nx-stage-config-item__editor {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e2e8f0;
}
.nx-stage-config-form {
  display: grid;
  gap: 0.9rem;
}
.nx-stage-config-form__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.nx-stage-config-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

@media (max-width: 1024px) {
  .nx-leads-hero__stats {
    grid-template-columns: 1fr;
  }
  .nx-page-leads-list .nx-topbar__page {
    display: none;
  }
  .nx-page-leads-list .nx-leads-hero--compact {
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.95rem;
  }
  .nx-page-leads-list .nx-leads-hero__top {
    gap: 0;
  }
  .nx-leads-hero__actions--desktop-only,
  .nx-leads-table-actions--desktop-only {
    display: none;
  }
}

@media (min-width: 1025px) {
  .nx-page-leads-list .nx-leads-hero--mobile-only {
    display: none;
  }
  .nx-page-leads-list .nx-table-card__header {
    align-items: center;
  }
  .nx-page-leads-list .nx-leads-table-actions {
    margin-left: auto;
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  .nx-show-grid {
    grid-template-columns: 1fr;
  }
  .nx-pipeline-board {
    grid-auto-columns: minmax(260px, 88vw);
  }
  .nx-stage-config-item__row {
    align-items: flex-start;
  }
  .nx-stage-config-item__right {
    width: 100%;
    justify-content: flex-start;
    padding-left: 3.2rem;
  }
  .nx-leads-hero__actions {
    margin-left: 0;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nx-leads-hero,
  .nx-lead-show-hero,
  .nx-filters-panel,
  .nx-table-card {
    padding: 0.95rem;
  }
  .nx-pag-meta-group {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }
  .nx-pag-meta-group::-webkit-scrollbar {
    display: none;
  }
  .nx-btn-row {
    width: 100%;
  }
  .nx-btn-row .nx-btn,
  .nx-btn-row .nx-filters__download {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .nx-lead-show-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-left: 0;
    width: 100%;
  }
  .nx-lead-show-hero__actions .nx-lead-show-hero__action-form {
    display: block;
    grid-column: 1 / -1;
    margin: 0;
  }
  .nx-lead-show-hero__actions .nx-lead-show-hero__action-btn {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.58rem 0.65rem;
    font-size: 0.82rem;
  }
  .nx-leads-hero__top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .nx-leads-hero__actions {
    margin-left: 0;
    width: 100%;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .nx-leads-hero__action-btn--desktop {
    display: none !important;
  }
  .nx-leads-hero__actions .nx-btn,
  .nx-leads-hero__actions .nx-btn-primary {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.58rem 0.65rem;
    font-size: 0.82rem;
  }
  .nx-leads-hero__actions .nx-btn-primary {
    grid-column: 1 / -1;
  }
  .nx-leads-hero__action-btn {
    min-width: 0;
  }
  .nx-table-card__header {
    margin-bottom: 0.65rem;
  }
}

/* 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);
}

.nx-user-data-mgmt__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nx-stat-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 140px;
}
.nx-stat-pill__label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.nx-stat-pill__value {
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
}
.nx-user-data-mgmt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-user-data-mgmt__form {
  display: inline;
}

/* —— Edição de usuário (layout administrativo) —— */
.nx-user-edit-hero .nx-leads-hero__top {
  align-items: center;
}

.nx-user-edit-form {
  margin-top: 14px;
}

.nx-user-edit-shell {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  align-items: start;
}

.nx-user-profile-card {
  padding: 20px;
  position: static;
  align-self: start;
}

.nx-user-profile-card__avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.nx-user-avatar-upload--profile {
  width: 128px;
  height: 128px;
  border: 2px solid #e8ecf4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nx-user-avatar-upload--profile:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.nx-user-profile-card__avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nx-user-profile-card__avatar-hint {
  margin: 0;
  max-width: 240px;
}

.nx-user-profile-meta {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}

.nx-user-profile-meta__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.nx-user-profile-meta__value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.nx-user-profile-meta__value--break {
  font-weight: 500;
}

.nx-user-ig-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.nx-user-ig-status.is-connected {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.nx-user-ig-status.is-disconnected {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.nx-user-ig-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
  background: #94a3b8;
}

.nx-user-ig-status.is-connected .nx-user-ig-status__dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.nx-user-ig-status__title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nx-user-ig-status__text {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.nx-user-ig-status__account {
  display: block;
  font-size: 0.82rem;
  color: #475569;
  margin-top: 2px;
}

.nx-user-form-card {
  padding: 20px;
}

.nx-user-form-card__header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}

.nx-user-form-card__actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.nx-field--span-2 {
  grid-column: 1 / -1;
}

.nx-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nx-user-permissions {
  margin-top: 10px;
}

.nx-user-password-block .nx-user-password-rules {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.nx-user-password-block .nx-hint {
  display: block;
  margin-top: 0.5rem;
}

.nx-user-form-card--readonly .nx-input:disabled,
.nx-user-form-card--readonly .nx-select:disabled {
  opacity: 1;
  color: #0f172a;
  background: #f8fafc;
  cursor: default;
}

.nx-user-form-card--readonly .nx-chip--selectable:has(input:disabled) {
  opacity: 1;
  cursor: default;
}

.nx-user-nexusia-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.nx-user-nexusia-section__head {
  margin-bottom: 12px;
}

.nx-user-nexusia-section__grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nx-user-nexusia-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.nx-user-nexusia-toggle-row__text strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}

.nx-user-nexusia-toggle-row__text small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.nx-chip--selectable {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nx-user-data-mgmt {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(220, 53, 69, 0.2);
  background: linear-gradient(180deg, #fff 0%, #fffbfb 100%);
}

.nx-stat-pill__value--ok {
  color: #15803d;
}

.nx-stat-pill__value--muted {
  color: #64748b;
}

.nx-btn-danger-outline {
  border-color: #dc3545;
  color: #dc3545;
}

.nx-btn-danger-outline:hover {
  background: #fff5f5;
}

.nx-user-data-mgmt__confirm-hint {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .nx-user-edit-shell {
    grid-template-columns: 1fr;
  }

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

  .nx-field--span-2 {
    grid-column: auto;
  }
}

/* Preferências (settings) — mesmo ritmo visual de Integrações */
.nx-preferences-page {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.nx-preferences-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0;
}

.nx-preferences-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nx-preferences-block__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.1rem;
}

.nx-preferences-block__title {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.nx-preferences-brand-grid,
.nx-preferences-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.nx-preferences-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-preferences-card--logo {
  background: linear-gradient(180deg, #f7faff, #fff);
  border-color: #d7e6f8;
}

.nx-preferences-card--favicon {
  background: linear-gradient(180deg, #f5faf9, #fff);
  border-color: #d5e8e3;
}

.nx-preferences-card--form {
  max-width: 44rem;
  padding: 1rem 1.05rem 1.05rem;
  gap: 1rem;
}

.nx-preferences-card--commissions {
  background: linear-gradient(180deg, #f7fdf9, #fff);
  border-color: #d8efe2;
}

.nx-preferences-card--maintenance {
  background: linear-gradient(180deg, #fffaf5, #fff);
  border-color: #f3dfc8;
}

.nx-preferences-card--maintenance.is-active {
  background: linear-gradient(180deg, #fff7ed, #fff);
  border-color: #fdba74;
}

.nx-preferences-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.nx-preferences-card__identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nx-preferences-card__icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.nx-preferences-card__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-preferences-card__icon--logo {
  background: #dbeafe;
  color: #2563eb;
}

.nx-preferences-card__icon--favicon {
  background: #d1fae5;
  color: #0f766e;
}

.nx-preferences-card__icon--commissions {
  background: #dcfce7;
  color: #16a34a;
}

.nx-preferences-card__icon--maintenance {
  background: #ffedd5;
  color: #c2410c;
}

.nx-preferences-card__title {
  margin: 0;
  font-family: var(--font-sf);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.nx-preferences-card__meta {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.3;
}

.nx-preferences-card__hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #64748b;
}

.nx-preferences-card__error {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #dc2626;
}

.nx-preferences-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  flex-shrink: 0;
}

.nx-preferences-badge.is-on {
  background: #dcfce7;
  color: #166534;
}

.nx-preferences-badge.is-off {
  background: #f1f5f9;
  color: #64748b;
}

.nx-preferences-badge.is-warn {
  background: #ffedd5;
  color: #c2410c;
}

.nx-preferences-switch {
  margin: 0;
  flex-shrink: 0;
}

.nx-preferences-logo-preview,
.nx-preferences-favicon-preview {
  min-height: 7.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.nx-preferences-favicon-preview {
  min-height: 6.5rem;
}

.nx-preferences-logo-preview__img {
  display: block;
  max-width: 100%;
  max-height: 5.5rem;
  object-fit: contain;
}

.nx-preferences-favicon-preview__img {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  border-radius: 0.65rem;
}

.nx-preferences-logo-preview__empty,
.nx-preferences-favicon-preview__empty {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.nx-preferences-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.nx-preferences-upload-btn,
.nx-preferences-remove-btn {
  cursor: pointer;
  margin: 0;
}

.nx-preferences-remove-btn.is-checked {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.nx-preferences-form-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.15rem;
}

.nx-input-prefix-wrap {
  display: flex;
  align-items: stretch;
}

.nx-input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  border: 1px solid #d8dee8;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.nx-input--prefixed {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.nx-phone-input {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.nx-phone-input__ddi {
  flex: 0 0 auto;
  width: 6.75rem;
  min-width: 6.25rem;
  max-width: 7.5rem;
  border-radius: 8px 0 0 8px;
  border-right: 0;
  padding-left: 0.45rem;
  padding-right: 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.nx-phone-input__number {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 0 8px 8px 0;
}

@media (max-width: 640px) {
  .nx-phone-input__ddi {
    width: 5.75rem;
    min-width: 5.5rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 900px) {
  .nx-preferences-brand-grid,
  .nx-preferences-toggles {
    grid-template-columns: 1fr;
  }

  .nx-preferences-card--form {
    max-width: none;
  }
}

/* —— Hierarquia de usuários —— */
.nx-hierarchy-unassigned {
  color: #94a3b8;
  font-size: 0.875rem;
}

.nx-hierarchy-root {
  color: #64748b;
}

.nx-hierarchy-role-guide {
  padding: 16px 18px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #f8fafc;
}

.nx-hierarchy-levels {
  margin: 0;
  padding-left: 1.2rem;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.55;
}

.nx-hierarchy-levels li + li {
  margin-top: 6px;
}

.nx-dialog--celebration {
  max-width: min(460px, calc(100vw - 1.5rem));
  width: calc(100% - 1.5rem);
  border: none;
  overflow: visible;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.nx-dialog--celebration::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.nx-celebration {
  position: relative;
  padding: 1.35rem 1.25rem 1.15rem;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(74, 222, 128, 0.18), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.nx-celebration__burst {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #dcfce7, #fef9c3);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
  animation: nx-celebration-pop 0.55s ease-out;
}

.nx-celebration__emoji {
  font-size: 2rem;
  line-height: 1;
}

.nx-celebration__head .nx-h3 {
  margin: 0;
  font-size: 1.45rem;
}

.nx-celebration__kicker {
  margin-bottom: 0.35rem;
  color: #16a34a;
}

.nx-celebration__subtitle {
  margin: 0.65rem 0 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.nx-celebration__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: #334155;
}

.nx-celebration__details span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.nx-celebration__actions {
  justify-content: center;
  margin-top: 1rem;
}

.nx-celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nx-celebration-canvas.is-active {
  opacity: 1;
}

.nx-dialog--celebration {
  z-index: 9999;
}

@keyframes nx-celebration-pop {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== Dashboard de Desempenho ===== */
.nx-perf {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nx-perf-filters {
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nx-perf-filters__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.nx-perf-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #64748b;
  font-size: 0.78rem;
}

.nx-perf-filters__chip svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.nx-perf-filters__hint {
  color: #94a3b8;
  font-size: 0.72rem;
}

.nx-perf-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.nx-perf-kpi {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 96px;
}

.nx-perf-kpi__icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
}

.nx-perf-kpi__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nx-perf-kpi__icon--teal { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.nx-perf-kpi__icon--orange { background: linear-gradient(145deg, #fb923c, #ea580c); }
.nx-perf-kpi__icon--blue { background: linear-gradient(145deg, #60a5fa, #2563eb); }

.nx-perf-kpi__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.nx-perf-kpi__body small {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-size: 0.64rem;
  font-weight: 600;
}

.nx-perf-kpi__body strong {
  color: #334155;
  font-size: 1.2rem;
  line-height: 1.15;
  font-weight: 700;
}

.nx-perf-kpi__body span {
  color: #64748b;
  font-size: 0.7rem;
}

.nx-perf-analysis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.nx-perf-panel {
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  min-height: 280px;
}

.nx-perf-panel__head {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nx-perf-panel__head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nx-perf-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nx-perf-trophy {
  width: 14px;
  height: 14px;
  stroke: #d4a017;
  fill: #f6c343;
  stroke-width: 1.2;
}

.nx-perf-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.68rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.nx-perf-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #14b8a6;
}

.nx-perf-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0.9rem 0.65rem 1rem;
  background: #fff;
}

.nx-perf-funnel__row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.nx-perf-funnel__bar {
  width: var(--funnel-width, 100%);
  max-width: 100%;
  min-height: 32px;
  background: var(--funnel-color, #e53935);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  clip-path: polygon(
    0 0,
    100% 0,
    calc(100% - var(--funnel-bottom-inset, 0%)) 100%,
    var(--funnel-bottom-inset, 0%) 100%
  );
  transition: filter 0.15s ease;
}

.nx-perf-funnel__bar:hover {
  filter: brightness(1.06);
}

.nx-perf-funnel__bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
}

.nx-perf-funnel__bar strong {
  font-size: 0.74rem;
  flex-shrink: 0;
}

.nx-perf-origins {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.nx-perf-donut {
  width: 130px;
  height: 130px;
}

.nx-perf-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.nx-perf-donut__track,
.nx-perf-donut__slice {
  fill: none;
  stroke-width: 18;
}

.nx-perf-donut__track {
  stroke: #eef2f7;
}

.nx-perf-donut__slice {
  stroke-linecap: butt;
}

.nx-perf-origins__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.55rem;
}

.nx-perf-origins__legend li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 0.3rem;
  align-items: center;
  font-size: 0.64rem;
  color: #64748b;
  min-width: 0;
}

.nx-perf-origins__legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.nx-perf-origins__legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-perf-origins__legend strong {
  color: #334155;
  font-weight: 700;
}

.nx-perf-result-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
}

.nx-perf-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f8fafc;
  border-left: 4px solid #64748b;
}

.nx-perf-result span {
  color: #475569;
  font-size: 0.74rem;
}

.nx-perf-result strong {
  color: #1e293b;
  font-size: 0.84rem;
}

.nx-perf-result--blue {
  background: #eef6ff;
  border-left-color: #2563eb;
}

.nx-perf-result--green {
  background: #ecfdf5;
  border-left-color: #059669;
}

.nx-perf-result--slate {
  background: #f8fafc;
  border-left-color: #3b82f6;
}

.nx-perf-panel--lost {
  min-height: 0;
  max-width: 320px;
}

.nx-perf-lost {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.85rem;
}

.nx-perf-lost__box {
  border-radius: 12px;
  padding: 0.85rem 0.65rem;
  color: #fff;
  text-align: center;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

.nx-perf-lost__box small {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.64rem;
  font-weight: 700;
  opacity: 0.95;
}

.nx-perf-lost__box strong {
  font-size: 1.4rem;
  line-height: 1;
}

.nx-perf-lost__box--lost {
  background: linear-gradient(145deg, #f87171, #dc2626);
}

.nx-perf-lost__box--discarded {
  background: linear-gradient(145deg, #64748b, #475569);
}

.nx-perf-panel--indices {
  min-height: 0;
}

.nx-perf-indices {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem;
}

.nx-perf-index-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 0.85rem 0.55rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 96px;
  justify-content: center;
}

.nx-perf-index-card strong {
  color: #1e3a5f;
  font-size: 1.15rem;
  line-height: 1.1;
}

.nx-perf-index-card span {
  color: #334155;
  font-size: 0.7rem;
  font-weight: 600;
}

.nx-perf-index-card small {
  color: #94a3b8;
  font-size: 0.62rem;
}

.nx-perf-panel--ranking {
  min-height: 0;
}

.nx-perf-ranking {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
}

.nx-perf-ranking__row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.nx-perf-ranking__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.nx-perf-ranking__meta strong {
  color: #475569;
  font-size: 0.8rem;
}

.nx-perf-ranking__meta span {
  color: #94a3b8;
  font-size: 0.68rem;
}

.nx-perf-ranking__bar {
  height: 14px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.nx-perf-ranking__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #0d9488);
}

.nx-perf-realtime {
  border-radius: 14px;
  overflow: hidden;
  background: #243447;
  border: 1px solid #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.nx-perf-realtime__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  background: #1e2a3a;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

.nx-perf-realtime__head svg {
  width: 15px;
  height: 15px;
  fill: #facc15;
  stroke: none;
}

.nx-perf-realtime__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nx-perf-realtime__cell {
  padding: 0.95rem 0.65rem 1.05rem;
  text-align: center;
  color: #fff;
  border-right: 1px solid rgba(148, 163, 184, 0.28);
}

.nx-perf-realtime__cell:last-child {
  border-right: 0;
}

.nx-perf-realtime__cell strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.nx-perf-realtime__cell small {
  color: #cbd5e1;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.nx-perf-empty {
  margin: 0;
  padding: 1.1rem 0.85rem;
  color: #94a3b8;
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 1200px) {
  .nx-perf-kpi-row,
  .nx-perf-analysis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nx-perf-indices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nx-perf-panel--lost {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .nx-perf-kpi-row,
  .nx-perf-analysis,
  .nx-perf-indices,
  .nx-perf-realtime__grid {
    grid-template-columns: 1fr;
  }

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

  .nx-perf-realtime__cell {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }

  .nx-perf-realtime__cell:last-child {
    border-bottom: 0;
  }
}

/* Support desk */
.nx-support-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 18px;
}
.nx-support-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  background: var(--panel);
  font-size: 14px;
}
.nx-support-tab.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.nx-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.nx-support-panel {
  padding: 18px;
}
.nx-support-panel__head {
  margin-bottom: 14px;
}
.nx-support-panel__head .nx-h3 {
  margin: 0 0 4px;
}
.nx-support-form {
  display: grid;
  gap: 12px;
}
.nx-support-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nx-support-textarea {
  min-height: 96px;
  resize: vertical;
}
.nx-support-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.nx-support-list__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
}
a.nx-support-list__item:hover {
  border-color: #c9cdd8;
  background: #fff;
}
.nx-support-list__item strong {
  display: block;
}
.nx-support-list__item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.nx-support-list__meta {
  text-align: right;
  white-space: nowrap;
}
.nx-support-chat__thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 8px 2px 14px;
  margin-bottom: 12px;
}
.nx-support-msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0f1f5;
  border: 1px solid var(--border);
}
.nx-support-msg.is-mine {
  align-self: flex-end;
  background: #e8eefc;
  border-color: #c9d6f5;
}
.nx-support-msg.is-note {
  background: #fff8e8;
  border-color: #f0dfb0;
  border-style: dashed;
}
.nx-support-msg__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}
.nx-support-msg p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.nx-support-chat__compose {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.nx-support-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-support-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 16px;
}
.nx-support-ticket-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-support-status-form .nx-input {
  min-width: 180px;
}
.nx-support-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.nx-support-note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.nx-support-pagination {
  margin-top: 16px;
}
@media (max-width: 900px) {
  .nx-support-grid,
  .nx-support-form__row {
    grid-template-columns: 1fr;
  }
  .nx-support-ticket-head {
    flex-direction: column;
  }
}

/* Floating support chat widget */
.nx-schat {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12000;
}
.nx-schat__fab,
.nx-schat__launcher,
.nx-schat__menu,
.nx-schat__window {
  pointer-events: auto;
}
.nx-schat__fab {
  position: fixed;
  right: 23px;
  bottom: 23px;
  z-index: 12001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.nx-schat__launcher {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--primary-glow), var(--primary));
  color: #fff;
  box-shadow: 0 8px 20px rgba(61, 79, 124, 0.32);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.nx-schat__launcher:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 24px rgba(61, 79, 124, 0.4);
}
.nx-schat__launcher svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-schat__launcher-close {
  display: none;
}
.nx-schat.is-menu-open .nx-schat__launcher-icon {
  display: none;
}
.nx-schat.is-menu-open .nx-schat__launcher-close {
  display: block;
}
.nx-schat.is-open .nx-schat__launcher {
  /* permanece visível para fechar o chat */
  background: #4b5568;
}
.nx-schat__launcher-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}
.nx-schat__menu {
  width: min(240px, calc(100vw - 36px));
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d8dbe3;
  box-shadow: 0 14px 36px rgba(29, 29, 31, 0.16);
  display: grid;
  gap: 4px;
}
.nx-schat__menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.nx-schat__menu-item:hover {
  background: #f3f4f8;
}
.nx-schat__menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.nx-schat__menu-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-schat__menu-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.nx-schat__menu-copy strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--fg);
}
.nx-schat__menu-copy small {
  font-size: 11.5px;
  color: var(--muted);
}
.nx-schat__window {
  position: fixed;
  right: 23px;
  bottom: 77px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d8dbe3;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(29, 29, 31, 0.18);
  overflow: hidden;
}
/* display:flex anula o atributo [hidden] do UA */
.nx-schat__window[hidden],
.nx-schat__menu[hidden],
.nx-schat__idle[hidden],
.nx-schat__active[hidden],
.nx-schat__queue[hidden],
.nx-schat__file-name[hidden],
.nx-schat__launcher-dot[hidden] {
  display: none !important;
}
.nx-schat.is-minimized .nx-schat__launcher {
  box-shadow: 0 0 0 3px rgba(83, 103, 155, 0.35), 0 8px 20px rgba(61, 79, 124, 0.32);
}
.nx-schat.is-minimized .nx-schat__launcher-dot {
  display: block !important;
  background: #3d4f7c;
}
.nx-schat__window.is-dragging {
  box-shadow: 0 24px 60px rgba(29, 29, 31, 0.24);
  user-select: none;
}
.nx-schat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  background: linear-gradient(160deg, #465987, #3d4f7c);
  color: #fff;
  cursor: grab;
  touch-action: none;
}
.nx-schat__head:active {
  cursor: grabbing;
}
.nx-schat__modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 8px 10px 0;
  background: #f7f8fb;
  border-bottom: 1px solid #e8eaef;
}
.nx-schat__mode {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
}
.nx-schat__mode.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 -1px 0 #fff;
}
.nx-schat__panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nx-schat__panel[hidden] {
  display: none !important;
}
.nx-schat__panel-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
}
.nx-schat__ticket-home {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.nx-schat__ticket-form,
.nx-schat__ticket-list-wrap {
  background: #fff;
  border: 1px solid #e5e7ef;
  border-radius: 12px;
  padding: 12px;
}
.nx-schat__ticket-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nx-schat__field {
  width: 100%;
  border: 1px solid #d8dbe3;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  background: #f7f8fb;
  color: var(--fg);
  margin-bottom: 8px;
}
.nx-schat__field--area {
  min-height: 88px;
  resize: vertical;
}
.nx-schat__file-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}
.nx-schat__file-label input {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
}
.nx-schat__form-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
}
.nx-schat__ticket-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.nx-schat__ticket-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #e5e7ef;
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.nx-schat__ticket-item:hover {
  border-color: #c9d0e0;
  background: #fff;
}
.nx-schat__ticket-item strong {
  display: block;
  font-size: 12px;
  color: var(--primary);
}
.nx-schat__ticket-item span {
  font-size: 13px;
}
.nx-schat__ticket-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.nx-schat__ticket-detail {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
}
.nx-schat__ticket-detail[hidden] {
  display: none !important;
}
.nx-schat__ticket-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #e8eaef;
}
.nx-schat__ticket-detail-head strong {
  display: block;
  font-size: 13px;
}
.nx-schat__ticket-detail-head span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.nx-schat__ticket-detail-subject {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 13px;
  font-weight: 600;
}
.nx-schat__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nx-schat__brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.nx-schat__brand-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-schat__brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.nx-schat__brand span {
  display: block;
  font-size: 12px;
  opacity: .82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.nx-schat__head-actions {
  display: flex;
  gap: 4px;
}
.nx-schat__icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nx-schat__icon-btn:hover {
  background: rgba(255,255,255,.14);
}
.nx-schat__icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.nx-schat__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
}
.nx-schat__idle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nx-schat__idle-card {
  text-align: center;
  max-width: 280px;
}
.nx-schat__idle-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  color: var(--fg);
}
.nx-schat__idle-text {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.nx-schat__start {
  width: 100%;
}
.nx-schat__active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nx-schat__queue {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #d7def7;
  color: #3d4f7c;
  font-size: 12.5px;
}
.nx-schat__queue-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #53679b;
  box-shadow: 0 0 0 0 rgba(83, 103, 155, .55);
  animation: nxSchatPulse 1.5s infinite;
  flex: 0 0 auto;
}
@keyframes nxSchatPulse {
  0% { box-shadow: 0 0 0 0 rgba(83, 103, 155, .45); }
  70% { box-shadow: 0 0 0 10px rgba(83, 103, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(83, 103, 155, 0); }
}
.nx-schat__thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nx-schat__msg {
  max-width: 88%;
  align-self: flex-start;
}
.nx-schat__msg.is-mine {
  align-self: flex-end;
}
.nx-schat__msg-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.nx-schat__bubble {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7ef;
  box-shadow: 0 1px 2px rgba(29,29,31,.04);
}
.nx-schat__msg.is-mine .nx-schat__bubble {
  background: #3d4f7c;
  border-color: #3d4f7c;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.nx-schat__msg:not(.is-mine) .nx-schat__bubble {
  border-bottom-left-radius: 4px;
}
.nx-schat__bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.45;
}
.nx-schat__attachment {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: inherit;
  text-decoration: underline;
  opacity: .9;
}
.nx-schat__compose {
  display: grid;
  grid-template-columns: 36px 1fr 40px;
  gap: 8px;
  align-items: end;
  padding: 10px 12px 4px;
  background: #fff;
  border-top: 1px solid #e8eaef;
}
.nx-schat__compose textarea {
  width: 100%;
  min-height: 40px;
  max-height: 110px;
  resize: none;
  border: 1px solid #d8dbe3;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  background: #f7f8fb;
  color: var(--fg);
}
.nx-schat__compose textarea:focus {
  outline: none;
  border-color: #9aa8c9;
  background: #fff;
}
.nx-schat__attach,
.nx-schat__send {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #eef0f5;
  color: #3d4f7c;
}
.nx-schat__send {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
}
.nx-schat__attach svg,
.nx-schat__send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-schat__file-name {
  padding: 0 14px 6px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}
.nx-schat__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 10px;
  background: #fff;
}
.nx-schat__link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 2px;
}
.nx-schat__link-btn:hover {
  color: var(--danger);
}
.nx-support-chat-cta {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px;
}
.nx-support-chat-cta__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.nx-support-chat-cta__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nx-support-chat-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.nx-support-chat-cta__state {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--primary);
}
.nx-support-panel__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nx-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
@media (max-width: 720px) {
  .nx-schat__fab {
    right: 17px;
    bottom: 17px;
  }
  .nx-schat__window {
    right: 13px;
    bottom: 69px;
    width: calc(100vw - 16px);
    height: min(70vh, 560px);
  }
  .nx-support-chat-cta {
    flex-direction: column;
  }
}

/* Agent support desk modal */
.nx-schat--agent .nx-schat__launcher {
  background: linear-gradient(160deg, #2f9461, #247a4f);
  box-shadow: 0 8px 20px rgba(47, 148, 97, 0.32);
}
.nx-schat--agent.is-open .nx-schat__launcher {
  background: #4b5568;
}
.nx-schat--agent .nx-schat__head {
  background: linear-gradient(160deg, #2f9461, #247a4f);
}
.nx-schat--agent .nx-schat__brand-icon {
  background: rgba(255,255,255,.16);
}
.nx-schat__agent-queue,
.nx-schat__agent-active {
  padding: 10px 12px 0;
}
.nx-schat__agent-active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.nx-schat__agent-queue .nx-schat__ticket-list {
  max-height: 140px;
  overflow: auto;
  margin-bottom: 8px;
}
.nx-schat__agent-queue .nx-btn {
  font-size: 12px;
  padding: 6px 10px;
}
.nx-schat__note-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 10px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}
.nx-schat__msg.is-note .nx-schat__bubble {
  background: #fff8e8;
  border-color: #f0dfb0;
  border-style: dashed;
  color: var(--fg);
}
.nx-schat--agent .nx-schat__window {
  width: min(420px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 96px));
}

.nx-schat__panel[hidden],
.nx-schat__compose[hidden],
.nx-schat__footer[hidden],
.nx-schat__ticket-home[hidden],
.nx-schat__ticket-detail[hidden],
.nx-schat__agent-queue[hidden],
.nx-schat__agent-active[hidden] {
  display: none !important;
}

/* Support desk page */
.nx-sdesk-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.nx-sdesk-hero__copy .nx-h1 {
  margin: 0 0 6px;
}
.nx-sdesk-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.nx-sdesk-hero__live {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eef6f1;
  color: #1f6b45;
  font-size: 13px;
}
.nx-sdesk-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.nx-sdesk-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.nx-sdesk-kpi:hover {
  border-color: #c5cad6;
  box-shadow: 0 4px 14px rgba(29, 29, 31, 0.06);
}
.nx-sdesk-kpi.is-active {
  border-color: #3d4f7c;
  box-shadow: inset 0 0 0 1px #3d4f7c;
}
.nx-sdesk-kpi small {
  color: var(--muted);
  font-size: 12px;
}
.nx-sdesk-kpi strong {
  font-size: 22px;
  line-height: 1.1;
}
.nx-sdesk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.nx-sdesk-layout--single {
  grid-template-columns: 1fr;
}
.nx-sdesk-main,
.nx-sdesk-side {
  padding: 18px;
}
.nx-sdesk-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.nx-sdesk-toolbar .nx-h3 {
  margin: 0 0 2px;
}
.nx-sdesk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-sdesk-filters .nx-input {
  min-width: 0;
  width: auto;
}
.nx-sdesk-filters input[type="search"] {
  min-width: 180px;
}
.nx-sdesk-empty {
  text-align: center;
  padding: 42px 16px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.nx-sdesk-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.nx-sdesk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.nx-sdesk-table th,
.nx-sdesk-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.nx-sdesk-table th {
  background: #f6f7fa;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.nx-sdesk-table tbody tr:last-child td {
  border-bottom: 0;
}
.nx-sdesk-table tbody tr:hover td {
  background: #fafbff;
}
.nx-sdesk-table__link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.nx-sdesk-table__link:hover .nx-sdesk-table__id,
.nx-sdesk-table__link:hover.nx-sdesk-table__subject {
  color: #3d4f7c;
}
.nx-sdesk-table__id {
  display: block;
}
.nx-sdesk-table__sub,
.nx-sdesk-table__date {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.nx-sdesk-table__subject {
  max-width: 320px;
}
.nx-sdesk-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef0f5;
  color: #445;
  white-space: nowrap;
}
.nx-sdesk-badge--prio-high {
  background: #fde8e8;
  color: #9b1c1c;
}
.nx-sdesk-badge--prio-normal {
  background: #eef2ff;
  color: #3730a3;
}
.nx-sdesk-badge--prio-low {
  background: #f1f5f9;
  color: #475569;
}
.nx-sdesk-badge--status-open {
  background: #e8f1ff;
  color: #1e4f9b;
}
.nx-sdesk-badge--status-in_progress {
  background: #fff4e5;
  color: #9a5b00;
}
.nx-sdesk-badge--status-waiting_user {
  background: #f3e8ff;
  color: #6b21a8;
}
.nx-sdesk-badge--status-resolved {
  background: #e7f7ee;
  color: #166534;
}
.nx-sdesk-badge--status-closed {
  background: #eceff3;
  color: #4b5563;
}
.nx-sdesk-side__chat {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}
.nx-sdesk-side__chat .nx-h3 {
  margin: 0;
  font-size: 15px;
}
.nx-schat__modes--3 {
  grid-template-columns: repeat(3, 1fr);
}
.nx-schat__history-search {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px 0;
}
.nx-schat__history-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.nx-schat__history-home,
.nx-schat__history-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding-bottom: 8px;
}
.nx-schat__history-detail .nx-schat__thread {
  flex: 1;
}
.nx-schat__history-home[hidden],
.nx-schat__history-detail[hidden] {
  display: none !important;
}
@media (max-width: 980px) {
  .nx-sdesk-layout,
  .nx-sdesk-kpis {
    grid-template-columns: 1fr;
  }
  .nx-sdesk-hero {
    flex-direction: column;
  }
}

/* WhatsApp embed (modal iframe) */
html:has(.nx-wa-embed-body),
.nx-wa-embed-body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #e5ddd5;
}

.nx-dashboard-with-ai--wa-embed,
.nx-whatsapp-page--embed,
.nx-whatsapp-page--embed .nx-whatsapp-chat-with-ai {
  min-height: 100%;
  height: 100%;
}

.nx-whatsapp-page--embed {
  gap: 0;
  padding: 0;
}

.nx-whatsapp-chat-grid--embed {
  display: block;
  min-height: 100%;
  height: 100%;
}

.nx-whatsapp-page--embed .nx-whatsapp-chat-panel--embed {
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #e5ddd5;
  box-shadow: none;
  height: 100%;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
}

.nx-whatsapp-page--embed .nx-whatsapp-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  border: none;
  border-radius: 0;
  padding: 10px 14px 8px;
  background-color: #e5ddd5;
  background-image:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 42%, rgba(0, 0, 0, 0.03) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 72%, rgba(255, 255, 255, 0.18) 0 2px, transparent 3px);
  gap: 6px;
}

.nx-whatsapp-page--embed #nx-wa-live-compose {
  flex: 0 0 auto;
  margin-top: auto;
}

.nx-whatsapp-page--embed #nx-wa-history-compose-hint {
  display: none !important;
}

.nx-whatsapp-page--embed .nx-wa-bubble {
  max-width: 86%;
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  background: #fff;
  padding: 6px 8px 7px;
}

.nx-whatsapp-page--embed .nx-wa-bubble:not(.is-me) {
  border-top-left-radius: 0;
}

.nx-whatsapp-page--embed .nx-wa-bubble.is-me {
  align-self: flex-end;
  background: #d9fdd3;
  border-top-right-radius: 0;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.nx-whatsapp-page--embed .nx-wa-bubble__who {
  display: none;
}

.nx-whatsapp-page--embed .nx-ig-compose {
  margin: 0;
  padding: 4px 6px 6px;
  border-top: none;
  background: #f0f2f5;
}

.nx-whatsapp-page--embed .nx-ig-compose__row {
  border: none;
  border-radius: 24px;
  background: #fff;
  padding: 4px 6px 4px 12px;
  box-shadow: none;
}

.nx-whatsapp-page--embed .nx-ig-compose__row input[type="text"] {
  padding: 9px 4px;
  font-size: 14px;
}

.nx-whatsapp-page--embed .nx-ig-compose__row input[type="text"]::placeholder {
  color: #8696a0;
}

.nx-whatsapp-page--embed .nx-ig-action-btn {
  color: #54656f;
}

.nx-whatsapp-page--embed .nx-ig-compose__send {
  background: #00a884;
  color: #fff;
}

.nx-whatsapp-page--embed .nx-ig-compose__send:hover {
  background: #008f6f;
  color: #fff;
}

.nx-whatsapp-page--embed .nx-ig-action-btn.nx-wa-action-audio-btn {
  background: #00a884;
  border-color: transparent;
  color: #fff;
}

.nx-whatsapp-page--embed .nx-wa-lead-match {
  margin: 0;
  border-radius: 0;
}

.nx-whatsapp-page--embed .nx-whatsapp-inbox-empty {
  color: #54656f;
}

/* WhatsApp chat modal (funil / contato) */
.nx-wa-modal {
  --nx-wa-teal: #075e54;
  --nx-wa-teal-dark: #054640;
  --nx-wa-green: #25d366;
  --nx-wa-launcher-size: var(--nx-schat-launcher-size);
  --nx-schat-fab-bottom: 23px;
  --nx-schat-launcher-size: 44px;
  --nx-wa-launcher-gap: 12px;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.nx-wa-modal.is-minimized {
  z-index: 12010;
}

.nx-wa-modal__window {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(392px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  background: #ece5dd;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow:
    0 24px 48px rgba(11, 20, 26, 0.22),
    0 8px 18px rgba(11, 20, 26, 0.12);
  overflow: hidden;
  pointer-events: auto;
}

.nx-wa-modal__window[hidden],
.nx-wa-modal__launcher[hidden],
.nx-wa-modal__loader[hidden] {
  display: none !important;
}

.nx-wa-modal__window.is-dragging {
  box-shadow:
    0 28px 56px rgba(11, 20, 26, 0.28),
    0 10px 22px rgba(11, 20, 26, 0.16);
  user-select: none;
}

.nx-wa-modal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 60px;
  padding: 8px 4px 8px 12px;
  background: var(--nx-wa-teal);
  color: #fff;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.nx-wa-modal__head:active {
  cursor: grabbing;
}

.nx-wa-modal__head-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.nx-wa-modal__head-right {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.nx-wa-modal__head-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: 2px;
  padding-right: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.nx-wa-modal__head-nav[hidden] {
  display: none !important;
}

.nx-wa-modal__contact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nx-wa-modal__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nx-wa-modal__title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nx-wa-modal__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-wa-modal__subtitle {
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-wa-modal__head-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nx-wa-modal__head-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nx-wa-modal__head-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.nx-wa-modal__head-btn:disabled:hover {
  background: transparent;
}

.nx-wa-modal__head-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.nx-wa-modal__body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #e5ddd5;
}

.nx-wa-modal__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(229, 221, 213, 0.88);
}

.nx-wa-modal__loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8696a0;
  animation: nx-wa-modal-pulse 1.1s ease-in-out infinite;
}

.nx-wa-modal__loader-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.nx-wa-modal__loader-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes nx-wa-modal-pulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.nx-wa-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #e5ddd5;
}

.nx-wa-modal__frame.is-loading {
  opacity: 0;
}

.nx-wa-modal__launcher {
  position: fixed;
  right: var(--nx-schat-fab-bottom);
  bottom: calc(var(--nx-schat-fab-bottom) + var(--nx-schat-launcher-size) + var(--nx-wa-launcher-gap));
  width: var(--nx-wa-launcher-size);
  height: var(--nx-wa-launcher-size);
  border: 0;
  border-radius: 999px;
  background: var(--nx-wa-green);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12010;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nx-wa-modal__launcher:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.48);
}

.nx-wa-modal__launcher svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nx-wa-modal.is-minimized .nx-wa-modal__launcher {
  box-shadow:
    0 0 0 3px rgba(37, 211, 102, 0.28),
    0 8px 20px rgba(37, 211, 102, 0.38);
}

@media (max-width: 720px) {
  .nx-wa-modal {
    --nx-schat-fab-bottom: 17px;
  }
}

@media (max-width: 540px) {
  .nx-wa-modal__window {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
}

.nx-wa-embed-error {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #54656f;
  background: #e5ddd5;
}

.nx-wa-embed-error p {
  margin: 0;
  font-size: 14px;
}

.nx-wa-embed-error__hint {
  font-size: 12px;
  opacity: 0.85;
}

.nx-body--simulator .nx-content--simulator {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nx-simulator {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nx-simulator__desktop {
  flex: 1;
  min-height: 0;
  display: flex;
}

.nx-simulator__desktop[hidden],
.nx-simulator__mobile[hidden],
.nx-simulator__loading[hidden],
.nx-simulator__fallback[hidden] {
  display: none !important;
}

.nx-simulator__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
}

.nx-simulator__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #f5f5f7;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.nx-simulator__frame.is-ready {
  opacity: 1;
}

.nx-simulator__loading,
.nx-simulator__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f5f5f7;
  color: var(--muted);
  z-index: 1;
}

.nx-simulator__loading p,
.nx-simulator__fallback p {
  margin: 0;
  font-size: 14px;
}

.nx-simulator__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d7dbeb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: nx-simulator-spin 0.7s linear infinite;
}

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

.nx-simulator__mobile {
  margin: 24px;
  padding: 24px;
}

.nx-simulator__steps {
  margin: 16px 0;
  padding-left: 1.2rem;
  color: var(--fg);
  line-height: 1.55;
}

.nx-simulator__steps li + li {
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .nx-body--simulator .nx-content--simulator {
    overflow-y: auto;
  }
}
