:root {
  --bg: #060608;
  --panel: #0d0d10;
  --panel-soft: #0b0b0d;
  --line: #14141a;
  --line-strong: #1f1f27;
  --text: #ffffff;
  --muted: #8a8a94;
  --green: #00c076;
  --red: #ff5b57;
  --amber: #f5a623;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
}

button,
input,
a {
  font: inherit;
}

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

.hidden {
  display: none !important;
}

body {
  padding: 0;
}

body.app-loading {
  overflow: hidden;
}

body.app-loading .app {
  opacity: 0;
  pointer-events: none;
}

.app {
  max-width: 1188px;
  margin: 0 auto;
  padding: 18px 24px 36px;
  transition: opacity 180ms ease;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(64, 138, 255, 0.08), transparent 34%),
    radial-gradient(circle at bottom, rgba(241, 152, 0, 0.08), transparent 28%),
    rgba(6, 6, 8, 0.98);
  transition: opacity 180ms ease, visibility 180ms ease;
}

body:not(.app-loading) .boot-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-loader-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(11, 11, 13, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.boot-loader-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.boot-loader-brand span {
  color: var(--green);
}

.boot-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--green);
  animation: boot-spin 0.9s linear infinite;
}

.boot-loader-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand span {
  color: var(--green);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(0, 192, 118, 0.7);
}

.dot-live.wait {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 166, 35, 0.7);
}

.top-action,
.wallet {
  background: var(--panel-soft);
  border: 1px solid #1a1a1f;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.top-action {
  cursor: pointer;
}

.top-action.secondary {
  background: #11131a;
}

.wallet {
  font-variant-numeric: tabular-nums;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  gap: 63px;
  align-items: start;
}

.hero-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.hero-icon,
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--red) 100%);
  box-shadow: 0 2px 18px rgba(0, 192, 118, 0.22);
  font-weight: 900;
}

.hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.hero-body {
  flex: 1;
  min-width: 0;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.hero-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-timer.warning {
  color: var(--amber);
}

.hero-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #6a6a74;
  font-weight: 500;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
}

.live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.spread-hero {
  padding: 14px 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.spread-label {
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spread-value {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.spread-value.a {
  color: var(--green);
}

.spread-value.b {
  color: var(--red);
}

.spread-value.tie {
  color: #6a6a74;
  font-size: 40px;
  letter-spacing: -0.04em;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 18px;
}

.mini-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.mm-ticker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mm-ticker.eth {
  color: var(--green);
}

.mm-ticker.sol {
  color: var(--red);
}

.mm-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mm-price {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mm-perf {
  font-size: 14px;
  font-weight: 700;
}

.mm-perf.eth {
  color: var(--green);
}

.mm-perf.sol {
  color: var(--red);
}

.chart-box,
.strip,
.card,
.open-pos {
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.chart-box {
  position: relative;
  height: 310px;
  padding: 16px 14px 14px;
  margin-bottom: 14px;
  border-radius: 16px;
}

.chart-legend {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  gap: 18px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.lg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfcfd6;
}

.lg-dash {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.dash-a {
  background: var(--green);
}

.dash-b {
  background: var(--red);
}

.chart-end-labels {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 2;
}

.end-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

#spreadArea {
  mix-blend-mode: screen;
}

.strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 16px;
}

.past {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 16px;
  border-right: 1px solid #1a1a1f;
}

.past-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.past-circles,
.rounds-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.past-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #001c10;
  background: var(--green);
}

.past-circle.resolution {
  width: 28px;
  height: 28px;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.market-pill {
  border: 0;
  background: transparent;
  color: #cfcfd6;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.market-pill.active {
  background: #fff;
  color: #000;
}

.market-pill.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.market-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5b57;
  box-shadow: 0 0 0 3px rgba(255, 91, 87, 0.12);
}

.market-pill.more {
  color: var(--muted);
}

.right-col {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
}

.card {
  border-radius: 18px;
  padding: 18px;
}

.legacy-ticket-head {
  display: none;
}

.card-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.card-title {
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
}

.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bs-tabs {
  display: flex;
  gap: 18px;
}

.bs-tab,
.ut-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bs-tab {
  position: relative;
  padding-bottom: 5px;
  font-size: 13px;
  color: #6a6a74;
  font-weight: 700;
}

.bs-tab.active {
  color: #fff;
}

.bs-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: #fff;
}

.unit-toggle {
  display: flex;
  padding: 3px;
  background: #14141a;
  border-radius: 999px;
}

.ut-btn {
  min-width: 34px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #6a6a74;
  font-size: 11px;
  font-weight: 700;
}

.ut-btn.active {
  background: #fff;
  color: #000;
}

.tabs-underline {
  height: 1px;
  margin-bottom: 18px;
  background: var(--line);
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.side-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.side-pill {
  border: 0;
  border-radius: 12px;
  background: #14141a;
  padding: 13px 12px;
  text-align: center;
  cursor: pointer;
  transition: background 120ms ease;
  color: #fff;
}

.side-pill:hover {
  background: #18181e;
}

.side-pill.picked .pill-ticker,
.side-pill.picked .pill-odds {
  color: #000;
}

.pill-ticker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pill-odds {
  display: inline-block;
  margin-left: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.amount-label {
  font-size: 13px;
  font-weight: 700;
}

.amount-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.amount-display.zero {
  color: #4a4a54;
}

.amount-display input {
  width: 100px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
}

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

.chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.chip {
  padding: 9px 6px;
  border: 0;
  border-radius: 10px;
  background: #14141a;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.towin-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
}

.towin-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.towin-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.towin-value.red {
  color: var(--red);
}

.towin-value.zero {
  color: #4a4a54;
}

.ticket-meta {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.ticket-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-meta-row span:last-child {
  color: #f3f4fa;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cta {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #000;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.cta.sell {
  background: var(--red);
}

.cta.disabled {
  background: #1a1a22;
  color: #5a5a64;
  cursor: not-allowed;
}

.market-jump {
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 20, 26, 0.92);
  color: #f3f4fa;
  cursor: pointer;
  text-align: left;
}

.market-jump-head {
  margin-bottom: 0;
  padding: 12px 0;
  border-bottom: 0;
}

.market-jump:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.open-pos {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.92);
}

.open-pos-row-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.open-pos-row-strip.hidden {
  display: none;
}

.open-pos-title {
  margin-bottom: 8px;
  font-size: 10px;
  color: #6a6a74;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.open-pos-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.open-pos-row span {
  color: var(--muted);
}

.open-pos-row b {
  color: #fff;
}

.open-pos-row b.pos {
  color: var(--green);
}

.open-pos-row b.neg {
  color: var(--red);
}

.open-pos-card + .open-pos-card {
  margin-top: 12px;
}

.open-pos-row-strip .open-pos-card + .open-pos-card {
  margin-top: 0;
}

.open-pos-row-strip .open-pos-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 11, 13, 0.92);
}

.rules-shell {
  margin-top: 14px;
}

.rules-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.rules-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: #7d8496;
  padding: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
}

