/*
 * AUTO-GENERATED FILE. DO NOT EDIT DIRECTLY.
 * Generated by tools/build_admin_css.py
 * Generated admin shell bundle. Source entry: /static/admin/core/app.css
 */

/* Canonical Nordavanta admin stylesheet. */
/* Generated from core source files and compiled into /static/admin/admin.bundle.css for shell pages. */

/* BEGIN tokens.css */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;
  --fs-28: 28px;
  --lh: 1.45;

  --sidebar-w: 292px;
  --sidebar-collapsed-w: 72px;
  --topbar-h: 72px;
  --content-max: 1520px;

  --bg-app: #f3f5f9;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8fafc;
  --bg-surface-soft: #eef2f7;

  --border: #e6eaf0;
  --border-soft: #eef2f7;
  --border-strong: #d8e0ea;

  --text: #0f172a;
  --text-soft: #1e293b;
  --muted: #667085;
  --muted-2: #98a2b3;

  --sidebar-bg-1: #061121;
  --sidebar-bg-2: #071c36;
  --sidebar-text: rgba(229, 239, 255, 0.88);
  --sidebar-muted: rgba(229, 239, 255, 0.56);

  --primary: #1757c4;
  --primary-2: #13439c;
  --navy: #0b3b8f;
  --teal: #0c8baf;
  --purple: #905dcd;
  --orange: #ef6f0f;
  --success: #16a34a;
  --info: #2563eb;
  --warning: #ef6f0f;
  --danger: #dc2626;

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --icon-size-xs: 14px;
  --icon-size-sm: 16px;
  --icon-size-md: 18px;
  --icon-size-lg: 20px;

  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 14px 34px rgba(16, 24, 40, 0.08);
  --shadow-float: 0 20px 48px rgba(15, 23, 42, 0.12);
  --focus-ring: 0 0 0 3px rgba(23, 87, 196, 0.2);
  --transition: 160ms ease;

  /* Backwards-compatible aliases for the existing admin styles. */
  --app-bg: var(--bg-app);
  --surface: var(--bg-surface);
  --surface-2: var(--bg-surface-alt);
  --surface-3: var(--bg-surface-soft);
  --border-2: var(--border-soft);
  --spacing: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --icon-size: 18px;
  --font-size-base: 14px;
  --line-height-base: 1.45;
  --sidebar-width: 292px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 72px;
  --content-max-width: 1520px;
  --r-10: var(--radius-sm);
  --r-12: var(--radius-md);
  --r-14: var(--radius-lg);
  --r-16: 16px;
  --r-pill: var(--radius-pill);
}
/* END tokens.css */

/* BEGIN reset.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body.admin-shell,
body.ns-root {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg-app);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only,
.ns-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1400;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-200%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}
/* END reset.css */

/* BEGIN layout.css */
body.admin-shell,
body.ns-root {
  background: var(--bg-app);
  color: var(--text);
  overflow-x: clip;
}

.app-shell,
.app {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  background: var(--bg-app);
}

.admin-sidebar,
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 18px 16px;
  background: linear-gradient(180deg, var(--sidebar-bg-1), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  contain: paint;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: width 0.2s ease, flex-basis 0.2s ease, padding-inline 0.2s ease;
}

html[data-sidebar-booting="1"] .app-shell,
html[data-sidebar-booting="1"] .admin-sidebar,
html[data-sidebar-booting="1"] .sidebar,
html[data-sidebar-booting="1"] .sidebar__inner,
html[data-sidebar-booting="1"] .side-nav,
html[data-sidebar-booting="1"] .side-nav__group,
html[data-sidebar-booting="1"] .side-nav__item,
html[data-sidebar-booting="1"] .ns-navItem,
html[data-sidebar-booting="1"] .sidebar__footer,
html[data-sidebar-booting="1"] .ns-sidebarTools,
html[data-sidebar-booting="1"] .ns-sidebarProfile {
  animation: none !important;
  transition: none !important;
}

.admin-main,
.main,
.ns-shell__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar,
.topbar,
.admin-header,
.ns-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--topbar-h);
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  overflow: visible;
}

.admin-content,
.content,
.ns-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: calc(100vh - var(--topbar-h));
  padding: 18px 24px 24px;
  background: var(--bg-app);
}

.admin-content__inner,
.content__inner {
  width: 100%;
  max-width: var(--content-max);
  min-width: 0;
  margin: 0 auto;
}

#admin-content {
  min-width: 0;
}

.page-shell,
.ns-pageContainer,
.ns-page,
.page,
.ns-dashboardPage {
  display: grid;
  gap: 16px;
}

.page-head,
.ns-page-header,
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-head__text,
.page-header__content,
.ns-page-header__row,
.page-header__row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title,
.ns-page-header__title {
  margin: 0;
  font-size: var(--fs-20);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-subtitle,
.ns-page-header__subtitle {
  margin: 6px 0 0;
  font-size: var(--fs-13);
  color: var(--muted);
}

.page-head__actions,
.page-actions,
.ns-page-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-stack,
.section-stack,
.stack {
  display: grid;
  gap: 16px;
}

.card,
.panel,
.section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

body.sidebar-collapsed .admin-sidebar,
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  flex-basis: var(--sidebar-collapsed-w);
  padding-inline: 8px;
}

body.sidebar-collapsed .brand__name,
body.sidebar-collapsed .side-nav__label,
body.sidebar-collapsed .side-nav__badge,
body.sidebar-collapsed .side-nav__heading,
body.sidebar-collapsed .status-card__title,
body.sidebar-collapsed .status-card__copy {
  display: none;
}

body.sidebar-collapsed .side-nav__item {
  justify-content: center;
  padding-inline: 0;
}

body.sidebar-collapsed .brand {
  justify-content: center;
}

body.sidebar-collapsed .sidebar__footer,
body.sidebar-collapsed .status-card {
  display: none;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer {
  display: block;
}

@media (max-width: 960px) {
  .app-shell,
  .app {
    display: block;
  }

  .admin-sidebar,
  .sidebar {
    position: relative;
    top: 0;
    z-index: auto;
    height: auto;
    min-height: auto;
  }

  .brand__name,
  .side-nav__label,
  .side-nav__badge,
  .side-nav__heading,
  .sidebar__footer.admin-sidebar__footer {
    display: block;
  }

  .side-nav__item {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .brand {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app {
    display: block;
  }

  .admin-sidebar,
  .sidebar {
    position: relative;
    height: auto;
  }

  .admin-topbar,
  .topbar,
  .admin-header,
  .ns-topbar {
    position: relative;
    padding: 14px 16px;
  }

  .admin-content,
  .content,
  .ns-content {
    padding: 16px;
  }

  .page-head,
  .ns-page-header,
  .page-header,
  .page-head__text,
  .page-header__content,
  .ns-page-header__row,
  .page-header__row {
    flex-direction: column;
    align-items: stretch;
  }
}
/* END layout.css */

/* BEGIN components.css */
.icon,
svg.icon {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
  min-width: var(--icon-size-md);
  min-height: var(--icon-size-md);
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
}

.icon--sm,
svg.icon--sm {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  min-width: var(--icon-size-sm);
  min-height: var(--icon-size-sm);
}

.icon--lg,
svg.icon--lg {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  min-width: var(--icon-size-lg);
  min-height: var(--icon-size-lg);
}

.icon-btn,
.side-nav__icon,
.kpi__glyph,
.list__icon,
.insight__icon,
.search__icon,
.ns-search__icon,
.brand__mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 12px; }
.brand__mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand__name { font-size: var(--fs-13); font-weight: 700; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.92); }

.topbar__inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search,
.ns-search { flex: 1 1 auto; max-width: 520px; }
.search__field {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--r-10);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.search__icon,
.ns-search__icon {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  color: var(--muted-2);
}
.search input,
.ns-search input { width: 100%; border: 0; outline: none; background: transparent; box-shadow: none; padding: 0; }
.kbd,
.ns-search__kbd { padding: 2px 7px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted-2); font-size: var(--fs-12); }

.icon-btn,
.ns-iconBtn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-10);
  background: transparent;
  color: var(--muted);
  position: relative;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.icon-btn:hover,
.ns-iconBtn:hover { background: var(--surface); border-color: var(--border); transform: translateY(-1px); }
.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  border: 2px solid rgba(255, 255, 255, 0.95);
}

.user-chip,
.ns-userBtn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-12);
  border: 1px solid transparent;
  background: transparent;
}
.user-chip:hover,
.ns-userBtn:hover { background: var(--surface); border-color: var(--border); }
.avatar,
.ns-userBtn__avatar {
  width: 32px;
  height: 32px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 700;
}
.user-chip__meta,
.ns-userBtn__meta { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.user-chip__name,
.ns-userBtn__meta strong { font-size: var(--fs-13); line-height: 1.1; font-weight: 600; }
.user-chip__role,
.ns-userBtn__meta small { font-size: var(--fs-12); color: var(--muted); }
.ns-flyout {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-float);
}
.ns-userWrap { position: relative; }
.ns-flyout[aria-hidden="true"] { display: none; }
.ns-flyout__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 10px;
}
.ns-flyout__header strong {
  font-size: var(--fs-13);
  font-weight: 700;
}
.ns-flyout__header small {
  color: var(--muted);
  font-size: var(--fs-12);
}
.ns-flyout a,
.ns-flyout button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  background: transparent;
  border-radius: var(--r-10);
  text-align: left;
}
.ns-flyout a:hover,
.ns-flyout button:hover { background: var(--surface-2); }
.ns-flyout--notifications {
  min-width: 420px;
  max-width: 460px;
}
.ns-flyout__item--notification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
}
.ns-flyout__item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ns-flyout__item-title {
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
.ns-flyout__item-meta,
.ns-flyout__item-time,
.ns-flyout__empty,
.ns-flyout__footerLink {
  color: var(--muted);
  font-size: var(--fs-12);
}
.ns-flyout__item-time {
  white-space: nowrap;
}
.ns-flyout__empty {
  padding: 8px 10px 10px;
}
.ns-flyout__footerLink {
  display: block;
  margin-top: 2px;
  padding: 10px;
  font-weight: 700;
}

.admin-main--no-topbar .admin-content,
.admin-main--no-topbar .content,
.admin-main--no-topbar .ns-content {
  min-height: 100vh;
}

.admin-topbar,
.topbar,
.admin-header,
.ns-topbar {
  display: none !important;
}

.admin-main,
.main,
.admin-main--no-topbar {
  min-height: 100vh;
}

.sidebar__inner {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.ns-sidebarTools {
  display: grid;
  gap: 10px;
}

.ns-sidebarTools__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ns-sidebarTools__actionWrap,
.ns-sidebarProfileWrap {
  position: relative;
}

.ns-sidebarTools__action {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(229, 239, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ns-sidebarTools__action:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.ns-sidebarProfile {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(29, 78, 216, 0.1));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 26px rgba(2, 8, 23, 0.2);
  text-align: left;
}

.ns-sidebarProfile:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.ns-sidebarProfile__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.24);
}

.ns-sidebarProfile__meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ns-sidebarProfile__meta strong {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ns-sidebarProfile__meta small {
  color: rgba(229, 239, 255, 0.74);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ns-sidebarProfile__chevron {
  color: rgba(229, 239, 255, 0.72);
}

.ns-sidebarFlyout {
  right: 0;
  left: auto;
}

.ns-sidebarFlyout--floating {
  z-index: 640;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 56px rgba(2, 8, 23, 0.26);
  backdrop-filter: blur(18px);
}

.ns-sidebarFlyout--profile {
  min-width: 240px;
}

.ns-sidebarFlyout__profile {
  padding: 10px 10px 12px;
  display: grid;
  gap: 3px;
}

.ns-sidebarFlyout__profile strong {
  font-size: 14px;
}

.ns-sidebarFlyout__profile small {
  color: var(--muted);
  font-size: 12px;
}

.ns-searchOverlay-open .admin-main,
.ns-searchOverlay-open .sidebar__inner {
  filter: blur(4px);
  transform: scale(0.998);
  transition: filter 180ms ease, transform 180ms ease;
}

.ns-searchOverlay {
  position: fixed;
  inset: 0;
  z-index: 180;
}

.ns-searchOverlay[hidden] {
  display: none;
}

.ns-searchOverlay__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 15, 30, 0.22);
  backdrop-filter: blur(10px);
}

.ns-searchOverlay__dialog {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: clamp(104px, 16vh, 176px) 28px 40px;
}

.ns-searchOverlay__form {
  width: min(920px, calc(100vw - 72px));
  max-width: 100%;
  display: grid;
  gap: 12px;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.ns-searchOverlay.is-open .ns-searchOverlay__form {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ns-searchOverlay__field {
  min-height: 72px;
  padding-inline: 24px;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.ns-searchOverlay__field .search__icon {
  color: var(--primary);
}

.ns-searchOverlay__field input {
  font-size: 20px;
}

.ns-searchOverlay__field input::placeholder {
  color: #94a3b8;
}

.ns-searchOverlay__results {
  position: static;
  top: auto;
  right: auto;
  min-width: 100%;
  max-width: none;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
}

.side-nav,
.command-drawer__nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 143, 185, 0.46) transparent;
}

.side-nav::-webkit-scrollbar,
.command-drawer__nav::-webkit-scrollbar {
  width: 10px;
}

.side-nav::-webkit-scrollbar-track,
.command-drawer__nav::-webkit-scrollbar-track {
  background: transparent;
}

.side-nav::-webkit-scrollbar-thumb,
.command-drawer__nav::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(136, 163, 202, 0.38), rgba(82, 108, 150, 0.58));
  background-clip: padding-box;
}

.side-nav::-webkit-scrollbar-thumb:hover,
.command-drawer__nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(159, 184, 220, 0.54), rgba(99, 126, 168, 0.72));
  background-clip: padding-box;
}

