html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b3139; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #474d57; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

.page-trade html, .page-trade body { height: 100%; overflow: hidden; }
@media (max-width: 1023px) {
  .page-trade html, .page-trade body { height: auto; overflow: auto; }
}

button { cursor: pointer; }
input, td, th { font-variant-numeric: tabular-nums; }

a { text-decoration: none; }

/* Tables */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tbl thead th {
  text-align: left;
  font-weight: 400;
  color: #848e9c;
  font-size: 11px;
  padding: 10px 12px;
  border-bottom: 1px solid #2b3139;
  background: #181a20;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.tbl tbody td {
  padding: 12px;
  border-bottom: 1px solid #1e2329;
  white-space: nowrap;
}
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #1e2329; }
.tbl .num { text-align: right; }

/* Orderbook rows */
.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 1px 12px;
  position: relative;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.ob-row:hover { background: rgba(255,255,255,0.04); }
.ob-row > span:nth-child(2),
.ob-row > span:nth-child(3) { text-align: right; }
.ob-row .bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  z-index: 0;
  opacity: 0.15;
}
.ob-row > span { position: relative; z-index: 1; }
.ob-row.ask .bg { background: #f6465d; }
.ob-row.bid .bg { background: #0ecb81; }

/* Recent trades */
.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 2px 12px;
  font-variant-numeric: tabular-nums;
}
.trade-row > span:nth-child(2),
.trade-row > span:nth-child(3) { text-align: right; }

/* Pair list */
.pair-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  padding: 6px 12px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.pair-row:hover, .pair-row.active { background: #1e2329; }
.pair-row > span:nth-child(2),
.pair-row > span:nth-child(3) { text-align: right; }

.tag-long { background: rgba(14,203,129,0.12); color: #0ecb81; padding: 2px 6px; border-radius: 2px; font-size: 11px; font-weight: 500; }
.tag-short { background: rgba(246,70,93,0.12); color: #f6465d; padding: 2px 6px; border-radius: 2px; font-size: 11px; font-weight: 500; }

/* Marquee ticker */
.marquee {
  display: flex;
  width: max-content;
  animation: scroll-x 80s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Cards */
.card {
  background: #181a20;
  border: 1px solid #2b3139;
  border-radius: 8px;
  padding: 20px;
}

/* Toast */
#toast { z-index: 60; }
.toast-show { transform: translateY(0) !important; opacity: 1 !important; }

/* Mobile drawer */
#mobileDrawer.open #mobileDrawerInner { transform: translateX(0); }

/* Hero gradient */
.hero-grad {
  background:
    radial-gradient(circle at 20% 30%, rgba(240,185,11,0.10), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(14,203,129,0.08), transparent 50%);
}

@media (max-width: 640px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="search"] { font-size: 14px; }
}
