:root {
  color-scheme: dark;
  --bg: #00050d;
  --bg-soft: #020b18;
  --surface: #1f242c;
  --surface-2: #151b24;
  --surface-3: #0b1320;
  --line: #2d3544;
  --line-blue: rgba(0, 153, 255, 0.55);
  --text: #f6f8fb;
  --muted: #99a6bb;
  --muted-2: #6e7889;
  --blue: #0a96ff;
  --blue-2: #02b8ff;
  --green: #08c98b;
  --red: #ff4b67;
  --yellow: #f6b83f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  --header-h: 66px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8fd;
  --bg-soft: #eaf4ff;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #edf4fc;
  --line: #d8e2f0;
  --line-blue: rgba(0, 128, 255, 0.35);
  --text: #07111f;
  --muted: #526176;
  --muted-2: #75849a;
  --shadow: 0 20px 60px rgba(10, 35, 70, 0.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 74% 25%, rgba(0, 132, 255, 0.18), transparent 32rem), linear-gradient(180deg, #000 0, var(--bg-soft) 30%, var(--bg) 100%);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}
body:has(.landing), body:has(.auth-page) { background: #000; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 10px 72px;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img { width: 104px; height: auto; display: block; }
.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 750;
}
.nav a, .nav button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}
.nav svg { width: 18px; height: 18px; }
.nav a.active, .nav button.active { color: var(--blue-2); background: rgba(255,255,255,0.055); }
.app-header .nav {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  gap: 2px;
}
.app-header .nav a, .app-header .nav button { min-height: 40px; padding: 0 14px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 14px; position: relative; }
.text-button, .primary-button, .secondary-button, .app-button, .app-ghost-button, .danger-button, .outline-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 900;
  color: var(--text);
}
.text-button { min-height: 40px; padding: 0 8px; }
.primary-button, .app-button { background: linear-gradient(135deg, var(--blue), #17c7ff); color: #fff; }
.primary-button.large, .secondary-button.large { min-height: 48px; padding: 0 28px; }
.primary-button.small, .secondary-button.small, .app-button.small, .app-ghost-button.small, .danger-button.small, .outline-button.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.primary-button.full, .secondary-button.full { width: 100%; }
.secondary-button, .app-ghost-button, .outline-button { background: var(--surface-3); border-color: var(--line); }
.danger-button { background: rgba(255,75,103,.13); color: var(--red); border-color: rgba(255,75,103,.45); }
.header-icon, .menu-button, .inline-icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9fb0c8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-icon:hover, .menu-button:hover { background: rgba(255,255,255,.065); color: var(--blue-2); }
.header-icon svg, .menu-button svg { width: 24px; height: 24px; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(0,153,255,.18); }
.account-menu, .notification-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 270px;
  display: none;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.account-menu.open, .notification-menu.open { display: grid; gap: 10px; }
.account-menu small, .notification-menu p { color: var(--muted); }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 12px; min-height: 38px; color: var(--text); background: transparent; border: 0; text-align: left; font-weight: 750; }
.account-menu svg { width: 18px; height: 18px; color: var(--blue-2); }
#app { min-height: calc(100vh - var(--header-h)); outline: none; }

.brx-boot-loader {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 32px 18px;
  background: radial-gradient(circle at 50% 34%, rgba(0, 153, 255, .18), transparent 24rem), #000;
  color: var(--text);
  text-align: center;
}

.brx-boot-mark {
  position: relative;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
}

.brx-boot-mark img {
  width: 86px;
  height: auto;
  display: block;
}

.brx-boot-spinner {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(0, 184, 255, .14);
  border-top-color: var(--blue-2);
  border-right-color: rgba(0, 153, 255, .48);
  border-radius: 50%;
  animation: brx-boot-spin .8s linear infinite;
}

.brx-boot-loader strong {
  font-size: 16px;
  font-weight: 850;
}

.brx-boot-loader small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@keyframes brx-boot-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brx-boot-spinner {
    animation-duration: 1.8s;
  }
}

