:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #fafafa;
  --text: #111318;
  --muted: #68707d;
  --line: #e8ebf0;
  --orange: #ff4f24;
  --orange-dark: #e74016;
  --orange-soft: #fff1ec;
  --green: #0caa65;
  --red: #e24747;
  --amber: #ffb347;
  --shadow: 0 18px 48px rgba(22, 29, 37, 0.1);
  --radius: 8px;
  --mobile-bottom-nav-height: 72px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 79, 36, 0.13), transparent 28%),
    radial-gradient(circle at 72% 10%, rgba(77, 188, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #fff 0%, var(--bg) 36%, #fff 100%);
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 56px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.logo-slot {
  width: 118px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px dashed rgba(255, 79, 36, 0.45);
  border-radius: 6px;
  background: rgba(255, 79, 36, 0.04);
}

.logo-slot.has-image {
  border-color: transparent;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
  flex: 1;
  color: #272b33;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav a {
  padding: 10px 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-button,
.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111318;
  background: #fff;
}

.chip-button {
  min-width: auto;
  padding: 0 14px;
  font-weight: 700;
}

.chip-button.dark {
  color: #fff;
  border-color: #202530;
  background: #202530;
}

.chip-button.primary,
.primary-btn {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
}

.danger-btn {
  color: #fff;
  background: #242933;
}

.notice-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  color: #111318;
  font-weight: 600;
  font-size: 14px;
}

.notice-strip button {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.page {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 36px;
  align-items: center;
  min-height: 550px;
  padding: 58px 0 34px;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero p {
  max-width: 590px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 590px);
  margin: 34px 0;
}

.stat {
  min-width: 0;
  padding: 0 26px;
  border-left: 1px solid #d9dde5;
  text-align: left;
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

@media (min-width: 901px) and (max-width: 1120px) {
  .stat-row {
    width: min(100%, 520px);
  }

  .stat {
    padding: 0 20px;
  }

  .stat strong {
    font-size: 26px;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(380px, 100%);
  min-height: 58px;
  border: 1.5px solid var(--orange);
  border-radius: 999px;
  color: var(--orange);
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  padding: 0 24px;
  box-sizing: border-box;
}

.round-action {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 30, 45, 0.08);
}

.phone-visual {
  position: relative;
  min-height: 510px;
}

.phone {
  position: absolute;
  right: 80px;
  top: 0;
  width: 254px;
  height: 510px;
  padding: 18px;
  border: 10px solid #101319;
  border-radius: 42px;
  color: #fff;
  background: #080a10;
  box-shadow: var(--shadow);
}

.phone::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 86px;
  height: 20px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #050506;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  color: #c8cbd2;
  font-size: 12px;
}

.phone-balance {
  margin: 26px 0 18px;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
}

.phone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.phone-grid span,
.phone-card {
  border-radius: 8px;
  background: #171b24;
}

.phone-grid span {
  height: 45px;
}

.phone-card {
  padding: 13px;
  margin-top: 10px;
}

.phone-card b {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.phone-card em {
  color: var(--orange);
  font-style: normal;
  font-weight: 800;
}

.character-card {
  position: absolute;
  right: 0;
  bottom: 28px;
  width: 185px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.avatar-asset {
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    linear-gradient(#ffd7bd 0 42%, transparent 42%),
    radial-gradient(circle at 50% 36%, #111 0 5px, transparent 6px),
    linear-gradient(135deg, #ff7f4f, #ffe1a8);
}

.avatar-asset.has-image {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.section-title {
  margin: 0 0 18px;
  font-size: 26px;
}

.panel,
.table-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(18, 22, 31, 0.05);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin: 0 0 28px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #2d3340;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.quick-item > span:last-child {
  min-height: 2.4em;
  line-height: 1.2;
  text-align: center;
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 18px;
}

.quick-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.table-panel {
  overflow: hidden;
  margin-bottom: 28px;
  width: 100%;
}

.market-tabs {
  display: flex;
  gap: 24px;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--line);
}

.market-tabs button {
  position: relative;
  padding: 0 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.market-tabs button.active {
  color: var(--text);
}

.market-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--orange);
  content: "";
}

.table-head,
.market-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.table-head {
  grid-template-columns: 1.3fr 1fr 0.8fr;
}

.table-head {
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 800;
}

.table-head span:nth-child(2),
.table-head span:nth-child(3) {
  text-align: right;
}

.market-row {
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
}

.market-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.market-buy-btn {
  min-height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.coin {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.coin > span:last-child {
  min-width: 0;
}

.coin-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: #202530;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 12px;
  font-weight: 800;
}

.coin-logo.has-image {
  color: transparent;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.coin-logo.crypto.has-image,
.coin-logo.commodity.has-image {
  background-size: cover;
}

.coin-logo.stock.has-image {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  object-fit: contain;
}

.pair-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pair-title .coin-logo {
  flex: 0 0 auto;
}

.coin b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.price {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change {
  justify-self: end;
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.change.up {
  background: var(--green);
}

.change.down {
  background: var(--red);
}

.about {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 26px;
  padding: 30px;
  margin-bottom: 40px;
}

.about p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.searchbar {
  display: flex;
  gap: 10px;
  margin: 24px 0 18px;
}

.searchbar input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.searchbar input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  padding: 24px 0 36px;
}

.contract-main,
.trade-ticket,
.contract-order-panel {
  padding: 20px;
}

.contract-order-panel {
  min-width: 0;
}

.contract-inline-amount {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.contract-inline-amount label {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.contract-inline-amount input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  color: var(--text);
  background: #fff;
}

.contract-inline-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  color: #6b7280;
  font-size: 14px;
}

.contract-inline-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.contract-inline-summary b {
  color: #111827;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.contract-inline-btn {
  width: 100%;
  min-height: 52px;
  font-size: 18px;
  font-weight: 800;
}

.contract-expiration-chip {
  display: grid;
  gap: 2px;
  min-width: 122px;
  padding: 10px 8px;
}

.contract-expiration-chip span {
  font-size: 11px;
  color: var(--muted);
}

.contract-expiration-chip b {
  font-size: 15px;
}

.contract-confirm-summary {
  padding: 0;
  background: transparent;
  gap: 12px;
}

.contract-confirm-summary span {
  font-size: 14px;
}

.contract-pair-selector {
  width: min(520px, calc(100vw - 36px));
  max-width: 520px;
}

.contract-pair-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  margin-top: 10px;
}

.contract-pair-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.contract-pair-row .price {
  font-weight: 700;
}

.contract-pair-row .change.up {
  color: var(--green);
}

.contract-pair-row .change.down {
  color: var(--red);
}

.pair-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contract-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.contract-round-btn {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
}

.contract-round-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.pair-price {
  font-size: 32px;
  font-weight: 800;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.mini-stat {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
}

.mini-stat b {
  display: block;
  margin-top: 6px;
}

.intervals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.intervals button {
  min-width: 44px;
  height: 34px;
  border-radius: 6px;
  color: #4b5360;
  background: #f0f2f6;
  font-weight: 800;
}

.intervals button.active {
  color: #fff;
  background: #202530;
}

.chart {
  position: relative;
  width: 100%;
  height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

#contract-chart-container {
  width: 100%;
  height: 100%;
}

#contract-chart-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.candle {
  position: absolute;
  bottom: var(--bottom);
  left: var(--left);
  width: 9px;
  height: var(--height);
  border-radius: 3px;
  background: var(--color);
}

.candle::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -24px;
  width: 1px;
  height: calc(100% + 48px);
  background: var(--color);
  opacity: 0.75;
}

.ticket-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.ticket-tabs button {
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
}

.ticket-tabs .up {
  background: var(--green);
}

.ticket-tabs .down {
  background: var(--red);
}

.ticket-tabs button.inactive {
  color: var(--muted);
  background: #f0f2f6;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  color: #303641;
  font-size: 13px;
  font-weight: 800;
}

.field textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.ticket-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.ticket-summary div {
  display: flex;
  justify-content: space-between;
}

.ticket-summary b {
  color: var(--text);
}

.contract-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
}

.contract-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 19, 25, 0.22);
}

.contract-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.contract-modal h2 {
  margin: 0;
  font-size: 22px;
}

.modal-close {
  width: 36px;
  height: 36px;
  color: #647084;
  background: transparent;
  font-size: 32px;
  line-height: 1;
}

/* Subscription success popup */
.subscription-success-modal .contract-modal-head {
  border-bottom: none;
}

.subscription-success-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 8px 8px 24px;
}

.subscription-success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #00c853;
  background: rgba(0, 200, 83, 0.1);
}

.subscription-success-icon svg {
  width: 32px;
  height: 32px;
}

.subscription-success-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #151d2b;
}

.subscription-success-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.subscription-success-actions .primary-btn {
  min-width: 120px;
}

.contract-overlay.subscription-success-overlay {
  z-index: 40;
}

.contract-option-block {
  margin-top: 18px;
}

.contract-option-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.contract-chip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.contract-chip-row.leverage {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.scroll-row {
  display: flex;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scroll-row .contract-chip {
  min-width: 122px;
}

.contract-chip {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6fa;
  color: var(--text);
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.contract-chip b {
  display: block;
  font-size: 16px;
}

.contract-chip span {
  display: block;
  margin-top: 3px;
  color: #ff4f24;
  font-size: 12px;
}

.contract-chip.active {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.contract-chip.active span {
  color: #fff;
}

.contract-custom {
  margin-top: 16px;
}

.contract-account-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.contract-account-line b {
  color: var(--text);
}

.contract-order-summary {
  display: grid;
  gap: 10px;
  margin: 20px 0 28px;
  padding: 16px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
}

.contract-order-summary span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.contract-order-summary b {
  color: var(--text);
}

.contract-order-summary .accent {
  color: var(--orange);
}

.contract-live-modal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: min(520px, calc(100vw - 36px));
  max-width: 520px;
  max-height: calc(100vh - 56px);
  padding: 26px 28px 28px;
  border-radius: 16px;
  color: #111827;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  overflow-y: auto;
  scrollbar-width: none;
  text-align: left;
}

.contract-live-modal::-webkit-scrollbar {
  display: none;
}

.contract-live-modal .modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: #6b7280;
  font-size: 32px;
}

.contract-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-right: 40px;
}

.contract-live-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.contract-live-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.contract-live-direction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.contract-live-direction.sell {
  background: #dc2626;
}

.contract-live-time {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.contract-live-time span {
  color: #6b7280;
  font-size: 13px;
}

.contract-live-time strong {
  color: #d97706;
  font-size: 42px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.contract-live-price {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.contract-live-price span {
  color: #6b7280;
  font-size: 14px;
}

.contract-live-price strong {
  color: #111827;
  font-size: 36px;
  font-weight: 800;
}

.contract-live-price small {
  color: #6b7280;
  font-size: 18px;
  font-weight: 500;
}

.contract-live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid #e5e7eb;
}

.contract-live-summary span {
  display: grid;
  gap: 6px;
  text-align: center;
}

.contract-live-summary small {
  color: #6b7280;
  font-size: 12px;
}

.contract-live-summary b {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.contract-live-summary b.positive {
  color: #16a34a;
}

.contract-live-profit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #f0fdf4;
}

.contract-live-profit span {
  display: grid;
  gap: 4px;
}

.contract-live-profit small {
  color: #6b7280;
  font-size: 12px;
}

.contract-live-profit b {
  color: #16a34a;
  font-size: 22px;
  font-weight: 800;
}

.contract-live-profit b.positive {
  color: #16a34a;
}

.contract-countdown {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.contract-countdown-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.contract-countdown-track {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 10;
}

.contract-countdown-progress {
  fill: none;
  stroke: #65c51b;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.contract-countdown-progress.urgent {
  stroke: #dc3d45;
}

.contract-countdown-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 2px;
}

.contract-countdown-text strong {
  color: #65c51b;
  font-size: 52px;
  line-height: 1;
}

.contract-countdown-text span {
  color: var(--muted);
  font-size: 13px;
}

.contract-history-modal {
  max-width: 720px;
}

.contract-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.contract-history-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 0.7fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.contract-history-row b,
.contract-history-row small {
  display: block;
}

.contract-history-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.notice-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.notice-row .notice-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.contract-continue {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #35c957 0%, #21ab42 100%);
  font-weight: 900;
  font-size: 20px;
}

.contract-result-modal {
  width: min(520px, calc(100vw - 36px));
  max-width: 520px;
  display: grid;
  gap: 18px;
  padding: 26px 28px 28px;
  text-align: center;
}

.contract-result-modal .modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--muted);
  font-size: 32px;
}

.contract-result-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.contract-result-pnl {
  padding: 18px;
  border-radius: 12px;
  background: var(--panel-soft);
}

.contract-result-pnl strong {
  font-size: 36px;
  line-height: 1;
}

.contract-result-rows {
  display: grid;
  gap: 0;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--panel-soft);
  text-align: left;
}

