/* SUNDEX Wallet 64: one portfolio scene, one command rail, one calm ledger. */

html.sundex-wallet64-route,
html.sundex-wallet64-route body,
body:has(.wallet64-ready) {
  background: #020509 !important;
}

body:has(.wallet64-ready) {
  --w64-bg: #020509;
  --w64-surface: #070c13;
  --w64-surface-soft: rgba(8, 14, 22, 0.76);
  --w64-line: rgba(201, 218, 239, 0.13);
  --w64-line-strong: rgba(211, 226, 245, 0.24);
  --w64-ink: #f4f7fb;
  --w64-text: #d5deea;
  --w64-muted: #97a5b7;
  --w64-dim: #718093;
  --w64-positive: #a7d3b7;
  --w64-metal: #c8d6e7;
  --w64-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.wallet64-ready) .platform-shell {
  background:
    radial-gradient(ellipse 54% 28% at 56% -8%, rgba(91, 119, 153, 0.1), transparent 74%),
    var(--w64-bg) !important;
}

body:has(.wallet64-ready) .platform-main {
  padding: 26px 32px 80px !important;
}

.wallet-premium.wallet64-ready {
  width: min(1440px, 100%) !important;
  gap: 0 !important;
  color: var(--w64-text);
}

/* A single cinematic portfolio stage. */
.wallet64-ready .wallet-vault {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 600px;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(56px, 8vw, 128px);
  padding: 64px 64px 148px;
  overflow: hidden;
  border: 1px solid var(--w64-line-strong) !important;
  border-radius: 34px;
  background: #05090f !important;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

.wallet64-ready .wallet-vault::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block !important;
  border-radius: inherit;
  background: url("/assets/sundex-wallet-vault-p64.jpg") 60% center / cover no-repeat;
  opacity: 0.74;
  pointer-events: none;
}

.wallet64-ready .wallet-vault::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block !important;
  width: auto;
  height: auto;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.98) 0%, rgba(3, 7, 12, 0.9) 31%, rgba(3, 7, 12, 0.28) 59%, rgba(2, 5, 9, 0.2) 100%),
    linear-gradient(180deg, rgba(2, 5, 9, 0.08) 56%, rgba(2, 5, 9, 0.96) 100%);
  filter: none;
  transform: none;
  pointer-events: none;
}

.wallet64-ready .wallet-vault-main,
.wallet64-ready .wallet-allocation-card {
  position: relative;
  z-index: 2;
}

.wallet64-ready .wallet-vault-main {
  display: flex;
  align-self: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
}

.wallet64-ready .wallet-eyebrow {
  gap: 0;
  color: var(--w64-text);
  font-size: 0.92rem;
  font-weight: 560;
  letter-spacing: -0.012em;
  text-transform: none;
}

.wallet64-ready .wallet-eyebrow i {
  display: none;
}