.landing { background: #000; }
.hero { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 72px; align-items: center; max-width: 1460px; margin: 0 auto; padding: 40px 72px 72px; }
.hero-copy { max-width: 720px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 850; }
.badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-2); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 28px 0 18px; font-size: clamp(44px, 5.2vw, 76px); line-height: .98; letter-spacing: 0; }
.accent, .blue, .eyebrow { color: var(--blue-2); }
.hero-text { max-width: 680px; color: var(--muted); font-size: 21px; }
.hero-actions { display: flex; gap: 14px; margin: 30px 0; }
.calculator-card, .phone-card, .feature-card, .step-card, .app-card, .wallet-panel, .settings-card, .admin-stat-card, .trade-ticket, .warning-card, .empty-panel, .security-strip, .shortcut-card, .review-card, .kyc-form, .offer-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.calculator-card { max-width: 640px; padding: 24px; }
.card-top, .payment-row, .rate-head, .page-title, .settings-card-head, .sheet-head, .admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow, .app-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.rate-note { color: var(--muted); font-weight: 750; }
.rate-note strong, .payment-row strong { color: var(--blue-2); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; background: #000; border: 1px solid var(--line); border-radius: 8px; }
.segmented button { min-height: 42px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 900; }
.segmented button.active { background: var(--blue); color: #fff; }
.trade-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.input-box, .form-field { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.input-box { grid-template-columns: 1fr auto; align-items: center; padding: 14px 16px; background: #000; border: 1px solid var(--line); border-radius: 8px; }
.input-box span, .input-box input { grid-column: 1; }
.input-box input, .form-field input, .form-field select, textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #26364e;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.input-box input { min-height: 28px; padding: 0; border: 0; background: transparent; font-size: 22px; font-weight: 900; }
.input-box b { grid-column: 2; grid-row: 1 / 3; color: var(--blue-2); }
.payment-row { color: var(--muted); }
.phone-shell { max-width: 350px; margin-left: auto; padding: 14px; border: 10px solid #2a2d35; border-radius: 46px; background: #000; box-shadow: var(--shadow); }
.phone-status, .phone-user, .phone-actions, .bottom-tabs { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phone-status, .phone-user { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--blue-2); font-weight: 900; }
.phone-card { margin: 18px 10px; padding: 20px; }
.phone-card small { color: var(--muted); font-weight: 850; text-transform: uppercase; }
.phone-card strong { display: block; margin-top: 14px; font-size: 32px; }
.muted, .app-muted { color: var(--muted); }
.phone-actions button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 12px; }
.bottom-tabs { padding: 10px 28px; color: var(--muted); }
.section { max-width: 1460px; margin: 0 auto; padding: 72px; border-top: 1px solid var(--line); }
.section-head h2 { font-size: clamp(32px, 4vw, 52px); max-width: 780px; }
.feature-grid, .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps-grid { grid-template-columns: repeat(4, 1fr); }
.feature-card, .step-card { padding: 28px; min-height: 180px; }
.step-card span { color: rgba(0, 153, 255, .55); font-size: 42px; font-weight: 950; }
.feature-card h3, .step-card h3 { font-size: 24px; }
.feature-card p, .step-card p { color: var(--muted); }

.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: start center; padding: 14px 20px 34px; background: radial-gradient(circle at 50% 35%, rgba(0,153,255,.16), transparent 24rem), #000; }
.auth-card { width: min(100%, 420px); padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.auth-title { text-align: center; margin-bottom: 14px; }
.auth-logo img { width: 90px; }
.auth-title h1 { margin: 8px 0 4px; font-size: 24px; }
.auth-footer { text-align: center; margin: 18px 0 0; color: var(--muted); }
.text-link { color: var(--blue-2); font-weight: 900; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; color: var(--muted); }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-error { min-height: 22px; color: #ff7890; font-weight: 850; margin: 6px 0; }
.verify-code { padding: 16px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }

.exchange-app { width: min(100%, 1840px); margin: 0 auto; padding: 40px 72px 80px; }
.app-page-narrow { width: min(100%, 1540px); }
.app-page-wide { width: min(100%, 1880px); }
.app-greeting { color: var(--muted); font-size: 21px; margin-bottom: 26px; }
.app-greeting strong { color: var(--text); }
.app-overview-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(340px, 1fr); gap: 26px; margin-bottom: 26px; }
.app-card { padding: 34px; }
.wallet-summary h2, .wallet-page-card h2 { margin: 10px 0 0; font-size: clamp(36px, 4vw, 54px); line-height: 1; }
.wallet-summary h2 span, .wallet-page-card h2 span, .rate-card h2 span { color: var(--muted); font-size: .42em; }
.dashboard-wallet-compact { display: grid; gap: 24px; min-height: 330px; }
.wallet-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.round-action { min-height: 76px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line); font-size: 18px; font-weight: 950; }
.round-action.buy { background: var(--green); color: #00170f; border-color: var(--green); }
.round-action.sell { background: var(--red); color: #fff; border-color: var(--red); }
.rate-card { min-height: 330px; display: grid; align-content: start; gap: 24px; }
.rate-card h2 { margin: 28px 0 0; font-size: clamp(44px, 5vw, 68px); line-height: 1; }
.best-rates { display: flex; gap: 42px; margin-top: 22px; }
.best-rates strong { display: block; font-size: 22px; }
.best-rates span { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.kyc-banner { display: block; border: 1px solid var(--line-blue); border-radius: 8px; background: rgba(0, 105, 190, .13); overflow: hidden; margin: 24px 0; }
.kyc-top { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; padding: 24px; }
.kyc-top h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.kyc-top p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.kyc-open { min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-blue); border-radius: 8px; color: var(--blue-2); font-weight: 900; }
.kyc-limits { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(0,153,255,.22); }
.kyc-limits div { padding: 20px; text-align: center; }
.kyc-limits span { display: block; color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.kyc-limits strong { color: var(--blue-2); font-size: 17px; }
.shortcut-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.shortcut-card { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 16px; padding: 22px; }
.shortcut-card h3, .security-strip h3 { margin: 0 0 4px; }
.shortcut-card p, .security-strip p { color: var(--muted); margin: 0; }
.security-strip { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center; padding: 22px; border-color: rgba(0,153,255,.4); background: rgba(0,105,190,.08); }
.mini-icon { width: 52px; height: 52px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-blue); background: rgba(0,153,255,.12); color: var(--blue-2); font-size: 13px; font-weight: 950; text-transform: uppercase; }
.chevron { color: var(--muted); font-size: 22px; }

.market-head { display: grid; grid-template-columns: 260px 1fr; align-items: end; gap: 20px; margin: 10px 0 18px; }
.market-rate { justify-self: end; text-align: right; }
.market-rate strong { display: block; font-size: 30px; }
.market-rate span { color: var(--muted); font-size: 13px; font-weight: 900; }
.filter-row { display: grid; grid-template-columns: 130px minmax(180px, 300px) minmax(260px, 1fr); gap: 14px; align-items: center; margin: 18px 0 4px; }
.filter-row.has-clear { grid-template-columns: 130px minmax(180px, 300px) minmax(260px, 1fr) 110px; }
.filter-chip { min-height: 48px; display: inline-flex; align-items: center; justify-content: flex-start; padding: 0 20px; border: 1px solid var(--line); border-radius: 8px; background: #000; color: var(--muted); font-weight: 900; }
.filter-chip.active, .filter-chip.has-value { color: var(--blue-2); border-color: var(--line-blue); }
.filter-chip.clear { justify-content: center; }
.filter-input-chip { padding: 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.filter-input-chip input, .filter-input-chip select { min-width: 0; width: 100%; height: 40px; border: 0; background: transparent; color: var(--text); padding: 0 10px; outline: none; font-weight: 850; }
.filter-input-chip button { height: 40px; border: 0; border-radius: 7px; padding: 0 14px; background: var(--blue); color: #fff; font-weight: 950; }
.filter-input-chip.wide { grid-template-columns: 1fr; }
.market-count { margin: 6px 0 0; }
.empty-panel { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 28px; text-align: center; }
.empty-panel.compact { min-height: 170px; }
.market-empty { margin-top: 0; }
.empty-panel h3 { margin: 0; font-size: 20px; }
.empty-panel p { color: var(--muted); margin: 0 0 8px; }
.app-table { margin-top: 12px; border-top: 1px solid var(--line); }
.table-row { display: grid; grid-template-columns: 1.4fr .7fr 1.1fr 1fr 130px; gap: 18px; align-items: center; padding: 18px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.table-head { color: var(--muted); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.table-row small { display: block; color: var(--muted); }
.trader-cell { display: flex; align-items: center; gap: 12px; }
.trader-cell > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--blue-2); font-weight: 950; }
.table-price { color: var(--green); font-size: 20px; }
.sell-price { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span, .status-pill, .settings-badge, .sheet-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 900; }
.buy-button { background: var(--green); color: #00170f; }
.sell-button { background: var(--red); color: #fff; }
.trade-ticket { margin: 18px 0; padding: 22px; display: grid; grid-template-columns: 1fr 360px; gap: 22px; }
.trade-ticket h3 { margin-bottom: 8px; }
.trade-ticket-form { display: grid; gap: 12px; }
.trade-preview { display: flex; justify-content: space-between; color: var(--muted); }
.trade-preview strong { color: var(--text); }
.trade-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 18px; align-items: start; }
.trade-detail-main, .trade-side-panel, .dispute-panel { padding: 22px; }
.trade-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.trade-detail-head h3 { margin: 4px 0 2px; font-size: 28px; }
.trade-countdown-card { display: grid; gap: 3px; padding: 14px 16px; border: 1px solid rgba(0,153,255,.35); border-radius: 8px; background: rgba(0,153,255,.08); margin-bottom: 16px; }
.trade-countdown-card span, .trade-countdown-card small { color: var(--muted); }
.trade-countdown-card strong { color: var(--blue-2); font-size: 28px; letter-spacing: 0; }
.payment-instructions { display: grid; gap: 14px; }
.payment-instructions h4 { margin: 4px 0; font-size: 24px; }
.payment-method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.payment-method-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.payment-method-card strong, .payment-method-card small { display: block; }
.payment-method-card small { margin-top: 5px; color: var(--muted); }
.trade-actions-panel { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.trade-actions-panel .app-button, .trade-actions-panel .app-ghost-button, .trade-actions-panel .danger-button { min-height: 42px; }
.trade-timeline { display: grid; gap: 12px; margin-top: 18px; }
.timeline-step { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--muted); }
.timeline-step > span { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line); }
.timeline-step.active > span { background: var(--blue-2); border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(0,153,255,.12); }
.timeline-step strong, .timeline-step small { display: block; }
.timeline-step.active strong { color: var(--text); }
.dispute-panel { margin-top: 18px; }
.evidence-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.evidence-form .wide, .evidence-form .form-error, .evidence-form button { grid-column: 1 / -1; }
.evidence-list { display: grid; gap: 10px; margin: 0 0 16px; }
.evidence-list.empty { min-height: 44px; align-items: center; color: var(--muted); }
.evidence-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.evidence-item strong, .evidence-item small { display: block; }
.evidence-item p { margin: 6px 0; color: var(--muted); white-space: pre-wrap; }
.evidence-item small { color: var(--muted); }

.page-title { margin-bottom: 22px; }
.page-title h2, .settings-head h2, .sheet-head h2, .admin-hero h2 { margin: 0; font-size: clamp(30px, 3vw, 46px); }
.offer-form, .kyc-form, .wallet-panel { padding: 26px; margin-bottom: 22px; }
.kyc-form-grid, .settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field.wide { grid-column: 1 / -1; }
.payment-methods { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; color: var(--muted); }
.tabs-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px; background: #000; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; }
.tabs-bar button { min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 900; }
.tabs-bar button.active { background: var(--surface); color: var(--text); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.trade-row { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
.wallet-page-card { margin-bottom: 24px; }
.balance-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.balance-breakdown div { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.balance-breakdown span { display: block; color: var(--muted); font-weight: 850; }
.wallet-mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 5px; background: #000; border-radius: 8px; }
.wallet-mode-tabs button { min-height: 50px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.wallet-mode-tabs button.active { background: rgba(0,153,255,.16); color: var(--blue-2); }
.network-choice-list { display: grid; gap: 12px; margin: 16px 0; }
.deposit-network-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); text-align: left; }
.deposit-network-card.active { border-color: var(--line-blue); }
.deposit-network-card.muted { opacity: .55; }
.network-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; font-weight: 950; }
.network-mark.bsc { color: #f0b90b; background: #111; }
.network-status { color: var(--blue-2); font-size: 12px; font-weight: 950; }
.network-helper, .deposit-note { padding: 14px 16px; border: 1px solid rgba(246,184,63,.45); border-radius: 8px; background: rgba(246,184,63,.08); color: #d9c493; }
.deposit-address-card { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line-blue); border-radius: 8px; background: rgba(0,153,255,.08); margin: 14px 0; }
.deposit-address-card span, .deposit-address-card small { display: block; color: var(--muted); }
.deposit-address-card strong { word-break: break-all; }
.wallet-network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wallet-network-card { min-height: 132px; align-items: start; border-color: rgba(255,255,255,.1); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.wallet-network-card:hover { transform: translateY(-1px); border-color: rgba(0,153,255,.45); }
.wallet-network-card.active { background: linear-gradient(135deg, rgba(0,153,255,.14), rgba(0,82,170,.08)); box-shadow: inset 0 0 0 1px rgba(0,153,255,.16); }
.wallet-network-card.muted { opacity: 1; }
.wallet-network-card.muted .network-mark, .wallet-network-card.muted div { opacity: .56; }
.wallet-network-card strong { display: block; margin-bottom: 4px; }
.wallet-network-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.network-status { justify-self: end; padding: 6px 10px; border: 1px solid currentColor; border-radius: 999px; background: rgba(0,153,255,.08); white-space: nowrap; }
.network-status.live { color: var(--green); background: rgba(8,201,139,.1); }
.network-status.soon { color: var(--muted); background: var(--surface-3); }
.deposit-address-detail { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; align-items: center; }
.deposit-qr-card { width: 112px; height: 112px; display: grid; place-items: center; padding: 8px; border-radius: 8px; background: #fff; box-shadow: 0 18px 36px rgba(0,0,0,.22); }
.deposit-qr-card svg { width: 100%; height: 100%; display: block; }
.qr-placeholder { color: #0b1422; font-size: 20px; font-weight: 700; }
.deposit-address-main { min-width: 0; }
.deposit-address-main strong { display: block; margin: 4px 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; line-height: 1.45; letter-spacing: 0; }
.wallet-action-form { display: grid; gap: 16px; }
.internal-transfer-panel .deposit-note { display: none; }
.wallet-action-form .form-field:has(#withdrawAddressId) { display: none; }
.network-mark.bsc { font-size: 0 !important; line-height: 0; color: transparent; text-indent: -9999px; overflow: hidden; background: transparent url('./assets/bnb-chain-logo.png') center/contain no-repeat; border: 0; }
.wallet-network-card strong + small { display: none; }
.withdrawal-flow-backdrop { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(0,5,13,.92); backdrop-filter: blur(12px); }
.withdrawal-flow-card { width: min(620px,100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: #111b29; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.withdrawal-flow-card header { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 34px; }
.withdrawal-flow-card header h2 { margin: 0; text-align: center; font-size: 24px; }
.withdrawal-flow-card header button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); }
.withdrawal-flow-card header svg { width: 24px; height: 24px; }
.withdrawal-flow-receive { padding: 12px 0 34px; text-align: center; border-bottom: 1px solid var(--line); }
.withdrawal-flow-receive span { display: block; color: var(--muted); font-size: 16px; }
.withdrawal-flow-receive strong { display: block; margin-top: 8px; font-size: clamp(36px,7vw,54px); }
.withdrawal-flow-details { margin: 24px 0; }
.withdrawal-flow-details div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 20px; padding: 14px 0; }
.withdrawal-flow-details dt { color: var(--muted); }
.withdrawal-flow-details dd { margin: 0; text-align: right; font-weight: 750; overflow-wrap: anywhere; }
.withdrawal-flow-address { font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: 13px; }
.withdrawal-flow-warning { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0; padding: 16px; border-radius: 10px; background: var(--surface-3); color: var(--muted); line-height: 1.5; }
.withdrawal-flow-warning svg { flex: 0 0 22px; width: 22px; }
.withdrawal-flow-primary { width: 100%; min-height: 54px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.withdrawal-flow-primary:disabled { opacity: .6; cursor: wait; }
.wallet-activity-row { cursor: pointer; transition: background .15s ease, transform .15s ease; }
.wallet-activity-row:hover, .wallet-activity-row:focus-visible { background: rgba(0,153,255,.08); transform: translateY(-1px); outline: none; }

.withdrawal-success-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.withdrawal-success-modal { position: relative; width: min(520px,100%); max-height: calc(100vh - 48px); overflow: auto; padding: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: linear-gradient(180deg,rgba(15,28,42,.98),rgba(5,12,22,.99)); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.withdrawal-success-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 2px auto 20px; border-radius: 50%; background: rgba(8,201,139,.14); border: 1px solid rgba(8,201,139,.42); color: var(--green); box-shadow: 0 0 0 10px rgba(8,201,139,.05); }
.withdrawal-success-mark svg { width: 34px; height: 34px; }
.withdrawal-success-heading { text-align: center; }
.withdrawal-success-heading .app-label { color: var(--green); }
.withdrawal-success-heading h2 { margin: 5px 0 10px; font-size: clamp(27px,5vw,36px); line-height: 1.12; }
.withdrawal-success-heading p:last-child { margin: 0 auto; max-width: 420px; color: var(--muted); line-height: 1.55; }
.withdrawal-success-amount { margin: 26px 0 14px; padding: 20px; border: 1px solid rgba(8,201,139,.2); border-radius: 12px; background: rgba(8,201,139,.06); text-align: center; }
.withdrawal-success-amount span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.withdrawal-success-amount strong { font-size: 31px; }
.withdrawal-success-amount small { color: var(--muted); font-size: 15px; }
.withdrawal-success-details { margin: 0 0 20px; }
.withdrawal-success-details div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 16px; padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.07); }
.withdrawal-success-details dt { color: var(--muted); }
.withdrawal-success-details dd { min-width: 0; margin: 0; text-align: right; font-weight: 750; overflow-wrap: anywhere; }
.transaction-detail-modal .withdrawal-success-actions { grid-template-columns: 1fr; }
.profile-trading-stats { margin: 0 0 22px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.profile-stat-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.profile-stat-head h2 { margin: 4px 0 0; font-size: 24px; }
.profile-stat-head small, .profile-stat-grid span { color: var(--muted); }
.profile-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.profile-stat-grid > div { padding: 18px; border-left: 1px solid var(--line); }
.profile-stat-grid > div:first-child { border-left: 0; }
.profile-stat-grid span, .profile-stat-grid strong { display: block; }
.profile-stat-grid span { margin-bottom: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.profile-stat-grid strong { font-size: 23px; }
.profile-stat-grid .primary strong { color: var(--green); }
@media (max-width: 720px) {
  .profile-stat-head { align-items: start; flex-direction: column; }
  .profile-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-stat-grid > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .profile-stat-grid > div:nth-child(4) { border-top: 1px solid var(--line); }
}
.withdrawal-success-note { margin: 16px 0 22px; color: var(--muted); font-size: 13px; text-align: center; }
.withdrawal-success-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
@media (max-width: 560px) {
  .withdrawal-success-backdrop { padding: 12px; align-items: end; }
  .withdrawal-success-modal { max-height: calc(100vh - 24px); padding: 28px 20px 20px; border-radius: 16px 16px 10px 10px; }
  .withdrawal-success-actions { grid-template-columns: 1fr; }
  .withdrawal-success-actions .app-ghost-button { min-height: 44px; }
}

.settings-head { margin-bottom: 26px; }
.settings-head p, .admin-hero p { color: var(--muted); font-size: 18px; }
.settings-tabs { display: flex; gap: 12px; border: 1px solid var(--line); padding: 0 14px; margin-bottom: 28px; overflow-x: auto; }
.settings-tab { min-height: 56px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 850; white-space: nowrap; }
.settings-tab.active { color: var(--text); border-color: var(--green); }
.settings-content { display: grid; gap: 24px; }
.settings-identity { display: flex; align-items: center; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.settings-avatar-wrap { position: relative; }
.settings-avatar { width: 110px; height: 110px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 54px; border: 4px solid var(--line); }
.settings-camera { position: absolute; right: -4px; bottom: 4px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #022; background: var(--green); color: #00170f; }
.settings-muted { color: var(--muted); }
.settings-card { padding: 0; overflow: hidden; }
.settings-form-card, .settings-card-flat { padding: 24px; }
.settings-card-head { margin-bottom: 14px; }
.settings-card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 22px; }
.settings-card-head p { margin: 0; color: var(--muted); }
.settings-form-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.settings-form-actions.full { grid-column: 1 / -1; }
.settings-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.07); }
.settings-row:first-child { border-top: 0; }
.settings-row-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.settings-row-main strong, .settings-row-main small { display: block; }
.settings-row-main small { color: var(--muted); font-size: 14px; }
.settings-badge.success { color: var(--green); background: rgba(8,201,139,.12); }
.settings-badge.warning { color: var(--yellow); background: rgba(246,184,63,.12); }
.settings-action { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text); font-weight: 900; }
.settings-action.warning { color: var(--yellow); border-color: rgba(246,184,63,.45); }
.settings-action.danger { color: var(--red); border-color: rgba(255,75,103,.5); }
.settings-action.success { color: var(--green); border-color: rgba(8,201,139,.45); }
.settings-note { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.settings-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--muted); }
.settings-payment-form, #withdrawalAddressForm, #tradePreferencesForm { display: grid; gap: 16px; }
.payment-grid { grid-template-columns: repeat(3, 1fr); }
.settings-default-check { margin-top: 4px; }
.settings-toggle-row { cursor: pointer; }
.settings-toggle { width: 46px; height: 24px; accent-color: var(--blue); }
.danger-divider { display: flex; align-items: center; gap: 16px; color: var(--red); font-weight: 900; text-transform: uppercase; }
.danger-divider::before, .danger-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255,75,103,.35); }
.file-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 18px 0; }
.file-upload { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); text-align: center; padding: 18px; }
.file-upload input { width: 100%; }
.review-card { display: flex; align-items: center; gap: 18px; padding: 18px; margin-bottom: 14px; }
.account-detail-card { display: flex; align-items: center; gap: 18px; }

.admin-page { display: grid; gap: 28px; }
.admin-hero { display: grid; gap: 20px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.admin-stat-card { padding: 18px; display: flex; gap: 14px; min-height: 120px; }
.admin-stat-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,153,255,.12); color: var(--blue-2); }
.admin-stat-card span { color: var(--muted); font-weight: 850; }
.admin-stat-card strong { display: block; font-size: 24px; margin: 4px 0; }
.admin-stat-card small { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr); gap: 22px; }
.admin-list { display: grid; gap: 10px; }
.admin-queue-row { width: 100%; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); text-align: left; }
.admin-queue-row small { display: block; color: var(--muted); }
.admin-submission-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.admin-submission-summary div, .admin-setting-tile { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.admin-submission-summary span, .admin-setting-tile span, .admin-setting-tile small { display: block; color: var(--muted); }
.kyc-image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kyc-image-card { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.kyc-image-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.kyc-image-card figcaption, .kyc-image-card.empty { padding: 12px; color: var(--muted); }
.admin-actions { display: flex; gap: 12px; margin-top: 18px; }
.admin-actions.inline { margin-top: 0; }
.admin-ops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-operation-panel { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.admin-operation-panel h4 { margin: 0 0 12px; }
.admin-mini-list { display: grid; gap: 8px; }
.admin-mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.admin-mini-row:first-child { border-top: 0; }
.admin-mini-row small { display: block; color: var(--muted); }
.limit-editor { display: grid; gap: 12px; }
.limit-row { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 16px; align-items: end; padding: 14px; border-radius: 8px; background: var(--surface-2); }
.admin-settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.warning-card { padding: 24px; border-color: rgba(255,75,103,.5); background: linear-gradient(135deg, rgba(255,75,103,.12), rgba(10,20,50,.35)); }
.warning-card h3 { color: #ff7890; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: none; max-width: 360px; padding: 14px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-weight: 850; }
.toast.show { display: block; }

@media (max-width: 1200px) {
  .site-header { grid-template-columns: 140px 1fr auto; padding: 12px 24px; }
  .exchange-app { padding: 32px 28px 70px; }
  .hero { grid-template-columns: 1fr; padding: 40px 28px 70px; }
  .phone-wrap { display: none; }
  .app-overview-grid, .admin-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row, .filter-row.has-clear { grid-template-columns: 1fr 1fr; }
  .filter-chip.wide { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --header-h: auto; }
  .site-header { position: relative; grid-template-columns: 1fr; justify-items: start; gap: 12px; padding: 16px; }
  .brand img { width: 110px; }
  .nav, .app-header .nav { width: 100%; overflow-x: auto; justify-content: start; }
  .header-actions { justify-self: start; }
  .exchange-app { padding: 24px 16px 60px; }
  .hero h1 { font-size: 42px; }
  .hero, .section { padding: 28px 16px 54px; }
  .feature-grid, .steps-grid, .shortcut-row, .wallet-actions, .balance-breakdown, .kyc-limits, .trade-inputs, .kyc-form-grid, .settings-form-grid, .payment-grid, .file-grid, .admin-stats-grid, .admin-ops-grid, .admin-settings-grid, .admin-submission-summary { grid-template-columns: 1fr; }
  .wallet-network-grid { grid-template-columns: 1fr; }
  .deposit-address-detail { grid-template-columns: 1fr; align-items: start; }
  .deposit-qr-card { width: 132px; height: 132px; }
  .market-head { grid-template-columns: 1fr; }
  .market-rate { justify-self: start; text-align: left; }
  .filter-row, .filter-row.has-clear { grid-template-columns: 1fr; }
  .table-row, .trade-row { grid-template-columns: 1fr; }
  .trade-ticket { grid-template-columns: 1fr; }
  .kyc-top { grid-template-columns: 52px 1fr; }
  .kyc-open { grid-column: 1 / -1; }
  .settings-row { grid-template-columns: 42px 1fr; }
  .settings-row-aside { grid-column: 2; }
  .limit-row { grid-template-columns: 1fr; }
}


/* Market page polish: compact, table-first layout inspired by the reference marketplace. */
.market-app {
  padding-top: 22px;
  max-width: 1760px;
}

.market-app .market-head {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 0 28px;
}

.market-app .app-tabs {
  width: 200px;
  padding: 4px;
  border-radius: 8px;
  background: #07090d;
}

.market-app .app-tabs button {
  min-height: 44px;
  font-size: 15px;
}

.market-app .app-tabs.buy button.active {
  background: var(--green);
  color: #00170f;
}

.market-app .app-tabs.sell button.active {
  background: var(--red);
  color: #fff;
}

.market-app .market-rate strong {
  font-size: 22px;
  line-height: 1.1;
}

.market-app .market-rate span {
  font-size: 12px;
  letter-spacing: .02em;
}

.market-filter-row,
.market-filter-row.has-clear {
  grid-template-columns: 140px 330px minmax(320px, 1fr) 104px;
  gap: 14px;
  margin: 0 0 14px;
}

.market-filter-row:not(.has-clear) {
  grid-template-columns: 140px 330px minmax(320px, 1fr);
}

.market-app .filter-chip {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  background: #030405;
  font-size: 15px;
}

.market-app .filter-input-chip {
  padding: 5px;
}

.market-app .filter-input-chip input,
.market-app .filter-input-chip select {
  height: 40px;
  font-size: 15px;
}

.market-app .filter-input-chip button {
  height: 40px;
  min-width: 58px;
}

.market-count {
  margin: 10px 0 14px;
  font-size: 14px;
}

.market-app .app-table {
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: transparent;
}

.market-app .table-row {
  grid-template-columns: minmax(260px, 1.25fr) 180px minmax(240px, 1fr) minmax(180px, .8fr) 150px;
  gap: 28px;
  padding: 22px 12px;
  border-bottom-color: rgba(255,255,255,.055);
}

.market-app .table-head {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #596273;
  font-size: 12px;
}

.market-app .trader-cell > span {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.market-app .trader-cell strong,
.market-app .table-row > div strong {
  font-size: 16px;
}

.market-app .table-row small {
  margin-top: 3px;
  color: #6f7889;
  font-size: 13px;
}

.market-app .table-price {
  font-size: 19px;
  font-weight: 900;
}

.market-app .chips span {
  padding: 5px 10px;
  background: #141820;
  font-size: 12px;
}

.market-app .table-row .app-button {
  min-height: 44px;
  justify-self: end;
  min-width: 124px;
}

.market-empty-state {
  min-height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

.market-empty-state .mini-icon {
  width: 46px;
  height: 46px;
}

.market-empty-state h3 {
  margin: 0;
  font-size: 18px;
}

.market-empty-state p {
  margin: 0 0 4px;
  color: var(--muted);
}

.market-warning {
  margin-top: 16px;
}

@media (max-width: 1200px) {
  .market-filter-row,
  .market-filter-row.has-clear,
  .market-filter-row:not(.has-clear) {
    grid-template-columns: 1fr 1fr;
  }

  .market-app .filter-chip.wide,
  .market-app .payment-filter {
    grid-column: 1 / -1;
  }

  .market-app .table-row {
    grid-template-columns: minmax(220px, 1fr) 130px minmax(190px, 1fr) 150px 120px;
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .market-app .market-head,
  .market-filter-row,
  .market-filter-row.has-clear,
  .market-filter-row:not(.has-clear),
  .market-app .table-row {
    grid-template-columns: 1fr;
  }

  .market-app .market-rate {
    justify-self: start;
    text-align: left;
  }

  .market-app .table-row .app-button {
    justify-self: stretch;
  }
}

/* Global compact scale for BRX app screens. Keeps the interface closer to the cleaner EBR proportions. */
:root {
  --header-h: 58px;
}

body {
  font-size: 13px;
}

.site-header {
  grid-template-columns: 190px 1fr auto;
  gap: 22px;
  padding: 8px 56px;
}

.brand img {
  width: 92px;
}

.nav {
  gap: 12px;
}

.nav a,
.nav button {
  min-height: 36px;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
}

.nav svg {
  width: 16px;
  height: 16px;
}

.app-header .nav {
  padding: 5px;
}

.app-header .nav a,
.app-header .nav button {
  min-height: 36px;
  padding: 0 12px;
}

.header-actions {
  gap: 10px;
}

.header-icon,
.menu-button,
.inline-icon-button {
  width: 38px;
  height: 38px;
}

.header-icon svg,
.menu-button svg {
  width: 21px;
  height: 21px;
}

.text-button,
.primary-button,
.secondary-button,
.app-button,
.app-ghost-button,
.danger-button,
.outline-button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.primary-button.large,
.secondary-button.large {
  min-height: 44px;
  padding: 0 24px;
}

.primary-button.small,
.secondary-button.small,
.app-button.small,
.app-ghost-button.small,
.danger-button.small,
.outline-button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.exchange-app {
  padding: 30px 56px 68px;
}

.app-greeting {
  font-size: 18px;
  margin-bottom: 20px;
}

.app-overview-grid {
  gap: 20px;
  margin-bottom: 20px;
}

.app-card {
  padding: 26px;
}

.wallet-summary h2,
.wallet-page-card h2 {
  font-size: clamp(30px, 3vw, 42px);
}

.dashboard-wallet-compact,
.rate-card {
  min-height: 260px;
  gap: 18px;
}

.wallet-actions {
  gap: 12px;
  padding-top: 18px;
}

.round-action {
  min-height: 60px;
  font-size: 15px;
}

.rate-card h2 {
  margin-top: 18px;
  font-size: clamp(36px, 4vw, 52px);
}

.best-rates {
  gap: 32px;
  margin-top: 14px;
}

.best-rates strong {
  font-size: 18px;
}

.kyc-banner {
  margin: 20px 0;
}

.kyc-top {
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  padding: 18px;
}

.kyc-top h3 {
  font-size: 18px;
}

.kyc-top p {
  font-size: 13px;
}

.kyc-open {
  min-height: 36px;
  padding: 0 14px;
}

.kyc-limits div {
  padding: 14px;
}

.kyc-limits strong {
  font-size: 15px;
}

.shortcut-row {
  gap: 14px;
  margin: 22px 0;
}

.shortcut-card,
.security-strip {
  padding: 18px;
}

.mini-icon {
  width: 44px;
  height: 44px;
  font-size: 12px;
}

.page-title h2,
.settings-head h2,
.sheet-head h2,
.admin-hero h2 {
  font-size: clamp(26px, 2.5vw, 38px);
}

.settings-head p,
.admin-hero p {
  font-size: 16px;
}

.offer-form,
.kyc-form,
.wallet-panel {
  padding: 22px;
}

.form-field input,
.form-field select,
textarea {
  min-height: 44px;
}

.wallet-mode-tabs button {
  min-height: 44px;
}

.settings-tab {
  min-height: 48px;
}

.settings-form-card,
.settings-card-flat {
  padding: 20px;
}

.settings-card-head h3 {
  font-size: 19px;
}

.settings-row {
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  padding: 16px 0;
}

.settings-avatar {
  width: 92px;
  height: 92px;
  font-size: 44px;
}

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

.auth-logo img {
  width: 78px;
}

.auth-title h1 {
  font-size: 22px;
}

@media (max-width: 1200px) {
  .site-header {
    grid-template-columns: 126px 1fr auto;
    padding: 10px 22px;
  }

  .exchange-app {
    padding: 28px 24px 64px;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px;
  }

  .brand img {
    width: 96px;
  }

  .exchange-app {
    padding: 22px 14px 56px;
  }
}

/* Dashboard action buttons should be compact, not hero-sized. */
.dashboard-wallet-compact {
  min-height: 220px;
  gap: 16px;
}

.dashboard-wallet-compact .wallet-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 16px;
}

.dashboard-wallet-compact .round-action {
  min-height: 48px;
  height: 48px;
  font-size: 14px;
  border-radius: 8px;
}

.dashboard-wallet-compact .round-action strong {
  line-height: 1;
}

/* Tighten dashboard wallet card vertical rhythm. */
.dashboard-wallet-compact {
  min-height: 205px;
  align-content: start;
}

.dashboard-wallet-compact > div:first-child {
  margin-bottom: 18px;
}

.dashboard-wallet-compact .wallet-actions {
  margin-top: 0;
  padding-top: 14px;
}

.wallet-summary h2 {
  margin-top: 8px;
  margin-bottom: 4px;
}

.wallet-summary .app-muted {
  margin-bottom: 0;
}

/* Frontend polish pass: keep the product compact, aligned, and table-first. */
:root {
  --header-h: 54px;
}

body {
  font-size: 13px;
}

.site-header {
  grid-template-columns: 180px 1fr auto;
  gap: 20px;
  padding: 8px 56px;
}

.brand img {
  width: 94px;
}

.app-header .brand img,
.admin-header .brand img {
  width: 92px;
}

.app-header .nav {
  padding: 4px;
  gap: 1px;
}

.app-header .nav a,
.app-header .nav button {
  min-height: 36px;
  padding: 0 12px;
  gap: 8px;
  font-size: 13px;
}

.app-header .nav svg {
  width: 16px;
  height: 16px;
}

.header-actions {
  gap: 10px;
}

.header-icon,
.menu-button,
.inline-icon-button {
  width: 36px;
  height: 36px;
}

.header-icon svg,
.menu-button svg {
  width: 20px;
  height: 20px;
}

.notification-dot {
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
}

.exchange-app {
  padding: 26px 50px 64px;
}

.app-page-wide,
.market-app {
  max-width: 1780px;
}

.app-greeting {
  font-size: 16px;
  margin-bottom: 18px;
}

.app-overview-grid {
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.app-card {
  padding: 24px;
}

.wallet-summary.dashboard-wallet-compact {
  min-height: 0;
  gap: 12px;
}

.dashboard-wallet-compact > div:first-child {
  margin-bottom: 6px;
}

.wallet-summary h2 {
  font-size: clamp(28px, 2.4vw, 38px);
}

.wallet-summary h2 span {
  font-size: .42em;
}

.dashboard-wallet-compact .wallet-actions {
  padding-top: 12px;
  gap: 8px;
}

.dashboard-wallet-compact .round-action {
  min-height: 42px;
  height: 42px;
  font-size: 13px;
}

.rate-card {
  min-height: 0;
  gap: 16px;
}

.rate-card h2 {
  margin-top: 12px;
  font-size: clamp(34px, 3.6vw, 48px);
}

.best-rates {
  gap: 28px;
}

.kyc-banner {
  margin: 18px 0;
}

.kyc-top {
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  padding: 16px 18px;
}

.kyc-top h3 {
  font-size: 17px;
}

.kyc-top p {
  font-size: 12px;
}

.kyc-limits div {
  padding: 12px 14px;
}

.kyc-limits strong {
  font-size: 14px;
}

.mini-icon {
  width: 40px;
  height: 40px;
  font-size: 11px;
}

.shortcut-row {
  gap: 12px;
  margin: 18px 0;
}

.shortcut-card,
.security-strip {
  padding: 16px;
}

.market-app {
  padding-top: 20px;
}

.market-app .market-head {
  margin-bottom: 22px;
}

.market-app .app-tabs {
  width: 190px;
}

.market-app .app-tabs button {
  min-height: 38px;
  font-size: 13px;
}

.market-filter-row,
.market-filter-row.has-clear,
.market-filter-row:not(.has-clear) {
  display: grid;
  align-items: center;
  margin-bottom: 10px;
}

.market-filter-row:not(.has-clear) {
  grid-template-columns: 128px 260px minmax(260px, 1fr);
}

.market-filter-row.has-clear {
  grid-template-columns: 128px 260px minmax(260px, 1fr) 92px;
}

.market-app .filter-chip {
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

.market-app .filter-input-chip {
  height: 42px;
  min-height: 42px;
  padding: 4px;
  align-items: center;
}

.market-app .filter-input-chip input,
.market-app .filter-input-chip select {
  height: 32px;
  font-size: 13px;
}

.market-app .filter-input-chip button {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.market-count {
  margin: 6px 0 4px;
  font-size: 12px;
}

.market-empty-state {
  min-height: 150px;
  padding: 18px;
}

.market-empty-state .mini-icon {
  width: 36px;
  height: 36px;
}

.market-empty-state h3 {
  font-size: 16px;
}

.app-table {
  margin-top: 10px;
}

.market-app .table-row {
  grid-template-columns: 1.5fr .7fr 1.15fr 1fr 112px;
  gap: 16px;
  padding: 15px 8px;
}

.market-app .table-head {
  padding-top: 10px;
  padding-bottom: 10px;
}

.market-app .table-price {
  font-size: 18px;
}

.market-app .trader-cell > span {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.market-app .trader-cell strong,
.market-app .table-row > div strong {
  font-size: 14px;
}

.market-app .table-row small {
  font-size: 12px;
}

.market-app .table-row .app-button {
  min-height: 38px;
  min-width: 104px;
  font-size: 13px;
}

.trade-ticket {
  margin: 14px 0;
  padding: 18px;
}

.auth-page {
  align-items: start;
  padding-top: 24px;
}

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

.auth-logo img {
  width: 72px;
}

.auth-title h1 {
  font-size: 22px;
}

.form-field {
  gap: 6px;
}

.form-field input,
.form-field select,
textarea {
  min-height: 42px;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .site-header {
    grid-template-columns: 120px 1fr auto;
    padding: 8px 20px;
  }

  .exchange-app {
    padding: 24px 22px 60px;
  }

  .trade-detail-grid {
    grid-template-columns: 1fr;
  }

  .market-app .table-row {
    grid-template-columns: minmax(200px, 1fr) 110px minmax(170px, 1fr) 130px 100px;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .market-filter-row:not(.has-clear),
  .market-filter-row.has-clear {
    grid-template-columns: 1fr;
  }

  .market-app .filter-chip,
  .market-app .filter-input-chip {
    width: 100%;
  }

  .trade-detail-head,
  .payment-method-card,
  .timeline-step {
    grid-template-columns: 1fr;
  }

  .trade-detail-head {
    flex-direction: column;
  }

  .evidence-form {
    grid-template-columns: 1fr;
  }
}

/* Dashboard proportion fix: balance and live-rate cards should read as one clean row. */
.app-overview-grid {
  grid-template-columns: minmax(0, 2.15fr) minmax(320px, .98fr);
  align-items: stretch;
  gap: 18px;
}

.wallet-summary.dashboard-wallet-compact,
.rate-card {
  min-height: 214px;
  height: 100%;
}

.wallet-summary.dashboard-wallet-compact {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 20px 24px;
}

.dashboard-wallet-compact > div:first-child {
  margin-bottom: 0;
}

.wallet-summary h2 {
  margin-top: 8px;
  font-size: clamp(26px, 2.1vw, 34px);
}

.dashboard-wallet-compact .wallet-actions {
  padding-top: 12px;
}

.dashboard-wallet-compact .round-action {
  min-height: 38px;
  height: 38px;
  font-size: 12px;
}

.rate-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-content: stretch;
  padding: 20px 24px;
  gap: 10px;
}

.rate-head {
  gap: 10px;
}

.rate-head .app-button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.rate-card h2 {
  align-self: center;
  margin: 0;
  font-size: clamp(34px, 3.2vw, 44px);
}

.rate-card h2 span {
  font-size: .42em;
}

.rate-card .app-muted {
  margin: 0;
}

.best-rates {
  margin-top: 4px;
  gap: 24px;
}

.best-rates strong {
  font-size: 15px;
}

.best-rates span {
  font-size: 10px;
}

@media (max-width: 980px) {
  .app-overview-grid {
    grid-template-columns: 1fr;
  }

  .wallet-summary.dashboard-wallet-compact,
  .rate-card {
    min-height: 0;
  }
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google-auth-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050b16;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.google-auth-button::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  color: #1a73e8;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.google-auth-button:hover {
  border-color: var(--blue);
  color: var(--blue-2);
}

/* Auth forms should feel calm, not like dashboard labels. */
.auth-card .form-field {
  gap: 7px;
  color: #a9b7cc;
  font-weight: 650;
}

.auth-card .form-field span {
  font-size: 13px;
}

.auth-card .form-field input {
  min-height: 46px;
  background: #0b1422;
  color: #eef5ff;
  font-weight: 500;
  letter-spacing: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-card .form-field input::placeholder {
  color: #7d8899;
  font-weight: 500;
}

.auth-card .auth-title h1 {
  font-weight: 800;
}

.auth-card .muted,
.auth-footer {
  font-weight: 500;
}

/* Global typography polish: keep form/control text readable without the chunky label feel. */
.form-field,
.input-box,
.filter-chip,
.filter-input-chip input,
.filter-input-chip select,
.tabs-bar button,
.wallet-mode-tabs button,
.settings-tab,
.settings-action,
.chips span,
.status-pill,
.settings-badge,
.sheet-badge,
.account-menu a,
.account-menu button,
.nav a,
.nav button {
  font-weight: 600;
}

.form-field > span,
.input-box > span,
.balance-breakdown span,
.settings-row-main small,
.table-row small,
.market-rate span,
.best-rates span {
  font-weight: 500;
}

.form-field input,
.form-field select,
.input-box input,
.filter-input-chip input,
.filter-input-chip select,
textarea {
  font-weight: 500;
  letter-spacing: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.form-field input::placeholder,
.filter-input-chip input::placeholder,
.input-box input::placeholder,
textarea::placeholder {
  color: #7d8899;
  font-weight: 500;
}

.primary-button,
.secondary-button,
.app-button,
.app-ghost-button,
.danger-button,
.outline-button,
.filter-input-chip button,
.google-auth-button,
.text-link,
.kyc-open {
  font-weight: 700;
}

.eyebrow,
.app-label,
.table-head,
.mini-icon,
.kyc-limits span,
.wallet-summary h2,
.rate-card h2,
.page-title h2,
.settings-head h2,
.sheet-head h2,
.admin-hero h2 {
  letter-spacing: 0;
}

/* P2P escrow room: compact, guided order flow inspired by serious exchange desks. */
.escrow-workspace {
  display: grid;
  gap: 14px;
}

.escrow-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.icon-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 650;
}

.icon-link:hover {
  color: var(--blue-2);
}

.escrow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .76fr);
  gap: 16px;
  align-items: start;
}

.escrow-main,
.escrow-side,
.trade-confirm-modal {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.escrow-main {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.escrow-side {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.escrow-main .trade-detail-head {
  margin: 0;
  padding-bottom: 2px;
}

.escrow-main .trade-detail-head h3 {
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1;
}

.escrow-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.escrow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted-2);
  text-align: center;
  font-size: 12px;
  font-weight: 650;
}

.escrow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: var(--line);
}

.escrow-step span {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.escrow-step.done,
.escrow-step.active {
  color: var(--text);
}

.escrow-step.done span,
.escrow-step.active span {
  border-color: var(--green);
  background: rgba(8, 201, 139, .16);
  color: var(--green);
}

.escrow-step.done:not(:last-child)::after {
  background: var(--green);
}

.instruction-list {
  display: grid;
  gap: 9px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: trade-step;
}

.instruction-list li {
  counter-increment: trade-step;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
}

.instruction-list li::before {
  content: counter(trade-step);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 153, 255, .12);
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
}

.payment-method-list.compact {
  grid-template-columns: 1fr;
}

.payment-method-card.highlighted {
  border-color: rgba(246, 184, 63, .45);
  background: rgba(246, 184, 63, .06);
}

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

.method-head span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(246, 184, 63, .15);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 750;
}

.payment-detail-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

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

.payment-detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.copy-chip:hover {
  border-color: var(--blue);
  color: var(--blue-2);
}

.counterparty-card,
.side-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.counterparty-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar.small {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.counterparty-card strong,
.counterparty-card small {
  display: block;
}

.counterparty-card small {
  color: var(--muted);
  font-weight: 500;
}

.proof-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.proof-card small {
  display: block;
  color: var(--muted);
  margin-bottom: 3px;
}

.proof-card.empty {
  color: var(--muted);
}

.trade-chat-box {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.trade-chat-box .mini-icon {
  opacity: .7;
}

.deposit-note.success {
  border-color: rgba(8, 201, 139, .38);
  background: rgba(8, 201, 139, .08);
  color: #93f0cf;
}

.deposit-note.warning {
  border-color: rgba(246, 184, 63, .45);
  background: rgba(246, 184, 63, .08);
  color: #f5d58b;
}

.trade-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .74);
  backdrop-filter: blur(8px);
}

.trade-confirm-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 26px;
}

.trade-confirm-modal h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.modal-x:hover {
  background: var(--surface-3);
  color: var(--text);
}

.receipt-drop {
  min-height: 134px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed var(--line-blue);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
  color: var(--text);
}

.receipt-drop input {
  width: min(260px, 100%);
}

.receipt-drop small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .escrow-grid {
    grid-template-columns: 1fr;
  }

  .escrow-stepper {
    grid-template-columns: repeat(2, 1fr);
  }

  .escrow-step::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .escrow-main {
    padding: 16px;
  }

  .payment-detail-row {
    grid-template-columns: 1fr auto;
  }

  .payment-detail-row small {
    grid-column: 1 / -1;
  }

  .trade-confirm-modal {
    padding: 20px;
  }
}

.order-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}

.order-ticket-modal {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto;
  background: #20242a;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .58);
}

.order-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 10px;
}

.order-modal-head h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.15;
}

.order-modal-head p {
  margin: 0;
  color: var(--muted);
}

.order-modal-head p strong {
  color: #31d49a;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

.order-modal-head .icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--muted);
}

.order-modal-head .icon-button:hover {
  background: rgba(148, 163, 184, .08);
}

.order-ticket-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 22px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.order-ticket-summary span,
.order-label,
.order-input-label small,
.order-quote span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.order-ticket-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
}

.order-modal-body {
  min-height: auto;
  overflow: visible;
  padding: 14px 22px;
  display: grid;
  gap: 12px;
}

.order-trader {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 8px;
  background: rgba(17, 24, 32, .58);
}

.order-trader > div {
  min-width: 0;
}

.trader-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111820;
  border: 1px solid rgba(148, 163, 184, .2);
  color: var(--accent);
  font-weight: 650;
}

.order-trader strong {
  display: block;
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.order-trader small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

.order-section {
  display: grid;
  gap: 8px;
}

.order-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-methods.selectable button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #111820;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.order-methods.selectable button span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .55);
}

.order-methods.selectable button.active {
  border-color: rgba(20, 200, 145, .8);
  color: #20d69a;
  background: rgba(20, 200, 145, .08);
}

.order-methods.selectable button.active span {
  background: #20d69a;
}

.order-warning {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, .42);
  color: #f8c64d;
  background: rgba(245, 158, 11, .08);
  font-size: 13px;
}

.order-form {
  display: grid;
  gap: 10px;
}

.order-input-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.order-input-label > span {
  color: var(--muted);
  font-weight: 600;
}

.order-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: #05070a;
  overflow: hidden;
}

.order-input-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
}

.order-input-row input::placeholder {
  color: var(--muted-2);
  font-size: 16px;
  font-weight: 500;
  opacity: 1;
}

.order-input-row > span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.order-input-row button {
  height: 100%;
  min-width: 62px;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, .16);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}

.order-quote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px 0 0;
}

