/* Nexora v8.0 Commercial Shell, Login Showcase, Spotlight, Overview & Settings
 * Strictly adheres to docs/DESIGN_SYSTEM.md Lavender-Ivory + Plum-Ink palette.
 */

/* --- 1. Grouped Sidebar & Workspace Mode Switcher --- */
.nx-workspace-wrap {
  margin: 0 3px 9px;
}
.nx-workspace-wrap .workspace-switcher {
  margin-bottom: 0;
}
.nx-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 3px 10px;
  padding: 3px;
  border-radius: 10px;
  background: #efeaf6cc;
  border: 1px solid #e3daf0;
  box-shadow: inset 0 1px 2px #3b235808;
}
.nx-mode-btn {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6d617a;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.nx-mode-btn:hover {
  color: #2f243a;
}
.nx-mode-btn.active {
  background: #ffffff;
  color: #5d39bd;
  font-weight: 600;
  box-shadow: 0 2px 8px #4b2d6e12, inset 0 0 0 1px #ebe2f5;
}

.side-nav {
  gap: 7px;
}
.nx-nav-group {
  display: grid;
  gap: 2px;
}
.nx-nav-group[hidden] {
  display: none !important;
}
.nx-nav-group-label {
  display: block;
  padding: 3px 11px 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  color: #8c7f9a;
  user-select: none;
}
.nx-erp-drawer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 11px 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7d6f8c;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}
.nx-erp-drawer-btn:hover {
  color: #3d2c52;
  background: #ffffff52;
}
.nx-erp-drawer-btn .icon {
  width: 13px;
  height: 13px;
  transition: transform .2s ease;
}
.nx-erp-group[data-erp-collapsed="false"] .nx-erp-drawer-btn .icon {
  transform: rotate(180deg);
}
.nx-erp-drawer-items {
  display: grid;
  gap: 2px;
}
.nx-erp-group[data-erp-collapsed="true"] .nx-erp-drawer-items {
  display: none;
}
.nav-item em {
  font-variant-numeric: tabular-nums;
}

/* Topbar Help Button & Kbd */
.help-button {
  color: #5b4e69;
}
.help-button:hover {
  border-color: #d8c9e4;
  color: #5d39bd;
  background: #fbf8ff;
}

/* Canvas 68px Dark Rail Compatibility */
@media (min-width: 901px) {
  .nexora-canvas-active .nx-mode-switch,
  .nexora-canvas-active .nx-nav-group-label,
  .nexora-canvas-active .nx-erp-drawer-btn {
    display: none !important;
  }
  .nexora-canvas-active .nx-nav-group,
  .nexora-canvas-active .nx-erp-drawer-items {
    display: contents;
  }
  /* Keep Orders & Inventory accessible on the 68px Canvas rail so no feature disappears */
  .nexora-canvas-active .nx-erp-group[data-erp-collapsed="true"] .nx-erp-drawer-items {
    display: contents;
  }
}
@media (max-width: 900px) {
  .nexora-canvas-active .nx-mode-switch {
    background: #ffffff0c;
    border-color: #ffffff14;
  }
  .nexora-canvas-active .nx-mode-btn {
    color: #aba4b5;
  }
  .nexora-canvas-active .nx-mode-btn.active {
    background: #302939;
    color: #efe6fb;
    box-shadow: inset 0 0 0 1px #cbb4de40;
  }
  .nexora-canvas-active .nx-nav-group-label,
  .nexora-canvas-active .nx-erp-drawer-btn {
    color: #8f8899;
  }
}

/* Canvas Header Compact Credit Pill */
.nexora-canvas-heading .nx-canvas-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #ffffff1f;
  background: #ffffff0c;
  color: #eae4f2;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}
.nexora-canvas-heading .nx-canvas-credit-pill:hover {
  background: #ffffff18;
  border-color: #cbb4de59;
  color: #ffffff;
}
.nxora-dot,
.nx-canvas-credit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9d6bff, #ed67b5, #ff8c7b);
  flex-shrink: 0;
}

