/* ============================================================
   Markets — Binance-style watchlist, scoped under .mk
   ============================================================ */
.mk {
  --mk-card: #14171C;
  --mk-line: #21262E;
  --mk-muted: #848E9C;
  --mk-white: #EAECEF;
  --mk-gold: #F0B90B;
  --mk-green: #0ECB81;
  --mk-red: #F6465D;
}

.mk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 12px;
}
.mk-h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}
.mk-sub {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: var(--mk-muted);
  line-height: 1.35;
}
.mk-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(14, 203, 129, 0.10);
  color: var(--mk-green);
  font-size: 10px;
  font-weight: 600;
}
.mk-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(14, 203, 129, 0.18);
}

/* ---------- Featured tickers ---------- */
.mk-tickers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.mk-tick {
  min-width: 0;
  padding: 9px 8px 8px;
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 10px;
}
.mk-tick-h {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mk-tick-h .crypto-avatar {
  width: 22px;
  height: 22px;
  font-size: 11px;
  flex-shrink: 0;
}
.mk-tick-h .nm {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.mk-tick-h .tp {
  margin-top: 1px;
  font-size: 8px;
  color: var(--mk-muted);
}
.mk-tick-p {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mk-tick-c {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
}
.mk-tick-s {
  margin-top: 6px;
  height: 26px;
}
.mk-tick-s svg { display: block; width: 100%; height: 26px; }

/* ---------- Search ---------- */
.mk-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 10px;
  color: var(--mk-muted);
}
.mk-search svg { width: 14px; height: 14px; flex-shrink: 0; }
.mk-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--mk-white);
  font-size: 12px;
}
.mk-search input::placeholder { color: var(--mk-muted); }
.mk-search:focus-within { border-color: rgba(240, 185, 11, 0.55); }

/* ---------- Filter chips ---------- */
.mk-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 11px 0 10px;
}
.mk-chips::-webkit-scrollbar { display: none; }
.mk .chip {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 14px;
  background: #16191F;
  border: 1px solid var(--mk-line);
  color: var(--mk-muted);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.mk .chip.active {
  background: transparent;
  border-color: var(--mk-gold);
  color: var(--mk-gold);
  font-weight: 600;
}

/* ---------- Table ---------- */
.mk-panel {
  background: var(--mk-card);
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  padding: 4px 10px 6px;
}
.mk-cols,
.mk-row {
  display: grid;
  grid-template-columns: 18px 26px minmax(0, 1.2fr) minmax(0, 0.95fr) 62px;
  align-items: center;
  gap: 6px;
}
.mk-cols {
  padding: 8px 0 6px;
  font-size: 9px;
  color: var(--mk-muted);
  white-space: nowrap;
}
.mk-cols .name { grid-column: 1 / 4; }
.mk-cols .last { grid-column: 4; text-align: right; }
.mk-cols .chg  { grid-column: 5; text-align: right; }
.mk-row .r { text-align: right; }

.mk-row {
  padding: 9px 0;
  border-top: 1px solid var(--mk-line);
  color: inherit;
}
.mk-row .crypto-avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.mk-star {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #3A404A;
  padding: 0;
}
.mk-star svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.mk-star.on { color: var(--mk-gold); }

.mk-row .nm {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.mk-row .vol {
  margin-top: 3px;
  font-size: 9px;
  color: var(--mk-muted);
  white-space: nowrap;
}
.mk-tag {
  font-size: 7.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.3;
}
.mk-tag.fut  { background: rgba(240, 185, 11, 0.14); color: var(--mk-gold); }
.mk-tag.spot { background: rgba(14, 203, 129, 0.14); color: var(--mk-green); }

.mk-last { text-align: right; min-width: 0; }
.mk-last .px {
  font-size: 12px;
  font-weight: 600;
  color: var(--mk-white);
  white-space: nowrap;
}
.mk-spark {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
  height: 18px;
}
.mk-spark svg { display: block; }

.mk-chg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  justify-self: end;
  white-space: nowrap;
}
.mk-chg.text-green { background: rgba(14, 203, 129, 0.14); }
.mk-chg.text-red   { background: rgba(246, 70, 93, 0.14); }

.mk-empty {
  padding: 22px 0;
  text-align: center;
  font-size: 11px;
  color: var(--mk-muted);
}

.mk-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 9.5px;
  color: var(--mk-muted);
}

@media (max-width: 400px) {
  .mk-h1 { font-size: 19px; }
  .mk-tick-p { font-size: 12px; }
  .mk-row .nm { font-size: 11px; }
  .mk-last .px { font-size: 11px; }
  .mk-chg { min-width: 54px; font-size: 10.5px; }
}