.order-quote strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  font-weight: 650;
}

.order-quote > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.order-quote div:last-child {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.order-quote .order-arrow {
  display: none !important;
}

.order-escrow-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 174, 255, .26);
  background: rgba(0, 174, 255, .07);
}

.order-escrow-note strong {
  color: var(--text);
  font-weight: 650;
}

.order-escrow-note span {
  color: var(--muted);
  line-height: 1.4;
}

.order-modal-footer {
  padding: 12px 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  background: #05070a;
}

.order-modal-footer .app-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
}

.order-ticket-modal.buy .buy-button {
  background: #10c98b;
  color: #020806;
}

.order-ticket-modal.sell .sell-button {
  background: #ff4b6b;
  color: #fff;
}

@media (max-width: 640px) {
  .order-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .order-ticket-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 8px 8px 0 0;
  }

  .order-modal-head,
  .order-ticket-summary,
  .order-modal-body,
  .order-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .order-ticket-summary,
  .order-quote {
    grid-template-columns: 1fr;
  }

  .order-quote > div:first-child,
  .order-quote div:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  .order-quote div:last-child {
    text-align: left;
  }
}

@media (max-height: 720px) {
  .order-modal-backdrop {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .order-ticket-modal {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .order-modal-head {
    padding-top: 14px;
    padding-bottom: 8px;
  }

  .order-modal-head h3 {
    margin-bottom: 4px;
  }

  .order-ticket-summary {
    padding-bottom: 10px;
  }

  .order-modal-body {
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .order-trader {
    min-height: 60px;
    padding: 8px 12px;
  }

  .trader-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .order-section {
    gap: 6px;
  }

  .order-form {
    gap: 8px;
  }

  .order-input-row {
    min-height: 46px;
  }

  .order-quote {
    padding-top: 4px;
  }

  .order-quote strong {
    margin-top: 3px;
  }

  .order-escrow-note {
    display: none;
  }

  .order-modal-footer {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .order-modal-footer .app-button {
    min-height: 44px;
  }
}

.appeal-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: #05070a;
}

.appeal-card.locked {
  color: var(--muted);
}

.appeal-card.unlocked {
  border-color: rgba(255, 75, 107, .35);
  background: rgba(255, 75, 107, .06);
}

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

.appeal-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .42);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.appeal-card.unlocked .appeal-icon {
  color: #ff6b83;
  border-color: rgba(255, 75, 107, .38);
  background: rgba(255, 75, 107, .08);
}

.appeal-card strong {
  color: var(--text);
  font-size: 15px;
}

.appeal-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.appeal-card .danger-button {
  min-height: 40px;
}

@media (max-width: 720px) {
  .appeal-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .appeal-card .danger-button {
    width: 100%;
  }
}

/* Professional landing refresh: image-led hero and compact conversion surface. */
.landing-pro {
  min-height: 100vh;
  background: linear-gradient(180deg, #000 0%, #02060d 46%, #050b13 100%);
}

.hero-pro {
  position: relative;
  min-height: calc(100svh - var(--header-h) - 54px);
  max-width: none;
  display: block;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(44px, 5.4vw, 78px) clamp(22px, 6vw, 108px) clamp(42px, 5vw, 68px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.hero-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(0, 0, 0, .97) 0%, rgba(0, 0, 0, .88) 28%, rgba(0, 0, 0, .43) 62%, rgba(0, 0, 0, .78) 100%);
}

.hero-pro::after {
  content: "";
  position: absolute;
  right: clamp(18px, 5vw, 90px);
  bottom: 24px;
  width: min(48vw, 720px);
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(0, 184, 255, .6), transparent);
}

.hero-pro-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(8, 14, 24, .78);
  color: #c4d2e7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
}

.hero-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(8, 201, 139, .62);
}