/* --- 2. Upgraded Commercial Toast --- */
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid #ffffff24;
  background: #1b1823f5;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px #18112438;
}
.nx-toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a56eff;
  flex-shrink: 0;
}
.toast[data-tone="success"] .nx-toast-dot { background: #26b37d; }
.toast[data-tone="warn"] .nx-toast-dot { background: #f09a36; }
.toast[data-tone="error"] .nx-toast-dot { background: #e65a7b; }
.nx-toast-msg {
  font-size: 13px;
  line-height: 1.45;
  color: #f8f6fb;
}
.nx-toast-action {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #ffffff2e;
  background: #ffffff17;
  color: #f4ecff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nx-toast-action:hover {
  background: #ffffff29;
}

/* --- 3. Commercial Split-Screen Login --- */
.login-page {
  min-height: 100dvh;
  padding: 28px;
  background:
    radial-gradient(ellipse 680px 540px at 14% 16%, #e5d2fb8c, transparent 65%),
    radial-gradient(ellipse 580px 500px at 86% 84%, #ffd9d266, transparent 62%),
    #f7f6fa;
}
.nx-login-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(380px, 448px);
  gap: 22px;
  align-items: stretch;
}
.nx-login-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 38px;
  border-radius: 26px;
  color: #f6f2fb;
  background:
    radial-gradient(circle at 88% 14%, #ed67b538, transparent 42%),
    radial-gradient(circle at 12% 92%, #7d3aef42, transparent 48%),
    linear-gradient(150deg, #1f162b 0%, #2f1d42 54%, #41234b 100%);
  border: 1px solid #ffffff1f;
  box-shadow: 0 28px 80px #2b164026;
}
.nx-login-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nx-login-brand {
  color: #ffffff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.6px;
}
.nx-login-edition-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.1px;
  color: #f2e6ff;
  background: #ffffff14;
  border: 1px solid #ffffff24;
}
.nx-login-showcase-hero .eyebrow {
  color: #cbb7df;
  margin-bottom: 10px;
}
.nx-login-showcase-hero h2 {
  margin: 0;
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.24;
  letter-spacing: -1px;
  font-weight: 650;
  color: #ffffff;
}
.nx-login-gradient {
  background: linear-gradient(95deg, #d7b4ff 0%, #ff9ad5 54%, #ffb29f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nx-login-lead {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: #d6c8e4;
  max-width: 52ch;
}
.nx-login-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nx-login-pillar {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border-radius: 16px;
  background: #ffffff0c;
  border: 1px solid #ffffff17;
  backdrop-filter: blur(10px);
}
.nx-login-pillar-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7d3aef40, #ed67b538);
  border: 1px solid #ffffff24;
  color: #f3e6ff;
}
.nx-login-pillar-icon .icon {
  width: 17px;
  height: 17px;
}
.nx-login-pillar strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fbf8ff;
  margin-bottom: 3px;
}
.nx-login-pillar small {
  display: block;
  font-size: 11.5px;
  line-height: 1.55;
  color: #cbbcd9;
}
.nx-login-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #ffffff17;
  font-size: 11.5px;
  color: #bfb0cf;
}
.nx-login-shell .login-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 34px;
  border-radius: 26px;
  background: #ffffffeb;
  border: 1px solid #eadff0;
  box-shadow: 0 24px 72px #4b2d6e12;
  backdrop-filter: blur(22px);
}
.nx-login-mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #1b1823;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 14px;
}
.nx-login-card-head h1 {
  margin: 8px 0 8px;
  font-size: 26px;
  letter-spacing: -.7px;
}
.nx-login-card-head > p:last-child {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.7;
  color: #6f627c;
}
.nx-pwd-field {
  position: relative;
  display: flex;
  align-items: center;
}
.nx-pwd-field input {
  padding-right: 42px;
}
.nx-pwd-toggle {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7c6e89;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nx-pwd-toggle:hover {
  background: #f4eff9;
  color: #3d2c52;
}
.nx-pwd-toggle .icon {
  width: 16px;
  height: 16px;
}
.nx-pwd-meter {
  display: grid;
  gap: 6px;
  margin-top: -6px;
}
.nx-pwd-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.nx-pwd-bars i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #eae2f2;
  transition: background-color .2s ease;
}
.nx-pwd-bars[data-tone="weak"] i.on { background: #d45272; }
.nx-pwd-bars[data-tone="fair"] i.on { background: #d8892b; }
.nx-pwd-bars[data-tone="good"] i.on { background: #7d3aef; }
.nx-pwd-bars[data-tone="strong"] i.on { background: #1a7f5a; }
.nx-pwd-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #786a85;
}
.nx-pwd-meta em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: #5d39bd;
  font-weight: 600;
}
.nx-login-submit {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  margin-top: 4px;
}
.nx-login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #efe9f5;
}
.nx-login-foot .text-button {
  margin: 0;
}
.nx-login-foot small {
  font-size: 11.5px;
  color: #8b7d98;
}
@media (max-width: 940px) {
  .nx-login-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .nx-login-showcase {
    display: none;
  }
  .nx-login-mobile-brand {
    display: inline-flex;
  }
}

/* --- 4. Spotlight Command Palette & Help Center Modal --- */
.modal[data-view="spotlight"] {
  width: min(740px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}
.modal[data-view="spotlight"] .modal-shell {
  padding: 24px 26px 20px;
  background: linear-gradient(155deg, #fffffffa, #fbf8fffa 62%, #fff8f6f7);
}
.nx-spotlight-actions {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  background: #f8f4fc;
  border: 1px solid #eae1f3;
}
.nx-spotlight-actions[hidden] {
  display: none !important;
}
.nx-spotlight-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  color: #7c6d8b;
}
.nx-spotlight-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.nx-spotlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #e3d7ef;
  background: #ffffff;
  color: #282132;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.nx-spotlight-chip:hover,
.nx-spotlight-chip:focus-visible {
  border-color: #bfa0e4;
  background: #f5edfd;
  color: #522ca8;
  transform: translateY(-1px);
}
.nx-spotlight-chip b {
  font-size: 11px;
  font-weight: 600;
  color: #7d3aef;
}
.nx-spotlight-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #ede6f4;
  font-size: 11.5px;
  color: #7f718d;
}
.nx-spotlight-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.nx-spotlight-keys kbd,
.nx-kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #e1d7ec;
  background: #f6f2fa;
  color: #4f415e;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Help Center Modal */
.modal[data-view="help"] {
  width: min(920px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}
.nx-help-center {
  display: grid;
  gap: 20px;
}
.nx-help-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.nx-help-step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #eadff2;
  background: linear-gradient(155deg, #ffffff, #faf6ff);
}
.nx-help-step-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #7d3aef;
  font-variant-numeric: tabular-nums;
}
.nx-help-step h3 {
  margin: 4px 0 5px;
  font-size: 15px;
  letter-spacing: -.3px;
}
.nx-help-step p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: #6b5f78;
}
.nx-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.nx-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #faf8fc;
  border: 1px solid #ece4f3;
  font-size: 12.5px;
  color: #3f354b;
}
@media (max-width: 700px) {
  .nx-shortcut-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 5. Commercial #/overview Command Center --- */
.nx-overview-page {
  display: grid;
  gap: 20px;
}
.nx-readiness-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee7f5;
}
.nx-readiness-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #e7def0;
  background: #ffffffd9;
  color: #3c3248;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.nx-readiness-pill:hover {
  border-color: #cbb2e6;
  background: #faf6ff;
}
.nx-readiness-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9c8cae;
  flex-shrink: 0;
}
.nx-readiness-pill[data-state="ready"] i {
  background: #1a7f5a;
  box-shadow: 0 0 0 3px #1a7f5a1f;
}
.nx-readiness-pill[data-state="warn"] i {
  background: #b26000;
  box-shadow: 0 0 0 3px #b260001c;
}
.nx-readiness-pill[data-state="accent"] i {
  background: #7d3aef;
  box-shadow: 0 0 0 3px #7d3aef1f;
}
.nx-readiness-pill strong {
  font-weight: 600;
  color: #211b29;
}
.nx-readiness-pill span {
  color: #6f627d;
}

/* Sample Kit Banner & Onboarding Card */
.nx-sample-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 15px 20px;
  border-radius: 18px;
  border: 1px solid #e3d1f4;
  background: linear-gradient(120deg, #f8f2ff 0%, #fdf5fa 58%, #fff6f3 100%);
  box-shadow: 0 8px 26px #5d39bd0a;
}
.nx-sample-banner-copy {
  display: grid;
  gap: 3px;
  min-width: 240px;
  flex: 1;
}
.nx-sample-banner-copy strong {
  font-size: 14px;
  color: #271d35;
}
.nx-sample-banner-copy small {
  font-size: 12.5px;
  color: #6a5c78;
  line-height: 1.55;
}

.nx-onboarding-card {
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid #ffffffeb;
  background: linear-gradient(155deg, #ffffffeb, #faf7ffe6);
  box-shadow: 0 10px 32px #4b2d6e07;
  display: grid;
  gap: 14px;
}
.nx-onboarding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.nx-onboarding-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.3px;
}
.nx-onboarding-head p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #71647e;
}
.nx-onboarding-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #5d39bd;
  font-variant-numeric: tabular-nums;
}
.nx-onboarding-bar {
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: #ece4f4;
  overflow: hidden;
}
.nx-onboarding-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d3aef, #ed67b5, #ff8c7b);
  transition: width .25s ease;
}
.nx-onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.nx-onboard-step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
  border-radius: 15px;
  border: 1px solid #eae2f2;
  background: #fcfaff;
  transition: border-color .18s ease, background-color .18s ease;
}
.nx-onboard-step.done {
  border-color: #cce8dc;
  background: #f6fcf9;
}
.nx-onboard-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nx-onboard-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  color: #7d3aef;
  font-variant-numeric: tabular-nums;
}
.nx-onboard-step.done .nx-onboard-num {
  color: #1a7f5a;
}
.nx-onboard-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: #f2ecf9;
  color: #6b5882;
}
.nx-onboard-step.done .nx-onboard-badge {
  background: #eaf7f1;
  color: #1a7f5a;
}
.nx-onboard-step strong {
  display: block;
  font-size: 13.5px;
  color: #201a28;
  margin-bottom: 4px;
}
.nx-onboard-step small {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: #6e617b;
}

