/* Nexus Wallet — BingCard-inspired layout, Nexus brand tokens */

#section-crypto-wallet.active {
  background: transparent;
}

/* —— Locked viewport shell: only portfolio/tx lists scroll —— */
html.nxw-scroll-lock,
body.nxw-scroll-lock {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none;
}

.main-content.nxw-scroll-lock {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
}

.content-wrapper:has(#section-crypto-wallet.active) {
  padding-top: 12px;
  padding-bottom: 0;
  overflow: hidden !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .content-wrapper:has(#section-crypto-wallet.active) {
    padding-top: 10px;
    padding-bottom: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Bottom nav clearance: only visible after scrolling to list end */
  .main-content.nxw-scroll-lock {
    padding-bottom: 0 !important;
  }

  .nxw-portfolio-list,
  .nxw-tx-scroll {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
}

/* Only when .active — never pin display:block via a sticky helper class */
#section-crypto-wallet.active {
  display: block !important;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden !important;
}

/* Vars on the section so drawers (outside .nxw) still resolve them */
#section-crypto-wallet {
  --nxw-primary: var(--primary-blue, #05305c);
  --nxw-accent: var(--gold-primary, #3179ff);
  --nxw-accent-soft: rgba(49, 121, 255, 0.12);
  --nxw-accent-soft-hover: rgba(49, 121, 255, 0.2);
  --nxw-accent-border: rgba(49, 121, 255, 0.35);
  --nxw-border: var(--gray-200, #e9ecef);
  --nxw-muted: var(--gray-600, #6c757d);
  --nxw-text: var(--gray-900, #212529);
  --nxw-card: var(--white, #fff);
  --nxw-radius: 12px;
  --nxw-font: inherit;
  --dash-skel-base: #e9ecef;
  --dash-skel-shine: rgba(255, 255, 255, 0.55);
}

body.dark-mode #section-crypto-wallet {
  --nxw-border: #2a2a2a;
  --nxw-muted: #94a3b8;
  --nxw-text: #f1f5f9;
  --nxw-card: #000000;
  --nxw-accent-soft: rgba(49, 121, 255, 0.16);
  --nxw-accent-soft-hover: rgba(49, 121, 255, 0.24);
  --nxw-accent-border: rgba(49, 121, 255, 0.45);
  --dash-skel-base: #0c0c0c;
  --dash-skel-shine: rgba(255, 255, 255, 0.06);
}

/* Absolute fill so fixed drawers don't steal flex height */
#section-crypto-wallet .nxw {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  font-family: var(--nxw-font);
  color: var(--nxw-text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* —— Hero pinned at top of wallet shell (no page sticky / no shift) —— */
.nxw-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px 20px;
  padding: 10px 20px 14px;
  margin: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  background: var(--gray-50, #f8f9fa);
  flex-shrink: 0;
}

body.dark-mode .nxw-hero {
  background: #0c0c0c;
}

.nxw-hero-sentinel {
  display: none;
}

.nxw-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--nxw-muted);
}

.nxw-hero-value {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--nxw-primary);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

body.dark-mode .nxw-hero-value {
  color: var(--nxw-text);
}

.nxw-hero-value.is-hidden {
  filter: blur(8px);
  user-select: none;
}

#nxwPortfolioPanel.is-balances-hidden .nxw-asset-bal-amt,
#nxwPortfolioPanel.is-balances-hidden .nxw-asset-bal-usd {
  filter: blur(8px);
  user-select: none;
}

.nxw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#section-crypto-wallet .nxw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    opacity 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

#section-crypto-wallet .nxw-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Match Support primary / soft (#3179ff) */
#section-crypto-wallet .nxw-btn-primary {
  background: #3179ff !important;
  color: #fff !important;
  border-color: #3179ff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

#section-crypto-wallet .nxw-btn-primary:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  filter: none;
}

#section-crypto-wallet .nxw-btn-soft {
  background: rgba(49, 121, 255, 0.12) !important;
  color: #3179ff !important;
  border-color: transparent !important;
}

body.dark-mode #section-crypto-wallet .nxw-btn-soft {
  color: #3179ff !important;
  background: rgba(49, 121, 255, 0.16) !important;
}

#section-crypto-wallet .nxw-btn-soft:hover {
  background: rgba(49, 121, 255, 0.2) !important;
}

body.dark-mode #section-crypto-wallet .nxw-btn-soft:hover {
  background: rgba(49, 121, 255, 0.24) !important;
}

#section-crypto-wallet .nxw-btn-block:not(.nxw-btn-primary) {
  width: 100%;
  background: var(--gray-100, #f1f3f5) !important;
  color: var(--nxw-text) !important;
  border-color: var(--nxw-border) !important;
}

#section-crypto-wallet .nxw-btn-primary.nxw-btn-block {
  width: 100%;
  background: #3179ff !important;
  color: #fff !important;
  border-color: #3179ff !important;
}