.hero-pro h1 {
  max-width: 760px;
  margin: 26px 0 18px;
  font-size: clamp(48px, 6.2vw, 88px);
  line-height: .94;
  letter-spacing: 0;
}

.hero-pro .hero-text {
  max-width: 650px;
  color: #bdd0e9;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.45;
}

.hero-pro-actions {
  margin: 28px 0 22px;
}

.hero-pro-actions .primary-button,
.hero-pro-actions .secondary-button {
  min-width: 142px;
  box-shadow: 0 14px 38px rgba(0, 120, 255, .22);
}

.hero-proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(640px, 100%);
  margin: 0 0 16px;
}

.hero-proof-row div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(8, 14, 24, .72);
  backdrop-filter: blur(18px);
}

.hero-proof-row strong,
.hero-proof-row span {
  display: block;
  min-width: 0;
}

.hero-proof-row strong {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.hero-proof-row span {
  color: #8ea0b8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-rate-panel {
  width: min(640px, 100%);
  max-width: none;
  padding: 18px;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(12, 18, 29, .86);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
  backdrop-filter: blur(22px);
}

.hero-rate-panel .card-top {
  margin-bottom: 12px;
}

.hero-segmented {
  background: rgba(0, 0, 0, .62);
}

.hero-trade-inputs {
  margin: 14px 0;
}

.hero-rate-panel .input-box {
  background: rgba(2, 7, 16, .8);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.hero-visual img {
  position: absolute;
  right: clamp(-80px, -3vw, -24px);
  top: 50%;
  width: min(66vw, 1040px);
  height: min(72vh, 760px);
  object-fit: cover;
  object-position: center;
  transform: translateY(-48%);
  opacity: .86;
  filter: saturate(1.02) contrast(1.08);
}

.hero-visual-panel {
  position: absolute;
  right: clamp(28px, 7vw, 132px);
  z-index: 1;
  width: min(240px, 26vw);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(5, 10, 18, .76);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.hero-visual-panel.top { top: clamp(100px, 16vh, 168px); }
.hero-visual-panel.bottom { bottom: clamp(58px, 10vh, 104px); }

.hero-visual-panel span,
.hero-visual-panel strong {
  display: block;
}

.hero-visual-panel span {
  color: #8fa2bd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-visual-panel strong {
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.landing-band {
  background: #050b13;
}

.landing-feature-grid .feature-card,
.landing-steps-grid .step-card {
  background: #0b121d;
}

@media (max-width: 1180px) {
  .hero-pro {
    min-height: auto;
    padding: 48px 28px 56px;
  }

  .hero-pro::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .74));
  }

  .hero-pro-copy {
    max-width: 760px;
  }

  .hero-visual img {
    right: -180px;
    width: 980px;
    max-width: none;
    opacity: .34;
  }

  .hero-visual-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero-pro {
    padding: 30px 16px 44px;
  }

  .hero-pro h1 {
    font-size: clamp(42px, 13vw, 58px);
    line-height: .96;
  }

  .hero-pro .hero-text {
    font-size: 16px;
  }

  .hero-pro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-pro-actions .primary-button,
  .hero-pro-actions .secondary-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .hero-proof-row,
  .hero-trade-inputs {
    grid-template-columns: 1fr;
  }

  .hero-proof-row {
    gap: 8px;
  }

  .hero-rate-panel {
    padding: 14px;
  }

  .hero-rate-panel .card-top,
  .payment-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .hero-visual img {
    right: -260px;
    width: 880px;
    opacity: .22;
  }
}

/* Mobile landing correction: compact public header and intentional hero visual. */
@media (max-width: 760px) {
  body:has(.landing-pro) {
    background: #03070d;
  }

  body:has(.landing-pro) .site-header:not(.app-header) {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, .96);
    backdrop-filter: blur(22px);
  }

  body:has(.landing-pro) .site-header:not(.app-header) .brand img {
    width: 104px;
  }

  body:has(.landing-pro) .site-header:not(.app-header) > nav.nav {
    display: none;
  }

  body:has(.landing-pro) .site-header:not(.app-header) .header-actions {
    justify-self: end;
    display: flex;
    gap: 8px;
  }

  body:has(.landing-pro) .site-header:not(.app-header) .header-actions .text-button,
  body:has(.landing-pro) .site-header:not(.app-header) .header-actions .primary-button,
  body:has(.landing-pro) .site-header:not(.app-header) .header-actions .secondary-button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .hero-pro {
    min-height: auto;
    padding: 24px 14px 34px;
    overflow: visible;
  }

  .hero-pro::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, .94), rgba(0, 0, 0, .88));
  }

  .hero-pro::after {
    display: none;
  }

  .hero-pro-copy {
    width: 100%;
  }

  .hero-kicker {
    min-height: 34px;
    max-width: 100%;
    padding: 0 11px;
    font-size: 10px;
    letter-spacing: .07em;
  }

  .hero-pro h1 {
    max-width: 12ch;
    margin: 18px 0 12px;
    font-size: clamp(38px, 11.2vw, 50px);
    line-height: .98;
  }

  .hero-pro .hero-text {
    max-width: 34rem;
    margin-bottom: 18px;
    color: #b9cbe4;
    font-size: 15px;
    line-height: 1.45;
  }

  .hero-pro-actions {
    margin: 18px 0 16px;
    grid-template-columns: 1fr 1fr;
  }

  .hero-pro-actions .primary-button,
  .hero-pro-actions .secondary-button {
    min-height: 48px;
    font-size: 14px;
  }

  .hero-visual {
    position: relative;
    z-index: 1;
    height: clamp(150px, 42vw, 230px);
    margin: 14px 0 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    overflow: hidden;
    background: #050a12;
    box-shadow: 0 22px 54px rgba(0, 0, 0, .36);
  }

  .hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .72));
  }

  .hero-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% 50%;
    transform: none;
    opacity: .9;
  }

  .hero-visual-panel {
    display: block;
    z-index: 2;
    width: auto;
    padding: 10px 11px;
    border-radius: 8px;
    background: rgba(4, 10, 18, .82);
  }

  .hero-visual-panel.top {
    top: 10px;
    right: 10px;
  }

  .hero-visual-panel.bottom {
    right: auto;
    bottom: 10px;
    left: 10px;
  }

  .hero-visual-panel span {
    font-size: 8px;
  }

  .hero-visual-panel strong {
    font-size: 12px;
  }

  .hero-proof-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }

  .hero-proof-row div {
    padding: 10px 8px;
  }

  .hero-proof-row strong {
    font-size: 14px;
  }

  .hero-proof-row span {
    margin-top: 2px;
    font-size: 8px;
    line-height: 1.25;
  }

  .hero-rate-panel {
    padding: 13px;
  }

  .hero-rate-panel .card-top {
    margin-bottom: 10px;
  }

  .hero-segmented button {
    min-height: 38px;
    font-size: 13px;
  }

  .hero-trade-inputs {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
  }

  .hero-rate-panel .input-box {
    min-width: 0;
    padding: 10px 11px;
  }

  .hero-rate-panel .input-box span {
    font-size: 10px;
  }

  .hero-rate-panel .input-box input {
    min-width: 0;
    font-size: 18px;
  }

  .hero-rate-panel .input-box b {
    font-size: 11px;
  }

  .hero-rate-panel .payment-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 11px;
  }

  .landing-band {
    padding-top: 34px;
  }
}