.contract-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.contract-result-row:last-child {
  border-bottom: 0;
}

.contract-result-row span {
  color: var(--muted);
  font-size: 14px;
}

.contract-result-row b {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.contract-result-modal.profit .contract-result-pnl strong {
  color: var(--green);
}

.contract-result-modal.loss .contract-result-pnl strong {
  color: var(--red);
}

.contract-result-modal.draw .contract-result-pnl strong {
  color: var(--muted);
}

.contract-result-status {
  display: inline-block;
  margin: 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.contract-result-status.positive {
  color: #fff;
  background: var(--green);
}

.contract-result-status.negative {
  color: #fff;
  background: var(--red);
}

.contract-result-status.muted {
  color: #fff;
  background: var(--muted);
}

.synthetic-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}

.synthetic-phase-synthetic {
  background: #8b5cf6;
}

.synthetic-phase-reversion {
  background: #f59e0b;
}

.synthetic-phase-natural {
  background: #10b981;
}

.spot-shortcut {
  width: 100%;
  margin-top: 12px;
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 56px);
  padding: 40px 18px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: var(--orange);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 28px 0 40px;
}

.assets-screen {
  width: min(760px, calc(100% - 24px));
  padding: 20px 0 92px;
  margin: 0 auto;
}

.assets-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.assets-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
  background: transparent;
  box-shadow: none;
}

.assets-tabs button {
  position: relative;
  min-height: 36px;
  padding: 0 24px;
  border: none;
  color: #9ca3af;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.assets-tabs button:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}

.assets-tabs button.active {
  color: var(--orange);
  background: transparent;
}

.assets-tabs button.active::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
}

.assets-overview {
  display: block;
}

.assets-stock .assets-balance-card,
.assets-crypto .assets-balance-card,
.assets-stock .assets-holdings-card,
.assets-crypto .assets-holdings-card {
  width: 100%;
}

.assets-balance-card,
.assets-holdings-card {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(21, 29, 43, 0.04);
}

.assets-balance-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.assets-balance-head i {
  display: inline-flex;
  align-items: center;
  color: #9ca3af;
}

.assets-balance-head svg {
  width: 18px;
  height: 18px;
}

.assets-balance-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.assets-balance-value strong {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #111827;
}

.assets-balance-value b {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.assets-balance-fiat {
  display: block;
  margin-bottom: 10px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
}

.assets-frozen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
}

.assets-frozen-row span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.frozen-breakdown-content {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

.frozen-breakdown-section h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.frozen-breakdown-section h4 span {
  font-weight: 600;
  color: var(--muted);
}

.frozen-breakdown-list {
  display: grid;
  gap: 8px;
}

.frozen-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fc;
  font-size: 13px;
}

.frozen-breakdown-asset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.frozen-breakdown-source {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frozen-breakdown-amount {
  text-align: right;
  font-weight: 700;
}

.frozen-breakdown-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.frozen-breakdown-icon.has-image {
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.frozen-breakdown-icon.stock {
  background-size: 92%;
}

.frozen-bundle-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 11px;
}

.frozen-bundle-icon svg {
  width: 16px;
  height: 16px;
}

.frozen-bundle-icon span {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frozen-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 2px solid var(--line);
  font-size: 16px;
  font-weight: 800;
}

.assets-pnl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.assets-pnl-row > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.assets-pnl-row > span:last-child svg {
  width: 16px;
  height: 16px;
  color: #9ca3af;
}

.asset-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.asset-actions a,
.asset-actions button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #111827;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.asset-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--orange);
  background: #fff7e6;
  flex-shrink: 0;
}

.asset-actions span svg {
  width: 18px;
  height: 18px;
}

.assets-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.assets-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}

.assets-section-head > span {
  display: inline-flex;
  gap: 12px;
  color: #9ca3af;
}

.assets-section-head > span svg {
  width: 20px;
  height: 20px;
}

.assets-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.75fr);
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.assets-table-head span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assets-holding-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.75fr);
  gap: 8px;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.assets-holding-row:first-of-type {
  border-top: none;
}

.assets-holding-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.assets-holding-cell.asset {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.assets-holding-cell.asset > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.assets-holding-cell b {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assets-holding-cell small {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assets-holding-cell.value small,
.assets-holding-cell.total small,
.assets-holding-cell.pnl small {
  margin-top: -2px;
}

.assets-holding-cell.pnl b,
.assets-holding-cell.total b {
  color: var(--green);
}

.assets-holding-cell.pnl small,
.assets-holding-cell.total small {
  color: var(--green);
}

.assets-holding-cell.pnl.negative b,
.assets-holding-cell.pnl.negative small,
.assets-holding-cell.total.negative b,
.assets-holding-cell.total.negative small {
  color: var(--red);
}

.assets-holding-cell.total {
  position: relative;
  padding-right: 14px;
}

.assets-holding-cell.total em {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: #9ca3af;
}

.assets-holding-cell.total em svg {
  width: 14px;
  height: 14px;
}

.category-icon,
.asset-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.category-icon.overview {
  background: #ff8f6c;
}

.category-icon.stock {
  background: #ffb84d;
}

.category-icon.crypto {
  background: #f7931a;
}

.asset-logo.crypto {
  background: #18b78f;
}

.asset-logo.stock {
  background: var(--orange);
}

.asset-logo.has-image {
  color: transparent;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.asset-logo.crypto.has-image,
.asset-logo.commodity.has-image {
  background-size: cover;
}

.asset-logo.stock.has-image {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  object-fit: contain;
}

.assets-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  margin: 14px 0 0;
  border-radius: 10px;
  color: #6b7280;
  background: #f9fafb;
  font-size: 13px;
  line-height: 1.4;
}

.assets-hint button {
  padding: 0;
  border: none;
  color: var(--orange);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.balance-card {
  grid-column: 1 / -1;
  padding: 26px;
  color: #fff;
  background: linear-gradient(135deg, #1c222e, #323948);
}

.balance-value {
  margin-top: 12px;
  font-size: 38px;
  font-weight: 800;
}

.asset-list,
.profile-menu {
  padding: 20px;
}

.asset-row,
.menu-row,
.notice-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.asset-row:first-child,
.menu-row:first-child,
.notice-row:first-child {
  border-top: 0;
}

.me-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  padding: 56px 22px 92px;
  background: #f3f5f9;
}

.me-profile-card,
.me-menu-card,
.me-logout-card {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.04);
}

.me-profile-card {
  padding: 28px 26px;
}

.me-profile-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.me-profile-card p {
  margin: 4px 0;
  color: var(--muted);
}

.me-profile-card .credit-score-line {
  margin-top: 12px;
  color: var(--text);
  font-weight: 700;
}

.credit-score-line b {
  font-weight: 900;
}

.invite-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.invite-line b {
  color: #657086;
  letter-spacing: 0.04em;
}

.invite-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #657086;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.invite-code-copy svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}

.invite-code-copy:active {
  opacity: 0.7;
}

.invite-code-copy:focus-visible {
  outline: 2px solid var(--primary, #f0b90b);
  outline-offset: 2px;
}

.me-profile-card h2 {
  margin: 22px 0 0;
  font-size: 38px;
  line-height: 1.1;
}

.me-menu-card,
.me-logout-card {
  padding: 18px 20px;
  margin-top: 40px;
}

.me-menu-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr 22px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.me-menu-row:first-child {
  border-top: 0;
}

.me-menu-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--text);
}

.me-menu-row b {
  font-size: 15px;
  font-weight: 600;
}

.me-menu-row i {
  color: #7b8495;
  font-style: normal;
  text-align: right;
}

.me-menu-row em {
  position: absolute;
  top: 8px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #fff;
  background: #ff2638;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.me-logout-card button {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  color: #fff;
  background: #252a35;
  font-size: 16px;
  font-weight: 900;
}

.security-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 56px);
  padding: 0 14px 92px;
  background: #f3f5f9;
}

.security-screen .mobile-page-head {
  margin: 0 -14px 12px;
}

.security-menu-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.security-menu-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: #fff;
  font-size: 15px;
  text-align: left;
}

.security-menu-card button:first-child {
  border-top: 0;
}

.security-menu-card em {
  color: #7b8495;
  font-style: normal;
  font-size: 22px;
}

.password-form-card {
  width: min(326px, calc(100% - 32px));
  padding: 20px;
  margin: 40px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(21, 29, 43, 0.06);
}

.password-field {
  display: block;
  margin-bottom: 16px;
}

.password-field span {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 900;
}

.password-input {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.password-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
  font-size: 16px;
}

.password-input input::placeholder {
  color: #7b8495;
}

.password-input i {
  color: #657086;
  font-style: normal;
  font-weight: 900;
}

.password-reset-btn {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 17px;
  font-weight: 900;
}

.notification-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 56px);
  padding: 0 14px 92px;
  background: #f3f5f9;
}

.notification-screen .mobile-page-head {
  margin: 0 -14px 12px;
}

.notification-list {
  display: grid;
  gap: 12px;
}

.notification-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.04);
}

.notification-card.unread {
  border-left: 4px solid var(--orange);
}

.notification-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #7b8495;
  font-size: 12px;
  font-weight: 800;
}

.notification-card span {
  color: var(--orange);
}

.notification-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.notification-card p {
  margin: 0;
  color: #465166;
  line-height: 1.45;
}

.notification-detail-overlay {
  z-index: 1100;
}

.notification-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notification-detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #7b8495;
  font-size: 13px;
}

.notification-detail-type {
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
}

.notification-detail-body {
  white-space: pre-wrap;
  color: #1a1f2b;
  line-height: 1.6;
  font-size: 15px;
}

.referral-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 56px);
  padding: 0 14px 92px;
  background: #f3f5f9;
}

.referral-screen .mobile-page-head {
  margin: 0 -14px 12px;
}

.referral-card,
.referral-list-card {
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.04);
  margin-bottom: 14px;
}

.referral-card h2,
.referral-list-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.referral-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.referral-total b {
  color: var(--green);
}

.kyc-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 56px);
  padding: 0 28px 92px;
  background: #f3f5f9;
}

.kyc-screen .mobile-page-head {
  margin: 0 -28px 28px;
}

.kyc-phone-card,
.kyc-upload-card {
  border: 1px solid var(--line);
  background: #fff;
}

.kyc-phone-card {
  margin-bottom: 14px;
}

.kyc-phone-card label {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
}

.kyc-phone-card span {
  color: #465166;
}

.kyc-phone-card input {
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
  font-size: 15px;
}

.kyc-phone-card input::placeholder {
  color: #b3bac5;
}

.kyc-upload-card {
  padding: 16px 18px 26px;
  border-radius: 8px;
}

.kyc-upload-card h2 {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 16px;
}

.kyc-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: start;
  justify-content: center;
}

.kyc-upload-tile {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  color: #465166;
}

.kyc-upload-tile input {
  display: none;
}

.kyc-upload-tile b {
  font-weight: 500;
}

.kyc-upload-tile span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  color: #c6ccd5;
  background: #f2f4f7;
}