body.dark-mode #section-crypto-wallet .nxw-btn-block:not(.nxw-btn-primary) {
  background: #0c0c0c !important;
}

#section-crypto-wallet .nxw-btn-block:not(.nxw-btn-primary):hover {
  background: var(--gray-200, #e9ecef) !important;
}

body.dark-mode #section-crypto-wallet .nxw-btn-block:not(.nxw-btn-primary):hover {
  background: #141414 !important;
}

.nxw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--nxw-muted);
  cursor: pointer;
}

.nxw-icon-btn:hover {
  background: var(--gray-100, #f1f3f5);
  color: var(--nxw-text);
}

body.dark-mode .nxw-icon-btn:hover {
  background: #0c0c0c;
}

.nxw-icon-btn svg {
  width: 16px;
  height: 16px;
}

.nxw-icon-btn.is-spinning svg {
  animation: nxw-spin 0.7s linear infinite;
}

@keyframes nxw-spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Two-column panels —— */
.nxw-panels {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  background: var(--nxw-card);
  border: 1px solid var(--nxw-border);
  border-radius: var(--nxw-radius);
  overflow: hidden;
}

@media (min-width: 900px) {
  .nxw-panels {
    flex-direction: row;
    align-items: stretch;
  }
}

.nxw-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.nxw-portfolio-panel {
  flex: 1 1 45%;
}

@media (min-width: 900px) {
  .nxw-portfolio-panel {
    width: 360px;
    flex: 0 0 360px;
    border-right: 1px solid var(--nxw-border);
  }

  .nxw-tx-panel {
    flex: 1 1 auto;
  }
}

.nxw-mobile-switch-wrap {
  display: none;
}

.nxw-mobile-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #f3f4f6;
}

body.dark-mode .nxw-mobile-switch {
  background: #0c0c0c;
}

.nxw-mobile-switch__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease-out;
  pointer-events: none;
  z-index: 0;
}

body.dark-mode .nxw-mobile-switch__thumb {
  background: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.nxw-mobile-switch[data-active="transactions"] .nxw-mobile-switch__thumb {
  transform: translateX(100%);
}

.nxw-mobile-switch__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.nxw-mobile-switch__btn.is-active {
  color: #111827;
}

body.dark-mode .nxw-mobile-switch__btn {
  color: #9ca3af;
}

body.dark-mode .nxw-mobile-switch__btn.is-active {
  color: #f9fafb;
}

.nxw-mobile-switch__btn:focus-visible {
  outline: 2px solid var(--nxw-accent, #2563eb);
  outline-offset: 1px;
}

@media (max-width: 899px) {
  .nxw-mobile-switch-wrap {
    display: block;
    flex-shrink: 0;
    padding: 4px 0 12px;
    box-sizing: border-box;
  }

  .nxw-portfolio-panel,
  .nxw-tx-panel {
    flex: 1 1 auto;
    min-height: 0;
    border-top: none;
  }

  .nxw-panels[data-nxw-mobile-view="portfolio"] .nxw-tx-panel {
    display: none;
  }

  .nxw-panels[data-nxw-mobile-view="transactions"] .nxw-portfolio-panel {
    display: none;
  }
}

.nxw-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nxw-border);
  flex-shrink: 0;
  min-height: 61px;
  box-sizing: border-box;
}

.nxw-panel-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nxw-tx-filter-btn {
  display: none;
}

.nxw-tx-filter-btn.is-active {
  color: var(--nxw-accent, #ef9227);
  background: rgba(239, 146, 39, 0.12);
}

.nxw-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: #111827;
}

body.dark-mode .nxw-panel-header h3 {
  color: var(--nxw-text);
}

/* Portfolio list scrolls; transactions scroll includes pagination (BingCard) */
.nxw-portfolio-list,
.nxw-tx-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* Overlay scrollbars (light + dark): no permanent reserved gutter / layout shift */
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.35) transparent;
}

body.dark-mode #section-crypto-wallet .nxw-portfolio-list,
body.dark-mode #section-crypto-wallet .nxw-tx-scroll,
body.dark-mode #section-crypto-wallet .nxw-tx-list--drawer {
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.nxw-tx-scroll {
  display: flex;
  flex-direction: column;
}

.nxw-tx-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

/* Portfolio rows — BingCard: px-5 py-3.5, text-base/medium + text-sm/gray-400 */
.nxw-asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px 20px;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
  transition: background 0.12s ease;
}

.nxw-asset-row:last-child {
  border-bottom: none;
}

.nxw-asset-row:hover {
  background: #f9fafb;
}

body.dark-mode .nxw-asset-row {
  border-bottom-color: #0c0c0c;
}

