/**
 * Tickmill-inspired dark theme (reference: tickmill-cn.com)
 * Primary: #27f980  |  Background: #360613
 */

:root {
  --tm-primary: #27f980;
  --tm-primary-dim: rgba(39, 249, 128, 0.15);
  --tm-bg: #360613;
  --tm-bg-elevated: rgba(80, 20, 35, 0.55);
  --tm-card: rgba(45, 10, 22, 0.85);
  --tm-border: rgba(39, 249, 128, 0.28);
  --tm-text: #f8f6f4;
  --tm-text-muted: rgba(248, 246, 244, 0.62);
  --tm-glow: rgba(39, 249, 128, 0.12);
}

html,
body {
  background-color: var(--tm-bg) !important;
  color: var(--tm-text);
}

.body-cn {
  font-family: "Noto Sans SC", "MicroSoft YaHei", sans-serif;
}

.app-body {
  background: var(--tm-bg);
}

/* —— Full-viewport hero video (tiger) + scrim —— */
.tm-video-page {
  position: relative;
  min-height: 100%;
}

.tm-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.tm-video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: 72% center;
}

.tm-video-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      100deg,
      rgba(54, 6, 19, 0.94) 0%,
      rgba(54, 6, 19, 0.82) 38%,
      rgba(54, 6, 19, 0.35) 72%,
      rgba(54, 6, 19, 0.5) 100%
    ),
    radial-gradient(
      ellipse 85% 75% at 92% 42%,
      rgba(220, 72, 90, 0.35),
      transparent 58%
    ),
    radial-gradient(
      ellipse 60% 50% at 78% 55%,
      rgba(255, 120, 140, 0.12),
      transparent 52%
    );
}

.tm-video-page > *:not(.tm-video-bg):not(.tm-video-scrim) {
  position: relative;
  z-index: 2;
}

.tm-video-page .header {
  background: rgba(54, 6, 19, 0.88) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(39, 249, 128, 0.15);
}

.tm-video-page .main,
.main.tm-video-page {
  background: transparent !important;
}

/* —— Auth hero + trust row (sign in / sign up) —— */
.tm-auth-hero {
  padding: 0.35rem 0 0.5rem;
}

.tm-auth-hero-title {
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 700;
  margin: 0;
}

.tm-auth-line1 {
  color: #fff;
}

.tm-auth-line2 {
  color: var(--tm-primary);
  margin-left: 0.2em;
}

.tm-auth-brand {
  display: block;
  font-size: clamp(1.85rem, 8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1.08;
  margin-top: 0.15rem;
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
}

.tm-auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0.35rem;
  padding: 0.55rem 0.5rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(39, 249, 128, 0.22);
  border-radius: 0.65rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.tm-auth-feature {
  flex: 1 1 calc(50% - 0.45rem);
  min-width: 8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(248, 246, 244, 0.96);
}

.tm-auth-feature-icon {
  color: var(--tm-primary) !important;
  font-size: 1.05rem !important;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.tm-auth-feature-label {
  flex: 1;
  min-width: 0;
}

.tm-auth-features--bottom {
  margin-top: 1rem;
  margin-bottom: env(safe-area-inset-bottom, 0);
}

/* Single-row trust strip (larger, broker-style) */
.tm-auth-features--strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  flex-wrap: unset !important;
  align-items: stretch;
  padding: 0.95rem 0.35rem;
  border-radius: 0.85rem;
}

.tm-auth-features--strip .tm-auth-feature {
  flex: unset !important;
  min-width: 0 !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0.5rem;
  padding: 0.35rem 0.2rem;
  font-size: clamp(0.65rem, 2.8vw, 0.82rem);
  font-weight: 700;
  line-height: 1.25;
  color: rgba(248, 246, 244, 0.98);
  border-right: 1px solid rgba(39, 249, 128, 0.18);
}

.tm-auth-features--strip .tm-auth-feature:last-child {
  border-right: none;
}

.tm-auth-features--strip .tm-auth-feature-icon {
  font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
  margin-top: 0 !important;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(39, 249, 128, 0.35));
}

.tm-auth-features--strip .tm-auth-feature-label {
  flex: unset;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  letter-spacing: 0.01em;
}

@media (min-width: 400px) {
  .tm-auth-features--strip {
    padding: 1.05rem 0.65rem;
  }

  .tm-auth-features--strip .tm-auth-feature {
    gap: 0.55rem;
    padding: 0.4rem 0.35rem;
  }
}

/* —— Trading-terminal auth (sign in / sign up) —— */
.tm-trade-auth .tm-trade-main {
  padding-top: 0.15rem;
}

.tm-trade-auth .tm-trade-hero {
  padding: 0.5rem 0 0.9rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(39, 249, 128, 0.14);
  position: relative;
}

.tm-trade-auth .tm-trade-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tm-primary), transparent);
}

.tm-trade-auth .tm-auth-hero-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tm-trade-auth .tm-auth-brand {
  font-family: "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.tm-trade-card {
  background: rgba(8, 2, 5, 0.58);
  border: 1px solid rgba(39, 249, 128, 0.22);
  border-radius: 1rem;
  padding: 1.1rem 0.95rem 1.2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.tm-trade-card-head {
  margin: 0 0 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tm-trade-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-primary);
  margin-bottom: 0.3rem;
}

.tm-trade-card-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tm-trade-seg {
  display: flex;
  width: 100%;
  padding: 0.2rem;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-bottom: 1.15rem;
}

.tm-trade-seg-btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 0.58rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tm-text-muted);
  background: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tm-trade-seg-btn.active {
  background: var(--tm-primary-dim);
  color: var(--tm-primary);
  box-shadow:
    0 0 0 1px rgba(39, 249, 128, 0.4),
    inset 0 0 12px rgba(39, 249, 128, 0.12);
}

.tm-trade-label {
  display: block;
  font-size: 0.65rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 246, 244, 0.5) !important;
  margin-bottom: 0.38rem;
}

.tm-trade-auth .tm-trade-card .form-group {
  margin-bottom: 1rem;
}

.tm-trade-input {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.65rem !important;
  min-height: 2.85rem;
  font-size: 0.95rem !important;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem !important;
}

.tm-trade-input--dual {
  padding-right: 4.75rem !important;
}

.tm-trade-input--otp {
  padding-right: 5.25rem !important;
}

.tm-trade-input:focus {
  border-color: var(--tm-primary) !important;
  box-shadow: 0 0 0 3px var(--tm-primary-dim) !important;
  background: rgba(0, 0, 0, 0.58) !important;
  color: #fff !important;
}

