:root {
  --bg: #f4f7fd;
  --bg-soft: #eef3fb;
  --panel: #ffffff;
  --text: #152238;
  --muted: #64748b;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --accent: #0e9f6e;
  --warning: #d97706;
  --danger: #e11d48;
  --border: rgba(21, 34, 56, 0.12);
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
}

@keyframes pulse-live {
  0% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.18); opacity: 0.7; }
  100% { transform: scale(1); opacity: 0.95; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at top, #e8f0ff 0%, var(--bg) 48%);
  color: var(--text);
}


a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #8a63ff);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-profile-wrap {
  position: relative;
  flex-shrink: 0;
}

.nav-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font: inherit;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.nav-profile-trigger:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.nav-profile-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-profile-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.nav-profile-label {
  font-size: 0.9rem;
  font-weight: 600;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-profile-caret {
  font-size: 0.7rem;
  opacity: 0.55;
  margin-left: 2px;
}

.nav-authed-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-admin-notice {
  display: none !important;
  flex: 1 1 100%;
  width: 100%;
  order: -1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(217, 119, 6, 0.38);
  padding: 7px 12px;
  border-radius: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(520px, 96vw);
  margin-left: auto;
}

.nav-auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease,
    transform 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-btn:active {
  transform: scale(0.98);
}

.nav-btn-signin {
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nav-btn-signin:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.nav-btn-create {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-strong), #6366f1);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28);
}

.nav-btn-create:hover {
  filter: brightness(1.03);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

@keyframes nav-kyc-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.38);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
    opacity: 0.92;
  }
}

.nav-kyc-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  padding: 7px 14px;
  margin-right: 2px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1px solid rgba(190, 18, 60, 0.6);
  cursor: pointer;
  animation: nav-kyc-pulse 2.2s ease-in-out infinite;
  transition: filter 0.15s ease, transform 0.12s ease;
}

.nav-kyc-alert:hover {
  filter: brightness(1.06);
}

.nav-kyc-alert:active {
  transform: scale(0.98);
}

.nav-kyc-pending {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9a3412;
  background: rgba(251, 146, 60, 0.18);
  border: 1px solid rgba(234, 88, 12, 0.28);
  white-space: nowrap;
}

.nav-kyc-verified {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #166534;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(22, 101, 52, 0.25);
  white-space: nowrap;
}

.nav-kyc-reject {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.9);
  border: 1px solid rgba(185, 28, 28, 0.35);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-kyc-reject:hover {
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.5);
}

.nav-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  padding: 14px 22px;
  border-radius: 12px;
  background: rgba(21, 34, 56, 0.94);
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  animation: nav-toast-in 0.32s ease forwards;
}

@keyframes nav-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 50;
}

.nav-profile-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.nav-profile-menu-item:hover {
  background: rgba(99, 102, 241, 0.08);
}

.nav-profile-menu-danger {
  color: #b91c1c;
}

.nav-edit-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 72px 16px 24px;
}

.nav-edit-modal {
  width: min(440px, 100%);
  padding: 22px 22px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.nav-edit-head {
  margin-bottom: 6px;
}

.nav-edit-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.nav-edit-email {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-edit-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
}

.nav-edit-note.ok {
  color: #15803d;
}

.nav-edit-note.err {
  color: #b91c1c;
}

.nav-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.btn-outline {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 18px;
}

.auth-modal {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.auth-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.auth-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth-modal-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #8a63ff);
  color: #fff;
  font-weight: var(--fw-semibold);
}

.auth-modal-brandtext {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.auth-modal-title {
  font-weight: var(--fw-semibold);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.auth-modal-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: var(--fw-medium);
}

.auth-modal-close {
  border: 0;
  background: rgba(2, 6, 23, 0.04);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.auth-modal-close:hover {
  background: rgba(2, 6, 23, 0.07);
}

.auth-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
}

.auth-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: var(--fw-medium);
  cursor: pointer;
}

.auth-tab-active {
  background: #edf3ff;
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--text);
}

.auth-modal-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 8px;
}

.auth-welcome {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.auth-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 6px;
}