.kyc-upload-tile em {
  max-width: 112px;
  min-height: 16px;
  overflow: hidden;
  color: #7b8495;
  font-size: 11px;
  font-style: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kyc-submit-btn {
  width: 100%;
  height: 50px;
  margin-top: 26px;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 16px;
  font-weight: 900;
}

@media (min-width: 761px) {
  .me-screen {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
    gap: 24px;
    align-items: start;
    width: min(960px, calc(100% - 48px));
    padding: 40px 0 56px;
    background: transparent;
  }

  .me-profile-card,
  .me-menu-card,
  .me-logout-card {
    box-shadow: 0 14px 38px rgba(21, 29, 43, 0.06);
  }

  .me-profile-card {
    position: sticky;
    top: 76px;
    min-height: 360px;
  }

  .me-menu-card {
    margin-top: 0;
  }

  .me-logout-card {
    grid-column: 2;
    margin-top: -8px;
  }

  .security-screen,
  .notification-screen,
  .kyc-screen {
    width: min(760px, calc(100% - 48px));
    min-height: calc(100vh - 57px);
    margin: 0 auto;
    padding: 40px 0 80px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .security-screen .mobile-page-head,
  .notification-screen .mobile-page-head,
  .kyc-screen .mobile-page-head {
    width: min(560px, 100%);
    margin: 0 auto 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .security-menu-card,
  .password-form-card,
  .notification-list,
  .kyc-phone-card,
  .kyc-upload-card,
  .kyc-submit-btn {
    width: min(560px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .notification-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-list .empty-state {
    grid-column: 1 / -1;
  }

  .kyc-upload-grid {
    gap: 72px;
  }

  .auth-card {
    width: min(520px, 100%);
  }
}

.form-page {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 56px);
  padding: 28px 0 56px;
  margin: 0 auto;
}

.form-panel {
  width: 100%;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(21, 29, 43, 0.06);
}

.form-panel > h1 {
  margin-top: 0;
}

.form-panel > .field,
.form-panel > .secondary-btn,
.form-panel > .rules,
.form-panel > .muted,
.form-panel > .swap-preview,
.form-panel > .primary-btn,
.form-panel > .telegram-support {
  max-width: 720px;
}

.telegram-support {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 18px;
  border: 1px solid #b8e1ff;
  border-radius: 12px;
  color: #0088cc;
  background: #f0f9ff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.telegram-support:hover {
  background: #e0f3ff;
  border-color: #0088cc;
}

.telegram-support-placeholder {
  color: #7b8495;
  background: #f3f5f9;
  border-color: #e0e2e8;
  cursor: default;
}

.telegram-support svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.help-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 18px;
  max-width: 720px;
}

.help-actions .primary-btn,
.help-actions .telegram-support,
.help-actions .telegram-support-placeholder {
  flex: 1 1 0;
  margin-top: 0;
  min-height: 46px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.withdraw-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eef0f4;
  margin-bottom: 24px;
  max-width: 720px;
}

.withdraw-tab {
  flex: 1;
  padding: 14px 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 15px;
  font-weight: 600;
  color: #7b8495;
  cursor: pointer;
}

.withdraw-tab.active {
  color: var(--orange, #ff6c60);
  border-bottom-color: var(--orange, #ff6c60);
}

.currency-field .currency-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.currency-field select {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  appearance: none;
  cursor: pointer;
}

.currency-field .chevron {
  color: #c6ccd5;
  transform: rotate(90deg);
  font-size: 14px;
}

.currency-display .asset-icon {
  margin-right: 10px;
}

.amount-input-wrap {
  position: relative;
}

.amount-input-wrap input {
  width: 100%;
  padding-right: 60px;
}

.amount-input-wrap .all-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: var(--orange, #ff6c60);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.balance-line {
  color: #465166;
  font-size: 14px;
  margin: 8px 0 18px;
}

.balance-line b {
  color: #10b981;
  font-weight: 700;
}

.link-action {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--orange, #ff6c60);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.add-withdraw-form {
  padding: 16px;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0 16px;
}

.add-withdraw-form .field {
  margin-bottom: 12px;
}

.withdraw-submit {
  width: 100%;
}

.withdraw-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.withdraw-credit-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  color: #92400e;
  background: #fef3c7;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.withdraw-credit-warning svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #f59e0b;
}

.submit-field {
  margin-bottom: 0;
  margin-top: 8px;
}

.withdraw-fields {
  max-width: 720px;
}

.balance-line {
  max-width: 720px;
}

.withdraw-page {
  width: 100%;
  padding: 0 0 56px;
  margin: 0;
}

.withdraw-page .mobile-page-head {
  width: 100%;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.withdraw-page .mobile-page-head .contract-round-btn {
  width: 40px;
  height: 40px;
  justify-self: end;
  margin-right: 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  font-size: 18px;
}

.withdraw-page .mobile-page-head .contract-round-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.withdraw-page .form-panel {
  width: 100%;
  max-width: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 0 0 32px;
}

.withdraw-page .form-panel > * {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.withdraw-page .withdraw-tabs {
  margin-top: 24px;
}

.swap-preview {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.deposit-screen {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(420px, 1.12fr);
  gap: 20px;
  align-items: start;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 56px);
  padding: 0 0 92px;
  margin: 0 auto;
  background: #f3f5f9;
}

.mobile-page-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px 1fr minmax(44px, auto);
  align-items: center;
  height: 52px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.mobile-page-head button {
  height: 44px;
  color: var(--text);
  background: transparent;
  font-size: 22px;
}

.mobile-page-head h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.mobile-page-head button[data-action="mark-all-read"] {
  padding: 0 10px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.deposit-form-card,
.deposit-qr-card,
.deposit-upload-card,
.deposit-rules-card {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.deposit-form-card {
  padding: 4px 16px;
}

.deposit-form-card label {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--line);
}

.deposit-form-card label:first-child {
  border-top: 0;
}

.deposit-form-card span {
  color: #465166;
}

.deposit-form-card b,
.deposit-upload-card h2 {
  color: var(--orange);
}

.deposit-form-card select,
.deposit-form-card input {
  width: 100%;
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
}

.deposit-form-card input::placeholder {
  color: #b3bac5;
}

.deposit-form-card em {
  color: #98a1b1;
  font-style: normal;
  font-size: 24px;
}

.deposit-qr-card {
  grid-column: 2;
  grid-row: 2 / span 3;
  display: grid;
  justify-items: center;
  padding: 34px 22px 30px;
}

.deposit-qr-img {
  width: 220px;
  height: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 24px rgba(20, 210, 170, 0.17);
  object-fit: contain;
}

.deposit-address {
  width: min(330px, 100%);
  padding: 14px 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  font-family: Consolas, monospace;
  text-align: center;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.copy-btn,
.deposit-submit {
  width: min(360px, 100%);
  height: 50px;
  margin-top: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.copy-btn {
  margin-top: 0;
}

.deposit-upload-card {
  grid-column: 1;
  padding: 20px 16px 26px;
}

.deposit-upload-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.upload-tile {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  background: #f2f4f7;
}

.upload-tile input {
  display: none;
}

.upload-tile span {
  color: #c6ccd5;
}

.deposit-upload-area {
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
}

.deposit-upload-area input {
  display: none;
}

.deposit-upload-placeholder {
  display: grid;
  place-items: center;
  gap: 6px;
  width: 100%;
  min-height: 160px;
  padding: 20px;
  background: #f2f4f7;
  border-radius: 8px;
  color: #c6ccd5;
  text-align: center;
}

.deposit-upload-placeholder span {
  width: 48px;
  height: 48px;
}

.deposit-upload-placeholder small {
  font-size: 12px;
  color: #7b8495;
}

.deposit-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
}

.deposit-preview-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.remove-screenshot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deposit-file-name {
  font-size: 12px;
  color: #465166;
  word-break: break-all;
  text-align: center;
}

.deposit-rules-card {
  grid-column: 1 / -1;
  padding: 20px;
}

.deposit-rules-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.deposit-rules-card ul {
  margin: 0;
  padding-left: 18px;
}

.deposit-rules-card li {
  margin: 12px 0;
  color: #465166;
  line-height: 1.35;
}

.deposit-rules-card b {
  color: var(--text);
}

.deposit-submit {
  grid-column: 1 / -1;
  display: block;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .form-page {
    width: calc(100% - 20px);
    min-height: auto;
    padding: 28px 0 92px;
  }

  .form-panel {
    padding: 24px;
  }

  .withdraw-page {
    width: 100%;
    padding: 0 0 92px;
  }

  .withdraw-page .form-panel {
    padding: 0 0 24px;
  }

  .withdraw-page .form-panel > * {
    padding-left: 16px;
    padding-right: 16px;
  }

  .withdraw-page .withdraw-tabs {
    margin-top: 18px;
  }

  .form-panel > .field,
  .form-panel > .secondary-btn,
  .form-panel > .rules,
  .form-panel > .muted,
  .form-panel > .primary-btn {
    max-width: none;
  }

  .deposit-screen {
    display: block;
    width: min(430px, 100%);
    padding: 0 10px 92px;
  }

  .mobile-page-head {
    margin: 0 -10px 12px;
  }

  .deposit-form-card,
  .deposit-qr-card,
  .deposit-upload-card,
  .deposit-rules-card {
    margin-bottom: 24px;
  }

  .deposit-form-card {
    border-radius: 0;
  }

  .deposit-qr-card {
    padding: 26px 16px 24px;
  }

  .deposit-submit {
    width: 100%;
    margin: 0 auto;
  }

  .withdraw-tabs {
    margin-bottom: 18px;
  }

  .withdraw-tab {
    padding: 12px 8px;
    font-size: 14px;
  }

  .amount-input-wrap .all-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .withdraw-submit {
    width: 100%;
  }

  .deposit-upload-placeholder {
    min-height: 120px;
  }

  .remove-screenshot {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}

.rules {
  margin: 22px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.rules h3 {
  margin: 0 0 12px;
}

.rules li {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 40;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #202530;
  box-shadow: var(--shadow);
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: 0.2s ease;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.hide-desktop {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  width: 100%;
  min-height: var(--mobile-bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
  box-sizing: border-box;
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav a.active {
  color: var(--orange);
}

.muted {
  color: var(--muted);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.buy-hold-page .form-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.buy-hold-page .form-panel > h1 {
  grid-column: 1 / -1;
}

.buy-summary {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.buy-summary h2 {
  margin: 14px 0 8px;
  font-size: 28px;
}

.buy-hold-page .field,
.buy-hold-page .primary-btn {
  max-width: none;
}

.buy-hold-page .primary-btn {
  align-self: end;
  width: 100%;
}

.product-card h2 {
  margin: 0;
  font-size: 22px;
}

.bundle-plan-page {
  padding: 24px;
}

.bundle-plan-page .page-section + .page-section {
  margin-top: 36px;
}

.bundle-plan-page .page-title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 700;
}

.bundle-plan-page .section-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 600;
}

.product-card p {
  margin: 0;
  line-height: 1.6;
}

.product-card .compact-field {
  margin: 4px 0 0;
}

.mini-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.mini-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row div {
  display: grid;
  gap: 4px;
}

.list-row div:last-child {
  text-align: right;
}

.list-row small {
  color: var(--muted);
}

.product-tag {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 12px;
  font-weight: 800;
}

.product-metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.product-metric span {
  color: var(--muted);
}

.bundle-detail-page {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 104px;
}

.bundle-detail-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 18px;
  background: transparent;
  border: 0;
}

.bundle-detail-head h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 4vw, 34px);
}

.bundle-detail-head .icon-only {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: transparent;
}

.bundle-hero-card,
.bundle-composition-card,
.bundle-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(24, 31, 42, 0.06);
}

.bundle-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 0.72fr);
  gap: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.bundle-hero-copy {
  align-self: center;
}

.bundle-hero-copy h2 {
  margin: 28px 0 16px;
  font-size: clamp(28px, 4.8vw, 40px);
}

.bundle-hero-copy p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.75;
}

.bundle-illustration {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.bundle-coin {
  position: absolute;
  z-index: 2;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 34px;
  box-shadow: 0 16px 28px rgba(21, 31, 48, 0.12);
}

.coin-blue {
  left: 42px;
  top: 42px;
  color: #fff;
  background: linear-gradient(145deg, #7b8cff, #3d65f4);
}

.coin-orange {
  top: 8px;
  right: 74px;
  color: #fff;
  background: linear-gradient(145deg, #ff9a22, var(--orange));
}

.coin-white {
  right: 24px;
  top: 78px;
  color: #111318;
  background: #fff;
}

.open-box {
  position: absolute;
  bottom: 22px;
  width: 180px;
  height: 106px;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffd7c2, #ffb27b);
  transform: skewY(-5deg);
  box-shadow: 0 18px 36px rgba(255, 112, 48, 0.18);
}

.open-box::before,
.open-box::after {
  content: "";
  position: absolute;
  top: -32px;
  width: 100px;
  height: 58px;
  background: rgba(255, 226, 211, 0.95);
}

.open-box::before {
  left: -32px;
  transform: skewY(18deg) rotate(-18deg);
}

.open-box::after {
  right: -28px;
  transform: skewY(-18deg) rotate(18deg);
}

.bundle-hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 18px;
}

.bundle-hero-metrics div,
.bundle-overview-card div {
  min-width: 0;
  text-align: center;
}

.bundle-hero-metrics div + div,
.bundle-overview-card div + div {
  border-left: 1px solid var(--line);
}

.bundle-hero-metrics span,
.bundle-overview-card span,
.bundle-composition-row span {
  display: block;
  color: var(--muted);
}

.bundle-hero-metrics b,
.bundle-overview-card b {
  display: block;
  margin-top: 12px;
  font-size: clamp(18px, 3vw, 25px);
}

.bundle-hero-metrics div:nth-child(2) b,
.bundle-overview-card div:nth-child(2) b {
  color: var(--orange);
}

.bundle-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 14px;
}

.bundle-section-title h2,
.bundle-overview h2 {
  margin: 0;
  font-size: 26px;
}

.bundle-section-title button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  background: transparent;
  font-weight: 800;
}

.bundle-composition-card {
  padding: 0 32px;
}

.bundle-composition-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.2fr) minmax(92px, 0.65fr) minmax(128px, 0.85fr);
  gap: 18px;
  align-items: center;
  padding: 28px 0;
}

.bundle-composition-row + .bundle-composition-row {
  border-top: 1px solid var(--line);
}

.bundle-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.bundle-logo-tslax {
  background: #e82127;
}

.bundle-logo-amznx {
  color: #111318;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.bundle-logo-metax {
  background: linear-gradient(145deg, #4d91ff, #3162e8);
}

.bundle-middle b,
.bundle-allocation b,
.bundle-right b {
  display: block;
  font-size: 20px;
}

.bundle-middle span,
.bundle-allocation span,
.bundle-right span {
  margin-top: 6px;
}

.bundle-right {
  text-align: right;
}

.bundle-overview {
  margin-top: 30px;
}

.bundle-overview-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding: 28px 0;
}

.overview-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: var(--orange);
  background: var(--orange-soft);
}

.bundle-note {
  position: relative;
  margin: 34px 0 22px;
  padding-left: 34px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.bundle-note::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.bundle-amount-field {
  margin: 0 0 14px;
}

.bundle-join-btn {
  width: 100%;
  min-height: 58px;
  font-size: 20px;
}

.my-bundle-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 106px;
}

.my-bundle-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 28px;
  background: transparent;
  border: 0;
}

.my-bundle-head h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
}

.my-bundle-head .icon-only {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: transparent;
}

.my-bundle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.my-bundle-main,
.my-bundle-side {
  display: grid;
  gap: 24px;
}

.my-bundle-success {
  min-height: 210px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  padding: 10px 20px 24px;
}

.success-check {
  width: 92px;
  height: 92px;
  position: relative;
  border-radius: 50%;
  background: var(--orange-soft);
}

.success-check::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 26px;
  width: 26px;
  height: 45px;
  border-right: 6px solid var(--orange);
  border-bottom: 6px solid var(--orange);
  transform: rotate(40deg);
}

.success-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
}