.tm-trade-auth .tm-trade-card .btn-link .material-icons {
  color: rgba(248, 246, 244, 0.4) !important;
}

.tm-trade-auth .tm-trade-card .btn-link:hover .material-icons,
.tm-trade-auth .tm-trade-card .btn-link:focus .material-icons {
  color: var(--tm-primary) !important;
}

.tm-trade-auth .tm-trade-card .btn.btn-default.btn-block {
  margin-top: 0.35rem;
  padding: 0.88rem 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.tm-trade-auth .tm-trade-footnote {
  font-size: 0.8rem;
  color: var(--tm-text-muted);
}

.tm-trade-auth .tm-trade-tnc-link {
  color: var(--tm-primary) !important;
  font-weight: 700;
  cursor: pointer;
}

.tm-trade-auth .tm-trade-footnote a {
  color: var(--tm-primary) !important;
  font-weight: 700;
}

.tm-trade-auth .form-check-input {
  border-color: rgba(255, 255, 255, 0.28);
  background-color: rgba(0, 0, 0, 0.35);
}

.tm-trade-auth .form-check-input:checked {
  background-color: var(--tm-primary);
  border-color: var(--tm-primary);
}

.tm-trade-auth .form-check-label {
  font-size: 0.8rem;
  color: rgba(248, 246, 244, 0.72);
}

.tm-trade-auth .tm-auth-features {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(39, 249, 128, 0.18);
}

.tm-trade-auth footer.small {
  opacity: 0.8;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em;
}

/* Sign-up stepper (inside trading auth) */
.tm-trade-auth .signup-stepper .step-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tm-trade-auth .step-item {
  text-align: center;
  width: 22%;
  flex: 0 0 22%;
}

.tm-trade-auth .step-circle {
  width: 32px;
  height: 32px;
  line-height: 30px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tm-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-weight: 800;
  margin: 0 auto;
  transition: 0.25s;
}

.tm-trade-auth .step-item.active .step-circle {
  background: var(--tm-primary) !important;
  color: #0a0a0a !important;
  border-color: var(--tm-primary);
  box-shadow: 0 0 18px rgba(39, 249, 128, 0.35);
}

.tm-trade-auth .step-label {
  font-size: 8.5px;
  margin-top: 6px;
  color: var(--tm-text-muted);
  font-weight: 600;
  line-height: 1.2;
  opacity: 1;
}

.tm-trade-auth .step-item.active .step-label {
  color: var(--tm-text);
}

.tm-trade-auth .step-line {
  height: 2px;
  flex: 1;
  min-width: 8px;
  max-width: 28px;
  width: auto;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: 0.25s;
}

.tm-trade-auth .step-line.active {
  background: linear-gradient(90deg, var(--tm-primary), rgba(39, 249, 128, 0.25));
}

.tm-trade-auth .tm-trade-otp-send {
  color: var(--tm-primary) !important;
  font-weight: 700;
  font-size: 0.75rem !important;
}

@media (prefers-reduced-motion: reduce) {
  .tm-video-bg video {
    display: none;
  }
}

/* —— Page shell —— */
.tickmill-dark-page {
  min-height: 100%;
  background: var(--tm-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% 20%, var(--tm-glow) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 80%, rgba(39, 249, 128, 0.06) 0%, transparent 50%);
  color: var(--tm-text);
  padding-bottom: 1.25rem;
}

.tickmill-dark-page .main {
  background: transparent !important;
}

/* Header */
.tickmill-dark-page .header {
  background: rgba(54, 6, 19, 0.92) !important;
  border-bottom: 1px solid var(--tm-border);
  backdrop-filter: blur(8px);
}

.tickmill-dark-page .header h6,
.tickmill-dark-page .header .material-icons {
  color: var(--tm-text) !important;
}

.tickmill-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--tm-text);
}

.tickmill-brand-mark {
  display: inline-flex;
  width: 0;
  height: 0;
  border-left: 7px solid #e53935;
  border-bottom: 5px solid transparent;
  border-top: 5px solid transparent;
  filter: drop-shadow(4px 0 0 var(--tm-primary));
  transform: translateX(2px);
}

/* Hero */
.tickmill-hero {
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
}

.tickmill-hero-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 22rem;
  color: var(--tm-text);
}

@media (min-width: 400px) {
  .tickmill-hero-title {
    font-size: 1.15rem;
    max-width: 28rem;
  }
}

/* Asset grid */
.tickmill-assets {
  padding: 0 0.75rem 1.25rem;
}

.tickmill-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .tickmill-assets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tickmill-asset-card {
  background: var(--tm-card);
  border: 1px solid var(--tm-border);
  border-radius: 1rem;
  padding: 1rem 0.75rem;
  text-align: center;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.tickmill-asset-card .material-icons {
  font-size: 2rem;
  color: var(--tm-text);
  opacity: 0.95;
}

.tickmill-asset-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
  color: var(--tm-text);
}

.tickmill-asset-card p {
  font-size: 0.72rem;
  margin: 0;
  line-height: 1.35;
  color: var(--tm-text-muted);
}

/* Tabs */
.tickmill-tabs.row {
  margin: 0 0.75rem !important;
  background: var(--tm-bg-elevated) !important;
  border: 1px solid var(--tm-border);
  border-radius: 999px;
  overflow: hidden;
  padding: 4px !important;
}

.tickmill-tabs .col-4 {
  padding: 0 2px !important;
}

.tickmill-tabs .icon {
  border-radius: 999px;
  padding: 0.55rem 0.25rem !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  color: var(--tm-text-muted) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  transition: background 0.2s, color 0.2s;
}

.tickmill-dark-page .tickmill-tabs .tab-selected .icon {
  background: var(--tm-primary-dim) !important;
  color: var(--tm-primary) !important;
  border-bottom: none !important;
}

/* Finance list cards */
.tickmill-product-card {
  background: var(--tm-card);
  border: 1px solid var(--tm-border);
  border-radius: 1rem;
  margin: 0.75rem 0.85rem;
  padding: 1rem 0.85rem 1.1rem;
}

