/* NeuralX Admin — light colorful desk (bright paper, tinted cards) */
:root {
  --nx-ink: #14201c;
  --nx-rail: #0f1c19;
  --nx-rail-2: #1a2c28;
  --nx-paper: #f4fbf9;
  --nx-card: #ffffff;
  --nx-line: #d5ebe5;
  --nx-line-soft: #e8f5f1;
  --nx-muted: #2f8f82;
  --nx-text: #143029;
  --nx-accent: #12a896;
  --nx-accent-soft: #d7f6f0;
  --nx-accent-deep: #0b7f72;
  --nx-info: #3b82f6;
  --nx-info-soft: #dbeafe;
  --nx-ok: #16a34a;
  --nx-ok-soft: #dcfce7;
  --nx-warn: #f59e0b;
  --nx-warn-soft: #fef3c7;
  --nx-danger: #ef4444;
  --nx-danger-soft: #fee2e2;
  --nx-hover: #e8f8f4;
  --nx-shadow: 0 2px 8px rgba(18, 168, 150, 0.08);
  --nx-shadow-md: 0 12px 32px rgba(18, 168, 150, 0.12);
  --nx-radius: 14px;
  --nx-radius-sm: 10px;
  --nx-sidebar: 248px;
  --nx-sidebar-collapsed: 76px;
  --nx-topbar: 64px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: "Avenir Next Condensed", "Avenir Next", "Segoe UI", sans-serif;

  /* legacy aliases used by pages */
  --bg: var(--nx-paper);
  --bg-2: var(--nx-card);
  --panel: var(--nx-card);
  --panel-border: var(--nx-line);
  --text: var(--nx-text);
  --muted: var(--nx-muted);
  --accent: var(--nx-accent);
  --accent-2: var(--nx-info);
  --danger: var(--nx-danger);
  --warn: var(--nx-warn);
  --ok: var(--nx-ok);
  --shadow: var(--nx-shadow);
  --radius: var(--nx-radius);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--nx-text);
  background: var(--nx-paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--nx-accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ——— Login (N2-style centered modal) ——— */
.nx-login-body {
  margin: 0;
  min-height: 100vh;
  background: #09090b;
}
.nx-login-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(700px 360px at 20% 10%, rgba(18, 168, 150, 0.18), transparent 55%),
    radial-gradient(560px 320px at 90% 80%, rgba(59, 130, 246, 0.12), transparent 50%),
    #09090b;
}
.nx-login-modal {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid #27272a;
  background: #18181b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.nx-login-brand { margin-bottom: 28px; }
.nx-login-brand .nx-logo-login { display: block; margin-bottom: 18px; }
.nx-login-kicker {
  margin: 0;
  font-size: 12px;
  color: #a1a1aa;
}
.nx-login-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: #71717a;
}
.nx-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nx-login-field {
  display: block;
  margin: 0;
}
.nx-login-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #a1a1aa;
}
.nx-login-field input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #27272a;
  background: #09090b;
  color: #f4f4f5;
  padding: 0 14px;
  font: inherit;
  outline: none;
}
.nx-login-field input::placeholder { color: #52525b; }
.nx-login-field input:focus {
  border-color: #12a896;
  box-shadow: 0 0 0 3px rgba(18, 168, 150, 0.18);
}
.nx-login-pass { position: relative; }
.nx-login-pass input { padding-right: 42px; }
.nx-login-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #71717a;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.nx-login-eye:hover { color: #e4e4e7; }
.nx-login-submit {
  width: 100%;
  justify-content: center;
  height: 44px;
  margin-top: 4px;
  background: #fff !important;
  color: #09090b !important;
  box-shadow: none !important;
  border: 1px solid #27272a;
}
.nx-login-submit:hover {
  background: #e4e4e7 !important;
  filter: none;
}
.nx-login-error {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(127, 29, 29, 0.6);
  background: rgba(69, 10, 10, 0.45);
  color: #fca5a5;
  font-size: 12px;
}
.nx-shake { animation: nx-shake 0.45s ease; }
@keyframes nx-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ——— App chrome ——— */
.nx-app {
  display: grid;
  grid-template-columns: var(--nx-sidebar) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.nx-app.is-collapsed { grid-template-columns: var(--nx-sidebar-collapsed) 1fr; }

.nx-sidebar {
  background: var(--nx-rail);
  color: #c5ced8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.05);
  z-index: 40;
}
.nx-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px;
  min-height: var(--nx-topbar);
  border-bottom: 1px solid #1f242d;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nx-brand-logo,
.nx-chrome-logo,
.nx-footer-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.nx-logo img,
.nx-logo-sidebar,
.nx-logo-header,
.nx-logo-footer {
  display: block;
  width: auto;
  object-fit: contain;
}
.nx-logo-sidebar { max-height: 32px; max-width: 120px; }
.nx-logo-header { max-height: 24px; max-width: 96px; }
.nx-logo-footer { max-height: 22px; max-width: 88px; }
.nx-app.is-collapsed .nx-brand-logo .nx-logo-sidebar { max-height: 28px; max-width: 40px; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.4px;
  background: linear-gradient(145deg, #12b5a4 0%, #0e8f82 55%, #0a6b62 100%);
  color: #041412;
  flex-shrink: 0;
}
.nx-logo-fallback {
  display: inline-flex;
  align-items: center;
}
.nx-logo-fallback.is-white img { filter: brightness(1.05); }
.brand strong {
  display: block;
  color: #f4f7fa;
  font-family: var(--font-display);
  font-size: 0.95rem;
  white-space: nowrap;
}
.brand .muted { color: #8a96a4; }
.nx-collapse-btn,
.nx-expand-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5f8a82;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nx-collapse-btn:hover,
.nx-expand-btn:hover { background: var(--nx-rail-2); color: #fff; }
.nx-expand-btn:hover { background: var(--nx-hover); color: var(--nx-text); }
.nx-lines {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.nx-lines i {
  display: block;
  border-radius: 999px;
  background: currentColor;
}
.nx-lines-v { flex-direction: row; }
.nx-lines-v i { width: 1px; height: 14px; }
.nx-lines-h { flex-direction: column; }
.nx-lines-h i { width: 14px; height: 1px; }
.nx-app.is-collapsed .brand-copy,
.nx-app.is-collapsed .nav-group-label,
.nx-app.is-collapsed .nav-label,
.nx-app.is-collapsed .nx-sidebar-foot span { display: none; }
.nx-app.is-collapsed .nx-sidebar-head { justify-content: center; padding-inline: 8px; }
.nx-app.is-collapsed .nx-collapse-btn { display: none; }
.nx-app.is-collapsed .nav a { justify-content: center; padding-inline: 10px; }

.nx-nav-scroll {
  flex: 1;
  overflow: auto;
  padding: 8px 10px 18px;
}
.nav-group { margin-bottom: 14px; }
.nav-group-label {
  padding: 8px 12px 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #667384;
  font-weight: 600;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  color: #5f8a82;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  transition: 0.15s ease;
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav a:hover { background: var(--nx-rail-2); color: #fff; text-decoration: none; }
.nav a.active { background: #1e252f; color: #fff; }
.nx-sidebar-foot {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #6a9189;
  font-size: 0.78rem;
}

.nx-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 0% -5%, rgba(18, 168, 150, 0.22), transparent 55%),
    radial-gradient(700px 380px at 95% 5%, rgba(59, 130, 246, 0.14), transparent 50%),
    radial-gradient(520px 280px at 70% 100%, rgba(245, 158, 11, 0.1), transparent 55%),
    #f7fcfb;
}
.nx-chrome-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--nx-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nx-line);
  flex-shrink: 0;
}
.nx-chrome-header-left,
.nx-chrome-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nx-chrome-header-right { margin-left: auto; }
.nx-chrome-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nx-tool { position: relative; display: flex; align-items: center; height: 100%; }
.nx-chrome-logo { display: inline-flex; align-items: center; }
.nx-chrome-mode { display: none; }
.nx-chrome-mode {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nx-text);
  line-height: 1;
}
.nx-expand-btn { display: none; color: #5f8a82; }
.nx-app.is-collapsed .nx-expand-btn {
  display: grid;
}
.nx-mobile-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #5f8a82;
  cursor: pointer;
  place-items: center;
}
.nx-mobile-btn:hover { background: var(--nx-hover); color: var(--nx-text); }
.page-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-title .muted { font-size: 0.8rem; margin-top: 2px; }
.nx-chrome-actions { margin: 0; }
.nx-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--nx-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nx-icon-btn:hover {
  background: var(--nx-hover);
  color: var(--nx-text);
}
.nx-icon-btn svg { width: 20px; height: 20px; }
.nx-icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  background: #f04438;
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 0 2px #fff;
  display: block;
}
.nx-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 4px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--nx-text);
  transition: background 0.15s ease;
}
.nx-profile-btn:hover { background: var(--nx-hover); }
.nx-profile-btn .nx-chevron {
  width: 16px;
  height: 16px;
  color: #5f8a82;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.nx-tool:has(#nxProfilePanel.open) .nx-chevron,
.nx-profile-btn[aria-expanded="true"] .nx-chevron {
  transform: rotate(180deg);
}
.nx-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(145deg, #12b5a4, #0a6b62);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.nx-avatar-photo {
  background: #0f1419;
  border: 1px solid var(--nx-line);
  overflow: hidden;
  padding: 0;
}
.nx-avatar-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.nx-avatar-lg {
  width: 36px;
  height: 36px;
}
.nx-profile-meta {
  text-align: left;
  line-height: 1.15;
  max-width: 120px;
}
.nx-profile-meta strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-profile-meta span { display: none; }
.nx-chrome-tools { gap: 2px; }

.nx-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(18, 168, 150, 0.14);
  display: none;
  overflow: hidden;
  z-index: 50;
}
.nx-popover.open { display: block; }
.nx-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--nx-line-soft);
  font-weight: 600;
  font-size: 0.88rem;
  background: linear-gradient(180deg, #eefaf7 0%, #ffffff 100%);
}
.nx-popover-head strong { display: block; font-size: 0.9rem; color: var(--nx-text); }
.nx-popover-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.nx-popover-head-actions .nx-icon-btn {
  width: 32px;
  height: 32px;
  color: var(--nx-muted);
}
.nx-popover-head-actions .nx-icon-btn:hover { color: var(--nx-text); }
.nx-popover-list { max-height: 320px; overflow: auto; }
.nx-popover-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--nx-line-soft);
  font-size: 0.84rem;
}
.nx-popover-item:last-child { border-bottom: 0; }
.nx-popover-item .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--nx-muted);
  font-size: 0.72rem;
  margin-top: 4px;
}
.nx-popover-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--nx-muted);
  font-size: 0.86rem;
}
.nx-profile-panel {
  width: min(14rem, calc(100vw - 1.5rem));
}
.nx-profile-panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--nx-line);
  background: linear-gradient(180deg, #e8faf6 0%, #f7fffd 100%);
}
.nx-profile-panel-name {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--nx-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-profile-panel-role {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--nx-accent-deep);
}
.nx-profile-menu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.nx-profile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--nx-text);
  text-decoration: none;
}
.nx-profile-menu a svg { color: var(--nx-muted); flex-shrink: 0; }
.nx-profile-menu a:hover {
  background: var(--nx-hover);
  text-decoration: none;
}
.nx-profile-menu a.is-danger { color: #b42318; }
.nx-profile-menu a.is-danger svg { color: #b42318; }
.nx-profile-menu a.is-danger:hover { background: #fef3f2; }

.nx-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
}
.nx-content {
  padding: 22px 28px 32px;
}
.nx-chrome-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--nx-line);
  background: #ffffff;
  padding: 14px 28px;
}
.nx-chrome-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}
.nx-footer-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.nx-footer-rule {
  display: none;
  width: 1px;
  height: 14px;
  background: #b7d8d0;
}
.nx-footer-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  color: #5f8a82;
}
@media (min-width: 640px) {
  .nx-footer-rule { display: block; }
}

