:root {
  --bg: #0a0908;
  --bg-elevated: #12100e;
  --bg-card: #181512;
  --bg-card-hover: #221e18;
  --border: #3d3428;
  --border-soft: #2a241c;
  --text: #faf6ef;
  --muted: #9a9080;
  --muted-2: #6b6358;
  --gold: #ffd700;
  --gold-mid: #d4a017;
  --gold-dark: #b8860b;
  --gold-deep: #8b6914;
  --accent: #e8b923;
  --accent-soft: rgba(232, 185, 35, 0.14);
  --accent-glow: rgba(255, 215, 0, 0.35);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.1);
  --red: #ef4444;
  --x: #1d9bf0;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbars but keep scroll (wheel / touch) */
.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 450px at 12% -8%, rgba(255, 215, 0, 0.09), transparent 58%),
    radial-gradient(700px 400px at 88% 2%, rgba(184, 134, 11, 0.07), transparent 55%),
    radial-gradient(500px 300px at 50% 100%, rgba(139, 105, 20, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image:
    linear-gradient(45deg, var(--gold) 25%, transparent 25%),
    linear-gradient(-45deg, var(--gold) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--gold) 75%),
    linear-gradient(-45deg, transparent 75%, var(--gold) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.saved-wallets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.saved-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.saved-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
}

.saved-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.saved-chip {
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.saved-chip:hover {
  border-color: rgba(255, 215, 0, 0.35);
  background: var(--bg-card-hover);
}

.saved-chip.starred {
  border-color: rgba(255, 215, 0, 0.45);
  color: var(--gold);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-sm.active {
  border-color: rgba(255, 215, 0, 0.45);
  color: var(--gold);
}

/* Truncation / partial data badges */
.trunc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  vertical-align: middle;
  margin-left: 0.35rem;
  cursor: help;
}

.pnl-hero-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.profile-stat-label-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.profile-stat-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted-2);
  margin-top: 0.15rem;
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.65rem 1.35rem 0;
  border-top: 1px solid var(--border-soft);
}

.profile-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.profile-tab:hover {
  color: var(--text);
}

.profile-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold-mid);
}

.activity-row {
  cursor: default;
}

/* Skeleton loaders */
@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-delay-1 {
  animation-delay: 0.15s;
}

.skeleton-delay-2 {
  animation-delay: 0.3s;
}

.skeleton-circle {
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-pill {
  border-radius: 999px;
}

.skeleton-chart {
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skeleton-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.skeleton-card {
  padding: 1rem;
}

.skeleton-feed {
  padding: 0.5rem 0;
}

.skeleton-feed-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
}

.kpi-grid.loading-skeleton .kpi-val {
  color: transparent;
  border-radius: 6px;
  min-width: 3rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.kpi-grid.loading-skeleton .kpi-val.accent {
  text-shadow: none;
}

.pos-row-skeleton {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: inherit;
}

.nav-link-ext {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
}

.nav-link-ext:hover {
  color: var(--gold-mid);
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-name {
  background: linear-gradient(135deg, var(--gold), var(--gold-mid));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}

/* Hero */
.hero {
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 0 1.25rem;
  max-width: 540px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
  padding: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  outline: none;
}

.search-box:focus-within {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.12);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s, background 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-mid), var(--gold-dark));
  color: #1a1408;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.35);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
}

/* Wallet panel */
.wallet-panel {
  margin-bottom: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.wallet-panel.hidden {
  display: none;
}

.wallet-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05), transparent);
}

.wallet-hero-left {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.wallet-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  object-fit: cover;
}

.wallet-avatar.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.wallet-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.wallet-addr {
  margin: 0.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

.wallet-links {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--gold-mid);
  font-weight: 600;
}