.side-nav,
.command-drawer__nav,
.ns-nav { display: flex; flex-direction: column; gap: 10px; }
.side-nav__group,
.command-drawer__section,
.sidebar-section { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.side-nav__heading,
.command-drawer__title,
.ns-nav__group { margin: 10px 10px 8px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sidebar-muted); }
.side-nav__item,
.command-drawer .ns-navItem,
.ns-navItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-12);
  color: rgba(229, 239, 255, 0.88);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.side-nav__item:hover,
.command-drawer .ns-navItem:hover,
.ns-navItem:hover { background: transparent; }
.side-nav__item.is-active,
.side-nav__item[aria-current="page"],
.command-drawer .ns-navItem.is-active,
.command-drawer .ns-navItem[aria-current="page"],
.ns-navItem.is-active,
.ns-navItem[aria-current="page"] {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.side-nav__icon,
.ns-navItem__icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; }
.side-nav__label,
.ns-navItem__label { min-width: 0; font-weight: 500; }
.side-nav__badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  font-size: var(--fs-11);
  color: rgba(229, 239, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar__footer,
.sidebar-footer,
.admin-sidebar__footer { margin-top: auto; padding-top: 10px; }
.status-card {
  padding: 12px;
  border-radius: var(--r-12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(23, 87, 196, 0.22), rgba(23, 87, 196, 0.12));
}
.status-card__row { display: flex; align-items: center; gap: 8px; }
.status-card__row--muted { margin-top: 6px; color: rgba(229, 239, 255, 0.82); font-size: var(--fs-13); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }

.btn,
.ns-button,
.ns-btn,
button.ns-button,
a.ns-button {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-10);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn:hover,
.ns-button:hover,
.ns-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1); }
.btn--primary,
.ns-btn--primary { color: #fff; border-color: rgba(23, 87, 196, 0.2); background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.btn--secondary,
.ns-btn--secondary { background: var(--surface); }
.btn--ghost,
.ns-btn--ghost { background: var(--surface-2); box-shadow: none; }
.btn--danger,
.ns-btn--danger { color: #fff; border-color: rgba(220, 38, 38, 0.28); background: linear-gradient(90deg, #ef4444, #dc2626); }
.btn--sm,
.ns-btn--sm { min-height: 32px; padding-inline: 10px; font-size: 12.5px; }

.pill,
.badge,
.ns-badge,
.ns-dashboardTrend,
.ns-dashboardStatusBadge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 700;
  white-space: nowrap;
}
.pill--info,
.badge--info,
.ns-badge--info { color: #1d4ed8; border-color: rgba(37, 99, 235, 0.15); background: rgba(37, 99, 235, 0.1); }
.pill--warn,
.badge--warn,
.ns-badge--warning { color: var(--warning); border-color: rgba(239, 111, 15, 0.16); background: rgba(239, 111, 15, 0.12); }
.badge--success,
.ns-badge--success,
.ns-dashboardTrend--up,
.ns-dashboardStatusBadge--ok { color: #15803d; border-color: rgba(22, 163, 74, 0.16); background: rgba(22, 163, 74, 0.12); }
.badge--danger,
.ns-badge--danger,
.ns-dashboardStatusBadge--down { color: #b91c1c; border-color: rgba(220, 38, 38, 0.18); background: rgba(220, 38, 38, 0.1); }
.badge--muted,
.ns-badge--muted,
.ns-dashboardTrend--flat { color: #475569; }

.card,
.panel,
.ns-section,
.ns-card,
.ns-mailSurface,
.operator-detail,
.operator-modal-panel,
.operator-drawer-panel,
.drawer-panel,
.devmode-modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  box-shadow: var(--shadow-card);
}
.panel,
.ns-section,
.ns-card { overflow: hidden; }
.panel__header,
.ns-sectionHeader,
.panel-header,
.ns-card__head,
.drawer-header,
.operator-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}
.panel__body,
.ns-section__body,
.panel-body,
.ns-section__content { padding: 10px 16px 16px; }
.ns-section__footer,
.panel__footer { padding: 12px 16px 16px; border-top: 1px solid var(--border-2); color: var(--muted); font-size: var(--fs-13); }
.panel__title,
.ns-sectionHeader__title,
.section-title h2,
.section-title h3,
.operator-title,
.drawer-title { margin: 0; font-size: var(--fs-16); line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.ns-sectionHeader__subtitle,
.section-title p,
.operator-subtitle,
.drawer-header .ns-text--muted { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.ns-sectionDivider,
.ns-divider,
.panel-divider { height: 1px; background: var(--border-2); border: 0; }

.grid,
.ns-splitLayout,
.grid.two,
.two-col,
.ns-dashboardLayout,
.ns-mailWorkspace,
.ns-mailSettingsColumns,
.ns-mailSettingsGrid,
.operator-hub,
.devmode-grid { display: grid; gap: 16px; }
.grid.two,
.two-col,
.ns-splitLayout { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.form,
.ns-form,
.filter-bar,
.datagrid-toolbar,
.operator-options-body { display: grid; gap: 16px; }
.form-row,
.action-row,
.operator-modal-actions,
.operator-detail-actions,
.devmode-actions,
.ns-account-avatar-actions,
.detail-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-group,
.ns-formGroup,
.ns-mailSettingsField,
.search-input,
.search-field { display: grid; gap: 8px; min-width: 0; }
.form-group label,
.ns-formGroup label,
.ns-label { font-size: var(--fs-13); font-weight: 600; color: var(--text-soft); }

.input,
.select,
.textarea,
.ns-input,
.ns-select,
.ns-textarea,
.ns-inputField,
.ns-selectField,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r-10);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
textarea,
.textarea,
.ns-textarea { min-height: 110px; padding-block: 12px; resize: vertical; }
input[type="file"] {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--r-10);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
}
input[type="checkbox"],
input[type="radio"] { accent-color: var(--primary); }
.form-hint,
.ns-text--muted,
.empty-note { font-size: 12.5px; color: var(--muted); }

:is(.btn,.ns-button,.ns-btn,.icon-btn,.ns-iconBtn,.user-chip,.ns-userBtn,.side-nav__item,.ns-navItem,.ns-input,.ns-select,.ns-textarea,input,select,textarea):focus-visible {
  outline: none;
  border-color: rgba(23, 87, 196, 0.35);
  box-shadow: var(--focus-ring);
}

.kpis,
.ns-inlineStatRow,
.ns-dashboardKpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi,
.ns-inlineStat,
.ns-dashboardKpi,
.ns-dashboardCard,
.ns-chartPanel,
.ns-dashboardStatusNotice,
.ns-dashboardEmptyState,
.ns-actionRow,
.ns-dataRow,
.ns-dashboardNotice,
.ns-dashboardAction,
.ns-dashboardMetric,
.ns-dashboardFeedItem,
.ns-dashboardActionCard {
  position: relative;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.kpi,
.ns-inlineStat,
.ns-dashboardKpi { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kpi__label,
.ns-inlineStat__label { margin: 0 0 6px; font-size: var(--fs-11); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kpi__value,
.ns-inlineStat__value,
.ns-dashboardKpi__value,
.donut__value { margin: 0; font-size: var(--fs-28); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.kpi__delta,
.ns-inlineStat__meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-13); }

.table-wrap,
.ns-tableWrap,
.datagrid-container,
.users-table-wrap { border: 1px solid var(--border); border-radius: var(--r-12); background: var(--surface); overflow: auto; }
.ns-dataTable,
table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ns-dataTable th,
.ns-dataTable td,
table th,
table td { padding: 14px 16px; text-align: left; vertical-align: top; }
.ns-dataTable thead th,
table thead th { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ns-dataTable tbody td,
table tbody td { border-bottom: 1px solid var(--border-2); }
.ns-table--striped tbody tr:nth-child(even) td { background: rgba(23, 87, 196, 0.02); }
.ns-table--hover tbody tr:hover td,
table tbody tr:hover td { background: rgba(23, 87, 196, 0.04); }

.list,
.ns-dataList,
.ns-dashboardFeed,
.ns-dashboardActionStack,
.insights { display: grid; gap: 12px; }
.list__item,
.ns-listRow,
.insight,
.ns-actionRow,
.ns-dataRow,
.ns-mailMessageRow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-12);
  background: var(--surface);
}
.list__title,
.insight__title,
.ns-dataRow__headline,
.ns-actionRow__title,
.operator-module-title,
.plugin-title-lg,
.empty-title { font-size: var(--fs-14); line-height: 1.35; font-weight: 800; color: var(--text); }
.list__meta,
.insight__meta,
.ns-dataRow__support,
.ns-actionRow__description,
.ns-actionRow__detail,
.operator-module-summary { margin-top: 2px; font-size: 12.5px; color: var(--muted); }

.quick,
.ns-dashboardToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.quick__actions,
.ns-dashboardToolbar__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quick__title { margin: 0; font-size: var(--fs-14); font-weight: 900; }
.pill-btn {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
}
.pill-btn--ai { color: #fff; background: linear-gradient(90deg, var(--primary), var(--purple)); border-color: rgba(23, 87, 196, 0.22); }

.notice,
.alert,
.ns-mailNotice,
.ns-mailSettingsFeedback {
  padding: 12px 14px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
}
.ns-state--success { color: #166534; border-color: rgba(22, 163, 74, 0.15); background: rgba(22, 163, 74, 0.08); }
.ns-state--warning { color: #9a3412; border-color: rgba(239, 111, 15, 0.16); background: rgba(239, 111, 15, 0.08); }
.ns-state--danger { color: #991b1b; border-color: rgba(220, 38, 38, 0.16); background: rgba(220, 38, 38, 0.08); }

.empty-state,
.ns-dashboardEmptyState,
.ns-mailEmptyState {
  padding: 24px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-14);
  background: var(--surface-2);
  color: var(--muted);
}
.empty-state.subtle { justify-items: start; text-align: left; }

.drawer,
.operator-modal,
.operator-drawer,
.devmode-modal,
.lightbox { position: fixed; inset: 0; z-index: 1300; display: none; }
.operator-modal[aria-hidden="false"],
.devmode-modal[aria-hidden="false"],
.lightbox[aria-hidden="false"] { display: block; }
.drawer[aria-hidden="false"],
.operator-drawer[aria-hidden="false"] {
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
.drawer-backdrop,
.operator-modal-backdrop,
.operator-drawer-backdrop,
.devmode-modal-backdrop,
.lightbox::before { content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); }
.drawer-panel,
.operator-modal-panel,
.devmode-modal-panel {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
}
.operator-drawer-panel,
.drawer-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 0 auto;
  overflow: auto;
  border-radius: 18px;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.18s ease;
}
.drawer[aria-hidden="false"] .drawer-panel,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ns-codeBlock,
pre {
  overflow: auto;
  padding: 14px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
}

@media (max-width: 1200px) {
  .kpis,
  .ns-inlineStatRow,
  .ns-dashboardKpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .grid.two,
  .two-col,
  .ns-splitLayout,
  .ns-mailWorkspace,
  .ns-mailSettingsColumns,
  .ns-mailSettingsGrid,
  .operator-hub,
  .devmode-grid { grid-template-columns: 1fr; }
  .user-chip__meta,
  .ns-userBtn__meta,
  .kbd,
  .ns-search__kbd { display: none; }
}

@media (max-width: 760px) {
  .kpis,
  .ns-inlineStatRow,
  .ns-dashboardKpis,
  .form-row { grid-template-columns: 1fr; }
  .quick,
  .ns-dashboardToolbar,
  .quick__actions { flex-direction: column; align-items: stretch; }
  .list__item,
  .ns-listRow,
  .insight,
  .ns-actionRow,
  .ns-dataRow { grid-template-columns: 1fr; align-items: flex-start; }
  .tenant-tableControls {
    flex-wrap: wrap;
  }
  .tenant-tableControls__search,
  .tenant-filterWrap {
    width: 100%;
    flex-basis: 100%;
  }
  .tenant-filterToggle {
    width: 100%;
  }
  .tenant-table-card .ns-metaList__value {
    white-space: normal;
    text-align: left;
  }
}

.ns-page-body,
.page-body,
.ns-primary {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ns-page-body.has-info {
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  align-items: start;
}

.ns-page-body.no-rail,
.ns-page-body .ns-primary,
.page-body .ns-primary {
  grid-template-columns: minmax(0, 1fr);
}

.ns-page-header,
.page-header {
  margin-bottom: 2px;
}

.ns-sectionHeader__copy,
.section-title {
  min-width: 0;
}

.ns-sectionHeader__eyebrow,
.ns-dashboardToolbar__eyebrow,
.ns-dashboardCustomizer__sectionEyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ns-sectionHeader__actions,
.ns-dashboardToolbar__actions,
.ns-dashboardCustomizer__sectionActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ns-section__body,
.panel__body {
  display: grid;
  gap: 16px;
}

.form-section,
.panel-subsection,
.action-section,
.filter-bar,
.datagrid-toolbar,
.users-toolbar {
  display: grid;
  gap: 14px;
}

.filter-bar,
.datagrid-toolbar,
.users-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.tenant-tableControls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tenant-tableControls__search {
  flex: 1 1 340px;
}

.tenant-filterWrap {
  position: relative;
  flex: 0 0 auto;
}

.tenant-filterToggle {
  min-width: 112px;
}

.tenant-filterMenu {
  width: min(320px, calc(100vw - 48px));
  padding: 0;
}

.tenant-filterMenu__header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-2);
}

.tenant-filterMenu__header strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 800;
}

.tenant-filterMenu__header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.45;
}

.tenant-filterMenu__body {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
}

.tenant-filterMenu__field {
  display: grid;
  gap: 8px;
}

.tenant-filterMenu__field label {
  color: var(--text-soft);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tenant-table-card .ns-metaList__value {
  white-space: nowrap;
}

.search-input,
.users-search-input {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input .ns-input,
.users-search-input .ns-input {
  padding-left: 38px;
}

.ns-toggleGroup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.toggle-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-10);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-13);
  font-weight: 700;
}

.toggle-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-option:has(input:checked) {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.inline-form,
.action-inline,
.table-actions,
.permission-inline,
.ns-linkStack {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-actions {
  justify-content: flex-end;
}

.ns-dashboardLayout {
  display: grid;
  gap: 16px;
}

.ns-dashboardToolbar {
  align-items: start;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.ns-dashboardToolbar__copy,
.ns-dashboardCustomizer__sectionCopy {
  min-width: 0;
}

.ns-dashboardToolbar__text,
.ns-dashboardCustomizer__sectionText,
.ns-dashboardCustomizer__notice,
.ns-dashboardPrefsModal__summary {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.ns-dashboardStatusNotice {
  padding: 14px 16px;
  border-radius: var(--r-14);
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.04));
}

.ns-dashboardStatusNotice--warning {
  border-color: rgba(239, 111, 15, 0.18);
  background: linear-gradient(180deg, rgba(239, 111, 15, 0.09), rgba(239, 111, 15, 0.04));
}

.ns-dashboardStatusNotice__title {
  font-size: var(--fs-14);
  font-weight: 800;
}

.ns-dashboardStatusNotice__message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.ns-inlineStatRow {
  align-items: stretch;
}

.ns-inlineStat {
  overflow: hidden;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  min-height: 124px;
}

.ns-inlineStat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--primary);
}

.ns-inlineStat--ok::before,
.ns-inlineStat--success::before,
.ns-inlineStat--positive::before,
.ns-inlineStat--green::before { background: var(--success); }

.ns-inlineStat--warning::before,
.ns-inlineStat--warn::before,
.ns-inlineStat--orange::before { background: var(--orange); }

.ns-inlineStat--info::before,
.ns-inlineStat--blue::before { background: var(--primary); }

.ns-inlineStat--purple::before { background: var(--purple); }

.ns-inlineStat--teal::before { background: var(--teal); }

.ns-inlineStat__meta {
  flex-wrap: wrap;
}

.ns-inlineStat__value--small {
  font-size: var(--fs-20);
}

.ns-dashboardTrend {
  margin-left: auto;
}

.ns-actionRows,
.ns-dataList,
.ns-groupedDataList,
.ns-insightStack {
  display: grid;
  gap: 12px;
}

.ns-groupedDataList__group {
  display: grid;
  gap: 10px;
}

.ns-groupedDataList__header,
.ns-dataList__title {
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ns-dataRow,
.ns-actionRow {
  min-height: 78px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

a.ns-dataRow:hover,
a.ns-listRow:hover,
.ns-actionRow:hover {
  border-color: rgba(23, 87, 196, 0.18);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.ns-dataRow__indicator,
.ns-listRow__indicator {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.ns-dataRow__indicator--dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.ns-dataRow__content,
.ns-actionRow__copy {
  min-width: 0;
}

.ns-dataRow__support,
.ns-actionRow__titleLine,
.ns-actionRow__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ns-dataRow__support {
  color: var(--muted);
}

.ns-dataRow__meta,
.ns-actionRow__status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: var(--fs-12);
  font-weight: 700;
  white-space: nowrap;
}

.ns-dataRow--alert .ns-dataRow__indicator,
.ns-actionRow--danger .ns-dataRow__indicator,
.ns-dataRow--danger .ns-dataRow__indicator {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.16);
  color: #b91c1c;
}

.ns-dataRow--warning .ns-dataRow__indicator,
.ns-actionRow--warning .ns-dataRow__indicator,
.ns-dataRow--warn .ns-dataRow__indicator {
  background: rgba(239, 111, 15, 0.08);
  border-color: rgba(239, 111, 15, 0.16);
  color: var(--warning);
}

.ns-dataRow--ok .ns-dataRow__indicator,
.ns-dataRow--success .ns-dataRow__indicator,
.ns-dataRow--module .ns-dataRow__indicator {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.16);
  color: #15803d;
}

.ns-actionRow {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 16px;
}

.ns-actionRow__title {
  margin: 0;
}

.ns-actionRow__description,
.ns-actionRow__detail,
.ns-actionRow__hint {
  margin: 0;
}

.ns-actionRow__hint {
  color: var(--warning);
  font-size: 12.5px;
  font-weight: 700;
}

.ns-chartSection {
  display: grid;
  gap: 16px;
}

.ns-chartSection__toolbar {
  display: flex;
  justify-content: flex-end;
}

.ns-dashboardRangeSelector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-12);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.ns-dashboardRangeSelector__option {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.ns-dashboardRangeSelector__option.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.ns-chartGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ns-chartPanel {
  display: grid;
  gap: 14px;
  min-height: 280px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1)),
    var(--surface);
}

.ns-chartPanel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.ns-chartPanel__copy h3,
.ns-chartPanel__metric {
  margin: 0;
}

.ns-chartPanel__copy h3 {
  font-size: var(--fs-16);
  font-weight: 800;
}

.ns-chartPanel__copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.ns-chartPanel__metric {
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ns-chartPanel__body {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.ns-chartPanel__body svg {
  width: 100%;
  height: 170px;
  overflow: visible;
}

.ns-chartPanel__grid {
  stroke: #e8edf4;
  stroke-width: 1;
}

.ns-chartPanel__area {
  fill: rgba(23, 87, 196, 0.12);
}

.ns-chartPanel__line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ns-chartPanel__point {
  fill: var(--primary);
  stroke: #fff;
  stroke-width: 2;
}

.ns-chartPanel--warning .ns-chartPanel__area { fill: rgba(239, 111, 15, 0.12); }
.ns-chartPanel--warning .ns-chartPanel__line,
.ns-chartPanel--warning .ns-chartPanel__point { stroke: var(--orange); fill: var(--orange); }

.ns-chartPanel--success .ns-chartPanel__area { fill: rgba(22, 163, 74, 0.12); }
.ns-chartPanel--success .ns-chartPanel__line,
.ns-chartPanel--success .ns-chartPanel__point { stroke: var(--success); fill: var(--success); }

.ns-chartPanel__axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 600;
}

.ns-tableWrap,
.table-wrap,
.datagrid-container,
.users-table-wrap {
  border-radius: var(--r-14);
  box-shadow: var(--shadow-card);
}

.table-wrap.is-scroll,
.users-table-wrap {
  overflow: hidden;
}

.table-viewport {
  overflow: auto;
}

.audit-page .audit-frame,
.audit-page [data-ui-section="audit-table"],
.audit-page .panel-body,
.audit-page .datagrid-container,
.audit-page .audit-table,
.audit-page .audit-table-grid {
  min-height: 0;
}

.audit-page .audit-toolbar {
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
}

.audit-page .audit-toolbar__search {
  width: 100%;
  max-width: 460px;
  min-width: 0;
}

.audit-page .audit-toolbar__search .search__field {
  height: 40px;
}

.audit-page .audit-toolbar__search input {
  min-height: 0;
  padding: 0;
}

.audit-page .audit-toolbar .ns-select {
  min-width: 170px;
}

.audit-page .table-viewport,
.audit-page .ns-adminDatagrid__viewport {
  height: min(62vh, 760px);
  max-height: min(62vh, 760px);
  overflow: auto;
}

.audit-page .table-visible,
.audit-page .ns-adminDatagrid__tableWrap {
  min-height: 100%;
}

.audit-page .ns-dataTable thead th {
  white-space: nowrap;
}

.audit-page .ns-dataTable tbody td {
  vertical-align: middle;
}

.audit-row__action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audit-row__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.audit-row__icon .icon {
  width: 16px;
  height: 16px;
}

.audit-row__icon--success {
  color: var(--success);
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.18);
}

.audit-row__icon--failed {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.18);
}

.audit-row__link {
  font-weight: 700;
  color: var(--text);
}

.audit-row__link:hover {
  color: var(--primary);
}

.audit-page .datagrid-pagination,
.audit-page .table-load-more {
  padding-top: 12px;
}

.ns-dataTable,
table {
  background: var(--surface);
}

.ns-dataTable tbody tr:last-child td,
table tbody tr:last-child td {
  border-bottom: 0;
}

.users-table .user-col,
.users-table .role-col,
.users-table .status-col {
  vertical-align: middle;
}

.users-page .users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.users-page .users-indexSection > .ns-section__body {
  padding-top: 14px;
}

.users-page .users-toolbar--inline {
  margin-bottom: 14px;
}

.users-page .users-indexShell {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.users-page .users-search-input {
  flex: 1 1 auto;
  max-width: 420px;
}

.users-page .users-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.06);
  flex: 1 1 auto;
  padding: 0;
}