.tickmill-product-card .tickmill-label {
  color: var(--tm-text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.tickmill-product-card .tickmill-value {
  color: var(--tm-text);
  font-size: 0.88rem;
  font-weight: 500;
}

.tickmill-product-card strong.d-block {
  color: var(--tm-text) !important;
  font-size: 1rem !important;
}

.tickmill-dark-page .btn-default,
.tickmill-dark-page button.btn-default {
  background: var(--tm-primary) !important;
  color: #0a0a0a !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.65rem 1.25rem !important;
  box-shadow: 0 4px 20px rgba(39, 249, 128, 0.25);
}

/* History / holdings (bigItem) inside dark page */
.tickmill-dark-page .own-stock-page .bigItem .bigItem-top {
  background: var(--tm-card);
  border: 1px solid var(--tm-border);
  border-radius: 1rem 1rem 0 0;
}

.tickmill-dark-page .own-stock-page .bigItem .bigItem-top .bigItem-top-head,
.tickmill-dark-page .own-stock-page .bigItem .bigItem-top .bigItem-top-head .name {
  color: var(--tm-text) !important;
}

.tickmill-dark-page .own-stock-page .bigItem .bigItem-middle {
  background: rgba(39, 249, 128, 0.08);
  border-left: 1px solid var(--tm-border);
  border-right: 1px solid var(--tm-border);
}

.tickmill-dark-page .own-stock-page .bigItem .bigItem-middle .bigItem-middle-item {
  color: var(--tm-text-muted) !important;
  font-size: 0.7rem !important;
}

.tickmill-dark-page .own-stock-page .bigItem .bigItem-foot {
  background: var(--tm-card);
  border: 1px solid var(--tm-border);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
}

.tickmill-dark-page .own-stock-page .bigItem .bigItem-foot .bigItem-foot-item {
  color: var(--tm-text) !important;
  font-size: 0.8rem !important;
}

.tickmill-dark-page .own-stock-page {
  padding: 0 0.35rem 1rem;
}

/* Cookie bar */
.tickmill-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  padding: 0 0.75rem;
  pointer-events: none;
}

.tickmill-cookie-inner {
  pointer-events: auto;
  background: #fff;
  color: #333;
  border-radius: 1rem 1rem 0 0;
  padding: 0.85rem 1rem;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tickmill-cookie-text {
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.4;
  margin: 0;
}

.tickmill-cookie .tickmill-cookie-ok {
  flex-shrink: 0;
  background: #e53935 !important;
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  font-size: 0.8rem;
}

/* Spinner */
.tickmill-dark-page .spinner-border {
  color: var(--tm-primary) !important;
}

/* ===== Trading wallet — Tickmill terminal (views/wallet.html) ===== */
.tm-tickmill-page.main {
  background: transparent !important;
}

.tm-tickmill-page.tm-trade-wallet.main {
  background:
    radial-gradient(ellipse 100% 72% at 100% -8%, rgba(220, 72, 90, 0.16), transparent 55%),
    radial-gradient(ellipse 72% 52% at -8% 108%, rgba(39, 249, 128, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 28%),
    var(--tm-bg) !important;
}

.tm-tickmill-page .header {
  background: rgba(54, 6, 19, 0.94) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(39, 249, 128, 0.18);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.tm-wallet-brandbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(39, 249, 128, 0.14);
  background: rgba(8, 2, 5, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.tm-wallet-brandbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem 0.7rem;
  max-width: 720px;
  margin: 0 auto;
}

.tm-wallet-brandmark {
  display: block;
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #fff;
  line-height: 1.2;
}

.tm-wallet-tagline {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tm-text-muted);
}

.tm-wallet-livepill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: clamp(0.52rem, 2.4vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 246, 244, 0.88);
  background: rgba(39, 249, 128, 0.1);
  border: 1px solid rgba(39, 249, 128, 0.28);
  line-height: 1.25;
  text-align: right;
  max-width: 58%;
}

.tm-wallet-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tm-primary);
  box-shadow: 0 0 10px var(--tm-primary);
  flex-shrink: 0;
}

.tm-wallet-shell {
  padding-top: 0.25rem !important;
}

.tm-wallet-shell .okx-assets-container,
.tm-wallet-dwt-shell {
  background: transparent !important;
  min-height: auto !important;
  color: var(--tm-text);
}

/* Wallet primary tabs — 3-col grid, underline active, ellipsis (no overflow) */
.tm-wallet-tabs-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0 0.85rem;
  margin: 0.55rem auto 0;
}

