/* SUNDEX Wallet 42 — a tactile portfolio instrument, not a dashboard template. */

/* Retire the old landing security section without leaving layout residue or flash. */
#sundex-security-stage {
  display: none !important;
}

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

body:has(.wallet42-ready) {
  --w42-bg: #020509;
  --w42-night: #050a11;
  --w42-raised: #09101a;
  --w42-raised-2: #0c1420;
  --w42-line: rgba(194, 211, 233, 0.11);
  --w42-line-strong: rgba(202, 220, 244, 0.2);
  --w42-ink: #f4f7fb;
  --w42-text: #d8e1ec;
  --w42-muted: #91a0b2;
  --w42-dim: #687587;
  --w42-metal: #c6d5e8;
  --w42-cold: #a9c9ee;
  --w42-positive: #9fd0b0;
  --w42-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.wallet42-ready) .platform-shell {
  background:
    radial-gradient(ellipse 52% 34% at 50% -12%, rgba(88, 117, 154, 0.12), transparent 72%),
    var(--w42-bg) !important;
}

body:has(.wallet42-ready) .platform-main {
  padding: 38px 34px 72px !important;
}

.wallet-premium.wallet42-ready {
  width: min(1320px, 100%) !important;
  gap: 16px !important;
  color: var(--w42-text);
}

/* Portfolio stage */
.wallet42-ready .wallet-vault {
  position: relative;
  isolation: isolate;
  min-height: 342px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(44px, 6vw, 88px);
  padding: 48px 52px 50px;
  overflow: hidden;
  border: 1px solid var(--w42-line-strong) !important;
  border-radius: 30px;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.035), transparent 24%),
    radial-gradient(ellipse 70% 120% at 7% 10%, rgba(58, 85, 120, 0.23), transparent 65%),
    linear-gradient(145deg, #0a111b 0%, #05090f 58%, #03060a 100%) !important;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

.wallet42-ready .wallet-vault::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  display: block !important;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(192, 211, 235, 0.38), transparent 12%, transparent 88%, rgba(192, 211, 235, 0.08)) top / 100% 1px no-repeat,
    linear-gradient(180deg, transparent 52%, rgba(1, 3, 6, 0.34));
}

.wallet42-ready .wallet-vault::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -9%;
  bottom: -52%;
  display: block !important;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(190, 210, 235, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(167, 194, 227, 0.016),
    0 0 0 96px rgba(167, 194, 227, 0.012);
  pointer-events: none;
}

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

.wallet42-ready .wallet-vault-main {
  justify-content: center;
  padding-bottom: 0;
}

.wallet42-ready .wallet-eyebrow {
  gap: 9px;
  color: var(--w42-muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet42-ready .wallet-eyebrow i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--w42-positive);
  box-shadow: 0 0 0 4px rgba(159, 208, 176, 0.08);
}

.wallet42-ready .wallet-balance-label {
  margin-top: 38px;
  color: var(--w42-muted);
  font-size: 0.8125rem;
  font-weight: 540;
}

.wallet42-ready .wallet-balance {
  margin-top: 8px;
  color: var(--w42-ink) !important;
  font-size: clamp(4.75rem, 7vw, 6.6rem);
  font-weight: 430;
  line-height: 0.9;
  letter-spacing: -0.052em;
  text-shadow: 0 10px 38px rgba(0, 0, 0, 0.32);
}

.wallet42-ready .wallet-change-row {
  gap: 12px;
  margin-top: 24px;
}

.wallet42-ready .wallet-change-chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(159, 208, 176, 0.15);
  color: var(--w42-positive);
  background: rgba(96, 144, 113, 0.1);
  box-shadow: none;
}

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

.wallet42-ready .wallet-freshness {
  margin-top: 13px;
}

/* The instrument is a quiet physical cue, not a decorative illustration. */
.wallet42-instrument {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50.5%;
  width: clamp(240px, 25vw, 365px);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.72;
  transform: translate(-50%, -50%) rotate(-12deg);
}

.wallet42-orbit,
.wallet42-core,
.wallet42-scan {
  position: absolute;
  border-radius: 50%;
}

.wallet42-orbit {
  border: 1px solid rgba(189, 209, 234, 0.11);
  box-shadow: inset 0 0 24px rgba(148, 182, 222, 0.025);
}

.wallet42-orbit-a { inset: 2%; }
.wallet42-orbit-b { inset: 15%; border-color: rgba(189, 209, 234, 0.17); }
.wallet42-orbit-c { inset: 29%; border-color: rgba(189, 209, 234, 0.22); }

