@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ns-sidebar: #0a0e14;
  --ns-sidebar-elev: #121820;
  --ns-sidebar-hover: #1a222d;
  --ns-sidebar-active: #222c3a;
  --ns-accent: #38bdf8;
  --ns-accent-2: #0ea5e9;
  --ns-accent-soft: rgba(56, 189, 248, .12);
  --ns-btn-from: #0284c7;
  --ns-btn-to: #0369a1;
  --ns-btn-hover-from: #0369a1;
  --ns-btn-hover-to: #075985;
  --ns-btn-shadow: rgba(3, 105, 161, .38);
  --ns-logo: #38bdf8;
  --ns-bg: #f1f5f9;
  --ns-bg-glow: #e2e8f0;
  --ns-ink: #0f172a;
  --ns-muted: #64748b;
  --ns-line: #e2e8f0;
  --ns-card: #ffffff;
  --ns-card-solid: #ffffff;
  --ns-ok: #059669;
  --ns-danger: #dc2626;
  --ns-warn: #d97706;
  --ns-radius: 16px;
  --ns-radius-sm: 12px;
  --ns-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --ns-shadow-lg: 0 12px 40px rgba(15, 23, 42, .1);
  --ns-sidebar-w: 272px;
  --ns-sidebar-w-collapsed: 78px;
  --ns-font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --ns-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--ns-font);
  background:
    radial-gradient(ellipse 80% 50% at 100% -20%, rgba(56, 189, 248, .08), transparent 50%),
    radial-gradient(ellipse 60% 40% at -10% 100%, rgba(14, 165, 233, .06), transparent 45%),
    var(--ns-bg);
  background-attachment: fixed;
  color: var(--ns-ink);
  -webkit-font-smoothing: antialiased;
  font-size: 0.9375rem;
  line-height: 1.5;
}

code, .font-monospace, .mono { font-family: var(--ns-mono) !important; }

.ns-shell {
  display: block;
  min-height: 100vh;
}

/* —— Fixed full-height sidebar —— */
.ns-sidebar {
  width: var(--ns-sidebar-w);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  background: linear-gradient(180deg, #0d1219 0%, var(--ns-sidebar) 35%, #080b10 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 14px;
  z-index: 1040;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
  transition: width .22s ease;
  overflow: hidden;
}
body.ns-sidebar-collapsed .ns-sidebar { width: var(--ns-sidebar-w-collapsed); }
body.ns-sidebar-collapsed .ns-nav-label-text,
body.ns-sidebar-collapsed .ns-nav-caret,
body.ns-sidebar-collapsed .ns-nav-children,
body.ns-sidebar-collapsed .ns-user-meta,
body.ns-sidebar-collapsed .ns-nav-foot-link span,
body.ns-sidebar-collapsed .ns-brand-logo { display: none !important; }
body.ns-sidebar-collapsed .ns-brand::after {
  content: "N";
  font-weight: 800;
  color: var(--ns-accent);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
body.ns-sidebar-collapsed .ns-sidebar-collapse i { transform: rotate(180deg); }

.ns-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 18px;
  flex-shrink: 0;
}
.ns-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}
.ns-brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
}
/* Dark SVG wordmark → white on navy sidebar */
.ns-sidebar .ns-brand-logo {
  filter: brightness(0) invert(1);
  opacity: .96;
}
.ns-sidebar-collapse {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8b97a8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .15s;
}
.ns-sidebar-collapse:hover { background: var(--ns-sidebar-hover); color: #fff; }

.ns-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: #2a3544 transparent;
}
.ns-nav::-webkit-scrollbar { width: 5px; }
.ns-nav::-webkit-scrollbar-thumb { background: #2a3544; border-radius: 8px; }

.ns-nav-drop {
  border-radius: 12px;
  transition: background .15s;
}
.ns-nav-drop.is-open {
  background: var(--ns-sidebar-elev);
  padding-bottom: 6px;
  box-shadow: inset 3px 0 0 var(--ns-accent), inset 0 0 0 1px rgba(56,189,248,.06);
}
.ns-nav-parent {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: 0;
  color: #c9d3e0;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.ns-nav-drop:not(.is-open) .ns-nav-parent:hover {
  background: var(--ns-sidebar-hover);
  color: #fff;
}
.ns-nav-drop.is-open .ns-nav-parent { color: #fff; }
.ns-nav-parent-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ns-nav-parent-left i {
  width: 1.15rem;
  text-align: center;
  opacity: .9;
  color: #9fb0c4;
}
.ns-nav-drop.is-open .ns-nav-parent-left i { color: var(--ns-accent); }
.ns-nav-caret {
  font-size: 0.68rem;
  opacity: .65;
  transition: transform .2s ease;
}
.ns-nav-drop.is-open .ns-nav-caret { transform: rotate(180deg); }

.ns-nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 8px 4px 18px;
}
.ns-nav-children[hidden] { display: none !important; }
.ns-nav-child {
  display: block;
  padding: 9px 12px 9px 28px;
  border-radius: 8px;
  color: #9aa8ba;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.ns-nav-child::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a5565;
  transform: translateY(-50%);
}
.ns-nav-child:hover {
  background: rgba(255,255,255,.05);
  color: #e8eef6;
}
.ns-nav-child.active {
  background: var(--ns-accent-soft);
  color: #fff;
}
.ns-nav-child.active::before { background: var(--ns-accent); box-shadow: 0 0 10px var(--ns-accent); }

.ns-sidebar-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.ns-user-chip {
  margin: 0 2px 8px;
  padding: 9px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.03);
}
.ns-user-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #243041, #1a2433);
  color: var(--ns-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid rgba(94,196,220,.2);
}
.ns-user-meta { min-width: 0; }
.ns-user-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: #e8eef6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-user-role {
  font-size: 0.65rem;
  color: #8090a4;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ns-nav-foot-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #9aa8ba;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
}
.ns-nav-foot-link:hover { background: var(--ns-sidebar-hover); color: #fff; }
.ns-nav-foot-link i { width: 1.1rem; text-align: center; }

.ns-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, .55);
  backdrop-filter: blur(2px);
  z-index: 1035;
}
body.ns-sidebar-open .ns-sidebar-backdrop { display: block; }