/* 4 Quick Creative Launchpad Cards */
.nx-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.nx-launch-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-radius: 19px;
  border: 1px solid #e9e0f2;
  background: linear-gradient(155deg, #ffffffeb, #fbf8ffe3);
  text-align: left;
  font: inherit;
  color: #1b1823;
  cursor: pointer;
  box-shadow: 0 6px 24px #4b2d6e06;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.nx-launch-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #7d3aef, #ed67b5, #ff8c7b);
  opacity: 0;
  transition: opacity .18s ease;
}
.nx-launch-card:hover {
  transform: translateY(-2px);
  border-color: #d2bae8;
  box-shadow: 0 14px 36px #4b2d6e12;
}
.nx-launch-card:hover::before {
  opacity: 1;
}
.nx-launch-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3ebfc, #fdf0f6);
  border: 1px solid #e8daf5;
  color: #6f35d8;
}
.nx-launch-icon .icon {
  width: 19px;
  height: 19px;
}
.nx-launch-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.3px;
}
.nx-launch-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #6c5f79;
}
.nx-launch-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #5d39bd;
}
.nx-launch-cta .icon {
  width: 14px;
  height: 14px;
}

/* Overview Recent Assets & Tasks Split */
.nx-overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
  gap: 18px;
}
.nx-mini-asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.nx-mini-asset {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #eae2f2;
  background: #fcfaff;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, transform .16s ease;
}
.nx-mini-asset:hover {
  border-color: #cfb7e6;
  transform: translateY(-1px);
}
.nx-mini-asset-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: linear-gradient(145deg, #efe7f9, #faecf4 60%, #ffece6);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.nx-mini-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nx-mini-asset-kind {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  background: #ffffffd9;
  color: #5d39bd;
  border: 1px solid #e4d7f2;
}
.nx-mini-asset-meta {
  padding: 9px 11px;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.nx-mini-asset-meta strong {
  font-size: 12px;
  color: #201b28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-mini-asset-meta small {
  font-size: 11px;
  color: #7b6e88;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-mini-task-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid #ece4f3;
  background: #fcfaff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.nx-mini-task-row + .nx-mini-task-row {
  margin-top: 8px;
}
.nx-mini-task-row:hover {
  border-color: #cfb7e6;
  background: #f8f3fd;
}
.nx-mini-task-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.nx-mini-task-main strong {
  font-size: 13px;
  color: #211b29;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-mini-task-main small {
  font-size: 11.5px;
  color: #776985;
}
.nx-mini-task-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  .nx-onboarding-steps,
  .nx-launchpad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nx-overview-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .nx-onboarding-steps,
  .nx-launchpad-grid {
    grid-template-columns: 1fr;
  }
  .nx-mini-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- 6. Commercial #/settings: Brand Kit, Compliance Sandbox & Diagnostics --- */
.nx-settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.nx-settings-pill {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5dcef;
  background: #ffffffcc;
  color: #554865;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.nx-settings-pill:hover {
  border-color: #c8aee4;
  background: #f6f0fc;
  color: #522ca8;
}

.nx-settings-commercial-stack {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.nx-settings-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .95fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1040px) {
  .nx-settings-pair {
    grid-template-columns: 1fr;
  }
}

/* Live Brand Kit Preview Header */
.nx-brand-live-bar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin: 12px 0 16px;
  border-radius: 16px;
  color: #f7f3fc;
  background:
    radial-gradient(circle at 90% 20%, #ed67b538, transparent 48%),
    linear-gradient(135deg, #22172f 0%, #352049 58%, #482651 100%);
  border: 1px solid #ffffff1c;
}
.nx-brand-live-id {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.nx-brand-logo-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #ffffff14;
  border: 1px solid #ffffff29;
}
.nx-brand-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nx-brand-live-copy {
  min-width: 0;
}
.nx-brand-live-copy strong {
  display: block;
  font-size: 16px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-brand-live-copy small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #d2c3e2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-brand-wm-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: #ffffff17;
  border: 1px solid #ffffff26;
  color: #efe4fb;
  white-space: nowrap;
}

.nx-commercial-form {
  display: grid;
  gap: 13px;
}
.nx-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nx-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 680px) {
  .nx-form-grid-2,
  .nx-form-grid-3 {
    grid-template-columns: 1fr;
  }
}
.nx-commercial-form label {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #4f425d;
}
.nx-commercial-form input:not([type="checkbox"]):not([type="range"]),
.nx-commercial-form select,
.nx-commercial-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #dfd4eb;
  background: #ffffff;
  color: #1b1823;
  font: inherit;
  font-size: 13px;
}
.nx-commercial-form textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.6;
}
.nx-commercial-form input[type="range"] {
  width: 100%;
  accent-color: #7d3aef;
}
.nx-inline-switch {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #eae2f2;
  background: #faf8fc;
  cursor: pointer;
}

/* Compliance Sandbox */
.nx-compliance-result {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid #e7ddf1;
  background: #faf8fc;
}
.nx-compliance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.nx-compliance-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.nx-compliance-score strong {
  font-size: 24px;
  letter-spacing: -.6px;
}
.nx-compliance-issue {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #eadff0;
  background: #ffffff;
  display: grid;
  gap: 4px;
  font-size: 12.5px;
}
.nx-compliance-issue[data-severity="high"] {
  border-color: #f0cad5;
  background: #fff9fb;
}
.nx-compliance-clean-box {
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px dashed #c8b2e2;
  background: #f6f1fc;
  font-size: 12.5px;
  line-height: 1.65;
  color: #31263f;
}

/* System Diagnostics Card */
.nx-diag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 980px) {
  .nx-diag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .nx-diag-grid {
    grid-template-columns: 1fr;
  }
}
.nx-diag-tile {
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid #e9e0f2;
  background: #fcfaff;
  display: grid;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.nx-diag-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nx-diag-tile-head strong {
  font-size: 13.5px;
  color: #211b2a;
}
.nx-diag-kv {
  font-size: 12px;
  line-height: 1.6;
  color: #665974;
}
.nx-diag-kv b {
  color: #231c2c;
  font-weight: 600;
}
.nx-cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.nx-cap-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #eff0f4;
  color: #6f667a;
}
.nx-cap-tag.ok {
  background: #eaf7f1;
  color: #1a7f5a;
}
.nx-cap-tag.warn {
  background: #fff5e6;
  color: #b26000;
}
.nx-ping-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid #e6dbf1;
  background: linear-gradient(120deg, #f8f3fe, #fdf7fa);
  font-variant-numeric: tabular-nums;
}