body.dark-mode .nxw-asset-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nxw-asset-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.nxw-asset-row img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.nxw-asset-row img.nxw-flag {
  object-fit: cover;
}

.nxw-asset-meta {
  flex: 1;
  min-width: 0;
}

.nxw-asset-name {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .nxw-asset-name {
  color: var(--nxw-text);
}

.nxw-asset-price {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.nxw-asset-bal {
  text-align: right;
  flex-shrink: 0;
}

.nxw-asset-bal-amt {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

body.dark-mode .nxw-asset-bal-amt {
  color: var(--nxw-text);
}

.nxw-asset-bal-usd {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

/* Transactions toolbar — BingCard: px-5 py-3, h-8 controls, text-xs */
.nxw-tx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--nxw-border);
  flex-shrink: 0;
  min-height: 57px;
  box-sizing: border-box;
}

.nxw-select-wrap {
  flex-shrink: 0;
}

.nxw-select-wrap select,
.nxw-date-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  box-sizing: border-box;
}

body.dark-mode .nxw-select-wrap select,
body.dark-mode .nxw-date-input {
  border-color: rgba(255, 255, 255, 0.12);
  color: #d1d5db;
}

.nxw-date-wrap {
  position: relative;
  flex-shrink: 0;
}

/* Exact BingCard "Date range" chip */
#section-crypto-wallet .nxw-date-btn {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#section-crypto-wallet .nxw-date-btn:hover {
  background: #f9fafb;
}

#section-crypto-wallet .nxw-date-btn:focus,
#section-crypto-wallet .nxw-date-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(239, 146, 39, 0.35);
}

#section-crypto-wallet .nxw-date-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: currentColor;
}

body.dark-mode #section-crypto-wallet .nxw-date-btn {
  border-color: rgba(255, 255, 255, 0.12);
  color: #d1d5db;
}

body.dark-mode #section-crypto-wallet .nxw-date-btn:hover {
  background: #0c0c0c;
}

.nxw-date-input-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.nxw-search-wrap {
  position: relative;
  flex: 1 1 180px;
  min-width: 160px;
}

.nxw-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #9ca3af;
  pointer-events: none;
}

.nxw-search-wrap input {
  width: 100%;
  height: 32px;
  padding: 4px 12px 4px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  box-sizing: border-box;
}

body.dark-mode .nxw-search-wrap input {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #d1d5db;
}

.nxw-search-wrap input::placeholder {
  color: #9ca3af;
}

.nxw-search-wrap input:focus,
.nxw-select-wrap select:focus,
.nxw-date-input:focus {
  outline: none;
  border-color: var(--nxw-accent);
  box-shadow: 0 0 0 2px rgba(239, 146, 39, 0.2);
}

/* Transaction rows */
.nxw-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

.nxw-tx-row:hover {
  background: #f9fafb;
}

.nxw-tx-row:last-child {
  border-bottom: none;
}

body.dark-mode .nxw-tx-row {
  border-bottom-color: #0c0c0c;
}

body.dark-mode .nxw-tx-row:hover {
  background: #111;
}

.nxw-tx-row:last-child {
  border-bottom: none;
}

.nxw-tx-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--gray-100, #f1f3f5);
  color: var(--nxw-primary);
  overflow: visible;
}

body.dark-mode .nxw-tx-icon {
  background: #0c0c0c;
  color: #cbd5e1;
}

.nxw-tx-icon.is-in {
  background: #f0fdf4;
  color: #16a34a;
}

.nxw-tx-icon.is-out {
  background: #fef2f2;
  color: #dc2626;
}

body.dark-mode .nxw-tx-icon.is-in {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

body.dark-mode .nxw-tx-icon.is-out {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.nxw-tx-icon--swap {
  background: transparent !important;
}

.nxw-tx-icon svg {
  width: 20px;
  height: 20px;
}

.nxw-tx-pair {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2px solid var(--nxw-card, #fff);
  box-sizing: border-box;
}

.nxw-tx-pair.nxw-flag {
  object-fit: cover;
}

.nxw-tx-pair--to {
  top: 0;
  right: 0;
  z-index: 1;
}

.nxw-tx-pair--from {
  bottom: 0;
  left: 0;
  z-index: 2;
}

.nxw-tx-badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1.5px solid var(--nxw-card, #fff);
  box-sizing: border-box;
}

.nxw-tx-badge.nxw-flag {
  object-fit: cover;
}

.nxw-tx-body {
  flex: 1;
  min-width: 0;
}

.nxw-tx-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
  color: #111827;
}

body.dark-mode .nxw-tx-title {
  color: var(--nxw-text);
}

.nxw-tx-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nxw-tx-right {
  text-align: right;
  flex-shrink: 0;
}

.nxw-tx-amt {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

body.dark-mode .nxw-tx-amt {
  color: var(--nxw-text);
}

.nxw-tx-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--success, #4caf50);
  text-transform: capitalize;
}

.nxw-tx-status.is-pending {
  color: var(--warning, #ff9800);
}

.nxw-tx-status.is-failed {
  color: var(--danger, #f44336);
}

.nxw-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--nxw-muted);
  font-size: 14px;
}

/* Pagination — at end of transaction scroll (not sticky / not pinned) */
.nxw-pagination,
.nxw-pagination[hidden] {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--nxw-border);
  flex: 0 0 auto;
  margin-top: 0;
  position: static;
  background: var(--nxw-card);
  z-index: auto;
}

.nxw-page-meta {
  font-size: 13px;
  color: var(--nxw-muted);
}

.nxw-page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nxw-page-btn,
.nxw-page-num {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--nxw-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.nxw-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#section-crypto-wallet .nxw-page-num.is-active {
  background: rgba(49, 121, 255, 0.12);
  color: #3179ff;
  font-weight: 700;
}

body.dark-mode #section-crypto-wallet .nxw-page-num.is-active {
  background: rgba(49, 121, 255, 0.16);
  color: #3179ff;
}