.auth-input {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 12px;
  font-size: 0.95rem;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.auth-error {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(225, 29, 72, 0.25);
  background: rgba(225, 29, 72, 0.08);
  color: #b91c1c;
  font-weight: 600;
}

.auth-page-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, #eef2ff 100%);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.auth-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.auth-page-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}

.auth-page-back:hover {
  color: var(--primary, #2563eb);
}

.auth-page-card {
  padding: 22px 20px 24px;
}

.auth-page-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-page-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text, #0f172a);
}

.auth-page-muted {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.45;
}

.auth-page-switch {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  text-align: center;
}

.auth-page-switch a {
  font-weight: 700;
  color: var(--primary, #2563eb);
  text-decoration: none;
}

.auth-page-switch a:hover {
  text-decoration: underline;
}

.auth-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.auth-meta-pill {
  font-size: 0.74rem;
  color: #334155;
  border: 1px solid var(--border);
  background: #f8fbff;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: var(--fw-medium);
}

.auth-submit {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: var(--fw-semibold);
}

.auth-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.hero {
  padding: 72px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, #7ea5ff, #66f8d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 20px 0 28px;
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats {
  margin-top: 30px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 14px 36px rgba(13, 38, 76, 0.08);
}

.ticker {
  margin: 8px 0 18px;
  display: grid;
  gap: 12px;
}

.coin-row {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coin-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coin-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.coin-name {
  font-weight: 600;
}

.coin-symbol {
  color: var(--muted);
  font-size: 0.85rem;
}

.trend-up {
  color: var(--accent);
}

.trend-down {
  color: var(--danger);
}

.trust-ticker-wrap {
  margin: 8px 0 28px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(13, 38, 76, 0.08);
  color: var(--text);
  overflow: hidden;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  padding: 14px 18px 12px;
  font-size: 0.95rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.coin-scroll-viewport {
  overflow: hidden;
  width: 100%;
}

.coin-scroll-track {
  display: flex;
  width: max-content;
  animation: coin-marquee 24s linear infinite;
}

.scroll-coin {
  flex: 0 0 auto;
  min-width: 160px;
  margin: 0 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scroll-coin-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #edf3ff;
}

.scroll-coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-coin-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.scroll-coin-meta strong {
  font-size: 0.92rem;
  letter-spacing: 0.2px;
}

.scroll-coin-meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

.scroll-coin em {
  margin-left: auto;
  font-size: 0.78rem;
  font-style: normal;
  padding: 4px 8px;
  border-radius: 999px;
}

.scroll-up {
  color: #00aa79;
  background: #dcfaf1;
}

.scroll-down {
  color: #e55e7b;
  background: #ffe8ee;
}

.nav-link-active {
  color: var(--text);
  font-weight: var(--fw-medium);
}

.markets-page {
  padding: 34px 0 50px;
}

.markets-title {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  text-align: center;
}

.markets-subtitle {
  margin: 10px auto 0;
  color: var(--muted);
  text-align: center;
  max-width: 72ch;
}

.markets-breadcrumb {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.market-intro {
  margin-bottom: 22px;
}

.markets-title-accent {
  background: linear-gradient(135deg, #3b82f6, #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.market-highlight-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.market-highlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.market-highlight-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.market-highlight-card strong {
  margin-top: 8px;
  display: block;
  font-size: 1.8rem;
}

.market-controls {
  margin-top: 22px;
  margin-bottom: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.terminal-market-page {
  background: #f5f7fb;
  color: #111827;
  min-height: 100vh;
  padding: 8px 10px 14px;
}

.terminal-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 10px;
}

.terminal-pair {
  font-weight: var(--fw-semibold);
}

.terminal-stats {
  color: #64748b;
  font-size: 0.84rem;
}

.terminal-toolbar {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 8px;
}

.terminal-toolbar button {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
}

.terminal-toolbar button.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.terminal-toolbar .spacer {
  flex: 1;
}

.terminal-asset-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 8px;
}

.terminal-asset-tabs button {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: var(--fw-medium);
  font-size: 0.78rem;
  cursor: pointer;
}

.terminal-asset-tabs button.on {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.terminal-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 8px;
}

.terminal-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
}

.panel-title {
  font-weight: var(--fw-semibold);
  margin: 0 0 8px;
}

.terminal-market-list {
  margin-top: 8px;
  max-height: 560px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.terminal-market-row {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: left;
}

.terminal-market-sym {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.terminal-coin-ico {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #eef2f7;
  border: 0;
}

.terminal-coin-ico.placeholder {
  display: grid;
  place-items: center;
  font-weight: var(--fw-semibold);
  font-size: 0.62rem;
  color: #475569;
}

.terminal-coin-textblock {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.05;
}

.terminal-coin-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--fw-medium);
}

.terminal-coin-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
}

.terminal-coin-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-market-row.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.terminal-chart {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  height: 430px;
  overflow: hidden;
}

.terminal-chart-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.terminal-chart-topline {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid #eef2f7;
  font-weight: var(--fw-semibold);
}

.terminal-chart-topline .muted {
  color: #64748b;
  font-weight: var(--fw-medium);
  font-size: 0.82rem;
}

.terminal-chart-price {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.terminal-chart-axes {
  position: absolute;
  right: 6px;
  top: 40px;
  bottom: 56px;
  width: 90px;
  pointer-events: none;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  justify-items: end;
  align-items: center;
  color: #6b7280;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.terminal-candle-svg {
  width: 100%;
  height: 100%;
}

.terminal-chart-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.terminal-vol-label {
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: var(--fw-medium);
  border-top: 1px solid #f1f5f9;
}

.terminal-vol-svg {
  width: 100%;
  height: 44px;
}

.terminal-note {
  margin: 6px 0 10px;
  padding: 10px 10px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: rgba(2, 6, 23, 0.03);
  border-radius: 10px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 600;
}

.terminal-bottom-books {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.terminal-orders-strip {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.terminal-strip-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.terminal-strip-tabs button {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.terminal-strip-tabs button.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.terminal-strip-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}

.market-filter-tabs {
  display: flex;
  gap: 8px;
}

.market-filter-tabs button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.market-filter-tabs .market-tab-active {
  color: var(--text);
  border-color: #c8d8fb;
  background: #edf3ff;
}

.market-search {
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 38px;
  padding: 0 12px;
  min-width: 220px;
}

.market-table-wrap {
  padding: 0;
  overflow: hidden;
}

.live-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.live-col {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
}

.live-head {
  padding: 10px 12px;
  font-weight: var(--fw-semibold);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.live-row {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-bottom: 1px solid rgba(21, 34, 56, 0.06);
  font-size: 0.88rem;
}

.live-row:last-child {
  border-bottom: 0;
}

.live-trades-thead {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 8px;
  padding: 6px 12px 4px;
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(21, 34, 56, 0.08);
}

.live-trade-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.live-trade-row.trade-buy .trade-px {
  color: #15803d;
  font-weight: 700;
}

.live-trade-row.trade-sell .trade-px {
  color: #b91c1c;
  font-weight: 700;
}

.live-trade-row .trade-side {
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.live-trade-row.trade-buy .trade-side {
  color: #16a34a;
}

.live-trade-row.trade-sell .trade-side {
  color: #dc2626;
}

.live-trade-empty {
  justify-content: center;
  color: #94a3b8;
  font-size: 0.82rem;
}

.market-table-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.market-table-head {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
}

.market-coin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-coin-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.tx-grid {
  grid-template-columns: 1.2fr 0.9fr 1fr 1fr 1fr;
}

.trade-btn {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.trade-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  font-weight: var(--fw-medium);
  background: linear-gradient(90deg, #2b66f6, #8a1cf6);
  box-shadow: 0 8px 20px rgba(69, 40, 198, 0.25);
}

.trade-action-icon {
  font-size: 14px;
}

.trade-action-arrow {
  opacity: 0.9;
}

.trade-page {
  padding: 22px 0 48px;
}

.trade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.trade-symbol {
  font-size: 1.35rem;
  font-weight: var(--fw-semibold);
}

.trade-last {
  color: var(--primary-strong);
  font-weight: var(--fw-semibold);
  font-size: 1.12rem;
}

.trade-pills {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.trade-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.9fr;
  gap: 14px;
}

.trade-book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.trade-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trade-switch button {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  cursor: pointer;
  font-weight: var(--fw-medium);
}

.trade-switch .buy.on {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}

.trade-switch .sell.on {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}

.trade-msg {
  font-size: 0.88rem;
  color: var(--primary-strong);
}

.bo-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.52);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 9999;
}

.bo-modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.30);
  overflow: hidden;
}

.bo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 1));
}

.bo-title {
  font-weight: var(--fw-semibold);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.bo-pill {
  margin-left: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(2, 132, 199, 0.07);
  font-weight: var(--fw-semibold);
  font-size: 0.8rem;
  color: #0f172a;
}

.bo-close {
  margin-left: auto;
  border: 0;
  background: rgba(2, 6, 23, 0.04);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: #334155;
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.bo-close:hover {
  background: rgba(2, 6, 23, 0.07);
}

.bo-scroll {
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 16px;
}

.bo-summary {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.bo-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bo-sum-k {
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
}

.bo-sum-v {
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}

.bo-label {
  margin-top: 12px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: var(--fw-medium);
}

.bo-grid2 {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bo-select {
  width: 100%;
  margin-top: 6px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  padding: 0 12px;
  font-weight: var(--fw-medium);
  color: #0f172a;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.bo-select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.bo-choice {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bo-card-title,
.bo-card-sub {
  text-align: center;
}

.bo-card-title {
  margin-top: 6px;
}

.bo-card.call::before,
.bo-card.put::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin: 2px auto 6px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(248, 250, 252, 0.95);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px 26px;
}

.bo-card.call::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14l5-5 4 4 7-7'/%3E%3Cpath d='M14 6h6v6'/%3E%3C/svg%3E");
}

.bo-card.put::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10l6 6 4-4 6 6'/%3E%3Cpath d='M14 18h6v-6'/%3E%3C/svg%3E");
}

.bo-card {
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.bo-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.bo-card.on.call {
  border-color: rgba(22, 163, 74, 0.55);
  box-shadow: 0 10px 18px rgba(22, 163, 74, 0.10);
  background: rgba(22, 163, 74, 0.05);
}

.bo-card.on.put {
  border-color: rgba(220, 38, 38, 0.40);
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.08);
  background: rgba(220, 38, 38, 0.05);
}

.bo-card.on.call::after,
.bo-card.on.put::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(2, 6, 23, 0.12);
}

.bo-card.on.call::after {
  background: #16a34a;
}

.bo-card.on.put::after {
  background: #dc2626;
}

.bo-card-title {
  font-weight: var(--fw-semibold);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.bo-card-sub {
  margin-top: 4px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.88rem;
}

.bo-profit {
  margin-top: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: baseline;
}

.bo-profit-k {
  color: #64748b;
  font-weight: 600;
}

.bo-profit-v {
  justify-self: end;
  font-weight: var(--fw-semibold);
  color: #2563eb;
}

.bo-profit-sub {
  color: #64748b;
  font-weight: 600;
}

.bo-profit-subv {
  justify-self: end;
  font-weight: var(--fw-semibold);
  color: #475569;
}

.bo-amt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bo-amt-hint {
  color: #64748b;
  font-weight: 600;
  font-size: 0.82rem;
}

.bo-amount {
  margin-top: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  height: 48px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.bo-currency {
  color: #64748b;
  font-weight: var(--fw-medium);
}

.bo-input {
  border: 0;
  outline: none;
  flex: 1;
  font-weight: var(--fw-semibold);
  font-size: 1.05rem;
  color: #0f172a;
}

.bo-max {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: var(--fw-medium);
  color: #0f172a;
}

.bo-warn {
  margin-top: 8px;
  color: #b45309;
  font-weight: var(--fw-semibold);
}

.bo-confirm {
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  height: 52px;
  font-weight: var(--fw-semibold);
  font-size: 1.05rem;
  color: #fff;
  background: #79cbb2;
  box-shadow: 0 14px 26px rgba(16, 185, 129, 0.18);
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

.bo-confirm:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.bo-confirm:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.trade-markets-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.trade-markets-scroll {
  max-height: 620px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.trade-market-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 0.84rem;
}

.trade-market-item.active {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eef4ff;
}

.trade-chart-box {
  height: 260px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.trade-spark {
  width: 100%;
  height: 100%;
}

.tx-page {
  padding: 24px 0 56px;
}

.tx-header {
  margin: 6px 0 10px;
}

.tx-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.tx-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.tx-top-tabs {
  display: flex;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tx-top-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: var(--fw-medium);
  padding: 10px 2px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tx-top-tab-active {
  color: var(--text);
  border-bottom-color: var(--primary-strong);
}

.tx-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.tx-stat-card {
  padding: 16px;
}

.tx-stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.tx-stat-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.tx-stat-value {
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}

.tx-mini-ico {
  color: var(--muted);
  font-size: 1rem;
}

.tx-stat-profit {
  margin-top: 10px;
  display: inline-block;
  color: var(--accent);
  font-size: 1.25rem;
}

.tx-primary-cta {
  width: 100%;
  margin: 16px 0 12px;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: var(--fw-semibold);
  color: #fff;
  background: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  cursor: pointer;
}

.tx-sub-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.tx-sub-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: var(--fw-medium);
  cursor: pointer;
}

.tx-sub-tab-active {
  color: var(--primary-strong);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 18px rgba(13, 38, 76, 0.07);
  background: #fff;
}

.tx-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px 0 0;
}

.tx-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf3ff;
  color: #2563eb;
  margin-bottom: 12px;
}

.tx-empty-title {
  font-weight: var(--fw-semibold);
  font-size: 1.05rem;
}

.tx-empty-sub {
  margin-top: 4px;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
}

.bottom-nav-item {
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  font-weight: var(--fw-medium);
  padding: 8px 0;
}

.bottom-nav-ico {
  font-size: 1.1rem;
  line-height: 1;
}

.bottom-nav-txt {
  font-size: 0.72rem;
}

.bottom-nav-active {
  color: var(--primary-strong);
}

.tx-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 82px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  z-index: 60;
}

.personal-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.profile-page-main {
  padding-bottom: 56px;
}

.profile-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.profile-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: var(--fw-medium);
  color: var(--text);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 981px) {
  .profile-layout-sidebar {
    position: sticky;
    top: 88px;
  }
}

.profile-layout-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-icon-btn {
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  line-height: 0;
}

.profile-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.profile-card {
  margin: 0;
}

.profile-user-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: var(--fw-medium);
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-user-meta {
  min-width: 0;
}

.profile-user-name {
  font-weight: var(--fw-medium);
  font-size: 1.05rem;
  color: var(--text);
}

.profile-admin-notice {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(217, 119, 6, 0.38);
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.profile-wallet-kyc-block {
  font-size: 0.86rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(217, 119, 6, 0.35);
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.45;
}

.profile-user-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.profile-user-id {
  font-size: 0.88rem;
  color: var(--muted);
}

.profile-copy-btn {
  border: 0;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  border-radius: 4px;
}

.profile-copy-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.profile-level-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.profile-balance-card {
  padding-bottom: 16px;
}

.profile-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-balance-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.profile-eye-btn {
  border: 0;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
  border-radius: 8px;
}

.profile-eye-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.profile-balance-value {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: var(--fw-medium);
  color: var(--text);
  letter-spacing: 0.02em;
  margin-top: 6px;
}

.profile-assets-row {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.profile-balance-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.profile-btn-deposit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.profile-btn-deposit:hover {
  filter: brightness(1.05);
}

.profile-btn-withdraw {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
}

.profile-btn-withdraw:hover {
  background: #f8fafc;
}

.profile-btn-icon {
  font-size: 1rem;
  line-height: 1;
}

.profile-section {
  margin: 0;
}

.profile-section-heading {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-list-card {
  padding: 0;
  overflow: hidden;
}

.profile-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px 10px;
  padding: 14px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.profile-list-row:hover {
  background: rgba(248, 251, 255, 0.85);
}

.profile-list-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f0fe;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-list-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-list-title {
  font-weight: var(--fw-medium);
  font-size: 0.95rem;
  color: var(--text);
}

.profile-list-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.profile-list-badge-spacer {
  width: 12px;
}

.profile-list-chevron {
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 300;
}

.profile-list-divider {
  height: 1px;
  background: #eef2f7;
  margin: 0 14px 0 66px;
}

.profile-status-pill {
  font-size: 0.78rem;
  font-weight: var(--fw-medium);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  white-space: nowrap;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 18px;
}

.profile-modal-card {
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.profile-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.profile-modal-title {
  font-size: 1.04rem;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}

.profile-modal-close {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.06);
  color: #64748b;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.profile-modal-content {
  overflow: auto;
  padding: 14px 16px 16px;
}

.profile-modal-body-grid {
  display: grid;
  gap: 10px;
}

.profile-kyc-status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
}

.profile-kyc-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-kyc-upload {
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: rgba(237, 243, 255, 0.45);
  cursor: pointer;
}

.profile-kyc-upload input[type="file"] {
  font-size: 0.82rem;
}

.profile-kyc-upload-title {
  font-weight: var(--fw-medium);
  color: #1e293b;
  font-size: 0.86rem;
}

.profile-kyc-upload-file {
  color: #64748b;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-card h3 {
  margin: 0 0 10px;
}

.personal-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 24px 0 10px;
}

.market-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-card img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.meta strong {
  font-size: 0.95rem;
}

.meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

.change {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
}

.up {
  color: #0e9f6e;
}

.down {
  color: #e11d48;
}

@keyframes coin-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.features {
  padding: 40px 0 72px;
}

.section-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  margin-bottom: 16px;
}

.section-copy {
  color: var(--muted);
  max-width: 65ch;
  line-height: 1.7;
}

.feature-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card h3 {
  margin: 12px 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(126, 165, 255, 0.35);
}

.cta-strip {
  margin: 8px 0 80px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(91, 140, 255, 0.18), rgba(102, 248, 208, 0.13));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 26px 0 36px;
}

@media (max-width: 980px) {
  .hero-grid,
  .feature-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .market-highlight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .market-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .market-search {
    min-width: 0;
    width: 100%;
  }

  .market-table-row {
    grid-template-columns: 1.6fr 1fr 1fr;
  }

  .market-table-row span:nth-child(4),
  .market-table-row span:nth-child(5),
  .market-table-row span:nth-child(6),
  .market-table-row button,
  .market-table-row a {
    display: none;
  }

  .personal-grid {
    grid-template-columns: 1fr;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-layout-sidebar {
    position: static;
  }

  .profile-page-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    display: none;
  }

  .tx-stats {
    grid-template-columns: 1fr;
  }

  .trade-layout {
    grid-template-columns: 1fr;
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .terminal-bottom-books {
    grid-template-columns: 1fr;
  }

  .trade-book-grid {
    grid-template-columns: 1fr;
  }

  .scroll-coin {
    min-width: 140px;
    margin: 0 2px;
  }
}

/* —— Funding (deposit / withdraw) centered modal + spot-style pair —— */
.funding-modal-overlay {
  z-index: 10000;
}

.funding-modal-shell.bo-modal {
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
}

.funding-modal-body.bo-scroll {
  flex: 1;
  min-height: 0;
}

.funding-modal-summary {
  margin-top: 0;
}

.funding-ex-pair {
  margin-bottom: 6px;
}

.funding-ex-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 4px;
}

.funding-ex-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
}

.funding-ex-field-active {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.funding-ex-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  outline: none;
}

.funding-ex-asset {
  flex-shrink: 0;
  border: 0;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 10px;
  padding: 8px 28px 8px 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  cursor: pointer;
  max-width: 130px;
}

.funding-ex-readout {
  flex: 1;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.funding-ex-currency-txt {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #475569;
  padding: 8px 10px;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 10px;
}

.funding-ex-swap-row {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

.funding-ex-swap {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  color: #64748b;
  cursor: default;
  font-size: 1.1rem;
  line-height: 1;
}

.funding-ex-quick {
  margin-bottom: 14px;
}

.funding-pill-inline {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.funding-modal-kyc-hint {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  padding: 8px 0 4px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 4px;
  grid-column: 1 / -1;
}

/* Legacy full-screen funding (unused if modal only) */
.funding-flow-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #f4f6fb;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.funding-flow-sheet {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100%;
  padding: 12px 16px 100px;
  position: relative;
  background: #f4f6fb;
}

.funding-flow-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 0 16px;
}

.funding-flow-back {
  border: none;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  color: var(--text, #0f172a);
}

.funding-flow-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.funding-flow-header-spacer {
  width: 40px;
}

.funding-flow-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--text, #0f172a);
}

.funding-flow-banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.funding-flow-banner-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.funding-flow-section {
  margin-bottom: 14px;
}

.funding-flow-row-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.funding-flow-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.funding-flow-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  background: #fff;
  box-sizing: border-box;
}

.funding-flow-input-lg {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 14px 16px;
}

.funding-flow-amount-combo {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.funding-flow-amount-combo .funding-flow-input-lg {
  flex: 1;
  min-width: 0;
}

.funding-flow-asset-select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  background: #fff;
}

.funding-flow-asset-inline {
  width: auto;
  min-width: 138px;
  flex-shrink: 0;
  align-self: stretch;
}

.funding-flow-estimate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.funding-flow-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}

.funding-flow-muted {
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  margin: 0 0 10px;
  line-height: 1.45;
}

.funding-flow-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.funding-flow-card-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

.funding-flow-card-sub {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}

.funding-flow-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
}