.rules-tab.active {
  color: #ffffff;
}

.rules-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.rules-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(11, 11, 13, 0.92);
  padding: 18px 20px;
}

.rules-body {
  display: grid;
  gap: 14px;
  color: #d4d7e4;
  font-size: 13px;
  line-height: 1.65;
}

.rules-body p {
  color: inherit;
}

.rules-formula {
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #121218;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.holding-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.holding-asset {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.holding-side {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.holding-product b.pos {
  color: var(--green);
}

.holding-product b.neg {
  color: var(--red);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 3, 5, 0.8);
  z-index: 30;
}

.modal.hidden,
.toast.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-label {
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-close {
  border: 1px solid #1a1a1f;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

.treasury-box,
.inline-form,
.inline-form label {
  display: grid;
  gap: 10px;
}

.modal-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.treasury-box {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--muted);
}

.treasury-box code {
  color: #fff;
  word-break: break-all;
}

.inline-form label span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.inline-form input,
.inline-form button {
  padding: 14px 16px;
  border-radius: 12px;
}

.inline-form input {
  border: 1px solid var(--line-strong);
  background: #121218;
  color: #fff;
}

.inline-form button {
  border: 0;
  background: var(--green);
  color: #000;
  cursor: pointer;
  font-weight: 700;
}

.modal-max {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: #121218;
  color: #fff;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 240px;
  padding: 12px 16px;
  border: 1px solid #1c1c22;
  border-radius: 10px;
  background: #0e0e12;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  z-index: 40;
}

.board-app {
  min-height: 100vh;
  max-width: 950px;
}

.board-shell {
  display: grid;
  gap: 20px;
  padding: 22px 0 36px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.board-kicker {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.board-head h1 {
  margin: 8px 0 0;
  font-size: 27px;
  line-height: 1.05;
}

.board-meta {
  color: var(--muted);
  font-size: 12px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.book-card-live {
  background: rgba(16, 17, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 14px 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.book-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.book-market-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.book-card-head h2 {
  margin: 0;
  font-size: 19px;
}

.book-quote-meta {
  display: grid;
  gap: 4px;
  text-align: right;
  color: #d6d7e2;
  font-size: 11px;
}

.board-ladder {
  background: rgba(10, 11, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px;
}

.board-table-head,
.board-row,
.board-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.board-table-head {
  color: #7681a5;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 6px 10px;
}

.board-row,
.board-summary {
  padding: 8px 6px;
  font-size: 12px;
}

.board-table-head span:nth-child(2),
.board-table-head span:nth-child(3),
.board-row span:nth-child(2),
.board-row span:nth-child(3),
.board-summary span:last-child {
  text-align: right;
}

.board-row.ask {
  color: #ff7f7c;
  background: linear-gradient(90deg, rgba(255, 91, 87, 0.08), rgba(255, 91, 87, 0));
  border-radius: 12px;
}

.board-row.bid {
  color: #57d488;
  background: linear-gradient(90deg, rgba(0, 192, 118, 0.08), rgba(0, 192, 118, 0));
  border-radius: 12px;
}

.board-row span:nth-child(2),
.board-row span:nth-child(3) {
  color: #f3f4fa;
}

.board-section {
  display: grid;
  gap: 6px;
}

.board-section-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 4px 0;
}

.board-section-label.ask {
  background: rgba(255, 91, 87, 0.16);
  color: #ff8e8a;
}

.board-section-label.bid {
  background: rgba(0, 192, 118, 0.16);
  color: #66d99a;
}

.board-summary {
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}

.board-empty {
  padding: 12px 6px;
  color: #71758c;
  font-size: 11px;
}

.history-app {
  min-height: 100vh;
}

.history-shell {
  display: grid;
  gap: 18px;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 18px;
}

.internal-shell {
  display: block;
}

.internal-app {
  max-width: 1400px;
}

.internal-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
}

.internal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.internal-table th,
.internal-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.internal-table th {
  position: sticky;
  top: 0;
  background: #101116;
  color: #d9dbe3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.internal-table td:nth-child(2),
.internal-table td:nth-child(5),
.internal-table td:nth-child(6),
.internal-table td:nth-child(7) {
  white-space: nowrap;
}

.internal-table td:nth-child(6),
.internal-table td:nth-child(7) {
  text-align: right;
}

.internal-table th:nth-child(6),
.internal-table th:nth-child(7) {
  text-align: right;
}

.history-card,
.history-table-shell,
.history-empty {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.history-card {
  padding: 20px;
}

.history-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.history-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.history-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 45%), linear-gradient(135deg, rgba(64,138,255,0.95), rgba(241,152,0,0.82));
}

.history-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.history-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.history-stat {
  padding-top: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.history-stat:last-child {
  border-right: 0;
}

.history-stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.history-stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: #7c8798;
  font-weight: 600;
}

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

.history-kicker {
  font-size: 11px;
  color: #7c8798;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-pnl-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

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

.history-pnl-value.neg {
  color: var(--red);
}

.history-chart-period {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.history-chart-svg {
  width: 100%;
  height: 170px;
  display: block;
}

.history-table-shell {
  padding: 16px 18px 8px;
}

.history-table-head,
.history-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.4fr) 90px 110px 120px 90px;
  gap: 16px;
  align-items: center;
}

.history-table-head {
  padding: 6px 12px 12px;
  font-size: 11px;
  color: #7c8798;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-row {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
  font-weight: 600;
}

.history-type {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-type.buy {
  background: rgba(255,255,255,0.06);
  color: #d2d6df;
}

.history-type.sell {
  background: rgba(64,138,255,0.16);
  color: #93baff;
}

.history-type.won {
  background: rgba(0,192,118,0.16);
  color: #77f0b5;
}

.history-type.lost {
  background: rgba(255,91,87,0.14);
  color: #ff8e8b;
}

.history-type.deposit {
  background: rgba(0,192,118,0.14);
  color: #77f0b5;
}

.history-type.withdrawal {
  background: rgba(241,152,0,0.16);
  color: #ffca6b;
}

.history-market {
  min-width: 0;
}

.history-market-title {
  font-size: 14px;
  color: #fff;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  word-break: break-word;
}

.history-market-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  word-break: break-all;
}

.history-asset,
.history-shares,
.history-amount,
.history-when {
  font-variant-numeric: tabular-nums;
}

.history-asset {
  font-weight: 700;
}

.history-amount {
  justify-self: end;
  font-weight: 700;
}

.history-amount.pos {
  color: var(--green);
}

.history-amount.neg {
  color: var(--red);
}

.history-when {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.history-empty {
  padding: 34px 24px;
  text-align: center;
}

.history-empty h1 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.history-empty p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.history-empty button {
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .right-col {
    position: static;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .history-grid {
    grid-template-columns: 1fr;
  }

  .history-table-head,
  .history-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-amount,
  .history-when {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 18px 16px 40px;
  }

  .topbar,
  .hero-top-row,
  .amount-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-right {
    justify-content: flex-start;
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }

  .spread-value {
    font-size: 40px;
  }

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