body.dark-mode #section-crypto-wallet .nxw-page-btn:hover:not(:disabled),
body.dark-mode #section-crypto-wallet .nxw-page-num:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.06);
}

.nxw-page-numbers {
  display: flex;
  gap: 2px;
}

/* —— Drawers (asset / exchange) —— */
.nxw-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.35);
}

.nxw-drawer-overlay[hidden] {
  display: none !important;
}

.nxw-drawer {
  width: min(100vw, 28rem);
  height: 100%;
  background: var(--nxw-card);
  color: var(--nxw-text);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  animation: nxw-slide-in 0.22s ease;
}

@keyframes nxw-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.nxw-drawer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  flex-shrink: 0;
}

.nxw-drawer-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nxw-drawer-asset img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--gray-100, #f1f3f5);
}

.nxw-drawer-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--nxw-primary);
}

body.dark-mode .nxw-drawer-name {
  color: var(--nxw-text);
}

.nxw-drawer-price {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--nxw-muted);
}

.nxw-drawer-balance {
  padding: 0 24px 18px;
  flex-shrink: 0;
}

.nxw-drawer-balance-label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--nxw-muted);
}

.nxw-drawer-balance-amt {
  margin: 6px 0 0;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--nxw-primary);
  font-variant-numeric: tabular-nums;
}

body.dark-mode .nxw-drawer-balance-amt {
  color: var(--nxw-text);
}

.nxw-drawer-balance-usd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--nxw-muted);
  font-variant-numeric: tabular-nums;
}

.nxw-drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

#section-crypto-wallet .nxw-drawer-actions .nxw-btn {
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 12px 8px;
  font-size: 13px;
  min-height: 64px;
}

@media (min-width: 400px) {
  #section-crypto-wallet .nxw-drawer-actions .nxw-btn {
    flex-direction: row;
    min-height: 44px;
  }
}

.nxw-drawer-activity {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--nxw-border);
}

.nxw-tx-list--drawer {
  flex: 1;
  overflow-y: auto;
}

.nxw-drawer-footer {
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--nxw-border);
  flex-shrink: 0;
}

/* Exchange drawer — BingCard layout, Nexus brand */
#nxwExchangeOverlay {
  background: rgba(229, 231, 235, 0.75);
}

body.dark-mode #section-crypto-wallet #nxwExchangeOverlay {
  background: rgba(31, 41, 55, 0.75);
}

#nxwExchangeDrawer {
  width: min(100vw, 28rem);
  box-shadow: none;
  background: #fff;
}

body.dark-mode #nxwExchangeDrawer {
  background: #000;
  box-shadow: none;
}

.nxw-ex {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.nxw-ex-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px;
  flex-shrink: 0;
}

.nxw-ex-head .nxw-drawer-name {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #111827;
}

.nxw-ex-head .nxw-drawer-price {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
}

body.dark-mode .nxw-ex-head .nxw-drawer-name {
  color: #fff;
}

body.dark-mode .nxw-ex-head .nxw-drawer-price {
  color: #9ca3af;
}

.nxw-ex-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
}

.nxw-ex-close:hover {
  color: #4b5563;
}

body.dark-mode .nxw-ex-close:hover {
  color: #d1d5db;
}

.nxw-ex-close svg {
  width: 20px;
  height: 20px;
}

.nxw-ex-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.nxw-ex-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nxw-ex-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}

.nxw-ex-label-row label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.nxw-ex-label-row span,
.nxw-ex-hint {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
}

body.dark-mode .nxw-ex-label-row label {
  color: #e5e7eb;
}

body.dark-mode .nxw-ex-label-row span,
body.dark-mode .nxw-ex-hint {
  color: #9ca3af;
}

