/* Eclipse: quiet orbital motion, warm white identity, clear trading surfaces. */
:root {
  --bg: #08090c;
  --panel: #101216;
  --line: #24272f;
}
body {
  background: #08090c;
}
.eclipse-space {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: #08090c;
}
#app {
  position: relative;
  z-index: 1;
}
.eclipse-space i {
  position: absolute;
  inset: -520px;
  background: url("/stars.svg") repeat;
  background-size: 920px 520px;
  opacity: 0.4;
  animation: stellar-drift 180s linear infinite;
}
.eclipse-space i:nth-child(2) {
  opacity: 0.14;
  background-size: 1460px 825px;
  animation: stellar-drift 260s linear infinite reverse;
}
@keyframes stellar-drift {
  to {
    transform: translate(460px, 260px);
  }
}
.stars-paused .eclipse-space i,
.stars-paused .pnl-overview::before {
  animation-play-state: paused;
}
.header {
  background: rgba(8, 9, 12, 0.94);
}
.brand {
  gap: 9px;
}
.brand .eclipse-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand b {
  font-size: 16px;
  letter-spacing: 2.2px;
  font-weight: 550;
}
.brand > small {
  max-width: 64px;
  white-space: normal;
  line-height: 1.6;
  letter-spacing: 1.5px;
  border-left: 1px solid #33343a;
}
.header nav {
  gap: 25px;
}
.ticker,
footer {
  background: rgba(11, 12, 16, 0.96);
}
.starfield-toggle {
  font-size: 18px;
  width: 25px;
  padding: 0;
  color: #d9dacd;
}
.starfield-toggle[aria-pressed="false"] {
  opacity: 0.45;
}
.chart-currency {
  color: #b8c1ce;
  border: 1px solid #30353d !important;
  border-radius: 4px;
  padding: 3px 6px !important;
}
.chart-mode {
  color: #c7cfdd;
}
.token-price b {
  font-variant-numeric: tabular-nums;
}
.wallet-page {
  max-width: 1600px;
  margin: 14px auto 30px;
}
.wallet-page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 0 2px 12px;
}
.wallet-page-title h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  margin: 4px 0;
  font-weight: 550;
}
.wallet-page-title p {
  color: #959ba7;
  font-size: 12px;
}
.wallet-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #b7bcbd;
}
.tracker-search {
  padding: 12px 16px 10px;
  background: #0f1116;
  border-color: #272c35;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 18px;
}
#wallet-form {
  grid-column: 1/-1;
}
.tracker-search .recent-wallets {
  margin: 7px 0 0;
  padding: 0;
  border: 0;
  justify-content: flex-end;
}
.tracker-search .recent-wallets button {
  padding: 3px 7px;
}
#wallet-form {
  display: flex;
  align-items: center;
  gap: 22px;
}
#wallet-form > label {
  white-space: nowrap;
  font-size: 12px;
  margin: 0;
  color: #b1b8c6;
}
#wallet-form > div {
  flex: 1;
}
#wallet-form .tracker-input input {
  padding: 9px 10px 9px 0;
}
.tracker-input {
  border-radius: 7px;
}
.tracker-help {
  margin-top: 8px;
}
.tracking-active {
  padding: 8px 13px;
  margin-top: 10px;
  border-radius: 5px;
  background: #101b19;
  font-size: 11px;
}
.tracking-active div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tracking-active b {
  font-size: 11px;
}
.portfolio-heading {
  margin-top: 16px;
  margin-bottom: 10px;
}
.portfolio-heading h2 {
  font-size: 13px;
  font-weight: 500;
}
.performance-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}
.performance-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #2b3038;
  border-radius: 8px;
  background: #101217;
  padding: 19px 20px 16px;
}
.panel-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #e5e7e9;
  min-height: 28px;
  margin-bottom: 16px;
  position: relative;
}
.panel-label > .muted {
  font-size: 10px;
}
.panel-label .control {
  padding: 3px 10px;
  height: 27px;
  min-height: 27px;
  font-size: 10px;
  background: #181c23;
  border-radius: 5px;
}
.pnl-overview {
  background: #0e1116;
}
.pnl-overview::before {
  content: "";
  position: absolute;
  inset: -100px;
  background: url("/stars.svg") repeat;
  opacity: 0.24;
  animation: stellar-drift 150s linear infinite;
}
.pnl-overview > * {
  position: relative;
}
.pnl-overview::after {
  content: "";
  pointer-events: none;
  position: absolute;
  right: -25px;
  top: 57px;
  width: 163px;
  height: 163px;
  border-radius: 50%;
  border: 1px solid #8c887344;
  box-shadow: -9px -3px 16px -13px #eee2be;
  opacity: 0.7;
}
.pnl-total {
  display: block;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -1.4px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.pnl-return {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 11px 0 20px;
}
.pnl-return b {
  font-size: 12px;
  font-weight: 500;
}
.pnl-return span {
  font-size: 10px;
  color: #818b9c;
}
.pnl-split {
  display: flex;
  gap: 30px;
  padding-top: 14px;
  border-top: 1px solid #242933;
}
.pnl-split div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pnl-split span,
.metric-label {
  color: #929cab;
  font-size: 11px;
}
.pnl-split b {
  font-size: 15px;
  font-weight: 500;
}
.pnl-scope {
  color: #788393;
  font-size: 10px;
  margin-top: 17px;
  line-height: 1.6;
}
.balance-total {
  display: block;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 500;
  margin: 6px 0 17px;
  letter-spacing: -1px;
}
.balance-total small {
  font-size: 18px;
  color: #afb9c5;
}
.balance-detail {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 10px 0;
  font-size: 11px;
}
.balance-detail > span {
  color: #8d97a6;
}
.balance-detail b {
  font-weight: 500;
}
.balance-manage {
  display: block;
  margin-top: 17px;
  width: 100%;
  border-radius: 5px;
  font-size: 11px;
}
.performance-transactions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 12px;
}
.performance-transactions > span {
  color: #969fad;
  font-size: 12px;
}
.performance-transactions > b {
  font-size: 21px;
  font-weight: 500;
}
.performance-transactions small {
  grid-column: 1/-1;
  font-size: 11px;
  text-align: right;
  color: #787f8d;
}
.performance-transactions i {
  font-style: normal;
}
.performance-counts {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 26px 0 14px;
}
.performance-counts div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 45px;
}
.performance-counts span {
  font-size: 11px;
}
.performance-counts b {
  font-weight: 500;
  font-size: 20px;
}
.performance-bar {
  display: flex;
  gap: 3px;
  height: 4px;
  background: #262c35;
  border-radius: 3px;
  overflow: hidden;
}
.performance-bar i {
  display: block;
  background: #677180;
}
.performance-bar .win {
  background: var(--up);
}
.performance-bar .loss {
  background: var(--down);
}
.portfolio-note {
  max-width: 1200px;
  color: #8a93a2;
  margin: 13px 0 19px;
}
.positions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid #292d35;
  border-bottom: 0;
  background: #101217;
  padding: 0 16px;
  border-radius: 7px 7px 0 0;
}
.positions-toolbar > span {
  color: #7e8a9c;
  font-size: 10px;
}
.position-tabs {
  display: flex;
  gap: 24px;
}
.position-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 15px 0 13px;
  font-size: 12px;
  color: #969aa8;
  background: none;
}
.position-tabs button.active {
  color: #f2f4f3;
  border-color: #e9ecd9;
}
.positions-table {
  background: #0e1015;
  font-size: 12px;
}
.positions-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}
.positions-table b {
  font-weight: 550;
}
.position-roi {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}
.position-actions {
  white-space: nowrap;
}
.position-actions .control {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 5px;
}
.position-actions .trade-chip {
  margin-left: 8px;
}
dialog:has(.pnl-share-body) {
  width: min(800px, calc(100vw - 30px));
  max-width: 800px;
  background: #111318;
  border: 1px solid #333944;
  border-radius: 10px;
}
.pnl-share-body {
  padding: 18px;
}
#pnl-card-preview {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #2e3540;
  background: #080a0f;
}
#pnl-card-preview svg {
  display: block;
  width: 100%;
  height: auto;
}
.pnl-card-options {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 15px 0;
}
.pnl-theme-options,
.pnl-currency-options {
  display: flex;
  padding: 3px;
  gap: 4px;
  background: #0a0d11;
  border: 1px solid #242b34;
  border-radius: 7px;
}
.pnl-card-options button {
  color: #9aa4b5;
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 7px 11px;
  font-size: 11px;
}
.pnl-card-options button.active {
  background: #292e36;
  color: #f1f1eb;
}
.pnl-share-body .check-row {
  font-size: 11px;
  color: #b5bdc8;
}
.pnl-export-note {
  color: #828d9e;
  font-size: 10px;
  line-height: 1.7;
  max-width: 610px;
}
.pnl-export-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #29303a;
  margin-top: 16px;
  padding-top: 15px;
}
.pnl-export-actions > span {
  flex: 1;
  color: #8b97a7;
  font-size: 10px;
}
.pnl-export-actions button {
  border-radius: 6px;
}
@media (max-width: 1050px) {
  .performance-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pnl-overview {
    grid-column: 1/-1;
  }
  .pnl-overview::after {
    width: 220px;
    height: 220px;
    top: 8px;
    right: 60px;
  }
  .brand > small {
    display: none;
  }
}
@media (max-width: 650px) {
  .brand b {
    font-size: 14px;
    letter-spacing: 1.7px;
  }
  .brand .eclipse-mark {
    width: 28px;
    height: 28px;
  }
  .performance-grid {
    grid-template-columns: 1fr;
  }
  #wallet-form {
    display: block;
  }
  #wallet-form > label {
    display: block;
    margin-bottom: 10px;
  }
  .pnl-return {
    flex-wrap: wrap;
  }
  .pnl-total {
    font-size: 35px;
  }
  .pnl-card-options {
    gap: 7px;
  }
  .pnl-card-options button {
    padding: 7px;
    font-size: 10px;
  }
  .pnl-export-actions {
    flex-wrap: wrap;
  }
  .pnl-export-actions > span {
    flex-basis: 100%;
  }
  .wallet-page-title {
    align-items: flex-start;
  }
  .read-only-badge {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .eclipse-space i,
  .pnl-overview::before {
    animation: none;
  }
}
@media (max-width: 650px) {
  .tracker-search {
    display: block;
  }
  .tracker-search .recent-wallets {
    justify-content: flex-start;
    margin-top: 12px;
  }
}
