.ks-market-panel {
  display: flex;
  min-width: 0;
  max-width: 920px;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 20px;
}

.ks-market-cards {
  display: none;
  grid-template-columns: minmax(260px, 360px) minmax(420px, 1fr);
  gap: 20px;
}

.ks-pool-card {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}

.ks-pool-card-trending {
  border: 1px solid rgba(68, 218, 172, 0.66);
  background: linear-gradient(180deg, rgba(34, 111, 85, 0.98), rgba(24, 90, 68, 0.98));
}

.ks-pool-card-farming {
  border: 1px solid rgba(98, 116, 255, 0.72);
  background: linear-gradient(180deg, rgba(46, 55, 128, 0.98), rgba(38, 45, 111, 0.98));
}

.ks-pool-title,
.ks-pool-content,
.ks-farm-content,
.ks-farm-pair,
.ks-pair-icons,
.ks-market-pair-tab,
.ks-market-price,
.ks-market-route,
.ks-route-token {
  display: flex;
  align-items: center;
}

.ks-pool-title {
  gap: 9px;
  color: #35d4a4;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ks-pool-card-farming .ks-pool-title {
  color: #f4d071;
}

.ks-pool-icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.ks-pool-icon svg {
  width: 24px;
  height: 24px;
}

.ks-pool-content {
  justify-content: space-between;
  gap: 14px;
}

.ks-pair-icons {
  min-width: 40px;
}

.ks-pair-icons span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

.ks-pair-icons span + span {
  margin-left: -8px;
}

.ks-pool-content strong,
.ks-farm-pair strong {
  color: #f4f7fb;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.ks-pool-content b,
.ks-farm-pair b {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(2, 13, 12, 0.78);
  color: #26e3aa;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.ks-farm-content {
  gap: 20px;
}

.ks-farm-pair {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  gap: 10px;
}

.ks-farm-pair b {
  background: rgba(27, 26, 87, 0.92);
}

.ks-farm-dot {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #20b488;
  color: #13372d;
  font-size: 10px;
}

.ks-market-chart-card {
  overflow: hidden;
  border: 1px solid #363636;
  border-radius: 12px;
  background: #101010;
}

.ks-market-chart-top {
  display: flex;
  min-height: 44px;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding-right: 16px;
  border-bottom: 1px solid #2c2c2c;
}

.ks-market-pair-tab {
  gap: 6px;
  min-width: 140px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid var(--ks-primary, #31cb9e);
  background: rgba(49, 203, 158, 0.14);
  color: var(--ks-primary, #31cb9e);
  font-size: 16px;
  font-weight: 800;
}

.ks-market-pair-tab img,
.ks-route-token img {
  width: 20px;
  height: 20px;
  border-radius: 999px;
}

.ks-market-powered {
  align-self: center;
  color: #c4c8d1;
  font-size: 14px;
  font-style: italic;
  white-space: nowrap;
}

.ks-market-chart-body {
  padding: 20px 16px 14px;
}

.ks-market-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ks-market-price {
  gap: 10px;
}

.ks-market-price strong {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.ks-market-price span {
  color: #22e3aa;
  font-size: 13px;
  font-weight: 900;
}

.ks-market-price span.is-negative {
  color: #ff5a86;
}

.ks-market-price em {
  color: #bbc3cf;
  font-size: 13px;
  font-style: normal;
}

.ks-market-ohlc {
  margin-top: 6px;
  color: #7f8a98;
  font-size: 12px;
  font-weight: 700;
  min-height: 16px;
}

.ks-market-timeframes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 242px;
  overflow: hidden;
  border: 1px solid #4e4e4e;
  border-radius: 999px;
  background: #191919;
}

.ks-market-timeframes button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c6cbd4;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ks-market-timeframes button.is-active {
  background: #3c3c3c;
  color: #fff;
}

.ks-market-chart-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 390px;
  min-height: 360px;
}

.ks-lightweight-chart {
  width: 100%;
  height: 100%;
}

.ks-chart-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 16, 16, 0.72);
  color: #b8c3ce;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.ks-chart-state[hidden] {
  display: none;
}