.nxw-ex-picker,
.nxw-ex-pay,
.nxw-ex-receive {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 40px;
}

.nxw-ex-picker {
  height: auto;
}

.nxw-ex-picker.is-open {
  z-index: 30;
}

.nxw-ex-picker-btn {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px #e5e7eb;
  cursor: pointer;
  box-sizing: border-box;
}

.nxw-ex-picker-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.nxw-ex-picker-btn img.nxw-flag {
  object-fit: cover;
}

.nxw-ex-picker-btn span {
  flex: 1;
  min-width: 0;
}

.nxw-ex-picker-btn svg {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #6b7280;
  flex-shrink: 0;
}

.nxw-ex-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nxw-ex-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border-radius: 6px;
  background: #fff;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1),
    0 0 0 1px #e5e7eb;
}

.nxw-ex-menu.is-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.nxw-ex-menu[hidden] {
  display: none;
}

.nxw-ex-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 36px;
  padding: 6px;
  border-radius: 6px;
  color: #111827;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  box-sizing: border-box;
}

.nxw-ex-option-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nxw-ex-option img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.nxw-ex-option img.nxw-flag {
  object-fit: cover;
}

.nxw-ex-option:hover,
.nxw-ex-option.is-active {
  background: #f3f4f6;
}

.nxw-ex-pay input,
.nxw-ex-receive input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px #e5e7eb;
  box-sizing: border-box;
}

.nxw-ex-pay input {
  border-radius: 6px 0 0 6px;
  padding: 0 64px 0 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px #e5e7eb;
}

.nxw-ex-pay-suffix,
.nxw-ex-receive span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  pointer-events: none;
}

.nxw-ex-pay-suffix {
  right: 58px;
}

.nxw-ex-pay button {
  flex: 0 0 auto;
  margin-left: -1px;
  padding: 0 10px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px #e5e7eb;
  cursor: pointer;
}

.nxw-ex-pay button:hover {
  background: #f3f4f6;
}

.nxw-ex-receive input {
  padding: 0 64px 0 14px;
  color: #6b7280;
}

.nxw-ex-receive span {
  right: 14px;
}

.nxw-ex-split {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 28px;
}

.nxw-ex-split-line {
  flex: 1 1 auto;
  height: 0;
  border-top: 1px solid #e5e7eb;
}

.nxw-ex-split button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #374151;
  cursor: pointer;
  flex-shrink: 0;
}

.nxw-ex-split button:hover {
  color: var(--nxw-accent, #ef9227);
}

.nxw-ex-split svg {
  width: 28px;
  height: 28px;
}

.nxw-ex-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  padding-bottom: calc(24px + var(--safe-bottom, 0px));
}

.nxw-ex-foot .nxw-btn,
.nxw-ex-foot .nxw-ex-cancel {
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  box-sizing: border-box;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

#nxwExchangeDrawer .nxw-btn-primary.nxw-btn-block {
  height: 40px;
  margin: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.nxw-ex-cancel {
  width: 100%;
  height: 40px;
  margin: 0;
  border-radius: 6px;
  border: 0;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px #e5e7eb;
  cursor: pointer;
}

.nxw-ex-cancel:hover {
  background: #f9fafb;
}

#nxwTxDetailOverlay {
  background: rgba(229, 231, 235, 0.75);
}

body.dark-mode #section-crypto-wallet #nxwTxDetailOverlay {
  background: rgba(31, 41, 55, 0.75);
}

#nxwTxDetailDrawer {
  box-shadow: none;
  background: #fff;
}

body.dark-mode #nxwTxDetailDrawer {
  background: #000;
  box-shadow: none;
}

.nxw-txd-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nxw-txd-section + .nxw-txd-section {
  margin-top: 24px;
}

.nxw-txd-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #111827;
}

.nxw-txd-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nxw-txd-field {
  font-size: 14px;
  line-height: 20px;
}

.nxw-txd-label {
  margin: 0;
  color: #6b7280;
}

.nxw-txd-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 2px 0 0;
  font-weight: 500;
  color: #111827;
}

.nxw-txd-value span,
.nxw-txd-value a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nxw-txd-value a {
  color: var(--nxw-accent, #ef9227);
  text-decoration: none;
}

.nxw-txd-value a:hover {
  text-decoration: underline;
}

.nxw-txd-value.is-mono span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nxw-txd-value.is-complete {
  color: #16a34a;
}

.nxw-txd-value.is-pending {
  color: #d97706;
}

.nxw-txd-value.is-failed {
  color: #dc2626;
}

.nxw-tx-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  flex-shrink: 0;
}

.nxw-tx-copy:hover,
.nxw-tx-copy.is-copied {
  color: #4b5563;
}