.users-page .users-table-container {
  min-height: 0;
  height: 100%;
}

.users-page .users-table-wrapper {
  height: 100%;
}

.users-page .users-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
}

.users-page .users-table thead {
  background: transparent;
}

.users-page #users-pagination-meta,
.users-page #users-incremental-status,
.users-page .ns-adminDatagrid__status,
.users-page .ns-adminDatagrid__loading {
  display: none !important;
}

.users-page .users-table thead th {
  padding-top: 20px;
  padding-bottom: 20px;
  vertical-align: middle;
}

.users-page .users-table tbody td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.user-rowLink {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.user-rowLink:hover .user-identity__title,
.user-rowLink:focus-visible .user-identity__title {
  color: var(--primary);
}

.user-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b8def, #2458d3);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.user-avatar--lg {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  font-size: 17px;
}

.user-identity__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-identity__title {
  font-weight: 800;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  word-break: break-word;
}

.user-identity__meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.users-page .status-col .ns-badge,
.users-page .role-col .ns-badge {
  white-space: nowrap;
}

.users-page .users-tableHeaderCell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.users-page .users-tableHeaderCell__label {
  display: block;
  flex: 0 0 auto;
}

.users-page .users-toolbarMount {
  display: none;
}

.users-page .users-tableHeaderCell .users-toolbar {
  display: block;
  margin: 0;
  flex: 1 1 auto;
}

.users-page .users-tableHeaderCell .users-search-input {
  margin-left: auto;
  max-width: 360px;
}

.users-page .users-tableHeaderCell .users-search-input .ns-inputField,
.users-page .users-tableHeaderCell .users-search-input .ns-input {
  min-height: 42px;
}

.users-page .users-emptyState {
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.06);
}

.users-page .ns-users-page {
  display: grid;
  gap: 10px;
  padding: 16px 20px 20px;
}

.users-page .ns-users-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 4px;
}

.users-page .ns-users-header-left {
  min-width: 0;
}

.users-page .ns-users-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.users-page .ns-users-header p {
  margin: 0;
  font-size: 12px;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-page .ns-users-header-cta {
  min-width: 132px;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  white-space: nowrap;
}

.users-page .ns-users-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--ns-border-subtle, var(--border));
}

.users-page .ns-users-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-right: 16px;
  margin-right: 0;
  border-right: 1px solid var(--ns-border-subtle, var(--border));
}

.users-page .ns-users-stat:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.users-page .ns-users-stat span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.users-page .ns-users-stat-meta {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-stat--subtle strong {
  font-weight: 600;
  color: var(--text-soft);
}

.users-page .ns-users-body {
  margin-top: 10px;
}

.users-page .ns-users-grid {
  display: block;
}

.users-page .ns-users-form,
.users-page .ns-users-table {
  min-width: 0;
  border: 1px solid var(--ns-border-subtle, var(--border));
  border-radius: 6px;
  background: var(--ns-surface-1, var(--surface));
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.users-page .ns-users-form {
  padding: 14px;
  max-height: fit-content;
}

.users-page .ns-users-table {
  width: 100%;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.users-page .ns-users-form:hover,
.users-page .ns-users-table:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transform: none;
}

.users-page .ns-users-form .ns-section {
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.users-page .ns-users-form .ns-sectionHeader {
  padding: 0;
}

.users-page .ns-users-form .ns-sectionHeader__title {
  font-size: 15px;
  font-weight: 700;
}

.users-page .ns-users-form .ns-sectionHeader__subtitle {
  margin-top: 0;
  margin-bottom: 4px;
  max-width: 34ch;
  font-size: 12px;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-form .ns-section__body {
  padding: 8px 0 0;
  gap: 10px;
}

.users-page .ns-users-form .form-group {
  margin-bottom: 0;
}

.users-page .ns-users-form p {
  font-size: 12px;
  margin-top: 0;
  margin-bottom: 4px;
}

.users-page .ns-users-section {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ns-border-subtle, var(--border));
}

.users-page .ns-users-section:first-child {
  padding-top: 0;
}

.users-page .ns-users-section--last {
  border-bottom: 0;
  padding-bottom: 0;
}

.users-page .ns-users-section-head {
  display: grid;
  gap: 2px;
}

.users-page .ns-users-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.users-page .ns-users-section-note {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-nameRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.users-page .ns-users-form input:not([type="radio"]):not([type="checkbox"]),
.users-page .ns-users-form select {
  height: 34px;
  padding: 0 10px;
}

.users-page .ns-users-segmented {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding: 2px;
  border-radius: 6px;
  background: var(--ns-surface-2, var(--surface-2));
}

.users-page .ns-users-segmented__option {
  position: relative;
  flex: 1 1 0;
  margin: 0;
  cursor: pointer;
}

.users-page .ns-users-segmented__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.users-page .ns-users-segmented__button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 4px;
  color: var(--muted);
  font-size: var(--fs-13);
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.users-page .ns-users-segmented__option input:checked + .ns-users-segmented__button {
  background: var(--ns-surface-1, var(--surface));
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.users-page .ns-users-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 4px;
}

.users-page .ns-users-submit .ns-button,
.users-page .ns-users-submit .ns-btn {
  min-width: 140px;
}

.users-page .ns-users-table .users-indexShell {
  display: grid;
  gap: 0;
}

.users-page .ns-users-table-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ns-border-subtle, var(--border));
}

.users-page .ns-users-table-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.users-page .ns-users-table-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.users-page .ns-users-table-title p {
  margin: 0;
  font-size: 13px;
  color: var(--ns-text-muted, var(--muted));
}

.users-page .ns-users-table-controls {
  flex: 0 1 360px;
  min-width: 260px;
}

.users-page .ns-users-table-search {
  margin: 0;
}

.users-page .ns-users-table-search.users-toolbar--inline {
  margin-bottom: 0;
}

.users-page .ns-users-table-search {
  flex: 1 1 auto;
  margin: 0;
}

.users-page .ns-users-table-search .users-search-input {
  max-width: none;
}

.users-page .ns-users-table-search .ns-inputField,
.users-page .ns-users-table-search .ns-input {
  min-height: 36px;
}

.users-page .ns-users-table .users-table-wrap {
  margin-top: 0;
  border-color: var(--ns-border-subtle, var(--border));
  background: transparent;
  box-shadow: none;
}

.users-page .ns-users-table .users-table thead th {
  padding-top: 14px;
  padding-bottom: 14px;
}

.users-page .ns-users-table .users-table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.users-page .ns-users-table tbody tr {
  transition: background 0.15s ease;
}

.users-page .ns-users-table tbody tr td:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.users-page .ns-users-table tbody tr td:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.users-page .ns-users-table tbody tr:hover td {
  background: var(--ns-surface-2, var(--surface-2));
}

.users-page .ns-users-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.users-page .ns-users-drawer.open {
  display: grid;
  place-items: center;
  padding: 16px;
}

.users-page .ns-users-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.users-page .ns-users-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--ns-surface-1, var(--surface));
  border: 1px solid var(--ns-border-subtle, var(--border));
  border-radius: 20px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.22);
  padding: 16px;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.18s ease;
}