@media (max-width: 420px) {
  body:has(.landing-pro) .site-header:not(.app-header) .header-actions .secondary-button,
  body:has(.landing-pro) .site-header:not(.app-header) .header-actions button.secondary-button {
    display: none;
  }

  .hero-trade-inputs,
  .hero-proof-row {
    grid-template-columns: 1fr;
  }

  .hero-proof-row div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 8px;
  }
}

/* Landing redesign v4: clean desktop split, compact mobile stack. */
body:has(.landing-redesign) {
  background:
    radial-gradient(circle at 14% 18%, rgba(0, 153, 255, .18), transparent 30rem),
    radial-gradient(circle at 82% 28%, rgba(33, 202, 156, .12), transparent 26rem),
    #03060b;
}

.landing-redesign {
  min-height: calc(100vh - var(--header-h));
  background: transparent;
}

.landing-hero-v4 {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  padding: clamp(42px, 6vh, 72px) clamp(24px, 5vw, 88px) clamp(36px, 5vh, 64px);
}

.landing-hero-grid {
  width: min(100%, 1320px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}

.hero-v4-copy {
  max-width: 700px;
}

.landing-redesign .hero-kicker {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(166, 190, 226, .18);
  border-radius: 999px;
  color: #c5d3e9;
  background: rgba(9, 16, 28, .72);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.landing-redesign .hero-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #21ca9c;
  box-shadow: 0 0 0 5px rgba(33, 202, 156, .1);
}

.hero-v4-copy h1 {
  max-width: 11ch;
  margin: 24px 0 18px;
  color: #f8fbff;
  font-size: clamp(46px, 5vw, 78px);
  line-height: .96;
  letter-spacing: 0;
}

.hero-v4-copy .hero-text {
  max-width: 620px;
  margin: 0;
  color: #aebed6;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.45;
}

.hero-v4-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 22px;
}