.nxw-tx-copy svg {
  width: 14px;
  height: 14px;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-heading,
body.dark-mode #nxwTxDetailDrawer .nxw-txd-value {
  color: #fff;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-label,
body.dark-mode #nxwTxDetailDrawer .nxw-tx-copy {
  color: #9ca3af;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-value.is-complete {
  color: #4ade80;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-value.is-pending {
  color: #fbbf24;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-value.is-failed {
  color: #f87171;
}

body.dark-mode #nxwTxDetailDrawer .nxw-txd-value a {
  color: var(--nxw-accent, #ef9227);
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-picker-btn,
body.dark-mode #nxwExchangeDrawer .nxw-ex-pay input,
body.dark-mode #nxwExchangeDrawer .nxw-ex-receive input,
body.dark-mode #nxwExchangeDrawer .nxw-ex-cancel {
  background-color: #000;
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-split button {
  background: transparent;
  color: #e5e7eb;
  box-shadow: none;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-split button:hover {
  color: var(--nxw-accent, #ef9227);
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-picker-btn svg {
  color: #9ca3af;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-menu {
  background: #1f2937;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.45),
    0 0 0 1px #374151;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-option {
  color: #fff;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-option:hover,
body.dark-mode #nxwExchangeDrawer .nxw-ex-option.is-active {
  background: #111827;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-pay button {
  background: #0c0c0c;
  color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-split-line {
  border-top-color: #1f2937;
}

body.dark-mode #nxwExchangeDrawer .nxw-ex-pay-suffix,
body.dark-mode #nxwExchangeDrawer .nxw-ex-receive span {
  color: #9ca3af;
}

.nxw-ex-picker-btn:focus,
.nxw-ex-pay input:focus,
.nxw-ex-receive input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(239, 146, 39, 0.35);
}

/* Exchange form */
.nxw-exchange-form {
  padding: 0 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
}

.nxw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.nxw-field > span:first-child {
  font-size: 13px;
  font-weight: 500;
  color: var(--nxw-muted);
}

.nxw-field select,
.nxw-field input[type="number"] {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nxw-border);
  border-radius: 8px;
  background: var(--nxw-card);
  color: var(--nxw-text);
  font-size: 15px;
}

.nxw-field-hint {
  font-size: 12px;
  color: var(--nxw-muted);
  margin: 0;
}

.nxw-link-btn {
  position: absolute;
  right: 10px;
  top: 34px;
  border: none;
  background: transparent;
  color: var(--nxw-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile hero actions + BingCard-style filters drawer */
@media (max-width: 899px) {
  .nxw-hero-actions {
    width: 100%;
  }

  .nxw-hero-actions .nxw-btn {
    flex: 1;
  }

  .nxw-tx-filter-btn {
    display: inline-flex;
  }

  .nxw-tx-toolbar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Drawers sit above the bottom nav and use the full phone sheet */
  body:has(#section-crypto-wallet .nxw-drawer-overlay:not([hidden])) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
  }

  #section-crypto-wallet .nxw-drawer {
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
  }

  #section-crypto-wallet .nxw-ex-head,
  #section-crypto-wallet .nxw-ex-body,
  #section-crypto-wallet .nxw-ex-foot,
  #section-crypto-wallet .nxw-drawer-top,
  #section-crypto-wallet .nxw-drawer-balance,
  #section-crypto-wallet .nxw-drawer-footer,
  #section-crypto-wallet .nxw-filters-drawer__header,
  #section-crypto-wallet .nxw-filters-drawer__body,
  #section-crypto-wallet .nxw-filters-drawer__footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  #section-crypto-wallet .nxw-ex-foot,
  #section-crypto-wallet .nxw-drawer-footer,
  #section-crypto-wallet .nxw-filters-drawer__footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  .nxw-hero-actions {
    width: 100%;
  }

  .nxw-hero-actions .nxw-btn {
    flex: 1;
  }
}

/* Filters drawer */
.nxw-filters-drawer {
  max-width: 28rem;
}

.nxw-filters-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 20px;
  border-bottom: 1px solid var(--nxw-border);
  flex-shrink: 0;
}

.nxw-filters-drawer__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

body.dark-mode .nxw-filters-drawer__header h3 {
  color: var(--nxw-text);
}

.nxw-filters-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nxw-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.nxw-filter-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

body.dark-mode .nxw-filter-label {
  color: #d1d5db;
}

.nxw-filter-field select,
.nxw-filter-search input,
#section-crypto-wallet .nxw-filter-date-wrap .nxw-date-btn {
  width: 100%;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
}

.nxw-filter-field select {
  padding: 0 12px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.nxw-filter-search {
  position: relative;
  display: block;
}

.nxw-filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  pointer-events: none;
}

.nxw-filter-search input {
  display: block;
  width: 100%;
  padding: 0 12px 0 36px;
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
}

.nxw-filter-search input::placeholder {
  color: #9ca3af;
}