.wallet42-core {
  inset: 39%;
  border: 1px solid rgba(205, 221, 241, 0.27);
  background: linear-gradient(145deg, rgba(190, 211, 237, 0.16), rgba(21, 31, 44, 0.16));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.wallet42-core i,
.wallet42-core b {
  position: absolute;
  background: rgba(207, 224, 245, 0.38);
}

.wallet42-core i { inset: 49% 22%; height: 1px; }
.wallet42-core b { inset: 22% 49%; width: 1px; }

.wallet42-scan {
  inset: 9%;
  border-top: 1px solid rgba(190, 217, 248, 0.26);
  transform: rotate(38deg);
}

.wallet42-ready .wallet-allocation-card {
  justify-content: center;
  min-height: 214px;
  padding: 30px 32px;
  border: 1px solid rgba(196, 214, 236, 0.12) !important;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(17, 26, 38, 0.82), rgba(6, 10, 16, 0.76)) !important;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  backdrop-filter: blur(14px);
}

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

.wallet42-ready .wallet-allocation-head span,
.wallet42-ready .wallet-allocation-head strong {
  color: var(--w42-muted);
}

.wallet42-ready .wallet-composition-bar {
  height: 4px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.wallet42-ready .wallet-composition-bar > div {
  filter: saturate(0.48) brightness(1.24);
}

.wallet42-ready .wallet-holding-row {
  min-height: 62px;
  padding: 8px 0;
  border-radius: 12px;
}

.wallet42-ready .wallet-holding-asset img {
  width: 36px;
  height: 36px;
  filter: saturate(0.74);
}

/* Command rail */
.wallet42-ready .wallet-action-grid {
  display: grid;
  grid-template-columns: 1.22fr 1fr 1fr;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.wallet42-ready .wallet-action {
  position: relative;
  min-height: 96px;
  padding: 20px 20px 20px 24px;
  overflow: hidden;
  border: 1px solid var(--w42-line) !important;
  border-radius: 20px;
  color: var(--w42-ink);
  background: linear-gradient(145deg, #0b121c, #060a10) !important;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition:
    transform 180ms var(--w42-ease),
    border-color 180ms ease,
    background-color 180ms ease;
}

.wallet42-ready .wallet-action + .wallet-action {
  border-left: 1px solid var(--w42-line) !important;
}

.wallet42-ready .wallet-action[data-wallet-action="receive"] {
  border-color: rgba(210, 224, 243, 0.25) !important;
  color: #07101a;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.46), transparent 27%),
    linear-gradient(135deg, #dbe5f2, #9dafc4) !important;
  box-shadow:
    0 18px 42px rgba(70, 93, 121, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.wallet42-ready .wallet-action-copy {
  gap: 5px;
}

.wallet42-ready .wallet-action-copy strong {
  color: inherit;
  font-size: 1.02rem;
  font-weight: 670;
  letter-spacing: -0.016em;
}

.wallet42-ready .wallet-action-copy small {
  color: var(--w42-muted);
  font-size: 0.75rem;
  font-weight: 540;
}

.wallet42-ready .wallet-action[data-wallet-action="receive"] small {
  color: rgba(7, 16, 26, 0.62);
}

.wallet42-ready .wallet-action-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--w42-line-strong);
  border-radius: 14px;
  color: var(--w42-metal);
  background: rgba(175, 199, 228, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.wallet42-ready .wallet-action[data-wallet-action="receive"] .wallet-action-icon {
  border-color: rgba(5, 12, 20, 0.14);
  color: #07101a;
  background: rgba(6, 14, 23, 0.08);
  box-shadow: none;
}

/* One ledger surface instead of a pile of cards. */
.wallet42-ready .wallet-data-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.76fr) !important;
  gap: 0 !important;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--w42-line) !important;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(11, 17, 26, 0.96), rgba(5, 9, 14, 0.98)) !important;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.028);
}

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

.wallet42-ready .wallet-activity-panel {
  border-left: 1px solid var(--w42-line) !important;
}

.wallet42-ready .wallet-table-head,
.wallet42-ready .wallet-activity-panel > div:first-child {
  min-height: 78px;
  padding: 0 26px !important;
  border-bottom-color: var(--w42-line) !important;
}

.wallet42-ready .wallet-panel-kicker {
  margin-bottom: 4px;
  color: var(--w42-dim);
  font-size: 0.625rem;
  font-weight: 680;
  letter-spacing: 0.11em;
}

.wallet42-ready .wallet-panel-title,
.wallet42-ready .wallet-activity-panel h2,
.wallet42-ready .wallet-activity-panel h3 {
  color: var(--w42-ink) !important;
  font-size: 1.05rem !important;
  font-weight: 650 !important;
}

.wallet42-ready .wallet-data-table > [role="row"]:first-child,
.wallet42-ready .wallet-activity-table > [role="row"]:first-child {
  min-height: 38px;
  color: var(--w42-dim) !important;
  background: rgba(194, 211, 233, 0.022);
}

.wallet42-ready .wallet-asset-row,
.wallet42-ready .wallet-activity-table .divide-y > [role="row"] {
  min-height: 76px;
  padding: 14px 26px !important;
  border-bottom-color: var(--w42-line) !important;
}

.wallet42-ready .wallet-allocation-mini {
  opacity: 0.52;
}

/* Performance is a compact instrument, never a giant empty chart. */
.wallet42-ready .wallet-chart-panel {
  min-height: 228px;
  margin-top: 0 !important;
  padding: 26px 28px 24px !important;
  overflow: hidden;
  border: 1px solid var(--w42-line) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(ellipse 60% 100% at 0% 100%, rgba(49, 70, 97, 0.12), transparent 74%),
    #060a0f !important;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.027) !important;
}

.wallet42-ready .wallet-panel-head {
  min-height: 48px;
  margin-bottom: 10px;
}

.wallet42-ready .wallet-range-control {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--w42-line);
  border-radius: 12px;
  background: #080d14;
}