.success-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.success-rocket {
  position: relative;
  min-height: 190px;
}

.rocket-body {
  position: absolute;
  left: 76px;
  top: 0;
  z-index: 2;
  width: 70px;
  height: 128px;
  border-radius: 50% 50% 38% 38%;
  background: linear-gradient(180deg, #ff6a3d 0 18%, #fff0e8 18% 100%);
  box-shadow: 0 18px 36px rgba(255, 112, 48, 0.2);
}

.rocket-body::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 34px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #10131a;
  box-shadow: inset 0 0 0 5px var(--orange);
}

.rocket-body::after {
  content: "";
  position: absolute;
  left: 27px;
  bottom: -34px;
  width: 16px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(#ff6a3d, #ffd1bd);
}

.rocket-box {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 170px;
  height: 92px;
  background: linear-gradient(135deg, #ffe6d8, #ffc19c);
  clip-path: polygon(50% 12%, 100% 34%, 100% 78%, 50% 100%, 0 78%, 0 34%);
  box-shadow: 0 20px 38px rgba(255, 112, 48, 0.16);
}

.my-bundle-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(24, 31, 42, 0.06);
}

.my-bundle-summary,
.performance-card,
.holdings-card {
  padding: 34px 40px;
}

.summary-title-row,
.bundle-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bundle-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 28px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 20px;
  font-weight: 900;
}

.bundle-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.my-bundle-summary h2 {
  margin: 28px 0 28px;
  font-size: clamp(30px, 3vw, 42px);
}

.summary-metrics {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr;
}

.summary-metrics div + div {
  border-left: 1px solid var(--line);
  padding-left: 34px;
}

.summary-metrics span,
.performance-grid span,
.bundle-progress-line span {
  display: block;
  color: var(--muted);
  font-size: 18px;
}

.summary-metrics b {
  display: block;
  margin-top: 12px;
  font-size: 22px;
}

.bundle-card-head h2,
.holdings-card h2 {
  margin: 0;
  font-size: 28px;
}

.bundle-card-head button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  background: transparent;
  font-size: 18px;
  font-weight: 900;
}

.performance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 34px;
}

.performance-grid b {
  display: block;
  margin-top: 14px;
  font-size: 31px;
}

.performance-grid small,
.performance-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
}

.performance-grid small {
  color: var(--muted);
}

.bundle-progress-line {
  margin-top: 42px;
}

.bundle-progress-line div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.bundle-progress-line b {
  font-size: 18px;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf1;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3b1f, var(--orange));
}

.holdings-card .bundle-composition-row {
  grid-template-columns: 58px minmax(0, 1fr) 72px 116px;
  gap: 14px;
  padding: 24px 0;
}

.holdings-card .bundle-middle,
.holdings-card .bundle-allocation,
.holdings-card .bundle-right {
  min-width: 0;
}

.holdings-card .bundle-middle span,
.holdings-card .bundle-allocation span,
.holdings-card .bundle-right span {
  overflow-wrap: anywhere;
}

.holdings-card .bundle-middle b,
.holdings-card .bundle-allocation b,
.holdings-card .bundle-right b {
  font-size: 18px;
}

.holdings-card .bundle-composition-row span {
  font-size: 14px;
  line-height: 1.35;
}

.holdings-card .bundle-composition-row:first-of-type {
  margin-top: 22px;
}

.my-bundle-note {
  margin: 0;
  padding: 28px 32px 28px 82px;
  border: 1px solid #ffe2d4;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 243, 236, 0.95), rgba(255, 255, 255, 0.95));
  font-size: 20px;
}

.my-bundle-note::before {
  left: 38px;
  top: 33px;
  width: 28px;
  height: 28px;
  color: #ff9a5b;
  font-size: 16px;
}