#section-crypto-wallet .nxw-filter-date-wrap .nxw-date-btn {
  justify-content: flex-start;
  gap: 8px;
  padding: 0 12px;
}

body.dark-mode .nxw-filter-field select,
body.dark-mode .nxw-filter-search input,
body.dark-mode #section-crypto-wallet .nxw-filter-date-wrap .nxw-date-btn {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #d1d5db;
}

.nxw-filters-drawer__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--nxw-border);
}

/* Kill legacy wallet layout when new page is active */
#section-crypto-wallet .crypto-wallet-landing,
#section-crypto-wallet .crypto-asset-wallet,
#section-crypto-wallet .crypto-main-grid {
  display: none !important;
}

/*
 * Dark-mode polish — beat global `body.dark-mode p/span` (#f5f5f5) and
 * finish missing hover / control / semantic styles for the Wallet page.
 */
body.dark-mode #section-crypto-wallet {
  color-scheme: dark;
}

body.dark-mode #section-crypto-wallet .nxw-hero-label,
body.dark-mode #section-crypto-wallet .nxw-asset-price,
body.dark-mode #section-crypto-wallet .nxw-asset-bal-usd,
body.dark-mode #section-crypto-wallet .nxw-tx-sub,
body.dark-mode #section-crypto-wallet .nxw-page-meta,
body.dark-mode #section-crypto-wallet .nxw-drawer-price,
body.dark-mode #section-crypto-wallet .nxw-drawer-balance-label,
body.dark-mode #section-crypto-wallet .nxw-drawer-balance-usd,
body.dark-mode #section-crypto-wallet .nxw-field-hint,
body.dark-mode #section-crypto-wallet .nxw-field > span:first-child,
body.dark-mode #section-crypto-wallet .nxw-empty,
body.dark-mode #section-crypto-wallet .nxw-filter-label {
  color: var(--nxw-muted);
}

body.dark-mode #section-crypto-wallet .nxw-panel-header h3,
body.dark-mode #section-crypto-wallet .nxw-asset-name,
body.dark-mode #section-crypto-wallet .nxw-asset-bal-amt,
body.dark-mode #section-crypto-wallet .nxw-tx-title,
body.dark-mode #section-crypto-wallet .nxw-tx-amt,
body.dark-mode #section-crypto-wallet .nxw-drawer-name,
body.dark-mode #section-crypto-wallet .nxw-drawer-balance-amt,
body.dark-mode #section-crypto-wallet .nxw-filters-drawer__header h3,
body.dark-mode #section-crypto-wallet .nxw-hero-value {
  color: var(--nxw-text);
}

body.dark-mode #section-crypto-wallet .nxw-tx-status {
  color: var(--success, #4caf50);
}

body.dark-mode #section-crypto-wallet .nxw-tx-status.is-pending {
  color: var(--warning, #ff9800);
}

body.dark-mode #section-crypto-wallet .nxw-tx-status.is-failed {
  color: var(--danger, #f44336);
}

body.dark-mode #section-crypto-wallet .nxw-asset-row,
body.dark-mode #section-crypto-wallet .nxw-tx-row {
  border-bottom-color: var(--nxw-border);
}

body.dark-mode #section-crypto-wallet .nxw-asset-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode #section-crypto-wallet .nxw-select-wrap select,
body.dark-mode #section-crypto-wallet .nxw-date-input,
body.dark-mode #section-crypto-wallet .nxw-search-wrap input,
body.dark-mode #section-crypto-wallet .nxw-date-btn,
body.dark-mode #section-crypto-wallet .nxw-filter-field select,
body.dark-mode #section-crypto-wallet .nxw-filter-search input,
body.dark-mode #section-crypto-wallet .nxw-filter-date-wrap .nxw-date-btn,
body.dark-mode #section-crypto-wallet .nxw-field select,
body.dark-mode #section-crypto-wallet .nxw-field input[type="number"] {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

body.dark-mode #section-crypto-wallet .nxw-search-wrap input::placeholder,
body.dark-mode #section-crypto-wallet .nxw-filter-search input::placeholder {
  color: #64748b;
}

body.dark-mode #section-crypto-wallet .nxw-search-wrap svg,
body.dark-mode #section-crypto-wallet .nxw-filter-search svg,
body.dark-mode #section-crypto-wallet .nxw-date-btn svg {
  color: #94a3b8;
}

body.dark-mode #section-crypto-wallet .nxw-date-btn:hover,
body.dark-mode #section-crypto-wallet .nxw-filter-date-wrap .nxw-date-btn:hover {
  background: #0c0c0c;
}

