:root {
  --bg-base: #0b0e14;
  --bg-panel: #101620;
  --bg-panel-2: #151a26;
  --glass: rgba(18, 24, 35, .82);
  --text-main: #a1a9b4;
  --text-bright: #d2d8e2;
  --text-sub: #707a8a;
  --accent: #0ecb81;
  --accent-dark: #087a50;
  --accent-soft: rgba(14, 203, 129, .12);
  --red: #f5465c;
  --red-soft: rgba(245, 70, 92, .13);
  --amber: #f5a623;
  --border: rgba(14, 203, 129, .16);
  --line: rgba(255, 255, 255, .06);
  --shadow: 0 16px 42px rgba(0, 0, 0, .62);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-base); color: var(--text-main); color-scheme: dark; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #0b1211, #0f1c18);
  color: var(--accent);
  border: 1px solid rgba(14, 203, 129, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 18px rgba(14,203,129,.16);
  font-weight: 950;
}

.mode-chip {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(245, 166, 35, .28);
  border-radius: 999px;
  color: #ffd28a;
  background: rgba(245, 166, 35, .08);
  font-size: 11px;
  font-weight: 800;
}

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow), inset 0 1px 2px rgba(14, 203, 129, .08);
  backdrop-filter: blur(14px);
}

.muted { color: var(--text-sub); }
.up { color: var(--accent); }
.down { color: var(--red); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { padding: 15px; }

.icon-btn, .text-btn {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14,203,129,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: var(--text-bright);
  font-weight: 800;
}
.text-btn { padding: 0 13px; font-size: 12px; }

/* Desktop exchange shell */
.desktop-page { overflow-x: hidden; }
.exchange-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(8, 12, 19, .92), rgba(11, 14, 20, .98) 58%),
    linear-gradient(110deg, rgba(14,203,129,.08), transparent 34%, rgba(25,35,52,.45));
}
.exchange-header {
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: rgba(11, 14, 20, .9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.exchange-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}
.exchange-brand span:last-child { letter-spacing: 1px; }
.exchange-nav { display: flex; align-items: center; gap: 4px; }
.exchange-nav a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
}
.exchange-nav a:hover, .exchange-nav a.active { color: var(--accent); background: rgba(14,203,129,.07); }
.exchange-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.outline-action, .primary-action, .hero-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(14,203,129,.22);
  color: var(--text-main);
  background: rgba(255,255,255,.025);
  font-size: 13px;
  font-weight: 850;
}
.outline-action:hover { color: var(--text-bright); border-color: rgba(14,203,129,.42); background: rgba(14,203,129,.06); }
.primary-action, .hero-btn.primary {
  color: #e9fff6;
  background: linear-gradient(135deg, #087a50, #0b8f5d);
  border-color: rgba(14,203,129,.62);
  box-shadow: 0 0 22px rgba(14,203,129,.12);
}
.desktop-ticker { position: sticky; top: 60px; z-index: 50; }
.desktop-home { max-width: 1220px; margin: 0 auto; padding: 60px 20px 80px; }
.desktop-hero {
  min-height: 565px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 420px;
  gap: 60px;
  align-items: center;
}
.hero-copy h1, .mobile-market-hero h1 {
  margin: 22px 0 18px;
  color: var(--text-bright);
  font-size: clamp(42px, 4.2vw, 58px);
  line-height: 1.02;
  font-weight: 950;
}
.hero-copy p, .mobile-market-hero p {
  max-width: 660px;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-btn { min-width: 202px; height: 52px; color: var(--accent); background: rgba(14,203,129,.055); }
.hero-stats { display: flex; gap: 48px; flex-wrap: wrap; margin-top: 46px; }
.hero-stats div { display: grid; gap: 6px; }
.hero-stats b { color: var(--accent); font-size: 30px; font-weight: 950; }
.hero-stats span { color: var(--text-sub); text-transform: uppercase; font-size: 11px; font-weight: 850; }

.hero-market-list, .mobile-featured-list { display: flex; flex-direction: column; gap: 13px; }
.market-side-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 92px 105px;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18, 24, 35, .75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.market-side-card strong { justify-self: end; display: grid; gap: 4px; text-align: right; color: var(--accent); font-size: 16px; }
.market-side-card strong small { font-size: 12px; font-weight: 900; }
.market-side-card.down strong { color: var(--red); }
.coin-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.coin-head img, .coin-icon, .coin-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  object-fit: cover;
}
.coin-avatar { display: grid; place-items: center; color: #06140f; background: var(--accent); font-weight: 950; }
.coin-head b { display: block; color: var(--text-bright); font-weight: 900; }
.coin-head small, .coin-pair { display: block; color: var(--text-sub); font-size: 11px; margin-top: 3px; }
.sparkline { height: 36px; }
.sparkline svg { width: 100%; height: 100%; overflow: visible; }
.sparkline path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ticker-strip {
  height: 40px;
  overflow: hidden;
  background: rgba(9, 12, 18, .72);
  border-bottom: 1px solid rgba(14,203,129,.09);
  border-top: 1px solid rgba(14,203,129,.05);
}
.ticker-track { display: flex; width: max-content; animation: ticker 150s linear infinite; }
.ticker-item {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,.045);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}
@keyframes ticker { to { transform: translateX(-50%); } }

.market-board { padding: 34px 0 0; }
.market-board.compact { padding-top: 22px; }
.market-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.market-tabs::-webkit-scrollbar { display: none; }
.market-tabs button {
  height: 32px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-sub);
  font-weight: 850;
  white-space: nowrap;
}
.market-tabs button.active { color: var(--accent); border-color: var(--accent); }
.live-dot { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 850; }
.live-dot::before { content: ""; width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 7px; background: var(--accent); }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.desktop-market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.coin-card {
  min-height: 136px;
  padding: 18px;
  cursor: pointer;
  background: rgba(19, 24, 35, .86);
  border-color: rgba(14,203,129,.18);
  transition: transform .2s ease, border-color .2s ease;
}
.coin-card:hover { transform: translateY(-2px); border-color: rgba(14,203,129,.38); }
.price { margin-top: 16px; color: var(--text-bright); font-size: 20px; font-weight: 950; }
.chg { display: inline-flex; margin-top: 8px; padding: 5px 9px; border-radius: 7px; font-size: 11px; font-weight: 900; }
.chg.up { color: var(--accent); background: var(--accent-soft); }
.chg.down { color: var(--red); background: var(--red-soft); }

