/* =====================================================================
   NEXO — core design system (shell, dashboard, sign-in)
   ===================================================================== */
:root {
  --nx-ink: #07071A;
  --nx-night: #0C0C24;
  --nx-panel: #141530;
  --nx-panel-2: #1B1C3D;
  --nx-line: rgba(255, 255, 255, .09);
  --nx-line-2: rgba(255, 255, 255, .16);
  --nx-text: #F4F3FF;
  --nx-text-2: #C9C7E8;
  --nx-muted: #8D8BB3;
  --nx-violet: #7C3AED;
  --nx-violet-2: #8B5CF6;
  --nx-fuchsia: #DB2777;
  --nx-pink: #EC4899;
  --nx-orange: #F97316;
  --nx-cyan: #22D3EE;
  --nx-green: #22C55E;
  --nx-red: #F43F5E;
  --nx-amber: #F59E0B;
  --nx-grad: linear-gradient(115deg, #7C3AED 0%, #DB2777 55%, #F97316 100%);
  --nx-grad-soft: linear-gradient(115deg, rgba(124, 58, 237, .22), rgba(219, 39, 119, .16) 55%, rgba(249, 115, 22, .14));
  --nx-series-1: #8a6cf0;   /* validated on --nx-panel (dark) */
  --nx-series-2: #1aa5bd;
  --nx-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --nx-mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --nx-shadow: 0 20px 60px rgba(4, 4, 20, .45);
}

[hidden] { display: none !important; }
.nx-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--nx-font); }
.nx-ic { width: 18px; height: 18px; flex: none; }
.nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

*, *::before, *::after { box-sizing: border-box; }