.ks-chart-state[data-type="error"] {
  color: #ff7d9d;
}

.ks-market-route {
  min-height: 46px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #3c3c3c;
  border-radius: 9px;
  background: #202020;
  color: #b6c0cc;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ks-route-mark {
  width: 28px;
  height: 28px;
  color: #a8aeb8;
}

.ks-route-mark svg {
  width: 28px;
  height: 28px;
}

.ks-market-route strong {
  color: #b8c1cb;
  font-size: 18px;
}

.ks-route-token {
  gap: 6px;
  white-space: nowrap;
}

.ks-route-arrow {
  color: #b4bdc8;
}

.ks-route-chevron {
  margin-left: auto;
  color: #aeb6c1;
}

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

@media (max-width: 760px) {
  .ks-market-panel {
    max-width: 100%;
  }

  .ks-market-chart-top,
  .ks-market-price-row,
  .ks-farm-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .ks-market-powered {
    padding-bottom: 12px;
    padding-left: 16px;
    white-space: normal;
  }

  .ks-market-timeframes {
    width: 100%;
    min-width: 0;
  }

  .ks-market-route {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
}

.ks-orderbook,
.ks-history-panel {
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 12px;
  background: #101010;
}

.ks-order-tabs {
  display: flex;
  border-bottom: 1px solid #303030;
  background: #1b1b1b;
}

.ks-order-tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid #303030;
  background: transparent;
  color: #b8c1cc;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.ks-order-tabs button.is-active {
  border-bottom: 2px solid var(--ks-primary, #31cb9e);
  background: rgba(49, 203, 158, 0.12);
  color: var(--ks-primary, #31cb9e);
}

.ks-order-head,
.ks-order-row,
.ks-history-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.85fr 1.15fr 80px;
  align-items: center;
  gap: 12px;
}

.ks-order-head,
.ks-history-head {
  min-height: 40px;
  padding: 0 18px;
  background: #1b1b1b;
  color: #c0c8d2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ks-order-section {
  padding: 16px 18px 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.ks-order-section.sell {
  color: #ff4f80;
}

.ks-order-section.buy {
  color: var(--ks-primary, #31cb9e);
  border-top: 1px solid rgba(49, 203, 158, 0.25);
}

.ks-order-row {
  min-height: 56px;
  padding: 0 18px;
  color: #fff;
  font-size: 14px;
}

.ks-order-row strong {
  display: block;
  font-weight: 900;
}

.ks-order-row em {
  display: block;
  margin-top: 5px;
  color: #a8b1bd;
  font-size: 12px;
  font-style: normal;
}

.ks-order-row i {
  display: block;
  width: 50px;
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ks-primary, #31cb9e) var(--fill), #5b5b5b var(--fill));
}

.ks-order-row .rate {
  color: #ff3f70;
}

.ks-order-row button {
  min-height: 28px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(49, 203, 158, 0.22);
  color: var(--ks-primary, #31cb9e);
  font-weight: 900;
  cursor: pointer;
}

.ks-order-mid {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #1a1a1a;
  color: #fff;
}

.ks-order-mid strong {
  font-size: 20px;
  font-weight: 900;
}

.ks-order-mid span {
  font-weight: 900;
}

.ks-order-mid button {
  margin-left: auto;
  margin-right: 26px;
  border: 0;
  background: transparent;
  color: var(--ks-primary, #31cb9e);
  font-size: 20px;
  cursor: pointer;
}

.ks-history-panel {
  min-height: 262px;
}

.ks-history-empty {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #c2ccd8;
}

.ks-history-icon {
  width: 72px;
  height: 72px;
  color: rgba(28, 180, 168, 0.7);
}

.ks-history-icon svg {
  width: 72px;
  height: 72px;
}
