/* Wallet page visual refresh: scoped overrides for wallets-* and wallet-* classes. */

.wallets-shell {
  position: relative;
  isolation: isolate;
  padding: clamp(16px, 2vw, 30px);
}

.wallets-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      900px 420px at 0% -10%,
      color-mix(in srgb, var(--shell-accent) 16%, transparent 84%) 0%,
      transparent 60%
    ),
    radial-gradient(
      800px 420px at 100% 0%,
      color-mix(in srgb, #22d3ee 10%, transparent 90%) 0%,
      transparent 58%
    );
}

.wallets-layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 20px;
}

.wallets-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallets-sidebar__sticky {
  top: 10px;
  gap: 16px;
  padding-top: 0;
}

.wallets-header {
  top: 10px;
  margin-bottom: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--shell-border-strong) 84%, transparent 16%);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--shell-surface-alt) 94%, var(--shell-background) 6%) 0%,
      color-mix(in srgb, var(--shell-surface) 94%, var(--shell-background) 6%) 100%
    );
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

.wallets-header h2 {
  margin: 0;
  font-size: clamp(1.72rem, 2.4vw, 2.22rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.wallets-eyebrow {
  margin-bottom: 5px;
  letter-spacing: 0.2em;
}

.wallets-subtitle {
  margin-top: 8px;
  max-width: 60ch;
  line-height: 1.45;
}

.wallets-header__right {
  flex: 1 1 430px;
  align-items: stretch;
}

.wallets-actions {
  width: 100%;
  justify-content: flex-start;
  gap: 9px;
  padding: 9px;
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--shell-border) 72%, transparent 28%);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--shell-surface-alt) 78%, transparent 22%) 0%,
      color-mix(in srgb, var(--shell-surface) 78%, transparent 22%) 100%
    );
}

.wallets-actions button,
.wallets-actions select,
.wallets-actions .inline-checkbox {
  min-height: 34px;
}

.wallets-actions button {
  font-weight: 700;
}

.wallets-actions > button {
  border-radius: 999px;
  padding: 0.35rem 0.92rem;
}

.wallets-actions > button:not(.ghost-button):not(.danger-button) {
  border: 1px solid color-mix(in srgb, var(--shell-accent) 34%, var(--shell-border) 66%);
  background: color-mix(in srgb, var(--shell-accent) 18%, var(--shell-surface-alt) 82%);
  color: color-mix(in srgb, var(--shell-accent) 84%, #e2ffe9 16%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wallets-actions > button:not(.ghost-button):not(.danger-button):hover:not(:disabled) {
  filter: brightness(1.05);
}

.wallets-actions .inline-checkbox {
  margin: 0;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--shell-border) 74%, transparent 26%);
  background: color-mix(in srgb, var(--shell-surface-alt) 74%, transparent 26%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--shell-text-secondary);
  cursor: pointer;
}

.wallets-actions .inline-checkbox input {
  margin: 0;
}

.wallets-actions select {
  padding: 0.38rem 0.7rem;
  min-width: 180px;
}

.wallets-actions .danger-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.wallets-notice-slot {
  margin: 0;
}

.wallets-notice-slot .project-console__notice {
  margin: 0;
}

.wallets-pnl {
  margin: 0;
  gap: 14px;
  grid-template-columns: minmax(280px, 1.25fr) minmax(220px, 0.75fr);
}

.wallets-pnl__card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 16px;
  border-color: color-mix(in srgb, var(--shell-border-strong) 80%, transparent 20%);
}

.wallets-pnl__card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 120px;
  height: 2px;
  background: color-mix(in srgb, var(--shell-accent) 66%, #22d3ee 34%);
  opacity: 0.7;
}

.wallets-pnl__label {
  letter-spacing: 0.14em;
}

.wallets-pnl__value {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.03em;
}

.wallets-bulk {
  width: 100%;
  margin: 0;
  border-radius: 16px;
  padding: 14px;
  border-color: color-mix(in srgb, var(--shell-border-strong) 78%, transparent 22%);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--shell-surface-alt) 82%, transparent 18%) 0%,
      color-mix(in srgb, var(--shell-surface) 82%, transparent 18%) 100%
    );
}

.wallets-bulk__header {
  margin-bottom: 10px;
  align-items: center;
}

.wallets-bulk__title {
  font-size: 1.02rem;
}

.wallets-bulk__hint {
  font-size: 0.84rem;
}

.wallets-bulk__rows {
  gap: 12px;
}

.wallets-bulk__row {
  gap: 8px;
}

.wallets-bulk__label {
  letter-spacing: 0.15em;
  font-size: 0.69rem;
}