.muted { color: var(--nx-muted); }
.small { font-size: 0.86rem; }

/* ——— Surfaces ——— */
.panel, .stat-card, .table-card, .kpi-card {
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow);
}
.panel, .table-card { padding: 20px 22px; margin-top: 16px; }
.panel h2, .table-card h2, .panel-head h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-family: var(--font-display);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.triple {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  gap: 16px;
  margin-top: 16px;
}

.kpi-card {
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 108px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before { display: none; }
.kpi-card.tone-teal {
  background: linear-gradient(135deg, #ffffff 45%, #e8faf6 100%);
  border-color: #b7ebe1;
}
.kpi-card.tone-blue {
  background: linear-gradient(135deg, #ffffff 45%, #eaf2ff 100%);
  border-color: #bfd3ff;
}
.kpi-card.tone-amber {
  background: linear-gradient(135deg, #ffffff 45%, #fff7e8 100%);
  border-color: #f5d9a0;
}
.kpi-card.tone-rose {
  background: linear-gradient(135deg, #ffffff 45%, #ffecee 100%);
  border-color: #f7c4cb;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 8px 16px rgba(18, 168, 150, 0.2);
}
.kpi-icon.teal { background: linear-gradient(145deg, #1ec9b4, #0e8f82); }
.kpi-icon.blue { background: linear-gradient(145deg, #60a5fa, #2563eb); box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22); }
.kpi-icon.amber { background: linear-gradient(145deg, #fbbf24, #d97706); box-shadow: 0 8px 16px rgba(217, 119, 6, 0.22); }
.kpi-icon.rose { background: linear-gradient(145deg, #fb7185, #e11d48); box-shadow: 0 8px 16px rgba(225, 29, 72, 0.2); }
.kpi-icon.slate { background: linear-gradient(145deg, #34d399, #0f766e); }
.kpi-card .label {
  color: var(--nx-muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}
.kpi-card .value {
  margin: 6px 0 4px;
  font-size: clamp(1.25rem, 1.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--nx-text);
}
.kpi-card .hint { font-size: 0.75rem; color: var(--nx-accent-deep); }
.nx-studio-card-head p,
.panel-head .muted,
.help,
.muted { color: var(--nx-muted); }
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 6px;
}
.kpi-delta.up { color: var(--nx-ok); }
.kpi-delta.down { color: var(--nx-danger); }

.stat-card { padding: 18px; }
.stat-card .label { color: var(--nx-muted); font-size: 0.85rem; }
.stat-card .value {
  margin-top: 8px;
  font-size: 1.7rem;
  font-weight: 700;
}

.chart-box {
  height: 220px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(18, 168, 150, 0.08), transparent 70%),
    #f7fffd;
  border: 1px solid var(--nx-line-soft);
  padding: 8px;
  position: relative;
}
.chart-box svg { width: 100%; height: 100%; display: block; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--nx-muted);
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--nx-line-soft);
}
.activity-item:last-child { border-bottom: 0; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--nx-accent);
  flex-shrink: 0;
}
.activity-item .title { font-size: 0.86rem; font-weight: 500; }
.activity-item .meta { font-size: 0.75rem; color: var(--nx-muted); margin-top: 2px; }

label {
  display: block;
  margin: 0 0 6px;
  color: var(--nx-muted);
  font-size: 0.84rem;
  font-weight: 500;
}
.form-row { margin-bottom: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  border: 1px solid #d5dee6;
  background: #fff;
  color: var(--nx-text);
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
  font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(14, 143, 130, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 143, 130, 0.12);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, #1ec9b4 0%, #12a896 55%, #0b7f72 100%);
  box-shadow: 0 8px 18px rgba(18, 168, 150, 0.28);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-secondary {
  background: var(--nx-accent-soft);
  color: var(--nx-accent-deep);
  border: 1px solid #b6e8de;
  box-shadow: none;
}
.btn-secondary:hover {
  background: #c8f2ea;
  border-color: #95dccf;
  color: var(--nx-accent-deep);
}
.btn-danger {
  background: linear-gradient(145deg, #fb7185, #ef4444);
  color: #fff;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.22);
}
.btn-sm { padding: 8px 12px; font-size: 0.84rem; border-radius: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-size: 0.9rem;
}
.flash.ok { background: #e8f8f1; border-color: #b7e8d2; color: #146647; }
.flash.error { background: #fdecee; border-color: #f5c2ca; color: #8f2435; }
.flash.warn { background: #fff6e8; border-color: #f0d4a2; color: #8a5a12; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--nx-line-soft);
  vertical-align: top;
  font-size: 0.9rem;
}
th {
  color: var(--nx-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:hover td { background: #fafcfd; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge.ok { background: var(--nx-ok-soft); color: #15803d; }
.badge.warn { background: var(--nx-warn-soft); color: #b45309; }
.badge.err { background: var(--nx-danger-soft); color: #b91c1c; }
.badge.muted { background: var(--nx-info-soft); color: #1d4ed8; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.45;
}
.switch { display: flex; align-items: center; gap: 10px; }
.switch input { width: auto; }
.help { margin-top: 6px; color: var(--nx-muted); font-size: 0.8rem; }
.empty { padding: 28px; text-align: center; color: var(--nx-muted); }

.predict-board { display: flex; flex-direction: column; gap: 14px; }
.predict-card { margin-top: 0; padding: 18px 20px; }
.predict-card.is-passive { opacity: 0.72; }
.predict-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.predict-rank { display: flex; flex-direction: column; gap: 6px; min-width: 72px; }
.predict-title { flex: 1; min-width: 180px; }
.predict-title strong { font-size: 1.05rem; }
.predict-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.predict-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inline-range { display: flex; align-items: center; gap: 8px; }
.inline-range input { width: 100%; min-width: 0; }
.predict-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--nx-line);
}
button:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-editor { display: flex; flex-direction: column; gap: 14px; }
.btn-editor-row {
  padding: 14px;
  border-radius: 14px;
  background: var(--nx-paper);
  border: 1px solid var(--nx-line);
}

.demo-tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--nx-line);
  color: var(--nx-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.demo-tab:hover { color: var(--nx-text); border-color: #c9d5de; text-decoration: none; }
.demo-tab.active {
  color: #fff;
  background: var(--nx-rail);
  border-color: var(--nx-rail);
}
.demo-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

/* Telegram phone preview stays dark */
.tg-phone-wrap {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tg-phone {
  width: 100%;
  max-width: 360px;
  height: 680px;
  border-radius: 36px;
  background: #0e1621;
  border: 3px solid #2a3545;
  box-shadow: 0 28px 60px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tg-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.tg-status {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px 4px;
  font-size: 0.72rem;
  color: #c9d4e5;
  background: #17212b;
}
.tg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  background: #17212b;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tg-back { color: #6ab3f3; font-size: 1.4rem; line-height: 1; width: 18px; }
.tg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0f1419;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.tg-avatar-logo {
  padding: 5px;
  background: #0f1419;
}
.tg-avatar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tg-avatar-nix { background: #0f1419; }
.tg-chart {
  background: #0e1621;
  min-height: 120px;
  object-fit: cover;
}
.tg-header-meta { min-width: 0; }
.tg-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e8eef5;
}
.tg-sub { color: #7f91a4; font-size: 0.75rem; }
.tg-chat {
  flex: 1;
  overflow: auto;
  padding: 16px 12px 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(42,171,238,0.08), transparent 35%),
    linear-gradient(180deg, #0e1621 0%, #0b121a 100%);
}
.tg-day {
  width: fit-content;
  margin: 0 auto 14px;
  background: rgba(24, 37, 51, 0.9);
  color: #8ea0b5;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
}
.tg-bubble {
  max-width: 92%;
  background: #182533;
  border-radius: 14px 14px 14px 4px;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  animation: tgIn 0.35s ease;
}
.tg-bubble-out {
  margin-left: auto;
  background: #2b5278;
  border-radius: 14px 14px 4px 14px;
}
.tg-chart {
  display: block;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #0e1621;
}
.tg-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e8eef5;
  padding: 0 4px;
}
.tg-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #7f91a4;
  font-size: 0.68rem;
}
.tg-empty {
  text-align: center;
  color: #7f91a4;
  margin-top: 40%;
  font-size: 0.9rem;
}
.tg-reply-kb,
.tg-inline-kb { display: flex; flex-direction: column; gap: 6px; }
.tg-reply-kb {
  padding: 8px 8px 4px;
  background: #0f1822;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.tg-inline-kb { margin-top: 10px; padding-top: 2px; }
.tg-kb-row { display: flex; gap: 6px; }
.tg-kb-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #e8eef5;
  background: #242f3d;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 9px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}
.tg-inline-btn {
  background: rgba(53, 74, 95, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tg-kb-btn:hover,
.tg-inline-btn:hover { background: rgba(70, 94, 118, 0.88); color: #fff; text-decoration: none; }
.nx-media-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nx-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--nx-line, rgba(15, 23, 42, 0.1));
  background: var(--nx-paper, #fff);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
}
.nx-choice.is-on {
  border-color: rgba(15, 23, 42, 0.28);
  background: #f3f5f8;
}
.nx-choice input { margin: 0; }
.nx-share-thumb {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.nx-share-thumb img {
  width: 120px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.tg-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 14px;
  background: #17212b;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.tg-input {
  flex: 1;
  background: #242f3d;
  color: #7f91a4;
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 0.86rem;
  border: 0;
}
.tg-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2aabee;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
@keyframes tgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Notify — N2 glass toast parity */
.nx-notify-root {
  --notify-success: #63d5a0;
  --notify-info: #7aaefb;
  --notify-warning: #f3bb70;
  --notify-error: #ff858e;
  --notify-neutral: #bdc6d3;
}
.nx-notify-root .toast-stack {
  pointer-events: none;
  position: fixed;
  right: 23px;
  top: 65px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(404px, calc(100vw - 28px));
}
.nx-notify-root .toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  padding: 16px 40px 16px 17px;
  min-height: 78px;
  overflow: hidden;
  border-radius: 8px;
  isolation: isolate;
  color: #f6f7fa;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: none;
  animation: nx-notify-slideIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.nx-notify-root.theme-glass .toast {
  background-color: rgba(17, 20, 24, 0.92);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.nx-notify-root.theme-glass .toast:hover {
  background-color: rgba(17, 20, 24, 0.99);
  border-color: rgba(255, 255, 255, 0.22);
}
.nx-notify-root .toast.leaving {
  animation: nx-notify-slideOut 0.2s ease forwards;
}
.nx-notify-root .toast::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 40%);
  z-index: -1;
}
.nx-notify-root .symbol {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--notify-neutral);
}
.nx-notify-root .symbol svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.15;
  display: block;
}
.nx-notify-root .toast.success .symbol,
.nx-notify-root .toast.ok .symbol { color: var(--notify-success); }
.nx-notify-root .toast.info .symbol { color: var(--notify-info); }
.nx-notify-root .toast.warning .symbol,
.nx-notify-root .toast.warn .symbol { color: var(--notify-warning); }
.nx-notify-root .toast.error .symbol { color: var(--notify-error); }
.nx-notify-root .toast-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nx-notify-root .toast-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.36;
  color: #f9fafc;
  letter-spacing: -0.15px;
}
.nx-notify-root .toast-message {
  font-size: 12.2px;
  line-height: 1.54;
  color: #b4beca;
  margin-top: 4px;
}
.nx-notify-root .toast-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: #8e99a7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  transition: color 0.15s ease;
}
.nx-notify-root .toast-x::before {
  content: "";
  position: absolute;
  inset: -10px;
}
.nx-notify-root .toast-x:hover { color: #fff; }
.nx-notify-root .toast-x svg {
  width: 16px;
  height: 16px;
  display: block;
}
.nx-notify-root .toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
}
.nx-notify-root .toast-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(234, 239, 245, 0.58);
  transform-origin: left;
  animation: nx-notify-countdown linear forwards;
}
.nx-notify-root .toast.paused .toast-progress i {
  animation-play-state: paused;
}
@keyframes nx-notify-countdown { to { transform: scaleX(0); } }
@keyframes nx-notify-slideIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes nx-notify-slideOut {
  to { opacity: 0; transform: translateX(35px) scale(0.98); }
}
@media (max-width: 800px) {
  .nx-notify-root .toast-stack {
    right: 12px;
    top: 12px;
    width: calc(100vw - 24px);
  }
  .nx-notify-root .toast {
    gap: 12px;
    padding: 15px 34px 15px 14px;
  }
}

/* History panel — N2 list row */
.nx-popover-item.nx-notify-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f3;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: default;
}
.nx-popover-item.nx-notify-row.is-unread { background: #f9fafb; }
.nx-popover-item.nx-notify-row .nx-notify-ico {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--nx-accent-soft);
  color: #344054;
}
.nx-popover-item.nx-notify-row.is-success .nx-notify-ico {
  background: #ecfdf3;
  color: #027a48;
}
.nx-popover-item.nx-notify-row.is-error .nx-notify-ico {
  background: #fef3f2;
  color: #b42318;
}
.nx-popover-item.nx-notify-row.is-warning .nx-notify-ico {
  background: #fffaeb;
  color: #b54708;
}
.nx-popover-item.nx-notify-row .nx-notify-ico svg {
  width: 18px;
  height: 18px;
}
.nx-popover-item.nx-notify-row .nx-notify-copy { min-width: 0; flex: 1; }
.nx-popover-item.nx-notify-row .nx-notify-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--nx-text);
}
.nx-popover-item.nx-notify-row .nx-notify-title .pip {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2e90fa;
  flex-shrink: 0;
}
.nx-popover-item.nx-notify-row .nx-notify-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--nx-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nx-popover-item.nx-notify-row .nx-notify-age {
  margin-top: 4px;
  font-size: 11px;
  color: #5f8a82;
}

.nx-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.45);
  z-index: 35;
}
.nx-app.mobile-open .nx-scrim { display: block; }

@media (max-width: 1200px) {
  .triple { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .demo-layout { grid-template-columns: 1fr; }
  .tg-phone-wrap { position: relative; top: 0; }
}
@media (max-width: 960px) {
  .nx-app, .nx-app.is-collapsed { grid-template-columns: 1fr; }
  .nx-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .nx-app.mobile-open .nx-sidebar { transform: translateX(0); }
  .nx-mobile-btn { display: grid; }
  .nx-chrome-mode { display: inline-flex; align-items: center; }
  .nx-chrome-title { display: none; }
  .nx-expand-btn,
  .nx-app.is-collapsed .nx-expand-btn { display: none !important; }
  .nx-profile-meta { display: none; }
  .nx-chrome-header { padding: 0 12px; }
  .nx-chrome-footer { padding: 14px 16px; }
  .triple, .grid-2, .form-grid, .predict-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .nx-content { padding: 18px; }
}

/* ——— Corporate studio surfaces ——— */
.nx-page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.nx-page-intro p {
  margin: 0;
  max-width: 62ch;
  color: var(--nx-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.nx-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  box-shadow: var(--nx-shadow);
  margin-bottom: 16px;
}
.nx-segment a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--nx-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.nx-segment a:hover { background: var(--nx-hover); color: var(--nx-text); text-decoration: none; }
.nx-segment a.active {
  background: var(--nx-rail);
  color: #fff;
}
.nx-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.nx-studio-card {
  background: #fff;
  border: 1px solid var(--nx-line);
  border-radius: 16px;
  box-shadow: var(--nx-shadow);
  overflow: hidden;
}
.nx-studio-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--nx-line-soft);
  background: linear-gradient(180deg, #f3fbf8 0%, #ffffff 100%);
}
.nx-studio-card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}
.nx-studio-card-head p {
  margin: 4px 0 0;
  color: var(--nx-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.nx-studio-card-body { padding: 16px 18px 18px; }
.nx-btn-card {
  border: 1px solid var(--nx-line);
  border-radius: 14px;
  background: #f3fbf8;
  padding: 14px;
  margin-bottom: 12px;
}
.nx-btn-card:last-child { margin-bottom: 0; }
.nx-btn-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 72px 88px;
  gap: 10px;
  align-items: end;
}
.nx-btn-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--nx-line-soft);
}
.nx-id-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: #5f8a82;
  background: var(--nx-accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
}
.nx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.nx-toggle input {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #b7d8d0;
  border: 0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}
.nx-toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,0.2);
  transition: transform 0.15s ease;
}
.nx-toggle input:checked { background: var(--nx-accent); }
.nx-toggle input:checked::after { transform: translateX(18px); }
.nx-toggle span { font-size: 0.82rem; color: #344054; font-weight: 500; }
.nx-divider {
  border: 0;
  border-top: 1px solid var(--nx-line-soft);
  margin: 18px 0;
}
.nx-add-box {
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #cfd7df;
  background: var(--nx-hover);
}
.nx-kb-preview {
  border-radius: 14px;
  padding: 14px;
  background: #0e1621;
}
.nx-link-section {
  padding: 14px 14px 4px;
  border-radius: 14px;
  border: 1px solid rgba(18, 168, 150, 0.22);
  background: linear-gradient(180deg, rgba(18, 168, 150, 0.07), rgba(255, 255, 255, 0.4));
}
.nx-link-card {
  margin-bottom: 10px;
}
.nx-link-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.nx-link-field {
  margin: 10px 0 0 !important;
}
.nx-link-field input {
  font-size: 0.95rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}
.nx-variation-preview {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--nx-line-soft);
  background: #0e1621;
  color: #e8eef7;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.45;
  max-height: 280px;
  overflow: auto;
}
.nx-form-section {
  margin-bottom: 18px;
}
.nx-form-section-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f8a82;
}
.nx-table-wrap { overflow-x: auto; }
.nx-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.nx-studio-card-full { grid-column: 1 / -1; }
.nx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.nx-toolbar .nx-segment { margin-bottom: 0; }
.nx-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nx-toolbar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nx-toolbar-title strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--nx-text);
}
.nx-seg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--nx-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.nx-segment a.active .nx-seg-count {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.nx-data-table {
  width: 100%;
  border-collapse: collapse;
}
.nx-data-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f8a82;
  font-weight: 700;
  padding: 12px 10px;
  border-bottom: 1px solid var(--nx-line);
  white-space: nowrap;
}
.nx-data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--nx-line-soft);
  vertical-align: top;
  font-size: 0.9rem;
}
.nx-data-table tr:last-child td { border-bottom: 0; }
.nx-data-table tbody tr:hover td { background: var(--nx-hover); }
.nx-game-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nx-game-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--nx-accent-soft);
  color: var(--nx-accent-deep);
  flex-shrink: 0;
  font-size: 1rem;
}
.nx-msg-preview {
  color: var(--nx-text);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 42ch;
}
.nx-msg-details {
  margin-top: 6px;
}
.nx-msg-details summary {
  cursor: pointer;
  color: var(--nx-accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  user-select: none;
}
.nx-msg-full {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0e1621;
  color: #d7e0ea;
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 52ch;
}
.nx-msg-full a { color: #7aaefb; }
.nx-msg-full b,
.nx-msg-full strong { color: #f4f7fa; }
.nx-msg-full code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
}
.nx-time-cell {
  font-size: 0.8rem;
  color: var(--nx-text);
  white-space: nowrap;
}
.nx-time-cell .muted { display: inline-block; min-width: 3.2em; }
.nx-ctx-pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f6f8;
  border: 1px solid var(--nx-line);
  font-size: 0.75rem;
  max-width: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.nx-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--nx-line-soft);
}
.nx-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}
.predict-card {
  margin-top: 0;
  padding: 0;
  overflow: hidden;
}
.predict-card .predict-form { margin-top: 14px; }

.nx-catalog .nx-studio-card-head {
  align-items: center;
}
.nx-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.nx-catalog-count {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--nx-accent-deep);
  background: var(--nx-accent-soft);
  border-radius: 8px;
  padding: 6px 10px;
}
.nx-catalog-tabs {
  margin-bottom: 12px;
}
.nx-catalog-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--nx-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nx-catalog-tabs button:hover {
  background: var(--nx-hover);
  color: var(--nx-text);
}
.nx-catalog-tabs button.active {
  background: var(--nx-rail);
  color: #fff;
}
.nx-catalog-table td { vertical-align: middle; }
.nx-catalog-row.is-exists { opacity: 0.72; }
.nx-catalog-row.is-exists .nx-game-ico { background: #e8f0ee; }
.nx-cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--nx-accent-soft);
  color: var(--nx-accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nx-catalog-action { text-align: right; white-space: nowrap; }
.nx-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--nx-accent-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nx-link-btn:hover { color: var(--nx-accent); }
.nx-catalog-row.is-page-hide {
  display: none !important;
}
.nx-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--nx-line-soft);
}
.nx-pager[hidden] {
  display: none !important;
}
.nx-pager-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nx-accent-deep);
  min-width: 7rem;
  text-align: center;
}