/* --- 7. Billing Local Edition Banner & Collapsible Merchant Guide --- */
.nx-local-edition-banner {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid #e4d6f2;
  background: linear-gradient(135deg, #ffffffeb 0%, #faf5ffeb 64%, #fff6f3e8 100%);
  box-shadow: 0 8px 26px #4b2d6e08;
}
.nx-local-edition-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nx-local-edition-main h4 {
  margin: 8px 0 5px;
  font-size: 16px;
  color: #1f1928;
}
.nx-local-edition-main p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #6b5d78;
  max-width: 68ch;
}
.nx-admin-deploy-details {
  border-top: 1px solid #ece3f4;
  padding-top: 10px;
}
.nx-admin-deploy-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #5b4378;
  list-style: none;
}
.nx-admin-deploy-details summary::-webkit-details-marker {
  display: none;
}
.nx-admin-deploy-details summary small {
  font-weight: 400;
  color: #867794;
}
.nx-admin-deploy-body {
  margin-top: 10px;
}

/* --- 8. Commercial Craftsmanship: Disabled, Selects, Scrollbars, Tabs, Overview Compact & Toolbar --- */
* {
  scrollbar-width: thin;
  scrollbar-color: #d7cae6 transparent;
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d7cae6b8;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #bda7d8;
}

.nx-inline-icon,
.nx-btn-icon {
  width: 14px;
  height: 14px;
  flex: none;
  vertical-align: -2px;
}

.primary-button:disabled,
.ghost-button:disabled,
.soft-button:disabled,
.pill:disabled,
.text-button:disabled {
  opacity: .46;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.primary-button:disabled {
  background: #5b5368;
  color: #f4f1f8;
}

.select,
.field select,
.modal-form select,
.nx-commercial-form select,
.nx-vwb-topbar-left select,
.nx-asset-meta-panel select,
.nx-home-param-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 30px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23685e74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 13px 13px;
}
.select::picker-icon,
.field select::picker-icon,
.modal-form select::picker-icon,
.nx-commercial-form select::picker-icon,
.nx-canvas-product-select::picker-icon,
.nx-home-param-select::picker-icon {
  display: none;
}

.nx-products-page .page-head {
  align-items: flex-start;
  gap: 16px;
}
.nx-product-toolbar {
  justify-content: flex-end;
  gap: 8px;
}
.nx-product-toolbar .search-field {
  min-width: 170px;
  max-width: 210px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}
button:focus-visible {
  outline: 1.5px solid rgba(27, 24, 35, 0.2);
  outline-offset: 2px;
}
.search-field:focus-within,
.prompt-box:focus-within,
.field input:focus,
.field textarea:focus,
.field select:focus,
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus,
.nx-commercial-form input:focus,
.nx-commercial-form textarea:focus,
.nx-commercial-form select:focus {
  border-color: #b794e6 !important;
  box-shadow: 0 0 0 3px #7d3aef14;
}

/* Search results keyboard/hover polish */
.search-result {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  transition: background-color .14s ease, border-color .14s ease;
}
.search-result:hover,
.search-result.is-active,
.nx-spotlight-chip.is-active {
  background: #f3ecfc;
  border-color: #ccb3ea;
  color: #3f246f;
}

/* Notification badge & Attention Drawer spacing */
.notification-button[data-unread-count] i {
  display: none;
}
.notification-button[data-unread-count]::after {
  content: attr(data-unread-count);
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7d3aef, #ed67b5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px #7d3aef38, 0 0 0 1.5px #fff;
}
[data-attention-items] {
  display: grid;
  gap: 10px;
}
[data-task-file] {
  display: grid;
  gap: 8px;
}

/* Single-line commercial page-head & toolbar overflow menu */
.page-head {
  align-items: center;
  margin-bottom: 16px;
}
.page-head h2 {
  font-size: 20px;
  margin: 0 0 3px;
  letter-spacing: -.45px;
}
.page-head p {
  font-size: 12.5px;
  line-height: 1.5;
}
.nx-toolbar-more {
  position: relative;
}
.nx-toolbar-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  border-radius: 14px;
  background: #fffffffa;
  border: 1px solid #e7def0;
  box-shadow: 0 16px 40px #2e1b441f;
  backdrop-filter: blur(16px);
  z-index: 60;
  display: grid;
  gap: 2px;
}
.nx-toolbar-menu[hidden] {
  display: none !important;
}
.nx-toolbar-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  background: transparent;
  color: #3a3047;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: background-color .14s ease, color .14s ease;
}
.nx-toolbar-menu button:hover {
  background: #f4eefb;
  color: #5d39bd;
}

/* Channel tags & badges never wrap mid-word */
.channel-tags {
  flex-wrap: nowrap;
  overflow: hidden;
}
.channel-tag,
.status-badge {
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Global Topbar Breathing Room & Vertical Precision --- */
.topbar {
  min-height: 66px;
  padding: 12px clamp(22px, 2.8vw, 40px);
  align-items: center;
  gap: 14px;
}
.topbar-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.topbar-left .eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1.2;
}
.topbar-left h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.topbar-right {
  align-items: center;
}
.topbar .profile-button {
  height: 40px;
  padding: 3px 11px 3px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar .profile-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.2;
}
.topbar .profile-copy strong {
  font-size: 12.5px;
  line-height: 1.25;
}
.topbar .profile-copy small {
  font-size: 11px;
  line-height: 1.2;
}

/* ==========================================================================
   Gallery-First Commercial Studio Home (#/overview — Figma × 即梦 × Linear)
   Zero Admin-Dashboard Card-itis, Zero Black Brick, Visual Artwork Front-and-Center
   ========================================================================== */
.nx-overview-page.nx-studio-home {
  display: grid;
  gap: 28px;
  padding-top: 6px;
}

/* 1. Floating Creation Composer on Open Canvas */
.nx-home-hero {
  width: min(920px, 100%);
  margin: 4px auto 0;
  display: grid;
  gap: 14px;
}
.nx-home-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nx-home-headline {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.2;
  color: #1b1823;
}
.nx-home-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nx-home-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(27, 24, 35, .08);
  background: rgba(255, 255, 255, .72);
  color: #544962;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.nx-home-status-pill:hover {
  background: #ffffff;
  border-color: #d4c3e8;
  color: #1b1823;
}
.nx-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9f92b0;
  flex-shrink: 0;
}
.nx-status-dot.is-ok {
  background: #1d9a6c;
  box-shadow: 0 0 0 3px rgba(29, 154, 108, .15);
}
.nx-status-dot.is-partial {
  background: #7d3aef;
  box-shadow: 0 0 0 3px rgba(125, 58, 239, .14);
}
.nx-status-dot.is-warn {
  background: #d07814;
  box-shadow: 0 0 0 3px rgba(208, 120, 20, .14);
}
.nx-home-ghost-link {
  border: 0;
  background: transparent;
  padding: 4px 7px;
  border-radius: 7px;
  color: #7c708b;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.nx-home-ghost-link:hover {
  background: rgba(27, 24, 35, .045);
  color: #1b1823;
}

