/* ==========================================================================
   Nexozs Admin — Apple-style theme                          v1 · 2026-11-29

   One file restyles every admin section. It only changes how things look:
   no markup, data or behaviour depends on it. Delete the <link> to
   apple-ui.css in admin.blade.php to get the previous design back.

   Every selector starts with html.nxa (set by a tiny script in <head>), so
   these rules outrank the panel's many older inline <style> blocks.
   ========================================================================== */

:root {
  --nx-bg: #f5f5f7;
  --nx-surface: #ffffff;
  --nx-surface-2: #fbfbfd;
  --nx-fill: rgba(118, 118, 128, 0.12);
  --nx-fill-2: rgba(118, 118, 128, 0.08);
  --nx-label: #1d1d1f;
  --nx-label-2: #6e6e73;
  --nx-label-3: #86868b;
  --nx-sep: rgba(0, 0, 0, 0.08);
  --nx-sep-strong: rgba(0, 0, 0, 0.14);
  --nx-blue: #0071e3;
  --nx-blue-press: #0062c4;
  --nx-blue-tint: rgba(0, 113, 227, 0.1);
  --nx-red: #ff3b30;
  --nx-red-tint: rgba(255, 59, 48, 0.1);
  --nx-green: #34c759;
  --nx-green-ink: #1f8f3a;
  --nx-green-tint: rgba(52, 199, 89, 0.13);
  --nx-orange: #ff9500;
  --nx-orange-ink: #c26a00;
  --nx-orange-tint: rgba(255, 149, 0, 0.13);
  --nx-purple: #af52de;
  --nx-pink: #ff2d55;
  --nx-teal: #30b0c7;
  --nx-indigo: #5856d6;
  --nx-radius-s: 8px;
  --nx-radius: 12px;
  --nx-radius-l: 18px;
  --nx-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --nx-shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
  --nx-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Hind Siliguri", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nx-sidebar-w: 248px;
}

/* Retint the old panel's purple accents to the system blue. */
html.nxa:not(#nx-a) {
  --primary-purple: #0071e3;
  --fs-purple: #0071e3; --fs-blue: #0071e3; --fs-ink: #1d1d1f; --fs-muted: #6e6e73; --fs-border: rgba(0,0,0,.08);
  --nx-hs-purple: #0071e3; --nx-hs-blue: #0071e3; --nx-hs-ink: #1d1d1f; --nx-hs-muted: #6e6e73; --nx-hs-border: rgba(0,0,0,.08);
  --nx-v2-purple: #0071e3; --nx-v2-blue: #0071e3; --nx-v2-border: rgba(0,0,0,.08);
  --nxss-purple: #0071e3; --nxss-blue: #0071e3; --nxss-ink: #1d1d1f; --nxss-line: rgba(0,0,0,.08); --nxss-soft: #f5f5f7;
  --cat19-purple: #0071e3; --cat19-blue: #0071e3; --cat19-ink: #1d1d1f; --cat19-muted: #6e6e73; --cat19-border: rgba(0,0,0,.08);
  --nxp-purple: #0071e3; --nxp-blue: #0071e3; --nxp-ink: #1d1d1f;
}