.hero-v4-actions .primary-button,
.hero-v4-actions .secondary-button {
  min-width: 158px;
}

.hero-v4-proof {
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.hero-v4-proof div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(166, 190, 226, .14);
  border-radius: 8px;
  background: rgba(8, 15, 26, .64);
}

.hero-v4-proof strong {
  display: block;
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
}

.hero-v4-proof span {
  display: block;
  margin-top: 6px;
  color: #90a4c1;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-exchange-panel {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(166, 190, 226, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 23, 38, .98), rgba(7, 12, 21, .98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
}

.exchange-panel-head,
.exchange-rate-strip,
.exchange-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.exchange-panel-head {
  padding: 18px;
  border-bottom: 1px solid rgba(166, 190, 226, .12);
}

.exchange-panel-head span,
.exchange-rate-strip span {
  display: block;
  color: #91a5c4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.exchange-panel-head strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 24px;
}

.exchange-panel-head em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(33, 202, 156, .28);
  border-radius: 999px;
  color: #bffce9;
  background: rgba(33, 202, 156, .1);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.exchange-panel-head i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #21ca9c;
}

.exchange-rate-strip {
  margin: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 153, 255, .2);
  border-radius: 8px;
  background: rgba(0, 153, 255, .08);
}

.exchange-rate-strip strong {
  color: #ffffff;
  font-size: 16px;
}

.exchange-rate-strip b {
  color: #17c7ff;
}

.hero-panel-section {
  max-width: none;
  margin: 0 14px 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-panel-section .segmented {
  background: #050914;
}

.hero-panel-section .trade-inputs {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0 0;
}

.hero-panel-section .input-box {
  background: #070d18;
  border-color: rgba(166, 190, 226, .14);
}

.market-preview-list {
  display: grid;
  gap: 0;
  margin: 0 14px 14px;
  border: 1px solid rgba(166, 190, 226, .12);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, .025);
}

.market-preview-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border-top: 1px solid rgba(166, 190, 226, .1);
}

.market-preview-row:first-child {
  border-top: 0;
}

.market-preview-row span {
  color: #91a5c4;
  font-size: 12px;
  font-weight: 900;
}

.market-preview-row strong {
  color: #eef5ff;
  font-size: 15px;
}