.wallet42-ready .wallet-range-control button {
  min-width: 48px;
  min-height: 36px;
  border-radius: 9px;
  color: var(--w42-dim);
}

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

.wallet42-ready .wallet-flat-state {
  min-height: 118px;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
}

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

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

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

.wallet42-ready .wallet-flat-copy strong { color: var(--w42-ink); }
.wallet42-ready .wallet-flat-copy p { color: var(--w42-muted); }

@media (hover: hover) and (pointer: fine) {
  .wallet42-ready .wallet-action:hover {
    border-color: rgba(208, 224, 244, 0.24) !important;
    background: linear-gradient(145deg, #101925, #080d14) !important;
    transform: translateY(-2px);
  }

  .wallet42-ready .wallet-action[data-wallet-action="receive"]:hover {
    border-color: rgba(226, 236, 248, 0.55) !important;
    background:
      linear-gradient(125deg, rgba(255, 255, 255, 0.55), transparent 29%),
      linear-gradient(135deg, #e4edf7, #a5b7cb) !important;
  }

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

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

.wallet42-ready :is(.wallet-action, .wallet-range-control button):focus-visible {
  outline: 2px solid rgba(201, 220, 244, 0.88);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  body:has(.wallet42-ready) .platform-main {
    padding: 28px 20px 58px !important;
  }

  .wallet42-ready .wallet-vault {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding: 40px;
  }

  .wallet42-instrument {
    top: 28%;
    right: -5%;
    left: auto;
    width: 310px;
    opacity: 0.42;
    transform: rotate(-12deg);
  }

  .wallet42-ready .wallet-allocation-card {
    min-height: 190px;
  }

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

  .wallet42-ready .wallet-activity-panel {
    border-top: 1px solid var(--w42-line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 640px) {
  body:has(.wallet42-ready) .platform-main {
    padding: 14px 12px 42px !important;
  }

  .wallet-premium.wallet42-ready {
    gap: 10px !important;
  }

  .wallet42-ready .wallet-vault {
    gap: 22px;
    padding: 30px 22px 22px;
    border-radius: 24px;
  }

  .wallet42-ready .wallet-balance-label { margin-top: 24px; }

  .wallet42-ready .wallet-balance {
    font-size: clamp(3.55rem, 18vw, 4.65rem);
  }

  .wallet42-instrument {
    top: 24%;
    right: -26%;
    width: 260px;
    opacity: 0.3;
  }

  .wallet42-ready .wallet-allocation-card {
    min-height: 164px;
    padding: 22px 20px;
    border-radius: 18px;
  }

  .wallet42-ready .wallet-action-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .wallet42-ready .wallet-action {
    min-height: 72px;
    padding: 12px 14px 12px 18px;
    border-radius: 17px;
  }

  .wallet42-ready .wallet-action-copy {
    align-items: flex-start;
  }

  .wallet42-ready .wallet-action-copy small {
    display: block;
  }

  .wallet42-ready .wallet-data-grid,
  .wallet42-ready .wallet-chart-panel {
    border-radius: 18px !important;
  }

  .wallet42-ready .wallet-table-head,
  .wallet42-ready .wallet-activity-panel > div:first-child {
    min-height: 68px;
    padding-inline: 18px !important;
  }

  .wallet42-ready .wallet-data-table > [role="row"],
  .wallet42-ready .wallet-activity-table > [role="row"],
  .wallet42-ready .wallet-activity-table .divide-y > [role="row"] {
    padding-inline: 18px !important;
  }

  .wallet42-ready .wallet-chart-panel {
    min-height: 284px;
    padding: 20px 18px 22px !important;
  }

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

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

  .wallet42-ready .wallet-range-control button {
    flex: 1;
    min-height: 42px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .wallet42-ready .wallet-action {
    transition-duration: 0.01ms !important;
  }
}