.funding-flow-qr {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.funding-flow-qr-missing {
  text-align: center;
  padding: 32px 12px;
  color: var(--muted, #64748b);
  font-size: 0.88rem;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 12px;
}

.funding-flow-hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 12px 0;
}

.funding-flow-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted, #64748b);
}

.funding-flow-addr-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.funding-flow-addr-row .funding-flow-input {
  flex: 1;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.funding-flow-copy {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.funding-flow-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.funding-flow-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.funding-flow-upload-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.funding-flow-file {
  display: none;
}

.funding-flow-file-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.funding-flow-submit {
  width: 100%;
  padding: 14px !important;
  border-radius: 14px !important;
  font-size: 1rem !important;
}

.funding-flow-submit-wd {
  margin-top: 8px;
}

.funding-balance-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.funding-balance-label {
  font-size: 0.88rem;
  opacity: 0.95;
  margin-bottom: 8px;
}

.funding-balance-amt {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.funding-balance-foot {
  margin-top: 12px;
  font-size: 0.75rem;
  opacity: 0.85;
}

.funding-flow-fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-top: 8px;
}

.funding-flow-receive-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.funding-receive-val {
  font-weight: 800;
  color: #15803d;
}

.funding-flow-link {
  border: none;
  background: none;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.86rem;
}

.funding-flow-pw-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.funding-flow-pw-wrap .funding-flow-input {
  flex: 1;
}

.funding-flow-lock {
  font-size: 1.1rem;
}

.funding-kyc-banner {
  display: flex;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
}

.funding-kyc-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

.funding-kyc-banner p {
  margin: 6px 0 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #78350f;
}

.funding-kyc-banner strong {
  color: #92400e;
}

.funding-kyc-cta {
  border: 1px solid #d97706;
  background: #fff;
  color: #b45309;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.82rem;
}

.funding-fab {
  position: fixed;
  bottom: 24px;
  right: calc(50% - min(220px, 50vw) + 16px);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  z-index: 210;
}

@media (max-width: 500px) {
  .funding-fab {
    right: 18px;
  }
}

/* Transactions — contract trade panel */
.tx-contract-panel {
  margin-bottom: 16px;
  padding: 18px 16px 20px;
}

.tx-contract-panel--modal {
  margin-bottom: 0;
  padding: 0;
}

/* Contract trade popup (mobile-friendly scroll) */
.tx-contract-modal-backdrop {
  z-index: 10000;
  align-items: center;
}

.tx-contract-modal-shell.bo-modal {
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
}

.tx-contract-modal-scroll.bo-scroll {
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.tx-contract-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tx-contract-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tx-contract-asset-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #374151;
}

.tx-contract-banner-warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.tx-contract-summary {
  background: #f3f4f6;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.tx-contract-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.tx-contract-sum-row:last-child {
  border-bottom: 0;
}

.tx-contract-sum-val {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tx-contract-chg {
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.tx-contract-chg-up {
  background: #dcfce7;
  color: #166534;
}

.tx-contract-chg-down {
  background: #fee2e2;
  color: #991b1b;
}

.tx-contract-refresh {
  border: 1px solid #e5e7eb;
  background: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.tx-contract-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tx-contract-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.tx-contract-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tx-contract-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.tx-contract-select {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 600;
  background: #fff;
  font-size: 0.95rem;
}

.tx-contract-form {
  margin-top: 4px;
}

.tx-contract-amt-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 8px;
}

.tx-contract-amt-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.2rem;
  font-weight: 600;
  background: #fff;
}

.tx-contract-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.tx-contract-quick {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  color: #374151;
}

.tx-contract-quick:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.tx-contract-lev-box {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #fafafa;
  margin-bottom: 14px;
}

.tx-contract-lev-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
}

.tx-contract-lev-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

.tx-contract-lev-slider {
  width: 100%;
  accent-color: #2563eb;
  margin: 8px 0;
}

.tx-contract-lev-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #9ca3af;
  font-weight: 600;
}

.tx-contract-tpsl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tx-contract-tpsl-ico {
  font-size: 1.1rem;
}

.tx-contract-tpsl-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.tx-contract-toggle input {
  width: 44px;
  height: 26px;
  accent-color: #2563eb;
}

.tx-contract-tpsl-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tx-contract-input-sm {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.tx-contract-longshort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.tx-contract-ls-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-contract-long {
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.tx-contract-long:disabled,
.tx-contract-short:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.tx-contract-short {
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(180deg, #fb7185, #e11d48);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.tx-contract-liq {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}

.tx-contract-liq-val {
  color: #dc2626;
  font-weight: 700;
}

.tx-contract-liq-note {
  font-size: 0.72rem;
  color: #9ca3af;
  margin: 10px 0 0;
  line-height: 1.4;
}

.tx-contract-msg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.88rem;
  font-weight: 500;
}

.tx-option-insufficient {
  margin-top: 8px;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 600;
}

.funding-withdraw-verify .funding-verify-detail {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #57534e;
}

.funding-pill-verified {
  background: #d1fae5 !important;
  color: #047857 !important;
}

.funding-pill-pending {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

@media (max-width: 520px) {
  .tx-contract-select-grid,
  .tx-contract-tpsl-inputs,
  .tx-contract-longshort,
  .bo-choice {
    grid-template-columns: 1fr;
  }
}

/* Login/signup: use /site/nova-auth.css (standalone). */

/* —— Mobile bottom tab bar (fixed to viewport, not document end) —— */
.has-mobile-tab-nav .markets-page-main,
.has-mobile-tab-nav .profile-page-main,
.has-mobile-tab-nav main.container {
  padding-bottom: 0;
}

.mobile-tab-nav {
  display: none;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  /* Pages without #root (e.g. auth): reserve space above fixed bar */
  body.has-mobile-tab-nav {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  /* React shells: pad the scroll root so last content clears the bar */
  @supports selector(:has(*)) {
    body.has-mobile-tab-nav:has(#root) {
      padding-bottom: 0;
    }

    body.has-mobile-tab-nav:has(#root) #root {
      padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
      box-sizing: border-box;
    }
  }

  .mobile-tab-nav {
    display: flex;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    z-index: 2147483000;
    background: #f4f6f8;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tab-nav-inner {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-content: space-around;
    align-items: stretch;
    min-height: 56px;
    padding: 8px 6px 10px;
    flex-shrink: 0;
  }

  .mobile-tab-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    text-decoration: none;
    color: #1e293b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.15s ease;
  }

  .mobile-tab-nav-item .mobile-tab-nav-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
  }

  .mobile-tab-nav-item .mobile-tab-nav-ico svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.85;
  }

  .mobile-tab-nav-item.is-active {
    color: #2563eb;
  }

  .mobile-tab-nav-item.is-active .mobile-tab-nav-ico {
    color: #2563eb;
  }

  .mobile-tab-nav-txt {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.1;
  }
}

@media (min-width: 901px) {
  .mobile-tab-nav {
    display: none;
  }

  body.has-mobile-tab-nav {
    padding-bottom: 0;
  }
}