.nx-home-composer {
  background: #ffffff;
  border: 1px solid #e6dff0;
  border-radius: 20px;
  padding: 16px 16px 12px;
  box-shadow: 0 18px 46px -14px rgba(27, 24, 35, .07), 0 2px 6px rgba(27, 24, 35, .03);
  display: grid;
  gap: 10px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.nx-home-composer:focus-within {
  border-color: rgba(27, 24, 35, .2);
  box-shadow: 0 20px 50px -14px rgba(27, 24, 35, .11), 0 2px 8px rgba(27, 24, 35, .04);
}
.nx-home-composer-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nx-home-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 260px;
  padding: 3px 8px 3px 4px;
  border-radius: 9px;
  background: #f5f1fb;
  border: 1px solid #e4d8f2;
  font-size: 11.5px;
  color: #3f3250;
}
.nx-home-ref-chip img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}
.nx-home-ref-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-home-ref-chip button {
  border: 0;
  background: transparent;
  color: #7c6f8b;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.nx-home-composer textarea {
  width: 100%;
  border: 0;
  outline: none !important;
  box-shadow: none !important;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: #1b1823;
  min-height: 50px;
  padding: 2px 4px;
}
.nx-home-composer textarea:focus,
.nx-home-composer textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.nx-home-composer textarea::placeholder {
  color: #9386a2;
}
.nx-home-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #f2edf7;
}
.nx-home-composer-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.nx-home-mode-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: #f4f1f8;
}
.nx-home-mode-btn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #625670;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.nx-home-mode-btn:hover {
  color: #1b1823;
}
.nx-home-mode-btn.is-active {
  background: #ffffff;
  color: #1b1823;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 24, 35, .08);
}
.nx-home-param-select {
  height: 32px;
  min-height: 32px;
  padding: 0 26px 0 10px !important;
  border-radius: 8px;
  border: 1px solid #eae2f1;
  background-color: #faf9fc;
  color: #362e42;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease;
}
.nx-home-param-select:hover {
  border-color: #cbb8e3;
  background-color: #ffffff;
}
.nx-home-param-select.is-optional {
  max-width: 150px;
  text-overflow: ellipsis;
}
.nx-home-ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #eae2f1;
  background: #faf9fc;
  color: #4b3f5a;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.nx-home-ref-btn .icon {
  width: 13.5px;
  height: 13.5px;
}
.nx-home-ref-btn:hover {
  border-color: #cbb8e3;
  background: #ffffff;
  color: #1b1823;
}
.nx-home-submit {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
}
.nx-home-submit .icon {
  width: 14px;
  height: 14px;
}
.nx-home-composer-error {
  margin: 0;
  font-size: 12px;
  color: #b83254;
}
.nx-home-composer-error:empty {
  display: none;
}

.nx-home-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.nx-home-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(27, 24, 35, .08);
  background: rgba(255, 255, 255, .66);
  color: #4a3f58;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.nx-home-quick-chip .icon {
  width: 14px;
  height: 14px;
  color: #6d47b8;
}
.nx-home-quick-chip:hover {
  background: #ffffff;
  border-color: #d2bfe8;
  color: #1b1823;
  transform: translateY(-1px);
}

/* 2. Hero Visual Gallery (Borderless Section on Canvas) */
.nx-home-gallery-section {
  display: grid;
  gap: 14px;
}
.nx-home-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nx-home-sec-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nx-home-sec-left h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.02em;
  color: #1b1823;
}
.nx-home-sec-count {
  font-size: 12px;
  color: #7d708c;
}
.nx-home-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(27, 24, 35, .04);
}
.nx-home-ftab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #655974;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.nx-home-ftab em {
  font-style: normal;
  font-size: 11px;
  opacity: .72;
}
.nx-home-ftab:hover {
  color: #1b1823;
}
.nx-home-ftab.is-active {
  background: #ffffff;
  color: #1b1823;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 24, 35, .07);
}
.nx-home-sec-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nx-gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}
.nx-gal-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #ece8f3;
  border: 1px solid rgba(27, 24, 35, .07);
  box-shadow: 0 2px 10px rgba(34, 20, 56, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nx-gal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 58, 239, .26);
  box-shadow: 0 14px 32px -8px rgba(48, 26, 82, .14);
}
.nx-gal-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nx-gal-open img,
.nx-gal-open video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.nx-gal-card:hover .nx-gal-open img,
.nx-gal-card:hover .nx-gal-open video {
  transform: scale(1.03);
}
.nx-gal-kind-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(17, 19, 27, .72);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
}
.nx-gal-card.is-doc {
  background: linear-gradient(155deg, #ffffff 0%, #f8f5fc 100%);
}
.nx-gal-doc-preview {
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.nx-gal-doc-tag {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f2ecfa;
  color: #6532c9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.nx-gal-doc-preview strong {
  font-size: 13.5px;
  line-height: 1.45;
  color: #1b1823;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nx-gal-doc-preview small {
  font-size: 11.5px;
  color: #7b6f8a;
}

.nx-gal-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(16, 13, 24, .78) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  transition: opacity .16s ease;
  pointer-events: none;
}
.nx-gal-card:hover .nx-gal-overlay,
.nx-gal-card:focus-within .nx-gal-overlay {
  opacity: 1;
}
.nx-gal-card.is-doc .nx-gal-overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(27, 24, 35, .86) 100%);
}
.nx-gal-caption {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}
.nx-gal-caption strong {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-gal-caption small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .74);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-gal-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}
.nx-gal-act {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(17, 19, 27, .68);
  backdrop-filter: blur(8px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .14s ease, border-color .14s ease;
}
.nx-gal-act .icon {
  width: 13.5px;
  height: 13.5px;
}
.nx-gal-act:hover {
  background: #7d3aef;
  border-color: #a678f5;
}

.nx-gal-card.is-live {
  background: linear-gradient(145deg, #f5effe 0%, #fdf4f9 100%);
  border: 1px dashed #c8b0e6;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.nx-gal-live-body {
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.nx-gal-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #dfd0f4;
  border-top-color: #7d3aef;
  animation: nx-spin .85s linear infinite;
}
.nx-gal-live-body strong {
  font-size: 12.5px;
  color: #2b213b;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-gal-live-body small {
  font-size: 11px;
  color: #6e5a8a;
}

.nx-gal-empty {
  padding: 46px 24px;
  border-radius: 16px;
  border: 1px dashed #dfd6eb;
  background: rgba(255, 255, 255, .52);
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.nx-gal-empty-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #f3ecfc;
  color: #7d3aef;
}
.nx-gal-empty-mark .icon {
  width: 20px;
  height: 20px;
}
.nx-gal-empty strong {
  font-size: 15px;
  color: #1b1823;
}
.nx-gal-empty p {
  margin: 0;
  font-size: 12.5px;
  color: #716480;
}
.nx-gal-empty-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 3. Quiet Hairline Ledger (Unified Single Strip, Zero 4-Box Bloat) */
.nx-overview-page .section-grid.nx-home-ledger {
  margin: 0;
  gap: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(27, 24, 35, .07);
  overflow: hidden;
}
.nx-overview-page .section-grid.nx-home-ledger.is-quiet {
  background: rgba(255, 255, 255, .52);
}
.nx-ledger-cell {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 14px 18px !important;
  cursor: pointer;
  position: relative;
  transition: background-color .14s ease;
}
.nx-ledger-cell:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(27, 24, 35, .07);
}
.nx-ledger-cell:hover {
  background: #ffffff !important;
}
.nx-ledger-cell span {
  font-size: 11.5px;
  color: #786c87;
}
.nx-ledger-cell strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.03em;
  color: #1b1823;
  font-variant-numeric: tabular-nums;
}
.nx-ledger-cell small {
  font-size: 11px;
  color: #887c97;
  font-variant-numeric: tabular-nums;
}