@media (max-width: 900px) {
  .topbar {
    gap: 12px;
    padding: 0 14px;
  }

  .desktop-nav {
    display: none;
  }

  .top-actions .hide-mobile {
    display: none;
  }

  .hide-desktop {
    display: block !important;
  }

  .hide-desktop.flex {
    display: flex !important;
  }

  .hide-desktop.grid {
    display: grid !important;
  }

  .page {
    width: min(760px, 100%);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 34px 18px 24px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .phone-visual {
    min-height: 372px;
    overflow: hidden;
  }

  .phone {
    left: 50%;
    right: auto;
    width: 220px;
    height: 354px;
    padding: 14px;
    border-width: 8px;
    border-radius: 34px;
    transform: translateX(-50%);
  }

  .phone::before {
    top: 8px;
    width: 76px;
    height: 18px;
  }

  .phone-top {
    margin-top: 18px;
  }

  .phone-balance {
    margin: 18px 0 12px;
    font-size: 27px;
  }

  .phone-grid {
    gap: 8px;
    margin-bottom: 10px;
  }

  .phone-grid span {
    height: 36px;
  }

  .phone-card {
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 14px;
  }

  .phone-card:last-child {
    display: none;
  }

  .character-card {
    display: none;
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 0 10px;
    margin-top: 8px;
  }

  .table-panel,
  .about,
  .contract-layout,
  .dashboard,
  .form-page {
    width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
  }

  .about,
  .contract-layout,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .contract-order-panel {
    grid-column: 1 / -1;
  }

  .assets-screen {
    width: min(760px, calc(100% - 20px));
  }

  .assets-overview {
    display: block;
  }

  .bottom-nav {
    display: grid;
  }
}

@media (max-width: 560px) {
  .topbar {
    height: 58px;
  }

  .logo-slot {
    width: 122px;
  }

  .chip-button {
    padding: 0 12px;
    font-size: 14px;
  }

  .notice-strip {
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12px;
    gap: 8px;
  }

  .notice-strip button {
    padding: 5px 10px;
    font-size: 11px;
  }

  .hero {
    padding-top: 28px;
    gap: 20px;
  }

  .hero h1 {
    font-size: 31px;
    line-height: 1.12;
  }

  .hero p {
    font-size: 15px;
    line-height: 1.55;
  }

  .phone-visual {
    min-height: 268px;
  }

  .phone {
    width: 150px;
    height: 230px;
    padding: 12px;
    border-width: 8px;
    border-radius: 28px;
  }

  .phone-top {
    margin-top: 12px;
    font-size: 8px;
  }

  .phone-balance {
    margin: 11px 0 9px;
    font-size: 19px;
  }

  .phone-grid span {
    height: 22px;
  }

  .phone-card {
    padding: 7px 8px;
    margin-top: 6px;
    font-size: 10px;
  }

  .phone-card b {
    margin-bottom: 5px;
  }

  .stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 22px 0 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .stat {
    display: block;
    padding: 0 10px;
    border-top: 0;
    border-left: 1px solid #d9dde5;
  }

  .stat:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .stat strong {
    font-size: 19px;
    line-height: 1.15;
  }

  .stat span {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.18;
  }

  .hero-actions {
    gap: 10px;
  }

  .google-btn {
    width: 100%;
    min-height: 56px;
  }

  .round-action {
    width: 50px;
    height: 50px;
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
  }

  .quick-item {
    min-height: 76px;
    font-size: 11px;
  }

  .table-head,
  .market-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 13px 8px;
    gap: 6px;
    min-width: 0;
  }

  .table-head {
    grid-template-columns: minmax(116px, 1.2fr) minmax(76px, 0.75fr) minmax(70px, 0.65fr);
  }

  .market-main {
    grid-template-columns: minmax(116px, 1.2fr) minmax(76px, 0.75fr) minmax(70px, 0.65fr);
    gap: 6px;
  }

  .market-buy-btn {
    min-height: 34px;
    border-radius: 6px;
    font-size: 12px;
  }

  .table-head {
    font-size: 12px;
  }

  .table-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coin-logo {
    display: none;
  }

  .coin-logo.has-image {
    display: grid;
  }

  .coin {
    gap: 8px;
  }

  .coin b,
  .price {
    font-size: 15px;
  }

  .coin span {
    font-size: 12px;
  }

  .change {
    min-width: 64px;
    padding: 7px 5px;
    font-size: 12px;
  }

  .buy-hold-page .form-panel {
    display: block;
  }

  .buy-summary {
    margin-bottom: 18px;
    padding: 18px;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }

  .balance-value {
    font-size: 30px;
  }

  .assets-screen {
    width: min(560px, calc(100% - 20px));
    padding-top: 18px;
  }

  .assets-balance-card,
  .assets-holdings-card {
    padding: 18px;
  }

  .asset-actions {
    gap: 8px;
  }

  .asset-actions a,
  .asset-actions button {
    min-height: 48px;
    padding: 8px 4px;
    font-size: 13px;
  }

  .asset-actions span {
    width: 28px;
    height: 28px;
  }

  .asset-actions span svg {
    width: 16px;
    height: 16px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: auto;
  }

  .contract-overlay {
    align-items: end;
    padding: 0;
  }

  .contract-modal {
    width: 100%;
    max-height: calc(100vh - 80px);
    border-radius: 14px 14px 0 0;
    padding: 18px 18px 22px;
  }

  .contract-chip-row {
    grid-template-columns: repeat(3, minmax(108px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .contract-chip-row.leverage {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
  }

  .contract-chip {
    min-height: 46px;
    padding: 9px 10px;
  }

  .contract-chip b {
    font-size: 16px;
  }

  .contract-head-actions {
    gap: 8px;
  }

  .contract-round-btn {
    width: 44px;
    height: 44px;
  }

  .contract-history-row {
    grid-template-columns: 1fr 1fr;
  }

  .contract-live-modal {
    width: min(100%, 440px);
    max-height: calc(100vh - 72px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    border-radius: 14px 14px 0 0;
    padding: 22px 18px 86px;
    overflow-y: auto;
  }

  .contract-live-modal .modal-close {
    top: 16px;
    right: 16px;
    font-size: 32px;
  }

  .contract-live-head {
    gap: 16px;
  }

  .contract-live-head h2 {
    padding-right: 32px;
    font-size: 24px;
  }

  .contract-live-subhead {
    gap: 12px;
  }

  .contract-live-direction {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 15px;
  }

  .contract-live-time {
    justify-items: end;
    gap: 6px;
    padding: 0;
  }

  .contract-live-time span,
  .contract-live-price span,
  .contract-live-summary small,
  .contract-live-profit small {
    font-size: 12px;
  }

  .contract-live-time strong {
    font-size: 31px;
  }

  .contract-live-price {
    grid-column: 1 / -1;
    gap: 8px;
    padding-bottom: 16px;
  }

  .contract-live-price strong {
    font-size: 32px;
  }

  .contract-live-price small {
    font-size: 17px;
  }

  .contract-live-summary {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
  }

  .contract-live-summary span {
    gap: 8px;
    min-height: 58px;
    padding: 0 8px;
  }

  .contract-live-summary b {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .contract-live-profit {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1.2fr;
    padding: 16px 14px;
    border-radius: 10px;
  }

  .contract-live-profit span {
    gap: 8px;
    padding: 0 10px;
  }

  .contract-live-profit b {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  .contract-continue {
    min-height: 56px;
    font-size: 16px;
  }

  .contract-result-modal {
    width: min(100%, 420px);
    max-height: calc(100vh - 72px);
    border-radius: 14px 14px 0 0;
    padding: 24px 18px 86px;
    overflow-y: auto;
  }

  .contract-result-head h2 {
    font-size: 28px;
  }

  .contract-result-head strong {
    font-size: 34px;
  }

  .contract-result-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .contract-result-grid span {
    padding: 9px;
  }

  .contract-result-grid b {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 760px) {
  .my-bundle-page {
    width: 100%;
    padding: 16px 18px 104px;
  }

  .my-bundle-head {
    grid-template-columns: 40px 1fr 40px;
    margin-bottom: 32px;
  }

  .my-bundle-head h1 {
    font-size: 29px;
  }

  .my-bundle-head .icon-only {
    width: 38px;
    height: 38px;
  }

  .my-bundle-layout,
  .my-bundle-main,
  .my-bundle-side {
    display: block;
  }

  .my-bundle-success {
    min-height: 214px;
    grid-template-columns: 92px minmax(0, 1fr) 128px;
    gap: 18px;
    padding: 0 0 22px;
  }

  .success-check {
    width: 82px;
    height: 82px;
  }

  .success-check::before {
    left: 28px;
    top: 23px;
    width: 23px;
    height: 39px;
    border-width: 5px;
  }

  .success-copy h2 {
    margin-bottom: 12px;
    font-size: 26px;
  }

  .success-copy p {
    font-size: 18px;
    line-height: 1.45;
  }

  .success-rocket {
    min-height: 160px;
  }

  .rocket-body {
    left: 45px;
    top: 0;
    width: 50px;
    height: 96px;
  }

  .rocket-body::before {
    left: 14px;
    top: 27px;
    width: 23px;
    height: 23px;
    box-shadow: inset 0 0 0 4px var(--orange);
  }

  .rocket-body::after {
    left: 20px;
    bottom: -28px;
    width: 11px;
    height: 42px;
  }

  .rocket-box {
    left: 5px;
    bottom: 6px;
    width: 132px;
    height: 78px;
  }

  .my-bundle-card {
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(24, 31, 42, 0.05);
  }

  .my-bundle-summary,
  .performance-card,
  .holdings-card {
    margin-top: 24px;
    padding: 26px 24px;
  }

  .bundle-status {
    padding: 14px 24px;
    font-size: 18px;
  }

  .my-bundle-summary h2 {
    margin: 24px 0 28px;
    font-size: 31px;
  }

  .summary-metrics {
    grid-template-columns: 0.82fr 1fr 1fr;
  }

  .summary-metrics div + div {
    padding-left: 24px;
  }

  .summary-metrics span,
  .performance-grid span,
  .bundle-progress-line span {
    font-size: 18px;
  }

  .summary-metrics b {
    font-size: 20px;
  }

  .bundle-card-head h2,
  .holdings-card h2 {
    font-size: 25px;
  }

  .bundle-card-head button {
    font-size: 18px;
  }

  .performance-grid {
    gap: 20px;
    margin-top: 30px;
  }

  .performance-grid b {
    font-size: 27px;
  }

  .performance-grid small,
  .performance-grid strong {
    font-size: 18px;
  }

  .bundle-progress-line {
    margin-top: 34px;
  }

  .holdings-card .bundle-composition-row {
    grid-template-columns: 54px minmax(0, 1fr) minmax(82px, 0.55fr) minmax(124px, 0.8fr);
    gap: 14px;
    padding: 22px 0;
  }

  .my-bundle-note {
    margin-top: 28px;
    padding: 24px 24px 24px 82px;
    border-radius: 8px;
    font-size: 20px;
  }

  .my-bundle-note::before {
    left: 34px;
    top: 30px;
  }

  .bundle-detail-page {
    width: 100%;
    padding: 12px 12px 98px;
  }

  .bundle-detail-head {
    grid-template-columns: 40px 1fr 40px;
    margin: 0 0 14px;
  }

  .bundle-detail-head h1 {
    font-size: 20px;
  }

  .bundle-detail-head .icon-only {
    width: 38px;
    height: 38px;
  }

  .bundle-hero-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 18px;
  }

  .bundle-hero-copy h2 {
    margin: 24px 0 14px;
    font-size: 32px;
  }

  .bundle-hero-copy p {
    font-size: 19px;
    line-height: 1.7;
  }

  .bundle-illustration {
    min-height: 170px;
    order: 2;
  }

  .bundle-coin {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .coin-blue {
    left: calc(50% - 100px);
    top: 32px;
  }

  .coin-orange {
    right: calc(50% - 94px);
    top: 0;
  }

  .coin-white {
    right: calc(50% - 126px);
    top: 58px;
  }

  .open-box {
    bottom: 16px;
    width: 140px;
    height: 82px;
  }

  .open-box::before,
  .open-box::after {
    top: -24px;
    width: 76px;
    height: 44px;
  }

  .bundle-hero-metrics {
    order: 3;
    padding-top: 8px;
  }

  .bundle-hero-metrics span,
  .bundle-overview-card span {
    font-size: 14px;
  }

  .bundle-hero-metrics b,
  .bundle-overview-card b {
    margin-top: 8px;
    font-size: 18px;
  }

  .bundle-section-title {
    margin-top: 26px;
  }

  .bundle-section-title h2,
  .bundle-overview h2 {
    font-size: 24px;
  }

  .bundle-composition-card {
    padding: 0 18px;
  }

  .bundle-composition-row {
    grid-template-columns: 50px minmax(0, 1fr) minmax(84px, auto);
    gap: 12px;
    padding: 22px 0;
  }

  .bundle-logo {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .bundle-middle b,
  .bundle-allocation b,
  .bundle-right b {
    font-size: 18px;
  }

  .bundle-allocation {
    grid-column: 2;
    padding-top: 6px;
  }

  .bundle-right {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .bundle-overview-card {
    padding: 22px 0;
  }

  .overview-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 10px;
  }

  .bundle-note {
    margin: 28px 0 20px;
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .my-bundle-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .my-bundle-success {
    grid-template-columns: 58px minmax(0, 1fr) 92px;
    gap: 8px;
    min-height: 176px;
  }

  .success-check {
    width: 56px;
    height: 56px;
  }

  .success-check::before {
    left: 20px;
    top: 15px;
    width: 15px;
    height: 28px;
    border-width: 4px;
  }

  .success-copy h2 {
    margin-bottom: 8px;
    font-size: 20px;
  }

  .success-copy p {
    font-size: 14px;
  }

  .success-rocket {
    min-height: 120px;
  }

  .rocket-body {
    left: 31px;
    width: 34px;
    height: 70px;
  }

  .rocket-body::before {
    left: 11px;
    top: 22px;
    width: 17px;
    height: 17px;
    box-shadow: inset 0 0 0 3px var(--orange);
  }

  .rocket-body::after {
    left: 15px;
    bottom: -22px;
    width: 9px;
    height: 32px;
  }

  .rocket-box {
    left: 0;
    width: 92px;
    height: 56px;
  }

  .my-bundle-summary,
  .performance-card,
  .holdings-card {
    padding: 22px 18px;
  }

  .bundle-status {
    padding: 12px 18px;
    font-size: 16px;
  }

  .my-bundle-summary h2 {
    font-size: 27px;
  }

  .summary-metrics {
    gap: 10px;
  }

  .summary-metrics div + div {
    padding-left: 10px;
  }

  .summary-metrics span,
  .performance-grid span,
  .bundle-progress-line span {
    font-size: 13px;
  }

  .summary-metrics b,
  .bundle-progress-line b {
    font-size: 13px;
  }

  .summary-metrics b {
    white-space: nowrap;
  }

  .performance-grid {
    grid-template-columns: 1fr 1fr;
  }

  .performance-grid b {
    font-size: 20px;
  }

  .performance-grid small,
  .performance-grid strong {
    font-size: 14px;
  }

  .holdings-card .bundle-composition-row {
    grid-template-columns: 46px minmax(0, 1fr) minmax(86px, auto);
  }

  .holdings-card .bundle-allocation {
    grid-column: 2;
    padding-top: 6px;
  }

  .holdings-card .bundle-right {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .my-bundle-note {
    padding-left: 64px;
    font-size: 16px;
  }

  .my-bundle-note::before {
    left: 24px;
  }

  .bundle-hero-card {
    padding: 18px 16px;
  }

  .bundle-hero-copy h2 {
    font-size: 29px;
  }

  .bundle-hero-copy p {
    font-size: 17px;
  }

  .bundle-hero-metrics,
  .bundle-overview-card {
    display: flex;
    flex-wrap: wrap;
  }

  .bundle-hero-metrics > div,
  .bundle-overview-card > div {
    flex: 1 1 0;
    min-width: 0;
  }

  .bundle-hero-metrics span,
  .bundle-overview-card span,
  .bundle-composition-row span {
    font-size: 12px;
  }

  .bundle-hero-metrics b,
  .bundle-overview-card b {
    font-size: 16px;
  }

  .bundle-composition-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .bundle-right {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
  }
}

/* ========================================
   Mobile improvements — safe areas, touch targets,
   horizontal overflow protection, and modal handling
   ======================================== */

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent iOS zoom on form inputs */
input,
select,
textarea,
button {
  font-size: 16px;
}

@media (max-width: 900px) {
  .app-shell {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
  }

  .bottom-nav {
    display: grid;
    min-height: var(--mobile-bottom-nav-height);
    height: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Keep key content inside the viewport */
  .page,
  .form-page,
  .contract-layout,
  .dashboard,
  .assets-screen,
  .deposit-screen,
  .me-screen,
  .security-screen,
  .notification-screen,
  .kyc-screen {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Horizontal scroll for data tables that are too wide */
  .table-panel,
  .contract-history-list,
  .order-list,
  .deposit-list,
  .withdraw-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Improve touch targets */
  .market-row,
  .quick-item,
  .asset-actions a,
  .asset-actions button,
  .list-row,
  .me-menu-row,
  .contract-chip,
  .primary-btn,
  .secondary-btn,
  .chip-button {
    min-height: 44px;
  }

  /* Auth pages stay usable without the bottom nav */
  .auth-wrap {
    padding: 24px 16px 32px;
  }

  .auth-card {
    padding: 22px;
  }

  /* Modal backdrop full screen and modal fits */
  .contract-overlay {
    align-items: flex-end;
  }

  .contract-modal {
    width: 100%;
    max-height: calc(100vh - 60px);
    border-radius: 14px 14px 0 0;
  }

  .contract-live-modal,
  .contract-history-modal,
  .contract-result-modal {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .logo-slot {
    width: 108px;
    height: 28px;
  }

  .chip-button {
    padding: 0 10px;
    height: 32px;
    font-size: 13px;
  }

  .page {
    padding: 14px 0 24px;
  }

  .form-panel {
    padding: 18px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
  }

  .contract-modal {
    padding: 16px 16px 24px;
  }

  .contract-chip-row {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

  .contract-live-modal {
    grid-template-columns: 1fr;
  }

  .contract-live-modal .contract-live-summary {
    grid-template-columns: 1fr 1fr;
  }

  .frozen-breakdown-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .frozen-breakdown-source {
    grid-column: 1 / -1;
    order: 3;
  }

  .frozen-breakdown-amount {
    text-align: right;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 26px;
  }

  .stat strong {
    font-size: 16px;
  }

  .stat span {
    font-size: 11px;
  }

  .bottom-nav a {
    font-size: 10px;
  }

  .bottom-nav a svg {
    width: 20px;
    height: 20px;
  }

  .market-main {
    grid-template-columns: minmax(90px, 1fr) minmax(70px, 0.8fr) minmax(60px, 0.7fr);
  }

  .table-head {
    grid-template-columns: minmax(90px, 1fr) minmax(70px, 0.8fr) minmax(60px, 0.7fr);
  }
}

/* Mobile "More" menu — counterpart to the full desktop top navigation */
.more-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  align-items: end;
  background: rgba(17, 19, 24, 0.45);
}

.more-menu-sheet {
  width: 100%;
  max-height: calc(80vh - env(safe-area-inset-bottom, 0px));
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  background: #fff;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.more-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.more-menu-head h2 {
  margin: 0;
  font-size: 20px;
}

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

.more-menu-grid a,
.more-menu-grid button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 84px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.more-menu-grid a svg,
.more-menu-grid button svg {
  width: 24px;
  height: 24px;
  color: var(--orange);
}

.more-menu-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav button.active {
  color: var(--orange);
}

.bottom-nav button svg {
  transform: rotate(90deg);
}

@media (min-width: 901px) {
  .more-menu-overlay,
  .more-menu-sheet {
    display: none;
  }
}

/* Admin panel styles */
.admin-login-page .form-panel {
  max-width: 440px;
  margin: 0 auto;
}

.admin-page .form-panel {
  width: min(1180px, calc(100% - 32px));
  padding: 28px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-head h1 {
  margin: 0;
  font-size: 26px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.admin-tabs button {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.admin-tabs button.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.admin-section h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  background: var(--panel-soft);
  font-weight: 700;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .secondary-btn {
  padding: 6px 12px;
  font-size: 13px;
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-config-grid .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

@media (max-width: 760px) {
  .admin-page .form-panel {
    width: calc(100% - 20px);
    padding: 20px;
  }

  .admin-head h1 {
    font-size: 22px;
  }

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .admin-tabs button {
    white-space: nowrap;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .admin-config-grid {
    grid-template-columns: 1fr;
  }
}

/* Bank account page styles */
.bank-accounts-page .form-panel {
  width: min(720px, calc(100% - 32px));
}

.bank-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.bank-form .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.bank-limit-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff4ef;
  border: 1px solid #ffd5c7;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 28px;
}

.bank-limit-notice .info-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.bank-limit-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5a3d32;
}

.bank-list {
  margin-top: 28px;
}

.bank-list h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.bank-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  margin-bottom: 12px;
}

.bank-account-card.default {
  border-color: var(--orange);
  background: #fff1ec;
}

.bank-account-main {
  display: grid;
  gap: 4px;
}

.bank-account-main b {
  font-size: 16px;
}

.bank-account-main em {
  color: var(--orange);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.bank-account-actions {
  display: flex;
  gap: 8px;
}

.bank-account-actions .secondary-btn.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

/* Withdraw method selection */
#withdrawMethod {
  width: 100%;
}

/* Admin panel bank buttons */
.admin-table .secondary-btn.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  margin-left: 6px;
}

@media (max-width: 760px) {
  .bank-form {
    grid-template-columns: 1fr;
  }

  .bank-account-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .bank-account-actions {
    width: 100%;
  }

  .bank-account-actions .secondary-btn {
    flex: 1;
  }
}

/* Crypto address page (reuses bank account card styles) */
.crypto-addresses-page .form-panel {
  width: min(720px, calc(100% - 32px));
}

.crypto-addresses-page .bank-account-main b {
  word-break: break-all;
}

#withdrawCryptoAddress {
  width: 100%;
}

@media (max-width: 760px) {
  .crypto-addresses-page .form-panel {
    width: calc(100% - 20px);
    padding: 20px;
  }
}
/* Admin layout */
.admin-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f4f6f8;
}

.admin-body {
  display: flex;
  flex: 1;
  padding-top: 60px;
}

/* Topbar */
.admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1a1d29;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 0;
  z-index: 110;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 200px;
  height: 100%;
  padding: 0 16px;
  background: #fff;
  color: #1a1d29;
  text-decoration: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-brand b {
  font-size: 15px;
  font-weight: 700;
}

.admin-category-nav {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.admin-category-nav button {
  background: transparent;
  border: none;
  color: #b8c0cc;
  font-size: 14px;
  padding: 0 18px;
  height: 100%;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.admin-category-nav button:hover,
.admin-category-nav button.active {
  color: #fff;
  border-bottom-color: var(--orange, #ff8c00);
  background: rgba(255, 255, 255, 0.04);
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sidebar */
.admin-sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #e8ebf0;
  position: fixed;
  left: 0;
  top: 60px;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  padding: 12px 0;
}

.admin-submenu {
  display: flex;
  flex-direction: column;
}

.admin-submenu button {
  width: 100%;
  padding: 12px 18px;
  background: transparent;
  border: none;
  color: #5a6474;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.admin-submenu button:hover,
.admin-submenu button.active {
  color: var(--orange, #ff8c00);
  background: #fff8f0;
  border-left-color: var(--orange, #ff8c00);
}

/* Main */
.admin-main {
  flex: 1;
  margin-left: 0;
  min-height: calc(100vh - 60px);
}

.admin-sidebar + .admin-main {
  margin-left: 200px;
}

.admin-content {
  padding: 24px;
}

.admin-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
  color: #1a1d29;
}

.admin-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #5a6474;
}

/* Stat cards */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  border-left: 4px solid var(--accent, #4a8bc2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-stat-card h3 {
  font-size: 13px;
  color: #7a8494;
  margin-bottom: 8px;
  font-weight: 500;
}

.admin-stat-card b {
  font-size: 24px;
  font-weight: 700;
  color: #1a1d29;
}

/* Charts */
.admin-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.admin-chart-panel {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8ebf0;
}

.admin-bar {
  flex: 1;
  min-width: 8px;
  height: var(--h, 10%);
  background: #6883a3;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.admin-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #9aa3b2;
}

.admin-chart-line {
  height: 160px;
  border-bottom: 1px solid #e8ebf0;
  border-left: 1px solid #e8ebf0;
}

.admin-chart-line svg {
  width: 100%;
  height: 100%;
}

.admin-chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
}

.admin-chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-chart-legend .dep::before,
.admin-chart-legend .with::before {
  content: "";
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.admin-chart-legend .dep::before { background: #8075c4; }
.admin-chart-legend .with::before { background: #6883a3; }

/* Audit panel */
.admin-audit-panel {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Search & form rows */
.admin-search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-end;
}

.admin-search-row input {
  flex: 1;
  max-width: 320px;
}

.admin-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-form-row .field {
  flex: 1;
  min-width: 180px;
  margin: 0;
}

/* Admin tables */
.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eef1f5;
  white-space: nowrap;
}

.admin-table th {
  background: #f8fafc;
  color: #5a6474;
  font-weight: 600;
  font-size: 12px;
}

.admin-table.compact td,
.admin-table.compact th {
  padding: 8px 10px;
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}

.admin-config-grid .field {
  margin: 0;
}

.admin-config-grid .field.full {
  grid-column: 1 / -1;
}

.admin-config-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9dce2;
  border-radius: 8px;
  font: inherit;
}

/* Mobile admin */
.admin-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  margin-right: 10px;
}

@media (max-width: 900px) {
  .admin-topbar-left {
    flex: 1;
  }
  .admin-category-nav {
    display: none;
  }
  .admin-menu-toggle {
    display: block;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    top: 60px;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-sidebar + .admin-main {
    margin-left: 0;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-charts {
    grid-template-columns: 1fr;
  }
  .admin-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }
  .admin-content {
    padding: 14px;
  }
  .admin-brand {
    width: auto;
    padding: 0 10px;
  }
  .admin-brand b {
    display: none;
  }
}

/* Admin extra styles */
.admin-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-bulk-actions .secondary-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.admin-bulk-actions .secondary-btn.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.admin-table td .positive {
  color: var(--green);
  font-weight: 700;
}

.admin-table td .negative {
  color: var(--red);
  font-weight: 700;
}

.admin-table td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-section .empty-state {
  padding: 48px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-login-page .auth-brand {
  justify-content: center;
  margin-bottom: 28px;
}

.admin-login-page h1 {
  text-align: center;
}

.admin-login-page .primary-btn {
  width: 100%;
}

.admin-table input.inline-num {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.admin-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.primary-btn.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}


/* Contract mobile responsiveness */
@media (max-width: 760px) {
  .contract-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 0 28px;
  }

  .trade-ticket {
    order: -1;
    padding: 16px;
  }

  .ticket-tabs {
    gap: 10px;
  }

  .ticket-tabs button {
    min-height: 46px;
    font-size: 16px;
  }

  .contract-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 40px);
    padding: 20px 16px 22px;
    border-radius: 14px;
  }

  .contract-modal h2 {
    font-size: 18px;
  }

  .contract-option-block {
    margin-top: 14px;
  }

  .contract-chip-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .contract-chip-row.leverage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scroll-row {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .scroll-row .contract-chip {
    min-width: 110px;
    flex-shrink: 0;
  }

  .contract-chip {
    min-height: 44px;
    padding: 8px 10px;
  }

  .contract-chip b {
    font-size: 14px;
  }

  .contract-order-summary {
    gap: 8px;
    margin: 16px 0 20px;
    padding: 14px;
  }

  .contract-order-summary span {
    font-size: 13px;
  }

  .contract-live-modal,
  .contract-result-modal {
    width: calc(100vw - 24px);
    padding: 22px 16px 24px;
  }

  .contract-countdown {
    width: 150px;
    height: 150px;
  }

  .contract-countdown-text strong {
    font-size: 42px;
  }

  .contract-live-position {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .contract-live-position span {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .contract-result-pnl {
    padding: 14px;
  }

  .contract-result-pnl strong {
    font-size: 30px;
  }

  .contract-result-row {
    padding: 10px 0;
  }

  .contract-continue {
    min-height: 52px;
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .contract-chip-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-chip-row.leverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scroll-row .contract-chip {
    min-width: 100px;
  }
}

/* Bundle / Staking plan pages v2 */
.bundle-plan-page-v2,
.bundle-category-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 92px;
}

.bundle-plans-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.bundle-header-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff4e00 100%);
  color: #fff;
  flex-shrink: 0;
}

.bundle-plans-header h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.bundle-plans-header p {
  margin: 0;
  color: #7b8495;
}

.bundle-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.bundle-hero-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  border-top: 4px solid #ff4e00;
  display: flex;
  flex-direction: column;
}

.bundle-hero-card.bundle-hero-twelve {
  border-top-color: #2b6aff;
}

.bundle-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.bundle-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff4ef;
  color: #ff4e00;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.bundle-hero-card.bundle-hero-twelve .bundle-hero-icon {
  background: #eef5ff;
  color: #2b6aff;
}

.bundle-hero-icon.weekly {
  background: #eef5ff;
  color: #2b6aff;
}

.bundle-hero-icon span {
  position: absolute;
  font-size: 11px;
  font-weight: 900;
  bottom: 8px;
  right: 8px;
  background: #ff4e00;
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.bundle-hero-card.bundle-hero-twelve .bundle-hero-icon span {
  background: #2b6aff;
}

.bundle-hero-icon.weekly span {
  background: #2b6aff;
}

.bundle-hero-title h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.bundle-hero-title p {
  margin: 0;
  color: #7b8495;
  font-size: 13px;
}

.bundle-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 18px;
}

.bundle-hero-metrics > div {
  flex: 1 1 0;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid #f0f1f5;
}

.bundle-hero-metrics > div:last-child {
  border-right: none;
}

.bundle-hero-metrics > div.bundle-metric-wide {
  flex: 2 1 0;
}

.bundle-hero-metrics span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8495;
  font-size: 12px;
}

.bundle-hero-metrics span svg {
  width: 18px;
  height: 18px;
}

.bundle-hero-card.bundle-hero-six .bundle-hero-metrics span svg {
  stroke: #ff4e00;
}

.bundle-hero-card.bundle-hero-twelve .bundle-hero-metrics span svg {
  stroke: #2b6aff;
}

.bundle-hero-metrics b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-weekly-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bundle-weekly-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bundle-weekly-info h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.bundle-weekly-info p {
  margin: 0;
  color: #7b8495;
  font-size: 13px;
}

.bundle-weekly-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.bundle-weekly-metrics > div {
  flex: 1 1 0;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid #f0f1f5;
}

.bundle-weekly-metrics > div:last-child {
  border-right: none;
}

.bundle-weekly-metrics span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8495;
  font-size: 12px;
}

.bundle-weekly-metrics span svg {
  width: 18px;
  height: 18px;
  stroke: #ff4e00;
}

.bundle-weekly-metrics b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-explore-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  background: #ff4e00;
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.bundle-explore-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bundle-tiers-table-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  margin-bottom: 20px;
  overflow-x: auto;
}

.bundle-tiers-table-wrap h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.bundle-tiers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}

.bundle-tiers-table thead tr {
  background: #f8f9fc;
}

.bundle-tiers-table th,
.bundle-tiers-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid #f0f1f5;
}

.bundle-tiers-table th:first-child,
.bundle-tiers-table td:first-child {
  text-align: left;
}

.bundle-tiers-table th {
  color: #7b8495;
  font-weight: 700;
  font-size: 12px;
}

.bundle-tiers-table td {
  color: #151d2b;
}

.bundle-tiers-table .text-orange {
  color: #ff4e00;
}

.bundle-tiers-table .text-blue {
  color: #2b6aff;
}

.bundle-tier-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: var(--category-color, #ff4e00);
  border: 1.5px solid var(--category-color, #ff4e00);
  font-size: 11px;
  font-weight: 800;
  margin-right: 10px;
}

.bundle-info-box {
  background: #fff4ef;
  border: 1px solid #ffd5c7;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.bundle-info-box.info-box-blue {
  background: #eef5ff;
  border-color: #c7daff;
}

.info-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff4e00;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.bundle-info-box.info-box-blue .info-icon {
  background: #2b6aff;
}

.bundle-info-box ul {
  margin: 0;
  padding-left: 16px;
  color: #5a3d32;
  font-size: 13px;
  line-height: 1.5;
}

.bundle-info-box.info-box-blue ul {
  color: #1f3b6b;
}

.bundle-info-box p {
  margin: 0;
  color: #5a3d32;
  font-size: 13px;
  line-height: 1.5;
}

.bundle-info-box.info-box-blue p {
  color: #1f3b6b;
}

/* Bundle / Staking confirmation pages */
.bundle-confirm-page,
.staking-confirm-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 92px;
}

.confirm-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 24px 0 20px;
}

.confirm-hero h1 {
  font-size: 32px;
  margin: 0 0 6px;
  font-weight: 800;
}

.confirm-hero p {
  margin: 0;
  color: #7b8495;
  font-size: 15px;
}

.confirm-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  margin-bottom: 20px;
}

.confirm-card h2 {
  font-size: 18px;
  margin: 0 0 18px;
  font-weight: 700;
}

.confirm-icon-bg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff4ef;
  color: #ff4e00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.staking-confirm-page .confirm-icon-bg {
  background: #eef5ff;
  color: #2b6aff;
}

.confirm-summary-card {
  margin-bottom: 20px;
}

.confirm-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.confirm-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-summary-label {
  display: block;
  font-size: 12px;
  color: #7b8495;
  margin-bottom: 2px;
}

.confirm-summary-value {
  font-size: 15px;
  font-weight: 700;
  color: #151d2b;
}

.confirm-page-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

.confirm-funding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.confirm-funding-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-funding-label {
  display: block;
  font-size: 12px;
  color: #7b8495;
  margin-bottom: 2px;
}

.confirm-funding-value {
  font-size: 17px;
  font-weight: 700;
  color: #151d2b;
}

.confirm-agree {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #4a5568;
  cursor: pointer;
}

.confirm-agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff4e00;
  cursor: pointer;
}

.confirm-subscribe-btn {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  border-radius: 10px;
}

.confirm-preview-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.confirm-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f5;
}

.confirm-preview-item:last-child {
  border-bottom: none;
}

.confirm-preview-label {
  flex: 1;
  font-size: 14px;
  color: #4a5568;
}

.confirm-preview-value {
  font-size: 14px;
  font-weight: 700;
  color: #151d2b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.confirm-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4e00;
}

.confirm-side-summary .confirm-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.confirm-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
}

.confirm-kv-row:last-child {
  border-bottom: none;
}

.confirm-kv-row span {
  color: #7b8495;
}

.confirm-kv-row b {
  color: #151d2b;
  font-weight: 600;
}

.confirm-info-box {
  background: #fff4ef;
  border: 1px solid #ffd5c7;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.staking-confirm-page .confirm-info-box {
  background: #eef5ff;
  border-color: #c7daff;
}

.confirm-info-icon {
  color: #ff4e00;
  flex-shrink: 0;
  margin-top: 2px;
}

.staking-confirm-page .confirm-info-icon {
  color: #2b6aff;
}

.confirm-info-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5a3d32;
}

.staking-confirm-page .confirm-info-box p {
  color: #1f3b6b;
}

@media (max-width: 992px) {
  .confirm-page-grid {
    grid-template-columns: 1fr;
  }

  .confirm-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .confirm-funding-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .confirm-hero h1 {
    font-size: 24px;
  }

  .confirm-summary-grid {
    grid-template-columns: 1fr;
  }

  .confirm-summary-item {
    justify-content: flex-start;
  }

  .confirm-funding-grid {
    grid-template-columns: 1fr;
  }

  .confirm-card {
    padding: 18px;
  }

  .confirm-page-grid {
    gap: 0;
  }
}

/* Bundle / Staking activated success pages */
.active-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 92px;
}