.market-preview-row em {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  color: #c9f7ff;
  background: rgba(23, 199, 255, .12);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.market-preview-row.muted-row {
  color: #99a8bf;
}

.exchange-panel-foot {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 0 14px 16px;
}

.exchange-panel-foot span {
  padding: 8px 10px;
  border: 1px solid rgba(166, 190, 226, .12);
  border-radius: 999px;
  color: #b8c8e0;
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
  font-weight: 900;
}

.landing-redesign .landing-band {
  background: #05080f;
}

@media (max-width: 980px) {
  body:has(.landing-redesign) .site-header:not(.app-header) {
    grid-template-columns: auto 1fr;
    gap: 14px;
    min-height: 62px;
    padding: 10px 18px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .brand img {
    width: 92px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) > nav.nav {
    display: none;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions {
    justify-self: end;
    gap: 8px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions a,
  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .landing-hero-v4 {
    min-height: auto;
    align-items: start;
    padding: 34px 18px 34px;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-v4-copy {
    max-width: none;
  }

  .hero-v4-copy h1 {
    max-width: 10.5ch;
    margin: 20px 0 12px;
    font-size: clamp(42px, 10vw, 64px);
  }

  .hero-v4-copy .hero-text {
    max-width: 42rem;
    font-size: 16px;
  }

  .hero-v4-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 22px 0 16px;
  }

  .hero-v4-actions .primary-button,
  .hero-v4-actions .secondary-button {
    min-width: 0;
    min-height: 46px;
  }

  .hero-v4-proof {
    max-width: none;
  }

  .hero-exchange-panel {
    max-width: none;
  }
}

@media (max-width: 560px) {
  body:has(.landing-redesign) .site-header:not(.app-header) {
    padding: 9px 14px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .brand img {
    width: 84px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions .text-button {
    display: none;
  }

  .landing-hero-v4 {
    padding: 26px 14px 30px;
  }

  .landing-redesign .hero-kicker {
    min-height: 34px;
    padding: 0 11px;
    font-size: 10px;
  }

  .hero-v4-copy h1 {
    max-width: 11ch;
    font-size: clamp(37px, 12vw, 48px);
    line-height: 1;
  }

  .hero-v4-actions {
    grid-template-columns: 1fr;
  }

  .hero-v4-proof {
    grid-template-columns: 1fr;
  }

  .hero-v4-proof div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 8px;
    padding: 11px 12px;
  }

  .hero-v4-proof span {
    margin-top: 0;
  }

  .exchange-panel-head,
  .exchange-rate-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .exchange-panel-head {
    padding: 14px;
  }

  .exchange-panel-head strong {
    font-size: 21px;
  }

  .exchange-rate-strip strong {
    font-size: 15px;
  }

  .hero-panel-section .trade-inputs {
    grid-template-columns: 1fr;
  }

  .market-preview-row {
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 58px;
    padding: 9px 12px;
  }

  .market-preview-row em {
    grid-column: 2;
    justify-self: start;
    margin-top: -5px;
  }

  .exchange-panel-foot span:nth-child(2) {
    display: none;
  }
}

/* Landing v5: OKX-inspired product hero with a BRX phone preview. */
body:has(.landing-redesign) {
  background: #000;
}

.landing-hero-v5 {
  min-height: min(760px, calc(100svh - var(--header-h)));
  display: grid;
  align-items: center;
  align-content: center;
  padding: clamp(34px, 5.2vh, 58px) clamp(24px, 6vw, 96px);
  background: #000;
}

.landing-hero-v5-grid {
  width: min(100%, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  align-items: center;
  gap: clamp(34px, 7vw, 86px);
}

.hero-v5-copy {
  max-width: 720px;
  padding-top: 0;
}

.landing-redesign .hero-kicker {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(11, 17, 27, .72);
  color: #d9e4f3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.landing-redesign .hero-kicker strong,
.landing-redesign .hero-kicker span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
}

.landing-redesign .hero-kicker strong {
  background: #fff;
  color: #000;
}

.landing-redesign .hero-kicker span {
  width: auto;
  height: auto;
  background: rgba(0,153,255,.14);
  box-shadow: none;
  color: #9bdcff;
}

.hero-v5-copy h1 {
  max-width: 12.5ch;
  margin: 18px 0 14px;
  color: #fff;
  font-size: clamp(40px, 4.3vw, 60px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-v5-copy .hero-text {
  max-width: 540px;
  margin: 0;
  color: #a7adb8;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.42;
}

.hero-v5-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0 0;
}

.hero-v5-actions .primary-button,
.hero-v5-actions .secondary-button {
  min-width: 136px;
  min-height: 50px;
  border-radius: 999px;
  font-size: 16px;
}

.hero-v5-actions .primary-button {
  background: #fff;
  color: #000;
}

.hero-v5-actions .secondary-button {
  border-color: transparent;
  background: #222;
  color: #fff;
}

.hero-v5-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 34px;
  color: #a7adb8;
  font-size: 15px;
  font-weight: 750;
}

.hero-v5-proof span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.hero-v5-proof strong {
  color: #fff;
  font-size: 22px;
}

.brx-phone-stage {
  min-width: 0;
  display: grid;
  justify-items: center;
  padding-top: 0;
  transform: none;
}

.brx-phone-frame {
  position: relative;
  width: min(100%, 286px);
  aspect-ratio: 9 / 15.9;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 40px;
  background: #030303;
  box-shadow: 0 34px 90px rgba(0,0,0,.7), 0 0 0 8px rgba(255,255,255,.025) inset;
}

.brx-phone-speaker {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 86px;
  height: 19px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

.brx-phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 29px;
  background: #070b12;
}

.brx-phone-scroll {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 22px 10px 14px;
  animation: brxPhoneScroll 18s ease-in-out infinite;
}

.phone-panel {
  min-width: 0;
  min-height: 230px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  background: #101720;
}

.phone-topbar,
.phone-section-head,
.phone-offer,
.phone-step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-topbar,
.phone-section-head {
  justify-content: space-between;
}

.phone-topbar img {
  width: 76px;
  flex: 0 0 auto;
}

.phone-topbar span,
.phone-section-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #95a3b8;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.phone-section-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
}

.phone-balance {
  margin: 28px 0 22px;
}

.phone-balance small,
.phone-trade-amount small,
.phone-address small {
  display: block;
  color: #8896aa;
  font-size: 11px;
  font-weight: 800;
}

.phone-balance strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}

.phone-balance strong span {
  color: #9aa7b8;
  font-size: 13px;
}

.phone-balance em {
  display: block;
  margin-top: 10px;
  color: #21ca9c;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.phone-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.phone-actions span,
.phone-tabs span,
.phone-tabs b,
.phone-network-grid span {
  min-width: 0;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 12px;
  background: #1a232e;
  color: #dbe7f6;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px 0 12px;
  padding: 4px;
  border-radius: 14px;
  background: #090e16;
}

.phone-tabs b {
  background: #fff;
  color: #000;
}

.phone-offer {
  min-height: 58px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 16px;
  background: #0a111b;
}

.phone-offer i {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #132d52;
  color: #35c7ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.phone-offer div {
  min-width: 0;
  flex: 1;
}

.phone-offer strong,
.phone-offer small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-offer strong {
  color: #fff;
  font-size: 12px;
}

.phone-offer small {
  margin-top: 3px;
  color: #8794a7;
  font-size: 10px;
}

.phone-offer em {
  min-width: 54px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  color: #21ca9c;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.phone-offer.sell em {
  color: #35c7ff;
}

.phone-trade-amount {
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  background: #07111d;
}

.phone-trade-amount strong {
  display: block;
  margin: 5px 0;
  color: #fff;
  font-size: 20px;
}

.phone-trade-amount span {
  color: #9aa8ba;
  font-size: 12px;
}

.phone-step {
  min-height: 40px;
  color: #8f9cad;
  font-size: 12px;
  font-weight: 800;
}

.phone-step i {
  width: 12px;
  height: 12px;
  border: 2px solid #334155;
  border-radius: 50%;
}

.phone-step.done i,
.phone-step.active i {
  border-color: #21ca9c;
  background: #21ca9c;
}

.phone-step.active span {
  color: #fff;
}

.phone-address {
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  background: #07111d;
}

.phone-address span {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
}

.phone-network-grid {
  display: grid;
  gap: 8px;
}

@keyframes brxPhoneScroll {
  0%, 18% { transform: translateY(0); }
  34%, 54% { transform: translateY(-178px); }
  70%, 88% { transform: translateY(-356px); }
  100% { transform: translateY(0); }
}

.landing-redesign .landing-band {
  max-width: none;
  padding: clamp(46px, 5.8vw, 74px) clamp(24px, 6vw, 96px);
  border-top: 1px solid rgba(255,255,255,.08);
  background: #05080f;
}

.landing-redesign .landing-band .section-head,
.landing-feature-grid,
.landing-steps-grid {
  width: min(100%, 1280px);
  margin-left: auto;
  margin-right: auto;
}

.landing-redesign .landing-band .section-head {
  align-items: end;
  margin-bottom: 28px;
}

.landing-redesign .landing-band .eyebrow {
  margin-bottom: 12px;
  color: #84aee5;
  font-size: 12px;
}

.landing-redesign .landing-band .section-head h2 {
  max-width: 760px;
  color: #f8fbff;
  font-size: clamp(34px, 3.5vw, 52px);
  line-height: 1.05;
}

.landing-feature-grid,
.landing-steps-grid {
  gap: 18px;
}

.landing-feature-grid .feature-card,
.landing-steps-grid .step-card {
  min-height: 0;
  padding: clamp(22px, 2.2vw, 30px);
  border-color: rgba(116, 148, 190, .22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 22, 34, .94), rgba(8, 14, 23, .94));
}

.landing-feature-grid .feature-card h3,
.landing-steps-grid .step-card h3 {
  color: #fff;
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.12;
}

.landing-feature-grid .feature-card p,
.landing-steps-grid .step-card p {
  max-width: 36rem;
  color: #a9bee0;
  font-size: 16px;
  line-height: 1.52;
}

.landing-steps-grid .step-card span {
  color: rgba(0, 153, 255, .84);
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1;
}

@keyframes brxPhoneScrollTablet {
  0%, 20% { transform: translateY(0); }
  36%, 54% { transform: translateY(-154px); }
  70%, 88% { transform: translateY(-308px); }
  100% { transform: translateY(0); }
}

@keyframes brxPhoneScrollSmall {
  0%, 28% { transform: translateY(0); }
  52%, 82% { transform: translateY(-140px); }
  100% { transform: translateY(0); }
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.google-auth-button::before {
  content: none;
}

.google-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.google-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
  stroke: none;
}

@media (max-width: 980px) {
  .landing-hero-v5 {
    min-height: auto;
    padding: 28px 18px 40px;
  }

  .landing-hero-v5-grid {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 24px;
  }

  .hero-v5-copy h1 {
    max-width: 12ch;
    font-size: clamp(42px, 10vw, 64px);
  }

  .hero-v5-actions {
    margin-bottom: 10px;
  }

  .brx-phone-stage {
    transform: none;
  }

  .brx-phone-frame {
    width: min(300px, 72vw);
    aspect-ratio: 9 / 15.7;
  }

  .brx-phone-scroll {
    animation: brxPhoneScrollTablet 16s ease-in-out infinite;
  }

  .landing-redesign .landing-band {
    padding: 42px 18px;
  }

  .landing-redesign .landing-band .section-head {
    align-items: start;
    gap: 18px;
  }

  .landing-redesign .landing-band .section-head h2 {
    max-width: 12ch;
    font-size: clamp(32px, 8vw, 48px);
  }

  .landing-feature-grid,
  .landing-steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body:has(.landing-redesign) .site-header:not(.app-header) {
    grid-template-columns: auto 1fr;
    min-height: 62px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions .text-button {
    display: inline-flex;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions {
    gap: 8px;
  }

  body:has(.landing-redesign) .site-header:not(.app-header) .header-actions .primary-button {
    min-width: 0;
    padding: 0 12px;
  }

  .landing-hero-v5 {
    padding: 22px 14px 32px;
  }

  .hero-v5-copy h1 {
    max-width: 11ch;
    margin: 14px 0 10px;
    font-size: clamp(30px, 9.4vw, 40px);
  }

  .hero-v5-copy .hero-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero-v5-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin: 18px 0 8px;
  }

  .hero-v5-proof {
    gap: 10px;
    font-size: 12px;
  }

  .hero-v5-proof span {
    width: 100%;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .brx-phone-frame {
    width: min(312px, calc(100vw - 42px));
    aspect-ratio: 9 / 15.2;
    padding: 9px;
    border-radius: 32px;
  }

  .brx-phone-speaker {
    top: 10px;
    width: 66px;
    height: 15px;
  }

  .brx-phone-screen {
    border-radius: 24px;
  }

  .brx-phone-scroll {
    gap: 7px;
    padding: 18px 7px 9px;
    animation: brxPhoneScrollSmall 14s ease-in-out infinite;
  }

  .phone-panel {
    min-height: 0;
    padding: 10px;
    border-radius: 16px;
  }

  .phone-home-panel {
    min-height: 168px;
  }

  .phone-market-panel {
    min-height: 238px;
  }

  .phone-trade-panel,
  .phone-wallet-panel {
    display: none;
  }

  .phone-topbar img {
    width: 58px;
  }

  .phone-topbar span,
  .phone-section-head span,
  .phone-balance small,
  .phone-trade-amount small,
  .phone-address small {
    font-size: 9px;
  }

  .phone-section-head strong {
    font-size: 13px;
  }

  .phone-balance {
    margin: 18px 0 14px;
  }

  .phone-balance strong {
    font-size: 20px;
  }

  .phone-balance em {
    margin-top: 7px;
    font-size: 10px;
  }

  .phone-actions {
    gap: 5px;
  }

  .phone-actions span,
  .phone-tabs span,
  .phone-tabs b,
  .phone-network-grid span {
    min-height: 30px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 9px;
  }

  .phone-tabs {
    margin: 10px 0 8px;
  }

  .phone-offer {
    min-height: 46px;
    margin-top: 6px;
    padding: 7px;
    border-radius: 12px;
  }

  .phone-offer i {
    width: 28px;
    height: 28px;
    font-size: 9px;
  }

  .phone-offer strong {
    font-size: 10px;
  }

  .phone-offer small {
    font-size: 8px;
  }

  .phone-offer em {
    font-size: 10px;
  }
}


/* Professional P2P order ticket polish. */
.order-modal-backdrop {
  background: rgba(0, 0, 0, .76) !important;
  backdrop-filter: blur(12px) saturate(120%) !important;
}

.order-ticket-modal {
  width: min(560px, calc(100vw - 32px)) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(0, 184, 255, .18) !important;
  background: linear-gradient(180deg, #151b24 0%, #101721 100%) !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .64), 0 0 0 1px rgba(255, 255, 255, .025) inset !important;
}

.order-modal-head {
  padding: 22px 26px 12px !important;
}

.order-modal-head h3 {
  font-size: 22px !important;
  font-weight: 900 !important;
}

.order-modal-head p strong {
  color: var(--blue-2) !important;
  font-size: 34px !important;
  font-weight: 950 !important;
}

.order-modal-head .icon-button {
  border-radius: 10px !important;
  color: var(--muted) !important;
}

.order-ticket-summary {
  padding: 0 26px 16px !important;
  border-bottom-color: rgba(166, 190, 226, .14) !important;
}

.order-ticket-summary span,
.order-label,
.order-input-label small,
.order-quote span {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.order-ticket-summary strong {
  font-size: 15px !important;
  font-weight: 900 !important;
}

.order-modal-body {
  padding: 16px 26px 18px !important;
  gap: 15px !important;
}

.order-trader {
  min-height: 78px !important;
  border-color: rgba(166, 190, 226, .14) !important;
  border-radius: 12px !important;
  background: rgba(7, 13, 23, .62) !important;
}

.order-trader strong {
  font-size: 18px !important;
  font-weight: 900 !important;
}

.order-methods.selectable button {
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  border-color: rgba(0, 184, 255, .24) !important;
  background: rgba(0, 153, 255, .08) !important;
  color: var(--blue-2) !important;
}

.order-methods.selectable button.active {
  border-color: rgba(0, 184, 255, .7) !important;
  background: rgba(0, 153, 255, .14) !important;
  box-shadow: 0 0 0 3px rgba(0, 153, 255, .08) !important;
}

.order-methods.selectable button span,
.order-methods.selectable button.active span {
  background: var(--blue-2) !important;
}

.order-input-label > span {
  color: var(--muted) !important;
  font-weight: 900 !important;
}

.order-input-row {
  min-height: 58px !important;
  border-radius: 12px !important;
  border-color: rgba(166, 190, 226, .2) !important;
  background: #080d15 !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.order-input-row:focus-within {
  border-color: rgba(0, 184, 255, .52) !important;
  box-shadow: 0 0 0 3px rgba(0, 153, 255, .08) !important;
  background: #060b12 !important;
}

.order-input-row input,
.order-input-row input:focus,
.order-input-row input:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}

.order-input-row input {
  font-size: 20px !important;
  font-weight: 800 !important;
}

.order-input-row button {
  min-width: 76px !important;
  background: rgba(255, 255, 255, .045) !important;
  color: var(--text) !important;
}

.order-quote {
  padding: 12px 0 0 !important;
}

.order-quote strong {
  font-size: 18px !important;
  font-weight: 950 !important;
}

.order-escrow-note {
  padding: 11px 13px !important;
  border-color: rgba(0, 184, 255, .2) !important;
  background: rgba(0, 153, 255, .06) !important;
}

.order-modal-footer {
  padding: 16px 26px 22px !important;
  background: rgba(5, 9, 15, .78) !important;
  border-top-color: rgba(166, 190, 226, .12) !important;
}

.order-modal-footer .app-button,
.order-ticket-modal.buy .buy-button,
.order-ticket-modal.sell .sell-button {
  min-height: 54px !important;
  border: 1px solid rgba(0, 184, 255, .55) !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--blue), #18c7f3) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  box-shadow: 0 16px 34px rgba(0, 153, 255, .22) !important;
}

.order-modal-footer .app-button:disabled {
  opacity: .62 !important;
  cursor: not-allowed !important;
}

@media (max-width: 640px) {
  .order-ticket-modal {
    border-radius: 16px 16px 0 0 !important;
  }

  .order-modal-head,
  .order-ticket-summary,
  .order-modal-body,
  .order-modal-footer {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* Keep P2P order confirm visible on every viewport. */
.order-modal-backdrop {
  z-index: 3000 !important;
  align-items: center !important;
}

.order-ticket-modal {
  max-height: min(760px, calc(100dvh - 28px)) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
}

.order-modal-body {
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

.order-modal-footer {
  position: relative !important;
  z-index: 2 !important;
  flex-shrink: 0 !important;
}

.order-escrow-note {
  display: none !important;
}

@media (max-width: 640px) {
  .order-modal-backdrop {
    align-items: end !important;
    padding: 0 !important;
  }

  .order-ticket-modal {
    width: 100% !important;
    max-height: calc(100dvh - 8px) !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .order-modal-head {
    padding-top: 16px !important;
    padding-bottom: 8px !important;
  }

  .order-modal-head h3 {
    font-size: 20px !important;
    margin-bottom: 6px !important;
  }

  .order-modal-head p strong {
    font-size: 30px !important;
  }

  .order-ticket-summary {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    padding-bottom: 12px !important;
  }

  .order-ticket-summary span,
  .order-label,
  .order-input-label small,
  .order-quote span {
    font-size: 12px !important;
  }

  .order-modal-body {
    gap: 12px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .order-trader {
    min-height: 68px !important;
    padding: 10px 12px !important;
  }

  .trader-avatar {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
  }

  .order-trader strong {
    font-size: 16px !important;
  }

  .order-trader small {
    font-size: 11px !important;
  }

  .order-methods.selectable button {
    min-height: 36px !important;
  }

  .order-input-label {
    align-items: start !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .order-input-row {
    min-height: 54px !important;
    grid-template-columns: minmax(0, 1fr) 54px 70px !important;
  }

  .order-input-row input {
    font-size: 18px !important;
    padding-left: 12px !important;
  }

  .order-input-row input::placeholder {
    font-size: 16px !important;
  }

  .order-input-row > span {
    padding: 0 8px !important;
    text-align: center !important;
  }

  .order-input-row button {
    min-width: 70px !important;
  }

  .order-quote {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .order-quote div:last-child {
    text-align: right !important;
  }

  .order-quote strong {
    font-size: 16px !important;
  }

  .order-modal-footer {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom)) !important;
  }

  .order-modal-footer .app-button,
  .order-ticket-modal.buy .buy-button,
  .order-ticket-modal.sell .sell-button {
    min-height: 52px !important;
  }
}

@media (max-height: 720px) and (min-width: 641px) {
  .order-ticket-modal {
    max-height: calc(100dvh - 20px) !important;
  }

  .order-modal-head {
    padding-top: 16px !important;
  }

  .order-modal-body {
    gap: 11px !important;
  }

  .order-trader {
    min-height: 66px !important;
  }
}

/* PWA install bottom sheet. */
.pwa-install-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .54);
  backdrop-filter: blur(10px);
}

.pwa-install-sheet {
  position: relative;
  width: min(100%, 560px);
  display: grid;
  gap: 18px;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px 24px 12px 12px;
  background: #20242d;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .48);
  color: #fff;
}

.pwa-install-handle {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 58px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .24);
  transform: translateX(-50%);
}

.pwa-install-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.pwa-install-close:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
}

.pwa-install-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-right: 36px;
}

.pwa-install-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #0c111a;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.pwa-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-install-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.08;
  letter-spacing: 0;
}

.pwa-install-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.pwa-install-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pwa-install-benefits span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #c5d0e2;
  font-weight: 850;
}

.pwa-install-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 12px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  list-style: none;
  background: rgba(4, 10, 20, .22);
}

.pwa-install-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
}

.pwa-install-steps li span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 201, 139, .18);
  color: var(--green);
  font-weight: 950;
}

