:root {
  --nx-bg: #f3f6f7;
  --nx-surface: #ffffff;
  --nx-line: #e4eaec;
  --nx-text: #172025;
  --nx-muted: #66747a;
  --nx-accent: #147d86;
  --nx-accent-hover: #10656d;
  --nx-accent-soft: #e6f3f4;
  --nx-rail: 192px;
  --nx-rail-compact: 64px;
  --nx-inbox: 340px;
  --nx-details: 280px;
  --nx-shadow: 0 1px 0 rgba(16, 18, 27, 0.04);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--nx-bg); color: var(--nx-text); }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.nx-app {
  display: grid;
  grid-template-columns: var(--nx-rail) var(--nx-inbox) minmax(0, 1fr) var(--nx-details);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--nx-bg);
}

.nx-rail {
  background: #fff;
  border-right: 1px solid var(--nx-line);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 4px;
  min-width: var(--nx-rail);
  width: var(--nx-rail);
  overflow: hidden;
}
.nx-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}
.nx-rail-toggle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--nx-muted);
  display: grid;
  place-items: center;
  margin-top: 4px;
}
.nx-rail-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.nx-rail-toggle:hover, .nx-rail-toggle:focus-visible {
  background: var(--nx-accent-soft);
  color: var(--nx-accent);
}
.nx-app[data-admin="false"] .nx-admin-only,
body[data-admin="false"] .nx-admin-only { display: none !important; }
.nx-tabbar, .nx-more-sheet, .nx-ficha-backdrop { display: none; }

.nx-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--nx-accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.nx-skip:focus { top: 12px; }

.nx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  font-weight: 800;
  font-size: 18px;
}
.nx-brand img { width: 32px; height: 32px; }
.nx-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.nx-brand-copy em {
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  color: var(--nx-muted);
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-rail-group { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.nx-rail-day .nx-rail-label { color: var(--nx-text); }
.nx-rail-day .nx-rail-btn { font-weight: 700; }
.nx-rail-crm .nx-rail-label { color: #5c6a70; }
.nx-rail-crm .nx-rail-btn { font-weight: 650; color: #243036; }
.nx-rail-mkt, .nx-rail-cfg { opacity: .92; }
.nx-rail-mkt .nx-rail-label, .nx-rail-cfg .nx-rail-label {
  color: #8a969b;
  font-weight: 700;
}
.nx-rail-mkt .nx-rail-btn, .nx-rail-cfg .nx-rail-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--nx-muted);
  min-height: 36px;
}
.nx-app[data-admin="false"] .nx-rail-mkt {
  opacity: .72;
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px dashed var(--nx-line);
}
.nx-app[data-admin="false"] .nx-rail-mkt .nx-rail-btn {
  min-height: 32px;
  font-size: 12px;
}
.nx-rail-label {
  margin: 12px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.nx-rail-main, .nx-rail-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.nx-rail-foot { margin-top: auto; }

.nx-rail-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--nx-text);
  font-size: 14px;
  font-weight: 600;
}
.nx-rail-btn svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.nx-rail-btn:hover {
  background: var(--nx-accent-soft);
  color: #0a7f8a;
}
.nx-rail-btn.is-active {
  background: var(--nx-accent);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 3px 0 0 #0b4d53;
}
.nx-rail-btn.is-active svg { fill: #fff; }
.nx-rail-btn.is-active:hover, .nx-rail-btn.is-active:focus-visible {
  background: var(--nx-accent-hover);
  color: #fff;
}
.nx-app.is-rail-collapsed {
  --nx-rail: var(--nx-rail-compact);
}
.nx-app.is-rail-collapsed .nx-rail .nx-brand-copy,
.nx-app.is-rail-collapsed .nx-rail .nx-rail-label,
.nx-app.is-rail-collapsed .nx-rail .nx-rail-btn span,
.nx-app.is-rail-collapsed .nx-rail .nx-user-name {
  display: none;
}
.nx-app.is-rail-collapsed .nx-rail .nx-brand { padding: 4px 0 12px; justify-content: center; }
.nx-app.is-rail-collapsed .nx-rail .nx-rail-btn { justify-content: center; padding: 8px; position: relative; }
.nx-app.is-rail-collapsed .nx-rail .nx-brand-row { justify-content: center; }
.nx-app.is-rail-collapsed .nx-rail-btn:hover::after,
.nx-app.is-rail-collapsed .nx-rail-btn:focus::after,
.nx-app.is-rail-collapsed .nx-rail-btn:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #172025;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 40;
  pointer-events: none;
}
.nx-app.is-ficha-collapsed:not(.is-catalog) {
  grid-template-columns: var(--nx-rail) var(--nx-inbox) 1fr;
}
.nx-app.is-ficha-collapsed:not(.is-catalog) .nx-details { display: none; }

.nx-user {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  color: inherit;
}
.nx-user:hover, .nx-user:focus-visible {
  background: var(--nx-accent-soft);
  border-radius: 10px;
}
.nx-user-name { font-size: 13px; font-weight: 600; text-align: left; }
.nx-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #172025;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.nx-col, .nx-thread, .nx-details {
  background: var(--nx-surface);
  border-right: 1px solid var(--nx-line);
  min-width: 0;
  min-height: 0;
}

.nx-inbox { display: flex; flex-direction: column; overflow: hidden; }
.nx-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 8px;
  box-shadow: var(--nx-shadow);
}
.nx-col-head h1 { font-size: 18px; margin: 0; font-weight: 700; }
.nx-col-head p { margin: 2px 0 0; color: var(--nx-muted); font-size: 12px; }

.nx-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--nx-line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.nx-search { padding: 8px 16px; }
.nx-search input {
  width: 100%;
  border: 1px solid var(--nx-line);
  background: #f7f8fb;
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
}
.nx-search input:focus {
  border-color: var(--nx-accent);
  background: #fff;
}

.nx-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0 12px 10px;
}
.nx-filters::-webkit-scrollbar { display: none; }
.nx-filters button {
  border: 0;
  background: transparent;
  color: var(--nx-muted);
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
}
.nx-filters button:focus-visible,
.nx-chip:focus-visible,
.nx-row:focus-visible,
.nx-rail-btn:focus-visible {
  outline: 2px solid var(--nx-accent);
  outline-offset: 2px;
}
.nx-lab-mob { display: none; }
.nx-lab-desk { display: inline; }
.nx-filters .is-on { background: var(--nx-accent-soft); color: var(--nx-accent); }