/* —— Main —— */
.ns-main {
  margin-left: var(--ns-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .22s ease;
}
body.ns-sidebar-collapsed .ns-main {
  margin-left: var(--ns-sidebar-w-collapsed);
}
.ns-main-stick {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 245, 249, .92);
  backdrop-filter: blur(12px);
}
.ns-impersonate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
  background: #fff7ed;
  border-bottom: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.875rem;
  line-height: 1.4;
}
.ns-impersonate-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.ns-impersonate-copy i {
  margin-top: 3px;
  flex-shrink: 0;
}
.ns-impersonate-bar .btn-ns {
  white-space: nowrap;
  flex-shrink: 0;
}
.ns-attack-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 55%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(185, 28, 28, .28);
  overflow: hidden;
  animation: ns-attack-in .35s ease-out;
}
.ns-attack-banner-pulse {
  position: absolute;
  inset: -40% auto auto -10%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  animation: ns-attack-pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
.ns-attack-banner-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ns-attack-banner-copy strong {
  font-size: .95rem;
  letter-spacing: .01em;
}
.ns-attack-banner-copy span {
  font-size: .92rem;
  opacity: .95;
}
.ns-attack-banner-copy small {
  font-size: .78rem;
  opacity: .82;
  font-family: var(--ns-mono, ui-monospace, monospace);
}
.ns-attack-banner .btn-ns {
  position: relative;
  flex-shrink: 0;
  background: #fff;
  color: #991b1b;
  border: none;
}
.ns-attack-banner .btn-ns:hover {
  background: #fee2e2;
  color: #7f1d1d;
}
@keyframes ns-attack-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes ns-attack-pulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.25); opacity: .2; }
}
@media (max-width: 720px) {
  .ns-attack-banner { flex-wrap: wrap; }
}
.ns-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px 16px;
  gap: 16px;
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.ns-crumb {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ns-muted);
  font-weight: 700;
  margin-bottom: 2px;
}
.ns-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ns-ink);
}
.ns-domain-btn {
  background: var(--ns-card-solid);
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius-sm);
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ns-ink);
  box-shadow: var(--ns-shadow);
  font-family: inherit;
}
.ns-domain-btn:hover, .ns-domain-btn:focus {
  background: #fff;
  border-color: #b8c9d8;
  color: var(--ns-ink);
}

.ns-content {
  flex: 1 1 auto;
  padding: 4px 28px 80px;
  max-width: 1440px;
}

.ns-footer {
  position: fixed;
  left: var(--ns-sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 35;
  margin: 0;
  padding: 8px 28px 12px;
  color: var(--ns-muted);
  font-size: 0.78rem;
  background: linear-gradient(180deg, transparent, rgba(241,245,249,.95) 35%);
  transition: left .22s ease;
  pointer-events: none;
}
body.ns-sidebar-collapsed .ns-footer {
  left: var(--ns-sidebar-w-collapsed);
}
.ns-footer-inner {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(213,222,232,.95);
  box-shadow: 0 -4px 24px rgba(11,21,36,.06);
  backdrop-filter: blur(10px);
}
.ns-footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.ns-footer a { color: var(--ns-accent-2); text-decoration: none; font-weight: 600; }
.ns-footer a:hover { text-decoration: underline; }
.ns-footer-brand { font-weight: 600; color: #334155; }

/* —— Cards / stats —— */
.ns-card {
  background: var(--ns-card);
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius);
  padding: 20px 22px;
  box-shadow: var(--ns-shadow);
  transition: border-color .15s, box-shadow .2s;
}
.ns-card:hover { border-color: #cbd5e1; box-shadow: var(--ns-shadow-lg); }
.ns-card.ns-card-flat:hover { border-color: var(--ns-line); box-shadow: var(--ns-shadow); }
.ns-card.ns-card-compact { padding: 16px 18px; }
.ns-card.ns-card-stretch { height: 100%; }
.ns-stat-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
}
.ns-stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ns-accent-soft), transparent 68%);
  pointer-events: none;
}
.ns-stat-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 12px;
  background: var(--ns-accent-soft);
  color: var(--ns-accent-2);
}
.ns-stat-ico.danger { background: #fee2e2; color: #b91c1c; }
.ns-stat-ico.warn { background: #ffedd5; color: #c2410c; }
.ns-stat-ico.ok { background: #d1fae5; color: #047857; }
.ns-stat-ico.ink { background: #e8eef4; color: #1e3a5f; }

.ns-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ns-quick-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: var(--ns-radius-sm);
  border: 1px solid var(--ns-line);
  background: #f8fafc;
  text-decoration: none;
  color: var(--ns-ink);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.ns-quick-tile:hover {
  border-color: #7dd3fc;
  background: #fff;
  color: var(--ns-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, .12);
}
.ns-quick-tile i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-accent-soft);
  color: var(--ns-accent-2);
  font-size: .9rem;
}
.ns-quick-tile span { font-weight: 650; font-size: .9rem; letter-spacing: -0.01em; }
.ns-quick-tile small { color: var(--ns-muted); font-size: .75rem; }

.ns-node-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ns-line);
  background: #f8fafc;
  margin-bottom: 8px;
}
.ns-node-chip:last-child { margin-bottom: 0; }
.ns-node-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,.25);
  flex-shrink: 0;
}
.ns-node-dot.on { background: #0d8a5f; box-shadow: 0 0 0 3px rgba(13,138,95,.2); }
.ns-node-dot.off { background: #c0352b; box-shadow: 0 0 0 3px rgba(192,53,43,.18); }

.ns-lang-switch {
  display: inline-flex;
  border: 1px solid var(--ns-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ns-card-solid);
  flex-shrink: 0;
}
.ns-lang-opt {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ns-muted);
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}
.ns-lang-opt.is-on {
  background: #0f172a;
  color: #fff;
}
.ns-lang-switch.is-busy { opacity: .5; pointer-events: none; }
.ns-lang-switch--login {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #151b24;
  border-color: rgba(255,255,255,.1);
}
.ns-lang-switch--login .ns-lang-opt { color: #94a3b8; }
.ns-lang-switch--login .ns-lang-opt.is-on {
  background: #38bdf8;
  color: #0c1118;
}
.ns-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.ns-filter-bar .form-control,
.ns-filter-bar .form-select {
  min-width: 0;
}
.ns-filter-bar .ns-search {
  flex: 1 1 200px;
  max-width: 320px;
  position: relative;
}
.ns-filter-bar .ns-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ns-muted);
  font-size: .85rem;
  pointer-events: none;
}
.ns-filter-bar .ns-search input {
  padding-left: 36px;
}
.ns-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--ns-line);
  background: rgba(248,250,252,.9);
}
.ns-pager-meta { font-size: .84rem; color: var(--ns-muted); font-weight: 600; }
.ns-pager-btns { display: flex; gap: 6px; align-items: center; }
.ns-pager-cur { font-size: .84rem; font-weight: 700; min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.ns-stat-label {
  font-size: 0.78rem;
  color: var(--ns-muted);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.ns-stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #0a1628;
  font-variant-numeric: tabular-nums;
}
.ns-stat-meta { font-size: 0.84rem; margin-top: 8px; color: var(--ns-ok); font-weight: 600; }
.ns-stat-meta a { color: var(--ns-ok); text-decoration: none; }
.ns-stat-meta a:hover { text-decoration: underline; }

.ns-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.ns-card-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0a1628;
  letter-spacing: -0.02em;
}
.ns-card-head .ns-meta { font-size: 0.84rem; color: var(--ns-muted); font-weight: 600; text-decoration: none; }
.ns-card-head .ns-meta:hover { color: var(--ns-accent-2); }