.users-page .ns-users-drawer.open .ns-users-drawer-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.users-page .ns-users-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.users-page .ns-users-drawer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.users-page .ns-users-drawer-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ns-border-subtle, var(--border));
  border-radius: 6px;
  background: var(--ns-surface-1, var(--surface));
  color: var(--text);
  cursor: pointer;
}

.users-page .ns-users-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.users-page .ns-users-drawer #ns-users-create-panel,
.users-page .ns-users-drawer .ns-users-form {
  height: 100%;
}

.users-page .ns-users-drawer .ns-users-form {
  padding: 0;
  max-height: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.users-page .ns-users-drawer .ns-users-form:hover {
  box-shadow: none;
}

.users-page .ns-users-drawer .ns-users-form .ns-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.users-page .ns-users-drawer .ns-users-form .ns-section__body {
  padding-bottom: 0;
}

.users-page .ns-users-page * {
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (max-width: 1200px) {
  .users-page .ns-users-header {
    align-items: stretch;
    flex-direction: column;
  }

  .users-page .ns-users-header-actions {
    width: 100%;
  }

  .users-page .ns-users-header-cta {
    width: 100%;
    justify-content: center;
  }

}

@media (max-width: 760px) {
  .users-page .ns-users-page {
    padding: 12px 14px;
  }

  .users-page .ns-users-stats {
    gap: 12px 16px;
    padding-bottom: 10px;
  }

  .users-page .ns-users-stat {
    min-width: calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
    padding-right: 0;
    border-right: 0;
  }

  .users-page .ns-users-form .ns-sectionHeader,
  .users-page .ns-users-form .ns-section__body,
  .users-page .ns-users-table {
    padding-left: 16px;
    padding-right: 16px;
  }

  .users-page .ns-users-nameRow {
    grid-template-columns: 1fr;
  }

  .users-page .ns-users-table-header {
    align-items: stretch;
    flex-direction: column;
  }

  .users-page .ns-users-table-controls,
  .users-page .ns-users-table-search {
    width: 100%;
    flex-basis: auto;
    min-width: 0;
  }

  .users-page .ns-users-drawer.open {
    padding: 12px;
  }

  .users-page .ns-users-drawer-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    padding: 14px;
  }
}

.users-focusPanel {
  display: grid;
  gap: 18px;
}

.users-focusSummary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: linear-gradient(180deg, rgba(36, 88, 211, 0.05), rgba(36, 88, 211, 0.02));
}

.users-focusSummary__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.users-focusSummary__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.users-focusSummary__meta {
  margin-top: 4px;
  color: var(--muted);
}

.users-focusGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.users-focusSection {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.users-focusSection__title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.users-focusDisclosure {
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  background: #f8fafc;
  margin-bottom: 14px;
}

.users-focusDisclosure summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text);
}

.users-focusDisclosure summary::-webkit-details-marker {
  display: none;
}

.users-focusDisclosure[open] summary {
  border-bottom: 1px solid var(--border);
}

.users-focusDisclosure--permissions .permission-grid,
.permission-preview--compact .permission-preview__list {
  max-height: 240px;
  overflow: auto;
  padding: 12px 14px 14px;
}

.permission-preview--compact .permission-preview__list {
  display: grid;
  gap: 10px;
}

.users-focusSection .permission-option {
  padding: 10px 0;
}

.users-focusActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .users-focusGrid {
    grid-template-columns: 1fr;
  }
}

.users-focusModal {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.users-focusModal__backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.users-focusModal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 17, 33, 0.44);
  backdrop-filter: blur(10px);
}

.users-focusModal__dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.24);
}

.users-focusModal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.users-focusModal__title {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  color: var(--text);
}

.users-focusModal__subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.users-focusModal__body {
  padding: 24px;
}

.users-focusModal .users-focusSummary {
  padding: 18px 20px;
}

@media (max-width: 900px) {
  .users-focusModal__backdrop {
    padding: 14px;
  }

  .users-focusModal__dialog {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
  }

  .users-focusModal__header,
  .users-focusModal__body {
    padding: 18px;
  }
}

.ns-dataTable tbody td:first-child,
table tbody td:first-child {
  font-weight: 600;
  color: var(--text-soft);
}

.datagrid-pagination,
.table-load-more,
.permission-hint {
  color: var(--muted);
  font-size: 12.5px;
}

.table-load-more,
.datagrid-pagination {
  min-height: 1px;
}

.table-load-more > .ns-button,
.datagrid-pagination > .ns-button {
  display: none !important;
}

.table-load-more__sentinel {
  width: 100%;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.empty-state.centered,
.empty-state-wrapper,
.empty-callout,
.empty-state-card {
  justify-items: center;
  text-align: center;
}

.empty-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  opacity: 0.9;
}

.empty-title,
.ns-dashboardEmptyState__title {
  font-size: var(--fs-16);
  font-weight: 800;
  color: var(--text);
}

.empty-note,
.ns-dashboardEmptyState__message {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 12.5px;
}

.action-panel {
  position: relative;
}

.action-panel > summary {
  list-style: none;
  cursor: pointer;
}

.action-panel > summary::-webkit-details-marker {
  display: none;
}

.action-panel[open] {
  padding: 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.action-panel[open] > summary {
  margin-bottom: 12px;
}

.ns-account-avatar-section {
  display: grid;
  gap: 16px;
}

.ns-account-avatar-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(23, 87, 196, 0.05), rgba(23, 87, 196, 0.02));
}

.ns-account-avatar {
  width: 84px;
  height: 84px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(23, 87, 196, 0.2);
}

.ns-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ns-account-avatar-heading {
  font-size: var(--fs-14);
  font-weight: 800;
  color: var(--text);
}

.ns-account-avatar-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.ns-account-avatar-upload,
.ns-account-avatar-actions {
  display: grid;
  gap: 12px;
}

.ns-dashboardActionModal__body,
.ns-dashboardPrefsModal__body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.ns-dashboardActionModal__notice {
  padding: 12px 14px;
  border-radius: var(--r-12);
  border: 1px solid rgba(37, 99, 235, 0.15);
  background: rgba(37, 99, 235, 0.07);
  color: var(--text-soft);
}

.ns-dashboardActionModal__message {
  margin: 0;
  color: var(--text-soft);
}

.ns-dashboardWidgetHandle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}

.ns-dashboardWidgetHandle svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1200px) {
  .ns-chartGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .ns-page-body.has-info {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .datagrid-toolbar,
  .users-toolbar,
  .ns-actionRow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ns-searchOverlay__dialog {
    padding: 16px;
    align-items: start;
  }

  .ns-searchOverlay__shell {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
  }

  .ns-searchOverlay__title {
    font-size: 22px;
  }

  .ns-searchOverlay__field {
    min-height: 56px;
  }

  .ns-searchOverlay__field input {
    font-size: 16px;
  }

  .ns-sidebarProfile {
    padding: 10px;
  }

  .ns-account-avatar-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .table-actions,
  .inline-form,
  .action-inline,
  .permission-inline {
    justify-content: flex-start;
  }
}

.brand__mark svg,
.brand__icon {
  width: 34px;
  height: 34px;
}

.topbar {
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--border-2);
  backdrop-filter: blur(10px);
}

.page-head {
  margin: 2px 0 2px;
}

.ns-dashboardView,
.ns-dashboardPage {
  display: grid;
  gap: 16px;
}

.ns-dashboardPage[data-dashboard-init="pending"] {
  visibility: hidden;
}

.ns-dashboardPanel {
  overflow: hidden;
}

.ns-dashboardLastUpdated,
.ns-dashboardPanel__updated {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.ns-dashboardLastUpdated {
  min-height: 20px;
}

.ns-dashboardLastUpdated.is-stale,
.ns-dashboardPanel__updated.is-stale {
  color: #b45309;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.kpi {
  position: relative;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
}

.ns-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--primary);
}

.ns-kpi-card--blue::before { background: var(--primary); }
.ns-kpi-card--teal::before { background: var(--teal); }
.ns-kpi-card--purple::before { background: var(--purple); }
.ns-kpi-card--orange::before { background: var(--orange); }

.ns-kpi-card--interactive {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.ns-kpi-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.12);
}

.ns-kpi-card--interactive:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 16px 34px rgba(16, 24, 40, 0.12);
}

.kpi__body {
  min-width: 0;
}

.kpi__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi__value {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-28);
  font-weight: 800;
  letter-spacing: -.02em;
}

.kpi__delta {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--fs-13);
}

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

.delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.delta--up { color: var(--success); }
.delta--down { color: #dc2626; }
.delta--flat { color: var(--muted); }

.delta__icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(22, 163, 74, 0.18);
  background: rgba(22, 163, 74, 0.12);
  font-size: 12px;
  line-height: 0;
}

.delta--down .delta__icon {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.12);
}

.dashboard-issues-list {
  display: grid;
  gap: 12px;
}

.dashboard-issues-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  background: var(--surface);
}

.dashboard-issues-item__title {
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-issues-item__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.dashboard-issues-item__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.dashboard-issues-item__link:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.delta--flat .delta__icon {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.12);
}

.kpi__glyph {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.kpi__glyph--blue {
  background: rgba(23, 87, 196, .10);
  color: var(--primary);
  border-color: rgba(23, 87, 196, .15);
}

.kpi__glyph--teal {
  background: rgba(12, 139, 175, .10);
  color: var(--teal);
  border-color: rgba(12, 139, 175, .15);
}

.kpi__glyph--purple {
  background: rgba(144, 93, 205, .12);
  color: var(--purple);
  border-color: rgba(144, 93, 205, .16);
}

.kpi__glyph--orange {
  background: rgba(239, 111, 15, .12);
  color: var(--orange);
  border-color: rgba(239, 111, 15, .16);
}

.grid--upper {
  grid-template-columns: 2fr 1fr;
  margin: 0;
  align-items: stretch;
}

.grid--upper > [data-dashboard-modules] {
  display: flex;
  min-width: 0;
}

.grid--upper > .ns-dashboardPanel,
.grid--upper > [data-dashboard-modules] {
  height: 520px;
}

.grid--upper > [data-dashboard-modules] > .ns-dashboardPanel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid--upper > .ns-dashboardPanel {
  display: flex;
  flex-direction: column;
}

.grid--upper > .ns-dashboardPanel .panel__body,
.grid--upper > [data-dashboard-modules] > .ns-dashboardPanel .panel__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.grid--upper > .ns-dashboardPanel .chart,
.grid--upper > [data-dashboard-modules] > .ns-dashboardPanel .overview {
  flex: 1 1 auto;
}

.grid--upper > [data-dashboard-modules] > .ns-dashboardPanel .overview {
  align-content: start;
}

.grid--lower {
  grid-template-columns: 2fr 1.25fr;
  margin: 0;
  align-items: start;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 16px;
  margin-top: 16px;
  grid-template-areas:
    "activity alerts"
    "attention jobs"
    "quick quick";
}

.dashboard-lower__panel,
.dashboard-lower__quick {
  min-width: 0;
}

.dashboard-lower__panel {
  display: flex;
}

.dashboard-lower__panel > .ns-dashboardPanel,
.dashboard-lower__quick {
  margin: 0;
}

.dashboard-lower__panel > .ns-dashboardPanel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-lower__panel > .ns-dashboardPanel .panel__body {
  flex: 1 1 auto;
  align-content: start;
}

.dashboard-lower__panel--activity { grid-area: activity; }
.dashboard-lower__panel--alerts { grid-area: alerts; }
.dashboard-lower__panel--attention { grid-area: attention; }
.dashboard-lower__panel--jobs { grid-area: jobs; }
.dashboard-lower__panel--quick,
.dashboard-lower__quick {
  grid-column: 1 / -1;
}

.ns-dashboardAsideStack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ns-dashboardMiniPanel .panel__body {
  display: grid;
  gap: 10px;
}

.ns-dashboardMiniPanel .ns-dataRow,
.ns-dashboardMiniPanel .ns-actionRow {
  min-height: 0;
}

.jobs-snapshot-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 100%;
  align-content: start;
  padding: 16px 18px 16px 22px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
  box-shadow: var(--shadow-sm);
}

.jobs-snapshot-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--primary);
}