/* ---------- header ---------- */
.nx-header {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 18px;
  height: 64px; padding: 0 max(18px, env(safe-area-inset-left)); color: var(--nx-text);
  background: rgba(9, 9, 30, .86); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--nx-line);
}
.nx-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--nx-grad); background-size: 200% 100%; animation: nx-slide 8s linear infinite; opacity: .9; }
@keyframes nx-slide { to { background-position: 200% 0; } }
.nx-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.nx-logo { width: 38px; height: 38px; filter: drop-shadow(0 6px 18px rgba(219, 39, 119, .45)); transition: transform .3s; }
.nx-brand:hover .nx-logo { transform: rotate(-8deg) scale(1.06); }
.nx-word { display: flex; flex-direction: column; line-height: 1; }
.nx-word strong { font-size: 21px; font-weight: 900; letter-spacing: .08em; background: var(--nx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-word small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--nx-muted); margin-top: 4px; font-weight: 700; }
.nx-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--nx-line); margin-left: 8px; }
.nx-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; color: var(--nx-text-2); text-decoration: none; font-weight: 700; font-size: 14px; transition: background .2s, color .2s; position: relative; }
.nx-tab:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nx-tab.active { color: #fff; background: var(--nx-grad); box-shadow: 0 8px 24px rgba(219, 39, 119, .35); }
.nx-spacer { flex: 1; }
.nx-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--nx-text-2); padding: 0 12px; height: 32px; border-radius: 99px; border: 1px solid var(--nx-line); }
.nx-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--nx-green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: nx-pulse 2s infinite; }
@keyframes nx-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* user menu */
.nx-user { position: relative; }
.nx-avatar-btn { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 4px; border-radius: 99px; border: 1px solid var(--nx-line-2); background: rgba(255, 255, 255, .04); color: var(--nx-text); cursor: pointer; font: inherit; }
.nx-avatar-btn:hover { background: rgba(255, 255, 255, .09); }
.nx-avatar-btn:focus-visible, .nx-btn:focus-visible, .nx-tab:focus-visible { outline: 3px solid rgba(139, 92, 246, .6); outline-offset: 2px; }
.nx-me { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.nx-me strong { font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-me small { font-size: 11px; color: var(--nx-muted); }
.nx-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .02em; background: var(--nx-violet); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); }
.nx-avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.nx-avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.nx-avatar.xl { width: 60px; height: 60px; font-size: 20px; }
.nx-dot-badge { position: absolute; top: 3px; left: 30px; width: 11px; height: 11px; border-radius: 50%; background: var(--nx-red); border: 2px solid var(--nx-night); animation: nx-pulse 1.6s infinite; }
.nx-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; padding: 6px; border-radius: 18px; background: #12132E; border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow); color: var(--nx-text); animation: nx-pop .16s ease; z-index: 70; }
.nx-menu-head { display: flex; gap: 12px; align-items: center; padding: 12px 10px 14px; border-bottom: 1px solid var(--nx-line); margin-bottom: 6px; }
.nx-menu-head div { min-width: 0; display: flex; flex-direction: column; }
.nx-menu-head small { color: var(--nx-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.nx-role { align-self: flex-start; margin-top: 6px; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--nx-text-2); }
.nx-role.superadmin { background: var(--nx-grad); color: #fff; }
.nx-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 11px; background: transparent; color: var(--nx-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; text-decoration: none; }
.nx-item:hover, .nx-item:focus-visible { background: rgba(255, 255, 255, .07); outline: 0; }
.nx-item .nx-ic { color: var(--nx-muted); }
.nx-item.danger, .nx-item.danger .nx-ic { color: #FB7185; }
.nx-sep { height: 1px; background: var(--nx-line); margin: 6px 4px; }
.nx-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--nx-red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- banner (module title on a dark aurora band) ---------- */
.nx-banner { position: relative; overflow: hidden; color: var(--nx-text); background: var(--nx-night); padding: 30px 24px 86px; }
.nx-banner::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 220%; background:
  radial-gradient(520px 220px at 12% 20%, rgba(124, 58, 237, .55), transparent 70%),
  radial-gradient(420px 200px at 60% 0%, rgba(219, 39, 119, .38), transparent 70%),
  radial-gradient(380px 200px at 95% 40%, rgba(249, 115, 22, .28), transparent 70%); filter: blur(10px); animation: nx-aurora 18s ease-in-out infinite alternate; }
.nx-banner::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
@keyframes nx-aurora { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }
.nx-banner-inner { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.nx-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--nx-text-2); }
.nx-kicker i { width: 22px; height: 2px; background: var(--nx-grad); border-radius: 2px; }
.nx-title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -.02em; margin: 6px 0 4px; }
.nx-title span { background: var(--nx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-subtitle { color: var(--nx-text-2); font-size: 15px; max-width: 640px; }
.nx-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-main { position: relative; z-index: 2; width: 100%; max-width: 1280px; margin: -62px auto 0; padding: 0 24px 34px; flex: 1; }

/* ---------- buttons ---------- */
.nx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, box-shadow .2s, background .2s, filter .2s; }
.nx-btn:active { transform: translateY(1px); }
.nx-btn:disabled { opacity: .55; cursor: not-allowed; }
.nx-btn-grad { background: var(--nx-grad); color: #fff; box-shadow: 0 10px 28px rgba(219, 39, 119, .35); }
.nx-btn-grad:hover:not(:disabled) { filter: brightness(1.08) saturate(1.1); box-shadow: 0 12px 34px rgba(219, 39, 119, .5); }
.nx-btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: var(--nx-line-2); backdrop-filter: blur(6px); }
.nx-btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.nx-btn-light { background: #fff; color: #1B1537; border-color: #E4E1F5; }
.nx-btn-light:hover:not(:disabled) { background: #F6F4FF; }
.nx-btn-danger { background: #E11D48; color: #fff; }
.nx-btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.nx-btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.nx-btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #fff; border-color: #fff #fff transparent transparent; animation: nx-spin .7s linear infinite; }
.nx-btn-light.loading::after { border-color: var(--nx-violet) var(--nx-violet) transparent transparent; }
@keyframes nx-spin { to { transform: rotate(360deg); } }
.nx-icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #6B6890; cursor: pointer; }
.nx-icon-btn:hover { background: #F3F1FD; color: #1B1537; }

/* ---------- footer ---------- */
.nx-footer { position: relative; margin-top: auto; background: var(--nx-ink); color: var(--nx-text-2); overflow: hidden; }
.nx-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--nx-grad); }
.nx-footer::after { content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 320px; background: radial-gradient(closest-side, rgba(219, 39, 119, .22), transparent); pointer-events: none; }
.nx-footer-inner { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 26px 24px calc(22px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 22px; align-items: center; }
.nx-footer-brand { display: flex; align-items: center; gap: 12px; }
.nx-footer-brand img { width: 44px; height: 44px; }
.nx-footer-brand strong { display: block; font-size: 18px; letter-spacing: .1em; color: #fff; }
.nx-footer-brand span { font-size: 12px; color: var(--nx-muted); }
.nx-credit { text-align: center; font-size: 14px; }
.nx-credit small { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--nx-muted); margin-bottom: 4px; }
.nx-credit b { font-size: 20px; font-weight: 900; letter-spacing: .01em; background: var(--nx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-footer-links { display: flex; gap: 14px; justify-content: flex-end; font-size: 13px; flex-wrap: wrap; }
.nx-footer-links a { color: var(--nx-text-2); text-decoration: none; }
.nx-footer-links a:hover { color: #fff; }
.nx-footer-links span { color: var(--nx-muted); }

/* ---------- modals (account, users) ---------- */
.nx-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; font-family: var(--nx-font); }
.nx-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 22, .62); backdrop-filter: blur(5px); animation: nx-fade .15s; }
.nx-dialog { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: #1B1537; border-radius: 22px; padding: 24px; box-shadow: var(--nx-shadow); animation: nx-pop .18s cubic-bezier(.2, .9, .3, 1.2); }
.nx-dialog.wide { width: min(1060px, 100%); }
.nx-dialog.sm { width: min(400px, 100%); text-align: center; }
.nx-dialog h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.nx-dialog p { margin: 0; }
.nx-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.nx-dlg-head .nx-muted, .nx-muted { color: #6B6890; font-size: 14px; }
.nx-acc-head { display: flex; align-items: center; gap: 14px; }
.nx-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #F3F1FD; margin-bottom: 18px; }
.nx-seg button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: #6B6890; cursor: pointer; }
.nx-seg button.active { background: #fff; color: var(--nx-violet); box-shadow: 0 2px 8px rgba(27, 21, 55, .12); }
.nx-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
.nx-field label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6B6890; }
.nx-input { width: 100%; height: 46px; padding: 0 14px; box-sizing: border-box; font: inherit; font-size: 15px; color: #1B1537; border: 1px solid #E4E1F5; border-radius: 12px; background: #fff; }
.nx-input:focus { outline: 0; border-color: var(--nx-violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
.nx-input:disabled { background: #F6F5FB; color: #8D8BB3; }
.nx-input.mono, textarea.nx-input { font-family: var(--nx-mono); }
textarea.nx-input { height: auto; padding: 12px 14px; font-size: 12px; resize: vertical; }
.nx-pass { position: relative; }
.nx-pass .nx-input { padding-right: 46px; }
.nx-pass button { position: absolute; right: 6px; top: 6px; }
.nx-hint { font-size: 12px; color: #6B6890; }
.nx-meter { display: flex; align-items: center; gap: 10px; }
.nx-meter span { flex: 1; height: 5px; border-radius: 99px; background: #EEECF8; position: relative; overflow: hidden; }
.nx-meter span::after { content: ""; position: absolute; inset: 0; width: 0; border-radius: 99px; transition: width .25s; }
.nx-meter[data-score="1"] span::after { width: 25%; background: #E11D48; }
.nx-meter[data-score="2"] span::after { width: 50%; background: #F59E0B; }
.nx-meter[data-score="3"] span::after { width: 75%; background: #65A30D; }
.nx-meter[data-score="4"] span::after { width: 100%; background: #16A34A; }
.nx-meter em { font-style: normal; font-size: 12px; font-weight: 800; color: #6B6890; min-width: 64px; text-align: right; }
.nx-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.nx-foot.center { justify-content: center; }
.nx-cf-ic { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: #F3EEFF; color: var(--nx-violet); }
.nx-cf-ic.danger { background: #FFE4E9; color: #E11D48; }
.nx-cf-ic .nx-ic { width: 26px; height: 26px; }
.nx-temp { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 6px; padding: 12px; border: 2px dashed #CBBEFB; border-radius: 14px; background: #F8F5FF; }
.nx-temp code { font-family: var(--nx-mono); font-size: 22px; font-weight: 900; letter-spacing: .06em; user-select: all; }
.nx-new-user { display: grid; grid-template-columns: 1.4fr 1fr 170px auto; gap: 10px; margin-bottom: 16px; padding: 14px; border-radius: 16px; background: var(--nx-grad-soft); border: 1px solid #E9E2FF; }
.nx-new-user .nx-input, .nx-new-user select { height: 42px; }
select.nx-input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%236B6890' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 18px; padding-right: 34px; cursor: pointer; }
.nx-table-wrap { overflow-x: auto; border: 1px solid #ECE9F8; border-radius: 16px; }
.nx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6B6890; padding: 12px 14px; border-bottom: 1px solid #ECE9F8; white-space: nowrap; }
.nx-table td { padding: 12px 14px; border-bottom: 1px solid #F2F0FA; vertical-align: middle; }
.nx-table tr:last-child td { border-bottom: 0; }
.nx-table tr.inactive td { opacity: .55; }
.nx-u { display: flex; align-items: center; gap: 12px; }
.nx-u small { display: block; color: #6B6890; font-size: 12px; }
.nx-you { font-size: 10px; font-weight: 900; text-transform: uppercase; padding: 1px 7px; border-radius: 99px; background: #F3EEFF; color: var(--nx-violet); vertical-align: middle; }
.nx-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #FFF1DE; color: #92400E; }
.nx-chip.req { background: #FFE4E9; color: #BE123C; }
.nx-chip .nx-ic { width: 12px; height: 12px; }
.nx-inline { height: 34px; padding: 0 10px; font: inherit; font-weight: 800; border: 1px solid var(--nx-violet); border-radius: 9px; box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); outline: 0; width: 200px; }
.nx-row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.nx-icon-btn.pulse { color: #E11D48; animation: nx-pulse 1.6s infinite; border-radius: 50%; }
.nx-icon-btn.del:hover { background: #FFE4E9; color: #E11D48; }
.nx-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.nx-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.nx-switch span { width: 40px; height: 23px; border-radius: 99px; background: #D9D5EC; position: relative; transition: background .2s; flex: none; }
.nx-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.nx-switch input:checked + span { background: #16A34A; }
.nx-switch input:checked + span::after { transform: translateX(17px); }
.nx-switch input:disabled + span { opacity: .5; }
.nx-switch em { font-style: normal; font-size: 13px; font-weight: 700; color: #6B6890; }
@keyframes nx-fade { from { opacity: 0; } }
@keyframes nx-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- shell toasts ---------- */
.nx-toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 24px)); font-family: var(--nx-font); }
.nx-toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: #12132E; color: var(--nx-text); border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow); animation: nx-tin .25s cubic-bezier(.2, .9, .3, 1.2); position: relative; overflow: hidden; }
.nx-toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--nx-violet-2); }
.nx-toast.success::before { background: var(--nx-green); }
.nx-toast.error::before { background: var(--nx-red); }
.nx-toast.warning::before { background: var(--nx-amber); }
.nx-toast .t-body { flex: 1; min-width: 0; }
.nx-toast .t-title { font-weight: 800; font-size: 14px; margin: 0; }
.nx-toast .t-msg { font-size: 13px; color: var(--nx-text-2); margin: 2px 0 0; word-break: break-word; }
.nx-toast button { border: 0; background: none; color: var(--nx-muted); cursor: pointer; padding: 2px; }
.nx-toast.out { animation: nx-tout .25s forwards; }
@keyframes nx-tin { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes nx-tout { to { opacity: 0; transform: translateY(-12px); } }

/* ---------- responsive shell ---------- */
@media (max-width: 920px) {
  .nx-live, .nx-me { display: none; }
  .nx-avatar-btn { padding-right: 4px; }
  .nx-footer-inner { grid-template-columns: 1fr; text-align: center; }
  .nx-footer-brand { justify-content: center; }
  .nx-footer-links { justify-content: center; }
  .nx-new-user { grid-template-columns: 1fr 1fr; }
  .nx-new-user .nx-btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --nx-nav-h: calc(62px + env(safe-area-inset-bottom)); }
  html, body { overflow-x: hidden; }
  body { padding-bottom: var(--nx-nav-h); }
  .nx-header { gap: 10px; height: 56px; padding: 0 12px; backdrop-filter: none; background: #0B0B24; }  /* a filter would trap the fixed bottom bar */
  .nx-logo { width: 32px; height: 32px; }
  .nx-word strong { font-size: 19px; }
  .nx-word small { display: none; }
  /* app-style bottom navigation */
  .nx-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; margin: 0; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-radius: 0; border: 0; border-top: 1px solid var(--nx-line-2); background: rgba(9, 9, 30, .96); backdrop-filter: saturate(1.6) blur(14px); }
  .nx-tab { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; height: 50px; padding: 0 2px; border-radius: 12px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
  .nx-tab .nx-ic { width: 21px; height: 21px; }
  .nx-tab.active { box-shadow: none; }
  .nx-banner { padding: 18px 14px 72px; }
  .nx-main { padding: 0 12px 20px; }
  .nx-menu { position: fixed; left: 8px; right: 8px; top: 62px; width: auto; max-height: calc(100vh - 62px - var(--nx-nav-h) - 12px); overflow-y: auto; }
  .nx-toasts { top: 64px; }
}

/* =====================================================================
   Dashboard (dark command center)
   ===================================================================== */
.nx-dark { background: var(--nx-night); color: var(--nx-text); }
.hd-hello { display: flex; align-items: center; gap: 14px; }
.hd-clock { font-family: var(--nx-mono); font-size: 13px; color: var(--nx-text-2); padding: 6px 12px; border-radius: 99px; border: 1px solid var(--nx-line); background: rgba(255, 255, 255, .04); }
.hd-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.hd-card { position: relative; background: linear-gradient(180deg, rgba(27, 28, 61, .92), rgba(20, 21, 48, .96)); border: 1px solid var(--nx-line); border-radius: 22px; padding: 20px; box-shadow: 0 10px 40px rgba(3, 3, 18, .35); min-width: 0; }
.hd-card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.hd-card .hd-sub { margin: 0 0 14px; font-size: 13px; color: var(--nx-muted); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }

.hd-module { overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 24px; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .25s, border-color .25s; min-height: 220px; }
.hd-module::before { content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1px; background: var(--nx-grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; transition: opacity .25s; pointer-events: none; }
.hd-module::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(219, 39, 119, .35), transparent); transition: transform .4s; pointer-events: none; }
.hd-module.pick::after { background: radial-gradient(closest-side, rgba(34, 211, 238, .28), transparent); }
.hd-module:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(124, 58, 237, .3); }
.hd-module:hover::before { opacity: 1; }
.hd-module:hover::after { transform: scale(1.25); }
.hd-mod-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.hd-mod-ic { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: var(--nx-grad); box-shadow: 0 12px 28px rgba(219, 39, 119, .4); color: #fff; }
.hd-module.pick .hd-mod-ic { background: linear-gradient(135deg, #0891B2, #7C3AED); box-shadow: 0 12px 28px rgba(34, 211, 238, .3); }
.hd-mod-ic .nx-ic { width: 26px; height: 26px; }
.hd-mod-top h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.hd-mod-top p { margin: 2px 0 0; color: var(--nx-text-2); font-size: 14px; }
.hd-mod-nums { display: flex; gap: 26px; position: relative; z-index: 1; flex-wrap: wrap; }
.hd-mod-nums div strong { display: block; font-size: 30px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hd-mod-nums div span { font-size: 12px; color: var(--nx-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hd-mod-cta { margin-top: auto; display: flex; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }

.hd-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.hd-tile .lbl { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--nx-muted); display: flex; align-items: center; gap: 8px; }
.hd-tile .lbl .nx-ic { width: 16px; height: 16px; color: var(--nx-violet-2); }
.hd-tile .val { font-size: 34px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.hd-tile .val small { font-size: 15px; color: var(--nx-muted); font-weight: 700; letter-spacing: 0; }
.hd-tile .foot { font-size: 12px; color: var(--nx-text-2); }
.hd-tile.glow { background: var(--nx-grad); border-color: transparent; box-shadow: 0 16px 44px rgba(219, 39, 119, .35); }
.hd-tile.glow .lbl, .hd-tile.glow .foot, .hd-tile.glow .lbl .nx-ic, .hd-tile.glow .val small { color: rgba(255, 255, 255, .86); }

.hd-chart { position: relative; }
.hd-chart svg { width: 100%; display: block; overflow: visible; }
.hd-axis text { font-size: 11px; fill: var(--nx-muted); font-family: var(--nx-font); }
.hd-axis line { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.hd-bar { fill: var(--nx-series-1); transition: opacity .15s; }
.hd-bar.alt { fill: var(--nx-series-2); }
.hd-bars:hover .hd-bar { opacity: .45; }
.hd-bars .hd-hit:hover + .hd-bar, .hd-bars .hd-bar:hover { opacity: 1; }
.hd-val { font-size: 11px; font-weight: 800; fill: var(--nx-text); font-family: var(--nx-font); }
.hd-tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 10px; background: #0A0A22; border: 1px solid var(--nx-line-2); font-size: 12px; color: var(--nx-text); white-space: nowrap; box-shadow: var(--nx-shadow); transform: translate(-50%, calc(-100% - 10px)); }
.hd-tip b { display: block; font-size: 14px; }
.hd-hbars { display: flex; flex-direction: column; gap: 10px; }
.hd-hrow { display: grid; grid-template-columns: 150px 1fr 54px; gap: 12px; align-items: center; font-size: 13px; }
.hd-hrow .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-hrow .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nx-text); font-weight: 700; }
.hd-track { height: 10px; border-radius: 0 4px 4px 0; background: rgba(255, 255, 255, .05); position: relative; }
.hd-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--nx-series-2); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.hd-fill.v { background: var(--nx-series-1); }
.hd-hrow .num { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.hd-empty { color: var(--nx-muted); font-size: 14px; padding: 18px 0; text-align: center; }
.hd-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hd-feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--nx-line); align-items: flex-start; }
.hd-feed li:last-child { border-bottom: 0; }
.hd-feed .what { font-size: 14px; font-weight: 700; }
.hd-feed .what em { font-style: normal; color: var(--nx-text-2); font-weight: 600; }
.hd-feed .det { font-size: 12px; color: var(--nx-muted); margin-top: 2px; word-break: break-word; }
.hd-tag { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; margin-right: 6px; vertical-align: 1px; background: rgba(139, 92, 246, .2); color: #C4B5FD; }
.hd-tag.pick { background: rgba(34, 211, 238, .16); color: #67E8F9; }
.hd-tag.user { background: rgba(255, 255, 255, .08); color: var(--nx-text-2); }
.hd-parts { list-style: none; margin: 0; padding: 0; }
.hd-parts li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--nx-line); }
.hd-parts li:last-child { border-bottom: 0; }
.hd-parts .pn { font-family: var(--nx-mono); font-weight: 800; }
.hd-parts .nm { grid-column: 1; font-size: 12px; color: var(--nx-muted); }
.hd-parts .u { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.hd-racks { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.hd-rack { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--nx-line); }
.hd-rack b { font-family: var(--nx-mono); font-size: 13px; }
.hd-rack .bar { height: 6px; border-radius: 0 3px 3px 0; background: rgba(255, 255, 255, .06); margin: 6px 0 4px; overflow: hidden; }
.hd-rack .bar i { display: block; height: 100%; background: var(--nx-series-1); border-radius: 0 3px 3px 0; }
.hd-rack small { font-size: 11px; color: var(--nx-muted); }
.hd-remote { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.hd-qr { width: 136px; height: 136px; padding: 8px; border-radius: 14px; background: #fff; display: grid; place-items: center; }
.hd-qr img, .hd-qr canvas { width: 120px !important; height: 120px !important; }
.hd-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--nx-line); font-family: var(--nx-mono); font-size: 13px; color: #fff; word-break: break-all; margin: 6px 0; }
.hd-link a { color: #fff; }
.hd-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.hd-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--nx-muted); }
.hd-state.on i { background: var(--nx-green); box-shadow: 0 0 10px var(--nx-green); }
.hd-state.err i { background: var(--nx-red); }
.hd-legend { display: flex; gap: 14px; font-size: 12px; color: var(--nx-text-2); margin-bottom: 8px; }
.hd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hd-legend i { width: 10px; height: 10px; border-radius: 3px; }
.hd-skel { height: 120px; border-radius: 16px; background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%); background-size: 200% 100%; animation: hd-shimmer 1.2s infinite; }
@keyframes hd-shimmer { to { background-position: -200% 0; } }
.hd-count { display: inline-block; }
@media (max-width: 1100px) {
  .span-8, .span-7, .span-6, .span-5 { grid-column: span 12; }
  .span-4 { grid-column: span 6; }
  .span-3 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .span-4, .span-3 { grid-column: span 12; }
  .hd-tile.half { grid-column: span 6; }
  .hd-tile .val { font-size: 28px; }
  .hd-hrow { grid-template-columns: 110px 1fr 44px; }
  .hd-remote { grid-template-columns: 1fr; }
}

/* =====================================================================
   Sign-in
   ===================================================================== */
.nx-login { margin: 0; min-height: 100vh; font-family: var(--nx-font); background: var(--nx-ink); color: var(--nx-text); display: grid; grid-template-columns: 1.1fr 1fr; overflow-x: hidden; }
.nx-login .side { position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.nx-login .side::before { content: ""; position: absolute; inset: -20%; background:
  radial-gradient(600px 400px at 20% 25%, rgba(124, 58, 237, .65), transparent 65%),
  radial-gradient(520px 380px at 75% 15%, rgba(219, 39, 119, .45), transparent 65%),
  radial-gradient(520px 380px at 60% 90%, rgba(249, 115, 22, .32), transparent 65%); filter: blur(20px); animation: nx-aurora 16s ease-in-out infinite alternate; }
.nx-login .side::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 40% 40%, #000, transparent 75%); }
.nx-login .side > * { position: relative; z-index: 1; }
.nx-login .hero { margin: auto 0; max-width: 520px; }
.nx-login .hero img { width: 96px; height: 96px; filter: drop-shadow(0 20px 40px rgba(219, 39, 119, .55)); animation: nx-float 6s ease-in-out infinite; }
@keyframes nx-float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.nx-login .hero h1 { font-size: clamp(52px, 7vw, 86px); font-weight: 900; letter-spacing: .06em; margin: 18px 0 0; line-height: .95; background: linear-gradient(115deg, #fff 10%, #E9D5FF 40%, #FBCFE8 70%, #FED7AA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-login .hero p.tag { font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--nx-text-2); font-weight: 800; margin: 10px 0 0; }
.nx-login .mods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.nx-login .mod { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid var(--nx-line-2); backdrop-filter: blur(10px); }
.nx-login .mod b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.nx-login .mod span { display: block; font-size: 13px; color: var(--nx-text-2); margin-top: 4px; }
.nx-login .mod .nx-ic { color: #F0ABFC; }
.nx-login .credit { font-size: 13px; color: var(--nx-text-2); }
.nx-login .credit b { background: var(--nx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 15px; }
.nx-login .panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 22px; gap: 18px; background: var(--nx-night); }
.nx-login .card { width: min(420px, 100%); background: #fff; color: #1B1537; border-radius: 26px; padding: 34px 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); position: relative; }
.nx-login .card::before { content: ""; position: absolute; inset: -1px; border-radius: 27px; background: var(--nx-grad); z-index: -1; filter: blur(16px); opacity: .5; }
.nx-login .card.shake { animation: nx-shake .4s ease; }
@keyframes nx-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.nx-login .auth-step h2 { font-size: 25px; margin: 0; letter-spacing: -.02em; }
.nx-login .auth-step > .muted { margin: 6px 0 22px; font-size: 14px; color: #6B6890; }
.nx-login .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.nx-login .field label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6B6890; }
.nx-login .input-ic { position: relative; display: flex; align-items: center; }
.nx-login .input-ic > .ic { position: absolute; left: 14px; color: #8D8BB3; width: 18px; height: 18px; pointer-events: none; }
.nx-login input:not([type=checkbox]) { width: 100%; box-sizing: border-box; height: 48px; padding: 0 44px 0 42px; font: inherit; font-size: 15px; color: #1B1537; border: 1px solid #E4E1F5; border-radius: 13px; background: #fff; }
.nx-login input:focus { outline: 0; border-color: var(--nx-violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, .15); }
.nx-login .code-input { text-align: center; padding: 0 !important; font-family: var(--nx-mono) !important; font-size: 26px !important; font-weight: 900; letter-spacing: .5em; height: 58px !important; }
.nx-login .eye { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; background: transparent; color: #8D8BB3; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.nx-login .eye:hover { background: #F3F1FD; color: #1B1537; }
.nx-login .eye .ic { width: 18px; height: 18px; }
.nx-login .label-row { display: flex; justify-content: space-between; align-items: center; }
.nx-login .link { border: 0; background: none; padding: 0; color: var(--nx-violet); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nx-login .link .ic { width: 16px; height: 16px; }
.nx-login .link:hover { text-decoration: underline; }
.nx-login .link.back { margin-bottom: 18px; color: #6B6890; }
.nx-login .link.center { display: flex; margin: 14px auto 0; color: #6B6890; }
.nx-login .caps { font-size: 12px; color: #D97706; font-weight: 700; margin: 0; }
.nx-login .check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 2px 0 20px; cursor: pointer; }
.nx-login .check input { width: 18px; height: 18px; accent-color: var(--nx-violet); }
.nx-login .btn { width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--nx-grad); color: #fff; font: inherit; font-weight: 900; font-size: 16px; letter-spacing: .02em; cursor: pointer; box-shadow: 0 14px 34px rgba(219, 39, 119, .4); position: relative; transition: filter .2s, transform .08s; }
.nx-login .btn:hover { filter: brightness(1.08); }
.nx-login .btn:active { transform: translateY(1px); }
.nx-login .btn.loading { color: transparent; pointer-events: none; }
.nx-login .btn.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border-radius: 50%; border: 2.5px solid #fff; border-color: #fff #fff transparent transparent; animation: nx-spin .7s linear infinite; }
.nx-login .step-ic { width: 54px; height: 54px; border-radius: 17px; background: #F3EEFF; color: var(--nx-violet); display: grid; place-items: center; margin-bottom: 14px; }
.nx-login .step-ic .ic { width: 26px; height: 26px; }
.nx-login .auth-note { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #E8F7EE; color: #15803D; font-size: 14px; }
.nx-login .auth-note .ic { width: 18px; height: 18px; flex: none; }
.nx-login .meter { display: flex; align-items: center; gap: 10px; }
.nx-login .meter span { flex: 1; height: 5px; border-radius: 99px; background: #EEECF8; position: relative; overflow: hidden; }
.nx-login .meter span::after { content: ""; position: absolute; inset: 0; width: 0; transition: width .25s; }
.nx-login .meter[data-score="1"] span::after { width: 25%; background: #E11D48; }
.nx-login .meter[data-score="2"] span::after { width: 50%; background: #F59E0B; }
.nx-login .meter[data-score="3"] span::after { width: 75%; background: #65A30D; }
.nx-login .meter[data-score="4"] span::after { width: 100%; background: #16A34A; }
.nx-login .meter em { font-style: normal; font-size: 12px; font-weight: 800; color: #6B6890; min-width: 60px; text-align: right; }
.nx-login .mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 20px; }
.nx-login .mobile-brand img { width: 40px; height: 40px; }
.nx-login .mobile-brand b { font-size: 22px; letter-spacing: .1em; font-weight: 900; background: var(--nx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-login .foot { font-size: 12px; color: var(--nx-muted); text-align: center; }
.nx-login .foot b { color: var(--nx-text-2); }
.nx-login [hidden] { display: none !important; }
.nx-login #toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 24px)); }
.nx-login .toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: #12132E; color: var(--nx-text); border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow); position: relative; overflow: hidden; animation: nx-tin .25s; }
.nx-login .toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--nx-violet-2); }
.nx-login .toast.success::before { background: var(--nx-green); }
.nx-login .toast.error::before { background: var(--nx-red); }
.nx-login .toast.warning::before { background: var(--nx-amber); }
.nx-login .toast .t-ic { display: none; }
.nx-login .toast .t-body { flex: 1; }
.nx-login .toast .t-title { font-weight: 800; font-size: 14px; margin: 0; }
.nx-login .toast .t-msg { font-size: 13px; color: var(--nx-text-2); margin: 2px 0 0; }
.nx-login .toast .t-close { border: 0; background: none; color: var(--nx-muted); cursor: pointer; }
.nx-login .toast .t-close .ic { width: 16px; height: 16px; }
.nx-login .toast.out { animation: nx-tout .25s forwards; }
@media (max-width: 900px) {
  .nx-login { grid-template-columns: 1fr; }
  .nx-login .side { display: none; }
  .nx-login .mobile-brand { display: flex; }
  .nx-login .panel { min-height: 100vh; background: radial-gradient(500px 300px at 20% 0%, rgba(124, 58, 237, .45), transparent 70%), radial-gradient(400px 300px at 100% 100%, rgba(219, 39, 119, .3), transparent 70%), var(--nx-night); }
  .nx-login .card { padding: 28px 22px; }
}
.nx-login .ic { width: 18px; height: 18px; flex: none; }

/* fixed remote address */
.fx-steps { margin: 4px 0 16px; padding-left: 20px; color: #3D3960; font-size: 14px; line-height: 1.7; }
.fx-steps a { font-weight: 700; color: #7C3AED; }

/* ---------- appearance button ---------- */
.nx-theme-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--nx-line-2); background: rgba(255, 255, 255, .06); color: var(--nx-text-2); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.nx-theme-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: rotate(-12deg); }
.nx-theme-btn .nx-ic { width: 18px; height: 18px; }
[data-theme="dark"] .t-light, [data-theme="light"] .t-dark { display: none; }

/* ---------- activation ---------- */
.nx-lic-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .14); color: #FCD34D; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.nx-lic-chip.off { border-color: rgba(244, 63, 94, .5); background: rgba(244, 63, 94, .16); color: #FDA4AF; }
.nx-lic-chip .nx-ic { width: 15px; height: 15px; }
.nx-lic-state { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; border: 1px solid; }
.nx-lic-state .nx-ic { width: 22px; height: 22px; flex: none; }
.nx-lic-state strong { display: block; font-size: 15px; }
.nx-lic-state small { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.nx-lic-state.on { background: #E7F7F0; border-color: #BFE8D4; color: #065F46; }
.nx-lic-state.warn { background: #FEF3E2; border-color: #FCE3BC; color: #92400E; }
.nx-lic-state.off { background: #FDECEC; border-color: #F7C9C9; color: #991B1B; }
.nx-lic-days { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-pill { height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid #E4DEF7; background: #F8F6FF; color: #3D3960; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.nx-pill.active { background: var(--nx-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(219, 39, 119, .3); }
.nx-foot .nx-spacer { flex: 1; }
.nx-btn-danger-soft { background: #FDECEC; color: #B91C1C; border-color: #F7C9C9; }
.nx-btn-danger-soft:hover:not(:disabled) { background: #FBDADA; }
.nx-btn-danger-soft:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- paused page ---------- */
.nx-locked { max-width: 560px; margin: 40px auto; text-align: center; padding: 44px 28px; border-radius: 26px; background: linear-gradient(180deg, rgba(27, 28, 61, .92), rgba(20, 21, 48, .96)); border: 1px solid var(--nx-line); box-shadow: var(--nx-shadow); position: relative; }
.nx-locked-logo { width: 64px; height: 64px; }
.nx-locked-ic { position: absolute; top: 34px; left: calc(50% + 14px); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #E11D48; color: #fff; box-shadow: 0 0 0 4px var(--nx-panel); }
.nx-locked-ic .nx-ic { width: 17px; height: 17px; }
.nx-locked h1 { margin: 18px 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.nx-locked-why { margin: 0 0 10px; font-weight: 800; color: #FDA4AF; }
.nx-locked-sub { margin: 0 auto 24px; max-width: 420px; color: var(--nx-text-2); line-height: 1.6; }
.nx-locked-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mod-locked .nx-main { margin-top: 0; }
#nx-confirm { z-index: 130; }  /* confirmations always above other dialogs */
.hd-module:not(:has(.hd-mod-nums)) { min-height: 0; }  /* users without reports */
.hd-lan { color: var(--nx-text); }
.hd-warn { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); color: #FCD34D; }
.hd-warn .nx-ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
[data-theme="light"] .hd-warn { background: #FEF3E2; border-color: #FCE3BC; color: #92400E; }
/* detect browser autofill (see core.js) */
input:-webkit-autofill { animation: nx-autofill 1ms; }
@keyframes nx-autofill { from { opacity: 1; } to { opacity: 1; } }
/* dashboard: shipping section */
.hd-section { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.hd-section h2 { margin: 0; font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.hd-section .hd-sub { margin: 4px 0 0; }
.hd-report { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hd-report .nx-input { height: 34px; width: auto; padding: 0 10px; font-size: 13px; }
.mod-home .hd-report .nx-input { background: rgba(255, 255, 255, .06); color: var(--nx-text); border-color: var(--nx-line-2); }
.mod-home .hd-report .nx-input option { color: #1B1537; }
[data-theme="light"] .mod-home .hd-report .nx-input { background: #fff; color: #1B1537; border-color: rgba(27, 21, 55, .16); }
#ch-cust .hd-hrow { grid-template-columns: minmax(160px, 260px) 1fr 44px; }
#ch-cust .who span { font-family: var(--nx-mono); }
#ch-cust .who small { display: block; font-family: var(--nx-font); font-size: 11px; font-weight: 600; color: var(--nx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ch-cust .hd-hrow { align-items: center; }

/* ---------- paginator ---------- */
.nx-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; font-size: 13px; color: var(--muted, #6B6890); border-top: 1px solid var(--border, rgba(27, 21, 55, .1)); }
.nx-pg-nav { display: flex; gap: 4px; align-items: center; }
.nx-pg-n { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border, #E7E3F5); background: var(--surface, #fff); color: var(--text, #1B1537); font: inherit; font-weight: 800; cursor: pointer; }
.nx-pg-n:hover:not(:disabled) { border-color: var(--primary, #7C3AED); color: var(--primary, #7C3AED); }
.nx-pg-n.on { background: var(--nx-grad); color: #fff; border-color: transparent; }
.nx-pg-n:disabled { opacity: .4; cursor: default; }
.nx-pg-gap { padding: 0 4px; }
.nx-pg-size select { height: 32px; margin-left: 6px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--border, #E7E3F5); background: var(--surface, #fff); color: var(--text, #1B1537); font: inherit; font-weight: 700; }
.nx-dialog .nx-pager { --border: #ECE8F7; --surface: #fff; --text: #1B1537; --muted: #6B6890; padding: 10px 2px 0; }
[data-theme="dark"] .nx-dialog .nx-pager { --border: rgba(255, 255, 255, .12); --surface: #1C1D40; --text: #F1F0FF; --muted: #A3A1C9; }
/* FedEx / LTL */
.hd-bar.fx { fill: var(--nx-series-1); }
.hd-bar.ltl { fill: #F59E0B; }
.hd-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--nx-text-2); margin: -4px 0 6px; }
.hd-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hd-legend i.fx { background: var(--nx-series-1); } .hd-legend i.ltl { background: #F59E0B; }
.hd-link { color: inherit; font-weight: 800; text-decoration: none; }
.hd-link:hover { text-decoration: underline; }
.hd-tile .foot .hd-link { all: unset; cursor: pointer; font-weight: 800; color: var(--nx-violet, #8B5CF6); } .hd-tile .foot .hd-link:hover { text-decoration: underline; }
.hd-stale .hd-count, .hd-stale [data-k] { opacity: .55; transition: opacity .3s; }
.nx-xlink { color: #E9D5FF; font-weight: 700; text-decoration: none; white-space: nowrap; } .nx-xlink:hover { text-decoration: underline; } .nx-xlink.dark { color: var(--primary, #7C3AED); font-size: 13px; }

/* rack occupancy: WMS / NEXO extra */
.hd-occ-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hd-seg { display: inline-flex; gap: 6px; }
.hd-seg .nx-pill { height: 32px; padding: 0 12px; font-size: 12.5px; }
.hd-na { font-size: 18px !important; font-weight: 800; opacity: .75; }
.hd-na-box { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding: 18px; border-radius: 14px; border: 1px dashed rgba(124, 58, 237, .35); background: rgba(124, 58, 237, .06); }
.hd-na-box .nx-ic { width: 26px; height: 26px; color: #8B5CF6; flex: none; }
.hd-na-box b { display: block; font-size: 15px; } .hd-na-box span { display: block; font-size: 13px; opacity: .8; }

/* how the orders were picked */
.hd-how-top { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 10px 0 14px; }
.hd-how-total b { display: block; font-size: 30px; font-weight: 900; line-height: 1; }
.hd-how-total span { font-size: 12.5px; opacity: .75; }
.hd-how-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: rgba(124, 58, 237, .1); }
.hd-how-bar i { display: block; height: 100%; } .hd-how-bar i.none { width: 100%; background: transparent; }
.hd-how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hd-how-it { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(124, 58, 237, .14); }
.hd-how-it .dot { width: 12px; height: 12px; border-radius: 4px; margin-top: 5px; flex: none; }
.hd-how-it b { display: block; font-size: 20px; font-weight: 900; } .hd-how-it b small { font-size: 12px; font-weight: 700; opacity: .65; margin-left: 4px; }
.hd-how-it span { display: block; font-weight: 800; font-size: 13.5px; } .hd-how-it > div > small { display: block; font-size: 12px; opacity: .7; }
@media (max-width: 900px) { .hd-how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .hd-how-top { grid-template-columns: 1fr; gap: 8px; } }

.hd-range { display: inline-flex; align-items: center; gap: 6px; }
.hd-range .nx-input { height: 38px; width: 150px; }
@media (max-width: 760px) { .hd-range { width: 100%; } .hd-range .nx-input { flex: 1 1 0; width: auto; min-width: 0; } }

/* user menu in sections + WMS connection */
.nx-msec { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--nx-muted); }
.nx-item-2 { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nx-item-2 small { font-size: 11.5px; font-weight: 600; color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.nx-wms-dot { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #64748B; }
.nx-wms-dot.ok { background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.nx-wms-dot.warn { background: #F59E0B; box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.nx-wms-dot.bad { background: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .2); }
.nx-wms-st { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(124, 58, 237, .07); margin-bottom: 12px; }
.nx-wms-st .nx-wms-dot { margin: 0; }
.nx-wms-st b { display: block; font-size: 14.5px; } .nx-wms-st small { display: block; font-size: 12.5px; opacity: .75; }
.nx-wms-how { margin: 0 0 10px; font-size: 13.5px; }
.nx-wms-how summary { cursor: pointer; font-weight: 800; padding: 4px 0; }
.nx-wms-how ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.nx-wms-how kbd { font-family: var(--nx-mono); font-size: 12px; padding: 1px 6px; border: 1px solid rgba(124, 58, 237, .25); border-radius: 6px; }
.nx-wms-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.nx-wms-check.ok { background: #DCFCE7; color: #166534; } .nx-wms-check.warn { background: #FEF3E2; color: #92400E; } .nx-wms-check.bad { background: #FEE2E2; color: #B91C1C; }
.nx-wms-found { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; font-family: var(--nx-mono); font-size: 12px; }
.nx-wms-found .y { color: #15803D; } .nx-wms-found .n { color: #9CA3AF; }

.nx-wms-badge { display: flex; align-items: center; gap: 10px; width: calc(100% - 8px); margin: 2px 4px 6px; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--nx-line-2); background: rgba(255, 255, 255, .04); color: var(--nx-text); font: inherit; font-size: 13px; text-align: left; }
button.nx-wms-badge { cursor: pointer; } button.nx-wms-badge:hover { background: rgba(255, 255, 255, .08); }
.nx-wms-badge .nx-wms-dot { margin: 0; }
.nx-wms-badge b { font-weight: 900; letter-spacing: .04em; }
.nx-wms-badge.ok { border-color: rgba(34, 197, 94, .35); } .nx-wms-badge.warn { border-color: rgba(245, 158, 11, .45); } .nx-wms-badge.bad { border-color: rgba(239, 68, 68, .45); }