.wallets-bulk__settings-grid {
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.wallets-bulk__settings-field input {
  border-radius: 12px;
  padding: 10px 11px;
}

.wallets-warmup-panel {
  width: 100%;
  margin: 0;
  border-radius: 16px;
  padding: 14px;
}

.wallets-grid {
  width: 100%;
  margin-top: 2px;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}

.wallet-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px;
  gap: 12px;
  border-color: color-mix(in srgb, var(--shell-border-strong) 74%, transparent 26%);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--shell-surface-alt) 90%, var(--shell-background) 10%) 0%,
      color-mix(in srgb, var(--shell-surface) 90%, var(--shell-background) 10%) 100%
    );
}

.wallet-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: color-mix(in srgb, var(--shell-accent) 62%, #22d3ee 38%);
  opacity: 0.42;
}

.wallet-card:hover {
  border-color: color-mix(in srgb, var(--shell-accent) 34%, var(--shell-border-strong) 66%);
}

.wallet-card__header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.wallet-pill {
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--shell-accent) 40%, transparent 60%);
  background: color-mix(in srgb, var(--shell-accent) 14%, transparent 86%);
  color: color-mix(in srgb, var(--shell-accent) 86%, #d6ffe3 14%);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wallet-label {
  text-align: right;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.wallet-label-input {
  border-radius: 12px;
  padding: 7px 9px;
}

.wallet-card__body {
  gap: 6px;
}

.wallet-balance {
  font-size: 1.52rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wallet-token {
  color: var(--shell-text-secondary);
  font-size: 0.88rem;
}

.wallet-pnl {
  font-size: 0.9rem;
}

.wallet-pubkey {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--shell-border) 74%, transparent 26%);
  background: color-mix(in srgb, var(--shell-surface-strong) 80%, transparent 20%);
  font-size: 0.8rem;
}

.wallet-pubkey-copy {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--shell-border) 68%, transparent 32%);
  background: color-mix(in srgb, var(--shell-surface-alt) 76%, transparent 24%);
}

.wallet-pubkey-copy:hover {
  border-color: color-mix(in srgb, var(--shell-accent) 42%, var(--shell-border) 58%);
  background: color-mix(in srgb, var(--shell-accent) 14%, var(--shell-surface-alt) 86%);
}

.wallet-status {
  min-height: 0;
  line-height: 1.3;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.wallet-status--visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--shell-border) 72%, transparent 28%);
  background: color-mix(in srgb, var(--shell-surface-alt) 80%, transparent 20%);
}

.wallet-status--success {
  color: #22c55e;
  border-color: color-mix(in srgb, #22c55e 62%, var(--shell-border) 38%);
  background: color-mix(in srgb, #22c55e 12%, var(--shell-surface-alt) 88%);
}

.wallet-status--error {
  color: #ef4444;
  border-color: color-mix(in srgb, #ef4444 62%, var(--shell-border) 38%);
  background: color-mix(in srgb, #ef4444 12%, var(--shell-surface-alt) 88%);
}

.wallet-status--pending,
.wallet-status--info {
  color: var(--shell-text-secondary);
}

.wallet-card__trade {
  gap: 6px;
}

.wallet-trade-row {
  gap: 7px;
}

.wallet-trade-button {
  border-radius: 999px;
  padding: 7px 0;
  letter-spacing: 0.03em;
  font-size: 0.74rem;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.wallet-trade-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.wallet-trade-button:disabled {
  box-shadow: none;
}

.wallet-results {
  margin-top: 10px;
}

.wallets-coin-card,
.wallets-activity-card {
  border-radius: 18px;
  padding: 14px;
  border-color: color-mix(in srgb, var(--shell-border-strong) 78%, transparent 22%);
}

.wallets-coin-card__marketcap-value {
  font-size: clamp(1.8rem, 2.7vw, 2.4rem);
}

.wallets-coin-card__mint {
  font-size: 0.84rem;
  line-height: 1.4;
}

.wallets-activity-list {
  max-height: min(58vh, 620px);
  padding-right: 2px;
}

.wallets-activity-item {
  position: relative;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
}

.wallets-activity-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shell-accent) 58%, transparent 42%);
  opacity: 0.65;
}

.wallets-activity-item__action {
  letter-spacing: 0.1em;
}

@media (max-width: 1180px) {
  .wallets-layout {
    gap: 16px;
  }

  .wallets-header__right {
    flex-basis: 100%;
  }
}

@media (max-width: 1100px) {
  .wallets-header {
    position: static;
  }

  .wallets-pnl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wallets-shell {
    padding: 12px;
  }

  .wallets-header {
    padding: 12px;
    border-radius: 14px;
  }

  .wallets-header h2 {
    font-size: 1.56rem;
  }

  .wallets-actions {
    padding: 8px;
    gap: 8px;
  }

  .wallets-actions button,
  .wallets-actions select,
  .wallets-actions .inline-checkbox {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .wallets-actions .danger-button {
    flex-basis: 100%;
  }

  .wallets-bulk {
    border-radius: 14px;
    padding: 12px;
  }

  .wallets-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wallet-card {
    border-radius: 14px;
  }

  .wallet-card__header {
    flex-wrap: wrap;
  }

  .wallet-label {
    text-align: left;
  }
}