.jobs-snapshot-card--ok::before { background: var(--success); }
.jobs-snapshot-card--warning::before { background: var(--orange); }
.jobs-snapshot-card--down::before { background: #dc2626; }

.jobs-snapshot-card__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.jobs-snapshot-card__value {
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.jobs-snapshot-card__meta {
  color: var(--muted);
  font-size: 12.5px;
}

.chart {
  display: grid;
  gap: 10px;
}

.chart__frame {
  position: relative;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
}

.chart__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart__area {
  fill: rgba(23, 87, 196, .18);
}

.chart__line {
  fill: none;
  stroke: #1757c4;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart__point {
  fill: #1757c4;
}

.chart__point.is-active {
  stroke: #fff;
  stroke-width: 3;
}

.chart__axisLabels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-tooltip {
  position: absolute;
  left: 56%;
  top: 16%;
  width: 210px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .12);
}

.chart-tooltip__title {
  margin-bottom: 8px;
  font-weight: 800;
}

.chart-tooltip__row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.chart-tooltip__value {
  color: var(--text);
  font-weight: 800;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.ns-dashboardPanel__meta {
  min-height: 18px;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.ns-dashboardPillRow {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ns-dashboardPillButton {
  cursor: pointer;
}

.ns-dashboardPillButton:hover {
  filter: brightness(0.98);
}

[data-dashboard-loading="true"] [data-dashboard-graphs].is-loading {
  position: relative;
}

[data-dashboard-loading="true"] [data-dashboard-graphs].is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.44), rgba(255,255,255,0));
  pointer-events: none;
  animation: nsDashboardShimmer 1.1s linear infinite;
}

@keyframes nsDashboardShimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.legend-line {
  width: 18px;
  height: 0;
  border-top: 3px solid var(--primary);
  border-radius: 999px;
}

.legend-line--dashed {
  border-top-style: dashed;
  opacity: .85;
}

.overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: center;
}

.donut {
  position: relative;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 4px 0 0;
}

.donut__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut__value {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.donut__label {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 600;
}

.legend {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
}

.legend__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend strong {
  color: var(--text);
  font-weight: 900;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  background: var(--primary);
}

.dot--primary { background: var(--primary); }
.dot--muted { opacity: .55; }
.dot--navy { background: #0b3b8f; }
.dot--blue { background: #1f66d1; }
.dot--teal { background: var(--teal); }
.dot--gray { background: var(--gray); }

.list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel__body--flush {
  padding: 6px 0 0;
}

.list__item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-2);
}

.list__item:first-child {
  border-top: 0;
}

.list__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.list__icon--success {
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .18);
  color: var(--success);
}

.list__icon--info {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .16);
  color: var(--info);
}

.list__icon--purple {
  background: rgba(144, 93, 205, .14);
  border-color: rgba(144, 93, 205, .18);
  color: var(--purple);
}

.list__icon--warn {
  background: rgba(239, 111, 15, .14);
  border-color: rgba(239, 111, 15, .18);
  color: var(--orange);
}

.list__content {
  min-width: 0;
}

.list__title {
  font-weight: 800;
  color: var(--text);
}

.list__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.insights {
  display: grid;
  gap: 12px;
}

.insight {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--surface);
}

.insight--highlight {
  background: rgba(37, 99, 235, .06);
  border-color: rgba(37, 99, 235, .10);
}

.insight__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.insight__icon--blue {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .16);
  color: var(--info);
}

.insight__icon--green {
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .16);
  color: var(--success);
}

.insight__icon--purple {
  background: rgba(144, 93, 205, .14);
  border-color: rgba(144, 93, 205, .18);
  color: var(--purple);
}

.insight__body {
  min-width: 0;
}

.insight__title {
  font-weight: 900;
  font-size: 13px;
}

.insight__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.insight__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.insight__cta:hover {
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37, 99, 235, .14);
}

.quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.quick--embedded {
  padding-block: 12px;
}

.quick--embedded .quick__title {
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.quick--embedded .quick__actions {
  justify-content: flex-end;
}

.dashboard-lower .panel__header {
  padding-bottom: 12px;
}

.dashboard-lower .panel__body {
  gap: 12px;
}

.dashboard-lower .list__item,
.dashboard-lower .ns-dataRow,
.dashboard-lower .ns-actionRow {
  padding: 10px 12px;
}

.dashboard-lower .list__title,
.dashboard-lower .ns-dataRow__headline,
.dashboard-lower .ns-actionRow__title {
  font-size: 13px;
}

.dashboard-lower .list__meta,
.dashboard-lower .ns-dataRow__support,
.dashboard-lower .ns-actionRow__description {
  font-size: 12px;
}

.quick__title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.quick__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill-btn {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .10);
}

.pill-btn--ai {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-color: rgba(23, 87, 196, .22);
}

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

  .grid--upper,
  .grid--lower,
  .overview {
    grid-template-columns: 1fr;
  }

  .dashboard-lower {
    grid-template-columns: 1fr;
    grid-template-areas:
      "activity"
      "alerts"
      "attention"
      "jobs"
      "quick";
  }

  .dashboard-lower__panel--quick,
  .dashboard-lower__quick {
    grid-column: auto;
  }

  .donut {
    width: 240px;
    margin: 0 auto;
  }
}

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

  .list__item,
  .insight {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .quick {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick__actions {
    justify-content: flex-start;
  }

  .audit-page .audit-toolbar {
    grid-template-columns: 1fr;
  }

  .audit-page .audit-toolbar__search,
  .audit-page .audit-toolbar .ns-select,
  .audit-page .audit-toolbar .ns-button {
    max-width: none;
    width: 100%;
  }
}

/* Nordavanta exact shell + dashboard overrides */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg-1), var(--sidebar-bg-2));
  color: var(--sidebar-text);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 18px 16px;
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 12px;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.brand__name {
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 13px;
  color: rgba(255,255,255,.92);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-nav__group {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.side-nav__heading {
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  margin: 10px 10px 8px;
}

.side-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-12);
  color: rgba(229,239,255,.86);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.side-nav__item:hover {
  background: transparent;
}

.side-nav__item.is-active,
.side-nav__item[aria-current="page"] {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.side-nav__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: currentColor;
}

.side-nav__label {
  font-weight: 500;
}

.side-nav__badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  color: rgba(229,239,255,.9);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
}

body.sidebar-collapsed .sidebar__inner,
body.sidebar-collapsed .admin-sidebar .sidebar__inner {
  align-items: center;
  gap: 10px;
}

body.sidebar-collapsed .side-nav,
body.sidebar-collapsed .admin-sidebar .side-nav {
  width: 100%;
  align-items: center;
  gap: 8px;
}

body.sidebar-collapsed .side-nav__group,
body.sidebar-collapsed .admin-sidebar .side-nav__group {
  width: 100%;
  margin-top: 2px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.sidebar-collapsed .side-nav__item,
body.sidebar-collapsed .admin-sidebar .side-nav__item {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  justify-content: center;
}

body.sidebar-collapsed .side-nav__item.is-active,
body.sidebar-collapsed .admin-sidebar .side-nav__item.is-active,
body.sidebar-collapsed .side-nav__item[aria-current="page"],
body.sidebar-collapsed .admin-sidebar .side-nav__item[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.admin-sidebar,
.sidebar,
.sidebar__inner,
.side-nav,
.side-nav__group,
.side-nav__item,
.command-drawer .ns-navItem,
.ns-navItem,
.sidebar__footer.admin-sidebar__footer,
.ns-sidebarTools,
.ns-sidebarTools__action,
.ns-sidebarProfile {
  animation: none !important;
}

.side-nav__item,
.command-drawer .ns-navItem,
.ns-navItem,
.admin-sidebar .icon-btn,
.admin-sidebar .ns-iconBtn,
.sidebar .icon-btn,
.sidebar .ns-iconBtn,
.ns-sidebarProfile {
  transition: none !important;
}

.admin-sidebar .icon-btn:hover,
.admin-sidebar .ns-iconBtn:hover,
.sidebar .icon-btn:hover,
.sidebar .ns-iconBtn:hover {
  transform: none;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}

.side-nav__item:focus-visible,
.command-drawer .ns-navItem:focus-visible,
.ns-navItem:focus-visible,
.ns-sidebarTools__action:focus-visible,
.ns-sidebarProfile:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

body.sidebar-collapsed .side-nav__icon,
body.sidebar-collapsed .admin-sidebar .side-nav__icon {
  width: 24px;
  height: 24px;
}

body.sidebar-collapsed .brand,
body.sidebar-collapsed .admin-sidebar .brand {
  padding-inline: 0;
  padding-bottom: 6px;
}

body.sidebar-collapsed .sidebar__footer,
body.sidebar-collapsed .admin-sidebar .sidebar__footer {
  display: none;
}

.status-card {
  border-radius: var(--r-12);
  padding: 12px;
  background: linear-gradient(180deg, rgba(23,87,196,.22), rgba(23,87,196,.12));
  border: 1px solid rgba(255,255,255,.10);
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(255,255,255,.76);
  border-bottom: 1px solid var(--border-2);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search {
  flex: 1;
  max-width: 520px;
}

.search__field {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--r-10);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.search__icon {
  color: var(--muted-2);
}

.search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: var(--fs-13);
  color: var(--text);
}

.kbd {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted-2);
  border: 1px solid var(--border);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-10);
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--muted);
  position: relative;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  transform: translateY(-1px);
}

.notif-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.95);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 6px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.user-chip:hover {
  background: var(--surface);
  border-color: var(--border);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.user-chip__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  white-space: nowrap;
}

.user-chip__name,
.ns-userBtn__meta strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
}

.user-chip__role,
.ns-userBtn__meta small {
  font-size: 12px;
  color: var(--muted);
}

.content {
  padding: 18px 24px 24px;
}

.content__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  margin-bottom: 14px;
}

.page-head__text {
  flex: 1 1 auto;
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: 700;
  letter-spacing: -.01em;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--fs-13);
}

.page-head__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-self: flex-start;
}

.btn {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-10);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .10);
}