body.dark-mode #section-crypto-wallet .nxw-select-wrap select:focus,
body.dark-mode #section-crypto-wallet .nxw-search-wrap input:focus,
body.dark-mode #section-crypto-wallet .nxw-date-input:focus,
body.dark-mode #section-crypto-wallet .nxw-filter-field select:focus,
body.dark-mode #section-crypto-wallet .nxw-filter-search input:focus,
body.dark-mode #section-crypto-wallet .nxw-field select:focus,
body.dark-mode #section-crypto-wallet .nxw-field input[type="number"]:focus {
  border-color: var(--nxw-accent);
  box-shadow: 0 0 0 2px rgba(239, 146, 39, 0.25);
  outline: none;
}

body.dark-mode #section-crypto-wallet .nxw-drawer:not(#nxwExchangeDrawer):not(#nxwTxDetailDrawer) {
  background: var(--nxw-card);
  color: var(--nxw-text);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
}

body.dark-mode #section-crypto-wallet .nxw-drawer-overlay {
  background: rgba(0, 0, 0, 0.55);
}

body.dark-mode #section-crypto-wallet .nxw-drawer-asset img {
  background: #0c0c0c;
}

body.dark-mode #section-crypto-wallet .nxw-icon-btn {
  color: #94a3b8;
}

body.dark-mode #section-crypto-wallet .nxw-icon-btn:hover {
  background: #0c0c0c;
  color: var(--nxw-text);
}

body.dark-mode #section-crypto-wallet .nxw-tx-filter-btn.is-active {
  color: var(--gold-secondary, #fabc2e);
  background: rgba(239, 146, 39, 0.18);
}

body.dark-mode #section-crypto-wallet .nxw-pagination {
  background: var(--nxw-card);
  border-top-color: var(--nxw-border);
}

body.dark-mode #section-crypto-wallet .nxw-filter-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

body.dark-mode #section-crypto-wallet .nxw-mobile-switch {
  background: #0c0c0c;
}

body.dark-mode #section-crypto-wallet .nxw-mobile-switch__thumb {
  background: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

body.dark-mode #section-crypto-wallet .nxw-mobile-switch__btn {
  color: #94a3b8;
}

body.dark-mode #section-crypto-wallet .nxw-mobile-switch__btn.is-active {
  color: #f8fafc;
}

body.dark-mode #section-crypto-wallet .nxw-panels {
  background: var(--nxw-card);
  border-color: var(--nxw-border);
}

body.dark-mode #section-crypto-wallet .nxw-link-btn {
  color: var(--gold-secondary, #fabc2e);
}

/* ========== Wallet page skeleton loading ========== */
#section-crypto-wallet.is-loading #nxWalletContent {
  display: none !important;
}

#section-crypto-wallet:not(.is-loading) #nxWalletSkeleton {
  display: none !important;
}

#nxWalletSkeleton,
#nxWalletContent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

#nxWalletSkeleton {
  pointer-events: none;
  z-index: 1;
  background: transparent;
}

#nxWalletContent {
  z-index: 0;
}

.nxw-skel-balance {
  width: min(220px, 55vw);
  height: 32px;
  margin-top: 6px;
  border-radius: 8px;
}

.nxw-skel-btn {
  width: 108px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
}

.nxw-skel-mobile-switch {
  width: 100%;
  max-width: 280px;
  height: 40px;
  margin: 0 auto;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  background: var(--dash-skel-base, #e9ecef);
}

.nxw-skel-mobile-switch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--dash-skel-shine, rgba(255, 255, 255, 0.55)),
    transparent
  );
  animation: dash-skel-shimmer 1.6s ease-in-out infinite;
}

.nxw-skel-panel-title {
  width: 120px;
  height: 14px;
  margin: 0;
}

.nxw-skel-asset-row,
.nxw-skel-tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--nxw-border, #e9ecef);
  box-sizing: border-box;
}

.nxw-skel-asset-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.nxw-skel-asset-meta,
.nxw-skel-tx-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.nxw-skel-asset-right,
.nxw-skel-tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.nxw-skel-toolbar {
  pointer-events: none;
}

.nxw-skel-toolbar-select {
  width: 96px;
  height: 32px;
  border-radius: 8px;
}

.nxw-skel-toolbar-search {
  flex: 1;
  min-width: 120px;
  height: 32px;
  border-radius: 8px;
}

.nxw-skel-toolbar-date {
  width: 120px;
  height: 32px;
  border-radius: 8px;
}

.nxw-skel-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--nxw-border, #e9ecef);
  flex-shrink: 0;
}

.nxw-skel-page-meta {
  width: 64px;
  height: 12px;
}

.nxw-skel-page-btn {
  width: 56px;
  height: 28px;
  border-radius: 8px;
}

.nxw-skel-page-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nxw-hero-value:empty {
  min-height: 1.15em;
}

@media (max-width: 768px) {
  .nxw-skel-btn {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .nxw-skel-panels .nxw-tx-panel {
    display: none;
  }

  .nxw-skel-toolbar-date {
    display: none;
  }
}

