← Back
/* === CSS Variables — Dark Theme (default) === */
:root {
  --bg-primary: #08161b;
  --bg-secondary: #0c1c22;
  --bg-card: #0f2730;
  --bg-card-hover: #143540;
  --text-primary: #eafff4;
  --text-secondary: #7ea69d;
  --text-muted: #4f7972;
  --accent: #22e06a;
  --accent-hover: #1bc55d;
  --profit: #22e06a;
  --profit-bg: rgba(34, 224, 106, 0.12);
  --loss: #ff7a7a;
  --loss-bg: rgba(255, 122, 122, 0.12);
  --border: rgba(120, 224, 180, 0.12);
  --border-light: rgba(120, 224, 180, 0.18);
  --hover-overlay: rgba(34, 224, 106, 0.05);
  --hover-overlay-strong: rgba(34, 224, 106, 0.10);
  --shadow: rgba(0, 0, 0, 0.45) 0 2px 8px;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-height: 60px;
  --topbar-height: 56px;

  /* Root background must follow the in-app data-theme toggle, not the OS
     prefers-color-scheme (index.css). Same specificity as index.css :root,
     but App.css loads later → wins. Fixes dark area showing on scroll. */
  background: var(--bg-primary);
}

/* === Light Theme === */
[data-theme="light"] {
  --bg-primary: #f5f6f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f4;
  --text-primary: #1a1d26;
  --text-secondary: #4a5568;
  --text-muted: #8895a7;
  --accent: #0d9f55;
  --accent-hover: #0b8047;
  --profit: #16a34a;
  --profit-bg: rgba(22, 163, 74, 0.1);
  --loss: #dc2626;
  --loss-bg: rgba(220, 38, 38, 0.1);
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);
  --hover-overlay: rgba(0, 0, 0, 0.03);
  --hover-overlay-strong: rgba(0, 0, 0, 0.06);
  --shadow: rgba(0, 0, 0, 0.08) 0 2px 8px;
}