/* Smooth cross-fade between sections (each section is its own page now). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* No white flash between page loads. */
html.nxa, html.nxa body:not(#nx-a):not(#nx-b) { background: var(--nx-bg) !important; }

/* While the sign-in check runs, show the panel shell instead of a blank page
   when this browser was signed in a moment ago. */
html.nxa.nx-assume-auth.admin-loading body { visibility: visible !important; }
html.nxa.nx-assume-auth .admin-layout { display: flex !important; }
html.nxa.nx-assume-auth #adminAuthGate { display: none !important; }

/* While signing in, the page's built-in placeholder text (old defaults) is
   never shown: the open section stays hidden until the panel is ready, then
   rises in. The banner form also waits for its saved settings (max 4 s). */
@keyframes nxaRise { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes nxaShowLate { to { visibility: visible; } }
html.nxa.admin-loading .atc-main > .tab-content { visibility: hidden !important; }
html.nxa.admin-ready .atc-main > .tab-content.active { animation: nxaRise .32s cubic-bezier(.2, .8, .2, 1) backwards; }
html.nxa #nx37HeroForm:not(.nx37-ready) { visibility: hidden; animation: nxaShowLate 0s 4s forwards; }
@media (prefers-reduced-motion: reduce) {
  html.nxa.admin-ready .atc-main > .tab-content.active { animation: none; }
}

/* ---------- 1. Type & base ---------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b),
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout,
html.nxa body:not(#nx-a):not(#nx-b) button,
html.nxa body:not(#nx-a):not(#nx-b) input,
html.nxa body:not(#nx-a):not(#nx-b) select,
html.nxa body:not(#nx-a):not(#nx-b) textarea {
  font-family: var(--nx-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout { color: var(--nx-label); letter-spacing: -0.008em; }

/* Sentence case everywhere: the old panel shouted labels in capitals. */
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout th,
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout label,
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .card-lbl,
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .nexozs-kpi-title,
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .nx-orders-filter-field label,
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .badge {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.45) !important;
  outline-offset: 2px !important;
}

/* ---------- 2. Sidebar --------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar {
  width: var(--nx-sidebar-w) !important;
  background: rgba(246, 246, 248, 0.82) !important;
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--nx-sep) !important;
  box-shadow: none !important;
  padding: 10px 10px 24px !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .sidebar-brand {
  display: flex !important;
  align-items: center !important;
  min-height: 64px !important;
  padding: 10px 12px 14px !important;
  margin-bottom: 4px !important;
  border-bottom: 1px solid var(--nx-sep) !important;
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
}

html.nxa body:not(#nx-a):not(#nx-b) #adminSidebarLogo { max-height: 38px !important; }
html.nxa body:not(#nx-a):not(#nx-b) #adminSidebarFallback .brand-logo-icon {
  width: 34px !important; height: 34px !important; border-radius: 9px !important;
  background: var(--nx-label) !important; color: #fff !important; box-shadow: none !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  font-weight: 700 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #adminSidebarFallback .brand-logo-text span {
  color: var(--nx-label) !important; font-size: 17px !important; font-weight: 650 !important;
  letter-spacing: -0.02em !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .sidebar-menu { padding: 6px 0 !important; gap: 1px !important; display: flex !important; flex-direction: column !important; }

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  min-height: 36px !important;
  padding: 7px 12px !important;
  margin: 0 !important;
  border-radius: var(--nx-radius-s) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  color: var(--nx-label) !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  transform: none !important;
  transition: background-color 0.12s ease !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item::before,
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item::after { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item > i {
  width: 26px !important; height: 26px !important; min-width: 26px !important;
  border-radius: 7px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  font-size: 13px !important; margin: 0 !important;
  color: #fff !important;
  background: var(--nx-label-3) !important;
  box-shadow: none !important;
}

/* System-colour icon tiles, like the Settings app. */
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="dashboard"] > i { background: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="brands"] > i { background: var(--nx-indigo) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="products"] > i { background: var(--nx-orange) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="flashsale"] > i { background: var(--nx-pink) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="homesections"] > i { background: var(--nx-teal) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="categories"] > i { background: var(--nx-purple) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="banners"] > i { background: #ff6482 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="cartsettings"] > i { background: #64d2ff !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="coupons"] > i { background: #ffcc00 !important; color: #3a2d00 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="orders"] > i { background: var(--nx-green) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[onclick*="'posorders'"] > i { background: #00c7be !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[onclick*="'incompleteorders'"] > i { background: var(--nx-red) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="paymentmethods"] > i { background: #32ade6 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="tracking"] > i { background: #a2845e !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="sitesetting"] > i { background: #8e8e93 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="users"] > i { background: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="adminaccess"] > i { background: var(--nx-label) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="adminactivity"] > i { background: #636366 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="notifications"] > i { background: var(--nx-red) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .menu-item[data-admin-permission="featurecenter"] > i { background: var(--nx-indigo) !important; }

html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item:hover { background: rgba(0, 0, 0, 0.05) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item.active {
  background: rgba(0, 0, 0, 0.08) !important;
  color: var(--nx-label) !important;
  font-weight: 600 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item.active > i { color: #fff !important; }

/* Count badges inside menu items (e.g. incomplete orders). */
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item span[class*="badge"],
html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item .count {
  margin-left: auto !important;
  min-width: 20px !important; height: 20px !important; padding: 0 6px !important;
  border-radius: 10px !important; font-size: 12px !important; font-weight: 600 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  background: var(--nx-red) !important; color: #fff !important; box-shadow: none !important;
}

/* ---------- 3. Main area & top bar ------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .atc-main {
  background: var(--nx-bg) !important;
  padding: 0 32px 48px !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .atc-topbar {
  position: sticky !important; top: 0 !important; z-index: 40 !important;
  margin: 0 -32px 22px !important;
  padding: 10px 32px !important;
  min-height: 56px !important;
  display: flex !important; align-items: center !important; gap: 12px !important;
  background: rgba(245, 245, 247, 0.8) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 0 !important;
  border-bottom: 1px solid var(--nx-sep) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search {
  flex: 0 1 360px !important;
  height: 36px !important;
  display: flex !important; align-items: center !important; gap: 8px !important;
  padding: 0 10px !important;
  background: var(--nx-fill) !important;
  border: 0 !important; border-radius: 10px !important; box-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search svg { width: 16px !important; height: 16px !important; color: var(--nx-label-2) !important; flex: none; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search input {
  flex: 1 !important; min-width: 0 !important; height: 34px !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  font-size: 14px !important; color: var(--nx-label) !important; padding: 0 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search input::placeholder { color: var(--nx-label-3) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search button { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .admin-account-wrap { margin-left: auto !important; }
html.nxa body:not(#nx-a):not(#nx-b) .user-profile {
  display: inline-flex !important; align-items: center !important; gap: 8px !important;
  height: 36px !important; padding: 0 12px 0 4px !important;
  background: var(--nx-surface) !important; border: 1px solid var(--nx-sep) !important;
  border-radius: 18px !important; box-shadow: none !important;
  font-size: 14px !important; font-weight: 500 !important; color: var(--nx-label) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .user-profile .admin-avatar,
html.nxa body:not(#nx-a):not(#nx-b) #adminDefaultAvatar { width: 28px !important; height: 28px !important; font-size: 28px !important; border-radius: 50% !important; color: var(--nx-label-3) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .admin-profile-menu {
  border-radius: var(--nx-radius) !important; border: 1px solid var(--nx-sep) !important;
  box-shadow: var(--nx-shadow-pop) !important; padding: 6px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
html.nxa body:not(#nx-a):not(#nx-b) .admin-profile-menu button {
  display: flex !important; align-items: center !important; gap: 10px !important;
  width: 100% !important; padding: 9px 12px !important; border-radius: 8px !important;
  font-size: 14px !important; color: var(--nx-label) !important; background: transparent !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .admin-profile-menu button:hover { background: var(--nx-fill-2) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .admin-profile-menu .logout-item { color: var(--nx-red) !important; }

/* Live-refresh line and badge. */
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-live-line-v16 { background: var(--nx-blue) !important; height: 2px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-live-badge-v16 {
  background: rgba(29, 29, 31, 0.86) !important; color: #fff !important;
  border-radius: 20px !important; box-shadow: var(--nx-shadow-pop) !important;
  font-size: 13px !important; font-weight: 500 !important; border: 0 !important;
}

/* ---------- 4. Section headers: large titles, no banners --------------- */

html.nxa body:not(#nx-a):not(#nx-b) .nxp-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-hs-v18-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nxpos-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nxss-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-hero,
html.nxa body:not(#nx-a):not(#nx-b) .nx37-admin-top,
html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box:has(> .nx-brand-hero) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 6px 0 18px !important;
  margin: 0 0 6px !important;
  min-height: 0 !important;
  overflow: visible !important;
  color: var(--nx-label) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nxp-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nxp-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-hs-v18-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-hs-v18-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nxpos-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nxpos-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nxss-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nxss-hero::after,
html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-hero::before, html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-hero::after { display: none !important; }

/* One layout for every header: title block grows, extras sit at the right. */
html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero, .nx-brand-hero, .nx-cat19-hero, .nx-hs-v18-hero, .nx-v20-hero, .nx-orders-hero, .nxpos-hero, .nxss-hero, .nx-ref-hero, .nx37-admin-top) {
  display: flex !important; flex-wrap: wrap !important; align-items: center !important;
  justify-content: space-between !important; gap: 14px 20px !important;
  flex-direction: row !important; height: auto !important;
  grid-template-columns: none !important; text-align: left !important;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero-text, .nx-brand-hero-copy, .nx-cat19-hero-copy, .nx-hs-v18-hero-content, .nx-orders-hero-copy, .nxpos-hero-copy, .nx-ref-hero-copy) {
  flex: 1 1 420px !important; min-width: 0 !important; max-width: none !important; padding: 0 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nxp-bars { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box:has(> .nx-fs-v17f-art) {
  display: block !important; grid-template-columns: none !important; padding: 22px 24px !important;
  border: 1px solid var(--nx-sep) !important; border-radius: var(--nx-radius-l) !important;
  background: var(--nx-surface) !important; box-shadow: var(--nx-shadow) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box:has(> .nx-fs-v17f-art) > p { color: var(--nx-label-2) !important; font-size: 14px !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.nx-brand-hero-action, .nx-brand-hero) [class*="bars"],
html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-hero svg { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero { justify-content: flex-start !important; flex-wrap: nowrap !important; align-items: flex-start !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero > .nx-v20-icon { flex: none !important; width: 44px !important; margin-top: 2px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-hero > div:not(.nx-v20-icon) { flex: 1 1 auto !important; min-width: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-stats > div {
  background: var(--nx-surface) !important; background-image: none !important;
  border: 1px solid var(--nx-sep) !important; border-radius: 14px !important; box-shadow: var(--nx-shadow) !important;
  padding: 12px 14px !important; color: var(--nx-label) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-stats small { font-size: 13px !important; font-weight: 500 !important; color: var(--nx-label-2) !important; text-transform: none !important; letter-spacing: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-stats strong { font-size: 22px !important; font-weight: 650 !important; color: var(--nx-label) !important; letter-spacing: -0.02em !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-refresh {
  display: inline-flex !important; align-items: center !important; gap: 7px !important;
  min-height: 36px !important; padding: 8px 16px !important; border-radius: 10px !important;
  background: var(--nx-fill) !important; background-image: none !important; color: var(--nx-blue) !important;
  border: 0 !important; box-shadow: none !important; font-size: 14px !important; font-weight: 600 !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .nxss-graphic, html.nxa body:not(#nx-a):not(#nx-b) .nxss-hero small, html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-hero > svg { display: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nxss-hero > div:first-child { flex: 1 1 420px !important; min-width: 0 !important; }

/* Payment methods: title left, "Add method" right, table below. */
html.nxa body:not(#nx-a):not(#nx-b) #tab-paymentmethods > .atc-card-box { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 14px !important; }
html.nxa body:not(#nx-a):not(#nx-b) #tab-paymentmethods > .atc-card-box > .box-title { flex: 1 1 auto !important; }
html.nxa body:not(#nx-a):not(#nx-b) #tab-paymentmethods > .atc-card-box > .atc-table { flex: 1 1 100% !important; }

/* Decorative illustrations, glows and floating chips. */
html.nxa body:not(#nx-a):not(#nx-b) .nxp-art, html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-art, html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-art,
html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-float, html.nxa body:not(#nx-a):not(#nx-b) .nx-hs-v18-art, html.nxa body:not(#nx-a):not(#nx-b) .nx-fs-v17f-art,
html.nxa body:not(#nx-a):not(#nx-b) .nx-fs-v17f-glow, html.nxa body:not(#nx-a):not(#nx-b) .nxpos-hero-art, html.nxa body:not(#nx-a):not(#nx-b) .nxpos-float,
html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-hero-art, html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-float, html.nxa body:not(#nx-a):not(#nx-b) .nxv-art,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero-visual,
html.nxa body:not(#nx-a):not(#nx-b) .nx-hs-v18-eyebrow, html.nxa body:not(#nx-a):not(#nx-b) .nx-cat19-eyebrow, html.nxa body:not(#nx-a):not(#nx-b) .nxv-eyebrow,
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-kicker, html.nxa body:not(#nx-a):not(#nx-b) .nxpos-kicker { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero, .nx-brand-hero, .nx-cat19-hero, .nx-hs-v18-hero, .nx-v20-hero, .nx-orders-hero, .nxpos-hero, .nxss-hero, .nx-ref-hero, .nx37-admin-top) :is(h1, h2) {
  font-size: 30px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  color: var(--nx-label) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  margin: 0 0 6px !important;
  text-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero, .nx-brand-hero, .nx-cat19-hero, .nx-hs-v18-hero, .nx-v20-hero, .nx-orders-hero, .nxpos-hero, .nxss-hero, .nx-ref-hero) :is(h1, h2) span {
  color: var(--nx-label-2) !important; -webkit-text-fill-color: currentColor !important;
  background: none !important; font-weight: 500 !important; font-size: 0.6em !important;
  display: block !important; letter-spacing: -0.01em !important; margin-top: 4px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero, .nx-brand-hero, .nx-cat19-hero, .nx-hs-v18-hero, .nx-v20-hero, .nx-orders-hero, .nxpos-hero, .nxss-hero, .nx-ref-hero, .nx37-admin-top) p {
  color: var(--nx-label-2) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  max-width: 62ch !important;
  margin: 0 !important;
}
/* Hero icon tiles that are kept (orders, incomplete orders). */
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-icon,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero .nx-orders-hero-icon,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero-copy > div:first-child:has(> i) {
  width: 44px !important; height: 44px !important; border-radius: 11px !important;
  background: var(--nx-blue-tint) !important; color: var(--nx-blue) !important;
  box-shadow: none !important; font-size: 19px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-hero-state,
html.nxa body:not(#nx-a):not(#nx-b) .nx-v20-live {
  background: var(--nx-green-tint) !important; color: var(--nx-green-ink) !important;
  border: 0 !important; box-shadow: none !important; border-radius: 20px !important;
  font-size: 13px !important; font-weight: 600 !important;
}

/* ---------- 5. Cards ----------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-card,
html.nxa body:not(#nx-a):not(#nx-b) .nxpos-card,
html.nxa body:not(#nx-a):not(#nx-b) .nx-ref-card,
html.nxa body:not(#nx-a):not(#nx-b) .nx-fm-card,
html.nxa body:not(#nx-a):not(#nx-b) .site-setting-toggle-card,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-chart-card,
html.nxa body:not(#nx-a):not(#nx-b) .live-detail-box,
html.nxa body:not(#nx-a):not(#nx-b) .nx-order-card {
  background: var(--nx-surface) !important;
  border: 1px solid var(--nx-sep) !important;
  border-radius: var(--nx-radius-l) !important;
  box-shadow: var(--nx-shadow) !important;
  color: var(--nx-label);
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box { padding: 22px 24px !important; margin-bottom: 18px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box::before, html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box::after { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .box-header {
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  gap: 12px !important; flex-wrap: wrap !important;
  padding: 0 0 16px !important; margin: 0 0 16px !important;
  border-bottom: 1px solid var(--nx-sep) !important;
  background: transparent !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .box-title,
html.nxa body:not(#nx-a):not(#nx-b) .nx-card-title,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-table-head h4,
html.nxa body:not(#nx-a):not(#nx-b) .site-setting-section-title {
  display: flex !important; align-items: center !important; gap: 10px !important;
  font-size: 19px !important; line-height: 1.25 !important; font-weight: 650 !important;
  letter-spacing: -0.015em !important; color: var(--nx-label) !important;
  margin: 0 !important; background: none !important; -webkit-text-fill-color: currentColor !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .box-title > i,
html.nxa body:not(#nx-a):not(#nx-b) .nx-card-title > i,
html.nxa body:not(#nx-a):not(#nx-b) .site-setting-section-title > i {
  width: 30px !important; height: 30px !important; min-width: 30px !important;
  border-radius: 8px !important; font-size: 14px !important; margin: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  background: var(--nx-blue-tint) !important; color: var(--nx-blue) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .box-header p,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-table-head p { color: var(--nx-label-2) !important; font-size: 14px !important; margin-top: 4px !important; }

/* Sub-section heading inside a form (icon + text above a hairline). */
html.nxa body:not(#nx-a):not(#nx-b) .section-divider {
  display: flex !important; align-items: center !important; gap: 10px !important;
  height: auto !important; min-height: 0 !important;
  margin: 26px 0 14px !important; padding: 20px 0 0 !important;
  border: 0 !important; border-top: 1px solid var(--nx-sep) !important;
  background: none !important; box-shadow: none !important;
  font-size: 16px !important; font-weight: 650 !important; letter-spacing: -0.01em !important;
  color: var(--nx-label) !important; text-transform: none !important;
  -webkit-text-fill-color: currentColor !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .section-divider::before, html.nxa body:not(#nx-a):not(#nx-b) .section-divider::after { display: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .section-divider > i {
  width: 26px !important; height: 26px !important; min-width: 26px !important; border-radius: 7px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  font-size: 12px !important; margin: 0 !important;
  background: var(--nx-fill) !important; color: var(--nx-label-2) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx37-admin-label { display: none !important; }

/* ---------- 6. Dashboard metrics ---------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .nexozs-dashboard-kpis {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 14px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-secondary-kpis {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 22px !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-card,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card,
html.nxa body:not(#nx-a):not(#nx-b) .atc-stat-card {
  position: relative !important;
  display: flex !important; flex-direction: column !important; align-items: flex-start !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 16px 18px !important;
  background: var(--nx-surface) !important;
  background-image: none !important;
  border: 1px solid var(--nx-sep) !important;
  border-radius: var(--nx-radius-l) !important;
  box-shadow: var(--nx-shadow) !important;
  color: var(--nx-label) !important;
  overflow: hidden !important;
  transform: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-card::before, html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-card::after,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card::before, html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card::after,
html.nxa body:not(#nx-a):not(#nx-b) .atc-stat-card::before, html.nxa body:not(#nx-a):not(#nx-b) .atc-stat-card::after { display: none !important; }

html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-icon,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card .mini-icon {
  width: 32px !important; height: 32px !important; min-width: 32px !important;
  border-radius: 9px !important; font-size: 14px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  color: #fff !important; box-shadow: none !important; border: 0 !important;
  background: var(--nx-blue) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .kpi-purple .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.purple { background: var(--nx-purple) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .kpi-green .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.green { background: var(--nx-green) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .kpi-blue .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.blue { background: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .kpi-cyan .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.cyan { background: var(--nx-teal) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .kpi-pink .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.pink { background: var(--nx-pink) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .kpi-orange .nexozs-kpi-icon, html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.orange { background: var(--nx-orange) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .mini-icon.red { background: var(--nx-red) !important; }

html.nxa body:not(#nx-a):not(#nx-b) :is(.nexozs-kpi-card, .nexozs-mini-card, .atc-stat-card) { height: auto !important; max-height: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.nexozs-kpi-icon, .nexozs-mini-card .mini-icon) { flex: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card > div { display: flex !important; flex-direction: column !important; gap: 2px !important; min-width: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card small {
  display: block !important; font-size: 13px !important; font-weight: 500 !important;
  color: var(--nx-label-2) !important; margin: 0 !important; white-space: nowrap !important;
  overflow: hidden !important; text-overflow: ellipsis !important; opacity: 1 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card strong span { font: inherit !important; color: inherit !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-content { display: flex !important; flex-direction: column !important; gap: 2px !important; min-width: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-title,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card .mini-label,
html.nxa body:not(#nx-a):not(#nx-b) .card-lbl {
  font-size: 13px !important; font-weight: 500 !important; color: var(--nx-label-2) !important;
  opacity: 1 !important; line-height: 1.3 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-value,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card strong,
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card b,
html.nxa body:not(#nx-a):not(#nx-b) .card-val {
  font-size: 26px !important; font-weight: 650 !important; color: var(--nx-label) !important;
  letter-spacing: -0.02em !important; line-height: 1.15 !important;
  font-variant-numeric: tabular-nums;
}
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card strong, html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card b { font-size: 21px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-meta { font-size: 12px !important; color: var(--nx-label-3) !important; opacity: 1 !important; }

/* JS-rendered colourful stat grid (dashboard "Total Users ... Today Visitors"). */
html.nxa body:not(#nx-a):not(#nx-b) #tab-dashboard [class*="stat-grid"] > div,
html.nxa body:not(#nx-a):not(#nx-b) #tab-dashboard [class*="metric-grid"] > div {
  background-image: none !important;
}

/* ---------- 7. Buttons -------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(.btn-purple, .btn-primary, .btn-success, .btn-danger, .btn-outline),
html.nxa body:not(#nx-a):not(#nx-b) .modal-bg :is(.btn-purple, .btn-primary, .btn-success, .btn-danger, .btn-outline) {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
  min-height: 36px !important; padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 14px !important; font-weight: 600 !important; line-height: 1.2 !important;
  letter-spacing: -0.01em !important; text-transform: none !important;
  box-shadow: none !important; background-image: none !important;
  border: 0 !important; transform: none !important;
  transition: background-color 0.12s ease, opacity 0.12s ease !important;
  white-space: nowrap;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.btn-purple, .btn-primary) { background: var(--nx-blue) !important; color: #fff !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.btn-purple, .btn-primary):hover { background: var(--nx-blue-press) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .btn-success { background: var(--nx-green) !important; color: #fff !important; }
html.nxa body:not(#nx-a):not(#nx-b) .btn-danger { background: var(--nx-red-tint) !important; color: var(--nx-red) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .btn-danger:hover { background: rgba(255, 59, 48, 0.16) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .btn-outline { background: var(--nx-fill) !important; color: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .btn-outline:hover { background: rgba(118, 118, 128, 0.18) !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.btn-purple, .btn-primary, .btn-success, .btn-danger, .btn-outline) > i { font-size: 13px !important; margin: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.btn-purple, .btn-primary, .btn-success, .btn-danger, .btn-outline):disabled { opacity: 0.4 !important; cursor: not-allowed !important; }

/* Small table buttons stay compact. */
html.nxa body:not(#nx-a):not(#nx-b) .atc-table :is(.btn-purple, .btn-primary, .btn-success, .btn-danger, .btn-outline) {
  min-height: 30px !important; padding: 5px 12px !important; font-size: 13px !important; border-radius: 8px !important;
}

/* Orders bulk actions (inline-styled gradients). */
html.nxa body:not(#nx-a):not(#nx-b) .orders-bulk-actions > button {
  min-height: 36px !important; border-radius: 10px !important; border: 0 !important;
  background-image: none !important; box-shadow: none !important;
  font-size: 14px !important; font-weight: 600 !important;
  display: inline-flex !important; align-items: center !important; gap: 7px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #bulkSendOrdersBtn { background: var(--nx-blue) !important; color: #fff !important; }
html.nxa body:not(#nx-a):not(#nx-b) #nxGsExportButton { background: var(--nx-fill) !important; color: var(--nx-green-ink) !important; }
html.nxa body:not(#nx-a):not(#nx-b) #bulkDeleteOrdersBtn { background: var(--nx-red-tint) !important; color: var(--nx-red) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .orders-bulk-actions > button:disabled { opacity: 0.4 !important; }

/* ---------- 8. Forms ---------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(.form-input, .filter-input, .filter-select, .site-setting-toggle-select),
html.nxa body:not(#nx-a):not(#nx-b) .modal-bg :is(.form-input, .filter-input, .filter-select),
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="search"]:not(#nxAdminRefSearchField), select, textarea):not(.nx-plain) {
  min-height: 38px !important;
  padding: 8px 12px !important;
  background: var(--nx-surface) !important;
  border: 1px solid var(--nx-sep-strong) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  color: var(--nx-label) !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout textarea { min-height: 90px !important; line-height: 1.45 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(input, select, textarea):focus {
  border-color: var(--nx-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important;
  outline: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(input, textarea)::placeholder { color: var(--nx-label-3) !important; }

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout select:not([multiple]) {
  -webkit-appearance: none !important; appearance: none !important;
  padding-right: 32px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
}

html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .form-group > label,
html.nxa body:not(#nx-a):not(#nx-b) .modal-bg .form-group > label,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-field > label,
html.nxa body:not(#nx-a):not(#nx-b) .nxpos-label {
  display: block !important;
  font-size: 13px !important; font-weight: 500 !important;
  color: var(--nx-label-2) !important;
  margin: 0 0 6px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout .form-group { margin-bottom: 14px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(.form-grid-2, .form-grid-3) { gap: 14px 16px !important; }

/* iOS switch. */
html.nxa body:not(#nx-a):not(#nx-b) .switch { width: 51px !important; height: 31px !important; flex: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .switch .slider {
  border-radius: 31px !important; background: #e9e9ea !important; box-shadow: none !important; border: 0 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .switch .slider::before {
  width: 27px !important; height: 27px !important; left: 2px !important; bottom: 2px !important; top: auto !important;
  border-radius: 50% !important; background: #fff !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .switch input:checked + .slider { background: var(--nx-green) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .switch input:checked + .slider::before { transform: translateX(20px) !important; }

html.nxa body:not(#nx-a):not(#nx-b) .site-setting-toggle-row {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 14px !important;
}

/* ---------- 9. Tables --------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .atc-table {
  width: 100% !important;
  border-collapse: separate !important; border-spacing: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-variant-numeric: tabular-nums;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-table thead th {
  position: sticky; top: 0;
  background: var(--nx-surface-2) !important;
  color: var(--nx-label-2) !important;
  font-size: 12px !important; font-weight: 600 !important;
  text-align: left !important; vertical-align: middle !important;
  padding: 10px 14px !important;
  border: 0 !important; border-bottom: 1px solid var(--nx-sep) !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-table thead th:first-child { border-top-left-radius: 10px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table thead th:last-child { border-top-right-radius: 10px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table tbody td {
  padding: 12px 14px !important;
  vertical-align: middle !important;
  border: 0 !important; border-bottom: 1px solid var(--nx-sep) !important;
  background: transparent !important;
  color: var(--nx-label) !important;
  line-height: 1.35 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .atc-table tbody tr { background: transparent !important; box-shadow: none !important; transform: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table tbody tr:hover td { background: rgba(0, 0, 0, 0.025) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table tbody tr:last-child td { border-bottom: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table td small { color: var(--nx-label-2) !important; font-size: 12px !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table .table-img,
html.nxa body:not(#nx-a):not(#nx-b) .atc-table td img {
  width: 44px !important; height: 44px !important; object-fit: cover !important;
  border-radius: 9px !important; border: 1px solid var(--nx-sep) !important; background: #fff !important;
}
/* Action buttons in a cell line up on one row. */
html.nxa body:not(#nx-a):not(#nx-b) .atc-table td:has(> button + button),
html.nxa body:not(#nx-a):not(#nx-b) .atc-table td:has(> .btn-outline + .btn-danger) { white-space: nowrap !important; }
html.nxa body:not(#nx-a):not(#nx-b) .atc-table td > button + button { margin-left: 6px !important; }

/* Checkboxes. */
html.nxa body:not(#nx-a):not(#nx-b) .admin-layout input[type="checkbox"] {
  width: 18px !important; height: 18px !important; accent-color: var(--nx-blue);
  vertical-align: middle !important; margin: 0 !important;
}

/* ---------- 10. Badges / status pills --------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .badge,
html.nxa body:not(#nx-a):not(#nx-b) .nxpos-badge,
html.nxa body:not(#nx-a):not(#nx-b) .nx-brand-chip {
  display: inline-flex !important; align-items: center !important; gap: 5px !important;
  min-height: 22px !important; padding: 2px 9px !important;
  border-radius: 11px !important; border: 0 !important; box-shadow: none !important;
  font-size: 12px !important; font-weight: 600 !important; line-height: 1.2 !important;
  background: var(--nx-fill) !important; color: var(--nx-label-2) !important;
  white-space: nowrap !important; background-image: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .badge-completed { background: var(--nx-green-tint) !important; color: var(--nx-green-ink) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .badge-cancelled { background: var(--nx-red-tint) !important; color: #d70015 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .badge-pending { background: var(--nx-orange-tint) !important; color: var(--nx-orange-ink) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .badge-processing { background: var(--nx-blue-tint) !important; color: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .badge-shipping { background: rgba(88, 86, 214, 0.12) !important; color: var(--nx-indigo) !important; }

/* ---------- 11. Orders toolbar & filters -------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-grid,
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-toolbar-card .nx-orders-filters,
html.nxa body:not(#nx-a):not(#nx-b) #tab-orders [class*="filter-row"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  align-items: end !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-field { min-width: 0 !important; margin: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-input-wrap {
  display: flex !important; align-items: center !important;
  background: var(--nx-surface) !important;
  border: 1px solid var(--nx-sep-strong) !important; border-radius: 10px !important;
  overflow: hidden !important; box-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-input-wrap:focus-within { border-color: var(--nx-blue) !important; box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-input-wrap input { border: 0 !important; box-shadow: none !important; min-width: 0 !important; flex: 1 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-input-wrap input:focus { box-shadow: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-input-wrap button {
  width: 36px !important; height: 36px !important; flex: none !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  background: transparent !important; color: var(--nx-label-2) !important; border: 0 !important; box-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-note { color: var(--nx-label-3) !important; font-size: 12px !important; background: none !important; border: 0 !important; padding: 8px 0 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-note i { color: var(--nx-label-3) !important; }

/* Orders: per-column search row above the table header. */
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row th {
  background: var(--nx-surface) !important; padding: 10px 6px 8px !important;
  border-bottom: 0 !important; vertical-align: bottom !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row .nx-v7-field label {
  font-size: 12px !important; font-weight: 500 !important; color: var(--nx-label-2) !important;
  text-transform: none !important; letter-spacing: 0 !important; margin: 0 0 2px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row .nx-orders-input-wrap { height: 34px !important; border-radius: 9px !important; background: var(--nx-fill-2) !important; border-color: transparent !important; }
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row .nx-orders-input-wrap:focus-within { background: var(--nx-surface) !important; border-color: var(--nx-blue) !important; }
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row .nx-orders-input-wrap input {
  min-height: 32px !important; height: 32px !important; padding: 0 9px !important; font-size: 13px !important;
  background: transparent !important; border: 0 !important; width: 100% !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row .nx-orders-input-wrap button { display: none !important; }
html.nxa body:not(#nx-a):not(#nx-b) #ordersMainTable thead tr.nx-v7-search-row select { min-height: 34px !important; height: 34px !important; font-size: 13px !important; padding: 0 26px 0 9px !important; background-color: var(--nx-fill-2) !important; border-color: transparent !important; background-position: right 9px center !important; }

/* ---------- 12. Modals -------------------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) .modal-bg {
  background: rgba(0, 0, 0, 0.32) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) {
  background: var(--nx-surface) !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: var(--nx-shadow-pop) !important;
  color: var(--nx-label) !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .modal-header {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important;
  border-bottom: 1px solid var(--nx-sep) !important; background: transparent !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .modal-header :is(h2, h3, h4) {
  font-size: 18px !important; font-weight: 650 !important; letter-spacing: -0.015em !important; color: var(--nx-label) !important; margin: 0 !important;
  display: flex !important; align-items: center !important; gap: 10px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) .modal-close {
  width: 30px !important; height: 30px !important; border-radius: 50% !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  background: var(--nx-fill) !important; color: var(--nx-label-2) !important; border: 0 !important; box-shadow: none !important;
  font-size: 14px !important;
}

/* Forms inside modals: plain fields on one soft grouped panel (Settings-style). */
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) .form-group {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  border-radius: 0 !important; padding: 0 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) [class*="-grid"]:has(> .form-group) {
  background: var(--nx-bg) !important; border: 0 !important; box-shadow: none !important;
  border-radius: 14px !important; padding: 14px !important;
}
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) [class*="-grid"]:has(> .form-group) > .form-group { margin: 0 !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) :is(input, select, textarea) { background-color: var(--nx-surface) !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) :is(.box-title, h2, h3) { background: none !important; -webkit-text-fill-color: currentColor !important; }
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) > form > :last-child:has(> button),
html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) [class*="footer"], html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) [class*="actions"]:has(> button) {
  background: rgba(255, 255, 255, 0.9) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--nx-sep) !important;
}

/* ---------- 13. Sign-in screen ----------------------------------------- */

html.nxa body:not(#nx-a):not(#nx-b) #adminAuthGate { background: var(--nx-bg) !important; }
html.nxa body:not(#nx-a):not(#nx-b) #adminAuthGate :is(.btn-purple, .btn-primary, button[type="submit"]) {
  background: var(--nx-blue) !important; background-image: none !important; color: #fff !important;
  border-radius: 12px !important; box-shadow: none !important; border: 0 !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #adminAuthGate :is(input[type="email"], input[type="password"], input[type="text"]) {
  border-radius: 12px !important; border: 1px solid var(--nx-sep-strong) !important; box-shadow: none !important;
}
html.nxa body:not(#nx-a):not(#nx-b) #adminAuthGate :is(input[type="email"], input[type="password"], input[type="text"]):focus {
  border-color: var(--nx-blue) !important; box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important;
}

/* ---------- 14. Small screens (phones & small tablets) ---------------- */

@media (max-width: 900px) {
  html.nxa body:not(#nx-a):not(#nx-b) .atc-main { padding: 0 16px 40px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-topbar { margin: 0 -16px 16px !important; padding: 8px 16px !important; min-height: 52px !important; width: calc(100% + 32px) !important; max-width: none !important; left: auto !important; right: auto !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .nx-admin-ref-search { display: none !important; }

  html.nxa body:not(#nx-a):not(#nx-b) .admin-mobile-menu-btn {
    width: 36px !important; height: 36px !important; border-radius: 10px !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    background: var(--nx-fill) !important; color: var(--nx-label) !important; border: 0 !important; box-shadow: none !important;
    font-size: 16px !important;
  }

  /* Sidebar becomes a sheet from the left. */
  html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar {
    width: min(300px, 86vw) !important;
    background: rgba(246, 246, 248, 0.96) !important;
    box-shadow: var(--nx-shadow-pop) !important;
    border-right: 0 !important;
  }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item { min-height: 44px !important; font-size: 16px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-sidebar .menu-item > i { width: 29px !important; height: 29px !important; min-width: 29px !important; font-size: 14px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .admin-mobile-overlay.mobile-open { background: rgba(0, 0, 0, 0.3) !important; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

  html.nxa body:not(#nx-a):not(#nx-b) :is(.nxp-hero, .nx-brand-hero, .nx-cat19-hero, .nx-hs-v18-hero, .nx-v20-hero, .nx-orders-hero, .nxpos-hero, .nxss-hero, .nx-ref-hero, .nx37-admin-top) :is(h1, h2) { font-size: 26px !important; }

  html.nxa body:not(#nx-a):not(#nx-b) .atc-card-box { padding: 16px !important; border-radius: 16px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .box-title, html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-table-head h4 { font-size: 17px !important; }

  html.nxa body:not(#nx-a):not(#nx-b) .nexozs-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .nexozs-secondary-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) :is(.nexozs-kpi-card, .nexozs-mini-card, .atc-stat-card) { padding: 14px !important; gap: 10px !important; border-radius: 16px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .nexozs-kpi-value, html.nxa body:not(#nx-a):not(#nx-b) .card-val { font-size: 21px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card strong, html.nxa body:not(#nx-a):not(#nx-b) .nexozs-mini-card b { font-size: 18px !important; }

  html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(.form-grid-2, .form-grid-3) { grid-template-columns: 1fr !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .box-header { align-items: flex-start !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .box-header > :is(button, a, .btn-purple, .btn-outline) { width: 100% !important; }

  /* Inputs at 16px stop iOS Safari from zooming in on focus. */
  html.nxa body:not(#nx-a):not(#nx-b) .admin-layout :is(input, select, textarea) { font-size: 16px !important; }

  html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-grid,
  html.nxa body:not(#nx-a):not(#nx-b) #tab-orders [class*="filter-row"] { grid-template-columns: 1fr 1fr !important; }

  /* Wide tables: one tidy rounded scroller with a sticky first column. */
  html.nxa body:not(#nx-a):not(#nx-b) .nx-hscroll {
    border-radius: 12px !important;
    border: 1px solid var(--nx-sep) !important;
    background: var(--nx-surface) !important;
  }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-table { font-size: 13px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-table thead th { padding: 9px 10px !important; }
  html.nxa body:not(#nx-a):not(#nx-b) .atc-table tbody td { padding: 10px !important; }

  html.nxa body:not(#nx-a):not(#nx-b) :is(.modal-box, .modal-card) {
    width: calc(100vw - 20px) !important; max-width: none !important;
    max-height: calc(100dvh - 40px) !important; overflow-y: auto !important;
    border-radius: 18px !important;
  }
}

@media (max-width: 420px) {
  html.nxa body:not(#nx-a):not(#nx-b) .nx-orders-filter-grid,
  html.nxa body:not(#nx-a):not(#nx-b) #tab-orders [class*="filter-row"] { grid-template-columns: 1fr !important; }
}

/* ---------- 15. Section entrance & first paint --------------------------- */

/* Before the script runs, show only the section in the URL (no dashboard flash). */
html.nxa[data-nx-tab="dashboard"] #tab-dashboard,
html.nxa[data-nx-tab="brands"] #tab-brands,
html.nxa[data-nx-tab="products"] #tab-products,
html.nxa[data-nx-tab="flashsale"] #tab-flashsale,
html.nxa[data-nx-tab="homesections"] #tab-homesections,
html.nxa[data-nx-tab="categories"] #tab-categories,
html.nxa[data-nx-tab="banners"] #tab-banners,
html.nxa[data-nx-tab="cartsettings"] #tab-cartsettings,
html.nxa[data-nx-tab="coupons"] #tab-coupons,
html.nxa[data-nx-tab="orders"] #tab-orders,
html.nxa[data-nx-tab="posorders"] #tab-posorders,
html.nxa[data-nx-tab="incompleteorders"] #tab-incompleteorders,
html.nxa[data-nx-tab="paymentmethods"] #tab-paymentmethods,
html.nxa[data-nx-tab="tracking"] #tab-tracking,
html.nxa[data-nx-tab="sitesetting"] #tab-sitesetting,
html.nxa[data-nx-tab="users"] #tab-users,
html.nxa[data-nx-tab="notifications"] #tab-notifications,
html.nxa[data-nx-tab="adminaccess"] #tab-adminaccess,
html.nxa[data-nx-tab="adminactivity"] #tab-adminactivity,
html.nxa[data-nx-tab="featurecenter"] #tab-featurecenter,
html.nxa[data-nx-tab="profile"] #tab-profile { display: block; }

/* A section that just opened rises in softly. */
html.nxa .tab-content.nx-enter { animation: nxEnter 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes nxEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.nxa .tab-content.nx-enter { animation: none; }
}