/* Profile stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.03), transparent);
}

.profile-stat-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.profile-stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-stat-val.mono {
  font-family: var(--mono);
  font-size: 0.95rem;
}

.profile-stat-val.up {
  color: var(--green);
}

.profile-stat-val.down {
  color: var(--red);
}

.profile-stat-val.neutral {
  color: var(--text);
}

.profile-pnl-chart {
  grid-column: 3;
  grid-row: 2 / span 2;
  align-self: stretch;
  min-height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft);
}

.profile-pnl-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 84px;
}

.profile-pnl-fill--pos {
  fill: rgba(34, 197, 94, 0.18);
}

.profile-pnl-fill--neg {
  fill: rgba(239, 68, 68, 0.15);
}

.profile-pnl-line--pos {
  stroke: var(--green);
  stroke-width: 2.5;
}

.profile-pnl-line--neg {
  stroke: var(--red);
  stroke-width: 2.5;
}

.pnl-hero-section {
  padding: 0 1.35rem 1rem;
}

.pnl-calendar-section {
  min-height: 1px;
}

.pnl-hero-card {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.28);
  padding: 1rem 1.1rem 0.85rem;
}

.pnl-hero-card-wide {
  width: 100%;
}

.pnl-hero-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.pnl-hero-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.pnl-hero-value {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pnl-hero-value.up {
  color: var(--green);
}

.pnl-hero-value.down {
  color: var(--red);
}

.pnl-hero-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.pnl-chart-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pnl-chart-range {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}

.pnl-chart-range:hover {
  border-color: rgba(34, 197, 94, 0.35);
}

.pnl-chart-range:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.pnl-hero-chart {
  min-height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pnl-hero-chart-svg {
  display: block;
  width: 100%;
  height: 280px;
}

.pnl-hero-grid {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.pnl-hero-axis {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 400;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

.pnl-hero-axis-x {
  text-anchor: middle;
  font-size: 9px;
  fill: var(--muted-2);
}

.pnl-hero-end-bg--pos {
  fill: rgba(34, 197, 94, 0.25);
}

.pnl-hero-end-bg--neg {
  fill: rgba(239, 68, 68, 0.25);
}

.pnl-hero-end-label {
  fill: var(--text);
  font-size: 10px;
  font-weight: 500;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

.pnl-hero-chart-empty,
.pnl-calendar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 1rem;
}

.pnl-calendar--empty .pnl-calendar-empty {
  min-height: 88px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
}

.pnl-calendar {
  margin: 0 1.35rem 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.22);
}

.pnl-calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.55rem;
}

.pnl-calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pnl-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pnl-cal-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.pnl-calendar-period {
  font-size: 1rem;
  font-weight: 700;
  min-width: 2.5rem;
}

.pnl-calendar-total {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 0.25rem;
}

.pnl-calendar-total.up {
  color: var(--green);
}

.pnl-calendar-total.down {
  color: var(--red);
}

.pnl-cal-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.pnl-cal-toggle-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.pnl-cal-toggle-btn:hover {
  color: var(--text);
}

.pnl-cal-toggle-btn.active {
  background: var(--green);
  color: #0a1a0f;
}

.pnl-calendar-meta {
  font-size: 0.82rem;
  color: rgba(229, 231, 235, 0.72);
  margin-bottom: 0.85rem;
}

.pnl-cal-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pnl-cal-header,
.pnl-cal-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr) 72px;
  gap: 0.35rem;
}

.pnl-cal-dow {
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
  padding-bottom: 0.15rem;
}

.pnl-cal-cell {
  min-height: 58px;
  padding: 0.4rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}

.pnl-cal-cell.empty {
  background: transparent;
  border: none;
}

.pnl-cal-cell.muted {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.04);
}

.pnl-cal-cell.outside {
  opacity: 0.45;
}

.pnl-cal-cell.win.soft {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.22);
}

.pnl-cal-cell.win.mid {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.32);
}

.pnl-cal-cell.win.intense,
.pnl-cal-cell.win {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.42);
}

.pnl-cal-cell.loss.soft {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.pnl-cal-cell.loss.mid {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.pnl-cal-cell.loss.intense,
.pnl-cal-cell.loss {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.38);
}

.pnl-cal-cell.week-total {
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.pnl-cal-cell.week-total.up {
  color: var(--green);
}

.pnl-cal-cell.week-total.down {
  color: var(--red);
}

.pnl-cal-cell.week-total.neutral {
  color: var(--muted);
}

.pnl-cal-day {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(229, 231, 235, 0.75);
}

.pnl-cal-val {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pnl-cal-cell.win .pnl-cal-val {
  color: var(--green);
}

.pnl-cal-cell.loss .pnl-cal-val {
  color: var(--red);
}

.pnl-cal-month-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
}

.pnl-cal-month {
  min-height: 78px;
  padding: 0.6rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
}

.pnl-cal-month.empty {
  opacity: 0.55;
}

.pnl-cal-month.win.soft {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.22);
}

.pnl-cal-month.win.mid {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.32);
}

.pnl-cal-month.win.intense,
.pnl-cal-month.win {
  background: rgba(34, 197, 94, 0.24);
  border-color: rgba(34, 197, 94, 0.45);
}

.pnl-cal-month.win.best {
  background: rgba(34, 197, 94, 0.32);
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.15);
}

.pnl-cal-month.loss.soft {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.pnl-cal-month.loss.mid {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.pnl-cal-month.loss.intense,
.pnl-cal-month.loss {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.38);
}

.pnl-cal-month-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pnl-cal-month-val {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pnl-cal-month.win .pnl-cal-month-val {
  color: var(--green);
}

.pnl-cal-month.loss .pnl-cal-month-val {
  color: var(--red);
}

.wallet-positions-head {
  padding: 0.75rem 1.35rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.chip-x {
  border-color: rgba(29, 155, 240, 0.4);
  background: rgba(29, 155, 240, 0.1);
  color: #7cc4ff;
}

.chip-x:hover {
  background: rgba(29, 155, 240, 0.18);
}

.chip-pm:hover {
  background: var(--bg-card-hover);
}

.chip-val {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-soft);
  color: #86efac;
}

.chip-muted {
  color: var(--muted);
}

.chip svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.wallet-positions {
  padding: 0.25rem 0 0.5rem;
}

.pos-table-head,
.pos-row {
  display: grid;
  grid-template-columns: 1fr 6.75rem 6.75rem 5.25rem;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 1.35rem;
}

.pos-table-head {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
  padding-top: 0.35rem;
  padding-bottom: 0.45rem;
}

.pos-col-num {
  text-align: right;
}

.pos-col-market {
  min-width: 0;
}

.pos-row {
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.85rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

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

.pos-market {
  font-weight: 600;
  line-height: 1.35;
}

.market-link {
  color: inherit;
  text-decoration: none;
}

.market-link:hover {
  color: var(--gold-mid);
  text-decoration: underline;
}

.pos-outcome {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.pos-val {
  text-align: right;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.pos-pnl {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.78rem;
  min-width: 4.5rem;
}

.pos-pnl.up {
  color: var(--green);
}

.pos-pnl.down {
  color: var(--red);
}

.pos-entry {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Overview KPIs */
.overview {
  margin-bottom: 1.75rem;
}