.active-success-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.active-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.active-success-banner b {
  display: block;
  color: #15803d;
  font-size: 16px;
  margin-bottom: 2px;
}

.active-success-banner span {
  color: #166534;
  font-size: 14px;
}

.active-summary-card .active-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.active-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-summary-label {
  display: block;
  font-size: 11px;
  color: #7b8495;
  margin-bottom: 2px;
}

.active-summary-value {
  font-size: 14px;
  font-weight: 700;
  color: #151d2b;
}

.active-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #22c55e;
  background: #f0fdf4;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.active-status-badge svg {
  width: 14px;
  height: 14px;
}

.active-overview-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.active-overview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f5;
}

.active-overview-item:last-child {
  border-bottom: none;
}

.active-overview-label {
  flex: 1;
  font-size: 14px;
  color: #4a5568;
}

.active-overview-value {
  font-size: 14px;
  font-weight: 700;
  color: #151d2b;
}

.active-details-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.active-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 14px;
}

.active-detail-row:last-child {
  border-bottom: none;
}

.active-detail-row span {
  color: #7b8495;
}

.active-detail-row b {
  color: #151d2b;
  font-weight: 600;
}

.active-detail-highlight {
  color: var(--category-color, #ff4e00);
}

.staking-active-page .active-detail-highlight {
  color: var(--category-color, #2b6aff);
}

.active-actions-card {
  margin-top: 0;
}

.active-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.active-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.active-action-card:hover {
  border-color: var(--category-color, #ff4e00);
  box-shadow: 0 4px 14px rgba(21, 29, 43, 0.06);
}

.bundle-active-page .active-action-card .confirm-icon-bg {
  background: #fff4ef;
  color: #ff4e00;
}

.staking-active-page .active-action-card .confirm-icon-bg {
  background: #eef5ff;
  color: #2b6aff;
}

.active-action-card div {
  flex: 1;
  min-width: 0;
}

.active-action-card b {
  display: block;
  font-size: 14px;
  color: #151d2b;
  margin-bottom: 2px;
}

.active-action-card span {
  display: block;
  font-size: 12px;
  color: #7b8495;
}

.active-action-card svg:last-child {
  color: #a0aec0;
  flex-shrink: 0;
}

.active-info-box {
  background: #eef5ff;
  border: 1px solid #c7daff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.bundle-active-page .active-info-box {
  background: #fff4ef;
  border-color: #ffd5c7;
}

.active-info-icon {
  color: #2b6aff;
  flex-shrink: 0;
  margin-top: 2px;
}

.bundle-active-page .active-info-icon {
  color: #ff4e00;
}

.active-info-box b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #2b6aff;
}

.bundle-active-page .active-info-box b {
  color: #ff4e00;
}

.active-info-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #1f3b6b;
}

.bundle-active-page .active-info-box p {
  color: #5a3d32;
}

@media (max-width: 992px) {
  .active-summary-card .active-summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .active-summary-card .active-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .active-actions-grid {
    grid-template-columns: 1fr;
  }

  .active-action-card {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .active-summary-card .active-summary-grid {
    grid-template-columns: 1fr;
  }

  .active-success-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.bundle-active-section {
  margin-top: 8px;
}

.bundle-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #7b8495;
  text-align: center;
}

.bundle-empty-icon {
  color: #ff4e00;
  margin-bottom: 12px;
}

.bundle-empty-icon svg {
  width: 48px;
  height: 48px;
}

.bundle-other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Category detail pages */
.bundle-category-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bundle-category-head .back {
  display: flex;
  background: transparent;
  border: none;
  padding: 6px;
  color: #151d2b;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.bundle-category-head .category-head-center {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bundle-category-head .page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  display: none;
}

.bundle-category-head .breadcrumb {
  color: #7b8495;
  font-size: 14px;
}

.bundle-category-head .breadcrumb span {
  color: #151d2b;
  font-weight: 700;
  cursor: pointer;
}

.bundle-category-head .head-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.bundle-category-head .head-actions button {
  background: transparent;
  border: none;
  padding: 6px;
  color: #151d2b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bundle-category-hero {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  margin-bottom: 20px;
  border-top: 4px solid var(--category-color, #ff4e00);
}

.bundle-category-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.bundle-category-title h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.bundle-category-title p {
  margin: 0;
  color: #7b8495;
  font-size: 13px;
}

.bundle-category-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.bundle-category-metrics > div {
  flex: 1 1 0;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid #f0f1f5;
}

.bundle-category-metrics > div:last-child {
  border-right: none;
}

.bundle-category-metrics span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8495;
  font-size: 12px;
}

.bundle-category-metrics span svg {
  width: 18px;
  height: 18px;
  stroke: var(--category-color, #ff4e00);
}

.bundle-category-metrics b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-category-tiers h2,
.bundle-selected-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.bundle-category-table th,
.bundle-category-table td {
  vertical-align: middle;
}

.bundle-category-table .bundle-choose-btn {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
  padding: 0 18px;
}

.bundle-category-table th:last-child,
.bundle-category-table td:last-child {
  text-align: right;
}

.bundle-selected-empty {
  background: #fff;
  border-radius: 16px;
  padding: 48px 20px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  text-align: center;
}

.bundle-selected-empty .bundle-empty-icon {
  color: #b0b5bf;
}

.bundle-category-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bundle-category-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(21, 29, 43, 0.05);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.bundle-category-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bundle-tier-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--category-color, #ff4e00);
}

.bundle-tier-icon svg {
  width: 18px;
  height: 18px;
}

.bundle-category-card-main b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-category-card-bonus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.bundle-category-card-bonus span {
  color: #7b8495;
  font-size: 12px;
}

.bundle-category-card-bonus b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-category-card .bundle-choose-btn {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
  padding: 0 16px;
}

.bundle-selected-section {
  margin-top: 8px;
}

.bundle-selected-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
}

.bundle-selected-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.bundle-selected-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.bundle-selected-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #f8f9fc;
  border-radius: 10px;
}