.nx-empty-list p { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
#channelSide .nx-empty-list,
#autoList .nx-empty-list {
  margin: 8px 12px;
  padding: 12px;
}
.nx-empty-list, .nx-thread-empty {
  margin: auto;
  text-align: center;
  padding: 32px 24px;
  color: var(--nx-muted);
  max-width: 360px;
}
.nx-rows > .nx-thread-empty, .nx-rows > .nx-empty-list {
  margin: 24px auto;
  padding: 16px;
}
.nx-rows.tight > .nx-thread-empty, .nx-rows.tight > .nx-empty-list {
  margin: 8px auto;
  padding: 8px 16px 16px;
}
.nx-rows.tight > .nx-thread-empty h2 {
  font-size: 15px;
}
.nx-empty-list strong, .nx-thread-empty h2 { display: block; color: var(--nx-text); margin-bottom: 6px; }
.nx-thread {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.nx-thread-empty img { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.9; }
.nx-details { padding: 20px 18px; overflow: auto; }
.nx-details h2 { font-size: 15px; margin: 0 0 8px; }
.nx-card-name { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.nx-muted { color: var(--nx-muted); font-size: 13px; line-height: 1.45; }

.nx-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 420px at 50% -10%, #d7ecee 0%, transparent 58%),
    var(--nx-bg);
}
.nx-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  padding: 28px 28px 24px;
}
.nx-card h1 { margin: 8px 0 4px; font-size: 24px; }
.nx-card .nx-lead { color: var(--nx-muted); margin: 0 0 20px; font-size: 14px; }
.nx-card label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.nx-card input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  padding: 10px 12px;
}
.nx-pw { position: relative; display: block; }
.nx-pw input { padding-right: 84px; }
.nx-pw-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  background: none;
  color: var(--nx-accent);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
}
.nx-btn {
  width: 100%;
  border: 0;
  background: var(--nx-accent);
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}
.nx-btn:hover { background: var(--nx-accent-hover); }
.nx-btn:disabled, .nx-btn[disabled] {
  opacity: 1;
  cursor: default;
  background: #9bb3b6;
}
.nx-composer .nx-btn:disabled, .nx-composer .nx-btn[disabled] {
  background: #9bb3b6;
}
.nx-btn.nx-btn-inline { width: auto; display: inline-flex; margin-top: 12px; text-decoration: none; }
.nx-card .nx-alt { text-align: center; margin: 16px 0 0; font-size: 13px; color: var(--nx-muted); }
.nx-card .nx-alt a { color: var(--nx-accent); font-weight: 600; }
.nx-error { background: #fdecec; color: #9b1c1c; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.nx-ok { background: #e9f8ef; color: #116b38; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.nx-logout { margin: 0; }
.nx-rows { overflow: auto; flex: 1; min-height: 0; }
.nx-row {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  border: 0; background: transparent; text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--nx-line); cursor: pointer; color: inherit;
}
.nx-row.static { cursor: default; }
.nx-row:hover { background: #f7f8fb; }
.nx-ava {
  width: 32px; height: 32px; border-radius: 50%; background: var(--nx-accent-soft); color: var(--nx-accent);
  display: grid; place-items: center; font-weight: 700; flex: 0 0 auto;
}
.nx-row-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
button.nx-row-body {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 0;
}
.nx-row-body strong { font-size: 14px; font-weight: 700; }
.nx-row-body em { font-style: normal; color: var(--nx-muted); font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.nx-row-who { display: block; font-size: 11px; color: #4d5c62; font-weight: 600; margin-top: 2px; }
.nx-row-sec { display: block; font-size: 11px; color: #8a969b; margin-top: 2px; }
.nx-row-meta { color: var(--nx-muted); font-size: 11px; flex: 0 0 auto; max-width: 6.4rem; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.nx-thread-head { padding: 14px 18px; border-bottom: 1px solid var(--nx-line); }
.nx-thread-head h2 { margin: 0; font-size: 16px; }
.nx-thread-head p { margin: 2px 0 0; color: var(--nx-muted); font-size: 12px; }
.nx-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.nx-msgs > :first-child { margin-top: auto; }
.nx-bubble { max-width: 70%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.nx-bubble small { display: block; opacity: .7; font-size: 10px; margin-top: 4px; }
.nx-bubble.in { background: #f1f2f6; align-self: flex-start; }
.nx-bubble.out { background: var(--nx-accent); color: #fff; align-self: flex-end; }
.nx-day {
  align-self: stretch;
  text-align: center;
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--nx-muted);
}
.nx-composer-wrap {
  border-top: 1px solid var(--nx-line);
  background: #fff;
  padding: 8px 12px 12px;
}
.nx-composer-modes {
  display: flex;
  gap: 4px;
  margin: 0 0 8px;
}
.nx-composer-modes button {
  border: 0;
  background: transparent;
  color: var(--nx-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.nx-composer-modes button[aria-selected="true"] {
  background: var(--nx-accent);
  color: #fff;
  box-shadow: inset 0 0 0 1px #0b4d53;
}
.nx-composer-modes button#modeNote[aria-selected="true"] {
  background: #8a6a1a;
  color: #fff;
  box-shadow: inset 0 0 0 1px #5c4710;
}
.nx-compose-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--nx-muted);
}
.nx-follow-hint {
  margin: 0 12px 8px;
  padding: 8px 10px;
  background: #f6fafb;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-thread-banner {
  margin: 0 12px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.nx-thread-banner.is-done { background: #eef7f0; color: #1f6b3a; }
.nx-thread-banner.is-wait { background: #fff8ee; color: #8a5a00; }
.nx-send-error { margin: 0 0 8px; }
.nx-note-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--nx-muted);
  background: #f4f1e8;
  border: 1px dashed #c9b57a;
  border-radius: 10px;
  padding: 8px 10px;
}
.nx-note-hint[hidden] { display: none !important; }
.nx-lock {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}
.nx-composer { display: flex; gap: 8px; padding: 0; border-top: 0; align-items: stretch; }
.nx-composer textarea { flex: 1; border: 1px solid var(--nx-line); border-radius: 10px; padding: 8px 10px; min-height: 44px; resize: none; }
.nx-composer.is-note textarea {
  background: #fbf8ef;
  border-color: #c9b57a;
}
.nx-composer .nx-btn { width: auto; margin: 0; min-width: 96px; }
.nx-composer.has-tpl {
  display: grid;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr) auto;
}
.nx-composer.has-tpl select { width: 100%; min-width: 0; }
.nx-panel { padding: 24px; overflow: auto; }
.nx-thread > .nx-panel { flex: 1; min-height: 0; }
.nx-panel .nx-inline .nx-btn { width: auto; margin-top: 0; min-width: 96px; }
.nx-panel .nx-inline input { flex: 1; min-width: 0; }
.nx-panel .nx-rows { margin-top: 4px; border: 1px solid var(--nx-line); border-radius: 12px; overflow: hidden; }
.nx-panel .nx-row:last-child { border-bottom: 0; }
.nx-form label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.nx-panel .nx-form > .nx-btn { width: auto; min-width: 160px; }
.nx-form input, .nx-form textarea, .nx-form select {
  width: 100%; margin-top: 6px; border: 1px solid var(--nx-line); border-radius: 10px; padding: 9px 11px;
}
.nx-inline { display: flex; gap: 8px; margin: 12px 0; }
.nx-inline input { flex: 1; border: 1px solid var(--nx-line); border-radius: 10px; padding: 8px 10px; }
.nx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nx-tags span, .nx-tags button {
  background: var(--nx-accent-soft); color: var(--nx-accent); border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 600;
}
.nx-tags button { border: 0; cursor: pointer; font: inherit; }
.nx-dl { display: grid; grid-template-columns: 1fr; gap: 2px 0; font-size: 13px; }
.nx-dl dt { color: var(--nx-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nx-dl dd { margin: 0 0 10px; overflow-wrap: break-word; min-width: 0; }
.nx-dl a { color: var(--nx-accent); font-weight: 600; }
.nx-btn-ghost { background: #fff; color: var(--nx-text); border: 1px solid var(--nx-line); }
.nx-side { display: flex; flex-direction: column; padding: 8px; gap: 4px; }
.nx-side button, .nx-side a.nx-rail-btn { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--nx-muted); }
.nx-side .is-on { background: var(--nx-accent-soft); color: var(--nx-accent); }
.nx-side-label {
  margin: 12px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}
.nx-hint {
  margin: -6px 0 14px;
  font-size: 12px;
  color: var(--nx-muted);
  font-weight: 500;
}
.nx-hint.is-warn { color: #9b1c1c; }
.nx-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nx-muted);
  margin: 4px 0 0;
}
.nx-preview {
  display: block;
  background: var(--nx-accent);
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin: 8px 0 16px;
  white-space: pre-wrap;
  max-width: min(36rem, 100%);
}
.nx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nx-int { border: 1px solid var(--nx-line); border-radius: 12px; padding: 14px; background: #fff; }
.nx-int header { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.nx-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--nx-muted);
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f2f6;
}
.nx-status.on { color: #116b38; background: #e9f8ef; }
.nx-cat { margin: 20px 0 8px; font-size: 13px; color: var(--nx-muted); text-transform: uppercase; letter-spacing: .04em; }
.nx-chip { border: 0; background: var(--nx-accent-soft); color: var(--nx-accent); border-radius: 999px; padding: 4px 10px; font-weight: 700; cursor: pointer; }
.nx-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.nx-steps { color: var(--nx-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.wiz-actions { display: flex; gap: 8px; margin-top: 16px; }
.wiz-actions .nx-btn { width: auto; flex: 1; }
.wiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wiz-ch { border: 1px solid var(--nx-line); background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 600; }
.wiz-ch.picked { border-color: var(--nx-accent); background: var(--nx-accent-soft); color: var(--nx-accent); }

.nx-row.is-on {
  background: var(--nx-accent-soft);
  box-shadow: inset 3px 0 0 var(--nx-accent);
}
.nx-row.is-on strong { color: var(--nx-text); font-weight: 800; }
.nx-row.is-unread {
  box-shadow: inset 3px 0 0 var(--nx-accent);
  padding-left: 19px;
  background: #f4fbfb;
}
.nx-row.is-unread strong { font-weight: 800; }
.nx-row.is-me .nx-ava {
  background: var(--nx-accent);
  color: #fff;
}
.nx-row .nx-chip { flex: 0 0 auto; }
.nx-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--nx-accent); color: #fff; font-size: 10px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.nx-time, .nx-ch { display: block; text-align: right; }
.nx-ch { font-weight: 600; }
.nx-thread-head { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.nx-thread-who, .nx-thread-head > div:not(.nx-thread-actions) { flex: 1 1 0%; min-width: 0; }
.nx-thread-who h2, .nx-thread-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-thread-who p, .nx-thread-head p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-thread-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  min-width: min-content;
}
.nx-thread-actions select { border: 1px solid var(--nx-line); border-radius: 8px; padding: 6px 8px; background: #fff; max-width: 9rem; min-width: 0; }
.nx-thread-actions .nx-btn {
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.nx-thread-actions .nx-icon-btn { width: 32px; min-width: 32px; height: 32px; padding: 0; flex: 0 0 auto; }
.nx-snooze-inline { display: none !important; }
.nx-thread-more { position: relative; display: block; flex: 0 0 auto; }
.nx-thread-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 16;
  min-width: 176px;
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 18, 27, .12);
  padding: 6px;
}
.nx-thread-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.nx-thread-menu button:hover, .nx-thread-menu button:focus-visible {
  background: var(--nx-accent-soft);
  color: var(--nx-accent);
}
.nx-back {
  display: none; border: 0; background: var(--nx-accent-soft); color: var(--nx-accent);
  min-width: 32px; height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-weight: 700;
  align-items: center; gap: 4px; white-space: nowrap;
}
.nx-composer { flex-wrap: nowrap; }
.nx-composer select { min-width: 0; width: 100%; border: 1px solid var(--nx-line); border-radius: 10px; padding: 8px; background: #fff; }
.nx-notes { display: block; font-size: 13px; font-weight: 600; margin: 12px 0; }
.nx-notes textarea { width: 100%; min-height: 80px; margin-top: 6px; border: 1px solid var(--nx-line); border-radius: 10px; padding: 8px; }
.nx-modal {
  position: fixed; inset: 0; background: rgba(16,18,27,.35); display: grid; place-items: center; z-index: 40; padding: 16px;
}
.nx-modal[hidden], .nx-toast[hidden] { display: none !important; }
.nx-dialog {
  width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 22px; border: 1px solid var(--nx-line);
}
.nx-choice {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--nx-line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 8px;
  cursor: pointer;
  color: inherit;
}
.nx-choice:hover { border-color: var(--nx-accent); background: var(--nx-accent-soft); }
.nx-keys { margin: 0 0 12px; padding: 0; list-style: none; }
.nx-keys li { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
kbd {
  font: 600 12px ui-monospace, monospace;
  background: #f1f2f6;
  border: 1px solid var(--nx-line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--nx-text);
}
.nx-text-btn {
  border: 0; background: none; color: var(--nx-muted); width: 100%;
  padding: 8px; cursor: pointer; font-weight: 600; margin-top: 4px;
}
.nx-text-btn:hover { color: var(--nx-text); }
.nx-row .nx-text-btn {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 10px;
}
.nx-toast {
  position: fixed; top: 16px; right: 20px; left: auto; transform: none; background: #1b1d21; color: #fff;
  padding: 10px 14px; border-radius: 999px; font-size: 13px; z-index: 50;
}
.nx-featured a { overflow-wrap: anywhere; color: var(--nx-accent); font-weight: 600; }
.nx-featured .nx-inline { flex-wrap: wrap; align-items: center; }
.nx-featured .nx-btn { width: auto; margin: 0; }
.nx-panel code {
  font-size: 12px;
  background: var(--nx-accent-soft);
  color: var(--nx-accent);
  padding: 1px 5px;
  border-radius: 4px;
}
.nx-live { border: 1px solid var(--nx-line); border-radius: 12px; padding: 14px; margin-bottom: 16px; background: #f7f8fb; }
.nx-live textarea { width: 100%; min-height: 64px; font-family: ui-monospace, monospace; font-size: 12px; }
.nx-chat-card { max-width: 440px; }
.nx-chat-live { display: flex; flex-direction: column; max-height: min(720px, 92vh); }
.nx-chat-wrap { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.nx-chat-live .nx-msgs {
  min-height: 220px;
  max-height: 42vh;
  background: #f7fbfc;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  margin-top: 4px;
}
.nx-hook { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.nx-hook code { font-size: 12px; overflow-wrap: anywhere; flex: 1; }

.nx-app.is-catalog { grid-template-columns: var(--nx-rail) var(--nx-inbox) 1fr; }
.nx-app[data-page="help"],
.nx-app[data-page="help"].is-catalog {
  grid-template-columns: var(--nx-rail) minmax(0, 1fr);
}
.nx-app[data-page="help"] .nx-inbox,
.nx-app[data-page="help"] .nx-details,
.nx-app[data-page="help"] .nx-ficha-backdrop {
  display: none !important;
}
.nx-app[data-page="help"] .nx-thread {
  align-items: stretch;
  border-right: 0;
  overflow: auto;
  background: var(--nx-surface);
}
.nx-help-empty {
  text-align: center;
  margin: 8px 12px 16px;
  font-size: 13px;
  font-weight: 700;
}
.nx-help-empty a { color: var(--nx-accent); }
.nx-app[data-page="help"] .nx-panel.nx-help,
.nx-app[data-page="help"] .nx-panel.nx-help.nx-help-article {
  box-sizing: border-box;
  flex: 1 1 auto;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 100%;
  padding: 28px 40px 48px;
}
.nx-help,
.nx-help-article { max-width: none; }
.nx-help-hero h1 { margin: 0 0 6px; font-size: 28px; }
.nx-help-hero p { margin: 0 0 20px; color: var(--nx-muted); font-size: 15px; }
.nx-help-col { margin: 0 0 28px; }
.nx-help-col h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}
.nx-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.nx-help-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  background: #fff;
}
.nx-help-card:hover, .nx-help-card:focus-visible {
  border-color: #b7dfe3;
  background: #f7fbfc;
  color: var(--nx-accent);
}
.nx-help-card strong { font-size: 15px; }
.nx-help-card span { color: var(--nx-muted); font-size: 13px; line-height: 1.4; font-weight: 500; }
.nx-help-crumb { margin: 0 0 12px; font-size: 13px; color: var(--nx-muted); }
.nx-help-crumb a { color: var(--nx-accent); font-weight: 700; }
.nx-help-body { line-height: 1.55; }
.nx-help-body h1 { margin: 0 0 12px; font-size: 28px; }
.nx-help-body h2 { margin: 24px 0 8px; font-size: 18px; }
.nx-help-body h3 { margin: 18px 0 6px; font-size: 15px; }
.nx-help-body p, .nx-help-body li { font-size: 15px; }
.nx-help-body ul, .nx-help-body ol { padding-left: 1.3em; }
.nx-help-body a { color: var(--nx-accent); font-weight: 700; }
.nx-help-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  background: #fff;
}
.nx-help-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.nx-help-body th, .nx-help-body td {
  border: 1px solid var(--nx-line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.nx-help-body th { background: #f7fbfc; }
.nx-help-body code {
  font-size: 13px;
  background: var(--nx-accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}
.nx-help-related { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--nx-line); }
.nx-help-related h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted); }
.nx-help-related p { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.nx-help-related a { color: var(--nx-accent); font-weight: 700; }
.nx-app[data-page="channels"].is-catalog,
.nx-app[data-page="integrations"].is-catalog {
  grid-template-columns: var(--nx-rail) 260px 1fr;
}
.nx-app.is-catalog .nx-details { display: none; }
.nx-setup {
  margin: 8px 12px 12px;
  padding: 10px 12px;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  background: #f7fbfc;
}
.nx-setup h2, .nx-setup summary {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
}
.nx-setup summary {
  cursor: pointer;
  list-style: none;
}
.nx-setup summary::-webkit-details-marker { display: none; }
.nx-setup summary::after {
  content: " ▾";
  color: var(--nx-muted);
  font-weight: 600;
}
.nx-setup:not([open]) summary { margin: 0; }
.nx-setup:not([open]) summary::after { content: " ▸"; }
.nx-setup a, .nx-setup .nx-setup-row {
  display: flex; gap: 8px; align-items: center; padding: 4px 0;
  font-size: 13px; color: inherit;
}
.nx-setup em { display: none; }
.nx-setup-dismiss { margin-top: 8px; font-size: 12px; }
.nx-loading { padding: 16px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--nx-accent);
  outline-offset: 2px;
}
.nx-setup .tick {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--nx-line);
  display: grid; place-items: center; font-size: 11px; flex: 0 0 auto;
}
.nx-setup .tick.is-done { background: var(--nx-accent); border-color: var(--nx-accent); color: #fff; }
.nx-catalog-card {
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 168px;
}
.nx-catalog-card.is-on { border-color: #b7dfe3; background: #f7fbfc; }
.nx-catalog-card .nx-logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px;
}
.nx-catalog-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.nx-catalog-card header strong { flex: 1 1 60%; }
.nx-featured textarea { display: block; width: 100%; min-height: 72px; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 12px; }
.nx-featured label { display: block; margin: 10px 0; }
.nx-details .nx-inline { flex-wrap: nowrap; align-items: center; }
.nx-details .nx-inline input { flex: 1 1 auto; min-width: 0; }
.nx-details .nx-inline .nx-btn { width: auto; min-width: 96px; }
.nx-catalog-card .nx-btn { width: auto; margin: 0; }
.nx-art { width: 140px; height: 110px; margin-bottom: 8px; }
.nx-featured {
  border: 1px solid var(--nx-accent);
  background: var(--nx-accent-soft);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.nx-featured h3 { margin: 0 0 6px; }
.nx-rec {
  display: inline-block;
  background: var(--nx-accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}
.nx-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.nx-recipe {
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nx-recipe.is-on { border-color: var(--nx-accent); background: var(--nx-accent-soft); }
.nx-recipe .nx-btn:disabled { opacity: .7; cursor: default; background: var(--nx-accent-hover); }
.nx-recipe p { margin: 0; color: var(--nx-muted); font-size: 13px; flex: 1; }
.nx-panel .nx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 12px;
}
.nx-panel .nx-filters button {
  width: auto;
  flex: 0 0 auto;
  padding: 6px 12px;
  overflow: visible;
  text-overflow: clip;
}
.nx-more-links { display: none; }
.nx-rows .nx-art { display: none; }
.nx-thread-empty .nx-btn, .nx-empty-list .nx-btn {
  min-height: 40px;
}
.nx-inbox .nx-thread-empty { padding: 20px 16px; }
.nx-m-tabs {
  display: none;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.nx-m-tabs button {
  border: 0;
  background: #f1f2f6;
  color: var(--nx-muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.nx-m-tabs .is-on { background: var(--nx-accent-soft); color: var(--nx-accent); }
.nx-mobile-only { display: none; }
.nx-rows.tight { flex: 0 1 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.nx-filters-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 8px;
  grid-template-columns: none;
}
.nx-filters-primary button { width: auto; flex: 0 0 auto; }
.nx-filters-primary .nx-badge { margin-left: 6px; vertical-align: middle; }
.nx-more-filters {
  margin: 0 12px 10px;
  padding: 10px;
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  background: #f7fbfc;
}
.nx-more-filters[hidden] { display: none !important; }
.nx-more-filters .nx-filters { padding: 0 0 8px; }
.nx-assign-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-muted);
  margin: 0 0 8px;
}
.nx-assign-row select {
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--nx-text);
  font-weight: 600;
}
.nx-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.nx-quick-head h2 { margin: 0; }
.nx-ficha-trigger,
.nx-thread-actions .nx-ficha-trigger { display: none; width: auto; margin: 0; }
.nx-api-home {
  border: 1px solid var(--nx-accent);
  background: var(--nx-accent-soft);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.nx-api-home h3 { margin: 0 0 6px; }
.nx-api-home code { overflow-wrap: anywhere; }

@media (max-width: 1399px) {
  .nx-app {
    grid-template-columns: var(--nx-rail) var(--nx-inbox) minmax(0, 1fr);
  }
  .nx-app.is-catalog { grid-template-columns: var(--nx-rail) minmax(200px, var(--nx-inbox)) minmax(0, 1fr); }
  .nx-app[data-page="help"],
  .nx-app[data-page="help"].is-catalog { grid-template-columns: var(--nx-rail) minmax(0, 1fr); }
  .nx-app[data-page="channels"].is-catalog,
  .nx-app[data-page="integrations"].is-catalog {
    grid-template-columns: var(--nx-rail) 220px minmax(0, 1fr);
  }
  .nx-details {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 92vw);
    z-index: 36;
    background: #fff;
    border-left: 1px solid var(--nx-line);
    box-shadow: -12px 0 32px rgba(16, 18, 27, .12);
  }
  .nx-app.ficha-open .nx-details { display: block; }
  .nx-ficha-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 18, 27, .28);
    z-index: 34;
  }
  .nx-app.ficha-open .nx-ficha-backdrop { display: block; }
  .nx-ficha-trigger,
  .nx-thread-actions .nx-ficha-trigger { display: inline-flex; }
  .nx-thread-actions select { max-width: 8.2rem; }
}
@media (max-width: 1024px) {
  .nx-cards, .nx-recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .nx-app,
  .nx-app.is-catalog,
  .nx-app[data-page="help"],
  .nx-app[data-page="help"].is-catalog,
  .nx-app[data-page="channels"].is-catalog,
  .nx-app[data-page="integrations"].is-catalog,
  .nx-app.is-rail-collapsed,
  .nx-app.is-ficha-collapsed:not(.is-catalog) {
    grid-template-columns: 1fr !important;
    padding-bottom: 64px;
  }
  .nx-rail, .nx-rail-toggle { display: none !important; }
  .nx-tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    height: 64px;
    background: #fff;
    border-top: 1px solid var(--nx-line);
  }
  .nx-tabbar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--nx-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .nx-tabbar-btn svg { width: 18px; height: 18px; fill: currentColor; }
  .nx-tabbar-btn.is-active {
    color: #fff;
    background: var(--nx-accent);
    font-weight: 800;
  }
  .nx-tabbar-btn.is-active svg { fill: #fff; }
  .nx-more-sheet:not([hidden]) { display: block; }
  .nx-more-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 18, 27, .35);
    z-index: 40;
  }
  .nx-more-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 41;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px 80px;
    max-height: 80vh;
    overflow: auto;
  }
  .nx-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .nx-more-head h2 { margin: 0; font-size: 16px; }
  .nx-more-panel a {
    display: block;
    padding: 12px 4px;
    font-weight: 700;
    border-bottom: 1px solid var(--nx-line);
  }
  .nx-more-panel .nx-rail-label { display: block; margin: 16px 4px 4px; }
  .nx-more-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 16px;
  }
  .nx-more-links a {
    display: block;
    padding: 12px;
    border: 1px solid var(--nx-line);
    border-radius: 12px;
    font-weight: 700;
    background: #fff;
  }
  .nx-more-links a:hover, .nx-more-links a:focus-visible {
    border-color: var(--nx-accent);
    background: var(--nx-accent-soft);
    color: var(--nx-accent);
  }
  .nx-panel .nx-filters { padding: 0 0 12px; }
  .nx-m-tabs { display: flex; }
  .nx-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0 8px 8px; }
  .nx-filters-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 4px;
    padding: 0 8px 8px;
  }
  .nx-filters-primary button {
    width: auto !important;
    flex: 0 0 auto;
    min-width: auto;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 8px;
    white-space: nowrap;
  }
  .nx-filters-primary button + button { box-shadow: none; }
  .nx-filters-primary .is-on { border-radius: 8px; }
  .nx-lab-desk { display: none; }
  .nx-lab-mob { display: inline; }
  .nx-filters button { padding: 8px 4px; min-height: 36px; width: 100%; }
  .nx-chip { padding: 8px 12px; min-height: 36px; }
  .nx-setup { margin: 4px 8px 8px; padding: 8px; }
  .nx-setup em { display: none; }
  .nx-col-head p { display: none; }
  .nx-toast { top: 12px; right: 12px; left: auto; bottom: auto; transform: none; }
  .nx-composer, .nx-composer.has-tpl { display: flex; flex-direction: column; grid-template-columns: none; }
  .nx-composer select, .nx-composer textarea, .nx-composer .nx-btn { width: 100%; }
  .nx-featured .nx-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .nx-featured .nx-btn,
  .nx-featured .nx-btn.nx-btn-inline {
    width: auto !important;
    flex: 0 0 auto;
    max-width: 100%;
  }
  html, body, .nx-app { overflow-x: hidden; }
  .nx-featured { padding: 12px; }
  .nx-featured label { display: none; }
  .nx-cards { grid-template-columns: 1fr; }
  .nx-app[data-page="channels"] .nx-panel > h2 + p.nx-muted { display: none; }
  .nx-app[data-page="campaigns"] .nx-panel > p.nx-muted:first-of-type { display: none; }
  .wiz-actions { flex-wrap: wrap; }
  .wiz-actions .nx-btn { flex: 1 1 140px; min-width: 0; }
  .nx-thread-head { padding: 10px 12px; gap: 6px; }
  .nx-thread-who { min-width: 6.5rem; }
  .nx-thread-actions { flex-wrap: nowrap; gap: 4px; }
  .nx-thread-actions select { max-width: 6rem; padding: 6px 4px; font-size: 12px; }
  .nx-thread-actions .nx-btn { padding: 6px 8px; font-size: 12px; }
  .nx-dialog { max-width: 100%; }
  .nx-inbox {
    display: flex !important;
    min-height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    overflow: hidden;
  }
  .nx-thread { display: none; }
  .nx-app.thread-open .nx-inbox { display: none !important; }
  .nx-app.thread-open .nx-thread {
    display: flex;
    min-height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    overflow: hidden;
  }
  .nx-app.thread-open .nx-composer-wrap {
    padding-bottom: 8px;
    flex: 0 0 auto;
  }
  .nx-back { display: inline-flex; place-items: center; }
  .nx-app.is-catalog .nx-inbox { display: none !important; }
  .nx-app.is-catalog .nx-thread { display: flex !important; min-height: calc(100dvh - 64px); overflow-x: hidden; overflow-y: auto; }
  .nx-details {
    top: auto;
    left: 0;
    width: 100%;
    height: min(78vh, 640px);
    border-left: 0;
    border-top: 1px solid var(--nx-line);
    border-radius: 16px 16px 0 0;
  }
}
@media (max-width: 420px) {
  .nx-thread-head { padding: 8px 8px; gap: 4px; }
  .nx-thread-who { min-width: 5.5rem; }
  .nx-thread-who p { display: none; }
  .nx-thread-actions select { max-width: 4.4rem; }
  .nx-tabbar-btn { font-size: 10px; min-height: 44px; }
  .nx-app[data-page="tasks"] #taskWho { display: flex; gap: 4px; padding: 0 8px 8px; }
  .nx-app[data-page="tasks"] #taskWho button { min-height: 40px; flex: 1; }
}

.nx-line-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.nx-line-chips button {
  border: 1px solid var(--nx-line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.nx-line-chips button.is-on { background: var(--nx-accent-soft); border-color: var(--nx-accent); color: var(--nx-accent); }
.nx-window { margin: 0 16px 8px; padding: 8px 10px; background: #fff6e5; color: #8a5a00; border-radius: 8px; font-size: 13px; }
.nx-bubble.note {
  background: #fbf8ef;
  color: var(--nx-text);
  align-self: center;
  font-style: normal;
  border: 1px dashed #c9b57a;
  max-width: 82%;
}
.nx-bubble.note .nx-note-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a6a1a;
  margin-bottom: 4px;
}
.nx-bubble.note .nx-note-flag svg { width: 12px; height: 12px; fill: currentColor; }
.nx-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 8px 0; }
.nx-check input { width: auto; }
.nx-dialog textarea#exJson { min-height: 140px; font-family: ui-monospace, monospace; font-size: 12px; }
.nx-suc-table { display: grid; gap: 4px; margin: 12px 0; }
.nx-suc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--nx-line); }
.nx-suc-row span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-suc-row label { display: flex; gap: 6px; align-items: center; font-weight: 600; margin: 0; white-space: nowrap; }
.nx-suc-row input { width: auto; }
.nx-citas { margin: 0 0 8px; padding-left: 18px; font-size: 13px; color: var(--nx-muted); }
.nx-follow { margin: 12px 0 8px; padding-top: 8px; border-top: 1px solid var(--nx-line); }
.nx-follow-status { margin: 0 0 8px; font-weight: 700; font-size: 13px; }
.nx-timeline { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.nx-tl { display: grid; gap: 2px; padding: 8px 10px; background: #f6fafb; border-radius: 8px; font-size: 13px; }
.nx-tl-when { color: var(--nx-muted); font-size: 11px; }
.nx-tl-kind { font-size: 12px; }
.nx-tl-body { color: var(--nx-text); white-space: pre-wrap; }
.nx-tl-conversion { background: #eef7f0; }
.nx-tl-cita, .nx-tl-appointment { background: #fff8ee; }
.nx-tl-sale { background: #eef4fb; }
.nx-tl-budget { background: #f7f1e8; }
.nx-tl-task { background: #f3eef8; }
.nx-tl-system { background: #eef2f2; }
.nx-tl-filters { padding: 0 0 8px; flex-wrap: wrap; }
.nx-tl-filters button { padding: 6px 10px; min-height: 32px; font-size: 12px; }
.nx-timeline-more { margin: 0 0 12px; }
.nx-activity textarea { min-height: 64px; }
.nx-life { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .03em; background: var(--nx-accent-soft); color: var(--nx-accent); vertical-align: middle; }
.nx-life-desconocido { background: #f3eee6; color: #8a6a1a; }
.nx-life-cliente { background: #eef7f0; color: #1f6b3a; }
.nx-followup, .nx-next-cita { margin: 6px 0; font-size: 13px; font-weight: 600; }
.nx-biz, .nx-hist, .nx-ficha360 section { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--nx-line); }
.nx-biz-note { font-size: 12px; color: var(--nx-muted); background: #fff8ee; padding: 6px 10px; border-radius: 8px; }
.nx-ficha360 h3 { margin: 0 0 8px; font-size: 14px; }
.nx-task-list, .nx-thread-list { margin: 0 0 12px; padding-left: 18px; }
.nx-app[data-page="contact360"],
.nx-app[data-page="pipeline"] { grid-template-columns: var(--nx-rail) minmax(0, 1fr); }
.nx-app[data-page="contact360"] .nx-inbox,
.nx-app[data-page="contact360"] .nx-details,
.nx-app[data-page="pipeline"] .nx-inbox,
.nx-app[data-page="pipeline"] .nx-details { display: none !important; }
.nx-app[data-page="contact360"] .nx-thread,
.nx-app[data-page="pipeline"] .nx-thread { overflow: auto; background: var(--nx-surface); }
.nx-app[data-page="pipeline"] .nx-thread:has(#pipeBoard) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.nx-stage-filter { display: block; margin: 8px 16px 4px; font-size: 12px; font-weight: 700; color: var(--nx-muted); }
.nx-stage-filter select { display: block; width: 100%; margin-top: 4px; }
.nx-pipe-setup { max-width: 720px; margin: 24px auto; padding: 8px 20px 40px; }
.nx-pipe-setup h1 { margin: 0 0 8px; }
.nx-pipe-tpls { display: grid; gap: 12px; margin: 16px 0; }
.nx-pipe-tpl { text-align: left; border: 1px solid var(--nx-line); background: #fff; border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.nx-pipe-tpl:hover, .nx-pipe-tpl:focus-visible { border-color: var(--nx-accent); }
.nx-pipe-tpl strong { display: block; }
.nx-pipe-tpl em { color: var(--nx-muted); font-style: normal; font-size: 13px; }
.nx-pipe-counts { margin: 8px 0 16px; padding-left: 18px; }
.nx-pipe-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; padding: 16px 20px 8px; flex: 0 0 auto; }
.nx-pipe-head h1 { margin: 0; }
.nx-pipe-head p { margin: 4px 0 0; color: var(--nx-muted); }
.nx-pipe-head .nx-btn { width: auto; display: inline-flex; margin: 0; }
.nx-pipe-jump { font-size: 13px; font-weight: 700; color: var(--nx-muted); }
.nx-pipe-jump select { display: block; margin-top: 4px; min-width: 180px; }
.nx-kanban { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 8px 20px 16px; min-height: 0; flex: 1 1 auto; align-items: stretch; }
.nx-kcol { flex: 0 0 260px; width: 260px; min-width: 240px; height: 100%; max-height: 100%; min-height: 0; background: #fff; border: 1px solid var(--nx-line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.nx-kcol > header { display: flex; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; align-items: baseline; flex: 0 0 auto; }
.nx-kcol > header h2 { margin: 0; font-size: 14px; }
.nx-kcol > header span { color: var(--nx-muted); font-size: 12px; font-weight: 700; }
.nx-kcol.is-over { outline: 2px solid var(--nx-accent); }
.nx-kdrop { overflow-y: auto; padding: 8px 8px 16px; min-height: 0; flex: 1 1 auto; display: grid; gap: 8px; align-content: start; }
.nx-kcol > .nx-text-btn,
.nx-kcol > .nx-kmore { flex: 0 0 auto; margin: 4px 8px 12px; padding: 10px 12px; min-height: 40px; background: #fff; position: relative; z-index: 1; }
.nx-kcard { border: 1px solid var(--nx-line); border-radius: 10px; padding: 10px; background: #fff; cursor: grab; display: grid; gap: 4px; }
.nx-kcard.is-drag { opacity: .55; }
.nx-kcard strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nx-kcard em { font-style: normal; font-size: 12px; color: var(--nx-muted); }
.nx-kcard-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nx-rot { display: inline-block; font-size: 11px; font-weight: 800; color: #8a6a1a; background: #f3eee6; border-radius: 999px; padding: 1px 8px; }
.nx-rel { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; max-width: 100%; }
.nx-rel-activo { color: #1b6b4a; background: #e7f4ee; }
.nx-rel-en_riesgo { color: #8a6a1a; background: #f3eee6; }
.nx-rel-inactivo { color: #8a3a3a; background: #f6ecec; }
.nx-rel-sin_datos { color: var(--nx-muted); background: transparent; border: 1px solid var(--nx-line); font-weight: 600; }
.nx-kcard .nx-rel-sin_datos { opacity: 1; }
.nx-rel-block { margin: 12px 0; }
.nx-rel-block p { margin: 6px 0 0; font-size: 14px; }
.nx-ficha-id { display: flex; gap: 12px; align-items: flex-start; }
.nx-ficha-id .nx-ava { width: 48px; height: 48px; font-size: 18px; }
.nx-ficha-id h2 { margin: 0; }
.nx-now { margin: 16px 0; padding: 14px 16px; background: #f6fafb; border-radius: 12px; border: 1px solid var(--nx-line); }
.nx-now h3 { margin: 0 0 8px; font-size: 14px; }
.nx-now p { margin: 0 0 6px; }
.nx-primary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.nx-primary-actions .nx-btn { width: auto; min-width: 0; margin: 0; }
.nx-consent { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--nx-line); }
.nx-consent .nx-muted { margin: 6px 0 0; }
.nx-adv { margin: 16px 0; padding-top: 8px; border-top: 1px solid var(--nx-line); }
.nx-adv > summary { cursor: pointer; font-weight: 700; padding: 8px 0; list-style: none; }
.nx-adv > summary::-webkit-details-marker { display: none; }
.nx-adv > summary::after { content: " ▾"; color: var(--nx-muted); font-weight: 600; }
.nx-adv[open] > summary::after { content: " ▴"; }
.nx-estado { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--nx-line); }
.nx-active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 16px 4px; font-size: 12px; }
.nx-filter-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--nx-accent-soft); color: var(--nx-accent); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.nx-rel-hint { margin: 0 16px 8px; font-size: 11px; color: var(--nx-muted); }
.nx-more-filters h3 {
  margin: 10px 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nx-muted);
}
.nx-more-filters h3:first-child,
.nx-filter-sec:first-child h3 { margin-top: 0; }
.nx-filter-sec { margin: 0 0 10px; }
#relationFilterWrap[hidden],
#stageFilterWrap[hidden],
#relationHint[hidden],
#activeFilters[hidden],
#peopleMoreFilters[hidden],
#relFilterSection[hidden],
#pipeFilterSection[hidden],
#stuckSortWrap[hidden],
#orgFilterEmpty[hidden] { display: none !important; }
.nx-convert-opt { display: grid; gap: 4px; margin: 0 0 10px; }
.nx-convert-opt label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.nx-convert-opt input { margin-top: 4px; width: auto; }
.nx-btn.is-busy { opacity: .7; pointer-events: none; }
.nx-btn.is-busy::after { content: " …"; }
.nx-dialog.nx-convert { max-width: 480px; }
.nx-pipe-stages { display: grid; gap: 16px; }
.nx-pipe-stage { border: 1px solid var(--nx-line); border-radius: 12px; padding: 12px; background: #f8fbfb; }
.nx-pipe-stage header em { display: block; color: var(--nx-muted); font-style: normal; font-size: 12px; }
.nx-pipe-auto { margin: 8px 0 0; }
@media (max-width: 768px) {
  .nx-app[data-page="contact360"],
  .nx-app[data-page="pipeline"] { grid-template-columns: minmax(0, 1fr); }
  .nx-app[data-page="pipeline"].is-catalog .nx-thread:has(#pipeBoard) {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  .nx-app[data-page="tasks"] .nx-filters { flex-wrap: wrap; }
  .nx-kcol { flex: 0 0 min(86vw, 320px); width: min(86vw, 320px); min-width: min(86vw, 280px); height: 100%; max-height: 100%; }
  .nx-kcol > .nx-kmore { min-height: 44px; margin: 4px 8px 16px; }
  .nx-pipe-jump { display: block; width: 100%; }
  .nx-kcard-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nx-kcard .nx-rel, .nx-kcard .nx-life, .nx-kcard .nx-rot { display: inline-block; width: fit-content; }
  .nx-stage-filter:not([hidden]), #relationFilterWrap:not([hidden]), #stageFilterWrap:not([hidden]) { display: block; width: 100%; margin: 8px 0; }
  .nx-stage-filter select { width: 100%; }
  .nx-row-meta { flex-direction: column; align-items: flex-end; gap: 4px; max-width: 42%; }
}
@media (min-width: 1025px) {
  .nx-pipe-jump { display: none; }
}

.nx-inbox-legend { margin: 0 16px 8px; font-size: 12px; color: var(--nx-muted); }
#inboxActiveFilters[hidden] { display: none !important; }
#taskWho [data-a="me"] { font-weight: 800; }
#taskWho [data-a="all"] { font-weight: 600; color: var(--nx-muted); }
#taskScope [data-s="today"].is-on { background: var(--nx-accent); color: #fff; }
.nx-task-overdue {
  margin: 0 12px 8px;
  padding: 8px 10px;
  background: #fdecec;
  color: #9b1c1c;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.nx-task-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--nx-line);
  background: #fff;
  text-align: left;
  padding: 12px 16px;
  color: inherit;
}
.nx-task-card.is-on { background: var(--nx-accent-soft); box-shadow: inset 3px 0 0 var(--nx-accent); }
.nx-task-card strong { font-size: 14px; }
.nx-task-card .nx-task-contact { font-weight: 700; }
.nx-task-card .nx-task-meta { font-size: 12px; color: var(--nx-muted); }
.nx-task-card .nx-task-note { font-size: 13px; color: var(--nx-text); }
.nx-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.nx-task-actions .nx-btn,
.nx-task-actions .nx-text-btn {
  width: auto;
  margin: 0;
  min-height: 40px;
  min-width: 44px;
}
.nx-quick-dl { margin: 8px 0; }
.nx-quick-dl dt { font-size: 11px; color: var(--nx-muted); font-weight: 700; }
.nx-quick-dl dd { margin: 0 0 8px; font-size: 14px; }
.nx-composer-modes button { min-height: 36px; }
.nx-form-sec {
  border: 1px solid var(--nx-line);
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 12px;
  background: #fff;
}
.nx-form-sec h3 { margin: 0 0 8px; font-size: 14px; }
.nx-form-sec > p.nx-muted { margin: 0 0 10px; }
.nx-secret {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.nx-secret code {
  font-size: 13px;
  letter-spacing: .12em;
}
.nx-set-group { margin: 0 0 8px; }
.nx-set-group h3 {
  margin: 16px 8px 6px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nx-muted);
}
.nx-recipe em.nx-auto-phrase {
  display: block;
  color: var(--nx-text);
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  margin: 4px 0 0;
}
.nx-status.warn { background: #f8efe4; color: #8a5a12; }
.nx-status.off { background: #f3f6f7; color: var(--nx-muted); }
.nx-live-copy { margin: 0 0 12px; }
.nx-camp-actions, .nx-auto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.nx-camp-actions .nx-btn, .nx-auto-actions .nx-btn,
.nx-camp-actions .nx-btn-ghost, .nx-auto-actions .nx-btn-ghost {
  width: auto;
  margin: 0;
}
.nx-dev-home {
  border: 1px dashed var(--nx-line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  background: #f8fbfb;
}
@media (max-width: 768px) {
  .nx-composer-modes button, .nx-composer .nx-btn { min-height: 44px; }
  .nx-task-actions .nx-btn { min-height: 44px; }
  .nx-catalog-card, .nx-recipe { min-height: 0; }
  .nx-form-sec { padding: 12px; }
  .nx-adv > summary { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 390px) {
  .nx-cards, .nx-recipes { grid-template-columns: 1fr; }
}