/* 4. Borderless Hairline Recent Activity & Quiet Footer */
.nx-home-activity-section {
  display: grid;
  gap: 10px;
}
.nx-ov-activity-list {
  border-radius: 14px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(27, 24, 35, .07);
  overflow: hidden;
}
.nx-ov-activity-row {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(27, 24, 35, .06) !important;
  background: transparent !important;
  padding: 11px 16px !important;
}
.nx-ov-activity-row:last-child {
  border-bottom: 0 !important;
}
.nx-ov-activity-row:hover {
  background: #ffffff !important;
}

.nx-home-footer-meta {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(27, 24, 35, .06);
}
.nx-home-engine-bar {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 4px 12px !important;
}
.nx-home-engine-bar .nx-readiness-pill {
  border: 0;
  background: transparent;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11.5px;
}
.nx-home-engine-bar .nx-readiness-pill:hover {
  background: rgba(27, 24, 35, .04);
}
.nx-ov-setup-drawer {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(27, 24, 35, .07);
  background: rgba(255, 255, 255, .64);
  box-shadow: none;
}
.nx-ov-setup-drawer.is-collapsed {
  padding: 9px 14px;
  gap: 0;
}
.nx-ov-setup-drawer.is-collapsed .nx-onboarding-steps {
  display: none;
}
.nx-ov-setup-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nx-ov-setup-title {
  font-size: 12px;
  font-weight: 600;
  color: #4b3f5a;
}
.nx-onboarding-toggle {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #e4dbf0;
  background: #ffffff;
  color: #5a4b6d;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.nx-onboarding-toggle:hover {
  border-color: #c5a8e5;
  color: #5d39bd;
}

.nx-ref-pick-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 12px;
}
.nx-ref-pick-item {
  border: 1.5px solid #e8e2ee;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  text-align: left;
}
.nx-ref-pick-item.is-active,
.nx-ref-pick-item:hover {
  border-color: #7d3aef;
}
.nx-ref-pick-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.nx-ref-pick-item span {
  padding: 6px 8px;
  font-size: 11px;
  color: #362e42;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .nx-ledger-cell:not(:last-child)::after { display: none; }
  .nx-gal-overlay { opacity: 1; }
}

/* Segmented Commercial Settings Tabs */
.nx-settings-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: #efeaf6d6;
  border: 1px solid #e3daf0;
}
.nx-settings-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: #625571;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.nx-settings-tab:hover {
  color: #271e33;
}
.nx-settings-tab.active {
  background: #ffffff;
  color: #5d39bd;
  font-weight: 600;
  box-shadow: 0 2px 8px #4b2d6e12, inset 0 0 0 1px #ebe2f5;
}
.nx-settings-section[data-tab-hidden="true"] {
  display: none !important;
}

/* Compact Table Empty State Card */
.nx-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  color: #6c5f79;
}
.nx-empty-state-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f3ecfc, #fdf0f6);
  border: 1px solid #e8dcf5;
  color: #7d3aef;
}
.nx-empty-state strong {
  font-size: 14px;
  color: #241c2f;
}
.nx-empty-state small {
  font-size: 12.5px;
  color: #776a85;
  max-width: 42ch;
}
.nx-empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