.overview-head,
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.overview-head h2,
.section-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.live-dot {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
}

.kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kpi-val {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-val.accent {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.kpi-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted-2);
}

.kpi-val.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
}

.section-hint {
  font-size: 0.78rem;
  color: var(--muted-2);
}

/* Wallet grids */
.featured,
.wallet-board {
  margin-bottom: 1.75rem;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.wallet-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.wallet-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.skeleton-card-mini {
  min-height: 108px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.wallet-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  overflow: hidden;
  min-width: 0;
}

.wallet-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.wallet-card.has-x {
  border-color: rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
}

.wallet-card.has-x:hover {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.15);
}

.wallet-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  min-width: 0;
}

.wallet-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.wallet-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.wallet-card.has-x .wallet-card-avatar {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.wallet-card-avatar.placeholder {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-mid);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.wallet-card-name {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card-x {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #7cc4ff;
  font-weight: 600;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card-x.muted {
  color: var(--muted-2);
  font-weight: 500;
}

.wallet-card-x svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.wallet-card-addr {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.wallet-card-stat {
  font-size: 0.72rem;
  color: var(--gold-mid);
  margin-top: 0.25rem;
  font-weight: 600;
}

.wallet-card.compact {
  padding: 0.75rem 0.85rem;
}

.wallet-card.compact .wallet-card-avatar {
  width: 30px;
  height: 30px;
}

.wallet-card.compact .wallet-card-name {
  font-size: 0.8rem;
}

/* Feed */
.main-feed {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: 10px;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(184, 134, 11, 0.08));
  color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-field input {
  width: 5.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.feed-panel {
  display: none;
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.feed-panel.active {
  display: block;
}

.trade-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.12s;
  min-width: 0;
}

.trade-card-main {
  min-width: 0;
  overflow: hidden;
}

.trade-card:hover {
  background: var(--bg-card-hover);
}

.trade-card:last-child {
  border-bottom: none;
}

.trade-market {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.trade-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.76rem;
  color: var(--muted);
  min-width: 0;
}

.trade-wallet-label {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-side.buy {
  color: var(--green);
  font-weight: 700;
}

.trade-side.sell {
  color: var(--red);
  font-weight: 700;
}

.trade-right {
  text-align: right;
}

.trade-usd {
  font-weight: 700;
  font-size: 0.95rem;
}

.trade-time {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trade-card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.35rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

/* X-linked live trade — hero trader row */
.trade-card-x {
  background: linear-gradient(90deg, rgba(124, 196, 255, 0.06) 0%, transparent 55%);
  border-left: 3px solid rgba(124, 196, 255, 0.55);
  padding: 1rem 1.1rem;
}

.trade-card-x:hover {
  background: linear-gradient(90deg, rgba(124, 196, 255, 0.1) 0%, var(--bg-card-hover) 55%);
}

.trade-x-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: start;
  min-width: 0;
}

.trade-x-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(124, 196, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.15);
}

.trade-x-avatar.placeholder {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-mid);
  background: rgba(255, 215, 0, 0.08);
}

.trade-x-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.trade-x-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #9ed4ff;
  text-decoration: none;
  line-height: 1.2;
}

.trade-x-handle:hover {
  color: #c8e8ff;
  text-decoration: underline;
}

.trade-x-handle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.trade-x-action {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.trade-x-action .trade-side {
  font-size: 1rem;
  text-transform: lowercase;
}

.trade-x-outcome {
  font-weight: 700;
  color: var(--text);
}

.trade-x-sep {
  color: var(--muted);
}

.trade-x-usd-inline {
  font-weight: 700;
  color: var(--gold-mid);
}

.trade-market-sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.35;
}

.trade-card-x .trade-right .trade-usd {
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .trade-x-usd-inline {
    display: none;
  }

  .trade-x-body {
    grid-template-columns: auto 1fr;
  }

  .trade-card-x .trade-right {
    grid-column: 2;
    text-align: left;
    margin-top: -0.25rem;
  }
}

.trade-card-avatar.placeholder {
  display: inline-grid;
  place-items: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--gold-mid);
  background: rgba(255, 215, 0, 0.08);
}

.trade-card.has-x {
  border-color: rgba(124, 196, 255, 0.22);
}

@keyframes tradeFlashIn {
  0% {
    opacity: 0;
    transform: translateY(-6px);
    background-color: rgba(255, 215, 0, 0.14);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.trade-card.trade-new {
  animation: tradeFlashIn 0.5s ease-out;
}

/* Market tape — compact terminal-style anonymous trade rows */
.tape-row {
  display: grid;
  grid-template-columns: 48px minmax(60px, 0.9fr) minmax(120px, 2fr) 84px 52px 72px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.tape-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.tape-side {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.tape-side.buy {
  color: #4ade80;
}

.tape-side.sell {
  color: #f87171;
}

.tape-outcome {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-market {
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-usd {
  text-align: right;
  font-weight: 700;
  color: var(--gold-mid);
}

.tape-px {
  text-align: right;
  color: var(--text-dim);
}

.tape-time {
  text-align: right;
  color: var(--text-faint, var(--text-dim));
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .tape-row {
    grid-template-columns: 40px 1fr 70px 60px;
  }
  .tape-market,
  .tape-px {
    display: none;
  }
}

.trade-card.has-x .x-link-prominent {
  font-size: 0.82rem;
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #7cc4ff;
  font-weight: 600;
}

.x-link svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.no-x {
  color: var(--muted-2);
  font-style: italic;
}

.section-loading {
  min-height: 88px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.state-box.error {
  color: #fca5a5;
}

/* Site footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  padding: 3.5rem 1.25rem 2rem;
  text-align: center;
  background: #020306;
  border-top: 1px solid var(--border-soft);
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.footer-nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav-link:hover,
.footer-nav-link.active {
  color: var(--gold);
}

.footer-nav-sep {
  color: var(--muted-2);
  font-size: 0.75rem;
  user-select: none;
}

.watchlist-page {
  margin-top: 1.5rem;
}

.watchlist-page .page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.footer-profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold-mid);
  box-shadow:
    0 0 20px rgba(255, 189, 46, 0.35),
    0 0 40px rgba(255, 189, 46, 0.12);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-profile a:hover .footer-profile-img {
  transform: scale(1.06);
  box-shadow:
    0 0 28px rgba(255, 215, 0, 0.45),
    0 0 50px rgba(255, 189, 46, 0.2);
}

.footer-credit {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.footer-credit a {
  color: var(--gold-mid);
  font-weight: 700;
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.footer-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.footer-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.footer-brand-accent {
  color: #8b9cf6;
}

.footer-disclaimer {
  max-width: 520px;
  margin: 0 auto 1.25rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted-2);
}

.footer-copy {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--muted-2);
}

@media (max-width: 768px) {
  .profile-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pnl-cal-header,
  .pnl-cal-row {
    grid-template-columns: repeat(7, 1fr) 56px;
    gap: 0.25rem;
  }

  .pnl-cal-cell {
    min-height: 44px;
    padding: 0.25rem;
  }

  .pnl-cal-val {
    font-size: 0.65rem;
  }

  .pnl-cal-month-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pnl-calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pnl-cal-toggle {
    align-self: flex-start;
  }
}

@media (max-width: 640px) {
  .search-box {
    flex-direction: column;
  }

  .pos-table-head {
    display: none;
  }

  .pos-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .pos-val,
  .pos-pnl,
  .pos-entry {
    text-align: left;
  }
}