/* === Accent color themes (layer on top of dark/light; profit/loss unchanged) === */
/* Accent hue applies in both modes; bg tint only in dark (light keeps its bg). */
[data-accent="ocean"]  { --accent: #2f97ff; --accent-hover: #1f7fe0; --hover-overlay: rgba(47,151,255,0.05); --hover-overlay-strong: rgba(47,151,255,0.10); }
[data-accent="nebula"] { --accent: #a78bfa; --accent-hover: #8b6df0; --hover-overlay: rgba(167,139,250,0.05); --hover-overlay-strong: rgba(167,139,250,0.10); }
[data-accent="cyber"]  { --accent: #22e0d6; --accent-hover: #1bc5bc; --hover-overlay: rgba(34,224,214,0.05); --hover-overlay-strong: rgba(34,224,214,0.10); }
[data-accent="sunset"] { --accent: #ffae3b; --accent-hover: #e0950d; --hover-overlay: rgba(255,174,59,0.05); --hover-overlay-strong: rgba(255,174,59,0.10); }
[data-accent="crimson"]{ --accent: #ff4d7d; --accent-hover: #e23566; --hover-overlay: rgba(255,77,125,0.05); --hover-overlay-strong: rgba(255,77,125,0.10); }

:root[data-accent="ocean"]:not([data-theme="light"])  { --bg-primary: #081320; --bg-secondary: #0d1e30; --bg-card: #112740; --bg-card-hover: #163150; --border: rgba(90,160,230,0.13); --border-light: rgba(90,160,230,0.20); }
:root[data-accent="nebula"]:not([data-theme="light"]) { --bg-primary: #120e1f; --bg-secondary: #1b1630; --bg-card: #221b3a; --bg-card-hover: #2a2147; --border: rgba(167,139,250,0.13); --border-light: rgba(167,139,250,0.20); }
:root[data-accent="cyber"]:not([data-theme="light"])  { --bg-primary: #05080a; --bg-secondary: #0a1014; --bg-card: #0e171b; --bg-card-hover: #132025; --border: rgba(80,200,190,0.13); --border-light: rgba(80,200,190,0.20); }
:root[data-accent="sunset"]:not([data-theme="light"])  { --bg-primary: #1a1108; --bg-secondary: #241808; --bg-card: #2c1e0a; --bg-card-hover: #352510; --border: rgba(255,174,59,0.13); --border-light: rgba(255,174,59,0.20); }
:root[data-accent="crimson"]:not([data-theme="light"]) { --bg-primary: #1a0b10; --bg-secondary: #26111a; --bg-card: #2e1520; --bg-card-hover: #371924; --border: rgba(255,77,125,0.13); --border-light: rgba(255,77,125,0.20); }

/* Settings accent picker swatches */
.accent-swatches { display: flex; gap: 10px; }
.accent-sw { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .12s, border-color .12s; }
.accent-sw:hover { transform: scale(1.08); }
.accent-sw-on { border-color: var(--text-primary); }

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* === Layout === */
.layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + 16px);
  padding-top: calc(var(--topbar-height) + 16px);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

@media (min-width: 1024px) {
  .page-content {
    padding: 32px 24px;
    padding-top: calc(var(--topbar-height) + 32px);
  }
}

/* === Top Bar === */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

.topbar-logo svg {
  width: 24px;
  height: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Top-right account / login button (replaces the old RainbowKit connect button) */
.wallet-cta {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-cta:hover { background: var(--accent-hover); }

/* Keep RainbowKit's connect button on one line — long localized labels
   ("Подключить кошелек") otherwise wrap to two rows and bloat the header. */
.topbar-actions [data-rk] button {
  white-space: nowrap;
}

/* Give the logo room to breathe next to the actions. */
.topbar-logo {
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--accent); }

.btn-wallet {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-wallet:hover {
  background: var(--accent-hover);
}

.btn-sign {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-sign:hover {
  background: rgba(234, 179, 8, 0.25);
}

.btn-sign:disabled {
  opacity: 0.6;
  cursor: wait;
}

.trade-ready {
  color: var(--profit);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  background: var(--profit-bg);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* === Sidebar (desktop ≥1024px) === */
.sidebar {
  display: none; /* hidden on mobile */
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: 200px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 90;
    padding: 12px 8px;
    overflow-y: auto;
  }

  .bottom-nav {
    display: none !important;
  }

  .page-content {
    margin-left: 200px;
    padding-bottom: 32px !important;
  }

  .topbar {
    padding-left: 216px;
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
  width: 100%;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.sidebar-link-active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-icon-wrap {
  position: relative;
  display: inline-flex;
}

.sidebar-label {
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* === Bottom Nav === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--accent);
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.card:hover {
  border-color: var(--border-light);
}

/* === Page placeholders === */
.page-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  color: var(--text-muted);
  gap: 12px;
}

.page-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.page-placeholder h2 {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.page-placeholder p {
  font-size: 0.9rem;
}

/* === KPI Bar === */
.kpi-bar {
  display: grid;
  /* minmax(0,1fr) lets columns shrink below content size — otherwise the big
     KPI values (35 734 / $361.3M) force min-content width and overflow right. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-mover {
  font-size: 0.85rem;
  font-weight: 600;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-skeleton .skeleton-line {
  background: var(--bg-card-hover);
  border-radius: 4px;
  height: 14px;
  margin-bottom: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

.kpi-skeleton .kpi-value.skeleton-line { width: 60%; height: 20px; }
.kpi-skeleton .kpi-label.skeleton-line { width: 80%; }

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

/* === Category Pills === */
.sort-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.sort-bar-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); flex-shrink: 0;
}
.sort-bar-pills {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sort-bar-pills::-webkit-scrollbar { display: none; }

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Fade the right edge so it's clear the row scrolls to more categories. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.category-pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pill-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* === Search Bar === */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}

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

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
}

.search-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Filter toggle button */
.filter-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: all 0.15s;
}

.filter-toggle:hover, .filter-toggle-active {
  color: var(--accent);
  border-color: var(--accent);
}

.filter-has-active {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
}

/* Filters panel */
.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 180px;
}

.filter-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.filter-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-input {
  flex: 1;
  max-width: 100px;
  accent-color: var(--accent);
}

.range-value {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 32px;
}

.range-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.filter-reset {
  background: none;
  border: 1px solid var(--loss);
  color: var(--loss);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.filter-reset:hover {
  background: var(--loss-bg);
}

/* === Results Count === */
.results-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* === Markets Table === */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.markets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}

.markets-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 5;
}

.markets-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.markets-table th.sortable:hover {
  color: var(--text-secondary);
}

.markets-table th.sorted {
  color: var(--accent);
}

.sort-arrow {
  font-size: 0.7rem;
}

.markets-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-secondary);
}

.markets-table tbody tr:hover {
  background: var(--bg-card);
}

.col-market { min-width: 250px; max-width: 350px; }
.col-category { min-width: 90px; }
.col-price { min-width: 60px; text-align: right; }
.col-spread { min-width: 70px; text-align: right; }
.col-volume { min-width: 90px; text-align: right; }
.col-liquidity { min-width: 90px; text-align: right; }
.col-ends { min-width: 60px; text-align: right; }

th.col-price, th.col-spread, th.col-volume, th.col-liquidity, th.col-ends {
  text-align: right;
}

/* Market cell with image */
.market-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.market-question {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* Category badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

/* Table states */
.table-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.table-empty svg {
  opacity: 0.3;
  margin-bottom: 4px;
}

.table-empty p {
  font-weight: 500;
  color: var(--text-secondary);
}

.table-empty span {
  font-size: 0.8rem;
}

/* Skeleton rows */
.skeleton-row td {
  padding: 12px !important;
}

.skeleton-text {
  height: 14px;
  background: var(--bg-card-hover);
  border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-short {
  width: 50px;
  margin-left: auto;
}

.skeleton-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card-hover);
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-badge {
  width: 60px;
  height: 20px;
  border-radius: 10px;
  background: var(--bg-card-hover);
  animation: pulse 1.5s ease-in-out infinite;
}

/* Skeleton generic line */
.skeleton-line {
  background: var(--bg-card-hover);
  border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Error Boundary */
.error-boundary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 12px;
  color: var(--text-secondary);
  padding: 24px;
  text-align: center;
}

.error-boundary .error-icon {
  color: var(--loss);
  opacity: 0.6;
}

.error-boundary h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.error-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 400px;
}

.error-retry {
  margin-top: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.error-retry:hover {
  background: var(--accent-hover);
}

/* === Pagination === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.page-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Markets Home === */
.markets-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
}

/* Hero KPIs */
.hero-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.hero-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.hero-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sections */
.home-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.view-more {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* Hot Markets Grid */
.hot-markets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hot-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.hot-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hot-img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.hot-category {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.hot-question {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.hot-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.hot-volume {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  color: var(--text-primary);
  text-align: left;
}

.category-card:hover {
  border-color: var(--border-light);
}

.cat-icon {
  font-size: 1.3rem;
}

.cat-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
}

.cat-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Ending Soon */
.ending-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ending-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  gap: 12px;
}

.ending-row:hover {
  border-color: var(--border-light);
}

.ending-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ending-question {
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ending-category {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ending-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.ending-price {
  font-size: 0.85rem;
  font-weight: 700;
}

.ending-time {
  font-size: 0.72rem;
  color: var(--loss);
  font-weight: 600;
}

/* === Chart + Orderbook Layout === */
.details-chart-ob {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.details-chart-ob .price-chart {
  flex: 2;
  min-width: 0;
}

.details-chart-ob .orderbook-mini {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .details-chart-ob {
    flex-direction: column;
  }
}

/* === Price Chart === */
.price-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.chart-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.chart-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.chart-intervals {
  display: flex;
  gap: 4px;
}

.chart-interval {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.chart-interval:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.chart-interval-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.chart-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-current-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.chart-container {
  position: relative;
  min-height: 200px;
}

@media (min-width: 768px) {
  .chart-container { min-height: 280px; }
}

.chart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  z-index: 2;
  background: var(--bg-card);
  opacity: 0.85;
  border-radius: var(--radius-sm);
}

.chart-tooltip {
  display: none;
  position: absolute;
  z-index: 10;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 6px 10px;
  pointer-events: none;
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.chart-tooltip strong {
  font-size: 14px;
  font-weight: 800;
}

.chart-tooltip span {
  font-size: 10px;
  color: var(--text-muted);
}

/* === Orderbook Mini === */
.orderbook-mini {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.orderbook-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.orderbook-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.orderbook-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  padding: 0 4px;
}

.orderbook-loading, .orderbook-empty {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ob-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 3px 4px;
  font-size: 0.82rem;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.ob-bar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 2px;
  opacity: 0.15;
}

.ob-bar-bid {
  background: var(--profit);
}

.ob-bar-ask {
  background: var(--loss);
}

.ob-price {
  position: relative;
  z-index: 1;
}

.ob-bid .ob-price {
  color: var(--profit);
  font-weight: 600;
}

.ob-ask .ob-price {
  color: var(--loss);
  font-weight: 600;
}

.ob-size {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
}

.ob-spread {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin: 2px 0;
}

/* === Clickable Rows === */
.market-row {
  cursor: pointer;
  transition: background 0.15s;
}

.market-row:hover {
  background: var(--bg-card) !important;
}

.market-row-expanded {
  background: var(--bg-card) !important;
}

.expand-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
  margin-left: auto;
}

.market-row-expanded .expand-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

/* === Details Panel === */
.details-row td {
  padding: 0 !important;
  border-bottom: 2px solid var(--accent) !important;
}

.details-panel {
  background: var(--bg-secondary);
  padding: 20px;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.details-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.details-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.details-title-text {
  flex: 1;
  min-width: 0;
}

.details-question {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.details-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.details-sep {
  opacity: 0.3;
}

.details-close {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.details-close:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Prices */
.details-prices {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.price-block {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.price-yes {
  background: var(--profit-bg);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.price-no {
  background: var(--loss-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.price-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.price-yes .price-label { color: var(--profit); }
.price-no .price-label { color: var(--loss); }

.price-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.price-yes .price-value { color: var(--profit); }
.price-no .price-value { color: var(--loss); }

/* Stats */
.details-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Tags */
.details-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.details-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Actions */
.details-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-buy {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-buy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-buy-yes {
  background: var(--profit);
  color: #000;
}

.btn-buy-no {
  background: var(--loss);
  color: #fff;
}

.btn-polymarket {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-polymarket:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Details loading/error */
.details-loading, .details-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Market Detail Page === */
.market-detail-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .detail-layout {
    flex-direction: row;
    gap: 24px;
  }

  .detail-main {
    flex: 1;
  }

  .detail-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--topbar-height) + 24px);
    align-self: flex-start;
  }
}

.detail-back-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0;
  transition: color 0.15s;
}

.detail-back:hover {
  color: var(--accent);
}

.detail-share {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  transition: all 0.15s;
}

.detail-share:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.detail-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.detail-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.detail-hero-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-sep {
  opacity: 0.3;
}

.detail-category-badge {
  color: var(--accent);
  font-weight: 600;
}

.detail-related {
  margin-top: 8px;
}

.detail-related h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* === Order Form === */
.order-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.order-form-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.order-form-disabled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-sign-form {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sign-form:hover { background: rgba(234, 179, 8, 0.25); }
.btn-sign-form:disabled { opacity: 0.6; cursor: wait; }

/* Mobile WalletConnect can drop the signature response silently; surface an
   actionable retry hint instead of a tooltip (invisible on touch). */
.sign-error-hint {
  margin-top: 8px;
  max-width: 280px;
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 500;
  color: #eab308;
  text-align: center;
}

.sign-error-banner {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  z-index: 99;
  padding: 10px 16px;
  background: rgba(234, 179, 8, 0.15);
  border-bottom: 1px solid rgba(234, 179, 8, 0.3);
  color: #eab308;
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  animation: toast-in 0.2s ease-out;
}

@media (min-width: 768px) {
  .sign-error-banner { left: 200px; }
}

/* Steer mobile users into a wallet's in-app browser, where signing is native
   and the WalletConnect relay (which drops responses on backgrounding) is
   bypassed entirely. */
.wb-banner {
  position: relative;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md, 10px);
  text-align: center;
}

.wb-banner-close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.wb-banner-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 6px;
}

.wb-banner-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.wb-banner-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.wb-banner-btn {
  flex: 1 1 0;
  min-width: 80px;
  padding: 8px 10px;
  background: var(--accent, #3b82f6);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.side-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 12px;
}

.side-btn {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.side-yes.side-active {
  background: var(--profit-bg);
  color: var(--profit);
}

.side-no.side-active {
  background: var(--loss-bg);
  color: var(--loss);
}

.order-type-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.order-type-tab {
  background: none;
  border: none;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.order-type-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.order-field {
  margin-bottom: 12px;
}

.order-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.order-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}

.order-input-wrap:focus-within {
  border-color: var(--accent);
}

.order-input-prefix,
.order-input-suffix {
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.order-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 10px 8px;
  outline: none;
  width: 0;
  -moz-appearance: textfield;
}

.order-input::-webkit-outer-spin-button,
.order-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.order-presets {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.preset-btn {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.order-summary {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 3px 0;
  color: var(--text-secondary);
}

.summary-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.summary-payout { color: var(--accent) !important; }
.summary-profit { color: var(--profit) !important; }
.summary-loss { color: var(--loss) !important; }

.order-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 6px;
}

.order-submit-yes {
  background: var(--profit);
}

.order-submit-yes:hover:not(:disabled) {
  background: #16a34a;
}

.order-submit-no {
  background: var(--loss);
}

.order-submit-no:hover:not(:disabled) {
  background: #dc2626;
}

.order-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.order-signing-hint {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent, #3b82f6);
  text-align: center;
  animation: toast-in 0.2s ease-out;
}

.order-toast {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  animation: toast-in 0.2s ease-out;
}

.order-toast-success {
  background: var(--profit-bg);
  color: var(--profit);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.order-toast-error {
  background: var(--loss-bg);
  color: var(--loss);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Portfolio === */
.portfolio-page {
  padding-bottom: 16px;
}

.portfolio-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-card-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card-value {
  font-size: 1rem;
  font-weight: 700;
}

.summary-card-value small {
  font-size: 0.75rem;
  font-weight: 500;
}

.redeem-banner {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #eab308;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.portfolio-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.portfolio-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.portfolio-tab-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.portfolio-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.sort-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sort-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.73rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.sort-btn-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.portfolio-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--text-secondary);
  text-align: center;
}

.portfolio-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

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

.pos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.pos-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pos-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.pos-title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pos-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-outcome {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.pos-outcome-yes { color: var(--profit); }
.pos-outcome-no { color: var(--loss); }

.pos-redeem-btn {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.pos-redeem-btn:hover {
  background: rgba(234, 179, 8, 0.25);
}

.pos-redeem-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.pos-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.pos-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pos-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pos-stat-value {
  font-size: 0.82rem;
  font-weight: 600;
}

.pos-prob {
  display: flex; align-items: center; gap: 10px; margin: 8px 0;
}
.pos-prob-bar {
  flex: 1; height: 6px; border-radius: 3px; overflow: hidden;
  background: var(--hover-overlay, rgba(255,255,255,0.08));
}
.pos-prob-fill {
  height: 100%; border-radius: 3px; background: var(--accent, #3b82f6); transition: width 0.3s;
}
.pos-ends {
  font-size: 11px; font-weight: 700; color: #fbbf24; white-space: nowrap; flex-shrink: 0;
}
.pos-whales {
  display: flex; flex-direction: column; gap: 1px; margin: 6px 0 2px;
}
.pos-whales-count {
  font-size: 11px; font-weight: 800; color: var(--text-secondary); margin-bottom: 1px;
}
.pos-whale {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; color: var(--text-primary);
}
.pos-whale-amt {
  font-weight: 800; color: var(--accent, #3b82f6);
}
.pos-whale-entry { font-weight: 800; }
.pos-whale-badge {
  font-size: 10px; font-weight: 800; color: #f59e0b;
  background: rgba(245, 158, 11, 0.14); border-radius: 5px; padding: 1px 5px; white-space: nowrap;
}

.pos-pnl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}

.pos-pnl-row small {
  font-weight: 500;
  font-size: 0.75rem;
}

/* === Utilities === */
.text-profit { color: var(--profit); }
.text-loss { color: var(--loss); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* === Responsive === */

/* Small phones */
@media (max-width: 380px) {
  .kpi-bar {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .details-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .details-actions {
    flex-wrap: wrap;
  }

  .btn-polymarket {
    width: 100%;
    justify-content: center;
  }

  .portfolio-summary {
    grid-template-columns: 1fr;
  }
}

/* Tablet+ */
@media (min-width: 768px) {
  .page-content {
    padding: 24px;
    padding-bottom: calc(var(--nav-height) + 24px);
    padding-top: calc(var(--topbar-height) + 24px);
  }

  .kpi-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hot-markets-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .details-actions {
    max-width: 500px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .details-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .portfolio-summary {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Alerts === */

.alert-triggered {
  border-left: 3px solid var(--green);
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Menu page */

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:hover {
  background: var(--bg-hover);
}

.menu-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 10px;
}

.menu-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Alert form (MarketDetailPage) */

.alert-section {
  margin: 8px 0;
}

.alert-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.alert-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.alert-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.alert-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.alert-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 13px;
}

.alert-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.alert-save-btn {
  flex: 1;
  padding: 10px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.alert-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert-cancel-btn {
  padding: 10px 16px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* ========================================
   Consolidated inline styles — Pages
   ======================================== */

/* === SignalsPage === */
.signals-page { text-align: left; }
.sig-title { font-size: 20px; font-weight: 800; margin: 0 0 14px 0; }
.sig-desc { font-size: 12px; color: var(--text-muted); margin: 0 0 14px 0; }
.sig-list { display: flex; flex-direction: column; gap: 10px; }
.sig-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px 16px; }
.sig-coming { text-align: center; padding: 48px 16px; }
.sig-coming-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.sig-coming h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px 0; }
.sig-coming p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* === MorePage === */
.more-page { text-align: left; }
.more-title { font-size: 20px; font-weight: 800; margin: 0 0 16px 0; }
.more-list { display: flex; flex-direction: column; gap: 2px; }
.more-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px;
  border: none; background: var(--bg-card); color: var(--text-primary);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s;
  text-align: left; width: 100%;
}
.more-item:first-child { border-radius: 12px 12px 0 0; }
.more-item:last-child { border-radius: 0 0 12px 12px; }
.more-item:hover { background: var(--hover-overlay-strong); }
.more-icon { font-size: 18px; }
.more-label { flex: 1; }
.more-badge {
  font-size: 11px; font-weight: 700; color: #f59e0b;
  background: rgba(245, 158, 11, 0.12); padding: 2px 8px; border-radius: 10px;
}
.more-arrow { color: var(--text-muted); flex-shrink: 0; }
.more-coming {
  margin-top: 24px; padding: 16px; background: var(--bg-card);
  border-radius: 12px; border: 1px dashed var(--border);
}
.more-coming-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin: 0 0 10px 0;
}
.more-coming-list { display: flex; flex-wrap: wrap; gap: 8px; }
.more-coming-list span {
  font-size: 12px; color: var(--text-muted);
  background: var(--hover-overlay); padding: 4px 10px; border-radius: 6px;
}

/* === AnalyticsPage === */
.analytics-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin: 16px 0;
}
.analytics-kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.analytics-kpi-accent { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.08); }
.analytics-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.5; }
.analytics-kpi-value { font-size: 20px; font-weight: 700; }
.analytics-kpi-accent .analytics-kpi-value { color: var(--profit); }
.analytics-kpi-sub { font-size: 11px; opacity: 0.6; margin-top: 2px; }
.analytics-section-title { font-size: 15px; font-weight: 600; margin: 20px 0 10px; opacity: 0.8; }

/* Payout panel */
.analytics-payout {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.analytics-payout-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border);
}
.analytics-payout-row:last-of-type { border-bottom: none; }
.analytics-payout-row a { color: var(--accent); text-decoration: none; }
.analytics-payout-note { font-size: 12px; opacity: 0.6; margin-top: 8px; line-height: 1.5; }

/* MAKER/TAKER badge */
.analytics-type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.analytics-type-maker { background: rgba(59, 130, 246, 0.15); color: var(--blue, #3b82f6); }
.analytics-type-taker { background: rgba(34, 197, 94, 0.15); color: var(--profit); }
.analytics-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: 10px;
}
.analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.analytics-table th {
  padding: 10px 12px; text-align: left; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.5;
  border-bottom: 1px solid var(--border);
}
.analytics-table td { padding: 10px 12px; border-bottom: 1px solid var(--hover-overlay); }
.analytics-table tbody tr:last-child td { border-bottom: none; }
.analytics-table tbody tr:hover { background: var(--hover-overlay); }
/* Numeric/short columns stay on one line so only the time column wraps. */
.analytics-table td:not(:first-child),
.analytics-table th:not(:first-child) { white-space: nowrap; }

/* Adaptive: tighten density on narrow screens so all 6 columns fit without
   the right-most (My Fee) column being clipped. */
@media (max-width: 520px) {
  .analytics-table { font-size: 12px; }
  .analytics-table th { padding: 8px 6px; font-size: 10px; letter-spacing: 0.3px; }
  .analytics-table td { padding: 8px 6px; }
  /* keep the date+time tight (2 lines max) instead of one word per line */
  .analytics-table td:first-child { min-width: 64px; line-height: 1.3; }
}
.text-profit { color: var(--profit); }
.text-loss { color: var(--loss); }

/* === WhaleProfilePage === */
.wpp-page { text-align: left; }
.wpp-back { padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.wpp-back:hover { text-decoration: underline; }

/* ========================================
   Consolidated inline styles — Components
   ======================================== */

/* === SubTabs === */
.sub-tabs {
  display: flex; gap: 6px; padding: 4px; background: var(--bg-secondary);
  border-radius: 10px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.sub-tab {
  flex: 1; min-width: 0; padding: 8px 12px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sub-tab-active { background: var(--accent); color: #fff; }
.sub-tab:not(.sub-tab-active):hover { background: var(--hover-overlay); color: var(--text-secondary); }
.sub-tab-badge {
  font-size: 10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.sub-tab-active .sub-tab-badge { background: var(--hover-overlay-strong); color: var(--text-primary); }
.sub-tab:not(.sub-tab-active) .sub-tab-badge { background: var(--accent); color: #fff; }

/* === EndingSoonCard === */
.es-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; transition: border-color 0.15s; min-width: 260px;
}
.es-card:hover { border-color: var(--accent); }
.es-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.es-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.es-title {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.es-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.es-prices { display: flex; gap: 8px; }
.es-yes { font-size: 12px; font-weight: 700; color: var(--profit); }
.es-no { font-size: 12px; font-weight: 700; color: var(--loss); }
.es-meta { display: flex; gap: 8px; align-items: center; }
.es-time {
  font-size: 11px; font-weight: 700; color: #f59e0b;
  background: rgba(245, 158, 11, 0.12); padding: 2px 6px; border-radius: 4px;
}
.es-vol { font-size: 11px; color: var(--text-muted); }
.es-cat {
  display: inline-block; margin-top: 8px; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); background: var(--hover-overlay);
  padding: 2px 6px; border-radius: 4px;
}

/* === AnomalyCard === */
.an-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; transition: border-color 0.15s; min-width: 260px;
}
.an-card:hover { border-color: #f59e0b; }
.an-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.an-score {
  flex-shrink: 0; font-size: 14px; font-weight: 800; color: #f59e0b;
  background: rgba(245, 158, 11, 0.15); padding: 3px 8px; border-radius: 6px; line-height: 1;
}
.an-title {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.an-row { display: flex; gap: 12px; margin-bottom: 8px; }
.an-stat { display: flex; flex-direction: column; gap: 2px; }
.an-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.an-value { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.an-footer { display: flex; align-items: center; gap: 8px; }
.an-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
  background: var(--hover-overlay); padding: 2px 6px; border-radius: 4px;
}
.an-ago { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* === SignalCard (Signals feed) === */
.sc-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.sc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.sc-top { display: flex; gap: 12px; margin-bottom: 10px; }
.sc-img {
  width: 48px; height: 48px; border-radius: 10px; object-fit: cover;
  flex-shrink: 0; background: var(--hover-overlay);
}
.sc-top-text { flex: 1; min-width: 0; }
.sc-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; line-height: 1;
}
.sc-badge-whale { color: #38bdf8; background: rgba(56, 189, 248, 0.15); }
.sc-badge-spike { color: #f59e0b; background: rgba(245, 158, 11, 0.15); }
.sc-badge-momentum { color: #a78bfa; background: rgba(167, 139, 250, 0.15); }
.sc-badge-longshot { color: #2dd4bf; background: rgba(45, 212, 191, 0.15); }
.sc-badge-smart { color: #34d399; background: rgba(52, 211, 153, 0.15); }
.sc-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sc-badges .sc-badge { margin-bottom: 0; }
.sc-title {
  font-size: 14px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 12px; }
.sc-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sc-metric { display: flex; flex-direction: column; gap: 2px; }
.sc-metric-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.sc-metric-value { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.sc-meta { display: flex; align-items: center; gap: 8px; }
.sc-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
  background: var(--hover-overlay); padding: 2px 6px; border-radius: 4px;
}
.sc-wr {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; color: #34d399;
  background: rgba(52, 211, 153, 0.12); padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.sc-ends {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; color: #fbbf24;
  background: rgba(251, 191, 36, 0.12); padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.sc-ago { font-size: 11px; color: var(--text-muted); }
.sc-cta {
  width: 100%; margin-top: 12px; padding: 9px 0; border: none; border-radius: 9px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 0.15s;
}
.sc-cta:hover { opacity: 0.88; }
.sc-cta-yes { background: var(--profit); color: #04130b; }
.sc-cta-no { background: var(--loss); color: #fff; }
.sc-cta-neutral { background: var(--hover-overlay); color: var(--text-primary); }

/* recommended side + market-implied probability */
.sc-bet {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.sc-bet-side {
  font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
  padding: 3px 9px; border-radius: 6px;
}
.sc-bet-yes { color: #04130b; background: var(--profit); }
.sc-bet-no { color: #fff; background: var(--loss); }
.sc-bet-prob { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

/* two-scale bars: signal strength + entry quality */
.sc-scales { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sc-scale { display: flex; flex-direction: column; gap: 3px; }
.sc-scale-head { display: flex; justify-content: space-between; align-items: baseline; }
.sc-scale-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.sc-scale-val { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.sc-scale-track { height: 5px; border-radius: 3px; background: var(--hover-overlay); overflow: hidden; }
.sc-scale-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.sc-fill-strength { background: linear-gradient(90deg, #38bdf8, #2dd4bf); }
.sc-fill-entry { background: linear-gradient(90deg, #a78bfa, #818cf8); }

/* === SignalsFeed page === */
.sf-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.sf-skeleton {
  height: 150px; border-radius: 14px;
  background: linear-gradient(90deg, var(--hover-overlay) 25%, var(--hover-overlay-strong) 50%, var(--hover-overlay) 75%);
  background-size: 200% 100%; animation: wf-shimmer 1.5s infinite;
}
.sf-empty { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.sf-empty-icon { font-size: 44px; margin-bottom: 14px; }
.sf-empty-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.sf-empty-sub { font-size: 12px; line-height: 1.5; max-width: 340px; margin: 0 auto; }

/* === Whale leaderboard (WhalesPage) === */
.whl-list { display: flex; flex-direction: column; gap: 2px; }
.whl-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 10px; cursor: pointer; transition: background 0.15s;
}
.whl-row:hover { background: var(--hover-overlay); }
.whl-rank {
  flex-shrink: 0; width: 24px; text-align: center; font-size: 14px;
  font-weight: 800; color: var(--text-muted);
}
.whl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.whl-label {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.whl-meta { font-size: 12px; color: var(--text-muted); }
.whl-wr { flex-shrink: 0; font-size: 15px; font-weight: 800; color: var(--text-secondary); }
.whl-wr-good { color: var(--profit); }
.whl-wr-bad { color: var(--loss); }

/* === WhaleFeed === */
.wf-skeleton { display: flex; flex-direction: column; gap: 8px; }
.wf-skeleton-row {
  height: 64px; border-radius: 10px;
  background: linear-gradient(90deg, var(--hover-overlay) 25%, var(--hover-overlay-strong) 50%, var(--hover-overlay) 75%);
  background-size: 200% 100%; animation: wf-shimmer 1.5s infinite;
}
@keyframes wf-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.wf-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.wf-empty-icon { font-size: 40px; margin-bottom: 12px; }
.wf-empty-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.wf-empty-sub { font-size: 12px; line-height: 1.5; max-width: 300px; margin: 0 auto; }

.wf-list { display: flex; flex-direction: column; gap: 2px; }
.wf-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 10px; cursor: pointer; transition: background 0.15s;
}
.wf-row:hover { background: var(--hover-overlay); }
.wf-row { border-left: 3px solid transparent; padding-left: 11px; }
.wf-row.wf-dir-yes { border-left-color: var(--profit); }
.wf-row.wf-dir-no { border-left-color: var(--loss); }
.wf-row-left { flex: 1; min-width: 0; }
.wf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.wf-bet { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.wf-bet-yes { color: var(--profit); background: rgba(34, 197, 94, 0.14); }
.wf-bet-no { color: var(--loss); background: rgba(239, 68, 68, 0.14); }
.wf-action { font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.wf-label-link { font-weight: 700; color: var(--text-primary); cursor: pointer; text-decoration: none; }
.wf-label-link:hover { text-decoration: underline; color: var(--accent); }
.wf-buy { color: var(--profit); font-weight: 600; }
.wf-sell { color: var(--loss); font-weight: 600; }
.wf-amount { font-weight: 700; color: var(--text-primary); }
.wf-yes { color: var(--profit); font-weight: 600; }
.wf-no { color: var(--loss); font-weight: 600; }
.wf-toolbar { display: flex; justify-content: flex-end; padding: 4px 0 10px; }
.wf-smart {
  font-size: 10px; font-weight: 700; color: #c4b5fd; margin-left: 6px;
  background: rgba(167, 139, 250, 0.15); padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.wf-dossier {
  font-size: 11px; color: #38bdf8; margin-top: 3px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wf-market {
  font-size: 12px; color: var(--text-muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wf-row-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 1px; }
.wf-price { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.wf-price-cap { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

/* Whale consensus cards */
.wcs-list { display: flex; flex-direction: column; gap: 8px; }
.wcs-card {
  border-left: 3px solid transparent; padding: 12px 14px; border-radius: 10px;
  background: var(--card-bg, rgba(255,255,255,0.02)); cursor: pointer; transition: background 0.15s;
}
.wcs-card:hover { background: var(--hover-overlay); }
.wcs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wcs-flow { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.wcs-q {
  font-size: 13px; color: var(--text-secondary); margin-top: 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcs-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.wf-time { font-size: 11px; color: var(--text-muted); }
.wf-more { text-align: center; font-size: 11px; color: var(--text-muted); padding: 8px 0; }

/* === WhaleProfile === */
.wp-loading { padding: 20px; }
.wp-skel-header, .wp-skel-stats, .wp-skel-list {
  border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(90deg, var(--hover-overlay) 25%, var(--hover-overlay-strong) 50%, var(--hover-overlay) 75%);
  background-size: 200% 100%; animation: wp-shimmer 1.5s infinite;
}
.wp-skel-header { height: 80px; }
.wp-skel-stats { height: 100px; }
.wp-skel-list { height: 200px; }
@keyframes wp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.wp-error { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.wp-error-icon { font-size: 48px; margin-bottom: 12px; }
.wp-error-msg { font-size: 15px; font-weight: 500; }

.wp-container { padding: 16px; }
.wp-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.wp-backfill {
  display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600;
  color: #38bdf8; opacity: 0.9;
}
.wp-alert-btn {
  margin-left: auto; align-self: flex-start; flex-shrink: 0;
  background: transparent; color: var(--accent, #3b82f6);
  border: 1px solid var(--accent, #3b82f6); cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 9px;
  white-space: nowrap; transition: all 0.15s;
}
.wp-alert-btn:hover { opacity: 0.85; }
.wp-alert-on { background: #f59e0b; border-color: #f59e0b; color: #1a1a1a; }
.wal-badge {
  margin-left: 8px; font-size: 10px; font-weight: 800; color: #1a1a1a;
  background: #f59e0b; padding: 1px 7px; border-radius: 10px; white-space: nowrap;
}
.wal-unsub {
  background: transparent; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 15px; padding: 4px 8px; flex-shrink: 0; transition: color 0.15s;
}
.wal-unsub:hover { color: var(--loss); }
.wp-avatar {
  font-size: 36px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.1); border-radius: 50%; flex-shrink: 0;
}
.wp-info { flex: 1; min-width: 0; }
.wp-name { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.wp-addr { font-size: 12px; color: var(--text-muted); cursor: pointer; font-family: monospace; }
.wp-addr:hover { color: var(--accent); }
.wp-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
  background: var(--hover-overlay); padding: 2px 6px; border-radius: 4px; margin-top: 4px; display: inline-block;
}
.wp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 24px; }
.wp-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; text-align: center;
}
.wp-stat-label {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px;
}
.wp-stat-value { display: block; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.wp-section { margin-bottom: 24px; }
.wp-trust { background: var(--hover-overlay); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; }
.wp-trust .wp-section-title { color: var(--accent); margin-bottom: 8px; }
.wp-trust-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-secondary); padding: 4px 0; }
.wp-trust-row b { color: var(--text-primary); font-weight: 700; white-space: nowrap; }
.wp-section-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.wp-markets { display: flex; flex-direction: column; gap: 2px; }
.wp-market-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.wp-market-row:hover { background: var(--hover-overlay); }
.wp-market-q {
  font-size: 13px; color: var(--text-primary); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 12px;
}
.wp-market-meta { display: flex; gap: 12px; flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.wp-market-vol { font-weight: 700; color: var(--text-secondary); }
.wp-trades { display: flex; flex-direction: column; gap: 2px; }
.wp-trade-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: background 0.15s; gap: 8px;
}
.wp-trade-row:hover { background: var(--hover-overlay); }
.wp-trade-left { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.wp-buy { font-size: 11px; font-weight: 700; color: var(--profit); }
.wp-sell { font-size: 11px; font-weight: 700; color: var(--loss); }
.wp-out-yes { font-size: 11px; font-weight: 600; color: var(--profit); }
.wp-out-no { font-size: 11px; font-weight: 600; color: var(--loss); }
.wp-trade-q { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-trade-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wp-trade-amt { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.wp-trade-price { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.wp-pnl {
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.wp-pnl-win { color: #22c55e; background: rgba(34, 197, 94, 0.14); }
.wp-pnl-loss { color: #ef4444; background: rgba(239, 68, 68, 0.14); }
.wp-pnl-open { color: var(--text-muted); background: var(--hover-overlay); }
.wp-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 0 4px; }
.wp-pager-btn {
  background: transparent; color: var(--accent, #3b82f6); border: 1px solid var(--accent, #3b82f6);
  cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 8px;
  transition: opacity 0.15s;
}
.wp-pager-btn:disabled { opacity: 0.35; cursor: default; }
.wp-pager-info { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.wp-trade-time { font-size: 11px; color: var(--text-muted); min-width: 24px; text-align: right; }

/* === TradeHistory === */
.th-wrap { margin-top: 4px; }
.th-list { display: flex; flex-direction: column; gap: 2px; }
.th-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px; background: var(--bg-card); cursor: pointer; transition: background 0.12s;
}
.th-row:first-child { border-radius: 10px 10px 0 0; }
.th-row:last-child { border-radius: 0 0 10px 10px; }
.th-row:only-child { border-radius: 10px; }
.th-row:hover { background: var(--hover-overlay-strong); }
.th-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.th-icon { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.th-info { min-width: 0; }
.th-title {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.th-meta { display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.th-side { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; }
.th-side-buy { color: var(--profit); background: var(--profit-bg); }
.th-side-sell { color: var(--loss); background: var(--loss-bg); }
.th-redeem-win { color: var(--profit); background: var(--profit-bg); }
.th-redeem-loss { color: var(--loss); background: var(--loss-bg, rgba(239, 68, 68, 0.12)); }
.th-outcome { font-size: 10px; font-weight: 600; }
.th-outcome-yes { color: var(--profit); }
.th-outcome-no { color: var(--loss); }
.th-size, .th-price { font-size: 10px; color: var(--text-muted); }
.th-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.th-amount { font-size: 13px; font-weight: 700; }
.th-amt-win { color: var(--profit); }
.th-amt-loss { color: var(--loss); }
.th-pnl-pos { font-size: 11px; font-weight: 700; color: var(--profit); }
.th-pnl-neg { font-size: 11px; font-weight: 700; color: var(--loss); }
.th-time { font-size: 10px; color: var(--text-muted); }
.th-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.th-empty p { margin: 0; font-size: 14px; font-weight: 600; }
.th-empty-sub { font-size: 12px; margin-top: 4px !important; }
.th-loading { text-align: center; padding: 16px; font-size: 13px; color: var(--text-muted); }
.th-load-more {
  display: block; width: 100%; margin-top: 8px; padding: 10px;
  border: 1px solid var(--border); border-radius: 8px; background: transparent;
  color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.th-load-more:hover { background: rgba(59,130,246,0.08); }

/* === PnlDashboard === */
.pnl-dash { margin-top: 4px; }
.pnl-empty { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.pnl-empty p { margin: 0; font-size: 14px; font-weight: 600; }
.pnl-empty-sub { font-size: 12px; margin-top: 4px !important; }
.pnl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.pnl-kpi {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px;
}
.pnl-kpi-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.pnl-kpi-value { font-size: 18px; font-weight: 800; }
.pnl-kpi-sub { font-size: 10px; color: var(--text-muted); }
.pnl-pos { color: var(--profit); }
.pnl-neg { color: var(--loss); }
.pnl-section { margin-bottom: 20px; }
.pnl-section-title { font-size: 14px; font-weight: 700; margin: 0 0 10px 0; }
.pnl-bars { display: flex; gap: 2px; height: 100px; align-items: stretch; }
.pnl-bar-col { flex: 1; min-width: 0; }
.pnl-bar-track { position: relative; height: 100%; overflow: hidden; }
.pnl-bar { position: absolute; left: 0; right: 0; border-radius: 2px; min-height: 2px; }
.pnl-bar-green { background: var(--profit); }
.pnl-bar-red { background: var(--loss); }
.pnl-bars-legend { text-align: center; font-size: 10px; color: var(--text-muted); margin-top: 6px; }
.pnl-eq-date { color: var(--text-muted); font-size: 10px; }
.pnl-spark { width: 100%; height: 72px; }
.pnl-spark-svg { width: 100%; height: 100%; display: block; }
.pnl-spark-area-pos { fill: rgba(34,197,94,0.14); stroke: none; }
.pnl-spark-area-neg { fill: rgba(239,68,68,0.14); stroke: none; }
.pnl-spark-line-pos { fill: none; stroke: rgba(34,197,94,0.95); stroke-width: 1.5; }
.pnl-spark-line-neg { fill: none; stroke: rgba(239,68,68,0.95); stroke-width: 1.5; }
.pnl-spark-zero { stroke: rgba(148,163,184,0.35); stroke-width: 1; stroke-dasharray: 3 3; }
.pnl-spark-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pnl-spark-foot > span:nth-child(2) { font-weight: 700; font-size: 12px; }
.pnl-highlights { display: flex; flex-direction: column; gap: 6px; }
.pnl-highlight {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--bg-card); border-radius: 8px; font-size: 12px;
}
.pnl-hl-label { color: var(--text-muted); font-weight: 600; }

/* === WebSocket Live Price Flash === */
@keyframes flash-up {
  0% { background: transparent; }
  20% { background: rgba(16, 185, 129, 0.25); }
  100% { background: transparent; }
}
@keyframes flash-down {
  0% { background: transparent; }
  20% { background: rgba(239, 68, 68, 0.25); }
  100% { background: transparent; }
}
.price-flash-up {
  animation: flash-up 600ms ease-out;
  border-radius: 4px;
  padding: 1px 4px;
}
.price-flash-down {
  animation: flash-down 600ms ease-out;
  border-radius: 4px;
  padding: 1px 4px;
}

/* Live indicator dot */
.ws-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--profit);
  margin-left: 10px;
  opacity: 0.85;
}
.ws-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--profit);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* === Market Cards (mobile <640px) === */
.mc-desktop-only { display: block; }
.mc-mobile-only { display: none; }

@media (max-width: 639px) {
  .mc-desktop-only { display: none !important; }
  .mc-mobile-only { display: block !important; }
}

.mc-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.mc-card:active { border-color: var(--accent); }

.mc-card-expanded { border-color: var(--accent); }

.mc-body {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.mc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Implied-probability bar (mobile card) */
.mc-prob { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
.mc-prob-bar {
  flex: 1; height: 6px; border-radius: 3px; overflow: hidden;
  background: var(--hover-overlay, rgba(255,255,255,0.08));
}
.mc-prob-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.mc-prob-val { font-size: 14px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }

.mc-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mc-stat { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.mc-stat-ends { color: #fbbf24; }

/* View toggle (events / markets) */
.view-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.view-tab {
  background: var(--hover-overlay, rgba(255,255,255,0.06)); color: var(--text-secondary);
  border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 700;
  padding: 7px 14px; border-radius: 9px; transition: all 0.15s;
}
.view-tab-active { background: var(--accent, #3b82f6); color: #fff; }

/* Event cards (grouped view) */
.ev-card {
  background: var(--card-bg, rgba(255,255,255,0.02)); border-radius: 12px;
  padding: 14px; border: 1px solid var(--border, rgba(255,255,255,0.06));
}
.ev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ev-count {
  margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 800; color: var(--accent, #3b82f6);
  background: rgba(59,130,246,0.14); padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.ev-outcomes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ev-out {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: var(--hover-overlay, rgba(255,255,255,0.04)); transition: background 0.15s;
}
.ev-out:hover { background: rgba(255,255,255,0.09); }
.ev-out-label {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-out-price { font-size: 14px; font-weight: 800; flex-shrink: 0; }
.ev-more {
  font-size: 12px; font-weight: 700; color: var(--accent, #3b82f6); text-align: center;
  padding: 6px; text-decoration: none; cursor: pointer;
  background: none; border: none; width: 100%; font-family: inherit;
}

.mc-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.mc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mc-vol, .mc-ends {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.mc-details {
  border-top: 1px solid var(--border);
}

.mc-skeleton {
  pointer-events: none;
}

.mc-skeleton .mc-stats {
  margin-top: 4px;
}

/* === SearchPage (sp-*) === */
.sp-page { padding-bottom: 20px; }

.sp-bar { margin-bottom: 10px; }

.sp-cats {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}

/* History */
.sp-history { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }

.sp-history-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}

.sp-history-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); font-weight: 600;
}

.sp-history-clear {
  background: none; border: none; color: var(--accent); font-size: 12px;
  cursor: pointer; font-family: inherit; font-weight: 500;
}

.sp-history-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-family: inherit; font-size: 13px; color: var(--text-primary);
  transition: background 0.12s; text-align: left; width: 100%;
}
.sp-history-item:hover { background: var(--bg-card-hover); }
.sp-history-item svg { color: var(--text-muted); flex-shrink: 0; }
.sp-history-item span:nth-child(2) { flex: 1; }

.sp-history-x {
  color: var(--text-muted); font-size: 11px; padding: 2px 4px; opacity: 0.5;
}
.sp-history-x:hover { opacity: 1; }

/* Popular */
.sp-popular { margin-top: 8px; }

.sp-popular-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px;
}

.sp-popular-btn {
  padding: 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; font-family: inherit; transition: border-color 0.15s;
}
.sp-popular-btn:hover { border-color: var(--accent); }

/* Inline results */
.sp-results { display: flex; flex-direction: column; gap: 2px; }

.sp-results-count {
  font-size: 11px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500;
}

.sp-result {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-family: inherit; text-align: left; width: 100%;
  transition: border-color 0.12s;
}
.sp-result:hover { border-color: var(--accent); }

.sp-result-img {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}

.sp-result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.sp-result-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.sp-result-meta { display: flex; gap: 8px; align-items: center; }

.sp-result-cat {
  font-size: 10px; font-weight: 600; color: var(--accent); text-transform: uppercase;
}

.sp-result-vol { font-size: 11px; color: var(--text-muted); }

.sp-result-price {
  font-size: 18px; font-weight: 800; flex-shrink: 0; letter-spacing: -0.5px;
}

.sp-result-skeleton {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 2px;
}

.sp-results-loading { display: flex; flex-direction: column; gap: 2px; }

.sp-empty {
  text-align: center; padding: 40px 16px; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sp-empty svg { opacity: 0.3; }
.sp-empty p { font-size: 14px; font-weight: 500; margin: 0; }

@media (min-width: 600px) {
  .sp-popular-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === Leaderboard (lb-*) === */
.lb-page { padding-bottom: 20px; }

.lb-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}

.lb-title { font-size: 20px; font-weight: 800; margin: 0; }

.lb-periods { display: flex; gap: 6px; margin-bottom: 16px; }

/* Our rank highlight card */
.lb-our {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}

.lb-our-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); font-weight: 600;
}

.lb-our-row {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
}

.lb-our-name { font-size: 15px; font-weight: 700; color: var(--text-primary); flex: 1; }

.lb-our-vol { font-size: 15px; font-weight: 800; color: var(--accent); }

/* Leaderboard list */
.lb-list { display: flex; flex-direction: column; gap: 2px; }

.lb-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  transition: background 0.12s;
}

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

.lb-row-ours { border-color: var(--accent); background: rgba(59,130,246,0.06); }

.lb-skeleton { pointer-events: none; }

/* Rank */
.lb-medal { font-size: 20px; min-width: 28px; text-align: center; }

.lb-rank {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  min-width: 28px; text-align: center;
}

/* Logo */
.lb-logo {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}

.lb-logo-placeholder {
  width: 32px; height: 32px; border-radius: 8px; background: var(--bg-card-hover); flex-shrink: 0;
}

/* Info */
.lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.lb-name {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lb-verified {
  color: var(--accent); font-size: 12px; font-weight: 800;
  background: rgba(59,130,246,0.15); border-radius: 50%;
  width: 16px; height: 16px; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}

.lb-users { font-size: 11px; color: var(--text-muted); }

.lb-vol { font-size: 14px; font-weight: 800; color: var(--text-primary); flex-shrink: 0; }

.lb-empty {
  text-align: center; padding: 40px 16px; color: var(--text-muted);
}
.lb-empty p { font-size: 14px; margin: 0; }

/* === Settings Page (set-*) === */
.set-page { max-width: 600px; margin: 0 auto; padding: 16px; }
.set-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.set-section { margin-bottom: 24px; }
.set-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-secondary); margin-bottom: 8px; padding-left: 4px;
}
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--bg-card); border-radius: 12px;
  margin-bottom: 6px; cursor: pointer; transition: background 0.15s;
}
.set-row:hover { background: var(--bg-secondary); }
.set-row-info { display: flex; flex-direction: column; gap: 2px; }
.set-row-label { font-size: 14px; font-weight: 600; }
.set-row-desc { font-size: 12px; color: var(--text-secondary); }
.set-toggle-wrap { display: flex; align-items: center; gap: 8px; }
.set-toggle-val { font-size: 13px; color: var(--text-secondary); }
.set-toggle {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--border); position: relative; transition: background 0.2s;
}
.set-toggle-on { background: var(--accent); }
.set-toggle-knob {
  width: 20px; height: 20px; border-radius: 50%; background: white;
  position: absolute; top: 2px; left: 2px; transition: transform 0.2s;
}
.set-toggle-on .set-toggle-knob { transform: translateX(20px); }
.set-pills { display: flex; gap: 4px; }
.set-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s;
}
.set-btn:hover { border-color: var(--accent); color: var(--accent); }
.set-about {
  background: var(--bg-card); border-radius: 12px; padding: 12px 16px;
}
.set-about-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  font-size: 13px; border-bottom: 1px solid var(--border);
}
.set-about-row:last-child { border-bottom: none; }
.set-about-row span:first-child { color: var(--text-secondary); }
.set-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--profit);
  display: inline-block;
}
.set-disclaimer {
  font-size: 11px; color: var(--text-secondary); margin-top: 12px;
  line-height: 1.5; text-align: center;
}

/* === Copy Trading (ct-*) === */
.ct-page { max-width: 800px; margin: 0 auto; padding: 16px; }
.ct-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.ct-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.ct-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ct-sort { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.ct-sort-label { font-size: 12px; color: var(--text-secondary); }
.pill-xs { font-size: 11px !important; padding: 3px 10px !important; }
.ct-grid { display: flex; flex-direction: column; gap: 10px; }
.ct-card {
  background: var(--bg-card); border-radius: 14px; padding: 14px 16px;
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.ct-card:hover { border-color: var(--text-secondary); }
.ct-card-following { border-color: var(--accent); }
.ct-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ct-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: white; flex-shrink: 0;
}
.ct-name-wrap { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ct-label { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-addr { font-size: 11px; color: var(--text-secondary); font-family: monospace; }
.ct-follow-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: transparent; color: var(--accent); border: 1.5px solid var(--accent);
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.ct-follow-btn:hover { background: var(--accent); color: white; }
.ct-follow-btn-active {
  background: var(--accent); color: white;
}
.ct-follow-btn-active:hover { opacity: 0.85; }
.ct-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  cursor: pointer; padding: 10px 0; border-top: 1px solid var(--border);
}
.ct-stat { text-align: center; }
.ct-stat-val { font-size: 15px; font-weight: 700; display: block; }
.ct-stat-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.ct-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.ct-cat {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: rgba(99, 102, 241, 0.15); color: var(--accent);
}
.ct-last { font-size: 11px; color: var(--text-secondary); }
.ct-loading { display: flex; flex-direction: column; gap: 10px; }
.ct-skeleton { opacity: 0.5; }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--border); }

@media (max-width: 480px) {
  .ct-stats { grid-template-columns: repeat(2, 1fr); }
}

/* === Edge Scanner (es-*) === */
.es-wrap { margin-top: 4px; }

.es-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}

.es-filter-group { display: flex; gap: 4px; }

.es-select {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-primary); font-size: 12px; padding: 5px 8px; font-family: inherit;
  cursor: pointer;
}

.es-disclaimer {
  font-size: 10px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.4;
  padding: 6px 10px; background: var(--bg-card); border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.es-loading { display: flex; flex-direction: column; gap: 6px; }

.es-list { display: flex; flex-direction: column; gap: 6px; }

.es-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; transition: border-color 0.15s;
}
.es-card:hover { border-color: var(--border-light); }
.es-card-expanded { border-color: var(--accent); }

.es-card-main {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; cursor: pointer; gap: 10px;
}

.es-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }

.es-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

.es-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.es-question {
  font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.es-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.es-cat { font-size: 10px; color: var(--text-muted); font-weight: 500; }

.es-sig {
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase;
}
.es-sig-yes { color: var(--profit); background: var(--profit-bg); }
.es-sig-no { color: var(--loss); background: var(--loss-bg); }

.es-conf {
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px;
}
.es-conf-high { color: var(--profit); background: var(--profit-bg); }
.es-conf-med { color: #eab308; background: rgba(234,179,8,0.1); }
.es-conf-low { color: var(--text-muted); background: var(--hover-overlay); }

.es-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }

.es-edge { font-size: 18px; font-weight: 800; color: var(--accent); }

.es-price { font-size: 12px; font-weight: 600; }

/* Expanded detail */
.es-detail {
  padding: 0 12px 12px; border-top: 1px solid var(--border);
  padding-top: 10px;
}

.es-factors { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }

.es-factor { display: flex; align-items: center; gap: 8px; }

.es-factor-label { font-size: 11px; color: var(--text-muted); width: 65px; flex-shrink: 0; }

.es-factor-track {
  flex: 1; height: 6px; background: var(--hover-overlay); border-radius: 3px; overflow: hidden;
}

.es-factor-fill {
  height: 100%; background: var(--accent); border-radius: 3px;
  transition: width 0.3s;
}

.es-factor-val { font-size: 10px; font-weight: 700; color: var(--text-secondary); width: 30px; text-align: right; }

.es-detail-stats {
  display: flex; gap: 16px; font-size: 11px; color: var(--text-muted); margin-bottom: 10px;
}

.es-view-btn {
  width: 100%; padding: 8px; background: var(--accent); color: white; border: none;
  border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.15s;
}
.es-view-btn:hover { background: var(--accent-hover); }

.es-skeleton { pointer-events: none; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }

/* === Лидеры (copy-trading leaderboard) === */
.lead-page { padding: 12px 12px 90px; max-width: 720px; margin: 0 auto; }
.lead-header { margin: 6px 2px 14px; }
.lead-title { font-size: 22px; font-weight: 700; margin: 0; }
.lead-sub { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.lead-sortbar { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lead-sortbar::-webkit-scrollbar { display: none; }
.lead-sort {
  flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border);
  cursor: pointer; transition: all .15s;
}
.lead-sort.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lead-filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lead-filter-toggle {
  padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); cursor: pointer;
}
.lead-filter-toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lead-found { font-size: 13px; color: var(--text-muted); }
.lead-filter-reset {
  margin-left: auto; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: transparent; color: var(--accent); border: 1px solid var(--border); cursor: pointer;
}
.lead-filter-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 14px;
}
.lead-filter-row { display: flex; flex-direction: column; gap: 6px; }
.lead-filter-top { display: flex; justify-content: space-between; align-items: baseline; }
.lead-filter-label { font-size: 13px; font-weight: 600; color: var(--text); }
.lead-filter-val { font-size: 13px; font-weight: 700; color: var(--accent); }
.lead-filter-ctl { display: flex; align-items: center; gap: 8px; }
.lead-filter-ctl input[type="range"] { accent-color: var(--accent); }
.lead-filter-num {
  width: 56px; padding: 5px 6px; border-radius: 8px; font-size: 13px;
  background: var(--bg-primary); color: var(--text); border: 1px solid var(--border);
}
.lead-filter-quality {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--text); cursor: pointer; align-self: center;
}
.lead-filter-quality input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.lead-list { display: flex; flex-direction: column; gap: 10px; }
.lead-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; transition: border-color .15s, transform .05s;
}
.lead-card:hover { border-color: var(--accent); }
.lead-card:active { transform: scale(.995); }
.lead-row-head { display: flex; align-items: center; gap: 10px; }
.lead-rank { font-size: 13px; font-weight: 700; color: var(--text-muted); min-width: 28px; }
.lead-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 18px; background: var(--bg-elev, rgba(127,127,127,.12));
}
.lead-id { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lead-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-trust { font-size: 11px; color: var(--text-muted); }
.lead-sub2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.lead-cat { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--hover-overlay-strong); padding: 2px 7px; border-radius: 6px; }
.lead-online { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.lead-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--hover-overlay); }
.lead-spark { width: 48px; height: 22px; flex: 0 0 auto; margin-left: 8px; opacity: .9; }
.lead-edge { font-size: 9px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; color: var(--accent); background: var(--hover-overlay-strong); padding: 1px 6px; border-radius: 5px; vertical-align: middle; white-space: nowrap; }
.lead-wrwrap { display: flex; flex-direction: column; align-items: flex-end; }
.lead-wr { font-size: 17px; font-weight: 700; }
.lead-wr-good { color: #16a34a; }
.lead-wr-bad { color: #dc2626; }
.lead-wr-cap { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.lead-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin: 12px 0 10px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.lead-stat { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.lead-stat b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lead-stat span { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lead-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lead-foot-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1 1 auto; min-width: 0; }
.lead-active { font-size: 12px; color: var(--text-muted); }
.lead-bt { flex: 0 0 auto; }
.lead-copy { flex: 0 0 auto; }
.lead-copy {
  padding: 8px 18px; border-radius: 10px; font-size: 14px; font-weight: 700;
  background: var(--accent); color: #fff; border: none; cursor: pointer; transition: background .15s;
}
.lead-copy:hover { background: var(--accent-hover); }
.more-foot { margin-top: 22px; text-align: center; }
.more-nc { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--hover-overlay-strong); border: 1px solid var(--accent); padding: 6px 13px; border-radius: 20px; }
.more-ver { display: block; margin-top: 8px; font-size: 10.5px; color: var(--text-muted); }

/* === Профиль лидера: equity sparkline + sticky CTA === */
.wp-equity { display: flex; flex-direction: column; gap: 6px; }
.wp-equity-svg { width: 100%; height: 140px; display: block; }
.wp-equity-meta { display: flex; align-items: baseline; gap: 8px; }
.wp-equity-val { font-size: 16px; font-weight: 700; }
.wp-equity-cap { font-size: 11px; color: var(--text-muted); }
.wpp-page { position: relative; padding-bottom: calc(var(--nav-height) + 44px + env(safe-area-inset-bottom, 0px)); }
.wpp-cta-bar {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 20;
  padding: 12px; margin-top: 12px;
  background: linear-gradient(to top, var(--bg-primary) 70%, transparent);
}
.wpp-cta {
  width: 100%; max-width: 720px; margin: 0 auto; display: block;
  padding: 14px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #fff; background: var(--accent);
  transition: background .15s;
}
.wpp-cta:hover { background: var(--accent-hover); }
.wpp-cta-owner { background: var(--bg-card); color: var(--text-muted); cursor: not-allowed; border: 1px solid var(--border); }

/* === Мои копии === */
.mc-page { padding: 12px 12px 90px; max-width: 720px; margin: 0 auto; }
.mc-header { margin: 6px 2px 12px; }
.mc-title { font-size: 22px; font-weight: 700; margin: 0; }
.mc-sub { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.mc-demo {
  font-size: 12px; line-height: 1.4; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px;
  background: rgba(234, 179, 8, .12); color: #a16207; border: 1px solid rgba(234, 179, 8, .3);
}
.mc-list { display: flex; flex-direction: column; gap: 10px; }
.mc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.mc-paused { opacity: .6; }
.mc-card-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mc-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 17px; background: var(--bg-elev, rgba(127,127,127,.12));
}
.mc-id { display: flex; flex-direction: column; min-width: 0; }
.mc-name { font-size: 15px; font-weight: 700; }
.mc-status { font-size: 12px; }
.mc-status.active { color: #16a34a; }
.mc-status.paused { color: var(--text-muted); }
.mc-alloc { font-size: 13px; color: var(--text-secondary, var(--text-muted)); margin: 10px 0 8px; }
.mc-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mc-flag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: var(--bg-elev, rgba(127,127,127,.1)); color: var(--text-muted);
}
.mc-actions { display: flex; gap: 8px; }
.mc-btn {
  flex: 1; padding: 8px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--bg-elev, rgba(127,127,127,.1)); color: var(--text-primary); border: 1px solid var(--border);
}
.mc-btn-stop { color: #dc2626; }
.mc-add {
  margin-top: 16px; padding: 12px 20px; border-radius: 11px; font-size: 15px; font-weight: 700;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
}
.mc-add-inline { width: 100%; }

/* === Copy config modal === */
.ccm-overlay {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.5); padding: 0;
}
.ccm-modal {
  width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-secondary); border-radius: 18px 18px 0 0; border: 1px solid var(--border);
}
@media (min-width: 600px) { .ccm-overlay { align-items: center; } .ccm-modal { border-radius: 18px; } }
.ccm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg-secondary); }
.ccm-title { font-size: 15px; font-weight: 700; }
.ccm-x { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.ccm-body { padding: 16px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; flex: 1; min-height: 0; }
.ccm-field { display: flex; flex-direction: column; gap: 8px; }
.ccm-field-row { flex-direction: row; align-items: center; justify-content: space-between; }
.ccm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ccm-label { font-size: 13px; font-weight: 600; }
.ccm-muted { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.ccm-hint { font-size: 12px; color: var(--text-muted); margin: 0; }
.ccm-seg { display: flex; gap: 6px; }
.ccm-seg-btn {
  flex: 1; padding: 8px; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border);
}
.ccm-seg-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ccm-inline { display: flex; align-items: center; gap: 8px; }
.ccm-input {
  flex: 1; padding: 9px 10px; border-radius: 9px; font-size: 14px;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border);
}
.ccm-input-sm { flex: 0 0 70px; }
.ccm-unit { font-size: 13px; color: var(--text-muted); }
.ccm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ccm-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border);
}
.ccm-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ccm-switch {
  width: 44px; height: 26px; border-radius: 999px; border: none; cursor: pointer; padding: 3px;
  background: var(--border); transition: background .15s; display: flex;
}
.ccm-switch.on { background: var(--accent); }
.ccm-switch-dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ccm-switch.on .ccm-switch-dot { transform: translateX(18px); }
.ccm-foot { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--bg-secondary); }
.ccm-cancel {
  flex: 0 0 auto; padding: 12px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border);
}
.ccm-save {
  flex: 1; padding: 12px; border-radius: 11px; font-size: 15px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
}
.ccm-save:disabled {
  opacity: .45; cursor: not-allowed; filter: grayscale(.4);
}

/* === Custody card (Портфель) === */
.cust-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; margin-bottom: 14px;
}
.cust-head { display: flex; align-items: center; justify-content: space-between; }
.cust-title { font-size: 15px; font-weight: 700; }
.cust-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(234, 179, 8, .15); color: #a16207;
}
.cust-balance { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.cust-bal-val { font-size: 28px; font-weight: 800; }
.cust-bal-cap { font-size: 12px; color: var(--text-muted); }
.cust-status { margin-bottom: 12px; }
.cust-status-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.cust-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cust-dot-off { background: var(--text-muted); }
.cust-dot-on { background: #16a34a; }
.cust-status-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; padding-left: 17px; }
.cust-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.cust-btn {
  flex: 1; padding: 11px; border-radius: 10px; font-size: 14px; font-weight: 700;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
}
.cust-btn:disabled { background: var(--bg-elev, rgba(127,127,127,.12)); color: var(--text-muted); cursor: not-allowed; }
.cust-note { font-size: 12px; line-height: 1.45; color: var(--text-muted); margin: 0; }

/* === Account (SIWE auth) === */
.acct-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.acct-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.acct-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.acct-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.acct-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.acct-dot-on { background: #16a34a; }
.acct-addr { font-size: 14px; font-weight: 600; }
.acct-btn { width: 100%; padding: 11px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--accent); color: #fff; border: none; }
.acct-btn:disabled { opacity: .6; cursor: default; }
.acct-btn-ghost { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.acct-err { font-size: 12px; color: #dc2626; margin-top: 8px; }

/* Manual close — button on position cards + confirm modal */
.pos-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.pos-close-btn {
  padding: 7px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border); transition: all .15s;
}
.pos-close-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pos-close-btn:disabled { opacity: .55; cursor: default; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.modal-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--text); }
.modal-market { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); }
.modal-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--text); }
.modal-warn { margin: 12px 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.page-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.close-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 1001;
  background: #ef4444; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px;
  font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Flow → Consensus: filters, entry→now delta, freshness (Chunk 2) */
.flow-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 14px; }
.flow-filter-group { display: flex; gap: 6px; }
.flow-delta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.flow-delta-track { font-size: 12px; color: var(--text-secondary); }
.flow-delta-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.flow-delta-bad { color: var(--loss); background: color-mix(in srgb, var(--loss) 15%, transparent); }
.flow-delta-good { color: var(--profit); background: color-mix(in srgb, var(--profit) 15%, transparent); }
.flow-delta-neutral { color: var(--text-secondary); background: color-mix(in srgb, var(--text-secondary) 12%, transparent); }
.flow-fresh-new { color: var(--profit); font-weight: 600; }

/* Flow → "Войти" green button + trade modal (Chunk 3) */
.flow-enter-btn { width: 100%; margin-top: 10px; padding: 10px; border: none; border-radius: 10px;
  background: var(--profit); color: #04140a; font-size: 14px; font-weight: 700; cursor: pointer; }
.flow-enter-btn:active { transform: translateY(1px); }
.flow-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.flow-modal { width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
  background: var(--surface, #16181d); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.flow-modal-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.flow-modal-q { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary, #fff); }
.flow-modal-close { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; line-height: 1; }
.flow-modal-body { padding: 24px 8px; text-align: center; color: var(--text-secondary); font-size: 14px; }

/* Flow → custody buy form (Chunk 3) */
.flow-buy { display: flex; flex-direction: column; gap: 10px; }
.flow-buy-side { display: flex; align-items: center; justify-content: space-between; }
.flow-buy-price { font-size: 15px; font-weight: 700; color: var(--text-primary, #fff); }
.flow-buy-est { font-size: 12px; color: var(--text-secondary); }

📜 Git History

cecbd3afeat(poli): Flow «Войти» custody modal (chunk 3) — manual buy from deposit, no wallet sign4 days ago
eb6fff8feat(poli): Flow chunk 3 — green «Войти» button + trade modal4 days ago
f5cc0aefeat(poli): Flow consensus chunk 2 — entry→now delta, freshness, sort, filters4 days ago
895104ffeat(poli): skull avatar+tag for fade copies, fix profile bottom padding under nav10 days ago
e6f3baafeat(leaders): equity sparkline on card (last-16 resolved-BUY cumulative)12 days ago
5631672feat(leaders): EDGE composite score (client-side) — badge + main sort12 days ago
b141bdefeat(more+leaders): localize MorePage + non-custodial badge; fix Leaders 3-col stat grid12 days ago
bfc6c99feat(whale-profile): add P&L + derived Max Drawdown stats + Copy-honesty trust block12 days ago
9801e59feat(leaders): chunk2 — restyle card to approved design on real data12 days ago
dc6c37efeat(theme): add Sunset/Amber + Crimson accent themes (6 total)12 days ago
Show last diff
Loading...