.pwa-install-steps p {
  margin: 0;
  color: #b8c3d5;
  font-size: 15px;
  font-weight: 750;
}

.pwa-install-steps strong {
  color: #fff;
}

.pwa-install-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.pwa-install-actions .app-button,
.pwa-install-actions .app-ghost-button,
.pwa-install-later {
  min-height: 52px;
  border-radius: 14px;
}

.pwa-install-later {
  width: 100%;
}

@media (min-width: 821px) {
  .pwa-install-backdrop {
    display: none;
  }
}

@media (max-width: 420px) {
  .pwa-install-backdrop {
    padding: 0;
  }

  .pwa-install-sheet {
    border-right: 0;
    border-left: 0;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
  }

  .pwa-install-head {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
  }

  .pwa-install-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .pwa-install-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* BRX withdrawal sequence */
.withdraw-network-field { margin: 18px 0 22px; }
.withdraw-network-field > span, .withdraw-address-field > span, .withdraw-amount-field > span { display:block; margin-bottom:9px; color:var(--muted); font-weight:800; }
.withdraw-network-field > div { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; min-height:66px; padding:12px 16px; border:1px solid var(--line-blue); border-radius:12px; background:var(--surface-2); }
.withdraw-network-field strong { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--blue); color:#fff; font-size:12px; }
.withdraw-network-field .network-mark { width:40px; height:40px; }
.withdraw-network-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.withdraw-network-field small { color:var(--muted); font-size:12px; line-height:1.35; }
.withdraw-network-field .withdraw-network-name { color:var(--text); font-size:15px; font-weight:700; margin-bottom:2px; }
.withdraw-network-field b { color:var(--blue-2); font-size:12px; }
.withdraw-amount-field > div { display:grid; grid-template-columns:1fr auto auto; align-items:center; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); overflow:hidden; }
.withdraw-amount-field input { border:0 !important; background:transparent !important; }
.withdraw-amount-field b { padding:0 8px; }
.withdraw-amount-field button { align-self:stretch; padding:0 16px; border:0; background:transparent; color:var(--blue-2); font-weight:700; }
.withdraw-available, .withdraw-summary span { display:flex; justify-content:space-between; gap:20px; color:var(--muted); }
.withdraw-available strong, .withdraw-summary strong { color:var(--text); }
.withdraw-summary { display:grid; gap:10px; padding:18px 0; border-top:1px solid var(--line); }
.withdrawal-auth-copy h1 { margin:0 0 12px; font-size:clamp(28px,6vw,42px); }
.withdrawal-auth-copy p { margin:0 0 34px; color:var(--muted); line-height:1.6; }
#withdrawalAuthenticatorForm label > span { display:block; margin-bottom:10px; color:var(--muted); font-weight:800; }
#withdrawalAuthenticatorForm label > div { display:grid; grid-template-columns:1fr auto; align-items:center; margin-bottom:12px; border-radius:12px; background:var(--surface-3); overflow:hidden; }
#withdrawalAuthenticatorCode { min-width:0; height:66px; padding:0 20px; border:0; outline:0; background:transparent; color:var(--text); font-size:28px; letter-spacing:.32em; }
#withdrawalAuthenticatorForm [data-paste-auth] { align-self:stretch; padding:0 20px; border:0; background:transparent; color:var(--blue-2); font-weight:700; }
#withdrawalAuthError { min-height:22px; margin:0 0 12px; color:#ff7272; }
.processing-step { min-height:min(720px,calc(100vh - 40px)); display:flex; flex-direction:column; align-items:center; text-align:center; }
.processing-icon { width:118px; height:118px; display:grid; place-items:center; margin:60px 0 28px; border-radius:50%; background:rgba(0,153,255,.1); color:var(--blue-2); }
.processing-icon svg { width:62px; height:62px; }
.processing-step h1 { margin:0 0 20px; }
.processing-step > strong { font-size:clamp(36px,7vw,54px); }
.processing-step > p { max-width:440px; color:var(--muted); line-height:1.6; }
.processing-status { margin:12px 0 34px; color:var(--blue-2); }
.processing-step .withdrawal-flow-primary { margin-top:auto; }
@media (max-width: 640px) {
  .withdrawal-flow-backdrop { padding:0; align-items:stretch; }
  .withdrawal-flow-card { width:100%; max-height:none; min-height:100dvh; padding:22px 20px; border:0; border-radius:0; }
  .withdrawal-flow-card header { margin-bottom:24px; }
  .withdrawal-flow-details div { grid-template-columns:120px minmax(0,1fr); }
  .confirmation-step .withdrawal-flow-primary { margin-top:20px; }
}