.bundle-selected-metrics span {
  color: #7b8495;
  font-size: 12px;
}

.bundle-selected-metrics b {
  font-size: 15px;
  color: #151d2b;
}

.bundle-amount-field {
  margin: 18px 0;
}

.bundle-amount-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #151d2b;
}

.bundle-amount-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
}

.bundle-amount-value {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #151d2b;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 14px;
  color: #151d2b;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #ff4e00;
}

.bundle-join-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
}

.bundle-selected-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #7b8495;
  text-align: center;
}

@media (min-width: 760px) {
  .bundle-hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bundle-weekly-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .bundle-weekly-main {
    flex: 1;
  }

  .bundle-weekly-metrics {
    grid-template-columns: repeat(4, auto);
    flex: 2;
    justify-content: center;
  }

  .bundle-weekly-metrics > div {
    padding: 0 18px;
  }

  .bundle-explore-btn {
    width: auto;
    padding: 0 28px;
  }

  .bundle-selected-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .bundle-join-btn {
    width: auto;
    padding: 0 36px;
  }
}

@media (max-width: 760px) {
  .app-shell.category-page .topbar {
    display: none;
  }

  .bundle-category-page,
  .staking-category-page {
    padding-top: 0;
  }

  .bundle-category-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 10px 16px;
    margin: 0 -16px 16px;
    border-bottom: 1px solid var(--line);
  }

  .bundle-category-head .back {
    display: flex;
  }

  .bundle-category-head .page-title {
    display: block;
    text-align: center;
  }

  .bundle-category-head .breadcrumb {
    text-align: center;
    font-size: 13px;
  }

  .bundle-category-head .head-actions {
    display: flex;
  }

  .bundle-hero-metrics > div,
  .bundle-category-metrics > div,
  .bundle-weekly-metrics > div {
    padding: 12px 8px;
  }

  .bundle-hero-metrics span,
  .bundle-category-metrics span,
  .bundle-weekly-metrics span {
    font-size: 11px;
  }

  .bundle-hero-metrics b,
  .bundle-category-metrics b,
  .bundle-weekly-metrics b {
    font-size: 13px;
  }

  .bundle-hero-metrics span svg,
  .bundle-category-metrics span svg,
  .bundle-weekly-metrics span svg {
    width: 16px;
    height: 16px;
  }

  .bundle-category-title h1 {
    font-size: 20px;
  }
}
.bundle-active-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