.btn--primary {
  border-color: rgba(23,87,196,.2);
  background: linear-gradient(90deg, var(--primary), #1e54c2);
  color: #fff;
}

.btn--ghost {
  background: #f8fafc;
  box-shadow: none;
}

.btn--ghost:hover {
  background: #eef2f7;
  box-shadow: none;
}

.btn--sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn--wide {
  width: 100%;
  justify-content: center;
  height: 42px;
  border-radius: 12px;
  font-weight: 600;
  gap: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  box-shadow: var(--shadow-card);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.panel__body {
  padding: 10px 16px 16px;
}

/* Exact search control from provided Nordavanta reference */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(255,255,255,.76);
  border-bottom: 1px solid var(--border-2);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search,
.ns-search {
  flex: 1;
  max-width: 520px;
}

.ns-search {
  min-height: auto;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search__field {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--r-10);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.search__icon {
  color: var(--muted-2);
}

.search__icon .icon {
  width: 18px;
  height: 18px;
}

.search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  min-width: 0;
  font-size: var(--fs-13);
  color: var(--text);
  box-shadow: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-results-button,
.search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.search__field {
  overflow: hidden;
}

.search__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.kbd {
  flex: 0 0 auto;
  gap: 4px;
  font-size: 12px;
  margin-left: auto;
  padding: 0 0 0 10px;
  border-radius: 0;
  background: transparent;
  color: var(--muted-2);
  border: 0;
  border-left: 1px solid var(--border-2);
  line-height: 1.2;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  white-space: nowrap;
}

.kbd__meta,
.kbd__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.kbd__meta {
  font-size: 13px;
}

.kbd__letter {
  font-weight: 600;
}

.admin-header .ns-search,
.topbar .ns-search {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  max-width: 520px;
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-header .search__field,
.topbar .search__field {
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.admin-header .kbd,
.topbar .kbd {
  min-width: 44px;
  padding-left: 12px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
}

.user-chip {
  gap: 10px;
  padding: 6px 10px;
}

.avatar {
  width: 32px;
  height: 32px;
}

/* Shared admin search, notification, and dashboard interaction overrides */
.topbar,
.admin-header,
.ns-topbar {
  overflow: visible !important;
}
.ns-search {
  position: relative;
  z-index: 45;
}
.ns-searchResults {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(640px, 100%);
  max-height: 72vh;
  overflow: auto;
  padding: 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(12px);
  z-index: 40;
}
.ns-searchResults[aria-hidden="true"] { display: none; }
.ns-searchResults__sections,
.ns-searchResults__list { display: grid; gap: 8px; }
.ns-searchResults__sections { gap: 14px; }
.ns-searchResults__label {
  padding: 0 4px;
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ns-searchResults__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-12);
  background: var(--surface);
}
.ns-searchResults__item:hover { background: var(--surface-2); border-color: var(--border); }
.ns-searchResults__item.is-active {
  background: rgba(23, 87, 196, 0.06);
  border-color: rgba(23, 87, 196, 0.16);
  box-shadow: inset 0 0 0 1px rgba(23, 87, 196, 0.08);
}
.ns-searchResults__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary);
}
.ns-searchResults__copy { display: grid; gap: 3px; min-width: 0; }
.ns-searchResults__title { font-size: var(--fs-13); font-weight: 700; color: var(--text); }
.ns-searchResults__subtitle { font-size: var(--fs-12); color: var(--muted); }
.ns-searchResults__title mark,
.ns-searchResults__subtitle mark {
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--text);
}
.ns-searchResults__empty { padding: 8px 6px; }
.ns-searchResults__emptyTitle { font-size: var(--fs-14); font-weight: 800; color: var(--text); }
.ns-searchResults__emptyText { margin: 4px 0 0; font-size: var(--fs-12); color: var(--muted); }

.ns-flyout__headerActions { display: flex; align-items: center; gap: 10px; }
.ns-flyout__filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.ns-flyout__filter {
  min-height: 24px !important;
  padding: 0 10px !important;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 700;
}
.ns-flyout__filter.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.ns-flyout__headerButton,
.ns-flyout__actionLink {
  min-height: 0 !important;
  width: auto !important;
  padding: 0 !important;
  color: var(--primary);
  font-size: var(--fs-12);
  font-weight: 700;
}
.ns-flyout__summary {
  margin: 2px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.45;
}
.ns-flyout__list {
  display: grid;
  gap: 10px;
}
.ns-flyout__section {
  display: grid;
  gap: 8px;
}
.ns-flyout__sectionLabel {
  padding: 0 2px;
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ns-flyout__item--notification {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-12);
  background: var(--surface);
}
.ns-flyout__item--notification[hidden] { display: none; }
.ns-flyout__itemMain {
  width: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 !important;
}
.ns-flyout__itemIcon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.ns-flyout__item--critical .ns-flyout__itemIcon { color: #dc2626; background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.16); }
.ns-flyout__item--warning .ns-flyout__itemIcon { color: #ea580c; background: rgba(249, 115, 22, 0.08); border-color: rgba(249, 115, 22, 0.16); }
.ns-flyout__item--info .ns-flyout__itemIcon { color: var(--primary); background: rgba(23, 87, 196, 0.08); border-color: rgba(23, 87, 196, 0.16); }
.ns-flyout__severity {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 700;
}
.ns-flyout__severity--critical { color: #b91c1c; background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.16); }
.ns-flyout__severity--warning { color: #c2410c; background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.18); }
.ns-flyout__severity--info { color: var(--primary); background: rgba(23, 87, 196, 0.08); border-color: rgba(23, 87, 196, 0.16); }
.ns-flyout__itemBody {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.ns-flyout__itemMetaRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.ns-flyout__item-title {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  word-break: normal;
  overflow-wrap: anywhere;
}
.ns-flyout__item-meta {
  color: var(--muted);
  font-size: var(--fs-13);
}
.ns-flyout__item-time {
  color: var(--muted);
  font-size: var(--fs-12);
  white-space: nowrap;
}
.ns-flyout__itemActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-left: 48px;
}
.ns-flyout__itemActions .ns-flyout__actionLink:last-child {
  color: var(--muted);
}
.ns-flyout__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}
.ns-iconBtn--notifications {
  width: 40px;
  height: 40px;
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ns-iconBtn--notifications .icon {
  width: 18px;
  height: 18px;
  display: block;
  color: #64748b;
  opacity: 1;
}
.ns-iconBtn--notifications:hover .icon,
.ns-iconBtn--notifications:focus-visible .icon {
  color: #334155;
}
.ns-iconBtn--notifications .notif-badge {
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.28);
}
.ns-iconBtn--notifications .notif-badge[hidden] {
  display: none !important;
}
.ns-iconBtn--notifications:not(.ns-iconBtn--has-notifications) {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

.ns-toastStack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}

.ns-toast {
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: 4px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    var(--surface-2);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  color: var(--text);
  opacity: 0;
  transform: translate3d(18px, 0, 0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  pointer-events: auto;
}

.ns-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ns-toast.is-leaving {
  opacity: 0;
  transform: translate3d(16px, 0, 0);
}

.ns-toast:hover {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.ns-toast--success {
  border-left-color: var(--success);
}

.ns-toast--warning {
  border-left-color: var(--warning);
}

.ns-toast--error {
  border-left-color: var(--danger);
}

.ns-toast--info {
  border-left-color: var(--accent);
}

.ns-toast__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.05);
  color: var(--accent);
  flex-shrink: 0;
}

.ns-toast--success .ns-toast__icon {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.ns-toast--warning .ns-toast__icon {
  background: rgba(239, 111, 15, 0.14);
  color: var(--warning);
}

.ns-toast--error .ns-toast__icon {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.ns-toast__body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ns-toast__header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ns-toast__title {
  min-width: 0;
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 800;
  line-height: 1.25;
}

.ns-toast__timestamp {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: var(--fs-11);
  line-height: 1.2;
}

.ns-toast__message {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.45;
}

.ns-toast__action {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 700;
  text-decoration: none;
}

.ns-toast__action:hover,
.ns-toast__action:focus-visible {
  color: var(--accent-strong);
}

@media (max-width: 640px) {
  .ns-toastStack {
    top: 12px;
    right: 12px;
    left: 12px;
    align-items: stretch;
  }

  .ns-toast {
    width: auto;
  }
}

.ns-dataRow__aside { display: grid; justify-items: end; gap: 8px; }
.ns-dataRow__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 700;
}
.ns-dataRow__action:hover { border-color: var(--border-strong); background: var(--surface); }

.ns-dashboardPanel__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.ns-dashboardPanel__footerSummary {
  margin: 8px 0 0;
  text-align: left;
}
.ns-dashboardPanel,
.quick.quick--embedded,
[data-dashboard-kpis] {
  transition: opacity var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.ns-dashboardPanelState {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.ns-dashboardPanelState[hidden] {
  display: none;
}
.ns-dashboardPanelState__title {
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 700;
}
.ns-dashboardPanelState__message {
  margin: 0;
  font-size: var(--fs-12);
  line-height: 1.5;
}
.ns-dashboardPanelState--loading {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(37, 99, 235, 0.06);
}
.ns-dashboardPanelState--error {
  border-color: rgba(220, 38, 38, 0.16);
  background: rgba(220, 38, 38, 0.06);
}
.ns-dashboardPanelState--empty {
  border-style: dashed;
}
.ns-dashboardPanel.is-panel-loading,
.quick.quick--embedded.is-panel-loading,
[data-dashboard-kpis].is-panel-loading {
  opacity: 0.82;
}
.ns-dashboardPanel.is-panel-loading .panel__body,
.quick.quick--embedded.is-panel-loading,
[data-dashboard-kpis].is-panel-loading .kpis {
  position: relative;
}
.ns-dashboardPanel.is-panel-loading .panel__body::after,
.quick.quick--embedded.is-panel-loading::after,
[data-dashboard-kpis].is-panel-loading .kpis::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0) 100%);
  animation: ns-dashboard-panel-shimmer 1.2s linear infinite;
  pointer-events: none;
}
.ns-dashboardPanel.is-panel-error,
.quick.quick--embedded.is-panel-error,
[data-dashboard-kpis].is-panel-error {
  border-color: rgba(220, 38, 38, 0.16);
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.08);
}
.ns-dashboardPanel.is-panel-empty,
.quick.quick--embedded.is-panel-empty,
[data-dashboard-kpis].is-panel-empty {
  border-style: solid;
}
@keyframes ns-dashboard-panel-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.chart__point[data-dashboard-chart-point-index] {
  cursor: pointer;
  transition: transform var(--transition), r var(--transition), opacity var(--transition);
}
.chart__point[data-dashboard-chart-point-index]:hover,
.chart__point[data-dashboard-chart-point-index]:focus-visible {
  opacity: 1;
  filter: drop-shadow(0 0 0.35rem rgba(37, 99, 235, 0.22));
}
.ns-dashboardMetricTabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.ns-dashboardMetricTabs__option {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 700;
}
.ns-dashboardMetricTabs__option.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.legend > li { list-style: none; }
.legend__row--interactive {
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}
.legend__row--interactive:hover { background: var(--surface-2); }

.ns-pageIntro {
  display: grid;
  gap: 16px;
}

.ns-pageIntro__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ns-pageIntro__copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ns-pageIntro__eyebrow {
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ns-pageIntro__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text);
}

.ns-pageIntro__subtitle {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: var(--fs-14);
  line-height: 1.55;
}

.ns-pageIntro__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ns-pageIntro__stats {
  margin-top: 2px;
}

.ns-pageWorkspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.92fr);
  gap: 16px;
  align-items: start;
}

.ns-pageWorkspace__main,
.ns-pageWorkspace__rail {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.ns-supportCard,
.ns-detailSupportCard {
  display: grid;
  gap: 14px;
}

.ns-supportCard__eyebrow {
  color: var(--muted);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ns-supportCard__title {
  margin: 0;
  font-size: var(--fs-16);
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

.ns-supportCard__copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-13);
  line-height: 1.55;
}

.ns-supportList,
.ns-stepList {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ns-supportList__item,
.ns-stepList__item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ns-supportList__marker,
.ns-stepList__marker {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: var(--fs-12);
  font-weight: 800;
}

.ns-supportList__content,
.ns-stepList__content {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ns-supportList__label,
.ns-stepList__label {
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 700;
  line-height: 1.4;
}

.ns-supportList__note,
.ns-stepList__note {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.5;
}

.ns-metaList {
  display: grid;
  gap: 10px;
}

.ns-metaList__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ns-metaList__label {
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ns-metaList__value {
  min-width: 0;
  text-align: right;
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 700;
}

.ns-pageMetricNote {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.5;
}

.ns-detailHero {
  display: grid;
  gap: 16px;
}

.ns-detailHero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ns-detailHero__fact {
  min-height: 92px;
}

.ns-detailSupportActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ns-pageCallout {
  padding: 16px;
  border-radius: var(--r-14);
  border: 1px dashed rgba(23, 87, 196, 0.18);
  background: linear-gradient(180deg, rgba(23, 87, 196, 0.05), rgba(23, 87, 196, 0.02));
}

.ns-pageCallout__title {
  margin: 0 0 4px;
  font-size: var(--fs-14);
  font-weight: 800;
  color: var(--text);
}

.ns-pageCallout__copy {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-13);
  line-height: 1.55;
}

.ns-pageCallout--compact {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ns-pageCallout--compact .ns-pageCallout__title {
  margin: 0;
}

.ns-pageCallout--compact .ns-pageCallout__copy {
  margin-top: 2px;
}

.ns-pageSurface {
  display: grid;
  gap: 16px;
}

.ns-pageSurface--full {
  grid-template-columns: minmax(0, 1fr);
}

.ns-pageSurface__aside {
  display: grid;
  gap: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
}

.modal.is-open,
.modal[aria-hidden="false"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: var(--fs-16);
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

.plugin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.plugin-toolbar--inline {
  justify-content: flex-end;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
}

.plugin-toolbar .search-input {
  flex: 1 1 280px;
  min-width: 220px;
}

.plugin-toolbar select {
  min-width: 140px;
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.plugin-card {
  min-width: 0;
  min-height: 100%;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.plugin-card.plugin-empty {
  justify-items: start;
  align-content: center;
}

.plugin-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.plugin-icon-box {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(23, 87, 196, 0.14);
  background: linear-gradient(180deg, rgba(23, 87, 196, 0.1), rgba(23, 87, 196, 0.04));
}

.plugin-icon-box.large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.plugin-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.plugin-icon-box.large .plugin-icon-img {
  width: 36px;
  height: 36px;
}

.plugin-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--text);
}

.plugin-title a {
  color: inherit;
  text-decoration: none;
}

.plugin-title a:hover {
  color: var(--primary);
}

.plugin-category {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(23, 87, 196, 0.16);
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plugin-head-meta,
.plugin-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.plugin-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.plugin-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
}

.plugin-meta > div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  background: var(--surface-2);
}

.plugin-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plugin-meta strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.plugin-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.plugin-card-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-2);
}

.plugin-actions,
.plugin-tenant {
  display: grid;
  gap: 10px;
}

.plugin-actions .inline-form,
.plugin-tenant .inline-form {
  display: grid;
  gap: 10px;
}

.plugin-tenant select {
  width: 100%;
}

.plugin-actions .ns-btn,
.plugin-tenant .ns-btn {
  width: 100%;
  justify-content: center;
}

.plugin-version-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.plugin-version-row > div {
  padding: 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  gap: 4px;
}

.plugin-version-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plugin-version-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.ns-fileInput__control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-12);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-13);
}

.ns-fileInput__control::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.ns-accountSecurityState {
  padding: 12px 14px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
}

.ns-pageWorkspace .table-wrap,
.ns-pageWorkspace .ns-tableWrap,
.ns-pageWorkspace .datagrid-container {
  min-height: 100%;
}

@media (max-width: 1200px) {
  .ns-pageWorkspace {
    grid-template-columns: 1fr;
  }

  .plugin-grid,
  .plugin-version-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ns-pageIntro__header {
    flex-direction: column;
  }

  .ns-pageIntro__actions {
    justify-content: flex-start;
  }

  .ns-detailHero__facts,
  .ns-inlineStatRow,
  .ns-dashboardKpis,
  .kpis,
  .plugin-version-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ns-detailHero__facts,
  .ns-inlineStatRow,
  .ns-dashboardKpis,
  .kpis,
  .plugin-version-row,
  .plugin-meta,
  .plugin-grid {
    grid-template-columns: 1fr;
  }

  .plugin-toolbar--inline {
    max-width: none;
  }
}
/* END components.css */

/* BEGIN forms.css */
.form,
.ns-form,
form.form {
  display: grid;
  gap: var(--s-16);
}

.form-section,
.ns-formSection {
  display: grid;
  gap: var(--s-12);
}

.form-row,
.ns-formRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-16);
}

.form-group,
.ns-formGroup {
  display: grid;
  gap: 8px;
}

.form-group label,
.ns-formGroup > label {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-soft);
}

.form-hint {
  font-size: var(--fs-12);
  color: var(--muted);
}

.input,
.select,
.textarea,
.ns-input,
.ns-select,
.ns-textarea,
.ns-inputField,
.ns-selectField,
.search-input input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  outline: none;
}