.ns-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ns-line);
  font-size: 0.9rem;
}
.ns-event-row:last-child { border-bottom: 0; }

/* Scrollable feed panels (dashboard notifications, events) */
.ns-feed-list {
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -4px;
  padding: 0 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.ns-feed-list--sm { max-height: 200px; }
.ns-feed-list--lg { max-height: 360px; }
.ns-feed-list::-webkit-scrollbar { width: 5px; }
.ns-feed-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

.ns-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--ns-radius-sm);
  transition: background .12s;
}
.ns-notif-item:hover { background: #f8fafc; }
.ns-notif-item + .ns-notif-item { margin-top: 2px; }
.ns-notif-item strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}
.ns-notif-item .ns-notif-body {
  font-size: 0.78rem;
  color: var(--ns-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ns-chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}

.ns-dash {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ns-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ns-dash-stats .ns-stat-card { height: auto; }
.ns-dash-board {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}
.ns-dash-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ns-dash-side { display: flex; flex-direction: column; gap: 16px; }
.ns-dash-side > .ns-card { flex: 0 0 auto; }

@media (max-width: 1199.98px) {
  .ns-dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .ns-dash-board { grid-template-columns: 1fr; }
}

.ns-event-ico {
  width: 30px; height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.ns-event-ico.warn { background: #ffedd5; color: #c2410c; }
.ns-event-ico.ban { background: #fee2e2; color: #b91c1c; }
.ns-event-ico.ok { background: #d1fae5; color: #047857; }
.ns-event-ico.info { background: #dff3f8; color: #0e7490; }

.ns-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-bg);
  padding: 24px;
}

/* —— Split login (Smail-inspired, NetShield branded) —— */
body.ns-login-page {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background: #070b12;
  font-family: var(--ns-font);
  color: #e2e8f0;
}
.ns-login-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  height: 100vh;
  min-height: 0;
}
.ns-login-hero {
  position: relative;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 25%, rgba(56, 189, 248, .14), transparent 58%),
    radial-gradient(ellipse 45% 35% at 50% 85%, rgba(14, 165, 233, .08), transparent 50%),
    linear-gradient(165deg, #0a1018 0%, #070b12 48%, #05080d 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
.ns-login-hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  left: 50%;
  bottom: -120px;
  margin-left: -240px;
  background: radial-gradient(circle, rgba(56, 189, 248, .1) 0%, transparent 68%);
  pointer-events: none;
}
.ns-login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(56,189,248,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .4;
  pointer-events: none;
}
.ns-login-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ns-login-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 28px;
}
.ns-login-brand-mark { display: none; }
.ns-login-brand-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.ns-login-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .22);
}
.ns-login-headline {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: #f8fafc;
  margin: 0 0 14px;
}
.ns-login-headline em {
  font-style: normal;
  background: linear-gradient(90deg, #38bdf8, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ns-login-lead {
  margin: 0 auto 20px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 480px;
}
.ns-login-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}
.ns-login-stat {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(56, 189, 248, .15);
  min-width: 96px;
}
.ns-login-stat strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #e0f2fe;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ns-login-stat span {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ns-login-features {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.ns-login-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  transition: border-color .15s, background .15s;
  text-align: left;
}
.ns-login-features li:hover {
  border-color: rgba(56, 189, 248, .25);
  background: rgba(15, 23, 42, .75);
}
.ns-login-feat-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(56,189,248,.2), rgba(14,165,233,.08));
  border: 1px solid rgba(56, 189, 248, .2);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1;
}
.ns-login-feat-ico i {
  font-size: 1.2rem;
  line-height: 1;
}
.ns-login-features li strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.ns-login-features li > div > span {
  display: block;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #64748b;
}