.wallet64-ready .wallet-balance-label {
  margin-top: 56px;
  color: var(--w64-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.wallet64-ready .wallet-balance {
  margin-top: 10px;
  color: var(--w64-ink) !important;
  font-size: clamp(5.25rem, 7.2vw, 7.2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.wallet64-ready .wallet-balance * {
  color: inherit !important;
}

.wallet64-ready .wallet-change-row {
  gap: 14px;
  margin-top: 28px;
}

.wallet64-ready .wallet-change-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(167, 211, 183, 0.18);
  border-radius: 999px;
  color: var(--w64-positive);
  background: rgba(94, 139, 111, 0.1);
  box-shadow: none;
}

.wallet64-ready .wallet-change-copy,
.wallet64-ready .wallet-freshness {
  color: var(--w64-muted);
}

.wallet64-ready .wallet-freshness {
  margin-top: 14px;
  font-size: 0.76rem;
}

.wallet64-ready .wallet-freshness i {
  opacity: 0.42;
}

/* Holdings remain real data, but read as part of the scene rather than a card in a card. */
.wallet64-ready .wallet-allocation-card {
  align-self: end;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 14px;
  padding: 28px 0;
  border: 0 !important;
  border-top: 1px solid rgba(213, 228, 246, 0.22) !important;
  border-bottom: 1px solid rgba(213, 228, 246, 0.14) !important;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(3, 7, 12, 0.18), rgba(3, 7, 12, 0.8) 22%, rgba(3, 7, 12, 0.86)) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
}

.wallet64-ready .wallet-allocation-head {
  padding-bottom: 20px;
}

.wallet64-ready .wallet-allocation-head span {
  color: var(--w64-ink);
  font-size: 1.02rem;
  font-weight: 620;
}

.wallet64-ready .wallet-allocation-head strong {
  color: var(--w64-muted);
  font-size: 0.78rem;
  font-weight: 540;
}

.wallet64-ready .wallet-composition-bar {
  height: 2px;
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.wallet64-ready .wallet-composition-bar > div {
  filter: saturate(0.4) brightness(1.35);
}

.wallet64-ready .wallet-holding-row {
  min-height: 70px;
  padding: 10px 0;
  border-radius: 0;
}

.wallet64-ready .wallet-holding-asset img {
  width: 42px;
  height: 42px;
  filter: saturate(0.78);
}

.wallet64-ready .wallet-holding-asset strong,
.wallet64-ready .wallet-holding-value strong {
  color: var(--w64-ink);
  font-size: 0.96rem;
}

.wallet64-ready .wallet-holding-asset span,
.wallet64-ready .wallet-holding-value span {
  color: var(--w64-muted);
}

/* The command rail overlaps the stage and acts like one physical control. */
.wallet64-ready .wallet-action-grid {
  position: relative;
  z-index: 5;
  display: flex;
  width: fit-content;
  max-width: calc(100% - 128px);
  gap: 8px;
  margin: -112px 64px 0;
  padding: 7px;
  border: 1px solid var(--w64-line-strong);
  border-radius: 999px;
  background: rgba(4, 8, 13, 0.78);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.wallet64-ready .wallet-action {
  position: relative;
  display: flex;
  min-width: 190px;
  min-height: 58px;
  justify-content: space-between;
  padding: 8px 9px 8px 20px;
  overflow: hidden;
  border: 1px solid transparent !important;
  border-radius: 999px;
  color: var(--w64-ink);
  background: transparent !important;
  box-shadow: none !important;
  transition:
    transform 180ms var(--w64-ease),
    border-color 180ms ease,
    background-color 180ms ease;
}

.wallet64-ready .wallet-action + .wallet-action {
  border-left: 1px solid transparent !important;
}

.wallet64-ready .wallet-action[data-wallet-action="receive"] {
  border-color: rgba(217, 231, 247, 0.3) !important;
  color: var(--w64-ink);
  background: linear-gradient(145deg, rgba(190, 208, 230, 0.14), rgba(111, 135, 163, 0.06)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.wallet64-ready .wallet-action-copy {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.wallet64-ready .wallet-action-copy strong {
  order: 1;
  color: inherit;
  font-size: 0.92rem;
  font-weight: 640;
  letter-spacing: -0.012em;
}

.wallet64-ready .wallet-action-copy small {
  order: 2;
  color: var(--w64-dim);
  font-size: 0.7rem;
  font-weight: 500;
}

.wallet64-ready .wallet-action[data-wallet-action="receive"] small {
  color: var(--w64-muted);
}

.wallet64-ready .wallet-action-icon,
.wallet64-ready .wallet-action[data-wallet-action="receive"] .wallet-action-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--w64-line-strong);
  border-radius: 50%;
  color: var(--w64-metal);
  background: rgba(188, 207, 230, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* A ledger, not a pile of modules. */
.wallet64-ready .wallet-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.68fr) !important;
  gap: 52px !important;
  margin-top: 88px;
  overflow: visible;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

.wallet64-ready .wallet-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.wallet64-ready .wallet-assets-panel {
  min-width: 0;
}

.wallet64-ready .wallet-activity-panel {
  min-width: 0;
  padding-left: 40px !important;
  border-top: 0 !important;
  border-left: 1px solid var(--w64-line) !important;
}

.wallet64-ready .wallet-table-head,
.wallet64-ready .wallet-activity-panel > div:first-child {
  min-height: 64px;
  padding: 0 0 18px !important;
  border-bottom: 1px solid var(--w64-line) !important;
}

.wallet64-ready .wallet-panel-kicker {
  display: none;
}

.wallet64-ready .wallet-panel-title,
.wallet64-ready .wallet-activity-panel h2,
.wallet64-ready .wallet-activity-panel h3 {
  color: var(--w64-ink) !important;
  font-size: 1.38rem !important;
  font-weight: 610 !important;
  letter-spacing: -0.025em !important;
}

.wallet64-ready .wallet-table-count {
  color: var(--w64-muted);
  font-size: 0.75rem;
}

.wallet64-ready .wallet-data-table > [role="row"]:first-child,
.wallet64-ready .wallet-activity-table > [role="row"]:first-child {
  min-height: 42px;
  padding-inline: 0 !important;
  color: var(--w64-dim) !important;
  background: transparent !important;
}

.wallet64-ready .wallet-asset-row,
.wallet64-ready .wallet-activity-table .divide-y > [role="row"] {
  min-height: 88px;
  padding: 18px 0 !important;
  border-bottom: 1px solid var(--w64-line) !important;
}

.wallet64-ready .wallet-asset-icon {
  width: 42px;
  height: 42px;
}

.wallet64-ready .wallet-assets-panel p,
.wallet64-ready .wallet-activity-panel p {
  color: var(--w64-text);
}

.wallet64-ready .wallet-assets-panel .text-muted-foreground,
.wallet64-ready .wallet-activity-panel .text-muted-foreground {
  color: var(--w64-muted) !important;
}

.wallet64-ready .wallet-allocation-mini {
  opacity: 0.36;
}

/* Performance is one restrained analytical band. */
.wallet64-ready .wallet-chart-panel {
  min-height: 300px;
  margin-top: 68px !important;
  padding: 34px 0 28px !important;
  overflow: hidden;
  border: 0 !important;
  border-top: 1px solid var(--w64-line) !important;
  border-bottom: 1px solid var(--w64-line) !important;
  border-radius: 0 !important;
  background:
    radial-gradient(ellipse 45% 110% at 0% 100%, rgba(54, 77, 105, 0.11), transparent 72%),
    transparent !important;
  box-shadow: none !important;
}

.wallet64-ready .wallet-panel-head {
  min-height: 50px;
  margin-bottom: 20px;
}

.wallet64-ready .wallet-range-control {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--w64-line);
  border-radius: 999px;
  background: rgba(7, 12, 19, 0.8);
}

.wallet64-ready .wallet-range-control button {
  min-width: 50px;
  min-height: 38px;
  border-radius: 999px;
  color: var(--w64-muted);
}

.wallet64-ready .wallet-range-control button.is-active {
  color: #07101a;
  background: var(--w64-metal);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.5);
}

.wallet64-ready .wallet-flat-state {
  min-height: 146px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: 56px;
}

.wallet64-ready .wallet-flat-plot::before {
  opacity: 0.16;
  background-image: linear-gradient(rgba(194, 207, 224, 0.05) 1px, transparent 1px);
}

.wallet64-ready .wallet-flat-plot > i {
  background: linear-gradient(90deg, rgba(186, 201, 220, 0.05), rgba(186, 201, 220, 0.66));
}

.wallet64-ready .wallet-flat-plot > b {
  background: var(--w64-metal);
  box-shadow: 0 0 0 4px rgba(186, 201, 220, 0.075);
}

.wallet64-ready .wallet-flat-copy strong {
  color: var(--w64-ink);
}

.wallet64-ready .wallet-flat-copy p {
  color: var(--w64-muted);
}

@media (hover: hover) and (pointer: fine) {
  .wallet64-ready .wallet-action:hover {
    border-color: rgba(214, 228, 245, 0.22) !important;
    background: rgba(180, 201, 225, 0.055) !important;
    transform: translateY(-1px);
  }

  .wallet64-ready .wallet-action[data-wallet-action="receive"]:hover {
    border-color: rgba(224, 236, 249, 0.46) !important;
    background: linear-gradient(145deg, rgba(197, 216, 238, 0.18), rgba(119, 144, 173, 0.075)) !important;
  }

  .wallet64-ready .wallet-holding-row:hover,
  .wallet64-ready .wallet-asset-row:hover,
  .wallet64-ready .wallet-activity-table .divide-y > [role="row"]:hover {
    background-color: rgba(184, 204, 230, 0.035) !important;
  }
}

.wallet64-ready .wallet-action:active,
.wallet64-ready .wallet-range-control button:active {
  transform: scale(0.985);
}

.wallet64-ready :is(.wallet-action, .wallet-range-control button):focus-visible {
  outline: 2px solid rgba(210, 226, 246, 0.9);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .wallet64-ready .wallet-vault {
    min-height: 720px;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 42px;
    padding: 54px 48px 150px;
  }

  .wallet64-ready .wallet-vault::before {
    background-position: 48% center;
    opacity: 0.58;
  }

  .wallet64-ready .wallet-vault::after {
    background:
      linear-gradient(90deg, rgba(2, 5, 9, 0.97), rgba(3, 7, 12, 0.65) 52%, rgba(2, 5, 9, 0.2)),
      linear-gradient(180deg, rgba(2, 5, 9, 0.04) 40%, rgba(2, 5, 9, 0.95) 100%);
  }

  .wallet64-ready .wallet-vault-main {
    align-self: start;
  }

  .wallet64-ready .wallet-allocation-card {
    width: min(560px, 100%);
    margin: 70px 0 0 auto;
  }

  .wallet64-ready .wallet-data-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 50px !important;
  }

  .wallet64-ready .wallet-activity-panel {
    padding-top: 42px !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--w64-line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 760px) {
  body:has(.wallet64-ready) .platform-main {
    padding: 14px 14px 56px !important;
  }

  .wallet64-ready .wallet-vault {
    min-height: 690px;
    gap: 22px;
    padding: 34px 24px 132px;
    border-radius: 25px;
  }

  .wallet64-ready .wallet-vault::before {
    background-position: 55% center;
    opacity: 0.5;
  }

  .wallet64-ready .wallet-balance-label {
    margin-top: 40px;
  }

  .wallet64-ready .wallet-balance {
    font-size: clamp(4rem, 19vw, 5.5rem);
  }

  .wallet64-ready .wallet-allocation-card {
    min-height: 178px;
    margin-top: 86px;
    padding: 22px 0;
  }

  .wallet64-ready .wallet-action-grid {
    width: auto;
    max-width: none;
    margin: -100px 18px 0;
    gap: 4px;
  }

  .wallet64-ready .wallet-action {
    flex: 1;
    min-width: 0;
    min-height: 58px;
    padding: 8px 8px 8px 14px;
  }

  .wallet64-ready .wallet-action-copy small {
    display: none;
  }

  .wallet64-ready .wallet-action-icon,
  .wallet64-ready .wallet-action[data-wallet-action="receive"] .wallet-action-icon {
    width: 36px;
    height: 36px;
  }

  .wallet64-ready .wallet-data-grid {
    margin-top: 70px;
  }

  .wallet64-ready .wallet-chart-panel {
    min-height: 330px;
    margin-top: 48px !important;
    padding-top: 26px !important;
  }

  .wallet64-ready .wallet-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .wallet64-ready .wallet-range-control {
    width: 100%;
  }

  .wallet64-ready .wallet-range-control button {
    flex: 1;
  }

  .wallet64-ready .wallet-flat-state {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .wallet64-ready .wallet-vault {
    min-height: 650px;
    padding-inline: 20px;
  }

  .wallet64-ready .wallet-balance {
    font-size: clamp(3.5rem, 18vw, 4.35rem);
  }

  .wallet64-ready .wallet-change-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .wallet64-ready .wallet-action {
    justify-content: center;
    padding-inline: 8px;
  }

  .wallet64-ready .wallet-action-copy strong {
    font-size: 0.78rem;
  }

  .wallet64-ready .wallet-action-icon {
    display: none;
  }

  .wallet64-ready .wallet-data-table > [role="row"] > :nth-child(2),
  .wallet64-ready .wallet-data-table > [role="row"] > :nth-child(3) {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet64-ready .wallet-action,
  .wallet64-ready .wallet-range-control button {
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .wallet64-ready .wallet-allocation-card,
  .wallet64-ready .wallet-action-grid {
    background: #060b12 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