textarea,
.textarea,
.ns-textarea {
  min-height: 120px;
  padding-block: 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus,
.ns-input:focus,
.ns-select:focus,
.ns-textarea:focus,
.ns-inputField:focus,
.ns-selectField:focus,
.search-input input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(23, 87, 196, 0.35);
  box-shadow: var(--focus-ring);
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input .search-icon {
  position: absolute;
  left: 14px;
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  color: var(--muted-2);
  pointer-events: none;
}

.search-input input {
  padding-left: 40px;
}

@media (max-width: 760px) {
  .form-row,
  .ns-formRow {
    grid-template-columns: 1fr;
  }
}
/* END forms.css */

/* BEGIN tables.css */
.table-wrap,
.ns-tableWrap,
.datagrid-container,
.table-viewport,
.ns-dataTableWrap {
  min-width: 0;
}

.table-wrap,
.ns-tableWrap,
.ns-dataTableWrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-viewport {
  overflow: auto;
}

.ns-dataTable,
.users-table,
table.ns-dataTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-surface);
}

.ns-dataTable thead th,
.users-table thead th,
table.ns-dataTable thead th {
  padding: 16px 18px;
  text-align: left;
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-surface);
  white-space: nowrap;
}

.ns-dataTable tbody td,
.users-table tbody td,
table.ns-dataTable tbody td {
  padding: 18px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.ns-dataTable tbody tr:last-child td,
.users-table tbody tr:last-child td,
table.ns-dataTable tbody tr:last-child td {
  border-bottom: 0;
}

.ns-dataTable tbody tr:hover,
.users-table tbody tr:hover,
table.ns-dataTable tbody tr:hover {
  background: var(--bg-surface-alt);
}
/* END tables.css */

/* BEGIN utilities.css */
.u-hidden { display: none !important; }
.text-muted { color: var(--muted) !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--s-8) !important; }
.mt-2 { margin-top: var(--s-12) !important; }
.mt-3 { margin-top: var(--s-16) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--s-8) !important; }
.mb-2 { margin-bottom: var(--s-12) !important; }
.mb-3 { margin-bottom: var(--s-16) !important; }
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-1 { gap: var(--s-8) !important; }
.gap-2 { gap: var(--s-12) !important; }
.gap-3 { gap: var(--s-16) !important; }
.w-full,
.full { width: 100% !important; }
.centered { justify-items: center; text-align: center; }
.inline-form { display: inline-flex; gap: 8px; }
/* END utilities.css */