.ns-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #0c1118;
  position: relative;
}
.ns-login-form-wrap {
  width: 100%;
  max-width: 400px;
}
.ns-login-form-head h2 {
  margin: 0 0 6px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f1f5f9;
}
.ns-login-form-head p {
  margin: 0 0 28px;
  color: #64748b;
  font-size: 0.9rem;
}
.ns-login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(220, 38, 38, .12);
  border: 1px solid rgba(248, 113, 113, .25);
  color: #fecaca;
  font-size: 0.875rem;
  margin-bottom: 20px;
}
.ns-login-alert.warn {
  background: rgba(217, 119, 6, .12);
  border-color: rgba(251, 191, 36, .25);
  color: #fde68a;
}
.ns-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ns-login-field { display: block; }
.ns-login-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.ns-login-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #121820;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .15s, box-shadow .15s;
}
.ns-login-input-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
}
.ns-login-input-wrap > i {
  color: #475569;
  font-size: .9rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}
.ns-login-input-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #f1f5f9;
  padding: 13px 0;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.ns-login-input-wrap input::placeholder { color: #475569; }
.ns-login-eye {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
}
.ns-login-eye:hover { color: #94a3b8; }
.ns-login-captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.ns-login-captcha-img {
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 0;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .15s;
}
.ns-login-captcha-img:hover { border-color: #38bdf8; }
.ns-login-captcha-img img {
  display: block;
  width: 140px;
  height: auto;
}
.ns-login-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #475569;
}
.ns-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ns-btn-from) 0%, var(--ns-btn-to) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--ns-btn-shadow);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.ns-login-submit:hover {
  background: linear-gradient(180deg, var(--ns-btn-hover-from) 0%, var(--ns-btn-hover-to) 100%);
  filter: none;
  box-shadow: 0 8px 28px var(--ns-btn-shadow);
}
.ns-login-submit:active { transform: translateY(1px); }
.ns-login-submit:disabled { opacity: .65; cursor: not-allowed; }
.ns-login-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  font-size: 0.75rem;
  color: #475569;
}
.ns-login-ver {
  font-family: var(--ns-mono);
  color: #334155;
}

@media (max-width: 991.98px) {
  body.ns-login-page { height: auto; overflow: auto; }
  .ns-login-split { grid-template-columns: 1fr; }
  .ns-login-hero {
    padding: 28px 24px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .ns-login-headline { font-size: 1.55rem; }
  .ns-login-lead { font-size: 0.88rem; margin-bottom: 16px; }
  .ns-login-stats { margin-bottom: 18px; }
  .ns-login-split { height: auto; min-height: 100vh; }
  .ns-login-hero { overflow: visible; }
  .ns-login-brand { margin-bottom: 20px; }
  .ns-login-features { gap: 10px; }
  .ns-login-features li { padding: 12px 14px; }
  .ns-login-panel { padding: 28px 20px 40px; }
}
@media (max-width: 575.98px) {
  .ns-login-captcha-row { flex-direction: column; }
  .ns-login-captcha-img img { width: 100%; }
}

.ns-login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--ns-shadow-lg);
  border: 1px solid var(--ns-line);
}
.ns-login-card .ns-brand { justify-content: center; padding-bottom: 14px; }
.ns-login-card .ns-brand-logo { height: 42px; max-width: 210px; }