/* ——— Game editor / CTA modals ——— */
body.nx-modal-lock {
  overflow: hidden;
}
.nx-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.nx-modal[hidden] {
  display: none !important;
}
.nx-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(9, 20, 24, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nx-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(18, 168, 150, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 250, 249, 0.98));
  box-shadow: 0 28px 80px rgba(8, 30, 34, 0.28);
  overflow: hidden;
}
.nx-modal-panel-sm {
  width: min(560px, 100%);
}
.nx-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--nx-line-soft);
  background: linear-gradient(180deg, rgba(18, 168, 150, 0.08), transparent);
}
.nx-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--nx-ink);
}
.nx-modal-head p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--nx-muted);
}
.nx-modal-x {
  border: 0;
  background: transparent;
  color: var(--nx-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}
.nx-modal-x:hover {
  color: var(--nx-ink);
  background: rgba(18, 168, 150, 0.1);
}
.nx-modal-body {
  padding: 8px 20px 20px;
  overflow: auto;
}
.nx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--nx-line-soft);
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(244, 250, 249, 0.6), rgba(244, 250, 249, 0.98) 35%);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
@media (max-width: 1100px) {
  .nx-studio { grid-template-columns: 1fr; }
  .nx-btn-card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nx-btn-card-grid { grid-template-columns: 1fr; }
  .nx-toolbar { align-items: stretch; }
}
