/* Novatech portal — Bootstrap 5.3 light + custom layer. Motion respects prefers-reduced-motion. */
:root {
  --nx-bg: #f4f6fb;
  --nx-card: #ffffff;
  --nx-card-solid: #ffffff;
  --nx-soft: #f6f7fc;
  --nx-line: #e2e6ef;
  --nx-line2: #d3d9e6;
  --nx-text: #0e1430;
  --nx-muted: #4a5470;
  --nx-p1: #6d4cff;
  --nx-p2: #2f80ff;
  --nx-pink: #ec4899;
  --nx-gold: #a86200;
  --nx-gold-bg: #fff6e5;
  --nx-ok: #10b981;
  --nx-warn: #f59e0b;
  --nx-bad: #ef4444;
  --nx-grad: linear-gradient(135deg, var(--nx-p1), var(--nx-p2));
  --nx-shadow: 0 1px 2px rgba(22, 27, 51, .04), 0 12px 32px -14px rgba(40, 52, 110, .18);
  --nx-shadow-lg: 0 2px 4px rgba(22, 27, 51, .04), 0 28px 60px -24px rgba(40, 52, 110, .28);
  --nx-radius: 18px;
  --nx-ease: cubic-bezier(.22, 1, .36, 1);
  --bs-body-bg: var(--nx-bg);
  --bs-body-color: var(--nx-text);
  --bs-body-font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-border-color: var(--nx-line2);
  --bs-secondary-color: var(--nx-muted);
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color-rgb: 55, 48, 163;
}
html { -webkit-text-size-adjust: 100%; }
/* crisp text: no letter squeeze, no glass (backdrop-filter) behind text, solid dark colours */
body { background: var(--nx-bg); color: var(--nx-text); min-height: 100vh; letter-spacing: 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
small, .small { font-size: .875rem; }
a { text-decoration: none; }
::selection { background: rgba(109, 76, 255, .2); }
.text-secondary { color: var(--nx-muted) !important; }

/* ------------------------------------------------------------------ animated background */
.nx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1100px 650px at 88% -12%, rgba(47, 128, 255, .13), transparent 60%), radial-gradient(900px 600px at -12% 108%, rgba(109, 76, 255, .12), transparent 60%), var(--nx-bg); }
.nx-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; animation: nx-float 18s var(--nx-ease) infinite alternate; }
.nx-orb.o1 { width: 420px; height: 420px; background: #a78bfa; top: -160px; left: 30%; }
.nx-orb.o2 { width: 360px; height: 360px; background: #7dd3fc; bottom: -120px; right: 8%; animation-duration: 22s; }
.nx-orb.o3 { width: 260px; height: 260px; background: #f9a8d4; top: 45%; left: -90px; opacity: .25; animation-duration: 26s; }
.nx-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(40, 52, 110, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 52, 110, .05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 72%); }
@keyframes nx-float { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.12); } }

/* ------------------------------------------------------------------ entrance motion */
.nx-rise { opacity: 0; transform: translateY(14px); animation: nx-rise .7s var(--nx-ease) forwards; animation-delay: var(--d, 0s); }
.nx-pop { opacity: 0; transform: translateY(18px) scale(.98); animation: nx-rise .8s var(--nx-ease) .1s forwards; }
@keyframes nx-rise { to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ brand */
.nx-brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.15rem; color: var(--nx-text); }
.nx-brand:hover { color: var(--nx-text); }
.nx-logo { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: var(--nx-grad);
  box-shadow: 0 8px 20px -6px rgba(109, 76, 255, .55), inset 0 1px 0 rgba(255,255,255,.3); }