/* BEGIN admin shell fixes */
@media (min-width: 961px) {
  .admin-sidebar,
  .sidebar {
    position: sticky;
    inset: auto;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .side-nav,
  .command-drawer__nav,
  .ns-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.sidebar__inner {
  position: relative;
}

.sidebar__brandRow {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sidebar__footer.admin-sidebar__footer {
  display: block !important;
  position: relative;
  bottom: auto;
  z-index: 1;
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(7, 28, 54, 0.16), rgba(7, 28, 54, 0.92) 30%, rgba(7, 28, 54, 0.96));
  backdrop-filter: none;
}

.sidebar__footer.admin-sidebar__footer .ns-sidebarTools {
  position: relative;
  z-index: 1;
}

.ns-sidebarProfile {
  min-height: 44px;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.ns-sidebarProfile:hover {
  border-color: transparent;
  transform: none;
  background: transparent;
}

.ns-sidebarProfile__meta {
  align-content: center;
}

.ns-sidebarProfile__meta strong {
  font-size: 14px;
}

.ns-sidebarProfile__meta small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ns-sidebarProfile__avatar {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.ns-sidebarProfile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ns-sidebarProfile__avatar > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #1d4ed8);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.ns-sidebarProfile__chevron {
  color: rgba(229, 239, 255, 0.5);
}

.ns-flyout,
.ns-sidebarFlyout {
  z-index: 320;
  color: var(--text);
}

.ns-sidebarTools__actionWrap .ns-sidebarFlyout {
  left: calc(100% + 16px);
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, calc(100vw - 48px));
  max-width: min(420px, calc(100vw - 48px));
  max-height: min(72vh, 720px);
  overflow: auto;
}

.ns-sidebarProfileWrap .ns-sidebarFlyout {
  left: calc(100% + 16px);
  right: auto;
  top: auto;
  bottom: 0;
  transform: none;
  width: min(290px, calc(100vw - 48px));
  max-width: min(290px, calc(100vw - 48px));
}

.ns-flyout__headerActions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ns-flyout__itemActions {
  flex-wrap: wrap;
}

.ns-searchOverlay {
  color: var(--text);
}

.ns-searchOverlay__form {
  position: relative;
  overflow: visible;
}

.ns-searchOverlay .ns-searchResults,
.ns-searchOverlay__results {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  right: 0;
  inset: auto 0 auto 0;
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: min(56vh, 560px);
  overflow: auto;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.98);
}

body.sidebar-collapsed .sidebar__brandRow {
  justify-content: center;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer {
  display: block !important;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarTools {
  gap: 8px;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarTools__actions {
  grid-template-columns: 1fr;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarProfile {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarProfile__meta,
body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarProfile__chevron {
  display: none;
}

body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer .ns-sidebarProfile__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.ns-searchOverlay .ns-searchResults__item {
  text-align: left;
}

.ns-searchOverlay__results[aria-hidden="true"] {
  display: none;
}

.ns-mailPage,
.ns-mailContainer,
.ns-mailLayout {
  min-width: 0;
  min-height: calc(100vh - 42px);
  align-content: stretch;
}

.ns-mailWorkspace {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.ns-mailPane,
.ns-mailPanel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.ns-mailPane--list {
  max-width: 380px;
  overflow: visible;
}

.ns-mailSidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.ns-mailSidebarTop {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(255, 255, 255, 0.96));
}

.ns-mailSidebarTop__row--controls,
.ns-mailPaneHeader,
.ns-mailDetailHeader,
.ns-mailReplyForm__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ns-mailFolderTabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-soft);
}

.ns-mailFolderTab {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ns-mailFolderTab.is-active,
.ns-mailFolderTab[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 24px rgba(23, 87, 196, 0.2);
}

.ns-mailSidebarTools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.ns-mailSettingsLink,
.ns-mailFolderToggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.ns-mailSettingsLink svg,
.ns-mailFolderToggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ns-mailSidebarSearch {
  display: grid;
}

.ns-mailSearch .ns-input {
  min-height: 44px;
}

.ns-mailCustomFolders {
  display: grid;
  gap: 10px;
}

.ns-mailCustomFolders__label,
.ns-mailFolderManager__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ns-mailCustomFolders__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ns-mailCustomFolderChip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.ns-mailCustomFolderChip strong {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary);
  font-size: 11px;
}

.ns-mailCustomFolderChip.is-active {
  border-color: rgba(23, 87, 196, 0.26);
  background: rgba(23, 87, 196, 0.06);
  color: var(--primary);
}

.ns-mailFolderManager {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 16;
  width: min(460px, calc(100vw - 64px));
  min-width: 320px;
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-float);
  color: var(--text);
}

.ns-mailFolderManager[hidden] {
  display: none;
}

.ns-mailFolderManager__header {
  display: grid;
  gap: 4px;
}

.ns-mailFolderManager__header strong {
  font-size: 14px;
  font-weight: 800;
}

.ns-mailFolderManager__header small,
.ns-mailFolderManager__status,
.ns-mailFolderCard__copy small,
.ns-mailFolderCard__keywords {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ns-mailFolderManager__move,
.ns-mailFolderForm {
  display: grid;
  gap: 10px;
}

.ns-mailFolderManager__moveRow,
.ns-mailFolderForm__header,
.ns-mailFolderCard__top,
.ns-mailFolderCard__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ns-mailFolderManager__moveRow {
  align-items: stretch;
}

.ns-mailFolderManager__moveRow .ns-select {
  min-width: 0;
  flex: 1 1 auto;
}

.ns-mailFolderManager__list {
  display: grid;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.ns-mailFolderManager__empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--bg-surface-alt);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ns-mailFolderCard {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface-alt);
}

.ns-mailFolderCard.is-active {
  border-color: rgba(23, 87, 196, 0.26);
  background: rgba(23, 87, 196, 0.06);
}

.ns-mailFolderCard__copy {
  display: grid;
  gap: 3px;
}

.ns-mailFolderCard__copy strong,
.ns-mailFolderForm__header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.ns-mailFolderCard__badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ns-mailFolderCard__actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ns-mailPaneHeader__eyebrow,
.ns-mailDetailHeader__eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ns-mailPaneHeader__title,
.ns-mailDetailHeader__subject {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ns-mailPaneHeader__meta,
.ns-mailDetailHeader__meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ns-mailNotice {
  margin: 0 18px;
}

.ns-mailList {
  min-height: 320px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.ns-mailListFooter {
  padding: 0 18px 18px;
}

button.ns-mailMessageRow {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}

button.ns-mailMessageRow:hover {
  border-color: rgba(23, 87, 196, 0.18);
  background: rgba(23, 87, 196, 0.03);
}

button.ns-mailMessageRow.is-selected {
  border-color: rgba(23, 87, 196, 0.24);
  background: rgba(23, 87, 196, 0.07);
  box-shadow: inset 0 0 0 1px rgba(23, 87, 196, 0.1);
}

button.ns-mailMessageRow.is-unread .ns-mailMessageRow__from,
button.ns-mailMessageRow.is-unread .ns-mailMessageRow__subject {
  color: var(--text);
  font-weight: 800;
}

.ns-mailMessageRow__top,
.ns-mailMessageRow__subjectLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ns-mailMessageRow__from,
.ns-mailMessageRow__subject {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.ns-mailMessageRow__from,
.ns-mailMessageRow__subject,
.ns-mailMessageRow__preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ns-mailMessageRow__time,
.ns-mailMessageRow__preview {
  color: var(--muted);
  font-size: 12px;
}

.ns-mailMessageRow__badge {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.ns-mailThreadShell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

@media (min-width: 961px) {
  .ns-mailWorkspace {
    height: calc(100vh - 42px);
    max-height: calc(100vh - 42px);
  }

  .ns-mailSidebar,
  .ns-mailThreadShell {
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }

  .ns-mailList {
    min-height: 0;
  }
}

.ns-mailDetailHeader {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.ns-mailDetailHeader__copy {
  min-width: 0;
}

.ns-mailThreadContent {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(280px, 34vh);
}

.ns-mailThreadBody {
  min-height: 0;
  padding: 24px;
  display: grid;
  gap: 16px;
  overflow: auto;
}

.ns-mailAttachmentBar,
.ns-mailThread,
.ns-mailThreadItem__attachments {
  display: grid;
  gap: 12px;
}

.ns-mailThreadItem {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-surface-alt);
}

.ns-mailThreadItem__meta,
.ns-mailThreadItem__recipients {
  display: grid;
  gap: 8px;
}

.ns-mailThreadItem__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.ns-mailThreadItem__direction {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ns-mailThreadItem__direction--incoming {
  background: rgba(23, 87, 196, 0.08);
  color: var(--primary);
}

.ns-mailThreadItem__direction--outgoing {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.ns-mailThreadItem__body {
  color: var(--text);
  line-height: 1.7;
}

.ns-mailThreadItem__body > :first-child {
  margin-top: 0;
}

.ns-mailThreadItem__body > :last-child {
  margin-bottom: 0;
}

.ns-mailThreadItem__body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.ns-mailAttachmentBar,
.ns-mailThreadItem__attachments {
  display: flex;
  flex-wrap: wrap;
}

.ns-mailAttachmentLink {
  min-width: 0;
  display: inline-grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.ns-mailAttachmentLink span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.ns-mailAttachmentLink.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ns-mailReplyForm {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.78), rgba(255, 255, 255, 0.98));
  overflow: hidden;
}

.ns-mailReplyForm__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.ns-mailReplyForm__subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.ns-mailReplyForm .ns-textarea {
  min-height: 0;
  height: 100%;
  resize: none;
}

.ns-mailLoadingSkeleton {
  display: grid;
  gap: 12px;
}

.ns-mailSkeletonRow,
.ns-mailDetailPlaceholder {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96));
}

.ns-mailDetailPlaceholder__header,
.ns-mailDetailPlaceholder__body,
.ns-mailDetailPlaceholder__footer {
  display: grid;
  gap: 10px;
}

.ns-mailSkeletonBlock {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.85), rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.85));
  background-size: 200% 100%;
  animation: ns-mailShimmer 1.35s linear infinite;
}

.ns-mailSkeletonBlock--title {
  width: 42%;
  height: 14px;
}

.ns-mailSkeletonBlock--subject {
  width: 68%;
}

.ns-mailSkeletonBlock--preview {
  width: 84%;
}

.ns-mailSkeletonBlock--meta {
  width: 26%;
}

@keyframes ns-mailShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 760px) {
  .ns-mailPage,
  .ns-mailContainer,
  .ns-mailLayout {
    min-height: calc(100vh - 32px);
  }
}

@media (max-width: 1200px) {
  .ns-mailWorkspace {
    grid-template-columns: 1fr;
  }

  .ns-mailPane--list {
    max-width: none;
  }
}

@media (min-width: 961px) {
  .sidebar__inner {
    height: calc(100vh - 36px);
    min-height: calc(100vh - 36px);
  }

  .side-nav,
  .command-drawer__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
  }

  .sidebar__footer.admin-sidebar__footer {
    position: relative;
    bottom: auto;
    flex: 0 0 auto;
    margin-top: 0;
  }
}

@media (max-width: 960px) {
  .ns-sidebarTools__actionWrap .ns-sidebarFlyout,
  .ns-sidebarProfileWrap .ns-sidebarFlyout {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    bottom: auto;
    transform: none;
    width: min(420px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .ns-mailSidebar,
  .ns-mailThreadShell {
    min-height: auto;
  }

  .sidebar__footer.admin-sidebar__footer {
    position: relative;
    bottom: auto;
    background: none;
    backdrop-filter: none;
    padding-bottom: 0;
  }
}
/* END admin shell fixes */

/* BEGIN sidebar final stabilization */
@media (min-width: 961px) {
  .admin-sidebar,
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    padding: 16px 12px 14px;
    background: linear-gradient(180deg, #081425 0%, #0b203d 52%, #0a1a31 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    contain: none;
    backface-visibility: visible;
    transform: none !important;
    will-change: auto;
  }

  .sidebar__inner,
  .admin-sidebar .sidebar__inner {
    min-height: calc(100vh - 30px);
    height: calc(100vh - 30px);
    width: 100%;
    min-width: 100%;
    inline-size: 100%;
    min-inline-size: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    box-sizing: border-box;
  }

  .sidebar__brandRow {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 6px 2px;
  }

  .brand {
    min-height: 44px;
    padding: 8px 10px;
    gap: 12px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
  }

  .brand__name {
    font-size: 13px;
    letter-spacing: 0.14em;
  }

  .side-nav,
  .command-drawer__nav,
  .ns-nav {
    flex: 1 1 auto;
    align-self: stretch;
    min-height: 0;
    width: calc(100% + 40px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-right: -40px;
    padding: 0 0 4px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    scrollbar-gutter: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(146, 171, 207, 0.72) rgba(255, 255, 255, 0.08);
  }

  .side-nav::after,
  .command-drawer__nav::after,
  .ns-nav::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 8px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(152, 176, 210, 0.2), rgba(152, 176, 210, 0.42), rgba(152, 176, 210, 0.2));
    pointer-events: none;
    opacity: 0.95;
  }

  .side-nav::-webkit-scrollbar,
  .command-drawer__nav::-webkit-scrollbar,
  .ns-nav::-webkit-scrollbar {
    width: 8px;
  }

  .side-nav::-webkit-scrollbar-track,
  .command-drawer__nav::-webkit-scrollbar-track,
  .ns-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
  }

  .side-nav::-webkit-scrollbar-thumb,
  .command-drawer__nav::-webkit-scrollbar-thumb,
  .ns-nav::-webkit-scrollbar-thumb {
    border: 1px solid rgba(7, 20, 37, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(173, 194, 223, 0.78), rgba(104, 132, 174, 0.9));
  }

  .side-nav__group,
  .command-drawer__section,
  .sidebar-section {
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .side-nav__heading,
  .command-drawer__title,
  .ns-nav__group {
    margin: 0 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(229, 239, 255, 0.46);
  }

  .side-nav__item,
  .command-drawer .ns-navItem,
  .ns-navItem {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(229, 239, 255, 0.84);
    box-shadow: none;
    transform: none !important;
    transition: none !important;
  }

  .side-nav__item:hover,
  .command-drawer .ns-navItem:hover,
  .ns-navItem:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .side-nav__item.is-active,
  .side-nav__item[aria-current="page"],
  .command-drawer .ns-navItem.is-active,
  .command-drawer .ns-navItem[aria-current="page"],
  .ns-navItem.is-active,
  .ns-navItem[aria-current="page"] {
    background: linear-gradient(135deg, #245dca, #1847a4);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 12px 24px rgba(2, 8, 23, 0.24);
  }

  .side-nav__icon,
  .ns-navItem__icon {
    width: 18px;
    height: 18px;
  }

  .side-nav__label,
  .ns-navItem__label {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
  }

  .sidebar__footer.admin-sidebar__footer {
    display: block !important;
    position: relative;
    margin-top: auto;
    padding: 14px 8px 0;
    background: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
    box-shadow: none;
  }

  .ns-sidebarTools {
    gap: 12px;
  }

  .ns-sidebarTools__actions {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    justify-content: flex-start;
    gap: 10px;
  }

  .ns-sidebarTools__actionWrap {
    display: contents;
  }

  .ns-sidebarTools__action {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(229, 239, 255, 0.88);
    box-shadow: none;
    transform: none !important;
    transition: none !important;
  }

  .ns-sidebarTools__action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .ns-sidebarProfileWrap {
    position: relative;
  }

  .ns-sidebarProfile {
    min-height: 40px;
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: rgba(229, 239, 255, 0.94);
    text-align: left;
    transform: none !important;
    transition: none !important;
  }

  .ns-sidebarProfile:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .ns-sidebarProfile__avatar {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }

  .ns-sidebarProfile__meta {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .ns-sidebarProfile__meta strong {
    font-size: 13px;
    line-height: 1.15;
    color: #fff;
  }

  .ns-sidebarProfile__meta small {
    color: rgba(229, 239, 255, 0.62);
    font-size: 11px;
  }

  .ns-sidebarProfile__chevron {
    color: rgba(229, 239, 255, 0.44);
  }

  .ns-flyout,
  .ns-sidebarFlyout {
    z-index: 340;
  }

  body.sidebar-collapsed .sidebar__inner,
  body.sidebar-collapsed .admin-sidebar .sidebar__inner {
    align-items: center;
    gap: 14px;
  }

  body.sidebar-collapsed .sidebar__brandRow {
    justify-content: center;
    width: 100%;
    padding-inline: 0;
  }

  body.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 0;
  }

  body.sidebar-collapsed .brand__name,
  body.sidebar-collapsed .side-nav__label,
  body.sidebar-collapsed .side-nav__badge,
  body.sidebar-collapsed .side-nav__heading,
  body.sidebar-collapsed .ns-sidebarProfile__meta,
  body.sidebar-collapsed .ns-sidebarProfile__chevron {
    display: none;
  }

  body.sidebar-collapsed .side-nav,
  body.sidebar-collapsed .admin-sidebar .side-nav,
  body.sidebar-collapsed .command-drawer__nav,
  body.sidebar-collapsed .admin-sidebar .command-drawer__nav {
    align-self: stretch;
    width: calc(100% + 32px);
    align-items: flex-start;
    margin-right: -32px;
    padding-right: 0;
  }

  body.sidebar-collapsed .side-nav__group,
  body.sidebar-collapsed .admin-sidebar .side-nav__group,
  body.sidebar-collapsed .command-drawer__section,
  body.sidebar-collapsed .admin-sidebar .command-drawer__section {
    width: 100%;
    align-items: flex-start;
    gap: 8px;
  }

  body.sidebar-collapsed .side-nav__item,
  body.sidebar-collapsed .command-drawer .ns-navItem,
  body.sidebar-collapsed .ns-navItem {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    margin: 0;
  }

  body.sidebar-collapsed .side-nav__icon,
  body.sidebar-collapsed .ns-navItem__icon {
    width: 20px;
    height: 20px;
  }

  body.sidebar-collapsed .sidebar__footer.admin-sidebar__footer {
    display: block !important;
    width: 100%;
    padding-inline: 0;
  }

  body.sidebar-collapsed .ns-sidebarTools {
    width: 100%;
    align-items: center;
  }

  body.sidebar-collapsed .ns-sidebarTools__actions {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body.sidebar-collapsed .ns-sidebarProfileWrap {
    width: 100%;
    display: grid;
    justify-items: center;
  }

  body.sidebar-collapsed .ns-sidebarProfile {
    width: 40px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  body.sidebar-collapsed .ns-sidebarProfile__avatar {
    width: 32px;
    height: 32px;
  }

  .admin-sidebar,
  .admin-sidebar *,
  .sidebar,
  .sidebar * {
    animation: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
/* END sidebar final stabilization */

/* popup centering overrides */
.ns-flyout.is-open,
.ns-mailFolderManager.is-open {
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  z-index: 1320;
  width: min(380px, calc(100vw - 32px));
  min-width: 0;
  max-width: calc(100vw - 32px);
  max-height: min(80vh, calc(100vh - 32px));
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(18px);
  isolation: isolate;
  transform: translate(-50%, -50%);
}

.ns-flyout.is-open::before,
.ns-mailFolderManager.is-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.ns-flyout--notifications.is-open {
  width: min(460px, calc(100vw - 32px));
}

.ns-sidebarFlyout--profile.is-open {
  width: min(320px, calc(100vw - 32px));
}

.ns-mailFolderManager.is-open {
  width: min(460px, calc(100vw - 32px));
}

.ns-mailFolderManager.is-open .ns-mailFolderManager__list,
.ns-flyout.is-open .ns-flyout__list {
  max-height: min(48vh, 360px);
  overflow-y: auto;
}

.ns-sidebarTools__actionWrap .ns-sidebarFlyout.is-open,
.ns-sidebarProfileWrap .ns-sidebarFlyout.is-open {
  left: 50%;
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

@media (max-width: 760px) {
  .ns-flyout.is-open,
  .ns-mailFolderManager.is-open {
    padding: 14px;
    border-radius: 18px;
    max-height: calc(100vh - 24px);
  }
}

/* popup width and structure refinements */
.drawer[aria-hidden="false"] .drawer-panel,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel {
  width: min(720px, calc(100vw - 32px));
  border-radius: 24px;
}

.users-page .ns-users-drawer-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 24px;
}

.users-page .ns-users-drawer .ns-users-nameRow {
  grid-template-columns: 1fr;
  gap: 10px;
}

.users-page .ns-users-drawer .ns-users-segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 6px;
}

.users-page .ns-users-drawer .ns-users-segmented__option {
  flex: none;
}

.users-page .ns-users-drawer .ns-users-segmented__button {
  justify-content: flex-start;
  min-height: 40px;
  padding-inline: 14px;
}

.users-page .ns-users-drawer .ns-users-submit {
  justify-content: stretch;
}

.users-page .ns-users-drawer .ns-users-submit .ns-button,
.users-page .ns-users-drawer .ns-users-submit .ns-btn {
  width: 100%;
  min-width: 0;
}

.ns-flyout.is-open,
.ns-mailFolderManager.is-open {
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 24px;
}

.ns-flyout--notifications.is-open,
.ns-mailFolderManager.is-open {
  width: min(760px, calc(100vw - 32px));
}

.ns-sidebarFlyout--profile.is-open {
  width: min(440px, calc(100vw - 32px));
}

.ns-flyout.is-open > .ns-flyout__summary,
.ns-flyout.is-open > .ns-flyout__list,
.ns-flyout.is-open > .ns-flyout__footer,
.ns-flyout.is-open > .ns-flyout__empty,
.ns-flyout.is-open > a,
.ns-flyout.is-open > form,
.ns-mailFolderManager.is-open > .ns-mailFolderManager__status,
.ns-mailFolderManager.is-open > .ns-mailFolderManager__move,
.ns-mailFolderManager.is-open > .ns-mailFolderManager__list,
.ns-mailFolderManager.is-open > .ns-mailFolderManager__empty,
.ns-mailFolderManager.is-open > .ns-mailFolderForm {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ns-flyout.is-open .ns-flyout__header {
  padding: 0;
}

.ns-flyout.is-open .ns-flyout__summary,
.ns-mailFolderManager.is-open .ns-mailFolderManager__status {
  margin-bottom: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.ns-flyout.is-open .ns-flyout__list,
.ns-mailFolderManager.is-open .ns-mailFolderManager__list {
  max-height: min(52vh, 420px);
}

.ns-flyout.is-open .ns-flyout__section + .ns-flyout__section {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ns-flyout.is-open .ns-flyout__footer {
  justify-content: flex-end;
  gap: 12px;
}

.ns-sidebarFlyout--profile.is-open {
  display: grid;
  gap: 0;
}

.ns-sidebarFlyout--profile.is-open .ns-sidebarFlyout__profile {
  padding: 0 0 14px;
}

.ns-sidebarFlyout--profile.is-open > form {
  margin: 0;
}

.ns-sidebarFlyout--profile.is-open > a,
.ns-sidebarFlyout--profile.is-open > form button {
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 14px;
}

.drawer[aria-hidden="false"] .drawer-panel > .drawer-header,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel > .operator-modal-header,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel > .panel__header,
.users-page .ns-users-drawer-header {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.drawer[aria-hidden="false"] .drawer-panel > .drawer-header + *,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel > .operator-modal-header + *,
.operator-drawer[aria-hidden="false"] .operator-drawer-panel > .panel__header + *,
.users-page .ns-users-drawer-header + .ns-users-drawer-body {
  padding-top: 16px;
}

@media (max-width: 760px) {
  .drawer[aria-hidden="false"] .drawer-panel,
  .operator-drawer[aria-hidden="false"] .operator-drawer-panel,
  .users-page .ns-users-drawer-panel,
  .ns-flyout.is-open,
  .ns-flyout--notifications.is-open,
  .ns-sidebarFlyout--profile.is-open,
  .ns-mailFolderManager.is-open {
    width: min(100%, calc(100vw - 24px));
    border-radius: 20px;
  }
}

/* Public auth */
.ns-authShell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(36, 86, 200, 0.12), transparent 36%),
    linear-gradient(180deg, #f4f7fb 0%, #eef3fa 100%);
}

.ns-authMain {
  min-height: 100vh;
}

.ns-authPage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.ns-authPage .auth-card,
.ns-authCard {
  width: min(100%, 480px);
  padding: 32px;
  border: 1px solid var(--ns-border-subtle, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--ns-surface-1, var(--surface)) 94%, white 6%);
  box-shadow: 0 18px 40px rgba(16, 30, 60, 0.08);
}

.ns-authCard--wide {
  width: min(100%, 760px);
}

.ns-authBrand,
.ns-authPage .auth-brand {
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ns-text-muted, var(--muted));
}

.ns-authPage h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  color: var(--ns-text-strong, var(--text));
}

.ns-authLead {
  margin: 10px 0 20px;
  color: var(--ns-text-muted, var(--muted));
  line-height: 1.6;
}

.ns-authForm {
  gap: 14px;
}

.ns-authAux {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  margin-bottom: 4px;
}

.ns-authLink {
  color: var(--ns-text-muted, var(--muted));
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ns-authLink:hover,
.ns-authLink:focus-visible {
  color: var(--ns-accent-strong, var(--accent, #2456c8));
}

.ns-authSecondary {
  margin-top: 12px;
}

.ns-authErrorList {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 720px) {
  .ns-authPage {
    padding: 24px 16px;
    align-items: flex-start;
  }

  .ns-authPage .auth-card,
  .ns-authCard {
    padding: 24px 20px;
  }

  .ns-authCard--wide {
    width: 100%;
  }
}