/* KPI click-to-filter strip on Tasks / Assets */
.nx-kpi-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.nx-kpi-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid #ece4f3;
  background: #ffffffd6;
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.nx-kpi-filter:hover {
  border-color: #cdb6e8;
  background: #fcfaff;
}
.nx-kpi-filter.active {
  border-color: #7d3aef66;
  background: linear-gradient(135deg, #f6f0fe, #fdf6fa);
  box-shadow: 0 4px 16px #5d39bd10;
}
.nx-kpi-filter span {
  font-size: 12px;
  color: #685e74;
}
.nx-kpi-filter strong {
  font-size: 20px;
  font-weight: 600;
  color: #1b1823;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 780px) {
  .nx-kpi-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nx-brief-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  [data-attention-prev],
  [data-attention-next] {
    display: inline-flex !important;
  }
}

/* ============================================================================
 * 9. Stage 7 · Pill & Squircle Hybrid Tactile Controls & Workflow Components
 *    Strict Lock to Nexora Palette (#f7f6fa / #1b1823 / #7d3aef-#ed67b5-#ff8c7b / #11131b)
 * ============================================================================ */

/* --- 9.1 Primary Pill (999px) vs Secondary Squircle (10px) Tactile System --- */
.primary-button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #221f2d 0%, #11131b 100%);
  color: #ffffff;
  border: 1px solid #0d0f16;
  box-shadow: 0 2px 6px rgba(17, 19, 27, 0.16), 0 8px 20px rgba(41, 28, 54, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  line-height: 1;
  transition: transform .15s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.primary-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #2c273c 0%, #161823 100%);
  border-color: #2b2240;
  box-shadow: 0 4px 12px rgba(125, 58, 239, 0.22), 0 10px 24px rgba(27, 24, 35, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.primary-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 1px 3px rgba(17, 19, 27, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.ghost-button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8fc 100%);
  border: 1px solid #e4dceb;
  color: #3d3249;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(42, 24, 66, 0.05), inset 0 1px 0 #ffffff;
  transition: transform .15s var(--ease), background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.ghost-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #f5effb 100%);
  border-color: #cebee2;
  color: #251a34;
  box-shadow: 0 3px 10px rgba(77, 47, 109, 0.09), inset 0 1px 0 #ffffff;
  transform: translateY(-0.5px);
}
.ghost-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
  background: #f3edf9;
  box-shadow: inset 0 1px 2px rgba(42, 24, 66, 0.08);
}

/* Brand Soft Accent (AI & Smart Actions) */
.nx-ai-accent-btn,
.ghost-button.nx-ai-accent-btn {
  background: linear-gradient(135deg, #f6effe 0%, #fdf2f8 100%);
  border: 1px solid #dbc6f2;
  color: #5d39bd;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(125, 58, 239, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.nx-ai-accent-btn:hover:not(:disabled),
.ghost-button.nx-ai-accent-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f1e6fe 0%, #fceaf5 100%);
  border-color: #bc96e8;
  color: #4d29a8;
  box-shadow: 0 4px 14px rgba(125, 58, 239, 0.16), inset 0 1px 0 #ffffff;
}

/* Danger Buttons (DESIGN_SYSTEM.md Rule #6 compliant) */
.primary-button.danger {
  background: linear-gradient(180deg, #fde8ef 0%, #fbe3eb 100%);
  color: #a43c55 !important;
  border: 1px solid #efd7df;
  box-shadow: 0 1px 3px rgba(164, 60, 85, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.primary-button.danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #fbdde7 0%, #f6cedc 100%);
  border-color: #dfaec0;
  box-shadow: 0 4px 12px rgba(164, 60, 85, 0.15);
}
.ghost-button.danger {
  background: linear-gradient(180deg, #ffffff 0%, #fffafb 100%);
  border: 1px solid #ead8df;
  color: #a43c55 !important;
}
.ghost-button.danger:hover:not(:disabled) {
  background: #fff3f7;
  border-color: #d8a2b4;
  box-shadow: 0 2px 8px rgba(164, 60, 85, 0.10);
}

/* Dark Card Soft Buttons */
.soft-button {
  min-height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f6f2fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .15s var(--ease);
}
.soft-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.30);
  transform: translateY(-1px);
}
.soft-button:active:not(:disabled) {
  transform: scale(0.985);
}

/* Text Button Hover Pill + Icon Nudge */
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #644193;
  font-weight: 500;
  line-height: 1.25;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .14s var(--ease);
}
.text-button:hover:not(:disabled) {
  background: #f3ecfa;
  color: #4d29a8;
}
.text-button:active:not(:disabled) {
  transform: scale(0.98);
}
.text-button .icon {
  transition: transform .16s var(--ease);
}
.text-button:hover:not(:disabled) .icon {
  transform: translateX(2px);
}
.text-button.danger {
  color: #a43c55;
}
.text-button.danger:hover:not(:disabled) {
  background: #fcecf1;
  color: #8c2942;
}

/* Compact (32px Squircle) & Micro (28px Squircle) Tiers */
.nx-compact-btn {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
}
.pill.nx-compact-btn {
  border-radius: 999px !important;
}
.nx-micro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e6dfec;
  background: linear-gradient(180deg, #ffffff 0%, #faf8fc 100%);
  color: #463954;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(42, 24, 66, 0.04);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.nx-micro-btn:hover:not(:disabled) {
  background: #f6f0fc;
  border-color: #ccb6e6;
  color: #532fa8;
}
.nx-micro-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.nx-micro-btn.is-primary {
  background: #1b1823;
  border-color: #1b1823;
  color: #ffffff;
}
.nx-micro-btn.is-primary:hover:not(:disabled) {
  background: #2c263b;
  border-color: #2c263b;
  color: #ffffff;
}
.nx-micro-btn.is-accent {
  background: linear-gradient(135deg, #f6effe, #fdf2f8);
  border-color: #dbc6f2;
  color: #5d39bd;
}
.nx-micro-btn.is-danger {
  color: #a43c55;
  border-color: #ebd7df;
}
.nx-micro-btn.is-danger:hover:not(:disabled) {
  background: #fff2f6;
  border-color: #d89fb3;
}
.nx-micro-btn .icon {
  width: 13px;
  height: 13px;
}

/* Uniform SVG icon alignment inside all buttons */
.primary-button .icon,
.ghost-button .icon,
.soft-button .icon,
.pill .icon,
.nx-settings-tab .icon,
.nx-subtab .icon,
.nx-view-btn .icon,
.nx-toolbar-menu .icon {
  width: 14px;
  height: 14px;
  flex: none;
}

/* Filter Pills (999px) Refined */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #e7e0ee;
  background: linear-gradient(180deg, #ffffff 0%, #faf8fc 100%);
  color: #584c65;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(42, 24, 66, 0.03);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease), box-shadow .15s var(--ease);
}
.pill:hover:not(.active):not(:disabled) {
  border-color: #cfbde2;
  background: #f9f5fd;
  color: #2c1f3d;
}
.pill:active:not(:disabled) {
  transform: scale(0.975);
}
.pill.active {
  background: linear-gradient(180deg, #252031 0%, #17141f 100%);
  border-color: #17141f;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(27, 24, 35, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.pill em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1ebf8;
  color: #624782;
  font-variant-numeric: tabular-nums;
}
.pill.active em {
  background: rgba(255, 255, 255, 0.16);
  color: #f3ecfa;
}

/* --- 9.2 Unified Segmented Tracks (Squircle Recessed Rail) --- */
.nx-mode-switch,
.nx-view-switch,
.nx-settings-tabs,
.nx-subtabs,
.nx-account-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #f1ebf8;
  border: 1px solid #e4dbf0;
  box-shadow: inset 0 1px 2px rgba(52, 32, 76, 0.05);
}
.nx-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.nx-mode-btn,
.nx-view-btn,
.nx-settings-tab,
.nx-subtab,
.nx-account-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #625571;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.nx-mode-btn:hover,
.nx-view-btn:hover,
.nx-settings-tab:hover,
.nx-subtab:hover,
.nx-account-tab:hover {
  color: #241b30;
}
.nx-mode-btn.active,
.nx-view-btn.active,
.nx-settings-tab.active,
.nx-subtab.active,
.nx-account-tab.active {
  background: #ffffff;
  color: #5d39bd;
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(75, 45, 110, 0.11), 0 0 0 1px #eae0f4;
}

/* --- 9.3 Unified 38px Topbar Chrome & Search/Select Alignment --- */
.topbar .command-search,
.topbar .nx-credits-pill,
.topbar .icon-button,
.search-field,
.select {
  height: 38px;
  min-height: 38px;
}
.topbar .icon-button {
  width: 38px;
  border-radius: 10px;
  border: 1px solid #ece5f3;
  background: #ffffffc4;
  box-shadow: 0 1px 3px rgba(42, 24, 66, 0.04);
}
.topbar .icon-button:hover {
  background: #ffffff;
  border-color: #d2c1e5;
  box-shadow: 0 3px 10px rgba(77, 47, 109, 0.09);
}
.topbar .command-search,
.topbar .nx-credits-pill {
  border-color: #eae2f1;
  background: #ffffffd6;
  box-shadow: 0 2px 10px rgba(48, 28, 72, 0.04), inset 0 1px 0 #ffffff;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
.topbar .command-search:hover,
.topbar .nx-credits-pill:hover {
  border-color: #cbb8e3;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(77, 47, 109, 0.09);
}
.topbar .profile-button {
  height: 38px;
  padding: 2px 10px 2px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.topbar .profile-button:hover {
  background: #ffffffc8;
  border-color: #e6ddf0;
}
.search-field,
.select {
  border-radius: 10px;
  border-color: #e6dfec;
  box-shadow: 0 1px 2px rgba(42, 24, 66, 0.03);
}

/* Icon Buttons & Modal Close Tactile Polish */
.icon-button {
  border-radius: 10px;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.icon-button:active:not(:disabled) {
  transform: scale(0.95);
}

/* --- 9.4 Pure CSS Button Loading Spinner (.is-loading) --- */
button.is-loading {
  position: relative;
  pointer-events: none;
}
button.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  flex: none;
  animation: nxBtnSpin .65s linear infinite;
}
@keyframes nxBtnSpin {
  to { transform: rotate(360deg); }
}

/* --- 9.5 Row Action Popover Menu (Listings & Products Toolbar More) --- */
.nx-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.nx-row-more-wrap {
  position: relative;
  display: inline-flex;
}
.nx-row-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 156px;
  padding: 5px;
  border-radius: 12px;
  background: #fffffffa;
  border: 1px solid #e6dcf0;
  box-shadow: 0 14px 36px rgba(34, 18, 54, 0.16);
  backdrop-filter: blur(16px);
  z-index: 80;
  display: grid;
  gap: 2px;
}
.nx-row-menu[hidden] {
  display: none !important;
}
.nx-row-menu > button,
.nx-row-menu > a {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 32px !important;
  height: auto !important;
  padding: 6px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #3a3047 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.nx-row-menu > button:hover,
.nx-row-menu > a:hover {
  background: #f4eefb !important;
  color: #5d39bd !important;
  transform: none !important;
}
.nx-row-menu > button.danger:hover {
  background: #fff1f5 !important;
  color: #a43c55 !important;
}

/* Keep Products page-head single-line when overflow menu is active */
.nx-products-page .page-head {
  align-items: center;
}
.nx-product-toolbar {
  flex-wrap: nowrap;
  gap: 8px;
}
@media (max-width: 1180px) {
  .nx-product-toolbar {
    flex-wrap: wrap;
  }
}

/* --- 9.6 Asset Card Hover Quick Actions Bar --- */
.asset-card {
  position: relative;
}
.nx-asset-quickbar {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.asset-card:hover .nx-asset-quickbar,
.asset-card:focus-within .nx-asset-quickbar,
.nx-asset-quickbar.has-fav {
  opacity: 1;
  transform: none;
}
.nx-asset-qbtn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  color: #463954;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(27, 24, 35, 0.14);
  transition: background .14s var(--ease), color .14s var(--ease), transform .12s var(--ease), border-color .14s var(--ease);
}
.nx-asset-qbtn:hover {
  background: #ffffff;
  color: #6c38c7;
  border-color: #d6c2ee;
  transform: translateY(-1px);
}
.nx-asset-qbtn.is-fav {
  color: #d97706;
  background: #fffbeb;
  border-color: #f5d896;
}
.nx-asset-qbtn .icon {
  width: 13px;
  height: 13px;
}

/* --- 9.7 AI Studio Live Queue Strip --- */
.nx-studio-live-rail {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fcfaff;
  border: 1px solid #ece3f3;
  display: grid;
  gap: 8px;
}
.nx-studio-live-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #eee8f3;
}
.nx-studio-live-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #f4eefb;
  color: #6b42b8;
  display: grid;
  place-items: center;
}
.nx-studio-live-thumb img,
.nx-studio-live-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nx-studio-live-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.nx-studio-live-meta strong {
  font-size: 12.5px;
  color: #1b1823;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-studio-live-meta small {
  font-size: 11px;
  color: #685e74;
}

/* --- 9.8 Floating Active Task Progress Pill (Bottom-Right) --- */
.nx-floating-task-pill {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(24, 21, 32, 0.92);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(24, 16, 40, 0.28);
  backdrop-filter: blur(16px);
  font-size: 12.5px;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.nx-floating-task-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(125, 58, 239, 0.28);
}
.nx-floating-task-pill[hidden] {
  display: none !important;
}
.nx-floating-task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a76df7, #ff8c7b);
  box-shadow: 0 0 0 3px rgba(167, 109, 247, 0.26);
  animation: nxPulseDot 1.6s ease-in-out infinite;
}
@keyframes nxPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.25); }
}