.tm-trade-wallet .tm-wallet-tabgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(39, 249, 128, 0.22);
  border-radius: 0.65rem;
  overflow: hidden;
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-item {
  min-width: 0;
  margin: 0;
  border-right: 1px solid rgba(39, 249, 128, 0.14);
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-item:last-child {
  border-right: none;
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-link {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  margin: 0;
  padding: 0.55rem 0.3rem !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: clamp(0.62rem, 2.75vw, 0.76rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  color: var(--tm-text-muted) !important;
  background: transparent !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-link:hover,
.tm-trade-wallet .tm-wallet-tabgrid .nav-link:focus {
  color: rgba(248, 246, 244, 0.92) !important;
  text-decoration: none !important;
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-item.active .nav-link {
  color: var(--tm-primary) !important;
  background: rgba(39, 249, 128, 0.1) !important;
  box-shadow: inset 0 -2px 0 0 var(--tm-primary);
}

.tm-trade-wallet .tm-wallet-tabgrid .nav-item.active .nav-link:hover {
  color: var(--tm-primary) !important;
}

.tm-trade-wallet .tm-wallet-panel {
  background: linear-gradient(
      165deg,
      rgba(45, 10, 22, 0.92) 0%,
      rgba(22, 6, 14, 0.88) 100%
    ) !important;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  border-radius: 1rem !important;
  margin-left: 0.85rem !important;
  margin-right: 0.85rem !important;
  padding: 1.15rem 1rem 1.25rem !important;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(39, 249, 128, 0.05) inset;
}

.tm-trade-wallet .tm-wallet-hero {
  position: relative;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(39, 249, 128, 0.12);
  margin-bottom: 1rem !important;
}

.tm-trade-wallet .tm-wallet-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--tm-primary), transparent);
  opacity: 0.85;
}

.tm-trade-wallet .tm-wallet-hero .okx-total-label {
  color: var(--tm-text-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-wallet-iconlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: rgba(39, 249, 128, 0.1);
  border: 1px solid rgba(39, 249, 128, 0.28);
  color: var(--tm-primary) !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.tm-wallet-iconlink .material-icons {
  font-size: 1.15rem;
}

.tm-wallet-iconlink:hover {
  background: rgba(39, 249, 128, 0.2);
  border-color: rgba(39, 249, 128, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
}

.tm-wallet-equity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.tm-wallet-equity-value {
  font-size: clamp(1.75rem, 7vw, 2.15rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(92deg, #fff 0%, rgba(248, 246, 244, 0.9) 40%, var(--tm-primary) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@supports not (-webkit-background-clip: text) {
  .tm-wallet-equity-value {
    color: #fff !important;
    -webkit-text-fill-color: unset;
    background: none;
  }
}

.tm-wallet-equity-fiat {
  font-size: 0.8rem !important;
  color: var(--tm-text-muted) !important;
}

/* Quick actions */
.tm-trade-wallet .tm-wallet-actions {
  gap: 0.55rem !important;
  margin-top: 0.5rem !important;
}

.tm-trade-wallet .tm-wallet-actions .okx-btn {
  flex: 1 1 0 !important;
  background: rgba(8, 2, 5, 0.55) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  color: var(--tm-text) !important;
  border-radius: 0.75rem !important;
  font-weight: 600 !important;
  font-size: 0.72rem !important;
  padding: 0.65rem 0.4rem !important;
}

.tm-trade-wallet .tm-wallet-actions .okx-btn:first-child {
  background: linear-gradient(135deg, rgba(39, 249, 128, 0.2), rgba(39, 249, 128, 0.06)) !important;
  border-color: rgba(39, 249, 128, 0.42) !important;
  color: #fff !important;
}

.tm-trade-wallet .tm-wallet-actions .okx-btn:hover {
  border-color: rgba(39, 249, 128, 0.55) !important;
  background: rgba(39, 249, 128, 0.18) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.tm-trade-wallet .tm-wallet-actions .okx-btn:first-child:hover {
  background: var(--tm-primary) !important;
  color: #0a0a0a !important;
}

.tm-trade-wallet .tm-wallet-actions .okx-btn:hover .okx-btn-icon {
  filter: brightness(0) invert(1) !important;
}

.tm-trade-wallet .tm-wallet-actions .okx-btn:first-child:hover .okx-btn-icon {
  filter: brightness(0) invert(0.08) !important;
}

.tm-wallet-section-title {
  position: relative;
  padding-left: 0.65rem;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(248, 246, 244, 0.88) !important;
}

.tm-wallet-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  border-radius: 2px;
  background: var(--tm-primary);
  opacity: 0.85;
}

.tm-trade-wallet .tm-wallet-allocation-row {
  margin: 0 !important;
  padding: 1rem 0.85rem !important;
  border: 1px solid rgba(39, 249, 128, 0.12) !important;
  border-radius: 0.75rem !important;
  background: rgba(0, 0, 0, 0.22) !important;
  border-bottom: 1px solid rgba(39, 249, 128, 0.12) !important;
  margin-bottom: 0.5rem !important;
  transition: border-color 0.2s, background 0.2s;
}

.tm-trade-wallet .tm-wallet-allocation-row:last-child {
  margin-bottom: 0 !important;
}

.tm-trade-wallet .tm-wallet-allocation-row:hover {
  border-color: rgba(39, 249, 128, 0.35) !important;
  background: rgba(39, 249, 128, 0.06) !important;
}

.tm-trade-wallet .tm-wallet-allocation-row .okx-asset-amount {
  font-variant-numeric: tabular-nums;
}

/* Spot holdings */
.tm-trade-wallet .tm-wallet-spot-card {
  padding: 1rem 0.85rem !important;
  margin-bottom: 0.65rem !important;
  border: 1px solid rgba(39, 249, 128, 0.15) !important;
  border-radius: 0.85rem !important;
  background: rgba(8, 2, 5, 0.45) !important;
  border-bottom: 1px solid rgba(39, 249, 128, 0.15) !important;
}

.tm-trade-wallet .tm-wallet-spot-card:last-child {
  margin-bottom: 0 !important;
}

.tm-trade-wallet .tm-wallet-spot-card .okx-asset-symbol {
  font-weight: 700 !important;
  color: #fff !important;
}

.tm-trade-wallet .tm-wallet-spot-card .okx-asset-label {
  color: var(--tm-text-muted) !important;
  font-size: 0.65rem !important;
}

.tm-trade-wallet .tm-wallet-spot-card .okx-asset-value {
  font-variant-numeric: tabular-nums;
}

/* Futures nested */
.tm-trade-wallet .tm-wallet-subtabs.futures-type-switch a {
  background: rgba(0, 0, 0, 0.35) !important;
  color: var(--tm-text-muted) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  border-radius: 0.65rem !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
}

.tm-trade-wallet .tm-wallet-subtabs.futures-type-switch a.active {
  background: var(--tm-primary-dim) !important;
  color: var(--tm-primary) !important;
  border-color: rgba(39, 249, 128, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(39, 249, 128, 0.2);
}

.tm-trade-wallet .okx-futures-container {
  background: rgba(8, 2, 5, 0.45) !important;
  border: 1px solid rgba(39, 249, 128, 0.18) !important;
  border-radius: 0.85rem !important;
}

.tm-trade-wallet .okx-futures-value-sm.highlight {
  color: var(--tm-primary) !important;
}

.tm-trade-wallet .okx-futures-breakdown .d-flex {
  border-bottom-color: rgba(39, 249, 128, 0.1) !important;
}

.tm-trade-wallet .fut-card {
  background: rgba(22, 6, 14, 0.88) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  color: var(--tm-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.tm-trade-wallet .fut-tag-long {
  background: linear-gradient(135deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
}

.tm-trade-wallet .fut-tag-short {
  background: linear-gradient(135deg, #7a2222 0%, #ce3d3d 100%) !important;
}

.tm-trade-wallet .fut-green {
  color: var(--tm-primary) !important;
}

.tm-trade-wallet .stat-green {
  color: var(--tm-primary) !important;
}

.tm-trade-wallet .leverage-indicator .bar-active {
  background: var(--tm-primary) !important;
}

.tm-trade-wallet .fut-btn-primary {
  background: linear-gradient(135deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
  color: #0a0a0a !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(39, 249, 128, 0.28);
}

.tm-trade-wallet .fut-btn-primary:hover {
  filter: brightness(1.06);
}

.tm-trade-wallet .kline-order-card {
  background: rgba(22, 6, 14, 0.88) !important;
  border: 1px solid rgba(39, 249, 128, 0.15) !important;
  border-radius: 0.75rem !important;
}

.tm-trade-wallet .text-muted {
  color: var(--tm-text-muted) !important;
}

.tm-trade-wallet .text-success {
  color: var(--tm-primary) !important;
}

/* Deposit / withdraw / transfer partials */
.tm-trade-wallet .okx-card {
  background: rgba(45, 10, 22, 0.82) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  border-radius: 0.85rem !important;
  color: var(--tm-text) !important;
}

.tm-trade-wallet .okx-label {
  color: var(--tm-text-muted) !important;
}

.tm-trade-wallet .okx-select {
  background: rgba(8, 2, 5, 0.55) !important;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  color: var(--tm-text) !important;
}

.tm-trade-wallet .okx-select:focus {
  border-color: var(--tm-primary) !important;
  box-shadow: 0 0 0 2px var(--tm-primary-dim) !important;
}

/* ===== Transaction history (views/transaction.html) — wallet / terminal parity ===== */
.tm-transaction-page.tm-trade-wallet .tm-transaction-body {
  margin-top: 4.35rem;
  padding-bottom: 2.5rem;
  max-width: 720px;
}

.tm-transaction-heading {
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}

.tm-transaction-header-spacer {
  opacity: 0;
  pointer-events: none;
}

.tm-transaction-header-spacer-btn {
  visibility: hidden;
}

.tm-transaction-date-wrap {
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.tm-transaction-date {
  border-radius: 0.65rem !important;
  background: rgba(8, 2, 5, 0.55) !important;
  color: var(--tm-text) !important;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.95rem 1rem !important;
  min-height: 3.15rem;
  color-scheme: dark;
}

.tm-transaction-date:focus {
  border-color: var(--tm-primary) !important;
  box-shadow: 0 0 0 2px var(--tm-primary-dim) !important;
  outline: none !important;
}

.tm-transaction-date:disabled {
  opacity: 0.55;
}

.tm-transaction-tabs-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0.55rem 0 0;
  padding-top: 0.25rem;
  padding-bottom: 0.2rem;
}

.tm-transaction-tabgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(39, 249, 128, 0.22);
  border-radius: 0.65rem;
  overflow: hidden;
}

.tm-transaction-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.9rem 0.38rem !important;
  min-height: 3.1rem;
  border: none !important;
  border-right: 1px solid rgba(39, 249, 128, 0.14) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--tm-text-muted) !important;
  font-size: clamp(0.55rem, 2.6vw, 0.72rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.tm-transaction-tab:last-child {
  border-right: none !important;
}

.tm-transaction-tab:hover,
.tm-transaction-tab:focus {
  color: rgba(248, 246, 244, 0.92) !important;
  outline: none !important;
}

.tm-transaction-tab.active {
  color: var(--tm-primary) !important;
  background: rgba(39, 249, 128, 0.1) !important;
  box-shadow: inset 0 -2px 0 0 var(--tm-primary);
}

.tm-transaction-loading .tm-transaction-spinner {
  color: var(--tm-primary) !important;
  border-color: currentColor rgba(39, 249, 128, 0.25) rgba(39, 249, 128, 0.25) !important;
}

.tm-transaction-list-wrap {
  margin-top: 1rem;
}

.tm-transaction-empty {
  margin: 0.5rem 0 1rem;
  padding: 1rem 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tm-text-muted) !important;
  background: rgba(45, 10, 22, 0.55) !important;
  border: 1px solid rgba(39, 249, 128, 0.16) !important;
  border-radius: 0.75rem;
}

.tm-transaction-page .okx-wallet-list {
  gap: 0.65rem !important;
}

.tm-transaction-page .okx-wallet-item {
  background: rgba(22, 6, 14, 0.78) !important;
  border: 1px solid rgba(39, 249, 128, 0.16) !important;
  border-radius: 0.75rem !important;
  color: var(--tm-text) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.tm-transaction-page .okx-wallet-item:hover {
  border-color: rgba(39, 249, 128, 0.4) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-1px);
}

.tm-transaction-page .okx-wallet-symbol {
  color: #fff !important;
  font-size: 0.88rem !important;
}

.tm-transaction-page .text-accent {
  color: var(--tm-primary) !important;
}

.tm-transaction-page .text-success {
  color: var(--tm-primary) !important;
}

.tm-transaction-page .text-warning {
  color: #e8b84d !important;
}

/* ===== Market / trading (views/market.html) — Tickmill terminal ===== */
.tm-market-page .tm-market-shell {
  color: var(--tm-text);
  max-width: 720px;
}

.tm-market-page.tm-terminal-dark .tm-market-shell,
.tm-market-page.tm-terminal-dark .tm-market-shell--full {
  max-width: 100%;
  width: 100%;
}

@media (min-width: 768px) {
  .tm-market-page.tm-terminal-dark.main.has-footer {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

.tm-market-page .tm-market-graph-wrap {
  margin-top: 3.35rem;
}

.tm-market-page .text-black {
  color: rgba(248, 246, 244, 0.95) !important;
}

.tm-market-page .text-success {
  color: var(--tm-primary) !important;
}

.tm-market-page .text-title {
  color: var(--tm-text-muted) !important;
}

.tm-market-page .text-item {
  color: rgba(248, 246, 244, 0.55) !important;
}

.tm-market-page .stat-green {
  color: var(--tm-primary) !important;
}

.tm-market-page .tm-market-ticker-row {
  padding: 0.75rem 0.55rem !important;
  margin-left: -0.15rem;
  margin-right: -0.15rem;
  margin-bottom: 0.15rem;
  background: linear-gradient(
    165deg,
    rgba(22, 6, 14, 0.88) 0%,
    rgba(8, 2, 5, 0.72) 100%
  );
  border: 1px solid rgba(39, 249, 128, 0.22);
  border-radius: 0.85rem;
  align-items: center;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(39, 249, 128, 0.06) inset;
}

.tm-market-page .tm-market-exchange-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-right: 0.4rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(39, 249, 128, 0.12);
  border: 1px solid rgba(39, 249, 128, 0.32);
  color: var(--tm-primary);
  text-decoration: none !important;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.tm-market-page .tm-market-exchange-btn:hover {
  background: rgba(39, 249, 128, 0.2);
  border-color: rgba(39, 249, 128, 0.5);
  transform: translateY(-1px);
}

.tm-market-page .tm-market-exchange-btn .material-icons {
  font-size: 1.15rem;
}

.tm-market-page .tm-market-coin-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.96) !important;
  padding: 3px;
  border: 1px solid rgba(39, 249, 128, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.tm-market-page .tm-market-graph-title {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.tm-market-page .tm-market-symbol-name {
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tm-market-page .tm-market-change-pct {
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.tm-market-page .tm-market-chart-launch .material-icons {
  font-size: 1.55rem !important;
  opacity: 0.95;
}

.tm-market-page .tm-market-icon-ghost {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  line-height: 1;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.tm-market-page .tm-market-icon-ghost:hover {
  background: rgba(39, 249, 128, 0.1);
  border-color: rgba(39, 249, 128, 0.35);
}

.tm-market-page .tm-market-pair-select.text-black {
  color: var(--tm-text) !important;
}

.tm-market-page .tm-market-trade-body {
  margin-top: 1rem !important;
  padding-left: 0.4rem !important;
  padding-right: 0.4rem !important;
}

.tm-market-page .tm-market-order-col {
  padding-right: 0.4rem !important;
}

.tm-market-page .tm-market-book-col {
  padding-left: 0.4rem !important;
}

.tm-market-page .market-toggle-box a {
  background: rgba(0, 0, 0, 0.42) !important;
  color: var(--tm-text-muted) !important;
  border-top: 1px solid rgba(39, 249, 128, 0.12) !important;
  border-bottom: 1px solid rgba(39, 249, 128, 0.12) !important;
  font-weight: 700 !important;
  padding: 0.55rem 0 !important;
}

.tm-market-page .market-toggle-box a:first-child {
  border-left: 1px solid rgba(39, 249, 128, 0.12) !important;
}

.tm-market-page .market-toggle-box a:last-child {
  border-right: 1px solid rgba(39, 249, 128, 0.12) !important;
}

.tm-market-page .market-toggle-box a.active {
  background: var(--tm-primary-dim) !important;
  color: var(--tm-primary) !important;
}

.tm-market-page .crypt-market-status ul.nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.35rem;
  padding: 0.55rem 0.2rem 0.45rem !important;
  border: none !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tm-market-page .crypt-market-status ul.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tm-market-page .crypt-market-status ul.nav-tabs li {
  padding: 0 !important;
  flex: 0 0 auto;
}

.tm-market-page .crypt-market-status ul.nav-tabs li a {
  display: block;
  padding: 0.42rem 0.7rem !important;
  border-radius: 999px !important;
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tm-text-muted) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  background: rgba(0, 0, 0, 0.38) !important;
}

.tm-market-page .crypt-market-status ul.nav-tabs li a.active {
  color: var(--tm-primary) !important;
  background: var(--tm-primary-dim) !important;
  border-color: rgba(39, 249, 128, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(39, 249, 128, 0.18);
}

.tm-market-page .orderbook-header {
  color: var(--tm-text-muted) !important;
  font-size: 0.62rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
}

.tm-market-page .orderbook-current .orderbook-price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tm-market-page .tm-market-bottom-dock {
  margin-top: 0.85rem !important;
  padding: 0.35rem 0.2rem 0.65rem;
  background: rgba(8, 2, 5, 0.94) !important;
  border-top: 1px solid rgba(39, 249, 128, 0.14) !important;
  border-radius: 0.85rem 0.85rem 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
}

.tm-market-page select.form-control {
  background: rgba(8, 2, 5, 0.55) !important;
  color: var(--tm-text) !important;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  border-radius: 0.5rem !important;
  font-weight: 600;
  font-size: 0.72rem !important;
  padding: 0.45rem 0.4rem !important;
  min-height: 2.35rem;
}

.tm-market-page .tm-market-subtabs.futures-type-switch a {
  background: rgba(0, 0, 0, 0.35) !important;
  color: var(--tm-text-muted) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  border-radius: 0.65rem !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
}

.tm-market-page .tm-market-subtabs.futures-type-switch a.active {
  background: var(--tm-primary-dim) !important;
  color: var(--tm-primary) !important;
  border-color: rgba(39, 249, 128, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(39, 249, 128, 0.2);
}

.tm-market-page .futures-stats-card {
  background: rgba(45, 10, 22, 0.72) !important;
  border: 1px solid rgba(39, 249, 128, 0.15) !important;
  border-radius: 0.75rem !important;
}

.tm-market-page .futures-stats-card .stat-title {
  color: var(--tm-text-muted) !important;
}

.tm-market-page .futures-stats-card .stat-value {
  color: var(--tm-text) !important;
}

.tm-market-page .order-switch-group {
  min-height: 2.65rem;
  background: rgba(8, 2, 5, 0.65) !important;
  border: 1px solid rgba(39, 249, 128, 0.15);
  border-radius: 0.5rem;
}

.tm-market-page .order-switch-btn {
  background: transparent !important;
  color: var(--tm-text-muted) !important;
}

.tm-market-page .order-switch-btn--inactive {
  background: transparent !important;
  color: rgba(248, 246, 244, 0.55) !important;
}

.tm-market-page .order-switch-btn--buy-active {
  background: linear-gradient(90deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
}

.tm-market-page .order-switch-btn--sell-active {
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 100%) !important;
}

.tm-market-page .fut-card {
  background: rgba(45, 10, 22, 0.75) !important;
  border: 1px solid rgba(39, 249, 128, 0.18) !important;
  color: var(--tm-text) !important;
}

.tm-market-page .fut-tag-long {
  background: linear-gradient(135deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
}

.tm-market-page .kline-contract-orders,
.tm-market-page .orderbook-container {
  background: rgba(8, 2, 5, 0.45) !important;
  border: 1px solid rgba(39, 249, 128, 0.12);
  border-radius: 0.65rem;
  padding: 0.45rem 0.35rem !important;
}

.tm-market-page .kline-orders-table thead th {
  border-bottom-color: rgba(39, 249, 128, 0.15) !important;
  color: var(--tm-text-muted) !important;
}

.tm-market-page .kline-orders-table tbody td,
.tm-market-page .kline-orders-table tbody th {
  background: rgba(45, 10, 22, 0.65) !important;
}

.tm-market-page .kline-order-card {
  background: rgba(45, 10, 22, 0.72) !important;
  border: 1px solid rgba(39, 249, 128, 0.12);
  border-radius: 0.65rem;
}

.tm-market-page .kline-order-card:hover {
  background: rgba(55, 14, 28, 0.88) !important;
}

.tm-market-page .price-box-market {
  background: rgba(8, 2, 5, 0.55) !important;
  border: 1px solid rgba(39, 249, 128, 0.12) !important;
}

.tm-market-page .order-percent-btn {
  background: rgba(8, 2, 5, 0.55) !important;
  color: var(--tm-text-muted) !important;
  border: 1px solid rgba(39, 249, 128, 0.1) !important;
}

.tm-market-page .mpg-trans-wrapper {
  background: transparent !important;
  padding: 0.35rem 0 !important;
}

.tm-market-page .mpg-trans-card {
  background: rgba(22, 6, 14, 0.85) !important;
  border: 1px solid rgba(39, 249, 128, 0.14) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tm-market-page .mpg-trans-green {
  color: var(--tm-primary) !important;
}

.tm-market-page .deliveryx-item {
  background: rgba(8, 2, 5, 0.55) !important;
  border: 1px solid rgba(39, 249, 128, 0.12) !important;
  border-radius: 0.35rem !important;
  overflow: hidden;
}

.tm-market-page .deliveryx-time {
  background: rgba(39, 249, 128, 0.12) !important;
  color: var(--tm-text) !important;
}

.tm-market-page .deliveryx-yield {
  background: rgba(0, 0, 0, 0.25) !important;
  color: var(--tm-text-muted) !important;
}

.tm-market-page .deliveryx-item.active {
  background: var(--tm-primary-dim) !important;
  border-color: rgba(39, 249, 128, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(39, 249, 128, 0.25);
}

.tm-market-page .deliveryx-item.active .deliveryx-time,
.tm-market-page .deliveryx-item.active .deliveryx-yield {
  background: transparent !important;
  color: var(--tm-primary) !important;
}

.tm-market-page .text-muted {
  color: var(--tm-text-muted) !important;
}

/* Inline light panels / CTAs from legacy markup */
.tm-market-page [style*="#f6f6f6"] {
  background: rgba(45, 10, 22, 0.88) !important;
  color: var(--tm-text) !important;
  border: 1px solid rgba(39, 249, 128, 0.18) !important;
}

.tm-market-page [style*="background: #131313"] {
  background: rgba(8, 2, 5, 0.94) !important;
  border-top: 1px solid rgba(39, 249, 128, 0.12) !important;
}

.tm-market-page [style*="linear-gradient(328deg, #2fad66"] {
  background: linear-gradient(135deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
}

.tm-market-page [style*="background:#121212"],
.tm-market-page [style*="background: #121212"] {
  background: var(--tm-card) !important;
  border: 1px solid var(--tm-border) !important;
}

.tm-market-page [style*="border-top: 1px solid #33404f"] {
  border-top-color: rgba(39, 249, 128, 0.15) !important;
}

/* Modals launched from market */
#entrust-modal .modal-content,
#stop-loss-profit-modal .modal-content,
#countdown-timer-modal .modal-content,
#mpgCloseAllModal .modal-content,
#mpgCloseSingleModal .modal-content,
#shareModal .modal-content,
#viewDetailsModal .modal-content {
  background-color: #161a1e !important;
  background: #161a1e !important;
  border: 1px solid var(--tm-border) !important;
  color: var(--tm-text) !important;
  opacity: 1 !important;
}

.darkmode #viewDetailsModal .modal-content {
  background-color: #161a1e !important;
  background: #161a1e !important;
}

.tm-entrust-modal-panel {
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  padding: 1.15rem 0.9rem;
  margin-top: 0.85rem;
  background: rgba(8, 2, 5, 0.4);
}

.tm-entrust-modal-panel--scroll {
  overflow: hidden;
  overflow-y: auto;
  height: 33vh;
}

/* OKX modal — wallet close confirm (rendered outside main) */
.okx-modal-content {
  background: var(--tm-card) !important;
  border: 1px solid var(--tm-border) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
}

.okx-modal-header {
  border-bottom: 1px solid rgba(39, 249, 128, 0.12) !important;
}

.okx-modal-body {
  color: var(--tm-text-muted) !important;
}

.okx-btn-cancel {
  background: rgba(8, 2, 5, 0.65) !important;
  border: 1px solid rgba(39, 249, 128, 0.22) !important;
  color: var(--tm-text) !important;
}

.okx-btn-confirm {
  background: linear-gradient(135deg, #1a6b45 0%, var(--tm-primary) 100%) !important;
  color: #0a0a0a !important;
  font-weight: 800 !important;
}

/* ===== Home (main.html) — Tickmill over hero video ===== */
.tm-main-home.tm-video-page .tm-main-header {
  padding: 0;
}

.tm-main-home .tm-main-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.55rem 0.85rem 0.6rem;
  gap: 0.5rem;
}

.tm-main-home .tm-main-brand {
  flex: 1;
  text-align: center;
  text-decoration: none !important;
}

.tm-main-home .tm-main-brand-text {
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: clamp(0.68rem, 2.8vw, 0.82rem);
  color: #fff;
  display: inline-block;
  line-height: 1.2;
  text-shadow: 0 0 24px rgba(39, 249, 128, 0.25);
}

.tm-main-home .tm-main-header-actions {
  display: flex;
  align-items: center;
}

.tm-main-home .tm-main-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(39, 249, 128, 0.28);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.tm-main-home .tm-main-icon-btn:hover {
  background: rgba(39, 249, 128, 0.12);
  border-color: rgba(39, 249, 128, 0.55);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.tm-main-home .tm-main-icon-glyph {
  font-size: 1.3rem;
  line-height: 1;
  color: rgba(248, 246, 244, 0.97);
  text-shadow: 0 0 16px rgba(39, 249, 128, 0.3);
}

.tm-main-home .tm-main-icon-btn--gap {
  margin-right: 0.35rem;
}

.tm-main-home .tm-main-hero {
  padding: calc(3.2rem + env(safe-area-inset-top, 0px)) 0 0;
}

.tm-main-home .tm-main-swiper {
  padding: 0.15rem 0.85rem 1.75rem;
}

.tm-main-home .tm-main-slide-card {
  border-radius: 1rem !important;
  border: 1px solid rgba(39, 249, 128, 0.25) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(39, 249, 128, 0.06) inset;
  background: rgba(8, 2, 5, 0.35) !important;
}

.tm-main-home .tm-main-slide-bg {
  border-radius: 0.95rem;
  overflow: hidden;
}

.tm-main-home .tm-main-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 576px) {
  .tm-main-home .card-main-slider-container {
    height: clamp(150px, 42vw, 195px) !important;
  }
}

@media (min-width: 576px) {
  .tm-main-home .card-main-slider-container {
    height: clamp(200px, 28vw, 260px) !important;
  }
}

.tm-main-home .tm-main-swiper-dots {
  position: relative !important;
  bottom: auto !important;
  margin-top: 0.35rem !important;
  margin-bottom: 0 !important;
}

.tm-main-home .tm-main-swiper-dots .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.35) !important;
  opacity: 1 !important;
}

.tm-main-home .tm-main-swiper-dots .swiper-pagination-bullet-active {
  background: var(--tm-primary) !important;
  box-shadow: 0 0 12px rgba(39, 249, 128, 0.45);
}

.tm-main-home .tm-main-marquee {
  margin: 0 0.85rem 0.65rem;
  padding: 0.55rem 0.25rem;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(39, 249, 128, 0.18);
  border-radius: 0.75rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tm-main-home .tm-main-marquee-glyph {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--tm-primary);
  opacity: 0.95;
}

.tm-main-home .tm-main-marquee-text {
  font-size: 0.72rem !important;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(248, 246, 244, 0.92) !important;
}

.tm-main-home .tm-main-marquee-notify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  color: inherit;
  text-decoration: none !important;
}

.tm-main-home .tm-main-marquee-notify:hover {
  opacity: 1;
}

#s-chat-plugin,
iframe[src*="salesmartly"],
iframe[src*="plugin-code"] {
  display: none !important;
}

.tm-main-home .tm-main-quick {
  margin: 0 0.65rem 0.5rem;
  padding: 0.75rem 0.25rem 0.85rem;
  background: rgba(8, 2, 5, 0.38);
  border: 1px solid rgba(39, 249, 128, 0.14);
  border-radius: 0.85rem;
}

.tm-main-home .tm-main-quick-row {
  display: flex;
  flex-wrap: nowrap;
}

.tm-main-home .tm-main-quick-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  width: auto;
}

.tm-main-home .tm-main-quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none !important;
  padding: 0.35rem 0.15rem;
  border-radius: 0.65rem;
  transition: background 0.2s;
}

.tm-main-home .tm-main-quick-link:hover {
  background: rgba(39, 249, 128, 0.08);
}

.tm-main-home .tm-main-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  padding: 0;
  margin-bottom: 0.45rem;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(39, 249, 128, 0.26);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(39, 249, 128, 0.06) inset;
}

.tm-main-home .tm-main-quick-glyph {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--tm-primary);
  opacity: 0.98;
}

.tm-main-home .tm-main-quick-label {
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: rgba(248, 246, 244, 0.9) !important;
  margin: 0 !important;
  max-width: 100%;
  text-align: center;
  letter-spacing: -0.01em;
}

.tm-main-home .tm-main-asset-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.tm-main-home .tm-main-asset-scroll::-webkit-scrollbar {
  display: none;
}

.tm-main-home .tm-main-asset-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(39, 249, 128, 0.22);
  background: rgba(0, 0, 0, 0.38);
  color: rgba(248, 246, 244, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.2;
}

.tm-main-home .tm-main-asset-pill--active {
  border-color: rgba(39, 249, 128, 0.55);
  background: rgba(39, 249, 128, 0.14);
  color: var(--tm-primary);
  box-shadow: 0 0 0 1px rgba(39, 249, 128, 0.12);
}

.tm-main-home .tm-main-asset-pill--loading {
  opacity: 0.75;
}

.tm-main-home .tm-main-section {
  position: relative;
}

.tm-main-home .tm-main-section-head {
  padding-top: 0.35rem;
  padding-bottom: 0.15rem;
}

.tm-main-home .tm-main-section-title {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff !important;
  margin: 0 !important;
  line-height: 1.3;
}

.tm-main-home .tm-main-section-accent {
  display: block;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  margin-top: 0.35rem;
  background: linear-gradient(90deg, var(--tm-primary), transparent);
}

.tm-main-home .tm-main-section-accent--short {
  width: 1.75rem;
}

.tm-main-home .tm-main-okx-market {
  background: transparent !important;
}

.tm-main-home .tm-main-mini-tile {
  background: rgba(22, 6, 14, 0.72) !important;
  border: 1px solid rgba(39, 249, 128, 0.16) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, transform 0.2s;
}

.tm-main-home .tm-main-mini-tile:hover {
  border-color: rgba(39, 249, 128, 0.45) !important;
  transform: translateY(-2px);
}

.tm-main-home .text-success {
  color: var(--tm-primary) !important;
}

.tm-main-home .okx-badge-up {
  background: rgba(39, 249, 128, 0.18) !important;
  color: var(--tm-primary) !important;
  border: 1px solid rgba(39, 249, 128, 0.3);
}

.tm-main-home .okx-badge-down {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.tm-main-home .okx-subtext {
  color: var(--tm-text-muted) !important;
}

.tm-main-home .tm-main-notice-img {
  border: 1px solid rgba(39, 249, 128, 0.15);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.tm-main-home .tm-main-market-board {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.tm-main-home .tm-main-market-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: none !important;
  background: rgba(0, 0, 0, 0.42) !important;
  border: 1px solid rgba(39, 249, 128, 0.2) !important;
  border-radius: 0.65rem !important;
  overflow: hidden;
  padding: 0 !important;
  margin-bottom: 1rem !important;
}

.tm-main-home .tm-main-market-tabs .nav-item {
  margin: 0 !important;
  border-right: 1px solid rgba(39, 249, 128, 0.14);
}

.tm-main-home .tm-main-market-tabs .nav-item:last-child {
  border-right: none;
}

.tm-main-home .tm-main-market-tabs .nav-link {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.65rem 0.25rem !important;
  font-size: clamp(0.58rem, 2.5vw, 0.72rem) !important;
  font-weight: 700 !important;
  color: var(--tm-text-muted) !important;
  background: transparent !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.75rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.tm-main-home .tm-main-market-tabs .nav-link:hover {
  color: rgba(248, 246, 244, 0.92) !important;
}

.tm-main-home .tm-main-market-tabs .nav-link.active {
  color: var(--tm-primary) !important;
  background: rgba(39, 249, 128, 0.1) !important;
  box-shadow: inset 0 -2px 0 0 var(--tm-primary);
}

.tm-main-home .okx-market-list {
  background: transparent !important;
}

.tm-main-home .tm-main-list-row {
  background: rgba(22, 6, 14, 0.75) !important;
  border: 1px solid rgba(39, 249, 128, 0.14) !important;
  padding: 0.55rem 0.5rem !important;
  transition: border-color 0.2s, background 0.2s;
}

.tm-main-home .tm-main-list-row:hover {
  border-color: rgba(39, 249, 128, 0.38) !important;
  background: rgba(35, 10, 20, 0.88) !important;
}

.tm-main-home .tm-main-list-logo {
  width: 2.25rem !important;
  height: 2.25rem !important;
  border-radius: 50%;
  border: 1px solid rgba(39, 249, 128, 0.2);
  object-fit: cover;
}

.tm-main-home .okx-price {
  font-variant-numeric: tabular-nums;
}

.tm-main-home .tm-main-list-price {
  min-width: 4.5rem;
}

.tm-main-home .tm-main-list-symbol {
  min-width: 0;
  flex-shrink: 0;
}

.tm-main-home .tm-main-list-chart {
  min-width: 0;
}

.tm-main-home .text-muted {
  color: var(--tm-text-muted) !important;
}