@media (max-width: 760px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Mobile polish for bundle/staking pages */
@media (max-width: 760px) {
  .bundle-hero-metrics > div,
  .bundle-category-metrics > div,
  .bundle-weekly-metrics > div {
    min-width: 0;
    padding: 10px 8px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .bundle-hero-metrics span,
  .bundle-category-metrics span,
  .bundle-weekly-metrics span {
    justify-content: center;
    text-align: center;
    width: 100%;
    font-size: 10px;
  }

  .bundle-hero-metrics b,
  .bundle-category-metrics b,
  .bundle-weekly-metrics b {
    text-align: center;
    width: 100%;
    font-size: 12px;
  }

  .bundle-category-card {
    min-width: 0;
  }

  .bundle-category-card-main b {
    word-break: break-word;
  }

  .bundle-category-card .bundle-choose-btn {
    white-space: nowrap;
  }
}

@media (max-width: 400px) {
  .bundle-category-card {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .bundle-category-card-main {
    justify-content: center;
  }

  .bundle-category-card-bonus {
    align-items: center;
  }
}

/* Deposit page v2 */
.deposit-screen.deposit-page-v2 {
  display: block;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 92px;
  background: transparent;
}

.deposit-page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.deposit-page-head .back {
  display: flex;
  background: transparent;
  border: none;
  padding: 6px;
  color: #151d2b;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.deposit-page-head .deposit-head-center {
  flex: 1;
  text-align: center;
}

.deposit-page-head .page-title {
  margin: 0 0 4px;
  font-size: 28px;
}

.deposit-page-head .subtitle {
  margin: 0;
  color: #7b8495;
  font-size: 14px;
}

.deposit-page-head .head-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.deposit-page-head .head-actions button {
  background: transparent;
  border: none;
  padding: 6px;
  color: #151d2b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.deposit-page-head .head-actions .contract-round-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
}

.deposit-page-head .head-actions .contract-round-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.deposit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.deposit-page-v2 .deposit-form-card,
.deposit-page-v2 .deposit-qr-card,
.deposit-page-v2 .deposit-rules-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(21, 29, 43, 0.06);
  border: none;
  margin-bottom: 0;
}

.deposit-page-v2 .deposit-form-card {
  grid-column: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.deposit-page-v2 .deposit-field label {
  display: block;
  grid-template-columns: none;
  border-top: none;
  min-height: auto;
  margin-bottom: 8px;
  font-size: 14px;
  color: #151d2b;
}

.deposit-field .required::before {
  content: "*";
  color: #ff4e00;
  margin-right: 4px;
}

.deposit-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.asset-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.asset-icon.has-image {
  color: transparent;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.asset-icon.crypto.has-image,
.asset-icon.commodity.has-image {
  background-size: cover;
}

.asset-icon.stock.has-image {
  background-size: 92%;
}

.asset-icon.usdc { background: #2775ca; }
.asset-icon.btc { background: #f7931a; }
.asset-icon.eth { background: #627eea; }
.asset-icon.sol { background: #14f195; color: #000; }

.deposit-select-wrap select {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #151d2b;
  outline: none;
  cursor: pointer;
}

.deposit-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: #151d2b;
}

.deposit-field input::placeholder {
  color: #b3bac5;
}

.deposit-upload-section h2 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #ff4e00;
}

.deposit-page-v2 .deposit-upload-area {
  display: block;
  cursor: pointer;
}

.deposit-page-v2 .deposit-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 160px;
  padding: 20px;
  background: #fff8f5;
  border: 1px dashed #ffd5c7;
  border-radius: 12px;
  color: #151d2b;
  text-align: center;
}

.deposit-page-v2 .deposit-upload-placeholder span {
  width: 48px;
  height: 48px;
  color: #ff4e00;
}

.deposit-page-v2 .deposit-upload-placeholder .upload-text b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: 600;
  color: #ff4e00;
}

.deposit-page-v2 .deposit-upload-placeholder .upload-text small {
  font-size: 12px;
  color: #7b8495;
}

.deposit-page-v2 .deposit-qr-card {
  grid-column: 2;
  grid-row: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 24px;
  text-align: center;
}

.deposit-qr-label {
  margin-bottom: 16px;
  color: #7b8495;
  font-size: 14px;
}

.deposit-page-v2 .deposit-qr-img {
  width: 220px;
  height: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 24px rgba(20, 210, 170, 0.12);
  object-fit: contain;
}

.deposit-address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  margin: 18px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.deposit-page-v2 .deposit-address {
  flex: 1;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
  color: #151d2b;
}

.deposit-page-v2 .copy-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #7b8495;
  cursor: pointer;
}

.deposit-page-v2 .copy-icon svg {
  width: 20px;
  height: 20px;
}

.deposit-page-v2 .copy-btn {
  width: min(360px, 100%);
  height: 48px;
  border-radius: 10px;
  background: #ff4e00;
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.deposit-page-v2 .deposit-rules-card {
  grid-column: 1 / -1;
  padding: 24px;
}

.deposit-page-v2 .deposit-rules-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 16px;
  color: #151d2b;
}

.deposit-page-v2 .deposit-rules-card h2 svg {
  width: 22px;
  height: 22px;
  stroke: #ff4e00;
}

.deposit-page-v2 .deposit-rules-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.deposit-page-v2 .deposit-rules-card li {
  position: relative;
  padding-left: 16px;
  color: #465166;
  font-size: 13px;
  line-height: 1.5;
}

.deposit-page-v2 .deposit-rules-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4e00;
}

.deposit-submit-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.deposit-page-v2 .deposit-submit {
  width: min(360px, 100%);
  height: 50px;
  border-radius: 10px;
  background: #ff4e00;
  color: #fff;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.deposit-page-v2 #depositFileName {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #465166;
  font-style: normal;
  text-align: center;
}

@media (max-width: 760px) {
  .app-shell.deposit-page .topbar {
    display: none;
  }

  .deposit-screen.deposit-page-v2 {
    width: 100%;
    padding: 0 0 92px;
  }

  .deposit-page-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 10px 16px;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--line);
  }

  .deposit-page-head .head-actions {
    display: flex;
  }

  .deposit-page-head .page-title {
    font-size: 18px;
    margin-bottom: 0;
  }

  .deposit-page-head .subtitle {
    display: none;
  }

  .deposit-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
  }

  .deposit-page-v2 .deposit-form-card,
  .deposit-page-v2 .deposit-qr-card {
    grid-column: auto;
    width: 100%;
  }

  .deposit-page-v2 .deposit-form-card,
  .deposit-page-v2 .deposit-qr-card,
  .deposit-page-v2 .deposit-rules-card {
    border-radius: 14px;
  }

  .deposit-page-v2 .deposit-form-card {
    padding: 20px;
    gap: 16px;
  }

  .deposit-page-v2 .deposit-qr-card {
    padding: 24px 20px;
  }

  .deposit-address-box {
    width: 100%;
  }

  .deposit-page-v2 .deposit-rules-card ul {
    grid-template-columns: 1fr;
  }

  .deposit-page-v2 .deposit-submit {
    width: 100%;
  }
}

/* Language selector */
.language-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
}

.language-modal {
  position: relative;
  width: min(360px, 100%);
  max-height: 80vh;
  overflow: hidden;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 19, 25, 0.22);
}

.language-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.language-modal h2 {
  margin: 0;
  font-size: 20px;
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8fa;
  color: var(--text);
  font-size: 15px;
  text-align: left;
  transition: background 0.15s;
}

.language-option:hover,
.language-option.active {
  background: #eef3ff;
  color: var(--primary);
}

.language-flag {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.language-label {
  flex: 1;
}

body.language-modal-open {
  overflow: hidden;
}

/* =====================================================
   Mobile responsiveness improvements
   ===================================================== */

/* Pages with a mobile page head hide the global topbar on small screens */
@media (max-width: 900px) {
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }

  .logo-slot {
    width: 100px;
    height: 28px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .icon-button {
    width: 34px;
    height: 34px;
  }

  .top-actions .chip-button {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .app-shell.mobile-head-page .topbar {
    display: none;
  }

  .form-page {
    padding-top: 0;
  }

  .mobile-page-head {
    margin: 0 0 12px;
  }

  .simple-page .mobile-page-head {
    margin: 0 0 12px;
  }

  /* Collapse multi-column page grids earlier */
  .buy-hold-page .form-panel,
  .swap-page .form-panel,
  .bank-accounts-page .form-panel,
  .bundle-detail-page .form-panel,
  .my-bundle-page .form-panel {
    display: block;
    width: 100%;
  }

  .buy-hold-page .buy-summary {
    margin-bottom: 18px;
  }

  /* Contract history */
  .contract-history-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Quick actions */
  .quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  }

  /* Touch targets */
  .bundle-category-card .bundle-choose-btn,
  .bundle-category-table .bundle-choose-btn,
  .bundle-choose-btn {
    min-height: 44px;
    min-width: 88px;
  }

  /* Scrollable tables */
  .table-panel,
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Long text wrapping */
  .telegram-support,
  .bank-account-main b,
  .bank-account-main span,
  .contract-pair-row .price {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Admin search row */
  .admin-search-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-search-row input,
  .admin-search-row select,
  .admin-search-row button {
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .assets-balance-card strong {
    font-size: 28px;
  }

  .me-profile-card h2 {
    font-size: 18px;
  }

  .mobile-page-head h1 {
    font-size: 16px;
  }
}

/* Bundle detail / my bundle pages */
.bundle-detail-page .bundle-detail-hero,
.my-bundle-page .bundle-detail-hero {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  margin-bottom: 18px;
}

.bundle-detail-page .bundle-detail-hero h2,
.my-bundle-page .bundle-detail-hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.bundle-detail-page .product-metric,
.my-bundle-page .product-metric {
  margin-top: 10px;
}

.bundle-detail-page .bundle-composition,
.my-bundle-page .bundle-composition {
  margin-bottom: 18px;
}

/* =====================================================
   Mobile flex layout: fixed bottom nav + scrollable main
   ===================================================== */

/* --mobile-bottom-nav-height is defined in the global :root */

html,
body,
#app {
  width: 100%;
  min-height: 100%;
}

@media (max-width: 900px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
    padding-bottom: 0;
    overflow-x: hidden;
  }

  .app-shell > header.topbar {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 1001;
  }

  .app-shell > main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
  }

  /* Fixed bottom nav */
  .bottom-nav,
  .bottom-nav.hide-desktop {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex !important;
    width: 100%;
    min-height: var(--mobile-bottom-nav-height);
    height: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 0;
    z-index: 100;
    background: #ffffff;
    border-top: 1px solid var(--line);
  }

  .bottom-nav a,
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
  }

  /* Modals, drawers, toasts and overlays must float above the fixed bottom nav */
  .contract-overlay,
  .more-menu-overlay,
  .language-overlay,
  .toast {
    z-index: 110;
  }

  .toast {
    bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  /* Quick actions: 4 columns so 8 items wrap to 2 rows without overflow */
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px;
  }

  .quick-item {
    min-width: 0;
    min-height: 72px;
    overflow: hidden;
    padding: 10px 4px;
  }

  .quick-item > span:last-child {
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
  }

  /* Prevent horizontal overflow from wide fixed-width children */
  .page,
  .hero,
  .table-panel,
  .about,
  .contract-layout,
  .dashboard,
  .form-page,
  .assets-screen,
  .deposit-screen,
  .me-screen,
  .security-screen,
  .notification-screen,
  .kyc-screen,
  .referral-screen,
  .bank-accounts-page,
  .bundle-plan-page-v2,
  .bundle-category-page,
  .staking-plan-page,
  .bundle-detail-page,
  .my-bundle-page {
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero,
  .page,
  .form-page {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .quick-grid {
    gap: 6px;
    padding: 0 6px;
  }

  .quick-item {
    min-height: 68px;
    padding: 8px 2px;
  }

  .quick-item > span:last-child {
    font-size: 10px;
  }

  .bottom-nav a,
  .bottom-nav button {
    font-size: 9px;
  }
}

/* =====================================================
   Contract page mobile redesign (chart + header)
   ===================================================== */

.contract-mobile-header {
  padding-bottom: 8px;
}

.contract-pair-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.contract-pair-selector-btn {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

.contract-pair-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.pair-chevron {
  color: var(--muted);
  font-size: 11px;
}

.contract-header-actions {
  display: flex;
  gap: 8px;
}

.contract-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #fff;
}

.contract-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.contract-price-value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}

.contract-price-change {
  font-size: 16px;
  font-weight: 700;
}

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

.contract-stats-row > div {
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.contract-stats-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.contract-stats-row b {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
}

.intervals button {
  border: 1px solid transparent;
}

.intervals button.active {
  color: var(--orange);
  background: #fff;
  border-color: var(--orange);
}

.chart-candles {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 0 8px;
}

.candlestick {
  position: relative;
  flex: 1 1 auto;
  min-width: 2px;
  max-width: 14px;
  height: 100%;
}

.candlestick::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--bottom);
  width: 1px;
  height: var(--height);
  transform: translateX(-50%);
  background: var(--stick-color);
}

.candlestick::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--body-bottom);
  width: 75%;
  min-width: 3px;
  height: var(--body-height);
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--stick-color);
}

.candlestick.up {
  --stick-color: var(--green);
}

.candlestick.down {
  --stick-color: var(--red);
}

.chart-price-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - var(--line-y));
  border-top: 1px dashed var(--red);
  pointer-events: none;
}

.chart-price-line span {
  position: absolute;
  right: 6px;
  top: -10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .contract-price-value {
    font-size: 28px;
  }

  .contract-stats-row b {
    font-size: 12px;
  }

  .chart {
    height: 360px;
    min-height: 260px;
    max-height: 45vh;
  }
}

/* Notification detail bottom-sheet mobile fixes */
@media (max-width: 900px) {
  .notification-detail-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .notification-detail-modal {
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 14px 14px 0 0;
    padding: 18px 18px calc(84px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }

  .notification-detail-modal .notification-detail-body {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 420px) {
  .notification-detail-modal {
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

.primary-btn.reject {
  background: var(--red);
}

.allocation-symbol-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.allocation-symbol-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.allocation-symbol-icon.stock.has-image {
  border-radius: 4px;
  background: transparent;
}

.allocation-symbol-text {
  font-weight: 600;
}

@media (max-width: 640px) {
  .allocation-symbol-icon {
    width: 22px;
    height: 22px;
  }

  .allocation-symbol-cell {
    gap: 6px;
  }
}