.form-label { font-size: 0.8rem; color: var(--ns-muted); font-weight: 600; }
.form-control, .form-select {
  border-radius: 11px;
  border-color: var(--ns-line);
  padding: 0.58rem 0.9rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ns-accent);
  box-shadow: 0 0 0 3px rgba(94,196,220,.2);
}
.btn-ns {
  background: linear-gradient(180deg, var(--ns-btn-from) 0%, var(--ns-btn-to) 100%);
  color: #fff;
  border: 0;
  border-radius: var(--ns-radius-sm);
  padding: 0.58rem 1.15rem;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 14px var(--ns-btn-shadow);
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.btn-ns:hover {
  background: linear-gradient(180deg, var(--ns-btn-hover-from) 0%, var(--ns-btn-hover-to) 100%);
  color: #fff;
  filter: none;
  box-shadow: 0 6px 20px var(--ns-btn-shadow);
}
.btn-ns:active { transform: translateY(1px); }
.btn-ns-outline {
  background: #fff;
  color: #0b1f3a;
  border: 1px solid var(--ns-line);
  border-radius: 11px;
  font-weight: 600;
  font-family: inherit;
}
.btn-ns-outline:hover { border-color: #b0c0d0; background: #f8fafc; color: #0b1f3a; }

/* Equal-size table action buttons: icon | label */
.ns-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.ns-act {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  height: 34px;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  text-decoration: none !important;
  box-sizing: border-box;
  font-family: inherit;
}
.ns-act i {
  font-size: 0.78rem;
  width: 0.9rem;
  text-align: center;
  opacity: .92;
}
.ns-act-primary {
  background: linear-gradient(180deg, var(--ns-btn-from) 0%, var(--ns-btn-to) 100%);
  color: #fff !important;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 4px 12px var(--ns-btn-shadow);
}
.ns-act-primary:hover {
  color: #fff !important;
  background: linear-gradient(180deg, var(--ns-btn-hover-from) 0%, var(--ns-btn-hover-to) 100%);
}
.ns-act-ghost {
  background: #fff;
  color: #0b1f3a !important;
  border: 1px solid var(--ns-line);
}
.ns-act-ghost:hover { background: #f8fafc; border-color: #b0c0d0; color: #0b1f3a !important; }
.ns-act-danger {
  background: #fff;
  color: #b91c1c !important;
  border: 1px solid #fecaca;
}
.ns-act-danger:hover { background: #fef2f2; border-color: #f87171; color: #991b1b !important; }

/* Protection page */
.ns-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 991.98px) {
  .ns-profile-grid { grid-template-columns: 1fr 1fr; }
}
.ns-profile-card {
  text-align: left;
  border: 1px solid var(--ns-line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
  font-family: inherit;
  color: inherit;
  width: 100%;
}
.ns-profile-card:hover { border-color: #9ec9d8; transform: translateY(-1px); }
.ns-profile-card.is-active {
  border-color: #3d9bb0;
  box-shadow: 0 0 0 3px rgba(94,196,220,.22);
}
.ns-profile-card i {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dff3f8;
  color: #0e7490;
  margin-bottom: 8px;
}
.ns-profile-card.is-lock i { background: #fee2e2; color: #b91c1c; }
.ns-profile-card.is-strict i { background: #ffedd5; color: #c2410c; }
.ns-profile-card.is-off i { background: #e8eef4; color: #475569; }
.ns-profile-card strong { display: block; font-size: .95rem; letter-spacing: -.02em; }
.ns-profile-card small { display: block; color: var(--ns-muted); margin-top: 4px; line-height: 1.35; }

.ns-prot-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 991.98px) {
  .ns-prot-layout { grid-template-columns: 1fr; }
}
.ns-prot-nav {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--ns-card);
  border: 1px solid rgba(213,222,232,.9);
  border-radius: var(--ns-radius);
  box-shadow: var(--ns-shadow);
}
.ns-prot-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  font-weight: 600;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
}
.ns-prot-nav button i { width: 1.1rem; text-align: center; color: #5b6b7c; }
.ns-prot-nav button:hover { background: #f1f5f9; }
.ns-prot-nav button.is-active { background: #0f172a; color: #fff; }
.ns-prot-nav button.is-active i { color: var(--ns-accent); }
.ns-prot-panel { display: none; }
.ns-prot-panel.is-on { display: block; }
.ns-field-label {
  font-weight: 650;
  font-size: .86rem;
  margin-bottom: 4px;
  display: block;
}
.ns-field-hint { font-size: .78rem; color: var(--ns-muted); margin-top: 4px; line-height: 1.4; }
.ns-prot-savebar {
  position: sticky;
  bottom: 72px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--ns-line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(11,21,36,.08);
}

.ns-badge-dot {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.ns-toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.ns-toast {
  background: #12161c;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-6px);
  transition: .2s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  max-width: 380px;
  pointer-events: auto;
}
.ns-toast.show { opacity: 1; transform: none; }
.ns-toast-success { background: #0d8a5f; }
.ns-toast-danger { background: #c0352b; }
.ns-toast-warn { background: #c45c12; }

.ns-table { width: 100%; border-collapse: collapse; }
.ns-table th, .ns-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ns-line);
  text-align: left;
  font-size: 0.9rem;
  vertical-align: middle;
}
.ns-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ns-muted);
  font-weight: 700;
  background: rgba(248,250,252,.8);
}
.ns-table tbody tr { transition: background .12s; }
.ns-table tbody tr:hover { background: rgba(94,196,220,.04); }

.ns-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}
.ns-pill-ok { background: #d1fae5; color: #047857; }
.ns-pill-off { background: #e2e8f0; color: #475569; }
.ns-pill-admin { background: #dff3f8; color: #0e7490; }
.ns-pill-reseller { background: #ede9fe; color: #6d28d9; }
.ns-brand-upload { padding: 0.25rem 0; }
.ns-brand-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 1rem 1.25rem;
  background: #0c1118;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}
.ns-brand-preview img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.ns-brand-preview-fav {
  min-height: 72px;
  width: 96px;
}
.ns-brand-preview-fav img {
  max-height: 40px;
  max-width: 40px;
}
.ns-brand-placeholder {
  color: #64748b;
  font-size: 0.85rem;
}
.ns-stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }
.ns-stat-row .ns-stat-card {
  flex: 1;
  min-width: 140px;
  padding: 1rem 1.1rem;
  text-align: center;
}
.ns-stat-row .ns-stat-val { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.ns-stat-row .ns-stat-lbl { display: block; font-size: 0.78rem; color: var(--ns-muted); margin-top: 0.25rem; }
.ns-pill-customer { background: #e8eef4; color: #334155; }
.ns-pill-danger { background: #fee2e2; color: #b91c1c; }
.ns-pill-warn { background: #ffedd5; color: #c2410c; }

/* —— Page shell (cluster-style heroes) —— */
.ns-page { margin-bottom: 8px; }
.ns-page-hero,
.ns-cluster-hero {
  position: relative;
  border-radius: var(--ns-radius);
  padding: 28px 28px 26px;
  margin-bottom: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1220 0%, #0f1c33 42%, #0a1628 100%);
  border: 1px solid rgba(56, 189, 248, .15);
  box-shadow: 0 12px 40px rgba(7, 11, 18, .18);
}
.ns-page-hero-glow,
.ns-cluster-hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -120px;
  background: radial-gradient(circle, rgba(56, 189, 248, .22), transparent 68%);
  pointer-events: none;
}
.ns-page-hero-inner,
.ns-cluster-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.ns-page-kicker,
.ns-cluster-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .22);
  margin-bottom: 12px;
}
.ns-page-title,
.ns-cluster-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.ns-page-lead,
.ns-cluster-lead {
  margin: 0;
  max-width: 560px;
  color: #94a3b8;
  font-size: .92rem;
  line-height: 1.55;
}
.ns-page-hero-actions,
.ns-cluster-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ns-page-live,
.ns-cluster-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(56, 189, 248, .2);
  color: #e2e8f0;
  font-size: .84rem;
  font-weight: 700;
  font-family: var(--ns-mono);
}
.ns-page-live.is-error,
.ns-cluster-live.is-error { border-color: rgba(220, 38, 38, .35); color: #fecaca; }
.ns-page-live-dot,
.ns-cluster-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .55);
  animation: ns-cluster-pulse 2s ease infinite;
}
.ns-page-live.is-error .ns-page-live-dot,
.ns-cluster-live.is-error .ns-cluster-live-dot {
  background: #f87171;
  animation: none;
}
.ns-page-hero-actions .form-select,
.ns-page-hero-actions .form-control,
.ns-cluster-hero-actions .form-select,
.ns-cluster-hero-actions .form-control {
  border-radius: 10px;
  border-color: rgba(148, 163, 184, .35);
  background: rgba(15, 23, 42, .55);
  color: #e2e8f0;
  font-size: .84rem;
}
.ns-page-hero-actions .form-select:focus,
.ns-page-hero-actions .form-control:focus,
.ns-cluster-hero-actions .form-select:focus,
.ns-cluster-hero-actions .form-control:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
  color: #f8fafc;
}
.ns-page-hero-actions .btn-ns-outline,
.ns-cluster-hero-actions .btn-ns-outline {
  background: rgba(15, 23, 42, .45);
  border-color: rgba(148, 163, 184, .35);
  color: #e2e8f0;
}
.ns-page-hero-actions .btn-ns-outline:hover,
.ns-cluster-hero-actions .btn-ns-outline:hover {
  background: rgba(30, 41, 59, .75);
  border-color: #7dd3fc;
  color: #fff;
}
.ns-page-stat .ns-stat-value,
.ns-cluster-stat .ns-stat-value { font-variant-numeric: tabular-nums; }
.ns-page-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ns-page-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ns-page-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--ns-radius-sm);
  background: #fff;
  border: 1px solid var(--ns-line);
  box-shadow: var(--ns-shadow);
}

/* —— Cluster health page —— */
.ns-cluster-page { margin-bottom: 8px; }
@keyframes ns-cluster-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@keyframes ns-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ns-cluster-chart-card,
.ns-cluster-topo-card { min-height: 360px; }
.ns-cluster-chart-wrap {
  position: relative;
  height: 240px;
  margin: 8px 0 12px;
}
.ns-cluster-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--ns-ink);
}
.ns-cluster-chart-center strong {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ns-cluster-chart-center span {
  margin-top: 4px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ns-muted);
}
.ns-cluster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: .78rem;
  color: var(--ns-muted);
  font-weight: 600;
}
.ns-cluster-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ns-cluster-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  font-style: normal;
  display: inline-block;
}
.ns-cluster-legend-more {
  color: var(--ns-muted);
  font-weight: 700;
  font-size: .74rem;
}
.ns-cluster-topology {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 420px;
  margin-top: 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--ns-line);
  overflow: hidden;
}
.ns-cluster-topo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ns-line);
  background: linear-gradient(90deg, rgba(15, 39, 68, .05), transparent);
  flex-shrink: 0;
}
.ns-cluster-hub-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ns-cluster-hub-compact-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7dd3fc;
  background: linear-gradient(145deg, #0f2744, #0a1628);
  border: 1px solid rgba(56, 189, 248, .28);
  box-shadow: 0 6px 18px rgba(14, 165, 233, .18);
  flex-shrink: 0;
}
.ns-cluster-hub-compact-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ns-muted);
}
.ns-cluster-hub-compact strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ns-ink);
  font-family: var(--ns-mono);
  letter-spacing: -0.02em;
}
.ns-cluster-topo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ns-cluster-topo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  border: 1px solid transparent;
}
.ns-cluster-topo-chip i { font-size: .45rem; }
.ns-cluster-topo-chip.is-on { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.ns-cluster-topo-chip.is-warn { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.ns-cluster-topo-chip.is-off { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.ns-cluster-topo-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  align-content: start;
  scrollbar-width: thin;
}
.ns-cluster-topo-grid.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  padding: 10px;
}
.ns-cluster-topo-grid.is-dense {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
  padding: 8px;
}
.ns-cluster-topo-grid.is-xdense {
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 5px;
  padding: 8px;
}
.ns-cluster-topo-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--ns-muted);
  font-size: .88rem;
  font-weight: 600;
}
.ns-cluster-topo-tile {
  position: relative;
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--ns-line);
  border-left: 3px solid var(--tile-accent, #0284c7);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  transition: border-color .15s, box-shadow .15s, transform .12s;
  min-width: 0;
}
.ns-cluster-topo-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  z-index: 1;
}
.ns-cluster-topo-tile.is-on { border-color: #bbf7d0; }
.ns-cluster-topo-tile.is-off { border-color: #fecaca; background: #fffafa; }
.ns-cluster-topo-tile.is-warn { border-color: #fde68a; }
.ns-cluster-topo-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}
.ns-cluster-topo-tile.is-on .ns-cluster-topo-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}
.ns-cluster-topo-tile.is-off .ns-cluster-topo-dot { background: #ef4444; }
.ns-cluster-topo-tile.is-warn .ns-cluster-topo-dot { background: #f59e0b; }
.ns-cluster-topo-name {
  display: block;
  font-size: .78rem;
  font-weight: 800;
  color: var(--ns-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
}
.ns-cluster-topo-meta {
  display: block;
  margin-top: 4px;
  font-size: .7rem;
  color: var(--ns-muted);
  font-family: var(--ns-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-cluster-topo-meta b { color: var(--ns-ink); font-weight: 800; }
.ns-cluster-topo-region {
  display: block;
  margin-top: 3px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-cluster-topo-grid.is-dense .ns-cluster-topo-tile,
.ns-cluster-topo-grid.is-xdense .ns-cluster-topo-tile {
  padding: 8px 8px 6px;
  border-radius: 10px;
}
.ns-cluster-topo-grid.is-dense .ns-cluster-topo-name { font-size: .72rem; }
.ns-cluster-topo-grid.is-xdense .ns-cluster-topo-name { font-size: .68rem; }
.ns-cluster-topo-grid.is-xdense .ns-cluster-topo-region { display: none; }
.ns-cluster-filter {
  width: 160px;
  max-width: 42vw;
  border-radius: 10px;
}
.ns-cluster-node-grid.is-dense {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ns-cluster-node-grid.is-dense .ns-cluster-node-card { padding: 12px; }
.ns-cluster-node-grid.is-dense .ns-cluster-node-metrics { gap: 6px; }
.ns-cluster-node-grid.is-dense .ns-cluster-node-metrics div { padding: 6px 4px; }
.ns-cluster-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}
.ns-cluster-empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--ns-muted);
  font-weight: 600;
}
.ns-cluster-node-card {
  border-radius: 14px;
  border: 1px solid var(--ns-line);
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 16px;
  transition: border-color .15s, box-shadow .2s, transform .15s;
}
.ns-cluster-node-card:hover {
  border-color: #bae6fd;
  box-shadow: 0 10px 28px rgba(14, 165, 233, .1);
  transform: translateY(-2px);
}
.ns-cluster-node-card.is-on { border-color: rgba(52, 211, 153, .45); }
.ns-cluster-node-card.is-off { border-color: rgba(248, 113, 113, .5); }
.ns-cluster-node-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ns-cluster-node-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--node-accent, #0284c7);
  background: color-mix(in srgb, var(--node-accent, #0284c7) 14%, white);
  border: 1px solid color-mix(in srgb, var(--node-accent, #0284c7) 28%, white);
}
.ns-cluster-node-title { flex: 1; min-width: 0; }
.ns-cluster-node-title strong {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-cluster-node-title code {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  color: var(--ns-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-cluster-node-status {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ns-cluster-node-status.is-on { background: #d1fae5; color: #047857; }
.ns-cluster-node-status.is-off { background: #fee2e2; color: #b91c1c; }
.ns-cluster-node-status.is-warn { background: #fef3c7; color: #b45309; }
.ns-cluster-node-status.is-idle { background: #e2e8f0; color: #475569; }
.ns-cluster-node-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.ns-cluster-node-metrics div {
  padding: 8px 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--ns-line);
  text-align: center;
}
.ns-cluster-node-metrics span {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ns-muted);
}
.ns-cluster-node-metrics strong {
  display: block;
  margin-top: 3px;
  font-size: .92rem;
  font-weight: 800;
  font-family: var(--ns-mono);
  color: var(--ns-ink);
}
.ns-cluster-node-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 12px;
}
.ns-cluster-node-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.ns-cluster-node-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ns-cluster-node-foot .badge { font-weight: 700; }

@media (max-width: 767.98px) {
  .ns-page-hero,
  .ns-cluster-hero { padding: 22px 18px; }
  .ns-page-title,
  .ns-cluster-title { font-size: 1.35rem; }
  .ns-cluster-node-metrics { grid-template-columns: repeat(2, 1fr); }
  .ns-cluster-topology { max-height: 360px; }
  .ns-cluster-topo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

.ns-meth-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.ns-meth-chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(213,222,232,.95);
  background: #fff;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  letter-spacing: .04em;
  cursor: pointer;
}
.ns-meth-chk:has(input:checked) {
  border-color: #1e3a5f;
  background: #f0f6fa;
}
.ns-meth-chk input { margin: 0; }

.ns-origin-row {
  display: grid;
  grid-template-columns: 110px 1fr 100px;
  gap: 8px;
}
@media (max-width: 575.98px) {
  .ns-origin-row { grid-template-columns: 1fr; }
}

.ns-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--ns-muted);
}

.ns-settings-tile {
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  color: inherit;
}
.ns-settings-tile:hover {
  border-color: var(--ns-accent, #3b82f6);
  box-shadow: 0 4px 20px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.ns-settings-tile h2 { font-size: 1.05rem; }

.ns-nav-link {
  text-decoration: none;
  margin-bottom: 2px;
}
.ns-nav-link:hover { color: #fff; }
.ns-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.ns-nav-link.active .ns-nav-parent-left i { color: var(--ns-accent); }

.ns-settings-section-title {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ns-muted);
  margin: .25rem 0 0;
}

/* Modals */
.ns-modal .modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(11,21,36,.28);
  overflow: hidden;
}
.ns-modal .modal-header {
  border-bottom: 1px solid var(--ns-line);
  padding: 16px 20px;
  background: #f8fafc;
}
.ns-modal .modal-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.ns-modal .modal-body { padding: 20px; }
.ns-modal .modal-footer {
  border-top: 1px solid var(--ns-line);
  padding: 14px 20px;
  background: #fafbfc;
}
.ns-modal-danger .modal-header { background: #fef2f2; }
.ns-modal-danger .modal-title { color: #991b1b; }

.nav-tabs .nav-link {
  border: 0;
  color: var(--ns-muted);
  font-weight: 600;
  border-radius: 10px 10px 0 0;
  padding: .7rem 1rem;
}
.nav-tabs .nav-link.active {
  color: #0a1628;
  background: var(--ns-card-solid);
  box-shadow: var(--ns-shadow);
}

/* Backups — remote storage accordion */
.ns-remote-accordion {
  --bs-accordion-border-width: 0;
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-active-bg: #fafbfc;
  --bs-accordion-active-color: #0a1628;
  --bs-accordion-btn-padding-x: 20px;
  --bs-accordion-btn-padding-y: 16px;
  --bs-accordion-body-padding-x: 22px;
  --bs-accordion-body-padding-y: 20px;
}
.ns-remote-accordion .accordion-item {
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--ns-card-solid);
  box-shadow: var(--ns-shadow);
}
.ns-remote-accordion .accordion-item:last-child { margin-bottom: 0; }
.ns-remote-accordion .accordion-button {
  background: #fafbfc;
  color: #0a1628;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: none !important;
  border-bottom: 1px solid transparent;
  gap: 0;
}
.ns-remote-accordion .accordion-button:not(.collapsed) {
  background: #fafbfc;
  color: #0a1628;
  border-bottom-color: var(--ns-line);
}
.ns-remote-accordion .accordion-button::after {
  width: 1rem;
  height: 1rem;
  background-size: 1rem;
  opacity: 0.55;
  margin-left: 12px;
  flex-shrink: 0;
}
.ns-remote-accordion .ns-remote-acc-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding-right: 4px;
}
.ns-remote-accordion .ns-remote-acc-inner > i {
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}
.ns-remote-accordion .ns-remote-acc-inner .badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  flex-shrink: 0;
}
.ns-remote-accordion .accordion-body {
  padding: 20px 22px 22px;
  background: #fff;
  border-top: 0;
}
.ns-remote-accordion .ns-remote-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ns-line);
}
.ns-remote-accordion .ns-remote-toolbar .form-check-label {
  font-weight: 600;
  color: #0a1628;
  font-size: 0.875rem;
}
.ns-remote-accordion .ns-remote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid #eef2f6;
}
.ns-remote-accordion .ns-remote-actions .ns-act {
  min-width: auto;
  height: 36px;
  padding: 0 14px !important;
}

/* Geo / ASN tag picker */
.ns-tag-picker {
  position: relative;
  border: 1px solid var(--ns-line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.ns-tag-picker:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.ns-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.ns-tag-list:empty { margin-bottom: 0; }
.ns-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
}
.ns-tag-readonly {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}
.ns-tag-rm {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 4px;
}
.ns-tag-rm:hover { color: #dc2626; background: rgba(220,38,38,.08); }
.ns-tag-input {
  border: 0;
  outline: none;
  width: 100%;
  min-width: 140px;
  flex: 1;
  font-size: .9rem;
  padding: 4px 2px;
  background: transparent;
}
.ns-tag-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--ns-line);
  border-radius: 10px;
  box-shadow: var(--ns-shadow-lg, 0 12px 32px rgba(15,23,42,.12));
  max-height: 240px;
  overflow: auto;
  padding: 4px;
}
.ns-tag-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: .86rem;
  color: #0f172a;
  cursor: pointer;
}
.ns-tag-opt:hover,
.ns-tag-opt.is-active {
  background: #f1f5f9;
}
.ns-tag-src {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 8px;
  flex-shrink: 0;
}
.ns-tag-cnt {
  font-size: .72rem;
  color: #64748b;
  margin-left: 8px;
  flex-shrink: 0;
}
.ns-asn-suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.ns-asn-suggest-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--ns-line);
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .84rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ns-asn-suggest-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.ns-asn-suggest-main {
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-asn-suggest-cnt {
  font-size: .72rem;
  color: #64748b;
  flex-shrink: 0;
}
.ns-learned-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ns-learned-row .ns-tag-picker { flex: 1; min-width: 200px; }

/* Reports — breakdown quick actions */
.ns-card-hint {
  font-size: .72rem;
  color: var(--ns-muted);
  font-weight: 500;
}
.ns-rep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ns-line);
}
.ns-rep-row:last-child { border-bottom: 0; }
.ns-rep-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ns-rep-label { font-size: .86rem; font-weight: 600; color: #0f172a; }
.ns-rep-asn-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ns-rep-sub {
  font-size: .72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.ns-rep-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ns-rep-act {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ns-line);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .78rem;
  padding: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.ns-rep-act:hover:not(:disabled) {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}
.ns-rep-act:disabled { opacity: .45; cursor: not-allowed; }
.ns-rep-act-primary:hover:not(:disabled) {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}
.ns-asn-info {
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0 2px;
  cursor: pointer;
  line-height: 1;
}
.ns-asn-info:hover { color: #2563eb; }
.ns-asn-info-inline { font-size: .82rem; vertical-align: middle; margin-left: 4px; }
.ns-asn-cell { display: inline-flex; align-items: center; gap: 2px; }
.ns-asn-tip {
  position: fixed;
  z-index: 1080;
  width: 260px;
  background: #fff;
  border: 1px solid var(--ns-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
  padding: 0;
}
.ns-asn-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ns-line);
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}
.ns-asn-tip-x {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}
.ns-asn-tip-body { padding: 12px; }
.ns-asn-tip-org { font-weight: 600; color: #0f172a; font-size: .9rem; }
.ns-asn-tip-meta { font-size: .75rem; color: #64748b; margin-top: 6px; }

@media (max-width: 991.98px) {
  .ns-sidebar {
    width: 286px;
    transform: translateX(-105%);
    transition: transform .22s ease, width .22s ease;
  }
  body.ns-sidebar-open .ns-sidebar { transform: none; }
  .ns-main,
  body.ns-sidebar-collapsed .ns-main { margin-left: 0; }
  .ns-footer { left: 0; }
  .ns-top, .ns-content, .ns-footer, .ns-impersonate-bar { padding-left: 16px; padding-right: 16px; }
  .ns-top { position: relative; backdrop-filter: none; background: transparent; }
  .ns-impersonate-bar { flex-wrap: wrap; }
}

/* Feedback FAB (reseller / customer) */
.ns-feedback-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.ns-feedback-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.875rem;
  color: #fff;
  background: linear-gradient(180deg, var(--ns-btn-from) 0%, var(--ns-btn-to) 100%);
  box-shadow: 0 8px 28px var(--ns-btn-shadow);
  transition: transform .15s, box-shadow .15s;
}
.ns-feedback-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--ns-btn-shadow);
  color: #fff;
}
.ns-feedback-fab.is-open .ns-feedback-fab-btn i { transform: rotate(0); }
.ns-feedback-panel {
  width: min(360px, calc(100vw - 44px));
  background: var(--ns-card-solid);
  border: 1px solid var(--ns-line);
  border-radius: var(--ns-radius);
  box-shadow: var(--ns-shadow-lg);
  padding: 16px 18px;
}
.ns-feedback-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ns-feedback-inbox .list-group-item { border-left: 0; border-right: 0; }

/* Changelog timeline */
.ns-changelog-list { display: flex; flex-direction: column; gap: 0; }
.ns-changelog-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--ns-line);
}
.ns-changelog-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ns-changelog-item:first-child { padding-top: 0; }
.ns-changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ns-changelog-body { line-height: 1.55; }