.nx-logo.sm { width: 32px; height: 32px; border-radius: 10px; font-size: .9rem; }
.nx-grad { background: linear-gradient(90deg, #6d4cff, #2f80ff, #ec4899, #6d4cff); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 300% 100%; animation: nx-sheen 8s linear infinite; }
@keyframes nx-sheen { to { background-position: 300% 0; } }

/* ------------------------------------------------------------------ buttons */
.btn { border-radius: 12px; font-weight: 600; transition: transform .2s var(--nx-ease), box-shadow .25s var(--nx-ease), background .25s, border-color .25s, color .25s; }
.btn:active { transform: translateY(1px) scale(.99); }
.nx-btn-primary { position: relative; overflow: hidden; color: #fff; border: 0; background: var(--nx-grad); box-shadow: 0 10px 24px -10px rgba(109, 76, 255, .75); }
.nx-btn-primary:hover, .nx-btn-primary:focus-visible { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(109, 76, 255, .85); }
.nx-btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--nx-ease); }
.nx-btn-primary:hover::after { transform: translateX(120%); }
.nx-btn-primary:disabled { color: #fff; opacity: .6; transform: none; }
.nx-btn-ghost { color: var(--nx-text); background: #fff; border: 1px solid var(--nx-line2); }
.nx-btn-ghost:hover { color: var(--nx-p1); background: #fff; border-color: rgba(109, 76, 255, .45); box-shadow: 0 6px 16px -10px rgba(109, 76, 255, .6); }
.nx-btn-soft { color: #4f3bd6; background: rgba(109, 76, 255, .09); border: 1px solid rgba(109, 76, 255, .2); }
.nx-btn-soft:hover { color: #3b2bb0; background: rgba(109, 76, 255, .16); border-color: rgba(109, 76, 255, .35); }
.nx-btn-danger { color: #fff; background: linear-gradient(135deg, #ef4444, #e11d74); border: 0; box-shadow: 0 10px 24px -12px rgba(239, 68, 68, .8); }
.nx-btn-danger:hover { color: #fff; transform: translateY(-1px); }
.is-busy .nx-btn-label { opacity: .7; }

/* ------------------------------------------------------------------ forms */
.form-control, .form-select, .input-group-text { background: #fff; border: 1px solid var(--nx-line2); color: var(--nx-text); border-radius: 12px; }
.input-group-text { background: var(--nx-soft); color: var(--nx-muted); }
.form-control::placeholder { color: #a3abc2; }
.form-control:focus, .form-select:focus { background: #fff; border-color: rgba(109, 76, 255, .6); box-shadow: 0 0 0 .25rem rgba(109, 76, 255, .12); color: var(--nx-text); }
.form-floating > label { color: var(--nx-muted); }
.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label { color: #5b45e0; }
.form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: transparent; }
.input-group > .form-control, .input-group > .btn, .input-group > .input-group-text { border-radius: 12px; }
.input-group > :not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nx-pass { position: relative; }
.nx-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--nx-muted); width: 38px; height: 38px; border-radius: 10px; }
.nx-eye:hover { color: var(--nx-p1); background: rgba(109, 76, 255, .08); }

/* ------------------------------------------------------------------ auth screen */
body.nx-auth { overflow-x: hidden; }
.nx-auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.nx-auth-col { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.nx-auth-brand { font-size: 1.3rem; }
.nx-auth-card { width: 100%; padding: 34px 30px; border-radius: 24px; background: #fff; border: 1px solid var(--nx-line); box-shadow: var(--nx-shadow-lg); }
.nx-auth-head h2 { font-weight: 800; font-size: 1.75rem; margin: 0 0 6px; }
.nx-auth-head p { color: var(--nx-muted); margin: 0 0 22px; }
.nx-auth-foot { margin: 20px 0 0; font-size: .82rem; color: var(--nx-muted); line-height: 1.55; }
.nx-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--nx-soft); border: 1px solid var(--nx-line); }
.nx-seg a { position: relative; z-index: 1; text-align: center; padding: 9px; border-radius: 10px; color: var(--nx-muted); font-weight: 600; transition: color .25s; }
.nx-seg a:hover { color: var(--nx-text); }
.nx-seg a.active { color: #fff; }
.nx-seg-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--nx-grad); box-shadow: 0 6px 16px -6px rgba(109,76,255,.7); transition: transform .45s var(--nx-ease); }
.nx-seg a.active:nth-child(2) ~ .nx-seg-ink { transform: translateX(100%); }
.nx-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--nx-muted); font-size: .82rem; }
.nx-or::before, .nx-or::after { content: ""; flex: 1; height: 1px; background: var(--nx-line2); }
.nx-socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nx-socials.n1 { grid-template-columns: 1fr; }
.nx-socials.n2 { grid-template-columns: 1fr 1fr; }
.nx-social { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 8px; font-size: .92rem; border: 1px solid var(--nx-line2); background: #fff; color: var(--nx-text); }
.nx-social i { font-size: 1.15rem; line-height: 1; }
.nx-social:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(40,52,110,.55); }
.nx-social-google:hover { color: var(--nx-text); border-color: #c9d3e6; background: #fff; }
.nx-social-facebook { color: #fff; background: #1877f2; border-color: #1877f2; }
.nx-social-facebook:hover { color: #fff; background: #166fe5; border-color: #166fe5; }
.nx-social-apple { color: #fff; background: #000; border-color: #000; }
.nx-social-apple:hover { color: #fff; background: #1d1d1f; border-color: #1d1d1f; }
.nx-social.is-busy { pointer-events: none; opacity: .7; }
.nx-oauth-wait { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; background: rgba(244, 246, 251, .9); }
.nx-oauth-wait[hidden] { display: none; }
.nx-oauth-wait > div { display: flex; align-items: center; gap: 14px; padding: 18px 26px; border-radius: 18px; background: #fff; border: 1px solid var(--nx-line); box-shadow: var(--nx-shadow-lg); }
.nx-oauth-wait .spinner-border { color: var(--nx-p1); width: 1.6rem; height: 1.6rem; }

/* ------------------------------------------------------------------ app shell */
.nx-app { padding-bottom: 0; }
.nx-side { position: fixed; inset: 0 auto 0 0; width: 252px; flex-direction: column; padding: 22px 16px; background: #fff; border-right: 1px solid var(--nx-line); z-index: 30; }
.nx-side .nx-brand { padding: 4px 8px 22px; }
.nx-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nx-nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #3b4462; font-weight: 600; transition: background .25s, color .25s, transform .25s var(--nx-ease); }
.nx-nav-link i { font-size: 1.1rem; }
.nx-nav-link:hover { color: var(--nx-text); background: var(--nx-soft); transform: translateX(3px); }
.nx-nav-link.active { color: #4f3bd6; background: linear-gradient(90deg, rgba(109, 76, 255, .12), rgba(47, 128, 255, .04)); }
.nx-nav-link.active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--nx-grad); }
.nx-side-foot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--nx-soft); border: 1px solid var(--nx-line); }
.nx-avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: rgba(109, 76, 255, .1); border: 1px solid rgba(109, 76, 255, .2); color: #4f3bd6; flex: none; }
.nx-avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.6rem; background: var(--nx-grad); border: 0; color: #fff; box-shadow: 0 12px 28px -10px rgba(109,76,255,.7); }
.nx-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nx-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-who small { color: var(--nx-muted); }
.nx-main { min-height: 100vh; }
@media (min-width: 992px) { .nx-main { margin-left: 252px; } }
.nx-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 3vw, 32px);
  background: #fff; border-bottom: 1px solid var(--nx-line); }
.nx-chip { align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--nx-line); font-size: .9rem; }
.nx-content { padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 32px) 120px; }
@media (min-width: 992px) { .nx-content { padding-bottom: 48px; } }
.nx-page-h { margin-bottom: 22px; }
.nx-page-h h1 { font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 0 0 6px; letter-spacing: -.02em; }
.nx-page-h p { color: var(--nx-muted); margin: 0; max-width: 720px; }

/* bottom tab bar (phones / tablets) */
.nx-tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px;
  border-radius: 20px; background: #fff; border: 1px solid var(--nx-line2); box-shadow: 0 18px 44px -16px rgba(40, 52, 110, .35); }
.nx-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; color: #3b4462; font-size: .72rem; font-weight: 600; transition: color .25s, background .25s; }
.nx-tab i { font-size: 1.2rem; transition: transform .35s var(--nx-ease); }
.nx-tab.active { color: #4f3bd6; background: rgba(109, 76, 255, .1); }
.nx-tab.active i { transform: translateY(-1px) scale(1.08); }

/* ------------------------------------------------------------------ cards */
.nx-card { position: relative; padding: clamp(18px, 2.2vw, 26px); border-radius: var(--nx-radius); background: var(--nx-card); border: 1px solid var(--nx-line); box-shadow: var(--nx-shadow); }
.nx-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.nx-card-h h3, .nx-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.nx-card h3 > i { color: var(--nx-p1); }
.nx-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 18px 0 22px; }
.nx-dl dt { color: var(--nx-muted); font-weight: 500; }
.nx-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.nx-profile-top { display: flex; align-items: center; gap: 16px; }
.nx-profile-top h2 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.nx-danger { border-color: rgba(239, 68, 68, .25); background: linear-gradient(90deg, rgba(254, 242, 242, .9), rgba(255,255,255,.9)); }

.badge { font-weight: 600; padding: .45em .75em; border-radius: 999px; }
.nx-badge-ok { background: #e7f8f1; color: #047857; border: 1px solid #b7ebd6; }
.nx-badge-wait { background: #fff5e0; color: #b45309; border: 1px solid #fcdca0; }
.nx-badge-info { background: #eaf2ff; color: #1d5fd1; border: 1px solid #c6dafc; }
.nx-badge-off { background: #f1f3f7; color: #5b6478; border: 1px solid #dfe3eb; }
.nx-tag { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--nx-gold-bg); color: var(--nx-gold); border: 1px solid #fcdca0; }
.nx-tag.off { background: #f1f3f7; color: #5b6478; border-color: #dfe3eb; }
.nx-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--nx-ok); box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.nx-dot.ok { animation: nx-pulse 2.4s ease-in-out infinite; }
.nx-dot.warn { background: var(--nx-warn); box-shadow: 0 0 0 4px rgba(245, 158, 11, .15); }
.nx-dot.off { background: #a3abc0; box-shadow: none; }
@keyframes nx-pulse { 50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, .06); } }

/* characters + servers */
.nx-role { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--nx-line); transition: transform .3s var(--nx-ease), border-color .3s, box-shadow .3s; }
.nx-role:hover { transform: translateY(-2px); border-color: rgba(109, 76, 255, .35); box-shadow: 0 14px 30px -18px rgba(109, 76, 255, .5); }
.nx-role-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: var(--nx-gold); background: linear-gradient(135deg, #fff3d6, #fffaf0); border: 1px solid #fbe0a8; flex: none; }
.nx-role-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.nx-role-t b { font-size: 1.02rem; }
.nx-role-t span { color: var(--nx-muted); font-size: .85rem; }
.nx-srv { display: inline-flex; align-items: center; gap: 7px; color: #4f3bd6 !important; font-weight: 600; }
.nx-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.nx-server { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--nx-line); }
.nx-server b { flex: 1; font-weight: 600; }
.nx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 16px; color: var(--nx-muted); }
.nx-empty i { font-size: 2.2rem; color: #b3bad0; margin-bottom: 4px; }
.nx-empty b { color: var(--nx-text); }

/* ------------------------------------------------------------------ top-up wizard */
.nx-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 0 0 26px; counter-reset: s; }
.nx-steps li { position: relative; display: flex; align-items: center; gap: 10px; color: var(--nx-muted); font-weight: 600; font-size: .9rem; }
.nx-steps li span { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--nx-line2); flex: none; transition: all .4s var(--nx-ease); }
.nx-steps li::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--nx-line2); margin-right: 6px; }
.nx-steps li:last-child::after { display: none; }
.nx-steps li.active, .nx-steps li.done { color: var(--nx-text); }
.nx-steps li.active span { color: #fff; background: var(--nx-grad); border-color: transparent; box-shadow: 0 8px 18px -8px rgba(109,76,255,.8); transform: scale(1.06); }
.nx-steps li.done span { background: #e7f8f1; border-color: #9fe2c6; color: #047857; }
.nx-steps li.done::after { background: linear-gradient(90deg, #10b981, rgba(109,76,255,.6)); }
.nx-step { display: none; }
.nx-step.active { display: block; animation: nx-step .5s var(--nx-ease); }
.nx-step.back.active { animation-name: nx-step-back; }
@keyframes nx-step { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes nx-step-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.nx-step h3 { margin-bottom: 16px; }
.nx-step h3 small { color: var(--nx-muted); font-weight: 500; font-size: .85rem; margin-left: 6px; }
.nx-step-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.nx-step-h h3 { margin: 0; }
.nx-grid-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.nx-pick { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; text-align: left; color: var(--nx-text); background: #fff; border: 1px solid var(--nx-line2);
  transition: transform .3s var(--nx-ease), border-color .3s, background .3s, box-shadow .3s; }
.nx-pick b { flex: 1; font-weight: 600; }
.nx-pick small { color: var(--nx-muted); display: block; font-weight: 500; }
.nx-pick:hover:not(.disabled) { transform: translateY(-2px); border-color: rgba(109, 76, 255, .45); box-shadow: 0 14px 28px -18px rgba(109,76,255,.7); }
.nx-pick.sel { background: linear-gradient(#f7f5ff, #f7f5ff) padding-box, var(--nx-grad) border-box; border: 1.5px solid transparent; box-shadow: 0 12px 26px -18px rgba(109,76,255,.8); }
.nx-pick.disabled { opacity: .5; cursor: not-allowed; background: var(--nx-soft); }
.nx-pick .nx-role-ic { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; }
.nx-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.nx-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px 18px; border-radius: 18px; color: var(--nx-text); text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #fff4dc, transparent 62%), #fff; border: 1px solid var(--nx-line2);
  transition: transform .35s var(--nx-ease), border-color .3s, box-shadow .35s; }
.nx-pack:hover { transform: translateY(-4px); border-color: #f5c56a; box-shadow: 0 22px 40px -24px rgba(217, 140, 10, .55); }
.nx-pack .nx-gem { font-size: 2rem; color: #e39400; filter: drop-shadow(0 6px 10px rgba(227, 148, 0, .3)); transition: transform .5s var(--nx-ease); }
.nx-pack:hover .nx-gem { transform: rotate(-8deg) scale(1.12); }
.nx-pack b { font-weight: 700; }
.nx-pack .nx-price { font-weight: 800; font-size: 1.1rem; color: #4330c9; }
.nx-pack .nx-bonus { font-size: .75rem; color: #059669; font-weight: 600; min-height: 1.1em; }
.nx-pack .nx-hot { position: absolute; top: 10px; right: 10px; font-size: .65rem; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #f97316, #ec4899); }
.nx-pack.sel { border-color: #f0a500; box-shadow: 0 0 0 3px rgba(240, 165, 0, .18), 0 22px 40px -24px rgba(217, 140, 10, .6); }
.nx-confirm { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--nx-soft); border: 1px solid var(--nx-line); }
.nx-confirm div { display: flex; justify-content: space-between; gap: 12px; }
.nx-confirm span { color: var(--nx-muted); }
.nx-confirm .nx-total { padding-top: 10px; border-top: 1px dashed var(--nx-line2); font-size: 1.15rem; font-weight: 800; }
.nx-skel { height: 72px; border-radius: 16px; background: linear-gradient(90deg, #eef0f6, #f8f9fc, #eef0f6); background-size: 200% 100%; animation: nx-skel 1.2s linear infinite; }
@keyframes nx-skel { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ checkout / bank */
.nx-amount { font-size: clamp(1.9rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; color: var(--nx-text); }
.nx-pack-name { color: var(--nx-gold); font-weight: 600; margin-top: 2px; }
.nx-pay { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.nx-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.nx-qr img { width: 220px; height: 220px; border-radius: 18px; background: #fff; padding: 10px; border: 1px solid var(--nx-line); box-shadow: 0 18px 40px -22px rgba(109,76,255,.6); animation: nx-qr 3.6s ease-in-out infinite; }
.nx-qr span { color: var(--nx-muted); font-size: .82rem; }
@keyframes nx-qr { 50% { box-shadow: 0 20px 48px -18px rgba(47,128,255,.6); } }
.nx-bankinfo { display: grid; gap: 8px; }
.nx-copy { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 13px; background: var(--nx-soft); border: 1px solid var(--nx-line); }
.nx-copy span { grid-column: 1; color: var(--nx-muted); font-size: .82rem; font-weight: 500; }
.nx-copy b { grid-column: 1; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-copy > .btn, .nx-copy > i { grid-column: 2; grid-row: 1 / span 2; }
.nx-copy.hl { border-color: #f8d38a; background: var(--nx-gold-bg); }
.nx-copy.hl b { color: var(--nx-gold); letter-spacing: .03em; }
.nx-copy .btn.copied { color: #047857; border-color: #9fe2c6; background: #e7f8f1; }
.nx-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 13px; font-size: .88rem; color: #33405f; background: #eef4ff; border: 1px solid #cfe0fd; }
.nx-note i { color: #2f6fe0; margin-top: 1px; }
.nx-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.nx-progress div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; font-size: .78rem; font-weight: 600; color: var(--nx-muted); background: var(--nx-soft); border: 1px solid var(--nx-line); transition: all .5s var(--nx-ease); }
.nx-progress i { font-size: 1.2rem; }
.nx-progress .on { color: #4f3bd6; border-color: rgba(109,76,255,.35); background: #f5f3ff; }
.nx-progress .done { color: #047857; border-color: #9fe2c6; background: #e7f8f1; }
.nx-success { text-align: center; padding: 26px 10px 10px; }
.nx-success p { color: var(--nx-muted); }
.nx-check { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; color: #fff; background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 0 0 10px rgba(16,185,129,.12), 0 20px 44px -16px rgba(5,150,105,.7); animation: nx-pop-in .7s var(--nx-ease); }
@keyframes nx-pop-in { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.1); } to { transform: scale(1); opacity: 1; } }
.nx-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nx-amt { padding: 16px 10px; border-radius: 14px; font-weight: 700; color: var(--nx-text); background: #fff; border: 1px solid var(--nx-line2); transition: all .3s var(--nx-ease); }
.nx-amt:hover { transform: translateY(-2px); border-color: rgba(109,76,255,.45); color: #4f3bd6; }
.nx-amt.active { color: #fff; border-color: transparent; background: var(--nx-grad); box-shadow: 0 12px 26px -14px rgba(109,76,255,.85); }
.nx-bank-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.nx-bank-top > i { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, #059669, #0ea5e9); box-shadow: 0 10px 22px -10px rgba(5,150,105,.7); }
.nx-bank-top div { display: flex; flex-direction: column; }
.nx-bank-top span { color: var(--nx-muted); font-size: .85rem; }
.nx-bankcard .nx-qr { margin-bottom: 18px; }

/* orders */
.nx-orders { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.nx-order { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 15px; color: var(--nx-text); background: #fff; border: 1px solid var(--nx-line); transition: transform .3s var(--nx-ease), border-color .3s, box-shadow .3s; }
.nx-order:hover { color: var(--nx-text); transform: translateX(3px); border-color: rgba(109,76,255,.3); box-shadow: 0 12px 26px -18px rgba(109,76,255,.6); }
.nx-order-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--nx-gold); background: var(--nx-gold-bg); border: 1px solid #fbe0a8; flex: none; }
.nx-order-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-order-t span { color: var(--nx-muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-order-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; white-space: nowrap; }

/* staff table */
.nx-table { --bs-table-bg: transparent; --bs-table-color: var(--nx-text); --bs-table-border-color: var(--nx-line); margin: 0; }
.nx-table th { color: var(--nx-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.nx-row-hl td { background: #fff8e8 !important; }
.nx-staff .nx-content { padding-bottom: 48px; }

/* toasts */
.nx-toasts { z-index: 1090; }
.nx-toast { border-radius: 14px; border: 1px solid var(--nx-line2); background: #fff; color: var(--nx-text); box-shadow: 0 20px 44px -18px rgba(40,52,110,.4); }
.nx-toast.nx-ok i { color: var(--nx-ok); }
.nx-toast.nx-error { border-color: #fecaca; }
.nx-toast.nx-error i { color: var(--nx-bad); }

/* ------------------------------------------------------------------ coin wallet, game switch */
.min-w-0 { min-width: 0; }
.nx-coinchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; border-radius: 999px; color: #7a4a00; font-weight: 700; background: #fff4dc; border: 1px solid #f6d48f; transition: transform .2s var(--nx-ease), box-shadow .2s; white-space: nowrap; }
.nx-coinchip > i:first-child { color: #d48a00; font-size: 1.05rem; }
.nx-coinchip span { font-weight: 600; font-size: .85rem; color: #8a5a0c; }
.nx-coinchip > i:last-child { color: #4f3bd6; font-size: 1.05rem; }
.nx-coinchip:hover { color: #7a4a00; transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(212, 138, 0, .7); }
.nx-gamechip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 12px; border-radius: 999px; color: var(--nx-text); font-weight: 600; background: var(--nx-soft); border: 1px solid var(--nx-line); }
.nx-gamechip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-gamechip i { color: #4f3bd6; flex: none; }
a.nx-gamechip:hover { color: #4f3bd6; border-color: rgba(109, 76, 255, .4); }
.nx-gamechip.static { background: transparent; border-color: transparent; padding-left: 0; }
.nx-icon-btn { padding: 6px 10px; }
.nx-coin-big { display: flex; align-items: baseline; gap: 8px; margin: -4px 0 4px; }
.nx-coin-big b { font-size: clamp(1.9rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.01em; color: var(--nx-text); font-variant-numeric: tabular-nums; }
.nx-coin-big span { color: #8a5a0c; font-weight: 700; }
.nx-wallet-err { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: .86rem; color: #7f1d1d; background: #fff1f1; border: 1px solid #fbcaca; }
.nx-coincard { background: linear-gradient(160deg, #fffaf0, #fff 55%); border-color: #f3e2bb; }
.nx-game { width: 100%; height: 100%; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; text-align: left; color: var(--nx-text); background: #fff; border: 1px solid var(--nx-line2);
  box-shadow: var(--nx-shadow); transition: transform .3s var(--nx-ease), border-color .3s, box-shadow .3s; }
.nx-game:hover { transform: translateY(-3px); border-color: rgba(109, 76, 255, .45); box-shadow: 0 18px 36px -20px rgba(109, 76, 255, .6); }
.nx-game.cur { border-color: #9fe2c6; background: linear-gradient(160deg, #f0fbf6, #fff 60%); }
.nx-game-logo { width: 64px; height: 64px; flex: none; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--nx-grad); color: #fff; font-size: 1.7rem; font-weight: 800; }
.nx-game-logo img { width: 100%; height: 100%; object-fit: cover; }
.nx-game-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-game-t b { font-size: 1.1rem; }
.nx-game-t small { color: var(--nx-muted); }
.nx-game > .bi-chevron-right { color: var(--nx-muted); font-size: 1.2rem; }
.nx-seg-page { max-width: 420px; background: #fff; }
.nx-seg-page a { padding: 10px; }
.nx-receive { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 12px 16px; border-radius: 14px; background: #fff7e6; border: 1px solid #f6dca6; }
.nx-receive span { color: #6b4a12; font-weight: 500; }
.nx-receive span small { display: block; font-size: .78rem; color: #8a6a32; }
.nx-receive b { font-size: 1.2rem; color: #7a4a00; font-variant-numeric: tabular-nums; }
.nx-amt small { margin-left: 4px; font-weight: 600; font-size: .75rem; color: var(--nx-muted); }
.nx-amt.active small { color: rgba(255,255,255,.85); }
.nx-amt-input { font-weight: 700; font-size: 1.15rem; }
.nx-howto { list-style: none; counter-reset: h; padding: 0; margin: 0; display: grid; gap: 14px; }
.nx-howto li { counter-increment: h; position: relative; padding-left: 44px; display: flex; flex-direction: column; }
.nx-howto li::before { content: counter(h); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #4f3bd6; background: rgba(109, 76, 255, .1); }
.nx-howto span, .nx-tips li { color: var(--nx-muted); }
.nx-tips { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.nx-label { font-weight: 700; margin: 4px 0 10px; }
.nx-telcos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 18px; }
.nx-telcos > *, .nx-amts > * { min-width: 0; }
.nx-telco span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-receive b { white-space: nowrap; }
/* lists in a narrow column: amount + badge go under the title */
.nx-orders.compact .nx-order { flex-wrap: wrap; row-gap: 8px; }
.nx-orders.compact .nx-order-t { flex: 1 1 calc(100% - 60px); }
.nx-orders.compact .nx-order-r { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 56px; }
.nx-telco input, .nx-amt-radio input { position: absolute; opacity: 0; pointer-events: none; }
.nx-telco span { display: block; text-align: center; padding: 12px 8px; border-radius: 12px; font-weight: 700; background: #fff; border: 1px solid var(--nx-line2); cursor: pointer; transition: all .25s var(--nx-ease); }
.nx-telco span:hover { border-color: rgba(109, 76, 255, .45); color: #4f3bd6; }
.nx-telco input:checked + span { color: #fff; background: var(--nx-grad); border-color: transparent; box-shadow: 0 10px 22px -12px rgba(109,76,255,.85); }
.nx-telco input:focus-visible + span, .nx-amt-radio input:focus-visible + span { outline: 3px solid rgba(109, 76, 255, .35); outline-offset: 2px; }
.nx-amt-radio { padding: 0; position: relative; display: block; cursor: pointer; }
.nx-amt-radio span { display: block; padding: 14px 8px; border-radius: 14px; text-align: center; }
.nx-amt-radio:has(input:checked) { color: #fff; border-color: transparent; background: var(--nx-grad); box-shadow: 0 12px 26px -14px rgba(109,76,255,.85); }
.nx-amt-radio:has(input:checked) small { color: rgba(255,255,255,.85); }
.nx-amts-card { grid-template-columns: repeat(3, 1fr); }
.nx-short { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #fff1f1; border: 1px solid #fbcaca; color: #7f1d1d; }
.nx-short b { font-variant-numeric: tabular-nums; }
.nx-short .d-flex { margin-top: 10px; }
.nx-badge-bad { background: #fdecec; color: #b42318; border: 1px solid #f8c4c4; }
.nx-order-ic.bank { color: #047857; background: #e7f8f1; border-color: #b7ebd6; }
.nx-order-ic.card { color: #1d5fd1; background: #eaf2ff; border-color: #c6dafc; }
.nx-order-ic.admin { color: #5b6478; background: #f1f3f7; border-color: #dfe3eb; }
.nx-pos { color: #047857; font-variant-numeric: tabular-nums; }
.nx-neg { color: #b42318; font-variant-numeric: tabular-nums; }
.nx-order-r small { font-size: .8rem; }
fieldset:disabled .nx-telco span, fieldset:disabled .nx-amt-radio { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 991.98px) {
  .nx-top { padding: 10px 16px; }
}
@media (max-width: 767.98px) {
  .nx-auth-card { padding: 26px 20px; border-radius: 22px; }
  .nx-pay { grid-template-columns: 1fr; }
  .nx-qr img { width: 200px; height: 200px; }
  .nx-steps li { font-size: 0; gap: 6px; }
  .nx-steps li span { font-size: .85rem; }
  .nx-amts { grid-template-columns: repeat(2, 1fr); }
  .nx-grid-pick { grid-template-columns: 1fr; }
  .nx-packs { grid-template-columns: repeat(2, 1fr); }
}
/* narrow portrait phones (games run in portrait): nothing may wrap awkwardly or bleed out of a card */
@media (max-width: 420px) {
  .nx-content { padding-left: 14px; padding-right: 14px; }
  .nx-card { padding: 16px; }
  .nx-auth-card { padding: 24px 18px; }
  .nx-socials, .nx-socials.n2 { grid-template-columns: 1fr; }
  .nx-social { padding: 11px; }
  .nx-tab { font-size: .66rem; white-space: nowrap; padding: 8px 2px; }
  .nx-top { gap: 8px; padding: 8px 12px; }
  .nx-gamechip { padding: 5px 10px; font-size: .9rem; max-width: 150px; }
  .nx-gamechip.static { display: none; }
  .nx-coinchip { padding: 5px 8px; }
  .nx-telcos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .nx-telco span { padding: 11px 2px; font-size: .82rem; }
  .nx-receive { padding: 10px 12px; }
  .nx-receive span { font-size: .9rem; }
  .nx-amts-card { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .nx-amt-radio span { padding: 12px 4px; font-size: .92rem; }
  .nx-game { padding: 14px; gap: 12px; }
  .nx-game-logo { width: 52px; height: 52px; border-radius: 15px; font-size: 1.4rem; }
  .nx-order { flex-wrap: wrap; row-gap: 8px; }
  .nx-order-t { flex: 1 1 calc(100% - 60px); }
  .nx-order-r { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 56px; }
  .nx-packs { gap: 10px; }
  .nx-pack { padding: 18px 8px 14px; }
  .nx-pack .nx-price { font-size: 1rem; white-space: nowrap; }
  .nx-progress div { font-size: .72rem; white-space: nowrap; padding: 10px 4px; }
  .btn-lg { font-size: 1.05rem; }
  .nx-dl dd { font-size: .95rem; }
}
/* phones held sideways: short viewport -> compact chrome, nav rail on the left so nothing covers the content */
@media (orientation: landscape) and (max-height: 540px) {
  .nx-auth-wrap { padding: 12px 16px; }
  .nx-auth-col { max-width: 720px; gap: 10px; }
  .nx-auth-brand { display: none; }
  .nx-auth-card { padding: 18px 22px; }
  .nx-or { margin: 12px 0 10px; }
  .nx-social { padding: 8px; }
  .nx-auth-head p, .nx-auth-foot { display: none; }
  .nx-auth-head h2 { font-size: 1.3rem; margin-bottom: 10px; }
  .nx-seg { margin-bottom: 12px !important; }
  .nx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .nx-form > .btn, .nx-form > .d-flex { grid-column: 1 / -1; }
  .form-floating > .form-control { height: 52px; min-height: 52px; padding-top: 1.4rem; padding-bottom: .4rem; }
  .form-floating > label { padding-top: .75rem; }
  .nx-app .nx-main { margin-left: calc(76px + env(safe-area-inset-left)); }
  .nx-top { position: static; padding: 6px 16px; }
  .nx-content { padding: 14px 16px 24px; }
  .nx-page-h { margin-bottom: 12px; }
  .nx-page-h p { display: none; }
  .nx-tabbar { inset: 0 auto 0 0; width: calc(76px + env(safe-area-inset-left)); display: flex; flex-direction: column; justify-content: center; gap: 4px;
    padding: 8px 8px 8px calc(8px + env(safe-area-inset-left)); border-radius: 0; border-width: 0 1px 0 0; box-shadow: none; }
  .nx-tab { padding: 6px 2px; font-size: .58rem; text-align: center; line-height: 1.2; }
  .nx-tab i { font-size: 1.1rem; }
  .nx-pay { grid-template-columns: auto 1fr; }
  .nx-qr img { width: 150px; height: 150px; }
  .nx-grid-pick { grid-template-columns: repeat(2, 1fr); }
  .nx-packs { grid-template-columns: repeat(3, 1fr); }
  .nx-steps { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .nx-rise, .nx-pop { opacity: 1; transform: none; }
}