/* Mobile app shell */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: rgba(11,14,20,.9);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 950; }
.topbar .brand .brand-mark { width: 34px; height: 34px; }
.topbar .title { color: var(--text-bright); font-weight: 850; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.source-home-topbar { justify-content: space-between; }
.source-login-entry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-bright);
  font-weight: 950;
}
.user-dot {
  width: 23px;
  height: 23px;
  display: inline-block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #0b0e14 0 22%, transparent 23%),
    radial-gradient(circle at 50% 76%, #0b0e14 0 28%, transparent 29%),
    var(--accent);
  box-shadow: 0 0 12px rgba(14,203,129,.28);
}
.app {
  min-height: 100vh;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 78px 14px 94px;
}

/* Source-style mobile home */
.source-home { display: grid; gap: 16px; }
.source-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(264px, 66%);
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.source-cards::-webkit-scrollbar, .source-hot-strip::-webkit-scrollbar { display: none; }
.promo-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(14,203,129,.26);
  border-radius: 16px;
  padding: 14px 16px;
  background:
    radial-gradient(260px 160px at 78% 80%, rgba(14,203,129,.15), transparent 62%),
    linear-gradient(145deg, rgba(23,29,43,.92), rgba(14,17,26,.94));
  box-shadow: 0 10px 28px rgba(0,0,0,.54), inset 0 1px 2px rgba(14,203,129,.12);
}
.promo-card h2 { margin: 0 0 8px; color: var(--accent); font-size: 18px; line-height: 1.12; }
.promo-card p { margin: 6px 0; color: var(--text-bright); font-weight: 750; }
.promo-card p b { color: #f2ff00; font-size: 18px; }
.go-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 26px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #06140f;
  font-weight: 950;
}
.bonus-art {
  position: absolute;
  right: 34px;
  bottom: 28px;
  width: 106px;
  height: 74px;
  transform: rotate(-8deg);
}
.bonus-art span {
  position: absolute;
  width: 42px;
  height: 31px;
  border-radius: 7px;
  background: linear-gradient(135deg, #12cf8c, #2d7dff);
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
}
.bonus-art span:nth-child(1) { left: 5px; top: 28px; }
.bonus-art span:nth-child(2) { left: 33px; top: 12px; background: linear-gradient(135deg, #ffd24b, #17c98a); }
.bonus-art span:nth-child(3) { left: 58px; top: 34px; background: linear-gradient(135deg, #ff6bb3, #2d7dff); }
.bonus-art span:nth-child(4) { left: 48px; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #f5a623; }
.ls-ratio { position: absolute; left: 16px; right: 16px; bottom: 12px; }
.ls-ratio div { display: flex; justify-content: space-between; color: var(--accent); font-size: 10px; }
.ls-ratio div b:last-child { color: var(--red); }
.ls-ratio span { display: block; height: 11px; margin-top: 4px; border-radius: 5px; background: var(--red); overflow: hidden; }
.ls-ratio i { display: block; height: 100%; background: var(--accent); }
.gem-card { min-width: 150px; }
.gem-card h2 { font-style: italic; letter-spacing: .5px; }
.gem-coin { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--text-bright); }
.gem-coin img { width: 24px; height: 24px; border-radius: 50%; }
.gem-card strong { display: block; margin-top: 10px; color: var(--accent); font-size: 24px; font-weight: 950; }
.gem-card small { font-size: 13px; font-weight: 950; }
.gem-bars { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; gap: 4px; }
.gem-bars span { flex: 1; height: 6px; border-radius: 2px; background: linear-gradient(90deg, #1ea87f, #54d3a8); box-shadow: 0 0 7px rgba(14,203,129,.35); }
.p2p-card { min-width: 150px; display: grid; align-content: center; }
.p2p-card h2 { color: var(--text-bright); text-shadow: 0 1px 0 #000; }
.p2p-card p { color: var(--text-sub); font-size: 12px; line-height: 1.5; }
.stamp {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--red);
  border-radius: 50%;
  color: var(--red);
  background: rgba(245,70,92,.1);
  font-size: 10px;
  font-weight: 950;
  transform: rotate(15deg);
}
.quick-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  text-align: center;
}
.quick-menu a { display: grid; gap: 7px; color: var(--text-bright); font-size: 12px; font-weight: 950; }
.quick-menu span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  justify-self: center;
  color: #06140f;
  background: var(--accent);
  border-radius: 12px;
  font-size: 18px;
}
.source-notice {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(14,203,129,.16);
  border-radius: 13px;
  background: rgba(22,26,38,.82);
  color: var(--text-main);
  overflow: hidden;
}
.source-notice span { color: var(--text-sub); }
.source-notice b {
  white-space: nowrap;
  min-width: max-content;
  animation: noticeMove 18s linear infinite;
}
@keyframes noticeMove { from { transform: translateX(22%); } to { transform: translateX(-100%); } }
.source-hot-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 31%;
  overflow-x: auto;
  border: 1px solid rgba(14,203,129,.2);
  border-radius: 15px;
  background: rgba(20,25,37,.84);
}
.source-hot-card {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 10px;
  border-right: 1px solid rgba(255,255,255,.045);
  text-align: center;
}
.source-hot-card b { color: var(--text-bright); font-size: 13px; }
.source-hot-card strong { font-size: 18px; font-weight: 950; }
.source-hot-card span { font-size: 12px; font-weight: 900; }
.source-market-card {
  overflow: hidden;
  border: 1px solid rgba(14,203,129,.22);
  border-radius: 16px;
  background: rgba(20,25,37,.84);
  box-shadow: var(--shadow);
}
.source-table { table-layout: fixed; }
.source-market-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
  padding: 17px 14px 10px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 850;
}
.source-market-head span:nth-child(2) { text-align: right; }
.source-table td {
  padding: 13px 14px;
  font-size: 15px;
}
.source-table td:first-child { width: auto; }
.source-table td:nth-child(2) { width: 128px; }
.source-table .coin-head { min-width: 0; }
.source-table .coin-head b { white-space: nowrap; font-size: 13px; }
.source-price-cell { text-align: right; }
.source-price-cell b { display: block; font-size: 17px; font-weight: 950; }
.source-price-cell span { display: block; margin-top: 4px; font-size: 12px; font-weight: 950; }
.source-bottom-ticker { margin: 4px -14px 0; }
.mobile-market-hero {
  padding: 22px 18px 8px 6px;
}
.mobile-market-hero h1 {
  margin-top: 18px;
  font-size: 31px;
  line-height: 1;
}
.mobile-market-hero p { font-size: 16px; line-height: 1.55; }
.mobile-market-hero .hero-actions { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mobile-market-hero .hero-btn { min-width: 0; height: 50px; padding: 0 10px; }
.mobile-market-hero .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 38px; }
.mobile-market-hero .hero-stats b { font-size: 22px; }
.mobile-featured-list { margin-top: 24px; padding-right: 8px; }
.mobile-featured-list .market-side-card {
  grid-template-columns: minmax(128px, 1fr) 74px 78px;
  gap: 9px;
  padding: 14px 12px;
}
.market-table-card { margin-top: 14px; overflow: hidden; }
.market-table { width: 100%; border-collapse: collapse; }
.market-table th, .market-table td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  text-align: right;
  font-size: 12px;
}
.market-table th:first-child, .market-table td:first-child { text-align: left; }
.market-table th { color: var(--text-sub); text-transform: uppercase; font-size: 10px; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 15px;
  z-index: 70;
  transform: translateX(-50%);
  width: min(92%, 620px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 24, 35, .94);
  border: 1px solid rgba(14,203,129,.14);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.bottom-nav a {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-sub);
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 850;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Terminal */
.notice {
  border: 1px solid rgba(245,166,35,.28);
  color: #ffd28a;
  background: rgba(245,166,35,.08);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.terminal { padding-bottom: 74px; }
.chart-card { overflow: hidden; background: #0b0e14; }
.chart-head {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.symbol-select {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(14,203,129,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: var(--text-bright);
  padding: 0 10px;
  outline: none;
  font-weight: 850;
}
.quote-meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 10px;
  font-weight: 800;
}
#terminalPrice { color: var(--accent); }
.tf-row {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.tf-row button {
  min-width: 44px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  color: var(--text-sub);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}
.tf-row button.active { color: var(--accent); background: rgba(14,203,129,.08); }
#chartCanvas { width: 100%; height: 330px; display: block; }
.order-bar {
  position: fixed;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  width: min(92%, 620px);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  z-index: 80;
  background: rgba(20, 24, 35, .94);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.order-bar button { flex: 1; height: 44px; border: 0; border-radius: 11px; color: #06140f; font-weight: 950; }
.btn-up { background: var(--accent); }
.btn-down { background: var(--red); color: #fff !important; }
.sheet {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  background: rgba(0,0,0,.64);
}
.sheet.show { display: flex; }
.sheet-panel {
  width: min(100%, 620px);
  background: #101620;
  border: 1px solid rgba(14,203,129,.14);
  border-radius: 22px 22px 0 0;
  padding: 18px 15px 22px;
}
.section-title {
  margin: 20px 3px 12px;
  color: var(--text-sub);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}
.pill-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0 16px; }
.pill {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: var(--text-main);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}
.pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.form-control {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(0,0,0,.26);
  color: var(--text-bright);
  padding: 0 13px;
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(14,203,129,.24); }
.submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #087a50, #0b8f5d);
  color: #eafff6;
  font-weight: 950;
  margin-top: 13px;
}
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kv div { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 10px; padding: 10px; }
.kv b { display: block; color: var(--text-bright); margin-top: 5px; }
.badge { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.badge.pending { color: var(--amber); background: rgba(245,166,35,.12); }
.badge.win, .badge.approved, .badge.paid, .badge.active { color: var(--accent); background: var(--accent-soft); }
.badge.loss, .badge.rejected, .badge.cancelled { color: var(--red); background: var(--red-soft); }

/* Auth */
.auth-topbar {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 30;
  width: min(460px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 92px 20px 40px;
  background:
    linear-gradient(135deg, #070a10, #0b0e14 48%, #0d1420);
}
.auth-card {
  width: min(420px, calc(100vw - 48px));
  padding: 32px 24px;
  border-radius: 24px;
  background: rgba(18, 24, 35, .88);
  border: 1px solid rgba(14,203,129,.2);
  box-shadow: 0 0 0 8px rgba(30,34,46,.42), 0 25px 60px rgba(0,0,0,.7);
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-logo { margin: 0 auto 13px; width: 64px; height: 64px; font-size: 26px; border-radius: 17px; }
.auth-brand h1 { margin: 0; color: var(--accent); font-size: 24px; font-weight: 950; }
.auth-brand p { margin: 7px 0 0; color: var(--text-sub); font-size: 12px; }
.tab-row { display: flex; gap: 8px; padding: 4px; margin-bottom: 20px; border-radius: 12px; background: rgba(0,0,0,.25); }
.tab { flex: 1; height: 42px; display: grid; place-items: center; border-radius: 9px; color: var(--text-sub); font-weight: 900; }
.tab.active { color: #eafff6; background: linear-gradient(135deg, #087a50, #0a7048); border: 1px solid rgba(14,203,129,.35); }
.switch-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.switch-tab {
  flex: 1;
  height: 36px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  color: var(--text-sub);
  background: rgba(0,0,0,.2);
  font-size: 12px;
  font-weight: 900;
}
.switch-tab.active { color: var(--accent); border-color: var(--accent); background: rgba(14,203,129,.06); }
.float-field {
  position: relative;
  display: block;
  height: 52px;
  margin-bottom: 14px;
}
.float-field input {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  outline: none;
  color: var(--text-bright);
  background: rgba(0,0,0,.3);
  padding: 16px 14px 0;
}
.float-field span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  font-size: 13px;
  pointer-events: none;
  transition: .18s ease;
}
.float-field input:focus { border-color: var(--accent); box-shadow: 0 0 12px rgba(14,203,129,.16); }
.float-field input:focus + span,
.float-field input:not(:placeholder-shown) + span {
  top: 10px;
  transform: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}
.auth-submit { margin-top: 8px; }
.forgot-link { display: block; text-align: center; margin-top: 18px; color: var(--accent); font-size: 13px; font-weight: 850; }
.register-foot { margin: 14px 0 0; text-align: center; color: var(--text-sub); font-size: 13px; }
.register-foot a { color: var(--accent); font-weight: 900; }
.auth-help { display: flex; justify-content: center; gap: 10px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.auth-help a { min-width: 76px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: var(--text-sub); font-size: 12px; font-weight: 850; }

/* Language selector */
.lang-page { min-height: 100vh; background: var(--bg-base); }
.lang-topbar {
  position: sticky;
  top: 0;
  height: 56px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: 0 16px;
  background: rgba(11,14,20,.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.lang-topbar h1 {
  grid-column: 2;
  margin: 0;
  color: var(--text-bright);
  text-align: center;
  font-size: 18px;
  font-weight: 950;
}
.lang-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--text-bright);
  background: rgba(255,255,255,.045);
  font-size: 20px;
}
.lang-content { max-width: 600px; margin: 0 auto; padding: 32px 28px 32px 16px; }
.lang-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(22,26,38,.78);
}
.lang-item {
  min-height: 71px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}
.lang-item:last-child { border-bottom: 0; }
.lang-item.active { background: rgba(14,203,129,.07); }
.flag-badge {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #172033, #0e131d);
  border: 2px solid rgba(255,255,255,.08);
  font-size: 10px;
  font-weight: 950;
}
.flag-vi { background: linear-gradient(#e5282f, #d61720); color: #ffe642; }
.flag-en { background: linear-gradient(135deg, #1f4fa3 0 45%, #fff 46% 54%, #c51f34 55%); }
.flag-ko { background: linear-gradient(#fff, #e9eef6); color: #1c2540; }
.flag-ja { background: radial-gradient(circle, #c91f37 0 34%, #fff 35%); color: transparent; }
.flag-th { background: linear-gradient(#c9273a 0 18%, #fff 19% 32%, #273d8f 33% 67%, #fff 68% 81%, #c9273a 82%); color: transparent; }
.flag-ru { background: linear-gradient(#fff 0 33%, #2b63c6 34% 66%, #d52b1e 67%); color: transparent; }
.flag-es { background: linear-gradient(#c81927 0 25%, #ffc400 26% 74%, #c81927 75%); color: transparent; }
.flag-zh { background: linear-gradient(#e7252f, #d71824); color: #ffe642; }
.lang-info { flex: 1; min-width: 0; }
.lang-info b { display: block; color: var(--text-main); font-size: 16px; font-weight: 950; }
.lang-info small { display: block; margin-top: 4px; color: var(--text-sub); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.lang-status {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-sub);
  font-weight: 950;
}
.lang-item.active .lang-status { color: #06140f; background: var(--accent); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

@media (min-width: 900px) {
  .app { max-width: 1180px; }
  .terminal { display: grid; grid-template-columns: minmax(0, 1.55fr) 380px; gap: 14px; padding-bottom: 20px; }
  .terminal .order-bar {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 16px;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-self: start;
  }
  .terminal .order-bar button { width: 100%; flex: none; }
}

@media (max-width: 980px) {
  .exchange-header { padding: 0 16px; gap: 12px; overflow-x: auto; }
  .exchange-nav { display: none; }
  .exchange-actions { flex: 0 0 auto; }
  .outline-action { display: none; }
  .desktop-home { padding: 34px 20px 80px; }
  .desktop-hero { min-height: 0; grid-template-columns: 1fr; gap: 26px; }
  .hero-copy h1 { font-size: 38px; }
  .desktop-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .app { padding-right: 28px; }
  .market-side-card { grid-template-columns: minmax(126px, 1fr) 70px 78px; gap: 8px; padding: 13px 10px; }
  .mobile-featured-list .market-side-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "coin price";
    align-items: center;
  }
  .mobile-featured-list .market-side-card .coin-head { grid-area: coin; }
  .mobile-featured-list .market-side-card .sparkline { display: none; }
  .mobile-featured-list .market-side-card strong {
    grid-area: price;
    width: auto;
    display: grid;
    text-align: right;
    padding-top: 0;
    border-top: 0;
  }
  .market-side-card strong { font-size: 14px; }
  .market-side-card strong small { font-size: 10px; }
  .sparkline { height: 32px; }
  .hero-stats { justify-content: space-between; gap: 18px; }
  .mobile-market-hero .hero-actions { gap: 10px; }
  .market-grid { grid-template-columns: 1fr; }
  .pill-row { grid-template-columns: repeat(3, 1fr); }
  .market-table th:nth-child(4), .market-table td:nth-child(4) { display: none; }
}