.nx-floating-task-label {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-floating-task-pct {
  color: #e6d7ff;
  font-size: 12px;
  font-weight: 700;
}

/* --- 9.9 Products Clean Single-Line Header & Dedicated Control Strip --- */
.nx-products-page .page-head {
  align-items: center;
  gap: 16px;
}
.nx-products-page .nx-product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.nx-products-page .nx-product-toolbar .ghost-button {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 9px;
}
.nx-product-controls-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #ece5f2;
  box-shadow: 0 2px 10px rgba(42, 24, 66, 0.03);
}
.nx-product-controls-strip .search-field {
  flex: 1 1 260px;
  max-width: 420px;
  min-width: 0;
}
.nx-product-controls-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* --- 9.10 Listings 2-Tier Micro Action Stack --- */
.nx-listing-actions-stack {
  display: grid;
  gap: 5px;
  min-width: 210px;
}
.nx-micro-btn.is-quiet {
  min-height: 25px;
  height: 25px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.72);
  border-color: #ece6f3;
  color: #675b75;
  box-shadow: none;
}
.nx-micro-btn.is-quiet:hover:not(:disabled) {
  background: #f6f0fc;
  border-color: #d2bfe8;
  color: #4f2da3;
}

/* Video Studio Drop Active State */
.nx-vwb-card.is-drop-ready {
  border-color: #7d3aef;
  background: #faf6ff;
  box-shadow: 0 0 0 3px rgba(125, 58, 239, 0.14);
}
.nx-vmon-controls {
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf8fc;
  border: 1px solid #ede6f4;
  display: grid;
  gap: 9px;
}

@media (prefers-reduced-motion: reduce) {
  .primary-button,
  .ghost-button,
  .soft-button,
  .text-button,
  .pill,
  .nx-micro-btn,
  .nx-asset-quickbar,
  .nx-floating-task-pill,
  .nx-floating-task-dot,
  button.is-loading::before {
    animation: none !important;
    transition: none !important;
  }
}
